@commercetools-uikit/date-range-input 13.0.1 → 14.0.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.
package/README.md CHANGED
@@ -49,6 +49,8 @@ export default Example;
49
49
  | ---------------------- | -------------------------------------------------------------------------------------------- | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
50
50
  | `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. |
51
51
  | `value` | `Array: MomentInput[]` | ✅ | | The selected date range, must either be an empty array or an array of two strings holding dates formatted as "YYYY-MM-DD". |
52
+ | `aria-invalid` | `boolean` | | | Indicate if the value entered in the input is invalid. |
53
+ | `aria-errormessage` | `string` | | | HTML ID of an element containing an error message related to the input. |
52
54
  | `onChange` | `Function`<br/>[See signature.](#signature-onChange) | ✅ | | Called when the date range changes. Called 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;Signature: `(event) => void` |
53
55
  | `isClearable` | `boolean` | | `true` | Allows the range to be cleared |
54
56
  | `onFocus` | `Function`<br/>[See signature.](#signature-onFocus) | | | Called when the date input gains focus. |
@@ -352,6 +352,9 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
352
352
  children: [jsxRuntime.jsx(calendarUtils.CalendarBody, {
353
353
  inputRef: _this2.inputRef,
354
354
  inputProps: getInputProps(_objectSpread({
355
+ /* ARIA */
356
+ 'aria-invalid': _this2.props['aria-invalid'],
357
+ 'aria-errormessage': _this2.props['aria-errormessage'],
355
358
  // Unset the aria-labelledby as it interfers with the link
356
359
  // between the <label for> and the <input id>.
357
360
  'aria-labelledby': undefined,
@@ -523,6 +526,8 @@ DateRangeCalendar.isEmpty = function (range) {
523
526
  DateRangeCalendar.propTypes = process.env.NODE_ENV !== "production" ? {
524
527
  horizontalConstraint: _pt__default["default"].oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
525
528
  value: _pt__default["default"].arrayOf(_pt__default["default"].any).isRequired,
529
+ 'aria-invalid': _pt__default["default"].bool,
530
+ 'aria-errormessage': _pt__default["default"].string,
526
531
  onChange: _pt__default["default"].func.isRequired,
527
532
  isClearable: _pt__default["default"].bool,
528
533
  onFocus: _pt__default["default"].func,
@@ -538,7 +543,7 @@ DateRangeCalendar.propTypes = process.env.NODE_ENV !== "production" ? {
538
543
  var dateRangeInput = reactIntl.injectIntl(DateRangeCalendar);
539
544
 
540
545
  // NOTE: This string will be replaced on build time with the package version.
541
- var version = "13.0.1";
546
+ var version = "14.0.0";
542
547
 
543
548
  exports["default"] = dateRangeInput;
544
549
  exports.version = version;
@@ -351,6 +351,9 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
351
351
  children: [jsxRuntime.jsx(calendarUtils.CalendarBody, {
352
352
  inputRef: _this2.inputRef,
353
353
  inputProps: getInputProps(_objectSpread({
354
+ /* ARIA */
355
+ 'aria-invalid': _this2.props['aria-invalid'],
356
+ 'aria-errormessage': _this2.props['aria-errormessage'],
354
357
  // Unset the aria-labelledby as it interfers with the link
355
358
  // between the <label for> and the <input id>.
356
359
  'aria-labelledby': undefined,
@@ -523,7 +526,7 @@ DateRangeCalendar.propTypes = {};
523
526
  var dateRangeInput = reactIntl.injectIntl(DateRangeCalendar);
524
527
 
525
528
  // NOTE: This string will be replaced on build time with the package version.
526
- var version = "13.0.1";
529
+ var version = "14.0.0";
527
530
 
528
531
  exports["default"] = dateRangeInput;
529
532
  exports.version = version;
@@ -328,6 +328,9 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
328
328
  children: [jsx(CalendarBody, {
329
329
  inputRef: _this2.inputRef,
330
330
  inputProps: getInputProps(_objectSpread({
331
+ /* ARIA */
332
+ 'aria-invalid': _this2.props['aria-invalid'],
333
+ 'aria-errormessage': _this2.props['aria-errormessage'],
331
334
  // Unset the aria-labelledby as it interfers with the link
332
335
  // between the <label for> and the <input id>.
333
336
  'aria-labelledby': undefined,
@@ -499,6 +502,8 @@ DateRangeCalendar.isEmpty = function (range) {
499
502
  DateRangeCalendar.propTypes = process.env.NODE_ENV !== "production" ? {
500
503
  horizontalConstraint: _pt.oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
501
504
  value: _pt.arrayOf(_pt.any).isRequired,
505
+ 'aria-invalid': _pt.bool,
506
+ 'aria-errormessage': _pt.string,
502
507
  onChange: _pt.func.isRequired,
503
508
  isClearable: _pt.bool,
504
509
  onFocus: _pt.func,
@@ -514,6 +519,6 @@ DateRangeCalendar.propTypes = process.env.NODE_ENV !== "production" ? {
514
519
  var dateRangeInput = injectIntl(DateRangeCalendar);
515
520
 
516
521
  // NOTE: This string will be replaced on build time with the package version.
517
- var version = "13.0.1";
522
+ var version = "14.0.0";
518
523
 
519
524
  export { dateRangeInput as default, version };
@@ -11,6 +11,8 @@ declare type TEvent = {
11
11
  declare type TDateRangeCalendarProps = {
12
12
  horizontalConstraint?: 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
13
13
  value: MomentInput[];
14
+ 'aria-invalid'?: boolean;
15
+ 'aria-errormessage'?: string;
14
16
  onChange: (event: TEvent) => void;
15
17
  isClearable?: boolean;
16
18
  onFocus?: (event: TEvent) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/date-range-input",
3
3
  "description": "The `DateRangeInput` component allows the user to select a date range.",
4
- "version": "13.0.1",
4
+ "version": "14.0.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -9,7 +9,7 @@
9
9
  "directory": "packages/components/inputs/date-range-input"
10
10
  },
11
11
  "homepage": "https://uikit.commercetools.com",
12
- "keywords": ["javascript", "design system", "react", "uikit"],
12
+ "keywords": ["javascript", "typescript", "design-system", "react", "uikit"],
13
13
  "license": "MIT",
14
14
  "publishConfig": {
15
15
  "access": "public"
@@ -19,33 +19,31 @@
19
19
  "module": "dist/commercetools-uikit-date-range-input.esm.js",
20
20
  "files": ["dist"],
21
21
  "dependencies": {
22
- "@babel/runtime": "7.17.2",
23
- "@babel/runtime-corejs3": "7.17.2",
24
- "@commercetools-uikit/accessible-button": "13.0.0",
25
- "@commercetools-uikit/calendar-utils": "13.0.1",
26
- "@commercetools-uikit/constraints": "13.0.0",
27
- "@commercetools-uikit/design-system": "13.0.0",
28
- "@commercetools-uikit/hooks": "12.2.9",
29
- "@commercetools-uikit/icons": "13.0.0",
30
- "@commercetools-uikit/secondary-icon-button": "13.0.1",
31
- "@commercetools-uikit/select-utils": "13.0.1",
32
- "@commercetools-uikit/spacings-inline": "13.0.0",
33
- "@commercetools-uikit/text": "13.0.0",
34
- "@commercetools-uikit/tooltip": "13.0.0",
35
- "@commercetools-uikit/utils": "12.2.9",
22
+ "@babel/runtime": "^7.17.2",
23
+ "@babel/runtime-corejs3": "^7.17.2",
24
+ "@commercetools-uikit/accessible-button": "14.0.0",
25
+ "@commercetools-uikit/calendar-utils": "14.0.0",
26
+ "@commercetools-uikit/constraints": "14.0.0",
27
+ "@commercetools-uikit/design-system": "14.0.0",
28
+ "@commercetools-uikit/hooks": "14.0.0",
29
+ "@commercetools-uikit/icons": "14.0.0",
30
+ "@commercetools-uikit/secondary-icon-button": "14.0.0",
31
+ "@commercetools-uikit/select-utils": "14.0.0",
32
+ "@commercetools-uikit/spacings-inline": "14.0.0",
33
+ "@commercetools-uikit/text": "14.0.0",
34
+ "@commercetools-uikit/tooltip": "14.0.0",
35
+ "@commercetools-uikit/utils": "14.0.0",
36
36
  "@emotion/react": "^11.4.0",
37
37
  "@emotion/styled": "^11.3.0",
38
- "common-tags": "1.8.2",
39
38
  "downshift": "6.1.7",
40
39
  "prop-types": "15.8.1",
41
40
  "react-is": "17.0.2",
42
- "react-required-if": "1.0.3",
43
41
  "warning": "4.0.3"
44
42
  },
45
43
  "devDependencies": {
46
44
  "moment": "2.29.1",
47
45
  "react": "17.0.2",
48
- "react-intl": "5.24.6"
46
+ "react-intl": "^5.24.6"
49
47
  },
50
48
  "peerDependencies": {
51
49
  "moment": "2.x",