File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 },
4646 "dependencies" : {
4747 "@rc-component/resize-observer" : " ^1.1.1" ,
48- "@rc-component/util" : " ^1.4.0 " ,
48+ "@rc-component/util" : " ^1.11.1 " ,
4949 "clsx" : " ^2.1.1"
5050 },
5151 "devDependencies" : {
52- "@rc-component/father-plugin" : " ^2.0.3 " ,
52+ "@rc-component/father-plugin" : " ^2.2.0 " ,
5353 "@rc-component/np" : " ^1.0.3" ,
5454 "@testing-library/jest-dom" : " ^6.6.3" ,
5555 "@testing-library/react" : " ^16.0.1" ,
Original file line number Diff line number Diff line change 11import { clsx } from 'clsx' ;
2- import omit from '@rc-component/util/lib/omit ' ;
2+ import { omit , triggerFocus , type InputFocusOptions } from '@rc-component/util' ;
33import React , {
44 forwardRef ,
55 useEffect ,
@@ -15,10 +15,6 @@ import useCountExceed from './hooks/useCountExceed';
1515import useMergedValue from './hooks/useMergedValue' ;
1616import type { ChangeEventInfo , InputProps , InputRef } from './interface' ;
1717import { resolveOnChange } from './utils/commonUtils' ;
18- import {
19- triggerFocus ,
20- type InputFocusOptions ,
21- } from '@rc-component/util/lib/Dom/focus' ;
2218
2319const Input = forwardRef < InputRef , InputProps > ( ( props , ref ) => {
2420 const {
Original file line number Diff line number Diff line change 1- import ResizeObserver from '@rc-component/resize-observer' ;
2- import useControlledState from '@rc-component/util/lib/hooks/useControlledState' ;
3- import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect' ;
4- import raf from '@rc-component/util/lib/raf' ;
51import { clsx } from 'clsx' ;
2+ import ResizeObserver from '@rc-component/resize-observer' ;
3+ import { raf , useControlledState , useLayoutEffect } from '@rc-component/util' ;
64import * as React from 'react' ;
75import type { ResizableTextAreaRef , TextAreaProps } from './interface' ;
86import calculateAutoSizeStyle from './calculateNodeHeight' ;
Original file line number Diff line number Diff line change 1- import useControlledState from '@rc-component/util/lib/hooks/useControlledState ' ;
1+ import { useControlledState } from '@rc-component/util' ;
22
33type MergedValue = string | number | readonly string [ ] | bigint | undefined ;
44
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ import type {
77 ReactNode ,
88 TextareaHTMLAttributes ,
99} from 'react' ;
10+ import type { InputFocusOptions } from '@rc-component/util' ;
1011import type { LiteralUnion } from './utils/types' ;
11- import type { InputFocusOptions } from '@rc-component/util/lib/Dom/focus' ;
1212
1313export interface CommonInputProps {
1414 prefix ?: ReactNode ;
Original file line number Diff line number Diff line change 1+ import { fireEvent , render } from '@testing-library/react' ;
12import React from 'react' ;
2- import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook ' ;
3+ import { spyElementPrototypes } from '@rc-component/util' ;
34import Input from '../src' ;
4- import { fireEvent , render } from '@testing-library/react' ;
55
66const getInputRef = ( ) => {
77 const ref = React . createRef < any > ( ) ;
Original file line number Diff line number Diff line change 11import { fireEvent , render } from '@testing-library/react' ;
22import userEvent from '@testing-library/user-event' ;
3- import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook' ;
43import React , { ElementType } from 'react' ;
4+ import { spyElementPrototypes } from '@rc-component/util' ;
55import Input from '../src' ;
66import type { InputRef } from '../src/interface' ;
77import { resolveOnChange } from '../src/utils/commonUtils' ;
Original file line number Diff line number Diff line change 11// @ts -nocheck
22import { act } from '@testing-library/react' ;
3- import {
4- _rs as onEsResize ,
5- _rs as onLibResize ,
6- } from '@rc-component/resize-observer/lib/utils/observerUtil' ;
3+ import { _rs as onResize } from '@rc-component/resize-observer' ;
74
85export function triggerResize (
96 target ,
@@ -14,9 +11,7 @@ export function triggerResize(
1411
1512 target . getBoundingClientRect = ( ) => ( { width, height } ) ;
1613 // @ts -ignore
17- onLibResize ( [ { target } ] ) ;
18- // @ts -ignore
19- onEsResize ( [ { target } ] ) ;
14+ onResize ( [ { target } ] ) ;
2015
2116 target . style . height = `${ height } px` ;
2217 target . getBoundingClientRect = originGetBoundingClientRect ;
You can’t perform that action at this time.
0 commit comments