@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,28 +1,26 @@
|
|
|
1
|
-
import { jsx as i, jsxs as F, Fragment as
|
|
2
|
-
import Ae from "
|
|
3
|
-
import Ue from "@unicom-cloud/icons/IconUiMenuUnfold";
|
|
1
|
+
import { jsx as i, jsxs as F, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
+
import { I as Ae, a as Ue } from "./BqxwlITu.js";
|
|
4
3
|
import He from "lodash/isPlainObject";
|
|
5
|
-
import L, { createContext as Be, useContext as K, forwardRef as X, useRef as J, useEffect as Z, useState as
|
|
6
|
-
import {
|
|
4
|
+
import L, { createContext as Be, useContext as K, forwardRef as X, useRef as J, useEffect as Z, useState as we, useMemo as Fe } from "react";
|
|
5
|
+
import { b as Ce } from "./DUxWiN2U.js";
|
|
7
6
|
import Ve from "../hooks/useForceUpdate.js";
|
|
8
7
|
import le from "../hooks/useId.js";
|
|
9
8
|
import We from "../hooks/useKeyboardEvent.js";
|
|
10
9
|
import Ge from "../hooks/useMergeProps.js";
|
|
11
10
|
import re from "../hooks/useMergeValue.js";
|
|
12
|
-
import { a as ze } from "./
|
|
13
|
-
import B from "
|
|
11
|
+
import { a as ze } from "./DxNRWF67.js";
|
|
12
|
+
import { y as B } from "./Do1aMgY3.js";
|
|
14
13
|
import z from "../utils/omit.js";
|
|
15
14
|
import { y as je } from "./CiZVOdJ3.js";
|
|
16
15
|
import qe from "../hooks/useIsFirstRender.js";
|
|
17
16
|
import Qe from "../Tooltip.js";
|
|
18
17
|
import { Enter as ie, ArrowLeft as Ye, ArrowRight as Je } from "../utils/keyCode.js";
|
|
19
18
|
import { getStyle as ge } from "../utils/style.js";
|
|
20
|
-
import ve from "
|
|
19
|
+
import { I as ve } from "./1mEO29GP.js";
|
|
21
20
|
import Xe from "../hooks/useStateWithPromise.js";
|
|
22
|
-
import { P as Ze } from "./
|
|
21
|
+
import { P as Ze } from "./BP7xX86Q.js";
|
|
23
22
|
import en from "../utils/pick.js";
|
|
24
|
-
import nn from "
|
|
25
|
-
import tn from "@unicom-cloud/icons/IconUiRight";
|
|
23
|
+
import { a as nn, I as tn } from "./D9TqtOhq.js";
|
|
26
24
|
import on from "../Dropdown.js";
|
|
27
25
|
const H = Be({});
|
|
28
26
|
function ee(l) {
|
|
@@ -52,11 +50,11 @@ const Ne = [
|
|
|
52
50
|
}, ke = (l, o = [], e = {}) => {
|
|
53
51
|
const s = Se(l);
|
|
54
52
|
return s.forEach((r, n) => {
|
|
55
|
-
var p,
|
|
53
|
+
var p, I;
|
|
56
54
|
const c = r.key, u = r.type.menuType, h = [c, ...o], y = {
|
|
57
55
|
keyPath: [],
|
|
58
56
|
prev: ((p = s[n - 1]) == null ? void 0 : p.key) || null,
|
|
59
|
-
next: ((
|
|
57
|
+
next: ((I = s[n + 1]) == null ? void 0 : I.key) || null
|
|
60
58
|
};
|
|
61
59
|
if (n === 0 || n === s.length - 1) {
|
|
62
60
|
const a = h[1], N = n === 0 ? "firstChild" : "lastChild";
|
|
@@ -120,24 +118,24 @@ function rn(l, o) {
|
|
|
120
118
|
wrapper: h = "div",
|
|
121
119
|
onClick: y,
|
|
122
120
|
renderItemInTooltip: p,
|
|
123
|
-
...
|
|
121
|
+
...I
|
|
124
122
|
} = l, {
|
|
125
123
|
prefixCls: a,
|
|
126
124
|
mode: N,
|
|
127
|
-
collapse:
|
|
125
|
+
collapse: $,
|
|
128
126
|
inDropdown: t,
|
|
129
|
-
levelIndent:
|
|
127
|
+
levelIndent: m,
|
|
130
128
|
selectedKeys: d,
|
|
131
|
-
autoScrollIntoView:
|
|
129
|
+
autoScrollIntoView: C,
|
|
132
130
|
scrollConfig: M,
|
|
133
131
|
tooltipProps: b,
|
|
134
132
|
onClickMenuItem: S
|
|
135
|
-
} = K(H),
|
|
133
|
+
} = K(H), f = J(null), E = qe(), x = N === "vertical" && r > 1, O = $ && !t && r === 1, P = d && ~d.indexOf(e);
|
|
136
134
|
Z(() => {
|
|
137
|
-
const k =
|
|
138
|
-
|
|
135
|
+
const k = P && C;
|
|
136
|
+
f.current && k && setTimeout(
|
|
139
137
|
() => {
|
|
140
|
-
|
|
138
|
+
f.current && je(f.current, {
|
|
141
139
|
behavior: "smooth",
|
|
142
140
|
block: "start",
|
|
143
141
|
scrollMode: "if-needed",
|
|
@@ -147,25 +145,25 @@ function rn(l, o) {
|
|
|
147
145
|
},
|
|
148
146
|
E ? 500 : 0
|
|
149
147
|
);
|
|
150
|
-
}, [
|
|
148
|
+
}, [P, C]);
|
|
151
149
|
const A = (k) => {
|
|
152
150
|
n || (S == null || S(e, k), y == null || y(k));
|
|
153
|
-
},
|
|
151
|
+
}, w = /* @__PURE__ */ F(
|
|
154
152
|
h,
|
|
155
153
|
{
|
|
156
154
|
tabIndex: n ? -1 : 0,
|
|
157
155
|
role: "menuitem",
|
|
158
156
|
ref: (k) => {
|
|
159
|
-
o = k,
|
|
157
|
+
o = k, f.current = o;
|
|
160
158
|
},
|
|
161
159
|
style: u,
|
|
162
160
|
className: B(
|
|
163
161
|
`${a}-item`,
|
|
164
162
|
{
|
|
165
163
|
[`${a}-disabled`]: n,
|
|
166
|
-
[`${a}-selected`]:
|
|
164
|
+
[`${a}-selected`]: P,
|
|
167
165
|
// 存在缩进dom
|
|
168
|
-
[`${a}-item-indented`]: x &&
|
|
166
|
+
[`${a}-item-indented`]: x && !$
|
|
169
167
|
},
|
|
170
168
|
c
|
|
171
169
|
),
|
|
@@ -174,16 +172,16 @@ function rn(l, o) {
|
|
|
174
172
|
k.key === ie.key && A(k);
|
|
175
173
|
},
|
|
176
174
|
...z(
|
|
177
|
-
|
|
175
|
+
I,
|
|
178
176
|
["key", "_key"].concat(Ne)
|
|
179
177
|
),
|
|
180
178
|
children: [
|
|
181
|
-
x &&
|
|
179
|
+
x && !$ ? /* @__PURE__ */ F(Ie, { children: [
|
|
182
180
|
/* @__PURE__ */ i(
|
|
183
181
|
ee,
|
|
184
182
|
{
|
|
185
183
|
prefixCls: a,
|
|
186
|
-
levelIndent:
|
|
184
|
+
levelIndent: m,
|
|
187
185
|
level: r
|
|
188
186
|
}
|
|
189
187
|
),
|
|
@@ -198,7 +196,7 @@ function rn(l, o) {
|
|
|
198
196
|
}
|
|
199
197
|
)
|
|
200
198
|
] }) : s,
|
|
201
|
-
|
|
199
|
+
P && N === "horizontal" ? /* @__PURE__ */ i("div", { className: `${a}-selected-label` }) : null
|
|
202
200
|
]
|
|
203
201
|
}
|
|
204
202
|
);
|
|
@@ -213,9 +211,9 @@ function rn(l, o) {
|
|
|
213
211
|
...(b == null ? void 0 : b.triggerProps) || {}
|
|
214
212
|
},
|
|
215
213
|
...z(b, ["triggerProps"]),
|
|
216
|
-
children:
|
|
214
|
+
children: w
|
|
217
215
|
}
|
|
218
|
-
) :
|
|
216
|
+
) : w;
|
|
219
217
|
}
|
|
220
218
|
const sn = X(rn), ce = sn;
|
|
221
219
|
ce.displayName = "MenuItem";
|
|
@@ -263,52 +261,52 @@ const se = { height: 0, visibility: "hidden" }, an = (l) => {
|
|
|
263
261
|
...y
|
|
264
262
|
} = l, {
|
|
265
263
|
id: p,
|
|
266
|
-
prefixCls:
|
|
264
|
+
prefixCls: I,
|
|
267
265
|
levelIndent: a,
|
|
268
266
|
openKeys: N = [],
|
|
269
|
-
selectedKeys:
|
|
267
|
+
selectedKeys: $ = [],
|
|
270
268
|
icons: t,
|
|
271
|
-
onClickSubMenu:
|
|
269
|
+
onClickSubMenu: m,
|
|
272
270
|
onClickMenuItem: d
|
|
273
|
-
} = K(H),
|
|
271
|
+
} = K(H), C = `${I}-inline`, M = (N == null ? void 0 : N.indexOf(o)) > -1, b = h && $.indexOf(l._key) > -1 || xe(e, $), [S, f] = Xe(
|
|
274
272
|
M ? { height: "auto" } : se
|
|
275
|
-
), E = (
|
|
276
|
-
|
|
273
|
+
), E = (w) => {
|
|
274
|
+
m(o, c, "inline"), h && d(o, w);
|
|
277
275
|
}, x = le(`${p}-submenu-inline-`), O = ne(e, {
|
|
278
276
|
...en(y, Ne),
|
|
279
277
|
level: c + 1,
|
|
280
278
|
selectable: h
|
|
281
|
-
}),
|
|
279
|
+
}), P = /* @__PURE__ */ F(
|
|
282
280
|
"div",
|
|
283
281
|
{
|
|
284
282
|
tabIndex: 0,
|
|
285
283
|
"aria-expanded": M,
|
|
286
284
|
"aria-controls": x,
|
|
287
|
-
className: B(`${
|
|
288
|
-
[`${
|
|
285
|
+
className: B(`${C}-header`, {
|
|
286
|
+
[`${I}-selected`]: b
|
|
289
287
|
}),
|
|
290
288
|
onClick: E,
|
|
291
|
-
onKeyDown: (
|
|
292
|
-
|
|
289
|
+
onKeyDown: (w) => {
|
|
290
|
+
w.key === ie.key && E(w);
|
|
293
291
|
},
|
|
294
292
|
children: [
|
|
295
293
|
/* @__PURE__ */ i(
|
|
296
294
|
ee,
|
|
297
295
|
{
|
|
298
296
|
level: c,
|
|
299
|
-
prefixCls:
|
|
297
|
+
prefixCls: I,
|
|
300
298
|
levelIndent: a
|
|
301
299
|
}
|
|
302
300
|
),
|
|
303
301
|
/* @__PURE__ */ i("span", { children: n }),
|
|
304
|
-
/* @__PURE__ */ i("span", { className: `${
|
|
302
|
+
/* @__PURE__ */ i("span", { className: `${I}-icon-suffix ${M ? "is-open" : ""}`, children: t && t.horizontalArrowDown ? t.horizontalArrowDown : /* @__PURE__ */ i(ve, {}) })
|
|
305
303
|
]
|
|
306
304
|
}
|
|
307
305
|
), A = /* @__PURE__ */ i(
|
|
308
306
|
"div",
|
|
309
307
|
{
|
|
310
308
|
id: x,
|
|
311
|
-
className: B(`${
|
|
309
|
+
className: B(`${C}-content`),
|
|
312
310
|
style: S,
|
|
313
311
|
children: O
|
|
314
312
|
}
|
|
@@ -317,26 +315,26 @@ const se = { height: 0, visibility: "hidden" }, an = (l) => {
|
|
|
317
315
|
"div",
|
|
318
316
|
{
|
|
319
317
|
ref: u,
|
|
320
|
-
className: B(
|
|
318
|
+
className: B(C, r),
|
|
321
319
|
style: s,
|
|
322
320
|
...z(y, ["key", "popup", "triggerProps"]),
|
|
323
321
|
children: [
|
|
324
|
-
|
|
322
|
+
P,
|
|
325
323
|
/* @__PURE__ */ i(
|
|
326
324
|
Ze,
|
|
327
325
|
{
|
|
328
326
|
in: M,
|
|
329
327
|
timeout: 200,
|
|
330
|
-
classNames:
|
|
328
|
+
classNames: C,
|
|
331
329
|
unmountOnExit: !1,
|
|
332
|
-
onEnter: async (
|
|
333
|
-
|
|
330
|
+
onEnter: async (w) => {
|
|
331
|
+
w && (await f(se), await f({ height: w.scrollHeight }));
|
|
334
332
|
},
|
|
335
333
|
onEntered: () => {
|
|
336
|
-
|
|
334
|
+
f({ height: "auto" });
|
|
337
335
|
},
|
|
338
|
-
onExit: async (
|
|
339
|
-
|
|
336
|
+
onExit: async (w) => {
|
|
337
|
+
w && (await f({ height: w.scrollHeight }), await f(se));
|
|
340
338
|
},
|
|
341
339
|
children: A
|
|
342
340
|
}
|
|
@@ -357,20 +355,20 @@ const se = { height: 0, visibility: "hidden" }, an = (l) => {
|
|
|
357
355
|
triggerProps: y,
|
|
358
356
|
...p
|
|
359
357
|
} = l, {
|
|
360
|
-
id:
|
|
358
|
+
id: I,
|
|
361
359
|
prefixCls: a,
|
|
362
360
|
mode: N,
|
|
363
|
-
inDropdown:
|
|
361
|
+
inDropdown: $,
|
|
364
362
|
levelIndent: t,
|
|
365
|
-
selectedKeys:
|
|
363
|
+
selectedKeys: m = [],
|
|
366
364
|
icons: d,
|
|
367
|
-
triggerProps:
|
|
365
|
+
triggerProps: C,
|
|
368
366
|
onClickSubMenu: M,
|
|
369
367
|
onClickMenuItem: b
|
|
370
|
-
} = K(H), { rtl: S } = K(
|
|
368
|
+
} = K(H), { rtl: S } = K(Ce), f = { ...C, ...y }, [E, x] = we(!1), O = `${a}-pop`, P = u && m.indexOf(l._key) > -1, A = N === "horizontal" && !$, w = le(`${I}-submenu-pop-`), k = () => {
|
|
371
369
|
const _ = d && d.popArrowRight ? d.popArrowRight : S ? /* @__PURE__ */ i(nn, {}) : /* @__PURE__ */ i(tn, {}), v = d && d.horizontalArrowDown ? d.horizontalArrowDown : /* @__PURE__ */ i(ve, {});
|
|
372
370
|
return /* @__PURE__ */ i("span", { className: `${a}-icon-suffix`, children: A ? v : _ });
|
|
373
|
-
}, V = xe(e,
|
|
371
|
+
}, V = xe(e, m) || P, G = S ? ["br", "lt"] : ["bl", "rt"], q = (_) => {
|
|
374
372
|
M(o, c, "pop"), u && b(o, _);
|
|
375
373
|
};
|
|
376
374
|
return /* @__PURE__ */ i(
|
|
@@ -382,8 +380,8 @@ const se = { height: 0, visibility: "hidden" }, an = (l) => {
|
|
|
382
380
|
droplist: /* @__PURE__ */ i(
|
|
383
381
|
j,
|
|
384
382
|
{
|
|
385
|
-
id:
|
|
386
|
-
selectedKeys:
|
|
383
|
+
id: w,
|
|
384
|
+
selectedKeys: m,
|
|
387
385
|
onClickMenuItem: (_, v) => {
|
|
388
386
|
b(_, v), x(!1);
|
|
389
387
|
},
|
|
@@ -400,9 +398,9 @@ const se = { height: 0, visibility: "hidden" }, an = (l) => {
|
|
|
400
398
|
mouseLeaveDelay: 50,
|
|
401
399
|
className: B(
|
|
402
400
|
`${O}-trigger`,
|
|
403
|
-
|
|
401
|
+
f && f.className
|
|
404
402
|
),
|
|
405
|
-
...z(
|
|
403
|
+
...z(f, ["className"])
|
|
406
404
|
},
|
|
407
405
|
children: /* @__PURE__ */ F(
|
|
408
406
|
"div",
|
|
@@ -410,7 +408,7 @@ const se = { height: 0, visibility: "hidden" }, an = (l) => {
|
|
|
410
408
|
tabIndex: 0,
|
|
411
409
|
"aria-haspopup": !0,
|
|
412
410
|
"aria-expanded": E,
|
|
413
|
-
"aria-controls":
|
|
411
|
+
"aria-controls": w,
|
|
414
412
|
ref: h,
|
|
415
413
|
style: s,
|
|
416
414
|
className: B(
|
|
@@ -446,15 +444,15 @@ const se = { height: 0, visibility: "hidden" }, an = (l) => {
|
|
|
446
444
|
);
|
|
447
445
|
};
|
|
448
446
|
function pn(l, o) {
|
|
449
|
-
const { children: e, popup: s, level: r } = l, { mode: n, collapse: c, inDropdown: u, collectInlineMenuKeys: h } = K(H),
|
|
447
|
+
const { children: e, popup: s, level: r } = l, { mode: n, collapse: c, inDropdown: u, collectInlineMenuKeys: h } = K(H), I = !!(typeof s == "function" ? s(r) : s) || c || u || n !== "vertical" ? un : an;
|
|
450
448
|
return Z(() => (h(l._key), () => {
|
|
451
449
|
h(l._key, !0);
|
|
452
|
-
}), []), /* @__PURE__ */ i(
|
|
450
|
+
}), []), /* @__PURE__ */ i(I, { forwardedRef: o, ...l, children: e });
|
|
453
451
|
}
|
|
454
452
|
const dn = X(pn), te = dn;
|
|
455
453
|
te.displayName = "SubMenu";
|
|
456
454
|
te.menuType = "SubMenu";
|
|
457
|
-
const
|
|
455
|
+
const fn = 5;
|
|
458
456
|
function Me(l) {
|
|
459
457
|
return l && Math.ceil(+l.getBoundingClientRect().width);
|
|
460
458
|
}
|
|
@@ -462,81 +460,81 @@ function be(l) {
|
|
|
462
460
|
const o = Number(l.replace("px", ""));
|
|
463
461
|
return isNaN(o) ? 0 : o;
|
|
464
462
|
}
|
|
465
|
-
const
|
|
466
|
-
const { children: o, ellipsisText: e = "···", onEllipsisChange: s } = l, { prefixCls: r } = K(H), n = J(null), [c, u] =
|
|
463
|
+
const mn = (l) => {
|
|
464
|
+
const { children: o, ellipsisText: e = "···", onEllipsisChange: s } = l, { prefixCls: r } = K(H), n = J(null), [c, u] = we(null), h = `${r}-overflow-sub-menu`, y = `${r}-overflow-hidden-menu-item`, p = `${r}-overflow-sub-menu-mirror`, I = (t) => {
|
|
467
465
|
if (t !== c) {
|
|
468
|
-
const
|
|
466
|
+
const m = L.Children.toArray(o), d = t === null;
|
|
469
467
|
s == null || s({
|
|
470
|
-
lastVisibleIndex: d ?
|
|
471
|
-
overflowNodes: d ? [] :
|
|
468
|
+
lastVisibleIndex: d ? m.length - 1 : t,
|
|
469
|
+
overflowNodes: d ? [] : m.slice(t + 1)
|
|
472
470
|
}), u(t);
|
|
473
471
|
}
|
|
474
472
|
};
|
|
475
473
|
function a() {
|
|
476
474
|
if (!n.current)
|
|
477
475
|
return;
|
|
478
|
-
const t = n.current,
|
|
479
|
-
let
|
|
476
|
+
const t = n.current, m = Me(t) - fn, d = [].slice.call(t.children);
|
|
477
|
+
let C = 0, M = 0, b = 0;
|
|
480
478
|
for (let S = 0; S < d.length; S++) {
|
|
481
|
-
const
|
|
479
|
+
const f = d[S], E = f.className.split(" "), x = E.indexOf(h) > -1, O = E.indexOf(p) > -1;
|
|
482
480
|
if (x)
|
|
483
481
|
continue;
|
|
484
|
-
const
|
|
482
|
+
const P = Me(f) + be(ge(f, "marginLeft")) + be(ge(f, "marginRight"));
|
|
485
483
|
if (O) {
|
|
486
|
-
b =
|
|
484
|
+
b = P;
|
|
487
485
|
continue;
|
|
488
486
|
}
|
|
489
|
-
if (M +=
|
|
490
|
-
|
|
487
|
+
if (M += P, M > m) {
|
|
488
|
+
I(
|
|
491
489
|
// 判断如果将最后一个菜单项换为 ... 是否会超出宽度
|
|
492
|
-
|
|
490
|
+
C - (M - P + b <= m ? 1 : 2)
|
|
493
491
|
);
|
|
494
492
|
return;
|
|
495
493
|
}
|
|
496
|
-
|
|
494
|
+
C++;
|
|
497
495
|
}
|
|
498
|
-
|
|
496
|
+
I(null);
|
|
499
497
|
}
|
|
500
|
-
const N = (t,
|
|
498
|
+
const N = (t, m = !1) => /* @__PURE__ */ i(
|
|
501
499
|
te,
|
|
502
500
|
{
|
|
503
501
|
title: /* @__PURE__ */ i("span", { children: e }),
|
|
504
|
-
className:
|
|
502
|
+
className: m ? p : h,
|
|
505
503
|
children: t
|
|
506
504
|
},
|
|
507
|
-
`pqb-menu-overflow-sub-menu${
|
|
508
|
-
),
|
|
505
|
+
`pqb-menu-overflow-sub-menu${m ? "-mirror" : ""}`
|
|
506
|
+
), $ = () => {
|
|
509
507
|
let t = null;
|
|
510
|
-
const
|
|
511
|
-
let b =
|
|
512
|
-
if (c !== null && (M > c && (b = L.cloneElement(
|
|
508
|
+
const m = N(null, !0), d = L.Children.map(o, (C, M) => {
|
|
509
|
+
let b = C;
|
|
510
|
+
if (c !== null && (M > c && (b = L.cloneElement(C, {
|
|
513
511
|
className: y
|
|
514
512
|
})), M === c + 1)) {
|
|
515
513
|
const S = L.Children.toArray(o).slice(c + 1).map(
|
|
516
|
-
(
|
|
517
|
-
key:
|
|
514
|
+
(f) => L.cloneElement(f, {
|
|
515
|
+
key: f.props._key
|
|
518
516
|
})
|
|
519
517
|
);
|
|
520
518
|
t = N(S);
|
|
521
519
|
}
|
|
522
520
|
return b;
|
|
523
521
|
}) ?? [];
|
|
524
|
-
return [
|
|
522
|
+
return [m, ...d, t];
|
|
525
523
|
};
|
|
526
524
|
return Z(() => {
|
|
527
525
|
let t;
|
|
528
526
|
return n.current && (t = new ResizeObserver(a), t.observe(n.current)), () => {
|
|
529
|
-
var
|
|
530
|
-
n.current && ((
|
|
527
|
+
var m, d;
|
|
528
|
+
n.current && ((m = t == null ? void 0 : t.unobserve) == null || m.call(t, n.current)), (d = t == null ? void 0 : t.disconnect) == null || d.call(t), t = null;
|
|
531
529
|
};
|
|
532
|
-
}, [n.current]), /* @__PURE__ */ i("div", { className: `${r}-overflow-wrap`, ref: n, children:
|
|
530
|
+
}, [n.current]), /* @__PURE__ */ i("div", { className: `${r}-overflow-wrap`, ref: n, children: $() });
|
|
533
531
|
}, hn = "light", yn = {
|
|
534
532
|
mode: "vertical",
|
|
535
533
|
selectable: !0,
|
|
536
534
|
ellipsis: !0
|
|
537
535
|
};
|
|
538
536
|
function gn(l, o) {
|
|
539
|
-
const { getPrefixCls: e, componentConfig: s, rtl: r } = K(
|
|
537
|
+
const { getPrefixCls: e, componentConfig: s, rtl: r } = K(Ce), n = Ge(
|
|
540
538
|
l,
|
|
541
539
|
yn,
|
|
542
540
|
s == null ? void 0 : s.Menu
|
|
@@ -546,24 +544,24 @@ function gn(l, o) {
|
|
|
546
544
|
className: h,
|
|
547
545
|
prefixCls: y,
|
|
548
546
|
mode: p,
|
|
549
|
-
theme:
|
|
547
|
+
theme: I,
|
|
550
548
|
icons: a,
|
|
551
549
|
levelIndent: N,
|
|
552
|
-
collapse:
|
|
550
|
+
collapse: $,
|
|
553
551
|
inDropdown: t,
|
|
554
|
-
selectable:
|
|
552
|
+
selectable: m,
|
|
555
553
|
triggerProps: d,
|
|
556
|
-
tooltipProps:
|
|
554
|
+
tooltipProps: C,
|
|
557
555
|
ellipsis: M,
|
|
558
556
|
accordion: b,
|
|
559
557
|
autoOpen: S,
|
|
560
|
-
autoScrollIntoView:
|
|
558
|
+
autoScrollIntoView: f,
|
|
561
559
|
scrollConfig: E,
|
|
562
560
|
hasCollapseButton: x,
|
|
563
561
|
defaultOpenKeys: O,
|
|
564
|
-
defaultSelectedKeys:
|
|
562
|
+
defaultSelectedKeys: P,
|
|
565
563
|
openKeys: A,
|
|
566
|
-
selectedKeys:
|
|
564
|
+
selectedKeys: w,
|
|
567
565
|
onClickSubMenu: k,
|
|
568
566
|
onClickMenuItem: V,
|
|
569
567
|
onCollapseChange: G,
|
|
@@ -572,12 +570,12 @@ function gn(l, o) {
|
|
|
572
570
|
} = n, [v, ue] = re([], {
|
|
573
571
|
defaultValue: O,
|
|
574
572
|
value: A
|
|
575
|
-
}), [$e
|
|
576
|
-
defaultValue:
|
|
577
|
-
value:
|
|
573
|
+
}), [Pe, $e] = re([], {
|
|
574
|
+
defaultValue: P,
|
|
575
|
+
value: w
|
|
578
576
|
}), [Q, Ee] = re(!1, {
|
|
579
|
-
value:
|
|
580
|
-
}), Te = K(H), { siderCollapsed: Oe } = K(ze), R = y || e("menu"), Y = Oe || Q || t || p === "popButton", pe =
|
|
577
|
+
value: $
|
|
578
|
+
}), Te = K(H), { siderCollapsed: Oe } = K(ze), R = y || e("menu"), Y = Oe || Q || t || p === "popButton", pe = I || Te.theme || hn, W = J([]), de = J([]), _e = Ve(), Re = We(), fe = Fe(() => ke(u), [u]), De = le(`${R}-`), oe = _.id || De;
|
|
581
579
|
Z(() => {
|
|
582
580
|
let g = v.filter(
|
|
583
581
|
(T) => W.current.indexOf(T) !== -1
|
|
@@ -590,21 +588,21 @@ function gn(l, o) {
|
|
|
590
588
|
}
|
|
591
589
|
ue(b ? g.slice(0, 1) : g), de.current = W.current.slice();
|
|
592
590
|
}, [W.current.toString()]);
|
|
593
|
-
const
|
|
594
|
-
const g = ne(u, { level: 1 }), T = Q ? a && a.collapseActive || /* @__PURE__ */ i(
|
|
591
|
+
const me = p !== "horizontal" && p !== "popButton" && !t && x, Ke = () => {
|
|
592
|
+
const g = ne(u, { level: 1 }), T = Q ? a && a.collapseActive || /* @__PURE__ */ i(Ae, {}) : a && a.collapseDefault || /* @__PURE__ */ i(Ue, {}), D = () => {
|
|
595
593
|
const U = !Q;
|
|
596
594
|
Ee(U), G == null || G(U);
|
|
597
595
|
};
|
|
598
|
-
return /* @__PURE__ */ F(
|
|
596
|
+
return /* @__PURE__ */ F(Ie, { children: [
|
|
599
597
|
/* @__PURE__ */ i("div", { className: `${R}-inner`, children: p === "horizontal" && M !== !1 ? /* @__PURE__ */ i(
|
|
600
|
-
|
|
598
|
+
mn,
|
|
601
599
|
{
|
|
602
600
|
ellipsisText: He(M) ? M.text : "···",
|
|
603
601
|
onEllipsisChange: q,
|
|
604
602
|
children: g
|
|
605
603
|
}
|
|
606
604
|
) : g }),
|
|
607
|
-
|
|
605
|
+
me && /* @__PURE__ */ i(
|
|
608
606
|
"div",
|
|
609
607
|
{
|
|
610
608
|
tabIndex: 0,
|
|
@@ -622,7 +620,7 @@ function gn(l, o) {
|
|
|
622
620
|
return Y && !t && delete he.width, /* @__PURE__ */ i(
|
|
623
621
|
"div",
|
|
624
622
|
{
|
|
625
|
-
id:
|
|
623
|
+
id: me ? oe : void 0,
|
|
626
624
|
role: "menu",
|
|
627
625
|
...z(_, ["isMenu"]),
|
|
628
626
|
ref: o,
|
|
@@ -649,12 +647,12 @@ function gn(l, o) {
|
|
|
649
647
|
collapse: Y,
|
|
650
648
|
levelIndent: N,
|
|
651
649
|
inDropdown: t,
|
|
652
|
-
selectedKeys:
|
|
650
|
+
selectedKeys: Pe,
|
|
653
651
|
openKeys: v,
|
|
654
652
|
icons: a,
|
|
655
653
|
triggerProps: d,
|
|
656
|
-
tooltipProps:
|
|
657
|
-
autoScrollIntoView:
|
|
654
|
+
tooltipProps: C,
|
|
655
|
+
autoScrollIntoView: f,
|
|
658
656
|
scrollConfig: E,
|
|
659
657
|
// pass props directly
|
|
660
658
|
id: oe,
|
|
@@ -666,12 +664,12 @@ function gn(l, o) {
|
|
|
666
664
|
},
|
|
667
665
|
onClickMenuItem: (g, T) => {
|
|
668
666
|
var D;
|
|
669
|
-
|
|
667
|
+
m && $e([g]), V == null || V(g, T, (D = fe[g]) == null ? void 0 : D.keyPath);
|
|
670
668
|
},
|
|
671
669
|
onClickSubMenu: (g, T, D) => {
|
|
672
670
|
var ye;
|
|
673
671
|
let U = [...v];
|
|
674
|
-
D === "inline" && ((v == null ? void 0 : v.indexOf(g)) > -1 ? b && T === 1 ? U = [] : U = v.filter((Le) => Le !== g) : b && T === 1 ? U = [g] : U = v.concat([g])), ue(U), k == null || k(g, U, (ye =
|
|
672
|
+
D === "inline" && ((v == null ? void 0 : v.indexOf(g)) > -1 ? b && T === 1 ? U = [] : U = v.filter((Le) => Le !== g) : b && T === 1 ? U = [g] : U = v.concat([g])), ue(U), k == null || k(g, U, (ye = fe[g]) == null ? void 0 : ye.keyPath);
|
|
675
673
|
}
|
|
676
674
|
},
|
|
677
675
|
children: Ke()
|