diff --git a/package.json b/package.json index 616b7a0..9dfb7fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "rc-collapse", - "version": "4.0.0", + "name": "@rc-component/collapse", + "version": "1.0.0-0", "description": "rc-collapse ui component for react", "keywords": [ "react", @@ -46,12 +46,12 @@ }, "dependencies": { "@babel/runtime": "^7.10.1", + "@rc-component/util": "^1.0.1", "classnames": "2.x", - "rc-motion": "^2.3.4", - "rc-util": "^5.27.0" + "rc-motion": "^2.3.4" }, "devDependencies": { - "@rc-component/father-plugin": "^1.0.1", + "@rc-component/father-plugin": "^2.0.1", "@testing-library/jest-dom": "^6.1.4", "@testing-library/react": "^14.1.2", "@testing-library/user-event": "^14.5.2", diff --git a/src/Collapse.tsx b/src/Collapse.tsx index 0623138..0504476 100644 --- a/src/Collapse.tsx +++ b/src/Collapse.tsx @@ -1,11 +1,11 @@ import classNames from 'classnames'; -import useMergedState from 'rc-util/lib/hooks/useMergedState'; -import warning from 'rc-util/lib/warning'; +import useMergedState from '@rc-component/util/lib/hooks/useMergedState'; +import warning from '@rc-component/util/lib/warning'; import React from 'react'; import useItems from './hooks/useItems'; import type { CollapseProps } from './interface'; import CollapsePanel from './Panel'; -import pickAttrs from 'rc-util/lib/pickAttrs'; +import pickAttrs from '@rc-component/util/lib/pickAttrs'; function getActiveKeysArray(activeKey: React.Key | React.Key[]) { let currentActiveKey = activeKey; diff --git a/src/Panel.tsx b/src/Panel.tsx index 613719f..c463325 100644 --- a/src/Panel.tsx +++ b/src/Panel.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; import CSSMotion from 'rc-motion'; -import KeyCode from 'rc-util/lib/KeyCode'; +import KeyCode from '@rc-component/util/lib/KeyCode'; import React from 'react'; import type { CollapsePanelProps } from './interface'; import PanelContent from './PanelContent'; diff --git a/src/hooks/useItems.tsx b/src/hooks/useItems.tsx index 2bc5db7..5c86d02 100644 --- a/src/hooks/useItems.tsx +++ b/src/hooks/useItems.tsx @@ -1,4 +1,4 @@ -import toArray from 'rc-util/lib/Children/toArray'; +import toArray from '@rc-component/util/lib/Children/toArray'; import React from 'react'; import type { CollapsePanelProps, CollapseProps, ItemType } from '../interface'; import CollapsePanel from '../Panel';