@commercetools-uikit/date-range-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
@@ -55,7 +55,7 @@ export default Example;
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. |
57
57
  | `value` | `Array: string[]` | ✅ | | The selected date range. Must either be an empty array or an array of two strings holding dates formatted as "YYYY-MM-DD". |
58
- | `onChange` | `Function`<br/>[See signature.](#signature-onChange) || | Called when the date range changes, with an event containing either an empty array (no value) or an array holding two string in this format: "YYYY-MM-DD".&#xA;<br/>&#xA;Required when input is not read only. |
58
+ | `onChange` | `Function`<br/>[See signature.](#signature-onChange) | | | Called when the date range changes, with an event containing either an empty array (no value) or an array holding two string in this format: "YYYY-MM-DD".&#xA;<br/>&#xA;Required when input is not read only. |
59
59
  | `onBlur` | `Function`<br/>[See signature.](#signature-onBlur) | | | Called when input is blurred |
60
60
  | `onFocus` | `Function`<br/>[See signature.](#signature-onFocus) | | | Called when input is focused |
61
61
  | `isDisabled` | `boolean` | | | Indicates that the input cannot be modified (e.g not authorized, or changes currently saving). |
@@ -79,19 +79,19 @@ export default Example;
79
79
  ### Signature `onChange`
80
80
 
81
81
  ```ts
82
- (event: TEvent) => void
82
+ (event: TCustomEvent) => void
83
83
  ```
84
84
 
85
85
  ### Signature `onBlur`
86
86
 
87
87
  ```ts
88
- (event: TEvent) => void
88
+ (event: TCustomEvent) => void
89
89
  ```
90
90
 
91
91
  ### Signature `onFocus`
92
92
 
93
93
  ```ts
94
- (event: TEvent) => void
94
+ (event: TCustomEvent) => void
95
95
  ```
96
96
 
97
97
  ### Signature `onInfoButtonClick`
@@ -178,7 +178,7 @@ DateRangeField.propTypes = process.env.NODE_ENV !== "production" ? {
178
178
  touched: _pt__default["default"].bool,
179
179
  name: _pt__default["default"].string,
180
180
  value: _pt__default["default"].arrayOf(_pt__default["default"].string).isRequired,
181
- onChange: _pt__default["default"].func.isRequired,
181
+ onChange: _pt__default["default"].func,
182
182
  onBlur: _pt__default["default"].func,
183
183
  onFocus: _pt__default["default"].func,
184
184
  isDisabled: _pt__default["default"].bool,
@@ -194,7 +194,7 @@ DateRangeField.propTypes = process.env.NODE_ENV !== "production" ? {
194
194
  var DateRangeField$1 = DateRangeField;
195
195
 
196
196
  // NOTE: This string will be replaced on build time with the package version.
197
- var version = "14.0.1";
197
+ var version = "14.0.2";
198
198
 
199
199
  exports["default"] = DateRangeField$1;
200
200
  exports.version = version;
@@ -168,7 +168,7 @@ DateRangeField.propTypes = {};
168
168
  var DateRangeField$1 = DateRangeField;
169
169
 
170
170
  // NOTE: This string will be replaced on build time with the package version.
171
- var version = "14.0.1";
171
+ var version = "14.0.2";
172
172
 
173
173
  exports["default"] = DateRangeField$1;
174
174
  exports.version = version;
@@ -153,7 +153,7 @@ DateRangeField.propTypes = process.env.NODE_ENV !== "production" ? {
153
153
  touched: _pt.bool,
154
154
  name: _pt.string,
155
155
  value: _pt.arrayOf(_pt.string).isRequired,
156
- onChange: _pt.func.isRequired,
156
+ onChange: _pt.func,
157
157
  onBlur: _pt.func,
158
158
  onFocus: _pt.func,
159
159
  isDisabled: _pt.bool,
@@ -169,6 +169,6 @@ DateRangeField.propTypes = process.env.NODE_ENV !== "production" ? {
169
169
  var DateRangeField$1 = DateRangeField;
170
170
 
171
171
  // NOTE: This string will be replaced on build time with the package version.
172
- var version = "14.0.1";
172
+ var version = "14.0.2";
173
173
 
174
174
  export { DateRangeField$1 as default, version };
@@ -5,7 +5,7 @@ declare type TFieldErrors = Record<string, boolean>;
5
5
  declare type TCustomFormErrors<Values> = {
6
6
  [K in keyof Values]?: TFieldErrors;
7
7
  };
8
- declare type TEvent = {
8
+ declare type TCustomEvent = {
9
9
  target: {
10
10
  id?: string;
11
11
  name?: string;
@@ -21,9 +21,9 @@ declare type TDateRangeFieldProps = {
21
21
  touched?: boolean;
22
22
  name?: string;
23
23
  value: string[];
24
- onChange: (event: TEvent) => void;
25
- onBlur?: (event: TEvent) => void;
26
- onFocus?: (event: TEvent) => void;
24
+ onChange?: (event: TCustomEvent) => void;
25
+ onBlur?: (event: TCustomEvent) => void;
26
+ onFocus?: (event: TCustomEvent) => void;
27
27
  isDisabled?: boolean;
28
28
  isReadOnly?: boolean;
29
29
  placeholder?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/date-range-field",
3
3
  "description": "A controlled date input component for a date range, with validation states and a label.",
4
- "version": "14.0.1",
4
+ "version": "14.0.2",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -22,10 +22,10 @@
22
22
  "@babel/runtime": "^7.17.2",
23
23
  "@babel/runtime-corejs3": "^7.17.2",
24
24
  "@commercetools-uikit/constraints": "14.0.1",
25
- "@commercetools-uikit/date-range-input": "14.0.1",
25
+ "@commercetools-uikit/date-range-input": "14.0.2",
26
26
  "@commercetools-uikit/design-system": "14.0.0",
27
27
  "@commercetools-uikit/field-errors": "14.0.1",
28
- "@commercetools-uikit/field-label": "14.0.1",
28
+ "@commercetools-uikit/field-label": "14.0.2",
29
29
  "@commercetools-uikit/spacings": "14.0.1",
30
30
  "@commercetools-uikit/utils": "14.0.1",
31
31
  "@emotion/react": "^11.4.0",