@unicom-cloud/ui 0.8.65 → 0.8.67
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/Affix.js +79 -79
- package/Alert.js +46 -46
- package/Anchor.js +1 -1
- package/AutoComplete.js +74 -74
- package/Avatar.js +36 -36
- package/BackTop.js +35 -35
- package/Badge.js +55 -55
- package/Breadcrumb.js +42 -42
- package/Button.js +24 -24
- package/Calendar.js +230 -230
- package/Card.js +18 -18
- package/Carousel.js +165 -165
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +26 -26
- package/Comment.js +18 -18
- package/ConfigProvider.js +2 -2
- package/Copy.js +28 -27
- package/DatePicker.js +872 -871
- package/Descriptions.js +34 -34
- package/Divider.js +19 -19
- package/Draggable.js +27 -26
- package/Drawer.js +1 -1
- package/Dropdown.js +110 -110
- package/Empty.js +3 -3
- package/Form.js +984 -945
- package/Grid.js +34 -34
- package/Icon.js +16 -16
- package/IconHover.js +2 -2
- package/Image.js +2 -2
- package/Input.js +7 -6
- package/InputNumber.js +6 -6
- package/InputTag.js +1 -1
- package/Layout.js +24 -24
- package/Link.js +30 -30
- package/List.js +95 -95
- package/Mentions.js +85 -84
- package/Menu.js +2 -2
- package/Message.js +7 -6
- package/Modal.js +1 -1
- package/Notice.js +14 -3
- package/Notification.js +9 -7
- package/OverflowEllipsis.js +64 -62
- package/PageHeader.js +73 -73
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +60 -60
- package/Popover.js +31 -31
- package/Portal.js +23 -31
- package/Progress.js +22 -22
- package/Radio.js +2 -2
- package/Rate.js +24 -24
- package/ResizeBox.js +274 -271
- package/Result.js +3 -3
- package/Select.js +4 -4
- package/SelectView.js +257 -237
- package/Skeleton.js +46 -46
- package/Slider.js +286 -283
- package/Space.js +28 -28
- package/SpeechSynthesis.js +62 -55
- package/Spin.js +23 -23
- package/Statistic.js +80 -80
- package/Steps.js +67 -67
- package/Switch.js +47 -47
- package/Table.js +1463 -1395
- package/Tabs.js +5 -5
- package/Tag.js +45 -45
- package/TimePicker.js +154 -154
- package/Timeline.js +2 -2
- package/Tooltip.js +80 -79
- package/Transfer.js +103 -102
- package/Tree.js +3 -2
- package/TreeSelect.js +2 -2
- package/Trigger.js +699 -772
- package/Typography.js +756 -6
- package/Upload.js +2 -2
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/VirtualList.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{DIx0qmCq.js → -UuKKT0Z.js} +29 -29
- package/chunk/{B8QV6E2b.js → AwZqeapI.js} +5 -5
- package/chunk/B5gK1Idp.js +19 -0
- package/chunk/B7FlazNB.js +24 -0
- package/chunk/{DXZEpA3t.js → BBvWDeuZ.js} +67 -67
- package/chunk/BCftTxEy.js +626 -0
- package/chunk/{CsbCHnFk.js → BGny4zSb.js} +60 -60
- package/chunk/BHF15Dog.js +98 -0
- package/chunk/BJQ5UNa-.js +1585 -0
- package/chunk/BP9sYyk9.js +8 -0
- package/chunk/BUdtVdnv.js +38 -0
- package/chunk/BVQlOzTS.js +11 -0
- package/chunk/B__a_gb_.js +519 -0
- package/chunk/BbEYToV1.js +10 -0
- package/chunk/BbdDQAnm.js +15 -0
- package/chunk/BdUcgWdu.js +11 -0
- package/chunk/BfbXSG70.js +26 -0
- package/chunk/BndfNLK4.js +186 -0
- package/chunk/BoMCZV6K.js +1098 -0
- package/chunk/Br0B6y1T.js +18 -0
- package/chunk/BrOW642m.js +130 -0
- package/chunk/BxUs8_Cr.js +9 -0
- package/chunk/{DK4KcodH.js → C42LIMP9.js} +244 -242
- package/chunk/C4YkFMzC.js +778 -0
- package/chunk/{CF6p9R93.js → C9Wcraj7.js} +21 -21
- package/chunk/{4-gvEY5y.js → CANgSlh3.js} +10 -10
- package/chunk/CJ_o9tZM.js +5 -0
- package/chunk/{Bqk6yh16.js → CK5m7rLl.js} +36 -36
- package/chunk/{CANaGbGR.js → CKNyIitu.js} +57 -56
- package/chunk/CLiqJm_T.js +10 -0
- package/chunk/{DjtWv6Wn.js → CNmmhbCn.js} +32 -32
- package/chunk/{BUCEs557.js → CP0odX99.js} +51 -51
- package/chunk/CPT-OZH2.js +14 -0
- package/chunk/CVSF8p0O.js +698 -0
- package/chunk/C_agcwLN.js +31 -0
- package/chunk/{DTjcKyDN.js → C_gJWGGh.js} +201 -201
- package/chunk/{CPcm9Cm5.js → CaasmWg_.js} +11 -11
- package/chunk/Ce1j9KTi.js +6 -0
- package/chunk/{D_-UD4vO.js → Cf5QNhkG.js} +18 -18
- package/chunk/CkNSv2U7.js +56 -0
- package/chunk/Cp2f70gB.js +9 -0
- package/chunk/CpegYjdC.js +16 -0
- package/chunk/CucI3KZr.js +20 -0
- package/chunk/CwoFBTYz.js +11 -0
- package/chunk/D2KPqPhV.js +17 -0
- package/chunk/D7NyvE5f.js +17 -0
- package/chunk/D8oTPQ2H.js +384 -0
- package/chunk/{CLBavO5c.js → DC1iHEiy.js} +87 -87
- package/chunk/{Dnycc1qJ.js → DFrfrmfK.js} +120 -119
- package/chunk/DGTIZ_0O.js +6 -0
- package/chunk/DJfpiZn_.js +25 -0
- package/chunk/DKr2_PYd.js +34 -0
- package/chunk/DNUz6zgo.js +11 -0
- package/chunk/DRtM649q.js +11 -0
- package/chunk/DS_mUWn6.js +41 -0
- package/chunk/DU6bs_19.js +10 -0
- package/chunk/DWdbwz22.js +10 -0
- package/chunk/DcveZuqd.js +6 -0
- package/chunk/DdVFknul.js +24 -0
- package/chunk/DgRfikwe.js +16 -0
- package/chunk/{DG-epQqF.js → DkyR2EfG.js} +66 -66
- package/chunk/{DUeHQKtx.js → DleQ5HwG.js} +42 -42
- package/chunk/DnrZEnQ_.js +27 -0
- package/chunk/DsRSHWtX.js +1025 -0
- package/chunk/Dz5BdmXo.js +270 -0
- package/chunk/EANe01DF.js +1030 -0
- package/chunk/{CwhPMMWy.js → Ey4YJCkX.js} +7 -7
- package/chunk/GoNx5R4F.js +873 -0
- package/chunk/HDUQku8d.js +20 -0
- package/chunk/HrAP__Hi.js +25 -0
- package/chunk/JPPo5nY_.js +9 -0
- package/chunk/{CIlGCedk.js → SLWP34OR.js} +90 -85
- package/chunk/VVKtwaGf.js +278 -0
- package/chunk/WPNpLxSI.js +16 -0
- package/chunk/{DLvMA1OW.js → WpO_DsK4.js} +49 -48
- package/chunk/fdU3ang6.js +14 -0
- package/chunk/{DqFhzTWC.js → fkclKOAL.js} +298 -292
- package/chunk/flvYlqx3.js +22 -0
- package/chunk/kTDayEpF.js +288 -0
- package/chunk/{DQDkV47j.js → pZoNQ75H.js} +31 -31
- package/chunk/qFf1w_Jq.js +8 -0
- package/chunk/{CH1UUxsg.js → w-kM1L5W.js} +155 -155
- package/hooks/index.js +53 -49
- package/hooks/useComputedState.js +2 -10
- package/hooks/useCreate.js +2 -7
- package/hooks/useForceUpdate.js +2 -7
- package/hooks/useId.js +2 -10
- package/hooks/useInView.js +2 -30
- package/hooks/useIntersectionObserver.js +2 -23
- package/hooks/useInterval.js +2 -17
- package/hooks/useIsFirstRender.js +2 -9
- package/hooks/useIsomorphicLayoutEffect.js +2 -5
- package/hooks/useKeyboardEvent.js +2 -16
- package/hooks/useMedia.js +2 -15
- package/hooks/useMergeProps.js +2 -18
- package/hooks/useMergeValue.js +2 -19
- package/hooks/useOnlineStatus.js +4 -0
- package/hooks/useOverflowHidden.js +2 -25
- package/hooks/useOverrideRef.js +2 -13
- package/hooks/usePersistCallback.js +2 -13
- package/hooks/usePrefersColorSchemeDark.js +4 -0
- package/hooks/usePrevious.js +2 -9
- package/hooks/useRefs.js +2 -9
- package/hooks/useResizeObserver.js +2 -15
- package/hooks/useStateCallback.js +2 -15
- package/hooks/useStateWithPromise.js +2 -24
- package/hooks/useUpdateEffect.js +2 -9
- package/hooks/useVerificationCode.js +73 -0
- package/hooks/useWatch.js +2 -10
- package/hooks/{use-watermark.js → useWatermark.js} +27 -26
- package/hooks/useWindowSize.js +2 -20
- package/index.js +571 -584
- package/locale/en-US.js +4 -2
- package/locale/interface.js +1 -4
- package/locale/ja-JP.js +3 -1
- package/locale/tr-TR.js +1 -1
- package/locale/zh-CN.js +3 -1
- package/locale/zh-HK.js +3 -1
- package/locale/zh-TW.js +3 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/anchor/util.d.ts +1 -1
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/hooks/useColorPicker.d.ts +2 -2
- package/types/form/Control-old.d.ts +56 -0
- package/types/form/Control.d.ts +6 -54
- package/types/form/FormItem.d.ts +1 -1
- package/types/form/store.d.ts +0 -1
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/useComputedState.d.ts +1 -4
- package/types/hooks/useCreate.d.ts +1 -2
- package/types/hooks/useForceUpdate.d.ts +1 -2
- package/types/hooks/useId.d.ts +1 -2
- package/types/hooks/useInView.d.ts +1 -11
- package/types/hooks/useIntersectionObserver.d.ts +1 -7
- package/types/hooks/useInterval.d.ts +1 -2
- package/types/hooks/useIsFirstRender.d.ts +1 -2
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
- package/types/hooks/useKeyboardEvent.d.ts +1 -8
- package/types/hooks/useMedia.d.ts +1 -2
- package/types/hooks/useMergeProps.d.ts +1 -5
- package/types/hooks/useMergeValue.d.ts +1 -6
- package/types/hooks/useOnlineStatus.d.ts +1 -0
- package/types/hooks/useOverflowHidden.d.ts +1 -5
- package/types/hooks/useOverrideRef.d.ts +1 -6
- package/types/hooks/usePersistCallback.d.ts +1 -2
- package/types/hooks/usePrefersColorSchemeDark.d.ts +1 -0
- package/types/hooks/usePrevious.d.ts +1 -3
- package/types/hooks/useRefs.d.ts +1 -2
- package/types/hooks/useResizeObserver.d.ts +1 -6
- package/types/hooks/useStateCallback.d.ts +1 -5
- package/types/hooks/useStateWithPromise.d.ts +1 -2
- package/types/hooks/useUpdateEffect.d.ts +1 -3
- package/types/hooks/useWatch.d.ts +1 -3
- package/types/hooks/useWindowSize.d.ts +1 -5
- package/types/image/interface.d.ts +1 -0
- package/types/index.d.ts +157 -86
- package/types/input/Input.d.ts +1 -1
- package/types/input/Textarea.d.ts +2 -2
- package/types/locale/en-US.d.ts +2 -0
- package/types/locale/interface.d.ts +1 -2
- package/types/locale/ja-JP.d.ts +2 -0
- package/types/locale/zh-CN.d.ts +2 -0
- package/types/locale/zh-HK.d.ts +2 -0
- package/types/locale/zh-TW.d.ts +2 -0
- package/types/menu/context.d.ts +1 -1
- package/types/message/index.d.ts +14 -14
- package/types/message/interface.d.ts +2 -0
- package/types/modal/config.d.ts +0 -1
- package/types/modal/interface.d.ts +0 -1
- package/types/notice/index.d.ts +2 -27
- package/types/notification/index.d.ts +15 -16
- package/types/notification/interface.d.ts +2 -0
- package/types/notification/withNotification.d.ts +2 -0
- package/types/select/util.d.ts +1 -2
- package/types/select-view/interface.d.ts +2 -1
- package/types/speech-synthesis/index.d.ts +1 -1
- package/types/table/constant.d.ts +2 -0
- package/types/table/hook/useThResizable.d.ts +7 -0
- package/types/table/index.d.ts +10 -1
- package/types/table/style/index.d.ts +1 -0
- package/types/table/th-resizable/index.d.ts +2 -0
- package/types/table/thead/Column.d.ts +1 -2
- package/types/tree/Tree.d.ts +12 -67
- package/types/tree-select/Select.d.ts +2 -2
- package/types/trigger/index.d.ts +2 -120
- package/types/trigger/interface.d.ts +2 -1
- package/types/utils/CSSTransition.d.ts +2 -3
- package/types/utils/caseName.d.ts +1 -1
- package/types/utils/className.d.ts +1 -1
- package/types/utils/constant.d.ts +2 -2
- package/types/utils/copy.d.ts +1 -1
- package/types/utils/dayjs.d.ts +1 -21
- package/types/utils/dom.d.ts +1 -6
- package/types/utils/fileToURL.d.ts +1 -1
- package/types/utils/fillNBSP.d.ts +1 -1
- package/types/utils/getHighlightText.d.ts +1 -5
- package/types/utils/getHotkeyHandler.d.ts +1 -8
- package/types/utils/getStringLength.d.ts +1 -1
- package/types/utils/include.d.ts +1 -1
- package/types/utils/index.d.ts +3 -4
- package/types/utils/is.d.ts +1 -16
- package/types/utils/keyboardCode.d.ts +3 -0
- package/types/utils/lodash.d.ts +1 -17
- package/types/utils/mergeProps.d.ts +1 -1
- package/types/utils/mergedToString.d.ts +1 -1
- package/types/utils/omit.d.ts +1 -1
- package/types/utils/pad.d.ts +1 -2
- package/types/utils/pick.d.ts +2 -4
- package/types/utils/reactDOM.d.ts +1 -7
- package/types/utils/resizeObserverEffect.d.ts +2 -0
- package/types/utils/saveAs.d.ts +1 -1
- package/types/utils/screenfull.d.ts +2 -0
- package/types/utils/scrollIntoView.d.ts +1 -2
- package/types/utils/style.d.ts +1 -3
- package/types/utils/throttleByRaf.d.ts +1 -5
- package/types/utils/throttleByRaf2.d.ts +1 -0
- package/types/utils/warning.d.ts +1 -2
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +2 -6
- package/utils/className.js +2 -2
- package/utils/constant.js +8 -9
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/dayjs.js +14 -173
- package/utils/dom.js +33 -29
- package/utils/fillNBSP.js +2 -4
- package/utils/getHighlightText.js +2 -38
- package/utils/getHotkeyHandler.js +2 -25
- package/utils/getStringLength.js +2 -7
- package/utils/include.js +2 -7
- package/utils/index.js +237 -240
- package/utils/is.js +116 -156
- package/utils/keyboardCode.js +27 -0
- package/utils/mergeProps.js +2 -9
- package/utils/mergedToString.js +2 -13
- package/utils/omit.js +2 -9
- package/utils/pad.js +12 -12
- package/utils/pick.js +4 -15
- package/utils/reactDOM.js +3 -54
- package/utils/resizeObserverEffect.js +4 -0
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +4 -0
- package/utils/scrollIntoView.js +2 -21
- package/utils/style.js +12 -11
- package/utils/throttleByRaf.js +13 -12
- package/utils/throttleByRaf2.js +5 -0
- package/utils/warning.js +5 -4
- package/NotificationBase.js +0 -53
- package/chunk/1GQdnTJp.js +0 -284
- package/chunk/BAWsPQBM.js +0 -11
- package/chunk/BS09tn7B.js +0 -638
- package/chunk/BqGtwxTi.js +0 -777
- package/chunk/BqufsN8i.js +0 -376
- package/chunk/BtlvlGQN.js +0 -278
- package/chunk/C2lIz2F9.js +0 -60
- package/chunk/CGZ0In1p.js +0 -776
- package/chunk/CWgltRVL.js +0 -698
- package/chunk/D3NFxdmG.js +0 -518
- package/chunk/DApXtulb.js +0 -1102
- package/chunk/DlLL5JQo.js +0 -1501
- package/chunk/Dv_xRzvR.js +0 -269
- package/chunk/Ek8U5CTN.js +0 -1032
- package/chunk/ewRDIDUz.js +0 -995
- package/chunk/l0sNRNKZ.js +0 -1
- package/chunk/tYXLFPVI.js +0 -871
- package/hooks/use-verification-code.js +0 -73
- package/types/notification-base/index.d.ts +0 -15
- package/types/notification-base/style/index.d.ts +0 -2
- package/types/trigger/Portal.d.ts +0 -7
- package/types/utils/keyCode.d.ts +0 -45
- package/types/utils/raf.d.ts +0 -3
- package/types/utils/throttleByRafV2.d.ts +0 -5
- package/utils/keyCode.js +0 -12
- package/utils/raf.js +0 -19
- package/utils/throttleByRafV2.js +0 -16
- /package/style/{variable.less → variables.less} +0 -0
package/Trigger.js
CHANGED
|
@@ -1,229 +1,218 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { caf as G, raf as Pt } from "./utils/raf.js";
|
|
18
|
-
import { findDOMNode as bt, callbackOriginRef as yt } from "./utils/reactDOM.js";
|
|
19
|
-
import j from "./utils/throttleByRaf.js";
|
|
20
|
-
import wt from "react-dom";
|
|
21
|
-
import { useIsFirstRender as Tt } from "./hooks/useIsFirstRender.js";
|
|
1
|
+
import { jsx as X, jsxs as Rt } from "react/jsx-runtime";
|
|
2
|
+
import { $ as fe } from "./chunk/DC1iHEiy.js";
|
|
3
|
+
import pe from "lodash/isArray";
|
|
4
|
+
import j from "lodash/isFunction";
|
|
5
|
+
import { forwardRef as ae, useContext as de, useRef as ut, useState as me, Children as Wt, useCallback as Ft, cloneElement as _t, useImperativeHandle as he, useLayoutEffect as ge, useEffect as F, Fragment as ye } from "react";
|
|
6
|
+
import { createPortal as we } from "react-dom";
|
|
7
|
+
import { a as be } from "./chunk/BJQ5UNa-.js";
|
|
8
|
+
import { m as wt } from "./chunk/JPPo5nY_.js";
|
|
9
|
+
import { isServerRendering as Te, on as bt, off as Tt, getScrollElements as Ce, isScrollElement as xe, contains as Yt } from "./utils/dom.js";
|
|
10
|
+
import { A as De } from "./chunk/CkNSv2U7.js";
|
|
11
|
+
import { o as Xt } from "./chunk/BrOW642m.js";
|
|
12
|
+
import { b as Me } from "./chunk/DNUz6zgo.js";
|
|
13
|
+
import { r as Pe } from "./chunk/D7NyvE5f.js";
|
|
14
|
+
import { D as Ee, g as Se } from "./chunk/BUdtVdnv.js";
|
|
15
|
+
import { l as Ct } from "./chunk/flvYlqx3.js";
|
|
16
|
+
import Kt from "./utils/throttleByRaf.js";
|
|
22
17
|
import "./chunk/CSC_V_25.js";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
const
|
|
26
|
-
const {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
width: e,
|
|
36
|
-
height: i,
|
|
37
|
-
left: a,
|
|
38
|
-
right: c,
|
|
39
|
-
top: f,
|
|
40
|
-
bottom: m
|
|
18
|
+
import Oe from "lodash/isArray.js";
|
|
19
|
+
import xt from "lodash/isPlainObject.js";
|
|
20
|
+
const ot = 0, at = (u, c) => {
|
|
21
|
+
const { position: l } = c, { width: x, height: g, left: M, right: s, top: V, bottom: L } = u.getBoundingClientRect(), e = c.boundaryDistance || {}, P = "left" in e && e.left || ot, d = "top" in e && e.top || ot;
|
|
22
|
+
let f, p, b, y;
|
|
23
|
+
return ["bottom", "bl", "br"].indexOf(l) > -1 ? (b = V, y = L) : (b = V - d, y = L - d), ["right", "rt", "rb"].indexOf(l) > -1 ? (f = M, p = s) : (f = M - P, p = s - P), {
|
|
24
|
+
width: x,
|
|
25
|
+
height: g,
|
|
26
|
+
left: f,
|
|
27
|
+
right: p,
|
|
28
|
+
top: b,
|
|
29
|
+
bottom: y
|
|
41
30
|
};
|
|
42
31
|
};
|
|
43
|
-
function
|
|
44
|
-
if (!
|
|
32
|
+
function Ne(u, c, l, x) {
|
|
33
|
+
if (!l || !u || Te)
|
|
45
34
|
return { left: 0, width: 0, height: 0, top: 0 };
|
|
46
|
-
const
|
|
35
|
+
const g = (y) => document.documentElement[y] || document.body[y], M = l === document.body ? g("scrollTop") : l.scrollTop, s = l === document.body ? g("scrollLeft") : l.scrollLeft, { left: V, top: L, width: e, height: P } = c, d = l === document.body ? 0 : at(l, x).left, f = l === document.body ? 0 : at(l, x).top, p = L + M - f;
|
|
47
36
|
return {
|
|
48
|
-
left:
|
|
49
|
-
top:
|
|
50
|
-
width:
|
|
51
|
-
height:
|
|
37
|
+
left: V + s - d,
|
|
38
|
+
top: p,
|
|
39
|
+
width: e,
|
|
40
|
+
height: P
|
|
52
41
|
};
|
|
53
42
|
}
|
|
54
|
-
const
|
|
55
|
-
return
|
|
56
|
-
},
|
|
57
|
-
let
|
|
58
|
-
|
|
43
|
+
const B = function(u, c, l) {
|
|
44
|
+
return l < u ? u : l > c ? c : l;
|
|
45
|
+
}, ve = (u, c) => {
|
|
46
|
+
let l = 0, x = 0, g = {};
|
|
47
|
+
c ? g = {
|
|
59
48
|
left: 12,
|
|
60
49
|
right: 12,
|
|
61
50
|
top: 12,
|
|
62
51
|
bottom: 12,
|
|
63
|
-
...
|
|
64
|
-
} :
|
|
65
|
-
for (const
|
|
66
|
-
if (
|
|
67
|
-
let
|
|
68
|
-
["top", "bottom"].indexOf(
|
|
52
|
+
...u
|
|
53
|
+
} : g = { ...u };
|
|
54
|
+
for (const M in g)
|
|
55
|
+
if (Oe(g[M])) {
|
|
56
|
+
let s = 0;
|
|
57
|
+
["top", "bottom"].indexOf(M) > -1 ? (s = 1, l = g[M][0]) : x = g[M][1], g[M] = g[M][s];
|
|
69
58
|
}
|
|
70
59
|
return {
|
|
71
|
-
...
|
|
72
|
-
horizontalOffset:
|
|
73
|
-
verticalOffset:
|
|
60
|
+
...g,
|
|
61
|
+
horizontalOffset: l,
|
|
62
|
+
verticalOffset: x
|
|
74
63
|
};
|
|
75
|
-
},
|
|
76
|
-
left:
|
|
77
|
-
top:
|
|
64
|
+
}, $e = (u, c, { boundaryDistance: l, position: x }) => c ? {
|
|
65
|
+
left: c.clientX,
|
|
66
|
+
top: c.clientY,
|
|
78
67
|
width: 0,
|
|
79
68
|
height: 0,
|
|
80
|
-
right:
|
|
81
|
-
bottom:
|
|
82
|
-
} :
|
|
83
|
-
const
|
|
69
|
+
right: c.clientX,
|
|
70
|
+
bottom: c.clientY
|
|
71
|
+
} : at(u, { boundaryDistance: l, position: x }), He = (u) => {
|
|
72
|
+
const c = u.offsetWidth, l = u.offsetHeight;
|
|
84
73
|
return {
|
|
85
|
-
width:
|
|
86
|
-
height:
|
|
74
|
+
width: c,
|
|
75
|
+
height: l
|
|
87
76
|
};
|
|
88
|
-
},
|
|
89
|
-
var
|
|
90
|
-
const
|
|
77
|
+
}, Le = (u) => {
|
|
78
|
+
var s, V;
|
|
79
|
+
const c = u || {}, l = "left" in c ? c.left : "right" in c ? c.right : ot, x = "top" in c ? c.top : "bottom" in c ? c.bottom : ot, g = (((s = document.documentElement) == null ? void 0 : s.clientHeight) || window.innerHeight) - (x || ot), M = (((V = document.documentElement) == null ? void 0 : V.clientWidth) || window.innerWidth) - (l || ot);
|
|
91
80
|
return {
|
|
92
|
-
windowHeight:
|
|
93
|
-
windowWidth:
|
|
81
|
+
windowHeight: g,
|
|
82
|
+
windowWidth: M
|
|
94
83
|
};
|
|
95
|
-
},
|
|
84
|
+
}, ke = (u, c, l, x, g) => {
|
|
96
85
|
const {
|
|
97
|
-
autoAlignPopupWidth:
|
|
98
|
-
autoAlignPopupMinWidth:
|
|
99
|
-
alignPoint:
|
|
100
|
-
style:
|
|
101
|
-
} =
|
|
102
|
-
if (!
|
|
86
|
+
autoAlignPopupWidth: M,
|
|
87
|
+
autoAlignPopupMinWidth: s,
|
|
88
|
+
alignPoint: V,
|
|
89
|
+
style: L
|
|
90
|
+
} = u;
|
|
91
|
+
if (!l || !c || !x)
|
|
103
92
|
return {};
|
|
104
|
-
const
|
|
105
|
-
boundaryDistance:
|
|
106
|
-
position:
|
|
107
|
-
}), { left:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
93
|
+
const e = {}, P = !u.alignPoint && u.boundaryDistance || {}, d = $e(l, V && g, {
|
|
94
|
+
boundaryDistance: P,
|
|
95
|
+
position: u.position
|
|
96
|
+
}), { left: f, top: p, width: b, height: y } = Ne(
|
|
97
|
+
l,
|
|
98
|
+
d,
|
|
99
|
+
x,
|
|
111
100
|
{
|
|
112
|
-
boundaryDistance:
|
|
113
|
-
position:
|
|
101
|
+
boundaryDistance: P,
|
|
102
|
+
position: u.position
|
|
114
103
|
}
|
|
115
|
-
),
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
let
|
|
119
|
-
const
|
|
120
|
-
if (!
|
|
104
|
+
), _ = ve(u.popupAlign, u.showArrow), q = _.left || 0, G = _.right || 0, k = _.top || 0, J = _.bottom || 0;
|
|
105
|
+
M && (L == null ? void 0 : L.width) === void 0 && (c.style.width = `${l.offsetWidth}px`), s && (c.style.minWidth = `${l.offsetWidth}px`);
|
|
106
|
+
const r = He(c);
|
|
107
|
+
let E = u.position;
|
|
108
|
+
const S = {}, N = (n) => {
|
|
109
|
+
if (!u.autoFitPosition)
|
|
121
110
|
return;
|
|
122
|
-
const { windowHeight:
|
|
123
|
-
let
|
|
124
|
-
const
|
|
125
|
-
left:
|
|
126
|
-
top:
|
|
127
|
-
}, { top:
|
|
128
|
-
if ((
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
)) :
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
))), (
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
)) :
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
),
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
))),
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
),
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
),
|
|
159
|
-
|
|
111
|
+
const { windowHeight: A, windowWidth: H } = Le(P);
|
|
112
|
+
let R = !1;
|
|
113
|
+
const T = {
|
|
114
|
+
left: f - d.left,
|
|
115
|
+
top: p - d.top
|
|
116
|
+
}, { top: m = 0, left: h = 0 } = e;
|
|
117
|
+
if ((n === "top" || n === "bottom") && (T.left > h && d.right > 12 ? (e.left = Math.max(T.left, f - r.width), e.left = Math.max(
|
|
118
|
+
e.left,
|
|
119
|
+
f - r.width + 24
|
|
120
|
+
)) : h - T.left + r.width > H && H - d.left > 12 && (e.left = Math.max(
|
|
121
|
+
T.left,
|
|
122
|
+
T.left + H - r.width
|
|
123
|
+
), e.left = Math.max(
|
|
124
|
+
e.left,
|
|
125
|
+
f - r.width + 24
|
|
126
|
+
))), (n === "left" || n === "right") && (T.top > m && d.bottom > 12 ? (e.top = T.top, e.top = Math.max(
|
|
127
|
+
e.top,
|
|
128
|
+
p - r.height + d.height / 2
|
|
129
|
+
)) : m - T.top + r.height > A && A - d.top > 12 && (e.top = Math.max(
|
|
130
|
+
T.top,
|
|
131
|
+
T.top + A - r.height
|
|
132
|
+
), e.top = Math.max(
|
|
133
|
+
e.top,
|
|
134
|
+
p - r.height + d.height / 2
|
|
135
|
+
))), n === "top" && T.top > m && (d.top < A - d.bottom ? (e.top = Math.min(
|
|
136
|
+
p + y + (k || 0),
|
|
137
|
+
T.top + A - r.height
|
|
138
|
+
), R = !0) : e.top = T.top), n === "bottom" && m - T.top + r.height > A && (A - d.bottom < d.top ? (e.top = Math.max(
|
|
139
|
+
p - r.height - (J || 0),
|
|
140
|
+
T.top
|
|
141
|
+
), R = !0) : e.top = T.top + A - r.height), n === "left" && T.left > h && (d.left < H - d.right ? (e.left = Math.min(
|
|
142
|
+
b + f + G,
|
|
143
|
+
T.left + H - r.width
|
|
144
|
+
), R = !0) : e.left = T.left), n === "right" && h - T.left + r.width > H && (H - d.right < d.left ? (e.left = Math.max(
|
|
145
|
+
f - r.width - q,
|
|
146
|
+
T.left
|
|
147
|
+
), R = !0) : e.left = T.left + H - r.width), e.left < 0)
|
|
148
|
+
e.left = 0;
|
|
160
149
|
else {
|
|
161
|
-
const
|
|
162
|
-
|
|
150
|
+
const nt = x.scrollWidth - r.width;
|
|
151
|
+
e.left = Math.min(nt, e.left);
|
|
163
152
|
}
|
|
164
|
-
return
|
|
165
|
-
},
|
|
166
|
-
let
|
|
167
|
-
switch (
|
|
153
|
+
return R;
|
|
154
|
+
}, D = _.horizontalOffset || 0, I = _.verticalOffset || 0;
|
|
155
|
+
let v = f - Number(e.left) + b / 2, $ = p - Number(e.top) + y / 2;
|
|
156
|
+
switch (u.position) {
|
|
168
157
|
case "top": {
|
|
169
|
-
|
|
158
|
+
e.top = p - r.height - k, e.left = f + b / 2 - r.width / 2, N("top") && (E = "bottom"), e.left += D, v = f - Number(e.left) + b / 2, S.left = B(12, r.width - 12, v);
|
|
170
159
|
break;
|
|
171
160
|
}
|
|
172
161
|
case "tl":
|
|
173
|
-
|
|
162
|
+
e.top = p - r.height - k, e.left = f, N("top") && (E = "bl"), e.left += D, v = f - Number(e.left) + Math.min(b / 2, 50), S.left = B(12, r.width - 12, v);
|
|
174
163
|
break;
|
|
175
164
|
case "tr":
|
|
176
|
-
|
|
165
|
+
e.top = -c.clientHeight + p - k, e.left = f + b - r.width, N("top") && (E = "br"), e.left += D, v = f - Number(e.left) + Math.max(b / 2, b - 50), S.left = B(12, r.width - 12, v);
|
|
177
166
|
break;
|
|
178
167
|
case "bottom": {
|
|
179
|
-
|
|
168
|
+
e.top = y + p + J, e.left = f + b / 2 - r.width / 2, N("bottom") && (E = "top"), e.left += D, v = f - Number(e.left) + b / 2, S.left = B(12, r.width - 12, v);
|
|
180
169
|
break;
|
|
181
170
|
}
|
|
182
171
|
case "bl":
|
|
183
|
-
|
|
172
|
+
e.top = y + p + J, e.left = f, N("bottom") && (E = "tl"), e.left += D, v = f - Number(e.left) + Math.min(b / 2, 50), S.left = B(12, r.width - 12, v);
|
|
184
173
|
break;
|
|
185
174
|
case "br":
|
|
186
|
-
|
|
175
|
+
e.top = y + p + J, e.left = f + b - r.width, N("bottom") && (E = "tr"), e.left += D, v = f - Number(e.left) + Math.max(b / 2, b - 50), S.left = B(12, r.width - 12, v);
|
|
187
176
|
break;
|
|
188
177
|
case "left": {
|
|
189
|
-
|
|
178
|
+
e.top = p + y / 2 - r.height / 2, e.left = f - r.width - q, N("left") && (E = "right"), e.top += I, $ = p - Number(e.top) + y / 2, S.top = B(12, r.height - 12, $);
|
|
190
179
|
break;
|
|
191
180
|
}
|
|
192
181
|
case "lt":
|
|
193
|
-
|
|
182
|
+
e.top = p, e.left = f - r.width - q, N("left") && (E = "rt"), e.top += I, $ = p - Number(e.top) + Math.min(y / 2, 50), S.top = B(12, r.height - 12, $);
|
|
194
183
|
break;
|
|
195
184
|
case "lb":
|
|
196
|
-
|
|
185
|
+
e.top = p + y - r.height, e.left = f - r.width - q, N("left") && (E = "rb"), e.top += I, $ = p - Number(e.top) + Math.max(y / 2, y - 50), S.top = B(12, r.height - 12, $);
|
|
197
186
|
break;
|
|
198
187
|
case "right": {
|
|
199
|
-
|
|
188
|
+
e.top = p + y / 2 - r.height / 2, e.left = b + f + G, N("right") && (E = "left"), e.top += I, $ = p - Number(e.top) + y / 2, S.top = B(12, r.height - 12, $);
|
|
200
189
|
break;
|
|
201
190
|
}
|
|
202
191
|
case "rt":
|
|
203
|
-
|
|
192
|
+
e.top = p, e.left = b + f + G, N("right") && (E = "lt"), e.top += I, $ = p - Number(e.top) + Math.min(y / 2, 50), S.top = B(12, r.height - 12, $);
|
|
204
193
|
break;
|
|
205
194
|
case "rb":
|
|
206
|
-
|
|
195
|
+
e.top = p + y - r.height, e.left = b + f + G, N("right") && (E = "lb"), e.top += I, $ = p - Number(e.top) + Math.max(y / 2, y - 50), S.top = B(12, r.height - 12, $);
|
|
207
196
|
break;
|
|
208
197
|
}
|
|
209
198
|
return {
|
|
210
|
-
style:
|
|
211
|
-
arrowStyle:
|
|
212
|
-
realPosition:
|
|
199
|
+
style: e,
|
|
200
|
+
arrowStyle: S,
|
|
201
|
+
realPosition: E
|
|
213
202
|
};
|
|
214
203
|
};
|
|
215
|
-
function
|
|
216
|
-
if (!
|
|
204
|
+
function Ie(u, c) {
|
|
205
|
+
if (!u)
|
|
217
206
|
return {};
|
|
218
|
-
const { width:
|
|
207
|
+
const { width: l, height: x, left: g, right: M } = at(u, c);
|
|
219
208
|
return {
|
|
220
|
-
width:
|
|
221
|
-
height:
|
|
222
|
-
left:
|
|
223
|
-
right:
|
|
209
|
+
width: l,
|
|
210
|
+
height: x,
|
|
211
|
+
left: g,
|
|
212
|
+
right: M
|
|
224
213
|
};
|
|
225
214
|
}
|
|
226
|
-
const
|
|
215
|
+
const ro = [
|
|
227
216
|
"onClick",
|
|
228
217
|
"onMouseEnter",
|
|
229
218
|
"onMouseLeave",
|
|
@@ -233,13 +222,13 @@ const te = [
|
|
|
233
222
|
"onContextMenu",
|
|
234
223
|
"onKeyDown"
|
|
235
224
|
];
|
|
236
|
-
function
|
|
237
|
-
const
|
|
238
|
-
return
|
|
239
|
-
|
|
240
|
-
}), { picked:
|
|
225
|
+
function Ve(u, c) {
|
|
226
|
+
const l = {}, x = { ...u };
|
|
227
|
+
return c.forEach((g) => {
|
|
228
|
+
u && g in u && (l[g] = u[g], delete x[g]);
|
|
229
|
+
}), { picked: l, omitted: x };
|
|
241
230
|
}
|
|
242
|
-
const
|
|
231
|
+
const Ae = {
|
|
243
232
|
blurToHide: !0,
|
|
244
233
|
// clickToClose: true,
|
|
245
234
|
classNames: "fadeIn",
|
|
@@ -257,628 +246,566 @@ const zt = {
|
|
|
257
246
|
autoFixPosition: !0,
|
|
258
247
|
mouseEnterDelay: 100,
|
|
259
248
|
mouseLeaveDelay: 100,
|
|
260
|
-
autoFitPosition: !0
|
|
249
|
+
autoFitPosition: !0,
|
|
250
|
+
updateOnScroll: !0
|
|
261
251
|
};
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
252
|
+
function Be(u, c) {
|
|
253
|
+
var Vt, At;
|
|
254
|
+
const l = de(be), { getPrefixCls: x, zIndex: g, rtl: M } = l, s = C(u), {
|
|
255
|
+
children: V,
|
|
256
|
+
style: L,
|
|
257
|
+
className: e,
|
|
258
|
+
arrowProps: P,
|
|
259
|
+
disabled: d,
|
|
260
|
+
popup: f,
|
|
261
|
+
classNames: p,
|
|
262
|
+
duration: b,
|
|
263
|
+
unmountOnExit: y,
|
|
264
|
+
alignPoint: _,
|
|
265
|
+
autoAlignPopupWidth: q,
|
|
266
|
+
position: G,
|
|
267
|
+
childrenPrefix: k,
|
|
268
|
+
showArrow: J,
|
|
269
|
+
popupStyle: r,
|
|
270
|
+
__onExit: E,
|
|
271
|
+
__onExited: S
|
|
272
|
+
} = s;
|
|
273
|
+
if (!f)
|
|
274
|
+
return null;
|
|
275
|
+
const N = V || V === 0, D = ut(null), I = ut(null), v = ut(null), $ = ut(null), n = ut({
|
|
276
|
+
rootElement: void 0,
|
|
277
|
+
triggerDestoried: !1,
|
|
269
278
|
// 标志 popup 是否被销毁
|
|
270
|
-
|
|
271
|
-
s(this, "delayTimer", null);
|
|
272
|
-
s(this, "updatePositionTimer", null);
|
|
279
|
+
realPosition: null,
|
|
273
280
|
// popup 真正出现的位置
|
|
274
|
-
|
|
281
|
+
arrowStyle: null,
|
|
275
282
|
// arrow 箭头的位置
|
|
276
|
-
|
|
277
|
-
// is popup open?
|
|
278
|
-
s(this, "popupOpen", !1);
|
|
283
|
+
mousedownToHide: !1,
|
|
279
284
|
// if mousedown to hide popup, ignore onFocus
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
s(this, "hasPopupMouseDown", !1);
|
|
283
|
-
// handle click outside document
|
|
284
|
-
s(this, "handleClickOutside");
|
|
285
|
-
// 是否监听了window 的resize
|
|
286
|
-
s(this, "handleWindowResize");
|
|
287
|
-
s(this, "unmount", !1);
|
|
288
|
-
s(this, "isDidMount", !1);
|
|
289
|
-
// 保存鼠标的位置
|
|
290
|
-
s(this, "mouseLocation", {
|
|
285
|
+
hasPopupMouseDown: !1,
|
|
286
|
+
mouseLocation: {
|
|
291
287
|
clientX: 0,
|
|
292
288
|
clientY: 0
|
|
293
|
-
}
|
|
294
|
-
//
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
})
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
this.childrenDom,
|
|
379
|
-
(e = this.popupContainer) == null ? void 0 : e.parentNode
|
|
380
|
-
), t.containerScrollToClose && ((i = this.popupContainer) == null ? void 0 : i.parentNode) === document.body && this.scrollElements.indexOf(document.body) === -1 && ft(document.documentElement) && this.scrollElements.push(window), this.scrollElements.forEach((n) => {
|
|
381
|
-
U(n, "scroll", this.handleScroll);
|
|
382
|
-
}));
|
|
383
|
-
});
|
|
384
|
-
s(this, "onContainerResize", () => {
|
|
385
|
-
var e;
|
|
386
|
-
const t = (e = this.popupContainer) == null ? void 0 : e.parentNode;
|
|
387
|
-
this.resizeObserver && this.observerContainer !== t && (this.offContainerResize(), t && this.resizeObserver.observe(t), this.observerContainer = t);
|
|
388
|
-
});
|
|
389
|
-
// getPopupContainer 改变时候触发
|
|
390
|
-
s(this, "handleUpdatePosition", j(() => {
|
|
391
|
-
this.updatePopupPosition();
|
|
392
|
-
}));
|
|
393
|
-
s(this, "isClickTrigger", () => {
|
|
394
|
-
const { trigger: t } = this.getMergedProps(["trigger"]);
|
|
395
|
-
return [].concat(t).indexOf("click") > -1;
|
|
396
|
-
});
|
|
397
|
-
s(this, "isFocusTrigger", () => {
|
|
398
|
-
const { trigger: t } = this.getMergedProps(["trigger"]);
|
|
399
|
-
return [].concat(t).indexOf("focus") > -1;
|
|
400
|
-
});
|
|
401
|
-
s(this, "isHoverTrigger", () => {
|
|
402
|
-
const { trigger: t } = this.getMergedProps(["trigger"]);
|
|
403
|
-
return [].concat(t).indexOf("hover") > -1;
|
|
404
|
-
});
|
|
405
|
-
s(this, "isContextMenuTrigger", () => {
|
|
406
|
-
const { trigger: t } = this.getMergedProps(["trigger"]);
|
|
407
|
-
return [].concat(t).indexOf("contextMenu") > -1;
|
|
408
|
-
});
|
|
409
|
-
// 是否在鼠标移出触发节点和popup的时候隐藏弹出层
|
|
410
|
-
s(this, "isMouseLeaveToClose", () => this.isHoverTrigger() && this.getMergedProps(["mouseLeaveToClose"]).mouseLeaveToClose);
|
|
411
|
-
// 是否在悬浮到popup的时候隐藏弹出层
|
|
412
|
-
s(this, "isPopupHoverHide", () => this.isHoverTrigger() && !this.getMergedProps(["popupHoverStay"]).popupHoverStay);
|
|
413
|
-
s(this, "isClickToHide", () => {
|
|
414
|
-
if (this.isClickTrigger() || this.isContextMenuTrigger()) {
|
|
415
|
-
const { clickToClose: t = !0 } = this.getMergedProps(["clickToClose"]);
|
|
416
|
-
return t;
|
|
417
|
-
}
|
|
418
|
-
return this.isHoverTrigger() && this.props.clickToClose;
|
|
419
|
-
});
|
|
420
|
-
s(this, "isBlurToHide", () => this.isFocusTrigger() && this.getMergedProps(["blurToHide"]).blurToHide);
|
|
421
|
-
s(this, "clearTimer", () => {
|
|
422
|
-
this.updatePositionTimer && (this.updatePositionTimer.cancel ? this.updatePositionTimer.cancel() : (clearTimeout(this.updatePositionTimer), this.updatePositionTimer = null)), this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null), this.mouseDownTimeout && (clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = null);
|
|
423
|
-
});
|
|
424
|
-
s(this, "offClickOutside", () => {
|
|
425
|
-
if (this.handleClickOutside) {
|
|
426
|
-
const { getDocument: t } = this.getMergedProps(["getDocument"]), e = W(t) && t();
|
|
427
|
-
Y(e, "mousedown", this.onClickOutside), this.handleClickOutside = !1;
|
|
428
|
-
}
|
|
429
|
-
});
|
|
430
|
-
s(this, "getTransformOrigin", (t) => {
|
|
431
|
-
var o, v;
|
|
432
|
-
const e = this.getPopupElement();
|
|
433
|
-
if (!e) return {};
|
|
434
|
-
const { showArrow: i, classNames: n } = this.getMergedProps([
|
|
435
|
-
"showArrow",
|
|
436
|
-
"classNames"
|
|
437
|
-
]);
|
|
438
|
-
let r = i && ((o = this.arrowStyle) == null ? void 0 : o.top) || 0, u = i && ((v = this.arrowStyle) == null ? void 0 : v.left) || 0;
|
|
439
|
-
r = r ? `${r}px` : "", u = u ? `${u}px` : "";
|
|
440
|
-
const y = {
|
|
441
|
-
top: `${u || "50%"} 100% 0`,
|
|
442
|
-
tl: `${u || "15px"} 100% 0`,
|
|
443
|
-
tr: `${u || `${e.clientWidth - 15}px`} 100% 0`,
|
|
444
|
-
bottom: `${u || "50%"} 0 0`,
|
|
445
|
-
bl: `${u || "15px"} 0 0`,
|
|
446
|
-
br: `${u || `${e.clientWidth - 15}px`} 0 0`,
|
|
447
|
-
left: `100% ${r || "50%"} 0`,
|
|
448
|
-
lt: `100% ${r || "15px"} 0`,
|
|
449
|
-
lb: `100% ${r || `${e.clientHeight - 15}px`} 0`,
|
|
450
|
-
right: `0 ${r || "50%"} 0`,
|
|
451
|
-
rt: `0 ${r || "15px"} 0`,
|
|
452
|
-
rb: `0 ${r || `${e.clientHeight - 15}px`} 0`
|
|
453
|
-
};
|
|
454
|
-
if (n && n.indexOf("zoom") > -1)
|
|
455
|
-
return {
|
|
456
|
-
transformOrigin: y[t]
|
|
457
|
-
};
|
|
458
|
-
if (n === "slideDynamicOrigin") {
|
|
459
|
-
let g = "0% 0%";
|
|
460
|
-
return ["top", "tl", "tr"].indexOf(t) > -1 && (g = "100% 100%"), {
|
|
461
|
-
transformOrigin: g
|
|
462
|
-
};
|
|
463
|
-
}
|
|
289
|
+
},
|
|
290
|
+
// 保存鼠标的位置
|
|
291
|
+
childrenDomSize: {},
|
|
292
|
+
scrollElements: null,
|
|
293
|
+
// 保存当前节点到弹出容器间的所有滚动元素
|
|
294
|
+
delayTimeoutID: -1,
|
|
295
|
+
updatePositionTimeoutID: -1
|
|
296
|
+
}), [A, H] = me({ popupVisible: !1, popupStyle: {} }), R = s.popupVisible, T = A.popupVisible, m = R ?? T, h = {}, nt = {
|
|
297
|
+
onMouseDown() {
|
|
298
|
+
n.current.hasPopupMouseDown = !0, setTimeout(() => {
|
|
299
|
+
n.current.hasPopupMouseDown = !1;
|
|
300
|
+
}, 0);
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
st() && !d ? (h.onMouseEnter = Zt, h.onMouseLeave = vt, ht() && (h.onClick = $t), _ && (h.onMouseMove = te), jt() || (nt.onMouseEnter = ee, nt.onMouseLeave = oe)) : (h.onMouseEnter = Q("onMouseEnter"), h.onMouseLeave = Q("onMouseLeave")), Mt() && !d ? (h.onContextMenu = ne, h.onClick = $t) : h.onContextMenu = Q("onContextMenu"), Dt() && !d ? h.onClick = ie : h.onClick = h.onClick || Q("onClick"), mt() && !d ? (h.onFocus = re, Pt() && (h.onBlur = se)) : (h.onFocus = Q("onFocus"), h.onBlur = Q("onBlur")), d ? h.onKeyDown = Q("onKeyDown") : h.onKeyDown = Gt;
|
|
304
|
+
const it = ft(), rt = Wt.only(f());
|
|
305
|
+
it.props.className && (h.className = it.props.className), k && m && (h.className = h.className ? `${h.className} ${k}-open` : `${k}-open`), mt() && (h.tabIndex = d ? -1 : 0);
|
|
306
|
+
const Z = x("trigger"), Qt = wt(
|
|
307
|
+
Z,
|
|
308
|
+
k,
|
|
309
|
+
`${Z}-position-${G}`,
|
|
310
|
+
{ [`${Z}-rtl`]: M },
|
|
311
|
+
e
|
|
312
|
+
);
|
|
313
|
+
function C(t) {
|
|
314
|
+
const { componentConfig: o } = l ?? {};
|
|
315
|
+
return Me(
|
|
316
|
+
xt(t) ? t : u,
|
|
317
|
+
Ae,
|
|
318
|
+
(o == null ? void 0 : o.Trigger) ?? {},
|
|
319
|
+
pe(t) ? t : void 0
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
function tt() {
|
|
323
|
+
var o, i;
|
|
324
|
+
const t = Se(
|
|
325
|
+
((o = s.getTargetDOMNode) == null ? void 0 : o.call(s)) || ((i = s.getRootElement) == null ? void 0 : i.call(s)) || n.current.child
|
|
326
|
+
);
|
|
327
|
+
return n.current.rootElement = t, t;
|
|
328
|
+
}
|
|
329
|
+
const dt = Ft(
|
|
330
|
+
Kt(() => {
|
|
331
|
+
et();
|
|
332
|
+
}),
|
|
333
|
+
[m]
|
|
334
|
+
);
|
|
335
|
+
function Dt() {
|
|
336
|
+
const { trigger: t } = C(["trigger"]);
|
|
337
|
+
return [].concat(t).indexOf("click") > -1;
|
|
338
|
+
}
|
|
339
|
+
function mt() {
|
|
340
|
+
const { trigger: t } = C(["trigger"]);
|
|
341
|
+
return [].concat(t).indexOf("focus") > -1;
|
|
342
|
+
}
|
|
343
|
+
function st() {
|
|
344
|
+
const { trigger: t } = C(["trigger"]);
|
|
345
|
+
return [].concat(t).indexOf("hover") > -1;
|
|
346
|
+
}
|
|
347
|
+
function Mt() {
|
|
348
|
+
const { trigger: t } = C(["trigger"]);
|
|
349
|
+
return [].concat(t).indexOf("contextMenu") > -1;
|
|
350
|
+
}
|
|
351
|
+
function Ut() {
|
|
352
|
+
return st() && C(["mouseLeaveToClose"]).mouseLeaveToClose;
|
|
353
|
+
}
|
|
354
|
+
function jt() {
|
|
355
|
+
return st() && !C(["popupHoverStay"]).popupHoverStay;
|
|
356
|
+
}
|
|
357
|
+
function ht() {
|
|
358
|
+
if (Dt() || Mt()) {
|
|
359
|
+
const { clickToClose: t = !0 } = C(["clickToClose"]);
|
|
360
|
+
return t;
|
|
361
|
+
}
|
|
362
|
+
return st() && s.clickToClose;
|
|
363
|
+
}
|
|
364
|
+
function Pt() {
|
|
365
|
+
return mt() && C(["blurToHide"]).blurToHide;
|
|
366
|
+
}
|
|
367
|
+
function qt() {
|
|
368
|
+
n.current.updatePositionTimeoutID && (n.current.updatePositionTimeoutID.cancel ? n.current.updatePositionTimeoutID.cancel() : (clearTimeout(n.current.updatePositionTimeoutID), n.current.updatePositionTimeoutID = null)), K();
|
|
369
|
+
}
|
|
370
|
+
function Et(t) {
|
|
371
|
+
var lt, Bt;
|
|
372
|
+
const o = D.current;
|
|
373
|
+
if (!o)
|
|
464
374
|
return {};
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
375
|
+
const { showArrow: i, classNames: a } = C([
|
|
376
|
+
"showArrow",
|
|
377
|
+
"classNames"
|
|
378
|
+
]);
|
|
379
|
+
let w = i && ((lt = n.current.arrowStyle) == null ? void 0 : lt.top) || 0, O = i && ((Bt = n.current.arrowStyle) == null ? void 0 : Bt.left) || 0;
|
|
380
|
+
w = w ? `${w}px` : "", O = O ? `${O}px` : "";
|
|
381
|
+
const U = {
|
|
382
|
+
top: `${O || "50%"} 100% 0`,
|
|
383
|
+
tl: `${O || "15px"} 100% 0`,
|
|
384
|
+
tr: `${O || `${o.clientWidth - 15}px`} 100% 0`,
|
|
385
|
+
bottom: `${O || "50%"} 0 0`,
|
|
386
|
+
bl: `${O || "15px"} 0 0`,
|
|
387
|
+
br: `${O || `${o.clientWidth - 15}px`} 0 0`,
|
|
388
|
+
left: `100% ${w || "50%"} 0`,
|
|
389
|
+
lt: `100% ${w || "15px"} 0`,
|
|
390
|
+
lb: `100% ${w || `${o.clientHeight - 15}px`} 0`,
|
|
391
|
+
right: `0 ${w || "50%"} 0`,
|
|
392
|
+
rt: `0 ${w || "15px"} 0`,
|
|
393
|
+
rb: `0 ${w || `${o.clientHeight - 15}px`} 0`
|
|
394
|
+
};
|
|
395
|
+
if (a && a.indexOf("zoom") > -1)
|
|
396
|
+
return {
|
|
397
|
+
transformOrigin: U[t]
|
|
398
|
+
};
|
|
399
|
+
if (a === "slideDynamicOrigin") {
|
|
400
|
+
let zt = "0% 0%";
|
|
401
|
+
return ["top", "tl", "tr"].indexOf(t) > -1 && (zt = "100% 100%"), {
|
|
402
|
+
transformOrigin: zt
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
return {};
|
|
406
|
+
}
|
|
407
|
+
function St() {
|
|
408
|
+
if (C(["classNames"]).classNames !== "slideDynamicOrigin")
|
|
409
|
+
return "";
|
|
410
|
+
switch (n.current.realPosition) {
|
|
411
|
+
case "bottom":
|
|
412
|
+
case "bl":
|
|
413
|
+
case "br":
|
|
414
|
+
return "scaleY(0.9) translateY(-4px)";
|
|
415
|
+
case "top":
|
|
416
|
+
case "tl":
|
|
417
|
+
case "tr":
|
|
418
|
+
return "scaleY(0.9) translateY(4px)";
|
|
419
|
+
default:
|
|
469
420
|
return "";
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
function gt() {
|
|
424
|
+
var lt;
|
|
425
|
+
if (!I.current)
|
|
426
|
+
return {};
|
|
427
|
+
const t = D.current, o = tt();
|
|
428
|
+
if (!(o != null && o.offsetParent) && !((lt = o == null ? void 0 : o.getClientRects()) != null && lt.length))
|
|
429
|
+
return A.popupStyle;
|
|
430
|
+
const { style: i, arrowStyle: a, realPosition: w } = ke(
|
|
431
|
+
s,
|
|
432
|
+
t,
|
|
433
|
+
o,
|
|
434
|
+
I.current,
|
|
435
|
+
n.current.mouseLocation
|
|
436
|
+
);
|
|
437
|
+
n.current.arrowStyle = a || {};
|
|
438
|
+
const O = w || s.position;
|
|
439
|
+
return n.current.realPosition = O, {
|
|
440
|
+
...i,
|
|
441
|
+
...Et(O)
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
function Y(t) {
|
|
445
|
+
const o = gt();
|
|
446
|
+
H((i) => {
|
|
447
|
+
const a = { ...i };
|
|
448
|
+
return a.popupStyle = o, a;
|
|
449
|
+
}), j(t) && setTimeout(() => {
|
|
450
|
+
t();
|
|
451
|
+
}, 0);
|
|
452
|
+
}
|
|
453
|
+
const ct = Ft(Kt(Y), [
|
|
454
|
+
m
|
|
455
|
+
]);
|
|
456
|
+
function et(t = 0, o) {
|
|
457
|
+
if (m) {
|
|
458
|
+
if (t < 4) {
|
|
459
|
+
n.current.updatePositionTimeoutID = ct(o);
|
|
485
460
|
return;
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
);
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
);
|
|
461
|
+
}
|
|
462
|
+
n.current.updatePositionTimeoutID = setTimeout(() => {
|
|
463
|
+
const i = gt();
|
|
464
|
+
H((a) => {
|
|
465
|
+
const w = { ...a };
|
|
466
|
+
return w.popupStyle = i, w;
|
|
467
|
+
}), j(o) && setTimeout(() => {
|
|
468
|
+
o();
|
|
469
|
+
}, 0);
|
|
470
|
+
}, t);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
function z(t, o = 0, i) {
|
|
474
|
+
const a = C(["onVisibleChange", "popupVisible"]);
|
|
475
|
+
t !== m ? Ot(o, () => {
|
|
476
|
+
var w;
|
|
477
|
+
(w = a.onVisibleChange) == null || w.call(a, t), "popupVisible" in a ? i == null || i() : (H((O) => {
|
|
478
|
+
const U = { ...O };
|
|
479
|
+
return U.popupVisible = !!t, U;
|
|
480
|
+
}), setTimeout(t ? () => {
|
|
481
|
+
Y(i);
|
|
482
|
+
} : () => {
|
|
483
|
+
i == null || i();
|
|
484
|
+
}, 0));
|
|
485
|
+
}) : i == null || i();
|
|
486
|
+
}
|
|
487
|
+
function Ot(t, o) {
|
|
488
|
+
t ? (K(), n.current.delayTimeoutID = setTimeout(() => {
|
|
489
|
+
o(), K();
|
|
490
|
+
}, t)) : o();
|
|
491
|
+
}
|
|
492
|
+
function K() {
|
|
493
|
+
n.current.delayTimeoutID && (clearTimeout(n.current.delayTimeoutID), n.current.delayTimeoutID = null);
|
|
494
|
+
}
|
|
495
|
+
function Nt(t) {
|
|
496
|
+
var a;
|
|
497
|
+
const o = C(["onClickOutside", "clickOutsideToClose"]);
|
|
498
|
+
let i = Yt(D.current, t.target);
|
|
499
|
+
i || (i = Yt(tt(), t.target)), i || (i = !!n.current.hasPopupMouseDown), i || ((a = o.onClickOutside) == null || a.call(o), o.clickOutsideToClose && (Pt() || st() || z(!1)));
|
|
500
|
+
}
|
|
501
|
+
function Gt(t) {
|
|
502
|
+
const o = t.key;
|
|
503
|
+
W("onKeyDown", t), o === Xt.key && Jt(t);
|
|
504
|
+
}
|
|
505
|
+
function Jt(t) {
|
|
506
|
+
const { escToClose: o } = C(["escToClose"]);
|
|
507
|
+
o && t && t.key === Xt.key && m && z(!1);
|
|
508
|
+
}
|
|
509
|
+
function Zt(t) {
|
|
510
|
+
const { mouseEnterDelay: o } = C(["mouseEnterDelay"]);
|
|
511
|
+
W("onMouseEnter", t), K(), z(!0, o || 0);
|
|
512
|
+
}
|
|
513
|
+
function te(t) {
|
|
514
|
+
W("onMouseMove", t), yt(t), m && ct();
|
|
515
|
+
}
|
|
516
|
+
function vt(t) {
|
|
517
|
+
const { mouseLeaveDelay: o } = C(["mouseLeaveDelay"]);
|
|
518
|
+
K(), W("onMouseLeave", t), Ut() && m && z(!1, o || 0);
|
|
519
|
+
}
|
|
520
|
+
function ee() {
|
|
521
|
+
K();
|
|
522
|
+
}
|
|
523
|
+
function oe(t) {
|
|
524
|
+
vt(t);
|
|
525
|
+
}
|
|
526
|
+
function yt(t) {
|
|
527
|
+
C(["alignPoint"]).alignPoint && (n.current.mouseLocation = {
|
|
528
|
+
clientX: t.clientX,
|
|
529
|
+
clientY: t.clientY
|
|
510
530
|
});
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
531
|
+
}
|
|
532
|
+
function ne(t) {
|
|
533
|
+
t.preventDefault(), W("onContextMenu", t), yt(t), m ? C(["alignPoint"]).alignPoint && ct() : z(!0, 0);
|
|
534
|
+
}
|
|
535
|
+
function $t(t) {
|
|
536
|
+
m && (n.current.mousedownToHide = !0), W("onClick", t), ht() && m && z(!m, 0);
|
|
537
|
+
}
|
|
538
|
+
function ie(t) {
|
|
539
|
+
m && (n.current.mousedownToHide = !0), W("onClick", t), yt(t), !(!ht() && m) && z(!m, 0);
|
|
540
|
+
}
|
|
541
|
+
function re(t) {
|
|
542
|
+
const { focusDelay: o } = C(["focusDelay"]), i = () => {
|
|
543
|
+
W("onFocus", t);
|
|
544
|
+
};
|
|
545
|
+
K(), n.current.mousedownToHide || (m ? i == null || i() : z(!0, o || 0, i)), n.current.mousedownToHide = !1;
|
|
546
|
+
}
|
|
547
|
+
function se(t) {
|
|
548
|
+
z(!1, 200, () => W("onBlur", t));
|
|
549
|
+
}
|
|
550
|
+
function Ht() {
|
|
551
|
+
m && C(["autoFixPosition"]).autoFixPosition && et();
|
|
552
|
+
}
|
|
553
|
+
function ft() {
|
|
554
|
+
var w;
|
|
555
|
+
const { children: t } = s, o = t, i = o && typeof o != "string" && o.type;
|
|
556
|
+
let a = t;
|
|
557
|
+
if (["string", "number"].indexOf(typeof t) > -1 || Wt.count(t) > 1)
|
|
558
|
+
a = /* @__PURE__ */ X("span", { children: t });
|
|
559
|
+
else if (o && i && (i.__PQB_BUTTON === !0 || i.__PQB_CHECKBOX === !0 || i.__PQB_SWITCH === !0 || i.__PQB_RADIO === !0 || i === "button") && o.props.disabled) {
|
|
560
|
+
const { picked: O, omitted: U } = Ve(o.props.style, [
|
|
561
|
+
"position",
|
|
562
|
+
"left",
|
|
563
|
+
"right",
|
|
564
|
+
"top",
|
|
565
|
+
"bottom",
|
|
566
|
+
"float",
|
|
567
|
+
"display",
|
|
568
|
+
"zIndex"
|
|
569
|
+
]);
|
|
570
|
+
a = /* @__PURE__ */ X(
|
|
571
|
+
"span",
|
|
516
572
|
{
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
573
|
+
className: (w = o.props) == null ? void 0 : w.className,
|
|
574
|
+
style: { display: "inline-block", ...O, cursor: "not-allowed" },
|
|
575
|
+
children: _t(o, {
|
|
576
|
+
style: {
|
|
577
|
+
...U,
|
|
578
|
+
pointerEvents: "none"
|
|
579
|
+
},
|
|
580
|
+
className: void 0
|
|
581
|
+
})
|
|
521
582
|
}
|
|
522
583
|
);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
584
|
+
}
|
|
585
|
+
return a || /* @__PURE__ */ X("span", {});
|
|
586
|
+
}
|
|
587
|
+
function W(t, o) {
|
|
588
|
+
const i = ft(), a = i && i.props && i.props[t], w = C([t])[t];
|
|
589
|
+
j(a) && a(o), j(w) && w(o);
|
|
590
|
+
}
|
|
591
|
+
function Q(t) {
|
|
592
|
+
const o = ft(), i = o && o.props && o.props[t], a = C([t])[t];
|
|
593
|
+
return j(a) && j(i) ? (w) => {
|
|
594
|
+
i(w), a(w);
|
|
595
|
+
} : i || a;
|
|
596
|
+
}
|
|
597
|
+
function Lt() {
|
|
598
|
+
const t = C(["containerScrollToClose", "updateOnScroll"]);
|
|
599
|
+
t.containerScrollToClose ? z(!1) : t.updateOnScroll && et();
|
|
600
|
+
}
|
|
601
|
+
function le() {
|
|
602
|
+
var t;
|
|
603
|
+
n.current.scrollElements || (n.current.scrollElements = Ce(
|
|
604
|
+
tt()
|
|
605
|
+
// refPopupContainer.current.parentNode as HTMLElement,
|
|
606
|
+
), Array.isArray(n.current.scrollElements) && (s.containerScrollToClose && ((t = I.current) == null ? void 0 : t.parentNode) === document.body && n.current.scrollElements.indexOf(document.body) === -1 && xe(document.documentElement) && n.current.scrollElements.push(window), n.current.scrollElements.forEach((o) => {
|
|
607
|
+
bt(o, "scroll", Lt);
|
|
608
|
+
})));
|
|
609
|
+
}
|
|
610
|
+
function kt() {
|
|
611
|
+
n.current.scrollElements && (n.current.scrollElements.forEach((t) => {
|
|
612
|
+
Tt(t, "scroll", Lt);
|
|
613
|
+
}), n.current.scrollElements = null);
|
|
614
|
+
}
|
|
615
|
+
he(c, () => ({
|
|
616
|
+
getRootDOMNode: tt,
|
|
617
|
+
getRootElement: tt,
|
|
618
|
+
getPopupElement() {
|
|
619
|
+
return D.current;
|
|
620
|
+
},
|
|
621
|
+
getChild: ft,
|
|
622
|
+
getPopupStyle: gt,
|
|
623
|
+
getTransformTranslate: St,
|
|
624
|
+
getTransformOrigin: Et,
|
|
625
|
+
updateThrottleByRaf: ct,
|
|
626
|
+
update: Y,
|
|
627
|
+
updatePopupStyle: Y,
|
|
628
|
+
updatePopupPosition: et,
|
|
629
|
+
handleUpdatePosition: dt,
|
|
630
|
+
setPopupVisible: z,
|
|
631
|
+
delayToDo: Ot
|
|
632
|
+
})), ge(() => (Y(), () => {
|
|
633
|
+
}), [
|
|
634
|
+
D.current,
|
|
635
|
+
v.current,
|
|
636
|
+
$.current,
|
|
637
|
+
n.current.rootElement
|
|
638
|
+
]), F(() => {
|
|
639
|
+
var i;
|
|
640
|
+
const t = (i = I.current) == null ? void 0 : i.parentNode, o = Ct([t], et);
|
|
641
|
+
return () => {
|
|
642
|
+
o();
|
|
643
|
+
};
|
|
644
|
+
}, [(Vt = I.current) == null ? void 0 : Vt.parentNode]), F(() => {
|
|
645
|
+
const t = D.current, o = Ct([t], Ht);
|
|
646
|
+
return () => {
|
|
647
|
+
o();
|
|
648
|
+
};
|
|
649
|
+
}, [D.current]), F(() => {
|
|
650
|
+
const t = n.current.rootElement, o = Ct([t], Ht);
|
|
651
|
+
return () => {
|
|
652
|
+
o();
|
|
653
|
+
};
|
|
654
|
+
}, [n.current.rootElement]), F(() => {
|
|
655
|
+
const t = n.current.rootElement;
|
|
656
|
+
return m && (n.current.childrenDomSize = Ie(t, {
|
|
657
|
+
boundaryDistance: s.alignPoint ? void 0 : s.boundaryDistance,
|
|
658
|
+
position: s.position
|
|
659
|
+
})), () => {
|
|
660
|
+
};
|
|
661
|
+
}, [
|
|
662
|
+
n.current.rootElement,
|
|
663
|
+
s.alignPoint,
|
|
664
|
+
s.boundaryDistance,
|
|
665
|
+
s.position
|
|
666
|
+
]), F(() => (m && (s.updateOnScroll || s.containerScrollToClose ? le() : (et(), kt())), () => {
|
|
667
|
+
kt();
|
|
668
|
+
}), [
|
|
669
|
+
m,
|
|
670
|
+
s.updateOnScroll,
|
|
671
|
+
s.containerScrollToClose
|
|
672
|
+
]), F(() => {
|
|
673
|
+
const { clickOutsideToClose: t, getDocument: o } = C([
|
|
674
|
+
"clickOutsideToClose",
|
|
675
|
+
"getDocument"
|
|
676
|
+
]), i = (o == null ? void 0 : o()) || window.document, a = {
|
|
677
|
+
// clickOutside 必须监听mousedown。
|
|
678
|
+
// 1. 如果事件目标元素在click后被移除,document.onclick被触发时已经没有该元素,会错误触发clickOutside逻辑,隐藏popup。
|
|
679
|
+
// 2. 点击label标签,会触发对应input元素的点击事件,导致触发clickOutside,隐藏popup。
|
|
680
|
+
capture: xt(t) ? t.capture : !1
|
|
681
|
+
};
|
|
682
|
+
return m && (bt(i, "mousedown", Nt, a), bt(window, "resize", dt)), () => {
|
|
683
|
+
Tt(i, "mousedown", Nt, a), Tt(window, "resize", dt);
|
|
684
|
+
};
|
|
685
|
+
}, [m]), F(() => ("defaultPopupVisible" in s && H((t) => {
|
|
686
|
+
const o = { ...t };
|
|
687
|
+
return o.popupVisible = !!(s != null && s.defaultPopupVisible), o;
|
|
688
|
+
}), () => {
|
|
689
|
+
}), []), F(() => ("popupVisible" in s && H((t) => {
|
|
690
|
+
const o = { ...t };
|
|
691
|
+
return o.popupVisible = !!R, o;
|
|
692
|
+
}), () => {
|
|
693
|
+
}), [R]), F(() => () => {
|
|
694
|
+
qt();
|
|
695
|
+
}, []);
|
|
696
|
+
const ue = N && _t(it, {
|
|
697
|
+
...h,
|
|
698
|
+
ref: De(it) ? (t) => {
|
|
699
|
+
n.current.child = t, Ee(it, t);
|
|
700
|
+
} : void 0
|
|
701
|
+
}), ce = /* @__PURE__ */ X(
|
|
702
|
+
fe,
|
|
703
|
+
{
|
|
704
|
+
in: !!m,
|
|
705
|
+
timeout: b,
|
|
706
|
+
classNames: p,
|
|
707
|
+
unmountOnExit: y,
|
|
708
|
+
appear: !0,
|
|
709
|
+
mountOnEnter: !0,
|
|
710
|
+
onEnter: () => {
|
|
711
|
+
n.current.triggerDestoried = !1;
|
|
712
|
+
const t = D.current;
|
|
713
|
+
t && (t.style.display = "initial", t.style.pointerEvents = "none", p === "slideDynamicOrigin" && (t.style.transform = St()), Y());
|
|
714
|
+
},
|
|
715
|
+
onEntering: () => {
|
|
716
|
+
const t = D.current;
|
|
717
|
+
t && (p === "slideDynamicOrigin" && (t.style.transform = ""), Y());
|
|
718
|
+
},
|
|
719
|
+
onEntered: () => {
|
|
720
|
+
const t = D.current;
|
|
721
|
+
t && (t.style.pointerEvents = "auto", Y());
|
|
722
|
+
},
|
|
723
|
+
onExit: () => {
|
|
724
|
+
const t = D.current;
|
|
725
|
+
t && (t.style.pointerEvents = "none", E == null || E(t));
|
|
726
|
+
},
|
|
727
|
+
onExited: () => {
|
|
728
|
+
const t = D.current;
|
|
729
|
+
t && (t.style.display = "none", y && (n.current.triggerDestoried = !0), H((o) => {
|
|
730
|
+
const i = { ...o };
|
|
731
|
+
return i.popupStyle = {}, i;
|
|
732
|
+
}), S == null || S(t));
|
|
733
|
+
},
|
|
734
|
+
nodeRef: D,
|
|
735
|
+
children: /* @__PURE__ */ Rt(
|
|
736
|
+
"span",
|
|
737
|
+
{
|
|
738
|
+
ref: D,
|
|
739
|
+
"trigger-placement": n.current.realPosition,
|
|
740
|
+
...Pe(s),
|
|
741
|
+
style: {
|
|
742
|
+
width: q && (L == null ? void 0 : L.width) === void 0 ? (At = n.current.childrenDomSize) == null ? void 0 : At.width : "",
|
|
743
|
+
...A.popupStyle,
|
|
744
|
+
position: "absolute",
|
|
745
|
+
zIndex: g || "",
|
|
746
|
+
...L
|
|
747
|
+
// display
|
|
560
748
|
},
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
this.clearDelayTimer(), this.triggerPropsEvent("onMouseLeave", t), this.isMouseLeaveToClose() && this.state.popupVisible && this.setPopupVisible(!1, e || 0);
|
|
598
|
-
});
|
|
599
|
-
s(this, "onPopupMouseEnter", () => {
|
|
600
|
-
this.clearDelayTimer();
|
|
601
|
-
});
|
|
602
|
-
s(this, "onPopupMouseLeave", (t) => {
|
|
603
|
-
this.onMouseLeave(t);
|
|
604
|
-
});
|
|
605
|
-
s(this, "setMouseLocation", (t) => {
|
|
606
|
-
this.getMergedProps(["alignPoint"]).alignPoint && (this.mouseLocation = {
|
|
607
|
-
clientX: t.clientX,
|
|
608
|
-
clientY: t.clientY
|
|
609
|
-
});
|
|
610
|
-
});
|
|
611
|
-
s(this, "onContextMenu", (t) => {
|
|
612
|
-
t.preventDefault(), this.triggerPropsEvent("onContextMenu", t), this.setMouseLocation(t), this.state.popupVisible ? this.getMergedProps(["alignPoint"]).alignPoint && this.update() : this.setPopupVisible(!0, 0);
|
|
613
|
-
});
|
|
614
|
-
s(this, "clickToHidePopup", (t) => {
|
|
615
|
-
const { popupVisible: e } = this.state;
|
|
616
|
-
e && (this.mousedownToHide = !0), this.triggerPropsEvent("onClick", t), this.isClickToHide() && e && this.setPopupVisible(!e, 0);
|
|
617
|
-
});
|
|
618
|
-
s(this, "onClick", (t) => {
|
|
619
|
-
const { popupVisible: e } = this.state;
|
|
620
|
-
e && (this.mousedownToHide = !0), this.triggerPropsEvent("onClick", t), this.setMouseLocation(t), !(!this.isClickToHide() && e) && this.setPopupVisible(!e, 0);
|
|
621
|
-
});
|
|
622
|
-
s(this, "onFocus", (t) => {
|
|
623
|
-
const { focusDelay: e } = this.getMergedProps(["focusDelay"]), i = () => {
|
|
624
|
-
this.triggerPropsEvent("onFocus", t);
|
|
625
|
-
};
|
|
626
|
-
this.clearDelayTimer(), this.mousedownToHide || (this.state.popupVisible ? i == null || i() : this.setPopupVisible(!0, e || 0, i)), this.mousedownToHide = !1;
|
|
627
|
-
});
|
|
628
|
-
s(this, "onBlur", (t) => {
|
|
629
|
-
this.setPopupVisible(!1, 200, () => this.triggerPropsEvent("onBlur", t));
|
|
630
|
-
});
|
|
631
|
-
s(this, "onResize", () => {
|
|
632
|
-
this.getMergedProps(["autoFixPosition"]).autoFixPosition && this.state.popupVisible && this.updatePopupPosition();
|
|
633
|
-
});
|
|
634
|
-
s(this, "onPopupMouseDown", () => {
|
|
635
|
-
this.hasPopupMouseDown = !0, clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = setTimeout(() => {
|
|
636
|
-
this.hasPopupMouseDown = !1;
|
|
637
|
-
}, 0);
|
|
638
|
-
});
|
|
639
|
-
// 当 children 中的元素 disabled 时,不能正确触发 hover 等事件,所以当监测到对应
|
|
640
|
-
// 组件有 disabled 时,给元素加一层 span,处理事件,模拟样式
|
|
641
|
-
s(this, "getChild", () => {
|
|
642
|
-
var r;
|
|
643
|
-
const { children: t } = this.props, e = t, i = e && typeof e != "string" && e.type;
|
|
644
|
-
let n = t;
|
|
645
|
-
if (["string", "number"].indexOf(typeof t) > -1 || A.Children.count(t) > 1)
|
|
646
|
-
n = /* @__PURE__ */ N("span", { children: t });
|
|
647
|
-
else if (e && i && (i.__PQB_BUTTON === !0 || i.__PQB_CHECKBOX === !0 || i.__PQB_SWITCH === !0 || i.__PQB_RADIO === !0 || i === "button") && e.props.disabled) {
|
|
648
|
-
const { picked: u, omitted: y } = St(e.props.style, [
|
|
649
|
-
"position",
|
|
650
|
-
"left",
|
|
651
|
-
"right",
|
|
652
|
-
"top",
|
|
653
|
-
"bottom",
|
|
654
|
-
"float",
|
|
655
|
-
"display",
|
|
656
|
-
"zIndex"
|
|
657
|
-
]);
|
|
658
|
-
n = /* @__PURE__ */ N(
|
|
659
|
-
"span",
|
|
660
|
-
{
|
|
661
|
-
className: (r = e.props) == null ? void 0 : r.className,
|
|
662
|
-
style: { display: "inline-block", ...u, cursor: "not-allowed" },
|
|
663
|
-
children: A.cloneElement(e, {
|
|
664
|
-
style: {
|
|
665
|
-
...y,
|
|
666
|
-
pointerEvents: "none"
|
|
667
|
-
},
|
|
668
|
-
className: void 0
|
|
669
|
-
})
|
|
670
|
-
}
|
|
671
|
-
);
|
|
672
|
-
}
|
|
673
|
-
return n || /* @__PURE__ */ N("span", {});
|
|
674
|
-
});
|
|
675
|
-
s(this, "rafId");
|
|
676
|
-
// 创建的dom节点插入getPopupContainer。
|
|
677
|
-
s(this, "appendToContainer", (t) => {
|
|
678
|
-
if (G(this.rafId), this.isDidMount) {
|
|
679
|
-
const { getPopupContainer: e } = this.context, { getPopupContainer: i } = this.getMergedProps(["getPopupContainer"]), n = i || e, r = this.getRootElement(), u = n == null ? void 0 : n(r);
|
|
680
|
-
if (u) {
|
|
681
|
-
u.appendChild(t);
|
|
682
|
-
return;
|
|
749
|
+
...nt,
|
|
750
|
+
className: Qt,
|
|
751
|
+
children: [
|
|
752
|
+
xt(r) ? /* @__PURE__ */ X(
|
|
753
|
+
rt.type,
|
|
754
|
+
{
|
|
755
|
+
ref: rt.ref,
|
|
756
|
+
...rt.props,
|
|
757
|
+
style: { ...rt.props.style, ...r }
|
|
758
|
+
}
|
|
759
|
+
) : rt,
|
|
760
|
+
(J || P) && /* @__PURE__ */ X(
|
|
761
|
+
"div",
|
|
762
|
+
{
|
|
763
|
+
ref: v,
|
|
764
|
+
className: wt(`${Z}-arrow-container`, {
|
|
765
|
+
[`${k}-arrow-container`]: k
|
|
766
|
+
}),
|
|
767
|
+
children: /* @__PURE__ */ X(
|
|
768
|
+
"div",
|
|
769
|
+
{
|
|
770
|
+
ref: $,
|
|
771
|
+
...P,
|
|
772
|
+
className: wt(
|
|
773
|
+
`${Z}-arrow`,
|
|
774
|
+
{
|
|
775
|
+
[`${k}-arrow`]: k
|
|
776
|
+
},
|
|
777
|
+
P == null ? void 0 : P.className
|
|
778
|
+
),
|
|
779
|
+
style: { ...n.current.arrowStyle, ...P == null ? void 0 : P.style }
|
|
780
|
+
}
|
|
781
|
+
)
|
|
782
|
+
}
|
|
783
|
+
)
|
|
784
|
+
]
|
|
683
785
|
}
|
|
684
|
-
|
|
685
|
-
this.rafId = Pt(() => {
|
|
686
|
-
this.appendToContainer(t);
|
|
687
|
-
});
|
|
688
|
-
});
|
|
689
|
-
s(this, "getContainer", () => {
|
|
690
|
-
const t = document.createElement("div");
|
|
691
|
-
return t.style.width = "100%", t.style.position = "absolute", t.style.top = "0", t.style.left = "0", this.popupContainer = t, this.appendToContainer(t), t;
|
|
692
|
-
});
|
|
693
|
-
// 1. 触发直接附加到 Trigger 上的事件,大多是Trigger直接嵌套Trigger的情况
|
|
694
|
-
// 2. 触发children上直接被附加的事件
|
|
695
|
-
s(this, "triggerPropsEvent", (t, e) => {
|
|
696
|
-
const i = this.getChild(), n = i && i.props && i.props[t], r = this.getMergedProps([t])[t];
|
|
697
|
-
W(n) && n(e), W(r) && r(e);
|
|
698
|
-
});
|
|
699
|
-
// 触发 children/ trigger 组件上被附加的事件
|
|
700
|
-
s(this, "triggerOriginEvent", (t) => {
|
|
701
|
-
const e = this.getChild(), i = e && e.props && e.props[t], n = this.getMergedProps([t])[t];
|
|
702
|
-
return W(n) && W(i) ? (r) => {
|
|
703
|
-
i(r), n(r);
|
|
704
|
-
} : i || n;
|
|
705
|
-
});
|
|
706
|
-
const i = this.getMergedProps(t), n = "popupVisible" in i ? i.popupVisible : i.defaultPopupVisible;
|
|
707
|
-
this.popupOpen = !!n, this.triggerRef = q(), this.state = {
|
|
708
|
-
popupVisible: !!n,
|
|
709
|
-
popupStyle: {}
|
|
710
|
-
};
|
|
711
|
-
}
|
|
712
|
-
static getDerivedStateFromProps(t, e) {
|
|
713
|
-
return "popupVisible" in t && t.popupVisible !== e.popupVisible ? {
|
|
714
|
-
popupVisible: t.popupVisible
|
|
715
|
-
} : null;
|
|
716
|
-
}
|
|
717
|
-
componentDidMount() {
|
|
718
|
-
this.componentDidUpdate(this.getMergedProps()), this.isDidMount = !0, this.unmount = !1, this.childrenDom = this.getRootElement(), this.state.popupVisible && (this.childrenDomSize = Z(this.childrenDom, {
|
|
719
|
-
boundaryDistance: this.props.alignPoint ? void 0 : this.props.boundaryDistance,
|
|
720
|
-
position: this.props.position
|
|
721
|
-
}));
|
|
722
|
-
}
|
|
723
|
-
componentDidUpdate(t) {
|
|
724
|
-
const e = this.getMergedProps(t), i = this.getMergedProps();
|
|
725
|
-
!e.popupVisible && i.popupVisible && this.update();
|
|
726
|
-
const { popupVisible: n } = this.state;
|
|
727
|
-
this.popupOpen = n;
|
|
728
|
-
const { getDocument: r } = i;
|
|
729
|
-
if (!n) {
|
|
730
|
-
this.offClickOutside(), this.offContainerResize(), this.offWindowResize(), this.offScrollListeners(), this.offResizeObserver2(), this.offResizeObserver3();
|
|
731
|
-
return;
|
|
786
|
+
)
|
|
732
787
|
}
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
if (
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
788
|
+
);
|
|
789
|
+
let pt, It = m;
|
|
790
|
+
if (It || (It = !!D.current && !n.current.triggerDestoried), It) {
|
|
791
|
+
const t = s.getPopupContainer || l.getPopupContainer;
|
|
792
|
+
if (j(t)) {
|
|
793
|
+
const o = t(tt());
|
|
794
|
+
o && (pt = we(
|
|
795
|
+
/* @__PURE__ */ X("div", { ref: I, className: `${Z}-container`, children: ce }),
|
|
796
|
+
o
|
|
797
|
+
// popupVisible ? 1 : 0,
|
|
798
|
+
));
|
|
742
799
|
}
|
|
743
|
-
this.onResizeObserver2(), this.onResizeObserver3();
|
|
744
|
-
}
|
|
745
|
-
componentWillUnmount() {
|
|
746
|
-
this.unmount = !0, this.offClickOutside(), this.clearTimer(), this.offWindowResize(), this.offScrollListeners(), this.offContainerResize(), G(this.rafId), this.offResizeObserver2(), this.offResizeObserver3();
|
|
747
|
-
}
|
|
748
|
-
clearDelayTimer() {
|
|
749
|
-
this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
|
|
750
|
-
}
|
|
751
|
-
render() {
|
|
752
|
-
var $;
|
|
753
|
-
const {
|
|
754
|
-
children: t,
|
|
755
|
-
style: e,
|
|
756
|
-
className: i,
|
|
757
|
-
arrowProps: n,
|
|
758
|
-
disabled: r,
|
|
759
|
-
popup: u,
|
|
760
|
-
classNames: y,
|
|
761
|
-
duration: o,
|
|
762
|
-
unmountOnExit: v,
|
|
763
|
-
alignPoint: g,
|
|
764
|
-
autoAlignPopupWidth: a,
|
|
765
|
-
position: c,
|
|
766
|
-
childrenPrefix: f,
|
|
767
|
-
showArrow: m,
|
|
768
|
-
popupStyle: z,
|
|
769
|
-
__onExit: V,
|
|
770
|
-
__onExited: H
|
|
771
|
-
} = this.getMergedProps(), k = t || t === 0, { getPrefixCls: F, zIndex: p, rtl: M } = this.context, { popupVisible: T, popupStyle: E } = this.state;
|
|
772
|
-
if (!u)
|
|
773
|
-
return null;
|
|
774
|
-
const d = {}, x = {
|
|
775
|
-
onMouseDown: this.onPopupMouseDown
|
|
776
|
-
};
|
|
777
|
-
this.isHoverTrigger() && !r ? (d.onMouseEnter = this.onMouseEnter, d.onMouseLeave = this.onMouseLeave, this.isClickToHide() && (d.onClick = this.clickToHidePopup), g && (d.onMouseMove = this.onMouseMove), this.isPopupHoverHide() || (x.onMouseEnter = this.onPopupMouseEnter, x.onMouseLeave = this.onPopupMouseLeave)) : (d.onMouseEnter = this.triggerOriginEvent("onMouseEnter"), d.onMouseLeave = this.triggerOriginEvent("onMouseLeave")), this.isContextMenuTrigger() && !r ? (d.onContextMenu = this.onContextMenu, d.onClick = this.clickToHidePopup) : d.onContextMenu = this.triggerOriginEvent("onContextMenu"), this.isClickTrigger() && !r ? d.onClick = this.onClick : d.onClick = d.onClick || this.triggerOriginEvent("onClick"), this.isFocusTrigger() && !r ? (d.onFocus = this.onFocus, this.isBlurToHide() && (d.onBlur = this.onBlur)) : (d.onFocus = this.triggerOriginEvent("onFocus"), d.onBlur = this.triggerOriginEvent("onBlur")), r ? d.onKeyDown = this.triggerOriginEvent("onKeyDown") : d.onKeyDown = this.onKeyDown;
|
|
778
|
-
const w = this.getChild(), C = A.Children.only(u());
|
|
779
|
-
w.props.className && (d.className = w.props.className), f && T && (d.className = d.className ? `${d.className} ${f}-open` : `${f}-open`), this.isFocusTrigger() && (d.tabIndex = r ? -1 : 0);
|
|
780
|
-
const D = F("trigger"), R = _(
|
|
781
|
-
D,
|
|
782
|
-
f,
|
|
783
|
-
`${D}-position-${c}`,
|
|
784
|
-
{ [`${D}-rtl`]: M },
|
|
785
|
-
i
|
|
786
|
-
), S = k && A.cloneElement(w, {
|
|
787
|
-
...d,
|
|
788
|
-
ref: dt(w) ? (P) => {
|
|
789
|
-
this.rootElementRef = P, yt(w, P);
|
|
790
|
-
} : void 0
|
|
791
|
-
}), L = /* @__PURE__ */ N(
|
|
792
|
-
nt,
|
|
793
|
-
{
|
|
794
|
-
in: !!T,
|
|
795
|
-
timeout: o,
|
|
796
|
-
classNames: y,
|
|
797
|
-
unmountOnExit: v,
|
|
798
|
-
appear: !0,
|
|
799
|
-
mountOnEnter: !0,
|
|
800
|
-
onEnter: () => {
|
|
801
|
-
this.triggerRefDestoried = !1;
|
|
802
|
-
const P = this.getPopupElement();
|
|
803
|
-
P && (P.style.display = "initial", P.style.pointerEvents = "none", y === "slideDynamicOrigin" && (P.style.transform = this.getTransformTranslate()));
|
|
804
|
-
},
|
|
805
|
-
onEntering: () => {
|
|
806
|
-
const P = this.getPopupElement();
|
|
807
|
-
P && y === "slideDynamicOrigin" && (P.style.transform = "");
|
|
808
|
-
},
|
|
809
|
-
onEntered: () => {
|
|
810
|
-
const P = this.getPopupElement();
|
|
811
|
-
P && (P.style.pointerEvents = "auto", this.forceUpdate());
|
|
812
|
-
},
|
|
813
|
-
onExit: () => {
|
|
814
|
-
const P = this.getPopupElement();
|
|
815
|
-
P && (P.style.pointerEvents = "none", V == null || V(P));
|
|
816
|
-
},
|
|
817
|
-
onExited: () => {
|
|
818
|
-
const P = this.getPopupElement();
|
|
819
|
-
P && (P.style.display = "none", v && (this.triggerRefDestoried = !0), this.setState({ popupStyle: {} }), H == null || H(P));
|
|
820
|
-
},
|
|
821
|
-
nodeRef: this.triggerRef,
|
|
822
|
-
children: /* @__PURE__ */ X(
|
|
823
|
-
"span",
|
|
824
|
-
{
|
|
825
|
-
ref: this.triggerRef,
|
|
826
|
-
"trigger-placement": this.realPosition,
|
|
827
|
-
style: {
|
|
828
|
-
width: a && (e == null ? void 0 : e.width) === void 0 ? ($ = this.childrenDomSize) == null ? void 0 : $.width : "",
|
|
829
|
-
...E,
|
|
830
|
-
position: "absolute",
|
|
831
|
-
zIndex: p || "",
|
|
832
|
-
...e
|
|
833
|
-
// display
|
|
834
|
-
},
|
|
835
|
-
...x,
|
|
836
|
-
className: R,
|
|
837
|
-
...mt(this.props),
|
|
838
|
-
children: [
|
|
839
|
-
/* @__PURE__ */ N(
|
|
840
|
-
C.type,
|
|
841
|
-
{
|
|
842
|
-
ref: C.ref,
|
|
843
|
-
...C.props,
|
|
844
|
-
style: { ...C.props.style, ...z }
|
|
845
|
-
}
|
|
846
|
-
),
|
|
847
|
-
(m || n) && /* @__PURE__ */ N(
|
|
848
|
-
"div",
|
|
849
|
-
{
|
|
850
|
-
className: _(`${D}-arrow-container`, {
|
|
851
|
-
[`${f}-arrow-container`]: f
|
|
852
|
-
}),
|
|
853
|
-
children: /* @__PURE__ */ N(
|
|
854
|
-
"div",
|
|
855
|
-
{
|
|
856
|
-
...n,
|
|
857
|
-
className: _(
|
|
858
|
-
`${D}-arrow`,
|
|
859
|
-
{
|
|
860
|
-
[`${f}-arrow`]: f
|
|
861
|
-
},
|
|
862
|
-
n == null ? void 0 : n.className
|
|
863
|
-
),
|
|
864
|
-
style: { ...this.arrowStyle, ...n == null ? void 0 : n.style }
|
|
865
|
-
}
|
|
866
|
-
)
|
|
867
|
-
}
|
|
868
|
-
)
|
|
869
|
-
]
|
|
870
|
-
}
|
|
871
|
-
)
|
|
872
|
-
}
|
|
873
|
-
), b = T || this.getPopupElement() && !this.triggerRefDestoried ? /* @__PURE__ */ N(Mt, { getContainer: this.getContainer, children: L }) : null;
|
|
874
|
-
return k ? /* @__PURE__ */ X(A.Fragment, { children: [
|
|
875
|
-
S,
|
|
876
|
-
b
|
|
877
|
-
] }) : b;
|
|
878
800
|
}
|
|
801
|
+
return N && (pt = /* @__PURE__ */ Rt(ye, { children: [
|
|
802
|
+
ue,
|
|
803
|
+
pt
|
|
804
|
+
] })), pt;
|
|
879
805
|
}
|
|
880
|
-
|
|
806
|
+
const ze = ae(Be);
|
|
807
|
+
ze.displayName = "Trigger";
|
|
881
808
|
export {
|
|
882
|
-
|
|
883
|
-
|
|
809
|
+
ro as EventsByTriggerNeed,
|
|
810
|
+
ze as default
|
|
884
811
|
};
|