@gobolt/genesis 0.0.11 → 0.1.0
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 +6 -0
- package/dist/ClockCircleOutlined-BaXQuLIn.js +13 -0
- package/dist/{Compact-DBh6nSYB.js → Compact-Du9689ax.js} +8 -8
- package/dist/{ContextIsolator-CwuJooYf.js → ContextIsolator-BmfhJgG0.js} +2 -2
- package/dist/{DownOutlined-5-15jS0h.js → DownOutlined-Dcq69ZKM.js} +9 -9
- package/dist/{EllipsisOutlined-CJ2pgE2d.js → EllipsisOutlined-DGMph0Bj.js} +110 -110
- package/dist/{Keyframes-sPZXYuXt.js → Keyframes-C9_aCDvn.js} +1 -1
- package/dist/{Overflow-DdNKJLQh.js → Overflow-DWf4XIal.js} +31 -31
- package/dist/{Skeleton-B3vg9CbL.js → Skeleton-BVN4pcVe.js} +2 -2
- package/dist/TextArea-Bkf9hh7l.js +708 -0
- package/dist/{Typography-DqI7RslA.js → Typography-CoZ5qD-t.js} +3 -3
- package/dist/{button-B2Rgggx2.js → button-BwqpCxVM.js} +5 -5
- package/dist/components/Avatar/Avatar.js +3 -3
- package/dist/components/Avatar/__tests__/Avatar.test.js +1 -1
- package/dist/components/Avatar/styles.js +42 -42
- package/dist/components/Badge/Badge.js +3 -3
- package/dist/components/Badge/__tests__/Badge.test.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +1 -1
- package/dist/components/Breadcrumb/styles.js +4 -4
- package/dist/components/Button/__tests__/Button.test.js +1 -1
- package/dist/components/Button/styles.js +1 -1
- package/dist/components/Card/__tests__/Card.test.js +1 -1
- package/dist/components/Card/styles.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +1 -1
- package/dist/components/Checkbox/styles.js +1 -1
- package/dist/components/Dashboard/__stories__/DashboardLayoutContent.js +8 -8
- package/dist/components/Dashboard/__stories__/DashboardLayoutHeader.js +4 -4
- package/dist/components/Dashboard/__tests__/Dashboard.test.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +6 -0
- package/dist/components/DatePicker/DatePicker.js +5 -0
- package/dist/components/DatePicker/__stories__/DatePicker.stories.d.ts +10 -0
- package/dist/components/DatePicker/__tests__/DatePicker.test.d.ts +1 -0
- package/dist/components/DatePicker/__tests__/DatePicker.test.js +19 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +5 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +5 -0
- package/dist/components/DateRangePicker/__stories__/DateRangePicker.stories.d.ts +9 -0
- package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.d.ts +1 -0
- package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.js +23 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/index.js +4 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.js +3 -3
- package/dist/components/ErrorBoundary/__tests__/ErrorBoundary.test.js +1 -1
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +3 -3
- package/dist/components/ErrorBoundaryFallback/styles.js +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/__stories__/FormStory.js +4 -4
- package/dist/components/Form/__tests__/form.test.js +2 -2
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Form/styles.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/__tests__/Input.test.js +1 -1
- package/dist/components/Input/styles.js +1 -1
- package/dist/components/Layout/Content/ResponsiveContent.js +3 -3
- package/dist/components/Layout/MainLayout/MainLayout.js +1 -1
- package/dist/components/Layout/__tests__/Layout.test.js +1 -1
- package/dist/components/Message/Message.js +3 -3
- package/dist/components/Message/__tests__/Message.test.js +1 -1
- package/dist/components/Notification/Notification.js +3 -3
- package/dist/components/Notification/NotificationBadge/__tests__/NotificationBadge.test.js +1 -1
- package/dist/components/Notification/__tests__/Notification.test.js +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/__tests__/Popover.test.js +1 -1
- package/dist/components/Popover/styles.js +1 -1
- package/dist/components/Progress/Progress.js +3 -3
- package/dist/components/Progress/Progress.util.js +3 -3
- package/dist/components/Progress/ProgressText.js +3 -3
- package/dist/components/Progress/__tests__/Progress.test.js +1 -1
- package/dist/components/Progress/styles.js +3 -3
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/Radio/RadioGroup.js +1 -1
- package/dist/components/Radio/__tests__/RadioGroup.test.js +1 -1
- package/dist/components/Row/Row.js +1 -1
- package/dist/components/Row/RowActions/RowActions.js +3 -3
- package/dist/components/Row/RowLabelValue/RowLabelValue.js +3 -3
- package/dist/components/Row/RowLabelValue/styles.js +1 -1
- package/dist/components/Row/__tests__/Row.test.js +1 -1
- package/dist/components/SegmentedControls/__tests__/SegmentedControls.test.js +1 -1
- package/dist/components/SegmentedControls/styles.js +27 -27
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/__tests__/Select.test.js +1 -1
- package/dist/components/Select/styles.js +1 -1
- package/dist/components/Shapes/__tests__/Shapes.test.js +1 -1
- package/dist/components/Switch/__tests__/Switch.test.js +1 -1
- package/dist/components/Switch/styles.js +15 -15
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/__mocks__/table-mocks.js +3 -3
- package/dist/components/Table/__tests__/Table.test.js +1 -1
- package/dist/components/Table/styles.js +1 -1
- package/dist/components/Tabs/__tests__/Tabs.test.js +1 -1
- package/dist/components/Tabs/styles.js +1 -1
- package/dist/components/Tile/__tests__/Tile.test.js +1 -1
- package/dist/components/Toast/Toast.js +3 -3
- package/dist/components/Toast/__tests__/Toast.test.js +2 -2
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/components/Tooltip/__tests__/Tooltip.test.js +1 -1
- package/dist/components/Tooltip/styles.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/__tests__/Typography.test.js +2 -2
- package/dist/components/Typography/index.js +1 -1
- package/dist/components/Typography/styles.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +46 -42
- package/dist/{context-Cx7GtZpz.js → context-DIFtNa4d.js} +70 -70
- package/dist/{dropdown-zGGFIyJ_.js → dropdown-Dp_PTQ2u.js} +60 -59
- package/dist/genesis/GenesisThemeBreakdown.js +86 -44
- package/dist/genesis/labs/Lab.stories.d.ts +6 -0
- package/dist/genesis/styles.js +2 -2
- package/dist/{index-CdiHBmVe.js → index-BPVue1Yd.js} +44 -44
- package/dist/{index-CRotrkWm.js → index-BQM5OniU.js} +7 -7
- package/dist/{index-BTGF--50.js → index-B_1Ge8na.js} +20 -19
- package/dist/{index-ByspLxrB.js → index-BbTV2Cw5.js} +32 -31
- package/dist/index-BeGv28kJ.js +5173 -0
- package/dist/{index-Dyl-ddV6.js → index-BpZSuIUV.js} +16 -16
- package/dist/{index-CodMmNWv.js → index-BvOLXELm.js} +3 -3
- package/dist/{index-hoPiccJv.js → index-CLSrpQRW.js} +9 -8
- package/dist/{index-D0P16DlX.js → index-CbVOl2U6.js} +26 -24
- package/dist/{index-DWUXwgXK.js → index-D0U6r5O7.js} +265 -294
- package/dist/{index-BW_7pvTr.js → index-DEu2PVzQ.js} +4 -4
- package/dist/{index-DmZOkMjs.js → index-DNQ-jnBx.js} +1207 -1514
- package/dist/index-DOsPeIWJ.js +1000 -0
- package/dist/{index-CSPlXIlA.js → index-DRGX1Wem.js} +7 -7
- package/dist/index-DWjq9XYj.js +899 -0
- package/dist/index.js +53 -49
- package/dist/motion-CUN72xsH.js +33 -0
- package/dist/providers/GenesisProvider.js +1 -1
- package/dist/providers/ToastProvider.js +3 -3
- package/dist/providers/index.js +1 -1
- package/dist/providers/useGenesis.js +1 -1
- package/dist/{responsiveObserver-O1kw80RG.js → responsiveObserver-dCkpy7Cb.js} +1 -1
- package/dist/roundedArrow-DI_Q-xdU.js +65 -0
- package/dist/{setup-CKu7-AfI.js → setup-CUbCc8fQ.js} +2 -2
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +7 -7
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +3 -3
- package/dist/styles/theme/genesis-theme.js +211 -349
- package/dist/styles/theme/theme-tree/ThemeTree.js +114 -113
- package/dist/{styles-BSD221S5.js → styles-CWdUpZom.js} +12 -12
- package/dist/{styles-BDbHpHsc.js → styles-D1vKDy9V.js} +9 -9
- package/dist/{styles-D9iYILpv.js → styles-qerRs7Rn.js} +493 -492
- package/dist/test/setup.js +2 -2
- package/dist/{toArray-DGvPoJP_.js → toArray-U3Az44CO.js} +1 -1
- package/dist/{useBreakpoint-CAMzKscx.js → useBreakpoint-TkMv121M.js} +2 -2
- package/dist/{useCSSVarCls-C-MlZC6a.js → useCSSVarCls-Dau77fzS.js} +1 -1
- package/dist/useIcons-Ck4JP1m9.js +321 -0
- package/dist/{useLocale-DWRfeMSS.js → useLocale-CTfNpakL.js} +1 -1
- package/dist/{useMergedState-BoELfaU9.js → useMergedState-D6toxSxh.js} +1 -1
- package/dist/{useSize-CPo2bUE3.js → useSize-DSq4r6zy.js} +1 -1
- package/dist/{useVariants-Cin23jEC.js → useVariants-DrLzUVLU.js} +2 -2
- package/dist/{useZIndex-D81lkWy4.js → useZIndex-DhyHuZTN.js} +1 -1
- package/dist/utils/icon-util.js +38 -44
- package/package.json +2 -1
- package/dist/TextArea-CKWbFr0u.js +0 -1698
- package/dist/index-CqqwGTME.js +0 -956
|
@@ -1,53 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as hn, a as L, u as zr, r as vr, w as Qr, e as rn, d as Wr, _ as q, j as Jr, g as Gr } from "./presets-Djh_L_6R.js";
|
|
1
|
+
import { c as hn, a as $, u as Nr, r as sr, w as Vr, e as rn, d as Lr, _ as A, j as Fr, g as jr } from "./presets-Djh_L_6R.js";
|
|
3
2
|
import * as t from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
opacity: 0
|
|
11
|
-
}), wr = (e) => {
|
|
12
|
-
const {
|
|
13
|
-
scrollHeight: r
|
|
14
|
-
} = e;
|
|
15
|
-
return {
|
|
16
|
-
height: r,
|
|
17
|
-
opacity: 1
|
|
18
|
-
};
|
|
19
|
-
}, Or = (e) => ({
|
|
20
|
-
height: e ? e.offsetHeight : 0
|
|
21
|
-
}), sr = (e, r) => (r == null ? void 0 : r.deadline) === !0 || r.propertyName === "height", Pa = function() {
|
|
22
|
-
return {
|
|
23
|
-
motionName: `${arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : jr}-motion-collapse`,
|
|
24
|
-
onAppearStart: lr,
|
|
25
|
-
onEnterStart: lr,
|
|
26
|
-
onAppearActive: wr,
|
|
27
|
-
onEnterActive: wr,
|
|
28
|
-
onLeaveStart: Or,
|
|
29
|
-
onLeaveActive: lr,
|
|
30
|
-
onAppearEnd: sr,
|
|
31
|
-
onEnterEnd: sr,
|
|
32
|
-
onLeaveEnd: sr,
|
|
33
|
-
motionDeadline: 500
|
|
34
|
-
};
|
|
35
|
-
}, ka = (e, r, n) => n !== void 0 ? n : `${e}-${r}`, Yr = (e) => ({
|
|
3
|
+
import { o as dr, h as Z, z as $r, B as Er, G as qr, s as zr, t as _r, J as Ar, A as Ir, a as Ke, K as cr } from "./index-BbTV2Cw5.js";
|
|
4
|
+
import { R as Tr } from "./index-BQM5OniU.js";
|
|
5
|
+
import { g as fr } from "./shadow-BoMGMNn3.js";
|
|
6
|
+
import { u as Ur } from "./useId-D2tzlufo.js";
|
|
7
|
+
import { i as Qr } from "./isVisible-D3-B85BJ.js";
|
|
8
|
+
const Jr = (e) => ({
|
|
36
9
|
animationDuration: e,
|
|
37
10
|
animationFillMode: "both"
|
|
38
|
-
}),
|
|
11
|
+
}), Gr = (e) => ({
|
|
39
12
|
animationDuration: e,
|
|
40
13
|
animationFillMode: "both"
|
|
41
|
-
}),
|
|
14
|
+
}), wa = function(e, r, n, a) {
|
|
42
15
|
const u = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
|
|
43
16
|
return {
|
|
44
17
|
[`
|
|
45
18
|
${u}${e}-enter,
|
|
46
19
|
${u}${e}-appear
|
|
47
|
-
`]: Object.assign(Object.assign({},
|
|
20
|
+
`]: Object.assign(Object.assign({}, Jr(a)), {
|
|
48
21
|
animationPlayState: "paused"
|
|
49
22
|
}),
|
|
50
|
-
[`${u}${e}-leave`]: Object.assign(Object.assign({},
|
|
23
|
+
[`${u}${e}-leave`]: Object.assign(Object.assign({}, Gr(a)), {
|
|
51
24
|
animationPlayState: "paused"
|
|
52
25
|
}),
|
|
53
26
|
[`
|
|
@@ -64,16 +37,16 @@ const lr = () => ({
|
|
|
64
37
|
}
|
|
65
38
|
};
|
|
66
39
|
};
|
|
67
|
-
var
|
|
68
|
-
function
|
|
40
|
+
var xr = /* @__PURE__ */ t.createContext(null), gr = [];
|
|
41
|
+
function Kr(e, r) {
|
|
69
42
|
var n = t.useState(function() {
|
|
70
43
|
if (!hn())
|
|
71
44
|
return null;
|
|
72
45
|
var m = document.createElement("div");
|
|
73
46
|
return process.env.NODE_ENV !== "production" && r && m.setAttribute("data-debug", r), m;
|
|
74
|
-
}), a =
|
|
47
|
+
}), a = $(n, 1), i = a[0], u = t.useRef(!1), s = t.useContext(xr), f = t.useState(gr), v = $(f, 2), h = v[0], D = v[1], g = s || (u.current ? void 0 : function(m) {
|
|
75
48
|
D(function(N) {
|
|
76
|
-
var b = [m].concat(
|
|
49
|
+
var b = [m].concat(dr(N));
|
|
77
50
|
return b;
|
|
78
51
|
});
|
|
79
52
|
});
|
|
@@ -89,11 +62,11 @@ function pr(e, r) {
|
|
|
89
62
|
}, [e]), Z(function() {
|
|
90
63
|
h.length && (h.forEach(function(m) {
|
|
91
64
|
return m();
|
|
92
|
-
}), D(
|
|
65
|
+
}), D(gr));
|
|
93
66
|
}, [h]), [i, g];
|
|
94
67
|
}
|
|
95
|
-
var
|
|
96
|
-
function
|
|
68
|
+
var lr;
|
|
69
|
+
function Wr(e) {
|
|
97
70
|
var r = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)), n = document.createElement("div");
|
|
98
71
|
n.id = r;
|
|
99
72
|
var a = n.style;
|
|
@@ -105,7 +78,7 @@ function Br(e) {
|
|
|
105
78
|
var f = getComputedStyle(e, "::-webkit-scrollbar"), v = parseInt(f.width, 10), h = parseInt(f.height, 10);
|
|
106
79
|
try {
|
|
107
80
|
var D = v ? "width: ".concat(f.width, ";") : "", g = h ? "height: ".concat(f.height, ";") : "";
|
|
108
|
-
|
|
81
|
+
Nr(`
|
|
109
82
|
#`.concat(r, `::-webkit-scrollbar {
|
|
110
83
|
`).concat(D, `
|
|
111
84
|
`).concat(g, `
|
|
@@ -116,86 +89,86 @@ function Br(e) {
|
|
|
116
89
|
}
|
|
117
90
|
document.body.appendChild(n);
|
|
118
91
|
var y = e && i && !isNaN(i) ? i : n.offsetWidth - n.clientWidth, d = e && u && !isNaN(u) ? u : n.offsetHeight - n.clientHeight;
|
|
119
|
-
return document.body.removeChild(n),
|
|
92
|
+
return document.body.removeChild(n), sr(r), {
|
|
120
93
|
width: y,
|
|
121
94
|
height: d
|
|
122
95
|
};
|
|
123
96
|
}
|
|
124
|
-
function
|
|
125
|
-
return typeof document > "u" ? 0 : (
|
|
97
|
+
function ba(e) {
|
|
98
|
+
return typeof document > "u" ? 0 : (lr === void 0 && (lr = Wr()), lr.width);
|
|
126
99
|
}
|
|
127
|
-
function
|
|
100
|
+
function Zr(e) {
|
|
128
101
|
return typeof document > "u" || !e || !(e instanceof Element) ? {
|
|
129
102
|
width: 0,
|
|
130
103
|
height: 0
|
|
131
|
-
} :
|
|
104
|
+
} : Wr(e);
|
|
132
105
|
}
|
|
133
|
-
function
|
|
106
|
+
function Or() {
|
|
134
107
|
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
|
|
135
108
|
}
|
|
136
|
-
var
|
|
137
|
-
function
|
|
109
|
+
var Yr = "rc-util-locker-".concat(Date.now()), yr = 0;
|
|
110
|
+
function Xr(e) {
|
|
138
111
|
var r = !!e, n = t.useState(function() {
|
|
139
|
-
return
|
|
140
|
-
}), a =
|
|
112
|
+
return yr += 1, "".concat(Yr, "_").concat(yr);
|
|
113
|
+
}), a = $(n, 1), i = a[0];
|
|
141
114
|
Z(function() {
|
|
142
115
|
if (r) {
|
|
143
|
-
var u =
|
|
144
|
-
|
|
116
|
+
var u = Zr(document.body).width, s = Or();
|
|
117
|
+
Nr(`
|
|
145
118
|
html body {
|
|
146
119
|
overflow-y: hidden;
|
|
147
120
|
`.concat(s ? "width: calc(100% - ".concat(u, "px);") : "", `
|
|
148
121
|
}`), i);
|
|
149
122
|
} else
|
|
150
|
-
|
|
123
|
+
sr(i);
|
|
151
124
|
return function() {
|
|
152
|
-
|
|
125
|
+
sr(i);
|
|
153
126
|
};
|
|
154
127
|
}, [r, i]);
|
|
155
128
|
}
|
|
156
|
-
var
|
|
157
|
-
function
|
|
158
|
-
return
|
|
129
|
+
var pr = !1;
|
|
130
|
+
function ea(e) {
|
|
131
|
+
return pr;
|
|
159
132
|
}
|
|
160
|
-
var
|
|
133
|
+
var wr = function(r) {
|
|
161
134
|
return r === !1 ? !1 : !hn() || !r ? null : typeof r == "string" ? document.querySelector(r) : typeof r == "function" ? r() : r;
|
|
162
|
-
},
|
|
163
|
-
var n = e.open, a = e.autoLock, i = e.getContainer, u = e.debug, s = e.autoDestroy, f = s === void 0 ? !0 : s, v = e.children, h = t.useState(n), D =
|
|
164
|
-
process.env.NODE_ENV !== "production" &&
|
|
135
|
+
}, mr = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
136
|
+
var n = e.open, a = e.autoLock, i = e.getContainer, u = e.debug, s = e.autoDestroy, f = s === void 0 ? !0 : s, v = e.children, h = t.useState(n), D = $(h, 2), g = D[0], y = D[1], d = g || n;
|
|
137
|
+
process.env.NODE_ENV !== "production" && Vr(hn() || !n, "Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."), t.useEffect(function() {
|
|
165
138
|
(f || n) && y(n);
|
|
166
139
|
}, [n, f]);
|
|
167
140
|
var m = t.useState(function() {
|
|
168
|
-
return
|
|
169
|
-
}), N =
|
|
141
|
+
return wr(i);
|
|
142
|
+
}), N = $(m, 2), b = N[0], W = N[1];
|
|
170
143
|
t.useEffect(function() {
|
|
171
|
-
var U =
|
|
144
|
+
var U = wr(i);
|
|
172
145
|
W(U ?? null);
|
|
173
146
|
});
|
|
174
|
-
var
|
|
175
|
-
|
|
147
|
+
var T = Kr(d && !b, u), C = $(T, 2), x = C[0], E = C[1], c = b ?? x;
|
|
148
|
+
Xr(a && n && hn() && (c === x || c === document.body));
|
|
176
149
|
var re = null;
|
|
177
150
|
if (v && $r(v) && r) {
|
|
178
151
|
var ce = v;
|
|
179
152
|
re = ce.ref;
|
|
180
153
|
}
|
|
181
|
-
var ae =
|
|
154
|
+
var ae = Er(re, r);
|
|
182
155
|
if (!d || !hn() || b === void 0)
|
|
183
156
|
return null;
|
|
184
|
-
var fe = c === !1 ||
|
|
157
|
+
var fe = c === !1 || ea(), te = v;
|
|
185
158
|
return r && (te = /* @__PURE__ */ t.cloneElement(v, {
|
|
186
159
|
ref: ae
|
|
187
|
-
})), /* @__PURE__ */ t.createElement(
|
|
188
|
-
value:
|
|
189
|
-
}, fe ? te : /* @__PURE__ */
|
|
160
|
+
})), /* @__PURE__ */ t.createElement(xr.Provider, {
|
|
161
|
+
value: E
|
|
162
|
+
}, fe ? te : /* @__PURE__ */ qr.createPortal(te, c));
|
|
190
163
|
});
|
|
191
|
-
process.env.NODE_ENV !== "production" && (
|
|
192
|
-
const
|
|
164
|
+
process.env.NODE_ENV !== "production" && (mr.displayName = "Portal");
|
|
165
|
+
const na = function() {
|
|
193
166
|
if (typeof navigator > "u" || typeof window > "u")
|
|
194
167
|
return !1;
|
|
195
168
|
var e = navigator.userAgent || navigator.vendor || window.opera;
|
|
196
169
|
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));
|
|
197
170
|
};
|
|
198
|
-
function
|
|
171
|
+
function ra(e) {
|
|
199
172
|
var r = e.prefixCls, n = e.align, a = e.arrow, i = e.arrowPos, u = a || {}, s = u.className, f = u.content, v = i.x, h = v === void 0 ? 0 : v, D = i.y, g = D === void 0 ? 0 : D, y = t.useRef();
|
|
200
173
|
if (!n || !n.points)
|
|
201
174
|
return null;
|
|
@@ -203,8 +176,8 @@ function ua(e) {
|
|
|
203
176
|
position: "absolute"
|
|
204
177
|
};
|
|
205
178
|
if (n.autoArrow !== !1) {
|
|
206
|
-
var m = n.points[0], N = n.points[1], b = m[0], W = m[1],
|
|
207
|
-
b ===
|
|
179
|
+
var m = n.points[0], N = n.points[1], b = m[0], W = m[1], T = N[0], C = N[1];
|
|
180
|
+
b === T || !["t", "b"].includes(b) ? d.top = g : b === "t" ? d.top = 0 : d.bottom = 0, W === C || !["l", "r"].includes(W) ? d.left = h : W === "l" ? d.left = 0 : d.right = 0;
|
|
208
181
|
}
|
|
209
182
|
return /* @__PURE__ */ t.createElement("div", {
|
|
210
183
|
ref: y,
|
|
@@ -212,9 +185,9 @@ function ua(e) {
|
|
|
212
185
|
style: d
|
|
213
186
|
}, f);
|
|
214
187
|
}
|
|
215
|
-
function
|
|
188
|
+
function aa(e) {
|
|
216
189
|
var r = e.prefixCls, n = e.open, a = e.zIndex, i = e.mask, u = e.motion;
|
|
217
|
-
return i ? /* @__PURE__ */ t.createElement(
|
|
190
|
+
return i ? /* @__PURE__ */ t.createElement(zr, Lr({}, u, {
|
|
218
191
|
motionAppear: !0,
|
|
219
192
|
visible: n,
|
|
220
193
|
removeOnLeave: !0
|
|
@@ -228,15 +201,15 @@ function la(e) {
|
|
|
228
201
|
});
|
|
229
202
|
}) : null;
|
|
230
203
|
}
|
|
231
|
-
var
|
|
204
|
+
var Rr = /* @__PURE__ */ t.memo(function(e) {
|
|
232
205
|
var r = e.children;
|
|
233
206
|
return r;
|
|
234
207
|
}, function(e, r) {
|
|
235
208
|
return r.cache;
|
|
236
209
|
});
|
|
237
|
-
process.env.NODE_ENV !== "production" && (
|
|
238
|
-
var
|
|
239
|
-
var n = e.popup, a = e.className, i = e.prefixCls, u = e.style, s = e.target, f = e.onVisibleChanged, v = e.open, h = e.keepDom, D = e.fresh, g = e.onClick, y = e.mask, d = e.arrow, m = e.arrowPos, N = e.align, b = e.motion, W = e.maskMotion,
|
|
210
|
+
process.env.NODE_ENV !== "production" && (Rr.displayName = "PopupContent");
|
|
211
|
+
var Hr = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
212
|
+
var n = e.popup, a = e.className, i = e.prefixCls, u = e.style, s = e.target, f = e.onVisibleChanged, v = e.open, h = e.keepDom, D = e.fresh, g = e.onClick, y = e.mask, d = e.arrow, m = e.arrowPos, N = e.align, b = e.motion, W = e.maskMotion, T = e.forceRender, C = e.getPopupContainer, x = e.autoDestroy, E = e.portal, c = e.zIndex, re = e.onMouseEnter, ce = e.onMouseLeave, ae = e.onPointerEnter, fe = e.onPointerDownCapture, te = e.ready, U = e.offsetX, Me = e.offsetY, ve = e.offsetR, Pe = e.offsetB, Q = e.onAlign, Se = e.onPrepare, B = e.stretch, F = e.targetWidth, w = e.targetHeight, Be = typeof n == "function" ? n() : n, ie = v || h, V = (C == null ? void 0 : C.length) > 0, M = t.useState(!C || !V), J = $(M, 2), Ve = J[0], an = J[1];
|
|
240
213
|
if (Z(function() {
|
|
241
214
|
!Ve && V && s && an(!0);
|
|
242
215
|
}, [Ve, V, s]), !Ve)
|
|
@@ -248,50 +221,50 @@ var Ar = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
|
248
221
|
bottom: me
|
|
249
222
|
};
|
|
250
223
|
if (te || !v) {
|
|
251
|
-
var
|
|
252
|
-
he ? (G.right = ve, G.left = me) : (G.left = U, G.right = me), oe ? (G.bottom =
|
|
224
|
+
var Le, Fe = N.points, O = N.dynamicInset || ((Le = N._experimental) === null || Le === void 0 ? void 0 : Le.dynamicInset), he = O && Fe[0][1] === "r", oe = O && Fe[0][0] === "b";
|
|
225
|
+
he ? (G.right = ve, G.left = me) : (G.left = U, G.right = me), oe ? (G.bottom = Pe, G.top = me) : (G.top = Me, G.bottom = me);
|
|
253
226
|
}
|
|
254
227
|
var I = {};
|
|
255
|
-
return B && (B.includes("height") && w ? I.height = w : B.includes("minHeight") && w && (I.minHeight = w), B.includes("width") &&
|
|
256
|
-
open:
|
|
228
|
+
return B && (B.includes("height") && w ? I.height = w : B.includes("minHeight") && w && (I.minHeight = w), B.includes("width") && F ? I.width = F : B.includes("minWidth") && F && (I.minWidth = F)), v || (I.pointerEvents = "none"), /* @__PURE__ */ t.createElement(E, {
|
|
229
|
+
open: T || ie,
|
|
257
230
|
getContainer: C && function() {
|
|
258
231
|
return C(s);
|
|
259
232
|
},
|
|
260
|
-
autoDestroy:
|
|
261
|
-
}, /* @__PURE__ */ t.createElement(
|
|
233
|
+
autoDestroy: x
|
|
234
|
+
}, /* @__PURE__ */ t.createElement(aa, {
|
|
262
235
|
prefixCls: i,
|
|
263
236
|
open: v,
|
|
264
237
|
zIndex: c,
|
|
265
238
|
mask: y,
|
|
266
239
|
motion: W
|
|
267
|
-
}), /* @__PURE__ */ t.createElement(
|
|
240
|
+
}), /* @__PURE__ */ t.createElement(Tr, {
|
|
268
241
|
onResize: Q,
|
|
269
242
|
disabled: !v
|
|
270
243
|
}, function(tn) {
|
|
271
|
-
return /* @__PURE__ */ t.createElement(
|
|
244
|
+
return /* @__PURE__ */ t.createElement(zr, Lr({
|
|
272
245
|
motionAppear: !0,
|
|
273
246
|
motionEnter: !0,
|
|
274
247
|
motionLeave: !0,
|
|
275
248
|
removeOnLeave: !1,
|
|
276
|
-
forceRender:
|
|
249
|
+
forceRender: T,
|
|
277
250
|
leavedClassName: "".concat(i, "-hidden")
|
|
278
251
|
}, b, {
|
|
279
|
-
onAppearPrepare:
|
|
280
|
-
onEnterPrepare:
|
|
252
|
+
onAppearPrepare: Se,
|
|
253
|
+
onEnterPrepare: Se,
|
|
281
254
|
visible: v,
|
|
282
255
|
onVisibleChanged: function(Y) {
|
|
283
256
|
var ge;
|
|
284
257
|
b == null || (ge = b.onVisibleChanged) === null || ge === void 0 || ge.call(b, Y), f(Y);
|
|
285
258
|
}
|
|
286
|
-
}), function(
|
|
287
|
-
var ge =
|
|
259
|
+
}), function($e, Y) {
|
|
260
|
+
var ge = $e.className, je = $e.style, j = rn(i, ge, a);
|
|
288
261
|
return /* @__PURE__ */ t.createElement("div", {
|
|
289
|
-
ref:
|
|
290
|
-
className:
|
|
291
|
-
style:
|
|
262
|
+
ref: _r(tn, r, Y),
|
|
263
|
+
className: j,
|
|
264
|
+
style: A(A(A(A({
|
|
292
265
|
"--arrow-x": "".concat(m.x || 0, "px"),
|
|
293
266
|
"--arrow-y": "".concat(m.y || 0, "px")
|
|
294
|
-
}, G), I),
|
|
267
|
+
}, G), I), je), {}, {
|
|
295
268
|
boxSizing: "border-box",
|
|
296
269
|
zIndex: c
|
|
297
270
|
}, u),
|
|
@@ -300,50 +273,50 @@ var Ar = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
|
300
273
|
onPointerEnter: ae,
|
|
301
274
|
onClick: g,
|
|
302
275
|
onPointerDownCapture: fe
|
|
303
|
-
}, d && /* @__PURE__ */ t.createElement(
|
|
276
|
+
}, d && /* @__PURE__ */ t.createElement(ra, {
|
|
304
277
|
prefixCls: i,
|
|
305
278
|
arrow: d,
|
|
306
279
|
arrowPos: m,
|
|
307
280
|
align: N
|
|
308
|
-
}), /* @__PURE__ */ t.createElement(
|
|
281
|
+
}), /* @__PURE__ */ t.createElement(Rr, {
|
|
309
282
|
cache: !v && !D
|
|
310
283
|
}, Be));
|
|
311
284
|
});
|
|
312
285
|
}));
|
|
313
286
|
});
|
|
314
|
-
process.env.NODE_ENV !== "production" && (
|
|
315
|
-
var
|
|
287
|
+
process.env.NODE_ENV !== "production" && (Hr.displayName = "Popup");
|
|
288
|
+
var Br = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
316
289
|
var n = e.children, a = e.getTriggerDOMNode, i = $r(n), u = t.useCallback(function(f) {
|
|
317
|
-
|
|
318
|
-
}, [a]), s =
|
|
290
|
+
Ar(r, a ? a(f) : f);
|
|
291
|
+
}, [a]), s = Er(u, Ir(n));
|
|
319
292
|
return i ? /* @__PURE__ */ t.cloneElement(n, {
|
|
320
293
|
ref: s
|
|
321
294
|
}) : n;
|
|
322
295
|
});
|
|
323
|
-
process.env.NODE_ENV !== "production" && (
|
|
324
|
-
var
|
|
325
|
-
function
|
|
296
|
+
process.env.NODE_ENV !== "production" && (Br.displayName = "TriggerWrapper");
|
|
297
|
+
var br = /* @__PURE__ */ t.createContext(null);
|
|
298
|
+
function Cr(e) {
|
|
326
299
|
return e ? Array.isArray(e) ? e : [e] : [];
|
|
327
300
|
}
|
|
328
|
-
function
|
|
301
|
+
function ta(e, r, n, a) {
|
|
329
302
|
return t.useMemo(function() {
|
|
330
|
-
var i =
|
|
303
|
+
var i = Cr(n ?? r), u = Cr(a ?? r), s = new Set(i), f = new Set(u);
|
|
331
304
|
return e && (s.has("hover") && (s.delete("hover"), s.add("click")), f.has("hover") && (f.delete("hover"), f.add("click"))), [s, f];
|
|
332
305
|
}, [e, r, n, a]);
|
|
333
306
|
}
|
|
334
|
-
function
|
|
307
|
+
function ia() {
|
|
335
308
|
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;
|
|
336
309
|
return n ? e[0] === r[0] : e[0] === r[0] && e[1] === r[1];
|
|
337
310
|
}
|
|
338
|
-
function
|
|
311
|
+
function oa(e, r, n, a) {
|
|
339
312
|
for (var i = n.points, u = Object.keys(e), s = 0; s < u.length; s += 1) {
|
|
340
313
|
var f, v = u[s];
|
|
341
|
-
if (
|
|
314
|
+
if (ia((f = e[v]) === null || f === void 0 ? void 0 : f.points, i, a))
|
|
342
315
|
return "".concat(r, "-placement-").concat(v);
|
|
343
316
|
}
|
|
344
317
|
return "";
|
|
345
318
|
}
|
|
346
|
-
function
|
|
319
|
+
function Mr(e, r, n, a) {
|
|
347
320
|
return r || (n ? {
|
|
348
321
|
motionName: "".concat(e, "-").concat(n)
|
|
349
322
|
} : a ? {
|
|
@@ -353,7 +326,7 @@ function kr(e, r, n, a) {
|
|
|
353
326
|
function yn(e) {
|
|
354
327
|
return e.ownerDocument.defaultView;
|
|
355
328
|
}
|
|
356
|
-
function
|
|
329
|
+
function vr(e) {
|
|
357
330
|
for (var r = [], n = e == null ? void 0 : e.parentElement, a = ["hidden", "scroll", "clip", "auto"]; n; ) {
|
|
358
331
|
var i = yn(n).getComputedStyle(n), u = i.overflowX, s = i.overflowY, f = i.overflow;
|
|
359
332
|
[u, s, f].some(function(v) {
|
|
@@ -369,29 +342,29 @@ function gn(e) {
|
|
|
369
342
|
function mn(e) {
|
|
370
343
|
return gn(parseFloat(e), 0);
|
|
371
344
|
}
|
|
372
|
-
function
|
|
373
|
-
var n =
|
|
345
|
+
function Pr(e, r) {
|
|
346
|
+
var n = A({}, e);
|
|
374
347
|
return (r || []).forEach(function(a) {
|
|
375
348
|
if (!(a instanceof HTMLBodyElement || a instanceof HTMLHtmlElement)) {
|
|
376
|
-
var i = yn(a).getComputedStyle(a), u = i.overflow, s = i.overflowClipMargin, f = i.borderTopWidth, v = i.borderBottomWidth, h = i.borderLeftWidth, D = i.borderRightWidth, g = a.getBoundingClientRect(), y = a.offsetHeight, d = a.clientHeight, m = a.offsetWidth, N = a.clientWidth, b = mn(f), W = mn(v),
|
|
349
|
+
var i = yn(a).getComputedStyle(a), u = i.overflow, s = i.overflowClipMargin, f = i.borderTopWidth, v = i.borderBottomWidth, h = i.borderLeftWidth, D = i.borderRightWidth, g = a.getBoundingClientRect(), y = a.offsetHeight, d = a.clientHeight, m = a.offsetWidth, N = a.clientWidth, b = mn(f), W = mn(v), T = mn(h), C = mn(D), x = gn(Math.round(g.width / m * 1e3) / 1e3), E = gn(Math.round(g.height / y * 1e3) / 1e3), c = (m - N - T - C) * x, re = (y - d - b - W) * E, ce = b * E, ae = W * E, fe = T * x, te = C * x, U = 0, Me = 0;
|
|
377
350
|
if (u === "clip") {
|
|
378
351
|
var ve = mn(s);
|
|
379
|
-
U = ve *
|
|
352
|
+
U = ve * x, Me = ve * E;
|
|
380
353
|
}
|
|
381
|
-
var
|
|
382
|
-
n.left = Math.max(n.left,
|
|
354
|
+
var Pe = g.x + fe - U, Q = g.y + ce - Me, Se = Pe + g.width + 2 * U - fe - te - c, B = Q + g.height + 2 * Me - ce - ae - re;
|
|
355
|
+
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, B);
|
|
383
356
|
}
|
|
384
357
|
}), n;
|
|
385
358
|
}
|
|
386
|
-
function
|
|
359
|
+
function Sr(e) {
|
|
387
360
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = "".concat(r), a = n.match(/^(.*)\%$/);
|
|
388
361
|
return a ? e * (parseFloat(a[1]) / 100) : parseFloat(n);
|
|
389
362
|
}
|
|
390
|
-
function
|
|
391
|
-
var n = r || [], a =
|
|
392
|
-
return [
|
|
363
|
+
function kr(e, r) {
|
|
364
|
+
var n = r || [], a = $(n, 2), i = a[0], u = a[1];
|
|
365
|
+
return [Sr(e.width, i), Sr(e.height, u)];
|
|
393
366
|
}
|
|
394
|
-
function
|
|
367
|
+
function Dr() {
|
|
395
368
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
396
369
|
return [e[0], e[1]];
|
|
397
370
|
}
|
|
@@ -402,7 +375,7 @@ function nn(e, r) {
|
|
|
402
375
|
y: u
|
|
403
376
|
};
|
|
404
377
|
}
|
|
405
|
-
function
|
|
378
|
+
function He(e, r) {
|
|
406
379
|
var n = {
|
|
407
380
|
t: "b",
|
|
408
381
|
b: "t",
|
|
@@ -413,7 +386,7 @@ function Re(e, r) {
|
|
|
413
386
|
return i === r ? n[a] || "c" : a;
|
|
414
387
|
}).join("");
|
|
415
388
|
}
|
|
416
|
-
function
|
|
389
|
+
function ua(e, r, n, a, i, u, s) {
|
|
417
390
|
var f = t.useState({
|
|
418
391
|
ready: !1,
|
|
419
392
|
offsetX: 0,
|
|
@@ -425,8 +398,8 @@ function fa(e, r, n, a, i, u, s) {
|
|
|
425
398
|
scaleX: 1,
|
|
426
399
|
scaleY: 1,
|
|
427
400
|
align: i[a] || {}
|
|
428
|
-
}), v =
|
|
429
|
-
return r ?
|
|
401
|
+
}), v = $(f, 2), h = v[0], D = v[1], g = t.useRef(0), y = t.useMemo(function() {
|
|
402
|
+
return r ? vr(r) : [];
|
|
430
403
|
}, [r]), d = t.useRef({}), m = function() {
|
|
431
404
|
d.current = {};
|
|
432
405
|
};
|
|
@@ -434,13 +407,13 @@ function fa(e, r, n, a, i, u, s) {
|
|
|
434
407
|
var N = Ke(function() {
|
|
435
408
|
if (r && n && e) {
|
|
436
409
|
let ne = function(en, We) {
|
|
437
|
-
var
|
|
438
|
-
return Math.max(0, (l - or) * (
|
|
439
|
-
},
|
|
440
|
-
Ie = M.y + k, Ue = Ie + O, De = M.x +
|
|
410
|
+
var Re = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : wn, vn = M.x + en, Hn = M.y + We, tr = vn + he, ir = Hn + O, or = Math.max(vn, Re.left), o = Math.max(Hn, Re.top), l = Math.min(tr, Re.right), L = Math.min(ir, Re.bottom);
|
|
411
|
+
return Math.max(0, (l - or) * (L - o));
|
|
412
|
+
}, Rn = function() {
|
|
413
|
+
Ie = M.y + k, Ue = Ie + O, De = M.x + P, Oe = De + he;
|
|
441
414
|
};
|
|
442
|
-
var
|
|
443
|
-
(
|
|
415
|
+
var T, C, x, E, c = r, re = c.ownerDocument, ce = yn(c), ae = ce.getComputedStyle(c), fe = ae.width, te = ae.height, U = ae.position, Me = c.style.left, ve = c.style.top, Pe = c.style.right, Q = c.style.bottom, Se = c.style.overflow, B = A(A({}, i[a]), u), F = re.createElement("div");
|
|
416
|
+
(T = c.parentElement) === null || T === void 0 || T.appendChild(F), F.style.left = "".concat(c.offsetLeft, "px"), F.style.top = "".concat(c.offsetTop, "px"), F.style.position = U, F.style.height = "".concat(c.offsetHeight, "px"), F.style.width = "".concat(c.offsetWidth, "px"), c.style.left = "0", c.style.top = "0", c.style.right = "auto", c.style.bottom = "auto", c.style.overflow = "hidden";
|
|
444
417
|
var w;
|
|
445
418
|
if (Array.isArray(n))
|
|
446
419
|
w = {
|
|
@@ -459,86 +432,86 @@ function fa(e, r, n, a, i, u, s) {
|
|
|
459
432
|
};
|
|
460
433
|
}
|
|
461
434
|
var M = c.getBoundingClientRect();
|
|
462
|
-
M.x = (C = M.x) !== null && C !== void 0 ? C : M.left, M.y = (
|
|
463
|
-
var J = re.documentElement, Ve = J.clientWidth, an = J.clientHeight, me = J.scrollWidth, G = J.scrollHeight,
|
|
435
|
+
M.x = (C = M.x) !== null && C !== void 0 ? C : M.left, M.y = (x = M.y) !== null && x !== void 0 ? x : M.top;
|
|
436
|
+
var J = re.documentElement, Ve = J.clientWidth, an = J.clientHeight, me = J.scrollWidth, G = J.scrollHeight, Le = J.scrollTop, Fe = J.scrollLeft, O = M.height, he = M.width, oe = w.height, I = w.width, tn = {
|
|
464
437
|
left: 0,
|
|
465
438
|
top: 0,
|
|
466
439
|
right: Ve,
|
|
467
440
|
bottom: an
|
|
468
|
-
},
|
|
469
|
-
left: -
|
|
470
|
-
top: -
|
|
471
|
-
right: me -
|
|
472
|
-
bottom: G -
|
|
473
|
-
}, Y = B.htmlRegion, ge = "visible",
|
|
474
|
-
Y !== "scroll" && Y !==
|
|
475
|
-
var
|
|
441
|
+
}, $e = {
|
|
442
|
+
left: -Fe,
|
|
443
|
+
top: -Le,
|
|
444
|
+
right: me - Fe,
|
|
445
|
+
bottom: G - Le
|
|
446
|
+
}, Y = B.htmlRegion, ge = "visible", je = "visibleFirst";
|
|
447
|
+
Y !== "scroll" && Y !== je && (Y = ge);
|
|
448
|
+
var j = Y === je, Fn = Pr($e, y), S = Pr(tn, y), wn = Y === ge ? S : Fn, qe = j ? S : wn;
|
|
476
449
|
c.style.left = "auto", c.style.top = "auto", c.style.right = "0", c.style.bottom = "0";
|
|
477
|
-
var
|
|
478
|
-
c.style.left = Me, c.style.top = ve, c.style.right =
|
|
479
|
-
var
|
|
480
|
-
if (
|
|
450
|
+
var q = c.getBoundingClientRect();
|
|
451
|
+
c.style.left = Me, c.style.top = ve, c.style.right = Pe, c.style.bottom = Q, c.style.overflow = Se, (E = c.parentElement) === null || E === void 0 || E.removeChild(F);
|
|
452
|
+
var Ee = gn(Math.round(he / parseFloat(fe) * 1e3) / 1e3), ke = gn(Math.round(O / parseFloat(te) * 1e3) / 1e3);
|
|
453
|
+
if (Ee === 0 || ke === 0 || cr(n) && !Qr(n))
|
|
481
454
|
return;
|
|
482
|
-
var
|
|
483
|
-
w.x -= p, w.y -=
|
|
484
|
-
var
|
|
455
|
+
var jn = B.offset, qn = B.targetOffset, bn = kr(M, jn), ue = $(bn, 2), le = ue[0], X = ue[1], _n = kr(w, qn), _e = $(_n, 2), p = _e[0], ze = _e[1];
|
|
456
|
+
w.x -= p, w.y -= ze;
|
|
457
|
+
var An = B.points || [], Cn = $(An, 2), In = Cn[0], Un = Cn[1], ye = Dr(Un), K = Dr(In), on = nn(w, ye), _ = nn(M, K), Te = A({}, B), P = on.x - _.x + le, k = on.y - _.y + X, se = ne(P, k), Ae = ne(P, k, S), un = nn(w, ["t", "l"]), ee = nn(M, ["t", "l"]), Mn = nn(w, ["b", "r"]), ln = nn(M, ["b", "r"]), xe = B.overflow || {}, Pn = xe.adjustX, Qn = xe.adjustY, sn = xe.shiftX, Ze = xe.shiftY, dn = function(We) {
|
|
485
458
|
return typeof We == "boolean" ? We : We >= 0;
|
|
486
459
|
}, Ie, Ue, De, Oe;
|
|
487
|
-
|
|
488
|
-
var Qe = dn(Qn),
|
|
489
|
-
if (Qe && K[0] === "t" && (Ue >
|
|
490
|
-
var
|
|
491
|
-
|
|
492
|
-
var kn = ne(
|
|
460
|
+
Rn();
|
|
461
|
+
var Qe = dn(Qn), Sn = K[0] === ye[0];
|
|
462
|
+
if (Qe && K[0] === "t" && (Ue > qe.bottom || d.current.bt)) {
|
|
463
|
+
var H = k;
|
|
464
|
+
Sn ? H -= O - oe : H = un.y - ln.y - X;
|
|
465
|
+
var kn = ne(P, H), Jn = ne(P, H, S);
|
|
493
466
|
// Of course use larger one
|
|
494
|
-
kn > se || kn === se && (!
|
|
495
|
-
Jn >=
|
|
467
|
+
kn > se || kn === se && (!j || // Choose recommend one
|
|
468
|
+
Jn >= Ae) ? (d.current.bt = !0, k = H, X = -X, Te.points = [He(K, 0), He(ye, 0)]) : d.current.bt = !1;
|
|
496
469
|
}
|
|
497
|
-
if (Qe && K[0] === "b" && (Ie <
|
|
470
|
+
if (Qe && K[0] === "b" && (Ie < qe.top || d.current.tb)) {
|
|
498
471
|
var Je = k;
|
|
499
|
-
|
|
500
|
-
var Dn = ne(
|
|
472
|
+
Sn ? Je += O - oe : Je = Mn.y - ee.y - X;
|
|
473
|
+
var Dn = ne(P, Je), Gn = ne(P, Je, S);
|
|
501
474
|
// Of course use larger one
|
|
502
|
-
Dn > se || Dn === se && (!
|
|
503
|
-
Gn >=
|
|
475
|
+
Dn > se || Dn === se && (!j || // Choose recommend one
|
|
476
|
+
Gn >= Ae) ? (d.current.tb = !0, k = Je, X = -X, Te.points = [He(K, 0), He(ye, 0)]) : d.current.tb = !1;
|
|
504
477
|
}
|
|
505
|
-
var Nn = dn(
|
|
506
|
-
if (Nn && K[1] === "l" && (Oe >
|
|
507
|
-
var Ge =
|
|
508
|
-
|
|
509
|
-
var
|
|
478
|
+
var Nn = dn(Pn), Ln = K[1] === ye[1];
|
|
479
|
+
if (Nn && K[1] === "l" && (Oe > qe.right || d.current.rl)) {
|
|
480
|
+
var Ge = P;
|
|
481
|
+
Ln ? Ge -= he - I : Ge = un.x - ln.x - le;
|
|
482
|
+
var $n = ne(Ge, k), Ye = ne(Ge, k, S);
|
|
510
483
|
// Of course use larger one
|
|
511
|
-
|
|
512
|
-
Ye >=
|
|
484
|
+
$n > se || $n === se && (!j || // Choose recommend one
|
|
485
|
+
Ye >= Ae) ? (d.current.rl = !0, P = Ge, le = -le, Te.points = [He(K, 1), He(ye, 1)]) : d.current.rl = !1;
|
|
513
486
|
}
|
|
514
|
-
if (Nn && K[1] === "r" && (De <
|
|
515
|
-
var Ne =
|
|
516
|
-
|
|
517
|
-
var
|
|
487
|
+
if (Nn && K[1] === "r" && (De < qe.left || d.current.lr)) {
|
|
488
|
+
var Ne = P;
|
|
489
|
+
Ln ? Ne += he - I : Ne = Mn.x - ee.x - le;
|
|
490
|
+
var En = ne(Ne, k), zn = ne(Ne, k, S);
|
|
518
491
|
// Of course use larger one
|
|
519
|
-
|
|
520
|
-
|
|
492
|
+
En > se || En === se && (!j || // Choose recommend one
|
|
493
|
+
zn >= Ae) ? (d.current.lr = !0, P = Ne, le = -le, Te.points = [He(K, 1), He(ye, 1)]) : d.current.lr = !1;
|
|
521
494
|
}
|
|
522
|
-
|
|
495
|
+
Rn();
|
|
523
496
|
var we = sn === !0 ? 0 : sn;
|
|
524
|
-
typeof we == "number" && (De <
|
|
497
|
+
typeof we == "number" && (De < S.left && (P -= De - S.left - le, w.x + I < S.left + we && (P += w.x - S.left + I - we)), Oe > S.right && (P -= Oe - S.right - le, w.x > S.right - we && (P += w.x - S.right + we)));
|
|
525
498
|
var de = Ze === !0 ? 0 : Ze;
|
|
526
|
-
typeof de == "number" && (Ie <
|
|
527
|
-
var Xe = M.x +
|
|
528
|
-
s == null || s(r,
|
|
529
|
-
var fn =
|
|
530
|
-
|
|
499
|
+
typeof de == "number" && (Ie < S.top && (k -= Ie - S.top - X, w.y + oe < S.top + de && (k += w.y - S.top + oe - de)), Ue > S.bottom && (k -= Ue - S.bottom - X, w.y > S.bottom - de && (k += w.y - S.bottom + de)));
|
|
500
|
+
var Xe = M.x + P, pe = Xe + he, be = M.y + k, Kn = be + O, Tn = w.x, Zn = Tn + I, cn = w.y, On = cn + oe, Yn = Math.max(Xe, Tn), Xn = Math.min(pe, Zn), xn = (Yn + Xn) / 2, pn = xn - Xe, er = Math.max(be, cn), Wn = Math.min(Kn, On), nr = (er + Wn) / 2, rr = nr - be;
|
|
501
|
+
s == null || s(r, Te);
|
|
502
|
+
var fn = q.right - M.x - (P + M.width), Ce = q.bottom - M.y - (k + M.height);
|
|
503
|
+
Ee === 1 && (P = Math.round(P), fn = Math.round(fn)), ke === 1 && (k = Math.round(k), Ce = Math.round(Ce));
|
|
531
504
|
var ar = {
|
|
532
505
|
ready: !0,
|
|
533
|
-
offsetX:
|
|
506
|
+
offsetX: P / Ee,
|
|
534
507
|
offsetY: k / ke,
|
|
535
|
-
offsetR: fn /
|
|
508
|
+
offsetR: fn / Ee,
|
|
536
509
|
offsetB: Ce / ke,
|
|
537
|
-
arrowX: pn /
|
|
510
|
+
arrowX: pn / Ee,
|
|
538
511
|
arrowY: rr / ke,
|
|
539
|
-
scaleX:
|
|
512
|
+
scaleX: Ee,
|
|
540
513
|
scaleY: ke,
|
|
541
|
-
align:
|
|
514
|
+
align: Te
|
|
542
515
|
};
|
|
543
516
|
D(ar);
|
|
544
517
|
}
|
|
@@ -550,7 +523,7 @@ function fa(e, r, n, a, i, u, s) {
|
|
|
550
523
|
});
|
|
551
524
|
}, W = function() {
|
|
552
525
|
D(function(C) {
|
|
553
|
-
return
|
|
526
|
+
return A(A({}, C), {}, {
|
|
554
527
|
ready: !1
|
|
555
528
|
});
|
|
556
529
|
});
|
|
@@ -559,13 +532,13 @@ function fa(e, r, n, a, i, u, s) {
|
|
|
559
532
|
e || W();
|
|
560
533
|
}, [e]), [h.ready, h.offsetX, h.offsetY, h.offsetR, h.offsetB, h.arrowX, h.arrowY, h.scaleX, h.scaleY, h.align, b];
|
|
561
534
|
}
|
|
562
|
-
function
|
|
535
|
+
function la(e, r, n, a, i) {
|
|
563
536
|
Z(function() {
|
|
564
537
|
if (e && r && n) {
|
|
565
538
|
let g = function() {
|
|
566
539
|
a(), i();
|
|
567
540
|
};
|
|
568
|
-
var u = r, s = n, f =
|
|
541
|
+
var u = r, s = n, f = vr(u), v = vr(s), h = yn(s), D = new Set([h].concat(dr(f), dr(v)));
|
|
569
542
|
return D.forEach(function(y) {
|
|
570
543
|
y.addEventListener("scroll", g, {
|
|
571
544
|
passive: !0
|
|
@@ -580,7 +553,7 @@ function va(e, r, n, a, i) {
|
|
|
580
553
|
}
|
|
581
554
|
}, [e, r, n]);
|
|
582
555
|
}
|
|
583
|
-
function
|
|
556
|
+
function sa(e, r, n, a, i, u, s, f) {
|
|
584
557
|
var v = t.useRef(e);
|
|
585
558
|
v.current = e;
|
|
586
559
|
var h = t.useRef(!1);
|
|
@@ -588,15 +561,15 @@ function ma(e, r, n, a, i, u, s, f) {
|
|
|
588
561
|
if (r && a && (!i || u)) {
|
|
589
562
|
var g = function() {
|
|
590
563
|
h.current = !1;
|
|
591
|
-
}, y = function(
|
|
592
|
-
var
|
|
593
|
-
v.current && !s(((
|
|
564
|
+
}, y = function(x) {
|
|
565
|
+
var E;
|
|
566
|
+
v.current && !s(((E = x.composedPath) === null || E === void 0 || (E = E.call(x)) === null || E === void 0 ? void 0 : E[0]) || x.target) && !h.current && f(!1);
|
|
594
567
|
}, d = yn(a);
|
|
595
568
|
d.addEventListener("pointerdown", g, !0), d.addEventListener("mousedown", y, !0), d.addEventListener("contextmenu", y, !0);
|
|
596
|
-
var m =
|
|
569
|
+
var m = fr(n);
|
|
597
570
|
if (m && (m.addEventListener("mousedown", y, !0), m.addEventListener("contextmenu", y, !0)), process.env.NODE_ENV !== "production") {
|
|
598
|
-
var N, b, W = n == null || (N = n.getRootNode) === null || N === void 0 ? void 0 : N.call(n),
|
|
599
|
-
|
|
571
|
+
var N, b, W = n == null || (N = n.getRootNode) === null || N === void 0 ? void 0 : N.call(n), T = (b = a.getRootNode) === null || b === void 0 ? void 0 : b.call(a);
|
|
572
|
+
Fr(W === T, "trigger element and popup element should in same shadow root.");
|
|
600
573
|
}
|
|
601
574
|
return function() {
|
|
602
575
|
d.removeEventListener("pointerdown", g, !0), d.removeEventListener("mousedown", y, !0), d.removeEventListener("contextmenu", y, !0), m && (m.removeEventListener("mousedown", y, !0), m.removeEventListener("contextmenu", y, !0));
|
|
@@ -608,70 +581,70 @@ function ma(e, r, n, a, i, u, s, f) {
|
|
|
608
581
|
}
|
|
609
582
|
return D;
|
|
610
583
|
}
|
|
611
|
-
var
|
|
612
|
-
function
|
|
613
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
614
|
-
var i = n.prefixCls, u = i === void 0 ? "rc-trigger-popup" : i, s = n.children, f = n.action, v = f === void 0 ? "hover" : f, h = n.showAction, D = n.hideAction, g = n.popupVisible, y = n.defaultPopupVisible, d = n.onPopupVisibleChange, m = n.afterPopupVisibleChange, N = n.mouseEnterDelay, b = n.mouseLeaveDelay, W = b === void 0 ? 0.1 : b,
|
|
584
|
+
var da = ["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"];
|
|
585
|
+
function ca() {
|
|
586
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : mr, r = /* @__PURE__ */ t.forwardRef(function(n, a) {
|
|
587
|
+
var i = n.prefixCls, u = i === void 0 ? "rc-trigger-popup" : i, s = n.children, f = n.action, v = f === void 0 ? "hover" : f, h = n.showAction, D = n.hideAction, g = n.popupVisible, y = n.defaultPopupVisible, d = n.onPopupVisibleChange, m = n.afterPopupVisibleChange, N = n.mouseEnterDelay, b = n.mouseLeaveDelay, W = b === void 0 ? 0.1 : b, T = n.focusDelay, C = n.blurDelay, x = n.mask, E = n.maskClosable, c = E === void 0 ? !0 : E, re = n.getPopupContainer, ce = n.forceRender, ae = n.autoDestroy, fe = n.destroyPopupOnHide, te = n.popup, U = n.popupClassName, Me = n.popupStyle, ve = n.popupPlacement, Pe = n.builtinPlacements, Q = Pe === void 0 ? {} : Pe, Se = n.popupAlign, B = n.zIndex, F = n.stretch, w = n.getPopupClassNameFromAlign, Be = n.fresh, ie = n.alignPoint, V = n.onPopupClick, M = n.onPopupAlign, J = n.arrow, Ve = n.popupMotion, an = n.maskMotion, me = n.popupTransitionName, G = n.popupAnimation, Le = n.maskTransitionName, Fe = n.maskAnimation, O = n.className, he = n.getTriggerDOMNode, oe = jr(n, da), I = ae || fe || !1, tn = t.useState(!1), $e = $(tn, 2), Y = $e[0], ge = $e[1];
|
|
615
588
|
Z(function() {
|
|
616
|
-
ge(
|
|
589
|
+
ge(na());
|
|
617
590
|
}, []);
|
|
618
|
-
var
|
|
591
|
+
var je = t.useRef({}), j = t.useContext(br), Fn = t.useMemo(function() {
|
|
619
592
|
return {
|
|
620
|
-
registerSubPopup: function(l,
|
|
621
|
-
|
|
593
|
+
registerSubPopup: function(l, L) {
|
|
594
|
+
je.current[l] = L, j == null || j.registerSubPopup(l, L);
|
|
622
595
|
}
|
|
623
596
|
};
|
|
624
|
-
}, [
|
|
625
|
-
ke.current = o,
|
|
626
|
-
}),
|
|
627
|
-
|
|
628
|
-
}), _e = t.Children.only(s), p = (_e == null ? void 0 : _e.props) || {},
|
|
629
|
-
var l,
|
|
630
|
-
return (
|
|
631
|
-
return (
|
|
597
|
+
}, [j]), S = Ur(), wn = t.useState(null), qe = $(wn, 2), q = qe[0], Ee = qe[1], ke = t.useRef(null), jn = Ke(function(o) {
|
|
598
|
+
ke.current = o, cr(o) && q !== o && Ee(o), j == null || j.registerSubPopup(S, o);
|
|
599
|
+
}), qn = t.useState(null), bn = $(qn, 2), ue = bn[0], le = bn[1], X = t.useRef(null), _n = Ke(function(o) {
|
|
600
|
+
cr(o) && ue !== o && (le(o), X.current = o);
|
|
601
|
+
}), _e = t.Children.only(s), p = (_e == null ? void 0 : _e.props) || {}, ze = {}, An = Ke(function(o) {
|
|
602
|
+
var l, L, R = ue;
|
|
603
|
+
return (R == null ? void 0 : R.contains(o)) || ((l = fr(R)) === null || l === void 0 ? void 0 : l.host) === o || o === R || (q == null ? void 0 : q.contains(o)) || ((L = fr(q)) === null || L === void 0 ? void 0 : L.host) === o || o === q || Object.values(je.current).some(function(z) {
|
|
604
|
+
return (z == null ? void 0 : z.contains(o)) || o === z;
|
|
632
605
|
});
|
|
633
|
-
}), Cn =
|
|
606
|
+
}), Cn = Mr(u, Ve, G, me), In = Mr(u, an, Fe, Le), Un = t.useState(y || !1), ye = $(Un, 2), K = ye[0], on = ye[1], _ = g ?? K, Te = Ke(function(o) {
|
|
634
607
|
g === void 0 && on(o);
|
|
635
608
|
});
|
|
636
609
|
Z(function() {
|
|
637
610
|
on(g || !1);
|
|
638
611
|
}, [g]);
|
|
639
|
-
var
|
|
640
|
-
|
|
612
|
+
var P = t.useRef(_);
|
|
613
|
+
P.current = _;
|
|
641
614
|
var k = t.useRef([]);
|
|
642
615
|
k.current = [];
|
|
643
616
|
var se = Ke(function(o) {
|
|
644
617
|
var l;
|
|
645
|
-
|
|
646
|
-
}),
|
|
647
|
-
clearTimeout(
|
|
618
|
+
Te(o), ((l = k.current[k.current.length - 1]) !== null && l !== void 0 ? l : _) !== o && (k.current.push(o), d == null || d(o));
|
|
619
|
+
}), Ae = t.useRef(), un = function() {
|
|
620
|
+
clearTimeout(Ae.current);
|
|
648
621
|
}, ee = function(l) {
|
|
649
|
-
var
|
|
650
|
-
un(),
|
|
622
|
+
var L = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
623
|
+
un(), L === 0 ? se(l) : Ae.current = setTimeout(function() {
|
|
651
624
|
se(l);
|
|
652
|
-
},
|
|
625
|
+
}, L * 1e3);
|
|
653
626
|
};
|
|
654
627
|
t.useEffect(function() {
|
|
655
628
|
return un;
|
|
656
629
|
}, []);
|
|
657
|
-
var Mn = t.useState(!1), ln =
|
|
630
|
+
var Mn = t.useState(!1), ln = $(Mn, 2), xe = ln[0], Pn = ln[1];
|
|
658
631
|
Z(function(o) {
|
|
659
|
-
(!o || _) &&
|
|
632
|
+
(!o || _) && Pn(!0);
|
|
660
633
|
}, [_]);
|
|
661
|
-
var Qn = t.useState(null), sn =
|
|
634
|
+
var Qn = t.useState(null), sn = $(Qn, 2), Ze = sn[0], dn = sn[1], Ie = t.useState(null), Ue = $(Ie, 2), De = Ue[0], Oe = Ue[1], Qe = function(l) {
|
|
662
635
|
Oe([l.clientX, l.clientY]);
|
|
663
|
-
},
|
|
664
|
-
|
|
636
|
+
}, Sn = ua(_, q, ie && De !== null ? De : ue, ve, Q, Se, M), H = $(Sn, 11), kn = H[0], Jn = H[1], Je = H[2], Dn = H[3], Gn = H[4], Nn = H[5], Ln = H[6], Ge = H[7], $n = H[8], Ye = H[9], Ne = H[10], En = ta(Y, v, h, D), zn = $(En, 2), we = zn[0], de = zn[1], Xe = we.has("click"), pe = de.has("click") || de.has("contextMenu"), be = Ke(function() {
|
|
637
|
+
xe || Ne();
|
|
665
638
|
}), Kn = function() {
|
|
666
|
-
|
|
639
|
+
P.current && ie && pe && ee(!1);
|
|
667
640
|
};
|
|
668
|
-
|
|
641
|
+
la(_, ue, q, be, Kn), Z(function() {
|
|
669
642
|
be();
|
|
670
643
|
}, [De, ve]), Z(function() {
|
|
671
644
|
_ && !(Q != null && Q[ve]) && be();
|
|
672
|
-
}, [JSON.stringify(
|
|
673
|
-
var
|
|
674
|
-
var o =
|
|
645
|
+
}, [JSON.stringify(Se)]);
|
|
646
|
+
var Tn = t.useMemo(function() {
|
|
647
|
+
var o = oa(Q, u, Ye, ie);
|
|
675
648
|
return rn(o, w == null ? void 0 : w(Ye));
|
|
676
649
|
}, [Ye, w, Q, u, ie]);
|
|
677
650
|
t.useImperativeHandle(a, function() {
|
|
@@ -681,15 +654,15 @@ function ga() {
|
|
|
681
654
|
forceAlign: be
|
|
682
655
|
};
|
|
683
656
|
});
|
|
684
|
-
var Zn = t.useState(0), cn =
|
|
685
|
-
if (
|
|
657
|
+
var Zn = t.useState(0), cn = $(Zn, 2), On = cn[0], Yn = cn[1], Xn = t.useState(0), xn = $(Xn, 2), pn = xn[0], er = xn[1], Wn = function() {
|
|
658
|
+
if (F && ue) {
|
|
686
659
|
var l = ue.getBoundingClientRect();
|
|
687
660
|
Yn(l.width), er(l.height);
|
|
688
661
|
}
|
|
689
662
|
}, nr = function() {
|
|
690
663
|
Wn(), be();
|
|
691
664
|
}, rr = function(l) {
|
|
692
|
-
|
|
665
|
+
Pn(!1), Ne(), m == null || m(l);
|
|
693
666
|
}, fn = function() {
|
|
694
667
|
return new Promise(function(l) {
|
|
695
668
|
Wn(), dn(function() {
|
|
@@ -700,67 +673,67 @@ function ga() {
|
|
|
700
673
|
Z(function() {
|
|
701
674
|
Ze && (Ne(), Ze(), dn(null));
|
|
702
675
|
}, [Ze]);
|
|
703
|
-
function Ce(o, l,
|
|
704
|
-
|
|
676
|
+
function Ce(o, l, L, R) {
|
|
677
|
+
ze[o] = function(z) {
|
|
705
678
|
var Bn;
|
|
706
|
-
|
|
707
|
-
for (var ur = arguments.length,
|
|
708
|
-
|
|
709
|
-
(Bn = p[o]) === null || Bn === void 0 || Bn.call.apply(Bn, [p,
|
|
679
|
+
R == null || R(z), ee(l, L);
|
|
680
|
+
for (var ur = arguments.length, hr = new Array(ur > 1 ? ur - 1 : 0), Vn = 1; Vn < ur; Vn++)
|
|
681
|
+
hr[Vn - 1] = arguments[Vn];
|
|
682
|
+
(Bn = p[o]) === null || Bn === void 0 || Bn.call.apply(Bn, [p, z].concat(hr));
|
|
710
683
|
};
|
|
711
684
|
}
|
|
712
|
-
(Xe || pe) && (
|
|
685
|
+
(Xe || pe) && (ze.onClick = function(o) {
|
|
713
686
|
var l;
|
|
714
|
-
|
|
715
|
-
for (var
|
|
716
|
-
|
|
717
|
-
(l = p.onClick) === null || l === void 0 || l.call.apply(l, [p, o].concat(
|
|
687
|
+
P.current && pe ? ee(!1) : !P.current && Xe && (Qe(o), ee(!0));
|
|
688
|
+
for (var L = arguments.length, R = new Array(L > 1 ? L - 1 : 0), z = 1; z < L; z++)
|
|
689
|
+
R[z - 1] = arguments[z];
|
|
690
|
+
(l = p.onClick) === null || l === void 0 || l.call.apply(l, [p, o].concat(R));
|
|
718
691
|
});
|
|
719
|
-
var ar =
|
|
692
|
+
var ar = sa(_, pe, ue, q, x, c, An, ee), ne = we.has("hover"), Rn = de.has("hover"), en, We;
|
|
720
693
|
ne && (Ce("onMouseEnter", !0, N, function(o) {
|
|
721
694
|
Qe(o);
|
|
722
695
|
}), Ce("onPointerEnter", !0, N, function(o) {
|
|
723
696
|
Qe(o);
|
|
724
697
|
}), en = function(l) {
|
|
725
|
-
(_ ||
|
|
726
|
-
}, ie && (
|
|
698
|
+
(_ || xe) && q !== null && q !== void 0 && q.contains(l.target) && ee(!0, N);
|
|
699
|
+
}, ie && (ze.onMouseMove = function(o) {
|
|
727
700
|
var l;
|
|
728
701
|
(l = p.onMouseMove) === null || l === void 0 || l.call(p, o);
|
|
729
|
-
})),
|
|
702
|
+
})), Rn && (Ce("onMouseLeave", !1, W), Ce("onPointerLeave", !1, W), We = function() {
|
|
730
703
|
ee(!1, W);
|
|
731
|
-
}), we.has("focus") && Ce("onFocus", !0,
|
|
704
|
+
}), we.has("focus") && Ce("onFocus", !0, T), de.has("focus") && Ce("onBlur", !1, C), we.has("contextMenu") && (ze.onContextMenu = function(o) {
|
|
732
705
|
var l;
|
|
733
|
-
|
|
734
|
-
for (var
|
|
735
|
-
|
|
736
|
-
(l = p.onContextMenu) === null || l === void 0 || l.call.apply(l, [p, o].concat(
|
|
737
|
-
}), O && (
|
|
738
|
-
var
|
|
739
|
-
|
|
706
|
+
P.current && de.has("contextMenu") ? ee(!1) : (Qe(o), ee(!0)), o.preventDefault();
|
|
707
|
+
for (var L = arguments.length, R = new Array(L > 1 ? L - 1 : 0), z = 1; z < L; z++)
|
|
708
|
+
R[z - 1] = arguments[z];
|
|
709
|
+
(l = p.onContextMenu) === null || l === void 0 || l.call.apply(l, [p, o].concat(R));
|
|
710
|
+
}), O && (ze.className = rn(p.className, O));
|
|
711
|
+
var Re = A(A({}, p), ze), vn = {}, Hn = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
|
|
712
|
+
Hn.forEach(function(o) {
|
|
740
713
|
oe[o] && (vn[o] = function() {
|
|
741
|
-
for (var l,
|
|
742
|
-
|
|
743
|
-
(l =
|
|
714
|
+
for (var l, L = arguments.length, R = new Array(L), z = 0; z < L; z++)
|
|
715
|
+
R[z] = arguments[z];
|
|
716
|
+
(l = Re[o]) === null || l === void 0 || l.call.apply(l, [Re].concat(R)), oe[o].apply(oe, R);
|
|
744
717
|
});
|
|
745
718
|
});
|
|
746
|
-
var tr = /* @__PURE__ */ t.cloneElement(_e,
|
|
719
|
+
var tr = /* @__PURE__ */ t.cloneElement(_e, A(A({}, Re), vn)), ir = {
|
|
747
720
|
x: Nn,
|
|
748
|
-
y:
|
|
749
|
-
}, or = J ?
|
|
750
|
-
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
721
|
+
y: Ln
|
|
722
|
+
}, or = J ? A({}, J !== !0 ? J : {}) : null;
|
|
723
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Tr, {
|
|
751
724
|
disabled: !_,
|
|
752
725
|
ref: _n,
|
|
753
726
|
onResize: nr
|
|
754
|
-
}, /* @__PURE__ */ t.createElement(
|
|
727
|
+
}, /* @__PURE__ */ t.createElement(Br, {
|
|
755
728
|
getTriggerDOMNode: he
|
|
756
|
-
}, tr)), /* @__PURE__ */ t.createElement(
|
|
757
|
-
value:
|
|
758
|
-
}, /* @__PURE__ */ t.createElement(
|
|
729
|
+
}, tr)), /* @__PURE__ */ t.createElement(br.Provider, {
|
|
730
|
+
value: Fn
|
|
731
|
+
}, /* @__PURE__ */ t.createElement(Hr, {
|
|
759
732
|
portal: e,
|
|
760
|
-
ref:
|
|
733
|
+
ref: jn,
|
|
761
734
|
prefixCls: u,
|
|
762
735
|
popup: te,
|
|
763
|
-
className: rn(U,
|
|
736
|
+
className: rn(U, Tn),
|
|
764
737
|
style: Me,
|
|
765
738
|
target: ue,
|
|
766
739
|
onMouseEnter: en,
|
|
@@ -768,11 +741,11 @@ function ga() {
|
|
|
768
741
|
onPointerEnter: en,
|
|
769
742
|
zIndex: B,
|
|
770
743
|
open: _,
|
|
771
|
-
keepDom:
|
|
744
|
+
keepDom: xe,
|
|
772
745
|
fresh: Be,
|
|
773
746
|
onClick: V,
|
|
774
747
|
onPointerDownCapture: ar,
|
|
775
|
-
mask:
|
|
748
|
+
mask: x,
|
|
776
749
|
motion: Cn,
|
|
777
750
|
maskMotion: In,
|
|
778
751
|
onVisibleChanged: rr,
|
|
@@ -789,21 +762,19 @@ function ga() {
|
|
|
789
762
|
offsetR: Dn,
|
|
790
763
|
offsetB: Gn,
|
|
791
764
|
onAlign: be,
|
|
792
|
-
stretch:
|
|
765
|
+
stretch: F,
|
|
793
766
|
targetWidth: On / Ge,
|
|
794
|
-
targetHeight: pn /
|
|
767
|
+
targetHeight: pn / $n
|
|
795
768
|
})));
|
|
796
769
|
});
|
|
797
770
|
return process.env.NODE_ENV !== "production" && (r.displayName = "Trigger"), r;
|
|
798
771
|
}
|
|
799
|
-
const
|
|
772
|
+
const Ca = ca(mr);
|
|
800
773
|
export {
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
ka as g,
|
|
808
|
-
Da as i
|
|
774
|
+
mr as P,
|
|
775
|
+
Ca as T,
|
|
776
|
+
na as a,
|
|
777
|
+
Zr as b,
|
|
778
|
+
ba as g,
|
|
779
|
+
wa as i
|
|
809
780
|
};
|