@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
|
@@ -1,23 +1,42 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import U from "@unicom-cloud/utils/dom-helpers/addClass";
|
|
3
2
|
import o from "prop-types";
|
|
4
|
-
import I from "
|
|
5
|
-
import d, { Children as _, isValidElement as O, cloneElement as N, useRef as w, useMemo as G } from "react";
|
|
3
|
+
import c, { Children as I, isValidElement as O, cloneElement as S, useRef as j, useMemo as _ } from "react";
|
|
6
4
|
import y from "react-dom";
|
|
7
|
-
import { supportRef as
|
|
8
|
-
import { findDOMNode as
|
|
9
|
-
const
|
|
5
|
+
import { supportRef as G } from "../utils/is.js";
|
|
6
|
+
import { findDOMNode as W, callbackOriginRef as X } from "../utils/reactDOM.js";
|
|
7
|
+
const w = {
|
|
10
8
|
disabled: !1
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
};
|
|
10
|
+
function H(n, e) {
|
|
11
|
+
return n.classList ? !!e && n.classList.contains(e) : (" " + (n.className.baseVal || n.className) + " ").indexOf(
|
|
12
|
+
" " + e + " "
|
|
13
|
+
) !== -1;
|
|
14
|
+
}
|
|
15
|
+
function K(n, e) {
|
|
16
|
+
n.classList ? n.classList.add(e) : H(n, e) || (typeof n.className == "string" ? n.className = n.className + " " + e : n.setAttribute("class", (n.className && n.className.baseVal || "") + " " + e));
|
|
17
|
+
}
|
|
18
|
+
function q(n, e) {
|
|
19
|
+
return n.replace(new RegExp("(^|\\s)" + e + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
20
|
+
}
|
|
21
|
+
function z(n, e) {
|
|
22
|
+
n.classList ? n.classList.remove(e) : typeof n.className == "string" ? n.className = q(n.className, e) : n.setAttribute(
|
|
23
|
+
"class",
|
|
24
|
+
q(
|
|
25
|
+
n.className && n.className.baseVal || "",
|
|
26
|
+
e
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
const R = c.createContext(null);
|
|
31
|
+
var B = Object.defineProperty, J = (n, e, t) => e in n ? B(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Q = (n, e, t) => J(n, e + "", t);
|
|
32
|
+
const Y = process.env.NODE_ENV !== "production" ? o.oneOfType([
|
|
14
33
|
o.number,
|
|
15
34
|
o.shape({
|
|
16
35
|
enter: o.number,
|
|
17
36
|
exit: o.number,
|
|
18
37
|
appear: o.number
|
|
19
38
|
}).isRequired
|
|
20
|
-
]) : null,
|
|
39
|
+
]) : null, Z = process.env.NODE_ENV !== "production" ? o.oneOfType([
|
|
21
40
|
o.string,
|
|
22
41
|
o.shape({
|
|
23
42
|
enter: o.string,
|
|
@@ -32,15 +51,15 @@ const J = process.env.NODE_ENV !== "production" ? o.oneOfType([
|
|
|
32
51
|
exitDone: o.string,
|
|
33
52
|
exitActive: o.string
|
|
34
53
|
})
|
|
35
|
-
]) : null,
|
|
36
|
-
class
|
|
54
|
+
]) : null, F = (n) => n.scrollTop, N = "unmounted", x = "exited", d = "entering", u = "entered", k = "exiting";
|
|
55
|
+
class h extends c.Component {
|
|
37
56
|
constructor(e, t) {
|
|
38
57
|
super(e, t);
|
|
39
|
-
let
|
|
40
|
-
this.appearStatus = null, e.in ?
|
|
58
|
+
let s = t, i = s && !s.isMounting ? e.enter : e.appear, r;
|
|
59
|
+
this.appearStatus = null, e.in ? i ? (r = x, this.appearStatus = d) : r = u : e.unmountOnExit || e.mountOnEnter ? r = N : r = x, this.state = { status: r }, this.nextCallback = null;
|
|
41
60
|
}
|
|
42
61
|
static getDerivedStateFromProps({ in: e }, t) {
|
|
43
|
-
return e && t.status ===
|
|
62
|
+
return e && t.status === N ? { status: x } : null;
|
|
44
63
|
}
|
|
45
64
|
// getSnapshotBeforeUpdate(prevProps) {
|
|
46
65
|
// let nextStatus = null
|
|
@@ -64,8 +83,8 @@ class u extends d.Component {
|
|
|
64
83
|
componentDidUpdate(e) {
|
|
65
84
|
let t = null;
|
|
66
85
|
if (e !== this.props) {
|
|
67
|
-
const { status:
|
|
68
|
-
this.props.in ?
|
|
86
|
+
const { status: s } = this.state;
|
|
87
|
+
this.props.in ? s !== d && s !== u && (t = d) : (s === d || s === u) && (t = k);
|
|
69
88
|
}
|
|
70
89
|
this.updateStatus(!1, t);
|
|
71
90
|
}
|
|
@@ -74,49 +93,49 @@ class u extends d.Component {
|
|
|
74
93
|
}
|
|
75
94
|
getTimeouts() {
|
|
76
95
|
const { timeout: e } = this.props;
|
|
77
|
-
let t,
|
|
78
|
-
return t =
|
|
96
|
+
let t, s, i;
|
|
97
|
+
return t = s = i = e, e != null && typeof e != "number" && (t = e.exit, s = e.enter, i = e.appear !== void 0 ? e.appear : s), { exit: t, enter: s, appear: i };
|
|
79
98
|
}
|
|
80
99
|
updateStatus(e = !1, t) {
|
|
81
100
|
if (t !== null)
|
|
82
|
-
if (this.cancelNextCallback(), t ===
|
|
101
|
+
if (this.cancelNextCallback(), t === d) {
|
|
83
102
|
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
84
|
-
const
|
|
85
|
-
|
|
103
|
+
const s = this.props.nodeRef ? this.props.nodeRef.current : y.findDOMNode(this);
|
|
104
|
+
s && F(s);
|
|
86
105
|
}
|
|
87
106
|
this.performEnter(e);
|
|
88
107
|
} else
|
|
89
108
|
this.performExit();
|
|
90
|
-
else this.props.unmountOnExit && this.state.status === x && this.setState({ status:
|
|
109
|
+
else this.props.unmountOnExit && this.state.status === x && this.setState({ status: N });
|
|
91
110
|
}
|
|
92
111
|
performEnter(e) {
|
|
93
|
-
const { enter: t } = this.props,
|
|
94
|
-
if (!e && !t ||
|
|
95
|
-
this.safeSetState({ status:
|
|
96
|
-
this.props.onEntered(
|
|
112
|
+
const { enter: t } = this.props, s = this.context ? this.context.isMounting : e, [i, r] = this.props.nodeRef ? [s] : [y.findDOMNode(this), s], a = this.getTimeouts(), l = s ? a.appear : a.enter;
|
|
113
|
+
if (!e && !t || w.disabled) {
|
|
114
|
+
this.safeSetState({ status: u }, () => {
|
|
115
|
+
this.props.onEntered(i);
|
|
97
116
|
});
|
|
98
117
|
return;
|
|
99
118
|
}
|
|
100
|
-
this.props.onEnter(
|
|
101
|
-
this.props.onEntering(
|
|
102
|
-
this.safeSetState({ status:
|
|
103
|
-
this.props.onEntered(
|
|
119
|
+
this.props.onEnter(i, r), this.safeSetState({ status: d }, () => {
|
|
120
|
+
this.props.onEntering(i, r), this.onTransitionEnd(l, () => {
|
|
121
|
+
this.safeSetState({ status: u }, () => {
|
|
122
|
+
this.props.onEntered(i, r);
|
|
104
123
|
});
|
|
105
124
|
});
|
|
106
125
|
});
|
|
107
126
|
}
|
|
108
127
|
performExit() {
|
|
109
|
-
const { exit: e } = this.props, t = this.getTimeouts(),
|
|
110
|
-
if (!e ||
|
|
128
|
+
const { exit: e } = this.props, t = this.getTimeouts(), s = this.props.nodeRef ? void 0 : y.findDOMNode(this);
|
|
129
|
+
if (!e || w.disabled) {
|
|
111
130
|
this.safeSetState({ status: x }, () => {
|
|
112
|
-
this.props.onExited(
|
|
131
|
+
this.props.onExited(s);
|
|
113
132
|
});
|
|
114
133
|
return;
|
|
115
134
|
}
|
|
116
|
-
this.props.onExit(
|
|
117
|
-
this.props.onExiting(
|
|
135
|
+
this.props.onExit(s), this.safeSetState({ status: k }, () => {
|
|
136
|
+
this.props.onExiting(s), this.onTransitionEnd(t.exit, () => {
|
|
118
137
|
this.safeSetState({ status: x }, () => {
|
|
119
|
-
this.props.onExited(
|
|
138
|
+
this.props.onExited(s);
|
|
120
139
|
});
|
|
121
140
|
});
|
|
122
141
|
});
|
|
@@ -129,57 +148,57 @@ class u extends d.Component {
|
|
|
129
148
|
}
|
|
130
149
|
setNextCallback(e) {
|
|
131
150
|
let t = !0;
|
|
132
|
-
return this.nextCallback = (
|
|
133
|
-
t && (t = !1, this.nextCallback = null, e(
|
|
151
|
+
return this.nextCallback = (s) => {
|
|
152
|
+
t && (t = !1, this.nextCallback = null, e(s));
|
|
134
153
|
}, this.nextCallback.cancel = () => {
|
|
135
154
|
t = !1;
|
|
136
155
|
}, this.nextCallback;
|
|
137
156
|
}
|
|
138
157
|
onTransitionEnd(e, t) {
|
|
139
158
|
this.setNextCallback(t);
|
|
140
|
-
const
|
|
141
|
-
if (!
|
|
159
|
+
const s = this.props.nodeRef ? this.props.nodeRef.current : y.findDOMNode(this), i = e == null && !this.props.addEndListener;
|
|
160
|
+
if (!s || i) {
|
|
142
161
|
setTimeout(this.nextCallback, 0);
|
|
143
162
|
return;
|
|
144
163
|
}
|
|
145
164
|
if (this.props.addEndListener) {
|
|
146
|
-
const [r, a] = this.props.nodeRef ? [this.nextCallback] : [
|
|
165
|
+
const [r, a] = this.props.nodeRef ? [this.nextCallback] : [s, this.nextCallback];
|
|
147
166
|
this.props.addEndListener(r, a);
|
|
148
167
|
}
|
|
149
168
|
e != null && setTimeout(this.nextCallback, e);
|
|
150
169
|
}
|
|
151
170
|
render() {
|
|
152
171
|
const e = this.state.status;
|
|
153
|
-
if (e ===
|
|
172
|
+
if (e === N)
|
|
154
173
|
return null;
|
|
155
174
|
const {
|
|
156
175
|
children: t,
|
|
157
176
|
// filter props for `Transition`
|
|
158
|
-
in:
|
|
159
|
-
mountOnEnter:
|
|
177
|
+
in: s,
|
|
178
|
+
mountOnEnter: i,
|
|
160
179
|
unmountOnExit: r,
|
|
161
180
|
appear: a,
|
|
162
181
|
enter: l,
|
|
163
182
|
exit: E,
|
|
164
183
|
timeout: C,
|
|
165
184
|
addEndListener: T,
|
|
166
|
-
onEnter:
|
|
167
|
-
onEntering:
|
|
168
|
-
onEntered:
|
|
169
|
-
onExit:
|
|
170
|
-
onExiting:
|
|
171
|
-
onExited:
|
|
172
|
-
nodeRef:
|
|
173
|
-
...
|
|
185
|
+
onEnter: fe,
|
|
186
|
+
onEntering: xe,
|
|
187
|
+
onEntered: ge,
|
|
188
|
+
onExit: be,
|
|
189
|
+
onExiting: ve,
|
|
190
|
+
onExited: Ce,
|
|
191
|
+
nodeRef: ye,
|
|
192
|
+
...V
|
|
174
193
|
} = this.props;
|
|
175
194
|
return (
|
|
176
195
|
// allows for nested Transitions
|
|
177
|
-
/* @__PURE__ */ m(R.Provider, { value: null, children: typeof t == "function" ? t(e,
|
|
196
|
+
/* @__PURE__ */ m(R.Provider, { value: null, children: typeof t == "function" ? t(e, V) : c.cloneElement(c.Children.only(t), V) })
|
|
178
197
|
);
|
|
179
198
|
}
|
|
180
199
|
}
|
|
181
|
-
|
|
182
|
-
|
|
200
|
+
Q(h, "contextType", R);
|
|
201
|
+
h.propTypes = {
|
|
183
202
|
/**
|
|
184
203
|
* A React reference to the DOM element that needs to transition:
|
|
185
204
|
* https://stackoverflow.com/a/51127130/4671932
|
|
@@ -195,11 +214,11 @@ u.propTypes = {
|
|
|
195
214
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
196
215
|
*/
|
|
197
216
|
nodeRef: o.shape({
|
|
198
|
-
current: typeof Element > "u" ? o.any : (
|
|
199
|
-
const a =
|
|
217
|
+
current: typeof Element > "u" ? o.any : (n, e, t, s, i, r) => {
|
|
218
|
+
const a = n[e];
|
|
200
219
|
return o.instanceOf(
|
|
201
220
|
a && "ownerDocument" in a ? a.ownerDocument.defaultView.Element : Element
|
|
202
|
-
)(
|
|
221
|
+
)(n, e, t, s, i, r);
|
|
203
222
|
}
|
|
204
223
|
}),
|
|
205
224
|
/**
|
|
@@ -282,9 +301,9 @@ u.propTypes = {
|
|
|
282
301
|
*
|
|
283
302
|
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
|
284
303
|
*/
|
|
285
|
-
timeout: (
|
|
286
|
-
let t =
|
|
287
|
-
return
|
|
304
|
+
timeout: (n, ...e) => {
|
|
305
|
+
let t = Y;
|
|
306
|
+
return n.addEndListener || (t = t.isRequired), t(n, ...e);
|
|
288
307
|
},
|
|
289
308
|
/**
|
|
290
309
|
* Add a custom transition end trigger. Called with the transitioning
|
|
@@ -355,7 +374,7 @@ u.propTypes = {
|
|
|
355
374
|
};
|
|
356
375
|
function b() {
|
|
357
376
|
}
|
|
358
|
-
|
|
377
|
+
h.defaultProps = {
|
|
359
378
|
in: !1,
|
|
360
379
|
mountOnEnter: !1,
|
|
361
380
|
unmountOnExit: !1,
|
|
@@ -369,28 +388,28 @@ u.defaultProps = {
|
|
|
369
388
|
onExiting: b,
|
|
370
389
|
onExited: b
|
|
371
390
|
};
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
var
|
|
378
|
-
const
|
|
379
|
-
let
|
|
391
|
+
h.UNMOUNTED = N;
|
|
392
|
+
h.EXITED = x;
|
|
393
|
+
h.ENTERING = d;
|
|
394
|
+
h.ENTERED = u;
|
|
395
|
+
h.EXITING = k;
|
|
396
|
+
var ee = Object.defineProperty, te = (n, e, t) => e in n ? ee(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, p = (n, e, t) => te(n, typeof e != "symbol" ? e + "" : e, t);
|
|
397
|
+
const ne = (n, e) => n && e && e.split(" ").forEach((t) => K(n, t)), D = (n, e) => n && e && e.split(" ").forEach((t) => z(n, t));
|
|
398
|
+
let M = class extends c.Component {
|
|
380
399
|
constructor() {
|
|
381
400
|
super(...arguments), p(this, "appliedClasses", {
|
|
382
401
|
appear: {},
|
|
383
402
|
enter: {},
|
|
384
403
|
exit: {}
|
|
385
404
|
}), p(this, "onEnter", (e, t) => {
|
|
386
|
-
const [
|
|
387
|
-
this.removeClasses(
|
|
405
|
+
const [s, i] = this.resolveArguments(e, t);
|
|
406
|
+
this.removeClasses(s, "exit"), this.addClass(s, i ? "appear" : "enter", "base"), this.props.onEnter && this.props.onEnter(e, t);
|
|
388
407
|
}), p(this, "onEntering", (e, t) => {
|
|
389
|
-
const [
|
|
390
|
-
this.addClass(
|
|
408
|
+
const [s, i] = this.resolveArguments(e, t), r = i ? "appear" : "enter";
|
|
409
|
+
this.addClass(s, r, "active"), this.props.onEntering && this.props.onEntering(e, t);
|
|
391
410
|
}), p(this, "onEntered", (e, t) => {
|
|
392
|
-
const [
|
|
393
|
-
this.removeClasses(
|
|
411
|
+
const [s, i] = this.resolveArguments(e, t), r = i ? "appear" : "enter";
|
|
412
|
+
this.removeClasses(s, r), this.addClass(s, r, "done"), this.props.onEntered && this.props.onEntered(e, t);
|
|
394
413
|
}), p(this, "onExit", (e) => {
|
|
395
414
|
const [t] = this.resolveArguments(e);
|
|
396
415
|
this.removeClasses(t, "appear"), this.removeClasses(t, "enter"), this.addClass(t, "exit", "base"), this.props.onExit && this.props.onExit(e);
|
|
@@ -401,8 +420,8 @@ let P = class extends d.Component {
|
|
|
401
420
|
const [t] = this.resolveArguments(e);
|
|
402
421
|
this.removeClasses(t, "exit"), this.addClass(t, "exit", "done"), this.props.onExited && this.props.onExited(e);
|
|
403
422
|
}), p(this, "resolveArguments", (e, t) => this.props.nodeRef ? [this.props.nodeRef.current, e] : [e, t]), p(this, "getClassNames", (e) => {
|
|
404
|
-
const { classNames: t } = this.props,
|
|
405
|
-
let r =
|
|
423
|
+
const { classNames: t } = this.props, s = typeof t == "string", i = s && t ? `${t}-` : "";
|
|
424
|
+
let r = s ? `${i}${e}` : t[e], a = s ? `${r}-active` : t[`${e}Active`], l = s ? `${r}-done` : t[`${e}Done`];
|
|
406
425
|
return {
|
|
407
426
|
baseClassName: r,
|
|
408
427
|
activeClassName: a,
|
|
@@ -410,23 +429,23 @@ let P = class extends d.Component {
|
|
|
410
429
|
};
|
|
411
430
|
});
|
|
412
431
|
}
|
|
413
|
-
addClass(e, t,
|
|
414
|
-
let
|
|
432
|
+
addClass(e, t, s) {
|
|
433
|
+
let i = this.getClassNames(t)[`${s}ClassName`];
|
|
415
434
|
const { doneClassName: r } = this.getClassNames("enter");
|
|
416
|
-
t === "appear" &&
|
|
435
|
+
t === "appear" && s === "done" && r && (i += ` ${r}`), s === "active" && e && F(e), i && (this.appliedClasses[t][s] = i, ne(e, i));
|
|
417
436
|
}
|
|
418
437
|
removeClasses(e, t) {
|
|
419
438
|
const {
|
|
420
|
-
base:
|
|
421
|
-
active:
|
|
439
|
+
base: s,
|
|
440
|
+
active: i,
|
|
422
441
|
done: r
|
|
423
442
|
} = this.appliedClasses[t];
|
|
424
|
-
this.appliedClasses[t] = {},
|
|
443
|
+
this.appliedClasses[t] = {}, s && D(e, s), i && D(e, i), r && D(e, r);
|
|
425
444
|
}
|
|
426
445
|
render() {
|
|
427
446
|
const { classNames: e, ...t } = this.props;
|
|
428
447
|
return /* @__PURE__ */ m(
|
|
429
|
-
|
|
448
|
+
h,
|
|
430
449
|
{
|
|
431
450
|
...t,
|
|
432
451
|
onEnter: this.onEnter,
|
|
@@ -439,11 +458,11 @@ let P = class extends d.Component {
|
|
|
439
458
|
);
|
|
440
459
|
}
|
|
441
460
|
};
|
|
442
|
-
p(
|
|
461
|
+
p(M, "defaultProps", {
|
|
443
462
|
classNames: ""
|
|
444
463
|
});
|
|
445
|
-
|
|
446
|
-
...
|
|
464
|
+
M.propTypes = {
|
|
465
|
+
...h.propTypes,
|
|
447
466
|
/**
|
|
448
467
|
* The animation classNames applied to the component as it appears, enters,
|
|
449
468
|
* exits or has finished the transition. A single name can be provided, which
|
|
@@ -512,7 +531,7 @@ P.propTypes = {
|
|
|
512
531
|
* exitDone?: string,
|
|
513
532
|
* }}
|
|
514
533
|
*/
|
|
515
|
-
classNames:
|
|
534
|
+
classNames: Z,
|
|
516
535
|
/**
|
|
517
536
|
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
|
|
518
537
|
* applied.
|
|
@@ -567,75 +586,75 @@ P.propTypes = {
|
|
|
567
586
|
*/
|
|
568
587
|
onExited: o.func
|
|
569
588
|
};
|
|
570
|
-
function
|
|
571
|
-
let t = (
|
|
572
|
-
return
|
|
573
|
-
|
|
574
|
-
}),
|
|
589
|
+
function P(n, e) {
|
|
590
|
+
let t = (i) => e && O(i) ? e(i) : i, s = /* @__PURE__ */ Object.create(null);
|
|
591
|
+
return n && I.map(n, (i) => i).forEach((i) => {
|
|
592
|
+
s[i.key] = t(i);
|
|
593
|
+
}), s;
|
|
575
594
|
}
|
|
576
|
-
function
|
|
577
|
-
|
|
595
|
+
function se(n, e) {
|
|
596
|
+
n = n || {}, e = e || {};
|
|
578
597
|
function t(l) {
|
|
579
|
-
return l in e ? e[l] :
|
|
598
|
+
return l in e ? e[l] : n[l];
|
|
580
599
|
}
|
|
581
|
-
let
|
|
582
|
-
for (let l in
|
|
583
|
-
l in e ?
|
|
600
|
+
let s = /* @__PURE__ */ Object.create(null), i = [];
|
|
601
|
+
for (let l in n)
|
|
602
|
+
l in e ? i.length && (s[l] = i, i = []) : i.push(l);
|
|
584
603
|
let r, a = {};
|
|
585
604
|
for (let l in e) {
|
|
586
|
-
if (
|
|
587
|
-
for (r = 0; r <
|
|
588
|
-
let E =
|
|
589
|
-
a[
|
|
605
|
+
if (s[l])
|
|
606
|
+
for (r = 0; r < s[l].length; r++) {
|
|
607
|
+
let E = s[l][r];
|
|
608
|
+
a[s[l][r]] = t(E);
|
|
590
609
|
}
|
|
591
610
|
a[l] = t(l);
|
|
592
611
|
}
|
|
593
|
-
for (r = 0; r <
|
|
594
|
-
a[
|
|
612
|
+
for (r = 0; r < i.length; r++)
|
|
613
|
+
a[i[r]] = t(i[r]);
|
|
595
614
|
return a;
|
|
596
615
|
}
|
|
597
|
-
function g(
|
|
598
|
-
return t[e] != null ? t[e] :
|
|
616
|
+
function g(n, e, t) {
|
|
617
|
+
return t[e] != null ? t[e] : n.props[e];
|
|
599
618
|
}
|
|
600
|
-
function
|
|
601
|
-
return
|
|
619
|
+
function ie(n, e) {
|
|
620
|
+
return P(n.children, (t) => S(t, {
|
|
602
621
|
onExited: e.bind(null, t),
|
|
603
622
|
in: !0,
|
|
604
|
-
appear: g(t, "appear",
|
|
605
|
-
enter: g(t, "enter",
|
|
606
|
-
exit: g(t, "exit",
|
|
623
|
+
appear: g(t, "appear", n),
|
|
624
|
+
enter: g(t, "enter", n),
|
|
625
|
+
exit: g(t, "exit", n)
|
|
607
626
|
}));
|
|
608
627
|
}
|
|
609
|
-
function
|
|
610
|
-
let
|
|
611
|
-
return Object.keys(
|
|
612
|
-
let a =
|
|
628
|
+
function re(n, e, t) {
|
|
629
|
+
let s = P(n.children), i = se(e, s);
|
|
630
|
+
return Object.keys(i).forEach((r) => {
|
|
631
|
+
let a = i[r];
|
|
613
632
|
if (!O(a)) return;
|
|
614
|
-
const l = r in e, E = r in
|
|
615
|
-
E && (!l || T) ?
|
|
633
|
+
const l = r in e, E = r in s, C = e[r], T = O(C) && !C.props.in;
|
|
634
|
+
E && (!l || T) ? i[r] = S(a, {
|
|
616
635
|
onExited: t.bind(null, a),
|
|
617
636
|
in: !0,
|
|
618
|
-
exit: g(a, "exit",
|
|
619
|
-
enter: g(a, "enter",
|
|
620
|
-
}) : !E && l && !T ?
|
|
637
|
+
exit: g(a, "exit", n),
|
|
638
|
+
enter: g(a, "enter", n)
|
|
639
|
+
}) : !E && l && !T ? i[r] = S(a, { in: !1 }) : E && l && O(C) && (i[r] = S(a, {
|
|
621
640
|
onExited: t.bind(null, a),
|
|
622
641
|
in: C.props.in,
|
|
623
|
-
exit: g(a, "exit",
|
|
624
|
-
enter: g(a, "enter",
|
|
642
|
+
exit: g(a, "exit", n),
|
|
643
|
+
enter: g(a, "enter", n)
|
|
625
644
|
}));
|
|
626
|
-
}),
|
|
645
|
+
}), i;
|
|
627
646
|
}
|
|
628
|
-
const
|
|
647
|
+
const oe = Object.values || ((n) => Object.keys(n).map((e) => n[e])), ae = {
|
|
629
648
|
component: "div",
|
|
630
|
-
childFactory: (
|
|
649
|
+
childFactory: (n) => n
|
|
631
650
|
};
|
|
632
|
-
class A extends
|
|
651
|
+
class A extends c.Component {
|
|
633
652
|
constructor(e, t) {
|
|
634
653
|
super(e, t);
|
|
635
|
-
const
|
|
654
|
+
const s = this.handleExited.bind(this);
|
|
636
655
|
this.state = {
|
|
637
656
|
contextValue: { isMounting: !0 },
|
|
638
|
-
handleExited:
|
|
657
|
+
handleExited: s,
|
|
639
658
|
firstRender: !0
|
|
640
659
|
};
|
|
641
660
|
}
|
|
@@ -647,23 +666,23 @@ class A extends d.Component {
|
|
|
647
666
|
componentWillUnmount() {
|
|
648
667
|
this.mounted = !1;
|
|
649
668
|
}
|
|
650
|
-
static getDerivedStateFromProps(e, { children: t, handleExited:
|
|
669
|
+
static getDerivedStateFromProps(e, { children: t, handleExited: s, firstRender: i }) {
|
|
651
670
|
return {
|
|
652
|
-
children:
|
|
671
|
+
children: i ? ie(e, s) : re(e, t, s),
|
|
653
672
|
firstRender: !1
|
|
654
673
|
};
|
|
655
674
|
}
|
|
656
675
|
// node is `undefined` when user provided `nodeRef` prop
|
|
657
676
|
handleExited(e, t) {
|
|
658
|
-
let
|
|
659
|
-
e.key in
|
|
660
|
-
let r = { ...
|
|
677
|
+
let s = P(this.props.children);
|
|
678
|
+
e.key in s || (e.props.onExited && e.props.onExited(t), this.mounted && this.setState((i) => {
|
|
679
|
+
let r = { ...i.children };
|
|
661
680
|
return delete r[e.key], { children: r };
|
|
662
681
|
}));
|
|
663
682
|
}
|
|
664
683
|
render() {
|
|
665
|
-
const { component: e, childFactory: t, ...
|
|
666
|
-
return delete
|
|
684
|
+
const { component: e, childFactory: t, ...s } = this.props, { contextValue: i } = this.state, r = oe(this.state.children).map(t);
|
|
685
|
+
return delete s.appear, delete s.enter, delete s.exit, e === null ? /* @__PURE__ */ m(R.Provider, { value: i, children: r }) : /* @__PURE__ */ m(R.Provider, { value: i, children: /* @__PURE__ */ m(e, { ...s, children: r }) });
|
|
667
686
|
}
|
|
668
687
|
}
|
|
669
688
|
A.propTypes = {
|
|
@@ -719,27 +738,27 @@ A.propTypes = {
|
|
|
719
738
|
*/
|
|
720
739
|
childFactory: o.func
|
|
721
740
|
};
|
|
722
|
-
A.defaultProps =
|
|
723
|
-
var
|
|
724
|
-
class
|
|
741
|
+
A.defaultProps = ae;
|
|
742
|
+
var le = Object.defineProperty, ce = (n, e, t) => e in n ? le(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, v = (n, e, t) => ce(n, typeof e != "symbol" ? e + "" : e, t);
|
|
743
|
+
class de extends c.Component {
|
|
725
744
|
constructor() {
|
|
726
745
|
super(...arguments), v(this, "handleEnter", (...e) => this.handleLifecycle("onEnter", 0, e)), v(this, "handleEntering", (...e) => this.handleLifecycle("onEntering", 0, e)), v(this, "handleEntered", (...e) => this.handleLifecycle("onEntered", 0, e)), v(this, "handleExit", (...e) => this.handleLifecycle("onExit", 1, e)), v(this, "handleExiting", (...e) => this.handleLifecycle("onExiting", 1, e)), v(this, "handleExited", (...e) => this.handleLifecycle("onExited", 1, e));
|
|
727
746
|
}
|
|
728
|
-
handleLifecycle(e, t,
|
|
729
|
-
const { children:
|
|
730
|
-
if (r.props[e] && r.props[e](...
|
|
747
|
+
handleLifecycle(e, t, s) {
|
|
748
|
+
const { children: i } = this.props, r = c.Children.toArray(i)[t];
|
|
749
|
+
if (r.props[e] && r.props[e](...s), this.props[e]) {
|
|
731
750
|
const a = r.props.nodeRef ? void 0 : y.findDOMNode(this);
|
|
732
751
|
this.props[e](a);
|
|
733
752
|
}
|
|
734
753
|
}
|
|
735
754
|
render() {
|
|
736
|
-
const { children: e, in: t, ...
|
|
737
|
-
return delete
|
|
755
|
+
const { children: e, in: t, ...s } = this.props, [i, r] = c.Children.toArray(e);
|
|
756
|
+
return delete s.onEnter, delete s.onEntering, delete s.onEntered, delete s.onExit, delete s.onExiting, delete s.onExited, /* @__PURE__ */ m(A, { ...s, children: t ? c.cloneElement(i, {
|
|
738
757
|
key: "first",
|
|
739
758
|
onEnter: this.handleEnter,
|
|
740
759
|
onEntering: this.handleEntering,
|
|
741
760
|
onEntered: this.handleEntered
|
|
742
|
-
}) :
|
|
761
|
+
}) : c.cloneElement(r, {
|
|
743
762
|
key: "second",
|
|
744
763
|
onEnter: this.handleExit,
|
|
745
764
|
onEntering: this.handleExiting,
|
|
@@ -747,65 +766,65 @@ class le extends d.Component {
|
|
|
747
766
|
}) });
|
|
748
767
|
}
|
|
749
768
|
}
|
|
750
|
-
|
|
769
|
+
de.propTypes = {
|
|
751
770
|
in: o.bool.isRequired,
|
|
752
|
-
children(
|
|
753
|
-
return
|
|
771
|
+
children(n, e) {
|
|
772
|
+
return c.Children.count(n[e]) !== 2 ? new Error(
|
|
754
773
|
`"${e}" must be exactly two transition components.`
|
|
755
774
|
) : null;
|
|
756
775
|
}
|
|
757
776
|
};
|
|
758
|
-
var
|
|
759
|
-
function
|
|
760
|
-
return !(
|
|
777
|
+
var pe = Object.defineProperty, ue = (n, e, t) => e in n ? pe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, L = (n, e, t) => ue(n, typeof e != "symbol" ? e + "" : e, t);
|
|
778
|
+
function he(n, e) {
|
|
779
|
+
return !(n === e || c.isValidElement(n) && c.isValidElement(e) && n.key != null && n.key === e.key);
|
|
761
780
|
}
|
|
762
781
|
const f = {
|
|
763
782
|
out: "out-in",
|
|
764
783
|
in: "in-out"
|
|
765
|
-
}, $ = (
|
|
766
|
-
var
|
|
767
|
-
(r = (
|
|
768
|
-
},
|
|
769
|
-
[f.out]: ({ current:
|
|
784
|
+
}, $ = (n, e, t) => (...s) => {
|
|
785
|
+
var i, r;
|
|
786
|
+
(r = (i = n.props)[e]) == null || r.call(i, ...s), t();
|
|
787
|
+
}, Ee = {
|
|
788
|
+
[f.out]: ({ current: n, changeState: e }) => c.cloneElement(n, {
|
|
770
789
|
in: !1,
|
|
771
|
-
onExited: $(
|
|
772
|
-
e(
|
|
790
|
+
onExited: $(n, "onExited", () => {
|
|
791
|
+
e(d, null);
|
|
773
792
|
})
|
|
774
793
|
}),
|
|
775
|
-
[f.in]: ({ current:
|
|
776
|
-
|
|
777
|
-
|
|
794
|
+
[f.in]: ({ current: n, changeState: e, children: t }) => [
|
|
795
|
+
n,
|
|
796
|
+
c.cloneElement(t, {
|
|
778
797
|
in: !0,
|
|
779
798
|
onEntered: $(t, "onEntered", () => {
|
|
780
|
-
e(
|
|
799
|
+
e(d);
|
|
781
800
|
})
|
|
782
801
|
})
|
|
783
802
|
]
|
|
784
|
-
},
|
|
785
|
-
[f.out]: ({ children:
|
|
803
|
+
}, me = {
|
|
804
|
+
[f.out]: ({ children: n, changeState: e }) => c.cloneElement(n, {
|
|
786
805
|
in: !0,
|
|
787
|
-
onEntered: $(
|
|
788
|
-
e(
|
|
806
|
+
onEntered: $(n, "onEntered", () => {
|
|
807
|
+
e(u, c.cloneElement(n, { in: !0 }));
|
|
789
808
|
})
|
|
790
809
|
}),
|
|
791
|
-
[f.in]: ({ current:
|
|
792
|
-
|
|
810
|
+
[f.in]: ({ current: n, children: e, changeState: t }) => [
|
|
811
|
+
c.cloneElement(n, {
|
|
793
812
|
in: !1,
|
|
794
|
-
onExited: $(
|
|
795
|
-
t(
|
|
813
|
+
onExited: $(n, "onExited", () => {
|
|
814
|
+
t(u, c.cloneElement(e, { in: !0 }));
|
|
796
815
|
})
|
|
797
816
|
}),
|
|
798
|
-
|
|
817
|
+
c.cloneElement(e, {
|
|
799
818
|
in: !0
|
|
800
819
|
})
|
|
801
820
|
]
|
|
802
821
|
};
|
|
803
|
-
class
|
|
822
|
+
class U extends c.Component {
|
|
804
823
|
constructor() {
|
|
805
|
-
super(...arguments),
|
|
806
|
-
status:
|
|
824
|
+
super(...arguments), L(this, "state", {
|
|
825
|
+
status: u,
|
|
807
826
|
current: null
|
|
808
|
-
}),
|
|
827
|
+
}), L(this, "appeared", !1), L(this, "changeState", (e, t = this.state.current) => {
|
|
809
828
|
this.setState({
|
|
810
829
|
status: e,
|
|
811
830
|
current: t
|
|
@@ -818,12 +837,12 @@ class F extends d.Component {
|
|
|
818
837
|
static getDerivedStateFromProps(e, t) {
|
|
819
838
|
return e.children == null ? {
|
|
820
839
|
current: null
|
|
821
|
-
} : t.status ===
|
|
822
|
-
status:
|
|
823
|
-
} : t.current &&
|
|
840
|
+
} : t.status === d && e.mode === f.in ? {
|
|
841
|
+
status: d
|
|
842
|
+
} : t.current && he(t.current, e.children) ? {
|
|
824
843
|
status: k
|
|
825
844
|
} : {
|
|
826
|
-
current:
|
|
845
|
+
current: c.cloneElement(e.children, {
|
|
827
846
|
in: !0
|
|
828
847
|
})
|
|
829
848
|
};
|
|
@@ -831,23 +850,23 @@ class F extends d.Component {
|
|
|
831
850
|
render() {
|
|
832
851
|
const {
|
|
833
852
|
props: { children: e, mode: t },
|
|
834
|
-
state: { status:
|
|
835
|
-
} = this, r = { children: e, current:
|
|
853
|
+
state: { status: s, current: i }
|
|
854
|
+
} = this, r = { children: e, current: i, changeState: this.changeState, status: s };
|
|
836
855
|
let a;
|
|
837
|
-
switch (
|
|
838
|
-
case
|
|
839
|
-
a =
|
|
856
|
+
switch (s) {
|
|
857
|
+
case d:
|
|
858
|
+
a = me[t](r);
|
|
840
859
|
break;
|
|
841
860
|
case k:
|
|
842
|
-
a =
|
|
861
|
+
a = Ee[t](r);
|
|
843
862
|
break;
|
|
844
|
-
case
|
|
845
|
-
a =
|
|
863
|
+
case u:
|
|
864
|
+
a = i;
|
|
846
865
|
}
|
|
847
866
|
return /* @__PURE__ */ m(R.Provider, { value: { isMounting: !this.appeared }, children: a });
|
|
848
867
|
}
|
|
849
868
|
}
|
|
850
|
-
|
|
869
|
+
U.propTypes = {
|
|
851
870
|
/**
|
|
852
871
|
* Transition modes.
|
|
853
872
|
* `out-in`: Current element transitions out first, then when complete, the new element transitions in.
|
|
@@ -861,16 +880,16 @@ F.propTypes = {
|
|
|
861
880
|
*/
|
|
862
881
|
children: o.oneOfType([o.element.isRequired])
|
|
863
882
|
};
|
|
864
|
-
|
|
883
|
+
U.defaultProps = {
|
|
865
884
|
mode: f.out
|
|
866
885
|
};
|
|
867
|
-
function De(
|
|
868
|
-
const { children: e, ...t } =
|
|
886
|
+
function De(n) {
|
|
887
|
+
const { children: e, ...t } = n, s = j(), i = j(), r = _(() => n.nodeRef === void 0 && G(e) && O(e) ? (i.current = !0, S(e, {
|
|
869
888
|
ref: (a) => {
|
|
870
|
-
|
|
889
|
+
s.current = W(a), X(e, a);
|
|
871
890
|
}
|
|
872
|
-
})) : (
|
|
873
|
-
return
|
|
891
|
+
})) : (i.current = !1, e), [e, n.nodeRef]);
|
|
892
|
+
return i.current && [
|
|
874
893
|
"onEnter",
|
|
875
894
|
"onEntering",
|
|
876
895
|
"onEntered",
|
|
@@ -878,15 +897,17 @@ function De(i) {
|
|
|
878
897
|
"onExiting",
|
|
879
898
|
"onExited"
|
|
880
899
|
].forEach((a) => {
|
|
881
|
-
|
|
882
|
-
|
|
900
|
+
n[a] && (t[a] = (l, ...E) => {
|
|
901
|
+
n[a](s.current, ...E);
|
|
883
902
|
});
|
|
884
|
-
}), /* @__PURE__ */ m(
|
|
903
|
+
}), /* @__PURE__ */ m(M, { ...t, nodeRef: i.current ? s : void 0, children: r });
|
|
885
904
|
}
|
|
886
905
|
export {
|
|
887
906
|
De as P,
|
|
907
|
+
w as a,
|
|
888
908
|
A as b,
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
909
|
+
M as c,
|
|
910
|
+
U as h,
|
|
911
|
+
de as m,
|
|
912
|
+
h as u
|
|
892
913
|
};
|