@semcore/date-picker 4.10.0 → 4.10.1-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 +16 -16
- package/lib/cjs/components/InputTrigger.js +19 -19
- package/lib/cjs/components/PickerAbstract.js +19 -19
- package/lib/cjs/components/RangePickerAbstract.js +19 -19
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/components/Calendar.js +16 -16
- package/lib/es6/components/InputTrigger.js +19 -19
- package/lib/es6/components/PickerAbstract.js +19 -19
- package/lib/es6/components/RangePickerAbstract.js +19 -19
- package/lib/es6/index.d.js.map +1 -1
- package/lib/types/index.d.ts +21 -6
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [4.10.
|
|
5
|
+
## [4.10.1-prerelease.0] - 2023-09-20
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed types for `value` and `onChange` in DateRangePicker.Trigger.
|
|
10
|
+
|
|
11
|
+
## [4.10.0] - 2023-09-19
|
|
6
12
|
|
|
7
13
|
### Changed
|
|
8
14
|
|
|
@@ -28,22 +28,22 @@ var _includesDate = _interopRequireDefault(require("../utils/includesDate"));
|
|
|
28
28
|
var _formatDate = require("../utils/formatDate");
|
|
29
29
|
var _excluded = ["date"];
|
|
30
30
|
/*__reshadow-styles__:"../style/calendar.shadow.css"*/
|
|
31
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
32
|
-
"__SCalendar": "
|
|
33
|
-
"__SGridDays": "
|
|
34
|
-
"__SGridMonths": "
|
|
35
|
-
"__SWeekDays": "
|
|
36
|
-
"__SWeekDay": "
|
|
37
|
-
"__SCalendarUnit": "
|
|
38
|
-
"_today": "
|
|
39
|
-
"_startSelected": "
|
|
40
|
-
"_endSelected": "
|
|
41
|
-
"_selected": "
|
|
42
|
-
"_highlighted": "
|
|
43
|
-
"_startHighlighted": "
|
|
44
|
-
"_endHighlighted": "
|
|
45
|
-
"_outdated": "
|
|
46
|
-
"_disabled": "
|
|
31
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SCalendar_udj7f_gg_{display:flex;flex-direction:column}.___SGridDays_udj7f_gg_{display:grid;grid-template-columns:repeat(7,minmax(32px,auto));grid-template-rows:repeat(auto-fit,minmax(32px,auto))}.___SGridMonths_udj7f_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_udj7f_gg_{display:grid;grid-template-columns:repeat(7,minmax(32px,auto))}.___SCalendarUnit_udj7f_gg_,.___SWeekDay_udj7f_gg_{align-items:center;display:flex;font-size:var(--intergalactic-fs-200, 14px);justify-content:center;min-height:32px;min-width:32px}.___SWeekDay_udj7f_gg_{color:var(--intergalactic-text-secondary, #6c6e79);font-weight:var(--intergalactic-regular, 400);overflow:hidden}.___SCalendarUnit_udj7f_gg_{font-family:inherit;font-weight:400;line-height:normal;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: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,border-radius .15s .15s;outline:0;margin:0}@media (hover:hover){.___SCalendarUnit_udj7f_gg_:hover{color:var(--intergalactic-text-primary, #191b23);background:var(--intergalactic-date-picker-cell-hover, #e0e1e9)}}.___SCalendarUnit_udj7f_gg_.focus-visible{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SCalendarUnit_udj7f_gg_:focus-visible{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SCalendarUnit_udj7f_gg_.__today_udj7f_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-border-primary, #c4c7cf)}.___SCalendarUnit_udj7f_gg_.__today_udj7f_gg_.___SCalendarUnit_udj7f_gg_.__endSelected_udj7f_gg_:before,.___SCalendarUnit_udj7f_gg_.__today_udj7f_gg_.___SCalendarUnit_udj7f_gg_.__startSelected_udj7f_gg_:before{border-color:var(--intergalactic-border-secondary, #e0e1e9)}.___SCalendarUnit_udj7f_gg_.__highlighted_udj7f_gg_,.___SCalendarUnit_udj7f_gg_.__selected_udj7f_gg_{border-radius:0;transition:color .15s,background .15s,border-radius 0s 0s;color:var(--intergalactic-text-primary, #191b23)}.___SCalendarUnit_udj7f_gg_.__selected_udj7f_gg_{background:var(--intergalactic-date-picker-cell-range, #c4e5fe)}@media (hover:hover){.___SCalendarUnit_udj7f_gg_.__selected_udj7f_gg_:hover{background:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}}.___SCalendarUnit_udj7f_gg_.__highlighted_udj7f_gg_{background:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}@media (hover:hover){.___SCalendarUnit_udj7f_gg_.__highlighted_udj7f_gg_:hover{background:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}}.___SCalendarUnit_udj7f_gg_.__startSelected_udj7f_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);background:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SCalendarUnit_udj7f_gg_.__startSelected_udj7f_gg_:not(.__highlighted_udj7f_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_udj7f_gg_.__startSelected_udj7f_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background:var(--intergalactic-date-picker-cell-active-hover, #008ff8)}}.___SCalendarUnit_udj7f_gg_.__endSelected_udj7f_gg_{background:var(--intergalactic-date-picker-cell-active, #2bb3ff);color:var(--intergalactic-text-primary-invert, #ffffff)}.___SCalendarUnit_udj7f_gg_.__endSelected_udj7f_gg_:not(.__highlighted_udj7f_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_udj7f_gg_.__endSelected_udj7f_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background:var(--intergalactic-date-picker-cell-active-hover, #008ff8)}}.___SCalendarUnit_udj7f_gg_.__startHighlighted_udj7f_gg_:not(.__selected_udj7f_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_udj7f_gg_.__endHighlighted_udj7f_gg_:not(.__selected_udj7f_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_udj7f_gg_.__startHighlighted_udj7f_gg_.___SCalendarUnit_udj7f_gg_.__endHighlighted_udj7f_gg_,.___SCalendarUnit_udj7f_gg_.__startSelected_udj7f_gg_.___SCalendarUnit_udj7f_gg_.__endSelected_udj7f_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_udj7f_gg_.__outdated_udj7f_gg_{opacity:.2}.___SCalendarUnit_udj7f_gg_.__disabled_udj7f_gg_{opacity:.4;cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SCalendarUnit_udj7f_gg_,.___SCalendarUnit_udj7f_gg_.__highlighted_udj7f_gg_,.___SCalendarUnit_udj7f_gg_.__selected_udj7f_gg_{transition:none}}" /*__inner_css_end__*/, "udj7f_gg_") /*__reshadow_css_end__*/, {
|
|
32
|
+
"__SCalendar": "___SCalendar_udj7f_gg_",
|
|
33
|
+
"__SGridDays": "___SGridDays_udj7f_gg_",
|
|
34
|
+
"__SGridMonths": "___SGridMonths_udj7f_gg_",
|
|
35
|
+
"__SWeekDays": "___SWeekDays_udj7f_gg_",
|
|
36
|
+
"__SWeekDay": "___SWeekDay_udj7f_gg_",
|
|
37
|
+
"__SCalendarUnit": "___SCalendarUnit_udj7f_gg_",
|
|
38
|
+
"_today": "__today_udj7f_gg_",
|
|
39
|
+
"_startSelected": "__startSelected_udj7f_gg_",
|
|
40
|
+
"_endSelected": "__endSelected_udj7f_gg_",
|
|
41
|
+
"_selected": "__selected_udj7f_gg_",
|
|
42
|
+
"_highlighted": "__highlighted_udj7f_gg_",
|
|
43
|
+
"_startHighlighted": "__startHighlighted_udj7f_gg_",
|
|
44
|
+
"_endHighlighted": "__endHighlighted_udj7f_gg_",
|
|
45
|
+
"_outdated": "__outdated_udj7f_gg_",
|
|
46
|
+
"_disabled": "__disabled_udj7f_gg_"
|
|
47
47
|
});
|
|
48
48
|
_dayjs["default"].extend(_isBetween["default"]);
|
|
49
49
|
var range = function range(N, cb) {
|
|
@@ -34,25 +34,25 @@ var _excluded = ["children", "id", "role", "aria-haspopup", "aria-label", "style
|
|
|
34
34
|
_excluded5 = ["value", "locale", "onDisplayedPeriodChange"],
|
|
35
35
|
_excluded6 = ["date", "onDateChange", "onDisplayedPeriodChange", "locale", "styles", "parts", "disabledDates", "forwardRef", "placeholders", "labelPrefix", "__excludeProps", "Root"];
|
|
36
36
|
/*__reshadow-styles__:"../style/date-picker.shadow.css"*/
|
|
37
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
38
|
-
"__SPopper": "
|
|
39
|
-
"__SHeader": "
|
|
40
|
-
"__STitle": "
|
|
41
|
-
"__SToday": "
|
|
42
|
-
"__SPeriod": "
|
|
43
|
-
"__SButton": "
|
|
44
|
-
"__SInner": "
|
|
45
|
-
"__SInputMask": "
|
|
46
|
-
"__SIndicator": "
|
|
47
|
-
"__SHumanizedDate": "
|
|
48
|
-
"__SSingleDateInput": "
|
|
49
|
-
"__SValue": "
|
|
50
|
-
"__SDateRange": "
|
|
51
|
-
"__SMask": "
|
|
52
|
-
"_focus-within": "__focus-
|
|
53
|
-
"_noHumanizedDate": "
|
|
54
|
-
"__SRangeSep": "
|
|
55
|
-
"_fulfilled": "
|
|
37
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SPopper_77rcq_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_77rcq_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_77rcq_gg_:active,.___SPopper_77rcq_gg_:focus{outline:0;text-decoration:none}@media (hover:hover){.___SPopper_77rcq_gg_:hover{outline:0;text-decoration:none}}.___SPopper_77rcq_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_77rcq_gg_,.___STitle_77rcq_gg_{display:flex;align-items:center}.___STitle_77rcq_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_77rcq_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_77rcq_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_77rcq_gg_ .___SInner_77rcq_gg_{justify-content:flex-start}.___SInputMask_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal}.___SIndicator_77rcq_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SHumanizedDate_77rcq_gg_{position:absolute;pointer-events:none}.___SDateRange_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_ .___SValue_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SValue_77rcq_gg_{opacity:0}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SSingleDateInput_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SMask_77rcq_gg_,.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_:focus-within .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SDateRange_77rcq_gg_:focus-within .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}" /*__inner_css_end__*/, "77rcq_gg_") /*__reshadow_css_end__*/, {
|
|
38
|
+
"__SPopper": "___SPopper_77rcq_gg_",
|
|
39
|
+
"__SHeader": "___SHeader_77rcq_gg_",
|
|
40
|
+
"__STitle": "___STitle_77rcq_gg_",
|
|
41
|
+
"__SToday": "___SToday_77rcq_gg_",
|
|
42
|
+
"__SPeriod": "___SPeriod_77rcq_gg_",
|
|
43
|
+
"__SButton": "___SButton_77rcq_gg_",
|
|
44
|
+
"__SInner": "___SInner_77rcq_gg_",
|
|
45
|
+
"__SInputMask": "___SInputMask_77rcq_gg_",
|
|
46
|
+
"__SIndicator": "___SIndicator_77rcq_gg_",
|
|
47
|
+
"__SHumanizedDate": "___SHumanizedDate_77rcq_gg_",
|
|
48
|
+
"__SSingleDateInput": "___SSingleDateInput_77rcq_gg_",
|
|
49
|
+
"__SValue": "___SValue_77rcq_gg_",
|
|
50
|
+
"__SDateRange": "___SDateRange_77rcq_gg_",
|
|
51
|
+
"__SMask": "___SMask_77rcq_gg_",
|
|
52
|
+
"_focus-within": "__focus-within_77rcq_gg_",
|
|
53
|
+
"_noHumanizedDate": "__noHumanizedDate_77rcq_gg_",
|
|
54
|
+
"__SRangeSep": "___SRangeSep_77rcq_gg_",
|
|
55
|
+
"_fulfilled": "__fulfilled_77rcq_gg_"
|
|
56
56
|
});
|
|
57
57
|
var defaultAllowedParts = {
|
|
58
58
|
year: true,
|
|
@@ -19,25 +19,25 @@ var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i
|
|
|
19
19
|
var _intergalacticDynamicLocales = require("../translations/__intergalactic-dynamic-locales");
|
|
20
20
|
var _includesDate = _interopRequireDefault(require("../utils/includesDate"));
|
|
21
21
|
/*__reshadow-styles__:"../style/date-picker.shadow.css"*/
|
|
22
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
23
|
-
"__SPopper": "
|
|
24
|
-
"__SHeader": "
|
|
25
|
-
"__STitle": "
|
|
26
|
-
"__SToday": "
|
|
27
|
-
"__SPeriod": "
|
|
28
|
-
"__SButton": "
|
|
29
|
-
"__SInner": "
|
|
30
|
-
"__SInputMask": "
|
|
31
|
-
"__SIndicator": "
|
|
32
|
-
"__SHumanizedDate": "
|
|
33
|
-
"__SSingleDateInput": "
|
|
34
|
-
"__SValue": "
|
|
35
|
-
"__SDateRange": "
|
|
36
|
-
"__SMask": "
|
|
37
|
-
"_focus-within": "__focus-
|
|
38
|
-
"_noHumanizedDate": "
|
|
39
|
-
"__SRangeSep": "
|
|
40
|
-
"_fulfilled": "
|
|
22
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SPopper_77rcq_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_77rcq_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_77rcq_gg_:active,.___SPopper_77rcq_gg_:focus{outline:0;text-decoration:none}@media (hover:hover){.___SPopper_77rcq_gg_:hover{outline:0;text-decoration:none}}.___SPopper_77rcq_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_77rcq_gg_,.___STitle_77rcq_gg_{display:flex;align-items:center}.___STitle_77rcq_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_77rcq_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_77rcq_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_77rcq_gg_ .___SInner_77rcq_gg_{justify-content:flex-start}.___SInputMask_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal}.___SIndicator_77rcq_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SHumanizedDate_77rcq_gg_{position:absolute;pointer-events:none}.___SDateRange_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_ .___SValue_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SValue_77rcq_gg_{opacity:0}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SSingleDateInput_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SMask_77rcq_gg_,.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_:focus-within .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SDateRange_77rcq_gg_:focus-within .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}" /*__inner_css_end__*/, "77rcq_gg_") /*__reshadow_css_end__*/, {
|
|
23
|
+
"__SPopper": "___SPopper_77rcq_gg_",
|
|
24
|
+
"__SHeader": "___SHeader_77rcq_gg_",
|
|
25
|
+
"__STitle": "___STitle_77rcq_gg_",
|
|
26
|
+
"__SToday": "___SToday_77rcq_gg_",
|
|
27
|
+
"__SPeriod": "___SPeriod_77rcq_gg_",
|
|
28
|
+
"__SButton": "___SButton_77rcq_gg_",
|
|
29
|
+
"__SInner": "___SInner_77rcq_gg_",
|
|
30
|
+
"__SInputMask": "___SInputMask_77rcq_gg_",
|
|
31
|
+
"__SIndicator": "___SIndicator_77rcq_gg_",
|
|
32
|
+
"__SHumanizedDate": "___SHumanizedDate_77rcq_gg_",
|
|
33
|
+
"__SSingleDateInput": "___SSingleDateInput_77rcq_gg_",
|
|
34
|
+
"__SValue": "___SValue_77rcq_gg_",
|
|
35
|
+
"__SDateRange": "___SDateRange_77rcq_gg_",
|
|
36
|
+
"__SMask": "___SMask_77rcq_gg_",
|
|
37
|
+
"_focus-within": "__focus-within_77rcq_gg_",
|
|
38
|
+
"_noHumanizedDate": "__noHumanizedDate_77rcq_gg_",
|
|
39
|
+
"__SRangeSep": "___SRangeSep_77rcq_gg_",
|
|
40
|
+
"_fulfilled": "__fulfilled_77rcq_gg_"
|
|
41
41
|
});
|
|
42
42
|
var INTERACTION_TAGS = ['INPUT'];
|
|
43
43
|
var defaultDisplayedPeriod = new Date(new Date().setHours(0, 0, 0, 0));
|
|
@@ -24,25 +24,25 @@ var _dropdown = _interopRequireDefault(require("@semcore/dropdown"));
|
|
|
24
24
|
var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i18nEnhance"));
|
|
25
25
|
var _intergalacticDynamicLocales = require("../translations/__intergalactic-dynamic-locales");
|
|
26
26
|
/*__reshadow-styles__:"../style/date-picker.shadow.css"*/
|
|
27
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
28
|
-
"__SPopper": "
|
|
29
|
-
"__SHeader": "
|
|
30
|
-
"__STitle": "
|
|
31
|
-
"__SToday": "
|
|
32
|
-
"__SPeriod": "
|
|
33
|
-
"__SButton": "
|
|
34
|
-
"__SInner": "
|
|
35
|
-
"__SInputMask": "
|
|
36
|
-
"__SIndicator": "
|
|
37
|
-
"__SHumanizedDate": "
|
|
38
|
-
"__SSingleDateInput": "
|
|
39
|
-
"__SValue": "
|
|
40
|
-
"__SDateRange": "
|
|
41
|
-
"__SMask": "
|
|
42
|
-
"_focus-within": "__focus-
|
|
43
|
-
"_noHumanizedDate": "
|
|
44
|
-
"__SRangeSep": "
|
|
45
|
-
"_fulfilled": "
|
|
27
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SPopper_77rcq_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_77rcq_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_77rcq_gg_:active,.___SPopper_77rcq_gg_:focus{outline:0;text-decoration:none}@media (hover:hover){.___SPopper_77rcq_gg_:hover{outline:0;text-decoration:none}}.___SPopper_77rcq_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_77rcq_gg_,.___STitle_77rcq_gg_{display:flex;align-items:center}.___STitle_77rcq_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_77rcq_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_77rcq_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_77rcq_gg_ .___SInner_77rcq_gg_{justify-content:flex-start}.___SInputMask_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal}.___SIndicator_77rcq_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SHumanizedDate_77rcq_gg_{position:absolute;pointer-events:none}.___SDateRange_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_ .___SValue_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SValue_77rcq_gg_{opacity:0}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SSingleDateInput_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SMask_77rcq_gg_,.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_:focus-within .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SDateRange_77rcq_gg_:focus-within .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}" /*__inner_css_end__*/, "77rcq_gg_") /*__reshadow_css_end__*/, {
|
|
28
|
+
"__SPopper": "___SPopper_77rcq_gg_",
|
|
29
|
+
"__SHeader": "___SHeader_77rcq_gg_",
|
|
30
|
+
"__STitle": "___STitle_77rcq_gg_",
|
|
31
|
+
"__SToday": "___SToday_77rcq_gg_",
|
|
32
|
+
"__SPeriod": "___SPeriod_77rcq_gg_",
|
|
33
|
+
"__SButton": "___SButton_77rcq_gg_",
|
|
34
|
+
"__SInner": "___SInner_77rcq_gg_",
|
|
35
|
+
"__SInputMask": "___SInputMask_77rcq_gg_",
|
|
36
|
+
"__SIndicator": "___SIndicator_77rcq_gg_",
|
|
37
|
+
"__SHumanizedDate": "___SHumanizedDate_77rcq_gg_",
|
|
38
|
+
"__SSingleDateInput": "___SSingleDateInput_77rcq_gg_",
|
|
39
|
+
"__SValue": "___SValue_77rcq_gg_",
|
|
40
|
+
"__SDateRange": "___SDateRange_77rcq_gg_",
|
|
41
|
+
"__SMask": "___SMask_77rcq_gg_",
|
|
42
|
+
"_focus-within": "__focus-within_77rcq_gg_",
|
|
43
|
+
"_noHumanizedDate": "__noHumanizedDate_77rcq_gg_",
|
|
44
|
+
"__SRangeSep": "___SRangeSep_77rcq_gg_",
|
|
45
|
+
"_fulfilled": "__fulfilled_77rcq_gg_"
|
|
46
46
|
});
|
|
47
47
|
var INTERACTION_TAGS = ['INPUT'];
|
|
48
48
|
var defaultDisplayedPeriod = new Date(new Date().setHours(0, 0, 0, 0));
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ChangeEvent, ComponentProps } from 'react';\nimport dayjs from 'dayjs';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';\nimport Button, { ButtonProps } from '@semcore/button';\nimport Dropdown, { DropdownProps, DropdownTriggerProps } from '@semcore/dropdown';\nimport { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\nimport BaseTrigger, { BaseTriggerProps } from '@semcore/base-trigger';\nimport Input, { InputProps, InputValueProps } from '@semcore/input';\nimport { InputMaskValueProps } from '@semcore/input-mask';\n\nexport type DateConstructorParams = string | number | Date;\n\n/** @deprecated */\nexport interface ICalendarProps extends CalendarProps, UnknownProperties {}\nexport type CalendarProps = BoxProps & {\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Array of dates blocked for selection\n * Accepts the date or the range of dates for specifying infinity ([Date | false, Date | false]), crontab(6,7)\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * @ignore\n * */\n highlighted?: DateConstructorParams[];\n /**\n * @ignore\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: Date;\n\n renderOutdated?: boolean;\n};\n\n/** @deprecated */\nexport interface ICalendarDaysContext extends CalendarDaysContext, UnknownProperties {}\nexport type CalendarDaysContext = {\n days: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarMonthsContext extends CalendarMonthsContext, UnknownProperties {}\nexport type CalendarMonthsContext = {\n months: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarUnitProps extends CalendarUnitProps, UnknownProperties {}\nexport type CalendarUnitProps = BoxProps & {\n selected?: boolean;\n outdated?: boolean;\n disabled?: boolean;\n today?: boolean;\n startSelected?: boolean;\n endSelected?: boolean;\n highlighted?: boolean;\n startHighlighted?: boolean;\n endHighlighted?: boolean;\n date?: Date;\n children?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface ICalendarContext extends CalendarContext, UnknownProperties {}\nexport type CalendarContext = {\n getUnitProps: PropGetterFn;\n};\n\ndeclare const Calendar: Intergalactic.Component<\n 'div',\n CalendarProps,\n CalendarContext & CalendarDaysContext,\n [handlers: AbstractDatePickerHandlers]\n> & {\n Unit: Intergalactic.Component<'div', CalendarUnitProps>;\n};\n\n/** @deprecated */\nexport interface IDatePickerProps extends DatePickerProps, UnknownProperties {}\nexport type DatePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams;\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams;\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerProps extends DateRangePickerProps, UnknownProperties {}\nexport type DateRangePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams[];\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l' | 'xl';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Remove the 'Reset' button\n * */\n unclearable?: boolean;\n /**\n * To be activated upon selecting the date\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerPeriodProps\n extends DateRangePickerPeriodProps,\n UnknownProperties {}\nexport type DateRangePickerPeriodProps = BoxProps & {\n /**\n * Current selected period\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated by clicking the button for switching the selected period.\n * */\n onChange?: (date: Date[]) => void;\n /**\n * To be activated by hovering a cursor over the button for changing the current displayed month.\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * To be activated by hovering a cursor over the button for selecting the dates.\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n};\n\n/** @deprecated */\nexport interface IDatePickerContext extends DatePickerContext, UnknownProperties {}\nexport type DatePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getTodayProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IAbstractDatePickerHandlers\n extends AbstractDatePickerHandlers,\n UnknownProperties {}\nexport type AbstractDatePickerHandlers = {\n displayedPeriod: (value: DateConstructorParams) => void;\n visible: (index: boolean) => void;\n highlighted: (list: DateConstructorParams[]) => void;\n value: (index: DateConstructorParams) => void;\n};\n\n/** @deprecated */\nexport interface IDatePickerHandlers extends DatePickerHandlers, UnknownProperties {}\nexport type DatePickerHandlers = {\n visible: (index: boolean) => void;\n};\n\n/** @deprecated */\nexport interface IInputTriggerProps extends InputTriggerProps, UnknownProperties {}\nexport type InputTriggerProps = InputProps & {\n value?: Date;\n /**\n * Date input placeholder characters\n * @default { year: 'Y'; month: 'M'; day: 'D' }\n */\n placeholders?: { year: string; month: string; day: string };\n onChange?: (date: Date, event: ChangeEvent) => void;\n locale?: string;\n onDisplayedPeriodChange?: (date: Date) => void;\n};\n\n/** @deprecated */\nexport interface ISingleDateInputProps extends SingleDateInputProps, UnknownProperties {}\nexport type SingleDateInputProps = InputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDateRangeProps extends DateRangeProps, UnknownProperties {}\nexport type DateRangeProps = InputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDatePickerMaskedInputProps\n extends DatePickerMaskedInputProps,\n UnknownProperties {}\nexport type DatePickerMaskedInputProps = {\n date?: Date;\n onDateChange?: (date: Date, event: ChangeEvent) => void;\n onDisplayedPeriodChange?: (date: Date) => void;\n locale?: string;\n parts?: { year: Boolean; month: Boolean; day: Boolean };\n disabledDates?: (Date | (Date | false)[] | string)[];\n};\n\ndeclare const InputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & InputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n SingleDateInput: Intergalactic.Component<'div', InputProps & SingleDateInputProps> & {\n Indicator: typeof Input.Addon;\n MaskedInput: Intergalactic.Component<'input', InputMaskValueProps & DatePickerMaskedInputProps>;\n };\n DateRange: Intergalactic.Component<'div', InputValueProps & DateRangeProps> & {\n Indicator: typeof Input.Addon;\n RangeSep: typeof Input.Addon;\n FromMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n ToMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n };\n};\n\ndeclare const DatePicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n DatePickerContext & CalendarDaysContext\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, DatePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Today: typeof Box;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IDateRangePickerContext extends DateRangePickerContext, UnknownProperties {}\nexport type DateRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const DateRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n DateRangePickerContext & CalendarDaysContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, DateRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthPickerContext extends MonthPickerContext, UnknownProperties {}\nexport type MonthPickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n};\n\ndeclare const MonthPicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n MonthPickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, MonthPickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthRangePickerContext extends MonthRangePickerContext, UnknownProperties {}\nexport type MonthRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const MonthRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n MonthRangePickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, MonthRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\nexport { DatePicker, DateRangePicker, MonthPicker, MonthRangePicker };\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ChangeEvent, ComponentProps } from 'react';\nimport dayjs from 'dayjs';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';\nimport Button, { ButtonProps } from '@semcore/button';\nimport Dropdown, { DropdownProps, DropdownTriggerProps } from '@semcore/dropdown';\nimport { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\nimport BaseTrigger, { BaseTriggerProps } from '@semcore/base-trigger';\nimport Input, { InputProps, InputValueProps } from '@semcore/input';\nimport { InputMaskValueProps } from '@semcore/input-mask';\n\nexport type DateConstructorParams = string | number | Date;\n\n/** @deprecated */\nexport interface ICalendarProps extends CalendarProps, UnknownProperties {}\nexport type CalendarProps = BoxProps & {\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Array of dates blocked for selection\n * Accepts the date or the range of dates for specifying infinity ([Date | false, Date | false]), crontab(6,7)\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * @ignore\n * */\n highlighted?: DateConstructorParams[];\n /**\n * @ignore\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: Date;\n\n renderOutdated?: boolean;\n};\n\n/** @deprecated */\nexport interface ICalendarDaysContext extends CalendarDaysContext, UnknownProperties {}\nexport type CalendarDaysContext = {\n days: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarMonthsContext extends CalendarMonthsContext, UnknownProperties {}\nexport type CalendarMonthsContext = {\n months: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarUnitProps extends CalendarUnitProps, UnknownProperties {}\nexport type CalendarUnitProps = BoxProps & {\n selected?: boolean;\n outdated?: boolean;\n disabled?: boolean;\n today?: boolean;\n startSelected?: boolean;\n endSelected?: boolean;\n highlighted?: boolean;\n startHighlighted?: boolean;\n endHighlighted?: boolean;\n date?: Date;\n children?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface ICalendarContext extends CalendarContext, UnknownProperties {}\nexport type CalendarContext = {\n getUnitProps: PropGetterFn;\n};\n\ndeclare const Calendar: Intergalactic.Component<\n 'div',\n CalendarProps,\n CalendarContext & CalendarDaysContext,\n [handlers: AbstractDatePickerHandlers]\n> & {\n Unit: Intergalactic.Component<'div', CalendarUnitProps>;\n};\n\n/** @deprecated */\nexport interface IDatePickerProps extends DatePickerProps, UnknownProperties {}\nexport type DatePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams;\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams;\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerProps extends DateRangePickerProps, UnknownProperties {}\nexport type DateRangePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams[];\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l' | 'xl';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Remove the 'Reset' button\n * */\n unclearable?: boolean;\n /**\n * To be activated upon selecting the date\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerPeriodProps\n extends DateRangePickerPeriodProps,\n UnknownProperties {}\nexport type DateRangePickerPeriodProps = BoxProps & {\n /**\n * Current selected period\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated by clicking the button for switching the selected period.\n * */\n onChange?: (date: Date[]) => void;\n /**\n * To be activated by hovering a cursor over the button for changing the current displayed month.\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * To be activated by hovering a cursor over the button for selecting the dates.\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n};\n\n/** @deprecated */\nexport interface IDatePickerContext extends DatePickerContext, UnknownProperties {}\nexport type DatePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getTodayProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IAbstractDatePickerHandlers\n extends AbstractDatePickerHandlers,\n UnknownProperties {}\nexport type AbstractDatePickerHandlers = {\n displayedPeriod: (value: DateConstructorParams) => void;\n visible: (index: boolean) => void;\n highlighted: (list: DateConstructorParams[]) => void;\n value: (index: DateConstructorParams) => void;\n};\n\n/** @deprecated */\nexport interface IDatePickerHandlers extends DatePickerHandlers, UnknownProperties {}\nexport type DatePickerHandlers = {\n visible: (index: boolean) => void;\n};\n\n/** @deprecated */\nexport interface IInputTriggerProps extends InputTriggerProps, UnknownProperties {}\ntype BaseInputTriggerProps = InputProps & {\n /**\n * Date input placeholder characters\n * @default { year: 'Y'; month: 'M'; day: 'D' }\n */\n placeholders?: { year: string; month: string; day: string };\n locale?: string;\n onDisplayedPeriodChange?: (date: Date) => void;\n};\nexport type InputTriggerProps = BaseInputTriggerProps & {\n value?: Date;\n onChange?: (date: Date, event: ChangeEvent) => void;\n};\n\nexport type RangeInputTriggerProps = BaseInputTriggerProps & {\n value?: Date[];\n onChange?: (date: Date[], event: ChangeEvent) => void;\n};\n\n/** @deprecated */\nexport interface ISingleDateInputProps extends SingleDateInputProps, UnknownProperties {}\nexport type SingleDateInputProps = InputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDateRangeProps extends DateRangeProps, UnknownProperties {}\nexport type DateRangeProps = RangeInputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDatePickerMaskedInputProps\n extends DatePickerMaskedInputProps,\n UnknownProperties {}\nexport type DatePickerMaskedInputProps = {\n date?: Date;\n onDateChange?: (date: Date, event: ChangeEvent) => void;\n onDisplayedPeriodChange?: (date: Date) => void;\n locale?: string;\n parts?: { year: Boolean; month: Boolean; day: Boolean };\n disabledDates?: (Date | (Date | false)[] | string)[];\n};\n\ndeclare const InputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & InputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n SingleDateInput: Intergalactic.Component<'div', InputProps & SingleDateInputProps> & {\n Indicator: typeof Input.Addon;\n MaskedInput: Intergalactic.Component<'input', InputMaskValueProps & DatePickerMaskedInputProps>;\n };\n};\n\ndeclare const RangeInputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & RangeInputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n DateRange: Intergalactic.Component<'div', InputValueProps & DateRangeProps> & {\n Indicator: typeof Input.Addon;\n RangeSep: typeof Input.Addon;\n FromMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n ToMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n };\n};\n\ndeclare const DatePicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n DatePickerContext & CalendarDaysContext\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, DatePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Today: typeof Box;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IDateRangePickerContext extends DateRangePickerContext, UnknownProperties {}\nexport type DateRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const DateRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n DateRangePickerContext & CalendarDaysContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof RangeInputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, DateRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthPickerContext extends MonthPickerContext, UnknownProperties {}\nexport type MonthPickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n};\n\ndeclare const MonthPicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n MonthPickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, MonthPickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthRangePickerContext extends MonthRangePickerContext, UnknownProperties {}\nexport type MonthRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const MonthRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n MonthRangePickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof RangeInputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, MonthRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\nexport { DatePicker, DateRangePicker, MonthPicker, MonthRangePicker };\n"],"mappings":""}
|
|
@@ -24,22 +24,22 @@ import fire from '@semcore/utils/lib/fire';
|
|
|
24
24
|
import includesDate from '../utils/includesDate';
|
|
25
25
|
import { getLocaleDate } from '../utils/formatDate';
|
|
26
26
|
/*__reshadow-styles__:"../style/calendar.shadow.css"*/
|
|
27
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
28
|
-
"__SCalendar": "
|
|
29
|
-
"__SGridDays": "
|
|
30
|
-
"__SGridMonths": "
|
|
31
|
-
"__SWeekDays": "
|
|
32
|
-
"__SWeekDay": "
|
|
33
|
-
"__SCalendarUnit": "
|
|
34
|
-
"_today": "
|
|
35
|
-
"_startSelected": "
|
|
36
|
-
"_endSelected": "
|
|
37
|
-
"_selected": "
|
|
38
|
-
"_highlighted": "
|
|
39
|
-
"_startHighlighted": "
|
|
40
|
-
"_endHighlighted": "
|
|
41
|
-
"_outdated": "
|
|
42
|
-
"_disabled": "
|
|
27
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCalendar_udj7f_gg_{display:flex;flex-direction:column}.___SGridDays_udj7f_gg_{display:grid;grid-template-columns:repeat(7,minmax(32px,auto));grid-template-rows:repeat(auto-fit,minmax(32px,auto))}.___SGridMonths_udj7f_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_udj7f_gg_{display:grid;grid-template-columns:repeat(7,minmax(32px,auto))}.___SCalendarUnit_udj7f_gg_,.___SWeekDay_udj7f_gg_{align-items:center;display:flex;font-size:var(--intergalactic-fs-200, 14px);justify-content:center;min-height:32px;min-width:32px}.___SWeekDay_udj7f_gg_{color:var(--intergalactic-text-secondary, #6c6e79);font-weight:var(--intergalactic-regular, 400);overflow:hidden}.___SCalendarUnit_udj7f_gg_{font-family:inherit;font-weight:400;line-height:normal;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: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,border-radius .15s .15s;outline:0;margin:0}@media (hover:hover){.___SCalendarUnit_udj7f_gg_:hover{color:var(--intergalactic-text-primary, #191b23);background:var(--intergalactic-date-picker-cell-hover, #e0e1e9)}}.___SCalendarUnit_udj7f_gg_.focus-visible{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SCalendarUnit_udj7f_gg_:focus-visible{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SCalendarUnit_udj7f_gg_.__today_udj7f_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-border-primary, #c4c7cf)}.___SCalendarUnit_udj7f_gg_.__today_udj7f_gg_.___SCalendarUnit_udj7f_gg_.__endSelected_udj7f_gg_:before,.___SCalendarUnit_udj7f_gg_.__today_udj7f_gg_.___SCalendarUnit_udj7f_gg_.__startSelected_udj7f_gg_:before{border-color:var(--intergalactic-border-secondary, #e0e1e9)}.___SCalendarUnit_udj7f_gg_.__highlighted_udj7f_gg_,.___SCalendarUnit_udj7f_gg_.__selected_udj7f_gg_{border-radius:0;transition:color .15s,background .15s,border-radius 0s 0s;color:var(--intergalactic-text-primary, #191b23)}.___SCalendarUnit_udj7f_gg_.__selected_udj7f_gg_{background:var(--intergalactic-date-picker-cell-range, #c4e5fe)}@media (hover:hover){.___SCalendarUnit_udj7f_gg_.__selected_udj7f_gg_:hover{background:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}}.___SCalendarUnit_udj7f_gg_.__highlighted_udj7f_gg_{background:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}@media (hover:hover){.___SCalendarUnit_udj7f_gg_.__highlighted_udj7f_gg_:hover{background:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}}.___SCalendarUnit_udj7f_gg_.__startSelected_udj7f_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);background:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SCalendarUnit_udj7f_gg_.__startSelected_udj7f_gg_:not(.__highlighted_udj7f_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_udj7f_gg_.__startSelected_udj7f_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background:var(--intergalactic-date-picker-cell-active-hover, #008ff8)}}.___SCalendarUnit_udj7f_gg_.__endSelected_udj7f_gg_{background:var(--intergalactic-date-picker-cell-active, #2bb3ff);color:var(--intergalactic-text-primary-invert, #ffffff)}.___SCalendarUnit_udj7f_gg_.__endSelected_udj7f_gg_:not(.__highlighted_udj7f_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_udj7f_gg_.__endSelected_udj7f_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background:var(--intergalactic-date-picker-cell-active-hover, #008ff8)}}.___SCalendarUnit_udj7f_gg_.__startHighlighted_udj7f_gg_:not(.__selected_udj7f_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_udj7f_gg_.__endHighlighted_udj7f_gg_:not(.__selected_udj7f_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_udj7f_gg_.__startHighlighted_udj7f_gg_.___SCalendarUnit_udj7f_gg_.__endHighlighted_udj7f_gg_,.___SCalendarUnit_udj7f_gg_.__startSelected_udj7f_gg_.___SCalendarUnit_udj7f_gg_.__endSelected_udj7f_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_udj7f_gg_.__outdated_udj7f_gg_{opacity:.2}.___SCalendarUnit_udj7f_gg_.__disabled_udj7f_gg_{opacity:.4;cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SCalendarUnit_udj7f_gg_,.___SCalendarUnit_udj7f_gg_.__highlighted_udj7f_gg_,.___SCalendarUnit_udj7f_gg_.__selected_udj7f_gg_{transition:none}}" /*__inner_css_end__*/, "udj7f_gg_") /*__reshadow_css_end__*/, {
|
|
28
|
+
"__SCalendar": "___SCalendar_udj7f_gg_",
|
|
29
|
+
"__SGridDays": "___SGridDays_udj7f_gg_",
|
|
30
|
+
"__SGridMonths": "___SGridMonths_udj7f_gg_",
|
|
31
|
+
"__SWeekDays": "___SWeekDays_udj7f_gg_",
|
|
32
|
+
"__SWeekDay": "___SWeekDay_udj7f_gg_",
|
|
33
|
+
"__SCalendarUnit": "___SCalendarUnit_udj7f_gg_",
|
|
34
|
+
"_today": "__today_udj7f_gg_",
|
|
35
|
+
"_startSelected": "__startSelected_udj7f_gg_",
|
|
36
|
+
"_endSelected": "__endSelected_udj7f_gg_",
|
|
37
|
+
"_selected": "__selected_udj7f_gg_",
|
|
38
|
+
"_highlighted": "__highlighted_udj7f_gg_",
|
|
39
|
+
"_startHighlighted": "__startHighlighted_udj7f_gg_",
|
|
40
|
+
"_endHighlighted": "__endHighlighted_udj7f_gg_",
|
|
41
|
+
"_outdated": "__outdated_udj7f_gg_",
|
|
42
|
+
"_disabled": "__disabled_udj7f_gg_"
|
|
43
43
|
});
|
|
44
44
|
dayjs.extend(isBetween);
|
|
45
45
|
var range = function range(N, cb) {
|
|
@@ -33,25 +33,25 @@ import NeighborLocation from '@semcore/neighbor-location';
|
|
|
33
33
|
import includesDate from '../utils/includesDate';
|
|
34
34
|
import dayjs from 'dayjs';
|
|
35
35
|
/*__reshadow-styles__:"../style/date-picker.shadow.css"*/
|
|
36
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
37
|
-
"__SPopper": "
|
|
38
|
-
"__SHeader": "
|
|
39
|
-
"__STitle": "
|
|
40
|
-
"__SToday": "
|
|
41
|
-
"__SPeriod": "
|
|
42
|
-
"__SButton": "
|
|
43
|
-
"__SInner": "
|
|
44
|
-
"__SInputMask": "
|
|
45
|
-
"__SIndicator": "
|
|
46
|
-
"__SHumanizedDate": "
|
|
47
|
-
"__SSingleDateInput": "
|
|
48
|
-
"__SValue": "
|
|
49
|
-
"__SDateRange": "
|
|
50
|
-
"__SMask": "
|
|
51
|
-
"_focus-within": "__focus-
|
|
52
|
-
"_noHumanizedDate": "
|
|
53
|
-
"__SRangeSep": "
|
|
54
|
-
"_fulfilled": "
|
|
36
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPopper_77rcq_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_77rcq_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_77rcq_gg_:active,.___SPopper_77rcq_gg_:focus{outline:0;text-decoration:none}@media (hover:hover){.___SPopper_77rcq_gg_:hover{outline:0;text-decoration:none}}.___SPopper_77rcq_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_77rcq_gg_,.___STitle_77rcq_gg_{display:flex;align-items:center}.___STitle_77rcq_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_77rcq_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_77rcq_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_77rcq_gg_ .___SInner_77rcq_gg_{justify-content:flex-start}.___SInputMask_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal}.___SIndicator_77rcq_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SHumanizedDate_77rcq_gg_{position:absolute;pointer-events:none}.___SDateRange_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_ .___SValue_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SValue_77rcq_gg_{opacity:0}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SSingleDateInput_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SMask_77rcq_gg_,.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_:focus-within .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SDateRange_77rcq_gg_:focus-within .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}" /*__inner_css_end__*/, "77rcq_gg_") /*__reshadow_css_end__*/, {
|
|
37
|
+
"__SPopper": "___SPopper_77rcq_gg_",
|
|
38
|
+
"__SHeader": "___SHeader_77rcq_gg_",
|
|
39
|
+
"__STitle": "___STitle_77rcq_gg_",
|
|
40
|
+
"__SToday": "___SToday_77rcq_gg_",
|
|
41
|
+
"__SPeriod": "___SPeriod_77rcq_gg_",
|
|
42
|
+
"__SButton": "___SButton_77rcq_gg_",
|
|
43
|
+
"__SInner": "___SInner_77rcq_gg_",
|
|
44
|
+
"__SInputMask": "___SInputMask_77rcq_gg_",
|
|
45
|
+
"__SIndicator": "___SIndicator_77rcq_gg_",
|
|
46
|
+
"__SHumanizedDate": "___SHumanizedDate_77rcq_gg_",
|
|
47
|
+
"__SSingleDateInput": "___SSingleDateInput_77rcq_gg_",
|
|
48
|
+
"__SValue": "___SValue_77rcq_gg_",
|
|
49
|
+
"__SDateRange": "___SDateRange_77rcq_gg_",
|
|
50
|
+
"__SMask": "___SMask_77rcq_gg_",
|
|
51
|
+
"_focus-within": "__focus-within_77rcq_gg_",
|
|
52
|
+
"_noHumanizedDate": "__noHumanizedDate_77rcq_gg_",
|
|
53
|
+
"__SRangeSep": "___SRangeSep_77rcq_gg_",
|
|
54
|
+
"_fulfilled": "__fulfilled_77rcq_gg_"
|
|
55
55
|
});
|
|
56
56
|
import assignProps from '@semcore/utils/lib/assignProps';
|
|
57
57
|
var defaultAllowedParts = {
|
|
@@ -13,25 +13,25 @@ import Dropdown from '@semcore/dropdown';
|
|
|
13
13
|
import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
14
14
|
import { localizedMessages } from '../translations/__intergalactic-dynamic-locales';
|
|
15
15
|
/*__reshadow-styles__:"../style/date-picker.shadow.css"*/
|
|
16
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
17
|
-
"__SPopper": "
|
|
18
|
-
"__SHeader": "
|
|
19
|
-
"__STitle": "
|
|
20
|
-
"__SToday": "
|
|
21
|
-
"__SPeriod": "
|
|
22
|
-
"__SButton": "
|
|
23
|
-
"__SInner": "
|
|
24
|
-
"__SInputMask": "
|
|
25
|
-
"__SIndicator": "
|
|
26
|
-
"__SHumanizedDate": "
|
|
27
|
-
"__SSingleDateInput": "
|
|
28
|
-
"__SValue": "
|
|
29
|
-
"__SDateRange": "
|
|
30
|
-
"__SMask": "
|
|
31
|
-
"_focus-within": "__focus-
|
|
32
|
-
"_noHumanizedDate": "
|
|
33
|
-
"__SRangeSep": "
|
|
34
|
-
"_fulfilled": "
|
|
16
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPopper_77rcq_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_77rcq_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_77rcq_gg_:active,.___SPopper_77rcq_gg_:focus{outline:0;text-decoration:none}@media (hover:hover){.___SPopper_77rcq_gg_:hover{outline:0;text-decoration:none}}.___SPopper_77rcq_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_77rcq_gg_,.___STitle_77rcq_gg_{display:flex;align-items:center}.___STitle_77rcq_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_77rcq_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_77rcq_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_77rcq_gg_ .___SInner_77rcq_gg_{justify-content:flex-start}.___SInputMask_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal}.___SIndicator_77rcq_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SHumanizedDate_77rcq_gg_{position:absolute;pointer-events:none}.___SDateRange_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_ .___SValue_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SValue_77rcq_gg_{opacity:0}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SSingleDateInput_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SMask_77rcq_gg_,.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_:focus-within .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SDateRange_77rcq_gg_:focus-within .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}" /*__inner_css_end__*/, "77rcq_gg_") /*__reshadow_css_end__*/, {
|
|
17
|
+
"__SPopper": "___SPopper_77rcq_gg_",
|
|
18
|
+
"__SHeader": "___SHeader_77rcq_gg_",
|
|
19
|
+
"__STitle": "___STitle_77rcq_gg_",
|
|
20
|
+
"__SToday": "___SToday_77rcq_gg_",
|
|
21
|
+
"__SPeriod": "___SPeriod_77rcq_gg_",
|
|
22
|
+
"__SButton": "___SButton_77rcq_gg_",
|
|
23
|
+
"__SInner": "___SInner_77rcq_gg_",
|
|
24
|
+
"__SInputMask": "___SInputMask_77rcq_gg_",
|
|
25
|
+
"__SIndicator": "___SIndicator_77rcq_gg_",
|
|
26
|
+
"__SHumanizedDate": "___SHumanizedDate_77rcq_gg_",
|
|
27
|
+
"__SSingleDateInput": "___SSingleDateInput_77rcq_gg_",
|
|
28
|
+
"__SValue": "___SValue_77rcq_gg_",
|
|
29
|
+
"__SDateRange": "___SDateRange_77rcq_gg_",
|
|
30
|
+
"__SMask": "___SMask_77rcq_gg_",
|
|
31
|
+
"_focus-within": "__focus-within_77rcq_gg_",
|
|
32
|
+
"_noHumanizedDate": "__noHumanizedDate_77rcq_gg_",
|
|
33
|
+
"__SRangeSep": "___SRangeSep_77rcq_gg_",
|
|
34
|
+
"_fulfilled": "__fulfilled_77rcq_gg_"
|
|
35
35
|
});
|
|
36
36
|
import includesDate from '../utils/includesDate';
|
|
37
37
|
var INTERACTION_TAGS = ['INPUT'];
|
|
@@ -19,25 +19,25 @@ import Dropdown from '@semcore/dropdown';
|
|
|
19
19
|
import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
20
20
|
import { localizedMessages } from '../translations/__intergalactic-dynamic-locales';
|
|
21
21
|
/*__reshadow-styles__:"../style/date-picker.shadow.css"*/
|
|
22
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
23
|
-
"__SPopper": "
|
|
24
|
-
"__SHeader": "
|
|
25
|
-
"__STitle": "
|
|
26
|
-
"__SToday": "
|
|
27
|
-
"__SPeriod": "
|
|
28
|
-
"__SButton": "
|
|
29
|
-
"__SInner": "
|
|
30
|
-
"__SInputMask": "
|
|
31
|
-
"__SIndicator": "
|
|
32
|
-
"__SHumanizedDate": "
|
|
33
|
-
"__SSingleDateInput": "
|
|
34
|
-
"__SValue": "
|
|
35
|
-
"__SDateRange": "
|
|
36
|
-
"__SMask": "
|
|
37
|
-
"_focus-within": "__focus-
|
|
38
|
-
"_noHumanizedDate": "
|
|
39
|
-
"__SRangeSep": "
|
|
40
|
-
"_fulfilled": "
|
|
22
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPopper_77rcq_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_77rcq_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_77rcq_gg_:active,.___SPopper_77rcq_gg_:focus{outline:0;text-decoration:none}@media (hover:hover){.___SPopper_77rcq_gg_:hover{outline:0;text-decoration:none}}.___SPopper_77rcq_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_77rcq_gg_,.___STitle_77rcq_gg_{display:flex;align-items:center}.___STitle_77rcq_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_77rcq_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_77rcq_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_77rcq_gg_ .___SInner_77rcq_gg_{justify-content:flex-start}.___SInputMask_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal}.___SIndicator_77rcq_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SHumanizedDate_77rcq_gg_{position:absolute;pointer-events:none}.___SDateRange_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_ .___SValue_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_ .___SValue_77rcq_gg_{opacity:0}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SSingleDateInput_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SSingleDateInput_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_:focus-within .___SHumanizedDate_77rcq_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_:focus-within .___SMask_77rcq_gg_,.___SDateRange_77rcq_gg_:focus-within .___SValue_77rcq_gg_{opacity:1}.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SMask_77rcq_gg_,.___SInputMask_77rcq_gg_.__noHumanizedDate_77rcq_gg_ .___SValue_77rcq_gg_{opacity:1}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_.__focus-within_77rcq_gg_ .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_ .___SInputMask_77rcq_gg_:focus-within .___SMask_77rcq_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_77rcq_gg_.__focus-within_77rcq_gg_ .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SDateRange_77rcq_gg_:focus-within .___SRangeSep_77rcq_gg_,.___SRangeSep_77rcq_gg_.__fulfilled_77rcq_gg_{color:var(--intergalactic-text-primary, #191b23)}" /*__inner_css_end__*/, "77rcq_gg_") /*__reshadow_css_end__*/, {
|
|
23
|
+
"__SPopper": "___SPopper_77rcq_gg_",
|
|
24
|
+
"__SHeader": "___SHeader_77rcq_gg_",
|
|
25
|
+
"__STitle": "___STitle_77rcq_gg_",
|
|
26
|
+
"__SToday": "___SToday_77rcq_gg_",
|
|
27
|
+
"__SPeriod": "___SPeriod_77rcq_gg_",
|
|
28
|
+
"__SButton": "___SButton_77rcq_gg_",
|
|
29
|
+
"__SInner": "___SInner_77rcq_gg_",
|
|
30
|
+
"__SInputMask": "___SInputMask_77rcq_gg_",
|
|
31
|
+
"__SIndicator": "___SIndicator_77rcq_gg_",
|
|
32
|
+
"__SHumanizedDate": "___SHumanizedDate_77rcq_gg_",
|
|
33
|
+
"__SSingleDateInput": "___SSingleDateInput_77rcq_gg_",
|
|
34
|
+
"__SValue": "___SValue_77rcq_gg_",
|
|
35
|
+
"__SDateRange": "___SDateRange_77rcq_gg_",
|
|
36
|
+
"__SMask": "___SMask_77rcq_gg_",
|
|
37
|
+
"_focus-within": "__focus-within_77rcq_gg_",
|
|
38
|
+
"_noHumanizedDate": "__noHumanizedDate_77rcq_gg_",
|
|
39
|
+
"__SRangeSep": "___SRangeSep_77rcq_gg_",
|
|
40
|
+
"_fulfilled": "__fulfilled_77rcq_gg_"
|
|
41
41
|
});
|
|
42
42
|
var INTERACTION_TAGS = ['INPUT'];
|
|
43
43
|
var defaultDisplayedPeriod = new Date(new Date().setHours(0, 0, 0, 0));
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ChangeEvent, ComponentProps } from 'react';\nimport dayjs from 'dayjs';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';\nimport Button, { ButtonProps } from '@semcore/button';\nimport Dropdown, { DropdownProps, DropdownTriggerProps } from '@semcore/dropdown';\nimport { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\nimport BaseTrigger, { BaseTriggerProps } from '@semcore/base-trigger';\nimport Input, { InputProps, InputValueProps } from '@semcore/input';\nimport { InputMaskValueProps } from '@semcore/input-mask';\n\nexport type DateConstructorParams = string | number | Date;\n\n/** @deprecated */\nexport interface ICalendarProps extends CalendarProps, UnknownProperties {}\nexport type CalendarProps = BoxProps & {\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Array of dates blocked for selection\n * Accepts the date or the range of dates for specifying infinity ([Date | false, Date | false]), crontab(6,7)\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * @ignore\n * */\n highlighted?: DateConstructorParams[];\n /**\n * @ignore\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: Date;\n\n renderOutdated?: boolean;\n};\n\n/** @deprecated */\nexport interface ICalendarDaysContext extends CalendarDaysContext, UnknownProperties {}\nexport type CalendarDaysContext = {\n days: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarMonthsContext extends CalendarMonthsContext, UnknownProperties {}\nexport type CalendarMonthsContext = {\n months: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarUnitProps extends CalendarUnitProps, UnknownProperties {}\nexport type CalendarUnitProps = BoxProps & {\n selected?: boolean;\n outdated?: boolean;\n disabled?: boolean;\n today?: boolean;\n startSelected?: boolean;\n endSelected?: boolean;\n highlighted?: boolean;\n startHighlighted?: boolean;\n endHighlighted?: boolean;\n date?: Date;\n children?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface ICalendarContext extends CalendarContext, UnknownProperties {}\nexport type CalendarContext = {\n getUnitProps: PropGetterFn;\n};\n\ndeclare const Calendar: Intergalactic.Component<\n 'div',\n CalendarProps,\n CalendarContext & CalendarDaysContext,\n [handlers: AbstractDatePickerHandlers]\n> & {\n Unit: Intergalactic.Component<'div', CalendarUnitProps>;\n};\n\n/** @deprecated */\nexport interface IDatePickerProps extends DatePickerProps, UnknownProperties {}\nexport type DatePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams;\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams;\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerProps extends DateRangePickerProps, UnknownProperties {}\nexport type DateRangePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams[];\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l' | 'xl';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Remove the 'Reset' button\n * */\n unclearable?: boolean;\n /**\n * To be activated upon selecting the date\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerPeriodProps\n extends DateRangePickerPeriodProps,\n UnknownProperties {}\nexport type DateRangePickerPeriodProps = BoxProps & {\n /**\n * Current selected period\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated by clicking the button for switching the selected period.\n * */\n onChange?: (date: Date[]) => void;\n /**\n * To be activated by hovering a cursor over the button for changing the current displayed month.\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * To be activated by hovering a cursor over the button for selecting the dates.\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n};\n\n/** @deprecated */\nexport interface IDatePickerContext extends DatePickerContext, UnknownProperties {}\nexport type DatePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getTodayProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IAbstractDatePickerHandlers\n extends AbstractDatePickerHandlers,\n UnknownProperties {}\nexport type AbstractDatePickerHandlers = {\n displayedPeriod: (value: DateConstructorParams) => void;\n visible: (index: boolean) => void;\n highlighted: (list: DateConstructorParams[]) => void;\n value: (index: DateConstructorParams) => void;\n};\n\n/** @deprecated */\nexport interface IDatePickerHandlers extends DatePickerHandlers, UnknownProperties {}\nexport type DatePickerHandlers = {\n visible: (index: boolean) => void;\n};\n\n/** @deprecated */\nexport interface IInputTriggerProps extends InputTriggerProps, UnknownProperties {}\nexport type InputTriggerProps = InputProps & {\n value?: Date;\n /**\n * Date input placeholder characters\n * @default { year: 'Y'; month: 'M'; day: 'D' }\n */\n placeholders?: { year: string; month: string; day: string };\n onChange?: (date: Date, event: ChangeEvent) => void;\n locale?: string;\n onDisplayedPeriodChange?: (date: Date) => void;\n};\n\n/** @deprecated */\nexport interface ISingleDateInputProps extends SingleDateInputProps, UnknownProperties {}\nexport type SingleDateInputProps = InputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDateRangeProps extends DateRangeProps, UnknownProperties {}\nexport type DateRangeProps = InputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDatePickerMaskedInputProps\n extends DatePickerMaskedInputProps,\n UnknownProperties {}\nexport type DatePickerMaskedInputProps = {\n date?: Date;\n onDateChange?: (date: Date, event: ChangeEvent) => void;\n onDisplayedPeriodChange?: (date: Date) => void;\n locale?: string;\n parts?: { year: Boolean; month: Boolean; day: Boolean };\n disabledDates?: (Date | (Date | false)[] | string)[];\n};\n\ndeclare const InputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & InputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n SingleDateInput: Intergalactic.Component<'div', InputProps & SingleDateInputProps> & {\n Indicator: typeof Input.Addon;\n MaskedInput: Intergalactic.Component<'input', InputMaskValueProps & DatePickerMaskedInputProps>;\n };\n DateRange: Intergalactic.Component<'div', InputValueProps & DateRangeProps> & {\n Indicator: typeof Input.Addon;\n RangeSep: typeof Input.Addon;\n FromMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n ToMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n };\n};\n\ndeclare const DatePicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n DatePickerContext & CalendarDaysContext\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, DatePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Today: typeof Box;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IDateRangePickerContext extends DateRangePickerContext, UnknownProperties {}\nexport type DateRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const DateRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n DateRangePickerContext & CalendarDaysContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, DateRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthPickerContext extends MonthPickerContext, UnknownProperties {}\nexport type MonthPickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n};\n\ndeclare const MonthPicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n MonthPickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, MonthPickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthRangePickerContext extends MonthRangePickerContext, UnknownProperties {}\nexport type MonthRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const MonthRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n MonthRangePickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, MonthRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\nexport { DatePicker, DateRangePicker, MonthPicker, MonthRangePicker };\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ChangeEvent, ComponentProps } from 'react';\nimport dayjs from 'dayjs';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';\nimport Button, { ButtonProps } from '@semcore/button';\nimport Dropdown, { DropdownProps, DropdownTriggerProps } from '@semcore/dropdown';\nimport { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\nimport BaseTrigger, { BaseTriggerProps } from '@semcore/base-trigger';\nimport Input, { InputProps, InputValueProps } from '@semcore/input';\nimport { InputMaskValueProps } from '@semcore/input-mask';\n\nexport type DateConstructorParams = string | number | Date;\n\n/** @deprecated */\nexport interface ICalendarProps extends CalendarProps, UnknownProperties {}\nexport type CalendarProps = BoxProps & {\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Array of dates blocked for selection\n * Accepts the date or the range of dates for specifying infinity ([Date | false, Date | false]), crontab(6,7)\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * @ignore\n * */\n highlighted?: DateConstructorParams[];\n /**\n * @ignore\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: Date;\n\n renderOutdated?: boolean;\n};\n\n/** @deprecated */\nexport interface ICalendarDaysContext extends CalendarDaysContext, UnknownProperties {}\nexport type CalendarDaysContext = {\n days: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarMonthsContext extends CalendarMonthsContext, UnknownProperties {}\nexport type CalendarMonthsContext = {\n months: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarUnitProps extends CalendarUnitProps, UnknownProperties {}\nexport type CalendarUnitProps = BoxProps & {\n selected?: boolean;\n outdated?: boolean;\n disabled?: boolean;\n today?: boolean;\n startSelected?: boolean;\n endSelected?: boolean;\n highlighted?: boolean;\n startHighlighted?: boolean;\n endHighlighted?: boolean;\n date?: Date;\n children?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface ICalendarContext extends CalendarContext, UnknownProperties {}\nexport type CalendarContext = {\n getUnitProps: PropGetterFn;\n};\n\ndeclare const Calendar: Intergalactic.Component<\n 'div',\n CalendarProps,\n CalendarContext & CalendarDaysContext,\n [handlers: AbstractDatePickerHandlers]\n> & {\n Unit: Intergalactic.Component<'div', CalendarUnitProps>;\n};\n\n/** @deprecated */\nexport interface IDatePickerProps extends DatePickerProps, UnknownProperties {}\nexport type DatePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams;\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams;\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerProps extends DateRangePickerProps, UnknownProperties {}\nexport type DateRangePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams[];\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l' | 'xl';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Remove the 'Reset' button\n * */\n unclearable?: boolean;\n /**\n * To be activated upon selecting the date\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerPeriodProps\n extends DateRangePickerPeriodProps,\n UnknownProperties {}\nexport type DateRangePickerPeriodProps = BoxProps & {\n /**\n * Current selected period\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated by clicking the button for switching the selected period.\n * */\n onChange?: (date: Date[]) => void;\n /**\n * To be activated by hovering a cursor over the button for changing the current displayed month.\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * To be activated by hovering a cursor over the button for selecting the dates.\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n};\n\n/** @deprecated */\nexport interface IDatePickerContext extends DatePickerContext, UnknownProperties {}\nexport type DatePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getTodayProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IAbstractDatePickerHandlers\n extends AbstractDatePickerHandlers,\n UnknownProperties {}\nexport type AbstractDatePickerHandlers = {\n displayedPeriod: (value: DateConstructorParams) => void;\n visible: (index: boolean) => void;\n highlighted: (list: DateConstructorParams[]) => void;\n value: (index: DateConstructorParams) => void;\n};\n\n/** @deprecated */\nexport interface IDatePickerHandlers extends DatePickerHandlers, UnknownProperties {}\nexport type DatePickerHandlers = {\n visible: (index: boolean) => void;\n};\n\n/** @deprecated */\nexport interface IInputTriggerProps extends InputTriggerProps, UnknownProperties {}\ntype BaseInputTriggerProps = InputProps & {\n /**\n * Date input placeholder characters\n * @default { year: 'Y'; month: 'M'; day: 'D' }\n */\n placeholders?: { year: string; month: string; day: string };\n locale?: string;\n onDisplayedPeriodChange?: (date: Date) => void;\n};\nexport type InputTriggerProps = BaseInputTriggerProps & {\n value?: Date;\n onChange?: (date: Date, event: ChangeEvent) => void;\n};\n\nexport type RangeInputTriggerProps = BaseInputTriggerProps & {\n value?: Date[];\n onChange?: (date: Date[], event: ChangeEvent) => void;\n};\n\n/** @deprecated */\nexport interface ISingleDateInputProps extends SingleDateInputProps, UnknownProperties {}\nexport type SingleDateInputProps = InputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDateRangeProps extends DateRangeProps, UnknownProperties {}\nexport type DateRangeProps = RangeInputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDatePickerMaskedInputProps\n extends DatePickerMaskedInputProps,\n UnknownProperties {}\nexport type DatePickerMaskedInputProps = {\n date?: Date;\n onDateChange?: (date: Date, event: ChangeEvent) => void;\n onDisplayedPeriodChange?: (date: Date) => void;\n locale?: string;\n parts?: { year: Boolean; month: Boolean; day: Boolean };\n disabledDates?: (Date | (Date | false)[] | string)[];\n};\n\ndeclare const InputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & InputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n SingleDateInput: Intergalactic.Component<'div', InputProps & SingleDateInputProps> & {\n Indicator: typeof Input.Addon;\n MaskedInput: Intergalactic.Component<'input', InputMaskValueProps & DatePickerMaskedInputProps>;\n };\n};\n\ndeclare const RangeInputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & RangeInputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n DateRange: Intergalactic.Component<'div', InputValueProps & DateRangeProps> & {\n Indicator: typeof Input.Addon;\n RangeSep: typeof Input.Addon;\n FromMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n ToMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n };\n};\n\ndeclare const DatePicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n DatePickerContext & CalendarDaysContext\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, DatePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Today: typeof Box;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IDateRangePickerContext extends DateRangePickerContext, UnknownProperties {}\nexport type DateRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const DateRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n DateRangePickerContext & CalendarDaysContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof RangeInputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, DateRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthPickerContext extends MonthPickerContext, UnknownProperties {}\nexport type MonthPickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n};\n\ndeclare const MonthPicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n MonthPickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, MonthPickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthRangePickerContext extends MonthRangePickerContext, UnknownProperties {}\nexport type MonthRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const MonthRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n MonthRangePickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof RangeInputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, MonthRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\nexport { DatePicker, DateRangePicker, MonthPicker, MonthRangePicker };\n"],"mappings":""}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -263,17 +263,24 @@ export type DatePickerHandlers = {
|
|
|
263
263
|
|
|
264
264
|
/** @deprecated */
|
|
265
265
|
export interface IInputTriggerProps extends InputTriggerProps, UnknownProperties {}
|
|
266
|
-
|
|
267
|
-
value?: Date;
|
|
266
|
+
type BaseInputTriggerProps = InputProps & {
|
|
268
267
|
/**
|
|
269
268
|
* Date input placeholder characters
|
|
270
269
|
* @default { year: 'Y'; month: 'M'; day: 'D' }
|
|
271
270
|
*/
|
|
272
271
|
placeholders?: { year: string; month: string; day: string };
|
|
273
|
-
onChange?: (date: Date, event: ChangeEvent) => void;
|
|
274
272
|
locale?: string;
|
|
275
273
|
onDisplayedPeriodChange?: (date: Date) => void;
|
|
276
274
|
};
|
|
275
|
+
export type InputTriggerProps = BaseInputTriggerProps & {
|
|
276
|
+
value?: Date;
|
|
277
|
+
onChange?: (date: Date, event: ChangeEvent) => void;
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
export type RangeInputTriggerProps = BaseInputTriggerProps & {
|
|
281
|
+
value?: Date[];
|
|
282
|
+
onChange?: (date: Date[], event: ChangeEvent) => void;
|
|
283
|
+
};
|
|
277
284
|
|
|
278
285
|
/** @deprecated */
|
|
279
286
|
export interface ISingleDateInputProps extends SingleDateInputProps, UnknownProperties {}
|
|
@@ -281,7 +288,7 @@ export type SingleDateInputProps = InputTriggerProps & {};
|
|
|
281
288
|
|
|
282
289
|
/** @deprecated */
|
|
283
290
|
export interface IDateRangeProps extends DateRangeProps, UnknownProperties {}
|
|
284
|
-
export type DateRangeProps =
|
|
291
|
+
export type DateRangeProps = RangeInputTriggerProps & {};
|
|
285
292
|
|
|
286
293
|
/** @deprecated */
|
|
287
294
|
export interface IDatePickerMaskedInputProps
|
|
@@ -306,6 +313,14 @@ declare const InputTrigger: Intergalactic.Component<
|
|
|
306
313
|
Indicator: typeof Input.Addon;
|
|
307
314
|
MaskedInput: Intergalactic.Component<'input', InputMaskValueProps & DatePickerMaskedInputProps>;
|
|
308
315
|
};
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
declare const RangeInputTrigger: Intergalactic.Component<
|
|
319
|
+
'div',
|
|
320
|
+
DropdownTriggerProps & RangeInputTriggerProps
|
|
321
|
+
> & {
|
|
322
|
+
Addon: typeof Input.Addon;
|
|
323
|
+
Value: typeof Input.Value;
|
|
309
324
|
DateRange: Intergalactic.Component<'div', InputValueProps & DateRangeProps> & {
|
|
310
325
|
Indicator: typeof Input.Addon;
|
|
311
326
|
RangeSep: typeof Input.Addon;
|
|
@@ -366,7 +381,7 @@ declare const DateRangePicker: Intergalactic.Component<
|
|
|
366
381
|
Addon: typeof BaseTrigger.Addon;
|
|
367
382
|
Text: typeof BaseTrigger.Text;
|
|
368
383
|
};
|
|
369
|
-
Trigger: typeof
|
|
384
|
+
Trigger: typeof RangeInputTrigger;
|
|
370
385
|
Popper: typeof Dropdown.Popper;
|
|
371
386
|
Header: typeof Box;
|
|
372
387
|
Title: Intergalactic.Component<'div', DateRangePickerProps, DateRangePickerContext>;
|
|
@@ -438,7 +453,7 @@ declare const MonthRangePicker: Intergalactic.Component<
|
|
|
438
453
|
Addon: typeof BaseTrigger.Addon;
|
|
439
454
|
Text: typeof BaseTrigger.Text;
|
|
440
455
|
};
|
|
441
|
-
Trigger: typeof
|
|
456
|
+
Trigger: typeof RangeInputTrigger;
|
|
442
457
|
Popper: typeof Dropdown.Popper;
|
|
443
458
|
Header: typeof Box;
|
|
444
459
|
Title: Intergalactic.Component<'div', DateRangePickerProps, MonthRangePickerContext>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/date-picker",
|
|
3
3
|
"description": "Semrush DatePicker Component",
|
|
4
|
-
"version": "4.10.0",
|
|
4
|
+
"version": "4.10.1-prerelease.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,21 +9,21 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@semcore/utils": "4.7.0",
|
|
13
|
-
"@semcore/base-trigger": "4.9.0",
|
|
14
|
-
"@semcore/button": "5.8.0",
|
|
15
|
-
"@semcore/divider": "4.7.0",
|
|
16
|
-
"@semcore/dropdown": "4.7.0",
|
|
17
|
-
"@semcore/flex-box": "5.7.0",
|
|
18
|
-
"@semcore/icon": "4.9.0",
|
|
19
|
-
"@semcore/input": "4.9.0",
|
|
20
|
-
"@semcore/input-mask": "5.9.0",
|
|
21
|
-
"@semcore/neighbor-location": "4.7.0",
|
|
22
|
-
"@semcore/typography": "5.11.0",
|
|
12
|
+
"@semcore/utils": "4.7.1-prerelease.0",
|
|
13
|
+
"@semcore/base-trigger": "4.9.1-prerelease.0",
|
|
14
|
+
"@semcore/button": "5.8.1-prerelease.0",
|
|
15
|
+
"@semcore/divider": "4.7.1-prerelease.0",
|
|
16
|
+
"@semcore/dropdown": "4.7.1-prerelease.0",
|
|
17
|
+
"@semcore/flex-box": "5.7.1-prerelease.0",
|
|
18
|
+
"@semcore/icon": "4.9.1-prerelease.0",
|
|
19
|
+
"@semcore/input": "4.9.1-prerelease.0",
|
|
20
|
+
"@semcore/input-mask": "5.9.1-prerelease.0",
|
|
21
|
+
"@semcore/neighbor-location": "4.7.1-prerelease.0",
|
|
22
|
+
"@semcore/typography": "5.11.1-prerelease.0",
|
|
23
23
|
"dayjs": "1.8.36"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@semcore/core": "^2.7.0",
|
|
26
|
+
"@semcore/core": "^2.7.1-prerelease.0",
|
|
27
27
|
"react": "16.8 - 18",
|
|
28
28
|
"react-dom": "16.8 - 18"
|
|
29
29
|
},
|