@stenajs-webui/core
Advanced tools
Comparing version 21.29.2 to 21.29.3
@@ -13,4 +13,4 @@ import { RefObject } from "react"; | ||
export declare const getDimensionObject: (node: HTMLElement) => ElementDimensions; | ||
export declare const useElementDimensions: (ref: RefObject<HTMLElement>, onResizeElement?: (dimensions: ElementDimensions) => void) => { | ||
export declare const useElementDimensions: (ref: RefObject<HTMLElement | null>, onResizeElement?: (dimensions: ElementDimensions) => void) => { | ||
dimensions: ElementDimensions | undefined; | ||
}; |
import { RefObject } from "react"; | ||
type EventHandler<TEventName extends keyof HTMLElementEventMap> = (event: HTMLElementEventMap[TEventName]) => void; | ||
export declare const useEventListener: <TEventName extends keyof HTMLElementEventMap>(ref: RefObject<HTMLElement>, eventName: TEventName, handler: EventHandler<TEventName>) => void; | ||
export declare const useEventListener: <TEventName extends keyof HTMLElementEventMap>(ref: RefObject<HTMLElement | null>, eventName: TEventName, handler: EventHandler<TEventName>) => void; | ||
export {}; |
@@ -1,10 +0,10 @@ | ||
import { ComponentPropsWithoutRef, Ref, RefObject } from "react"; | ||
import { ComponentPropsWithoutRef, RefObject } from "react"; | ||
export interface InputProps<T = never> extends Omit<ComponentPropsWithoutRef<"input">, "value" | "onChange"> { | ||
/** This is a RefObject since the input components use ref.current which Ref type doesn't have. */ | ||
inputRef?: RefObject<HTMLInputElement | null>; | ||
wrapperRef?: Ref<T>; | ||
wrapperRef?: RefObject<T | null>; | ||
} | ||
export interface TextAreaElementProps extends Omit<ComponentPropsWithoutRef<"textarea">, "value" | "onChange"> { | ||
/** This is a RefObject since the input components use ref.current which Ref type doesn't have. */ | ||
inputRef?: RefObject<HTMLTextAreaElement>; | ||
inputRef?: RefObject<HTMLTextAreaElement | null>; | ||
} | ||
@@ -20,3 +20,3 @@ export type DivProps = ComponentPropsWithoutRef<"div">; | ||
export interface WithInnerRef<TInputElement> { | ||
innerRef?: Ref<TInputElement>; | ||
innerRef?: RefObject<TInputElement | null>; | ||
} |
{ | ||
"name": "@stenajs-webui/core", | ||
"version": "21.29.2", | ||
"version": "21.29.3", | ||
"type": "module", | ||
@@ -64,5 +64,5 @@ "description": "", | ||
], | ||
"gitHead": "6beb0e7b22ce2c0f18ba8ceb17880998e4c15099", | ||
"gitHead": "a9296a7c83bf3a28cc751fd1716161e1dddc5490", | ||
"dependencies": { | ||
"@stenajs-webui/theme": "21.29.2", | ||
"@stenajs-webui/theme": "21.29.3", | ||
"classnames": "^2.5.1", | ||
@@ -69,0 +69,0 @@ "lodash-es": "^4.17.21" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
212641
+ Added@stenajs-webui/theme@21.29.3(transitive)
- Removed@stenajs-webui/theme@21.29.2(transitive)
Updated@stenajs-webui/theme@21.29.3