@stenajs-webui/calendar 15.0.0-alpha.6 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2082,14 +2082,14 @@ var useUserInputHandlers = function (startDate, endDate, onValueChange, startDat
2082
2082
  };
2083
2083
 
2084
2084
  var DateRangeDualTextInput = function (_a) {
2085
- var value = _a.value, onValueChange = _a.onValueChange, autoFocus = _a.autoFocus, onBlur = _a.onBlur, onEnter = _a.onEnter, onEsc = _a.onEsc, minDate = _a.minDate, _b = _a.maxDate, maxDate = _b === void 0 ? defaultMaxDate : _b, calendarProps = _a.calendarProps;
2086
- var _c = value || {}, startDate = _c.startDate, endDate = _c.endDate;
2085
+ var value = _a.value, onValueChange = _a.onValueChange, autoFocus = _a.autoFocus, onBlur = _a.onBlur, onEnter = _a.onEnter, onEsc = _a.onEsc, minDate = _a.minDate, _b = _a.maxDate, maxDate = _b === void 0 ? defaultMaxDate : _b, calendarProps = _a.calendarProps, _c = _a.widthLeft, widthLeft = _c === void 0 ? 128 : _c, _d = _a.widthRight, widthRight = _d === void 0 ? 128 : _d;
2086
+ var _e = value || {}, startDate = _e.startDate, endDate = _e.endDate;
2087
2087
  var startDateInputRef = React.useRef(null);
2088
2088
  var endDateInputRef = React.useRef(null);
2089
2089
  var states = useInputStates(startDate, endDate);
2090
2090
  var dateInFocus = states.dateInFocus, setDateInFocus = states.setDateInFocus, isCalendarVisible = states.isCalendarVisible, currentPanel = states.currentPanel, setCurrentPanel = states.setCurrentPanel;
2091
- var _d = useDateRangeHandlers(startDate, endDate, onValueChange, states), showCalendar = _d.showCalendar, hideCalendar = _d.hideCalendar, inputLeftChangeHandler = _d.inputLeftChangeHandler, inputRightChangeHandler = _d.inputRightChangeHandler;
2092
- var _e = useUserInputHandlers(startDate, endDate, onValueChange, startDateInputRef, endDateInputRef, showCalendar, hideCalendar, states), onKeyDownHandler = _e.onKeyDownHandler, onFocusRight = _e.onFocusRight, onFocusLeft = _e.onFocusLeft, onClickDay = _e.onClickDay, onClickCalendarButton = _e.onClickCalendarButton, onClickArrowButton = _e.onClickArrowButton;
2091
+ var _f = useDateRangeHandlers(startDate, endDate, onValueChange, states), showCalendar = _f.showCalendar, hideCalendar = _f.hideCalendar, inputLeftChangeHandler = _f.inputLeftChangeHandler, inputRightChangeHandler = _f.inputRightChangeHandler;
2092
+ var _g = useUserInputHandlers(startDate, endDate, onValueChange, startDateInputRef, endDateInputRef, showCalendar, hideCalendar, states), onKeyDownHandler = _g.onKeyDownHandler, onFocusRight = _g.onFocusRight, onFocusLeft = _g.onFocusLeft, onClickDay = _g.onClickDay, onClickCalendarButton = _g.onClickCalendarButton, onClickArrowButton = _g.onClickArrowButton;
2093
2093
  useDateRangeEffects(startDate, endDate, setDateInFocus, startDateInputRef, endDateInputRef);
2094
2094
  var startDateIsAfterEnd = React.useMemo(function () { return startDate && endDate && dateFns.isAfter(startDate, endDate); }, [startDate, endDate]);
2095
2095
  var statePerMonth = React.useMemo(function () {
@@ -2098,7 +2098,7 @@ var DateRangeDualTextInput = function (_a) {
2098
2098
  var delayedIsCalendarVisible = core.useDelayedFalse(isCalendarVisible, 300);
2099
2099
  return (React__namespace.createElement(core.Box, { onKeyDown: onKeyDownHandler },
2100
2100
  React__namespace.createElement(tooltip.Popover, { arrow: false, lazy: true, placement: defaultPopoverPlacement, onClickOutside: hideCalendar, visible: isCalendarVisible, content: delayedIsCalendarVisible && (React__namespace.createElement(CalendarWithMonthSwitcher, __assign({ onClickDay: onClickDay, dateInFocus: dateInFocus, setDateInFocus: setDateInFocus, currentPanel: currentPanel, setCurrentPanel: setCurrentPanel, minDate: minDate, maxDate: maxDate }, calendarProps, { statePerMonth: statePerMonth }))) },
2101
- React__namespace.createElement(DualTextInput, { autoFocusLeft: autoFocus, onEsc: onEsc, onEnter: onEnter, onBlur: onBlur, separatorIcon: elements.stenaArrowRight, typeLeft: "date", typeRight: "date", placeholderLeft: "Start date", placeholderRight: "End date", onChangeLeft: inputLeftChangeHandler, onChangeRight: inputRightChangeHandler, onClickArrowDown: onClickArrowButton, onClickCalendar: onClickCalendarButton, onFocusLeft: onFocusLeft, onFocusRight: onFocusRight, onClickLeft: onFocusLeft, onClickRight: onFocusRight, inputRefLeft: startDateInputRef, inputRefRight: endDateInputRef, variant: startDateIsAfterEnd ? "error" : undefined, widthLeft: "104px", widthRight: "104px", minLeft: minDate, maxLeft: maxDate, minRight: minDate, maxRight: maxDate }))));
2101
+ React__namespace.createElement(DualTextInput, { autoFocusLeft: autoFocus, onEsc: onEsc, onEnter: onEnter, onBlur: onBlur, separatorIcon: elements.stenaArrowRight, typeLeft: "date", typeRight: "date", placeholderLeft: "Start date", placeholderRight: "End date", onChangeLeft: inputLeftChangeHandler, onChangeRight: inputRightChangeHandler, onClickArrowDown: onClickArrowButton, onClickCalendar: onClickCalendarButton, onFocusLeft: onFocusLeft, onFocusRight: onFocusRight, onClickLeft: onFocusLeft, onClickRight: onFocusRight, inputRefLeft: startDateInputRef, inputRefRight: endDateInputRef, variant: startDateIsAfterEnd ? "error" : undefined, widthLeft: widthLeft, widthRight: widthRight, minLeft: minDate, maxLeft: maxDate, minRight: minDate, maxRight: maxDate }))));
2102
2102
  };
2103
2103
 
2104
2104
  exports.Calendar = Calendar;