@commercetools-uikit/number-input 19.9.0 → 19.10.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.
@@ -112,7 +112,7 @@ NumberInput.hasFractionDigits = number => {
112
112
  var NumberInput$1 = NumberInput;
113
113
 
114
114
  // NOTE: This string will be replaced on build time with the package version.
115
- var version = "19.9.0";
115
+ var version = "19.10.0";
116
116
 
117
117
  exports["default"] = NumberInput$1;
118
118
  exports.version = version;
@@ -88,7 +88,7 @@ NumberInput.hasFractionDigits = number => {
88
88
  var NumberInput$1 = NumberInput;
89
89
 
90
90
  // NOTE: This string will be replaced on build time with the package version.
91
- var version = "19.9.0";
91
+ var version = "19.10.0";
92
92
 
93
93
  exports["default"] = NumberInput$1;
94
94
  exports.version = version;
@@ -94,6 +94,6 @@ NumberInput.hasFractionDigits = number => {
94
94
  var NumberInput$1 = NumberInput;
95
95
 
96
96
  // NOTE: This string will be replaced on build time with the package version.
97
- var version = "19.9.0";
97
+ var version = "19.10.0";
98
98
 
99
99
  export { NumberInput$1 as default, version };
@@ -1,23 +1,82 @@
1
1
  import type { ChangeEventHandler, FocusEventHandler } from 'react';
2
2
  export type TNumberInputProps = {
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 name of the input component. property
9
+ */
4
10
  name?: 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
+ * Used as HTML `autocomplete` of the input component. property
21
+ */
7
22
  autoComplete?: string;
23
+ /**
24
+ * Placeholder text for the input
25
+ */
8
26
  placeholder?: string;
27
+ /**
28
+ * Value of the input component.
29
+ */
9
30
  value: string | number;
31
+ /**
32
+ * Value is used as `min` property on input field
33
+ */
10
34
  min?: number;
35
+ /**
36
+ * Value is used as `max` property on input field
37
+ */
11
38
  max?: number;
39
+ /**
40
+ * Value is used as `step` property on input field
41
+ * <br />
42
+ * Use the value `any` for inputs which accept an unpredictable amount of decimals.
43
+ */
12
44
  step?: number | 'any';
45
+ /**
46
+ * Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value.
47
+ */
13
48
  onChange?: ChangeEventHandler<HTMLInputElement>;
49
+ /**
50
+ * Called when input is blurred
51
+ */
14
52
  onBlur?: FocusEventHandler<HTMLInputElement>;
53
+ /**
54
+ * Called when input is focused
55
+ */
15
56
  onFocus?: FocusEventHandler<HTMLInputElement>;
57
+ /**
58
+ * Focus the input on initial render
59
+ */
16
60
  isAutofocussed?: boolean;
61
+ /**
62
+ * Indicates that the input cannot be modified (e.g not authorized, or changes currently saving).
63
+ */
17
64
  isDisabled?: boolean;
65
+ /**
66
+ * Indicates that the field is displaying read-only content
67
+ */
18
68
  isReadOnly?: boolean;
69
+ /**
70
+ * Indicates that input has errors
71
+ */
19
72
  hasError?: boolean;
73
+ /**
74
+ * Control to indicate on the input if there are selected values that are potentially invalid
75
+ */
20
76
  hasWarning?: boolean;
77
+ /**
78
+ * Horizontal size limit of the input fields.
79
+ */
21
80
  horizontalConstraint?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
22
81
  };
23
82
  declare const NumberInput: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/number-input",
3
3
  "description": "A controlled input component for numbers with validation states.",
4
- "version": "19.9.0",
4
+ "version": "19.10.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.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",
24
+ "@commercetools-uikit/constraints": "19.10.0",
25
+ "@commercetools-uikit/design-system": "19.10.0",
26
+ "@commercetools-uikit/input-utils": "19.10.0",
27
+ "@commercetools-uikit/utils": "19.10.0",
28
28
  "@emotion/react": "^11.10.5",
29
29
  "@emotion/styled": "^11.10.5",
30
30
  "prop-types": "15.8.1"