From ab8980d29daeb7992a4c804d1024413e226d657a Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Wed, 26 Nov 2025 11:58:54 +0800 Subject: [PATCH 1/6] feat: clsx update --- .gitignore | 2 ++ examples/animate.tsx | 19 +++++++------------ package.json | 8 ++++---- src/Filler.tsx | 6 ++---- src/List.tsx | 8 ++++---- src/ScrollBar.tsx | 12 ++++++------ src/hooks/useFrameWheel.ts | 2 +- src/hooks/useMobileTouchMove.ts | 2 +- src/hooks/useScrollDrag.ts | 2 +- src/hooks/useScrollTo.tsx | 6 +++--- tests/scroll.test.js | 6 +++--- tests/scrollWidth.test.tsx | 2 +- 12 files changed, 35 insertions(+), 40 deletions(-) diff --git a/.gitignore b/.gitignore index 6db48dde..615c9938 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,9 @@ lib/ ~* yarn.lock package-lock.json +pnpm-lock.yaml !tests/__mocks__/rc-util/lib +!tests/__mocks__/@rc-component/util/lib bun.lockb # umi diff --git a/examples/animate.tsx b/examples/animate.tsx index daa632f3..90939765 100644 --- a/examples/animate.tsx +++ b/examples/animate.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; // @ts-ignore import CSSMotion from 'rc-animate/lib/CSSMotion'; -import classNames from 'classnames'; +import { clsx } from 'clsx'; import List, { ListRef } from '../src/List'; -import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect'; +import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect'; import './animate.less'; let uuid = 0; @@ -74,7 +74,7 @@ const MyItem: React.ForwardRefRenderFunction = ( motionName="motion" motionAppear={motionAppear} onAppearStart={getCollapsedHeight} - onAppearActive={node => { + onAppearActive={(node) => { motionRef.current = true; return getMaxHeight(node); }} @@ -87,12 +87,7 @@ const MyItem: React.ForwardRefRenderFunction = ( > {({ className, style }, passedMotionRef) => { return ( -
+