@semcore/date-picker 16.1.1 → 16.1.2-prerelease.1
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 +6 -0
- package/README.md +2 -28
- package/lib/cjs/DatePicker.js +27 -31
- package/lib/cjs/DatePicker.js.map +1 -1
- package/lib/cjs/DateRangeComparator.js +28 -29
- package/lib/cjs/DateRangeComparator.js.map +1 -1
- package/lib/cjs/DateRangePicker.js +19 -20
- package/lib/cjs/DateRangePicker.js.map +1 -1
- package/lib/cjs/MonthDateRangeComparator.js +33 -34
- package/lib/cjs/MonthDateRangeComparator.js.map +1 -1
- package/lib/cjs/MonthPicker.js +18 -19
- package/lib/cjs/MonthPicker.js.map +1 -1
- package/lib/cjs/MonthRangePicker.js +20 -21
- package/lib/cjs/MonthRangePicker.js.map +1 -1
- package/lib/cjs/components/ButtonTrigger.js +3 -4
- package/lib/cjs/components/ButtonTrigger.js.map +1 -1
- package/lib/cjs/components/Calendar.js +105 -114
- package/lib/cjs/components/Calendar.js.map +1 -1
- package/lib/cjs/components/DateRangeComparatorAbstract.js +93 -95
- package/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
- package/lib/cjs/components/InputTrigger.js +158 -166
- package/lib/cjs/components/InputTrigger.js.map +1 -1
- package/lib/cjs/components/PickerAbstract.js +53 -54
- package/lib/cjs/components/PickerAbstract.js.map +1 -1
- package/lib/cjs/components/RangePickerAbstract.js +61 -62
- package/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/lib/cjs/components/index.js +35 -39
- package/lib/cjs/components/index.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +2 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/utils/cronTabScheduler.js +6 -5
- package/lib/cjs/utils/cronTabScheduler.js.map +1 -1
- package/lib/cjs/utils/datesIntersects.js +3 -4
- package/lib/cjs/utils/datesIntersects.js.map +1 -1
- package/lib/cjs/utils/formatDate.js +3 -5
- package/lib/cjs/utils/formatDate.js.map +1 -1
- package/lib/cjs/utils/includesDate.js +2 -3
- package/lib/cjs/utils/includesDate.js.map +1 -1
- package/lib/cjs/utils/isBetweenPlugin.js +1 -2
- package/lib/cjs/utils/isBetweenPlugin.js.map +1 -1
- package/lib/cjs/utils/shortDateRangeFormat.js +2 -2
- package/lib/cjs/utils/shortDateRangeFormat.js.map +1 -1
- package/lib/es6/DatePicker.js +25 -27
- package/lib/es6/DatePicker.js.map +1 -1
- package/lib/es6/DateRangeComparator.js +26 -26
- package/lib/es6/DateRangeComparator.js.map +1 -1
- package/lib/es6/DateRangePicker.js +16 -16
- package/lib/es6/DateRangePicker.js.map +1 -1
- package/lib/es6/MonthDateRangeComparator.js +31 -31
- package/lib/es6/MonthDateRangeComparator.js.map +1 -1
- package/lib/es6/MonthPicker.js +16 -16
- package/lib/es6/MonthPicker.js.map +1 -1
- package/lib/es6/MonthRangePicker.js +17 -17
- package/lib/es6/MonthRangePicker.js.map +1 -1
- package/lib/es6/components/ButtonTrigger.js +2 -2
- package/lib/es6/components/ButtonTrigger.js.map +1 -1
- package/lib/es6/components/Calendar.js +102 -109
- package/lib/es6/components/Calendar.js.map +1 -1
- package/lib/es6/components/DateRangeComparatorAbstract.js +94 -95
- package/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
- package/lib/es6/components/InputTrigger.js +158 -165
- package/lib/es6/components/InputTrigger.js.map +1 -1
- package/lib/es6/components/PickerAbstract.js +52 -52
- package/lib/es6/components/PickerAbstract.js.map +1 -1
- package/lib/es6/components/RangePickerAbstract.js +62 -62
- package/lib/es6/components/RangePickerAbstract.js.map +1 -1
- package/lib/es6/components/index.js +33 -35
- package/lib/es6/components/index.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/utils/cronTabScheduler.js +5 -4
- package/lib/es6/utils/cronTabScheduler.js.map +1 -1
- package/lib/es6/utils/datesIntersects.js +1 -1
- package/lib/es6/utils/datesIntersects.js.map +1 -1
- package/lib/es6/utils/formatDate.js.map +1 -1
- package/lib/es6/utils/includesDate.js.map +1 -1
- package/lib/es6/utils/isBetweenPlugin.js +1 -1
- package/lib/es6/utils/isBetweenPlugin.js.map +1 -1
- package/lib/es6/utils/shortDateRangeFormat.js +1 -1
- package/lib/es6/utils/shortDateRangeFormat.js.map +1 -1
- package/lib/esm/DatePicker.mjs +32 -27
- package/lib/esm/DateRangeComparator.mjs +33 -26
- package/lib/esm/DateRangePicker.mjs +25 -18
- package/lib/esm/MonthDateRangeComparator.mjs +38 -31
- package/lib/esm/MonthPicker.mjs +24 -17
- package/lib/esm/MonthRangePicker.mjs +26 -19
- package/lib/esm/components/ButtonTrigger.mjs +1 -1
- package/lib/esm/components/Calendar.mjs +99 -103
- package/lib/esm/components/DateRangeComparatorAbstract.mjs +74 -74
- package/lib/esm/components/InputTrigger.mjs +128 -133
- package/lib/esm/components/PickerAbstract.mjs +55 -53
- package/lib/esm/components/RangePickerAbstract.mjs +63 -61
- package/lib/esm/components/index.mjs +28 -28
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/utils/cronTabScheduler.mjs +4 -4
- package/lib/esm/utils/datesIntersects.mjs +1 -1
- package/lib/esm/utils/isBetweenPlugin.mjs +1 -1
- package/lib/types/index.d.ts +129 -125
- package/package.json +17 -17
|
@@ -1,37 +1,44 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
|
+
import _get from "@babel/runtime/helpers/esm/get";
|
|
7
8
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
|
-
import React from "react";
|
|
11
|
-
import dayjs from "dayjs";
|
|
12
10
|
import { createComponent } from "@semcore/core";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
11
|
+
import dayjs from "dayjs";
|
|
12
|
+
import React from "react";
|
|
13
|
+
import { Period, Next, Prev, Title, Header, Popper, Trigger, InputTrigger } from "./components/index.mjs";
|
|
15
14
|
import { CalendarMonths } from "./components/Calendar.mjs";
|
|
16
|
-
import RangePickerAbstract, {
|
|
15
|
+
import RangePickerAbstract, { Reset, Apply } from "./components/RangePickerAbstract.mjs";
|
|
16
|
+
import shortDateRangeFormat from "./utils/shortDateRangeFormat.mjs";
|
|
17
|
+
function _callSuper(t, o, e) {
|
|
18
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
19
|
+
}
|
|
20
|
+
function _superPropGet(t, o, e, r) {
|
|
21
|
+
var p = _get(_getPrototypeOf(t.prototype), o, e);
|
|
22
|
+
return 2 & r && "function" == typeof p ? function(t2) {
|
|
23
|
+
return p.apply(e, t2);
|
|
24
|
+
} : p;
|
|
25
|
+
}
|
|
17
26
|
var dateParts = {
|
|
18
27
|
day: false,
|
|
19
28
|
month: true,
|
|
20
29
|
year: true
|
|
21
30
|
};
|
|
22
31
|
var MonthRangePickerRoot = /* @__PURE__ */ function(_RangePickerAbstract) {
|
|
23
|
-
_inherits(MonthRangePickerRoot2, _RangePickerAbstract);
|
|
24
|
-
var _super = _createSuper(MonthRangePickerRoot2);
|
|
25
32
|
function MonthRangePickerRoot2() {
|
|
26
33
|
var _this;
|
|
27
34
|
_classCallCheck(this, MonthRangePickerRoot2);
|
|
28
35
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
29
36
|
args[_key] = arguments[_key];
|
|
30
37
|
}
|
|
31
|
-
_this =
|
|
32
|
-
_defineProperty(
|
|
33
|
-
_defineProperty(
|
|
34
|
-
_defineProperty(
|
|
38
|
+
_this = _callSuper(this, MonthRangePickerRoot2, [].concat(args));
|
|
39
|
+
_defineProperty(_this, "navigateStep", "year");
|
|
40
|
+
_defineProperty(_this, "keyStep", "month");
|
|
41
|
+
_defineProperty(_this, "keyDiff", {
|
|
35
42
|
ArrowLeft: -1,
|
|
36
43
|
ArrowUp: -3,
|
|
37
44
|
ArrowRight: 1,
|
|
@@ -39,7 +46,8 @@ var MonthRangePickerRoot = /* @__PURE__ */ function(_RangePickerAbstract) {
|
|
|
39
46
|
});
|
|
40
47
|
return _this;
|
|
41
48
|
}
|
|
42
|
-
|
|
49
|
+
_inherits(MonthRangePickerRoot2, _RangePickerAbstract);
|
|
50
|
+
return _createClass(MonthRangePickerRoot2, [{
|
|
43
51
|
key: "getDefaultPeriods",
|
|
44
52
|
value: function getDefaultPeriods() {
|
|
45
53
|
var getI18nText = this.asProps.getI18nText;
|
|
@@ -62,7 +70,7 @@ var MonthRangePickerRoot = /* @__PURE__ */ function(_RangePickerAbstract) {
|
|
|
62
70
|
key: "getButtonTriggerProps",
|
|
63
71
|
value: function getButtonTriggerProps() {
|
|
64
72
|
var _this$asProps = this.asProps, value = _this$asProps.value, locale = _this$asProps.locale;
|
|
65
|
-
return _objectSpread(_objectSpread({},
|
|
73
|
+
return _objectSpread(_objectSpread({}, _superPropGet(MonthRangePickerRoot2, "getButtonTriggerProps", this, 3)([])), {}, {
|
|
66
74
|
placeholder: "Select month period",
|
|
67
75
|
children: shortDateRangeFormat(value, {
|
|
68
76
|
locale,
|
|
@@ -76,7 +84,7 @@ var MonthRangePickerRoot = /* @__PURE__ */ function(_RangePickerAbstract) {
|
|
|
76
84
|
value: function getTriggerProps() {
|
|
77
85
|
var _this$asProps2 = this.asProps, visible = _this$asProps2.visible, preselectedValue = _this$asProps2.preselectedValue, onChange = _this$asProps2.onChange, onDisplayedPeriodChange = _this$asProps2.onDisplayedPeriodChange, locale = _this$asProps2.locale, disabled = _this$asProps2.disabled, disabledErrorText = _this$asProps2.disabledErrorText, getI18nText = _this$asProps2.getI18nText, animationsDisabled = _this$asProps2.animationsDisabled;
|
|
78
86
|
var value = visible ? [preselectedValue[0] || this.asProps.value[0], preselectedValue[1] || this.asProps.value[1]] : this.asProps.value;
|
|
79
|
-
return _objectSpread(_objectSpread({},
|
|
87
|
+
return _objectSpread(_objectSpread({}, _superPropGet(MonthRangePickerRoot2, "getButtonTriggerProps", this, 3)([])), {}, {
|
|
80
88
|
value,
|
|
81
89
|
onChange,
|
|
82
90
|
onDisplayedPeriodChange,
|
|
@@ -96,14 +104,13 @@ var MonthRangePickerRoot = /* @__PURE__ */ function(_RangePickerAbstract) {
|
|
|
96
104
|
key: "getTitleProps",
|
|
97
105
|
value: function getTitleProps(props, index) {
|
|
98
106
|
var _this$asProps3 = this.asProps, displayedPeriod = _this$asProps3.displayedPeriod, locale = _this$asProps3.locale;
|
|
99
|
-
return _objectSpread(_objectSpread({},
|
|
107
|
+
return _objectSpread(_objectSpread({}, _superPropGet(MonthRangePickerRoot2, "getTitleProps", this, 3)([props, index])), {}, {
|
|
100
108
|
children: new Intl.DateTimeFormat(locale, {
|
|
101
109
|
year: "numeric"
|
|
102
110
|
}).format(dayjs(displayedPeriod).add(index, this.navigateStep).startOf(this.navigateStep).toDate())
|
|
103
111
|
});
|
|
104
112
|
}
|
|
105
113
|
}]);
|
|
106
|
-
return MonthRangePickerRoot2;
|
|
107
114
|
}(RangePickerAbstract);
|
|
108
115
|
_defineProperty(MonthRangePickerRoot, "displayName", "MonthRangePicker");
|
|
109
116
|
_defineProperty(MonthRangePickerRoot, "defaultProps", function(props) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createComponent, assignProps } from "@semcore/core";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import BaseTrigger from "@semcore/base-trigger";
|
|
4
3
|
import addonTextChildren from "@semcore/core/lib/utils/addonTextChildren";
|
|
5
4
|
import Calendar from "@semcore/icon/Calendar/m";
|
|
5
|
+
import React from "react";
|
|
6
6
|
var ButtonTriggerRoot = function ButtonTriggerRoot2(_ref2) {
|
|
7
7
|
var _ref = arguments[0];
|
|
8
8
|
var Children = _ref2.Children;
|
|
@@ -1,60 +1,64 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
4
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
6
5
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
8
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
9
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
9
10
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
11
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import dayjs from "dayjs";
|
|
14
|
-
import isBetween from "../utils/isBetweenPlugin.mjs";
|
|
15
|
-
import { ScreenReaderOnly, Box } from "@semcore/flex-box";
|
|
12
|
+
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
13
|
+
import keyboardFocusEnhance from "@semcore/core/lib/utils/enhances/keyboardFocusEnhance";
|
|
16
14
|
import fire from "@semcore/core/lib/utils/fire";
|
|
17
|
-
import {
|
|
15
|
+
import { Box, ScreenReaderOnly } from "@semcore/flex-box";
|
|
16
|
+
import dayjs from "dayjs";
|
|
17
|
+
import React from "react";
|
|
18
18
|
import { formatDDMMYY, formatMMYY } from "../utils/formatDate.mjs";
|
|
19
|
-
import
|
|
19
|
+
import { includesDate } from "../utils/includesDate.mjs";
|
|
20
|
+
import isBetween from "../utils/isBetweenPlugin.mjs";
|
|
20
21
|
var _excluded = ["date"];
|
|
22
|
+
function _callSuper(t, o, e) {
|
|
23
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
24
|
+
}
|
|
21
25
|
/*!__reshadow-styles__:"../style/calendar.shadow.css"*/
|
|
22
26
|
var style = (
|
|
23
27
|
/*__reshadow_css_start__*/
|
|
24
28
|
(sstyled.insert(
|
|
25
29
|
/*__inner_css_start__*/
|
|
26
|
-
'.
|
|
30
|
+
'.___SCalendar_15xgr_gg_{display:flex;flex-direction:column}.___SGridDays_15xgr_gg_{display:grid;grid-template-columns:repeat(7,minmax(32px,auto));grid-template-rows:repeat(auto-fit,minmax(32px,auto))}.___SGridMonths_15xgr_gg_{display:grid;grid-row-gap:var(--intergalactic-spacing-2x, 8px);grid-template-columns:repeat(3,minmax(60px,auto));grid-template-rows:repeat(4,minmax(32px,auto))}.___SWeekDays_15xgr_gg_{display:grid;grid-template-columns:repeat(7,minmax(32px,auto))}.___SCalendarUnit_15xgr_gg_,.___SWeekDay_15xgr_gg_{align-items:center;display:flex;font-size:var(--intergalactic-fs-200, 14px);justify-content:center;min-height:32px;min-width:32px}.___SWeekDay_15xgr_gg_{color:var(--intergalactic-text-secondary, #6c6e79);font-weight:var(--intergalactic-regular, 400);overflow:hidden}.___SCalendarUnit_15xgr_gg_{font-family:inherit;font-weight:400;line-height:normal;-webkit-text-decoration:none;text-decoration:none;text-align:center;vertical-align:middle;border:1px solid transparent;color:var(--intergalactic-text-primary, #191b23);box-shadow:none;overflow:visible;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;background-color:var(--intergalactic-date-picker-cell, #ffffff);border-radius:var(--intergalactic-control-rounded, 6px);box-sizing:border-box;cursor:pointer;position:relative;transition:color .15s,background .15s,box-shadow .15s,border-radius .15s .15s;outline:0;margin:4px 0 0}@media (hover:hover){.___SCalendarUnit_15xgr_gg_:hover{color:var(--intergalactic-text-primary, #191b23);background-color:var(--intergalactic-date-picker-cell-hover, #e0e1e9)}}.___SCalendarUnit_15xgr_gg_:focus-visible{outline:0}.___SCalendarUnit_15xgr_gg_.__today_15xgr_gg_:before{content:"";position:absolute;display:block;top:1px;left:1px;border-radius:var(--intergalactic-control-rounded, 6px);width:calc(100% - 2px);height:calc(100% - 2px);box-sizing:border-box;border:1px solid var(--intergalactic-date-picker-cell-current, #8a8e9b)}.___SCalendarUnit_15xgr_gg_.___SCalendarUnit_15xgr_gg_.__today_15xgr_gg_.__endSelected_15xgr_gg_:before,.___SCalendarUnit_15xgr_gg_.___SCalendarUnit_15xgr_gg_.__today_15xgr_gg_.__startSelected_15xgr_gg_:before{border-color:var(--intergalactic-border-secondary, #e0e1e9)}.___SCalendarUnit_15xgr_gg_.__highlighted_15xgr_gg_,.___SCalendarUnit_15xgr_gg_.__selected_15xgr_gg_{border-radius:0;transition:color .15s,background .15s,box-shadow .15s,border-radius 0s 0s;color:var(--intergalactic-text-primary, #191b23)}.___SCalendarUnit_15xgr_gg_.__selected_15xgr_gg_{background-color:var(--intergalactic-date-picker-cell-range, #c4e5fe)}@media (hover:hover){.___SCalendarUnit_15xgr_gg_.__selected_15xgr_gg_:hover{background-color:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}}.___SCalendarUnit_15xgr_gg_.__highlighted_15xgr_gg_{background-color:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}@media (hover:hover){.___SCalendarUnit_15xgr_gg_.__highlighted_15xgr_gg_:hover{background-color:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}}.___SCalendarUnit_15xgr_gg_.__startSelected_15xgr_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SCalendarUnit_15xgr_gg_.__startSelected_15xgr_gg_:not(.__highlighted_15xgr_gg_){border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:0;border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-top-right-radius:0}@media (hover:hover){.___SCalendarUnit_15xgr_gg_.__startSelected_15xgr_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-active-hover, #008ff8)}}.___SCalendarUnit_15xgr_gg_.__endSelected_15xgr_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff);color:var(--intergalactic-text-primary-invert, #ffffff)}.___SCalendarUnit_15xgr_gg_.__endSelected_15xgr_gg_:not(.__highlighted_15xgr_gg_){border-bottom-left-radius:0;border-bottom-right-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:0;border-top-right-radius:var(--intergalactic-control-rounded, 6px)}@media (hover:hover){.___SCalendarUnit_15xgr_gg_.__endSelected_15xgr_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-active-hover, #008ff8)}}.___SCalendarUnit_15xgr_gg_.__startHighlighted_15xgr_gg_:not(.__selected_15xgr_gg_){border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:0;border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-top-right-radius:0}.___SCalendarUnit_15xgr_gg_.__endHighlighted_15xgr_gg_:not(.__selected_15xgr_gg_){border-bottom-left-radius:0;border-bottom-right-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:0;border-top-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_15xgr_gg_.__startHighlighted_15xgr_gg_.___SCalendarUnit_15xgr_gg_.__endHighlighted_15xgr_gg_,.___SCalendarUnit_15xgr_gg_.__startSelected_15xgr_gg_.___SCalendarUnit_15xgr_gg_.__endSelected_15xgr_gg_{border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-top-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_15xgr_gg_.__compareHighlighted_15xgr_gg_{border-top:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);border-bottom:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);border-radius:0;transition:none}.___SCalendarUnit_15xgr_gg_.__compareEndHighlighted_15xgr_gg_,.___SCalendarUnit_15xgr_gg_.__compareStartHighlighted_15xgr_gg_{border-left:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);border-right:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SCalendarUnit_15xgr_gg_.__compareEnd_15xgr_gg_,.___SCalendarUnit_15xgr_gg_.__compareStart_15xgr_gg_{border-radius:0;background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1);color:var(--intergalactic-text-primary-invert, #ffffff)}@media (hover:hover){.___SCalendarUnit_15xgr_gg_.__compareEnd_15xgr_gg_:hover,.___SCalendarUnit_15xgr_gg_.__compareStart_15xgr_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-comparison-active-hover, #5925ab)}}.___SCalendarUnit_15xgr_gg_.__compareStartHighlighted_15xgr_gg_{border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-left-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_15xgr_gg_.__compareEndHighlighted_15xgr_gg_{border-top-right-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_15xgr_gg_.__compareStart_15xgr_gg_:not(.__compareHighlighted_15xgr_gg_){border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-left-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_15xgr_gg_.__compareEnd_15xgr_gg_:not(.__compareHighlighted_15xgr_gg_){border-top-right-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_15xgr_gg_.__outdated_15xgr_gg_{opacity:.2}.___SCalendarUnit_15xgr_gg_.__disabled_15xgr_gg_{opacity:.4;cursor:default;pointer-events:none}.___SCalendar_15xgr_gg_:focus{outline:0}.___SCalendar_15xgr_gg_:focus .___SCalendarUnit_15xgr_gg_.__highlighted_15xgr_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus,\n 0px 0px 0px 3px rgba(0, 143, 248, 0.5)\n )}.___SCalendar_15xgr_gg_:focus:not(.___SCalendar_15xgr_gg_:focus:has(.___SCalendarUnit_15xgr_gg_.__highlighted_15xgr_gg_)){box-shadow:var(--intergalactic-keyboard-focus,\n 0px 0px 0px 3px rgba(0, 143, 248, 0.5)\n )}@media (prefers-reduced-motion){.___SCalendarUnit_15xgr_gg_,.___SCalendarUnit_15xgr_gg_.__highlighted_15xgr_gg_,.___SCalendarUnit_15xgr_gg_.__selected_15xgr_gg_{transition:none}}',
|
|
27
31
|
/*__inner_css_end__*/
|
|
28
|
-
"
|
|
32
|
+
"15xgr_gg_"
|
|
29
33
|
), /*__reshadow_css_end__*/
|
|
30
34
|
{
|
|
31
|
-
"__SCalendar": "
|
|
32
|
-
"__SGridDays": "
|
|
33
|
-
"__SGridMonths": "
|
|
34
|
-
"__SWeekDays": "
|
|
35
|
-
"__SWeekDay": "
|
|
36
|
-
"__SCalendarUnit": "
|
|
37
|
-
"_startHighlighted": "
|
|
38
|
-
"_selected": "
|
|
39
|
-
"_endHighlighted": "
|
|
40
|
-
"_startSelected": "
|
|
41
|
-
"_endSelected": "
|
|
42
|
-
"_compareHighlighted": "
|
|
43
|
-
"_compareStartHighlighted": "
|
|
44
|
-
"_compareEndHighlighted": "
|
|
45
|
-
"_compareStart": "
|
|
46
|
-
"_compareEnd": "
|
|
47
|
-
"_outdated": "
|
|
48
|
-
"_disabled": "
|
|
49
|
-
"_highlighted": "
|
|
50
|
-
"_today": "
|
|
35
|
+
"__SCalendar": "___SCalendar_15xgr_gg_",
|
|
36
|
+
"__SGridDays": "___SGridDays_15xgr_gg_",
|
|
37
|
+
"__SGridMonths": "___SGridMonths_15xgr_gg_",
|
|
38
|
+
"__SWeekDays": "___SWeekDays_15xgr_gg_",
|
|
39
|
+
"__SWeekDay": "___SWeekDay_15xgr_gg_",
|
|
40
|
+
"__SCalendarUnit": "___SCalendarUnit_15xgr_gg_",
|
|
41
|
+
"_startHighlighted": "__startHighlighted_15xgr_gg_",
|
|
42
|
+
"_selected": "__selected_15xgr_gg_",
|
|
43
|
+
"_endHighlighted": "__endHighlighted_15xgr_gg_",
|
|
44
|
+
"_startSelected": "__startSelected_15xgr_gg_",
|
|
45
|
+
"_endSelected": "__endSelected_15xgr_gg_",
|
|
46
|
+
"_compareHighlighted": "__compareHighlighted_15xgr_gg_",
|
|
47
|
+
"_compareStartHighlighted": "__compareStartHighlighted_15xgr_gg_",
|
|
48
|
+
"_compareEndHighlighted": "__compareEndHighlighted_15xgr_gg_",
|
|
49
|
+
"_compareStart": "__compareStart_15xgr_gg_",
|
|
50
|
+
"_compareEnd": "__compareEnd_15xgr_gg_",
|
|
51
|
+
"_outdated": "__outdated_15xgr_gg_",
|
|
52
|
+
"_disabled": "__disabled_15xgr_gg_",
|
|
53
|
+
"_highlighted": "__highlighted_15xgr_gg_",
|
|
54
|
+
"_today": "__today_15xgr_gg_"
|
|
51
55
|
})
|
|
52
56
|
);
|
|
53
57
|
dayjs.extend(isBetween);
|
|
54
58
|
var range = function range2(N, cb) {
|
|
55
59
|
return Array.from({
|
|
56
60
|
length: N
|
|
57
|
-
}, function(
|
|
61
|
+
}, function(_v, k) {
|
|
58
62
|
return cb(k);
|
|
59
63
|
});
|
|
60
64
|
};
|
|
@@ -69,13 +73,12 @@ function getDayJSLocaleParams(locale) {
|
|
|
69
73
|
}, dayjs.Ls[locale]);
|
|
70
74
|
}
|
|
71
75
|
var CalendarWeekDaysRoot = /* @__PURE__ */ function(_Component) {
|
|
72
|
-
_inherits(CalendarWeekDaysRoot2, _Component);
|
|
73
|
-
var _super = _createSuper(CalendarWeekDaysRoot2);
|
|
74
76
|
function CalendarWeekDaysRoot2() {
|
|
75
77
|
_classCallCheck(this, CalendarWeekDaysRoot2);
|
|
76
|
-
return
|
|
78
|
+
return _callSuper(this, CalendarWeekDaysRoot2, arguments);
|
|
77
79
|
}
|
|
78
|
-
|
|
80
|
+
_inherits(CalendarWeekDaysRoot2, _Component);
|
|
81
|
+
return _createClass(CalendarWeekDaysRoot2, [{
|
|
79
82
|
key: "getDaysByWeek",
|
|
80
83
|
value: function getDaysByWeek() {
|
|
81
84
|
var locale = this.asProps.locale;
|
|
@@ -89,7 +92,7 @@ var CalendarWeekDaysRoot = /* @__PURE__ */ function(_Component) {
|
|
|
89
92
|
}).format(date.valueOf());
|
|
90
93
|
date = date.add(1, "day");
|
|
91
94
|
return {
|
|
92
|
-
children: _short,
|
|
95
|
+
"children": _short,
|
|
93
96
|
"aria-label": _long
|
|
94
97
|
};
|
|
95
98
|
});
|
|
@@ -110,14 +113,13 @@ var CalendarWeekDaysRoot = /* @__PURE__ */ function(_Component) {
|
|
|
110
113
|
return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SWeekDays, _ref6.cn("SWeekDays", _objectSpread({}, assignProps({}, _ref))), /* @__PURE__ */ React.createElement(Children, _ref6.cn("Children", {})));
|
|
111
114
|
}
|
|
112
115
|
}]);
|
|
113
|
-
return CalendarWeekDaysRoot2;
|
|
114
116
|
}(Component);
|
|
115
117
|
_defineProperty(CalendarWeekDaysRoot, "displayName", "CalendarWeekDays");
|
|
116
118
|
_defineProperty(CalendarWeekDaysRoot, "style", style);
|
|
117
119
|
_defineProperty(CalendarWeekDaysRoot, "defaultProps", {
|
|
118
120
|
locale: "en",
|
|
119
|
-
children: function children(
|
|
120
|
-
var days =
|
|
121
|
+
children: function children(_ref15) {
|
|
122
|
+
var days = _ref15.days;
|
|
121
123
|
return days.map(function(data, i) {
|
|
122
124
|
return /* @__PURE__ */ React.createElement(CalendarWeekDays.Unit, _extends({
|
|
123
125
|
key: i
|
|
@@ -125,9 +127,9 @@ _defineProperty(CalendarWeekDaysRoot, "defaultProps", {
|
|
|
125
127
|
});
|
|
126
128
|
}
|
|
127
129
|
});
|
|
128
|
-
function CalendarWeekUnit(
|
|
130
|
+
function CalendarWeekUnit(_ref1) {
|
|
129
131
|
var _ref2 = arguments[0], _ref7;
|
|
130
|
-
var styles =
|
|
132
|
+
var styles = _ref1.styles;
|
|
131
133
|
var SWeekDay = Box;
|
|
132
134
|
return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SWeekDay, _ref7.cn("SWeekDay", _objectSpread({}, assignProps({
|
|
133
135
|
"role": "columnheader"
|
|
@@ -138,9 +140,9 @@ function resolveHighlighting(date, unit, highlighted) {
|
|
|
138
140
|
var highlighted1 = highlighted[1] ? dayjs(highlighted[1]) : highlighted0;
|
|
139
141
|
if (highlighted0 && highlighted1) {
|
|
140
142
|
if (highlighted0 > highlighted1) {
|
|
141
|
-
var
|
|
142
|
-
highlighted1 =
|
|
143
|
-
highlighted0 =
|
|
143
|
+
var _ref10 = [highlighted0, highlighted1];
|
|
144
|
+
highlighted1 = _ref10[0];
|
|
145
|
+
highlighted0 = _ref10[1];
|
|
144
146
|
}
|
|
145
147
|
return {
|
|
146
148
|
highlighted: date.isBetween(highlighted0, highlighted1, unit, "[]"),
|
|
@@ -160,9 +162,9 @@ function resolveSelecting(date, unit, value) {
|
|
|
160
162
|
var selected;
|
|
161
163
|
if (value0 && value1) {
|
|
162
164
|
if (value0 > value1) {
|
|
163
|
-
var
|
|
164
|
-
value1 =
|
|
165
|
-
value0 =
|
|
165
|
+
var _ref11 = [value0, value1];
|
|
166
|
+
value1 = _ref11[0];
|
|
167
|
+
value0 = _ref11[1];
|
|
166
168
|
}
|
|
167
169
|
selected = date.isBetween(value0, value1, unit, "()");
|
|
168
170
|
}
|
|
@@ -175,28 +177,27 @@ function resolveSelecting(date, unit, value) {
|
|
|
175
177
|
};
|
|
176
178
|
}
|
|
177
179
|
var CalendarAbstract = /* @__PURE__ */ function(_Component2) {
|
|
178
|
-
_inherits(CalendarAbstract2, _Component2);
|
|
179
|
-
var _super2 = _createSuper(CalendarAbstract2);
|
|
180
180
|
function CalendarAbstract2() {
|
|
181
181
|
var _this;
|
|
182
182
|
_classCallCheck(this, CalendarAbstract2);
|
|
183
183
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
184
184
|
args[_key] = arguments[_key];
|
|
185
185
|
}
|
|
186
|
-
_this =
|
|
187
|
-
_defineProperty(
|
|
188
|
-
_defineProperty(
|
|
186
|
+
_this = _callSuper(this, CalendarAbstract2, [].concat(args));
|
|
187
|
+
_defineProperty(_this, "today", new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)));
|
|
188
|
+
_defineProperty(_this, "handleMouseLeave", function() {
|
|
189
189
|
var highlighted = _this.asProps.highlighted;
|
|
190
|
-
fire(
|
|
190
|
+
fire(_this, "onHighlightedChange", highlighted.length ? [highlighted[0]] : []);
|
|
191
191
|
});
|
|
192
|
-
_defineProperty(
|
|
192
|
+
_defineProperty(_this, "formatter", formatDDMMYY);
|
|
193
193
|
return _this;
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
_inherits(CalendarAbstract2, _Component2);
|
|
196
|
+
return _createClass(CalendarAbstract2, [{
|
|
196
197
|
key: "createUnit",
|
|
197
|
-
value: function createUnit(
|
|
198
|
+
value: function createUnit(_ref12, unit) {
|
|
198
199
|
var _this2 = this;
|
|
199
|
-
var date =
|
|
200
|
+
var date = _ref12.date, other = _objectWithoutProperties(_ref12, _excluded);
|
|
200
201
|
var self = this;
|
|
201
202
|
var _this$asProps2 = this.asProps, _disabled = _this$asProps2.disabled, value = _this$asProps2.value, compare = _this$asProps2.compare, highlighted = _this$asProps2.highlighted, compareHighlighted = _this$asProps2.compareHighlighted, locale = _this$asProps2.locale;
|
|
202
203
|
var highlighting = resolveHighlighting(date, unit, highlighted !== null && highlighted !== void 0 ? highlighted : []);
|
|
@@ -205,27 +206,27 @@ var CalendarAbstract = /* @__PURE__ */ function(_Component2) {
|
|
|
205
206
|
var comparing = resolveSelecting(date, unit, compare !== null && compare !== void 0 ? compare : []);
|
|
206
207
|
var disabled = _disabled.some(includesDate(date, unit));
|
|
207
208
|
return _objectSpread({
|
|
208
|
-
date: formatDDMMYY(date, locale),
|
|
209
|
-
dateKey: this.formatter(date, locale),
|
|
210
|
-
children: "",
|
|
211
|
-
role: "gridcell",
|
|
212
|
-
startSelected: selecting.startSelected,
|
|
213
|
-
endSelected: selecting.endSelected,
|
|
214
|
-
selected: selecting.selected,
|
|
215
|
-
highlighted: highlighting.highlighted,
|
|
216
|
-
startHighlighted: highlighting.startHighlighted,
|
|
217
|
-
endHighlighted: highlighting.endHighlighted,
|
|
218
|
-
compareHighlighted: comparedHighlighting.highlighted || comparing.selected,
|
|
219
|
-
compareStartHighlighted: comparedHighlighting.startHighlighted,
|
|
220
|
-
compareEndHighlighted: comparedHighlighting.endHighlighted,
|
|
221
|
-
compareStart: comparing.startSelected,
|
|
222
|
-
compareEnd: comparing.endSelected,
|
|
209
|
+
"date": formatDDMMYY(date, locale),
|
|
210
|
+
"dateKey": this.formatter(date, locale),
|
|
211
|
+
"children": "",
|
|
212
|
+
"role": "gridcell",
|
|
213
|
+
"startSelected": selecting.startSelected,
|
|
214
|
+
"endSelected": selecting.endSelected,
|
|
215
|
+
"selected": selecting.selected,
|
|
216
|
+
"highlighted": highlighting.highlighted,
|
|
217
|
+
"startHighlighted": highlighting.startHighlighted,
|
|
218
|
+
"endHighlighted": highlighting.endHighlighted,
|
|
219
|
+
"compareHighlighted": comparedHighlighting.highlighted || comparing.selected,
|
|
220
|
+
"compareStartHighlighted": comparedHighlighting.startHighlighted,
|
|
221
|
+
"compareEndHighlighted": comparedHighlighting.endHighlighted,
|
|
222
|
+
"compareStart": comparing.startSelected,
|
|
223
|
+
"compareEnd": comparing.endSelected,
|
|
223
224
|
"aria-selected": selecting.selected,
|
|
224
225
|
"aria-disabled": disabled,
|
|
225
226
|
"aria-current": highlighting.highlighted ? "date" : void 0,
|
|
226
227
|
disabled,
|
|
227
|
-
today: date.isSame(self.today, unit),
|
|
228
|
-
onClick: function onClick() {
|
|
228
|
+
"today": date.isSame(self.today, unit),
|
|
229
|
+
"onClick": function onClick() {
|
|
229
230
|
var _this2$asProps = _this2.asProps, range3 = _this2$asProps.range, _highlighted = _this2$asProps.highlighted;
|
|
230
231
|
var highlighted2 = [date.valueOf()];
|
|
231
232
|
if (_highlighted.length === 1) {
|
|
@@ -240,7 +241,7 @@ var CalendarAbstract = /* @__PURE__ */ function(_Component2) {
|
|
|
240
241
|
}
|
|
241
242
|
fire(_this2, "onChange", date.toDate());
|
|
242
243
|
},
|
|
243
|
-
onMouseEnter: function onMouseEnter() {
|
|
244
|
+
"onMouseEnter": function onMouseEnter() {
|
|
244
245
|
var _this2$asProps2 = _this2.asProps, range3 = _this2$asProps2.range, _highlighted = _this2$asProps2.highlighted;
|
|
245
246
|
var value2 = range3 === "compare" ? _this2.asProps.compare : _this2.asProps.value;
|
|
246
247
|
if (_highlighted[0] || (value2 !== null && value2 !== void 0 ? value2 : []).length === 1) {
|
|
@@ -257,14 +258,14 @@ var CalendarAbstract = /* @__PURE__ */ function(_Component2) {
|
|
|
257
258
|
}
|
|
258
259
|
}, {
|
|
259
260
|
key: "getUnitProps",
|
|
260
|
-
value: function getUnitProps(
|
|
261
|
-
var dateKey =
|
|
261
|
+
value: function getUnitProps(_ref13, index) {
|
|
262
|
+
var dateKey = _ref13.dateKey;
|
|
262
263
|
var inRow = 7;
|
|
263
264
|
var unitRefs = this.asProps.unitRefs;
|
|
264
265
|
return {
|
|
265
266
|
"aria-colindex": index % inRow + 1,
|
|
266
267
|
"aria-rowindex": Math.floor(index / inRow) + 1,
|
|
267
|
-
ref: function ref(node) {
|
|
268
|
+
"ref": function ref(node) {
|
|
268
269
|
if (!dateKey) return;
|
|
269
270
|
unitRefs[dateKey] = node;
|
|
270
271
|
}
|
|
@@ -320,12 +321,11 @@ var CalendarAbstract = /* @__PURE__ */ function(_Component2) {
|
|
|
320
321
|
return description;
|
|
321
322
|
}
|
|
322
323
|
}]);
|
|
323
|
-
return CalendarAbstract2;
|
|
324
324
|
}(Component);
|
|
325
325
|
_defineProperty(CalendarAbstract, "style", style);
|
|
326
|
-
function CalendarUnit(
|
|
326
|
+
function CalendarUnit(_ref14) {
|
|
327
327
|
var _ref3 = arguments[0], _ref8;
|
|
328
|
-
var styles =
|
|
328
|
+
var styles = _ref14.styles, date = _ref14.date, _long2 = _ref14["long"], outdated = _ref14.outdated, disabled = _ref14.disabled, highlighted = _ref14.highlighted;
|
|
329
329
|
var SCalendarUnit = Box;
|
|
330
330
|
return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SCalendarUnit, _ref8.cn("SCalendarUnit", _objectSpread({}, assignProps({
|
|
331
331
|
"use:disabled": disabled || outdated || !date,
|
|
@@ -335,14 +335,13 @@ function CalendarUnit(_ref16) {
|
|
|
335
335
|
}, _ref3))));
|
|
336
336
|
}
|
|
337
337
|
CalendarUnit.enhance = [keyboardFocusEnhance()];
|
|
338
|
-
var CalendarDaysRoot = /* @__PURE__ */ function(
|
|
339
|
-
_inherits(CalendarDaysRoot2, _CalendarAbstract);
|
|
340
|
-
var _super3 = _createSuper(CalendarDaysRoot2);
|
|
338
|
+
var CalendarDaysRoot = /* @__PURE__ */ function(_CalendarAbstract2) {
|
|
341
339
|
function CalendarDaysRoot2() {
|
|
342
340
|
_classCallCheck(this, CalendarDaysRoot2);
|
|
343
|
-
return
|
|
341
|
+
return _callSuper(this, CalendarDaysRoot2, arguments);
|
|
344
342
|
}
|
|
345
|
-
|
|
343
|
+
_inherits(CalendarDaysRoot2, _CalendarAbstract2);
|
|
344
|
+
return _createClass(CalendarDaysRoot2, [{
|
|
346
345
|
key: "getDaysByMonth",
|
|
347
346
|
value: function getDaysByMonth() {
|
|
348
347
|
var _this4 = this;
|
|
@@ -420,7 +419,6 @@ var CalendarDaysRoot = /* @__PURE__ */ function(_CalendarAbstract) {
|
|
|
420
419
|
}), description)));
|
|
421
420
|
}
|
|
422
421
|
}]);
|
|
423
|
-
return CalendarDaysRoot2;
|
|
424
422
|
}(CalendarAbstract);
|
|
425
423
|
_defineProperty(CalendarDaysRoot, "displayName", "CalendarDays");
|
|
426
424
|
_defineProperty(CalendarDaysRoot, "defaultProps", {
|
|
@@ -428,8 +426,8 @@ _defineProperty(CalendarDaysRoot, "defaultProps", {
|
|
|
428
426
|
disabled: [],
|
|
429
427
|
value: [],
|
|
430
428
|
locale: "en",
|
|
431
|
-
children: function children2(
|
|
432
|
-
var days =
|
|
429
|
+
children: function children2(_ref16) {
|
|
430
|
+
var days = _ref16.days;
|
|
433
431
|
return days.map(function(data, i) {
|
|
434
432
|
return /* @__PURE__ */ React.createElement(CalendarDays.Unit, _extends({
|
|
435
433
|
key: i
|
|
@@ -437,20 +435,19 @@ _defineProperty(CalendarDaysRoot, "defaultProps", {
|
|
|
437
435
|
});
|
|
438
436
|
}
|
|
439
437
|
});
|
|
440
|
-
var CalendarMonthsRoot = /* @__PURE__ */ function(
|
|
441
|
-
_inherits(CalendarMonthsRoot2, _CalendarAbstract2);
|
|
442
|
-
var _super4 = _createSuper(CalendarMonthsRoot2);
|
|
438
|
+
var CalendarMonthsRoot = /* @__PURE__ */ function(_CalendarAbstract3) {
|
|
443
439
|
function CalendarMonthsRoot2() {
|
|
444
440
|
var _this5;
|
|
445
441
|
_classCallCheck(this, CalendarMonthsRoot2);
|
|
446
442
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
447
443
|
args[_key2] = arguments[_key2];
|
|
448
444
|
}
|
|
449
|
-
_this5 =
|
|
450
|
-
_defineProperty(
|
|
445
|
+
_this5 = _callSuper(this, CalendarMonthsRoot2, [].concat(args));
|
|
446
|
+
_defineProperty(_this5, "formatter", formatMMYY);
|
|
451
447
|
return _this5;
|
|
452
448
|
}
|
|
453
|
-
|
|
449
|
+
_inherits(CalendarMonthsRoot2, _CalendarAbstract3);
|
|
450
|
+
return _createClass(CalendarMonthsRoot2, [{
|
|
454
451
|
key: "getMonthsByYear",
|
|
455
452
|
value: function getMonthsByYear() {
|
|
456
453
|
var _this6 = this;
|
|
@@ -481,29 +478,28 @@ var CalendarMonthsRoot = /* @__PURE__ */ function(_CalendarAbstract2) {
|
|
|
481
478
|
}, {
|
|
482
479
|
key: "render",
|
|
483
480
|
value: function render() {
|
|
484
|
-
var _ref5 = this.asProps,
|
|
481
|
+
var _ref5 = this.asProps, _ref0;
|
|
485
482
|
var SCalendar = Box;
|
|
486
483
|
var SGridMonths = "div";
|
|
487
484
|
var _this$asProps7 = this.asProps, Children = _this$asProps7.Children, styles = _this$asProps7.styles;
|
|
488
485
|
var description = this.describeValue();
|
|
489
|
-
return
|
|
486
|
+
return _ref0 = sstyled(styles), /* @__PURE__ */ React.createElement(SCalendar, _ref0.cn("SCalendar", _objectSpread({}, assignProps(_objectSpread({}, this.getRootProps()), _ref5))), /* @__PURE__ */ React.createElement(SGridMonths, _ref0.cn("SGridMonths", {
|
|
490
487
|
"onMouseLeave": this.handleMouseLeave,
|
|
491
488
|
"role": "row"
|
|
492
|
-
}), /* @__PURE__ */ React.createElement(Children,
|
|
489
|
+
}), /* @__PURE__ */ React.createElement(Children, _ref0.cn("Children", {}))), /* @__PURE__ */ React.createElement(ScreenReaderOnly, _ref0.cn("ScreenReaderOnly", {
|
|
493
490
|
"role": "row"
|
|
494
|
-
}), /* @__PURE__ */ React.createElement("span",
|
|
491
|
+
}), /* @__PURE__ */ React.createElement("span", _ref0.cn("span", {
|
|
495
492
|
"aria-live": "polite",
|
|
496
493
|
"role": "gridcell"
|
|
497
494
|
}), description)));
|
|
498
495
|
}
|
|
499
496
|
}]);
|
|
500
|
-
return CalendarMonthsRoot2;
|
|
501
497
|
}(CalendarAbstract);
|
|
502
498
|
_defineProperty(CalendarMonthsRoot, "displayName", "CalendarMonths");
|
|
503
499
|
_defineProperty(CalendarMonthsRoot, "defaultProps", {
|
|
504
500
|
locale: "en",
|
|
505
|
-
children: function children3(
|
|
506
|
-
var months =
|
|
501
|
+
children: function children3(_ref17) {
|
|
502
|
+
var months = _ref17.months;
|
|
507
503
|
return months.map(function(data, i) {
|
|
508
504
|
return /* @__PURE__ */ React.createElement(CalendarMonths.Unit, _extends({
|
|
509
505
|
key: i
|