@commercetools-uikit/date-time-input 13.0.2 → 13.0.4
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 +2 -0
- package/dist/commercetools-uikit-date-time-input.cjs.dev.js +6 -1
- package/dist/commercetools-uikit-date-time-input.cjs.prod.js +4 -1
- package/dist/commercetools-uikit-date-time-input.esm.js +6 -1
- package/dist/declarations/src/date-time-input.d.ts +2 -0
- package/package.json +7 -9
package/README.md
CHANGED
|
@@ -50,6 +50,8 @@ export default Example;
|
|
|
50
50
|
|
|
51
51
|
| Props | Type | Required | Default | Description |
|
|
52
52
|
| ---------------------- | -------------------------------------------------------------------------------------------- | :------: | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
53
|
+
| `aria-invalid` | `boolean` | | | Indicate if the value entered in the input is invalid. |
|
|
54
|
+
| `aria-errormessage` | `string` | | | HTML ID of an element containing an error message related to the input. |
|
|
53
55
|
| `horizontalConstraint` | `union`<br/>Possible values:<br/>`, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'` | | | Horizontal size limit of the input field. |
|
|
54
56
|
| `value` | `string` | ✅ | | The selected date, must either be an empty string or a date formatted in ISO 8601 (e.g. "2018-10-04T09:00:00.000Z"). |
|
|
55
57
|
| `onChange` | `Function`<br/>[See signature.](#signature-onChange) | ✅ | | Called when the date changes. Called with an event containing an empty string (no value) or a string in this format: "YYYY-MM-DD".
<br /> |
|
|
@@ -313,6 +313,9 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
313
313
|
children: [jsxRuntime.jsx(calendarUtils.CalendarBody, {
|
|
314
314
|
inputRef: _this2.inputRef,
|
|
315
315
|
inputProps: getInputProps(_objectSpread({
|
|
316
|
+
/* ARIA */
|
|
317
|
+
'aria-invalid': _this2.props['aria-invalid'],
|
|
318
|
+
'aria-errormessage': _this2.props['aria-errormessage'],
|
|
316
319
|
// Unset the aria-labelledby as it interfers with the link
|
|
317
320
|
// between the <label for> and the <input id>.
|
|
318
321
|
'aria-labelledby': undefined,
|
|
@@ -486,6 +489,8 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
486
489
|
|
|
487
490
|
DateTimeInput.displayName = 'DateTimeInput';
|
|
488
491
|
DateTimeInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
492
|
+
'aria-invalid': _pt__default["default"].bool,
|
|
493
|
+
'aria-errormessage': _pt__default["default"].string,
|
|
489
494
|
horizontalConstraint: _pt__default["default"].oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
|
|
490
495
|
value: _pt__default["default"].string.isRequired,
|
|
491
496
|
onChange: _pt__default["default"].func.isRequired,
|
|
@@ -503,7 +508,7 @@ DateTimeInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
503
508
|
var dateTimeInput = reactIntl.injectIntl(DateTimeInput);
|
|
504
509
|
|
|
505
510
|
// NOTE: This string will be replaced on build time with the package version.
|
|
506
|
-
var version = "13.0.
|
|
511
|
+
var version = "13.0.4";
|
|
507
512
|
|
|
508
513
|
exports["default"] = dateTimeInput;
|
|
509
514
|
exports.version = version;
|
|
@@ -309,6 +309,9 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
309
309
|
children: [jsxRuntime.jsx(calendarUtils.CalendarBody, {
|
|
310
310
|
inputRef: _this2.inputRef,
|
|
311
311
|
inputProps: getInputProps(_objectSpread({
|
|
312
|
+
/* ARIA */
|
|
313
|
+
'aria-invalid': _this2.props['aria-invalid'],
|
|
314
|
+
'aria-errormessage': _this2.props['aria-errormessage'],
|
|
312
315
|
// Unset the aria-labelledby as it interfers with the link
|
|
313
316
|
// between the <label for> and the <input id>.
|
|
314
317
|
'aria-labelledby': undefined,
|
|
@@ -485,7 +488,7 @@ DateTimeInput.propTypes = {};
|
|
|
485
488
|
var dateTimeInput = reactIntl.injectIntl(DateTimeInput);
|
|
486
489
|
|
|
487
490
|
// NOTE: This string will be replaced on build time with the package version.
|
|
488
|
-
var version = "13.0.
|
|
491
|
+
var version = "13.0.4";
|
|
489
492
|
|
|
490
493
|
exports["default"] = dateTimeInput;
|
|
491
494
|
exports.version = version;
|
|
@@ -290,6 +290,9 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
290
290
|
children: [jsx(CalendarBody, {
|
|
291
291
|
inputRef: _this2.inputRef,
|
|
292
292
|
inputProps: getInputProps(_objectSpread({
|
|
293
|
+
/* ARIA */
|
|
294
|
+
'aria-invalid': _this2.props['aria-invalid'],
|
|
295
|
+
'aria-errormessage': _this2.props['aria-errormessage'],
|
|
293
296
|
// Unset the aria-labelledby as it interfers with the link
|
|
294
297
|
// between the <label for> and the <input id>.
|
|
295
298
|
'aria-labelledby': undefined,
|
|
@@ -463,6 +466,8 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
463
466
|
|
|
464
467
|
DateTimeInput.displayName = 'DateTimeInput';
|
|
465
468
|
DateTimeInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
469
|
+
'aria-invalid': _pt.bool,
|
|
470
|
+
'aria-errormessage': _pt.string,
|
|
466
471
|
horizontalConstraint: _pt.oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
|
|
467
472
|
value: _pt.string.isRequired,
|
|
468
473
|
onChange: _pt.func.isRequired,
|
|
@@ -480,6 +485,6 @@ DateTimeInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
480
485
|
var dateTimeInput = injectIntl(DateTimeInput);
|
|
481
486
|
|
|
482
487
|
// NOTE: This string will be replaced on build time with the package version.
|
|
483
|
-
var version = "13.0.
|
|
488
|
+
var version = "13.0.4";
|
|
484
489
|
|
|
485
490
|
export { dateTimeInput as default, version };
|
|
@@ -8,6 +8,8 @@ declare type TEvent = {
|
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
export declare type TDateTimeInputProps = {
|
|
11
|
+
'aria-invalid'?: boolean;
|
|
12
|
+
'aria-errormessage'?: string;
|
|
11
13
|
horizontalConstraint?: 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
|
|
12
14
|
value: string;
|
|
13
15
|
onChange: (event: TEvent) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/date-time-input",
|
|
3
3
|
"description": "The `DateTimeInput` component allows the user to select a date. This component also supports multiple date selection.",
|
|
4
|
-
"version": "13.0.
|
|
4
|
+
"version": "13.0.4",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,32 +21,30 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "7.17.2",
|
|
23
23
|
"@babel/runtime-corejs3": "7.17.2",
|
|
24
|
-
"@commercetools-uikit/accessible-button": "13.0.
|
|
24
|
+
"@commercetools-uikit/accessible-button": "13.0.4",
|
|
25
25
|
"@commercetools-uikit/calendar-time-utils": "13.0.2",
|
|
26
|
-
"@commercetools-uikit/calendar-utils": "13.0.
|
|
26
|
+
"@commercetools-uikit/calendar-utils": "13.0.4",
|
|
27
27
|
"@commercetools-uikit/constraints": "13.0.2",
|
|
28
28
|
"@commercetools-uikit/design-system": "13.0.0",
|
|
29
29
|
"@commercetools-uikit/hooks": "13.0.2",
|
|
30
30
|
"@commercetools-uikit/icons": "13.0.2",
|
|
31
|
-
"@commercetools-uikit/secondary-icon-button": "13.0.
|
|
32
|
-
"@commercetools-uikit/select-utils": "13.0.
|
|
31
|
+
"@commercetools-uikit/secondary-icon-button": "13.0.4",
|
|
32
|
+
"@commercetools-uikit/select-utils": "13.0.4",
|
|
33
33
|
"@commercetools-uikit/spacings-inline": "13.0.2",
|
|
34
|
-
"@commercetools-uikit/text": "13.0.
|
|
34
|
+
"@commercetools-uikit/text": "13.0.4",
|
|
35
35
|
"@commercetools-uikit/tooltip": "13.0.2",
|
|
36
36
|
"@commercetools-uikit/utils": "13.0.2",
|
|
37
37
|
"@emotion/react": "^11.4.0",
|
|
38
38
|
"@emotion/styled": "^11.3.0",
|
|
39
|
-
"common-tags": "1.8.2",
|
|
40
39
|
"downshift": "6.1.7",
|
|
41
40
|
"prop-types": "15.8.1",
|
|
42
41
|
"react-is": "17.0.2",
|
|
43
|
-
"react-required-if": "1.0.3",
|
|
44
42
|
"warning": "4.0.3"
|
|
45
43
|
},
|
|
46
44
|
"devDependencies": {
|
|
47
45
|
"moment": "2.29.1",
|
|
48
46
|
"react": "17.0.2",
|
|
49
|
-
"react-intl": "5.24.6"
|
|
47
|
+
"react-intl": "^5.24.6"
|
|
50
48
|
},
|
|
51
49
|
"peerDependencies": {
|
|
52
50
|
"moment": "2.x",
|