@commercetools-uikit/text-input 19.9.0 → 19.11.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.
|
@@ -99,7 +99,7 @@ TextInput.isEmpty = value => !value || _trimInstanceProperty__default["default"]
|
|
|
99
99
|
var TextInput$1 = TextInput;
|
|
100
100
|
|
|
101
101
|
// NOTE: This string will be replaced on build time with the package version.
|
|
102
|
-
var version = "19.
|
|
102
|
+
var version = "19.11.0";
|
|
103
103
|
|
|
104
104
|
exports["default"] = TextInput$1;
|
|
105
105
|
exports.version = version;
|
|
@@ -76,7 +76,7 @@ TextInput.isEmpty = value => !value || _trimInstanceProperty__default["default"]
|
|
|
76
76
|
var TextInput$1 = TextInput;
|
|
77
77
|
|
|
78
78
|
// NOTE: This string will be replaced on build time with the package version.
|
|
79
|
-
var version = "19.
|
|
79
|
+
var version = "19.11.0";
|
|
80
80
|
|
|
81
81
|
exports["default"] = TextInput$1;
|
|
82
82
|
exports.version = version;
|
|
@@ -81,6 +81,6 @@ TextInput.isEmpty = value => !value || _trimInstanceProperty(value).call(value).
|
|
|
81
81
|
var TextInput$1 = TextInput;
|
|
82
82
|
|
|
83
83
|
// NOTE: This string will be replaced on build time with the package version.
|
|
84
|
-
var version = "19.
|
|
84
|
+
var version = "19.11.0";
|
|
85
85
|
|
|
86
86
|
export { TextInput$1 as default, version };
|
|
@@ -1,23 +1,77 @@
|
|
|
1
1
|
import type { FocusEventHandler, ChangeEventHandler } from 'react';
|
|
2
2
|
export type TTextInputProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Used as HTML id property. An id is auto-generated when it is not specified.
|
|
5
|
+
*/
|
|
3
6
|
id?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Used as HTML autocomplete property
|
|
9
|
+
*/
|
|
4
10
|
autoComplete?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Indicate if the value entered in the input is invalid.
|
|
13
|
+
*/
|
|
5
14
|
'aria-invalid'?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* HTML ID of an element containing an error message related to the input.
|
|
17
|
+
*/
|
|
6
18
|
'aria-errormessage'?: string;
|
|
19
|
+
/**
|
|
20
|
+
* `className` forwarded to the underlying `<input />`.
|
|
21
|
+
*/
|
|
7
22
|
className?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Used as HTML name of the input component. property
|
|
25
|
+
*/
|
|
8
26
|
name?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Value of the input component.
|
|
29
|
+
*/
|
|
9
30
|
value: string;
|
|
31
|
+
/**
|
|
32
|
+
* Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value.
|
|
33
|
+
*/
|
|
10
34
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
35
|
+
/**
|
|
36
|
+
* Called when input is blurred
|
|
37
|
+
*/
|
|
11
38
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
39
|
+
/**
|
|
40
|
+
* Called when input is focused
|
|
41
|
+
*/
|
|
12
42
|
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
43
|
+
/**
|
|
44
|
+
* Focus the input on initial render
|
|
45
|
+
*/
|
|
13
46
|
isAutofocussed?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Use this property to reduce the paddings of the component for a ui compact variant
|
|
49
|
+
*/
|
|
14
50
|
isCondensed?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Indicates that the input cannot be modified (e.g not authorized, or changes currently saving).
|
|
53
|
+
*/
|
|
15
54
|
isDisabled?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Indicates that the field is displaying read-only content
|
|
57
|
+
*/
|
|
16
58
|
isReadOnly?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Indicates if the input has invalid values
|
|
61
|
+
*/
|
|
17
62
|
hasError?: boolean;
|
|
18
63
|
hasWarning?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Placeholder text for the input
|
|
66
|
+
*/
|
|
19
67
|
placeholder?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Horizontal size limit of the input fields.
|
|
70
|
+
*/
|
|
20
71
|
horizontalConstraint?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
|
|
72
|
+
/**
|
|
73
|
+
* Maximum number of characters allowed in the input. If this prop is used, it is recommended to inform the user about this limit in the InputField description, or otherwise.
|
|
74
|
+
*/
|
|
21
75
|
maxLength?: number;
|
|
22
76
|
};
|
|
23
77
|
declare const TextInput: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/text-input",
|
|
3
3
|
"description": "A controlled text input component for single-line strings with validation states.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.11.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/constraints": "19.
|
|
25
|
-
"@commercetools-uikit/design-system": "19.
|
|
26
|
-
"@commercetools-uikit/input-utils": "19.
|
|
27
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/constraints": "19.11.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.11.0",
|
|
26
|
+
"@commercetools-uikit/input-utils": "19.11.0",
|
|
27
|
+
"@commercetools-uikit/utils": "19.11.0",
|
|
28
28
|
"@emotion/react": "^11.10.5",
|
|
29
29
|
"@emotion/styled": "^11.10.5",
|
|
30
30
|
"prop-types": "15.8.1"
|