From 7570ad49fdd6bfd74ae431af5cf4b574aac8f993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Fri, 10 Jan 2025 14:38:05 +0800 Subject: [PATCH] chore: update deps --- package.json | 6 +++--- src/Dialog/Content/Panel.tsx | 4 ++-- src/Dialog/index.tsx | 10 +++++----- src/IDialogPropTypes.tsx | 2 +- tests/index.spec.tsx | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index d2faae60..e07aeba5 100644 --- a/package.json +++ b/package.json @@ -51,12 +51,12 @@ "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/portal": "^1.0.0-8", + "@rc-component/util": "^1.0.1", "classnames": "^2.2.6", - "rc-motion": "^2.3.0", - "rc-util": "^5.21.0" + "rc-motion": "^2.3.0" }, "devDependencies": { - "@rc-component/father-plugin": "^1.0.1", + "@rc-component/father-plugin": "^2.0.1", "@testing-library/jest-dom": "^6.1.6", "@testing-library/react": "^12.0.0", "@types/enzyme": "^3.10.7", diff --git a/src/Dialog/Content/Panel.tsx b/src/Dialog/Content/Panel.tsx index 188eb1e1..8e2cfb1f 100644 --- a/src/Dialog/Content/Panel.tsx +++ b/src/Dialog/Content/Panel.tsx @@ -1,10 +1,10 @@ import classNames from 'classnames'; -import { useComposeRef } from 'rc-util/lib/ref'; +import { useComposeRef } from '@rc-component/util/lib/ref'; import React, { useMemo, useRef } from 'react'; import { RefContext } from '../../context'; import type { IDialogPropTypes } from '../../IDialogPropTypes'; import MemoChildren from './MemoChildren'; -import pickAttrs from 'rc-util/lib/pickAttrs'; +import pickAttrs from '@rc-component/util/lib/pickAttrs'; const sentinelStyle = { width: 0, height: 0, overflow: 'hidden', outline: 'none' }; const entityStyle = { outline: 'none' }; diff --git a/src/Dialog/index.tsx b/src/Dialog/index.tsx index 21155957..27dacf3a 100644 --- a/src/Dialog/index.tsx +++ b/src/Dialog/index.tsx @@ -1,8 +1,8 @@ import classNames from 'classnames'; -import contains from 'rc-util/lib/Dom/contains'; -import useId from 'rc-util/lib/hooks/useId'; -import KeyCode from 'rc-util/lib/KeyCode'; -import pickAttrs from 'rc-util/lib/pickAttrs'; +import contains from '@rc-component/util/lib/Dom/contains'; +import useId from '@rc-component/util/lib/hooks/useId'; +import KeyCode from '@rc-component/util/lib/KeyCode'; +import pickAttrs from '@rc-component/util/lib/pickAttrs'; import * as React from 'react'; import { useEffect, useRef } from 'react'; import type { IDialogPropTypes } from '../IDialogPropTypes'; @@ -10,7 +10,7 @@ import { getMotionName } from '../util'; import Content from './Content'; import type { ContentRef } from './Content/Panel'; import Mask from './Mask'; -import { warning } from 'rc-util/lib/warning'; +import { warning } from '@rc-component/util/lib/warning'; const Dialog: React.FC = (props) => { const { diff --git a/src/IDialogPropTypes.tsx b/src/IDialogPropTypes.tsx index 0b2b20c1..b9fbb8fd 100644 --- a/src/IDialogPropTypes.tsx +++ b/src/IDialogPropTypes.tsx @@ -1,4 +1,4 @@ -import type { GetContainer } from 'rc-util/lib/PortalWrapper'; +import type { GetContainer } from '@rc-component/util/lib/PortalWrapper'; import type { CSSProperties, ReactNode, SyntheticEvent } from 'react'; export type SemanticName = 'header' | 'body' | 'footer' | 'section' | 'title' | 'wrapper' | 'mask'; diff --git a/tests/index.spec.tsx b/tests/index.spec.tsx index 6efbe8df..455637f6 100644 --- a/tests/index.spec.tsx +++ b/tests/index.spec.tsx @@ -3,7 +3,7 @@ import { fireEvent, render } from '@testing-library/react'; import type { ReactWrapper } from 'enzyme'; import { mount } from 'enzyme'; import { Provider } from 'rc-motion'; -import KeyCode from 'rc-util/lib/KeyCode'; +import KeyCode from '@rc-component/util/lib/KeyCode'; import React, { cloneElement, useEffect } from 'react'; import { act } from 'react-dom/test-utils'; import type { DialogProps } from '../src';