@commercetools-uikit/text-field 19.7.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
|
@@ -62,6 +62,7 @@ export default Example;
|
|
|
62
62
|
| `isDisabled` | `boolean` | | | Indicates that the input cannot be modified (e.g not authorized, or changes currently saving). |
|
|
63
63
|
| `isReadOnly` | `boolean` | | | Indicates that the field is displaying read-only content |
|
|
64
64
|
| `placeholder` | `string` | | | Placeholder text for the input |
|
|
65
|
+
| `maxLength` | `number` | | | Maximum number of characters allowed in the input field |
|
|
65
66
|
| `title` | `union`<br/>Possible values:<br/>`string , ReactNode` | ✅ | | Title of the label |
|
|
66
67
|
| `hint` | `union`<br/>Possible values:<br/>`string , ReactNode` | | | Hint for the label. Provides a supplementary but important information regarding the behaviour of the input (e.g warn about uniqueness of a field, when it can only be set once), whereas description can describe it in more depth. Can also receive a hintIcon. |
|
|
67
68
|
| `description` | `union`<br/>Possible values:<br/>`string , ReactNode` | | | Provides a description for the title. |
|
|
@@ -123,6 +123,7 @@ let TextField = /*#__PURE__*/function (_Component) {
|
|
|
123
123
|
hasWarning: hasWarning,
|
|
124
124
|
hasError: hasError,
|
|
125
125
|
placeholder: this.props.placeholder,
|
|
126
|
+
maxLength: this.props.maxLength,
|
|
126
127
|
horizontalConstraint: "scale"
|
|
127
128
|
}, utils.filterDataAttributes(this.props)), {}, {
|
|
128
129
|
/* ARIA */
|
|
@@ -193,7 +194,7 @@ TextField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
193
194
|
var TextField$1 = TextField;
|
|
194
195
|
|
|
195
196
|
// NOTE: This string will be replaced on build time with the package version.
|
|
196
|
-
var version = "19.
|
|
197
|
+
var version = "19.9.0";
|
|
197
198
|
|
|
198
199
|
exports["default"] = TextField$1;
|
|
199
200
|
exports.version = version;
|
|
@@ -118,6 +118,7 @@ let TextField = /*#__PURE__*/function (_Component) {
|
|
|
118
118
|
hasWarning: hasWarning,
|
|
119
119
|
hasError: hasError,
|
|
120
120
|
placeholder: this.props.placeholder,
|
|
121
|
+
maxLength: this.props.maxLength,
|
|
121
122
|
horizontalConstraint: "scale"
|
|
122
123
|
}, utils.filterDataAttributes(this.props)), {}, {
|
|
123
124
|
/* ARIA */
|
|
@@ -162,7 +163,7 @@ TextField.propTypes = {};
|
|
|
162
163
|
var TextField$1 = TextField;
|
|
163
164
|
|
|
164
165
|
// NOTE: This string will be replaced on build time with the package version.
|
|
165
|
-
var version = "19.
|
|
166
|
+
var version = "19.9.0";
|
|
166
167
|
|
|
167
168
|
exports["default"] = TextField$1;
|
|
168
169
|
exports.version = version;
|
|
@@ -98,6 +98,7 @@ let TextField = /*#__PURE__*/function (_Component) {
|
|
|
98
98
|
hasWarning: hasWarning,
|
|
99
99
|
hasError: hasError,
|
|
100
100
|
placeholder: this.props.placeholder,
|
|
101
|
+
maxLength: this.props.maxLength,
|
|
101
102
|
horizontalConstraint: "scale"
|
|
102
103
|
}, filterDataAttributes(this.props)), {}, {
|
|
103
104
|
/* ARIA */
|
|
@@ -168,6 +169,6 @@ TextField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
168
169
|
var TextField$1 = TextField;
|
|
169
170
|
|
|
170
171
|
// NOTE: This string will be replaced on build time with the package version.
|
|
171
|
-
var version = "19.
|
|
172
|
+
var version = "19.9.0";
|
|
172
173
|
|
|
173
174
|
export { TextField$1 as default, version };
|
|
@@ -31,6 +31,7 @@ export type TTextFieldProps = {
|
|
|
31
31
|
onInfoButtonClick?: () => void;
|
|
32
32
|
hintIcon?: ReactElement;
|
|
33
33
|
badge?: ReactNode;
|
|
34
|
+
maxLength?: number;
|
|
34
35
|
};
|
|
35
36
|
type TTextFieldState = Pick<TTextFieldProps, 'id'>;
|
|
36
37
|
declare class TextField extends Component<TTextFieldProps, TTextFieldState> {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/text-field",
|
|
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,14 +21,14 @@
|
|
|
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/field-errors": "19.
|
|
27
|
-
"@commercetools-uikit/field-label": "19.
|
|
28
|
-
"@commercetools-uikit/field-warnings": "19.
|
|
29
|
-
"@commercetools-uikit/spacings-stack": "19.
|
|
30
|
-
"@commercetools-uikit/text-input": "19.
|
|
31
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/constraints": "19.9.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.9.0",
|
|
26
|
+
"@commercetools-uikit/field-errors": "19.9.0",
|
|
27
|
+
"@commercetools-uikit/field-label": "19.9.0",
|
|
28
|
+
"@commercetools-uikit/field-warnings": "19.9.0",
|
|
29
|
+
"@commercetools-uikit/spacings-stack": "19.9.0",
|
|
30
|
+
"@commercetools-uikit/text-input": "19.9.0",
|
|
31
|
+
"@commercetools-uikit/utils": "19.9.0",
|
|
32
32
|
"@emotion/react": "^11.10.5",
|
|
33
33
|
"@emotion/styled": "^11.10.5",
|
|
34
34
|
"prop-types": "15.8.1",
|