From 32562364be6c7fbe81ad1698e7da207f804a0243 Mon Sep 17 00:00:00 2001 From: lovrozagar Date: Sat, 6 Jul 2024 10:58:16 -0700 Subject: [PATCH] fix: text & number input selection, disable aria press props --- package.json | 2 +- src/components/number-input/hooks/use-number-input.ts | 2 ++ src/components/text-input/hooks/use-text-input.ts | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a4e3876..56745bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@renderui/core", - "version": "1.3.7", + "version": "1.3.8", "private": false, "description": "React UI library with highly modular and ready-out-of-the-box components", "license": "MIT", diff --git a/src/components/number-input/hooks/use-number-input.ts b/src/components/number-input/hooks/use-number-input.ts index a1dec06..8005000 100644 --- a/src/components/number-input/hooks/use-number-input.ts +++ b/src/components/number-input/hooks/use-number-input.ts @@ -95,6 +95,7 @@ function useNumberInput(props: NumberInputProps, ref: React.Ref) onClick: inputContainerOnClick, isTextInput = true, isFocusWithin = true, + isUsingAriaPressProps = false, ...restInputContainerProps } = getOptionalObject(inputContainerProps) @@ -130,6 +131,7 @@ function useNumberInput(props: NumberInputProps, ref: React.Ref) isTextInput, isFocusWithin, isDisabled, + isUsingAriaPressProps, 'data-disabled': isDisabled, 'data-read-only': isReadOnly, 'data-invalid': isInvalid, diff --git a/src/components/text-input/hooks/use-text-input.ts b/src/components/text-input/hooks/use-text-input.ts index 942b566..1d8e6c4 100644 --- a/src/components/text-input/hooks/use-text-input.ts +++ b/src/components/text-input/hooks/use-text-input.ts @@ -85,6 +85,7 @@ function useTextInput(props: TextInputProps, ref: React.Ref) { onPointerDown: inputContainerOnPointerDown, isFocusWithin = true, isTextInput = true, + isUsingAriaPressProps = false, ...restInputContainerClassName } = getOptionalObject(inputContainerProps) @@ -120,6 +121,7 @@ function useTextInput(props: TextInputProps, ref: React.Ref) { isTextInput, isFocusWithin, isDisabled, + isUsingAriaPressProps, 'data-disabled': isDisabled, 'data-readonly': isReadOnly, 'data-invalid': isInvalid,