@birdnet/advanced-react-dates 0.0.0-stage → 1.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.
Files changed (267) hide show
  1. package/.babelrc +67 -0
  2. package/.eslintrc +66 -0
  3. package/.nvmrc +1 -0
  4. package/.nyc_output/4d8efcd220c2aec1f2b4ffd49d875001.json +1 -0
  5. package/.nyc_output/66d34779498a5d49bcf9d757dfc7fdb5.json +1 -0
  6. package/.nyc_output/8ca7e04140934515928bc7d4ae476b73.json +1 -0
  7. package/.nyc_output/afc270bb597bfc50e690436959c2ae54.json +1 -0
  8. package/.nycrc +19 -0
  9. package/.travis.yml +13 -0
  10. package/CHANGELOG.md +665 -0
  11. package/CLAUDE.md +56 -0
  12. package/INTHEWILD.md +9 -0
  13. package/LICENSE +21 -0
  14. package/README.md +421 -2
  15. package/constants.js +2 -0
  16. package/esm/components/CalendarDay.js +321 -0
  17. package/esm/components/CalendarIcon.js +11 -0
  18. package/esm/components/CalendarMonth.js +254 -0
  19. package/esm/components/CalendarMonthGrid.js +365 -0
  20. package/esm/components/CalendarWeek.js +11 -0
  21. package/esm/components/ChevronDown.js +11 -0
  22. package/esm/components/ChevronUp.js +11 -0
  23. package/esm/components/CloseButton.js +12 -0
  24. package/esm/components/CustomizableCalendarDay.js +341 -0
  25. package/esm/components/DateInput.js +344 -0
  26. package/esm/components/DateRangePicker.js +647 -0
  27. package/esm/components/DateRangePickerInput.js +341 -0
  28. package/esm/components/DateRangePickerInputController.js +348 -0
  29. package/esm/components/DayPicker.js +1167 -0
  30. package/esm/components/DayPickerKeyboardShortcuts.js +364 -0
  31. package/esm/components/DayPickerNavigation.js +314 -0
  32. package/esm/components/DayPickerRangeController.js +1202 -0
  33. package/esm/components/DayPickerSingleDateController.js +690 -0
  34. package/esm/components/KeyboardShortcutRow.js +69 -0
  35. package/esm/components/LeftArrow.js +11 -0
  36. package/esm/components/RightArrow.js +11 -0
  37. package/esm/components/SingleDatePicker.js +605 -0
  38. package/esm/components/SingleDatePickerInput.js +264 -0
  39. package/esm/components/SingleDatePickerInputController.js +260 -0
  40. package/esm/constants.js +28 -0
  41. package/esm/defaultPhrases.js +225 -0
  42. package/esm/index.js +20 -0
  43. package/esm/initialize.js +2 -0
  44. package/esm/shapes/AnchorDirectionShape.js +3 -0
  45. package/esm/shapes/CalendarInfoPositionShape.js +3 -0
  46. package/esm/shapes/DateRangePickerShape.js +101 -0
  47. package/esm/shapes/DayOfWeekShape.js +3 -0
  48. package/esm/shapes/DisabledShape.js +3 -0
  49. package/esm/shapes/FocusedInputShape.js +3 -0
  50. package/esm/shapes/IconPositionShape.js +3 -0
  51. package/esm/shapes/ModifiersShape.js +18 -0
  52. package/esm/shapes/NavPositionShape.js +3 -0
  53. package/esm/shapes/OpenDirectionShape.js +3 -0
  54. package/esm/shapes/OrientationShape.js +3 -0
  55. package/esm/shapes/ScrollableOrientationShape.js +3 -0
  56. package/esm/shapes/SingleDatePickerShape.js +90 -0
  57. package/esm/theme/DefaultTheme.js +176 -0
  58. package/esm/utils/calculateDimension.js +28 -0
  59. package/esm/utils/disableScroll.js +67 -0
  60. package/esm/utils/getActiveElement.js +3 -0
  61. package/esm/utils/getCalendarDaySettings.js +48 -0
  62. package/esm/utils/getCalendarMonthWeeks.js +37 -0
  63. package/esm/utils/getCalendarMonthWidth.js +4 -0
  64. package/esm/utils/getDetachedContainerStyles.js +36 -0
  65. package/esm/utils/getInputHeight.js +42 -0
  66. package/esm/utils/getNumberOfCalendarMonthWeeks.js +11 -0
  67. package/esm/utils/getPhrase.js +7 -0
  68. package/esm/utils/getPhrasePropTypes.js +9 -0
  69. package/esm/utils/getPooledMoment.js +8 -0
  70. package/esm/utils/getPreviousMonthMemoLast.js +9 -0
  71. package/esm/utils/getResponsiveContainerStyles.js +8 -0
  72. package/esm/utils/getSelectedDateOffset.js +8 -0
  73. package/esm/utils/getTransformStyles.js +8 -0
  74. package/esm/utils/getVisibleDays.js +42 -0
  75. package/esm/utils/isAfterDay.js +7 -0
  76. package/esm/utils/isBeforeDay.js +13 -0
  77. package/esm/utils/isDayVisible.js +38 -0
  78. package/esm/utils/isInclusivelyAfterDay.js +6 -0
  79. package/esm/utils/isInclusivelyBeforeDay.js +6 -0
  80. package/esm/utils/isNextDay.js +7 -0
  81. package/esm/utils/isNextMonth.js +6 -0
  82. package/esm/utils/isPrevMonth.js +6 -0
  83. package/esm/utils/isPreviousDay.js +7 -0
  84. package/esm/utils/isSameDay.js +7 -0
  85. package/esm/utils/isSameMonth.js +7 -0
  86. package/esm/utils/isTransitionEndSupported.js +3 -0
  87. package/esm/utils/modifiers.js +94 -0
  88. package/esm/utils/noflip.js +10 -0
  89. package/esm/utils/registerCSSInterfaceWithDefaultTheme.js +5 -0
  90. package/esm/utils/registerInterfaceWithDefaultTheme.js +6 -0
  91. package/esm/utils/toISODateString.js +12 -0
  92. package/esm/utils/toISOMonthString.js +12 -0
  93. package/esm/utils/toLocalizedDateString.js +8 -0
  94. package/esm/utils/toMomentObject.js +7 -0
  95. package/index.js +2 -0
  96. package/initialize.js +2 -0
  97. package/karma.conf.js +82 -0
  98. package/lib/components/CalendarDay.js +327 -0
  99. package/lib/components/CalendarIcon.js +18 -0
  100. package/lib/components/CalendarMonth.js +259 -0
  101. package/lib/components/CalendarMonthGrid.js +372 -0
  102. package/lib/components/CalendarWeek.js +18 -0
  103. package/lib/components/ChevronDown.js +18 -0
  104. package/lib/components/ChevronUp.js +18 -0
  105. package/lib/components/CloseButton.js +19 -0
  106. package/lib/components/CustomizableCalendarDay.js +347 -0
  107. package/lib/components/DateInput.js +351 -0
  108. package/lib/components/DateRangePicker.js +653 -0
  109. package/lib/components/DateRangePickerInput.js +348 -0
  110. package/lib/components/DateRangePickerInputController.js +354 -0
  111. package/lib/components/DayPicker.js +1175 -0
  112. package/lib/components/DayPickerKeyboardShortcuts.js +371 -0
  113. package/lib/components/DayPickerNavigation.js +321 -0
  114. package/lib/components/DayPickerRangeController.js +1208 -0
  115. package/lib/components/DayPickerSingleDateController.js +695 -0
  116. package/lib/components/KeyboardShortcutRow.js +76 -0
  117. package/lib/components/LeftArrow.js +18 -0
  118. package/lib/components/RightArrow.js +18 -0
  119. package/lib/components/SingleDatePicker.js +611 -0
  120. package/lib/components/SingleDatePickerInput.js +271 -0
  121. package/lib/components/SingleDatePickerInputController.js +266 -0
  122. package/lib/constants.js +34 -0
  123. package/lib/css/_datepicker.css +886 -0
  124. package/lib/defaultPhrases.js +231 -0
  125. package/lib/index.js +146 -0
  126. package/lib/initialize.js +5 -0
  127. package/lib/shapes/AnchorDirectionShape.js +10 -0
  128. package/lib/shapes/CalendarInfoPositionShape.js +10 -0
  129. package/lib/shapes/DateRangePickerShape.js +108 -0
  130. package/lib/shapes/DayOfWeekShape.js +10 -0
  131. package/lib/shapes/DisabledShape.js +10 -0
  132. package/lib/shapes/FocusedInputShape.js +10 -0
  133. package/lib/shapes/IconPositionShape.js +10 -0
  134. package/lib/shapes/ModifiersShape.js +25 -0
  135. package/lib/shapes/NavPositionShape.js +10 -0
  136. package/lib/shapes/OpenDirectionShape.js +10 -0
  137. package/lib/shapes/OrientationShape.js +10 -0
  138. package/lib/shapes/ScrollableOrientationShape.js +10 -0
  139. package/lib/shapes/SingleDatePickerShape.js +97 -0
  140. package/lib/theme/DefaultTheme.js +182 -0
  141. package/lib/utils/calculateDimension.js +34 -0
  142. package/lib/utils/disableScroll.js +75 -0
  143. package/lib/utils/getActiveElement.js +9 -0
  144. package/lib/utils/getCalendarDaySettings.js +55 -0
  145. package/lib/utils/getCalendarMonthWeeks.js +44 -0
  146. package/lib/utils/getCalendarMonthWidth.js +10 -0
  147. package/lib/utils/getDetachedContainerStyles.js +41 -0
  148. package/lib/utils/getInputHeight.js +48 -0
  149. package/lib/utils/getNumberOfCalendarMonthWeeks.js +18 -0
  150. package/lib/utils/getPhrase.js +13 -0
  151. package/lib/utils/getPhrasePropTypes.js +16 -0
  152. package/lib/utils/getPooledMoment.js +15 -0
  153. package/lib/utils/getPreviousMonthMemoLast.js +15 -0
  154. package/lib/utils/getResponsiveContainerStyles.js +15 -0
  155. package/lib/utils/getSelectedDateOffset.js +14 -0
  156. package/lib/utils/getTransformStyles.js +14 -0
  157. package/lib/utils/getVisibleDays.js +49 -0
  158. package/lib/utils/isAfterDay.js +14 -0
  159. package/lib/utils/isBeforeDay.js +20 -0
  160. package/lib/utils/isDayVisible.js +45 -0
  161. package/lib/utils/isInclusivelyAfterDay.js +13 -0
  162. package/lib/utils/isInclusivelyBeforeDay.js +13 -0
  163. package/lib/utils/isNextDay.js +14 -0
  164. package/lib/utils/isNextMonth.js +13 -0
  165. package/lib/utils/isPrevMonth.js +13 -0
  166. package/lib/utils/isPreviousDay.js +14 -0
  167. package/lib/utils/isSameDay.js +14 -0
  168. package/lib/utils/isSameMonth.js +14 -0
  169. package/lib/utils/isTransitionEndSupported.js +9 -0
  170. package/lib/utils/modifiers.js +102 -0
  171. package/lib/utils/noflip.js +16 -0
  172. package/lib/utils/registerCSSInterfaceWithDefaultTheme.js +12 -0
  173. package/lib/utils/registerInterfaceWithDefaultTheme.js +13 -0
  174. package/lib/utils/toISODateString.js +19 -0
  175. package/lib/utils/toISOMonthString.js +19 -0
  176. package/lib/utils/toLocalizedDateString.js +15 -0
  177. package/lib/utils/toMomentObject.js +14 -0
  178. package/package.json +141 -4
  179. package/scripts/.eslintrc +7 -0
  180. package/scripts/buildCSS.js +37 -0
  181. package/scripts/pure-component-fallback.js +70 -0
  182. package/scripts/renderAllComponents.jsx +25 -0
  183. package/src/components/CalendarDay.jsx +366 -0
  184. package/src/components/CalendarIcon.jsx +3 -0
  185. package/src/components/CalendarMonth.jsx +300 -0
  186. package/src/components/CalendarMonthGrid.jsx +427 -0
  187. package/src/components/CalendarWeek.jsx +17 -0
  188. package/src/components/ChevronDown.jsx +3 -0
  189. package/src/components/ChevronUp.jsx +3 -0
  190. package/src/components/CloseButton.jsx +3 -0
  191. package/src/components/CustomizableCalendarDay.jsx +382 -0
  192. package/src/components/DateInput.jsx +401 -0
  193. package/src/components/DateRangePicker.jsx +777 -0
  194. package/src/components/DateRangePickerInput.jsx +434 -0
  195. package/src/components/DateRangePickerInputController.jsx +379 -0
  196. package/src/components/DayPicker.jsx +1407 -0
  197. package/src/components/DayPickerKeyboardShortcuts.jsx +443 -0
  198. package/src/components/DayPickerNavigation.jsx +445 -0
  199. package/src/components/DayPickerRangeController.jsx +1409 -0
  200. package/src/components/DayPickerSingleDateController.jsx +769 -0
  201. package/src/components/KeyboardShortcutRow.jsx +93 -0
  202. package/src/components/LeftArrow.jsx +3 -0
  203. package/src/components/RightArrow.jsx +3 -0
  204. package/src/components/SingleDatePicker.jsx +731 -0
  205. package/src/components/SingleDatePickerInput.jsx +329 -0
  206. package/src/components/SingleDatePickerInputController.jsx +280 -0
  207. package/src/constants.js +37 -0
  208. package/src/defaultPhrases.js +215 -0
  209. package/src/index.js +20 -0
  210. package/src/initialize.js +3 -0
  211. package/src/shapes/AnchorDirectionShape.js +8 -0
  212. package/src/shapes/CalendarInfoPositionShape.js +15 -0
  213. package/src/shapes/DateRangePickerShape.js +111 -0
  214. package/src/shapes/DayOfWeekShape.js +5 -0
  215. package/src/shapes/DisabledShape.js +5 -0
  216. package/src/shapes/FocusedInputShape.js +8 -0
  217. package/src/shapes/IconPositionShape.js +8 -0
  218. package/src/shapes/ModifiersShape.js +20 -0
  219. package/src/shapes/NavPositionShape.js +8 -0
  220. package/src/shapes/OpenDirectionShape.js +8 -0
  221. package/src/shapes/OrientationShape.js +8 -0
  222. package/src/shapes/ScrollableOrientationShape.js +13 -0
  223. package/src/shapes/SingleDatePickerShape.js +100 -0
  224. package/src/svg/arrow-left.svg +1 -0
  225. package/src/svg/arrow-right.svg +1 -0
  226. package/src/svg/calendar.svg +1 -0
  227. package/src/svg/chevron-down.svg +1 -0
  228. package/src/svg/chevron-up.svg +1 -0
  229. package/src/svg/close.svg +1 -0
  230. package/src/theme/DefaultTheme.js +196 -0
  231. package/src/utils/calculateDimension.js +32 -0
  232. package/src/utils/disableScroll.js +65 -0
  233. package/src/utils/getActiveElement.js +3 -0
  234. package/src/utils/getCalendarDaySettings.js +61 -0
  235. package/src/utils/getCalendarMonthWeeks.js +49 -0
  236. package/src/utils/getCalendarMonthWidth.js +3 -0
  237. package/src/utils/getDetachedContainerStyles.js +39 -0
  238. package/src/utils/getInputHeight.js +67 -0
  239. package/src/utils/getNumberOfCalendarMonthWeeks.js +15 -0
  240. package/src/utils/getPhrase.jsx +9 -0
  241. package/src/utils/getPhrasePropTypes.js +9 -0
  242. package/src/utils/getPooledMoment.js +10 -0
  243. package/src/utils/getPreviousMonthMemoLast.js +11 -0
  244. package/src/utils/getResponsiveContainerStyles.js +18 -0
  245. package/src/utils/getSelectedDateOffset.js +6 -0
  246. package/src/utils/getTransformStyles.js +8 -0
  247. package/src/utils/getVisibleDays.js +54 -0
  248. package/src/utils/isAfterDay.js +9 -0
  249. package/src/utils/isBeforeDay.js +18 -0
  250. package/src/utils/isDayVisible.js +57 -0
  251. package/src/utils/isInclusivelyAfterDay.js +8 -0
  252. package/src/utils/isInclusivelyBeforeDay.js +8 -0
  253. package/src/utils/isNextDay.js +9 -0
  254. package/src/utils/isNextMonth.js +8 -0
  255. package/src/utils/isPrevMonth.js +8 -0
  256. package/src/utils/isPreviousDay.js +9 -0
  257. package/src/utils/isSameDay.js +10 -0
  258. package/src/utils/isSameMonth.js +9 -0
  259. package/src/utils/isTransitionEndSupported.js +3 -0
  260. package/src/utils/modifiers.js +116 -0
  261. package/src/utils/noflip.js +11 -0
  262. package/src/utils/registerCSSInterfaceWithDefaultTheme.js +7 -0
  263. package/src/utils/registerInterfaceWithDefaultTheme.js +7 -0
  264. package/src/utils/toISODateString.js +14 -0
  265. package/src/utils/toISOMonthString.js +14 -0
  266. package/src/utils/toLocalizedDateString.js +12 -0
  267. package/src/utils/toMomentObject.js +12 -0
@@ -0,0 +1,611 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = exports.PureSingleDatePicker = void 0;
8
+ var _enzymeShallowEqual = _interopRequireDefault(require("enzyme-shallow-equal"));
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
11
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
+ var _react = _interopRequireDefault(require("react"));
13
+ var _moment = _interopRequireDefault(require("moment"));
14
+ var _reactWithStyles = require("react-with-styles");
15
+ var _reactPortal = require("react-portal");
16
+ var _airbnbPropTypes = require("airbnb-prop-types");
17
+ var _consolidatedEvents = require("consolidated-events");
18
+ var _isTouchDevice = _interopRequireDefault(require("is-touch-device"));
19
+ var _reactOutsideClickHandler = _interopRequireDefault(require("react-outside-click-handler"));
20
+ var _color2k = require("color2k");
21
+ var _SingleDatePickerShape = _interopRequireDefault(require("../shapes/SingleDatePickerShape"));
22
+ var _defaultPhrases = require("../defaultPhrases");
23
+ var _getResponsiveContainerStyles = _interopRequireDefault(require("../utils/getResponsiveContainerStyles"));
24
+ var _getDetachedContainerStyles = _interopRequireDefault(require("../utils/getDetachedContainerStyles"));
25
+ var _getInputHeight = _interopRequireDefault(require("../utils/getInputHeight"));
26
+ var _isInclusivelyAfterDay = _interopRequireDefault(require("../utils/isInclusivelyAfterDay"));
27
+ var _disableScroll2 = _interopRequireDefault(require("../utils/disableScroll"));
28
+ var _noflip = _interopRequireDefault(require("../utils/noflip"));
29
+ var _SingleDatePickerInputController = _interopRequireDefault(require("./SingleDatePickerInputController"));
30
+ var _DayPickerSingleDateController = _interopRequireDefault(require("./DayPickerSingleDateController"));
31
+ var _CloseButton = _interopRequireDefault(require("./CloseButton"));
32
+ var _constants = require("../constants");
33
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
34
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
35
+ var propTypes = process.env.NODE_ENV !== "production" ? (0, _airbnbPropTypes.forbidExtraProps)(_objectSpread(_objectSpread({}, _reactWithStyles.withStylesPropTypes), _SingleDatePickerShape["default"])) : {};
36
+ var defaultProps = {
37
+ // required props for a functional interactive SingleDatePicker
38
+ date: null,
39
+ focused: false,
40
+ minDate: null,
41
+ maxDate: null,
42
+ // input related props
43
+ id: 'date',
44
+ placeholder: 'Date',
45
+ ariaLabel: undefined,
46
+ autoComplete: 'off',
47
+ titleText: undefined,
48
+ disabled: false,
49
+ required: false,
50
+ readOnly: false,
51
+ screenReaderInputMessage: '',
52
+ showClearDate: false,
53
+ showDefaultInputIcon: false,
54
+ inputIconPosition: _constants.ICON_BEFORE_POSITION,
55
+ customInputIcon: null,
56
+ customCloseIcon: null,
57
+ noBorder: false,
58
+ block: false,
59
+ small: false,
60
+ regular: false,
61
+ verticalSpacing: _constants.DEFAULT_VERTICAL_SPACING,
62
+ keepFocusOnInput: false,
63
+ // calendar presentation and interaction related props
64
+ orientation: _constants.HORIZONTAL_ORIENTATION,
65
+ anchorDirection: _constants.ANCHOR_LEFT,
66
+ openDirection: _constants.OPEN_DOWN,
67
+ horizontalMargin: 0,
68
+ withPortal: false,
69
+ withFullScreenPortal: false,
70
+ appendToBody: false,
71
+ disableScroll: false,
72
+ initialVisibleMonth: null,
73
+ firstDayOfWeek: null,
74
+ numberOfMonths: 2,
75
+ keepOpenOnDateSelect: false,
76
+ reopenPickerOnClearDate: false,
77
+ renderCalendarInfo: null,
78
+ calendarInfoPosition: _constants.INFO_POSITION_BOTTOM,
79
+ hideKeyboardShortcutsPanel: false,
80
+ daySize: _constants.DAY_SIZE,
81
+ isRTL: false,
82
+ verticalHeight: null,
83
+ transitionDuration: undefined,
84
+ horizontalMonthPadding: 13,
85
+ // navigation related props
86
+ dayPickerNavigationInlineStyles: null,
87
+ navPosition: _constants.NAV_POSITION_TOP,
88
+ navPrev: null,
89
+ navNext: null,
90
+ renderNavPrevButton: null,
91
+ renderNavNextButton: null,
92
+ onPrevMonthClick: function onPrevMonthClick() {},
93
+ onNextMonthClick: function onNextMonthClick() {},
94
+ onClose: function onClose() {},
95
+ // month presentation and interaction related props
96
+ renderMonthText: null,
97
+ renderWeekHeaderElement: null,
98
+ // day presentation and interaction related props
99
+ renderCalendarDay: undefined,
100
+ renderDayContents: null,
101
+ renderMonthElement: null,
102
+ enableOutsideDays: false,
103
+ isDayBlocked: function isDayBlocked() {
104
+ return false;
105
+ },
106
+ isOutsideRange: function isOutsideRange(day) {
107
+ return !(0, _isInclusivelyAfterDay["default"])(day, (0, _moment["default"])());
108
+ },
109
+ isDayHighlighted: function isDayHighlighted() {},
110
+ // internationalization props
111
+ displayFormat: function displayFormat() {
112
+ return _moment["default"].localeData().longDateFormat('L');
113
+ },
114
+ monthFormat: 'MMMM YYYY',
115
+ weekDayFormat: 'dd',
116
+ phrases: _defaultPhrases.SingleDatePickerPhrases,
117
+ dayAriaLabelFormat: undefined
118
+ };
119
+ var SingleDatePicker = exports.PureSingleDatePicker = /*#__PURE__*/function (_ref2, _ref) {
120
+ function SingleDatePicker(props) {
121
+ var _this;
122
+ _this = _ref2.call(this, props) || this;
123
+ _this.isTouchDevice = false;
124
+ _this.state = {
125
+ dayPickerContainerStyles: {},
126
+ isDayPickerFocused: false,
127
+ isInputFocused: false,
128
+ showKeyboardShortcuts: false
129
+ };
130
+ _this.onFocusOut = _this.onFocusOut.bind(_this);
131
+ _this.onOutsideClick = _this.onOutsideClick.bind(_this);
132
+ _this.onInputFocus = _this.onInputFocus.bind(_this);
133
+ _this.onDayPickerFocus = _this.onDayPickerFocus.bind(_this);
134
+ _this.onDayPickerBlur = _this.onDayPickerBlur.bind(_this);
135
+ _this.showKeyboardShortcutsPanel = _this.showKeyboardShortcutsPanel.bind(_this);
136
+ _this.responsivizePickerPosition = _this.responsivizePickerPosition.bind(_this);
137
+ _this.disableScroll = _this.disableScroll.bind(_this);
138
+ _this.setDayPickerContainerRef = _this.setDayPickerContainerRef.bind(_this);
139
+ _this.setContainerRef = _this.setContainerRef.bind(_this);
140
+ return _this;
141
+ }
142
+
143
+ /* istanbul ignore next */
144
+ (0, _inheritsLoose2["default"])(SingleDatePicker, _ref2);
145
+ var _proto = SingleDatePicker.prototype;
146
+ _proto[_ref] = function (nextProps, nextState) {
147
+ return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState);
148
+ };
149
+ _proto.componentDidMount = function componentDidMount() {
150
+ this.removeResizeEventListener = (0, _consolidatedEvents.addEventListener)(window, 'resize', this.responsivizePickerPosition, {
151
+ passive: true
152
+ });
153
+ this.responsivizePickerPosition();
154
+ this.disableScroll();
155
+ var focused = this.props.focused;
156
+ if (focused) {
157
+ this.setState({
158
+ isInputFocused: true
159
+ });
160
+ }
161
+ this.isTouchDevice = (0, _isTouchDevice["default"])();
162
+ };
163
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
164
+ var focused = this.props.focused;
165
+ if (!prevProps.focused && focused) {
166
+ this.responsivizePickerPosition();
167
+ this.disableScroll();
168
+ } else if (prevProps.focused && !focused) {
169
+ if (this.enableScroll) this.enableScroll();
170
+ }
171
+ }
172
+
173
+ /* istanbul ignore next */;
174
+ _proto.componentWillUnmount = function componentWillUnmount() {
175
+ if (this.removeResizeEventListener) this.removeResizeEventListener();
176
+ if (this.removeFocusOutEventListener) this.removeFocusOutEventListener();
177
+ if (this.enableScroll) this.enableScroll();
178
+ };
179
+ _proto.onOutsideClick = function onOutsideClick(event) {
180
+ var _this$props = this.props,
181
+ focused = _this$props.focused,
182
+ onFocusChange = _this$props.onFocusChange,
183
+ onClose = _this$props.onClose,
184
+ date = _this$props.date,
185
+ appendToBody = _this$props.appendToBody;
186
+ if (!focused) return;
187
+ if (appendToBody && this.dayPickerContainer.contains(event.target)) return;
188
+ this.setState({
189
+ isInputFocused: false,
190
+ isDayPickerFocused: false,
191
+ showKeyboardShortcuts: false
192
+ });
193
+ onFocusChange({
194
+ focused: false
195
+ });
196
+ onClose({
197
+ date: date
198
+ });
199
+ };
200
+ _proto.onInputFocus = function onInputFocus(_ref3) {
201
+ var focused = _ref3.focused;
202
+ var _this$props2 = this.props,
203
+ onFocusChange = _this$props2.onFocusChange,
204
+ readOnly = _this$props2.readOnly,
205
+ withPortal = _this$props2.withPortal,
206
+ withFullScreenPortal = _this$props2.withFullScreenPortal,
207
+ keepFocusOnInput = _this$props2.keepFocusOnInput;
208
+ if (focused) {
209
+ var withAnyPortal = withPortal || withFullScreenPortal;
210
+ var moveFocusToDayPicker = withAnyPortal || readOnly && !keepFocusOnInput || this.isTouchDevice && !keepFocusOnInput;
211
+ if (moveFocusToDayPicker) {
212
+ this.onDayPickerFocus();
213
+ } else {
214
+ this.onDayPickerBlur();
215
+ }
216
+ }
217
+ onFocusChange({
218
+ focused: focused
219
+ });
220
+ };
221
+ _proto.onDayPickerFocus = function onDayPickerFocus() {
222
+ this.setState({
223
+ isInputFocused: false,
224
+ isDayPickerFocused: true,
225
+ showKeyboardShortcuts: false
226
+ });
227
+ };
228
+ _proto.onDayPickerBlur = function onDayPickerBlur() {
229
+ this.setState({
230
+ isInputFocused: true,
231
+ isDayPickerFocused: false,
232
+ showKeyboardShortcuts: false
233
+ });
234
+ };
235
+ _proto.onFocusOut = function onFocusOut(e) {
236
+ var onFocusChange = this.props.onFocusChange;
237
+ // In cases where **relatedTarget** is not null, it points to the right
238
+ // element here. However, in cases where it is null (such as clicking on a
239
+ // specific day) or it is **document.body** (IE11), the appropriate value is **event.target**.
240
+ //
241
+ // We handle both situations here by using the ` || ` operator to fallback
242
+ // to *event.target** when **relatedTarget** is not provided.
243
+ var relatedTarget = e.relatedTarget === document.body ? e.target : e.relatedTarget || e.target;
244
+ if (this.dayPickerContainer.contains(relatedTarget)) return;
245
+ onFocusChange({
246
+ focused: false
247
+ });
248
+ };
249
+ _proto.setDayPickerContainerRef = function setDayPickerContainerRef(ref) {
250
+ if (ref === this.dayPickerContainer) return;
251
+ this.removeEventListeners();
252
+ this.dayPickerContainer = ref;
253
+ if (!ref) return;
254
+ this.addEventListeners();
255
+ };
256
+ _proto.setContainerRef = function setContainerRef(ref) {
257
+ this.container = ref;
258
+ };
259
+ _proto.addEventListeners = function addEventListeners() {
260
+ // We manually set event because React has not implemented onFocusIn/onFocusOut.
261
+ // Keep an eye on https://github.com/facebook/react/issues/6410 for updates
262
+ // We use "blur w/ useCapture param" vs "onfocusout" for FF browser support
263
+ this.removeFocusOutEventListener = (0, _consolidatedEvents.addEventListener)(this.dayPickerContainer, 'focusout', this.onFocusOut);
264
+ };
265
+ _proto.removeEventListeners = function removeEventListeners() {
266
+ if (this.removeFocusOutEventListener) this.removeFocusOutEventListener();
267
+ };
268
+ _proto.disableScroll = function disableScroll() {
269
+ var _this$props3 = this.props,
270
+ appendToBody = _this$props3.appendToBody,
271
+ propDisableScroll = _this$props3.disableScroll,
272
+ focused = _this$props3.focused;
273
+ if (!appendToBody && !propDisableScroll) return;
274
+ if (!focused) return;
275
+
276
+ // Disable scroll for every ancestor of this <SingleDatePicker> up to the
277
+ // document level. This ensures the input and the picker never move. Other
278
+ // sibling elements or the picker itself can scroll.
279
+ this.enableScroll = (0, _disableScroll2["default"])(this.container);
280
+ }
281
+
282
+ /* istanbul ignore next */;
283
+ _proto.responsivizePickerPosition = function responsivizePickerPosition() {
284
+ // It's possible the portal props have been changed in response to window resizes
285
+ // So let's ensure we reset this back to the base state each time
286
+ this.setState({
287
+ dayPickerContainerStyles: {}
288
+ });
289
+ var _this$props4 = this.props,
290
+ openDirection = _this$props4.openDirection,
291
+ anchorDirection = _this$props4.anchorDirection,
292
+ horizontalMargin = _this$props4.horizontalMargin,
293
+ withPortal = _this$props4.withPortal,
294
+ withFullScreenPortal = _this$props4.withFullScreenPortal,
295
+ appendToBody = _this$props4.appendToBody,
296
+ focused = _this$props4.focused;
297
+ var dayPickerContainerStyles = this.state.dayPickerContainerStyles;
298
+ if (!focused) {
299
+ return;
300
+ }
301
+ var isAnchoredLeft = anchorDirection === _constants.ANCHOR_LEFT;
302
+ if (!withPortal && !withFullScreenPortal) {
303
+ var containerRect = this.dayPickerContainer.getBoundingClientRect();
304
+ var currentOffset = dayPickerContainerStyles[anchorDirection] || 0;
305
+ var containerEdge = isAnchoredLeft ? containerRect[_constants.ANCHOR_RIGHT] : containerRect[_constants.ANCHOR_LEFT];
306
+ this.setState({
307
+ dayPickerContainerStyles: _objectSpread(_objectSpread({}, (0, _getResponsiveContainerStyles["default"])(anchorDirection, currentOffset, containerEdge, horizontalMargin)), appendToBody && (0, _getDetachedContainerStyles["default"])(openDirection, anchorDirection, this.container))
308
+ });
309
+ }
310
+ };
311
+ _proto.showKeyboardShortcutsPanel = function showKeyboardShortcutsPanel() {
312
+ this.setState({
313
+ isInputFocused: false,
314
+ isDayPickerFocused: true,
315
+ showKeyboardShortcuts: true
316
+ });
317
+ };
318
+ _proto.maybeRenderDayPickerWithPortal = function maybeRenderDayPickerWithPortal() {
319
+ var _this$props5 = this.props,
320
+ focused = _this$props5.focused,
321
+ withPortal = _this$props5.withPortal,
322
+ withFullScreenPortal = _this$props5.withFullScreenPortal,
323
+ appendToBody = _this$props5.appendToBody;
324
+ if (!focused) {
325
+ return null;
326
+ }
327
+ if (withPortal || withFullScreenPortal || appendToBody) {
328
+ return /*#__PURE__*/_react["default"].createElement(_reactPortal.Portal, null, this.renderDayPicker());
329
+ }
330
+ return this.renderDayPicker();
331
+ };
332
+ _proto.renderDayPicker = function renderDayPicker() {
333
+ var _this$props6 = this.props,
334
+ anchorDirection = _this$props6.anchorDirection,
335
+ openDirection = _this$props6.openDirection,
336
+ onDateChange = _this$props6.onDateChange,
337
+ date = _this$props6.date,
338
+ minDate = _this$props6.minDate,
339
+ maxDate = _this$props6.maxDate,
340
+ onFocusChange = _this$props6.onFocusChange,
341
+ focused = _this$props6.focused,
342
+ enableOutsideDays = _this$props6.enableOutsideDays,
343
+ numberOfMonths = _this$props6.numberOfMonths,
344
+ orientation = _this$props6.orientation,
345
+ monthFormat = _this$props6.monthFormat,
346
+ dayPickerNavigationInlineStyles = _this$props6.dayPickerNavigationInlineStyles,
347
+ navPosition = _this$props6.navPosition,
348
+ navPrev = _this$props6.navPrev,
349
+ navNext = _this$props6.navNext,
350
+ renderNavPrevButton = _this$props6.renderNavPrevButton,
351
+ renderNavNextButton = _this$props6.renderNavNextButton,
352
+ onPrevMonthClick = _this$props6.onPrevMonthClick,
353
+ onNextMonthClick = _this$props6.onNextMonthClick,
354
+ onClose = _this$props6.onClose,
355
+ withPortal = _this$props6.withPortal,
356
+ withFullScreenPortal = _this$props6.withFullScreenPortal,
357
+ keepOpenOnDateSelect = _this$props6.keepOpenOnDateSelect,
358
+ initialVisibleMonth = _this$props6.initialVisibleMonth,
359
+ renderMonthText = _this$props6.renderMonthText,
360
+ renderWeekHeaderElement = _this$props6.renderWeekHeaderElement,
361
+ renderCalendarDay = _this$props6.renderCalendarDay,
362
+ renderDayContents = _this$props6.renderDayContents,
363
+ renderCalendarInfo = _this$props6.renderCalendarInfo,
364
+ renderMonthElement = _this$props6.renderMonthElement,
365
+ calendarInfoPosition = _this$props6.calendarInfoPosition,
366
+ hideKeyboardShortcutsPanel = _this$props6.hideKeyboardShortcutsPanel,
367
+ firstDayOfWeek = _this$props6.firstDayOfWeek,
368
+ customCloseIcon = _this$props6.customCloseIcon,
369
+ phrases = _this$props6.phrases,
370
+ dayAriaLabelFormat = _this$props6.dayAriaLabelFormat,
371
+ daySize = _this$props6.daySize,
372
+ isRTL = _this$props6.isRTL,
373
+ isOutsideRange = _this$props6.isOutsideRange,
374
+ isDayBlocked = _this$props6.isDayBlocked,
375
+ isDayHighlighted = _this$props6.isDayHighlighted,
376
+ weekDayFormat = _this$props6.weekDayFormat,
377
+ css = _this$props6.css,
378
+ styles = _this$props6.styles,
379
+ verticalHeight = _this$props6.verticalHeight,
380
+ transitionDuration = _this$props6.transitionDuration,
381
+ verticalSpacing = _this$props6.verticalSpacing,
382
+ horizontalMonthPadding = _this$props6.horizontalMonthPadding,
383
+ small = _this$props6.small,
384
+ reactDates = _this$props6.theme.reactDates;
385
+ var _this$state = this.state,
386
+ dayPickerContainerStyles = _this$state.dayPickerContainerStyles,
387
+ isDayPickerFocused = _this$state.isDayPickerFocused,
388
+ showKeyboardShortcuts = _this$state.showKeyboardShortcuts;
389
+ var onOutsideClick = !withFullScreenPortal && withPortal ? this.onOutsideClick : undefined;
390
+ var closeIcon = customCloseIcon || /*#__PURE__*/_react["default"].createElement(_CloseButton["default"], null);
391
+ var inputHeight = (0, _getInputHeight["default"])(reactDates, small);
392
+ var withAnyPortal = withPortal || withFullScreenPortal;
393
+
394
+ /* eslint-disable jsx-a11y/no-static-element-interactions */
395
+ /* eslint-disable jsx-a11y/click-events-have-key-events */
396
+ return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
397
+ ref: this.setDayPickerContainerRef
398
+ }, css(styles.SingleDatePicker_picker, anchorDirection === _constants.ANCHOR_LEFT && styles.SingleDatePicker_picker__directionLeft, anchorDirection === _constants.ANCHOR_RIGHT && styles.SingleDatePicker_picker__directionRight, openDirection === _constants.OPEN_DOWN && styles.SingleDatePicker_picker__openDown, openDirection === _constants.OPEN_UP && styles.SingleDatePicker_picker__openUp, !withAnyPortal && openDirection === _constants.OPEN_DOWN && {
399
+ top: inputHeight + verticalSpacing
400
+ }, !withAnyPortal && openDirection === _constants.OPEN_UP && {
401
+ bottom: inputHeight + verticalSpacing
402
+ }, orientation === _constants.HORIZONTAL_ORIENTATION && styles.SingleDatePicker_picker__horizontal, orientation === _constants.VERTICAL_ORIENTATION && styles.SingleDatePicker_picker__vertical, withAnyPortal && styles.SingleDatePicker_picker__portal, withFullScreenPortal && styles.SingleDatePicker_picker__fullScreenPortal, isRTL && styles.SingleDatePicker_picker__rtl, dayPickerContainerStyles), {
403
+ onClick: onOutsideClick
404
+ }), /*#__PURE__*/_react["default"].createElement(_DayPickerSingleDateController["default"], {
405
+ date: date,
406
+ minDate: minDate,
407
+ maxDate: maxDate,
408
+ onDateChange: onDateChange,
409
+ onFocusChange: onFocusChange,
410
+ orientation: orientation,
411
+ enableOutsideDays: enableOutsideDays,
412
+ numberOfMonths: numberOfMonths,
413
+ monthFormat: monthFormat,
414
+ withPortal: withAnyPortal,
415
+ focused: focused,
416
+ keepOpenOnDateSelect: keepOpenOnDateSelect,
417
+ hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
418
+ initialVisibleMonth: initialVisibleMonth,
419
+ dayPickerNavigationInlineStyles: dayPickerNavigationInlineStyles,
420
+ navPosition: navPosition,
421
+ navPrev: navPrev,
422
+ navNext: navNext,
423
+ renderNavPrevButton: renderNavPrevButton,
424
+ renderNavNextButton: renderNavNextButton,
425
+ onPrevMonthClick: onPrevMonthClick,
426
+ onNextMonthClick: onNextMonthClick,
427
+ onClose: onClose,
428
+ renderMonthText: renderMonthText,
429
+ renderWeekHeaderElement: renderWeekHeaderElement,
430
+ renderCalendarDay: renderCalendarDay,
431
+ renderDayContents: renderDayContents,
432
+ renderCalendarInfo: renderCalendarInfo,
433
+ renderMonthElement: renderMonthElement,
434
+ calendarInfoPosition: calendarInfoPosition,
435
+ isFocused: isDayPickerFocused,
436
+ showKeyboardShortcuts: showKeyboardShortcuts,
437
+ onBlur: this.onDayPickerBlur,
438
+ phrases: phrases,
439
+ dayAriaLabelFormat: dayAriaLabelFormat,
440
+ daySize: daySize,
441
+ isRTL: isRTL,
442
+ isOutsideRange: isOutsideRange,
443
+ isDayBlocked: isDayBlocked,
444
+ isDayHighlighted: isDayHighlighted,
445
+ firstDayOfWeek: firstDayOfWeek,
446
+ weekDayFormat: weekDayFormat,
447
+ verticalHeight: verticalHeight,
448
+ transitionDuration: transitionDuration,
449
+ horizontalMonthPadding: horizontalMonthPadding
450
+ }), withFullScreenPortal && /*#__PURE__*/_react["default"].createElement("button", (0, _extends2["default"])({}, css(styles.SingleDatePicker_closeButton), {
451
+ "aria-label": phrases.closeDatePicker,
452
+ type: "button",
453
+ onClick: this.onOutsideClick
454
+ }), /*#__PURE__*/_react["default"].createElement("div", css(styles.SingleDatePicker_closeButton_svg), closeIcon)));
455
+ /* eslint-enable jsx-a11y/no-static-element-interactions */
456
+ /* eslint-enable jsx-a11y/click-events-have-key-events */
457
+ };
458
+ _proto.render = function render() {
459
+ var _this$props7 = this.props,
460
+ id = _this$props7.id,
461
+ placeholder = _this$props7.placeholder,
462
+ ariaLabel = _this$props7.ariaLabel,
463
+ autoComplete = _this$props7.autoComplete,
464
+ titleText = _this$props7.titleText,
465
+ disabled = _this$props7.disabled,
466
+ focused = _this$props7.focused,
467
+ required = _this$props7.required,
468
+ readOnly = _this$props7.readOnly,
469
+ openDirection = _this$props7.openDirection,
470
+ showClearDate = _this$props7.showClearDate,
471
+ showDefaultInputIcon = _this$props7.showDefaultInputIcon,
472
+ inputIconPosition = _this$props7.inputIconPosition,
473
+ customCloseIcon = _this$props7.customCloseIcon,
474
+ customInputIcon = _this$props7.customInputIcon,
475
+ date = _this$props7.date,
476
+ onDateChange = _this$props7.onDateChange,
477
+ displayFormat = _this$props7.displayFormat,
478
+ phrases = _this$props7.phrases,
479
+ withPortal = _this$props7.withPortal,
480
+ withFullScreenPortal = _this$props7.withFullScreenPortal,
481
+ screenReaderInputMessage = _this$props7.screenReaderInputMessage,
482
+ isRTL = _this$props7.isRTL,
483
+ noBorder = _this$props7.noBorder,
484
+ block = _this$props7.block,
485
+ small = _this$props7.small,
486
+ regular = _this$props7.regular,
487
+ verticalSpacing = _this$props7.verticalSpacing,
488
+ reopenPickerOnClearDate = _this$props7.reopenPickerOnClearDate,
489
+ keepOpenOnDateSelect = _this$props7.keepOpenOnDateSelect,
490
+ css = _this$props7.css,
491
+ styles = _this$props7.styles,
492
+ isOutsideRange = _this$props7.isOutsideRange,
493
+ isDayBlocked = _this$props7.isDayBlocked;
494
+ var isInputFocused = this.state.isInputFocused;
495
+ var enableOutsideClick = !withPortal && !withFullScreenPortal;
496
+ var hideFang = verticalSpacing < _constants.FANG_HEIGHT_PX;
497
+ var input = /*#__PURE__*/_react["default"].createElement(_SingleDatePickerInputController["default"], {
498
+ id: id,
499
+ placeholder: placeholder,
500
+ ariaLabel: ariaLabel,
501
+ autoComplete: autoComplete,
502
+ titleText: titleText,
503
+ focused: focused,
504
+ isFocused: isInputFocused,
505
+ disabled: disabled,
506
+ required: required,
507
+ readOnly: readOnly,
508
+ openDirection: openDirection,
509
+ showCaret: !withPortal && !withFullScreenPortal && !hideFang,
510
+ showClearDate: showClearDate,
511
+ showDefaultInputIcon: showDefaultInputIcon,
512
+ inputIconPosition: inputIconPosition,
513
+ isOutsideRange: isOutsideRange,
514
+ isDayBlocked: isDayBlocked,
515
+ customCloseIcon: customCloseIcon,
516
+ customInputIcon: customInputIcon,
517
+ date: date,
518
+ onDateChange: onDateChange,
519
+ displayFormat: displayFormat,
520
+ onFocusChange: this.onInputFocus,
521
+ onKeyDownArrowDown: this.onDayPickerFocus,
522
+ onKeyDownQuestionMark: this.showKeyboardShortcutsPanel,
523
+ screenReaderMessage: screenReaderInputMessage,
524
+ phrases: phrases,
525
+ isRTL: isRTL,
526
+ noBorder: noBorder,
527
+ block: block,
528
+ small: small,
529
+ regular: regular,
530
+ verticalSpacing: verticalSpacing,
531
+ reopenPickerOnClearDate: reopenPickerOnClearDate,
532
+ keepOpenOnDateSelect: keepOpenOnDateSelect
533
+ }, this.maybeRenderDayPickerWithPortal());
534
+ return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
535
+ ref: this.setContainerRef
536
+ }, css(styles.SingleDatePicker, block && styles.SingleDatePicker__block)), enableOutsideClick && /*#__PURE__*/_react["default"].createElement(_reactOutsideClickHandler["default"], {
537
+ onOutsideClick: this.onOutsideClick
538
+ }, input), enableOutsideClick || input);
539
+ };
540
+ return SingleDatePicker;
541
+ }(_react["default"].PureComponent || _react["default"].Component, !_react["default"].PureComponent && "shouldComponentUpdate");
542
+ SingleDatePicker.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
543
+ SingleDatePicker.defaultProps = defaultProps;
544
+ var _default = exports["default"] = (0, _reactWithStyles.withStyles)(function (_ref4) {
545
+ var _ref4$reactDates = _ref4.reactDates,
546
+ color = _ref4$reactDates.color,
547
+ zIndex = _ref4$reactDates.zIndex;
548
+ return {
549
+ SingleDatePicker: {
550
+ position: 'relative',
551
+ display: 'inline-block'
552
+ },
553
+ SingleDatePicker__block: {
554
+ display: 'block'
555
+ },
556
+ SingleDatePicker_picker: {
557
+ zIndex: zIndex + 1,
558
+ backgroundColor: color.background,
559
+ position: 'absolute'
560
+ },
561
+ SingleDatePicker_picker__rtl: {
562
+ direction: (0, _noflip["default"])('rtl')
563
+ },
564
+ SingleDatePicker_picker__directionLeft: {
565
+ left: (0, _noflip["default"])(0)
566
+ },
567
+ SingleDatePicker_picker__directionRight: {
568
+ right: (0, _noflip["default"])(0)
569
+ },
570
+ SingleDatePicker_picker__portal: {
571
+ backgroundColor: 'rgba(0, 0, 0, 0.3)',
572
+ position: 'fixed',
573
+ top: 0,
574
+ left: (0, _noflip["default"])(0),
575
+ height: '100%',
576
+ width: '100%'
577
+ },
578
+ SingleDatePicker_picker__fullScreenPortal: {
579
+ backgroundColor: color.background
580
+ },
581
+ SingleDatePicker_closeButton: {
582
+ background: 'none',
583
+ border: 0,
584
+ color: 'inherit',
585
+ font: 'inherit',
586
+ lineHeight: 'normal',
587
+ overflow: 'visible',
588
+ cursor: 'pointer',
589
+ position: 'absolute',
590
+ top: 0,
591
+ right: (0, _noflip["default"])(0),
592
+ padding: 15,
593
+ zIndex: zIndex + 2,
594
+ ':hover': {
595
+ color: (0, _color2k.darken)(color.core.grayLighter, 0.1),
596
+ textDecoration: 'none'
597
+ },
598
+ ':focus': {
599
+ color: (0, _color2k.darken)(color.core.grayLighter, 0.1),
600
+ textDecoration: 'none'
601
+ }
602
+ },
603
+ SingleDatePicker_closeButton_svg: {
604
+ height: 15,
605
+ width: 15,
606
+ fill: color.core.grayLighter
607
+ }
608
+ };
609
+ }, {
610
+ pureComponent: typeof _react["default"].PureComponent !== 'undefined'
611
+ })(SingleDatePicker);