@semcore/date-picker 16.2.1-prerelease.5 → 16.2.2-prerelease.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/CHANGELOG.md +7 -1
- package/lib/cjs/components/Calendar.js +21 -21
- package/lib/cjs/components/DateRangeComparatorAbstract.js +57 -34
- package/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
- package/lib/cjs/components/InputTrigger.js +29 -29
- package/lib/cjs/components/PickerAbstract.js +37 -31
- package/lib/cjs/components/PickerAbstract.js.map +1 -1
- package/lib/cjs/components/RangePickerAbstract.js +60 -36
- package/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/lib/cjs/components/index.js +3 -1
- package/lib/cjs/components/index.js.map +1 -1
- package/lib/es6/components/Calendar.js +21 -21
- package/lib/es6/components/DateRangeComparatorAbstract.js +57 -34
- package/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
- package/lib/es6/components/InputTrigger.js +29 -29
- package/lib/es6/components/PickerAbstract.js +37 -31
- package/lib/es6/components/PickerAbstract.js.map +1 -1
- package/lib/es6/components/RangePickerAbstract.js +60 -36
- package/lib/es6/components/RangePickerAbstract.js.map +1 -1
- package/lib/es6/components/index.js +3 -1
- package/lib/es6/components/index.js.map +1 -1
- package/lib/esm/components/Calendar.mjs +22 -22
- package/lib/esm/components/DateRangeComparatorAbstract.mjs +57 -35
- package/lib/esm/components/InputTrigger.mjs +30 -30
- package/lib/esm/components/PickerAbstract.mjs +37 -32
- package/lib/esm/components/RangePickerAbstract.mjs +60 -37
- package/lib/esm/components/index.mjs +2 -1
- package/package.json +17 -17
|
@@ -23,39 +23,39 @@ var style = (
|
|
|
23
23
|
/*__reshadow_css_start__*/
|
|
24
24
|
(sstyled.insert(
|
|
25
25
|
/*__inner_css_start__*/
|
|
26
|
-
".
|
|
26
|
+
".___SPopper_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_14wv6_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_14wv6_gg_:active,.___SPopper_14wv6_gg_:focus{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_14wv6_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___SHeader_14wv6_gg_,.___STitle_14wv6_gg_{display:flex;align-items:center}.___STitle_14wv6_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_14wv6_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_14wv6_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_14wv6_gg_ .___SInner_14wv6_gg_{justify-content:flex-start}.___SInputMask_14wv6_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal;padding-right:var(--intergalactic-spacing-2x, 8px);transition:width calc(var(--intergalactic-duration-medium, 300)*1ms) ease,min-width calc(var(--intergalactic-duration-medium, 300)*1ms) ease}.___SInputMask_14wv6_gg_.__animationsDisabled_14wv6_gg_{transition:none}.___SInputMask_14wv6_gg_ .___SValue_14wv6_gg_{letter-spacing:0}.___SInputMask_14wv6_gg_ .___SValue_14wv6_gg_:focus{outline:0}.___SIndicator_14wv6_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_14wv6_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_14wv6_gg_._range_value_14wv6_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_14wv6_gg_._range_compare_14wv6_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_14wv6_gg_.__disabled_14wv6_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_14wv6_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_14wv6_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_14wv6_gg_ .___SMask_14wv6_gg_,.___SDateRange_14wv6_gg_ .___SValue_14wv6_gg_,.___SSingleDateInput_14wv6_gg_ .___SMask_14wv6_gg_,.___SSingleDateInput_14wv6_gg_ .___SValue_14wv6_gg_{opacity:0}.___SSingleDateInput_14wv6_gg_:focus-within .___SHumanizedDate_14wv6_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_14wv6_gg_:focus-within .___SMask_14wv6_gg_,.___SSingleDateInput_14wv6_gg_:focus-within .___SValue_14wv6_gg_{opacity:1}.___SDateRange_14wv6_gg_:focus-within .___SHumanizedDate_14wv6_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_14wv6_gg_:focus-within .___SMask_14wv6_gg_,.___SDateRange_14wv6_gg_:focus-within .___SValue_14wv6_gg_{opacity:1}.___SInputMask_14wv6_gg_.__noHumanizedDate_14wv6_gg_ .___SMask_14wv6_gg_,.___SInputMask_14wv6_gg_.__noHumanizedDate_14wv6_gg_ .___SValue_14wv6_gg_{opacity:1}.___SDateRange_14wv6_gg_ .___SInputMask_14wv6_gg_:focus-within .___SMask_14wv6_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_14wv6_gg_:focus-within .___SRangeSep_14wv6_gg_,.___SRangeSep_14wv6_gg_.__fulfilled_14wv6_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_14wv6_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_14wv6_gg_,.___SRangeComparatorHeader_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_14wv6_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_14wv6_gg_,.___SPeriodsList_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_14wv6_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_14wv6_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_14wv6_gg_{transition:none}}",
|
|
27
27
|
/*__inner_css_end__*/
|
|
28
|
-
"
|
|
28
|
+
"14wv6_gg_"
|
|
29
29
|
), /*__reshadow_css_end__*/
|
|
30
30
|
{
|
|
31
|
-
"__SHeader": "
|
|
32
|
-
"__STitle": "
|
|
33
|
-
"__SToday": "
|
|
34
|
-
"__SPeriod": "
|
|
35
|
-
"__SButton": "
|
|
36
|
-
"__SInner": "
|
|
37
|
-
"__SInputMask": "
|
|
38
|
-
"_animationsDisabled": "
|
|
39
|
-
"__SIndicator": "
|
|
40
|
-
"__SRangeIndicator": "
|
|
41
|
-
"_range_value": "
|
|
42
|
-
"_range_compare": "
|
|
43
|
-
"_disabled": "
|
|
44
|
-
"__SHumanizedDate": "
|
|
45
|
-
"__SMask": "
|
|
46
|
-
"__SSingleDateInput": "
|
|
47
|
-
"__SValue": "
|
|
48
|
-
"__SDateRange": "
|
|
49
|
-
"_noHumanizedDate": "
|
|
50
|
-
"__SRangeSep": "
|
|
51
|
-
"_fulfilled": "
|
|
52
|
-
"__SRangeComparatorHeader": "
|
|
53
|
-
"__SRangeCalendar": "
|
|
54
|
-
"__SFooter": "
|
|
55
|
-
"__SPeriodsList": "
|
|
56
|
-
"__STooltip": "
|
|
57
|
-
"__SCompareToggle": "
|
|
58
|
-
"__SPopper": "
|
|
31
|
+
"__SHeader": "___SHeader_14wv6_gg_",
|
|
32
|
+
"__STitle": "___STitle_14wv6_gg_",
|
|
33
|
+
"__SToday": "___SToday_14wv6_gg_",
|
|
34
|
+
"__SPeriod": "___SPeriod_14wv6_gg_",
|
|
35
|
+
"__SButton": "___SButton_14wv6_gg_",
|
|
36
|
+
"__SInner": "___SInner_14wv6_gg_",
|
|
37
|
+
"__SInputMask": "___SInputMask_14wv6_gg_",
|
|
38
|
+
"_animationsDisabled": "__animationsDisabled_14wv6_gg_",
|
|
39
|
+
"__SIndicator": "___SIndicator_14wv6_gg_",
|
|
40
|
+
"__SRangeIndicator": "___SRangeIndicator_14wv6_gg_",
|
|
41
|
+
"_range_value": "_range_value_14wv6_gg_",
|
|
42
|
+
"_range_compare": "_range_compare_14wv6_gg_",
|
|
43
|
+
"_disabled": "__disabled_14wv6_gg_",
|
|
44
|
+
"__SHumanizedDate": "___SHumanizedDate_14wv6_gg_",
|
|
45
|
+
"__SMask": "___SMask_14wv6_gg_",
|
|
46
|
+
"__SSingleDateInput": "___SSingleDateInput_14wv6_gg_",
|
|
47
|
+
"__SValue": "___SValue_14wv6_gg_",
|
|
48
|
+
"__SDateRange": "___SDateRange_14wv6_gg_",
|
|
49
|
+
"_noHumanizedDate": "__noHumanizedDate_14wv6_gg_",
|
|
50
|
+
"__SRangeSep": "___SRangeSep_14wv6_gg_",
|
|
51
|
+
"_fulfilled": "__fulfilled_14wv6_gg_",
|
|
52
|
+
"__SRangeComparatorHeader": "___SRangeComparatorHeader_14wv6_gg_",
|
|
53
|
+
"__SRangeCalendar": "___SRangeCalendar_14wv6_gg_",
|
|
54
|
+
"__SFooter": "___SFooter_14wv6_gg_",
|
|
55
|
+
"__SPeriodsList": "___SPeriodsList_14wv6_gg_",
|
|
56
|
+
"__STooltip": "___STooltip_14wv6_gg_",
|
|
57
|
+
"__SCompareToggle": "___SCompareToggle_14wv6_gg_",
|
|
58
|
+
"__SPopper": "___SPopper_14wv6_gg_"
|
|
59
59
|
})
|
|
60
60
|
);
|
|
61
61
|
var INTERACTION_TAGS = ["INPUT"];
|
|
@@ -83,7 +83,12 @@ var DateRangeComparatorAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
83
83
|
args[_key2] = arguments[_key2];
|
|
84
84
|
}
|
|
85
85
|
_this = _callSuper(this, DateRangeComparatorAbstract2, [].concat(args));
|
|
86
|
+
_defineProperty(_this, "prevButtonRef", /* @__PURE__ */ React.createRef());
|
|
87
|
+
_defineProperty(_this, "nextButtonRef", /* @__PURE__ */ React.createRef());
|
|
86
88
|
_defineProperty(_this, "popperRef", /* @__PURE__ */ React.createRef());
|
|
89
|
+
_defineProperty(_this, "resetButtonRef", /* @__PURE__ */ React.createRef());
|
|
90
|
+
_defineProperty(_this, "applyButtonRef", /* @__PURE__ */ React.createRef());
|
|
91
|
+
_defineProperty(_this, "periodRefs", []);
|
|
87
92
|
_defineProperty(_this, "unitRefs", {});
|
|
88
93
|
_defineProperty(_this, "navigateView", function(direction) {
|
|
89
94
|
var displayedPeriod = _this.asProps.displayedPeriod;
|
|
@@ -110,8 +115,9 @@ var DateRangeComparatorAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
110
115
|
_defineProperty(_this, "handleKeydownDown", function(place) {
|
|
111
116
|
return function(e) {
|
|
112
117
|
var _this$asProps2 = _this.asProps, displayedPeriod = _this$asProps2.displayedPeriod, preselectedValue = _this$asProps2.preselectedValue, visible = _this$asProps2.visible, focusedRange = _this$asProps2.focusedRange;
|
|
113
|
-
var key = e.key;
|
|
118
|
+
var key = e.key, target = e.target;
|
|
114
119
|
var highlighted = focusedRange === "compare" ? _this.asProps.compareHighlighted : _this.asProps.highlighted;
|
|
120
|
+
if ([" ", "Enter"].includes(key) && [_this.prevButtonRef.current, _this.nextButtonRef.current].includes(target)) return;
|
|
115
121
|
if (place === "trigger" && INTERACTION_KEYS.includes(key)) {
|
|
116
122
|
e.preventDefault();
|
|
117
123
|
e.stopPropagation();
|
|
@@ -143,7 +149,13 @@ var DateRangeComparatorAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
143
149
|
}
|
|
144
150
|
return displayedPeriod;
|
|
145
151
|
};
|
|
146
|
-
|
|
152
|
+
var isPeriodTarget = _this.periodRefs.find(function(el) {
|
|
153
|
+
return el === target;
|
|
154
|
+
});
|
|
155
|
+
var isResetButtonTarget = target === _this.resetButtonRef.current;
|
|
156
|
+
var isApplyButtonTarget = target === _this.applyButtonRef.current;
|
|
157
|
+
var areTargetedControls = isPeriodTarget || isResetButtonTarget || isApplyButtonTarget;
|
|
158
|
+
if (place === "popper" && e.key === " " && highlighted.length && !areTargetedControls) {
|
|
147
159
|
var highlightedDate = highlighted[1] || highlighted[0];
|
|
148
160
|
if (!_this.isDisabled(highlightedDate)) {
|
|
149
161
|
_this.handleChange(highlightedDate);
|
|
@@ -249,7 +261,13 @@ var DateRangeComparatorAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
249
261
|
"onHighlightedChange": focusedRange === "compare" ? onCompareHighlightedChange : onHighlightedChange,
|
|
250
262
|
onDisplayedPeriodChange,
|
|
251
263
|
"role": "listbox",
|
|
252
|
-
"aria-label": getI18nText("periods")
|
|
264
|
+
"aria-label": getI18nText("periods"),
|
|
265
|
+
"periodRef": function periodRef(index) {
|
|
266
|
+
return function(element) {
|
|
267
|
+
if (!element) return;
|
|
268
|
+
_this2.periodRefs[index] = element;
|
|
269
|
+
};
|
|
270
|
+
}
|
|
253
271
|
};
|
|
254
272
|
}
|
|
255
273
|
}, {
|
|
@@ -259,6 +277,7 @@ var DateRangeComparatorAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
259
277
|
var navigateStep = this.navigateStep;
|
|
260
278
|
return {
|
|
261
279
|
getI18nText,
|
|
280
|
+
"ref": this.prevButtonRef,
|
|
262
281
|
"onClick": this.bindHandlerNavigateClick(-1),
|
|
263
282
|
"aria-label": navigateStep === "month" ? getI18nText("prevMonth") : getI18nText("prevYear")
|
|
264
283
|
};
|
|
@@ -270,6 +289,7 @@ var DateRangeComparatorAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
270
289
|
var navigateStep = this.navigateStep;
|
|
271
290
|
return {
|
|
272
291
|
getI18nText,
|
|
292
|
+
"ref": this.nextButtonRef,
|
|
273
293
|
"onClick": this.bindHandlerNavigateClick(1),
|
|
274
294
|
"aria-label": navigateStep === "month" ? getI18nText("nextMonth") : getI18nText("nextYear")
|
|
275
295
|
};
|
|
@@ -324,7 +344,8 @@ var DateRangeComparatorAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
324
344
|
var getI18nText = this.asProps.getI18nText;
|
|
325
345
|
return {
|
|
326
346
|
getI18nText,
|
|
327
|
-
onClick: this.handleApplyClick
|
|
347
|
+
onClick: this.handleApplyClick,
|
|
348
|
+
ref: this.applyButtonRef
|
|
328
349
|
};
|
|
329
350
|
}
|
|
330
351
|
}, {
|
|
@@ -336,7 +357,8 @@ var DateRangeComparatorAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
336
357
|
getI18nText,
|
|
337
358
|
onClick: function onClick() {
|
|
338
359
|
return _this4.handleApply(null, null);
|
|
339
|
-
}
|
|
360
|
+
},
|
|
361
|
+
ref: this.resetButtonRef
|
|
340
362
|
};
|
|
341
363
|
}
|
|
342
364
|
}, {
|
|
@@ -27,39 +27,39 @@ var style = (
|
|
|
27
27
|
/*__reshadow_css_start__*/
|
|
28
28
|
(sstyled.insert(
|
|
29
29
|
/*__inner_css_start__*/
|
|
30
|
-
".
|
|
30
|
+
".___SPopper_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_14wv6_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_14wv6_gg_:active,.___SPopper_14wv6_gg_:focus{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_14wv6_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___SHeader_14wv6_gg_,.___STitle_14wv6_gg_{display:flex;align-items:center}.___STitle_14wv6_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_14wv6_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_14wv6_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_14wv6_gg_ .___SInner_14wv6_gg_{justify-content:flex-start}.___SInputMask_14wv6_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal;padding-right:var(--intergalactic-spacing-2x, 8px);transition:width calc(var(--intergalactic-duration-medium, 300)*1ms) ease,min-width calc(var(--intergalactic-duration-medium, 300)*1ms) ease}.___SInputMask_14wv6_gg_.__animationsDisabled_14wv6_gg_{transition:none}.___SInputMask_14wv6_gg_ .___SValue_14wv6_gg_{letter-spacing:0}.___SInputMask_14wv6_gg_ .___SValue_14wv6_gg_:focus{outline:0}.___SIndicator_14wv6_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_14wv6_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_14wv6_gg_._range_value_14wv6_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_14wv6_gg_._range_compare_14wv6_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_14wv6_gg_.__disabled_14wv6_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_14wv6_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_14wv6_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_14wv6_gg_ .___SMask_14wv6_gg_,.___SDateRange_14wv6_gg_ .___SValue_14wv6_gg_,.___SSingleDateInput_14wv6_gg_ .___SMask_14wv6_gg_,.___SSingleDateInput_14wv6_gg_ .___SValue_14wv6_gg_{opacity:0}.___SSingleDateInput_14wv6_gg_:focus-within .___SHumanizedDate_14wv6_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_14wv6_gg_:focus-within .___SMask_14wv6_gg_,.___SSingleDateInput_14wv6_gg_:focus-within .___SValue_14wv6_gg_{opacity:1}.___SDateRange_14wv6_gg_:focus-within .___SHumanizedDate_14wv6_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_14wv6_gg_:focus-within .___SMask_14wv6_gg_,.___SDateRange_14wv6_gg_:focus-within .___SValue_14wv6_gg_{opacity:1}.___SInputMask_14wv6_gg_.__noHumanizedDate_14wv6_gg_ .___SMask_14wv6_gg_,.___SInputMask_14wv6_gg_.__noHumanizedDate_14wv6_gg_ .___SValue_14wv6_gg_{opacity:1}.___SDateRange_14wv6_gg_ .___SInputMask_14wv6_gg_:focus-within .___SMask_14wv6_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_14wv6_gg_:focus-within .___SRangeSep_14wv6_gg_,.___SRangeSep_14wv6_gg_.__fulfilled_14wv6_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_14wv6_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_14wv6_gg_,.___SRangeComparatorHeader_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_14wv6_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_14wv6_gg_,.___SPeriodsList_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_14wv6_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_14wv6_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_14wv6_gg_{transition:none}}",
|
|
31
31
|
/*__inner_css_end__*/
|
|
32
|
-
"
|
|
32
|
+
"14wv6_gg_"
|
|
33
33
|
), /*__reshadow_css_end__*/
|
|
34
34
|
{
|
|
35
|
-
"__SHeader": "
|
|
36
|
-
"__STitle": "
|
|
37
|
-
"__SToday": "
|
|
38
|
-
"__SPeriod": "
|
|
39
|
-
"__SButton": "
|
|
40
|
-
"__SInner": "
|
|
41
|
-
"__SInputMask": "
|
|
42
|
-
"_animationsDisabled": "
|
|
43
|
-
"__SIndicator": "
|
|
44
|
-
"__SRangeIndicator": "
|
|
45
|
-
"_range_value": "
|
|
46
|
-
"_range_compare": "
|
|
47
|
-
"_disabled": "
|
|
48
|
-
"__SHumanizedDate": "
|
|
49
|
-
"__SMask": "
|
|
50
|
-
"__SSingleDateInput": "
|
|
51
|
-
"__SValue": "
|
|
52
|
-
"__SDateRange": "
|
|
53
|
-
"_noHumanizedDate": "
|
|
54
|
-
"__SRangeSep": "
|
|
55
|
-
"_fulfilled": "
|
|
56
|
-
"__SRangeComparatorHeader": "
|
|
57
|
-
"__SRangeCalendar": "
|
|
58
|
-
"__SFooter": "
|
|
59
|
-
"__SPeriodsList": "
|
|
60
|
-
"__STooltip": "
|
|
61
|
-
"__SCompareToggle": "
|
|
62
|
-
"__SPopper": "
|
|
35
|
+
"__SHeader": "___SHeader_14wv6_gg_",
|
|
36
|
+
"__STitle": "___STitle_14wv6_gg_",
|
|
37
|
+
"__SToday": "___SToday_14wv6_gg_",
|
|
38
|
+
"__SPeriod": "___SPeriod_14wv6_gg_",
|
|
39
|
+
"__SButton": "___SButton_14wv6_gg_",
|
|
40
|
+
"__SInner": "___SInner_14wv6_gg_",
|
|
41
|
+
"__SInputMask": "___SInputMask_14wv6_gg_",
|
|
42
|
+
"_animationsDisabled": "__animationsDisabled_14wv6_gg_",
|
|
43
|
+
"__SIndicator": "___SIndicator_14wv6_gg_",
|
|
44
|
+
"__SRangeIndicator": "___SRangeIndicator_14wv6_gg_",
|
|
45
|
+
"_range_value": "_range_value_14wv6_gg_",
|
|
46
|
+
"_range_compare": "_range_compare_14wv6_gg_",
|
|
47
|
+
"_disabled": "__disabled_14wv6_gg_",
|
|
48
|
+
"__SHumanizedDate": "___SHumanizedDate_14wv6_gg_",
|
|
49
|
+
"__SMask": "___SMask_14wv6_gg_",
|
|
50
|
+
"__SSingleDateInput": "___SSingleDateInput_14wv6_gg_",
|
|
51
|
+
"__SValue": "___SValue_14wv6_gg_",
|
|
52
|
+
"__SDateRange": "___SDateRange_14wv6_gg_",
|
|
53
|
+
"_noHumanizedDate": "__noHumanizedDate_14wv6_gg_",
|
|
54
|
+
"__SRangeSep": "___SRangeSep_14wv6_gg_",
|
|
55
|
+
"_fulfilled": "__fulfilled_14wv6_gg_",
|
|
56
|
+
"__SRangeComparatorHeader": "___SRangeComparatorHeader_14wv6_gg_",
|
|
57
|
+
"__SRangeCalendar": "___SRangeCalendar_14wv6_gg_",
|
|
58
|
+
"__SFooter": "___SFooter_14wv6_gg_",
|
|
59
|
+
"__SPeriodsList": "___SPeriodsList_14wv6_gg_",
|
|
60
|
+
"__STooltip": "___STooltip_14wv6_gg_",
|
|
61
|
+
"__SCompareToggle": "___SCompareToggle_14wv6_gg_",
|
|
62
|
+
"__SPopper": "___SPopper_14wv6_gg_"
|
|
63
63
|
})
|
|
64
64
|
);
|
|
65
65
|
var defaultAllowedParts = {
|
|
@@ -16,39 +16,39 @@ var style = (
|
|
|
16
16
|
/*__reshadow_css_start__*/
|
|
17
17
|
(sstyled.insert(
|
|
18
18
|
/*__inner_css_start__*/
|
|
19
|
-
".
|
|
19
|
+
".___SPopper_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_14wv6_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_14wv6_gg_:active,.___SPopper_14wv6_gg_:focus{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_14wv6_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___SHeader_14wv6_gg_,.___STitle_14wv6_gg_{display:flex;align-items:center}.___STitle_14wv6_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_14wv6_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_14wv6_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_14wv6_gg_ .___SInner_14wv6_gg_{justify-content:flex-start}.___SInputMask_14wv6_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal;padding-right:var(--intergalactic-spacing-2x, 8px);transition:width calc(var(--intergalactic-duration-medium, 300)*1ms) ease,min-width calc(var(--intergalactic-duration-medium, 300)*1ms) ease}.___SInputMask_14wv6_gg_.__animationsDisabled_14wv6_gg_{transition:none}.___SInputMask_14wv6_gg_ .___SValue_14wv6_gg_{letter-spacing:0}.___SInputMask_14wv6_gg_ .___SValue_14wv6_gg_:focus{outline:0}.___SIndicator_14wv6_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_14wv6_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_14wv6_gg_._range_value_14wv6_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_14wv6_gg_._range_compare_14wv6_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_14wv6_gg_.__disabled_14wv6_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_14wv6_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_14wv6_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_14wv6_gg_ .___SMask_14wv6_gg_,.___SDateRange_14wv6_gg_ .___SValue_14wv6_gg_,.___SSingleDateInput_14wv6_gg_ .___SMask_14wv6_gg_,.___SSingleDateInput_14wv6_gg_ .___SValue_14wv6_gg_{opacity:0}.___SSingleDateInput_14wv6_gg_:focus-within .___SHumanizedDate_14wv6_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_14wv6_gg_:focus-within .___SMask_14wv6_gg_,.___SSingleDateInput_14wv6_gg_:focus-within .___SValue_14wv6_gg_{opacity:1}.___SDateRange_14wv6_gg_:focus-within .___SHumanizedDate_14wv6_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_14wv6_gg_:focus-within .___SMask_14wv6_gg_,.___SDateRange_14wv6_gg_:focus-within .___SValue_14wv6_gg_{opacity:1}.___SInputMask_14wv6_gg_.__noHumanizedDate_14wv6_gg_ .___SMask_14wv6_gg_,.___SInputMask_14wv6_gg_.__noHumanizedDate_14wv6_gg_ .___SValue_14wv6_gg_{opacity:1}.___SDateRange_14wv6_gg_ .___SInputMask_14wv6_gg_:focus-within .___SMask_14wv6_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_14wv6_gg_:focus-within .___SRangeSep_14wv6_gg_,.___SRangeSep_14wv6_gg_.__fulfilled_14wv6_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_14wv6_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_14wv6_gg_,.___SRangeComparatorHeader_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_14wv6_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_14wv6_gg_,.___SPeriodsList_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_14wv6_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_14wv6_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_14wv6_gg_{transition:none}}",
|
|
20
20
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
21
|
+
"14wv6_gg_"
|
|
22
22
|
), /*__reshadow_css_end__*/
|
|
23
23
|
{
|
|
24
|
-
"__SHeader": "
|
|
25
|
-
"__STitle": "
|
|
26
|
-
"__SToday": "
|
|
27
|
-
"__SPeriod": "
|
|
28
|
-
"__SButton": "
|
|
29
|
-
"__SInner": "
|
|
30
|
-
"__SInputMask": "
|
|
31
|
-
"_animationsDisabled": "
|
|
32
|
-
"__SIndicator": "
|
|
33
|
-
"__SRangeIndicator": "
|
|
34
|
-
"_range_value": "
|
|
35
|
-
"_range_compare": "
|
|
36
|
-
"_disabled": "
|
|
37
|
-
"__SHumanizedDate": "
|
|
38
|
-
"__SMask": "
|
|
39
|
-
"__SSingleDateInput": "
|
|
40
|
-
"__SValue": "
|
|
41
|
-
"__SDateRange": "
|
|
42
|
-
"_noHumanizedDate": "
|
|
43
|
-
"__SRangeSep": "
|
|
44
|
-
"_fulfilled": "
|
|
45
|
-
"__SRangeComparatorHeader": "
|
|
46
|
-
"__SRangeCalendar": "
|
|
47
|
-
"__SFooter": "
|
|
48
|
-
"__SPeriodsList": "
|
|
49
|
-
"__STooltip": "
|
|
50
|
-
"__SCompareToggle": "
|
|
51
|
-
"__SPopper": "
|
|
24
|
+
"__SHeader": "___SHeader_14wv6_gg_",
|
|
25
|
+
"__STitle": "___STitle_14wv6_gg_",
|
|
26
|
+
"__SToday": "___SToday_14wv6_gg_",
|
|
27
|
+
"__SPeriod": "___SPeriod_14wv6_gg_",
|
|
28
|
+
"__SButton": "___SButton_14wv6_gg_",
|
|
29
|
+
"__SInner": "___SInner_14wv6_gg_",
|
|
30
|
+
"__SInputMask": "___SInputMask_14wv6_gg_",
|
|
31
|
+
"_animationsDisabled": "__animationsDisabled_14wv6_gg_",
|
|
32
|
+
"__SIndicator": "___SIndicator_14wv6_gg_",
|
|
33
|
+
"__SRangeIndicator": "___SRangeIndicator_14wv6_gg_",
|
|
34
|
+
"_range_value": "_range_value_14wv6_gg_",
|
|
35
|
+
"_range_compare": "_range_compare_14wv6_gg_",
|
|
36
|
+
"_disabled": "__disabled_14wv6_gg_",
|
|
37
|
+
"__SHumanizedDate": "___SHumanizedDate_14wv6_gg_",
|
|
38
|
+
"__SMask": "___SMask_14wv6_gg_",
|
|
39
|
+
"__SSingleDateInput": "___SSingleDateInput_14wv6_gg_",
|
|
40
|
+
"__SValue": "___SValue_14wv6_gg_",
|
|
41
|
+
"__SDateRange": "___SDateRange_14wv6_gg_",
|
|
42
|
+
"_noHumanizedDate": "__noHumanizedDate_14wv6_gg_",
|
|
43
|
+
"__SRangeSep": "___SRangeSep_14wv6_gg_",
|
|
44
|
+
"_fulfilled": "__fulfilled_14wv6_gg_",
|
|
45
|
+
"__SRangeComparatorHeader": "___SRangeComparatorHeader_14wv6_gg_",
|
|
46
|
+
"__SRangeCalendar": "___SRangeCalendar_14wv6_gg_",
|
|
47
|
+
"__SFooter": "___SFooter_14wv6_gg_",
|
|
48
|
+
"__SPeriodsList": "___SPeriodsList_14wv6_gg_",
|
|
49
|
+
"__STooltip": "___STooltip_14wv6_gg_",
|
|
50
|
+
"__SCompareToggle": "___SCompareToggle_14wv6_gg_",
|
|
51
|
+
"__SPopper": "___SPopper_14wv6_gg_"
|
|
52
52
|
})
|
|
53
53
|
);
|
|
54
54
|
var INTERACTION_TAGS = ["INPUT"];
|
|
@@ -62,6 +62,8 @@ var PickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
62
62
|
args[_key] = arguments[_key];
|
|
63
63
|
}
|
|
64
64
|
_this = _callSuper(this, PickerAbstract2, [].concat(args));
|
|
65
|
+
_defineProperty(_this, "prevButtonRef", /* @__PURE__ */ React.createRef());
|
|
66
|
+
_defineProperty(_this, "nextButtonRef", /* @__PURE__ */ React.createRef());
|
|
65
67
|
_defineProperty(_this, "popperRef", /* @__PURE__ */ React.createRef());
|
|
66
68
|
_defineProperty(_this, "unitRefs", {});
|
|
67
69
|
_defineProperty(_this, "navigateStep", void 0);
|
|
@@ -83,7 +85,8 @@ var PickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
83
85
|
var _this$asProps = _this.asProps, value = _this$asProps.value, displayedPeriod = _this$asProps.displayedPeriod, highlighted = _this$asProps.highlighted;
|
|
84
86
|
_this$asProps.disabled;
|
|
85
87
|
var visible = _this$asProps.visible;
|
|
86
|
-
var key = e.key;
|
|
88
|
+
var key = e.key, target = e.target;
|
|
89
|
+
if ([" ", "Enter"].includes(key) && [_this.prevButtonRef.current, _this.nextButtonRef.current].includes(target)) return;
|
|
87
90
|
if (place === "trigger" && INTERACTION_KEYS.includes(key)) {
|
|
88
91
|
e.stopPropagation();
|
|
89
92
|
_this.handlers.visible(!visible);
|
|
@@ -98,7 +101,7 @@ var PickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
98
101
|
var getCurrentHighlightedDay = function getCurrentHighlightedDay2(day2) {
|
|
99
102
|
return day2.toDate();
|
|
100
103
|
};
|
|
101
|
-
if (place === "popper" && (e.key === " " || e.key === "Enter" && highlighted.length)
|
|
104
|
+
if (place === "popper" && (e.key === " " || e.key === "Enter") && highlighted.length) {
|
|
102
105
|
if (!_this.isDisabled(highlighted[0])) {
|
|
103
106
|
_this.handlers.value(highlighted[0]);
|
|
104
107
|
}
|
|
@@ -199,6 +202,7 @@ var PickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
199
202
|
var getI18nText = this.asProps.getI18nText;
|
|
200
203
|
var navigateStep = this.navigateStep;
|
|
201
204
|
return {
|
|
205
|
+
"ref": this.nextButtonRef,
|
|
202
206
|
"onClick": this.bindHandlerNavigateClick(1),
|
|
203
207
|
getI18nText,
|
|
204
208
|
"aria-label": navigateStep === "month" ? getI18nText("nextMonth") : getI18nText("nextYear")
|
|
@@ -210,6 +214,7 @@ var PickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
210
214
|
var getI18nText = this.asProps.getI18nText;
|
|
211
215
|
var navigateStep = this.navigateStep;
|
|
212
216
|
return {
|
|
217
|
+
"ref": this.prevButtonRef,
|
|
213
218
|
"onClick": this.bindHandlerNavigateClick(-1),
|
|
214
219
|
getI18nText,
|
|
215
220
|
"aria-label": navigateStep === "month" ? getI18nText("prevMonth") : getI18nText("prevYear")
|
|
@@ -20,39 +20,39 @@ var style = (
|
|
|
20
20
|
/*__reshadow_css_start__*/
|
|
21
21
|
(sstyled.insert(
|
|
22
22
|
/*__inner_css_start__*/
|
|
23
|
-
".
|
|
23
|
+
".___SPopper_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_14wv6_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_14wv6_gg_:active,.___SPopper_14wv6_gg_:focus{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_14wv6_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___SHeader_14wv6_gg_,.___STitle_14wv6_gg_{display:flex;align-items:center}.___STitle_14wv6_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_14wv6_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_14wv6_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_14wv6_gg_ .___SInner_14wv6_gg_{justify-content:flex-start}.___SInputMask_14wv6_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal;padding-right:var(--intergalactic-spacing-2x, 8px);transition:width calc(var(--intergalactic-duration-medium, 300)*1ms) ease,min-width calc(var(--intergalactic-duration-medium, 300)*1ms) ease}.___SInputMask_14wv6_gg_.__animationsDisabled_14wv6_gg_{transition:none}.___SInputMask_14wv6_gg_ .___SValue_14wv6_gg_{letter-spacing:0}.___SInputMask_14wv6_gg_ .___SValue_14wv6_gg_:focus{outline:0}.___SIndicator_14wv6_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_14wv6_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_14wv6_gg_._range_value_14wv6_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_14wv6_gg_._range_compare_14wv6_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_14wv6_gg_.__disabled_14wv6_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_14wv6_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_14wv6_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_14wv6_gg_ .___SMask_14wv6_gg_,.___SDateRange_14wv6_gg_ .___SValue_14wv6_gg_,.___SSingleDateInput_14wv6_gg_ .___SMask_14wv6_gg_,.___SSingleDateInput_14wv6_gg_ .___SValue_14wv6_gg_{opacity:0}.___SSingleDateInput_14wv6_gg_:focus-within .___SHumanizedDate_14wv6_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_14wv6_gg_:focus-within .___SMask_14wv6_gg_,.___SSingleDateInput_14wv6_gg_:focus-within .___SValue_14wv6_gg_{opacity:1}.___SDateRange_14wv6_gg_:focus-within .___SHumanizedDate_14wv6_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_14wv6_gg_:focus-within .___SMask_14wv6_gg_,.___SDateRange_14wv6_gg_:focus-within .___SValue_14wv6_gg_{opacity:1}.___SInputMask_14wv6_gg_.__noHumanizedDate_14wv6_gg_ .___SMask_14wv6_gg_,.___SInputMask_14wv6_gg_.__noHumanizedDate_14wv6_gg_ .___SValue_14wv6_gg_{opacity:1}.___SDateRange_14wv6_gg_ .___SInputMask_14wv6_gg_:focus-within .___SMask_14wv6_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_14wv6_gg_:focus-within .___SRangeSep_14wv6_gg_,.___SRangeSep_14wv6_gg_.__fulfilled_14wv6_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_14wv6_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_14wv6_gg_,.___SRangeComparatorHeader_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_14wv6_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_14wv6_gg_,.___SPeriodsList_14wv6_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_14wv6_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_14wv6_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_14wv6_gg_{transition:none}}",
|
|
24
24
|
/*__inner_css_end__*/
|
|
25
|
-
"
|
|
25
|
+
"14wv6_gg_"
|
|
26
26
|
), /*__reshadow_css_end__*/
|
|
27
27
|
{
|
|
28
|
-
"__SHeader": "
|
|
29
|
-
"__STitle": "
|
|
30
|
-
"__SToday": "
|
|
31
|
-
"__SPeriod": "
|
|
32
|
-
"__SButton": "
|
|
33
|
-
"__SInner": "
|
|
34
|
-
"__SInputMask": "
|
|
35
|
-
"_animationsDisabled": "
|
|
36
|
-
"__SIndicator": "
|
|
37
|
-
"__SRangeIndicator": "
|
|
38
|
-
"_range_value": "
|
|
39
|
-
"_range_compare": "
|
|
40
|
-
"_disabled": "
|
|
41
|
-
"__SHumanizedDate": "
|
|
42
|
-
"__SMask": "
|
|
43
|
-
"__SSingleDateInput": "
|
|
44
|
-
"__SValue": "
|
|
45
|
-
"__SDateRange": "
|
|
46
|
-
"_noHumanizedDate": "
|
|
47
|
-
"__SRangeSep": "
|
|
48
|
-
"_fulfilled": "
|
|
49
|
-
"__SRangeComparatorHeader": "
|
|
50
|
-
"__SRangeCalendar": "
|
|
51
|
-
"__SFooter": "
|
|
52
|
-
"__SPeriodsList": "
|
|
53
|
-
"__STooltip": "
|
|
54
|
-
"__SCompareToggle": "
|
|
55
|
-
"__SPopper": "
|
|
28
|
+
"__SHeader": "___SHeader_14wv6_gg_",
|
|
29
|
+
"__STitle": "___STitle_14wv6_gg_",
|
|
30
|
+
"__SToday": "___SToday_14wv6_gg_",
|
|
31
|
+
"__SPeriod": "___SPeriod_14wv6_gg_",
|
|
32
|
+
"__SButton": "___SButton_14wv6_gg_",
|
|
33
|
+
"__SInner": "___SInner_14wv6_gg_",
|
|
34
|
+
"__SInputMask": "___SInputMask_14wv6_gg_",
|
|
35
|
+
"_animationsDisabled": "__animationsDisabled_14wv6_gg_",
|
|
36
|
+
"__SIndicator": "___SIndicator_14wv6_gg_",
|
|
37
|
+
"__SRangeIndicator": "___SRangeIndicator_14wv6_gg_",
|
|
38
|
+
"_range_value": "_range_value_14wv6_gg_",
|
|
39
|
+
"_range_compare": "_range_compare_14wv6_gg_",
|
|
40
|
+
"_disabled": "__disabled_14wv6_gg_",
|
|
41
|
+
"__SHumanizedDate": "___SHumanizedDate_14wv6_gg_",
|
|
42
|
+
"__SMask": "___SMask_14wv6_gg_",
|
|
43
|
+
"__SSingleDateInput": "___SSingleDateInput_14wv6_gg_",
|
|
44
|
+
"__SValue": "___SValue_14wv6_gg_",
|
|
45
|
+
"__SDateRange": "___SDateRange_14wv6_gg_",
|
|
46
|
+
"_noHumanizedDate": "__noHumanizedDate_14wv6_gg_",
|
|
47
|
+
"__SRangeSep": "___SRangeSep_14wv6_gg_",
|
|
48
|
+
"_fulfilled": "__fulfilled_14wv6_gg_",
|
|
49
|
+
"__SRangeComparatorHeader": "___SRangeComparatorHeader_14wv6_gg_",
|
|
50
|
+
"__SRangeCalendar": "___SRangeCalendar_14wv6_gg_",
|
|
51
|
+
"__SFooter": "___SFooter_14wv6_gg_",
|
|
52
|
+
"__SPeriodsList": "___SPeriodsList_14wv6_gg_",
|
|
53
|
+
"__STooltip": "___STooltip_14wv6_gg_",
|
|
54
|
+
"__SCompareToggle": "___SCompareToggle_14wv6_gg_",
|
|
55
|
+
"__SPopper": "___SPopper_14wv6_gg_"
|
|
56
56
|
})
|
|
57
57
|
);
|
|
58
58
|
var INTERACTION_TAGS = ["INPUT"];
|
|
@@ -71,7 +71,12 @@ var RangePickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
71
71
|
args[_key] = arguments[_key];
|
|
72
72
|
}
|
|
73
73
|
_this = _callSuper(this, RangePickerAbstract2, [].concat(args));
|
|
74
|
+
_defineProperty(_this, "applyButtonRef", /* @__PURE__ */ React.createRef());
|
|
75
|
+
_defineProperty(_this, "resetButtonRef", /* @__PURE__ */ React.createRef());
|
|
76
|
+
_defineProperty(_this, "prevButtonRef", /* @__PURE__ */ React.createRef());
|
|
77
|
+
_defineProperty(_this, "nextButtonRef", /* @__PURE__ */ React.createRef());
|
|
74
78
|
_defineProperty(_this, "popperRef", /* @__PURE__ */ React.createRef());
|
|
79
|
+
_defineProperty(_this, "periodRefs", []);
|
|
75
80
|
_defineProperty(_this, "unitRefs", {});
|
|
76
81
|
_defineProperty(_this, "navigateStep", void 0);
|
|
77
82
|
_defineProperty(_this, "keyDiff", void 0);
|
|
@@ -90,7 +95,8 @@ var RangePickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
90
95
|
_defineProperty(_this, "handlerKeyDown", function(place) {
|
|
91
96
|
return function(e) {
|
|
92
97
|
var _this$asProps = _this.asProps, displayedPeriod = _this$asProps.displayedPeriod, highlighted = _this$asProps.highlighted, preselectedValue = _this$asProps.preselectedValue, visible = _this$asProps.visible;
|
|
93
|
-
var key = e.key;
|
|
98
|
+
var key = e.key, target = e.target;
|
|
99
|
+
if ([" ", "Enter"].includes(key) && [_this.prevButtonRef.current, _this.nextButtonRef.current].includes(target)) return;
|
|
94
100
|
if (place === "trigger" && INTERACTION_KEYS.includes(key)) {
|
|
95
101
|
e.stopPropagation();
|
|
96
102
|
_this.handlers.visible(!visible);
|
|
@@ -124,7 +130,13 @@ var RangePickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
124
130
|
if (place === "popper" && e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
|
125
131
|
return _this.handleApplyClick();
|
|
126
132
|
}
|
|
127
|
-
|
|
133
|
+
var isPeriodTarget = _this.periodRefs.find(function(el) {
|
|
134
|
+
return el === target;
|
|
135
|
+
});
|
|
136
|
+
var isResetButtonTarget = target === _this.resetButtonRef.current;
|
|
137
|
+
var isApplyButtonTarget = target === _this.applyButtonRef.current;
|
|
138
|
+
var areTargetedControls = isPeriodTarget || isResetButtonTarget || isApplyButtonTarget;
|
|
139
|
+
if (place === "popper" && e.key === " " && highlighted.length && !areTargetedControls) {
|
|
128
140
|
var highlightedDate = highlighted[1] || highlighted[0];
|
|
129
141
|
if (!_this.isDisabled(highlightedDate)) {
|
|
130
142
|
_this.handleChange(highlightedDate);
|
|
@@ -306,6 +318,7 @@ var RangePickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
306
318
|
var getI18nText = this.asProps.getI18nText;
|
|
307
319
|
var navigateStep = this.navigateStep;
|
|
308
320
|
return {
|
|
321
|
+
"ref": this.nextButtonRef,
|
|
309
322
|
"onClick": this.bindHandlerNavigateClick(1),
|
|
310
323
|
getI18nText,
|
|
311
324
|
"aria-label": navigateStep === "month" ? getI18nText("nextMonth") : getI18nText("nextYear")
|
|
@@ -317,6 +330,7 @@ var RangePickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
317
330
|
var getI18nText = this.asProps.getI18nText;
|
|
318
331
|
var navigateStep = this.navigateStep;
|
|
319
332
|
return {
|
|
333
|
+
"ref": this.prevButtonRef,
|
|
320
334
|
"onClick": this.bindHandlerNavigateClick(-1),
|
|
321
335
|
getI18nText,
|
|
322
336
|
"aria-label": navigateStep === "month" ? getI18nText("prevMonth") : getI18nText("prevYear")
|
|
@@ -344,6 +358,7 @@ var RangePickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
344
358
|
}, {
|
|
345
359
|
key: "getPeriodProps",
|
|
346
360
|
value: function getPeriodProps() {
|
|
361
|
+
var _this3 = this;
|
|
347
362
|
var _this$asProps7 = this.asProps, _this$asProps7$period = _this$asProps7.periods, periods = _this$asProps7$period === void 0 ? this.getDefaultPeriods() : _this$asProps7$period, value = _this$asProps7.value, onHighlightedChange = _this$asProps7.onHighlightedChange, onDisplayedPeriodChange = _this$asProps7.onDisplayedPeriodChange, preselectedValue = _this$asProps7.preselectedValue, getI18nText = _this$asProps7.getI18nText;
|
|
348
363
|
return {
|
|
349
364
|
periods,
|
|
@@ -352,7 +367,13 @@ var RangePickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
352
367
|
onHighlightedChange,
|
|
353
368
|
onDisplayedPeriodChange,
|
|
354
369
|
"role": "listbox",
|
|
355
|
-
"aria-label": getI18nText("periods")
|
|
370
|
+
"aria-label": getI18nText("periods"),
|
|
371
|
+
"periodRef": function periodRef(index) {
|
|
372
|
+
return function(element) {
|
|
373
|
+
if (!element) return;
|
|
374
|
+
_this3.periodRefs[index] = element;
|
|
375
|
+
};
|
|
376
|
+
}
|
|
356
377
|
};
|
|
357
378
|
}
|
|
358
379
|
}, {
|
|
@@ -361,19 +382,21 @@ var RangePickerAbstract = /* @__PURE__ */ (function(_Component) {
|
|
|
361
382
|
var getI18nText = this.asProps.getI18nText;
|
|
362
383
|
return {
|
|
363
384
|
getI18nText,
|
|
364
|
-
onClick: this.handleApplyClick
|
|
385
|
+
onClick: this.handleApplyClick,
|
|
386
|
+
ref: this.applyButtonRef
|
|
365
387
|
};
|
|
366
388
|
}
|
|
367
389
|
}, {
|
|
368
390
|
key: "getResetProps",
|
|
369
391
|
value: function getResetProps() {
|
|
370
|
-
var
|
|
392
|
+
var _this4 = this;
|
|
371
393
|
var getI18nText = this.asProps.getI18nText;
|
|
372
394
|
return {
|
|
373
395
|
getI18nText,
|
|
374
396
|
onClick: function onClick() {
|
|
375
|
-
return
|
|
376
|
-
}
|
|
397
|
+
return _this4.handleApply([]);
|
|
398
|
+
},
|
|
399
|
+
ref: this.resetButtonRef
|
|
377
400
|
};
|
|
378
401
|
}
|
|
379
402
|
}, {
|
|
@@ -105,10 +105,11 @@ var Period = /* @__PURE__ */ (function(_Component) {
|
|
|
105
105
|
value: function render() {
|
|
106
106
|
var _ref8 = this.asProps, _ref10, _this2 = this;
|
|
107
107
|
var SPeriod = Box;
|
|
108
|
-
var _this$asProps = this.asProps, styles = _this$asProps.styles, value = _this$asProps.value, onChange = _this$asProps.onChange, periods = _this$asProps.periods, onHighlightedChange = _this$asProps.onHighlightedChange, onDisplayedPeriodChange = _this$asProps.onDisplayedPeriodChange;
|
|
108
|
+
var _this$asProps = this.asProps, styles = _this$asProps.styles, value = _this$asProps.value, onChange = _this$asProps.onChange, periods = _this$asProps.periods, onHighlightedChange = _this$asProps.onHighlightedChange, onDisplayedPeriodChange = _this$asProps.onDisplayedPeriodChange, periodRef = _this$asProps.periodRef;
|
|
109
109
|
return _ref10 = sstyled(styles), /* @__PURE__ */ React.createElement(SPeriod, _ref10.cn("SPeriod", _objectSpread({}, assignProps({}, _ref8))), periods.map(function(_ref14, i) {
|
|
110
110
|
var period = _ref14.value, onClick = _ref14.onClick, onMouseEnter = _ref14.onMouseEnter, onMouseLeave = _ref14.onMouseLeave, other = _objectWithoutProperties(_ref14, _excluded);
|
|
111
111
|
return /* @__PURE__ */ React.createElement(Button, _extends({
|
|
112
|
+
ref: periodRef === null || periodRef === void 0 ? void 0 : periodRef(i),
|
|
112
113
|
key: i,
|
|
113
114
|
use: "tertiary",
|
|
114
115
|
theme: "muted",
|