@semcore/date-picker 4.56.0-prerelease.2 → 4.56.1-prerelease.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,59 +5,59 @@ import z from "@babel/runtime/helpers/esm/inherits";
5
5
  import E from "@babel/runtime/helpers/esm/createSuper";
6
6
  import o from "@babel/runtime/helpers/esm/defineProperty";
7
7
  import { sstyled as V } from "@semcore/utils/lib/core/index";
8
- import { CORE_INSTANCE as b, sstyled as N, assignProps as A, Component as F } from "@semcore/core";
8
+ import { CORE_INSTANCE as D, sstyled as N, assignProps as A, Component as F } from "@semcore/core";
9
9
  import g from "react";
10
10
  import c from "dayjs";
11
11
  import Y from "@semcore/dropdown";
12
12
  import K from "@semcore/utils/lib/enhances/i18nEnhance";
13
- import { localizedMessages as D } from "../translations/__intergalactic-dynamic-locales.mjs";
13
+ import { localizedMessages as k } from "../translations/__intergalactic-dynamic-locales.mjs";
14
14
  import { includesDate as B } from "../utils/includesDate.mjs";
15
15
  import { formatMMYY as j, formatDDMMYY as L } from "../utils/formatDate.mjs";
16
16
  var O = (
17
17
  /*__reshadow_css_start__*/
18
18
  (V.insert(
19
19
  /*__inner_css_start__*/
20
- ".___SPopper_1mx7u_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_1mx7u_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_1mx7u_gg_:active,.___SPopper_1mx7u_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_1mx7u_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SPopper_1mx7u_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_1mx7u_gg_,.___STitle_1mx7u_gg_{display:flex;align-items:center}.___STitle_1mx7u_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_1mx7u_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_1mx7u_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_1mx7u_gg_ .___SInner_1mx7u_gg_{justify-content:flex-start}.___SInputMask_1mx7u_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal;padding-right:var(--intergalactic-spacing-2x, 8px);transition:width calc(var(--intergalactic-duration-medium, 300)*1ms) ease,min-width calc(var(--intergalactic-duration-medium, 300)*1ms) ease}.___SInputMask_1mx7u_gg_.__animationsDisabled_1mx7u_gg_{transition:none}.___SInputMask_1mx7u_gg_ .___SValue_1mx7u_gg_{letter-spacing:0}.___SIndicator_1mx7u_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_1mx7u_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_1mx7u_gg_._range_value_1mx7u_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_1mx7u_gg_._range_compare_1mx7u_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_1mx7u_gg_.__disabled_1mx7u_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_1mx7u_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_1mx7u_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_1mx7u_gg_ .___SMask_1mx7u_gg_,.___SDateRange_1mx7u_gg_ .___SValue_1mx7u_gg_,.___SSingleDateInput_1mx7u_gg_ .___SMask_1mx7u_gg_,.___SSingleDateInput_1mx7u_gg_ .___SValue_1mx7u_gg_{opacity:0}.___SSingleDateInput_1mx7u_gg_:focus-within .___SHumanizedDate_1mx7u_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_1mx7u_gg_:focus-within .___SMask_1mx7u_gg_,.___SSingleDateInput_1mx7u_gg_:focus-within .___SValue_1mx7u_gg_{opacity:1}.___SDateRange_1mx7u_gg_:focus-within .___SHumanizedDate_1mx7u_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_1mx7u_gg_:focus-within .___SMask_1mx7u_gg_,.___SDateRange_1mx7u_gg_:focus-within .___SValue_1mx7u_gg_{opacity:1}.___SInputMask_1mx7u_gg_.__noHumanizedDate_1mx7u_gg_ .___SMask_1mx7u_gg_,.___SInputMask_1mx7u_gg_.__noHumanizedDate_1mx7u_gg_ .___SValue_1mx7u_gg_{opacity:1}.___SDateRange_1mx7u_gg_ .___SInputMask_1mx7u_gg_:focus-within .___SMask_1mx7u_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_1mx7u_gg_:focus-within .___SRangeSep_1mx7u_gg_,.___SRangeSep_1mx7u_gg_.__fulfilled_1mx7u_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_1mx7u_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_1mx7u_gg_,.___SRangeComparatorHeader_1mx7u_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_1mx7u_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_1mx7u_gg_,.___SPeriodsList_1mx7u_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_1mx7u_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_1mx7u_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_1mx7u_gg_{transition:none}}",
21
- "1mx7u_gg_"
20
+ ".___SPopper_e0y8u_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_e0y8u_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_e0y8u_gg_:active,.___SPopper_e0y8u_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_e0y8u_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SPopper_e0y8u_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_e0y8u_gg_,.___STitle_e0y8u_gg_{display:flex;align-items:center}.___STitle_e0y8u_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_e0y8u_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_e0y8u_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_e0y8u_gg_ .___SInner_e0y8u_gg_{justify-content:flex-start}.___SInputMask_e0y8u_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal;padding-right:var(--intergalactic-spacing-2x, 8px);transition:width calc(var(--intergalactic-duration-medium, 300)*1ms) ease,min-width calc(var(--intergalactic-duration-medium, 300)*1ms) ease}.___SInputMask_e0y8u_gg_.__animationsDisabled_e0y8u_gg_{transition:none}.___SInputMask_e0y8u_gg_ .___SValue_e0y8u_gg_{letter-spacing:0}.___SIndicator_e0y8u_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_e0y8u_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_e0y8u_gg_._range_value_e0y8u_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_e0y8u_gg_._range_compare_e0y8u_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_e0y8u_gg_.__disabled_e0y8u_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_e0y8u_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_e0y8u_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_e0y8u_gg_ .___SMask_e0y8u_gg_,.___SDateRange_e0y8u_gg_ .___SValue_e0y8u_gg_,.___SSingleDateInput_e0y8u_gg_ .___SMask_e0y8u_gg_,.___SSingleDateInput_e0y8u_gg_ .___SValue_e0y8u_gg_{opacity:0}.___SSingleDateInput_e0y8u_gg_:focus-within .___SHumanizedDate_e0y8u_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_e0y8u_gg_:focus-within .___SMask_e0y8u_gg_,.___SSingleDateInput_e0y8u_gg_:focus-within .___SValue_e0y8u_gg_{opacity:1}.___SDateRange_e0y8u_gg_:focus-within .___SHumanizedDate_e0y8u_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_e0y8u_gg_:focus-within .___SMask_e0y8u_gg_,.___SDateRange_e0y8u_gg_:focus-within .___SValue_e0y8u_gg_{opacity:1}.___SInputMask_e0y8u_gg_.__noHumanizedDate_e0y8u_gg_ .___SMask_e0y8u_gg_,.___SInputMask_e0y8u_gg_.__noHumanizedDate_e0y8u_gg_ .___SValue_e0y8u_gg_{opacity:1}.___SDateRange_e0y8u_gg_ .___SInputMask_e0y8u_gg_:focus-within .___SMask_e0y8u_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_e0y8u_gg_:focus-within .___SRangeSep_e0y8u_gg_,.___SRangeSep_e0y8u_gg_.__fulfilled_e0y8u_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_e0y8u_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_e0y8u_gg_,.___SRangeComparatorHeader_e0y8u_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_e0y8u_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_e0y8u_gg_,.___SPeriodsList_e0y8u_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_e0y8u_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_e0y8u_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_e0y8u_gg_{transition:none}}",
21
+ "e0y8u_gg_"
22
22
  ), {
23
- __SHeader: "___SHeader_1mx7u_gg_",
24
- __STitle: "___STitle_1mx7u_gg_",
25
- __SToday: "___SToday_1mx7u_gg_",
26
- __SPeriod: "___SPeriod_1mx7u_gg_",
27
- __SButton: "___SButton_1mx7u_gg_",
28
- __SInner: "___SInner_1mx7u_gg_",
29
- __SInputMask: "___SInputMask_1mx7u_gg_",
30
- _animationsDisabled: "__animationsDisabled_1mx7u_gg_",
31
- __SValue: "___SValue_1mx7u_gg_",
32
- __SIndicator: "___SIndicator_1mx7u_gg_",
33
- __SRangeIndicator: "___SRangeIndicator_1mx7u_gg_",
34
- _range_value: "_range_value_1mx7u_gg_",
35
- _range_compare: "_range_compare_1mx7u_gg_",
36
- _disabled: "__disabled_1mx7u_gg_",
37
- __SHumanizedDate: "___SHumanizedDate_1mx7u_gg_",
38
- __SMask: "___SMask_1mx7u_gg_",
39
- __SSingleDateInput: "___SSingleDateInput_1mx7u_gg_",
40
- __SDateRange: "___SDateRange_1mx7u_gg_",
41
- _noHumanizedDate: "__noHumanizedDate_1mx7u_gg_",
42
- __SRangeSep: "___SRangeSep_1mx7u_gg_",
43
- _fulfilled: "__fulfilled_1mx7u_gg_",
44
- __SRangeComparatorHeader: "___SRangeComparatorHeader_1mx7u_gg_",
45
- __SRangeCalendar: "___SRangeCalendar_1mx7u_gg_",
46
- __SFooter: "___SFooter_1mx7u_gg_",
47
- __SPeriodsList: "___SPeriodsList_1mx7u_gg_",
48
- __STooltip: "___STooltip_1mx7u_gg_",
49
- __SCompareToggle: "___SCompareToggle_1mx7u_gg_",
50
- __SPopper: "___SPopper_1mx7u_gg_"
23
+ __SHeader: "___SHeader_e0y8u_gg_",
24
+ __STitle: "___STitle_e0y8u_gg_",
25
+ __SToday: "___SToday_e0y8u_gg_",
26
+ __SPeriod: "___SPeriod_e0y8u_gg_",
27
+ __SButton: "___SButton_e0y8u_gg_",
28
+ __SInner: "___SInner_e0y8u_gg_",
29
+ __SInputMask: "___SInputMask_e0y8u_gg_",
30
+ _animationsDisabled: "__animationsDisabled_e0y8u_gg_",
31
+ __SValue: "___SValue_e0y8u_gg_",
32
+ __SIndicator: "___SIndicator_e0y8u_gg_",
33
+ __SRangeIndicator: "___SRangeIndicator_e0y8u_gg_",
34
+ _range_value: "_range_value_e0y8u_gg_",
35
+ _range_compare: "_range_compare_e0y8u_gg_",
36
+ _disabled: "__disabled_e0y8u_gg_",
37
+ __SHumanizedDate: "___SHumanizedDate_e0y8u_gg_",
38
+ __SMask: "___SMask_e0y8u_gg_",
39
+ __SSingleDateInput: "___SSingleDateInput_e0y8u_gg_",
40
+ __SDateRange: "___SDateRange_e0y8u_gg_",
41
+ _noHumanizedDate: "__noHumanizedDate_e0y8u_gg_",
42
+ __SRangeSep: "___SRangeSep_e0y8u_gg_",
43
+ _fulfilled: "__fulfilled_e0y8u_gg_",
44
+ __SRangeComparatorHeader: "___SRangeComparatorHeader_e0y8u_gg_",
45
+ __SRangeCalendar: "___SRangeCalendar_e0y8u_gg_",
46
+ __SFooter: "___SFooter_e0y8u_gg_",
47
+ __SPeriodsList: "___SPeriodsList_e0y8u_gg_",
48
+ __STooltip: "___STooltip_e0y8u_gg_",
49
+ __SCompareToggle: "___SCompareToggle_e0y8u_gg_",
50
+ __SPopper: "___SPopper_e0y8u_gg_"
51
51
  })
52
- ), G = ["INPUT"], U = ["ArrowDown", "Enter", " "], $ = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)), S = /* @__PURE__ */ function(x) {
53
- z(l, x);
54
- var m = E(l);
52
+ ), G = ["INPUT"], U = ["ArrowDown", "Enter", " "], $ = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)), v = /* @__PURE__ */ function(S) {
53
+ z(l, S);
54
+ var y = E(l);
55
55
  function l() {
56
56
  var _;
57
57
  H(this, l);
58
58
  for (var e = arguments.length, a = new Array(e), t = 0; t < e; t++)
59
59
  a[t] = arguments[t];
60
- return _ = m.call.apply(m, [this].concat(a)), o(s(_), "popperRef", /* @__PURE__ */ g.createRef()), o(s(_), "unitRefs", {}), o(s(_), "navigateStep", void 0), o(s(_), "keyDiff", void 0), o(s(_), "keyStep", void 0), o(s(_), "navigateView", function(i) {
60
+ return _ = y.call.apply(y, [this].concat(a)), o(s(_), "popperRef", /* @__PURE__ */ g.createRef()), o(s(_), "unitRefs", {}), o(s(_), "navigateStep", void 0), o(s(_), "keyDiff", void 0), o(s(_), "keyStep", void 0), o(s(_), "navigateView", function(i) {
61
61
  var r = _.asProps.displayedPeriod, n = i >= 1 ? "add" : "subtract", d = c(r)[n](1, _.navigateStep).toDate();
62
62
  _.handlers.displayedPeriod(d);
63
63
  }), o(s(_), "bindHandlerNavigateClick", function(i) {
@@ -68,22 +68,22 @@ var O = (
68
68
  return function(r) {
69
69
  var n = _.asProps, d = n.value, p = n.displayedPeriod, u = n.highlighted;
70
70
  n.disabled;
71
- var k = n.visible, I = r.key;
72
- i === "trigger" && U.includes(I) && (r.stopPropagation(), _.handlers.visible(!k), setTimeout(function() {
73
- var h = _.popperRef.current;
74
- h && h.focus();
71
+ var x = n.visible, I = r.key;
72
+ i === "trigger" && U.includes(I) && (r.stopPropagation(), _.handlers.visible(!x), setTimeout(function() {
73
+ var m = _.popperRef.current;
74
+ m && m.focus();
75
75
  }, 0));
76
- var P = _.keyDiff[r.key], y = function(T) {
76
+ var P = _.keyDiff[r.key], b = function(T) {
77
77
  return T.toDate();
78
78
  };
79
79
  if (i === "popper" && (r.key === " " || r.key === "Enter" && u.length) && (_.isDisabled(u[0]) || _.handlers.value(u[0]), r.preventDefault()), P) {
80
80
  if (G.includes(r.target.tagName)) return;
81
- var w = !u[0] && !d ? c(u[0] || p) : c(p).add(P, _.keyStep), v = y(w) || y(c(u[0] || p));
82
- if (v) {
83
- var f;
84
- _.handlers.highlighted([v]), _.handlers.displayedPeriod(v), r.preventDefault();
85
- var C = _.keyStep === "month" ? j : L, R = C(v, _.asProps.locale);
86
- (f = _.unitRefs[R]) === null || f === void 0 || f.focus();
81
+ var w = !u[0] && !d ? c(u[0] || p) : c(p).add(P, _.keyStep), f = b(w) || b(c(u[0] || p));
82
+ if (f) {
83
+ var h;
84
+ _.handlers.highlighted([f]), _.handlers.displayedPeriod(f), r.preventDefault();
85
+ var C = _.keyStep === "month" ? j : L, R = C(f, _.asProps.locale);
86
+ (h = _.unitRefs[R]) === null || h === void 0 || h.focus();
87
87
  }
88
88
  }
89
89
  };
@@ -132,7 +132,7 @@ var O = (
132
132
  }, {
133
133
  key: "getPopperProps",
134
134
  value: function() {
135
- var e = this[b];
135
+ var e = this[D];
136
136
  return {
137
137
  tabIndex: 0,
138
138
  ref: this.popperRef,
@@ -143,7 +143,7 @@ var O = (
143
143
  }, {
144
144
  key: "getHeaderProps",
145
145
  value: function() {
146
- var e = this[b];
146
+ var e = this[D];
147
147
  return {
148
148
  children: /* @__PURE__ */ g.createElement(g.Fragment, null, /* @__PURE__ */ g.createElement(e.Prev, null), /* @__PURE__ */ g.createElement(e.Title, null), /* @__PURE__ */ g.createElement(e.Next, null))
149
149
  };
@@ -205,7 +205,7 @@ var O = (
205
205
  value: function(e) {
206
206
  var a = e.value, t = e.defaultValue;
207
207
  return {
208
- i18n: D,
208
+ i18n: k,
209
209
  locale: "en",
210
210
  defaultDisplayedPeriod: a || t || $,
211
211
  defaultValue: null,
@@ -217,15 +217,15 @@ var O = (
217
217
  }
218
218
  }]), l;
219
219
  }(F);
220
- o(S, "displayName", "DatePicker");
221
- o(S, "style", O);
222
- o(S, "enhance", [K(D)]);
223
- o(S, "add", function(x, m, l) {
224
- return c(x).add(m, l).toDate();
220
+ o(v, "displayName", "DatePicker");
221
+ o(v, "style", O);
222
+ o(v, "enhance", [K(k)]);
223
+ o(v, "add", function(S, y, l) {
224
+ return c(S).add(y, l).toDate();
225
225
  });
226
- o(S, "subtract", function(x, m, l) {
227
- return c(x).subtract(m, l).toDate();
226
+ o(v, "subtract", function(S, y, l) {
227
+ return c(S).subtract(y, l).toDate();
228
228
  });
229
229
  export {
230
- S as default
230
+ v as default
231
231
  };
@@ -21,37 +21,37 @@ var ie = (
21
21
  /*__reshadow_css_start__*/
22
22
  (W.insert(
23
23
  /*__inner_css_start__*/
24
- ".___SPopper_1mx7u_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_1mx7u_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_1mx7u_gg_:active,.___SPopper_1mx7u_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_1mx7u_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SPopper_1mx7u_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_1mx7u_gg_,.___STitle_1mx7u_gg_{display:flex;align-items:center}.___STitle_1mx7u_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_1mx7u_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_1mx7u_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_1mx7u_gg_ .___SInner_1mx7u_gg_{justify-content:flex-start}.___SInputMask_1mx7u_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal;padding-right:var(--intergalactic-spacing-2x, 8px);transition:width calc(var(--intergalactic-duration-medium, 300)*1ms) ease,min-width calc(var(--intergalactic-duration-medium, 300)*1ms) ease}.___SInputMask_1mx7u_gg_.__animationsDisabled_1mx7u_gg_{transition:none}.___SInputMask_1mx7u_gg_ .___SValue_1mx7u_gg_{letter-spacing:0}.___SIndicator_1mx7u_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_1mx7u_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_1mx7u_gg_._range_value_1mx7u_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_1mx7u_gg_._range_compare_1mx7u_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_1mx7u_gg_.__disabled_1mx7u_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_1mx7u_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_1mx7u_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_1mx7u_gg_ .___SMask_1mx7u_gg_,.___SDateRange_1mx7u_gg_ .___SValue_1mx7u_gg_,.___SSingleDateInput_1mx7u_gg_ .___SMask_1mx7u_gg_,.___SSingleDateInput_1mx7u_gg_ .___SValue_1mx7u_gg_{opacity:0}.___SSingleDateInput_1mx7u_gg_:focus-within .___SHumanizedDate_1mx7u_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_1mx7u_gg_:focus-within .___SMask_1mx7u_gg_,.___SSingleDateInput_1mx7u_gg_:focus-within .___SValue_1mx7u_gg_{opacity:1}.___SDateRange_1mx7u_gg_:focus-within .___SHumanizedDate_1mx7u_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_1mx7u_gg_:focus-within .___SMask_1mx7u_gg_,.___SDateRange_1mx7u_gg_:focus-within .___SValue_1mx7u_gg_{opacity:1}.___SInputMask_1mx7u_gg_.__noHumanizedDate_1mx7u_gg_ .___SMask_1mx7u_gg_,.___SInputMask_1mx7u_gg_.__noHumanizedDate_1mx7u_gg_ .___SValue_1mx7u_gg_{opacity:1}.___SDateRange_1mx7u_gg_ .___SInputMask_1mx7u_gg_:focus-within .___SMask_1mx7u_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_1mx7u_gg_:focus-within .___SRangeSep_1mx7u_gg_,.___SRangeSep_1mx7u_gg_.__fulfilled_1mx7u_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_1mx7u_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_1mx7u_gg_,.___SRangeComparatorHeader_1mx7u_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_1mx7u_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_1mx7u_gg_,.___SPeriodsList_1mx7u_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_1mx7u_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_1mx7u_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_1mx7u_gg_{transition:none}}",
25
- "1mx7u_gg_"
24
+ ".___SPopper_e0y8u_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_e0y8u_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_e0y8u_gg_:active,.___SPopper_e0y8u_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_e0y8u_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SPopper_e0y8u_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_e0y8u_gg_,.___STitle_e0y8u_gg_{display:flex;align-items:center}.___STitle_e0y8u_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_e0y8u_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_e0y8u_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_e0y8u_gg_ .___SInner_e0y8u_gg_{justify-content:flex-start}.___SInputMask_e0y8u_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal;padding-right:var(--intergalactic-spacing-2x, 8px);transition:width calc(var(--intergalactic-duration-medium, 300)*1ms) ease,min-width calc(var(--intergalactic-duration-medium, 300)*1ms) ease}.___SInputMask_e0y8u_gg_.__animationsDisabled_e0y8u_gg_{transition:none}.___SInputMask_e0y8u_gg_ .___SValue_e0y8u_gg_{letter-spacing:0}.___SIndicator_e0y8u_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_e0y8u_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_e0y8u_gg_._range_value_e0y8u_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_e0y8u_gg_._range_compare_e0y8u_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_e0y8u_gg_.__disabled_e0y8u_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_e0y8u_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_e0y8u_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_e0y8u_gg_ .___SMask_e0y8u_gg_,.___SDateRange_e0y8u_gg_ .___SValue_e0y8u_gg_,.___SSingleDateInput_e0y8u_gg_ .___SMask_e0y8u_gg_,.___SSingleDateInput_e0y8u_gg_ .___SValue_e0y8u_gg_{opacity:0}.___SSingleDateInput_e0y8u_gg_:focus-within .___SHumanizedDate_e0y8u_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_e0y8u_gg_:focus-within .___SMask_e0y8u_gg_,.___SSingleDateInput_e0y8u_gg_:focus-within .___SValue_e0y8u_gg_{opacity:1}.___SDateRange_e0y8u_gg_:focus-within .___SHumanizedDate_e0y8u_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_e0y8u_gg_:focus-within .___SMask_e0y8u_gg_,.___SDateRange_e0y8u_gg_:focus-within .___SValue_e0y8u_gg_{opacity:1}.___SInputMask_e0y8u_gg_.__noHumanizedDate_e0y8u_gg_ .___SMask_e0y8u_gg_,.___SInputMask_e0y8u_gg_.__noHumanizedDate_e0y8u_gg_ .___SValue_e0y8u_gg_{opacity:1}.___SDateRange_e0y8u_gg_ .___SInputMask_e0y8u_gg_:focus-within .___SMask_e0y8u_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_e0y8u_gg_:focus-within .___SRangeSep_e0y8u_gg_,.___SRangeSep_e0y8u_gg_.__fulfilled_e0y8u_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_e0y8u_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_e0y8u_gg_,.___SRangeComparatorHeader_e0y8u_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_e0y8u_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_e0y8u_gg_,.___SPeriodsList_e0y8u_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_e0y8u_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_e0y8u_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_e0y8u_gg_{transition:none}}",
25
+ "e0y8u_gg_"
26
26
  ), {
27
- __SHeader: "___SHeader_1mx7u_gg_",
28
- __STitle: "___STitle_1mx7u_gg_",
29
- __SToday: "___SToday_1mx7u_gg_",
30
- __SPeriod: "___SPeriod_1mx7u_gg_",
31
- __SButton: "___SButton_1mx7u_gg_",
32
- __SInner: "___SInner_1mx7u_gg_",
33
- __SInputMask: "___SInputMask_1mx7u_gg_",
34
- _animationsDisabled: "__animationsDisabled_1mx7u_gg_",
35
- __SValue: "___SValue_1mx7u_gg_",
36
- __SIndicator: "___SIndicator_1mx7u_gg_",
37
- __SRangeIndicator: "___SRangeIndicator_1mx7u_gg_",
38
- _range_value: "_range_value_1mx7u_gg_",
39
- _range_compare: "_range_compare_1mx7u_gg_",
40
- _disabled: "__disabled_1mx7u_gg_",
41
- __SHumanizedDate: "___SHumanizedDate_1mx7u_gg_",
42
- __SMask: "___SMask_1mx7u_gg_",
43
- __SSingleDateInput: "___SSingleDateInput_1mx7u_gg_",
44
- __SDateRange: "___SDateRange_1mx7u_gg_",
45
- _noHumanizedDate: "__noHumanizedDate_1mx7u_gg_",
46
- __SRangeSep: "___SRangeSep_1mx7u_gg_",
47
- _fulfilled: "__fulfilled_1mx7u_gg_",
48
- __SRangeComparatorHeader: "___SRangeComparatorHeader_1mx7u_gg_",
49
- __SRangeCalendar: "___SRangeCalendar_1mx7u_gg_",
50
- __SFooter: "___SFooter_1mx7u_gg_",
51
- __SPeriodsList: "___SPeriodsList_1mx7u_gg_",
52
- __STooltip: "___STooltip_1mx7u_gg_",
53
- __SCompareToggle: "___SCompareToggle_1mx7u_gg_",
54
- __SPopper: "___SPopper_1mx7u_gg_"
27
+ __SHeader: "___SHeader_e0y8u_gg_",
28
+ __STitle: "___STitle_e0y8u_gg_",
29
+ __SToday: "___SToday_e0y8u_gg_",
30
+ __SPeriod: "___SPeriod_e0y8u_gg_",
31
+ __SButton: "___SButton_e0y8u_gg_",
32
+ __SInner: "___SInner_e0y8u_gg_",
33
+ __SInputMask: "___SInputMask_e0y8u_gg_",
34
+ _animationsDisabled: "__animationsDisabled_e0y8u_gg_",
35
+ __SValue: "___SValue_e0y8u_gg_",
36
+ __SIndicator: "___SIndicator_e0y8u_gg_",
37
+ __SRangeIndicator: "___SRangeIndicator_e0y8u_gg_",
38
+ _range_value: "_range_value_e0y8u_gg_",
39
+ _range_compare: "_range_compare_e0y8u_gg_",
40
+ _disabled: "__disabled_e0y8u_gg_",
41
+ __SHumanizedDate: "___SHumanizedDate_e0y8u_gg_",
42
+ __SMask: "___SMask_e0y8u_gg_",
43
+ __SSingleDateInput: "___SSingleDateInput_e0y8u_gg_",
44
+ __SDateRange: "___SDateRange_e0y8u_gg_",
45
+ _noHumanizedDate: "__noHumanizedDate_e0y8u_gg_",
46
+ __SRangeSep: "___SRangeSep_e0y8u_gg_",
47
+ _fulfilled: "__fulfilled_e0y8u_gg_",
48
+ __SRangeComparatorHeader: "___SRangeComparatorHeader_e0y8u_gg_",
49
+ __SRangeCalendar: "___SRangeCalendar_e0y8u_gg_",
50
+ __SFooter: "___SFooter_e0y8u_gg_",
51
+ __SPeriodsList: "___SPeriodsList_e0y8u_gg_",
52
+ __STooltip: "___STooltip_e0y8u_gg_",
53
+ __SCompareToggle: "___SCompareToggle_e0y8u_gg_",
54
+ __SPopper: "___SPopper_e0y8u_gg_"
55
55
  })
56
56
  ), ne = ["INPUT"], le = ["ArrowDown", "Enter", " "], oe = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0));
57
57
  function b(p) {
@@ -59,7 +59,7 @@ function b(p) {
59
59
  var d = R(p, 2), s = d[0], a = d[1], e = a === void 0 ? s : a;
60
60
  return e;
61
61
  }
62
- var D = /* @__PURE__ */ function(p) {
62
+ var x = /* @__PURE__ */ function(p) {
63
63
  J(s, p);
64
64
  var d = Q(s);
65
65
  function s() {
@@ -82,10 +82,10 @@ var D = /* @__PURE__ */ function(p) {
82
82
  C && C.focus();
83
83
  }, 0));
84
84
  var P = a.keyDiff[S], B = function(j) {
85
- var M = R(j, 2), L = M[0], G = M[1], m = G || L, T = o == null ? void 0 : o.getDate(), E = m == null ? void 0 : m.getDate();
86
- a.navigateStep === "month" && (T = o == null ? void 0 : o.getMonth(), E = m == null ? void 0 : m.getMonth()), a.navigateStep === "year" && (T = o == null ? void 0 : o.getYear(), E = m == null ? void 0 : m.getYear());
85
+ var M = R(j, 2), L = M[0], G = M[1], y = G || L, T = o == null ? void 0 : o.getDate(), E = y == null ? void 0 : y.getDate();
86
+ a.navigateStep === "month" && (T = o == null ? void 0 : o.getMonth(), E = y == null ? void 0 : y.getMonth()), a.navigateStep === "year" && (T = o == null ? void 0 : o.getYear(), E = y == null ? void 0 : y.getYear());
87
87
  var A = E - T;
88
- return A < 0 || A > 1 ? m : o;
88
+ return A < 0 || A > 1 ? y : o;
89
89
  };
90
90
  if (t === "popper" && _.key === "Enter" && (_.metaKey || _.ctrlKey))
91
91
  return a.handleApplyClick();
@@ -93,18 +93,18 @@ var D = /* @__PURE__ */ function(p) {
93
93
  var V = u[1] || u[0];
94
94
  a.isDisabled(V) || a.handleChange(V), _.preventDefault();
95
95
  }
96
- var y = void 0;
96
+ var D = void 0;
97
97
  if (P) {
98
98
  if (ne.includes(_.target.tagName)) return;
99
99
  if (u.length) {
100
- var x;
101
- h.length === 1 ? (x = [h[0], v(u[1] || u[0]).add(P, a.keyStep).toDate()], y = x[1]) : (x = [v(u[0]).add(P, a.keyStep).toDate()], y = x[0]), a.handlers.highlighted(x), a.handlers.displayedPeriod(B(x));
100
+ var m;
101
+ h.length === 1 ? (m = [h[0], v(u[1] || u[0]).add(P, a.keyStep).toDate()], D = m[1]) : (m = [v(u[0]).add(P, a.keyStep).toDate()], D = m[0]), a.handlers.highlighted(m), a.handlers.displayedPeriod(B(m));
102
102
  } else {
103
103
  var H = [o || v().toDate()];
104
- a.handlers.highlighted(H), y = H[0];
104
+ a.handlers.highlighted(H), D = H[0];
105
105
  }
106
- if (_.preventDefault(), y) {
107
- var I, $ = a.keyStep === "month" ? re : _e, O = $(y, a.asProps.locale);
106
+ if (_.preventDefault(), D) {
107
+ var I, $ = a.keyStep === "month" ? re : _e, O = $(D, a.asProps.locale);
108
108
  (I = a.unitRefs[O]) === null || I === void 0 || I.focus();
109
109
  }
110
110
  }
@@ -321,13 +321,13 @@ var D = /* @__PURE__ */ function(p) {
321
321
  }
322
322
  }]), s;
323
323
  }(Z);
324
- g(D, "displayName", "DatePicker");
325
- g(D, "style", ie);
326
- g(D, "enhance", [ae(K)]);
327
- g(D, "add", function(p, d, s) {
324
+ g(x, "displayName", "DatePicker");
325
+ g(x, "style", ie);
326
+ g(x, "enhance", [ae(K)]);
327
+ g(x, "add", function(p, d, s) {
328
328
  return v(p).add(d, s).toDate();
329
329
  });
330
- g(D, "subtract", function(p, d, s) {
330
+ g(x, "subtract", function(p, d, s) {
331
331
  return v(p).subtract(d, s).toDate();
332
332
  });
333
333
  function Te(p) {
@@ -348,5 +348,5 @@ function Ee(p) {
348
348
  export {
349
349
  Te as Apply,
350
350
  Ee as Reset,
351
- D as default
351
+ x as default
352
352
  };
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.56.0-prerelease.2",
4
+ "version": "4.56.1-prerelease.2",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,24 +14,24 @@
14
14
  "types": "./lib/types/index.d.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/utils": "4.48.1",
18
- "@semcore/base-trigger": "4.52.1",
19
- "@semcore/button": "5.43.0-prerelease.2",
20
- "@semcore/divider": "4.40.1",
21
- "@semcore/dropdown": "4.43.1",
22
- "@semcore/flex-box": "5.41.1",
23
- "@semcore/icon": "4.60.1",
24
- "@semcore/input": "4.42.1",
25
- "@semcore/input-mask": "5.43.1",
26
- "@semcore/neighbor-location": "4.40.1",
27
- "@semcore/typography": "5.52.1",
28
- "@semcore/checkbox": "7.44.1",
29
- "@semcore/popper": "5.46.1",
30
- "@semcore/tooltip": "6.49.1",
17
+ "@semcore/utils": "4.48.2-prerelease.2",
18
+ "@semcore/base-trigger": "4.52.2-prerelease.2",
19
+ "@semcore/button": "5.43.1-prerelease.2",
20
+ "@semcore/divider": "4.40.2-prerelease.2",
21
+ "@semcore/dropdown": "4.43.2-prerelease.2",
22
+ "@semcore/flex-box": "5.41.2-prerelease.2",
23
+ "@semcore/icon": "4.60.2-prerelease.2",
24
+ "@semcore/input": "4.42.2-prerelease.2",
25
+ "@semcore/input-mask": "5.43.2-prerelease.2",
26
+ "@semcore/neighbor-location": "4.40.2-prerelease.2",
27
+ "@semcore/typography": "5.52.2-prerelease.2",
28
+ "@semcore/checkbox": "7.44.2-prerelease.2",
29
+ "@semcore/popper": "5.46.2-prerelease.2",
30
+ "@semcore/tooltip": "6.49.2-prerelease.2",
31
31
  "dayjs": "1.8.36"
32
32
  },
33
33
  "peerDependencies": {
34
- "@semcore/core": "^2.17.5",
34
+ "@semcore/core": "^2.39.2-prerelease.2",
35
35
  "react": "16.8 - 18",
36
36
  "react-dom": "16.8 - 18"
37
37
  },