diff --git a/components/_util/wave/useWave.ts b/components/_util/wave/useWave.ts index 09e944f9ed..29f6a1a51b 100644 --- a/components/_util/wave/useWave.ts +++ b/components/_util/wave/useWave.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import raf from 'rc-util/lib/raf'; import { ConfigContext } from '../../config-provider'; diff --git a/components/anchor/Anchor.tsx b/components/anchor/Anchor.tsx index d00890e038..452836fa36 100644 --- a/components/anchor/Anchor.tsx +++ b/components/anchor/Anchor.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import classNames from 'classnames'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import scrollIntoView from 'scroll-into-view-if-needed'; import getScroll from '../_util/getScroll'; diff --git a/components/color-picker/components/ColorSlider.tsx b/components/color-picker/components/ColorSlider.tsx index e4eef18fe4..f6ee8da055 100644 --- a/components/color-picker/components/ColorSlider.tsx +++ b/components/color-picker/components/ColorSlider.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import type { BaseSliderProps } from '@rc-component/color-picker'; import classNames from 'classnames'; import { UnstableContext } from 'rc-slider'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import type { GetContextProp, GetProp } from '../../_util/type'; import Slider from '../../slider'; diff --git a/components/color-picker/hooks/useModeColor.ts b/components/color-picker/hooks/useModeColor.ts index 95a3256f45..ffef564b5e 100644 --- a/components/color-picker/hooks/useModeColor.ts +++ b/components/color-picker/hooks/useModeColor.ts @@ -1,5 +1,6 @@ import * as React from 'react'; -import { useEvent, useMergedState } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; +import useMergedState from 'rc-util/lib/hooks/useMergedState'; import { useLocale } from '../../locale'; import type { AggregationColor } from '../color'; diff --git a/components/dropdown/dropdown.tsx b/components/dropdown/dropdown.tsx index c29f6068cc..e5fec1d991 100644 --- a/components/dropdown/dropdown.tsx +++ b/components/dropdown/dropdown.tsx @@ -3,7 +3,7 @@ import RightOutlined from '@ant-design/icons/RightOutlined'; import type { AlignType } from '@rc-component/trigger'; import classNames from 'classnames'; import RcDropdown from 'rc-dropdown'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import useMergedState from 'rc-util/lib/hooks/useMergedState'; import omit from 'rc-util/lib/omit'; diff --git a/components/float-button/FloatButtonGroup.tsx b/components/float-button/FloatButtonGroup.tsx index 277ef411e4..dab79aa497 100644 --- a/components/float-button/FloatButtonGroup.tsx +++ b/components/float-button/FloatButtonGroup.tsx @@ -3,7 +3,7 @@ import CloseOutlined from '@ant-design/icons/CloseOutlined'; import FileTextOutlined from '@ant-design/icons/FileTextOutlined'; import classNames from 'classnames'; import CSSMotion from 'rc-motion'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import useMergedState from 'rc-util/lib/hooks/useMergedState'; import { useZIndex } from '../_util/hooks/useZIndex'; diff --git a/components/input/OTP/index.tsx b/components/input/OTP/index.tsx index bad0f54400..3baead3550 100644 --- a/components/input/OTP/index.tsx +++ b/components/input/OTP/index.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import classNames from 'classnames'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import pickAttrs from 'rc-util/lib/pickAttrs'; import { getMergedStatus } from '../../_util/statusUtils'; diff --git a/components/menu/OverrideContext.tsx b/components/menu/OverrideContext.tsx index 4c9ebf037a..256fb10dce 100644 --- a/components/menu/OverrideContext.tsx +++ b/components/menu/OverrideContext.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { supportNodeRef, useComposeRef } from 'rc-util'; +import { supportNodeRef, useComposeRef } from 'rc-util/lib/ref'; import ContextIsolator from '../_util/ContextIsolator'; import type { MenuProps } from './menu'; diff --git a/components/menu/menu.tsx b/components/menu/menu.tsx index 3f8d8fb987..caaa40f22c 100644 --- a/components/menu/menu.tsx +++ b/components/menu/menu.tsx @@ -4,7 +4,7 @@ import EllipsisOutlined from '@ant-design/icons/EllipsisOutlined'; import classNames from 'classnames'; import type { MenuProps as RcMenuProps, MenuRef as RcMenuRef } from 'rc-menu'; import RcMenu from 'rc-menu'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import omit from 'rc-util/lib/omit'; import initCollapseMotion from '../_util/motion'; diff --git a/components/splitter/Splitter.tsx b/components/splitter/Splitter.tsx index 16db4f4500..42fcb83f46 100644 --- a/components/splitter/Splitter.tsx +++ b/components/splitter/Splitter.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import classNames from 'classnames'; import ResizeObserver from 'rc-resize-observer'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import type { GetProp } from '../_util/type'; import { devUseWarning } from '../_util/warning'; diff --git a/components/typography/hooks/useCopyClick.ts b/components/typography/hooks/useCopyClick.ts index 3b925ac4c4..b97f3b98f5 100644 --- a/components/typography/hooks/useCopyClick.ts +++ b/components/typography/hooks/useCopyClick.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import copy from 'copy-to-clipboard'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import toList from '../../_util/toList'; import type { CopyConfig } from '../Base'; diff --git a/components/watermark/context.ts b/components/watermark/context.ts index c5060f8282..f2ca178cb8 100644 --- a/components/watermark/context.ts +++ b/components/watermark/context.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; export interface WatermarkContextProps { add: (ele: HTMLElement) => void; diff --git a/components/watermark/index.tsx b/components/watermark/index.tsx index 6d22de4f33..d12b66070c 100644 --- a/components/watermark/index.tsx +++ b/components/watermark/index.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from 'react'; import { useMutateObserver } from '@rc-component/mutate-observer'; import classNames from 'classnames'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import { useToken } from '../theme/internal'; import WatermarkContext from './context'; diff --git a/components/watermark/useRafDebounce.ts b/components/watermark/useRafDebounce.ts index ff708012e4..6ee14e58c9 100644 --- a/components/watermark/useRafDebounce.ts +++ b/components/watermark/useRafDebounce.ts @@ -1,5 +1,5 @@ import React from 'react'; -import { useEvent } from 'rc-util'; +import useEvent from 'rc-util/lib/hooks/useEvent'; import raf from 'rc-util/lib/raf'; /**