@commercetools-uikit/text-input 19.8.0 → 19.9.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.
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ export default Example;
|
|
|
60
60
|
| `hasError` | `boolean` | | | Indicates if the input has invalid values |
|
|
61
61
|
| `hasWarning` | `boolean` | | | |
|
|
62
62
|
| `placeholder` | `string` | | | Placeholder text for the input |
|
|
63
|
+
| `maxLength` | `number` | | | Maximum number of characters allowed in the input field |
|
|
63
64
|
| `horizontalConstraint` | `union`<br/>Possible values:<br/>`, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'` | | `'scale'` | Horizontal size limit of the input fields. |
|
|
64
65
|
|
|
65
66
|
## `data-*` props
|
|
@@ -53,6 +53,7 @@ const TextInput = props => {
|
|
|
53
53
|
onFocus: props.onFocus,
|
|
54
54
|
disabled: props.isDisabled,
|
|
55
55
|
placeholder: props.placeholder,
|
|
56
|
+
maxLength: props.maxLength,
|
|
56
57
|
readOnly: props.isReadOnly,
|
|
57
58
|
autoFocus: props.isAutofocussed,
|
|
58
59
|
autoComplete: props.autoComplete,
|
|
@@ -89,7 +90,8 @@ TextInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
89
90
|
hasError: _pt__default["default"].bool,
|
|
90
91
|
hasWarning: _pt__default["default"].bool,
|
|
91
92
|
placeholder: _pt__default["default"].string,
|
|
92
|
-
horizontalConstraint: _pt__default["default"].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'])
|
|
93
|
+
horizontalConstraint: _pt__default["default"].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
|
|
94
|
+
maxLength: _pt__default["default"].number
|
|
93
95
|
} : {};
|
|
94
96
|
TextInput.displayName = 'TextInput';
|
|
95
97
|
TextInput.defaultProps = defaultProps;
|
|
@@ -97,7 +99,7 @@ TextInput.isEmpty = value => !value || _trimInstanceProperty__default["default"]
|
|
|
97
99
|
var TextInput$1 = TextInput;
|
|
98
100
|
|
|
99
101
|
// NOTE: This string will be replaced on build time with the package version.
|
|
100
|
-
var version = "19.
|
|
102
|
+
var version = "19.9.0";
|
|
101
103
|
|
|
102
104
|
exports["default"] = TextInput$1;
|
|
103
105
|
exports.version = version;
|
|
@@ -50,6 +50,7 @@ const TextInput = props => {
|
|
|
50
50
|
onFocus: props.onFocus,
|
|
51
51
|
disabled: props.isDisabled,
|
|
52
52
|
placeholder: props.placeholder,
|
|
53
|
+
maxLength: props.maxLength,
|
|
53
54
|
readOnly: props.isReadOnly,
|
|
54
55
|
autoFocus: props.isAutofocussed,
|
|
55
56
|
autoComplete: props.autoComplete,
|
|
@@ -75,7 +76,7 @@ TextInput.isEmpty = value => !value || _trimInstanceProperty__default["default"]
|
|
|
75
76
|
var TextInput$1 = TextInput;
|
|
76
77
|
|
|
77
78
|
// NOTE: This string will be replaced on build time with the package version.
|
|
78
|
-
var version = "19.
|
|
79
|
+
var version = "19.9.0";
|
|
79
80
|
|
|
80
81
|
exports["default"] = TextInput$1;
|
|
81
82
|
exports.version = version;
|
|
@@ -35,6 +35,7 @@ const TextInput = props => {
|
|
|
35
35
|
onFocus: props.onFocus,
|
|
36
36
|
disabled: props.isDisabled,
|
|
37
37
|
placeholder: props.placeholder,
|
|
38
|
+
maxLength: props.maxLength,
|
|
38
39
|
readOnly: props.isReadOnly,
|
|
39
40
|
autoFocus: props.isAutofocussed,
|
|
40
41
|
autoComplete: props.autoComplete,
|
|
@@ -71,7 +72,8 @@ TextInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
71
72
|
hasError: _pt.bool,
|
|
72
73
|
hasWarning: _pt.bool,
|
|
73
74
|
placeholder: _pt.string,
|
|
74
|
-
horizontalConstraint: _pt.oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'])
|
|
75
|
+
horizontalConstraint: _pt.oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
|
|
76
|
+
maxLength: _pt.number
|
|
75
77
|
} : {};
|
|
76
78
|
TextInput.displayName = 'TextInput';
|
|
77
79
|
TextInput.defaultProps = defaultProps;
|
|
@@ -79,6 +81,6 @@ TextInput.isEmpty = value => !value || _trimInstanceProperty(value).call(value).
|
|
|
79
81
|
var TextInput$1 = TextInput;
|
|
80
82
|
|
|
81
83
|
// NOTE: This string will be replaced on build time with the package version.
|
|
82
|
-
var version = "19.
|
|
84
|
+
var version = "19.9.0";
|
|
83
85
|
|
|
84
86
|
export { TextInput$1 as default, version };
|
|
@@ -18,6 +18,7 @@ export type TTextInputProps = {
|
|
|
18
18
|
hasWarning?: boolean;
|
|
19
19
|
placeholder?: string;
|
|
20
20
|
horizontalConstraint?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
|
|
21
|
+
maxLength?: number;
|
|
21
22
|
};
|
|
22
23
|
declare const TextInput: {
|
|
23
24
|
(props: TTextInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
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.9.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.9.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.9.0",
|
|
26
|
+
"@commercetools-uikit/input-utils": "19.9.0",
|
|
27
|
+
"@commercetools-uikit/utils": "19.9.0",
|
|
28
28
|
"@emotion/react": "^11.10.5",
|
|
29
29
|
"@emotion/styled": "^11.10.5",
|
|
30
30
|
"prop-types": "15.8.1"
|