@zendeskgarden/react-datepickers 8.62.1 → 8.62.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.
- package/dist/index.cjs.js +83 -86
- package/dist/index.esm.js +2 -2
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
var React = require('react');
|
|
13
11
|
var PropTypes = require('prop-types');
|
|
14
12
|
var styled = require('styled-components');
|
|
@@ -16,7 +14,7 @@ var reactPopper = require('react-popper');
|
|
|
16
14
|
var containerUtilities = require('@zendeskgarden/container-utilities');
|
|
17
15
|
var reactTheming = require('@zendeskgarden/react-theming');
|
|
18
16
|
|
|
19
|
-
function
|
|
17
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
18
|
|
|
21
19
|
function _interopNamespace(e) {
|
|
22
20
|
if (e && e.__esModule) return e;
|
|
@@ -32,14 +30,13 @@ function _interopNamespace(e) {
|
|
|
32
30
|
}
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
|
-
n
|
|
33
|
+
n.default = e;
|
|
36
34
|
return Object.freeze(n);
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
38
|
+
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
39
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
43
40
|
|
|
44
41
|
const SHARED_PLACEMENT = ['auto', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end'];
|
|
45
42
|
const PLACEMENT = [...SHARED_PLACEMENT, 'end', 'end-top', 'end-bottom', 'start', 'start-top', 'start-bottom'];
|
|
@@ -263,9 +260,9 @@ function getDate(dirtyDate) {
|
|
|
263
260
|
}
|
|
264
261
|
|
|
265
262
|
const COMPONENT_ID$b = 'datepickers.menu';
|
|
266
|
-
const StyledMenu = styled__default
|
|
263
|
+
const StyledMenu = styled__default.default.div.attrs({
|
|
267
264
|
'data-garden-id': COMPONENT_ID$b,
|
|
268
|
-
'data-garden-version': '8.62.
|
|
265
|
+
'data-garden-version': '8.62.2'
|
|
269
266
|
}).withConfig({
|
|
270
267
|
displayName: "StyledMenu",
|
|
271
268
|
componentId: "sc-1npbkk0-0"
|
|
@@ -275,7 +272,7 @@ StyledMenu.defaultProps = {
|
|
|
275
272
|
};
|
|
276
273
|
|
|
277
274
|
const COMPONENT_ID$a = 'datepickers.menu_wrapper';
|
|
278
|
-
const StyledMenuWrapper = styled__default
|
|
275
|
+
const StyledMenuWrapper = styled__default.default.div.attrs(props => ({
|
|
279
276
|
className: props.isAnimated && 'is-animated'
|
|
280
277
|
})).withConfig({
|
|
281
278
|
displayName: "StyledMenuWrapper",
|
|
@@ -303,7 +300,7 @@ const retrievePadding = _ref => {
|
|
|
303
300
|
}
|
|
304
301
|
return `margin: ${value}px;`;
|
|
305
302
|
};
|
|
306
|
-
const StyledDatepicker = styled__default
|
|
303
|
+
const StyledDatepicker = styled__default.default.div.attrs({
|
|
307
304
|
'data-garden-id': COMPONENT_ID$9
|
|
308
305
|
}).withConfig({
|
|
309
306
|
displayName: "StyledDatepicker",
|
|
@@ -314,7 +311,7 @@ StyledDatepicker.defaultProps = {
|
|
|
314
311
|
};
|
|
315
312
|
|
|
316
313
|
const COMPONENT_ID$8 = 'datepickers.range_calendar';
|
|
317
|
-
const StyledRangeCalendar = styled__default
|
|
314
|
+
const StyledRangeCalendar = styled__default.default.div.attrs({
|
|
318
315
|
'data-garden-id': COMPONENT_ID$8
|
|
319
316
|
}).withConfig({
|
|
320
317
|
displayName: "StyledRangeCalendar",
|
|
@@ -325,7 +322,7 @@ StyledRangeCalendar.defaultProps = {
|
|
|
325
322
|
};
|
|
326
323
|
|
|
327
324
|
const COMPONENT_ID$7 = 'datepickers.header';
|
|
328
|
-
const StyledHeader = styled__default
|
|
325
|
+
const StyledHeader = styled__default.default.div.attrs({
|
|
329
326
|
'data-garden-id': COMPONENT_ID$7
|
|
330
327
|
}).withConfig({
|
|
331
328
|
displayName: "StyledHeader",
|
|
@@ -353,7 +350,7 @@ const retrieveColor$1 = _ref2 => {
|
|
|
353
350
|
return styled.css([":hover{background-color:", ";color:", ";}:active{background-color:", ";color:", ";}color:", ";"], reactTheming.getColor('primaryHue', 600, theme, 0.08), theme.colors.foreground, reactTheming.getColor('primaryHue', 600, theme, 0.2), theme.colors.foreground, reactTheming.getColor('neutralHue', 600, theme));
|
|
354
351
|
};
|
|
355
352
|
const COMPONENT_ID$6 = 'datepickers.header_paddle';
|
|
356
|
-
const StyledHeaderPaddle = styled__default
|
|
353
|
+
const StyledHeaderPaddle = styled__default.default.div.attrs({
|
|
357
354
|
'data-garden-id': COMPONENT_ID$6
|
|
358
355
|
}).withConfig({
|
|
359
356
|
displayName: "StyledHeaderPaddle",
|
|
@@ -364,7 +361,7 @@ StyledHeaderPaddle.defaultProps = {
|
|
|
364
361
|
};
|
|
365
362
|
|
|
366
363
|
const COMPONENT_ID$5 = 'datepickers.header_label';
|
|
367
|
-
const StyledHeaderLabel = styled__default
|
|
364
|
+
const StyledHeaderLabel = styled__default.default.div.attrs({
|
|
368
365
|
'data-garden-id': COMPONENT_ID$5
|
|
369
366
|
}).withConfig({
|
|
370
367
|
displayName: "StyledHeaderLabel",
|
|
@@ -375,7 +372,7 @@ StyledHeaderLabel.defaultProps = {
|
|
|
375
372
|
};
|
|
376
373
|
|
|
377
374
|
const COMPONENT_ID$4 = 'datepickers.calendar';
|
|
378
|
-
const StyledCalendar = styled__default
|
|
375
|
+
const StyledCalendar = styled__default.default.div.attrs({
|
|
379
376
|
'data-garden-id': COMPONENT_ID$4
|
|
380
377
|
}).withConfig({
|
|
381
378
|
displayName: "StyledCalendar",
|
|
@@ -399,7 +396,7 @@ const retrieveSize = _ref => {
|
|
|
399
396
|
}
|
|
400
397
|
return styled.css(["width:", ";height:", ";"], size, size);
|
|
401
398
|
};
|
|
402
|
-
const StyledCalendarItem = styled__default
|
|
399
|
+
const StyledCalendarItem = styled__default.default.div.attrs({
|
|
403
400
|
'data-garden-id': COMPONENT_ID$3
|
|
404
401
|
}).withConfig({
|
|
405
402
|
displayName: "StyledCalendarItem",
|
|
@@ -410,7 +407,7 @@ StyledCalendarItem.defaultProps = {
|
|
|
410
407
|
};
|
|
411
408
|
|
|
412
409
|
const COMPONENT_ID$2 = 'datepickers.day_label';
|
|
413
|
-
const StyledDayLabel = styled__default
|
|
410
|
+
const StyledDayLabel = styled__default.default.div.attrs({
|
|
414
411
|
'data-garden-id': COMPONENT_ID$2
|
|
415
412
|
}).withConfig({
|
|
416
413
|
displayName: "StyledDayLabel",
|
|
@@ -453,7 +450,7 @@ const retrieveColor = _ref2 => {
|
|
|
453
450
|
}
|
|
454
451
|
return styled.css([""]);
|
|
455
452
|
};
|
|
456
|
-
const StyledHighlight = styled__default
|
|
453
|
+
const StyledHighlight = styled__default.default.div.attrs({
|
|
457
454
|
'data-garden-id': COMPONENT_ID$1
|
|
458
455
|
}).withConfig({
|
|
459
456
|
displayName: "StyledHighlight",
|
|
@@ -496,7 +493,7 @@ const retrieveStyledDayColors = _ref => {
|
|
|
496
493
|
`);
|
|
497
494
|
};
|
|
498
495
|
const COMPONENT_ID = 'datepickers.day';
|
|
499
|
-
const StyledDay = styled__default
|
|
496
|
+
const StyledDay = styled__default.default.div.attrs(props => ({
|
|
500
497
|
'data-garden-id': COMPONENT_ID,
|
|
501
498
|
'aria-disabled': props.isDisabled ? 'true' : 'false'
|
|
502
499
|
})).withConfig({
|
|
@@ -647,25 +644,25 @@ const MonthSelector = _ref => {
|
|
|
647
644
|
});
|
|
648
645
|
return formatter.format(date);
|
|
649
646
|
}, [locale]);
|
|
650
|
-
return
|
|
647
|
+
return React__namespace.default.createElement(StyledHeader, {
|
|
651
648
|
isCompact: isCompact
|
|
652
|
-
},
|
|
649
|
+
}, React__namespace.default.createElement(StyledHeaderPaddle, {
|
|
653
650
|
isCompact: isCompact,
|
|
654
651
|
onClick: () => {
|
|
655
652
|
dispatch({
|
|
656
653
|
type: 'PREVIEW_PREVIOUS_MONTH'
|
|
657
654
|
});
|
|
658
655
|
}
|
|
659
|
-
},
|
|
656
|
+
}, React__namespace.default.createElement(SvgChevronLeftStroke, null)), React__namespace.default.createElement(StyledHeaderLabel, {
|
|
660
657
|
isCompact: isCompact
|
|
661
|
-
}, headerLabelFormatter(state.previewDate)),
|
|
658
|
+
}, headerLabelFormatter(state.previewDate)), React__namespace.default.createElement(StyledHeaderPaddle, {
|
|
662
659
|
isCompact: isCompact,
|
|
663
660
|
onClick: () => {
|
|
664
661
|
dispatch({
|
|
665
662
|
type: 'PREVIEW_NEXT_MONTH'
|
|
666
663
|
});
|
|
667
664
|
}
|
|
668
|
-
},
|
|
665
|
+
}, React__namespace.default.createElement(SvgChevronRightStroke, null)));
|
|
669
666
|
};
|
|
670
667
|
|
|
671
668
|
const Calendar$1 = React.forwardRef((_ref, ref) => {
|
|
@@ -701,10 +698,10 @@ const Calendar$1 = React.forwardRef((_ref, ref) => {
|
|
|
701
698
|
end: addDays(startDate, 6)
|
|
702
699
|
}).map(date => {
|
|
703
700
|
const formattedDayLabel = dayLabelFormatter(date);
|
|
704
|
-
return
|
|
701
|
+
return React__namespace.default.createElement(StyledCalendarItem, {
|
|
705
702
|
key: `day-label-${formattedDayLabel}`,
|
|
706
703
|
isCompact: isCompact
|
|
707
|
-
},
|
|
704
|
+
}, React__namespace.default.createElement(StyledDayLabel, {
|
|
708
705
|
isCompact: isCompact
|
|
709
706
|
}, formattedDayLabel));
|
|
710
707
|
});
|
|
@@ -723,10 +720,10 @@ const Calendar$1 = React.forwardRef((_ref, ref) => {
|
|
|
723
720
|
if (maxValue !== undefined) {
|
|
724
721
|
isDisabled = isDisabled || isAfter(date, maxValue) && !isSameDay(date, maxValue);
|
|
725
722
|
}
|
|
726
|
-
return
|
|
723
|
+
return React__namespace.default.createElement(StyledCalendarItem, {
|
|
727
724
|
key: `day-${itemsIndex}`,
|
|
728
725
|
isCompact: isCompact
|
|
729
|
-
},
|
|
726
|
+
}, React__namespace.default.createElement(StyledDay, {
|
|
730
727
|
isToday: isCurrentDate,
|
|
731
728
|
isPreviousMonth: isPreviousMonth,
|
|
732
729
|
isSelected: isSelected,
|
|
@@ -742,16 +739,16 @@ const Calendar$1 = React.forwardRef((_ref, ref) => {
|
|
|
742
739
|
}
|
|
743
740
|
}, formattedDayLabel));
|
|
744
741
|
});
|
|
745
|
-
return
|
|
742
|
+
return React__namespace.default.createElement(StyledDatepicker, {
|
|
746
743
|
ref: ref,
|
|
747
744
|
isCompact: isCompact,
|
|
748
745
|
onMouseDown: e => {
|
|
749
746
|
e.preventDefault();
|
|
750
747
|
}
|
|
751
|
-
},
|
|
748
|
+
}, React__namespace.default.createElement(MonthSelector, {
|
|
752
749
|
locale: locale,
|
|
753
750
|
isCompact: isCompact
|
|
754
|
-
}),
|
|
751
|
+
}), React__namespace.default.createElement(StyledCalendar, {
|
|
755
752
|
isCompact: isCompact
|
|
756
753
|
}, dayLabels, items));
|
|
757
754
|
});
|
|
@@ -3176,14 +3173,14 @@ const Datepicker = React.forwardRef((props, calendarRef) => {
|
|
|
3176
3173
|
state,
|
|
3177
3174
|
dispatch
|
|
3178
3175
|
}), [state, dispatch]);
|
|
3179
|
-
return
|
|
3176
|
+
return React__namespace.default.createElement(DatepickerContext.Provider, {
|
|
3180
3177
|
value: contextValue
|
|
3181
|
-
},
|
|
3178
|
+
}, React__namespace.default.createElement(reactPopper.Manager, null, React__namespace.default.createElement(reactPopper.Reference, null, _ref => {
|
|
3182
3179
|
let {
|
|
3183
3180
|
ref
|
|
3184
3181
|
} = _ref;
|
|
3185
|
-
const childElement =
|
|
3186
|
-
return
|
|
3182
|
+
const childElement = React__namespace.default.Children.only(children);
|
|
3183
|
+
return React__namespace.default.cloneElement(childElement, {
|
|
3187
3184
|
[refKey]: refValue => {
|
|
3188
3185
|
ref(refValue);
|
|
3189
3186
|
inputRef.current = refValue;
|
|
@@ -3234,7 +3231,7 @@ const Datepicker = React.forwardRef((props, calendarRef) => {
|
|
|
3234
3231
|
autoComplete: 'off',
|
|
3235
3232
|
value: state.inputValue
|
|
3236
3233
|
});
|
|
3237
|
-
}),
|
|
3234
|
+
}), React__namespace.default.createElement(reactPopper.Popper, {
|
|
3238
3235
|
placement: popperPlacement,
|
|
3239
3236
|
modifiers: popperModifiers
|
|
3240
3237
|
,
|
|
@@ -3247,14 +3244,14 @@ const Datepicker = React.forwardRef((props, calendarRef) => {
|
|
|
3247
3244
|
placement: currentPlacement
|
|
3248
3245
|
} = _ref2;
|
|
3249
3246
|
scheduleUpdateRef.current = scheduleUpdate;
|
|
3250
|
-
return
|
|
3247
|
+
return React__namespace.default.createElement(StyledMenuWrapper, {
|
|
3251
3248
|
ref: ref,
|
|
3252
3249
|
style: style,
|
|
3253
3250
|
isHidden: !state.isOpen,
|
|
3254
3251
|
isAnimated: isAnimated && (state.isOpen || isVisible),
|
|
3255
3252
|
placement: currentPlacement,
|
|
3256
3253
|
zIndex: zIndex
|
|
3257
|
-
}, (state.isOpen || isVisible) &&
|
|
3254
|
+
}, (state.isOpen || isVisible) && React__namespace.default.createElement(StyledMenu, menuProps, React__namespace.default.createElement(Calendar$1, {
|
|
3258
3255
|
ref: calendarRef,
|
|
3259
3256
|
isCompact: isCompact,
|
|
3260
3257
|
value: value,
|
|
@@ -3267,21 +3264,21 @@ const Datepicker = React.forwardRef((props, calendarRef) => {
|
|
|
3267
3264
|
});
|
|
3268
3265
|
Datepicker.displayName = 'Datepicker';
|
|
3269
3266
|
Datepicker.propTypes = {
|
|
3270
|
-
value: PropTypes__default
|
|
3271
|
-
onChange: PropTypes__default
|
|
3272
|
-
formatDate: PropTypes__default
|
|
3273
|
-
locale: PropTypes__default
|
|
3274
|
-
weekStartsOn: PropTypes__default
|
|
3275
|
-
minValue: PropTypes__default
|
|
3276
|
-
maxValue: PropTypes__default
|
|
3277
|
-
isCompact: PropTypes__default
|
|
3278
|
-
customParseDate: PropTypes__default
|
|
3279
|
-
refKey: PropTypes__default
|
|
3280
|
-
placement: PropTypes__default
|
|
3281
|
-
popperModifiers: PropTypes__default
|
|
3282
|
-
isAnimated: PropTypes__default
|
|
3283
|
-
eventsEnabled: PropTypes__default
|
|
3284
|
-
zIndex: PropTypes__default
|
|
3267
|
+
value: PropTypes__default.default.any,
|
|
3268
|
+
onChange: PropTypes__default.default.any,
|
|
3269
|
+
formatDate: PropTypes__default.default.func,
|
|
3270
|
+
locale: PropTypes__default.default.any,
|
|
3271
|
+
weekStartsOn: PropTypes__default.default.number,
|
|
3272
|
+
minValue: PropTypes__default.default.any,
|
|
3273
|
+
maxValue: PropTypes__default.default.any,
|
|
3274
|
+
isCompact: PropTypes__default.default.bool,
|
|
3275
|
+
customParseDate: PropTypes__default.default.any,
|
|
3276
|
+
refKey: PropTypes__default.default.string,
|
|
3277
|
+
placement: PropTypes__default.default.oneOf(PLACEMENT),
|
|
3278
|
+
popperModifiers: PropTypes__default.default.any,
|
|
3279
|
+
isAnimated: PropTypes__default.default.bool,
|
|
3280
|
+
eventsEnabled: PropTypes__default.default.bool,
|
|
3281
|
+
zIndex: PropTypes__default.default.number
|
|
3285
3282
|
};
|
|
3286
3283
|
Datepicker.defaultProps = {
|
|
3287
3284
|
placement: 'bottom-start',
|
|
@@ -3665,8 +3662,8 @@ const Start = props => {
|
|
|
3665
3662
|
handleBlur();
|
|
3666
3663
|
props.children.props.onBlur && props.children.props.onBlur(e);
|
|
3667
3664
|
}, [handleBlur, props.children]);
|
|
3668
|
-
const childElement =
|
|
3669
|
-
return
|
|
3665
|
+
const childElement = React__namespace.default.Children.only(props.children);
|
|
3666
|
+
return React__namespace.default.cloneElement(childElement, {
|
|
3670
3667
|
value: state.startInputValue || '',
|
|
3671
3668
|
ref: startInputRef,
|
|
3672
3669
|
onChange: containerUtilities.composeEventHandlers(childElement.props.onChange, onChangeCallback),
|
|
@@ -3730,8 +3727,8 @@ const End = props => {
|
|
|
3730
3727
|
handleBlur();
|
|
3731
3728
|
props.children.props.onBlur && props.children.props.onBlur(e);
|
|
3732
3729
|
}, [handleBlur, props.children]);
|
|
3733
|
-
const childElement =
|
|
3734
|
-
return
|
|
3730
|
+
const childElement = React__namespace.default.Children.only(props.children);
|
|
3731
|
+
return React__namespace.default.cloneElement(childElement, {
|
|
3735
3732
|
value: state.endInputValue || '',
|
|
3736
3733
|
ref: endInputRef,
|
|
3737
3734
|
onChange: containerUtilities.composeEventHandlers(childElement.props.onChange, onChangeCallback),
|
|
@@ -3814,10 +3811,10 @@ const Month = React.forwardRef((_ref, ref) => {
|
|
|
3814
3811
|
end: addDays(startDate, 6)
|
|
3815
3812
|
}).map(date => {
|
|
3816
3813
|
const formattedDayLabel = dayLabelFormatter(date);
|
|
3817
|
-
return
|
|
3814
|
+
return React__namespace.default.createElement(StyledCalendarItem, {
|
|
3818
3815
|
key: `day-label-${formattedDayLabel}`,
|
|
3819
3816
|
isCompact: isCompact
|
|
3820
|
-
},
|
|
3817
|
+
}, React__namespace.default.createElement(StyledDayLabel, {
|
|
3821
3818
|
isCompact: isCompact
|
|
3822
3819
|
}, formattedDayLabel));
|
|
3823
3820
|
});
|
|
@@ -3829,10 +3826,10 @@ const Month = React.forwardRef((_ref, ref) => {
|
|
|
3829
3826
|
const isCurrentDate = isToday(date);
|
|
3830
3827
|
const isPreviousMonth = !isSameMonth(date, displayDate);
|
|
3831
3828
|
if (isPreviousMonth) {
|
|
3832
|
-
return
|
|
3829
|
+
return React__namespace.default.createElement(StyledCalendarItem, {
|
|
3833
3830
|
key: `day-${itemsIndex}`,
|
|
3834
3831
|
isCompact: isCompact
|
|
3835
|
-
},
|
|
3832
|
+
}, React__namespace.default.createElement(StyledDay, {
|
|
3836
3833
|
isCompact: isCompact,
|
|
3837
3834
|
isPreviousMonth: true,
|
|
3838
3835
|
isDisabled: true
|
|
@@ -3877,14 +3874,14 @@ const Month = React.forwardRef((_ref, ref) => {
|
|
|
3877
3874
|
isInvalidDateRange = isInvalidDateRange || compareAsc(endValue, maxValue) === 1;
|
|
3878
3875
|
}
|
|
3879
3876
|
}
|
|
3880
|
-
return
|
|
3877
|
+
return React__namespace.default.createElement(StyledCalendarItem, {
|
|
3881
3878
|
key: `day-${itemsIndex}`,
|
|
3882
3879
|
isCompact: isCompact
|
|
3883
|
-
},
|
|
3880
|
+
}, React__namespace.default.createElement(StyledHighlight, {
|
|
3884
3881
|
isHighlighted: !isInvalidDateRange && isHighlighted && !isDisabled,
|
|
3885
3882
|
isStart: !isInvalidDateRange && isHighlightStart,
|
|
3886
3883
|
isEnd: !isInvalidDateRange && isHighlightEnd
|
|
3887
|
-
}),
|
|
3884
|
+
}), React__namespace.default.createElement(StyledDay, {
|
|
3888
3885
|
isToday: isCurrentDate,
|
|
3889
3886
|
isPreviousMonth: isPreviousMonth,
|
|
3890
3887
|
isSelected: !isInvalidDateRange && isSelected,
|
|
@@ -3957,15 +3954,15 @@ const Month = React.forwardRef((_ref, ref) => {
|
|
|
3957
3954
|
}
|
|
3958
3955
|
}, formattedDayLabel));
|
|
3959
3956
|
});
|
|
3960
|
-
return
|
|
3957
|
+
return React__namespace.default.createElement(StyledDatepicker, {
|
|
3961
3958
|
ref: ref,
|
|
3962
3959
|
isCompact: isCompact,
|
|
3963
3960
|
onMouseDown: e => {
|
|
3964
3961
|
e.preventDefault();
|
|
3965
3962
|
}
|
|
3966
|
-
},
|
|
3963
|
+
}, React__namespace.default.createElement(StyledHeader, {
|
|
3967
3964
|
isCompact: isCompact
|
|
3968
|
-
},
|
|
3965
|
+
}, React__namespace.default.createElement(StyledHeaderPaddle, {
|
|
3969
3966
|
isCompact: isCompact,
|
|
3970
3967
|
onClick: () => {
|
|
3971
3968
|
dispatch({
|
|
@@ -3973,9 +3970,9 @@ const Month = React.forwardRef((_ref, ref) => {
|
|
|
3973
3970
|
});
|
|
3974
3971
|
},
|
|
3975
3972
|
isHidden: isPreviousHidden
|
|
3976
|
-
},
|
|
3973
|
+
}, React__namespace.default.createElement(SvgChevronLeftStroke, null)), React__namespace.default.createElement(StyledHeaderLabel, {
|
|
3977
3974
|
isCompact: isCompact
|
|
3978
|
-
}, headerLabelFormatter(displayDate)),
|
|
3975
|
+
}, headerLabelFormatter(displayDate)), React__namespace.default.createElement(StyledHeaderPaddle, {
|
|
3979
3976
|
isCompact: isCompact,
|
|
3980
3977
|
isHidden: isNextHidden,
|
|
3981
3978
|
onClick: () => {
|
|
@@ -3983,7 +3980,7 @@ const Month = React.forwardRef((_ref, ref) => {
|
|
|
3983
3980
|
type: 'PREVIEW_NEXT_MONTH'
|
|
3984
3981
|
});
|
|
3985
3982
|
}
|
|
3986
|
-
},
|
|
3983
|
+
}, React__namespace.default.createElement(SvgChevronRightStroke, null))), React__namespace.default.createElement(StyledCalendar, {
|
|
3987
3984
|
isCompact: isCompact,
|
|
3988
3985
|
onMouseLeave: () => {
|
|
3989
3986
|
dispatch({
|
|
@@ -3999,14 +3996,14 @@ const Calendar = React.forwardRef((props, ref) => {
|
|
|
3999
3996
|
const {
|
|
4000
3997
|
state
|
|
4001
3998
|
} = useDatepickerContext();
|
|
4002
|
-
return
|
|
3999
|
+
return React__namespace.default.createElement(StyledRangeCalendar, _extends({
|
|
4003
4000
|
ref: ref,
|
|
4004
4001
|
"data-garden-id": "datepickers.range",
|
|
4005
|
-
"data-garden-version": '8.62.
|
|
4006
|
-
}, props),
|
|
4002
|
+
"data-garden-version": '8.62.2'
|
|
4003
|
+
}, props), React__namespace.default.createElement(Month, {
|
|
4007
4004
|
displayDate: state.previewDate,
|
|
4008
4005
|
isNextHidden: true
|
|
4009
|
-
}),
|
|
4006
|
+
}), React__namespace.default.createElement(Month, {
|
|
4010
4007
|
displayDate: addMonths(state.previewDate, 1),
|
|
4011
4008
|
isPreviousHidden: true
|
|
4012
4009
|
}));
|
|
@@ -4074,21 +4071,21 @@ const DatepickerRangeComponent = props => {
|
|
|
4074
4071
|
endInputRef,
|
|
4075
4072
|
customParseDate
|
|
4076
4073
|
}), [state, dispatch, isCompact, locale, weekStartsOn, minValue, maxValue, startValue, endValue, onChange, startInputRef, endInputRef, customParseDate]);
|
|
4077
|
-
return
|
|
4074
|
+
return React__namespace.default.createElement(DatepickerRangeContext.Provider, {
|
|
4078
4075
|
value: value
|
|
4079
4076
|
}, children);
|
|
4080
4077
|
};
|
|
4081
4078
|
DatepickerRangeComponent.propTypes = {
|
|
4082
|
-
locale: PropTypes__default
|
|
4083
|
-
weekStartsOn: PropTypes__default
|
|
4084
|
-
startValue: PropTypes__default
|
|
4085
|
-
endValue: PropTypes__default
|
|
4086
|
-
minValue: PropTypes__default
|
|
4087
|
-
maxValue: PropTypes__default
|
|
4088
|
-
onChange: PropTypes__default
|
|
4089
|
-
formatDate: PropTypes__default
|
|
4090
|
-
customParseDate: PropTypes__default
|
|
4091
|
-
isCompact: PropTypes__default
|
|
4079
|
+
locale: PropTypes__default.default.string,
|
|
4080
|
+
weekStartsOn: PropTypes__default.default.number,
|
|
4081
|
+
startValue: PropTypes__default.default.instanceOf(Date),
|
|
4082
|
+
endValue: PropTypes__default.default.instanceOf(Date),
|
|
4083
|
+
minValue: PropTypes__default.default.instanceOf(Date),
|
|
4084
|
+
maxValue: PropTypes__default.default.instanceOf(Date),
|
|
4085
|
+
onChange: PropTypes__default.default.func,
|
|
4086
|
+
formatDate: PropTypes__default.default.func,
|
|
4087
|
+
customParseDate: PropTypes__default.default.func,
|
|
4088
|
+
isCompact: PropTypes__default.default.bool
|
|
4092
4089
|
};
|
|
4093
4090
|
DatepickerRangeComponent.defaultProps = {
|
|
4094
4091
|
locale: 'en-US',
|
package/dist/index.esm.js
CHANGED
|
@@ -237,7 +237,7 @@ function getDate(dirtyDate) {
|
|
|
237
237
|
const COMPONENT_ID$b = 'datepickers.menu';
|
|
238
238
|
const StyledMenu = styled.div.attrs({
|
|
239
239
|
'data-garden-id': COMPONENT_ID$b,
|
|
240
|
-
'data-garden-version': '8.62.
|
|
240
|
+
'data-garden-version': '8.62.2'
|
|
241
241
|
}).withConfig({
|
|
242
242
|
displayName: "StyledMenu",
|
|
243
243
|
componentId: "sc-1npbkk0-0"
|
|
@@ -3974,7 +3974,7 @@ const Calendar = forwardRef((props, ref) => {
|
|
|
3974
3974
|
return React__default.createElement(StyledRangeCalendar, _extends({
|
|
3975
3975
|
ref: ref,
|
|
3976
3976
|
"data-garden-id": "datepickers.range",
|
|
3977
|
-
"data-garden-version": '8.62.
|
|
3977
|
+
"data-garden-version": '8.62.2'
|
|
3978
3978
|
}, props), React__default.createElement(Month, {
|
|
3979
3979
|
displayDate: state.previewDate,
|
|
3980
3980
|
isNextHidden: true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-datepickers",
|
|
3
|
-
"version": "8.62.
|
|
3
|
+
"version": "8.62.2",
|
|
4
4
|
"description": "Components relating to datepickers in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"styled-components": "^4.2.0 || ^5.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zendeskgarden/react-theming": "^8.62.
|
|
36
|
+
"@zendeskgarden/react-theming": "^8.62.2",
|
|
37
37
|
"@zendeskgarden/svg-icons": "6.33.0"
|
|
38
38
|
},
|
|
39
39
|
"keywords": [
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"zendeskgarden:src": "src/index.ts",
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "27a7d6c021f3360396af60d51ecbf66e9076a405"
|
|
50
50
|
}
|