@unicom-cloud/ui 0.8.55 → 0.8.57
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/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/{BC0PujUD.js → BMvZCjSU.js} +118 -120
- 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/CR4u270n.js +284 -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/CkAOsst1.js +73 -0
- package/chunk/{CTSIr-Pr.js → CwXmtKib.js} +89 -101
- package/chunk/{C3I_L73_.js → CwjaGytU.js} +39 -40
- package/chunk/{RRWbBHK-.js → D5p8q9Pa.js} +221 -221
- 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/{Niaq_og8.js → DMWMrXg1.js} +220 -226
- package/chunk/DPvnQJ-H.js +52 -0
- package/chunk/DQXq1QT0.js +58 -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/Dbk4DVhB.js +855 -0
- 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/{DbtCtriE.js → DxNRWF67.js} +30 -31
- package/chunk/HlP8inLK.js +1796 -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/{Dki1RB5p.js → aM2ePYrq.js} +154 -155
- 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/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/chunk/BdYAMaw9.js +0 -6
- 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
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as h, jsxs as et } from "react/jsx-runtime";
|
|
2
2
|
import ft from "lodash/isFunction";
|
|
3
3
|
import kt from "lodash/isPlainObject";
|
|
4
4
|
import F, { useContext as nt, useRef as j, useState as wt, useEffect as Y, useMemo as at, useCallback as ce, useImperativeHandle as le } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { b as mt, I as pt } from "./DUxWiN2U.js";
|
|
6
6
|
import se from "../hooks/useId.js";
|
|
7
7
|
import fe from "../hooks/useMergeProps.js";
|
|
8
8
|
import de from "../hooks/useMergeValue.js";
|
|
9
|
-
import M from "
|
|
9
|
+
import { y as M } from "./Do1aMgY3.js";
|
|
10
10
|
import dt from "../utils/omit.js";
|
|
11
|
-
import ue from "
|
|
11
|
+
import { I as ue } from "./B6fn5y_s.js";
|
|
12
12
|
import Tt from "lodash/isNumber";
|
|
13
13
|
import he from "lodash/throttle";
|
|
14
14
|
import { on as st, off as At } from "../utils/dom.js";
|
|
15
15
|
import { Enter as Yt } from "../utils/keyCode.js";
|
|
16
16
|
import { setTransformStyle as me } from "../utils/style.js";
|
|
17
|
-
import jt from "
|
|
17
|
+
import { I as jt } from "./1mEO29GP.js";
|
|
18
18
|
import Ut from "lodash/isNull";
|
|
19
19
|
import pe from "../Dropdown.js";
|
|
20
|
-
import { M as Mt } from "./
|
|
20
|
+
import { M as Mt } from "./BMvZCjSU.js";
|
|
21
21
|
import ge from "lodash/isEqualWith";
|
|
22
22
|
import be from "../utils/throttleByRaf.js";
|
|
23
|
-
import Et from "
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
|
|
27
|
-
function ye(e) {
|
|
23
|
+
import { I as Et, a as Bt } from "./D9TqtOhq.js";
|
|
24
|
+
import { I as ve } from "./C2fspJbE.js";
|
|
25
|
+
import { I as ye } from "./B45v5S9k.js";
|
|
26
|
+
function $e(e) {
|
|
28
27
|
const {
|
|
29
28
|
animation: r,
|
|
30
29
|
activeTab: o,
|
|
@@ -32,32 +31,32 @@ function ye(e) {
|
|
|
32
31
|
paneChildren: a,
|
|
33
32
|
direction: s,
|
|
34
33
|
lazyload: i,
|
|
35
|
-
destroyOnHide:
|
|
36
|
-
} = e,
|
|
34
|
+
destroyOnHide: $
|
|
35
|
+
} = e, m = a.findIndex((l) => l.key === o), v = nt(It), { rtl: w } = nt(mt);
|
|
37
36
|
if (a.every((l) => (l == null ? void 0 : l.props) && (!("children" in l.props) || l.props.children === null)))
|
|
38
37
|
return null;
|
|
39
38
|
const f = M(`${n}-content-inner`, {
|
|
40
39
|
[`${n}-animation`]: r
|
|
41
40
|
});
|
|
42
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ h("div", { className: `${n}-content ${n}-content-${s}`, children: /* @__PURE__ */ h(
|
|
43
42
|
"div",
|
|
44
43
|
{
|
|
45
44
|
className: f,
|
|
46
|
-
style: w ? { marginRight: `-${
|
|
45
|
+
style: w ? { marginRight: `-${m * 100}%` } : { marginLeft: `-${m * 100}%` },
|
|
47
46
|
children: a.map((l, x) => {
|
|
48
|
-
const { tabpane:
|
|
49
|
-
return /* @__PURE__ */
|
|
47
|
+
const { tabpane: u, tab: y } = v.getIdPrefix(x), d = "destroyOnHide" in l.props ? l.props.destroyOnHide : $, c = l.key === o;
|
|
48
|
+
return /* @__PURE__ */ h(
|
|
50
49
|
"div",
|
|
51
50
|
{
|
|
52
51
|
className: M(`${n}-content-item`, {
|
|
53
52
|
[`${n}-content-item-active`]: c
|
|
54
53
|
}),
|
|
55
54
|
role: "tabpanel",
|
|
56
|
-
id:
|
|
55
|
+
id: u,
|
|
57
56
|
"aria-hidden": c ? void 0 : !0,
|
|
58
57
|
tabIndex: c ? 0 : -1,
|
|
59
|
-
"aria-labelledby":
|
|
60
|
-
children:
|
|
58
|
+
"aria-labelledby": y,
|
|
59
|
+
children: m !== x && d ? null : F.cloneElement(l, {
|
|
61
60
|
lazyload: i,
|
|
62
61
|
isActive: c
|
|
63
62
|
})
|
|
@@ -69,12 +68,12 @@ function ye(e) {
|
|
|
69
68
|
) });
|
|
70
69
|
}
|
|
71
70
|
function Te(e, r) {
|
|
72
|
-
const o = j(!1), { getPrefixCls: n } = nt(mt), { children: a, className: s, style: i, lazyload:
|
|
73
|
-
return o.current =
|
|
71
|
+
const o = j(!1), { getPrefixCls: n } = nt(mt), { children: a, className: s, style: i, lazyload: $, isActive: m, ...v } = e, w = n("tabs");
|
|
72
|
+
return o.current = $ ? o.current || m : !0, o.current && /* @__PURE__ */ h(
|
|
74
73
|
"div",
|
|
75
74
|
{
|
|
76
75
|
ref: r,
|
|
77
|
-
...dt(
|
|
76
|
+
...dt(v, ["destroyOnHide", "title", "closable"]),
|
|
78
77
|
className: M(`${w}-pane`, s),
|
|
79
78
|
style: i,
|
|
80
79
|
children: a
|
|
@@ -106,18 +105,18 @@ function we(e) {
|
|
|
106
105
|
direction: s,
|
|
107
106
|
onScroll: i
|
|
108
107
|
} = e;
|
|
109
|
-
function
|
|
108
|
+
function $(d, c) {
|
|
110
109
|
let T = 0;
|
|
111
110
|
s === "vertical" ? T = o + c : T = n === "left" ? o + d : o - d, i == null || i(T);
|
|
112
111
|
}
|
|
113
|
-
const
|
|
114
|
-
function
|
|
112
|
+
const m = j("x");
|
|
113
|
+
function v(d) {
|
|
115
114
|
if (!a) return;
|
|
116
115
|
d.preventDefault();
|
|
117
116
|
const { deltaX: c, deltaY: T } = d;
|
|
118
|
-
let
|
|
119
|
-
const
|
|
120
|
-
|
|
117
|
+
let R = 0;
|
|
118
|
+
const N = Math.abs(c), P = Math.abs(T);
|
|
119
|
+
N === P ? R = m.current === "x" ? c : T : N > P ? (R = c, m.current = "x") : (R = T, m.current = "y"), $(R, R);
|
|
121
120
|
}
|
|
122
121
|
const w = j({
|
|
123
122
|
clientX: 0,
|
|
@@ -126,31 +125,31 @@ function we(e) {
|
|
|
126
125
|
d.cancelable && d.preventDefault();
|
|
127
126
|
const c = f(d);
|
|
128
127
|
if (!c) return;
|
|
129
|
-
const { clientX: T, clientY:
|
|
130
|
-
|
|
128
|
+
const { clientX: T, clientY: R } = w.current, N = c.clientX - T, P = c.clientY - R;
|
|
129
|
+
$(-N, -P);
|
|
131
130
|
}, x = () => {
|
|
132
131
|
At(document.documentElement, "touchmove", l), At(document.documentElement, "touchend", x);
|
|
133
|
-
},
|
|
132
|
+
}, u = (d) => {
|
|
134
133
|
if (!a) return;
|
|
135
134
|
const c = f(d);
|
|
136
135
|
c && (w.current = {
|
|
137
136
|
clientX: c.clientX,
|
|
138
137
|
clientY: c.clientY
|
|
139
138
|
}, st(document.documentElement, "touchmove", l, { passive: !1 }), st(window, "touchend", x, { passive: !1 }));
|
|
140
|
-
},
|
|
141
|
-
|
|
139
|
+
}, y = j(null);
|
|
140
|
+
y.current = { onWheel: v, onTouchStart: u }, Y(() => {
|
|
142
141
|
st(
|
|
143
142
|
r.current,
|
|
144
143
|
"wheel",
|
|
145
144
|
(d) => {
|
|
146
|
-
|
|
145
|
+
y.current.onWheel(d);
|
|
147
146
|
},
|
|
148
147
|
{ passive: !1 }
|
|
149
148
|
), st(
|
|
150
149
|
r.current,
|
|
151
150
|
"touchstart",
|
|
152
151
|
(d) => {
|
|
153
|
-
|
|
152
|
+
y.current.onTouchStart(d);
|
|
154
153
|
},
|
|
155
154
|
{ passive: !0 }
|
|
156
155
|
);
|
|
@@ -180,48 +179,48 @@ function ke(e) {
|
|
|
180
179
|
headerWrapperSize: a,
|
|
181
180
|
getTitleRef: s,
|
|
182
181
|
paneChildren: i,
|
|
183
|
-
direction:
|
|
184
|
-
icon:
|
|
185
|
-
} = e,
|
|
186
|
-
const
|
|
187
|
-
return
|
|
182
|
+
direction: $,
|
|
183
|
+
icon: m
|
|
184
|
+
} = e, v = i.map((u) => u.key), w = $ === "vertical" ? n.height : n.width, f = $ === "vertical" ? a.height : a.width, l = at(() => {
|
|
185
|
+
const u = {}, y = a.domRect;
|
|
186
|
+
return v.map((d) => {
|
|
188
187
|
const c = s(d);
|
|
189
188
|
if (!c) return;
|
|
190
189
|
const T = c.getBoundingClientRect();
|
|
191
|
-
|
|
192
|
-
left: T.left -
|
|
193
|
-
right: T.left -
|
|
194
|
-
top: T.top -
|
|
195
|
-
bottom: T.top -
|
|
190
|
+
u[d] = {
|
|
191
|
+
left: T.left - y.left,
|
|
192
|
+
right: T.left - y.left + T.width,
|
|
193
|
+
top: T.top - y.top,
|
|
194
|
+
bottom: T.top - y.top + T.height
|
|
196
195
|
};
|
|
197
|
-
}),
|
|
198
|
-
}, [
|
|
199
|
-
let
|
|
196
|
+
}), u;
|
|
197
|
+
}, [v.join(","), w, f]), x = at(() => {
|
|
198
|
+
let u = -1, y = -1;
|
|
200
199
|
for (const d in l) {
|
|
201
200
|
const { left: c, right: T } = l[d];
|
|
202
|
-
if (c >= o && T - o <= f &&
|
|
203
|
-
|
|
201
|
+
if (c >= o && T - o <= f && u === -1 && (u = v.indexOf(d), y = u), c >= o && T - o > f) {
|
|
202
|
+
y = v.indexOf(d);
|
|
204
203
|
break;
|
|
205
204
|
}
|
|
206
205
|
}
|
|
207
|
-
return [
|
|
208
|
-
}, [l,
|
|
209
|
-
return Ut(
|
|
206
|
+
return [u, y];
|
|
207
|
+
}, [l, v.join(","), o]);
|
|
208
|
+
return Ut(m) ? null : /* @__PURE__ */ h(
|
|
210
209
|
pe,
|
|
211
210
|
{
|
|
212
211
|
trigger: "click",
|
|
213
|
-
droplist: /* @__PURE__ */
|
|
214
|
-
if (
|
|
215
|
-
return /* @__PURE__ */
|
|
212
|
+
droplist: /* @__PURE__ */ h(Mt, { onClickMenuItem: e.onClickTab, children: i.map((u, y) => {
|
|
213
|
+
if (y < x[0] || y >= x[1])
|
|
214
|
+
return /* @__PURE__ */ h(Mt.Item, { disabled: u.disabled, children: u.props.title }, u.key);
|
|
216
215
|
}) }),
|
|
217
|
-
children: /* @__PURE__ */
|
|
216
|
+
children: /* @__PURE__ */ h(
|
|
218
217
|
pt,
|
|
219
218
|
{
|
|
220
219
|
role: "button",
|
|
221
220
|
"aria-label": "expand tabs",
|
|
222
221
|
prefix: `${r}-dropdown`,
|
|
223
222
|
className: `${r}-dropdown-icon`,
|
|
224
|
-
children:
|
|
223
|
+
children: m || /* @__PURE__ */ h(jt, {})
|
|
225
224
|
}
|
|
226
225
|
)
|
|
227
226
|
}
|
|
@@ -252,40 +251,41 @@ const Ce = (e, r, o) => {
|
|
|
252
251
|
getTitleRef: a,
|
|
253
252
|
activeTab: s,
|
|
254
253
|
getHeaderRef: i,
|
|
255
|
-
inkBarSize:
|
|
254
|
+
inkBarSize: $
|
|
256
255
|
}) => {
|
|
257
|
-
const
|
|
256
|
+
const m = j(), v = j();
|
|
258
257
|
return Y(() => {
|
|
259
258
|
const w = be(() => {
|
|
259
|
+
var x;
|
|
260
260
|
const f = a(s), l = Ce(
|
|
261
261
|
n,
|
|
262
262
|
f,
|
|
263
263
|
i("headerRef").current
|
|
264
264
|
);
|
|
265
|
-
l && !ge(
|
|
266
|
-
|
|
265
|
+
l && !ge(v.current, l) && (v.current = l, (x = m.current) != null && x.style && Object.keys(l).forEach((u) => {
|
|
266
|
+
m.current.style[u] = l[u];
|
|
267
267
|
}));
|
|
268
268
|
});
|
|
269
269
|
return w(), () => {
|
|
270
270
|
var f;
|
|
271
271
|
(f = w.cancel) == null || f.call(w);
|
|
272
272
|
};
|
|
273
|
-
}), /* @__PURE__ */
|
|
273
|
+
}), /* @__PURE__ */ h(
|
|
274
274
|
"div",
|
|
275
275
|
{
|
|
276
276
|
className: M(`${e}-header-ink`, {
|
|
277
277
|
[`${e}-header-ink-no-animation`]: !r,
|
|
278
278
|
[`${e}-header-ink-disabled`]: o,
|
|
279
|
-
[`${e}-header-ink-custom`]:
|
|
279
|
+
[`${e}-header-ink-custom`]: $
|
|
280
280
|
}),
|
|
281
|
-
ref:
|
|
282
|
-
children:
|
|
281
|
+
ref: m,
|
|
282
|
+
children: $ && /* @__PURE__ */ h("div", { style: $, className: `${e}-header-ink-inner` })
|
|
283
283
|
}
|
|
284
284
|
);
|
|
285
285
|
}, Pe = {
|
|
286
286
|
prev: "left",
|
|
287
287
|
next: "right"
|
|
288
|
-
},
|
|
288
|
+
}, Ie = {
|
|
289
289
|
prev: "up",
|
|
290
290
|
next: "down"
|
|
291
291
|
}, Lt = (e) => {
|
|
@@ -296,45 +296,45 @@ const Ce = (e, r, o) => {
|
|
|
296
296
|
prefixCls: a,
|
|
297
297
|
iconPos: s,
|
|
298
298
|
currentOffset: i,
|
|
299
|
-
align:
|
|
300
|
-
rtl:
|
|
301
|
-
icon:
|
|
302
|
-
} = e, { height: w, width: f } = n, { height: l, width: x } = o,
|
|
303
|
-
up: /* @__PURE__ */
|
|
304
|
-
down: /* @__PURE__ */
|
|
305
|
-
left:
|
|
306
|
-
right:
|
|
299
|
+
align: $,
|
|
300
|
+
rtl: m,
|
|
301
|
+
icon: v
|
|
302
|
+
} = e, { height: w, width: f } = n, { height: l, width: x } = o, u = l - w, y = x - f, d = {
|
|
303
|
+
up: /* @__PURE__ */ h(ve, {}),
|
|
304
|
+
down: /* @__PURE__ */ h(jt, {}),
|
|
305
|
+
left: m ? /* @__PURE__ */ h(Et, {}) : /* @__PURE__ */ h(Bt, {}),
|
|
306
|
+
right: m ? /* @__PURE__ */ h(Bt, {}) : /* @__PURE__ */ h(Et, {})
|
|
307
307
|
}, c = (H) => {
|
|
308
|
-
var
|
|
309
|
-
H !== e.currentOffset && ((
|
|
310
|
-
}, T = (H,
|
|
308
|
+
var p;
|
|
309
|
+
H !== e.currentOffset && ((p = e == null ? void 0 : e.onChange) == null || p.call(e, H));
|
|
310
|
+
}, T = (H, p) => {
|
|
311
311
|
H.preventDefault();
|
|
312
312
|
let C;
|
|
313
|
-
|
|
314
|
-
},
|
|
313
|
+
$ === "left" ? C = p === "left" ? i - f : i + f : C = p === "left" ? i + f : i - f, c(C);
|
|
314
|
+
}, R = (H, p) => {
|
|
315
315
|
H.preventDefault();
|
|
316
316
|
let C;
|
|
317
|
-
if (
|
|
317
|
+
if (p === "up")
|
|
318
318
|
C = i - w;
|
|
319
319
|
else if (C = i + w, C >= l) return;
|
|
320
320
|
c(C);
|
|
321
|
-
},
|
|
322
|
-
if (Ut(
|
|
321
|
+
}, N = at(() => $ === "left" ? i <= 0 : r === "vertical" ? i >= u : i >= y, [$, r, i, y, i]), P = at(() => $ === "left" ? r === "vertical" ? i >= u : i >= y : i <= 0, [$, r, u, y, i]);
|
|
322
|
+
if (Ut(v))
|
|
323
323
|
return null;
|
|
324
|
-
const E = r === "horizontal" ? Pe[s] :
|
|
324
|
+
const E = r === "horizontal" ? Pe[s] : Ie[s], K = s === "prev" ? N : P, _ = M(`${a}-${E}-icon`, {
|
|
325
325
|
[`${a}-nav-icon-disabled`]: K
|
|
326
|
-
}), U = r === "vertical" ?
|
|
327
|
-
return /* @__PURE__ */
|
|
326
|
+
}), U = r === "vertical" ? R : T;
|
|
327
|
+
return /* @__PURE__ */ h(
|
|
328
328
|
pt,
|
|
329
329
|
{
|
|
330
330
|
disabled: K,
|
|
331
331
|
className: _,
|
|
332
332
|
prefix: a,
|
|
333
333
|
onClick: (H) => U(H, E),
|
|
334
|
-
children:
|
|
334
|
+
children: v || d[E]
|
|
335
335
|
}
|
|
336
336
|
);
|
|
337
|
-
},
|
|
337
|
+
}, Re = ({
|
|
338
338
|
prefixCls: e,
|
|
339
339
|
onDeleteTab: r,
|
|
340
340
|
tabKey: o,
|
|
@@ -342,26 +342,26 @@ const Ce = (e, r, o) => {
|
|
|
342
342
|
onClickTab: a,
|
|
343
343
|
disabled: s = !1,
|
|
344
344
|
title: i,
|
|
345
|
-
editable:
|
|
346
|
-
renderTitle:
|
|
347
|
-
deleteIcon:
|
|
345
|
+
editable: $,
|
|
346
|
+
renderTitle: m,
|
|
347
|
+
deleteIcon: v,
|
|
348
348
|
deleteButton: w,
|
|
349
349
|
getIdPrefix: f,
|
|
350
350
|
index: l
|
|
351
351
|
}, x) => {
|
|
352
|
-
const
|
|
352
|
+
const u = ft(m) ? m : (c) => c, y = (c) => {
|
|
353
353
|
c.stopPropagation(), !s && r();
|
|
354
354
|
}, d = (c) => {
|
|
355
355
|
s || a(c);
|
|
356
356
|
};
|
|
357
|
-
return
|
|
357
|
+
return u(
|
|
358
358
|
/* @__PURE__ */ et(
|
|
359
359
|
"div",
|
|
360
360
|
{
|
|
361
361
|
ref: x,
|
|
362
362
|
className: M(`${e}-header-title`, {
|
|
363
363
|
[`${e}-header-title-active`]: n,
|
|
364
|
-
[`${e}-header-title-editable`]:
|
|
364
|
+
[`${e}-header-title-editable`]: $,
|
|
365
365
|
[`${e}-header-title-disabled`]: s
|
|
366
366
|
}),
|
|
367
367
|
role: "tab",
|
|
@@ -375,8 +375,8 @@ const Ce = (e, r, o) => {
|
|
|
375
375
|
c.key === Yt.key && d(c);
|
|
376
376
|
},
|
|
377
377
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
|
|
378
|
+
/* @__PURE__ */ h("span", { className: `${e}-header-title-text`, children: i }),
|
|
379
|
+
$ && /* @__PURE__ */ h(
|
|
380
380
|
"span",
|
|
381
381
|
{
|
|
382
382
|
role: "button",
|
|
@@ -384,9 +384,9 @@ const Ce = (e, r, o) => {
|
|
|
384
384
|
"aria-disabled": s || void 0,
|
|
385
385
|
tabIndex: s ? -1 : 0,
|
|
386
386
|
className: `${e}-close-icon`,
|
|
387
|
-
...zt({ onPressEnter:
|
|
388
|
-
onClick:
|
|
389
|
-
children: w || /* @__PURE__ */
|
|
387
|
+
...zt({ onPressEnter: y }),
|
|
388
|
+
onClick: y,
|
|
389
|
+
children: w || /* @__PURE__ */ h(pt, { prefix: e, children: v || /* @__PURE__ */ h(ye, {}) })
|
|
390
390
|
}
|
|
391
391
|
)
|
|
392
392
|
]
|
|
@@ -397,10 +397,10 @@ const Ce = (e, r, o) => {
|
|
|
397
397
|
key: o,
|
|
398
398
|
isActive: n,
|
|
399
399
|
disabled: s,
|
|
400
|
-
editable:
|
|
400
|
+
editable: $
|
|
401
401
|
}
|
|
402
402
|
);
|
|
403
|
-
},
|
|
403
|
+
}, Ne = F.forwardRef(Re), Pt = "vertical", ut = "right", ht = "left", Xt = {
|
|
404
404
|
delete: !0,
|
|
405
405
|
add: !0
|
|
406
406
|
}, He = ({
|
|
@@ -419,10 +419,10 @@ const Ce = (e, r, o) => {
|
|
|
419
419
|
const a = St(o, n);
|
|
420
420
|
return e === Pt ? -a.top : r === ut ? a.right : -a.left;
|
|
421
421
|
}, xt = F.forwardRef((e, r) => {
|
|
422
|
-
const o = nt(
|
|
422
|
+
const o = nt(It), { rtl: n } = nt(mt), a = { ...e, ...o }, [s, i, $] = it(), [m, v, w] = it(), [f, l, x] = it(), [u, y, d] = it(), [c, T, R] = it(), N = j({}), [P, E] = wt(0), [K, _] = wt(!0), {
|
|
423
423
|
paneChildren: U,
|
|
424
424
|
editable: H,
|
|
425
|
-
prefixCls:
|
|
425
|
+
prefixCls: p,
|
|
426
426
|
onAddTab: C,
|
|
427
427
|
direction: S,
|
|
428
428
|
type: D = "line",
|
|
@@ -433,23 +433,23 @@ const Ce = (e, r, o) => {
|
|
|
433
433
|
style: Ft,
|
|
434
434
|
tabPosition: Gt,
|
|
435
435
|
className: qt,
|
|
436
|
-
extra:
|
|
436
|
+
extra: Rt,
|
|
437
437
|
animation: Jt,
|
|
438
|
-
icons:
|
|
438
|
+
icons: I,
|
|
439
439
|
deleteButton: Qt,
|
|
440
440
|
addButton: Zt,
|
|
441
441
|
renderTabTitle: te,
|
|
442
|
-
scrollAfterEdit:
|
|
442
|
+
scrollAfterEdit: Nt,
|
|
443
443
|
scrollPosition: B = "auto",
|
|
444
444
|
inkBarSize: ee
|
|
445
|
-
} = a, Ht = kt(
|
|
446
|
-
const t = l.height -
|
|
447
|
-
return a.direction === "vertical" ? t <
|
|
445
|
+
} = a, Ht = kt(Nt) ? { ...Xt, ...Nt } : Xt, [ne, oe] = n ? [ut, ht] : [ht, ut], G = D === "capsule" ? oe : ne, z = at(() => {
|
|
446
|
+
const t = l.height - y.height - T.height, g = l.width - y.width - T.width;
|
|
447
|
+
return a.direction === "vertical" ? t < v.height : g < v.width;
|
|
448
448
|
}, [
|
|
449
449
|
a.direction,
|
|
450
450
|
l,
|
|
451
|
-
|
|
452
|
-
|
|
451
|
+
y,
|
|
452
|
+
v,
|
|
453
453
|
T
|
|
454
454
|
]), re = () => {
|
|
455
455
|
if (f.current) {
|
|
@@ -459,41 +459,41 @@ const Ce = (e, r, o) => {
|
|
|
459
459
|
width: t.offsetWidth
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
|
-
}, ct = (t) => he((
|
|
462
|
+
}, ct = (t) => he((g) => {
|
|
463
463
|
re();
|
|
464
|
-
const
|
|
465
|
-
|
|
466
|
-
height:
|
|
467
|
-
width:
|
|
468
|
-
domRect:
|
|
464
|
+
const b = g[0] && g[0].target;
|
|
465
|
+
b && t({
|
|
466
|
+
height: b.offsetHeight,
|
|
467
|
+
width: b.offsetWidth,
|
|
468
|
+
domRect: b.getBoundingClientRect()
|
|
469
469
|
});
|
|
470
|
-
}, 200), q = ct(
|
|
470
|
+
}, 200), q = ct($), J = ct(w), Q = ct(d), Z = ct(R), gt = ce(
|
|
471
471
|
(t) => {
|
|
472
|
-
const
|
|
473
|
-
let
|
|
474
|
-
return
|
|
472
|
+
const g = S === Pt ? v.height - i.height : v.width - i.width;
|
|
473
|
+
let b = t;
|
|
474
|
+
return b = Math.min(g, b), b = Math.max(b, 0), b;
|
|
475
475
|
},
|
|
476
|
-
[S,
|
|
476
|
+
[S, v, i]
|
|
477
477
|
), bt = (t) => {
|
|
478
|
-
const
|
|
479
|
-
|
|
478
|
+
const g = gt(t);
|
|
479
|
+
g !== P && E(g);
|
|
480
480
|
};
|
|
481
481
|
Y(() => () => {
|
|
482
|
-
var t,
|
|
483
|
-
(t = J == null ? void 0 : J.cancel) == null || t.call(J), (
|
|
482
|
+
var t, g, b, k;
|
|
483
|
+
(t = J == null ? void 0 : J.cancel) == null || t.call(J), (g = q == null ? void 0 : q.cancel) == null || g.call(q), (b = Q == null ? void 0 : Q.cancel) == null || b.call(Q), (k = Z == null ? void 0 : Z.cancel) == null || k.call(Z);
|
|
484
484
|
}, []), Y(() => {
|
|
485
485
|
if (!K) {
|
|
486
486
|
_(!0);
|
|
487
487
|
return;
|
|
488
488
|
}
|
|
489
489
|
const t = () => {
|
|
490
|
-
const
|
|
491
|
-
if (!
|
|
490
|
+
const b = N.current[ot];
|
|
491
|
+
if (!b || !z)
|
|
492
492
|
return 0;
|
|
493
|
-
const k = St(
|
|
493
|
+
const k = St(b, s.current), L = De({
|
|
494
494
|
direction: S,
|
|
495
495
|
align: G,
|
|
496
|
-
headerDom:
|
|
496
|
+
headerDom: m.current,
|
|
497
497
|
headerWrapperDom: s.current
|
|
498
498
|
});
|
|
499
499
|
if (S === "vertical") {
|
|
@@ -507,12 +507,12 @@ const Ce = (e, r, o) => {
|
|
|
507
507
|
return B === "auto" && (A = k.left < 0 ? "start" : k.right > 0 ? "end" : B), A === "start" ? V = X : A === "end" ? V = W : A === "center" ? V = X + (k.left - k.right) / 2 : Tt(A) && (V = Math.min(X + A, W)), V;
|
|
508
508
|
}
|
|
509
509
|
let rt = L, tt = B;
|
|
510
|
-
const
|
|
511
|
-
return B === "auto" && (tt = k.left < 0 ? "start" : k.right > 0 ? "end" : B), tt === "start" ? rt =
|
|
510
|
+
const $t = L + k.left, Wt = L + k.right;
|
|
511
|
+
return B === "auto" && (tt = k.left < 0 ? "start" : k.right > 0 ? "end" : B), tt === "start" ? rt = $t : tt === "end" ? rt = Wt : tt === "center" ? rt = $t - (k.left - k.right) / 2 : Tt(tt) && (rt = Math.max($t - tt, Wt)), rt;
|
|
512
512
|
};
|
|
513
513
|
xe(s.current, S);
|
|
514
|
-
let
|
|
515
|
-
|
|
514
|
+
let g = t();
|
|
515
|
+
g = gt(g), E(g);
|
|
516
516
|
}, [
|
|
517
517
|
ot,
|
|
518
518
|
S,
|
|
@@ -526,48 +526,48 @@ const Ce = (e, r, o) => {
|
|
|
526
526
|
direction: S,
|
|
527
527
|
align: G,
|
|
528
528
|
headerOffset: P
|
|
529
|
-
}), vt = z && O === "dropdown" && S !== "vertical",
|
|
530
|
-
var
|
|
531
|
-
(
|
|
529
|
+
}), vt = z && O === "dropdown" && S !== "vertical", yt = z && !vt, lt = H && (D === "card" || D === "card-gutter" || D === "line"), ae = (t) => {
|
|
530
|
+
var g;
|
|
531
|
+
(g = a.onDeleteTab) == null || g.call(a, t.key), _(Ht.delete);
|
|
532
532
|
}, Dt = () => {
|
|
533
533
|
C == null || C(), _(Ht.add);
|
|
534
534
|
};
|
|
535
535
|
Y(() => {
|
|
536
536
|
let t;
|
|
537
537
|
return c.current && (t = new ResizeObserver(Z), t.observe(c.current)), () => {
|
|
538
|
-
var
|
|
539
|
-
c.current && ((
|
|
538
|
+
var g, b;
|
|
539
|
+
c.current && ((g = t == null ? void 0 : t.unobserve) == null || g.call(t, c.current)), (b = t == null ? void 0 : t.disconnect) == null || b.call(t), t = null;
|
|
540
540
|
};
|
|
541
541
|
}, [c.current]), Y(() => {
|
|
542
542
|
let t;
|
|
543
543
|
return s.current && (t = new ResizeObserver(q), t.observe(s.current)), () => {
|
|
544
|
-
var
|
|
545
|
-
s.current && ((
|
|
544
|
+
var g, b;
|
|
545
|
+
s.current && ((g = t == null ? void 0 : t.unobserve) == null || g.call(t, s.current)), (b = t == null ? void 0 : t.disconnect) == null || b.call(t), t = null;
|
|
546
546
|
};
|
|
547
547
|
}, [s.current]), Y(() => {
|
|
548
548
|
let t;
|
|
549
|
-
return
|
|
550
|
-
var
|
|
551
|
-
|
|
549
|
+
return m.current && (t = new ResizeObserver(J), t.observe(m.current)), () => {
|
|
550
|
+
var g, b;
|
|
551
|
+
m.current && ((g = t == null ? void 0 : t.unobserve) == null || g.call(t, m.current)), (b = t == null ? void 0 : t.disconnect) == null || b.call(t), t = null;
|
|
552
552
|
};
|
|
553
|
-
}, [
|
|
553
|
+
}, [m.current]), Y(() => {
|
|
554
554
|
let t;
|
|
555
|
-
return
|
|
556
|
-
var
|
|
557
|
-
|
|
555
|
+
return u.current && (t = new ResizeObserver(Q), t.observe(u.current)), () => {
|
|
556
|
+
var g, b;
|
|
557
|
+
u.current && ((g = t == null ? void 0 : t.unobserve) == null || g.call(t, u.current)), (b = t == null ? void 0 : t.disconnect) == null || b.call(t), t = null;
|
|
558
558
|
};
|
|
559
|
-
}, [
|
|
560
|
-
const Ot = (t) => t && Kt && /* @__PURE__ */
|
|
559
|
+
}, [u.current]);
|
|
560
|
+
const Ot = (t) => t && Kt && /* @__PURE__ */ h(
|
|
561
561
|
"div",
|
|
562
562
|
{
|
|
563
|
-
className: `${
|
|
563
|
+
className: `${p}-add-icon`,
|
|
564
564
|
"aria-label": "add tab",
|
|
565
565
|
tabIndex: 0,
|
|
566
566
|
role: "button",
|
|
567
567
|
ref: c,
|
|
568
568
|
onClick: Dt,
|
|
569
569
|
...zt({ onPressEnter: Dt }),
|
|
570
|
-
children: Zt || /* @__PURE__ */
|
|
570
|
+
children: Zt || /* @__PURE__ */ h(pt, { prefix: `${p}-add`, children: /* @__PURE__ */ h("span", { className: `${p}-add`, children: (I == null ? void 0 : I.add) || /* @__PURE__ */ h(ue, {}) }) })
|
|
571
571
|
}
|
|
572
572
|
);
|
|
573
573
|
return we({
|
|
@@ -579,16 +579,16 @@ const Ce = (e, r, o) => {
|
|
|
579
579
|
onScroll(t) {
|
|
580
580
|
bt(t);
|
|
581
581
|
}
|
|
582
|
-
}), /* @__PURE__ */
|
|
582
|
+
}), /* @__PURE__ */ h(
|
|
583
583
|
"div",
|
|
584
584
|
{
|
|
585
585
|
className: M(
|
|
586
|
-
`${
|
|
587
|
-
`${
|
|
588
|
-
`${
|
|
589
|
-
`${
|
|
590
|
-
`${
|
|
591
|
-
{ [`${
|
|
586
|
+
`${p}-header-nav`,
|
|
587
|
+
`${p}-header-nav-${S}`,
|
|
588
|
+
`${p}-header-nav-${Gt}`,
|
|
589
|
+
`${p}-header-size-${_t}`,
|
|
590
|
+
`${p}-header-nav-${D}`,
|
|
591
|
+
{ [`${p}-header-nav-sticky`]: a.headerSticky },
|
|
592
592
|
// 潘启宝添加
|
|
593
593
|
qt
|
|
594
594
|
),
|
|
@@ -597,73 +597,73 @@ const Ce = (e, r, o) => {
|
|
|
597
597
|
children: /* @__PURE__ */ et(
|
|
598
598
|
"div",
|
|
599
599
|
{
|
|
600
|
-
className: M(`${
|
|
601
|
-
[`${
|
|
602
|
-
[`${
|
|
600
|
+
className: M(`${p}-header-scroll`, {
|
|
601
|
+
[`${p}-header-overflow-scroll`]: yt,
|
|
602
|
+
[`${p}-header-overflow-dropdown`]: vt
|
|
603
603
|
}),
|
|
604
604
|
ref: f,
|
|
605
605
|
children: [
|
|
606
|
-
|
|
606
|
+
yt && /* @__PURE__ */ h(
|
|
607
607
|
Lt,
|
|
608
608
|
{
|
|
609
609
|
iconPos: "prev",
|
|
610
610
|
rtl: n,
|
|
611
|
-
icon:
|
|
612
|
-
prefixCls:
|
|
611
|
+
icon: I == null ? void 0 : I.prev,
|
|
612
|
+
prefixCls: p,
|
|
613
613
|
currentOffset: P,
|
|
614
|
-
headerSize:
|
|
614
|
+
headerSize: v,
|
|
615
615
|
headerWrapperSize: i,
|
|
616
616
|
direction: S,
|
|
617
617
|
align: G,
|
|
618
618
|
onChange: bt
|
|
619
619
|
}
|
|
620
620
|
),
|
|
621
|
-
/* @__PURE__ */ et("div", { className: `${
|
|
621
|
+
/* @__PURE__ */ et("div", { className: `${p}-header-wrapper`, ref: s, children: [
|
|
622
622
|
/* @__PURE__ */ et(
|
|
623
623
|
"div",
|
|
624
624
|
{
|
|
625
|
-
className: M(`${
|
|
626
|
-
[`${
|
|
625
|
+
className: M(`${p}-header`, {
|
|
626
|
+
[`${p}-header-no-padding`]: !e.headerPadding && S === "horizontal" && ["line", "text"].indexOf(D) > -1
|
|
627
627
|
}),
|
|
628
|
-
ref:
|
|
628
|
+
ref: m,
|
|
629
629
|
style: ie,
|
|
630
630
|
children: [
|
|
631
|
-
U.map((t,
|
|
632
|
-
|
|
631
|
+
U.map((t, g) => /* @__PURE__ */ h(
|
|
632
|
+
Ne,
|
|
633
633
|
{
|
|
634
|
-
ref: (
|
|
635
|
-
|
|
634
|
+
ref: (b) => {
|
|
635
|
+
N.current[t.key] = b;
|
|
636
636
|
},
|
|
637
637
|
tabKey: t.key,
|
|
638
638
|
...t.props,
|
|
639
|
-
prefixCls:
|
|
639
|
+
prefixCls: p,
|
|
640
640
|
onDeleteTab: () => ae(t),
|
|
641
641
|
renderTitle: e.children || te,
|
|
642
642
|
onClickTab: () => {
|
|
643
|
-
var
|
|
644
|
-
(
|
|
643
|
+
var b;
|
|
644
|
+
(b = a.onClickTab) == null || b.call(a, t.key);
|
|
645
645
|
},
|
|
646
646
|
isActive: ot === t.key,
|
|
647
647
|
editable: lt && t.props.closable !== !1,
|
|
648
|
-
deleteIcon:
|
|
648
|
+
deleteIcon: I == null ? void 0 : I.delete,
|
|
649
649
|
deleteButton: Qt,
|
|
650
650
|
getIdPrefix: o.getIdPrefix,
|
|
651
|
-
index:
|
|
651
|
+
index: g
|
|
652
652
|
},
|
|
653
|
-
|
|
653
|
+
g
|
|
654
654
|
)),
|
|
655
|
-
D === "line" && /* @__PURE__ */
|
|
655
|
+
D === "line" && /* @__PURE__ */ h(
|
|
656
656
|
Se,
|
|
657
657
|
{
|
|
658
658
|
disabled: !!U.find(
|
|
659
659
|
(t) => t && t.props && t.props.disabled && t.key === ot
|
|
660
660
|
),
|
|
661
|
-
prefixCls:
|
|
661
|
+
prefixCls: p,
|
|
662
662
|
animation: Jt,
|
|
663
663
|
direction: S,
|
|
664
|
-
getTitleRef: (t) =>
|
|
664
|
+
getTitleRef: (t) => N.current[t],
|
|
665
665
|
activeTab: ot,
|
|
666
|
-
getHeaderRef: () =>
|
|
666
|
+
getHeaderRef: () => m,
|
|
667
667
|
inkBarSize: ee
|
|
668
668
|
}
|
|
669
669
|
)
|
|
@@ -672,38 +672,38 @@ const Ce = (e, r, o) => {
|
|
|
672
672
|
),
|
|
673
673
|
!z && Ot(lt)
|
|
674
674
|
] }),
|
|
675
|
-
|
|
675
|
+
yt && /* @__PURE__ */ h(
|
|
676
676
|
Lt,
|
|
677
677
|
{
|
|
678
|
-
prefixCls:
|
|
678
|
+
prefixCls: p,
|
|
679
679
|
rtl: n,
|
|
680
680
|
iconPos: "next",
|
|
681
|
-
icon:
|
|
681
|
+
icon: I == null ? void 0 : I.next,
|
|
682
682
|
currentOffset: P,
|
|
683
|
-
headerSize:
|
|
683
|
+
headerSize: v,
|
|
684
684
|
headerWrapperSize: i,
|
|
685
685
|
direction: S,
|
|
686
686
|
align: G,
|
|
687
687
|
onChange: bt
|
|
688
688
|
}
|
|
689
689
|
),
|
|
690
|
-
vt && /* @__PURE__ */
|
|
690
|
+
vt && /* @__PURE__ */ h(
|
|
691
691
|
ke,
|
|
692
692
|
{
|
|
693
693
|
onClickTab: a.onClickTab,
|
|
694
694
|
paneChildren: U,
|
|
695
|
-
prefixCls:
|
|
695
|
+
prefixCls: p,
|
|
696
696
|
currentOffset: P,
|
|
697
|
-
headerSize:
|
|
698
|
-
icon:
|
|
697
|
+
headerSize: v,
|
|
698
|
+
icon: I == null ? void 0 : I.dropdown,
|
|
699
699
|
headerWrapperSize: i,
|
|
700
|
-
getTitleRef: (t) =>
|
|
700
|
+
getTitleRef: (t) => N.current[t],
|
|
701
701
|
direction: S
|
|
702
702
|
}
|
|
703
703
|
),
|
|
704
|
-
(lt && z ||
|
|
704
|
+
(lt && z || Rt) && /* @__PURE__ */ et("div", { className: `${p}-header-extra`, ref: u, children: [
|
|
705
705
|
z && Ot(lt),
|
|
706
|
-
|
|
706
|
+
Rt
|
|
707
707
|
] })
|
|
708
708
|
]
|
|
709
709
|
}
|
|
@@ -728,7 +728,7 @@ const Oe = ["mini", "small", "default", "large"], We = (e) => {
|
|
|
728
728
|
lazyload: !0,
|
|
729
729
|
headerPadding: !0,
|
|
730
730
|
scrollPosition: "auto"
|
|
731
|
-
},
|
|
731
|
+
}, It = F.createContext({});
|
|
732
732
|
function Ee(e, r) {
|
|
733
733
|
const {
|
|
734
734
|
getPrefixCls: o,
|
|
@@ -739,21 +739,21 @@ function Ee(e, r) {
|
|
|
739
739
|
e,
|
|
740
740
|
Me,
|
|
741
741
|
a == null ? void 0 : a.Tabs
|
|
742
|
-
),
|
|
743
|
-
|
|
742
|
+
), $ = We(i), m = j(null), [v, w] = de(
|
|
743
|
+
$[0] && $[0].key,
|
|
744
744
|
{
|
|
745
745
|
defaultValue: "defaultActiveTab" in i ? i.defaultActiveTab : void 0,
|
|
746
746
|
value: "activeTab" in i ? i.activeTab : void 0
|
|
747
747
|
}
|
|
748
748
|
), f = o("tabs"), l = i.size || (Oe.indexOf(n) > -1 ? n : "default"), {
|
|
749
749
|
animation: x,
|
|
750
|
-
className:
|
|
751
|
-
direction:
|
|
750
|
+
className: u,
|
|
751
|
+
direction: y,
|
|
752
752
|
style: d,
|
|
753
753
|
type: c,
|
|
754
754
|
justify: T,
|
|
755
|
-
destroyOnHide:
|
|
756
|
-
lazyload:
|
|
755
|
+
destroyOnHide: R,
|
|
756
|
+
lazyload: N,
|
|
757
757
|
headerSticky: P,
|
|
758
758
|
// 潘启宝添加
|
|
759
759
|
onChange: E,
|
|
@@ -761,32 +761,32 @@ function Ee(e, r) {
|
|
|
761
761
|
onDeleteTab: _,
|
|
762
762
|
renderTabHeader: U,
|
|
763
763
|
...H
|
|
764
|
-
} = i,
|
|
764
|
+
} = i, p = se(`${f}-`), C = y === "vertical" ? "left" : i.tabPosition, S = {
|
|
765
765
|
animation: kt(x) && "inkBar" in x ? x.inkBar : !0,
|
|
766
|
-
activeTab:
|
|
766
|
+
activeTab: v,
|
|
767
767
|
tabPosition: C,
|
|
768
768
|
direction: ["left", "right"].indexOf(C) > -1 ? "vertical" : "horizontal",
|
|
769
|
-
paneChildren:
|
|
769
|
+
paneChildren: $,
|
|
770
770
|
onClickTab: (O) => {
|
|
771
|
-
ft(K) && K(O), O !==
|
|
771
|
+
ft(K) && K(O), O !== v && ("activeTab" in i || w(O), ft(E) && E(O));
|
|
772
772
|
},
|
|
773
773
|
onDeleteTab: _,
|
|
774
774
|
prefixCls: f
|
|
775
775
|
};
|
|
776
|
-
le(r, () =>
|
|
777
|
-
const D = /* @__PURE__ */
|
|
778
|
-
|
|
776
|
+
le(r, () => m, []);
|
|
777
|
+
const D = /* @__PURE__ */ h(
|
|
778
|
+
$e,
|
|
779
779
|
{
|
|
780
780
|
direction: ["left", "right"].indexOf(C) > -1 ? "vertical" : "horizontal",
|
|
781
781
|
animation: Ae(i),
|
|
782
|
-
activeTab:
|
|
783
|
-
paneChildren:
|
|
782
|
+
activeTab: v,
|
|
783
|
+
paneChildren: $,
|
|
784
784
|
prefixCls: f,
|
|
785
|
-
destroyOnHide:
|
|
786
|
-
lazyload:
|
|
785
|
+
destroyOnHide: R,
|
|
786
|
+
lazyload: N
|
|
787
787
|
}
|
|
788
788
|
);
|
|
789
|
-
return /* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ h(
|
|
790
790
|
"div",
|
|
791
791
|
{
|
|
792
792
|
...dt(H, [
|
|
@@ -822,17 +822,17 @@ function Ee(e, r) {
|
|
|
822
822
|
[`${f}-justify`]: T,
|
|
823
823
|
[`${f}-rtl`]: s
|
|
824
824
|
},
|
|
825
|
-
|
|
825
|
+
u
|
|
826
826
|
),
|
|
827
|
-
ref:
|
|
827
|
+
ref: m,
|
|
828
828
|
children: /* @__PURE__ */ et(
|
|
829
|
-
|
|
829
|
+
It.Provider,
|
|
830
830
|
{
|
|
831
831
|
value: {
|
|
832
832
|
...S,
|
|
833
833
|
getIdPrefix: (O) => ({
|
|
834
|
-
tab:
|
|
835
|
-
tabpane:
|
|
834
|
+
tab: p && `${p}-tab-${O}`,
|
|
835
|
+
tabpane: p && `${p}-panel-${O}`
|
|
836
836
|
})
|
|
837
837
|
},
|
|
838
838
|
children: [
|
|
@@ -844,7 +844,7 @@ function Ee(e, r) {
|
|
|
844
844
|
...S
|
|
845
845
|
},
|
|
846
846
|
xt
|
|
847
|
-
) : /* @__PURE__ */
|
|
847
|
+
) : /* @__PURE__ */ h(
|
|
848
848
|
xt,
|
|
849
849
|
{
|
|
850
850
|
...dt(i, ["children", "style", "className"]),
|