@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,76 +1,75 @@
|
|
|
1
1
|
import { jsx as n, jsxs as K } from "react/jsx-runtime";
|
|
2
|
-
import j from "
|
|
3
|
-
import q from "@unicom-cloud/icons/IconUiRight";
|
|
2
|
+
import { a as j, I as q } from "./D9TqtOhq.js";
|
|
4
3
|
import X from "lodash/isArray";
|
|
5
|
-
import
|
|
4
|
+
import y from "lodash/isNumber";
|
|
6
5
|
import { createContext as Y, forwardRef as Z, useContext as ee, useState as re, useRef as A, useEffect as F, useMemo as te } from "react";
|
|
7
|
-
import {
|
|
6
|
+
import { b as ie } from "./DUxWiN2U.js";
|
|
8
7
|
import se from "../hooks/useMergeValue.js";
|
|
9
8
|
import oe from "../ResizeBox.js";
|
|
10
|
-
import H from "
|
|
9
|
+
import { y as H } from "./Do1aMgY3.js";
|
|
11
10
|
import L, { responsiveMap as ne } from "../utils/responsiveObserve.js";
|
|
12
11
|
const le = Y({
|
|
13
12
|
siderCollapsed: !1,
|
|
14
13
|
collapsedWidth: 64
|
|
15
14
|
}), ae = /* @__PURE__ */ (() => {
|
|
16
15
|
let i = 0;
|
|
17
|
-
return (
|
|
16
|
+
return (f = "") => (i += 1, `${f}${i}`);
|
|
18
17
|
})();
|
|
19
|
-
function ce(i,
|
|
18
|
+
function ce(i, f) {
|
|
20
19
|
var T;
|
|
21
20
|
const {
|
|
22
21
|
children: D,
|
|
23
22
|
className: E,
|
|
24
23
|
style: G,
|
|
25
|
-
theme:
|
|
26
|
-
trigger:
|
|
27
|
-
reverseArrow:
|
|
24
|
+
theme: N = "light",
|
|
25
|
+
trigger: g,
|
|
26
|
+
reverseArrow: I,
|
|
28
27
|
collapsedWidth: r = 48,
|
|
29
|
-
width:
|
|
28
|
+
width: m = 200,
|
|
30
29
|
collapsible: h,
|
|
31
30
|
resizeDirections: c,
|
|
32
31
|
onSiderMount: v,
|
|
33
32
|
onSiderUnmount: C,
|
|
34
|
-
breakpoint:
|
|
33
|
+
breakpoint: R,
|
|
35
34
|
onBreakpoint: O,
|
|
36
35
|
onCollapse: d,
|
|
37
36
|
resizeBoxProps: t = {}
|
|
38
|
-
} = i,
|
|
37
|
+
} = i, W = ae("pqb-sider-"), { getPrefixCls: P } = ee(ie), s = P("layout-sider"), [e, _] = se(!1, {
|
|
39
38
|
value: "collapsed" in i ? i.collapsed : void 0,
|
|
40
39
|
defaultValue: i.defaultCollapsed
|
|
41
|
-
}),
|
|
42
|
-
e ? Q :
|
|
43
|
-
),
|
|
40
|
+
}), b = y(m) ? `${m}px` : String(m), Q = y(r) ? `${r}` : String(r), [p, k] = re(
|
|
41
|
+
e ? Q : b
|
|
42
|
+
), $ = A(null), M = A(null);
|
|
44
43
|
M.current = {
|
|
45
|
-
breakpoint:
|
|
44
|
+
breakpoint: R,
|
|
46
45
|
collapsed: e,
|
|
47
46
|
onCollapse: d,
|
|
48
47
|
onBreakpoint: O
|
|
49
|
-
}, F(() => (v == null || v(
|
|
48
|
+
}, F(() => (v == null || v(W), h && R in ne && ($.current = L.subscribe(
|
|
50
49
|
(o, l) => {
|
|
51
|
-
const { breakpoint: a, collapsed: J, onCollapse: S, onBreakpoint:
|
|
50
|
+
const { breakpoint: a, collapsed: J, onCollapse: S, onBreakpoint: w } = M.current;
|
|
52
51
|
if (!l || l === a) {
|
|
53
52
|
const u = !o[a];
|
|
54
|
-
u !== J && (
|
|
53
|
+
u !== J && (_(u), S == null || S(u, "responsive")), w == null || w(u);
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
)), () => {
|
|
58
|
-
C == null || C(
|
|
57
|
+
C == null || C(W), $.current && L.unsubscribe($.current);
|
|
59
58
|
}), []), F(() => {
|
|
60
|
-
const o =
|
|
61
|
-
k(e ? o :
|
|
62
|
-
}, [e,
|
|
59
|
+
const o = y(r) ? `${r}px` : String(r);
|
|
60
|
+
k(e ? o : b);
|
|
61
|
+
}, [e, b, r]);
|
|
63
62
|
const x = c && X(c) || ((T = t.directions) == null ? void 0 : T.length), U = x ? oe : "aside", z = () => {
|
|
64
|
-
const o =
|
|
65
|
-
return h &&
|
|
63
|
+
const o = g || (e ? I ? /* @__PURE__ */ n(j, {}) : /* @__PURE__ */ n(q, {}) : I ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(j, {}));
|
|
64
|
+
return h && g !== null ? /* @__PURE__ */ n(
|
|
66
65
|
"div",
|
|
67
66
|
{
|
|
68
67
|
style: { width: p },
|
|
69
68
|
className: H(`${s}-trigger`, {
|
|
70
|
-
[`${s}-trigger-light`]:
|
|
69
|
+
[`${s}-trigger-light`]: N === "light"
|
|
71
70
|
}),
|
|
72
71
|
onClick: () => {
|
|
73
|
-
|
|
72
|
+
_(!e), d == null || d(!e, "clickTrigger");
|
|
74
73
|
},
|
|
75
74
|
children: o
|
|
76
75
|
}
|
|
@@ -95,7 +94,7 @@ function ce(i, m) {
|
|
|
95
94
|
children: /* @__PURE__ */ K(
|
|
96
95
|
U,
|
|
97
96
|
{
|
|
98
|
-
ref:
|
|
97
|
+
ref: f,
|
|
99
98
|
style: {
|
|
100
99
|
width: p,
|
|
101
100
|
...G
|
|
@@ -103,8 +102,8 @@ function ce(i, m) {
|
|
|
103
102
|
className: H(
|
|
104
103
|
s,
|
|
105
104
|
{
|
|
106
|
-
[`${s}-light`]:
|
|
107
|
-
[`${s}-has-trigger`]:
|
|
105
|
+
[`${s}-light`]: N === "light",
|
|
106
|
+
[`${s}-has-trigger`]: g !== null && h,
|
|
108
107
|
[`${s}-collapsed`]: e
|
|
109
108
|
},
|
|
110
109
|
E
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { jsxs as it, jsx as M } from "react/jsx-runtime";
|
|
2
|
+
import { y as vt, t as At } from "./CnY8SvgY.js";
|
|
3
|
+
import ot from "lodash/isFunction";
|
|
4
|
+
import q from "lodash/isNumber";
|
|
5
|
+
import $t from "lodash/throttle";
|
|
6
|
+
import Rt, { createContext as Tt, forwardRef as ct, useContext as _, useRef as N, useImperativeHandle as st, useEffect as O, isValidElement as Pt, useState as bt, useCallback as D } from "react";
|
|
7
|
+
import Et from "../Affix.js";
|
|
8
|
+
import { b as lt } from "./DUxWiN2U.js";
|
|
9
|
+
import Mt from "../hooks/useIsFirstRender.js";
|
|
10
|
+
import at from "../hooks/useMergeProps.js";
|
|
11
|
+
import Ot from "../hooks/useStateWithPromise.js";
|
|
12
|
+
import { y as ut } from "./Do1aMgY3.js";
|
|
13
|
+
import { on as It, off as Ft } from "../utils/dom.js";
|
|
14
|
+
import { isWindow as ft } from "../utils/is.js";
|
|
15
|
+
import Ht from "lodash/isNull";
|
|
16
|
+
import Dt from "lodash/isPlainObject";
|
|
17
|
+
import G from "lodash/isString";
|
|
18
|
+
import Ut from "lodash/isUndefined";
|
|
19
|
+
import { I as jt, q as zt } from "./CkAOsst1.js";
|
|
20
|
+
const mt = Tt({
|
|
21
|
+
direction: "vertical",
|
|
22
|
+
currentLink: "",
|
|
23
|
+
onLinkClick: () => {
|
|
24
|
+
},
|
|
25
|
+
addLink: () => {
|
|
26
|
+
},
|
|
27
|
+
removeLink: () => {
|
|
28
|
+
}
|
|
29
|
+
}), dt = "AnchorLink", Bt = {
|
|
30
|
+
href: "#"
|
|
31
|
+
};
|
|
32
|
+
function Vt(e) {
|
|
33
|
+
return Dt(e) && Object.prototype.hasOwnProperty.call(e, "displayName");
|
|
34
|
+
}
|
|
35
|
+
function Yt(e, r) {
|
|
36
|
+
const { getPrefixCls: c, componentConfig: s } = _(lt), { className: y, style: j, href: l, title: m, children: u, ...z } = at(
|
|
37
|
+
e,
|
|
38
|
+
Bt,
|
|
39
|
+
s == null ? void 0 : s["Anchor.Link"]
|
|
40
|
+
), C = _(mt), { currentLink: B, addLink: L, removeLink: S, onLinkClick: v, direction: I } = C, o = c("anchor-link"), A = ut(
|
|
41
|
+
o,
|
|
42
|
+
{
|
|
43
|
+
[`${o}-active`]: B === l
|
|
44
|
+
},
|
|
45
|
+
y
|
|
46
|
+
), $ = N(null);
|
|
47
|
+
return st(r, () => $.current, []), O(() => (L == null || L(l, $.current), () => {
|
|
48
|
+
S == null || S(l);
|
|
49
|
+
}), [l]), /* @__PURE__ */ it("div", { className: A, style: j, ref: $, ...z, children: [
|
|
50
|
+
!Ut(m) && !Ht(m) && /* @__PURE__ */ M(
|
|
51
|
+
"a",
|
|
52
|
+
{
|
|
53
|
+
className: `${o}-title`,
|
|
54
|
+
title: G(m) ? m : "",
|
|
55
|
+
href: l,
|
|
56
|
+
"data-href": l,
|
|
57
|
+
onClick: (i) => {
|
|
58
|
+
v == null || v(i, l);
|
|
59
|
+
},
|
|
60
|
+
children: m
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
u && I !== "horizontal" && Rt.Children.map(u, (i) => Pt(i) && Vt(i.type) && i.type.displayName === dt && i)
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
const pt = ct(Yt);
|
|
67
|
+
pt.displayName = dt;
|
|
68
|
+
function U(e, r) {
|
|
69
|
+
const c = G(r) && r[0] === "#" ? `[id='${r.replace("#", "")}']` : r;
|
|
70
|
+
try {
|
|
71
|
+
return e.querySelector(c);
|
|
72
|
+
} catch (s) {
|
|
73
|
+
return console.error(s), null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function Wt(e, r, c) {
|
|
77
|
+
new jt({
|
|
78
|
+
from: {
|
|
79
|
+
scrollTop: e.scrollTop
|
|
80
|
+
},
|
|
81
|
+
to: {
|
|
82
|
+
scrollTop: r
|
|
83
|
+
},
|
|
84
|
+
easing: zt,
|
|
85
|
+
duration: 300,
|
|
86
|
+
onUpdate: (y) => {
|
|
87
|
+
e.scrollTop = y.scrollTop;
|
|
88
|
+
},
|
|
89
|
+
onFinish: () => {
|
|
90
|
+
c == null || c();
|
|
91
|
+
}
|
|
92
|
+
}).start();
|
|
93
|
+
}
|
|
94
|
+
function qt(e) {
|
|
95
|
+
return G(e) ? U(document, e) : e || window;
|
|
96
|
+
}
|
|
97
|
+
function _t(e) {
|
|
98
|
+
return ft(e) ? document.documentElement || document.body : e;
|
|
99
|
+
}
|
|
100
|
+
function ht(e) {
|
|
101
|
+
if (e == null)
|
|
102
|
+
return null;
|
|
103
|
+
if (e.tagName === "BODY")
|
|
104
|
+
return e.ownerDocument.documentElement;
|
|
105
|
+
const r = window.getComputedStyle(e).overflowY;
|
|
106
|
+
return r !== "visible" && r !== "hidden" && e.scrollHeight > e.clientHeight ? e : ht(e.parentElement);
|
|
107
|
+
}
|
|
108
|
+
const Gt = {
|
|
109
|
+
animation: !0,
|
|
110
|
+
affix: !0,
|
|
111
|
+
hash: !0,
|
|
112
|
+
boundary: "start"
|
|
113
|
+
};
|
|
114
|
+
function Jt(e, r) {
|
|
115
|
+
const { getPrefixCls: c, componentConfig: s, rtl: y } = _(lt), j = at(
|
|
116
|
+
e,
|
|
117
|
+
Gt,
|
|
118
|
+
s == null ? void 0 : s.Anchor
|
|
119
|
+
), {
|
|
120
|
+
className: l,
|
|
121
|
+
style: m,
|
|
122
|
+
scrollContainer: u,
|
|
123
|
+
animation: z = !0,
|
|
124
|
+
lineless: C,
|
|
125
|
+
affix: B = !0,
|
|
126
|
+
affixStyle: L,
|
|
127
|
+
offsetBottom: S,
|
|
128
|
+
offsetTop: v,
|
|
129
|
+
hash: I = !0,
|
|
130
|
+
boundary: o = "start",
|
|
131
|
+
targetOffset: A,
|
|
132
|
+
children: $,
|
|
133
|
+
direction: i = "vertical",
|
|
134
|
+
onSelect: J,
|
|
135
|
+
onChange: V,
|
|
136
|
+
...yt
|
|
137
|
+
} = j, k = c("anchor"), Ct = ut(k, l, {
|
|
138
|
+
[`${k}-lineless`]: C,
|
|
139
|
+
[`${k}-rtl`]: y,
|
|
140
|
+
[`${k}-horizontal`]: i === "horizontal"
|
|
141
|
+
}), d = N(null), R = N(null), w = N(/* @__PURE__ */ new Map()), Y = N(!1), T = N(null), [kt, K] = bt(0), [f, wt] = Ot(""), xt = Mt();
|
|
142
|
+
function Q() {
|
|
143
|
+
let t = qt(u);
|
|
144
|
+
return u || (t = ht(d.current)), t;
|
|
145
|
+
}
|
|
146
|
+
O(() => {
|
|
147
|
+
const t = Q();
|
|
148
|
+
T.current = t;
|
|
149
|
+
}, [u]);
|
|
150
|
+
const Nt = D(() => Q(), [u]);
|
|
151
|
+
st(
|
|
152
|
+
r,
|
|
153
|
+
() => ({
|
|
154
|
+
dom: d.current,
|
|
155
|
+
getRootDOMNode: () => d.current
|
|
156
|
+
}),
|
|
157
|
+
[]
|
|
158
|
+
);
|
|
159
|
+
function X(t, n) {
|
|
160
|
+
t && (w.current.set(t, n), K(Math.random()));
|
|
161
|
+
}
|
|
162
|
+
function Lt(t) {
|
|
163
|
+
w.current.delete(t), K(Math.random());
|
|
164
|
+
}
|
|
165
|
+
const F = D(
|
|
166
|
+
(t) => {
|
|
167
|
+
if (!t || !d.current) return;
|
|
168
|
+
if (!w.current.has(t)) {
|
|
169
|
+
const p = U(d.current, `a[data-href='${t}']`);
|
|
170
|
+
p && X(t, p);
|
|
171
|
+
}
|
|
172
|
+
const n = w.current.get(t);
|
|
173
|
+
n && t !== f && (vt(n, {
|
|
174
|
+
behavior: "instant",
|
|
175
|
+
block: "nearest",
|
|
176
|
+
scrollMode: "if-needed",
|
|
177
|
+
boundary: d.current
|
|
178
|
+
}), wt(t).then(() => {
|
|
179
|
+
ot(V) && V(t, f);
|
|
180
|
+
}));
|
|
181
|
+
},
|
|
182
|
+
[f, V]
|
|
183
|
+
), Z = D(() => {
|
|
184
|
+
let t;
|
|
185
|
+
const n = q(o) ? o : 0, p = T.current, b = _t(p).getBoundingClientRect(), H = document.documentElement.clientHeight;
|
|
186
|
+
return [...w.current.keys()].some((W) => {
|
|
187
|
+
const h = U(document, W);
|
|
188
|
+
let x = !1;
|
|
189
|
+
if (h) {
|
|
190
|
+
const { top: a, height: E } = h.getBoundingClientRect();
|
|
191
|
+
if (ft(p)) {
|
|
192
|
+
const g = A ?? H / 2;
|
|
193
|
+
x = a >= n && a <= g || a <= n && a + E >= g;
|
|
194
|
+
} else {
|
|
195
|
+
const g = a - b.top - n, rt = A ?? b.height / 2;
|
|
196
|
+
x = g >= 0 && g <= rt || g <= 0 && g + E >= rt;
|
|
197
|
+
}
|
|
198
|
+
x && (t = h);
|
|
199
|
+
}
|
|
200
|
+
return x;
|
|
201
|
+
}), t;
|
|
202
|
+
}, [o, A]), P = D(
|
|
203
|
+
$t(
|
|
204
|
+
() => {
|
|
205
|
+
if (Y.current) return;
|
|
206
|
+
const t = Z();
|
|
207
|
+
if (t && t.id) {
|
|
208
|
+
const n = `#${t.id}`;
|
|
209
|
+
F(n);
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
30,
|
|
213
|
+
{ trailing: !0 }
|
|
214
|
+
),
|
|
215
|
+
[Z, F]
|
|
216
|
+
);
|
|
217
|
+
function tt(t) {
|
|
218
|
+
if (t)
|
|
219
|
+
try {
|
|
220
|
+
const n = U(document, t);
|
|
221
|
+
if (!n) return;
|
|
222
|
+
const p = q(o) ? "start" : o, nt = q(o) ? o : 0, b = At(n, { block: p });
|
|
223
|
+
if (!b.length) return;
|
|
224
|
+
let H = !1;
|
|
225
|
+
const W = b.map(({ el: h, top: x }) => new Promise((a) => {
|
|
226
|
+
if (!H) {
|
|
227
|
+
h === T.current && (H = !0);
|
|
228
|
+
const E = x - nt;
|
|
229
|
+
return z ? Wt(h, E, a) : (I || (h.scrollTop = E), a(null));
|
|
230
|
+
}
|
|
231
|
+
a(null);
|
|
232
|
+
}));
|
|
233
|
+
Y.current = !0, Promise.all(W).then(() => {
|
|
234
|
+
Y.current = !1;
|
|
235
|
+
});
|
|
236
|
+
} catch (n) {
|
|
237
|
+
console.error(n);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function St(t, n) {
|
|
241
|
+
I || t.preventDefault(), F(n), tt(n), ot(J) && J(n, f);
|
|
242
|
+
}
|
|
243
|
+
O(() => {
|
|
244
|
+
const t = decodeURIComponent(location.hash);
|
|
245
|
+
t ? (F(t), tt(t)) : P();
|
|
246
|
+
}, []), O(() => (xt || P(), It(T.current, "scroll", P), () => {
|
|
247
|
+
Ft(T.current, "scroll", P);
|
|
248
|
+
}), [u, P]), O(() => {
|
|
249
|
+
const t = w.current.get(f);
|
|
250
|
+
t && !C && R.current && (i === "horizontal" ? (R.current.style.left = `${t.offsetLeft}px`, R.current.style.width = `${t.clientWidth}px`) : R.current.style.top = `${t.offsetTop}px`);
|
|
251
|
+
}, [f, C, i, y, kt]);
|
|
252
|
+
const et = /* @__PURE__ */ it("div", { className: Ct, style: m, ref: d, ...yt, children: [
|
|
253
|
+
!C && f && /* @__PURE__ */ M("div", { className: `${k}-line-slider`, ref: R }),
|
|
254
|
+
/* @__PURE__ */ M(
|
|
255
|
+
mt.Provider,
|
|
256
|
+
{
|
|
257
|
+
value: {
|
|
258
|
+
direction: i,
|
|
259
|
+
currentLink: f,
|
|
260
|
+
addLink: X,
|
|
261
|
+
removeLink: Lt,
|
|
262
|
+
onLinkClick: St
|
|
263
|
+
},
|
|
264
|
+
children: /* @__PURE__ */ M("div", { className: `${k}-list`, children: $ })
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
] });
|
|
268
|
+
return B ? /* @__PURE__ */ M(
|
|
269
|
+
Et,
|
|
270
|
+
{
|
|
271
|
+
offsetTop: v,
|
|
272
|
+
offsetBottom: S,
|
|
273
|
+
style: L,
|
|
274
|
+
target: Nt,
|
|
275
|
+
children: et
|
|
276
|
+
}
|
|
277
|
+
) : et;
|
|
278
|
+
}
|
|
279
|
+
const Kt = ct(Jt), gt = Kt;
|
|
280
|
+
gt.displayName = "Anchor";
|
|
281
|
+
gt.Link = pt;
|
|
282
|
+
export {
|
|
283
|
+
gt as A
|
|
284
|
+
};
|