react-day-picker 8.3.1 → 8.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1320,7 +1320,14 @@ displayMonth) {
1320
1320
  return activeModifiers;
1321
1321
  }
1322
1322
 
1323
- /** Returns the day that should be the target of the focus when DayPicker is rendered the first time. */
1323
+ /**
1324
+ * Returns the day that should be the target of the focus when DayPicker is
1325
+ * rendered the first time.
1326
+ *
1327
+ * TODO: this function doesn't consider if the day is outside the month. We
1328
+ * implemented this check in `useDayRender` but it should probably go here. See
1329
+ * https://github.com/gpbl/react-day-picker/pull/1576
1330
+ */
1324
1331
  function getInitialFocusTarget(displayMonths, modifiers) {
1325
1332
  var firstDayInMonth = startOfMonth__default["default"](displayMonths[0]);
1326
1333
  var lastDayInMonth = endOfMonth__default["default"](displayMonths[displayMonths.length - 1]);
@@ -1796,7 +1803,9 @@ buttonRef) {
1796
1803
  children: children,
1797
1804
  'aria-label': ariaLabel
1798
1805
  };
1799
- var isFocusTarget = Boolean(focusContext.focusTarget && isSameDay__default["default"](focusContext.focusTarget, day));
1806
+ var isFocusTarget = focusContext.focusTarget &&
1807
+ isSameDay__default["default"](focusContext.focusTarget, day) &&
1808
+ !activeModifiers.outside;
1800
1809
  var buttonProps = __assign(__assign(__assign({}, divProps), (_a = { disabled: activeModifiers.disabled }, _a['aria-pressed'] = activeModifiers.selected, _a['aria-label'] = ariaLabel, _a.tabIndex = isFocusTarget ? 0 : -1, _a)), eventHandlers);
1801
1810
  var dayRender = {
1802
1811
  isButton: isButton,