@aveonline/ui-react 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,9 +6,7 @@ export declare function Container({ children, renderIconLeft, renderInput }: ICh
|
|
|
6
6
|
}): JSX.Element;
|
|
7
7
|
export declare namespace Container {
|
|
8
8
|
var Special: (props: IChildren & {
|
|
9
|
-
isNumber?: boolean | undefined;
|
|
10
9
|
isPassword?: boolean | undefined;
|
|
11
|
-
showIconNumber?: boolean | undefined;
|
|
12
10
|
}) => JSX.Element;
|
|
13
11
|
var Delete: (props: IChildren & {
|
|
14
12
|
inputValue: string | number | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IColor, IKind } from '../../atoms/Icon';
|
|
2
3
|
import { ITooltipProps } from '../../atoms/Tooltip/ITooltip';
|
|
3
4
|
import type { IFieldCustom } from './IFieldCustom';
|
|
4
5
|
export interface IField {
|
|
@@ -26,6 +27,10 @@ export interface IField {
|
|
|
26
27
|
* Text for show description input
|
|
27
28
|
*/
|
|
28
29
|
placeholder?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Determine the height
|
|
32
|
+
*/
|
|
33
|
+
size?: 'sm' | 'default';
|
|
29
34
|
/**
|
|
30
35
|
* Attribute autocomplete for default 'off' no show info
|
|
31
36
|
*/
|
|
@@ -50,6 +55,10 @@ export interface IField {
|
|
|
50
55
|
* Name icon for position right
|
|
51
56
|
*/
|
|
52
57
|
iconRight?: IKind;
|
|
58
|
+
/**
|
|
59
|
+
* Color icon of IColor
|
|
60
|
+
*/
|
|
61
|
+
iconColor?: IColor;
|
|
53
62
|
/**
|
|
54
63
|
* Message for help to user
|
|
55
64
|
*/
|
|
@@ -66,16 +75,16 @@ export interface IField {
|
|
|
66
75
|
* Event handler for emit value from input
|
|
67
76
|
*/
|
|
68
77
|
onChange?: (value: string) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Event handler for when blur
|
|
80
|
+
*/
|
|
81
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
69
82
|
/**
|
|
70
83
|
* Active tooltip for icon right
|
|
71
84
|
*/
|
|
72
85
|
tooltip?: ITooltipProps & {
|
|
73
86
|
isActive?: boolean;
|
|
74
87
|
};
|
|
75
|
-
/**
|
|
76
|
-
* Show icon number - default false
|
|
77
|
-
*/
|
|
78
|
-
showIconNumber?: boolean;
|
|
79
88
|
/**
|
|
80
89
|
* Types input custom
|
|
81
90
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ChangeEvent } from 'react';
|
|
2
2
|
import { IField } from './IField';
|
|
3
|
-
|
|
3
|
+
import { IColor } from '@/ui/atoms/Icon';
|
|
4
|
+
export declare function useField({ size, isDisabled, type, iconRight, error, iconLeft, iconColor, onChange, onBlur, value, isError }: IField): {
|
|
4
5
|
inputValue: string;
|
|
5
6
|
inputRef: import("react").RefObject<HTMLInputElement>;
|
|
6
7
|
handleChange: (ev: ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
handleBlur: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
7
9
|
handleChangeCustom: (value: string) => void | undefined;
|
|
8
|
-
|
|
9
|
-
addMoreValue: () => void;
|
|
10
|
-
getColorIcon: () => 'disabled' | 'default' | 'subdued';
|
|
10
|
+
getColorIcon: () => IColor;
|
|
11
11
|
getColorIconPassword: () => 'disabled' | 'default' | 'subdued';
|
|
12
12
|
showPassword: boolean;
|
|
13
13
|
setShowPassword: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|