@commercetools-uikit/date-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` | `string` | ✅ | | Value of the input |
|
|
58
|
-
| `onChange` | `Function`<br/>[See signature.](#signature-onChange) |
|
|
58
|
+
| `onChange` | `Function`<br/>[See signature.](#signature-onChange) | | | Called with an event containing the new value.
This is always called with either an empty string or a valid date in the format of `YYYY-MM-DD`.
<br/>
Parent should pass it back as `value`. |
|
|
59
59
|
| `onBlur` | `Function`<br/>[See signature.](#signature-onBlur) | | | Called when input is blurred |
|
|
60
60
|
| `onFocus` | `FocusEventHandler` | | | Called when input is focused |
|
|
61
61
|
| `isDisabled` | `boolean` | | | Indicates that the input cannot be modified (e.g not authorized, or changes currently saving). |
|
|
@@ -81,13 +81,13 @@ export default Example;
|
|
|
81
81
|
### Signature `onChange`
|
|
82
82
|
|
|
83
83
|
```ts
|
|
84
|
-
(event:
|
|
84
|
+
(event: TCustomEvent) => void
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
### Signature `onBlur`
|
|
88
88
|
|
|
89
89
|
```ts
|
|
90
|
-
(event:
|
|
90
|
+
(event: TCustomEvent) => void
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
### Signature `onInfoButtonClick`
|
|
@@ -181,7 +181,7 @@ DateField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
181
181
|
touched: _pt__default["default"].bool,
|
|
182
182
|
name: _pt__default["default"].string,
|
|
183
183
|
value: _pt__default["default"].string.isRequired,
|
|
184
|
-
onChange: _pt__default["default"].func
|
|
184
|
+
onChange: _pt__default["default"].func,
|
|
185
185
|
onBlur: _pt__default["default"].func,
|
|
186
186
|
onFocus: _pt__default["default"].func,
|
|
187
187
|
isDisabled: _pt__default["default"].bool,
|
|
@@ -199,7 +199,7 @@ DateField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
199
199
|
var DateField$1 = DateField;
|
|
200
200
|
|
|
201
201
|
// NOTE: This string will be replaced on build time with the package version.
|
|
202
|
-
var version = "14.0.
|
|
202
|
+
var version = "14.0.2";
|
|
203
203
|
|
|
204
204
|
exports["default"] = DateField$1;
|
|
205
205
|
exports.version = version;
|
|
@@ -171,7 +171,7 @@ DateField.propTypes = {};
|
|
|
171
171
|
var DateField$1 = DateField;
|
|
172
172
|
|
|
173
173
|
// NOTE: This string will be replaced on build time with the package version.
|
|
174
|
-
var version = "14.0.
|
|
174
|
+
var version = "14.0.2";
|
|
175
175
|
|
|
176
176
|
exports["default"] = DateField$1;
|
|
177
177
|
exports.version = version;
|
|
@@ -156,7 +156,7 @@ DateField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
156
156
|
touched: _pt.bool,
|
|
157
157
|
name: _pt.string,
|
|
158
158
|
value: _pt.string.isRequired,
|
|
159
|
-
onChange: _pt.func
|
|
159
|
+
onChange: _pt.func,
|
|
160
160
|
onBlur: _pt.func,
|
|
161
161
|
onFocus: _pt.func,
|
|
162
162
|
isDisabled: _pt.bool,
|
|
@@ -174,6 +174,6 @@ DateField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
174
174
|
var DateField$1 = DateField;
|
|
175
175
|
|
|
176
176
|
// NOTE: This string will be replaced on build time with the package version.
|
|
177
|
-
var version = "14.0.
|
|
177
|
+
var version = "14.0.2";
|
|
178
178
|
|
|
179
179
|
export { DateField$1 as default, version };
|
|
@@ -4,7 +4,7 @@ declare type TFieldErrors = Record<string, boolean>;
|
|
|
4
4
|
declare type TCustomFormErrors<Values> = {
|
|
5
5
|
[K in keyof Values]?: TFieldErrors;
|
|
6
6
|
};
|
|
7
|
-
declare type
|
|
7
|
+
declare type TCustomEvent = {
|
|
8
8
|
target: {
|
|
9
9
|
id?: string;
|
|
10
10
|
name?: string;
|
|
@@ -20,8 +20,8 @@ declare type TDateFieldProps = {
|
|
|
20
20
|
touched?: boolean;
|
|
21
21
|
name?: string;
|
|
22
22
|
value: string;
|
|
23
|
-
onChange
|
|
24
|
-
onBlur?: (event:
|
|
23
|
+
onChange?: (event: TCustomEvent) => void;
|
|
24
|
+
onBlur?: (event: TCustomEvent) => void;
|
|
25
25
|
onFocus?: FocusEventHandler;
|
|
26
26
|
isDisabled?: boolean;
|
|
27
27
|
isReadOnly?: boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/date-field",
|
|
3
3
|
"description": "A controlled date input component for single date, 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",
|
|
@@ -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-input": "14.0.
|
|
25
|
+
"@commercetools-uikit/date-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.
|
|
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",
|