@devopness/ui-react 2.161.1 → 2.163.0
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.
|
@@ -14,6 +14,8 @@ type SharedProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
14
14
|
/** Font style applied to placeholder */
|
|
15
15
|
fontStylePlaceholder?: string;
|
|
16
16
|
};
|
|
17
|
+
/** Whether to automatically focus the input when an error occurs */
|
|
18
|
+
autoFocusOnError?: boolean;
|
|
17
19
|
/**
|
|
18
20
|
* Props passed directly to input HTML element
|
|
19
21
|
*
|
|
@@ -37,12 +39,10 @@ type InputProps = (SharedProps & {
|
|
|
37
39
|
*
|
|
38
40
|
* A flexible input component that supports:
|
|
39
41
|
* - Various input types (text, number, etc.)
|
|
40
|
-
* - Error states with automatic focus
|
|
42
|
+
* - Error states with optional automatic focus
|
|
41
43
|
* - Custom styling
|
|
42
44
|
* - Label and help text
|
|
43
45
|
*
|
|
44
|
-
* When an error state is applied, the input will automatically receive focus to draw the user's attention.
|
|
45
|
-
*
|
|
46
46
|
* @example
|
|
47
47
|
* ```
|
|
48
48
|
* <Input
|
|
@@ -71,6 +71,8 @@ declare const Input: import('react').ForwardRefExoticComponent<(Omit<import('rea
|
|
|
71
71
|
/** Font style applied to placeholder */
|
|
72
72
|
fontStylePlaceholder?: string;
|
|
73
73
|
};
|
|
74
|
+
/** Whether to automatically focus the input when an error occurs */
|
|
75
|
+
autoFocusOnError?: boolean;
|
|
74
76
|
/**
|
|
75
77
|
* Props passed directly to input HTML element
|
|
76
78
|
*
|
|
@@ -96,6 +98,8 @@ declare const Input: import('react').ForwardRefExoticComponent<(Omit<import('rea
|
|
|
96
98
|
/** Font style applied to placeholder */
|
|
97
99
|
fontStylePlaceholder?: string;
|
|
98
100
|
};
|
|
101
|
+
/** Whether to automatically focus the input when an error occurs */
|
|
102
|
+
autoFocusOnError?: boolean;
|
|
99
103
|
/**
|
|
100
104
|
* Props passed directly to input HTML element
|
|
101
105
|
*
|
|
@@ -7,7 +7,7 @@ import { IconProps } from '../Icon';
|
|
|
7
7
|
import { LinkProps } from '../Link';
|
|
8
8
|
import { TooltipProps } from '../Tooltip';
|
|
9
9
|
import { Unwrap } from '../../types';
|
|
10
|
-
type DropdownOptionIcon = Unwrap<
|
|
10
|
+
type DropdownOptionIcon = Unwrap<IconProps & Pick<React.CSSProperties, 'backgroundColor'>> & {
|
|
11
11
|
icon: true;
|
|
12
12
|
};
|
|
13
13
|
type DropdownOptionLetter = Unwrap<Pick<React.CSSProperties, 'backgroundColor' | 'color'>> & {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Icon } from './types';
|
|
2
2
|
declare const iconList: readonly [{
|
|
3
|
+
readonly type: "icon";
|
|
4
|
+
readonly name: "home";
|
|
5
|
+
readonly component: import('react-icons/lib').IconType;
|
|
6
|
+
}, {
|
|
3
7
|
readonly type: "icon";
|
|
4
8
|
readonly name: "add";
|
|
5
9
|
readonly component: import('react-icons/lib').IconType;
|