@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
package/Affix.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as $, jsx as R } from "react/jsx-runtime";
|
|
2
2
|
import w from "lodash/isFunction";
|
|
3
3
|
import q from "lodash/isPlainObject";
|
|
4
4
|
import v from "lodash/isUndefined";
|
|
5
5
|
import { forwardRef as G, useContext as J, useState as K, useRef as h, useCallback as Q, useEffect as p, useImperativeHandle as V } from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { b as X } from "./chunk/DUxWiN2U.js";
|
|
7
7
|
import Y from "./hooks/useIsomorphicLayoutEffect.js";
|
|
8
8
|
import Z from "./hooks/useMergeProps.js";
|
|
9
|
-
import
|
|
9
|
+
import { y as b } from "./chunk/Do1aMgY3.js";
|
|
10
10
|
import { on as E, off as C } from "./utils/dom.js";
|
|
11
11
|
import { isWindow as O } from "./utils/is.js";
|
|
12
12
|
import tt from "./utils/throttleByRaf.js";
|
|
@@ -20,7 +20,7 @@ const ot = {
|
|
|
20
20
|
offsetTop: 0,
|
|
21
21
|
target: () => window
|
|
22
22
|
};
|
|
23
|
-
function rt(l,
|
|
23
|
+
function rt(l, U) {
|
|
24
24
|
const { getPrefixCls: B, componentConfig: d, rtl: H } = J(X), I = Z(
|
|
25
25
|
l,
|
|
26
26
|
ot,
|
|
@@ -29,25 +29,25 @@ function rt(l, b) {
|
|
|
29
29
|
className: _,
|
|
30
30
|
style: j,
|
|
31
31
|
affixClassName: D,
|
|
32
|
-
affixStyle:
|
|
33
|
-
offsetTop:
|
|
34
|
-
offsetBottom:
|
|
32
|
+
affixStyle: A,
|
|
33
|
+
offsetTop: u,
|
|
34
|
+
offsetBottom: s,
|
|
35
35
|
target: i,
|
|
36
36
|
targetContainer: f,
|
|
37
37
|
children: W,
|
|
38
38
|
onChange: x,
|
|
39
|
-
|
|
40
|
-
} = I, [S,
|
|
39
|
+
...k
|
|
40
|
+
} = I, [S, N] = K({
|
|
41
41
|
status: "MEASURE_DONE",
|
|
42
42
|
isFixed: !1,
|
|
43
43
|
sizeStyles: {},
|
|
44
44
|
fixedStyles: {}
|
|
45
|
-
}), { isFixed:
|
|
46
|
-
{ [T]:
|
|
45
|
+
}), { isFixed: y, sizeStyles: z, fixedStyles: L } = S, F = h(y), T = B("affix"), P = b(
|
|
46
|
+
{ [T]: y, [`${T}-rtl`]: H },
|
|
47
47
|
D
|
|
48
48
|
), o = h(null), r = h(null), e = Q(
|
|
49
49
|
tt(() => {
|
|
50
|
-
|
|
50
|
+
N({
|
|
51
51
|
status: "MEASURE_START",
|
|
52
52
|
isFixed: !1,
|
|
53
53
|
fixedStyles: {},
|
|
@@ -60,29 +60,29 @@ function rt(l, b) {
|
|
|
60
60
|
const { status: t } = S;
|
|
61
61
|
if (t !== "MEASURE_START" || !o.current || !r.current)
|
|
62
62
|
return;
|
|
63
|
-
const
|
|
64
|
-
let
|
|
65
|
-
|
|
63
|
+
const a = v(s) ? "top" : "bottom", c = o.current.getBoundingClientRect(), m = et(r.current);
|
|
64
|
+
let n = !1, g = {};
|
|
65
|
+
a === "top" ? (n = c.top - m.top < (u || 0), g = n ? {
|
|
66
66
|
position: "fixed",
|
|
67
|
-
top: m.top + (
|
|
68
|
-
} : {}) : (
|
|
67
|
+
top: m.top + (u || 0)
|
|
68
|
+
} : {}) : (n = m.bottom - c.bottom < (s || 0), g = n ? {
|
|
69
69
|
position: "fixed",
|
|
70
|
-
bottom: window.innerHeight - m.bottom + (
|
|
70
|
+
bottom: window.innerHeight - m.bottom + (s || 0)
|
|
71
71
|
} : {});
|
|
72
|
-
const M =
|
|
72
|
+
const M = n ? {
|
|
73
73
|
width: o.current.offsetWidth,
|
|
74
74
|
height: o.current.offsetHeight
|
|
75
75
|
} : {};
|
|
76
|
-
|
|
76
|
+
N({
|
|
77
77
|
status: "MEASURE_DONE",
|
|
78
|
-
isFixed:
|
|
78
|
+
isFixed: n,
|
|
79
79
|
sizeStyles: M,
|
|
80
|
-
fixedStyles: { ...
|
|
81
|
-
}),
|
|
82
|
-
}, [S,
|
|
80
|
+
fixedStyles: { ...g, ...M }
|
|
81
|
+
}), n !== F.current && (F.current = n, w(x) && x(n));
|
|
82
|
+
}, [S, s, u, x]), p(() => (e(), () => {
|
|
83
83
|
var t;
|
|
84
84
|
(t = e == null ? void 0 : e.cancel) == null || t.call(e);
|
|
85
|
-
}), [i, f,
|
|
85
|
+
}), [i, f, s, u, e]), p(() => {
|
|
86
86
|
if (r.current = i && w(i) ? i() : null, r.current)
|
|
87
87
|
return E(r.current, "scroll", e), E(r.current, "resize", e), () => {
|
|
88
88
|
C(r.current, "scroll", e), C(r.current, "resize", e);
|
|
@@ -93,34 +93,34 @@ function rt(l, b) {
|
|
|
93
93
|
return E(t, "scroll", e), () => {
|
|
94
94
|
C(t, "scroll", e);
|
|
95
95
|
};
|
|
96
|
-
}, [f, e]), V(
|
|
96
|
+
}, [f, e]), V(U, () => ({
|
|
97
97
|
updatePosition: e,
|
|
98
98
|
getRootDOMNode: () => o.current
|
|
99
99
|
})), p(() => {
|
|
100
100
|
let t;
|
|
101
101
|
return o.current && (t = new ResizeObserver(e), t.observe(o.current)), () => {
|
|
102
|
-
var
|
|
103
|
-
o.current && ((
|
|
102
|
+
var a, c;
|
|
103
|
+
o.current && ((a = t == null ? void 0 : t.unobserve) == null || a.call(t, o.current)), (c = t == null ? void 0 : t.disconnect) == null || c.call(t), t = null;
|
|
104
104
|
};
|
|
105
|
-
}, [o.current]), /* @__PURE__ */
|
|
106
|
-
|
|
105
|
+
}, [o.current]), /* @__PURE__ */ $("div", { className: b(_), style: j, ref: o, ...k, children: [
|
|
106
|
+
y && /* @__PURE__ */ R("div", { style: z }),
|
|
107
107
|
/* @__PURE__ */ R(
|
|
108
108
|
"div",
|
|
109
109
|
{
|
|
110
|
-
className:
|
|
110
|
+
className: P,
|
|
111
111
|
style: {
|
|
112
|
-
...
|
|
113
|
-
...q(
|
|
112
|
+
...L,
|
|
113
|
+
...q(A) ? A : {}
|
|
114
114
|
},
|
|
115
115
|
children: W || /* @__PURE__ */ R("span", {})
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
] });
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const nt = G(
|
|
121
121
|
rt
|
|
122
122
|
);
|
|
123
|
-
|
|
123
|
+
nt.displayName = "Affix";
|
|
124
124
|
export {
|
|
125
|
-
|
|
125
|
+
nt as default
|
|
126
126
|
};
|
package/Alert.js
CHANGED
|
@@ -1,70 +1,66 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import S from "
|
|
3
|
-
import j from "@unicom-cloud/icons/IconUiClose";
|
|
4
|
-
import k from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
5
|
-
import R from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
6
|
-
import T from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
1
|
+
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { I as S, a as j, b as k, c as R, d as T } from "./chunk/B45v5S9k.js";
|
|
7
3
|
import { forwardRef as q, useRef as z, useContext as H, useState as M } from "react";
|
|
8
|
-
import {
|
|
4
|
+
import { b as O } from "./chunk/DUxWiN2U.js";
|
|
9
5
|
import V from "./hooks/useMergeProps.js";
|
|
10
|
-
import _ from "
|
|
11
|
-
import { P as B } from "./chunk/
|
|
6
|
+
import { y as _ } from "./chunk/Do1aMgY3.js";
|
|
7
|
+
import { P as B } from "./chunk/BP7xX86Q.js";
|
|
12
8
|
const D = {
|
|
13
9
|
showIcon: !0,
|
|
14
10
|
type: "info"
|
|
15
11
|
};
|
|
16
|
-
function G(
|
|
17
|
-
|
|
18
|
-
const { getPrefixCls:
|
|
19
|
-
|
|
12
|
+
function G(p, i) {
|
|
13
|
+
i || (i = z());
|
|
14
|
+
const { getPrefixCls: b, componentConfig: n, rtl: h } = H(O), c = V(
|
|
15
|
+
p,
|
|
20
16
|
D,
|
|
21
|
-
|
|
17
|
+
n == null ? void 0 : n.Alert
|
|
22
18
|
), {
|
|
23
|
-
style:
|
|
24
|
-
className:
|
|
19
|
+
style: C,
|
|
20
|
+
className: I,
|
|
25
21
|
action: a,
|
|
26
22
|
type: m = "info",
|
|
27
|
-
title:
|
|
23
|
+
title: s,
|
|
28
24
|
content: u,
|
|
29
|
-
icon:
|
|
30
|
-
showIcon:
|
|
31
|
-
closable:
|
|
32
|
-
closeable:
|
|
33
|
-
afterClose:
|
|
34
|
-
onClose:
|
|
25
|
+
icon: d,
|
|
26
|
+
showIcon: N,
|
|
27
|
+
closable: $,
|
|
28
|
+
closeable: x,
|
|
29
|
+
afterClose: o,
|
|
30
|
+
onClose: r,
|
|
35
31
|
closeElement: w,
|
|
36
32
|
banner: v,
|
|
37
33
|
...y
|
|
38
|
-
} = c, e =
|
|
39
|
-
function A(
|
|
40
|
-
if (
|
|
41
|
-
return
|
|
42
|
-
switch (
|
|
34
|
+
} = c, e = b("alert"), [P, U] = M(!0);
|
|
35
|
+
function A(l) {
|
|
36
|
+
if (d)
|
|
37
|
+
return d;
|
|
38
|
+
switch (l) {
|
|
43
39
|
case "info":
|
|
44
40
|
return /* @__PURE__ */ t(T, {});
|
|
45
41
|
case "success":
|
|
46
|
-
return /* @__PURE__ */ t(S, {});
|
|
47
|
-
case "warning":
|
|
48
42
|
return /* @__PURE__ */ t(R, {});
|
|
49
|
-
case "
|
|
43
|
+
case "warning":
|
|
50
44
|
return /* @__PURE__ */ t(k, {});
|
|
45
|
+
case "error":
|
|
46
|
+
return /* @__PURE__ */ t(j, {});
|
|
51
47
|
default:
|
|
52
48
|
return null;
|
|
53
49
|
}
|
|
54
50
|
}
|
|
55
|
-
function E(
|
|
56
|
-
U(!1),
|
|
51
|
+
function E(l) {
|
|
52
|
+
U(!1), r == null || r(l);
|
|
57
53
|
}
|
|
58
54
|
const F = _(
|
|
59
55
|
e,
|
|
60
56
|
`${e}-${m}`,
|
|
61
57
|
{
|
|
62
|
-
[`${e}-with-title`]:
|
|
58
|
+
[`${e}-with-title`]: s,
|
|
63
59
|
[`${e}-banner`]: v,
|
|
64
|
-
[`${e}-rtl`]:
|
|
60
|
+
[`${e}-rtl`]: h
|
|
65
61
|
},
|
|
66
|
-
|
|
67
|
-
), g = "closeable" in c ?
|
|
62
|
+
I
|
|
63
|
+
), g = "closeable" in c ? x : $;
|
|
68
64
|
return /* @__PURE__ */ t(
|
|
69
65
|
B,
|
|
70
66
|
{
|
|
@@ -73,20 +69,20 @@ function G(d, l) {
|
|
|
73
69
|
classNames: "zoomInTop",
|
|
74
70
|
unmountOnExit: !0,
|
|
75
71
|
onExited: () => {
|
|
76
|
-
|
|
72
|
+
o == null || o();
|
|
77
73
|
},
|
|
78
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ f(
|
|
79
75
|
"div",
|
|
80
76
|
{
|
|
81
|
-
ref:
|
|
82
|
-
style:
|
|
77
|
+
ref: i,
|
|
78
|
+
style: C,
|
|
83
79
|
className: F,
|
|
84
80
|
role: "alert",
|
|
85
81
|
...y,
|
|
86
82
|
children: [
|
|
87
|
-
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
83
|
+
N && /* @__PURE__ */ t("div", { className: `${e}-icon-wrapper`, children: A(m) }),
|
|
84
|
+
/* @__PURE__ */ f("div", { className: `${e}-content-wrapper`, children: [
|
|
85
|
+
s && /* @__PURE__ */ t("div", { className: `${e}-title`, children: s }),
|
|
90
86
|
u && /* @__PURE__ */ t("div", { className: `${e}-content`, children: u })
|
|
91
87
|
] }),
|
|
92
88
|
a && /* @__PURE__ */ t("div", { className: `${e}-action`, children: a }),
|
|
@@ -96,7 +92,7 @@ function G(d, l) {
|
|
|
96
92
|
type: "button",
|
|
97
93
|
onClick: E,
|
|
98
94
|
className: `${e}-close-btn`,
|
|
99
|
-
children: w || /* @__PURE__ */ t(
|
|
95
|
+
children: w || /* @__PURE__ */ t(S, {})
|
|
100
96
|
}
|
|
101
97
|
)
|
|
102
98
|
]
|
package/Anchor.js
CHANGED
package/AutoComplete.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import le from "
|
|
3
|
-
import p, { useContext as ne, useState as se, useRef as
|
|
4
|
-
import {
|
|
2
|
+
import { e as le } from "./chunk/B45v5S9k.js";
|
|
3
|
+
import p, { useContext as ne, useState as se, useRef as B, isValidElement as ae, useImperativeHandle as ce } from "react";
|
|
4
|
+
import { b as ie } from "./chunk/DUxWiN2U.js";
|
|
5
5
|
import fe from "./hooks/useMergeProps.js";
|
|
6
6
|
import ue from "./hooks/useMergeValue.js";
|
|
7
|
-
import { I as me } from "./chunk/
|
|
8
|
-
import { S as d, i as pe, a as de } from "./chunk/
|
|
9
|
-
import ge from "
|
|
10
|
-
import { Enter as Ce, Esc as
|
|
11
|
-
import
|
|
7
|
+
import { I as me } from "./chunk/Bl-ODC57.js";
|
|
8
|
+
import { S as d, i as pe, a as de } from "./chunk/BpwDupra.js";
|
|
9
|
+
import { y as ge } from "./chunk/Do1aMgY3.js";
|
|
10
|
+
import { Enter as Ce, Esc as ye } from "./utils/keyCode.js";
|
|
11
|
+
import Oe from "./utils/omit.js";
|
|
12
12
|
import { pickDataAttributes as he } from "./utils/pick.js";
|
|
13
|
-
const Ae = `Autocomplete_${Math.random()}`, { Option:
|
|
13
|
+
const Ae = `Autocomplete_${Math.random()}`, { Option: D } = d, xe = {
|
|
14
14
|
defaultActiveFirstOption: !0,
|
|
15
15
|
triggerElement: /* @__PURE__ */ c(me, {})
|
|
16
16
|
};
|
|
17
|
-
function Ee(
|
|
18
|
-
var
|
|
17
|
+
function Ee(G, $) {
|
|
18
|
+
var S, k;
|
|
19
19
|
const { getPrefixCls: j, componentConfig: g } = ne(ie), l = fe(
|
|
20
|
-
|
|
20
|
+
G,
|
|
21
21
|
xe,
|
|
22
22
|
g == null ? void 0 : g.AutoComplete
|
|
23
23
|
), {
|
|
@@ -34,49 +34,49 @@ function Ee(D, G) {
|
|
|
34
34
|
allowClear: T,
|
|
35
35
|
loading: W,
|
|
36
36
|
defaultActiveFirstOption: X,
|
|
37
|
-
triggerElement:
|
|
37
|
+
triggerElement: y,
|
|
38
38
|
getPopupContainer: Y,
|
|
39
39
|
dropdownRender: Z,
|
|
40
40
|
virtualListProps: P,
|
|
41
|
-
onFocus:
|
|
41
|
+
onFocus: O,
|
|
42
42
|
onBlur: h,
|
|
43
43
|
onChange: a,
|
|
44
44
|
onSearch: A,
|
|
45
45
|
onSelect: x,
|
|
46
|
-
onPressEnter:
|
|
46
|
+
onPressEnter: N,
|
|
47
47
|
inputProps: t
|
|
48
|
-
} = l, [E,
|
|
48
|
+
} = l, [E, b] = ue("", {
|
|
49
49
|
defaultValue: U,
|
|
50
50
|
value: _
|
|
51
|
-
}), [ee,
|
|
52
|
-
let
|
|
53
|
-
|
|
51
|
+
}), [ee, v] = se(!1), u = B(null), i = B(null), F = j("autocomplete"), te = "filterOption" in l ? l.filterOption : (e, r) => Q ? r.props.value.indexOf(e) > -1 : r.props.value.toLowerCase().indexOf(e.toLowerCase()) > -1, I = p.Children.toArray(C);
|
|
52
|
+
let V = null;
|
|
53
|
+
I.length && (pe(I[0]) || de(I[0])) ? V = C : s && s.length && (V = s.map((e, r) => {
|
|
54
54
|
if (ae(e))
|
|
55
55
|
return e;
|
|
56
56
|
if (typeof e == "string")
|
|
57
|
-
return /* @__PURE__ */ c(
|
|
57
|
+
return /* @__PURE__ */ c(D, { value: e, children: e }, r);
|
|
58
58
|
if (typeof e == "object") {
|
|
59
59
|
const { value: o, name: n } = e;
|
|
60
60
|
return /* @__PURE__ */ c(
|
|
61
|
-
|
|
61
|
+
D,
|
|
62
62
|
{
|
|
63
63
|
value: o,
|
|
64
|
-
extra:
|
|
64
|
+
extra: Oe(e, ["value", "name"]),
|
|
65
65
|
children: n
|
|
66
66
|
},
|
|
67
67
|
r
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
|
-
})), ce(
|
|
72
|
-
const f = typeof
|
|
71
|
+
})), ce($, () => u.current);
|
|
72
|
+
const f = typeof y == "function" ? y({ value: E }) : y, re = p.cloneElement(f, {
|
|
73
73
|
ref: (e) => {
|
|
74
74
|
u.current = e;
|
|
75
75
|
const { ref: r } = f;
|
|
76
76
|
typeof r == "function" && r(e);
|
|
77
77
|
},
|
|
78
78
|
className: ge(
|
|
79
|
-
`${
|
|
79
|
+
`${F}`,
|
|
80
80
|
t && t.className,
|
|
81
81
|
K
|
|
82
82
|
),
|
|
@@ -90,36 +90,36 @@ function Ee(D, G) {
|
|
|
90
90
|
...t,
|
|
91
91
|
...he(l),
|
|
92
92
|
// Empty tag to ensure the consistency of the dom structure of input, such that input won't accidentally lose focus due to structure change on input.
|
|
93
|
-
suffix: W ? /* @__PURE__ */ c(le, {}) : ((
|
|
93
|
+
suffix: W ? /* @__PURE__ */ c(le, {}) : ((S = f == null ? void 0 : f.type) == null ? void 0 : S.displayName) === "Search" ? void 0 : (t == null ? void 0 : t.suffix) || /* @__PURE__ */ c("i", {}),
|
|
94
94
|
onFocus: (e) => {
|
|
95
95
|
var r;
|
|
96
|
-
|
|
96
|
+
v(!0), O == null || O(e), (r = t == null ? void 0 : t.onFocus) == null || r.call(t, e);
|
|
97
97
|
},
|
|
98
98
|
onBlur: (e) => {
|
|
99
99
|
var r;
|
|
100
|
-
|
|
100
|
+
v(!1), h == null || h(e), (r = t == null ? void 0 : t.onBlur) == null || r.call(t, e);
|
|
101
101
|
},
|
|
102
102
|
onKeyDown: (e) => {
|
|
103
103
|
var o, n, m, L, R;
|
|
104
104
|
const r = e.key;
|
|
105
|
-
if ((n = (o = i.current) == null ? void 0 : o.hotkeyHandler) == null || n.call(o, e), r === Ce.key &&
|
|
105
|
+
if ((n = (o = i.current) == null ? void 0 : o.hotkeyHandler) == null || n.call(o, e), r === Ce.key && N) {
|
|
106
106
|
let M;
|
|
107
107
|
i.current && (M = i.current.getOptionInfoByValue(
|
|
108
108
|
i.current.activeOptionValue
|
|
109
|
-
)),
|
|
109
|
+
)), N(e, M);
|
|
110
110
|
}
|
|
111
|
-
r ===
|
|
111
|
+
r === ye.key && ((L = (m = u.current) == null ? void 0 : m.blur) == null || L.call(m)), (R = t == null ? void 0 : t.onKeyDown) == null || R.call(t, e);
|
|
112
112
|
},
|
|
113
113
|
onChange: (e, r) => {
|
|
114
114
|
var o;
|
|
115
|
-
|
|
115
|
+
b(e), A == null || A(e), a == null || a(e), (o = t == null ? void 0 : t.onChange) == null || o.call(t, e, r);
|
|
116
116
|
}
|
|
117
117
|
}), oe = {
|
|
118
118
|
popupVisible: !!(ee && (s != null && s.length || p.Children.count(C))),
|
|
119
119
|
...l.triggerProps,
|
|
120
120
|
// Other trigger types are not supported yet
|
|
121
121
|
trigger: "focus",
|
|
122
|
-
className: [`${
|
|
122
|
+
className: [`${F}-popup`].concat((k = l == null ? void 0 : l.triggerProps) == null ? void 0 : k.className)
|
|
123
123
|
};
|
|
124
124
|
return /* @__PURE__ */ c(d, { ref: i, ...{
|
|
125
125
|
triggerElement: re,
|
|
@@ -135,14 +135,14 @@ function Ee(D, G) {
|
|
|
135
135
|
notFoundContent: null,
|
|
136
136
|
onChange: (e, r) => {
|
|
137
137
|
var o, n;
|
|
138
|
-
|
|
138
|
+
b(e), a == null || a(e, r), e && (x == null || x(e, r)), (n = (o = u.current) == null ? void 0 : o.blur) == null || n.call(o);
|
|
139
139
|
}
|
|
140
|
-
}, children:
|
|
140
|
+
}, children: V });
|
|
141
141
|
}
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
const Ie = p.forwardRef(Ee), w = Ie;
|
|
143
|
+
w.displayName = "AutoComplete";
|
|
144
|
+
w.Option = d.Option;
|
|
145
|
+
w.OptGroup = d.OptGroup;
|
|
146
146
|
export {
|
|
147
|
-
|
|
147
|
+
w as default
|
|
148
148
|
};
|
package/Avatar.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as T, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import w from "lodash/isNumber";
|
|
3
3
|
import S, { createContext as M, forwardRef as W, useContext as I, useRef as k, useImperativeHandle as q, useEffect as D } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import E from "
|
|
4
|
+
import { b as j } from "./chunk/DUxWiN2U.js";
|
|
5
|
+
import { y as E } from "./chunk/Do1aMgY3.js";
|
|
6
6
|
import O from "./hooks/useMergeProps.js";
|
|
7
7
|
import V from "./Popover.js";
|
|
8
|
-
const
|
|
8
|
+
const b = M({}), X = {
|
|
9
9
|
shape: "circle",
|
|
10
10
|
autoFixFontSize: !0,
|
|
11
11
|
triggerType: "button"
|
|
12
|
-
},
|
|
13
|
-
(f,
|
|
14
|
-
const { getPrefixCls:
|
|
12
|
+
}, R = W(
|
|
13
|
+
(f, N) => {
|
|
14
|
+
const { getPrefixCls: P, componentConfig: n, rtl: h } = I(j), e = P("avatar"), v = I(b), $ = {
|
|
15
15
|
...X,
|
|
16
16
|
...n == null ? void 0 : n.Avatar,
|
|
17
17
|
...v,
|
|
@@ -19,7 +19,7 @@ const R = M({}), X = {
|
|
|
19
19
|
}, {
|
|
20
20
|
className: z,
|
|
21
21
|
shape: i,
|
|
22
|
-
size:
|
|
22
|
+
size: s,
|
|
23
23
|
children: c,
|
|
24
24
|
autoFixFontSize: A,
|
|
25
25
|
triggerIcon: r,
|
|
@@ -27,11 +27,11 @@ const R = M({}), X = {
|
|
|
27
27
|
triggerType: x,
|
|
28
28
|
onClick: F,
|
|
29
29
|
...p
|
|
30
|
-
} =
|
|
30
|
+
} = $, u = { ...v.style, ...f.style }, o = k(), m = k();
|
|
31
31
|
function d() {
|
|
32
|
-
if (
|
|
33
|
-
const L =
|
|
34
|
-
G && _ < 1 && (
|
|
32
|
+
if (o.current) {
|
|
33
|
+
const L = o.current.clientWidth, G = f.size || m.current.offsetWidth, _ = G / (L + 8);
|
|
34
|
+
G && _ < 1 && (o.current.style.transform = `scale(${_}) translateX(-50%)`);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
const g = E(
|
|
@@ -42,34 +42,34 @@ const R = M({}), X = {
|
|
|
42
42
|
[`${e}-rtl`]: h
|
|
43
43
|
},
|
|
44
44
|
z
|
|
45
|
-
), t = S.Children.toArray(c), y = t.length === 1 && S.isValidElement(t[0]) && (t[0].type === "img" || t[0].type === "picture"),
|
|
46
|
-
return x === "button" && (!l || l && !l.color) && u && u.backgroundColor && (
|
|
45
|
+
), t = S.Children.toArray(c), y = t.length === 1 && S.isValidElement(t[0]) && (t[0].type === "img" || t[0].type === "picture"), C = l || {};
|
|
46
|
+
return x === "button" && (!l || l && !l.color) && u && u.backgroundColor && (C.color = u.backgroundColor), q(N, () => ({
|
|
47
47
|
getRootDOMNode() {
|
|
48
48
|
return m.current;
|
|
49
49
|
}
|
|
50
50
|
})), D(() => {
|
|
51
51
|
A && d();
|
|
52
|
-
}, [
|
|
52
|
+
}, [s, c]), /* @__PURE__ */ T(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
55
|
ref: m,
|
|
56
56
|
onClick: F,
|
|
57
57
|
...p,
|
|
58
58
|
style: {
|
|
59
|
-
width:
|
|
60
|
-
height:
|
|
61
|
-
fontSize: w(
|
|
59
|
+
width: s,
|
|
60
|
+
height: s,
|
|
61
|
+
fontSize: w(s) ? s / 2 : "",
|
|
62
62
|
...u
|
|
63
63
|
},
|
|
64
64
|
className: g,
|
|
65
65
|
children: [
|
|
66
66
|
y ? /* @__PURE__ */ a("span", { className: `${e}-image`, children: c }) : null,
|
|
67
|
-
!y && /* @__PURE__ */ a("span", { ref:
|
|
67
|
+
!y && /* @__PURE__ */ a("span", { ref: o, className: `${e}-text`, children: c }),
|
|
68
68
|
r && /* @__PURE__ */ a(
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
71
|
className: `${e}-trigger-icon-${x}`,
|
|
72
|
-
style:
|
|
72
|
+
style: C,
|
|
73
73
|
children: r
|
|
74
74
|
}
|
|
75
75
|
)
|
|
@@ -78,41 +78,41 @@ const R = M({}), X = {
|
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
|
-
|
|
81
|
+
R.displayName = "Avatar";
|
|
82
82
|
const B = {
|
|
83
83
|
shape: "circle",
|
|
84
84
|
autoFixFontSize: !0
|
|
85
85
|
};
|
|
86
|
-
function J(f,
|
|
87
|
-
const { getPrefixCls:
|
|
86
|
+
function J(f, N) {
|
|
87
|
+
const { getPrefixCls: P, componentConfig: n, rtl: h } = I(j), e = O(
|
|
88
88
|
f,
|
|
89
89
|
B,
|
|
90
90
|
n == null ? void 0 : n["Avatar.Group"]
|
|
91
91
|
), {
|
|
92
92
|
className: v,
|
|
93
|
-
style:
|
|
93
|
+
style: $,
|
|
94
94
|
children: z,
|
|
95
95
|
size: i,
|
|
96
|
-
shape:
|
|
96
|
+
shape: s,
|
|
97
97
|
autoFixFontSize: c,
|
|
98
98
|
zIndexAscend: A,
|
|
99
99
|
maxCount: r,
|
|
100
100
|
maxStyle: l,
|
|
101
101
|
maxPopoverTriggerProps: x,
|
|
102
102
|
...F
|
|
103
|
-
} = e, p =
|
|
103
|
+
} = e, p = P("avatar-group"), u = E(
|
|
104
104
|
p,
|
|
105
105
|
{
|
|
106
106
|
[`${p}-rtl`]: h
|
|
107
107
|
},
|
|
108
108
|
v
|
|
109
|
-
),
|
|
110
|
-
let d =
|
|
109
|
+
), o = S.Children.toArray(z), m = o.length;
|
|
110
|
+
let d = o;
|
|
111
111
|
if (w(r) && r >= 0 && m > r) {
|
|
112
|
-
const g =
|
|
113
|
-
d =
|
|
112
|
+
const g = o.slice(r);
|
|
113
|
+
d = o.slice(0, r), d.push(
|
|
114
114
|
/* @__PURE__ */ a(
|
|
115
|
-
|
|
115
|
+
R,
|
|
116
116
|
{
|
|
117
117
|
style: l,
|
|
118
118
|
className: `${p}-max-count-avatar`,
|
|
@@ -120,7 +120,7 @@ function J(f, C) {
|
|
|
120
120
|
V,
|
|
121
121
|
{
|
|
122
122
|
triggerProps: x,
|
|
123
|
-
content: /* @__PURE__ */ a(
|
|
123
|
+
content: /* @__PURE__ */ a(b.Provider, { value: { size: i, shape: s, autoFixFontSize: c }, children: /* @__PURE__ */ a("div", { className: `${p}-popover`, children: g }) }),
|
|
124
124
|
children: [
|
|
125
125
|
"+",
|
|
126
126
|
g.length
|
|
@@ -132,15 +132,15 @@ function J(f, C) {
|
|
|
132
132
|
)
|
|
133
133
|
);
|
|
134
134
|
}
|
|
135
|
-
return /* @__PURE__ */ a("div", { ref:
|
|
136
|
-
const y = h ? t === d.length - 1 : t === 0,
|
|
135
|
+
return /* @__PURE__ */ a("div", { ref: N, style: $, className: u, ...F, children: d.map((g, t) => {
|
|
136
|
+
const y = h ? t === d.length - 1 : t === 0, C = {
|
|
137
137
|
zIndex: A ? t + 1 : m - t,
|
|
138
138
|
marginLeft: i ? y ? 0 : -i / 4 : ""
|
|
139
139
|
};
|
|
140
140
|
return /* @__PURE__ */ a(
|
|
141
|
-
|
|
141
|
+
b.Provider,
|
|
142
142
|
{
|
|
143
|
-
value: { size: i, shape:
|
|
143
|
+
value: { size: i, shape: s, autoFixFontSize: c, style: C },
|
|
144
144
|
children: g
|
|
145
145
|
},
|
|
146
146
|
t
|
|
@@ -149,7 +149,7 @@ function J(f, C) {
|
|
|
149
149
|
}
|
|
150
150
|
const H = W(J);
|
|
151
151
|
H.displayName = "AvatarGroup";
|
|
152
|
-
const K =
|
|
152
|
+
const K = R;
|
|
153
153
|
K.Group = H;
|
|
154
154
|
export {
|
|
155
155
|
K as default
|