@jobber/components 7.1.2-MIKElock--7916eb4.2 → 7.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/AtlantisThemeContext-cjs.js +1 -1
  2. package/dist/AtlantisThemeContext-es.js +9 -9
  3. package/dist/Autocomplete/index.cjs +2 -2
  4. package/dist/Autocomplete/index.mjs +5 -5
  5. package/dist/Body-cjs.js +1 -1
  6. package/dist/Body-es.js +2 -2
  7. package/dist/BottomSheet-cjs.js +1 -1
  8. package/dist/BottomSheet-es.js +1 -1
  9. package/dist/Box-cjs.js +2 -2
  10. package/dist/Box-es.js +2 -2
  11. package/dist/Button/index.mjs +1 -1
  12. package/dist/Button-es.js +1 -1
  13. package/dist/Card-cjs.js +1 -1
  14. package/dist/Card-es.js +1 -1
  15. package/dist/Checkbox/index.cjs +1 -1
  16. package/dist/Checkbox/index.mjs +1 -1
  17. package/dist/Chip/index.mjs +1 -1
  18. package/dist/Chip-cjs.js +2 -2
  19. package/dist/Chip-es.js +2 -2
  20. package/dist/ChipDismissible-es.js +1 -1
  21. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +1 -1
  22. package/dist/Combobox-cjs.js +1 -1
  23. package/dist/Combobox-es.js +1 -1
  24. package/dist/ComboboxAction-cjs.js +1 -1
  25. package/dist/ComboboxAction-es.js +1 -1
  26. package/dist/ComboboxContent-cjs.js +1 -1
  27. package/dist/ComboboxContent-es.js +2 -2
  28. package/dist/ComboboxContentHeader-cjs.js +1 -1
  29. package/dist/ComboboxContentHeader-es.js +1 -1
  30. package/dist/ComboboxContentList-es.js +1 -1
  31. package/dist/ComboboxContentSearch-cjs.js +1 -1
  32. package/dist/ComboboxContentSearch-es.js +1 -1
  33. package/dist/ComboboxLoadMore-cjs.js +1 -1
  34. package/dist/ComboboxLoadMore-es.js +1 -1
  35. package/dist/ComboboxOption-cjs.js +1 -1
  36. package/dist/ComboboxOption-es.js +1 -1
  37. package/dist/Container-cjs.js +1 -1
  38. package/dist/Container-es.js +1 -1
  39. package/dist/Content-cjs.js +1 -1
  40. package/dist/Content-es.js +1 -1
  41. package/dist/ContentBlock-cjs.js +1 -1
  42. package/dist/ContentBlock-es.js +1 -1
  43. package/dist/Countdown-cjs.js +3 -7
  44. package/dist/Countdown-es.js +4 -8
  45. package/dist/Cover-cjs.js +1 -1
  46. package/dist/Cover-es.js +1 -1
  47. package/dist/DataList-es.js +3 -3
  48. package/dist/DataList.const-cjs.js +1 -0
  49. package/dist/DataList.const-es.js +2 -1
  50. package/dist/DataList.module-cjs.js +1 -1
  51. package/dist/DataList.module-es.js +1 -1
  52. package/dist/DataList.utils-es.js +6 -6
  53. package/dist/DataListAction-cjs.js +1 -1
  54. package/dist/DataListAction-es.js +1 -1
  55. package/dist/DataListActionsMenu-cjs.js +1 -1
  56. package/dist/DataListActionsMenu-es.js +2 -2
  57. package/dist/DataListBulkActions-cjs.js +1 -1
  58. package/dist/DataListBulkActions-es.js +1 -1
  59. package/dist/DataListEmptyState-cjs.js +1 -1
  60. package/dist/DataListEmptyState-es.js +1 -1
  61. package/dist/DataListHeaderTile-cjs.js +2 -2
  62. package/dist/DataListHeaderTile-es.js +2 -2
  63. package/dist/DataListItemActions-cjs.js +1 -1
  64. package/dist/DataListItemActions-es.js +2 -2
  65. package/dist/DataListLayoutActions-cjs.js +1 -1
  66. package/dist/DataListLayoutActions-es.js +2 -2
  67. package/dist/DataListLoadMore-cjs.js +1 -1
  68. package/dist/DataListLoadMore-es.js +1 -1
  69. package/dist/DataListLoadingState-cjs.js +1 -1
  70. package/dist/DataListLoadingState-es.js +2 -2
  71. package/dist/DataListOverflowFade-cjs.js +1 -1
  72. package/dist/DataListOverflowFade-es.js +1 -1
  73. package/dist/DataListSearch-cjs.js +1 -1
  74. package/dist/DataListSearch-es.js +1 -1
  75. package/dist/DataListSortingOptions-cjs.js +1 -1
  76. package/dist/DataListSortingOptions-es.js +1 -1
  77. package/dist/DataListStickyHeader-cjs.js +1 -1
  78. package/dist/DataListStickyHeader-es.js +1 -1
  79. package/dist/DataListTags-cjs.js +1 -1
  80. package/dist/DataListTags-es.js +1 -1
  81. package/dist/DataListTotalCount-cjs.js +1 -1
  82. package/dist/DataListTotalCount-es.js +2 -2
  83. package/dist/DataTable/index.mjs +1 -1
  84. package/dist/DataTable-cjs.js +3 -3
  85. package/dist/DataTable-es.js +5 -5
  86. package/dist/DataTableTable-cjs.js +2 -2
  87. package/dist/DataTableTable-es.js +3 -3
  88. package/dist/DatePicker-cjs.js +81 -266
  89. package/dist/DatePicker-es.js +83 -268
  90. package/dist/DayOfMonthSelect-cjs.js +5 -5
  91. package/dist/DayOfMonthSelect-es.js +6 -6
  92. package/dist/DescriptionList-cjs.js +1 -1
  93. package/dist/DescriptionList-es.js +1 -1
  94. package/dist/Disclosure-cjs.js +1 -1
  95. package/dist/Disclosure-es.js +1 -1
  96. package/dist/Divider-cjs.js +1 -1
  97. package/dist/Divider-es.js +1 -1
  98. package/dist/DrawerGrid-cjs.js +2 -2
  99. package/dist/DrawerGrid-es.js +2 -2
  100. package/dist/DrawerRoot-cjs.js +48 -10
  101. package/dist/DrawerRoot-es.js +50 -12
  102. package/dist/FeatureSwitch-cjs.js +1 -1
  103. package/dist/FeatureSwitch-es.js +1 -1
  104. package/dist/FormField/index.mjs +1 -1
  105. package/dist/FormField-cjs.js +1 -1
  106. package/dist/FormField-es.js +2 -2
  107. package/dist/FormatEmail-cjs.js +1 -1
  108. package/dist/FormatEmail-es.js +1 -1
  109. package/dist/FormatFile-cjs.js +6 -1
  110. package/dist/FormatFile-es.js +6 -1
  111. package/dist/Frame-cjs.js +1 -1
  112. package/dist/Frame-es.js +1 -1
  113. package/dist/Glimmer/index.mjs +1 -1
  114. package/dist/Glimmer-cjs.js +1 -1
  115. package/dist/Glimmer-es.js +2 -2
  116. package/dist/Grid-cjs.js +1 -1
  117. package/dist/Grid-es.js +1 -1
  118. package/dist/GridCell-cjs.js +1 -1
  119. package/dist/GridCell-es.js +1 -1
  120. package/dist/InputAvatar-cjs.js +1 -1
  121. package/dist/InputAvatar-es.js +1 -1
  122. package/dist/InputDate/index.mjs +1 -1
  123. package/dist/InputEmail/index.mjs +1 -1
  124. package/dist/InputFile-cjs.js +3 -8
  125. package/dist/InputFile-es.js +3 -8
  126. package/dist/InputNumber/index.cjs +59 -165
  127. package/dist/InputNumber/index.mjs +62 -168
  128. package/dist/InputPassword-es.js +1 -1
  129. package/dist/InputPhoneNumber/index.cjs +1 -1
  130. package/dist/InputPhoneNumber/index.mjs +2 -2
  131. package/dist/InputText/InputText.d.ts +70 -2
  132. package/dist/InputText/index.mjs +1 -1
  133. package/dist/InputTime/index.cjs +1 -0
  134. package/dist/InputTime/index.mjs +2 -1
  135. package/dist/InputValidation-cjs.js +1 -1
  136. package/dist/InputValidation-es.js +1 -1
  137. package/dist/InternalChipDismissible-cjs.js +1 -1
  138. package/dist/InternalChipDismissible-es.js +2 -2
  139. package/dist/LightBox-cjs.js +1 -1
  140. package/dist/LightBox-es.js +1 -1
  141. package/dist/Link-cjs.js +1 -1
  142. package/dist/Link-es.js +1 -1
  143. package/dist/List-cjs.js +3 -3
  144. package/dist/List-es.js +7 -7
  145. package/dist/Markdown-cjs.js +392 -466
  146. package/dist/Markdown-es.js +398 -472
  147. package/dist/Menu-cjs.js +577 -739
  148. package/dist/Menu-es.js +573 -735
  149. package/dist/Modal/index.cjs +2 -2
  150. package/dist/Modal/index.mjs +2 -2
  151. package/dist/MultiSelect-cjs.js +2 -2
  152. package/dist/MultiSelect-es.js +2 -2
  153. package/dist/OverlaySeparator-cjs.js +1 -1
  154. package/dist/OverlaySeparator-es.js +1 -1
  155. package/dist/Popover-cjs.js +1 -1
  156. package/dist/Popover-es.js +2 -2
  157. package/dist/ProgressBar-cjs.js +1 -1
  158. package/dist/ProgressBar-es.js +1 -1
  159. package/dist/RadioGroup-cjs.js +1 -1
  160. package/dist/RadioGroup-es.js +1 -1
  161. package/dist/RecurringSelect/components/index.mjs +1 -1
  162. package/dist/RecurringSelect/index.cjs +0 -1
  163. package/dist/RecurringSelect/index.mjs +0 -1
  164. package/dist/RecurringSelect-cjs.js +1 -1
  165. package/dist/RecurringSelect-es.js +2 -2
  166. package/dist/SegmentedControl-cjs.js +1 -1
  167. package/dist/SegmentedControl-es.js +2 -2
  168. package/dist/Select/index.cjs +1 -1
  169. package/dist/Select/index.mjs +2 -2
  170. package/dist/SideDrawer-cjs.js +1 -1
  171. package/dist/SideDrawer-es.js +1 -1
  172. package/dist/Spinner-cjs.js +1 -1
  173. package/dist/Spinner-es.js +1 -1
  174. package/dist/StatusIndicator-cjs.js +1 -1
  175. package/dist/StatusIndicator-es.js +1 -1
  176. package/dist/Switch-cjs.js +1 -1
  177. package/dist/Switch-es.js +1 -1
  178. package/dist/Table/index.mjs +1 -1
  179. package/dist/Tabs/index.mjs +1 -1
  180. package/dist/Tabs-cjs.js +1 -1
  181. package/dist/Tabs-es.js +6 -6
  182. package/dist/Text-cjs2.js +164 -298
  183. package/dist/Text-es2.js +164 -295
  184. package/dist/Thumbnail-cjs.js +1 -1
  185. package/dist/Thumbnail-es.js +2 -2
  186. package/dist/Tiles-cjs.js +1 -1
  187. package/dist/Tiles-es.js +1 -1
  188. package/dist/Tooltip-cjs.js +1 -1
  189. package/dist/Tooltip-es.js +2 -2
  190. package/dist/Typography-cjs.js +3 -3
  191. package/dist/Typography-es.js +3 -3
  192. package/dist/_baseEach-cjs.js +1 -1
  193. package/dist/_baseEach-es.js +7 -7
  194. package/dist/_baseFlatten-es.js +1 -1
  195. package/dist/_getAllKeys-cjs.js +8 -2
  196. package/dist/_getAllKeys-es.js +10 -4
  197. package/dist/_getTag-es.js +1 -1
  198. package/dist/_isIterateeCall-es.js +3 -3
  199. package/dist/_setToString-es.js +2 -2
  200. package/dist/debounce-es.js +4 -4
  201. package/dist/docs/Autocomplete/AutocompleteV1.md +1 -1
  202. package/dist/docs/Autocomplete/AutocompleteV2.md +1 -1
  203. package/dist/docs/Banner/Banner.md +1 -1
  204. package/dist/docs/DataList/DataList.md +1 -1
  205. package/dist/docs/FormField/FormField.md +2 -2
  206. package/dist/docs/InputEmail/InputEmail.md +1 -1
  207. package/dist/docs/InputNumber/InputNumber.md +2 -2
  208. package/dist/docs/InputPhoneNumber/InputPhoneNumber.md +1 -1
  209. package/dist/docs/InputText/InputText.md +2 -2
  210. package/dist/docs/Modal/Modal.md +3 -3
  211. package/dist/docs/Select/Select.md +2 -2
  212. package/dist/floating-ui.react-cjs.js +16 -35
  213. package/dist/floating-ui.react-dom-es.js +2 -2
  214. package/dist/floating-ui.react-es.js +18 -37
  215. package/dist/identity-es.js +5 -5
  216. package/dist/index-cjs.js +6 -6
  217. package/dist/index-es.js +6 -6
  218. package/dist/index.esm-es.js +1 -1
  219. package/dist/index.mjs +6 -6
  220. package/dist/isSymbol-es.js +1 -1
  221. package/dist/isTypedArray-cjs.js +4 -4
  222. package/dist/isTypedArray-es.js +6 -6
  223. package/dist/keysIn-cjs.js +2 -2
  224. package/dist/keysIn-es.js +5 -5
  225. package/dist/noop-es.js +4 -4
  226. package/dist/omit-cjs.js +5 -37
  227. package/dist/omit-es.js +14 -46
  228. package/dist/showToast-cjs.js +1 -1
  229. package/dist/showToast-es.js +1 -1
  230. package/dist/styles.css +117 -54
  231. package/dist/unstyledPrimitives/index.mjs +3 -3
  232. package/dist/useScrollToActive-cjs.js +1 -1
  233. package/dist/useScrollToActive-es.js +8 -8
  234. package/package.json +3 -4
@@ -2458,6 +2458,8 @@ const lightFormatters = {
2458
2458
  };
2459
2459
 
2460
2460
  const dayPeriodEnum = {
2461
+ am: "am",
2462
+ pm: "pm",
2461
2463
  midnight: "midnight",
2462
2464
  noon: "noon",
2463
2465
  morning: "morning",
@@ -6827,7 +6829,7 @@ function isWithinInterval(date, interval, options) {
6827
6829
  * //=> Fri Aug 22 2014 00:00:00
6828
6830
  */
6829
6831
  function subDays(date, amount, options) {
6830
- return addDays(date, -1, options);
6832
+ return addDays(date, -amount, options);
6831
6833
  }
6832
6834
 
6833
6835
  /**
@@ -7378,7 +7380,7 @@ function subMonths(date, amount, options) {
7378
7380
  * //=> Sun Dec 01 2013 00:00:00
7379
7381
  */
7380
7382
  function subQuarters(date, amount, options) {
7381
- return addQuarters(date, -1, options);
7383
+ return addQuarters(date, -amount, options);
7382
7384
  }
7383
7385
 
7384
7386
  /**
@@ -7408,7 +7410,7 @@ function subQuarters(date, amount, options) {
7408
7410
  * //=> Mon Aug 04 2014 00:00:00
7409
7411
  */
7410
7412
  function subWeeks(date, amount, options) {
7411
- return addWeeks(date, -1, options);
7413
+ return addWeeks(date, -amount, options);
7412
7414
  }
7413
7415
 
7414
7416
  /**
@@ -7442,7 +7444,7 @@ function subYears(date, amount, options) {
7442
7444
  }
7443
7445
 
7444
7446
  /*!
7445
- react-datepicker v8.10.0
7447
+ react-datepicker v8.7.0
7446
7448
  https://github.com/Hacker0x01/react-datepicker
7447
7449
  Released under the MIT License.
7448
7450
  */
@@ -7506,19 +7508,17 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
7506
7508
  };
7507
7509
 
7508
7510
  var CalendarContainer = function (_a) {
7509
- var _b = _a.showTimeSelectOnly, showTimeSelectOnly = _b === void 0 ? false : _b, _c = _a.showTime, showTime = _c === void 0 ? false : _c, className = _a.className, children = _a.children, inline = _a.inline;
7511
+ var _b = _a.showTimeSelectOnly, showTimeSelectOnly = _b === void 0 ? false : _b, _c = _a.showTime, showTime = _c === void 0 ? false : _c, className = _a.className, children = _a.children;
7510
7512
  var ariaLabel = showTimeSelectOnly
7511
7513
  ? "Choose Time"
7512
7514
  : "Choose Date".concat(showTime ? " and Time" : "");
7513
- return (React.createElement("div", { className: className, "aria-label": ariaLabel, role: inline ? undefined : "dialog", "aria-modal": inline ? undefined : "true" }, children));
7515
+ return (React.createElement("div", { className: className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children));
7514
7516
  };
7515
7517
 
7516
7518
  var useDetectClickOutside = function (onClickOutside, ignoreClass) {
7517
7519
  var ref = React.useRef(null);
7518
7520
  var onClickOutsideRef = React.useRef(onClickOutside);
7519
- React.useEffect(function () {
7520
- onClickOutsideRef.current = onClickOutside;
7521
- }, [onClickOutside]);
7521
+ onClickOutsideRef.current = onClickOutside;
7522
7522
  var handleClickOutside = React.useCallback(function (event) {
7523
7523
  var _a;
7524
7524
  var target = (event.composed &&
@@ -7604,7 +7604,10 @@ function parseDate(value, dateFormat, locale, strictParsing, refDate) {
7604
7604
  for (var _i = 0, formats_1 = formats; _i < formats_1.length; _i++) {
7605
7605
  var format_1 = formats_1[_i];
7606
7606
  var parsedDate = parse(value, format_1, refDate, {
7607
- locale: localeObject});
7607
+ locale: localeObject,
7608
+ useAdditionalWeekYearTokens: true,
7609
+ useAdditionalDayOfYearTokens: true,
7610
+ });
7608
7611
  if (isValid(parsedDate) &&
7609
7612
  (!strictParsing || value === formatDate(parsedDate, format_1, locale))) {
7610
7613
  return parsedDate;
@@ -8021,10 +8024,7 @@ function getQuarterShortInLocale(quarter, locale) {
8021
8024
  * @returns - Returns true if the day is disabled, false otherwise.
8022
8025
  */
8023
8026
  function isDayDisabled(day, _a) {
8024
- var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, excludeDateIntervals = _b.excludeDateIntervals, includeDates = _b.includeDates, includeDateIntervals = _b.includeDateIntervals, filterDate = _b.filterDate, disabled = _b.disabled;
8025
- if (disabled) {
8026
- return true;
8027
- }
8027
+ var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, excludeDateIntervals = _b.excludeDateIntervals, includeDates = _b.includeDates, includeDateIntervals = _b.includeDateIntervals, filterDate = _b.filterDate;
8028
8028
  return (isOutOfBounds(day, { minDate: minDate, maxDate: maxDate }) ||
8029
8029
  (excludeDates &&
8030
8030
  excludeDates.some(function (excludeDate) {
@@ -8124,10 +8124,7 @@ function isMonthYearDisabled(date, _a) {
8124
8124
  false);
8125
8125
  }
8126
8126
  function isQuarterDisabled(quarter, _a) {
8127
- var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, includeDates = _b.includeDates, filterDate = _b.filterDate, disabled = _b.disabled;
8128
- if (disabled) {
8129
- return true;
8130
- }
8127
+ var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, includeDates = _b.includeDates, filterDate = _b.filterDate;
8131
8128
  return (isOutOfBounds(quarter, { minDate: minDate, maxDate: maxDate }) ||
8132
8129
  (excludeDates === null || excludeDates === void 0 ? void 0 : excludeDates.some(function (excludeDate) {
8133
8130
  return isSameQuarter(quarter, excludeDate instanceof Date ? excludeDate : excludeDate.date);
@@ -8149,10 +8146,7 @@ function isYearInRange(year, start, end) {
8149
8146
  return startYear <= year && endYear >= year;
8150
8147
  }
8151
8148
  function isYearDisabled(year, _a) {
8152
- var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, includeDates = _b.includeDates, filterDate = _b.filterDate, disabled = _b.disabled;
8153
- if (disabled) {
8154
- return true;
8155
- }
8149
+ var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, includeDates = _b.includeDates, filterDate = _b.filterDate;
8156
8150
  var date = new Date(year, 0, 1);
8157
8151
  return (isOutOfBounds(date, {
8158
8152
  minDate: minDate ? startOfYear(minDate) : undefined,
@@ -8224,7 +8218,6 @@ function isTimeInDisabledRange(time, _a) {
8224
8218
  valid = !isWithinInterval(baseTime, { start: min, end: max });
8225
8219
  }
8226
8220
  catch (err) {
8227
- /* istanbul ignore next - date-fns historically threw on invalid intervals */
8228
8221
  valid = false;
8229
8222
  }
8230
8223
  return valid;
@@ -8250,7 +8243,7 @@ function monthDisabledAfter(day, _a) {
8250
8243
  function quarterDisabledBefore(date, _a) {
8251
8244
  var _b = _a === void 0 ? {} : _a, minDate = _b.minDate, includeDates = _b.includeDates;
8252
8245
  var firstDateOfYear = startOfYear(date);
8253
- var previousQuarter = subQuarters(firstDateOfYear);
8246
+ var previousQuarter = subQuarters(firstDateOfYear, 1);
8254
8247
  return ((minDate && differenceInCalendarQuarters(minDate, previousQuarter) > 0) ||
8255
8248
  (includeDates &&
8256
8249
  includeDates.every(function (includeDate) {
@@ -8743,7 +8736,6 @@ var Day = /** @class */ (function (_super) {
8743
8736
  includeDateIntervals: _this.props.includeDateIntervals,
8744
8737
  includeDates: _this.props.includeDates,
8745
8738
  filterDate: _this.props.filterDate,
8746
- disabled: _this.props.disabled,
8747
8739
  });
8748
8740
  };
8749
8741
  _this.isExcluded = function () {
@@ -9391,7 +9383,6 @@ var Month = /** @class */ (function (_super) {
9391
9383
  includeDateIntervals: _this.props.includeDateIntervals,
9392
9384
  includeDates: _this.props.includeDates,
9393
9385
  filterDate: _this.props.filterDate,
9394
- disabled: _this.props.disabled,
9395
9386
  });
9396
9387
  };
9397
9388
  _this.isExcluded = function (day) {
@@ -9528,12 +9519,7 @@ var Month = /** @class */ (function (_super) {
9528
9519
  });
9529
9520
  };
9530
9521
  _this.isSelectedQuarter = function (day, q, selected) {
9531
- return getQuarter(selected) === q && getYear(day) === getYear(selected);
9532
- };
9533
- _this.isSelectQuarterInList = function (day, q, selectedDates) {
9534
- return selectedDates.some(function (selectedDate) {
9535
- return _this.isSelectedQuarter(day, q, selectedDate);
9536
- });
9522
+ return getQuarter(day) === q && getYear(day) === getYear(selected);
9537
9523
  };
9538
9524
  _this.isMonthSelected = function () {
9539
9525
  var _a = _this.props, day = _a.day, selected = _a.selected, selectedDates = _a.selectedDates, selectsMultiple = _a.selectsMultiple;
@@ -9545,21 +9531,7 @@ var Month = /** @class */ (function (_super) {
9545
9531
  }
9546
9532
  return !!selected && _this.isSelectedMonth(day, monthIdx, selected);
9547
9533
  };
9548
- _this.isQuarterSelected = function () {
9549
- var _a = _this.props, day = _a.day, selected = _a.selected, selectedDates = _a.selectedDates, selectsMultiple = _a.selectsMultiple;
9550
- var quarterIdx = getQuarter(day);
9551
- if (selectsMultiple) {
9552
- return selectedDates === null || selectedDates === void 0 ? void 0 : selectedDates.some(function (selectedDate) {
9553
- return _this.isSelectedQuarter(day, quarterIdx, selectedDate);
9554
- });
9555
- }
9556
- return !!selected && _this.isSelectedQuarter(day, quarterIdx, selected);
9557
- };
9558
9534
  _this.renderWeeks = function () {
9559
- // Return empty array if day is invalid
9560
- if (!isValid(_this.props.day)) {
9561
- return [];
9562
- }
9563
9535
  var weeks = [];
9564
9536
  var isFixedHeight = _this.props.fixedHeight;
9565
9537
  var i = 0;
@@ -9771,21 +9743,15 @@ var Month = /** @class */ (function (_super) {
9771
9743
  if (!_this.props.preSelection) {
9772
9744
  break;
9773
9745
  }
9774
- _this.handleQuarterNavigation(quarter === 1 ? 4 : quarter - 1, subQuarters(_this.props.preSelection));
9746
+ _this.handleQuarterNavigation(quarter === 1 ? 4 : quarter - 1, subQuarters(_this.props.preSelection, 1));
9775
9747
  break;
9776
9748
  }
9777
9749
  }
9778
9750
  };
9779
9751
  _this.isMonthDisabledForLabelDate = function (month) {
9780
9752
  var _a;
9781
- var _b = _this.props, day = _b.day, disabled = _b.disabled, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, includeDates = _b.includeDates;
9753
+ var _b = _this.props, day = _b.day, minDate = _b.minDate, maxDate = _b.maxDate, excludeDates = _b.excludeDates, includeDates = _b.includeDates;
9782
9754
  var labelDate = setMonth(day, month);
9783
- if (disabled) {
9784
- return {
9785
- isDisabled: true,
9786
- labelDate: setMonth(day, month),
9787
- };
9788
- }
9789
9755
  return {
9790
9756
  isDisabled: (_a = ((minDate || maxDate || excludeDates || includeDates) &&
9791
9757
  isMonthDisabled(labelDate, _this.props))) !== null && _a !== void 0 ? _a : false,
@@ -9856,24 +9822,17 @@ var Month = /** @class */ (function (_super) {
9856
9822
  return "".concat(prefix, " ").concat(formatDate(labelDate, "MMMM yyyy", locale));
9857
9823
  };
9858
9824
  _this.getQuarterClassNames = function (q) {
9859
- var _a = _this.props, day = _a.day, startDate = _a.startDate, endDate = _a.endDate, minDate = _a.minDate, maxDate = _a.maxDate, excludeDates = _a.excludeDates, includeDates = _a.includeDates, filterDate = _a.filterDate, preSelection = _a.preSelection, disabledKeyboardNavigation = _a.disabledKeyboardNavigation, disabled = _a.disabled;
9860
- var isDisabled = (minDate ||
9861
- maxDate ||
9862
- excludeDates ||
9863
- includeDates ||
9864
- filterDate ||
9865
- disabled) &&
9825
+ var _a = _this.props, day = _a.day, startDate = _a.startDate, endDate = _a.endDate, selected = _a.selected, minDate = _a.minDate, maxDate = _a.maxDate, excludeDates = _a.excludeDates, includeDates = _a.includeDates, filterDate = _a.filterDate, preSelection = _a.preSelection, disabledKeyboardNavigation = _a.disabledKeyboardNavigation;
9826
+ var isDisabled = (minDate || maxDate || excludeDates || includeDates || filterDate) &&
9866
9827
  isQuarterDisabled(setQuarter(day, q), _this.props);
9867
- var selection = _this.getSelection();
9868
9828
  return clsx.clsx("react-datepicker__quarter-text", "react-datepicker__quarter-".concat(q), {
9869
9829
  "react-datepicker__quarter-text--disabled": isDisabled,
9870
- "react-datepicker__quarter-text--selected": selection
9871
- ? _this.isSelectQuarterInList(day, q, selection)
9830
+ "react-datepicker__quarter-text--selected": selected
9831
+ ? _this.isSelectedQuarter(day, q, selected)
9872
9832
  : undefined,
9873
9833
  "react-datepicker__quarter-text--keyboard-selected": !disabledKeyboardNavigation &&
9874
9834
  preSelection &&
9875
9835
  _this.isSelectedQuarter(day, q, preSelection) &&
9876
- !_this.isQuarterSelected() &&
9877
9836
  !isDisabled,
9878
9837
  "react-datepicker__quarter-text--in-selecting-range": _this.isInSelectingRangeQuarter(q),
9879
9838
  "react-datepicker__quarter-text--in-range": startDate && endDate
@@ -9953,18 +9912,14 @@ var Month = /** @class */ (function (_super) {
9953
9912
  var formattedAriaLabelPrefix = ariaLabelPrefix
9954
9913
  ? ariaLabelPrefix.trim() + " "
9955
9914
  : "";
9956
- // Format aria-label, return empty string if date is invalid
9957
- var formattedAriaLabel = isValid(day)
9958
- ? "".concat(formattedAriaLabelPrefix).concat(formatDate(day, "MMMM, yyyy", this.props.locale))
9959
- : "";
9960
9915
  var shouldUseListboxRole = showMonthYearPicker || showQuarterYearPicker;
9961
9916
  if (shouldUseListboxRole) {
9962
- return (React.createElement("div", { className: this.getClassNames(), onMouseLeave: !this.props.usePointerEvent ? this.handleMouseLeave : undefined, onPointerLeave: this.props.usePointerEvent ? this.handleMouseLeave : undefined, "aria-label": formattedAriaLabel, role: "listbox" }, showMonthYearPicker ? this.renderMonths() : this.renderQuarters()));
9917
+ return (React.createElement("div", { className: this.getClassNames(), onMouseLeave: !this.props.usePointerEvent ? this.handleMouseLeave : undefined, onPointerLeave: this.props.usePointerEvent ? this.handleMouseLeave : undefined, "aria-label": "".concat(formattedAriaLabelPrefix).concat(formatDate(day, "MMMM, yyyy", this.props.locale)), role: "listbox" }, showMonthYearPicker ? this.renderMonths() : this.renderQuarters()));
9963
9918
  }
9964
9919
  // For regular calendar view, use table structure
9965
9920
  return (React.createElement("div", { role: "table" },
9966
9921
  this.props.dayNamesHeader && (React.createElement("div", { role: "rowgroup" }, this.props.dayNamesHeader)),
9967
- React.createElement("div", { className: this.getClassNames(), onMouseLeave: !this.props.usePointerEvent ? this.handleMouseLeave : undefined, onPointerLeave: this.props.usePointerEvent ? this.handleMouseLeave : undefined, "aria-label": formattedAriaLabel, role: "rowgroup" }, this.renderWeeks())));
9922
+ React.createElement("div", { className: this.getClassNames(), onMouseLeave: !this.props.usePointerEvent ? this.handleMouseLeave : undefined, onPointerLeave: this.props.usePointerEvent ? this.handleMouseLeave : undefined, "aria-label": "".concat(formattedAriaLabelPrefix).concat(formatDate(day, "MMMM, yyyy", this.props.locale)), role: "rowgroup" }, this.renderWeeks())));
9968
9923
  };
9969
9924
  return Month;
9970
9925
  }(React.Component));
@@ -10627,15 +10582,10 @@ var Year = /** @class */ (function (_super) {
10627
10582
  handleOnKeyDown && handleOnKeyDown(event);
10628
10583
  };
10629
10584
  _this.getYearClassNames = function (y) {
10630
- var _a = _this.props, date = _a.date, disabled = _a.disabled, minDate = _a.minDate, maxDate = _a.maxDate, excludeDates = _a.excludeDates, includeDates = _a.includeDates, filterDate = _a.filterDate, yearClassName = _a.yearClassName;
10585
+ var _a = _this.props, date = _a.date, minDate = _a.minDate, maxDate = _a.maxDate, excludeDates = _a.excludeDates, includeDates = _a.includeDates, filterDate = _a.filterDate, yearClassName = _a.yearClassName;
10631
10586
  return clsx.clsx("react-datepicker__year-text", "react-datepicker__year-".concat(y), date ? yearClassName === null || yearClassName === void 0 ? void 0 : yearClassName(setYear(date, y)) : undefined, {
10632
10587
  "react-datepicker__year-text--selected": _this.isSelectedYear(y),
10633
- "react-datepicker__year-text--disabled": (minDate ||
10634
- maxDate ||
10635
- excludeDates ||
10636
- includeDates ||
10637
- filterDate ||
10638
- disabled) &&
10588
+ "react-datepicker__year-text--disabled": (minDate || maxDate || excludeDates || includeDates || filterDate) &&
10639
10589
  isYearDisabled(y, _this.props),
10640
10590
  "react-datepicker__year-text--keyboard-selected": _this.isKeyboardSelected(y),
10641
10591
  "react-datepicker__year-text--range-start": _this.isRangeStart(y),
@@ -11064,15 +11014,10 @@ var Calendar = /** @class */ (function (_super) {
11064
11014
  };
11065
11015
  _this.header = function (date) {
11066
11016
  if (date === void 0) { date = _this.state.date; }
11067
- // Return empty array if date is invalid
11068
- if (!isValid(date)) {
11069
- return [];
11070
- }
11071
- var disabled = _this.props.disabled;
11072
11017
  var startOfWeek = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
11073
11018
  var dayNames = [];
11074
11019
  if (_this.props.showWeekNumbers) {
11075
- dayNames.push(React.createElement("div", { key: "W", className: "react-datepicker__day-name ".concat(disabled ? "react-datepicker__day-name--disabled" : ""), role: "columnheader" },
11020
+ dayNames.push(React.createElement("div", { key: "W", className: "react-datepicker__day-name", role: "columnheader" },
11076
11021
  React.createElement("span", { className: "react-datepicker__sr-only" }, "Week number"),
11077
11022
  React.createElement("span", { "aria-hidden": "true" }, _this.props.weekLabel || "#")));
11078
11023
  }
@@ -11082,7 +11027,7 @@ var Calendar = /** @class */ (function (_super) {
11082
11027
  var weekDayClassName = _this.props.weekDayClassName
11083
11028
  ? _this.props.weekDayClassName(day)
11084
11029
  : undefined;
11085
- return (React.createElement("div", { key: offset, role: "columnheader", className: clsx.clsx("react-datepicker__day-name", weekDayClassName, disabled ? "react-datepicker__day-name--disabled" : "") },
11030
+ return (React.createElement("div", { key: offset, role: "columnheader", className: clsx.clsx("react-datepicker__day-name", weekDayClassName) },
11086
11031
  React.createElement("span", { className: "react-datepicker__sr-only" }, formatDate(day, "EEEE", _this.props.locale)),
11087
11032
  React.createElement("span", { "aria-hidden": "true" }, weekDayName)));
11088
11033
  }));
@@ -11122,9 +11067,6 @@ var Calendar = /** @class */ (function (_super) {
11122
11067
  var fromMonthDate = subMonths(_this.state.date, monthSelectedIn);
11123
11068
  var allPrevDaysDisabled;
11124
11069
  switch (true) {
11125
- case _this.props.disabled:
11126
- allPrevDaysDisabled = true;
11127
- break;
11128
11070
  case _this.props.showMonthYearPicker:
11129
11071
  allPrevDaysDisabled = yearDisabledBefore(_this.state.date, _this.props);
11130
11072
  break;
@@ -11192,9 +11134,6 @@ var Calendar = /** @class */ (function (_super) {
11192
11134
  }
11193
11135
  var allNextDaysDisabled;
11194
11136
  switch (true) {
11195
- case _this.props.disabled:
11196
- allNextDaysDisabled = true;
11197
- break;
11198
11137
  case _this.props.showMonthYearPicker:
11199
11138
  allNextDaysDisabled = yearDisabledAfter(_this.state.date, _this.props);
11200
11139
  break;
@@ -11262,9 +11201,7 @@ var Calendar = /** @class */ (function (_super) {
11262
11201
  if (_this.props.showMonthYearDropdown) {
11263
11202
  classes.push("react-datepicker__current-month--hasMonthYearDropdown");
11264
11203
  }
11265
- return (React.createElement("h2", { className: classes.join(" ") }, isValid(date)
11266
- ? formatDate(date, _this.props.dateFormat, _this.props.locale)
11267
- : ""));
11204
+ return (React.createElement("h2", { className: classes.join(" ") }, formatDate(date, _this.props.dateFormat, _this.props.locale)));
11268
11205
  };
11269
11206
  _this.renderYearDropdown = function (overrideHide) {
11270
11207
  if (overrideHide === void 0) { overrideHide = false; }
@@ -11414,10 +11351,6 @@ var Calendar = /** @class */ (function (_super) {
11414
11351
  };
11415
11352
  _this.renderAriaLiveRegion = function () {
11416
11353
  var _a;
11417
- // Don't render aria-live message if date is invalid
11418
- if (!isValid(_this.state.date)) {
11419
- return (React.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }));
11420
- }
11421
11354
  var _b = getYearsPeriod(_this.state.date, (_a = _this.props.yearItemNumber) !== null && _a !== void 0 ? _a : Calendar.defaultProps.yearItemNumber), startPeriod = _b.startPeriod, endPeriod = _b.endPeriod;
11422
11355
  var ariaLiveMessage;
11423
11356
  if (_this.props.showYearPicker) {
@@ -11479,7 +11412,6 @@ var Calendar = /** @class */ (function (_super) {
11479
11412
  Calendar.prototype.componentDidUpdate = function (prevProps) {
11480
11413
  var _this = this;
11481
11414
  if (this.props.preSelection &&
11482
- isValid(this.props.preSelection) &&
11483
11415
  (!isSameDay(this.props.preSelection, prevProps.preSelection) ||
11484
11416
  this.props.monthSelectedIn !== prevProps.monthSelectedIn)) {
11485
11417
  var hasMonthChanged_1 = !isSameMonth(this.state.date, this.props.preSelection);
@@ -11500,7 +11432,7 @@ var Calendar = /** @class */ (function (_super) {
11500
11432
  React.createElement("div", { style: { display: "contents" }, ref: this.containerRef },
11501
11433
  React.createElement(Container, { className: clsx.clsx("react-datepicker", this.props.className, {
11502
11434
  "react-datepicker--time-only": this.props.showTimeSelectOnly,
11503
- }), showTime: this.props.showTimeSelect || this.props.showTimeInput, showTimeSelectOnly: this.props.showTimeSelectOnly, inline: this.props.inline },
11435
+ }), showTime: this.props.showTimeSelect || this.props.showTimeInput, showTimeSelectOnly: this.props.showTimeSelectOnly },
11504
11436
  this.renderAriaLiveRegion(),
11505
11437
  this.renderPreviousButton(),
11506
11438
  this.renderNextButton(),
@@ -11694,7 +11626,6 @@ function withFloating(Component) {
11694
11626
  var floatingProps = floatingUi_react.useFloating(_assign({ open: !hidePopper, whileElementsMounted: floatingUi_reactDom.autoUpdate, placement: props.popperPlacement, middleware: __spreadArray([
11695
11627
  floatingUi_reactDom.flip({ padding: 15 }),
11696
11628
  floatingUi_reactDom.offset(10),
11697
- // eslint-disable-next-line react-hooks/refs -- Floating UI requires refs to be passed during render
11698
11629
  floatingUi_reactDom.arrow({ element: arrowRef })
11699
11630
  ], ((_a = props.popperModifiers) !== null && _a !== void 0 ? _a : []), true) }, props.popperProps));
11700
11631
  var componentProps = _assign(_assign({}, props), { hidePopper: hidePopper, popperProps: _assign(_assign({}, floatingProps), { arrowRef: arrowRef }) });
@@ -11705,7 +11636,7 @@ function withFloating(Component) {
11705
11636
  }
11706
11637
 
11707
11638
  // Exported for testing purposes
11708
- var PopperComponent$1 = function (props) {
11639
+ var PopperComponent = function (props) {
11709
11640
  var className = props.className, wrapperClassName = props.wrapperClassName, _a = props.hidePopper, hidePopper = _a === void 0 ? true : _a, popperComponent = props.popperComponent, targetComponent = props.targetComponent, enableTabLoop = props.enableTabLoop, popperOnKeyDown = props.popperOnKeyDown, portalId = props.portalId, portalHost = props.portalHost, popperProps = props.popperProps, showArrow = props.showArrow;
11710
11641
  var popper = undefined;
11711
11642
  if (!hidePopper) {
@@ -11726,7 +11657,7 @@ var PopperComponent$1 = function (props) {
11726
11657
  React.createElement("div", { ref: popperProps.refs.setReference, className: wrapperClasses }, targetComponent),
11727
11658
  popper));
11728
11659
  };
11729
- var PopperComponent = withFloating(PopperComponent$1);
11660
+ var PopperComponent$1 = withFloating(PopperComponent);
11730
11661
 
11731
11662
  // Compares dates year+month combinations
11732
11663
  function hasPreSelectionChanged(date1, date2) {
@@ -12004,11 +11935,9 @@ var DatePicker$1 = /** @class */ (function (_super) {
12004
11935
  }
12005
11936
  };
12006
11937
  _this.handleSelect = function (date, event, monthSelectedIn) {
12007
- var _a;
12008
11938
  if (_this.props.readOnly)
12009
11939
  return;
12010
- var _b = _this.props, selectsRange = _b.selectsRange, startDate = _b.startDate, endDate = _b.endDate, locale = _b.locale, swapRange = _b.swapRange;
12011
- var dateFormat = (_a = _this.props.dateFormat) !== null && _a !== void 0 ? _a : DatePicker.defaultProps.dateFormat;
11940
+ var _a = _this.props, selectsRange = _a.selectsRange, startDate = _a.startDate, endDate = _a.endDate, swapRange = _a.swapRange;
12012
11941
  var isDateSelectionComplete = !selectsRange ||
12013
11942
  (startDate && !endDate && (swapRange || !isDateBefore(date, startDate)));
12014
11943
  if (_this.props.shouldCloseOnSelect &&
@@ -12019,11 +11948,7 @@ var DatePicker$1 = /** @class */ (function (_super) {
12019
11948
  _this.sendFocusBackToInput();
12020
11949
  }
12021
11950
  if (_this.props.onChangeRaw) {
12022
- var formattedDate = safeDateFormat(date, {
12023
- dateFormat: dateFormat,
12024
- locale: locale,
12025
- });
12026
- _this.props.onChangeRaw(event, { date: date, formattedDate: formattedDate });
11951
+ _this.props.onChangeRaw(event);
12027
11952
  }
12028
11953
  _this.setSelected(date, event, false, monthSelectedIn);
12029
11954
  if (_this.props.showDateSelect) {
@@ -12229,117 +12154,6 @@ var DatePicker$1 = /** @class */ (function (_super) {
12229
12154
  }
12230
12155
  (_b = (_a = _this.props).onInputClick) === null || _b === void 0 ? void 0 : _b.call(_a);
12231
12156
  };
12232
- _this.handleTimeOnlyArrowKey = function (eventKey) {
12233
- var _a, _b, _c, _d;
12234
- var currentTime = _this.props.selected || _this.state.preSelection || newDate();
12235
- var timeIntervals = (_a = _this.props.timeIntervals) !== null && _a !== void 0 ? _a : 30;
12236
- var dateFormat = (_b = _this.props.dateFormat) !== null && _b !== void 0 ? _b : DatePicker.defaultProps.dateFormat;
12237
- var formatStr = Array.isArray(dateFormat) ? dateFormat[0] : dateFormat;
12238
- var baseDate = getStartOfDay(currentTime);
12239
- var currentMinutes = getHours(currentTime) * 60 + getMinutes(currentTime);
12240
- var maxMinutes = 23 * 60 + 60 - timeIntervals; // Cap at last valid interval of the day
12241
- var newTime;
12242
- if (eventKey === KeyType.ArrowUp) {
12243
- var newMinutes = Math.max(0, currentMinutes - timeIntervals);
12244
- newTime = addMinutes(baseDate, newMinutes);
12245
- }
12246
- else {
12247
- var newMinutes = Math.min(maxMinutes, currentMinutes + timeIntervals);
12248
- newTime = addMinutes(baseDate, newMinutes);
12249
- }
12250
- var formattedTime = formatDate(newTime, formatStr || DatePicker.defaultProps.dateFormat, _this.props.locale);
12251
- _this.setState({
12252
- preSelection: newTime,
12253
- inputValue: formattedTime,
12254
- });
12255
- if (_this.props.selectsRange || _this.props.selectsMultiple) {
12256
- return;
12257
- }
12258
- var selected = _this.props.selected
12259
- ? _this.props.selected
12260
- : _this.getPreSelection();
12261
- var changedDate = _this.props.selected
12262
- ? newTime
12263
- : setTime(selected, {
12264
- hour: getHours(newTime),
12265
- minute: getMinutes(newTime),
12266
- });
12267
- (_d = (_c = _this.props).onChange) === null || _d === void 0 ? void 0 : _d.call(_c, changedDate);
12268
- if (_this.props.showTimeSelectOnly || _this.props.showTimeSelect) {
12269
- _this.setState({ isRenderAriaLiveMessage: true });
12270
- }
12271
- requestAnimationFrame(function () {
12272
- _this.scrollToTimeOption(newTime);
12273
- });
12274
- };
12275
- _this.handleTimeOnlyEnterKey = function (event) {
12276
- var _a, _b, _c, _d;
12277
- var inputElement = event.target;
12278
- var inputValue = inputElement.value;
12279
- var dateFormat = (_a = _this.props.dateFormat) !== null && _a !== void 0 ? _a : DatePicker.defaultProps.dateFormat;
12280
- var timeFormat = _this.props.timeFormat || "p";
12281
- var defaultTime = _this.state.preSelection || _this.props.selected || newDate();
12282
- var parsedDate = parseDate(inputValue, dateFormat, _this.props.locale, (_b = _this.props.strictParsing) !== null && _b !== void 0 ? _b : false, defaultTime);
12283
- var timeToCommit = defaultTime;
12284
- if (parsedDate && isValid(parsedDate)) {
12285
- timeToCommit = parsedDate;
12286
- }
12287
- else {
12288
- var highlightedItem = ((_c = _this.calendar) === null || _c === void 0 ? void 0 : _c.containerRef.current) instanceof Element &&
12289
- _this.calendar.containerRef.current.querySelector(".react-datepicker__time-list-item[tabindex='0']");
12290
- if (highlightedItem instanceof HTMLElement) {
12291
- var itemText = (_d = highlightedItem.textContent) === null || _d === void 0 ? void 0 : _d.trim();
12292
- if (itemText) {
12293
- var itemTime = parseDate(itemText, timeFormat, _this.props.locale, false, defaultTime);
12294
- if (itemTime && isValid(itemTime)) {
12295
- timeToCommit = itemTime;
12296
- }
12297
- }
12298
- }
12299
- }
12300
- _this.handleTimeChange(timeToCommit);
12301
- _this.setOpen(false);
12302
- _this.sendFocusBackToInput();
12303
- };
12304
- _this.scrollToTimeOption = function (time) {
12305
- var _a, _b;
12306
- if (!((_a = _this.calendar) === null || _a === void 0 ? void 0 : _a.containerRef.current)) {
12307
- return;
12308
- }
12309
- var container = _this.calendar.containerRef.current;
12310
- var timeListItems = Array.from(container.querySelectorAll(".react-datepicker__time-list-item"));
12311
- var targetItem = null;
12312
- var closestTimeDiff = Infinity;
12313
- var timeFormat = _this.props.timeFormat || "p";
12314
- for (var _i = 0, timeListItems_1 = timeListItems; _i < timeListItems_1.length; _i++) {
12315
- var item = timeListItems_1[_i];
12316
- var itemText = (_b = item.textContent) === null || _b === void 0 ? void 0 : _b.trim();
12317
- if (itemText) {
12318
- var itemTime = parseDate(itemText, timeFormat, _this.props.locale, false, time);
12319
- if (itemTime && isValid(itemTime)) {
12320
- if (isSameMinute(itemTime, time)) {
12321
- targetItem = item;
12322
- break;
12323
- }
12324
- var timeDiff = Math.abs(itemTime.getTime() - time.getTime());
12325
- if (timeDiff < closestTimeDiff) {
12326
- closestTimeDiff = timeDiff;
12327
- targetItem = item;
12328
- }
12329
- }
12330
- }
12331
- }
12332
- if (targetItem) {
12333
- timeListItems.forEach(function (item) {
12334
- item.setAttribute("tabindex", "-1");
12335
- });
12336
- targetItem.setAttribute("tabindex", "0");
12337
- targetItem.scrollIntoView({
12338
- behavior: "smooth",
12339
- block: "center",
12340
- });
12341
- }
12342
- };
12343
12157
  _this.onInputKeyDown = function (event) {
12344
12158
  var _a, _b, _c, _d, _e, _f;
12345
12159
  (_b = (_a = _this.props).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event);
@@ -12354,18 +12168,6 @@ var DatePicker$1 = /** @class */ (function (_super) {
12354
12168
  }
12355
12169
  return;
12356
12170
  }
12357
- if (_this.state.open && _this.props.showTimeSelectOnly) {
12358
- if (eventKey === KeyType.ArrowDown || eventKey === KeyType.ArrowUp) {
12359
- event.preventDefault();
12360
- _this.handleTimeOnlyArrowKey(eventKey);
12361
- return;
12362
- }
12363
- if (eventKey === KeyType.Enter) {
12364
- event.preventDefault();
12365
- _this.handleTimeOnlyEnterKey(event);
12366
- return;
12367
- }
12368
- }
12369
12171
  // if calendar is open, these keys will focus the selected item
12370
12172
  if (_this.state.open) {
12371
12173
  if (eventKey === KeyType.ArrowDown || eventKey === KeyType.ArrowUp) {
@@ -12446,11 +12248,11 @@ var DatePicker$1 = /** @class */ (function (_super) {
12446
12248
  break;
12447
12249
  case KeyType.ArrowLeft:
12448
12250
  newCalculatedDate = showWeekPicker
12449
- ? subWeeks(date)
12450
- : subDays(date);
12251
+ ? subWeeks(date, 1)
12252
+ : subDays(date, 1);
12451
12253
  break;
12452
12254
  case KeyType.ArrowUp:
12453
- newCalculatedDate = subWeeks(date);
12255
+ newCalculatedDate = subWeeks(date, 1);
12454
12256
  break;
12455
12257
  case KeyType.ArrowDown:
12456
12258
  newCalculatedDate = addWeeks(date, 1);
@@ -12556,12 +12358,20 @@ var DatePicker$1 = /** @class */ (function (_super) {
12556
12358
  _this.setSelected(newSelection);
12557
12359
  }
12558
12360
  _this.setPreSelection(newSelection);
12559
- // In inline mode, always set shouldFocusDayInline to true when navigating via keyboard.
12560
- // This ensures focus is properly transferred to the new day element regardless of
12561
- // whether the month changed. The user initiated this navigation from a focused day,
12562
- // so we should always focus the destination day.
12361
+ // need to figure out whether month has changed to focus day in inline version
12563
12362
  if (inline) {
12564
- _this.setState({ shouldFocusDayInline: true });
12363
+ var prevMonth = getMonth(copy);
12364
+ var newMonth = getMonth(newSelection);
12365
+ var prevYear = getYear(copy);
12366
+ var newYear = getYear(newSelection);
12367
+ if (prevMonth !== newMonth || prevYear !== newYear) {
12368
+ // month has changed
12369
+ _this.setState({ shouldFocusDayInline: true });
12370
+ }
12371
+ else {
12372
+ // month hasn't changed
12373
+ _this.setState({ shouldFocusDayInline: false });
12374
+ }
12565
12375
  }
12566
12376
  };
12567
12377
  // handle generic key down events in the popper that do not adjust or select dates
@@ -12663,31 +12473,39 @@ var DatePicker$1 = /** @class */ (function (_super) {
12663
12473
  };
12664
12474
  _this.renderDateInput = function () {
12665
12475
  var _a, _b;
12666
- var _c, _d, _e, _f;
12667
12476
  var className = clsx.clsx(_this.props.className, (_a = {},
12668
12477
  _a[_this.props.outsideClickIgnoreClass ||
12669
12478
  DatePicker.defaultProps.outsideClickIgnoreClass] = _this.state.open,
12670
12479
  _a));
12671
12480
  var customInput = _this.props.customInput || React.createElement("input", { type: "text" });
12672
12481
  var customInputRef = _this.props.customInputRef || "ref";
12673
- // Build aria props object, only including defined values to avoid
12674
- // overwriting aria attributes that may be set on the custom input
12675
- var ariaProps = {};
12676
- var ariaDescribedBy = (_c = _this.props["aria-describedby"]) !== null && _c !== void 0 ? _c : _this.props.ariaDescribedBy;
12677
- var ariaInvalid = (_d = _this.props["aria-invalid"]) !== null && _d !== void 0 ? _d : _this.props.ariaInvalid;
12678
- var ariaLabelledBy = (_e = _this.props["aria-labelledby"]) !== null && _e !== void 0 ? _e : _this.props.ariaLabelledBy;
12679
- var ariaRequired = (_f = _this.props["aria-required"]) !== null && _f !== void 0 ? _f : _this.props.ariaRequired;
12680
- if (ariaDescribedBy != null)
12681
- ariaProps["aria-describedby"] = ariaDescribedBy;
12682
- if (ariaInvalid != null)
12683
- ariaProps["aria-invalid"] = ariaInvalid;
12684
- if (ariaLabelledBy != null)
12685
- ariaProps["aria-labelledby"] = ariaLabelledBy;
12686
- if (ariaRequired != null)
12687
- ariaProps["aria-required"] = ariaRequired;
12688
- return React.cloneElement(customInput, _assign((_b = {}, _b[customInputRef] = function (input) {
12689
- _this.input = input;
12690
- }, _b.value = _this.getInputValue(), _b.onBlur = _this.handleBlur, _b.onChange = _this.handleChange, _b.onClick = _this.onInputClick, _b.onFocus = _this.handleFocus, _b.onKeyDown = _this.onInputKeyDown, _b.id = _this.props.id, _b.name = _this.props.name, _b.form = _this.props.form, _b.autoFocus = _this.props.autoFocus, _b.placeholder = _this.props.placeholderText, _b.disabled = _this.props.disabled, _b.autoComplete = _this.props.autoComplete, _b.className = clsx.clsx(customInput.props.className, className), _b.title = _this.props.title, _b.readOnly = _this.props.readOnly, _b.required = _this.props.required, _b.tabIndex = _this.props.tabIndex, _b), ariaProps));
12482
+ return React.cloneElement(customInput, (_b = {},
12483
+ _b[customInputRef] = function (input) {
12484
+ _this.input = input;
12485
+ },
12486
+ _b.value = _this.getInputValue(),
12487
+ _b.onBlur = _this.handleBlur,
12488
+ _b.onChange = _this.handleChange,
12489
+ _b.onClick = _this.onInputClick,
12490
+ _b.onFocus = _this.handleFocus,
12491
+ _b.onKeyDown = _this.onInputKeyDown,
12492
+ _b.id = _this.props.id,
12493
+ _b.name = _this.props.name,
12494
+ _b.form = _this.props.form,
12495
+ _b.autoFocus = _this.props.autoFocus,
12496
+ _b.placeholder = _this.props.placeholderText,
12497
+ _b.disabled = _this.props.disabled,
12498
+ _b.autoComplete = _this.props.autoComplete,
12499
+ _b.className = clsx.clsx(customInput.props.className, className),
12500
+ _b.title = _this.props.title,
12501
+ _b.readOnly = _this.props.readOnly,
12502
+ _b.required = _this.props.required,
12503
+ _b.tabIndex = _this.props.tabIndex,
12504
+ _b["aria-describedby"] = _this.props.ariaDescribedBy,
12505
+ _b["aria-invalid"] = _this.props.ariaInvalid,
12506
+ _b["aria-labelledby"] = _this.props.ariaLabelledBy,
12507
+ _b["aria-required"] = _this.props.ariaRequired,
12508
+ _b));
12691
12509
  };
12692
12510
  _this.renderClearButton = function () {
12693
12511
  var _a = _this.props, isClearable = _a.isClearable, disabled = _a.disabled, selected = _a.selected, startDate = _a.startDate, endDate = _a.endDate, clearButtonTitle = _a.clearButtonTitle, _b = _a.clearButtonClassName, clearButtonClassName = _b === void 0 ? "" : _b, _c = _a.ariaLabelClose, ariaLabelClose = _c === void 0 ? "Close" : _c, selectedDates = _a.selectedDates, readOnly = _a.readOnly;
@@ -12775,9 +12593,6 @@ var DatePicker$1 = /** @class */ (function (_super) {
12775
12593
  prevProps.monthsShown !== this.props.monthsShown) {
12776
12594
  this.setState({ monthSelectedIn: 0 });
12777
12595
  }
12778
- if (this.props.selectsRange && this.state.monthSelectedIn !== 0) {
12779
- this.setState({ monthSelectedIn: 0 });
12780
- }
12781
12596
  if (prevProps.highlightDates !== this.props.highlightDates) {
12782
12597
  this.setState({
12783
12598
  highlightDates: getHighLightDaysMap(this.props.highlightDates),
@@ -12831,14 +12646,14 @@ var DatePicker$1 = /** @class */ (function (_super) {
12831
12646
  this.renderInputContainer(),
12832
12647
  portalContainer));
12833
12648
  }
12834
- return (React.createElement(PopperComponent, _assign({}, this.props, { className: this.props.popperClassName, hidePopper: !this.isCalendarOpen(), targetComponent: this.renderInputContainer(), popperComponent: calendar, popperOnKeyDown: this.onPopperKeyDown, showArrow: this.props.showPopperArrow })));
12649
+ return (React.createElement(PopperComponent$1, _assign({}, this.props, { className: this.props.popperClassName, hidePopper: !this.isCalendarOpen(), targetComponent: this.renderInputContainer(), popperComponent: calendar, popperOnKeyDown: this.onPopperKeyDown, showArrow: this.props.showPopperArrow })));
12835
12650
  };
12836
12651
  return DatePicker;
12837
12652
  }(React.Component));
12838
12653
  var PRESELECT_CHANGE_VIA_INPUT = "input";
12839
12654
  var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
12840
12655
 
12841
- var styles = {"datePickerWrapper":"OmFI-Bfdzgw-","fullWidth":"HWDFy10kcYA-","datePicker":"Ma55F5Y-XhE-","inline":"_58kEbTu-IAA-","portalContainer":"LDxKi0E-1rg-","header":"Epg-Ub8Dn9A-","month":"Wx3NP8La95k-"};
12656
+ var styles = {"datePickerWrapper":"OmFI-Bfdzgw-","fullWidth":"HWDFy10kcYA-","datePicker":"Ma55F5Y-XhE-","inline":"_58kEbTu-IAA-","portalContainer":"LDxKi0E-1rg-","header":"Epg-Ub8Dn9A-","month":"Wx3NP8La95k-","spinning":"o0JLwNATy-M-"};
12842
12657
 
12843
12658
  function DatePickerCustomHeader({ monthDate, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, }) {
12844
12659
  return (React.createElement("div", { className: styles.header },