@commercetools-uikit/number-field 14.0.1 → 14.0.2
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
|
@@ -50,15 +50,15 @@ export default Example;
|
|
|
50
50
|
| `id` | `string` | | | Used as HTML id property. An id is auto-generated when it is not specified. |
|
|
51
51
|
| `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. |
|
|
52
52
|
| `errors` | `Record` | | | A map of errors. Error messages for known errors are rendered automatically.
<br />
Unknown errors will be forwarded to `renderError` |
|
|
53
|
-
| `renderError` | `Function`<br/>[See signature.](#signature-renderError) | | | Called with custom errors. This function can return a message which will be wrapped in an ErrorMessage. It can also return null to show no error
|
|
53
|
+
| `renderError` | `Function`<br/>[See signature.](#signature-renderError) | | | Called with custom errors. This function can return a message which will be wrapped in an ErrorMessage. It can also return null to show no error. |
|
|
54
54
|
| `isRequired` | `boolean` | | | Indicates if the value is required. Shows an the "required asterisk" if so. |
|
|
55
55
|
| `touched` | `boolean` | | | Indicates whether the field was touched. Errors will only be shown when the field was touched. |
|
|
56
56
|
| `name` | `string` | | | Used as HTML name of the input component. property |
|
|
57
57
|
| `value` | `union`<br/>Possible values:<br/>`string , number` | ✅ | | Value of the input component. |
|
|
58
58
|
| `autoComplete` | `string` | | | Used as HTML `autocomplete` of the input component. property |
|
|
59
|
-
| `onChange` | `ChangeEventHandler` | | | Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value
|
|
60
|
-
| `onBlur` | `FocusEventHandler` | | | Called when input is blurred
|
|
61
|
-
| `onFocus` | `FocusEventHandler` | | | Called when input is focused
|
|
59
|
+
| `onChange` | `ChangeEventHandler` | | | Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value. |
|
|
60
|
+
| `onBlur` | `FocusEventHandler` | | | Called when input is blurred |
|
|
61
|
+
| `onFocus` | `FocusEventHandler` | | | Called when input is focused |
|
|
62
62
|
| `isAutofocussed` | `boolean` | | | Focus the input on initial render |
|
|
63
63
|
| `isDisabled` | `boolean` | | | Indicates that the input cannot be modified (e.g not authorized, or changes currently saving). |
|
|
64
64
|
| `isReadOnly` | `boolean` | | | Indicates that the field is displaying read-only content |
|
|
@@ -69,7 +69,7 @@ export default Example;
|
|
|
69
69
|
| `title` | `union`<br/>Possible values:<br/>`string , ReactNode` | ✅ | | Title of the label |
|
|
70
70
|
| `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`. |
|
|
71
71
|
| `description` | `union`<br/>Possible values:<br/>`string , ReactNode` | | | Provides a description for the title. |
|
|
72
|
-
| `onInfoButtonClick` | `Function`<br/>[See signature.](#signature-onInfoButtonClick) | | | Function called when info button is pressed.
<br />
Info button will only be visible when this prop is passed
|
|
72
|
+
| `onInfoButtonClick` | `Function`<br/>[See signature.](#signature-onInfoButtonClick) | | | Function called when info button is pressed.
<br />
Info button will only be visible when this prop is passed. |
|
|
73
73
|
| `hintIcon` | `ReactElement` | | | Icon to be displayed beside the hint text.
<br />
Will only get rendered when `hint` is passed as well. |
|
|
74
74
|
| `badge` | `ReactNode` | | | Badge to be displayed beside the label.
<br />
Might be used to display additional information about the content of the field (E.g verified email) |
|
|
75
75
|
|
|
@@ -204,7 +204,7 @@ NumberField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
204
204
|
var NumberField$1 = NumberField;
|
|
205
205
|
|
|
206
206
|
// NOTE: This string will be replaced on build time with the package version.
|
|
207
|
-
var version = "14.0.
|
|
207
|
+
var version = "14.0.2";
|
|
208
208
|
|
|
209
209
|
exports["default"] = NumberField$1;
|
|
210
210
|
exports.version = version;
|
|
@@ -173,7 +173,7 @@ NumberField.propTypes = {};
|
|
|
173
173
|
var NumberField$1 = NumberField;
|
|
174
174
|
|
|
175
175
|
// NOTE: This string will be replaced on build time with the package version.
|
|
176
|
-
var version = "14.0.
|
|
176
|
+
var version = "14.0.2";
|
|
177
177
|
|
|
178
178
|
exports["default"] = NumberField$1;
|
|
179
179
|
exports.version = version;
|
|
@@ -179,6 +179,6 @@ NumberField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
179
179
|
var NumberField$1 = NumberField;
|
|
180
180
|
|
|
181
181
|
// NOTE: This string will be replaced on build time with the package version.
|
|
182
|
-
var version = "14.0.
|
|
182
|
+
var version = "14.0.2";
|
|
183
183
|
|
|
184
184
|
export { NumberField$1 as default, version };
|
|
@@ -14,9 +14,9 @@ declare type TNumberFieldProps = {
|
|
|
14
14
|
name?: string;
|
|
15
15
|
value: string | number;
|
|
16
16
|
autoComplete?: string;
|
|
17
|
-
onChange?: ChangeEventHandler
|
|
18
|
-
onBlur?: FocusEventHandler
|
|
19
|
-
onFocus?: FocusEventHandler
|
|
17
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
18
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
19
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
20
20
|
isAutofocussed?: boolean;
|
|
21
21
|
isDisabled?: boolean;
|
|
22
22
|
isReadOnly?: boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/number-field",
|
|
3
3
|
"description": "A controlled input component for numbers with validation states and a label.",
|
|
4
|
-
"version": "14.0.
|
|
4
|
+
"version": "14.0.2",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@commercetools-uikit/constraints": "14.0.1",
|
|
25
25
|
"@commercetools-uikit/design-system": "14.0.0",
|
|
26
26
|
"@commercetools-uikit/field-errors": "14.0.1",
|
|
27
|
-
"@commercetools-uikit/field-label": "14.0.
|
|
28
|
-
"@commercetools-uikit/number-input": "14.0.
|
|
27
|
+
"@commercetools-uikit/field-label": "14.0.2",
|
|
28
|
+
"@commercetools-uikit/number-input": "14.0.2",
|
|
29
29
|
"@commercetools-uikit/spacings-stack": "14.0.1",
|
|
30
30
|
"@commercetools-uikit/utils": "14.0.1",
|
|
31
31
|
"@emotion/react": "^11.4.0",
|