Skip to content

Commit 96c2165

Browse files
committed
chore: update @rc-component/trigger
1 parent a9c5ec8 commit 96c2165

24 files changed

+50
-49
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ es
2727
coverage
2828
yarn.lock
2929
package-lock.json
30+
pnpm-lock.yaml
3031
bun.lockb
3132

3233
# dumi

docs/examples/case.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint no-console:0 */
22

33
import React from 'react';
4-
import type { CSSMotionProps } from 'rc-motion';
4+
import type { CSSMotionProps } from '@rc-component/motion';
55
import type { ActionType, BuildInPlacements } from 'rc-trigger';
66
import Trigger from 'rc-trigger';
77
import './case.less';

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rc-component/trigger",
3-
"version": "2.2.6",
3+
"version": "3.0.0",
44
"description": "base abstract trigger component for react",
55
"engines": {
66
"node": ">=8.x"
@@ -65,11 +65,11 @@
6565
},
6666
"dependencies": {
6767
"@babel/runtime": "^7.23.2",
68+
"@rc-component/motion": "^1.0.0",
6869
"@rc-component/portal": "^1.1.0",
69-
"classnames": "^2.3.2",
70-
"rc-motion": "^2.0.0",
71-
"rc-resize-observer": "^1.3.1",
72-
"rc-util": "^5.44.0"
70+
"@rc-component/resize-observer": "^1.0.0",
71+
"@rc-component/util": "^1.2.0",
72+
"classnames": "^2.3.2"
7373
},
7474
"peerDependencies": {
7575
"react": ">=16.9.0",

src/Popup/Mask.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import classNames from 'classnames';
2-
import type { CSSMotionProps } from 'rc-motion';
3-
import CSSMotion from 'rc-motion';
2+
import type { CSSMotionProps } from '@rc-component/motion';
3+
import CSSMotion from '@rc-component/motion';
44
import * as React from 'react';
55

66
export interface MaskProps {

src/Popup/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import classNames from 'classnames';
2-
import type { CSSMotionProps } from 'rc-motion';
3-
import CSSMotion from 'rc-motion';
4-
import ResizeObserver from 'rc-resize-observer';
5-
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
6-
import { composeRef } from 'rc-util/lib/ref';
2+
import type { CSSMotionProps } from '@rc-component/motion';
3+
import CSSMotion from '@rc-component/motion';
4+
import ResizeObserver from '@rc-component/resize-observer';
5+
import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect';
6+
import { composeRef } from '@rc-component/util/lib/ref';
77
import * as React from 'react';
88
import type { TriggerProps } from '../';
99
import type { AlignType, ArrowPos, ArrowTypeOuter } from '../interface';

src/TriggerWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
getNodeRef,
44
supportRef,
55
useComposeRef,
6-
} from 'rc-util/lib/ref';
6+
} from '@rc-component/util/lib/ref';
77
import * as React from 'react';
88
import type { TriggerProps } from '.';
99

src/hooks/useAlign.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { isDOM } from 'rc-util/lib/Dom/findDOMNode';
2-
import isVisible from 'rc-util/lib/Dom/isVisible';
3-
import useEvent from 'rc-util/lib/hooks/useEvent';
4-
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
1+
import { isDOM } from '@rc-component/util/lib/Dom/findDOMNode';
2+
import isVisible from '@rc-component/util/lib/Dom/isVisible';
3+
import useEvent from '@rc-component/util/lib/hooks/useEvent';
4+
import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect';
55
import * as React from 'react';
66
import type { TriggerProps } from '..';
77
import type {

src/hooks/useWatch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
1+
import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect';
22
import { collectScroller, getWin } from '../util';
33

44
export default function useWatch(

src/hooks/useWinClick.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getShadowRoot } from 'rc-util/lib/Dom/shadow';
2-
import { warning } from 'rc-util/lib/warning';
1+
import { getShadowRoot } from '@rc-component/util/lib/Dom/shadow';
2+
import { warning } from '@rc-component/util/lib/warning';
33
import * as React from 'react';
44
import { getWin } from '../util';
55

src/index.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import Portal from '@rc-component/portal';
22
import classNames from 'classnames';
3-
import type { CSSMotionProps } from 'rc-motion';
4-
import ResizeObserver from 'rc-resize-observer';
5-
import { isDOM } from 'rc-util/lib/Dom/findDOMNode';
6-
import { getShadowRoot } from 'rc-util/lib/Dom/shadow';
7-
import useEvent from 'rc-util/lib/hooks/useEvent';
8-
import useId from 'rc-util/lib/hooks/useId';
9-
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
10-
import isMobile from 'rc-util/lib/isMobile';
3+
import type { CSSMotionProps } from '@rc-component/motion';
4+
import ResizeObserver from '@rc-component/resize-observer';
5+
import { isDOM } from '@rc-component/util/lib/Dom/findDOMNode';
6+
import { getShadowRoot } from '@rc-component/util/lib/Dom/shadow';
7+
import useEvent from '@rc-component/util/lib/hooks/useEvent';
8+
import useId from '@rc-component/util/lib/hooks/useId';
9+
import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect';
10+
import isMobile from '@rc-component/util/lib/isMobile';
1111
import * as React from 'react';
1212
import Popup from './Popup';
1313
import TriggerWrapper from './TriggerWrapper';
@@ -80,9 +80,9 @@ export interface TriggerProps {
8080
maskClosable?: boolean;
8181

8282
// =================== Motion ====================
83-
/** Set popup motion. You can ref `rc-motion` for more info. */
83+
/** Set popup motion. You can ref `@rc-component/motion` for more info. */
8484
popupMotion?: CSSMotionProps;
85-
/** Set mask motion. You can ref `rc-motion` for more info. */
85+
/** Set mask motion. You can ref `@rc-component/motion` for more info. */
8686
maskMotion?: CSSMotionProps;
8787

8888
/** @deprecated Please us `popupMotion` instead. */

0 commit comments

Comments
 (0)