@unicom-cloud/ui 0.8.55 → 0.8.56
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 +36 -36
- package/Alert.js +41 -45
- package/Anchor.js +1 -1
- package/AutoComplete.js +40 -40
- package/Avatar.js +36 -36
- package/BackTop.js +26 -26
- package/Badge.js +43 -43
- package/Breadcrumb.js +17 -17
- package/Button.js +42 -42
- package/Calendar.js +54 -56
- package/Card.js +28 -28
- package/Carousel.js +42 -43
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +11 -580
- package/Comment.js +14 -14
- package/ConfigProvider.js +2 -2
- package/Copy.js +26 -26
- package/DatePicker.js +661 -670
- package/Descriptions.js +53 -53
- package/Divider.js +15 -15
- package/Draggable.js +16 -16
- package/Drawer.js +1 -1
- package/Dropdown.js +10 -10
- package/Empty.js +3 -3
- package/Form.js +10 -1410
- package/Grid.js +49 -49
- package/Icon.js +10 -10
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/Input.js +1 -1
- package/InputNumber.js +7 -7
- package/InputTag.js +1 -1
- package/Layout.js +34 -34
- package/Link.js +26 -26
- package/List.js +39 -39
- package/Mentions.js +17 -17
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +4 -10
- package/Notification.js +3 -3
- package/OverflowEllipsis.js +18 -18
- package/PageHeader.js +26 -27
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +15 -15
- package/Popover.js +22 -22
- package/Progress.js +18 -18
- package/Radio.js +2 -2
- package/Rate.js +40 -43
- package/ResizeBox.js +191 -192
- package/Result.js +17 -17
- package/Select.js +1 -1
- package/SelectView.js +56 -56
- package/Skeleton.js +35 -35
- package/Slider.js +81 -81
- package/Space.js +27 -27
- package/SpeechSynthesis.js +29 -32
- package/Spin.js +15 -15
- package/Statistic.js +54 -54
- package/Steps.js +44 -44
- package/Switch.js +39 -38
- package/Table.js +488 -488
- package/Tabs.js +1 -1
- package/Tag.js +13 -14
- package/TimePicker.js +68 -68
- package/Timeline.js +1 -1
- package/Tooltip.js +27 -28
- package/Transfer.js +29 -30
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +53 -52
- package/Typography.js +2 -737
- package/Upload.js +1 -1
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/1mEO29GP.js +23 -0
- package/chunk/5pZ3ayqs.js +29 -0
- package/chunk/9Gh1afjL.js +23 -0
- package/chunk/B1S1OEw6.js +29 -0
- package/chunk/{RRWbBHK-.js → B2Bp3i5u.js} +221 -221
- package/chunk/B45v5S9k.js +209 -0
- package/chunk/B6fn5y_s.js +23 -0
- package/chunk/B9PsJar0.js +118 -0
- package/chunk/BA02BFUV.js +41 -0
- package/chunk/BCk8e9fj.js +29 -0
- package/chunk/BHK9zpXn.js +207 -0
- package/chunk/BHLTzWzi.js +29 -0
- package/chunk/BK1FKNAX.js +41 -0
- package/chunk/BM6dpkeM.js +32 -0
- package/chunk/{DQ3uFRJD.js → BP7xX86Q.js} +223 -202
- package/chunk/BWx1cVT_.js +66 -0
- package/chunk/BbI3gqVr.js +23 -0
- package/chunk/{CIc4yo9k.js → BbYzi8M0.js} +46 -46
- package/chunk/Be7oeWU8.js +34 -0
- package/chunk/BeM2hfks.js +88 -0
- package/chunk/BkHxm4sv.js +41 -0
- package/chunk/{BUQBof6z.js → Bl-ODC57.js} +206 -207
- package/chunk/BlKc_pDZ.js +678 -0
- package/chunk/{BzqZZHGK.js → Bny52uiG.js} +48 -48
- package/chunk/{PuuHmqnW.js → BpwDupra.js} +238 -238
- package/chunk/BqxwlITu.js +52 -0
- package/chunk/BuEC_zcc.js +278 -0
- package/chunk/{CqcZfQQ4.js → Bv8ZRDFt.js} +80 -80
- package/chunk/{DZGcv_9A.js → C-w9pFY-.js} +32 -32
- package/chunk/C2fspJbE.js +23 -0
- package/chunk/C7Okdv4u.js +34 -0
- package/chunk/C95ipQ6b.js +41 -0
- package/chunk/{BzMYgxgO.js → CF3Telny.js} +26 -26
- package/chunk/CPl52AZh.js +206 -0
- package/chunk/CXNW5Y2a.js +23 -0
- package/chunk/Cb_oWoGj.js +40 -0
- package/chunk/CcX2pBUh.js +46 -0
- package/chunk/{BdJcAQ0Q.js → CggcswbO.js} +18 -18
- package/chunk/CilQ012k.js +1796 -0
- package/chunk/CkAOsst1.js +73 -0
- package/chunk/CnY8SvgY.js +126 -0
- package/chunk/{CTSIr-Pr.js → CwXmtKib.js} +89 -101
- package/chunk/{C3I_L73_.js → CwjaGytU.js} +39 -40
- package/chunk/{DTgc2wl4.js → D6RTBH4C.js} +36 -36
- package/chunk/D6mVoX-C.js +116 -0
- package/chunk/D9TqtOhq.js +40 -0
- package/chunk/{CZ8iz63Z.js → DBJ8d0o0.js} +210 -217
- package/chunk/{RL1SNlng.js → DDda6s72.js} +16 -16
- package/chunk/{BH5fVprw.js → DJmWXheU.js} +9 -9
- package/chunk/DPvnQJ-H.js +52 -0
- package/chunk/DQXq1QT0.js +58 -0
- package/chunk/DRJO1GfY.js +855 -0
- package/chunk/DUxWiN2U.js +1465 -0
- package/chunk/DYZzQ2uT.js +29 -0
- package/chunk/{CK0H_Yi4.js → DafaH1Qt.js} +140 -138
- package/chunk/{ShWkfsJd.js → DalIRWr7.js} +21 -21
- package/chunk/{CzTYWtfa.js → Dg2DmtzA.js} +31 -30
- package/chunk/DhLbnw3R.js +29 -0
- package/chunk/{BmtF7P8U.js → DkIjpuBZ.js} +170 -170
- package/chunk/Do1aMgY3.js +12 -0
- package/chunk/Dtnux4qL.js +38 -0
- package/chunk/{Niaq_og8.js → Dw4SJ4o1.js} +219 -225
- package/chunk/{DbtCtriE.js → DxNRWF67.js} +30 -31
- package/chunk/JnyGFb5j.js +284 -0
- package/chunk/Lk60-jkf.js +1098 -0
- package/chunk/V_IcWDFx.js +49 -0
- package/chunk/{DG7VgAhL.js → WkB0MERB.js} +107 -108
- package/chunk/bsawGxt8.js +32 -0
- package/chunk/cUuQh7L_.js +46 -0
- package/chunk/fqgc8r6C.js +29 -0
- package/chunk/m_kOQCiU.js +29 -0
- package/chunk/sl8s35SK.js +29 -0
- package/chunk/{Dki1RB5p.js → t51ig1FZ.js} +154 -155
- package/chunk/{BC0PujUD.js → yvbAFxtk.js} +119 -121
- package/hooks/index.js +52 -246
- package/hooks/useForceUpdate.js +6 -6
- package/hooks/useIntersectionObserver.js +12 -10
- package/hooks/useKeyboardEvent.js +7 -7
- package/hooks/useMedia.js +9 -12
- package/hooks/useMergeValue.js +10 -8
- package/hooks/useResizeObserver.js +16 -0
- package/hooks/useUpdateEffect.js +7 -9
- package/hooks/useWindowSize.js +16 -20
- package/icons.js +6003 -0
- package/index.js +377 -472
- package/locale/en-US.js +20 -6
- package/locale/ja-JP.js +4 -2
- package/locale/ko-KR.js +2 -2
- package/locale/pt-BR.js +3 -3
- package/locale/pt-PT.js +3 -3
- package/locale/tr-TR.js +11 -3
- package/locale/zh-CN.js +6 -0
- package/locale/zh-HK.js +2 -0
- package/locale/zh-TW.js +2 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/anchor/util.d.ts +1 -0
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/hooks/index.d.ts +3 -101
- package/types/hooks/useForceUpdate.d.ts +1 -2
- package/types/hooks/useIntersectionObserver.d.ts +1 -1
- package/types/hooks/useKeyboardEvent.d.ts +2 -2
- package/types/hooks/useMergeProps.d.ts +1 -1
- package/types/hooks/useResizeObserver.d.ts +5 -0
- package/types/hooks/useUpdateEffect.d.ts +2 -3
- package/types/hooks/useWindowSize.d.ts +1 -1
- package/types/icons.d.ts +4 -0
- package/types/index.d.ts +12 -2
- package/types/locale/en-US.d.ts +4 -0
- package/types/locale/interface.d.ts +2 -0
- package/types/locale/ja-JP.d.ts +4 -0
- package/types/locale/zh-CN.d.ts +4 -0
- package/types/locale/zh-HK.d.ts +4 -0
- package/types/locale/zh-TW.d.ts +4 -0
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/className.js +2 -3
- package/utils/contextHolder.js +2 -2
- package/utils/copy.js +2 -3
- package/utils/is.js +127 -90
- package/utils/reactDOM.js +17 -15
- package/utils/responsiveObserve.js +16 -16
- package/utils/saveAs.js +2 -3
- package/utils/scrollIntoView.js +1 -1
- package/chunk/BdYAMaw9.js +0 -6
- package/chunk/CiZVOdJ3.js +0 -122
- package/chunk/DdtfPvgk.js +0 -272
- package/chunk/I4RV9SKZ.js +0 -135
- package/chunk/TXCrI0jN.js +0 -20
- package/chunk/i1A7W8Qt.js +0 -277
- package/chunk/xPzFRQJn.js +0 -740
- package/hooks/useAsync.js +0 -13
- package/hooks/useAsyncFn.js +0 -15
- package/hooks/useAsyncRetry.js +0 -17
- package/hooks/useAudio.js +0 -5
- package/hooks/useBeforeUnload.js +0 -18
- package/hooks/useBoolean.js +0 -4
- package/hooks/useClickAway.js +0 -22
- package/hooks/useCopyToClipboard.js +0 -51
- package/hooks/useCounter.js +0 -45
- package/hooks/useCreation.js +0 -17
- package/hooks/useCustomCompareEffect.js +0 -15
- package/hooks/useDebounce.js +0 -9
- package/hooks/useDefault.js +0 -10
- package/hooks/useDrop.js +0 -44
- package/hooks/useDropArea.js +0 -45
- package/hooks/useEffectOnce.js +0 -7
- package/hooks/useEffectState.js +0 -9
- package/hooks/useEnsuredForwardedRef.js +0 -17
- package/hooks/useError.js +0 -13
- package/hooks/useEvent.js +0 -13
- package/hooks/useEventListener.js +0 -39
- package/hooks/useFavicon.js +0 -16
- package/hooks/useFirstMountState.js +0 -8
- package/hooks/useFullscreen.js +0 -39
- package/hooks/useGeolocation.js +0 -38
- package/hooks/useGetSet.js +0 -18
- package/hooks/useGetSetState.js +0 -12
- package/hooks/useHash.js +0 -26
- package/hooks/useHover.js +0 -16
- package/hooks/useHoverDirty.js +0 -17
- package/hooks/useIdle.js +0 -34
- package/hooks/useIntersection.js +0 -19
- package/hooks/useIsomorphicLayoutEffect2.js +0 -6
- package/hooks/useKey.js +0 -16
- package/hooks/useKeyPress.js +0 -13
- package/hooks/useKeyPressEvent.js +0 -11
- package/hooks/useLatest.js +0 -8
- package/hooks/useLifecycles.js +0 -9
- package/hooks/useList.js +0 -67
- package/hooks/useLocalStorage.js +0 -42
- package/hooks/useLocation.js +0 -51
- package/hooks/useLockBodyScroll.js +0 -55
- package/hooks/useLogger.js +0 -10
- package/hooks/useLongPress.js +0 -24
- package/hooks/useMap.js +0 -31
- package/hooks/useMeasure.js +0 -34
- package/hooks/useMeasureDirty.js +0 -24
- package/hooks/useMediaDevices.js +0 -26
- package/hooks/useMediatedState.js +0 -14
- package/hooks/useMethods.js +0 -14
- package/hooks/useMotion.js +0 -56
- package/hooks/useMount.js +0 -9
- package/hooks/useMountedState.js +0 -10
- package/hooks/useMouse.js +0 -44
- package/hooks/useMouseHovered.js +0 -9
- package/hooks/useMouseWheel.js +0 -14
- package/hooks/useMultiStateValidator.js +0 -19
- package/hooks/useNetworkState.js +0 -31
- package/hooks/useNumber.js +0 -4
- package/hooks/useObservable.js +0 -12
- package/hooks/useOrientation.js +0 -30
- package/hooks/usePageLeave.js +0 -19
- package/hooks/usePermission.js +0 -19
- package/hooks/usePinchZoom.js +0 -40
- package/hooks/usePreviousDistinct.js +0 -10
- package/hooks/usePromise.js +0 -19
- package/hooks/useQueue.js +0 -25
- package/hooks/useRaf.js +0 -24
- package/hooks/useRafLoop.js +0 -24
- package/hooks/useRafState.js +0 -15
- package/hooks/useReactive.js +0 -21
- package/hooks/useRendersCount.js +0 -7
- package/hooks/useScroll.js +0 -27
- package/hooks/useScrolling.js +0 -23
- package/hooks/useSearchParam.js +0 -18
- package/hooks/useSessionStorage.js +0 -29
- package/hooks/useSet.js +0 -15
- package/hooks/useSetState.js +0 -16
- package/hooks/useSize.js +0 -58
- package/hooks/useSlider.js +0 -48
- package/hooks/useSpeech.js +0 -45
- package/hooks/useStartTyping.js +0 -30
- package/hooks/useStateList.js +0 -37
- package/hooks/useStateValidator.js +0 -17
- package/hooks/useStateWithHistory.js +0 -46
- package/hooks/useSyncState.js +0 -14
- package/hooks/useThrottle.js +0 -21
- package/hooks/useThrottleFn.js +0 -21
- package/hooks/useTimeout.js +0 -17
- package/hooks/useTimeoutFn.js +0 -16
- package/hooks/useTitle.js +0 -18
- package/hooks/useToggle.js +0 -5
- package/hooks/useTween.js +0 -11
- package/hooks/useUnmount.js +0 -9
- package/hooks/useUnmountPromise.js +0 -20
- package/hooks/useUpdate.js +0 -10
- package/hooks/useUpdateTimeout.js +0 -9
- package/hooks/useUpsert.js +0 -16
- package/hooks/useVibrate.js +0 -21
- package/hooks/useVideo.js +0 -5
- package/hooks/useWindowScroll.js +0 -29
- package/types/hooks/component/UseKey.d.ts +0 -2
- package/types/hooks/factory/createBreakpoint.d.ts +0 -4
- package/types/hooks/factory/createGlobalState.d.ts +0 -7
- package/types/hooks/factory/createHTMLMediaHook.d.ts +0 -33
- package/types/hooks/factory/createMemo.d.ts +0 -2
- package/types/hooks/factory/createReducer.d.ts +0 -8
- package/types/hooks/factory/createReducerContext.d.ts +0 -5
- package/types/hooks/factory/createRenderProp.d.ts +0 -1
- package/types/hooks/factory/createRouter.d.ts +0 -7
- package/types/hooks/factory/createStateContext.d.ts +0 -5
- package/types/hooks/misc/hookState.d.ts +0 -8
- package/types/hooks/misc/parseTimeRanges.d.ts +0 -4
- package/types/hooks/misc/types.d.ts +0 -2
- package/types/hooks/misc/util.d.ts +0 -5
- package/types/hooks/useAsync.d.ts +0 -20
- package/types/hooks/useAsyncFn.d.ts +0 -23
- package/types/hooks/useAsyncRetry.d.ts +0 -27
- package/types/hooks/useAudio.d.ts +0 -11
- package/types/hooks/useBeforeUnload.d.ts +0 -2
- package/types/hooks/useBoolean.d.ts +0 -2
- package/types/hooks/useClickAway.d.ts +0 -3
- package/types/hooks/useCopyToClipboard.d.ts +0 -7
- package/types/hooks/useCounter.d.ts +0 -9
- package/types/hooks/useCreation.d.ts +0 -2
- package/types/hooks/useCustomCompareEffect.d.ts +0 -4
- package/types/hooks/useDebounce.d.ts +0 -3
- package/types/hooks/useDefault.d.ts +0 -2
- package/types/hooks/useDrop.d.ts +0 -17
- package/types/hooks/useDropArea.d.ts +0 -18
- package/types/hooks/useEffectOnce.d.ts +0 -3
- package/types/hooks/useEffectState.d.ts +0 -2
- package/types/hooks/useEnsuredForwardedRef.d.ts +0 -3
- package/types/hooks/useError.d.ts +0 -2
- package/types/hooks/useEvent.d.ts +0 -13
- package/types/hooks/useEventListener.d.ts +0 -2
- package/types/hooks/useFavicon.d.ts +0 -2
- package/types/hooks/useFirstMountState.d.ts +0 -1
- package/types/hooks/useFullscreen.d.ts +0 -10
- package/types/hooks/useGeolocation.d.ts +0 -21
- package/types/hooks/useGetSet.d.ts +0 -3
- package/types/hooks/useGetSetState.d.ts +0 -2
- package/types/hooks/useHash.d.ts +0 -2
- package/types/hooks/useHover.d.ts +0 -4
- package/types/hooks/useHoverDirty.d.ts +0 -3
- package/types/hooks/useIdle.d.ts +0 -2
- package/types/hooks/useIntersection.d.ts +0 -3
- package/types/hooks/useIsomorphicLayoutEffect2.d.ts +0 -3
- package/types/hooks/useKey.d.ts +0 -12
- package/types/hooks/useKeyPress.d.ts +0 -3
- package/types/hooks/useKeyPressEvent.d.ts +0 -3
- package/types/hooks/useLatest.d.ts +0 -4
- package/types/hooks/useLifecycles.d.ts +0 -2
- package/types/hooks/useList.d.ts +0 -18
- package/types/hooks/useLocalStorage.d.ts +0 -10
- package/types/hooks/useLocation.d.ts +0 -16
- package/types/hooks/useLockBodyScroll.d.ts +0 -8
- package/types/hooks/useLogger.d.ts +0 -2
- package/types/hooks/useLongPress.d.ts +0 -12
- package/types/hooks/useMap.d.ts +0 -11
- package/types/hooks/useMeasure.d.ts +0 -9
- package/types/hooks/useMeasureDirty.d.ts +0 -11
- package/types/hooks/useMediaDevices.d.ts +0 -2
- package/types/hooks/useMediatedState.d.ts +0 -9
- package/types/hooks/useMethods.d.ts +0 -8
- package/types/hooks/useMotion.d.ts +0 -20
- package/types/hooks/useMount.d.ts +0 -2
- package/types/hooks/useMountedState.d.ts +0 -1
- package/types/hooks/useMouse.d.ts +0 -13
- package/types/hooks/useMouseHovered.d.ts +0 -8
- package/types/hooks/useMouseWheel.d.ts +0 -2
- package/types/hooks/useMultiStateValidator.d.ts +0 -9
- package/types/hooks/useNetworkState.d.ts +0 -22
- package/types/hooks/useNumber.d.ts +0 -2
- package/types/hooks/useObservable.d.ts +0 -8
- package/types/hooks/useOrientation.d.ts +0 -6
- package/types/hooks/usePageLeave.d.ts +0 -2
- package/types/hooks/usePermission.d.ts +0 -16
- package/types/hooks/usePinchZoom.d.ts +0 -18
- package/types/hooks/usePreviousDistinct.d.ts +0 -2
- package/types/hooks/usePromise.d.ts +0 -3
- package/types/hooks/useQueue.d.ts +0 -9
- package/types/hooks/useRaf.d.ts +0 -2
- package/types/hooks/useRafLoop.d.ts +0 -2
- package/types/hooks/useRafState.d.ts +0 -3
- package/types/hooks/useReactive.d.ts +0 -2
- package/types/hooks/useRendersCount.d.ts +0 -1
- package/types/hooks/useScroll.d.ts +0 -7
- package/types/hooks/useScrolling.d.ts +0 -3
- package/types/hooks/useSearchParam.d.ts +0 -3
- package/types/hooks/useSessionStorage.d.ts +0 -2
- package/types/hooks/useSet.d.ts +0 -11
- package/types/hooks/useSetState.d.ts +0 -2
- package/types/hooks/useSize.d.ts +0 -8
- package/types/hooks/useSlider.d.ts +0 -15
- package/types/hooks/useSpeech.d.ts +0 -16
- package/types/hooks/useStartTyping.d.ts +0 -2
- package/types/hooks/useStateList.d.ts +0 -9
- package/types/hooks/useStateValidator.d.ts +0 -8
- package/types/hooks/useStateWithHistory.d.ts +0 -18
- package/types/hooks/useSyncState.d.ts +0 -3
- package/types/hooks/useThrottle.d.ts +0 -2
- package/types/hooks/useThrottleFn.d.ts +0 -2
- package/types/hooks/useTimeout.d.ts +0 -2
- package/types/hooks/useTimeoutFn.d.ts +0 -2
- package/types/hooks/useTitle.d.ts +0 -6
- package/types/hooks/useToggle.d.ts +0 -2
- package/types/hooks/useTween.d.ts +0 -3
- package/types/hooks/useUnmount.d.ts +0 -2
- package/types/hooks/useUnmountPromise.d.ts +0 -3
- package/types/hooks/useUpdate.d.ts +0 -2
- package/types/hooks/useUpdateTimeout.d.ts +0 -2
- package/types/hooks/useUpsert.d.ts +0 -6
- package/types/hooks/useVibrate.d.ts +0 -4
- package/types/hooks/useVideo.d.ts +0 -11
- package/types/hooks/useWindowScroll.d.ts +0 -6
package/Tree.js
CHANGED
package/TreeSelect.js
CHANGED
package/Trigger.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (h, l, t) =>
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { c as
|
|
6
|
-
import
|
|
1
|
+
var st = Object.defineProperty;
|
|
2
|
+
var nt = (h, l, t) => l in h ? st(h, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[l] = t;
|
|
3
|
+
var s = (h, l, t) => nt(h, typeof l != "symbol" ? l + "" : l, t);
|
|
4
|
+
import { jsx as N, jsxs as X } from "react/jsx-runtime";
|
|
5
|
+
import { c as rt } from "./chunk/BP7xX86Q.js";
|
|
6
|
+
import et from "lodash/isArray";
|
|
7
7
|
import lt from "lodash/isEqual";
|
|
8
8
|
import W from "lodash/isFunction";
|
|
9
|
-
import A, { useRef as pt, useEffect as ht, PureComponent as ut, createRef as
|
|
10
|
-
import {
|
|
11
|
-
import _ from "
|
|
12
|
-
import { isServerRendering as
|
|
9
|
+
import A, { useRef as pt, useEffect as ht, PureComponent as ut, createRef as Q } from "react";
|
|
10
|
+
import { b as at } from "./chunk/DUxWiN2U.js";
|
|
11
|
+
import { y as _ } from "./chunk/Do1aMgY3.js";
|
|
12
|
+
import { isServerRendering as it, on as U, off as Y, getScrollElements as ct, isScrollElement as ft, contains as q } from "./utils/dom.js";
|
|
13
13
|
import { supportRef as dt } from "./utils/is.js";
|
|
14
14
|
import { Esc as K } from "./utils/keyCode.js";
|
|
15
15
|
import gt from "./utils/mergeProp.js";
|
|
@@ -19,10 +19,11 @@ import { findDOMNode as bt, callbackOriginRef as yt } from "./utils/reactDOM.js"
|
|
|
19
19
|
import j from "./utils/throttleByRaf.js";
|
|
20
20
|
import wt from "react-dom";
|
|
21
21
|
import Tt from "./hooks/useIsFirstRender.js";
|
|
22
|
-
import
|
|
23
|
-
|
|
22
|
+
import "./chunk/BeM2hfks.js";
|
|
23
|
+
import J from "lodash/isPlainObject";
|
|
24
|
+
const Ct = (h) => {
|
|
24
25
|
const { getContainer: l, children: t } = h, e = pt();
|
|
25
|
-
return (Tt() || e.current === null) && !
|
|
26
|
+
return (Tt() || e.current === null) && !it && (e.current = l()), ht(() => () => {
|
|
26
27
|
const n = e.current;
|
|
27
28
|
n && n.parentNode && (n.parentNode.removeChild(n), e.current = null);
|
|
28
29
|
}, []), e.current ? wt.createPortal(t, e.current) : null;
|
|
@@ -38,8 +39,8 @@ const Mt = (h) => {
|
|
|
38
39
|
bottom: m
|
|
39
40
|
};
|
|
40
41
|
};
|
|
41
|
-
function
|
|
42
|
-
if (!t || !h ||
|
|
42
|
+
function Mt(h, l, t, e) {
|
|
43
|
+
if (!t || !h || it)
|
|
43
44
|
return { left: 0, width: 0, height: 0, top: 0 };
|
|
44
45
|
const i = (m) => document.documentElement[m] || document.body[m], n = t === document.body ? i("scrollTop") : t.scrollTop, r = t === document.body ? i("scrollLeft") : t.scrollLeft, { left: u, top: y, width: o, height: v } = l, g = t === document.body ? 0 : I(t, e).left, a = t === document.body ? 0 : I(t, e).top, c = y + n - a;
|
|
45
46
|
return {
|
|
@@ -51,7 +52,7 @@ function vt(h, l, t, e) {
|
|
|
51
52
|
}
|
|
52
53
|
const O = function(h, l, t) {
|
|
53
54
|
return t < h ? h : t > l ? l : t;
|
|
54
|
-
},
|
|
55
|
+
}, vt = (h, l) => {
|
|
55
56
|
let t = 0, e = 0, i = {};
|
|
56
57
|
l ? i = {
|
|
57
58
|
left: 12,
|
|
@@ -61,7 +62,7 @@ const O = function(h, l, t) {
|
|
|
61
62
|
...h
|
|
62
63
|
} : i = { ...h };
|
|
63
64
|
for (const n in i)
|
|
64
|
-
if (
|
|
65
|
+
if (et(i[n])) {
|
|
65
66
|
let r = 0;
|
|
66
67
|
["top", "bottom"].indexOf(n) > -1 ? (r = 1, t = i[n][0]) : e = i[n][1], i[n] = i[n][r];
|
|
67
68
|
}
|
|
@@ -70,27 +71,27 @@ const O = function(h, l, t) {
|
|
|
70
71
|
horizontalOffset: t,
|
|
71
72
|
verticalOffset: e
|
|
72
73
|
};
|
|
73
|
-
},
|
|
74
|
+
}, Et = (h, l, { boundaryDistance: t, position: e }) => l ? {
|
|
74
75
|
left: l.clientX,
|
|
75
76
|
top: l.clientY,
|
|
76
77
|
width: 0,
|
|
77
78
|
height: 0,
|
|
78
79
|
right: l.clientX,
|
|
79
80
|
bottom: l.clientY
|
|
80
|
-
} : I(h, { boundaryDistance: t, position: e }),
|
|
81
|
+
} : I(h, { boundaryDistance: t, position: e }), Dt = (h) => {
|
|
81
82
|
const l = h.offsetWidth, t = h.offsetHeight;
|
|
82
83
|
return {
|
|
83
84
|
width: l,
|
|
84
85
|
height: t
|
|
85
86
|
};
|
|
86
|
-
},
|
|
87
|
+
}, Ot = (h) => {
|
|
87
88
|
var r, u;
|
|
88
89
|
const l = h || {}, t = "left" in l ? l.left : "right" in l ? l.right : B, e = "top" in l ? l.top : "bottom" in l ? l.bottom : B, i = (((r = document.documentElement) == null ? void 0 : r.clientHeight) || window.innerHeight) - (e || B), n = (((u = document.documentElement) == null ? void 0 : u.clientWidth) || window.innerWidth) - (t || B);
|
|
89
90
|
return {
|
|
90
91
|
windowHeight: i,
|
|
91
92
|
windowWidth: n
|
|
92
93
|
};
|
|
93
|
-
},
|
|
94
|
+
}, xt = (h, l, t, e, i) => {
|
|
94
95
|
const {
|
|
95
96
|
autoAlignPopupWidth: n,
|
|
96
97
|
autoAlignPopupMinWidth: r,
|
|
@@ -99,10 +100,10 @@ const O = function(h, l, t) {
|
|
|
99
100
|
} = h;
|
|
100
101
|
if (!t || !l || !e)
|
|
101
102
|
return {};
|
|
102
|
-
const o = {}, v = !h.alignPoint && h.boundaryDistance || {}, g =
|
|
103
|
+
const o = {}, v = !h.alignPoint && h.boundaryDistance || {}, g = Et(t, u && i, {
|
|
103
104
|
boundaryDistance: v,
|
|
104
105
|
position: h.position
|
|
105
|
-
}), { left: a, top: c, width: f, height: m } =
|
|
106
|
+
}), { left: a, top: c, width: f, height: m } = Mt(
|
|
106
107
|
t,
|
|
107
108
|
g,
|
|
108
109
|
e,
|
|
@@ -110,14 +111,14 @@ const O = function(h, l, t) {
|
|
|
110
111
|
boundaryDistance: v,
|
|
111
112
|
position: h.position
|
|
112
113
|
}
|
|
113
|
-
), z =
|
|
114
|
+
), z = vt(h.popupAlign, h.showArrow), V = z.left || 0, H = z.right || 0, k = z.top || 0, F = z.bottom || 0;
|
|
114
115
|
n && (y == null ? void 0 : y.width) === void 0 && (l.style.width = `${t.offsetWidth}px`), r && (l.style.minWidth = `${t.offsetWidth}px`);
|
|
115
|
-
const p =
|
|
116
|
+
const p = Dt(l);
|
|
116
117
|
let M = h.position;
|
|
117
118
|
const T = {}, E = (D) => {
|
|
118
119
|
if (!h.autoFitPosition)
|
|
119
120
|
return;
|
|
120
|
-
const { windowHeight: R, windowWidth: S } =
|
|
121
|
+
const { windowHeight: R, windowWidth: S } = Ot(v);
|
|
121
122
|
let L = !1;
|
|
122
123
|
const b = {
|
|
123
124
|
left: a - g.left,
|
|
@@ -148,7 +149,7 @@ const O = function(h, l, t) {
|
|
|
148
149
|
c - p.height - (F || 0),
|
|
149
150
|
b.top
|
|
150
151
|
), L = !0) : o.top = b.top + R - p.height), D === "left" && b.left > P && (g.left < S - g.right ? (o.left = Math.min(
|
|
151
|
-
f + a +
|
|
152
|
+
f + a + H,
|
|
152
153
|
b.left + S - p.width
|
|
153
154
|
), L = !0) : o.left = b.left), D === "right" && P - b.left + p.width > S && (S - g.right < g.left ? (o.left = Math.max(
|
|
154
155
|
a - p.width - V,
|
|
@@ -156,8 +157,8 @@ const O = function(h, l, t) {
|
|
|
156
157
|
), L = !0) : o.left = b.left + S - p.width), o.left < 0)
|
|
157
158
|
o.left = 0;
|
|
158
159
|
else {
|
|
159
|
-
const
|
|
160
|
-
o.left = Math.min(
|
|
160
|
+
const ot = e.scrollWidth - p.width;
|
|
161
|
+
o.left = Math.min(ot, o.left);
|
|
161
162
|
}
|
|
162
163
|
return L;
|
|
163
164
|
}, d = z.horizontalOffset || 0, x = z.verticalOffset || 0;
|
|
@@ -194,14 +195,14 @@ const O = function(h, l, t) {
|
|
|
194
195
|
o.top = c + m - p.height, o.left = a - p.width - V, E("left") && (M = "rb"), o.top += x, C = c - Number(o.top) + Math.max(m / 2, m - 50), T.top = O(12, p.height - 12, C);
|
|
195
196
|
break;
|
|
196
197
|
case "right": {
|
|
197
|
-
o.top = c + m / 2 - p.height / 2, o.left = f + a +
|
|
198
|
+
o.top = c + m / 2 - p.height / 2, o.left = f + a + H, E("right") && (M = "left"), o.top += x, C = c - Number(o.top) + m / 2, T.top = O(12, p.height - 12, C);
|
|
198
199
|
break;
|
|
199
200
|
}
|
|
200
201
|
case "rt":
|
|
201
|
-
o.top = c, o.left = f + a +
|
|
202
|
+
o.top = c, o.left = f + a + H, E("right") && (M = "lt"), o.top += x, C = c - Number(o.top) + Math.min(m / 2, 50), T.top = O(12, p.height - 12, C);
|
|
202
203
|
break;
|
|
203
204
|
case "rb":
|
|
204
|
-
o.top = c + m - p.height, o.left = f + a +
|
|
205
|
+
o.top = c + m - p.height, o.left = f + a + H, E("right") && (M = "lb"), o.top += x, C = c - Number(o.top) + Math.max(m / 2, m - 50), T.top = O(12, p.height - 12, C);
|
|
205
206
|
break;
|
|
206
207
|
}
|
|
207
208
|
return {
|
|
@@ -231,13 +232,13 @@ const Jt = [
|
|
|
231
232
|
"onContextMenu",
|
|
232
233
|
"onKeyDown"
|
|
233
234
|
];
|
|
234
|
-
function
|
|
235
|
+
function Rt(h, l) {
|
|
235
236
|
const t = {}, e = { ...h };
|
|
236
237
|
return l.forEach((i) => {
|
|
237
238
|
h && i in h && (t[i] = h[i], delete e[i]);
|
|
238
239
|
}), { picked: t, omitted: e };
|
|
239
240
|
}
|
|
240
|
-
const
|
|
241
|
+
const St = {
|
|
241
242
|
blurToHide: !0,
|
|
242
243
|
// clickToClose: true,
|
|
243
244
|
classNames: "fadeIn",
|
|
@@ -263,7 +264,7 @@ class tt extends ut {
|
|
|
263
264
|
s(this, "context");
|
|
264
265
|
s(this, "popupContainer");
|
|
265
266
|
s(this, "rootElementRef");
|
|
266
|
-
s(this, "triggerRef",
|
|
267
|
+
s(this, "triggerRef", Q());
|
|
267
268
|
// 标志 popup 是否被销毁
|
|
268
269
|
s(this, "triggerRefDestoried");
|
|
269
270
|
s(this, "delayTimer", null);
|
|
@@ -339,9 +340,9 @@ class tt extends ut {
|
|
|
339
340
|
const { componentConfig: e } = this.context ?? {};
|
|
340
341
|
return gt(
|
|
341
342
|
t && J(t) ? t : this.props,
|
|
342
|
-
|
|
343
|
+
St,
|
|
343
344
|
e == null ? void 0 : e.Trigger,
|
|
344
|
-
t &&
|
|
345
|
+
t && et(t) ? t : void 0
|
|
345
346
|
);
|
|
346
347
|
});
|
|
347
348
|
s(this, "getRootElement", () => {
|
|
@@ -484,7 +485,7 @@ class tt extends ut {
|
|
|
484
485
|
const t = this.popupContainer, e = this.triggerRef.current, i = this.getRootElement();
|
|
485
486
|
if (!i.offsetParent && !i.getClientRects().length)
|
|
486
487
|
return this.state.popupStyle;
|
|
487
|
-
const n = this.getMergedProps(), { style: r, arrowStyle: u, realPosition: y } =
|
|
488
|
+
const n = this.getMergedProps(), { style: r, arrowStyle: u, realPosition: y } = xt(
|
|
488
489
|
n,
|
|
489
490
|
e,
|
|
490
491
|
i,
|
|
@@ -573,7 +574,7 @@ class tt extends ut {
|
|
|
573
574
|
"onClickOutside",
|
|
574
575
|
"clickOutsideToClose"
|
|
575
576
|
]), n = this.getPopupElement(), r = this.getRootElement();
|
|
576
|
-
!
|
|
577
|
+
!q(n, t.target) && !q(r, t.target) && !this.hasPopupMouseDown && (e == null || e(), i && !this.isBlurToHide() && !this.isHoverTrigger() && this.setPopupVisible(!1));
|
|
577
578
|
});
|
|
578
579
|
s(this, "onKeyDown", (t) => {
|
|
579
580
|
const e = t.key;
|
|
@@ -641,9 +642,9 @@ class tt extends ut {
|
|
|
641
642
|
const { children: t } = this.props, e = t, i = e && typeof e != "string" && e.type;
|
|
642
643
|
let n = t;
|
|
643
644
|
if (["string", "number"].indexOf(typeof t) > -1 || A.Children.count(t) > 1)
|
|
644
|
-
n = /* @__PURE__ */
|
|
645
|
+
n = /* @__PURE__ */ N("span", { children: t });
|
|
645
646
|
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) {
|
|
646
|
-
const { picked: u, omitted: y } =
|
|
647
|
+
const { picked: u, omitted: y } = Rt(e.props.style, [
|
|
647
648
|
"position",
|
|
648
649
|
"left",
|
|
649
650
|
"right",
|
|
@@ -653,7 +654,7 @@ class tt extends ut {
|
|
|
653
654
|
"display",
|
|
654
655
|
"zIndex"
|
|
655
656
|
]);
|
|
656
|
-
n = /* @__PURE__ */
|
|
657
|
+
n = /* @__PURE__ */ N(
|
|
657
658
|
"span",
|
|
658
659
|
{
|
|
659
660
|
className: (r = e.props) == null ? void 0 : r.className,
|
|
@@ -668,7 +669,7 @@ class tt extends ut {
|
|
|
668
669
|
}
|
|
669
670
|
);
|
|
670
671
|
}
|
|
671
|
-
return n || /* @__PURE__ */
|
|
672
|
+
return n || /* @__PURE__ */ N("span", {});
|
|
672
673
|
});
|
|
673
674
|
s(this, "rafId");
|
|
674
675
|
// 创建的dom节点插入getPopupContainer。
|
|
@@ -702,7 +703,7 @@ class tt extends ut {
|
|
|
702
703
|
} : i || n;
|
|
703
704
|
});
|
|
704
705
|
const i = this.getMergedProps(t), n = "popupVisible" in i ? i.popupVisible : i.defaultPopupVisible;
|
|
705
|
-
this.popupOpen = !!n, this.triggerRef =
|
|
706
|
+
this.popupOpen = !!n, this.triggerRef = Q(), this.state = {
|
|
706
707
|
popupVisible: !!n,
|
|
707
708
|
popupStyle: {}
|
|
708
709
|
};
|
|
@@ -765,7 +766,7 @@ class tt extends ut {
|
|
|
765
766
|
showArrow: m,
|
|
766
767
|
popupStyle: z,
|
|
767
768
|
__onExit: V,
|
|
768
|
-
__onExited:
|
|
769
|
+
__onExited: H
|
|
769
770
|
} = this.getMergedProps(), k = t || t === 0, { getPrefixCls: F, zIndex: p, rtl: M } = this.context, { popupVisible: T, popupStyle: E } = this.state;
|
|
770
771
|
if (!u)
|
|
771
772
|
return null;
|
|
@@ -786,8 +787,8 @@ class tt extends ut {
|
|
|
786
787
|
ref: dt(w) ? (P) => {
|
|
787
788
|
this.rootElementRef = P, yt(w, P);
|
|
788
789
|
} : void 0
|
|
789
|
-
}), L = /* @__PURE__ */
|
|
790
|
-
|
|
790
|
+
}), L = /* @__PURE__ */ N(
|
|
791
|
+
rt,
|
|
791
792
|
{
|
|
792
793
|
in: !!T,
|
|
793
794
|
timeout: o,
|
|
@@ -814,7 +815,7 @@ class tt extends ut {
|
|
|
814
815
|
},
|
|
815
816
|
onExited: () => {
|
|
816
817
|
const P = this.getPopupElement();
|
|
817
|
-
P && (P.style.display = "none", v && (this.triggerRefDestoried = !0), this.setState({ popupStyle: {} }),
|
|
818
|
+
P && (P.style.display = "none", v && (this.triggerRefDestoried = !0), this.setState({ popupStyle: {} }), H == null || H(P));
|
|
818
819
|
},
|
|
819
820
|
nodeRef: this.triggerRef,
|
|
820
821
|
children: /* @__PURE__ */ X(
|
|
@@ -834,7 +835,7 @@ class tt extends ut {
|
|
|
834
835
|
className: R,
|
|
835
836
|
...mt(this.props),
|
|
836
837
|
children: [
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ N(
|
|
838
839
|
C.type,
|
|
839
840
|
{
|
|
840
841
|
ref: C.ref,
|
|
@@ -842,13 +843,13 @@ class tt extends ut {
|
|
|
842
843
|
style: { ...C.props.style, ...z }
|
|
843
844
|
}
|
|
844
845
|
),
|
|
845
|
-
(m || n) && /* @__PURE__ */
|
|
846
|
+
(m || n) && /* @__PURE__ */ N(
|
|
846
847
|
"div",
|
|
847
848
|
{
|
|
848
849
|
className: _(`${D}-arrow-container`, {
|
|
849
850
|
[`${f}-arrow-container`]: f
|
|
850
851
|
}),
|
|
851
|
-
children: /* @__PURE__ */
|
|
852
|
+
children: /* @__PURE__ */ N(
|
|
852
853
|
"div",
|
|
853
854
|
{
|
|
854
855
|
...n,
|
|
@@ -868,7 +869,7 @@ class tt extends ut {
|
|
|
868
869
|
}
|
|
869
870
|
)
|
|
870
871
|
}
|
|
871
|
-
), b = T || this.getPopupElement() && !this.triggerRefDestoried ? /* @__PURE__ */
|
|
872
|
+
), b = T || this.getPopupElement() && !this.triggerRefDestoried ? /* @__PURE__ */ N(Ct, { getContainer: this.getContainer, children: L }) : null;
|
|
872
873
|
return k ? /* @__PURE__ */ X(A.Fragment, { children: [
|
|
873
874
|
S,
|
|
874
875
|
b
|