@unicom-cloud/ui 0.8.54 → 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/{qSJXQ1qu.js → DBJ8d0o0.js} +183 -189
- 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/modal/config.d.ts +1 -1
- 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/ResizeBox.js
CHANGED
|
@@ -1,66 +1,65 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as g, jsxs as ut } from "react/jsx-runtime";
|
|
2
2
|
import vt from "lodash/isNumber";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { on as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import bt from "
|
|
12
|
-
import
|
|
13
|
-
import kt from "
|
|
14
|
-
import Ut from "
|
|
15
|
-
import Vt from "@unicom-cloud/icons/IconUiDragDotVertical";
|
|
3
|
+
import Wt, { useContext as ft, useRef as F, useEffect as lt, forwardRef as Ct, useState as ct, useImperativeHandle as zt } from "react";
|
|
4
|
+
import { b as gt } from "./chunk/DUxWiN2U.js";
|
|
5
|
+
import Bt from "./hooks/useMergeProps.js";
|
|
6
|
+
import It from "./hooks/useMergeValue.js";
|
|
7
|
+
import { y as P } from "./chunk/Do1aMgY3.js";
|
|
8
|
+
import { on as y, off as $ } from "./utils/dom.js";
|
|
9
|
+
import Mt from "./utils/omit.js";
|
|
10
|
+
import { I as Yt } from "./chunk/BM6dpkeM.js";
|
|
11
|
+
import { I as Tt, a as bt } from "./chunk/DQXq1QT0.js";
|
|
12
|
+
import { I as Ft } from "./chunk/bsawGxt8.js";
|
|
13
|
+
import { I as kt } from "./chunk/BA02BFUV.js";
|
|
14
|
+
import { I as Ut } from "./chunk/C95ipQ6b.js";
|
|
16
15
|
import wt from "lodash/isFunction";
|
|
17
16
|
import "./utils/is.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
17
|
+
import "./chunk/BeM2hfks.js";
|
|
18
|
+
import st from "lodash/isPlainObject";
|
|
19
|
+
import Vt from "./hooks/useIsomorphicLayoutEffect.js";
|
|
20
|
+
import _t from "lodash/isString";
|
|
22
21
|
import St from "lodash/isUndefined";
|
|
23
|
-
function
|
|
22
|
+
function Nt(r) {
|
|
24
23
|
const {
|
|
25
24
|
className: ot,
|
|
26
|
-
direction:
|
|
25
|
+
direction: m,
|
|
27
26
|
icon: q,
|
|
28
27
|
onMouseDown: J,
|
|
29
28
|
onResize: x,
|
|
30
29
|
children: K,
|
|
31
|
-
collapsible:
|
|
30
|
+
collapsible: z = {},
|
|
32
31
|
resizable: X = !0,
|
|
33
|
-
renderChildren:
|
|
32
|
+
renderChildren: T,
|
|
34
33
|
...Q
|
|
35
|
-
} = r, { getPrefixCls: rt, rtl:
|
|
34
|
+
} = r, { getPrefixCls: rt, rtl: M } = ft(gt), d = rt("resizebox-trigger"), D = m === "horizontal", N = M && !D, I = P(
|
|
36
35
|
d,
|
|
37
36
|
`${d}-${D ? "horizontal" : "vertical"}`,
|
|
38
37
|
{ [`${d}-not-resizable`]: !X },
|
|
39
|
-
{ [`${d}-rtl`]:
|
|
38
|
+
{ [`${d}-rtl`]: M },
|
|
40
39
|
ot
|
|
41
|
-
), l = F(), k =
|
|
42
|
-
...
|
|
43
|
-
icon:
|
|
44
|
-
} : {}, E =
|
|
45
|
-
...
|
|
46
|
-
icon:
|
|
47
|
-
} : {}, U = () =>
|
|
40
|
+
), l = F(), k = N ? [/* @__PURE__ */ g(Tt, {}, "prev"), /* @__PURE__ */ g(bt, {}, "next")] : [/* @__PURE__ */ g(bt, {}, "prev"), /* @__PURE__ */ g(Tt, {}, "next")], b = st(z.prev) ? {
|
|
41
|
+
...z.prev,
|
|
42
|
+
icon: z.prev.icon || (D ? /* @__PURE__ */ g(Ft, {}) : k[0])
|
|
43
|
+
} : {}, E = st(z.next) ? {
|
|
44
|
+
...z.next,
|
|
45
|
+
icon: z.next.icon || (D ? /* @__PURE__ */ g(Yt, {}) : k[1])
|
|
46
|
+
} : {}, U = () => b.icon && !b.collapsed || E.collapsed ? /* @__PURE__ */ g(
|
|
48
47
|
"span",
|
|
49
48
|
{
|
|
50
|
-
className:
|
|
51
|
-
onClick:
|
|
52
|
-
children:
|
|
49
|
+
className: P(`${d}-icon`, P(`${d}-prev`)),
|
|
50
|
+
onClick: b.onClick,
|
|
51
|
+
children: b.icon
|
|
53
52
|
}
|
|
54
|
-
) : /* @__PURE__ */
|
|
53
|
+
) : /* @__PURE__ */ g("span", { className: P(`${d}-icon-empty`) }), tt = () => E.icon && !E.collapsed || b.collapsed ? /* @__PURE__ */ g(
|
|
55
54
|
"span",
|
|
56
55
|
{
|
|
57
|
-
className:
|
|
56
|
+
className: P(`${d}-icon`, P(`${d}-next`)),
|
|
58
57
|
onClick: E.onClick,
|
|
59
58
|
children: E.icon
|
|
60
59
|
}
|
|
61
|
-
) : /* @__PURE__ */
|
|
60
|
+
) : /* @__PURE__ */ g("span", { className: P(`${d}-icon-empty`) }), w = () => X ? /* @__PURE__ */ g("span", { className: `${d}-icon`, children: q || (D ? /* @__PURE__ */ g(kt, {}) : /* @__PURE__ */ g(Ut, {})) }) : /* @__PURE__ */ g("span", { className: P(`${d}-icon-empty`) }), O = U(), u = w(), h = tt(), V = () => /* @__PURE__ */ ut("div", { className: `${d}-icon-wrapper`, children: [
|
|
62
61
|
O,
|
|
63
|
-
|
|
62
|
+
u,
|
|
64
63
|
h
|
|
65
64
|
] });
|
|
66
65
|
return X ? (lt(() => {
|
|
@@ -69,37 +68,37 @@ function Mt(r) {
|
|
|
69
68
|
var H, _;
|
|
70
69
|
l.current && ((H = i == null ? void 0 : i.unobserve) == null || H.call(i, l.current)), (_ = i == null ? void 0 : i.disconnect) == null || _.call(i), i = null;
|
|
71
70
|
};
|
|
72
|
-
}, [l.current]), /* @__PURE__ */
|
|
71
|
+
}, [l.current]), /* @__PURE__ */ g(
|
|
73
72
|
"div",
|
|
74
73
|
{
|
|
75
74
|
ref: l,
|
|
76
|
-
...
|
|
77
|
-
className:
|
|
75
|
+
...Mt(Q, ["style"]),
|
|
76
|
+
className: I,
|
|
78
77
|
onMouseDown: J,
|
|
79
|
-
children: wt(
|
|
78
|
+
children: wt(T) ? T(O, u, h) : K || V()
|
|
80
79
|
}
|
|
81
|
-
)) : /* @__PURE__ */
|
|
80
|
+
)) : /* @__PURE__ */ g("div", { className: I, children: wt(T) ? T(O, u, h) : K || V() });
|
|
82
81
|
}
|
|
83
|
-
const dt = "horizontal",
|
|
84
|
-
function
|
|
82
|
+
const dt = "horizontal", Pt = "vertical";
|
|
83
|
+
function Lt(r, ot) {
|
|
85
84
|
const {
|
|
86
|
-
style:
|
|
85
|
+
style: m,
|
|
87
86
|
className: q,
|
|
88
87
|
component: J = "div",
|
|
89
88
|
direction: x = "horizontal",
|
|
90
89
|
icon: K,
|
|
91
|
-
size:
|
|
90
|
+
size: z = 0.5,
|
|
92
91
|
min: X,
|
|
93
|
-
max:
|
|
92
|
+
max: T,
|
|
94
93
|
panes: Q,
|
|
95
94
|
disabled: rt,
|
|
96
|
-
trigger:
|
|
97
|
-
} = r, { getPrefixCls: d, rtl: D } =
|
|
98
|
-
|
|
99
|
-
`${
|
|
100
|
-
{ [`${
|
|
95
|
+
trigger: M
|
|
96
|
+
} = r, { getPrefixCls: d, rtl: D } = ft(gt), N = d("resizebox-split"), I = x.includes(dt), l = x.includes("reverse"), k = I && D, b = !I, E = P(
|
|
97
|
+
N,
|
|
98
|
+
`${N}-${I ? dt : Pt}`,
|
|
99
|
+
{ [`${N}-rtl`]: D },
|
|
101
100
|
q
|
|
102
|
-
), [U, tt] = Q, w = typeof
|
|
101
|
+
), [U, tt] = Q, w = typeof z == "string", [O, u] = ct(parseFloat(z)), [h, V] = ct(0), i = F({
|
|
103
102
|
startX: 0,
|
|
104
103
|
startY: 0,
|
|
105
104
|
startWidth: 0,
|
|
@@ -107,16 +106,16 @@ function Gt(r, ot) {
|
|
|
107
106
|
startOffset: 0,
|
|
108
107
|
moving: !1
|
|
109
108
|
}), H = F(), _ = F([]);
|
|
110
|
-
|
|
109
|
+
zt(ot, () => H.current, []);
|
|
111
110
|
function L(t, e) {
|
|
112
111
|
return parseFloat(t) / parseFloat(e);
|
|
113
112
|
}
|
|
114
113
|
function W(t, e, n, o) {
|
|
115
|
-
const s = typeof X == "string" ? L(parseFloat(X), t) : X || 0, a = typeof
|
|
116
|
-
let
|
|
117
|
-
|
|
118
|
-
let A = w ? e + (o - n) *
|
|
119
|
-
t * e + (o - n) *
|
|
114
|
+
const s = typeof X == "string" ? L(parseFloat(X), t) : X || 0, a = typeof T == "string" ? L(parseFloat(T), t) : T || 1;
|
|
115
|
+
let f = l ? -1 : 1;
|
|
116
|
+
f *= k ? -1 : 1;
|
|
117
|
+
let A = w ? e + (o - n) * f : L(
|
|
118
|
+
t * e + (o - n) * f,
|
|
120
119
|
t
|
|
121
120
|
);
|
|
122
121
|
const nt = w ? s * t : s, B = w ? a * t : a;
|
|
@@ -124,12 +123,12 @@ function Gt(r, ot) {
|
|
|
124
123
|
}
|
|
125
124
|
function G(t) {
|
|
126
125
|
var e, n, o;
|
|
127
|
-
(e = r.onMovingStart) == null || e.call(r), i.current.moving = !0, i.current.startX = t.pageX, i.current.startY = t.pageY, i.current.startWidth = (n = H.current) == null ? void 0 : n.offsetWidth, i.current.startHeight = (o = H.current) == null ? void 0 : o.offsetHeight, i.current.startOffset = O,
|
|
126
|
+
(e = r.onMovingStart) == null || e.call(r), i.current.moving = !0, i.current.startX = t.pageX, i.current.startY = t.pageY, i.current.startWidth = (n = H.current) == null ? void 0 : n.offsetWidth, i.current.startHeight = (o = H.current) == null ? void 0 : o.offsetHeight, i.current.startOffset = O, y(window, "mousemove", j), y(window, "touchmove", j), y(window, "mouseup", Z), y(window, "touchend", Z), y(window, "contextmenu", Z), document.body.style.cursor = b ? "row-resize" : "col-resize";
|
|
128
127
|
}
|
|
129
128
|
function j(t) {
|
|
130
129
|
var e;
|
|
131
130
|
if (i.current.moving) {
|
|
132
|
-
const n =
|
|
131
|
+
const n = I ? W(
|
|
133
132
|
i.current.startWidth,
|
|
134
133
|
i.current.startOffset,
|
|
135
134
|
i.current.startX,
|
|
@@ -140,15 +139,15 @@ function Gt(r, ot) {
|
|
|
140
139
|
i.current.startY,
|
|
141
140
|
t.pageY
|
|
142
141
|
);
|
|
143
|
-
|
|
142
|
+
u(n), (e = r.onMoving) == null || e.call(r, t, w ? `${n}px` : n);
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
145
|
function Z() {
|
|
147
146
|
var t;
|
|
148
|
-
i.current.moving = !1,
|
|
147
|
+
i.current.moving = !1, $(window, "mousemove", j), $(window, "touchmove", j), $(window, "mouseup", Z), $(window, "touchend", Z), $(window, "contextmenu", Z), document.body.style.cursor = "default", (t = r.onMovingEnd) == null || t.call(r);
|
|
149
148
|
}
|
|
150
149
|
function it(t) {
|
|
151
|
-
const { contentRect: e } = t[0], n = e[
|
|
150
|
+
const { contentRect: e } = t[0], n = e[b ? "height" : "width"];
|
|
152
151
|
V(n);
|
|
153
152
|
}
|
|
154
153
|
function c() {
|
|
@@ -158,79 +157,79 @@ function Gt(r, ot) {
|
|
|
158
157
|
lt(() => {
|
|
159
158
|
var t;
|
|
160
159
|
(t = r.onPaneResize) == null || t.call(r, _.current);
|
|
161
|
-
}, [O, h]),
|
|
162
|
-
const t = parseFloat(
|
|
163
|
-
O !== t &&
|
|
164
|
-
}, [
|
|
165
|
-
const v = J, p = /* @__PURE__ */
|
|
160
|
+
}, [O, h]), Vt(() => {
|
|
161
|
+
const t = parseFloat(z);
|
|
162
|
+
O !== t && u(t);
|
|
163
|
+
}, [z]);
|
|
164
|
+
const v = J, p = /* @__PURE__ */ g(
|
|
166
165
|
"div",
|
|
167
166
|
{
|
|
168
|
-
className:
|
|
167
|
+
className: P(`${N}-pane`, "first-pane"),
|
|
169
168
|
style: { flexBasis: c() },
|
|
170
169
|
ref: (t) => {
|
|
171
170
|
_.current[0] = t;
|
|
172
171
|
},
|
|
173
172
|
children: U
|
|
174
173
|
}
|
|
175
|
-
), R = /* @__PURE__ */
|
|
174
|
+
), R = /* @__PURE__ */ g(
|
|
176
175
|
"div",
|
|
177
176
|
{
|
|
178
|
-
className:
|
|
177
|
+
className: P(`${N}-pane`, "second-pane"),
|
|
179
178
|
ref: (t) => {
|
|
180
179
|
_.current[1] = t;
|
|
181
180
|
},
|
|
182
181
|
children: tt
|
|
183
182
|
}
|
|
184
|
-
),
|
|
185
|
-
return /* @__PURE__ */
|
|
186
|
-
|
|
187
|
-
!rt && /* @__PURE__ */
|
|
188
|
-
|
|
183
|
+
), S = l ? [R, p] : [p, R];
|
|
184
|
+
return /* @__PURE__ */ ut(v, { style: m, className: E, ref: H, children: [
|
|
185
|
+
S[0],
|
|
186
|
+
!rt && /* @__PURE__ */ g(
|
|
187
|
+
Nt,
|
|
189
188
|
{
|
|
190
|
-
className: `${
|
|
191
|
-
direction:
|
|
189
|
+
className: `${N}-trigger`,
|
|
190
|
+
direction: b ? dt : Pt,
|
|
192
191
|
icon: K,
|
|
193
192
|
onMouseDown: G,
|
|
194
193
|
onResize: it,
|
|
195
|
-
children:
|
|
194
|
+
children: M
|
|
196
195
|
}
|
|
197
196
|
),
|
|
198
|
-
|
|
197
|
+
S[1]
|
|
199
198
|
] });
|
|
200
199
|
}
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
const ht = "horizontal",
|
|
204
|
-
function
|
|
200
|
+
const Et = Ct(Lt);
|
|
201
|
+
Et.displayName = "ResizeBoxSplit";
|
|
202
|
+
const ht = "horizontal", Dt = "vertical";
|
|
203
|
+
function Gt(r, ot) {
|
|
205
204
|
const {
|
|
206
|
-
panes:
|
|
205
|
+
panes: m,
|
|
207
206
|
style: q,
|
|
208
207
|
className: J,
|
|
209
208
|
component: x = "div",
|
|
210
209
|
direction: K = "horizontal",
|
|
211
|
-
icon:
|
|
210
|
+
icon: z,
|
|
212
211
|
...X
|
|
213
|
-
} = r, { getPrefixCls:
|
|
214
|
-
new Array(
|
|
212
|
+
} = r, { getPrefixCls: T, rtl: Q } = ft(gt), rt = 1 / m.length, M = F(), d = F(
|
|
213
|
+
new Array(m.length).fill({
|
|
215
214
|
moving: !1,
|
|
216
215
|
startOffset: 0,
|
|
217
216
|
startPosition: 0
|
|
218
217
|
})
|
|
219
|
-
), D = F([]),
|
|
220
|
-
new Array(
|
|
221
|
-
), [
|
|
222
|
-
new Array(
|
|
223
|
-
), [w, O] =
|
|
224
|
-
new Array(Math.max(
|
|
225
|
-
),
|
|
226
|
-
|
|
227
|
-
`${
|
|
228
|
-
{ [`${
|
|
229
|
-
{ [`${
|
|
218
|
+
), D = F([]), N = F(0), I = F([]), [l, k] = ct(
|
|
219
|
+
new Array(m.length).fill(rt)
|
|
220
|
+
), [b, E] = ct(!1), [U, tt] = ct(
|
|
221
|
+
new Array(m.length).fill(0)
|
|
222
|
+
), [w, O] = ct(
|
|
223
|
+
new Array(Math.max(m.length - 1, 0)).fill({ prev: !1, next: !1 })
|
|
224
|
+
), u = T("resizebox-split-group"), h = K === ht, V = h && Q, i = !h, H = P(
|
|
225
|
+
u,
|
|
226
|
+
`${u}-${h ? ht : Dt}`,
|
|
227
|
+
{ [`${u}-moving`]: b },
|
|
228
|
+
{ [`${u}-rtl`]: Q },
|
|
230
229
|
J
|
|
231
230
|
), _ = x, L = () => {
|
|
232
231
|
let t = [];
|
|
233
|
-
|
|
232
|
+
m.forEach((s) => {
|
|
234
233
|
const { size: a } = s;
|
|
235
234
|
St(a) ? t.push(void 0) : t.push(G(a));
|
|
236
235
|
});
|
|
@@ -241,26 +240,26 @@ function jt(r, ot) {
|
|
|
241
240
|
return `calc(${l[t] * 100}% - ${(e + n) / 2}px)`;
|
|
242
241
|
};
|
|
243
242
|
function G(t) {
|
|
244
|
-
const e = h ?
|
|
243
|
+
const e = h ? M.current.offsetWidth : M.current.offsetHeight;
|
|
245
244
|
if (!t || vt(t) && t < 0)
|
|
246
245
|
return 0;
|
|
247
|
-
const n =
|
|
246
|
+
const n = _t(t) ? parseFloat(t) / e : t;
|
|
248
247
|
return Math.min(n, 1);
|
|
249
248
|
}
|
|
250
249
|
const j = (t) => {
|
|
251
|
-
const e = Math.min(t + 1,
|
|
252
|
-
let s = G(
|
|
253
|
-
const a = G(
|
|
254
|
-
let
|
|
255
|
-
return s = Math.min(n - a, s),
|
|
250
|
+
const e = Math.min(t + 1, m.length - 1), n = l[t] + l[e], o = G(m[t].min) || 0;
|
|
251
|
+
let s = G(m[t].max) || n;
|
|
252
|
+
const a = G(m[e].min) || 0;
|
|
253
|
+
let f = G(m[e].max) || n;
|
|
254
|
+
return s = Math.min(n - a, s), f = Math.min(n - o, f), {
|
|
256
255
|
currentMin: o,
|
|
257
256
|
currentMax: s,
|
|
258
257
|
nextMin: a,
|
|
259
|
-
nextMax:
|
|
258
|
+
nextMax: f
|
|
260
259
|
};
|
|
261
260
|
}, Z = (t, e, n) => {
|
|
262
|
-
const o =
|
|
263
|
-
let Y = t + G(`${(n - e) *
|
|
261
|
+
const o = N.current, s = o + 1, a = [...l], f = V ? -1 : 1, et = l[o], A = l[s], nt = et + A, { currentMin: B, currentMax: C } = j(o);
|
|
262
|
+
let Y = t + G(`${(n - e) * f}px`);
|
|
264
263
|
return Y = Math.max(B, Y), Y = Math.min(C, Y), a[o] = Y, a[s] = nt - Y, a;
|
|
265
264
|
};
|
|
266
265
|
function it(t, e) {
|
|
@@ -268,8 +267,8 @@ function jt(r, ot) {
|
|
|
268
267
|
s[e] = o, tt(s);
|
|
269
268
|
}
|
|
270
269
|
const c = (t) => {
|
|
271
|
-
let e =
|
|
272
|
-
|
|
270
|
+
let e = m[t].collapsible;
|
|
271
|
+
st(e) || (e = e ? { prev: !0, next: !0 } : {});
|
|
273
272
|
const { prev: n, next: o } = e;
|
|
274
273
|
if (!n && !o)
|
|
275
274
|
return {};
|
|
@@ -280,56 +279,56 @@ function jt(r, ot) {
|
|
|
280
279
|
};
|
|
281
280
|
function v(t, e) {
|
|
282
281
|
var o;
|
|
283
|
-
(o = r.onMovingStart) == null || o.call(r, e),
|
|
282
|
+
(o = r.onMovingStart) == null || o.call(r, e), N.current = e;
|
|
284
283
|
const n = d.current[e];
|
|
285
|
-
n.moving = !0, n.startOffset = l[e], n.startPosition = h ? t.pageX : t.pageY, E(!0),
|
|
284
|
+
n.moving = !0, n.startOffset = l[e], n.startPosition = h ? t.pageX : t.pageY, E(!0), y(window, "mousemove", p), y(window, "touchmove", p), y(window, "mouseup", R), y(window, "touchend", R), y(window, "contextmenu", R), document.body.style.cursor = i ? "row-resize" : "col-resize";
|
|
286
285
|
}
|
|
287
286
|
function p(t) {
|
|
288
287
|
var s;
|
|
289
|
-
const e =
|
|
288
|
+
const e = N.current, n = d.current[e], o = h ? M.current.offsetWidth : M.current.offsetHeight;
|
|
290
289
|
if (n.moving) {
|
|
291
290
|
const a = Z(
|
|
292
291
|
n.startOffset,
|
|
293
292
|
n.startPosition,
|
|
294
293
|
h ? t.pageX : t.pageY
|
|
295
294
|
);
|
|
296
|
-
k(a),
|
|
295
|
+
k(a), I.current = a, (s = r == null ? void 0 : r.onMoving) == null || s.call(
|
|
297
296
|
r,
|
|
298
297
|
t,
|
|
299
|
-
a.map((
|
|
298
|
+
a.map((f) => `${f * o}px`),
|
|
300
299
|
e
|
|
301
300
|
);
|
|
302
301
|
}
|
|
303
302
|
}
|
|
304
303
|
function R() {
|
|
305
304
|
var e;
|
|
306
|
-
const t =
|
|
307
|
-
d.current[t].moving = !1, E(!1),
|
|
305
|
+
const t = N.current;
|
|
306
|
+
d.current[t].moving = !1, E(!1), $(window, "mousemove", p), $(window, "touchmove", p), $(window, "mouseup", R), $(window, "touchend", R), $(window, "contextmenu", R), document.body.style.cursor = "default", (e = r.onMovingEnd) == null || e.call(r, t);
|
|
308
307
|
}
|
|
309
|
-
function
|
|
310
|
-
var $t
|
|
311
|
-
const s = e + 1, a = [...l],
|
|
312
|
-
let Y =
|
|
313
|
-
n === "prev" ? (et !== C || at === C) && (Y = B, at = A - B,
|
|
308
|
+
function S(t, e, n, o) {
|
|
309
|
+
var yt, $t;
|
|
310
|
+
const s = e + 1, a = [...l], f = l[e], et = l[s], A = f + et, nt = h ? M.current.offsetWidth : M.current.offsetHeight, { currentMin: B, nextMin: C } = j(e);
|
|
311
|
+
let Y = I.current[e], at = I.current[s], mt = w[e][n];
|
|
312
|
+
n === "prev" ? (et !== C || at === C) && (Y = B, at = A - B, mt = !0) : (f !== B || Y === B) && (Y = A - C, at = C, mt = !0), a[e] = Y, a[s] = at, (yt = r == null ? void 0 : r.onMoving) == null || yt.call(
|
|
314
313
|
r,
|
|
315
314
|
t,
|
|
316
|
-
a.map((
|
|
315
|
+
a.map((Xt) => `${Xt * nt}px`),
|
|
317
316
|
e
|
|
318
|
-
), (
|
|
317
|
+
), ($t = r.onMovingEnd) == null || $t.call(r, e), k(a), wt(o) && o(t, e, n, mt);
|
|
319
318
|
}
|
|
320
319
|
return lt(() => {
|
|
321
320
|
const t = L();
|
|
322
|
-
k(t),
|
|
323
|
-
}, [JSON.stringify(
|
|
321
|
+
k(t), I.current = t;
|
|
322
|
+
}, [JSON.stringify(m.map((t) => t.size))]), zt(ot, () => M.current, []), lt(() => {
|
|
324
323
|
const t = [];
|
|
325
324
|
l.forEach((e, n) => {
|
|
326
|
-
const o = { prev: !1, next: !1 }, s = n + 1, { currentMin: a, nextMin:
|
|
327
|
-
e === a ? o.prev = !0 : l[s] ===
|
|
325
|
+
const o = { prev: !1, next: !1 }, s = n + 1, { currentMin: a, nextMin: f } = j(n);
|
|
326
|
+
e === a ? o.prev = !0 : l[s] === f && (o.next = !0), t.push(o);
|
|
328
327
|
}), O(t);
|
|
329
|
-
}, [l]), /* @__PURE__ */
|
|
328
|
+
}, [l]), /* @__PURE__ */ g(
|
|
330
329
|
_,
|
|
331
330
|
{
|
|
332
|
-
...
|
|
331
|
+
...Mt(X, [
|
|
333
332
|
"onMovingStart",
|
|
334
333
|
"onPaneResize",
|
|
335
334
|
"onMoving",
|
|
@@ -337,41 +336,41 @@ function jt(r, ot) {
|
|
|
337
336
|
]),
|
|
338
337
|
style: q,
|
|
339
338
|
className: H,
|
|
340
|
-
ref:
|
|
341
|
-
children:
|
|
339
|
+
ref: M,
|
|
340
|
+
children: m.map((t, e) => {
|
|
342
341
|
const {
|
|
343
342
|
content: n,
|
|
344
343
|
disabled: o,
|
|
345
344
|
trigger: s,
|
|
346
345
|
resizable: a = !0,
|
|
347
|
-
collapsible:
|
|
348
|
-
} = t, { hasPrev: et, hasNext: A } = c(e), nt =
|
|
349
|
-
return /* @__PURE__ */
|
|
350
|
-
/* @__PURE__ */
|
|
346
|
+
collapsible: f = {}
|
|
347
|
+
} = t, { hasPrev: et, hasNext: A } = c(e), nt = st(f) && st(f.prev) ? f.prev : {}, B = st(f) && st(f.next) ? f.next : {};
|
|
348
|
+
return /* @__PURE__ */ ut(Wt.Fragment, { children: [
|
|
349
|
+
/* @__PURE__ */ g(
|
|
351
350
|
"div",
|
|
352
351
|
{
|
|
353
|
-
className: `${
|
|
352
|
+
className: `${u}-pane`,
|
|
354
353
|
style: { flexBasis: W(e) },
|
|
355
354
|
ref: (C) => D.current[e] = C,
|
|
356
355
|
children: n
|
|
357
356
|
}
|
|
358
357
|
),
|
|
359
|
-
!o && e !==
|
|
360
|
-
|
|
358
|
+
!o && e !== m.length - 1 && /* @__PURE__ */ g(
|
|
359
|
+
Nt,
|
|
361
360
|
{
|
|
362
|
-
className: `${
|
|
363
|
-
direction: i ? ht :
|
|
364
|
-
icon:
|
|
361
|
+
className: `${u}-trigger`,
|
|
362
|
+
direction: i ? ht : Dt,
|
|
363
|
+
icon: z,
|
|
365
364
|
onResize: (C) => it(C, e),
|
|
366
365
|
onMouseDown: (C) => v(C, e),
|
|
367
366
|
collapsible: {
|
|
368
367
|
prev: et ? {
|
|
369
|
-
onClick: (C) =>
|
|
368
|
+
onClick: (C) => S(C, e, "prev", nt.onClick),
|
|
370
369
|
icon: nt.icon,
|
|
371
370
|
collapsed: w[e].prev
|
|
372
371
|
} : void 0,
|
|
373
372
|
next: A ? {
|
|
374
|
-
onClick: (C) =>
|
|
373
|
+
onClick: (C) => S(C, e, "next", B.onClick),
|
|
375
374
|
icon: B.icon,
|
|
376
375
|
collapsed: w[e].next
|
|
377
376
|
} : void 0
|
|
@@ -385,19 +384,19 @@ function jt(r, ot) {
|
|
|
385
384
|
}
|
|
386
385
|
);
|
|
387
386
|
}
|
|
388
|
-
const
|
|
389
|
-
|
|
390
|
-
const
|
|
391
|
-
|
|
387
|
+
const Ht = Ct(Gt);
|
|
388
|
+
Ht.displayName = "ResizeBoxSplitGroup";
|
|
389
|
+
const At = "left", pt = "right", xt = "top", Rt = "bottom", jt = [
|
|
390
|
+
At,
|
|
392
391
|
pt,
|
|
393
392
|
xt,
|
|
394
393
|
Rt
|
|
395
|
-
],
|
|
394
|
+
], Zt = {
|
|
396
395
|
component: "div",
|
|
397
396
|
directions: ["right"],
|
|
398
397
|
resizeIcons: {},
|
|
399
398
|
resizeTriggers: {}
|
|
400
|
-
},
|
|
399
|
+
}, qt = (r) => {
|
|
401
400
|
switch (r) {
|
|
402
401
|
case "left":
|
|
403
402
|
return "right";
|
|
@@ -407,23 +406,23 @@ const Xt = "left", pt = "right", xt = "top", Rt = "bottom", Zt = [
|
|
|
407
406
|
return r;
|
|
408
407
|
}
|
|
409
408
|
};
|
|
410
|
-
function
|
|
411
|
-
const { getPrefixCls:
|
|
409
|
+
function Jt(r, ot) {
|
|
410
|
+
const { getPrefixCls: m, componentConfig: q, rtl: J } = ft(gt), x = Bt(
|
|
412
411
|
r,
|
|
413
|
-
|
|
412
|
+
Zt,
|
|
414
413
|
q == null ? void 0 : q.ResizeBox
|
|
415
414
|
), {
|
|
416
415
|
style: K,
|
|
417
|
-
className:
|
|
416
|
+
className: z,
|
|
418
417
|
component: X,
|
|
419
|
-
directions:
|
|
418
|
+
directions: T,
|
|
420
419
|
resizeIcons: Q,
|
|
421
420
|
children: rt,
|
|
422
|
-
resizeTriggers:
|
|
421
|
+
resizeTriggers: M,
|
|
423
422
|
width: d,
|
|
424
423
|
height: D,
|
|
425
|
-
...
|
|
426
|
-
} = x,
|
|
424
|
+
...N
|
|
425
|
+
} = x, I = J ? T.map((c) => qt(c)) : T, l = m("resizebox"), k = P(l, { [`${l}-rtl`]: J }, z), [b, E] = ct({}), [U, tt] = It(void 0, { value: d }), [w, O] = It(void 0, { value: D }), u = F({
|
|
427
426
|
startX: 0,
|
|
428
427
|
startY: 0,
|
|
429
428
|
startWidth: 0,
|
|
@@ -437,7 +436,7 @@ function Kt(r, ot) {
|
|
|
437
436
|
right: 0
|
|
438
437
|
}
|
|
439
438
|
}), h = F();
|
|
440
|
-
|
|
439
|
+
zt(ot, () => h.current, []);
|
|
441
440
|
function V(c) {
|
|
442
441
|
return [xt, Rt].indexOf(c) > -1;
|
|
443
442
|
}
|
|
@@ -457,36 +456,36 @@ function Kt(r, ot) {
|
|
|
457
456
|
}
|
|
458
457
|
function _(c, v) {
|
|
459
458
|
var e, n, o;
|
|
460
|
-
(e = x.onMovingStart) == null || e.call(x),
|
|
461
|
-
const { top: p, left: R, right:
|
|
462
|
-
|
|
459
|
+
(e = x.onMovingStart) == null || e.call(x), u.current.moving = !0, u.current.startX = v.pageX, u.current.startY = v.pageY, u.current.direction = c;
|
|
460
|
+
const { top: p, left: R, right: S, bottom: t } = u.current.padding;
|
|
461
|
+
u.current.startWidth = i(
|
|
463
462
|
(n = h.current) == null ? void 0 : n.clientWidth,
|
|
464
|
-
R +
|
|
465
|
-
),
|
|
463
|
+
R + S
|
|
464
|
+
), u.current.startHeight = i(
|
|
466
465
|
(o = h.current) == null ? void 0 : o.clientHeight,
|
|
467
466
|
p + t
|
|
468
|
-
),
|
|
467
|
+
), y(window, "mousemove", L), y(window, "touchmove", L), y(window, "mouseup", W), y(window, "touchend", W), y(window, "contextmenu", W), H(
|
|
469
468
|
V(c) ? "row-resize" : "col-resize"
|
|
470
469
|
);
|
|
471
470
|
}
|
|
472
471
|
function L(c) {
|
|
473
472
|
var s;
|
|
474
|
-
if (!
|
|
475
|
-
const { startX: v, startY: p, startWidth: R, startHeight:
|
|
476
|
-
let t = R, e =
|
|
473
|
+
if (!u.current.moving) return !1;
|
|
474
|
+
const { startX: v, startY: p, startWidth: R, startHeight: S } = u.current;
|
|
475
|
+
let t = R, e = S;
|
|
477
476
|
const n = c.pageX - v, o = c.pageY - p;
|
|
478
|
-
switch (
|
|
479
|
-
case
|
|
477
|
+
switch (u.current.direction) {
|
|
478
|
+
case At:
|
|
480
479
|
t = R - n, tt(t);
|
|
481
480
|
break;
|
|
482
481
|
case pt:
|
|
483
482
|
t = R + n, tt(t);
|
|
484
483
|
break;
|
|
485
484
|
case xt:
|
|
486
|
-
e =
|
|
485
|
+
e = S - o, O(e);
|
|
487
486
|
break;
|
|
488
487
|
case Rt:
|
|
489
|
-
e =
|
|
488
|
+
e = S + o, O(e);
|
|
490
489
|
break;
|
|
491
490
|
}
|
|
492
491
|
(s = x.onMoving) == null || s.call(x, c, {
|
|
@@ -496,37 +495,37 @@ function Kt(r, ot) {
|
|
|
496
495
|
}
|
|
497
496
|
function W() {
|
|
498
497
|
var c;
|
|
499
|
-
|
|
498
|
+
u.current.moving = !1, G(), H(), (c = x.onMovingEnd) == null || c.call(x);
|
|
500
499
|
}
|
|
501
500
|
function G() {
|
|
502
|
-
|
|
501
|
+
$(window, "mousemove", L), $(window, "touchmove", L), $(window, "mouseup", W), $(window, "touchend", W), $(window, "contextmenu", W);
|
|
503
502
|
}
|
|
504
503
|
function j(c, v) {
|
|
505
|
-
const p = V(c), { contentRect: R } = v[0],
|
|
506
|
-
|
|
504
|
+
const p = V(c), { contentRect: R } = v[0], S = `${c.slice(0, 1).toUpperCase()}${c.slice(1)}`, t = R[p ? "height" : "width"];
|
|
505
|
+
u.current.padding[c] = t, E((e) => ({
|
|
507
506
|
...e,
|
|
508
|
-
[`padding${
|
|
507
|
+
[`padding${S}`]: t
|
|
509
508
|
}));
|
|
510
509
|
}
|
|
511
510
|
const Z = {
|
|
512
|
-
...
|
|
511
|
+
...b,
|
|
513
512
|
...K || {},
|
|
514
513
|
...vt(U) ? { width: U } : {},
|
|
515
514
|
...vt(w) ? { height: w } : {}
|
|
516
515
|
};
|
|
517
|
-
return /* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ ut(
|
|
518
517
|
X,
|
|
519
518
|
{
|
|
520
|
-
...
|
|
519
|
+
...Mt(N, ["onMovingStart", "onMoving", "onMovingEnd"]),
|
|
521
520
|
style: Z,
|
|
522
521
|
className: k,
|
|
523
522
|
ref: h,
|
|
524
523
|
children: [
|
|
525
524
|
rt,
|
|
526
|
-
|
|
527
|
-
if (
|
|
528
|
-
return /* @__PURE__ */
|
|
529
|
-
|
|
525
|
+
I.map((c) => {
|
|
526
|
+
if (jt.indexOf(c) !== -1)
|
|
527
|
+
return /* @__PURE__ */ g(
|
|
528
|
+
Nt,
|
|
530
529
|
{
|
|
531
530
|
className: `${l}-direction-${c}`,
|
|
532
531
|
direction: V(c) ? "horizontal" : "vertical",
|
|
@@ -537,7 +536,7 @@ function Kt(r, ot) {
|
|
|
537
536
|
onResize: (v) => {
|
|
538
537
|
j(c, v);
|
|
539
538
|
},
|
|
540
|
-
children:
|
|
539
|
+
children: M[c]
|
|
541
540
|
},
|
|
542
541
|
c
|
|
543
542
|
);
|
|
@@ -546,9 +545,9 @@ function Kt(r, ot) {
|
|
|
546
545
|
}
|
|
547
546
|
);
|
|
548
547
|
}
|
|
549
|
-
const
|
|
550
|
-
Ot.Split =
|
|
551
|
-
Ot.SplitGroup =
|
|
548
|
+
const Kt = Ct(Jt), Ot = Kt;
|
|
549
|
+
Ot.Split = Et;
|
|
550
|
+
Ot.SplitGroup = Ht;
|
|
552
551
|
Ot.displayName = "ResizeBox";
|
|
553
552
|
export {
|
|
554
553
|
Ot as default
|