diff --git a/CHANGELOG.md b/CHANGELOG.md index 53a55dd685d..ef6014adcc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,6 @@ - Fixed `EuiComboBox` always showing a scrollbar ([#3744](https://github.com/elastic/eui/pull/3744)) - Replaced `react-focus-lock` with `react-focus-on` ([#3631](https://github.com/elastic/eui/pull/3631)) -- Fixed errors in `EuiSuperDatePicker` related to invalid and `null` date formatting ([#3750](https://github.com/elastic/eui/pull/3750)) ## [`27.1.0`](https://github.com/elastic/eui/tree/v27.1.0) diff --git a/packages/react-datepicker.js b/packages/react-datepicker.js index 0ef695d6779..7d65b53471e 100644 --- a/packages/react-datepicker.js +++ b/packages/react-datepicker.js @@ -212,6 +212,11 @@ UntouchabilityChecker.prototype.isUntouchable = function isUntouchable(node) { var tabbable_1 = tabbable; +var tabbable$1 = /*#__PURE__*/Object.freeze({ + default: tabbable_1, + __moduleExports: tabbable_1 +}); + var immutable = extend; var hasOwnProperty = Object.prototype.hasOwnProperty; @@ -232,12 +237,7 @@ function extend() { return target } -var immutable$1 = /*#__PURE__*/Object.freeze({ - default: immutable, - __moduleExports: immutable -}); - -var xtend = ( immutable$1 && immutable ) || immutable$1; +var tabbable$2 = ( tabbable$1 && tabbable_1 ) || tabbable$1; var listeningFocusTrap = null; @@ -246,7 +246,7 @@ function focusTrap(element, userOptions) { var container = typeof element === 'string' ? doc.querySelector(element) : element; - var config = xtend( + var config = immutable( { returnFocusOnDeactivate: true, escapeDeactivates: true @@ -418,7 +418,7 @@ function focusTrap(element, userOptions) { if (container.contains(e.target)) return; if (config.clickOutsideDeactivates) { deactivate({ - returnFocus: !tabbable_1.isFocusable(e.target) + returnFocus: !tabbable$2.isFocusable(e.target) }); } else { e.preventDefault(); @@ -473,7 +473,7 @@ function focusTrap(element, userOptions) { } function updateTabbableNodes() { - var tabbableNodes = tabbable_1(container); + var tabbableNodes = tabbable$2(container); state.firstTabbableNode = tabbableNodes[0] || getInitialFocusNode(); state.lastTabbableNode = tabbableNodes[tabbableNodes.length - 1] || getInitialFocusNode(); @@ -3027,16 +3027,9 @@ var Month = function (_React$Component) { } }; - _this.onBlur = function () { - if (_this.props.accessibleMode) { - _this.setState({ readInstructions: false }); - } - }; - _this.onInputKeyDown = function (event) { var eventKey = event.key; - // `preSelection` can be `null` but `day` is required. Use it as a fallback if necessary for invalid entries. - var copy = _this.props.preSelection ? newDate(_this.props.preSelection) : newDate(_this.props.day); + var copy = newDate(_this.props.preSelection); var newSelection = void 0; switch (eventKey) { case "ArrowLeft": @@ -3066,7 +3059,7 @@ var Month = function (_React$Component) { case " ": case "Enter": event.preventDefault(); - _this.handleDayClick(copy, event); + _this.handleDayClick(_this.props.preSelection, event); break; } if (!newSelection) return; // Let the input component handle this keydown @@ -3168,7 +3161,8 @@ var Month = function (_React$Component) { "p", { "aria-live": true }, "You are focused on a calendar. Use the arrow keys to navigate the days in the month. Use the page up and down keys to navigate from month to month. Use the home and end keys to navigate from year to year.", - this.props.preSelection ? formatDate(this.props.preSelection, this.dayFormat) + " is the\n currently focused date." : "No date is currently focused." + formatDate(this.props.preSelection, this.dayFormat), + " is the currently focused date." ); } @@ -3181,8 +3175,7 @@ var Month = function (_React$Component) { "aria-label": "month-" + this.props.day.format("YYYY-MM"), tabIndex: this.props.accessibleMode ? 0 : -1, onKeyDown: this.onInputKeyDown, - onFocus: this.onFocus, - onBlur: this.onBlur + onFocus: this.onFocus }, React__default.createElement( ScreenReaderOnly, @@ -3318,10 +3311,8 @@ var Time = function (_React$Component) { } // update preSelection to the selection - this.setState(function (prevState) { - return { - preSelection: prevState.selected - }; + this.setState({ + preSelection: this.props.selected }); } @@ -3364,7 +3355,8 @@ var Time = function (_React$Component) { "p", { "aria-live": true }, "You are a in a time selector. Use the up and down keys to select from other common times then press enter to confirm.", - this.state.preSelection ? formatDate(this.state.preSelection, this.timeFormat) + " is currently\n focused." : "No time is currently focused." + formatDate(this.state.preSelection, this.timeFormat), + " is currently focused." ); } @@ -3457,7 +3449,7 @@ var _initialiseProps = function _initialiseProps() { this.onBlur = function () { if (_this3.props.accessibleMode) { - _this3.setState({ readInstructions: false, isFocused: false }); + _this3.setState({ isFocused: false }); } }; @@ -4540,24 +4532,17 @@ var _objectKeysInternal = function (object, names) { return result; }; -var _objectKeysInternal$1 = /*#__PURE__*/Object.freeze({ - default: _objectKeysInternal, - __moduleExports: _objectKeysInternal -}); - // IE 8- don't enum bug keys var _enumBugKeys = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); -var $keys = ( _objectKeysInternal$1 && _objectKeysInternal ) || _objectKeysInternal$1; - // 19.1.2.14 / 15.2.3.14 Object.keys(O) var _objectKeys = Object.keys || function keys(O) { - return $keys(O, _enumBugKeys); + return _objectKeysInternal(O, _enumBugKeys); }; var f$1 = Object.getOwnPropertySymbols; @@ -4612,32 +4597,18 @@ var _objectAssign = !$assign || _fails(function () { } return T; } : $assign; -var _objectAssign$1 = /*#__PURE__*/Object.freeze({ - default: _objectAssign, - __moduleExports: _objectAssign -}); - -var require$$0 = ( _objectAssign$1 && _objectAssign ) || _objectAssign$1; - // 19.1.3.1 Object.assign(target, source) -_export(_export.S + _export.F, 'Object', { assign: require$$0 }); +_export(_export.S + _export.F, 'Object', { assign: _objectAssign }); var assign = _core.Object.assign; -var assign$1 = /*#__PURE__*/Object.freeze({ - default: assign, - __moduleExports: assign -}); - -var require$$0$1 = ( assign$1 && assign ) || assign$1; - -var assign$2 = createCommonjsModule(function (module) { -module.exports = { "default": require$$0$1, __esModule: true }; +var assign$1 = createCommonjsModule(function (module) { +module.exports = { "default": assign, __esModule: true }; }); -unwrapExports(assign$2); +unwrapExports(assign$1); var _extends$1 = createCommonjsModule(function (module, exports) { @@ -4645,7 +4616,7 @@ exports.__esModule = true; -var _assign2 = _interopRequireDefault(assign$2); +var _assign2 = _interopRequireDefault(assign$1); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -5020,7 +4991,7 @@ var _isArray = Array.isArray || function isArray(arg) { var hiddenKeys = _enumBugKeys.concat('length', 'prototype'); var f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return $keys(O, hiddenKeys); + return _objectKeysInternal(O, hiddenKeys); }; var _objectGopn = { @@ -5311,10 +5282,10 @@ var symbol$1 = /*#__PURE__*/Object.freeze({ __moduleExports: symbol }); -var require$$0$2 = ( symbol$1 && symbol ) || symbol$1; +var require$$0 = ( symbol$1 && symbol ) || symbol$1; var symbol$2 = createCommonjsModule(function (module) { -module.exports = { "default": require$$0$2, __esModule: true }; +module.exports = { "default": require$$0, __esModule: true }; }); unwrapExports(symbol$2); diff --git a/packages/react-datepicker/docs-site/bundle.js b/packages/react-datepicker/docs-site/bundle.js index 4ef89b10ca9..5aceee9350a 100644 --- a/packages/react-datepicker/docs-site/bundle.js +++ b/packages/react-datepicker/docs-site/bundle.js @@ -310,7 +310,7 @@ /***/ }), /* 3 */ -[821, 4, 5, 6, 8, 18, 22, 7, 23, 24, 19, 25, 26, 27, 29, 44, 12, 32, 16, 17, 45, 48, 50, 11, 30, 49, 43, 42, 28, 10], +[841, 4, 5, 6, 8, 18, 22, 7, 23, 24, 19, 25, 26, 27, 29, 44, 12, 32, 16, 17, 45, 48, 50, 11, 30, 49, 43, 42, 28, 10], /* 4 */ /***/ (function(module, exports) { @@ -334,7 +334,7 @@ /***/ }), /* 6 */ -[822, 7], +[842, 7], /* 7 */ /***/ (function(module, exports) { @@ -406,11 +406,11 @@ /***/ }), /* 10 */ -[823, 11, 17, 6], +[843, 11, 17, 6], /* 11 */ -[824, 12, 14, 16, 6], +[844, 12, 14, 16, 6], /* 12 */ -[825, 13], +[845, 13], /* 13 */ /***/ (function(module, exports) { @@ -421,11 +421,11 @@ /***/ }), /* 14 */ -[826, 6, 7, 15], +[846, 6, 7, 15], /* 15 */ -[827, 13, 4], +[847, 13, 4], /* 16 */ -[828, 13], +[848, 13], /* 17 */ /***/ (function(module, exports) { @@ -489,7 +489,7 @@ /***/ }), /* 20 */ -[829, 21], +[849, 21], /* 21 */ /***/ (function(module, exports) { @@ -501,17 +501,17 @@ /***/ }), /* 22 */ -[830, 19, 13, 5, 11, 7], +[850, 19, 13, 5, 11, 7], /* 23 */ -[831, 4], +[851, 4], /* 24 */ -[832, 11, 5, 25], +[852, 11, 5, 25], /* 25 */ -[833, 23, 19, 4], +[853, 23, 19, 4], /* 26 */ -[834, 25], +[854, 25], /* 27 */ -[835, 4, 9, 28, 26, 11], +[855, 4, 9, 28, 26, 11], /* 28 */ /***/ (function(module, exports) { @@ -520,15 +520,15 @@ /***/ }), /* 29 */ -[836, 30, 42, 43], +[856, 30, 42, 43], /* 30 */ -[837, 31, 41], +[857, 31, 41], /* 31 */ -[838, 5, 32, 36, 40], +[858, 5, 32, 36, 40], /* 32 */ -[839, 33, 35], +[859, 33, 35], /* 33 */ -[840, 34], +[860, 34], /* 34 */ /***/ (function(module, exports) { @@ -552,9 +552,9 @@ /***/ }), /* 36 */ -[841, 32, 37, 39], +[861, 32, 37, 39], /* 37 */ -[842, 38], +[862, 38], /* 38 */ /***/ (function(module, exports) { @@ -568,9 +568,9 @@ /***/ }), /* 39 */ -[843, 38], +[863, 38], /* 40 */ -[844, 23, 19], +[864, 23, 19], /* 41 */ /***/ (function(module, exports) { @@ -596,21 +596,21 @@ /***/ }), /* 44 */ -[845, 34], +[865, 34], /* 45 */ -[846, 12, 46, 41, 40, 15, 47], +[866, 12, 46, 41, 40, 15, 47], /* 46 */ -[847, 11, 12, 30, 6], +[867, 11, 12, 30, 6], /* 47 */ -[848, 4], +[868, 4], /* 48 */ -[849, 32, 49], +[869, 32, 49], /* 49 */ -[850, 31, 41], +[870, 31, 41], /* 50 */ -[851, 43, 17, 32, 16, 5, 14, 6], +[871, 43, 17, 32, 16, 5, 14, 6], /* 51 */ -[852, 8, 45], +[872, 8, 45], /* 52 */ /***/ (function(module, exports, __webpack_require__) { @@ -676,9 +676,9 @@ /***/ }), /* 57 */ -[853, 35], +[873, 35], /* 58 */ -[854, 5, 57, 40], +[874, 5, 57, 40], /* 59 */ /***/ (function(module, exports, __webpack_require__) { @@ -792,9 +792,9 @@ /***/ }), /* 67 */ -[855, 8, 68], +[875, 8, 68], /* 68 */ -[856, 30, 42, 43, 57, 33, 7], +[876, 30, 42, 43, 57, 33, 7], /* 69 */ /***/ (function(module, exports, __webpack_require__) { @@ -816,9 +816,9 @@ /***/ }), /* 71 */ -[857, 8, 72], +[877, 8, 72], /* 72 */ -[858, 13, 12, 20, 50], +[878, 13, 12, 20, 50], /* 73 */ /***/ (function(module, exports, __webpack_require__) { @@ -1851,11 +1851,11 @@ /***/ }), /* 126 */ -[859, 127, 128], +[879, 127, 128], /* 127 */ -[860, 38, 35], +[880, 38, 35], /* 128 */ -[861, 28, 8, 18, 10, 5, 129, 130, 24, 58, 25], +[881, 28, 8, 18, 10, 5, 129, 130, 24, 58, 25], /* 129 */ /***/ (function(module, exports) { @@ -1864,7 +1864,7 @@ /***/ }), /* 130 */ -[862, 45, 17, 24, 10, 25], +[882, 45, 17, 24, 10, 25], /* 131 */ /***/ (function(module, exports, __webpack_require__) { @@ -3020,7 +3020,7 @@ /***/ }), /* 194 */ -[863, 187, 195, 129, 32, 128], +[883, 187, 195, 129, 32, 128], /* 195 */ /***/ (function(module, exports) { @@ -5926,9 +5926,9 @@ /***/ }), /* 264 */ -[864, 27], +[884, 27], /* 265 */ -[865, 27], +[885, 27], /* 266 */ /***/ (function(module, exports, __webpack_require__) { @@ -8399,7 +8399,7 @@ var _example_components2 = _interopRequireDefault(_example_components); - var _hero_example = __webpack_require__(820); + var _hero_example = __webpack_require__(840); var _hero_example2 = _interopRequireDefault(_hero_example); @@ -8751,9 +8751,9 @@ var _render_custom_header2 = _interopRequireDefault(_render_custom_header); - __webpack_require__(818); + __webpack_require__(838); - __webpack_require__(819); + __webpack_require__(839); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -27417,9 +27417,9 @@ /***/ }), /* 517 */ -[866, 518], +[886, 518], /* 518 */ -[867, 519, 520, 521], +[887, 519, 520, 521], /* 519 */ /***/ (function(module, exports) { @@ -48002,16 +48002,9 @@ } }; - _this.onBlur = function () { - if (_this.props.accessibleMode) { - _this.setState({ readInstructions: false }); - } - }; - _this.onInputKeyDown = function (event) { var eventKey = event.key; - // `preSelection` can be `null` but `day` is required. Use it as a fallback if necessary for invalid entries. - var copy = _this.props.preSelection ? utils.newDate(_this.props.preSelection) : utils.newDate(_this.props.day); + var copy = utils.newDate(_this.props.preSelection); var newSelection = void 0; switch (eventKey) { case "ArrowLeft": @@ -48041,7 +48034,7 @@ case " ": case "Enter": event.preventDefault(); - _this.handleDayClick(copy, event); + _this.handleDayClick(_this.props.preSelection, event); break; } if (!newSelection) return; // Let the input component handle this keydown @@ -48143,7 +48136,8 @@ "p", { "aria-live": true }, "You are focused on a calendar. Use the arrow keys to navigate the days in the month. Use the page up and down keys to navigate from month to month. Use the home and end keys to navigate from year to year.", - this.props.preSelection ? utils.formatDate(this.props.preSelection, this.dayFormat) + " is the\n currently focused date." : "No date is currently focused." + utils.formatDate(this.props.preSelection, this.dayFormat), + " is the currently focused date." ); } @@ -48156,8 +48150,7 @@ "aria-label": "month-" + this.props.day.format("YYYY-MM"), tabIndex: this.props.accessibleMode ? 0 : -1, onKeyDown: this.onInputKeyDown, - onFocus: this.onFocus, - onBlur: this.onBlur + onFocus: this.onFocus }, _react2.default.createElement( _screen_reader_only.ScreenReaderOnly, @@ -48783,10 +48776,8 @@ } // update preSelection to the selection - this.setState(function (prevState) { - return { - preSelection: prevState.selected - }; + this.setState({ + preSelection: this.props.selected }); } @@ -48829,7 +48820,8 @@ "p", { "aria-live": true }, "You are a in a time selector. Use the up and down keys to select from other common times then press enter to confirm.", - this.state.preSelection ? (0, _date_utils.formatDate)(this.state.preSelection, this.timeFormat) + " is currently\n focused." : "No time is currently focused." + (0, _date_utils.formatDate)(this.state.preSelection, this.timeFormat), + " is currently focused." ); } @@ -48922,7 +48914,7 @@ this.onBlur = function () { if (_this3.props.accessibleMode) { - _this3.setState({ readInstructions: false, isFocused: false }); + _this3.setState({ isFocused: false }); } }; @@ -49445,7 +49437,7 @@ /***/ }), /* 674 */ -[855, 675, 690], +[875, 675, 690], /* 675 */ /***/ (function(module, exports, __webpack_require__) { @@ -49518,57 +49510,57 @@ /* 677 */ 9, /* 678 */ -[829, 679], +[849, 679], /* 679 */ 21, /* 680 */ -[823, 681, 689, 685], +[843, 681, 689, 685], /* 681 */ -[824, 682, 684, 688, 685], +[844, 682, 684, 688, 685], /* 682 */ -[825, 683], +[845, 683], /* 683 */ 13, /* 684 */ -[826, 685, 686, 687], +[846, 685, 686, 687], /* 685 */ -[822, 686], +[842, 686], /* 686 */ 7, /* 687 */ -[827, 683, 676], +[847, 683, 676], /* 688 */ -[828, 683], +[848, 683], /* 689 */ 17, /* 690 */ -[856, 691, 706, 707, 708, 695, 686], +[876, 691, 706, 707, 708, 695, 686], /* 691 */ -[837, 692, 705], +[857, 692, 705], /* 692 */ -[838, 693, 694, 698, 702], +[858, 693, 694, 698, 702], /* 693 */ 5, /* 694 */ -[839, 695, 697], +[859, 695, 697], /* 695 */ -[840, 696], +[860, 696], /* 696 */ 34, /* 697 */ 35, /* 698 */ -[841, 694, 699, 701], +[861, 694, 699, 701], /* 699 */ -[842, 700], +[862, 700], /* 700 */ 38, /* 701 */ -[843, 700], +[863, 700], /* 702 */ -[844, 703, 704], +[864, 703, 704], /* 703 */ -[831, 676], +[851, 676], /* 704 */ 19, /* 705 */ @@ -49578,7 +49570,7 @@ /* 707 */ 43, /* 708 */ -[853, 697], +[873, 697], /* 709 */ /***/ (function(module, exports) { @@ -49657,11 +49649,11 @@ /***/ }), /* 714 */ -[859, 715, 716], +[879, 715, 716], /* 715 */ -[860, 700, 697], +[880, 700, 697], /* 716 */ -[861, 717, 675, 718, 680, 693, 719, 720, 724, 726, 725], +[881, 717, 675, 718, 680, 693, 719, 720, 724, 726, 725], /* 717 */ /***/ (function(module, exports) { @@ -49679,19 +49671,19 @@ /* 719 */ 129, /* 720 */ -[862, 721, 689, 724, 680, 725], +[882, 721, 689, 724, 680, 725], /* 721 */ -[846, 682, 722, 705, 702, 687, 723], +[866, 682, 722, 705, 702, 687, 723], /* 722 */ -[847, 681, 682, 691, 685], +[867, 681, 682, 691, 685], /* 723 */ -[848, 676], +[868, 676], /* 724 */ -[832, 681, 693, 725], +[852, 681, 693, 725], /* 725 */ -[833, 703, 704, 676], +[853, 703, 704, 676], /* 726 */ -[854, 693, 708, 702], +[874, 693, 708, 702], /* 727 */ /***/ (function(module, exports, __webpack_require__) { @@ -49718,7 +49710,7 @@ /***/ }), /* 728 */ -[863, 729, 730, 719, 694, 716], +[883, 729, 730, 719, 694, 716], /* 729 */ /***/ (function(module, exports) { @@ -49729,7 +49721,7 @@ /* 730 */ 195, /* 731 */ -[834, 725], +[854, 725], /* 732 */ /***/ (function(module, exports, __webpack_require__) { @@ -49748,21 +49740,21 @@ /***/ }), /* 734 */ -[821, 676, 693, 685, 675, 718, 735, 686, 703, 724, 704, 725, 731, 736, 737, 738, 682, 694, 688, 689, 721, 739, 741, 681, 691, 740, 707, 706, 717, 680], +[841, 676, 693, 685, 675, 718, 735, 686, 703, 724, 704, 725, 731, 736, 737, 738, 682, 694, 688, 689, 721, 739, 741, 681, 691, 740, 707, 706, 717, 680], /* 735 */ -[830, 704, 683, 693, 681, 686], +[850, 704, 683, 693, 681, 686], /* 736 */ -[835, 676, 677, 717, 731, 681], +[855, 676, 677, 717, 731, 681], /* 737 */ -[836, 691, 706, 707], +[856, 691, 706, 707], /* 738 */ -[845, 696], +[865, 696], /* 739 */ -[849, 694, 740], +[869, 694, 740], /* 740 */ -[850, 692, 705], +[870, 692, 705], /* 741 */ -[851, 707, 689, 694, 688, 693, 684, 685], +[871, 707, 689, 694, 688, 693, 684, 685], /* 742 */ /***/ (function(module, exports) { @@ -49770,9 +49762,9 @@ /***/ }), /* 743 */ -[864, 736], +[884, 736], /* 744 */ -[865, 736], +[885, 736], /* 745 */ /***/ (function(module, exports, __webpack_require__) { @@ -49826,9 +49818,9 @@ /***/ }), /* 748 */ -[857, 675, 749], +[877, 675, 749], /* 749 */ -[858, 683, 682, 678, 741], +[878, 683, 682, 678, 741], /* 750 */ /***/ (function(module, exports, __webpack_require__) { @@ -49847,7 +49839,7 @@ /***/ }), /* 752 */ -[852, 675, 721], +[872, 675, 721], /* 753 */ /***/ (function(module, exports, __webpack_require__) { @@ -52677,9 +52669,9 @@ /***/ }), /* 757 */ -[866, 758], +[886, 758], /* 758 */ -[867, 759, 760, 761], +[887, 759, 760, 761], /* 759 */ 519, /* 760 */ @@ -57214,7 +57206,7 @@ /* 817 */ /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + "use strict"; exports.__esModule = true; @@ -57230,6 +57222,10 @@ var _moment2 = _interopRequireDefault(_moment); + var _range = __webpack_require__(818); + + var _range2 = _interopRequireDefault(_range); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -57238,14 +57234,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var range = function range(start, end) { - var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; - return Array.from({ length: (end - start + step - 1) / step }, function (_, i) { - return i * step + start; - }); - }; - - var years = range(1990, (0, _moment2.default)().year() + 1, 1); + var years = (0, _range2.default)(1990, (0, _moment2.default)().year() + 1, 1); var months = _moment2.default.months(); var Default = function (_React$Component) { @@ -57270,20 +57259,20 @@ Default.prototype.render = function render() { return _react2.default.createElement( - 'div', - { className: 'row' }, + "div", + { className: "row" }, _react2.default.createElement( - 'pre', - { className: 'column example__code' }, + "pre", + { className: "column example__code" }, _react2.default.createElement( - 'code', - { className: 'jsx' }, - '\n {}}\n/>\n' + "code", + { className: "jsx" }, + "\n {}}\n/>\n" ) ), _react2.default.createElement( - 'div', - { className: 'column' }, + "div", + { className: "column" }, _react2.default.createElement(_reactDatepicker2.default, { renderCustomHeader: function renderCustomHeader(_ref) { var date = _ref.date, @@ -57294,58 +57283,63 @@ prevMonthButtonDisabled = _ref.prevMonthButtonDisabled, nextMonthButtonDisabled = _ref.nextMonthButtonDisabled; return _react2.default.createElement( - 'div', + "div", { style: { margin: 10, - display: 'flex', - justifyContent: 'center' - } }, + display: "flex", + justifyContent: "center" + } + }, _react2.default.createElement( - 'button', + "button", { onClick: decreaseMonth, - disabled: prevMonthButtonDisabled }, - '<' + disabled: prevMonthButtonDisabled + }, + "<" ), _react2.default.createElement( - 'select', + "select", { value: date.year(), onChange: function onChange(_ref2) { var value = _ref2.target.value; return changeYear(value); - } }, + } + }, years.map(function (option) { return _react2.default.createElement( - 'option', + "option", { key: option, value: option }, option ); }) ), _react2.default.createElement( - 'select', + "select", { value: months[date.month()], onChange: function onChange(_ref3) { var value = _ref3.target.value; return changeMonth(value); - } }, + } + }, months.map(function (option) { return _react2.default.createElement( - 'option', + "option", { key: option, value: option }, option ); }) ), _react2.default.createElement( - 'button', + "button", { onClick: increaseMonth, - disabled: nextMonthButtonDisabled }, - '>' + disabled: nextMonthButtonDisabled + }, + ">" ) ); }, @@ -57363,14 +57357,748 @@ /***/ }), /* 818 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + + var createRange = __webpack_require__(819); + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + var range = createRange(); + + module.exports = range; - // removed by extract-text-webpack-plugin /***/ }), /* 819 */ -818, +/***/ (function(module, exports, __webpack_require__) { + + var baseRange = __webpack_require__(820), + isIterateeCall = __webpack_require__(821), + toFinite = __webpack_require__(834); + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + module.exports = createRange; + + +/***/ }), /* 820 */ +/***/ (function(module, exports) { + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeMax = Math.max; + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + module.exports = baseRange; + + +/***/ }), +/* 821 */ +/***/ (function(module, exports, __webpack_require__) { + + var eq = __webpack_require__(822), + isArrayLike = __webpack_require__(823), + isIndex = __webpack_require__(833), + isObject = __webpack_require__(831); + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + module.exports = isIterateeCall; + + +/***/ }), +/* 822 */ +/***/ (function(module, exports) { + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + module.exports = eq; + + +/***/ }), +/* 823 */ +/***/ (function(module, exports, __webpack_require__) { + + var isFunction = __webpack_require__(824), + isLength = __webpack_require__(832); + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + module.exports = isArrayLike; + + +/***/ }), +/* 824 */ +/***/ (function(module, exports, __webpack_require__) { + + var baseGetTag = __webpack_require__(825), + isObject = __webpack_require__(831); + + /** `Object#toString` result references. */ + var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + module.exports = isFunction; + + +/***/ }), +/* 825 */ +/***/ (function(module, exports, __webpack_require__) { + + var Symbol = __webpack_require__(826), + getRawTag = __webpack_require__(829), + objectToString = __webpack_require__(830); + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + module.exports = baseGetTag; + + +/***/ }), +/* 826 */ +/***/ (function(module, exports, __webpack_require__) { + + var root = __webpack_require__(827); + + /** Built-in value references. */ + var Symbol = root.Symbol; + + module.exports = Symbol; + + +/***/ }), +/* 827 */ +/***/ (function(module, exports, __webpack_require__) { + + var freeGlobal = __webpack_require__(828); + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + module.exports = root; + + +/***/ }), +/* 828 */ +/***/ (function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + module.exports = freeGlobal; + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }), +/* 829 */ +/***/ (function(module, exports, __webpack_require__) { + + var Symbol = __webpack_require__(826); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Built-in value references. */ + var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + module.exports = getRawTag; + + +/***/ }), +/* 830 */ +/***/ (function(module, exports) { + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + module.exports = objectToString; + + +/***/ }), +/* 831 */ +/***/ (function(module, exports) { + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + module.exports = isObject; + + +/***/ }), +/* 832 */ +/***/ (function(module, exports) { + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + module.exports = isLength; + + +/***/ }), +/* 833 */ +/***/ (function(module, exports) { + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + module.exports = isIndex; + + +/***/ }), +/* 834 */ +/***/ (function(module, exports, __webpack_require__) { + + var toNumber = __webpack_require__(835); + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + module.exports = toFinite; + + +/***/ }), +/* 835 */ +/***/ (function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(831), + isSymbol = __webpack_require__(836); + + /** Used as references for various `Number` constants. */ + var NAN = 0 / 0; + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Built-in method references without a dependency on `root`. */ + var freeParseInt = parseInt; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + module.exports = toNumber; + + +/***/ }), +/* 836 */ +/***/ (function(module, exports, __webpack_require__) { + + var baseGetTag = __webpack_require__(825), + isObjectLike = __webpack_require__(837); + + /** `Object#toString` result references. */ + var symbolTag = '[object Symbol]'; + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + module.exports = isSymbol; + + +/***/ }), +/* 837 */ +/***/ (function(module, exports) { + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + module.exports = isObjectLike; + + +/***/ }), +/* 838 */ +/***/ (function(module, exports) { + + // removed by extract-text-webpack-plugin + +/***/ }), +/* 839 */ +838, +/* 840 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57431,7 +58159,7 @@ exports.default = HeroExample; /***/ }), -/* 821 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__, __webpack_module_template_argument_7__, __webpack_module_template_argument_8__, __webpack_module_template_argument_9__, __webpack_module_template_argument_10__, __webpack_module_template_argument_11__, __webpack_module_template_argument_12__, __webpack_module_template_argument_13__, __webpack_module_template_argument_14__, __webpack_module_template_argument_15__, __webpack_module_template_argument_16__, __webpack_module_template_argument_17__, __webpack_module_template_argument_18__, __webpack_module_template_argument_19__, __webpack_module_template_argument_20__, __webpack_module_template_argument_21__, __webpack_module_template_argument_22__, __webpack_module_template_argument_23__, __webpack_module_template_argument_24__, __webpack_module_template_argument_25__, __webpack_module_template_argument_26__, __webpack_module_template_argument_27__, __webpack_module_template_argument_28__) { 'use strict'; @@ -57671,7 +58399,7 @@ /***/ }), -/* 822 */ +/* 842 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { // Thank's IE8 for his funny defineProperty @@ -57681,7 +58409,7 @@ /***/ }), -/* 823 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) { var dP = __webpack_require__(__webpack_module_template_argument_0__); @@ -57695,7 +58423,7 @@ /***/ }), -/* 824 */ +/* 844 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) { var anObject = __webpack_require__(__webpack_module_template_argument_0__); @@ -57717,7 +58445,7 @@ /***/ }), -/* 825 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { var isObject = __webpack_require__(__webpack_module_template_argument_0__); @@ -57728,7 +58456,7 @@ /***/ }), -/* 826 */ +/* 846 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) { module.exports = !__webpack_require__(__webpack_module_template_argument_0__) && !__webpack_require__(__webpack_module_template_argument_1__)(function () { @@ -57737,7 +58465,7 @@ /***/ }), -/* 827 */ +/* 847 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { var isObject = __webpack_require__(__webpack_module_template_argument_0__); @@ -57750,7 +58478,7 @@ /***/ }), -/* 828 */ +/* 848 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { // 7.1.1 ToPrimitive(input [, PreferredType]) @@ -57768,7 +58496,7 @@ /***/ }), -/* 829 */ +/* 849 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { // optional / simple context binding @@ -57794,7 +58522,7 @@ /***/ }), -/* 830 */ +/* 850 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) { var META = __webpack_require__(__webpack_module_template_argument_0__)('meta'); @@ -57853,7 +58581,7 @@ /***/ }), -/* 831 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { var global = __webpack_require__(__webpack_module_template_argument_0__); @@ -57865,7 +58593,7 @@ /***/ }), -/* 832 */ +/* 852 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) { var def = __webpack_require__(__webpack_module_template_argument_0__).f; @@ -57878,7 +58606,7 @@ /***/ }), -/* 833 */ +/* 853 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) { var store = __webpack_require__(__webpack_module_template_argument_0__)('wks'); @@ -57895,14 +58623,14 @@ /***/ }), -/* 834 */ +/* 854 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { exports.f = __webpack_require__(__webpack_module_template_argument_0__); /***/ }), -/* 835 */ +/* 855 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) { var global = __webpack_require__(__webpack_module_template_argument_0__); @@ -57917,7 +58645,7 @@ /***/ }), -/* 836 */ +/* 856 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) { // all enumerable object keys, includes symbols @@ -57938,7 +58666,7 @@ /***/ }), -/* 837 */ +/* 857 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) @@ -57951,7 +58679,7 @@ /***/ }), -/* 838 */ +/* 858 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) { var has = __webpack_require__(__webpack_module_template_argument_0__); @@ -57974,7 +58702,7 @@ /***/ }), -/* 839 */ +/* 859 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { // to indexed object, toObject with fallback for non-array-like ES3 strings @@ -57986,7 +58714,7 @@ /***/ }), -/* 840 */ +/* 860 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings @@ -57998,7 +58726,7 @@ /***/ }), -/* 841 */ +/* 861 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) { // false -> Array#indexOf @@ -58027,7 +58755,7 @@ /***/ }), -/* 842 */ +/* 862 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { // 7.1.15 ToLength @@ -58039,7 +58767,7 @@ /***/ }), -/* 843 */ +/* 863 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { var toInteger = __webpack_require__(__webpack_module_template_argument_0__); @@ -58052,7 +58780,7 @@ /***/ }), -/* 844 */ +/* 864 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { var shared = __webpack_require__(__webpack_module_template_argument_0__)('keys'); @@ -58063,7 +58791,7 @@ /***/ }), -/* 845 */ +/* 865 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { // 7.2.2 IsArray(argument) @@ -58074,7 +58802,7 @@ /***/ }), -/* 846 */ +/* 866 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) @@ -58121,7 +58849,7 @@ /***/ }), -/* 847 */ +/* 867 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) { var dP = __webpack_require__(__webpack_module_template_argument_0__); @@ -58140,7 +58868,7 @@ /***/ }), -/* 848 */ +/* 868 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { var document = __webpack_require__(__webpack_module_template_argument_0__).document; @@ -58148,7 +58876,7 @@ /***/ }), -/* 849 */ +/* 869 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window @@ -58173,7 +58901,7 @@ /***/ }), -/* 850 */ +/* 870 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) @@ -58186,7 +58914,7 @@ /***/ }), -/* 851 */ +/* 871 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__) { var pIE = __webpack_require__(__webpack_module_template_argument_0__); @@ -58208,7 +58936,7 @@ /***/ }), -/* 852 */ +/* 872 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { var $export = __webpack_require__(__webpack_module_template_argument_0__); @@ -58217,7 +58945,7 @@ /***/ }), -/* 853 */ +/* 873 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { // 7.1.13 ToObject(argument) @@ -58228,7 +58956,7 @@ /***/ }), -/* 854 */ +/* 874 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) @@ -58247,7 +58975,7 @@ /***/ }), -/* 855 */ +/* 875 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { // 19.1.3.1 Object.assign(target, source) @@ -58257,7 +58985,7 @@ /***/ }), -/* 856 */ +/* 876 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__) { 'use strict'; @@ -58297,7 +59025,7 @@ /***/ }), -/* 857 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) @@ -58306,7 +59034,7 @@ /***/ }), -/* 858 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__) { // Works with __proto__ only. Old v8 can't work with null proto objects. @@ -58337,7 +59065,7 @@ /***/ }), -/* 859 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { 'use strict'; @@ -58360,7 +59088,7 @@ /***/ }), -/* 860 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__) { var toInteger = __webpack_require__(__webpack_module_template_argument_0__); @@ -58383,7 +59111,7 @@ /***/ }), -/* 861 */ +/* 881 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__, __webpack_module_template_argument_5__, __webpack_module_template_argument_6__, __webpack_module_template_argument_7__, __webpack_module_template_argument_8__, __webpack_module_template_argument_9__) { 'use strict'; @@ -58459,7 +59187,7 @@ /***/ }), -/* 862 */ +/* 882 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) { 'use strict'; @@ -58478,7 +59206,7 @@ /***/ }), -/* 863 */ +/* 883 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__, __webpack_module_template_argument_3__, __webpack_module_template_argument_4__) { 'use strict'; @@ -58518,21 +59246,21 @@ /***/ }), -/* 864 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { __webpack_require__(__webpack_module_template_argument_0__)('asyncIterator'); /***/ }), -/* 865 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { __webpack_require__(__webpack_module_template_argument_0__)('observable'); /***/ }), -/* 866 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { /** @@ -58566,7 +59294,7 @@ /***/ }), -/* 867 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__, __webpack_module_template_argument_0__, __webpack_module_template_argument_1__, __webpack_module_template_argument_2__) { /** diff --git a/packages/react-datepicker/src/month.jsx b/packages/react-datepicker/src/month.jsx index d1ebe092c6c..484bd286394 100644 --- a/packages/react-datepicker/src/month.jsx +++ b/packages/react-datepicker/src/month.jsx @@ -75,16 +75,9 @@ export default class Month extends React.Component { } }; - onBlur = () => { - if (this.props.accessibleMode) { - this.setState({ readInstructions: false }); - } - }; - onInputKeyDown = event => { const eventKey = event.key; - // `preSelection` can be `null` but `day` is required. Use it as a fallback if necessary for invalid entries. - const copy = this.props.preSelection ? utils.newDate(this.props.preSelection) : utils.newDate(this.props.day); + const copy = utils.newDate(this.props.preSelection); let newSelection; switch (eventKey) { case "ArrowLeft": @@ -114,7 +107,7 @@ export default class Month extends React.Component { case " ": case "Enter": event.preventDefault(); - this.handleDayClick(copy, event); + this.handleDayClick(this.props.preSelection, event); break; } if (!newSelection) return; // Let the input component handle this keydown @@ -216,8 +209,8 @@ export default class Month extends React.Component { You are focused on a calendar. Use the arrow keys to navigate the days in the month. Use the page up and down keys to navigate from month to month. Use the home and end keys to navigate from year to year. - {this.props.preSelection ? `${utils.formatDate(this.props.preSelection, this.dayFormat)} is the - currently focused date.` : `No date is currently focused.`} + {utils.formatDate(this.props.preSelection, this.dayFormat)} is the + currently focused date.

); } @@ -231,7 +224,6 @@ export default class Month extends React.Component { tabIndex={this.props.accessibleMode ? 0 : -1} onKeyDown={this.onInputKeyDown} onFocus={this.onFocus} - onBlur={this.onBlur} > {screenReaderInstructions} diff --git a/packages/react-datepicker/src/time.jsx b/packages/react-datepicker/src/time.jsx index c0b32a0c9a4..9e098d268bc 100644 --- a/packages/react-datepicker/src/time.jsx +++ b/packages/react-datepicker/src/time.jsx @@ -151,7 +151,7 @@ export default class Time extends React.Component { onBlur = () => { if (this.props.accessibleMode) { - this.setState({ readInstructions: false, isFocused: false }); + this.setState({ isFocused: false }); } }; @@ -316,8 +316,8 @@ export default class Time extends React.Component {

You are a in a time selector. Use the up and down keys to select from other common times then press enter to confirm. - {this.state.preSelection ? `${formatDate(this.state.preSelection, this.timeFormat)} is currently - focused.`: `No time is currently focused.`} + {formatDate(this.state.preSelection, this.timeFormat)} is currently + focused.

); } diff --git a/src/components/date_picker/super_date_picker/date_popover/absolute_tab.tsx b/src/components/date_picker/super_date_picker/date_popover/absolute_tab.tsx index 320557bdd4a..03e12c4ae97 100644 --- a/src/components/date_picker/super_date_picker/date_popover/absolute_tab.tsx +++ b/src/components/date_picker/super_date_picker/date_popover/absolute_tab.tsx @@ -100,7 +100,7 @@ export class EuiAbsoluteTab extends Component< onChange(valueAsMoment.toISOString(), event); } this.setState({ - textInputValue: event.target.value, + textInputValue: event.target.value as string, isTextInvalid: !dateIsValid, valueAsMoment: dateIsValid ? valueAsMoment : null, });