refactor: [v6] use rc-component (#52337)
Some checks are pending
Publish Any Commit / build (push) Waiting to run
✅ test v6 / lint (push) Waiting to run
✅ test v6 / test-react-legacy (18, 1/2) (push) Waiting to run
✅ test v6 / test-react-legacy (18, 2/2) (push) Waiting to run
✅ test v6 / test-node (push) Waiting to run
✅ test v6 / test-react-latest (dom, 1/2) (push) Waiting to run
✅ test v6 / test-react-latest (dom, 2/2) (push) Waiting to run
✅ test v6 / test-react-latest-dist (dist, 1/2) (push) Blocked by required conditions
✅ test v6 / test-react-latest-dist (dist, 2/2) (push) Blocked by required conditions
✅ test v6 / test-react-latest-dist (dist-min, 1/2) (push) Blocked by required conditions
✅ test v6 / test-react-latest-dist (dist-min, 2/2) (push) Blocked by required conditions
✅ test v6 / test-coverage (push) Blocked by required conditions
✅ test v6 / build (push) Waiting to run
✅ test v6 / test lib/es module (es, 1/2) (push) Waiting to run
✅ test v6 / test lib/es module (es, 2/2) (push) Waiting to run
✅ test v6 / test lib/es module (lib, 1/2) (push) Waiting to run
✅ test v6 / test lib/es module (lib, 2/2) (push) Waiting to run
👁️ Visual Regression Persist Start / test image (push) Waiting to run

* refactor: use @rc-component

* chore: adjust compile

* test: fix logic

* chore: back of reset

---------

Co-authored-by: 二货机器人 <smith3816@gmail.com>
This commit is contained in:
lijianan 2025-01-10 14:14:31 +08:00 committed by GitHub
parent 5599359a8e
commit ab0e07e25d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
156 changed files with 217 additions and 212 deletions

View File

@ -1,5 +1,5 @@
import { useEffect, useRef } from 'react'; import { useEffect, useRef } from 'react';
import { removeCSS, updateCSS } from 'rc-util/lib/Dom/dynamicCSS'; import { removeCSS, updateCSS } from '@rc-component/util/lib/Dom/dynamicCSS';
import theme from '../../components/theme'; import theme from '../../components/theme';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import toArray from '@rc-component/util/lib/Children/toArray';
import { Image } from 'antd'; import { Image } from 'antd';
import classNames from 'classnames'; import classNames from 'classnames';
import toArray from 'rc-util/lib/Children/toArray';
interface ImagePreviewProps { interface ImagePreviewProps {
className?: string; className?: string;

View File

@ -288,7 +288,7 @@ createRoot(document.getElementById('container')).render(<Demo />);
main: 'index.js', main: 'index.js',
dependencies: { dependencies: {
...dependencies, ...dependencies,
'rc-util': pkgDependencyList['rc-util'], '@rc-component/util': pkgDependencyList['@rc-component/util'],
react: '^18.0.0', react: '^18.0.0',
'react-dom': '^18.0.0', 'react-dom': '^18.0.0',
'react-scripts': '^5.0.0', 'react-scripts': '^5.0.0',

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { css, Global } from '@emotion/react'; import { css, Global } from '@emotion/react';
import { updateCSS } from '@rc-component/util/lib/Dom/dynamicCSS';
import { useTheme } from 'antd-style'; import { useTheme } from 'antd-style';
import { updateCSS } from 'rc-util/lib/Dom/dynamicCSS';
export default () => { export default () => {
const { anchorTop } = useTheme(); const { anchorTop } = useTheme();

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import { removeCSS, updateCSS } from '@rc-component/util/lib/Dom/dynamicCSS';
import { createStyles } from 'antd-style'; import { createStyles } from 'antd-style';
import { removeCSS, updateCSS } from 'rc-util/lib/Dom/dynamicCSS';
import useLocale from '../../../hooks/useLocale'; import useLocale from '../../../hooks/useLocale';

View File

@ -6,6 +6,7 @@ const compileModules = [
'countup.js', 'countup.js',
'.pnpm', '.pnpm',
'@asamuzakjp/css-color', '@asamuzakjp/css-color',
'@rc-component',
]; ];
const ignoreList = []; const ignoreList = [];

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import useState from 'rc-util/lib/hooks/useState'; import useState from '@rc-component/util/lib/hooks/useState';
import Button from '../button'; import Button from '../button';
import type { ButtonProps, LegacyButtonType } from '../button/button'; import type { ButtonProps, LegacyButtonType } from '../button/button';

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import useMergedState from 'rc-util/lib/hooks/useMergedState'; import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import ConfigProvider, { ConfigContext } from '../config-provider'; import ConfigProvider, { ConfigContext } from '../config-provider';
import type { AnyObject } from './type'; import type { AnyObject } from './type';

View File

@ -21,7 +21,7 @@ jest.mock('react-dom', () => {
return realReactDOM; return realReactDOM;
}); });
jest.mock('rc-util/lib/Dom/isVisible', () => { jest.mock('@rc-component/util/lib/Dom/isVisible', () => {
const mockFn = () => (global as any).isVisible; const mockFn = () => (global as any).isVisible;
return mockFn; return mockFn;
}); });

View File

@ -1,8 +1,8 @@
import type { ReactNode } from 'react'; import type { ReactNode } from 'react';
import React from 'react'; import React from 'react';
import CloseOutlined from '@ant-design/icons/CloseOutlined'; import CloseOutlined from '@ant-design/icons/CloseOutlined';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import type { DialogProps } from 'rc-dialog'; import type { DialogProps } from 'rc-dialog';
import pickAttrs from 'rc-util/lib/pickAttrs';
export type ClosableType = DialogProps['closable']; export type ClosableType = DialogProps['closable'];

View File

@ -1,4 +1,4 @@
import raf from 'rc-util/lib/raf'; import raf from '@rc-component/util/lib/raf';
import { easeInOutCubic } from './easings'; import { easeInOutCubic } from './easings';
import getScroll, { isWindow } from './getScroll'; import getScroll, { isWindow } from './getScroll';

View File

@ -1,5 +1,5 @@
import canUseDom from 'rc-util/lib/Dom/canUseDom'; import canUseDom from '@rc-component/util/lib/Dom/canUseDom';
import { isStyleSupport } from 'rc-util/lib/Dom/styleChecker'; import { isStyleSupport } from '@rc-component/util/lib/Dom/styleChecker';
export const canUseDocElement = () => canUseDom() && window.document.documentElement; export const canUseDocElement = () => canUseDom() && window.document.documentElement;

View File

@ -1,4 +1,4 @@
import raf from 'rc-util/lib/raf'; import raf from '@rc-component/util/lib/raf';
function throttleByAnimationFrame<T extends any[]>(fn: (...args: T) => void) { function throttleByAnimationFrame<T extends any[]>(fn: (...args: T) => void) {
let requestId: number | null; let requestId: number | null;

View File

@ -1,5 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import rcWarning, { resetWarned as rcResetWarned } from 'rc-util/lib/warning'; import rcWarning, { resetWarned as rcResetWarned } from '@rc-component/util/lib/warning';
import { resetWarned as deprecatedRcResetWarned } from 'rc-util/lib/warning';
export function noop() {} export function noop() {}
@ -8,6 +9,7 @@ let deprecatedWarnList: Record<string, string[]> | null = null;
export function resetWarned() { export function resetWarned() {
deprecatedWarnList = null; deprecatedWarnList = null;
rcResetWarned(); rcResetWarned();
deprecatedRcResetWarned();
} }
type Warning = (valid: boolean, component: string, message?: string) => void; type Warning = (valid: boolean, component: string, message?: string) => void;

View File

@ -1,8 +1,8 @@
import * as React from 'react'; import * as React from 'react';
import raf from '@rc-component/util/lib/raf';
import { composeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import CSSMotion from 'rc-motion'; import CSSMotion from 'rc-motion';
import raf from 'rc-util/lib/raf';
import { composeRef } from 'rc-util/lib/ref';
import { getReactRender, type UnmountType } from '../../config-provider/UnstableContext'; import { getReactRender, type UnmountType } from '../../config-provider/UnstableContext';
import { TARGET_CLS } from './interface'; import { TARGET_CLS } from './interface';

View File

@ -1,7 +1,7 @@
import React, { useContext, useRef } from 'react'; import React, { useContext, useRef } from 'react';
import isVisible from '@rc-component/util/lib/Dom/isVisible';
import { composeRef, getNodeRef, supportRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import isVisible from 'rc-util/lib/Dom/isVisible';
import { composeRef, getNodeRef, supportRef } from 'rc-util/lib/ref';
import type { ConfigConsumerProps } from '../../config-provider'; import type { ConfigConsumerProps } from '../../config-provider';
import { ConfigContext } from '../../config-provider'; import { ConfigContext } from '../../config-provider';

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import useEvent from 'rc-util/lib/hooks/useEvent'; import useEvent from '@rc-component/util/lib/hooks/useEvent';
import raf from 'rc-util/lib/raf'; import raf from '@rc-component/util/lib/raf';
import { ConfigContext } from '../../config-provider'; import { ConfigContext } from '../../config-provider';
import useToken from '../../theme/useToken'; import useToken from '../../theme/useToken';

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import { spyElementPrototype } from 'rc-util/lib/test/domHook'; import { spyElementPrototype } from '@rc-component/util/lib/test/domHook';
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest'; import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import ResizeObserver from 'rc-resize-observer'; import ResizeObserver from 'rc-resize-observer';
import omit from 'rc-util/lib/omit';
import throttleByAnimationFrame from '../_util/throttleByAnimationFrame'; import throttleByAnimationFrame from '../_util/throttleByAnimationFrame';
import type { ConfigConsumerProps } from '../config-provider'; import type { ConfigConsumerProps } from '../config-provider';

View File

@ -5,10 +5,10 @@ import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
import CloseOutlined from '@ant-design/icons/CloseOutlined'; import CloseOutlined from '@ant-design/icons/CloseOutlined';
import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled'; import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
import InfoCircleFilled from '@ant-design/icons/InfoCircleFilled'; import InfoCircleFilled from '@ant-design/icons/InfoCircleFilled';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import { composeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import CSSMotion from 'rc-motion'; import CSSMotion from 'rc-motion';
import pickAttrs from 'rc-util/lib/pickAttrs';
import { composeRef } from 'rc-util/lib/ref';
import type { ClosableType } from '../_util/hooks/useClosable'; import type { ClosableType } from '../_util/hooks/useClosable';
import { replaceElement } from '../_util/reactNode'; import { replaceElement } from '../_util/reactNode';

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { resetWarned } from '@rc-component/util/lib/warning';
import userEvent from '@testing-library/user-event'; import userEvent from '@testing-library/user-event';
import { resetWarned } from 'rc-util/lib/warning';
import Alert from '..'; import Alert from '..';
import { accessibilityTest } from '../../../tests/shared/accessibilityTest'; import { accessibilityTest } from '../../../tests/shared/accessibilityTest';

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import useEvent from '@rc-component/util/lib/hooks/useEvent';
import classNames from 'classnames'; import classNames from 'classnames';
import useEvent from 'rc-util/lib/hooks/useEvent';
import scrollIntoView from 'scroll-into-view-if-needed'; import scrollIntoView from 'scroll-into-view-if-needed';
import getScroll from '../_util/getScroll'; import getScroll from '../_util/getScroll';

View File

@ -1,5 +1,5 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { resetWarned } from 'rc-util/lib/warning'; import { resetWarned } from '@rc-component/util/lib/warning';
import scrollIntoView from 'scroll-into-view-if-needed'; import scrollIntoView from 'scroll-into-view-if-needed';
import Anchor from '..'; import Anchor from '..';

View File

@ -1,8 +1,8 @@
import * as React from 'react'; import * as React from 'react';
import toArray from '@rc-component/util/lib/Children/toArray';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import type { BaseSelectRef } from 'rc-select'; import type { BaseSelectRef } from 'rc-select';
import toArray from 'rc-util/lib/Children/toArray';
import omit from 'rc-util/lib/omit';
import { useZIndex } from '../_util/hooks/useZIndex'; import { useZIndex } from '../_util/hooks/useZIndex';
import genPurePanel from '../_util/PurePanel'; import genPurePanel from '../_util/PurePanel';

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import { composeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import ResizeObserver from 'rc-resize-observer'; import ResizeObserver from 'rc-resize-observer';
import { composeRef } from 'rc-util/lib/ref';
import type { Breakpoint } from '../_util/responsiveObserver'; import type { Breakpoint } from '../_util/responsiveObserver';
import { responsiveArray } from '../_util/responsiveObserver'; import { responsiveArray } from '../_util/responsiveObserver';

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import toArray from '@rc-component/util/lib/Children/toArray';
import classNames from 'classnames'; import classNames from 'classnames';
import toArray from 'rc-util/lib/Children/toArray';
import { cloneElement } from '../_util/reactNode'; import { cloneElement } from '../_util/reactNode';
import { devUseWarning } from '../_util/warning'; import { devUseWarning } from '../_util/warning';

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import toArray from '@rc-component/util/lib/Children/toArray';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import classNames from 'classnames'; import classNames from 'classnames';
import toArray from 'rc-util/lib/Children/toArray';
import pickAttrs from 'rc-util/lib/pickAttrs';
import { cloneElement } from '../_util/reactNode'; import { cloneElement } from '../_util/reactNode';
import type { AnyObject } from '../_util/type'; import type { AnyObject } from '../_util/type';

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import classNames from 'classnames'; import classNames from 'classnames';
import pickAttrs from 'rc-util/lib/pickAttrs';
import type { BreadcrumbProps, InternalRouteType, ItemType } from './Breadcrumb'; import type { BreadcrumbProps, InternalRouteType, ItemType } from './Breadcrumb';

View File

@ -1,6 +1,6 @@
import React, { Suspense, useRef, useState } from 'react'; import React, { Suspense, useRef, useState } from 'react';
import { SearchOutlined } from '@ant-design/icons'; import { SearchOutlined } from '@ant-design/icons';
import { resetWarned } from 'rc-util/lib/warning'; import { resetWarned } from '@rc-component/util/lib/warning';
import Button, { _ButtonVariantTypes } from '..'; import Button, { _ButtonVariantTypes } from '..';
import type { GetRef } from '../../_util/type'; import type { GetRef } from '../../_util/type';

View File

@ -16,7 +16,7 @@ jest.mock('react-dom', () => {
return realReactDOM; return realReactDOM;
}); });
jest.mock('rc-util/lib/Dom/isVisible', () => { jest.mock('@rc-component/util/lib/Dom/isVisible', () => {
const mockFn = () => true; const mockFn = () => true;
return mockFn; return mockFn;
}); });

View File

@ -1,7 +1,7 @@
import React, { Children, useContext, useEffect, useMemo, useRef, useState } from 'react'; import React, { Children, useContext, useEffect, useMemo, useRef, useState } from 'react';
import omit from '@rc-component/util/lib/omit';
import { useComposeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import { useComposeRef } from 'rc-util/lib/ref';
import { devUseWarning } from '../_util/warning'; import { devUseWarning } from '../_util/warning';
import Wave from '../_util/wave'; import Wave from '../_util/wave';
@ -19,8 +19,8 @@ import type {
ButtonVariantType, ButtonVariantType,
} from './buttonHelpers'; } from './buttonHelpers';
import { isTwoCNChar, isUnBorderedButtonVariant, spaceChildren } from './buttonHelpers'; import { isTwoCNChar, isUnBorderedButtonVariant, spaceChildren } from './buttonHelpers';
import IconWrapper from './IconWrapper';
import DefaultLoadingIcon from './DefaultLoadingIcon'; import DefaultLoadingIcon from './DefaultLoadingIcon';
import IconWrapper from './IconWrapper';
import useStyle from './style'; import useStyle from './style';
import Compact from './style/compact'; import Compact from './style/compact';

View File

@ -3,22 +3,22 @@ import Dayjs from 'dayjs';
import 'dayjs/locale/zh-cn'; import 'dayjs/locale/zh-cn';
import React from 'react'; import React from 'react';
import { resetWarned } from '@rc-component/util/lib/warning';
import MockDate from 'mockdate'; import MockDate from 'mockdate';
import type { PickerPanelProps } from 'rc-picker'; import type { PickerPanelProps } from 'rc-picker';
import dayjsGenerateConfig from 'rc-picker/lib/generate/dayjs'; import dayjsGenerateConfig from 'rc-picker/lib/generate/dayjs';
import type { Locale } from 'rc-picker/lib/interface'; import type { Locale } from 'rc-picker/lib/interface';
import { resetWarned } from 'rc-util/lib/warning';
import Calendar from '..'; import Calendar from '..';
import mountTest from '../../../tests/shared/mountTest'; import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest'; import rtlTest from '../../../tests/shared/rtlTest';
import { fireEvent, render } from '../../../tests/utils'; import { fireEvent, render } from '../../../tests/utils';
import ConfigProvider from '../../config-provider';
import Group from '../../radio/group'; import Group from '../../radio/group';
import Button from '../../radio/radioButton'; import Button from '../../radio/radioButton';
import Select from '../../select'; import Select from '../../select';
import Header from '../Header'; import Header from '../Header';
import type { CalendarHeaderProps } from '../Header'; import type { CalendarHeaderProps } from '../Header';
import ConfigProvider from '../../config-provider';
const ref: { const ref: {
calendarProps?: PickerPanelProps; calendarProps?: PickerPanelProps;

View File

@ -3,7 +3,7 @@ import Dayjs from 'dayjs';
import 'dayjs/locale/zh-cn'; import 'dayjs/locale/zh-cn';
import React from 'react'; import React from 'react';
import { resetWarned } from 'rc-util/lib/warning'; import { resetWarned } from '@rc-component/util/lib/warning';
import Calendar from '..'; import Calendar from '..';
import { fireEvent, render, waitFakeTimer } from '../../../tests/utils'; import { fireEvent, render, waitFakeTimer } from '../../../tests/utils';

View File

@ -1,10 +1,10 @@
import * as React from 'react'; import * as React from 'react';
import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import classNames from 'classnames'; import classNames from 'classnames';
import type { BasePickerPanelProps as RcBasePickerPanelProps } from 'rc-picker'; import type { BasePickerPanelProps as RcBasePickerPanelProps } from 'rc-picker';
import { PickerPanel as RCPickerPanel } from 'rc-picker'; import { PickerPanel as RCPickerPanel } from 'rc-picker';
import type { GenerateConfig } from 'rc-picker/lib/generate'; import type { GenerateConfig } from 'rc-picker/lib/generate';
import type { CellRenderInfo } from 'rc-picker/lib/interface'; import type { CellRenderInfo } from 'rc-picker/lib/interface';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import type { AnyObject } from '../_util/type'; import type { AnyObject } from '../_util/type';
import { devUseWarning } from '../_util/warning'; import { devUseWarning } from '../_util/warning';

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import type { Tab } from 'rc-tabs/lib/interface'; import type { Tab } from 'rc-tabs/lib/interface';
import omit from 'rc-util/lib/omit';
import { devUseWarning } from '../_util/warning'; import { devUseWarning } from '../_util/warning';
import { ConfigContext } from '../config-provider'; import { ConfigContext } from '../config-provider';

View File

@ -1,4 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import type { import type {
BaseOptionType, BaseOptionType,
@ -9,7 +10,6 @@ import type {
} from 'rc-cascader'; } from 'rc-cascader';
import RcCascader from 'rc-cascader'; import RcCascader from 'rc-cascader';
import type { Placement } from 'rc-select/lib/BaseSelect'; import type { Placement } from 'rc-select/lib/BaseSelect';
import omit from 'rc-util/lib/omit';
import { useZIndex } from '../_util/hooks/useZIndex'; import { useZIndex } from '../_util/hooks/useZIndex';
import type { SelectCommonPlacement } from '../_util/motion'; import type { SelectCommonPlacement } from '../_util/motion';

View File

@ -1,8 +1,8 @@
import * as React from 'react'; import * as React from 'react';
import { composeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import type { CheckboxRef } from 'rc-checkbox'; import type { CheckboxRef } from 'rc-checkbox';
import RcCheckbox from 'rc-checkbox'; import RcCheckbox from 'rc-checkbox';
import { composeRef } from 'rc-util/lib/ref';
import { devUseWarning } from '../_util/warning'; import { devUseWarning } from '../_util/warning';
import Wave from '../_util/wave'; import Wave from '../_util/wave';

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import { ConfigContext } from '../config-provider'; import { ConfigContext } from '../config-provider';
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls'; import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import raf from 'rc-util/lib/raf'; import raf from '@rc-component/util/lib/raf';
/** /**
* When click on the label, * When click on the label,

View File

@ -1,11 +1,11 @@
import * as React from 'react'; import * as React from 'react';
import RightOutlined from '@ant-design/icons/RightOutlined'; import RightOutlined from '@ant-design/icons/RightOutlined';
import toArray from '@rc-component/util/lib/Children/toArray';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import type { CollapseProps as RcCollapseProps } from 'rc-collapse'; import type { CollapseProps as RcCollapseProps } from 'rc-collapse';
import RcCollapse from 'rc-collapse'; import RcCollapse from 'rc-collapse';
import type { CSSMotionProps } from 'rc-motion'; import type { CSSMotionProps } from 'rc-motion';
import toArray from 'rc-util/lib/Children/toArray';
import omit from 'rc-util/lib/omit';
import initCollapseMotion from '../_util/motion'; import initCollapseMotion from '../_util/motion';
import { cloneElement } from '../_util/reactNode'; import { cloneElement } from '../_util/reactNode';

View File

@ -1,6 +1,6 @@
import React, { useContext, useMemo } from 'react'; import React, { useContext, useMemo } from 'react';
import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import classNames from 'classnames'; import classNames from 'classnames';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import ContextIsolator from '../_util/ContextIsolator'; import ContextIsolator from '../_util/ContextIsolator';
import genPurePanel from '../_util/PurePanel'; import genPurePanel from '../_util/PurePanel';

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook';
import { render } from '@testing-library/react'; import { render } from '@testing-library/react';
import { spyElementPrototypes } from 'rc-util/lib/test/domHook';
import { resetWarned } from '../../_util/warning'; import { resetWarned } from '../../_util/warning';
import { createEvent, fireEvent } from '../../../tests/utils'; import { createEvent, fireEvent } from '../../../tests/utils';

View File

@ -1,6 +1,6 @@
import React, { useEffect, useMemo, useState } from 'react'; import React, { useEffect, useMemo, useState } from 'react';
import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook';
import { createEvent, fireEvent, render } from '@testing-library/react'; import { createEvent, fireEvent, render } from '@testing-library/react';
import { spyElementPrototypes } from 'rc-util/lib/test/domHook';
import { resetWarned } from '../../_util/warning'; import { resetWarned } from '../../_util/warning';
import mountTest from '../../../tests/shared/mountTest'; import mountTest from '../../../tests/shared/mountTest';

View File

@ -1,6 +1,6 @@
import type { FC } from 'react'; import type { FC } from 'react';
import React, { useMemo } from 'react'; import React, { useMemo } from 'react';
import useMergedState from 'rc-util/lib/hooks/useMergedState'; import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import Select from '../../select'; import Select from '../../select';
import type { AggregationColor } from '../color'; import type { AggregationColor } from '../color';

View File

@ -1,8 +1,8 @@
import type { FC } from 'react'; import type { FC } from 'react';
import React, { useMemo } from 'react'; import React, { useMemo } from 'react';
import { ColorBlock, Color as RcColor } from '@rc-component/color-picker'; import { ColorBlock, Color as RcColor } from '@rc-component/color-picker';
import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import classNames from 'classnames'; import classNames from 'classnames';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import type { CollapseProps } from '../../collapse'; import type { CollapseProps } from '../../collapse';
import Collapse from '../../collapse'; import Collapse from '../../collapse';

View File

@ -1,8 +1,8 @@
import * as React from 'react'; import * as React from 'react';
import type { BaseSliderProps } from '@rc-component/color-picker'; import type { BaseSliderProps } from '@rc-component/color-picker';
import useEvent from '@rc-component/util/lib/hooks/useEvent';
import classNames from 'classnames'; import classNames from 'classnames';
import { UnstableContext } from 'rc-slider'; import { UnstableContext } from 'rc-slider';
import useEvent from 'rc-util/lib/hooks/useEvent';
import type { GetContextProp, GetProp } from '../../_util/type'; import type { GetContextProp, GetProp } from '../../_util/type';
import Slider from '../../slider'; import Slider from '../../slider';

View File

@ -2,8 +2,8 @@
import type { CSSProperties, MouseEventHandler } from 'react'; import type { CSSProperties, MouseEventHandler } from 'react';
import React, { forwardRef, useMemo } from 'react'; import React, { forwardRef, useMemo } from 'react';
import { ColorBlock } from '@rc-component/color-picker'; import { ColorBlock } from '@rc-component/color-picker';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import classNames from 'classnames'; import classNames from 'classnames';
import pickAttrs from 'rc-util/lib/pickAttrs';
import { useLocale } from '../../locale'; import { useLocale } from '../../locale';
import type { AggregationColor } from '../color'; import type { AggregationColor } from '../color';

View File

@ -2,7 +2,7 @@ import type { FC } from 'react';
import React, { useContext } from 'react'; import React, { useContext } from 'react';
import RcColorPicker from '@rc-component/color-picker'; import RcColorPicker from '@rc-component/color-picker';
import type { Color } from '@rc-component/color-picker'; import type { Color } from '@rc-component/color-picker';
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect'; import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect';
import Segmented from '../../../segmented'; import Segmented from '../../../segmented';
import { AggregationColor } from '../../color'; import { AggregationColor } from '../../color';

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import useEvent from 'rc-util/lib/hooks/useEvent'; import useEvent from '@rc-component/util/lib/hooks/useEvent';
import useMergedState from 'rc-util/lib/hooks/useMergedState'; import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import { useLocale } from '../../locale'; import { useLocale } from '../../locale';
import type { AggregationColor } from '../color'; import type { AggregationColor } from '../color';

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import * as ReactDOM from 'react-dom'; import * as ReactDOM from 'react-dom';
import { render, unmount } from 'rc-util/lib/React/render'; import { render, unmount } from '@rc-component/util/lib/React/render';
import warning from '../_util/warning'; import warning from '../_util/warning';

View File

@ -58,7 +58,8 @@ import TreeSelect from '../../tree-select';
import Upload from '../../upload'; import Upload from '../../upload';
dayjs.extend(customParseFormat); dayjs.extend(customParseFormat);
jest.mock('rc-util/lib/Portal');
jest.mock('@rc-component/util/lib/Portal');
describe('ConfigProvider', () => { describe('ConfigProvider', () => {
describe('components', () => { describe('components', () => {

View File

@ -10,7 +10,8 @@ import Select from '../../select';
import TreeSelect from '../../tree-select'; import TreeSelect from '../../tree-select';
dayjs.extend(customParseFormat); dayjs.extend(customParseFormat);
jest.mock('rc-util/lib/Portal');
jest.mock('@rc-component/util/lib/Portal');
function triggerProps(): TriggerProps { function triggerProps(): TriggerProps {
return (global as any).triggerProps; return (global as any).triggerProps;

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import canUseDom from '@rc-component/util/lib/Dom/canUseDom';
import kebabCase from 'lodash/kebabCase'; import kebabCase from 'lodash/kebabCase';
import canUseDom from 'rc-util/lib/Dom/canUseDom';
import ConfigProvider from '..'; import ConfigProvider from '..';
import { Button, InputNumber, Select } from '../..'; import { Button, InputNumber, Select } from '../..';
@ -15,7 +15,7 @@ const { defaultAlgorithm, darkAlgorithm, compactAlgorithm } = theme;
/* biome-ignore lint/style/noVar: has to be a global variable */ /* eslint-disable-next-line no-var */ /* biome-ignore lint/style/noVar: has to be a global variable */ /* eslint-disable-next-line no-var */
var mockCanUseDom = true; var mockCanUseDom = true;
jest.mock('rc-util/lib/Dom/canUseDom', () => () => mockCanUseDom); jest.mock('@rc-component/util/lib/Dom/canUseDom', () => () => mockCanUseDom);
describe('ConfigProvider.Theme', () => { describe('ConfigProvider.Theme', () => {
beforeEach(() => { beforeEach(() => {

View File

@ -3,7 +3,7 @@ import { version } from 'react';
import { waitFakeTimer19 } from '../../../tests/utils'; import { waitFakeTimer19 } from '../../../tests/utils';
import Modal from '../../modal'; import Modal from '../../modal';
jest.mock('rc-util/lib/Dom/isVisible', () => () => true); jest.mock('@rc-component/util/lib/Dom/isVisible', () => () => true);
describe('UnstableContext', () => { describe('UnstableContext', () => {
beforeEach(() => { beforeEach(() => {

View File

@ -4,7 +4,7 @@ import ConfigProvider from '..';
import { fireEvent, render, waitFakeTimer } from '../../../tests/utils'; import { fireEvent, render, waitFakeTimer } from '../../../tests/utils';
import Button from '../../button'; import Button from '../../button';
jest.mock('rc-util/lib/Dom/isVisible', () => () => true); jest.mock('@rc-component/util/lib/Dom/isVisible', () => () => true);
describe('ConfigProvider.Wave', () => { describe('ConfigProvider.Wave', () => {
beforeEach(() => { beforeEach(() => {

View File

@ -1,7 +1,7 @@
import { generate } from '@ant-design/colors'; import { generate } from '@ant-design/colors';
import { FastColor } from '@ant-design/fast-color'; import { FastColor } from '@ant-design/fast-color';
import canUseDom from 'rc-util/lib/Dom/canUseDom'; import canUseDom from '@rc-component/util/lib/Dom/canUseDom';
import { updateCSS } from 'rc-util/lib/Dom/dynamicCSS'; import { updateCSS } from '@rc-component/util/lib/Dom/dynamicCSS';
import warning from '../_util/warning'; import warning from '../_util/warning';
import type { Theme } from './context'; import type { Theme } from './context';

View File

@ -1,5 +1,5 @@
import useMemo from 'rc-util/lib/hooks/useMemo'; import useMemo from '@rc-component/util/lib/hooks/useMemo';
import isEqual from 'rc-util/lib/isEqual'; import isEqual from '@rc-component/util/lib/isEqual';
import { devUseWarning } from '../../_util/warning'; import { devUseWarning } from '../../_util/warning';
import type { OverrideToken } from '../../theme/interface'; import type { OverrideToken } from '../../theme/interface';

View File

@ -1,8 +1,8 @@
import * as React from 'react'; import * as React from 'react';
import { createTheme } from '@ant-design/cssinjs'; import { createTheme } from '@ant-design/cssinjs';
import IconContext from '@ant-design/icons/lib/components/Context'; import IconContext from '@ant-design/icons/lib/components/Context';
import useMemo from 'rc-util/lib/hooks/useMemo'; import useMemo from '@rc-component/util/lib/hooks/useMemo';
import { merge } from 'rc-util/lib/utils/set'; import { merge } from '@rc-component/util/lib/utils/set';
import warning, { devUseWarning, WarningContext } from '../_util/warning'; import warning, { devUseWarning, WarningContext } from '../_util/warning';
import type { WarningContextProps } from '../_util/warning'; import type { WarningContextProps } from '../_util/warning';
@ -27,6 +27,7 @@ import type {
DatePickerConfig, DatePickerConfig,
DirectionType, DirectionType,
DrawerConfig, DrawerConfig,
EmptyConfig,
FlexConfig, FlexConfig,
FloatButtonGroupConfig, FloatButtonGroupConfig,
FormConfig, FormConfig,
@ -39,6 +40,8 @@ import type {
ModalConfig, ModalConfig,
NotificationConfig, NotificationConfig,
PaginationConfig, PaginationConfig,
PopconfirmConfig,
PopoverConfig,
PopupOverflow, PopupOverflow,
RangePickerConfig, RangePickerConfig,
SelectConfig, SelectConfig,
@ -52,14 +55,11 @@ import type {
ThemeConfig, ThemeConfig,
TimePickerConfig, TimePickerConfig,
TooltipConfig, TooltipConfig,
PopoverConfig,
PopconfirmConfig,
TourConfig, TourConfig,
TransferConfig, TransferConfig,
TreeSelectConfig, TreeSelectConfig,
Variant, Variant,
WaveConfig, WaveConfig,
EmptyConfig,
} from './context'; } from './context';
import { import {
ConfigConsumer, ConfigConsumer,

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import toArray from 'rc-util/lib/Children/toArray'; import toArray from '@rc-component/util/lib/Children/toArray';
import type { DescriptionsItemType, InternalDescriptionsItemType } from '..'; import type { DescriptionsItemType, InternalDescriptionsItemType } from '..';
import { matchScreen } from '../../_util/responsiveObserver'; import { matchScreen } from '../../_util/responsiveObserver';

View File

@ -1,11 +1,11 @@
import * as React from 'react'; import * as React from 'react';
import RightOutlined from '@ant-design/icons/RightOutlined'; import RightOutlined from '@ant-design/icons/RightOutlined';
import type { AlignType } from '@rc-component/trigger'; import type { AlignType } from '@rc-component/trigger';
import useEvent from '@rc-component/util/lib/hooks/useEvent';
import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import RcDropdown from 'rc-dropdown'; import RcDropdown from 'rc-dropdown';
import useEvent from 'rc-util/lib/hooks/useEvent';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import omit from 'rc-util/lib/omit';
import { useZIndex } from '../_util/hooks/useZIndex'; import { useZIndex } from '../_util/hooks/useZIndex';
import isPrimitive from '../_util/isPrimitive'; import isPrimitive from '../_util/isPrimitive';

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import { isPresetSize } from '../_util/gapSize'; import { isPresetSize } from '../_util/gapSize';
import { ConfigContext } from '../config-provider'; import { ConfigContext } from '../config-provider';

View File

@ -1,8 +1,8 @@
import React, { useContext, useEffect, useState } from 'react'; import React, { useContext, useEffect, useState } from 'react';
import VerticalAlignTopOutlined from '@ant-design/icons/VerticalAlignTopOutlined'; import VerticalAlignTopOutlined from '@ant-design/icons/VerticalAlignTopOutlined';
import { composeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import CSSMotion from 'rc-motion'; import CSSMotion from 'rc-motion';
import { composeRef } from 'rc-util/lib/ref';
import getScroll from '../_util/getScroll'; import getScroll from '../_util/getScroll';
import scrollTo from '../_util/scrollTo'; import scrollTo from '../_util/scrollTo';

View File

@ -1,6 +1,6 @@
import React, { useContext, useMemo } from 'react'; import React, { useContext, useMemo } from 'react';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import { useZIndex } from '../_util/hooks/useZIndex'; import { useZIndex } from '../_util/hooks/useZIndex';
import { devUseWarning } from '../_util/warning'; import { devUseWarning } from '../_util/warning';

View File

@ -1,10 +1,10 @@
import React from 'react'; import React from 'react';
import CloseOutlined from '@ant-design/icons/CloseOutlined'; import CloseOutlined from '@ant-design/icons/CloseOutlined';
import FileTextOutlined from '@ant-design/icons/FileTextOutlined'; import FileTextOutlined from '@ant-design/icons/FileTextOutlined';
import useEvent from '@rc-component/util/lib/hooks/useEvent';
import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import classNames from 'classnames'; import classNames from 'classnames';
import CSSMotion from 'rc-motion'; import CSSMotion from 'rc-motion';
import useEvent from 'rc-util/lib/hooks/useEvent';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import { useZIndex } from '../_util/hooks/useZIndex'; import { useZIndex } from '../_util/hooks/useZIndex';
import { devUseWarning } from '../_util/warning'; import { devUseWarning } from '../_util/warning';

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import * as React from 'react';
import isVisible from '@rc-component/util/lib/Dom/isVisible';
import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import type { Meta } from 'rc-field-form/lib/interface'; import type { Meta } from 'rc-field-form/lib/interface';
import isVisible from 'rc-util/lib/Dom/isVisible';
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
import omit from 'rc-util/lib/omit';
import type { FormItemProps } from '.'; import type { FormItemProps } from '.';
import { Row } from '../../grid'; import { Row } from '../../grid';

View File

@ -1,11 +1,11 @@
import * as React from 'react'; import * as React from 'react';
import type { JSX } from 'react'; import type { JSX } from 'react';
import useState from '@rc-component/util/lib/hooks/useState';
import { supportRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import { Field, FieldContext, ListContext } from 'rc-field-form'; import { Field, FieldContext, ListContext } from 'rc-field-form';
import type { FieldProps } from 'rc-field-form/lib/Field'; import type { FieldProps } from 'rc-field-form/lib/Field';
import type { InternalNamePath, Meta } from 'rc-field-form/lib/interface'; import type { InternalNamePath, Meta } from 'rc-field-form/lib/interface';
import useState from 'rc-util/lib/hooks/useState';
import { supportRef } from 'rc-util/lib/ref';
import { cloneElement } from '../../_util/reactNode'; import { cloneElement } from '../../_util/reactNode';
import { devUseWarning } from '../../_util/warning'; import { devUseWarning } from '../../_util/warning';

View File

@ -1,8 +1,8 @@
import * as React from 'react'; import * as React from 'react';
import type { JSX } from 'react'; import type { JSX } from 'react';
import { get, set } from '@rc-component/util';
import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect';
import classNames from 'classnames'; import classNames from 'classnames';
import { get, set } from 'rc-util';
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
import type { ColProps } from '../grid/col'; import type { ColProps } from '../grid/col';
import Col from '../grid/col'; import Col from '../grid/col';

View File

@ -1,14 +1,14 @@
import type { PropsWithChildren, ReactNode } from 'react'; import type { PropsWithChildren, ReactNode } from 'react';
import * as React from 'react'; import * as React from 'react';
import omit from '@rc-component/util/lib/omit';
import { FormProvider as RcFormProvider } from 'rc-field-form'; import { FormProvider as RcFormProvider } from 'rc-field-form';
import type { FormProviderProps as RcFormProviderProps } from 'rc-field-form/lib/FormContext'; import type { FormProviderProps as RcFormProviderProps } from 'rc-field-form/lib/FormContext';
import type { Meta } from 'rc-field-form/lib/interface'; import type { Meta } from 'rc-field-form/lib/interface';
import omit from 'rc-util/lib/omit';
import type { Variant } from '../config-provider';
import type { ColProps } from '../grid/col'; import type { ColProps } from '../grid/col';
import type { FormInstance, RequiredMark } from './Form'; import type { FormInstance, RequiredMark } from './Form';
import type { FeedbackIcons, ValidateStatus } from './FormItem'; import type { FeedbackIcons, ValidateStatus } from './FormItem';
import type { Variant } from '../config-provider';
import type { FormLabelAlign } from './interface'; import type { FormLabelAlign } from './interface';
/** Form Context. Set top form style and pass to Form Item usage. */ /** Form Context. Set top form style and pass to Form Item usage. */

View File

@ -1,4 +1,4 @@
import toArray from 'rc-util/lib/Children/toArray'; import toArray from '@rc-component/util/lib/Children/toArray';
import type { FormItemProps } from '../FormItem'; import type { FormItemProps } from '../FormItem';

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import { getDOM } from '@rc-component/util/lib/Dom/findDOMNode';
import type { FormInstance as RcFormInstance } from 'rc-field-form'; import type { FormInstance as RcFormInstance } from 'rc-field-form';
import { useForm as useRcForm } from 'rc-field-form'; import { useForm as useRcForm } from 'rc-field-form';
import { getDOM } from 'rc-util/lib/Dom/findDOMNode';
import scrollIntoView from 'scroll-into-view-if-needed'; import scrollIntoView from 'scroll-into-view-if-needed';
import type { InternalNamePath, NamePath, ScrollOptions } from '../interface'; import type { InternalNamePath, NamePath, ScrollOptions } from '../interface';

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import raf from 'rc-util/lib/raf'; import raf from '@rc-component/util/lib/raf';
type Updater<ValueType> = (prev?: ValueType) => ValueType; type Updater<ValueType> = (prev?: ValueType) => ValueType;

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import { composeRef, getNodeRef } from 'rc-util/lib/ref'; import { composeRef, getNodeRef } from '@rc-component/util/lib/ref';
import { FormContext } from '../context'; import { FormContext } from '../context';
import type { InternalNamePath } from '../interface'; import type { InternalNamePath } from '../interface';

View File

@ -3,7 +3,7 @@ import React from 'react';
import { Col, Row } from '..'; import { Col, Row } from '..';
import { render } from '../../../tests/utils'; import { render } from '../../../tests/utils';
jest.mock('rc-util/lib/Dom/canUseDom', () => () => false); jest.mock('@rc-component/util/lib/Dom/canUseDom', () => () => false);
describe('Grid.Server', () => { describe('Grid.Server', () => {
it('use compatible gap logic', () => { it('use compatible gap logic', () => {

View File

@ -1,5 +1,5 @@
import { useRef } from 'react'; import { useRef } from 'react';
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect'; import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect';
import useForceUpdate from '../../_util/hooks/useForceUpdate'; import useForceUpdate from '../../_util/hooks/useForceUpdate';
import type { ScreenMap } from '../../_util/responsiveObserver'; import type { ScreenMap } from '../../_util/responsiveObserver';

View File

@ -1,9 +1,9 @@
import React, { forwardRef, useContext, useEffect, useRef } from 'react'; import React, { forwardRef, useContext, useEffect, useRef } from 'react';
import { composeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import type { InputRef, InputProps as RcInputProps } from 'rc-input'; import type { InputRef, InputProps as RcInputProps } from 'rc-input';
import RcInput from 'rc-input'; import RcInput from 'rc-input';
import { InputFocusOptions, triggerFocus } from 'rc-input/lib/utils/commonUtils'; import { InputFocusOptions, triggerFocus } from 'rc-input/lib/utils/commonUtils';
import { composeRef } from 'rc-util/lib/ref';
import ContextIsolator from '../_util/ContextIsolator'; import ContextIsolator from '../_util/ContextIsolator';
import getAllowClear from '../_util/getAllowClear'; import getAllowClear from '../_util/getAllowClear';

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import raf from 'rc-util/lib/raf'; import raf from '@rc-component/util/lib/raf';
import Input from '../Input'; import Input from '../Input';
import type { InputProps, InputRef } from '../Input'; import type { InputProps, InputRef } from '../Input';

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import useEvent from '@rc-component/util/lib/hooks/useEvent';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import classNames from 'classnames'; import classNames from 'classnames';
import useEvent from 'rc-util/lib/hooks/useEvent';
import pickAttrs from 'rc-util/lib/pickAttrs';
import { getMergedStatus } from '../../_util/statusUtils'; import { getMergedStatus } from '../../_util/statusUtils';
import type { InputStatus } from '../../_util/statusUtils'; import type { InputStatus } from '../../_util/statusUtils';

View File

@ -2,9 +2,9 @@ import * as React from 'react';
import { useRef, useState } from 'react'; import { useRef, useState } from 'react';
import EyeInvisibleOutlined from '@ant-design/icons/EyeInvisibleOutlined'; import EyeInvisibleOutlined from '@ant-design/icons/EyeInvisibleOutlined';
import EyeOutlined from '@ant-design/icons/EyeOutlined'; import EyeOutlined from '@ant-design/icons/EyeOutlined';
import omit from '@rc-component/util/lib/omit';
import { composeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import { composeRef } from 'rc-util/lib/ref';
import type { ConfigConsumerProps } from '../config-provider'; import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from '../config-provider'; import { ConfigContext } from '../config-provider';

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import SearchOutlined from '@ant-design/icons/SearchOutlined'; import SearchOutlined from '@ant-design/icons/SearchOutlined';
import { composeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import { composeRef } from 'rc-util/lib/ref';
import { cloneElement } from '../_util/reactNode'; import { cloneElement } from '../_util/reactNode';
import Button from '../button'; import Button from '../button';

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { spyElementPrototypes } from 'rc-util/lib/test/domHook'; import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook';
import Input from '..'; import Input from '..';
import { fireEvent, render } from '../../../tests/utils'; import { fireEvent, render } from '../../../tests/utils';

View File

@ -1,6 +1,6 @@
import type { ChangeEventHandler, TextareaHTMLAttributes } from 'react'; import type { ChangeEventHandler, TextareaHTMLAttributes } from 'react';
import React, { useState } from 'react'; import React, { useState } from 'react';
import { spyElementPrototypes } from 'rc-util/lib/test/domHook'; import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook';
import Input from '..'; import Input from '..';
import focusTest from '../../../tests/shared/focusTest'; import focusTest from '../../../tests/shared/focusTest';

View File

@ -3,8 +3,8 @@ import { useContext, useEffect, useRef, useState } from 'react';
import BarsOutlined from '@ant-design/icons/BarsOutlined'; import BarsOutlined from '@ant-design/icons/BarsOutlined';
import LeftOutlined from '@ant-design/icons/LeftOutlined'; import LeftOutlined from '@ant-design/icons/LeftOutlined';
import RightOutlined from '@ant-design/icons/RightOutlined'; import RightOutlined from '@ant-design/icons/RightOutlined';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import isNumeric from '../_util/isNumeric'; import isNumeric from '../_util/isNumeric';
import { ConfigContext } from '../config-provider'; import { ConfigContext } from '../config-provider';

View File

@ -1,5 +1,5 @@
import type * as React from 'react'; import type * as React from 'react';
import toArray from 'rc-util/lib/Children/toArray'; import toArray from '@rc-component/util/lib/Children/toArray';
import Sider from '../Sider'; import Sider from '../Sider';

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import { ConfigContext } from '../config-provider'; import { ConfigContext } from '../config-provider';
import { LayoutContext } from './context'; import { LayoutContext } from './context';

View File

@ -1,4 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import { composeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import RcMentions from 'rc-mentions'; import RcMentions from 'rc-mentions';
import type { import type {
@ -6,7 +7,6 @@ import type {
MentionsProps as RcMentionsProps, MentionsProps as RcMentionsProps,
MentionsRef as RcMentionsRef, MentionsRef as RcMentionsRef,
} from 'rc-mentions/lib/Mentions'; } from 'rc-mentions/lib/Mentions';
import { composeRef } from 'rc-util/lib/ref';
import getAllowClear from '../_util/getAllowClear'; import getAllowClear from '../_util/getAllowClear';
import genPurePanel from '../_util/PurePanel'; import genPurePanel from '../_util/PurePanel';

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import * as React from 'react';
import toArray from '@rc-component/util/lib/Children/toArray';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import type { MenuItemProps as RcMenuItemProps } from 'rc-menu'; import type { MenuItemProps as RcMenuItemProps } from 'rc-menu';
import { Item } from 'rc-menu'; import { Item } from 'rc-menu';
import toArray from 'rc-util/lib/Children/toArray';
import omit from 'rc-util/lib/omit';
import { cloneElement } from '../_util/reactNode'; import { cloneElement } from '../_util/reactNode';
import type { SiderContextProps } from '../layout/Sider'; import type { SiderContextProps } from '../layout/Sider';

View File

@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import { getNodeRef, supportNodeRef, useComposeRef } from 'rc-util/lib/ref'; import { getNodeRef, supportNodeRef, useComposeRef } from '@rc-component/util/lib/ref';
import ContextIsolator from '../_util/ContextIsolator'; import ContextIsolator from '../_util/ContextIsolator';
import type { MenuProps } from './menu'; import type { MenuProps } from './menu';

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import { SubMenu as RcSubMenu, useFullPath } from 'rc-menu'; import { SubMenu as RcSubMenu, useFullPath } from 'rc-menu';
import omit from 'rc-util/lib/omit';
import { useZIndex } from '../_util/hooks/useZIndex'; import { useZIndex } from '../_util/hooks/useZIndex';
import { cloneElement } from '../_util/reactNode'; import { cloneElement } from '../_util/reactNode';

View File

@ -1,11 +1,11 @@
import * as React from 'react'; import * as React from 'react';
import { forwardRef } from 'react'; import { forwardRef } from 'react';
import EllipsisOutlined from '@ant-design/icons/EllipsisOutlined'; import EllipsisOutlined from '@ant-design/icons/EllipsisOutlined';
import useEvent from '@rc-component/util/lib/hooks/useEvent';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import type { MenuProps as RcMenuProps, MenuRef as RcMenuRef } from 'rc-menu'; import type { MenuProps as RcMenuProps, MenuRef as RcMenuRef } from 'rc-menu';
import RcMenu from 'rc-menu'; import RcMenu from 'rc-menu';
import useEvent from 'rc-util/lib/hooks/useEvent';
import omit from 'rc-util/lib/omit';
import initCollapseMotion from '../_util/motion'; import initCollapseMotion from '../_util/motion';
import { cloneElement } from '../_util/reactNode'; import { cloneElement } from '../_util/reactNode';

View File

@ -6,7 +6,7 @@ import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest'; import rtlTest from '../../../tests/shared/rtlTest';
import { createEvent, fireEvent, render } from '../../../tests/utils'; import { createEvent, fireEvent, render } from '../../../tests/utils';
jest.mock('rc-util/lib/Portal'); jest.mock('@rc-component/util/lib/Portal');
const ModalTester: React.FC<ModalProps> = (props) => { const ModalTester: React.FC<ModalProps> = (props) => {
const [open, setOpen] = React.useState(false); const [open, setOpen] = React.useState(false);

View File

@ -1,9 +1,9 @@
import * as React from 'react'; import * as React from 'react';
import { SmileOutlined } from '@ant-design/icons'; import { SmileOutlined } from '@ant-design/icons';
import KeyCode from '@rc-component/util/lib/KeyCode';
import { resetWarned } from '@rc-component/util/lib/warning';
import CSSMotion from 'rc-motion'; import CSSMotion from 'rc-motion';
import { genCSSMotion } from 'rc-motion/lib/CSSMotion'; import { genCSSMotion } from 'rc-motion/lib/CSSMotion';
import KeyCode from 'rc-util/lib/KeyCode';
import { resetWarned } from 'rc-util/lib/warning';
import type { ModalFuncProps } from '..'; import type { ModalFuncProps } from '..';
import Modal from '..'; import Modal from '..';
@ -76,7 +76,7 @@ describe('Modal.confirm triggers callbacks correctly', () => {
(CSSMotion as any)[key] = (MockCSSMotion as any)[key]; (CSSMotion as any)[key] = (MockCSSMotion as any)[key];
}); });
// // Mock for rc-util raf // // Mock for @rc-component/util raf
// window.requestAnimationFrame = callback => { // window.requestAnimationFrame = callback => {
// const ret = window.setTimeout(callback, 16); // const ret = window.setTimeout(callback, 16);
// return ret; // return ret;

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import KeyCode from '@rc-component/util/lib/KeyCode';
import CSSMotion from 'rc-motion'; import CSSMotion from 'rc-motion';
import { genCSSMotion } from 'rc-motion/lib/CSSMotion'; import { genCSSMotion } from 'rc-motion/lib/CSSMotion';
import KeyCode from 'rc-util/lib/KeyCode';
import Modal from '..'; import Modal from '..';
import { act, fireEvent, render, waitFakeTimer } from '../../../tests/utils'; import { act, fireEvent, render, waitFakeTimer } from '../../../tests/utils';
@ -11,7 +11,7 @@ import Input from '../../input';
import zhCN from '../../locale/zh_CN'; import zhCN from '../../locale/zh_CN';
import type { ModalFunc } from '../confirm'; import type { ModalFunc } from '../confirm';
jest.mock('rc-util/lib/Portal'); jest.mock('@rc-component/util/lib/Portal');
jest.mock('rc-motion'); jest.mock('rc-motion');
// TODO: Remove this. Mock for React 19 // TODO: Remove this. Mock for React 19

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { spyElementPrototype } from 'rc-util/lib/test/domHook'; import { spyElementPrototype } from '@rc-component/util/lib/test/domHook';
import Popconfirm from '..'; import Popconfirm from '..';
import mountTest from '../../../tests/shared/mountTest'; import mountTest from '../../../tests/shared/mountTest';

View File

@ -1,8 +1,8 @@
import * as React from 'react'; import * as React from 'react';
import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled'; import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import omit from 'rc-util/lib/omit';
import type { RenderFunction } from '../_util/getRenderPropValue'; import type { RenderFunction } from '../_util/getRenderPropValue';
import type { ButtonProps, LegacyButtonType } from '../button/button'; import type { ButtonProps, LegacyButtonType } from '../button/button';

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import KeyCode from '@rc-component/util/lib/KeyCode';
import classNames from 'classnames'; import classNames from 'classnames';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import KeyCode from 'rc-util/lib/KeyCode';
import type { RenderFunction } from '../_util/getRenderPropValue'; import type { RenderFunction } from '../_util/getRenderPropValue';
import { getRenderPropValue } from '../_util/getRenderPropValue'; import { getRenderPropValue } from '../_util/getRenderPropValue';

View File

@ -1,11 +1,11 @@
import * as React from 'react'; import * as React from 'react';
import { FastColor } from '@ant-design/fast-color';
import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled'; import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled';
import CheckOutlined from '@ant-design/icons/CheckOutlined'; import CheckOutlined from '@ant-design/icons/CheckOutlined';
import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled'; import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
import CloseOutlined from '@ant-design/icons/CloseOutlined'; import CloseOutlined from '@ant-design/icons/CloseOutlined';
import { FastColor } from '@ant-design/fast-color'; import omit from '@rc-component/util/lib/omit';
import classNames from 'classnames'; import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import { devUseWarning } from '../_util/warning'; import { devUseWarning } from '../_util/warning';
import type { ConfigConsumerProps } from '../config-provider'; import type { ConfigConsumerProps } from '../config-provider';

View File

@ -1,8 +1,8 @@
import React, { useContext, type AriaAttributes } from 'react'; import React, { useContext, type AriaAttributes } from 'react';
import { QRCodeCanvas, QRCodeSVG } from '@rc-component/qrcode'; import { QRCodeCanvas, QRCodeSVG } from '@rc-component/qrcode';
import omit from '@rc-component/util/lib/omit';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import classNames from 'classnames'; import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import pickAttrs from 'rc-util/lib/pickAttrs';
import { devUseWarning } from '../_util/warning'; import { devUseWarning } from '../_util/warning';
import type { ConfigConsumerProps } from '../config-provider'; import type { ConfigConsumerProps } from '../config-provider';

View File

@ -1,7 +1,8 @@
import * as React from 'react'; import * as React from 'react';
import useId from '@rc-component/util/lib/hooks/useId';
import useMergedState from '@rc-component/util/lib/hooks/useMergedState';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import classNames from 'classnames'; import classNames from 'classnames';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import pickAttrs from 'rc-util/lib/pickAttrs';
import { ConfigContext } from '../config-provider'; import { ConfigContext } from '../config-provider';
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls'; import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
@ -15,7 +16,6 @@ import type {
} from './interface'; } from './interface';
import Radio from './radio'; import Radio from './radio';
import useStyle from './style'; import useStyle from './style';
import useId from 'rc-util/lib/hooks/useId';
const RadioGroup = React.forwardRef<HTMLDivElement, RadioGroupProps>((props, ref) => { const RadioGroup = React.forwardRef<HTMLDivElement, RadioGroupProps>((props, ref) => {
const { getPrefixCls, direction } = React.useContext(ConfigContext); const { getPrefixCls, direction } = React.useContext(ConfigContext);

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import { composeRef } from '@rc-component/util/lib/ref';
import classNames from 'classnames'; import classNames from 'classnames';
import RcCheckbox from 'rc-checkbox'; import RcCheckbox from 'rc-checkbox';
import { composeRef } from 'rc-util/lib/ref';
import { devUseWarning } from '../_util/warning'; import { devUseWarning } from '../_util/warning';
import Wave from '../_util/wave'; import Wave from '../_util/wave';

View File

@ -1,4 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import useId from '@rc-component/util/lib/hooks/useId';
import classNames from 'classnames'; import classNames from 'classnames';
import type { import type {
SegmentedLabeledOption as RcSegmentedLabeledOption, SegmentedLabeledOption as RcSegmentedLabeledOption,
@ -12,7 +13,6 @@ import { ConfigContext } from '../config-provider';
import useSize from '../config-provider/hooks/useSize'; import useSize from '../config-provider/hooks/useSize';
import type { SizeType } from '../config-provider/SizeContext'; import type { SizeType } from '../config-provider/SizeContext';
import useStyle from './style'; import useStyle from './style';
import useId from 'rc-util/lib/hooks/useId';
export type { SegmentedValue } from 'rc-segmented'; export type { SegmentedValue } from 'rc-segmented';

Some files were not shown because too many files have changed in this diff Show More