@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.
@@ -2,14 +2,14 @@ import U from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import q from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import J from "@babel/runtime/helpers/esm/classCallCheck";
4
4
  import Q from "@babel/runtime/helpers/esm/createClass";
5
- import D from "@babel/runtime/helpers/esm/assertThisInitialized";
5
+ import b from "@babel/runtime/helpers/esm/assertThisInitialized";
6
6
  import W from "@babel/runtime/helpers/esm/inherits";
7
7
  import X from "@babel/runtime/helpers/esm/createSuper";
8
- import y from "@babel/runtime/helpers/esm/defineProperty";
8
+ import P from "@babel/runtime/helpers/esm/defineProperty";
9
9
  import { sstyled as Z } from "@semcore/utils/lib/core/index";
10
- import { sstyled as R, assignProps as E, Component as ee } from "@semcore/core";
10
+ import { sstyled as T, assignProps as E, Component as ee } from "@semcore/core";
11
11
  import S from "react";
12
- import x from "dayjs";
12
+ import f from "dayjs";
13
13
  import O from "@semcore/button";
14
14
  import { Flex as A } from "@semcore/flex-box";
15
15
  import Y from "@semcore/dropdown";
@@ -24,37 +24,37 @@ var le = (
24
24
  /*__reshadow_css_start__*/
25
25
  (Z.insert(
26
26
  /*__inner_css_start__*/
27
- ".___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}}",
28
- "1mx7u_gg_"
27
+ ".___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}}",
28
+ "e0y8u_gg_"
29
29
  ), {
30
- __SHeader: "___SHeader_1mx7u_gg_",
31
- __STitle: "___STitle_1mx7u_gg_",
32
- __SToday: "___SToday_1mx7u_gg_",
33
- __SPeriod: "___SPeriod_1mx7u_gg_",
34
- __SButton: "___SButton_1mx7u_gg_",
35
- __SInner: "___SInner_1mx7u_gg_",
36
- __SInputMask: "___SInputMask_1mx7u_gg_",
37
- _animationsDisabled: "__animationsDisabled_1mx7u_gg_",
38
- __SValue: "___SValue_1mx7u_gg_",
39
- __SIndicator: "___SIndicator_1mx7u_gg_",
40
- __SRangeIndicator: "___SRangeIndicator_1mx7u_gg_",
41
- _range_value: "_range_value_1mx7u_gg_",
42
- _range_compare: "_range_compare_1mx7u_gg_",
43
- _disabled: "__disabled_1mx7u_gg_",
44
- __SHumanizedDate: "___SHumanizedDate_1mx7u_gg_",
45
- __SMask: "___SMask_1mx7u_gg_",
46
- __SSingleDateInput: "___SSingleDateInput_1mx7u_gg_",
47
- __SDateRange: "___SDateRange_1mx7u_gg_",
48
- _noHumanizedDate: "__noHumanizedDate_1mx7u_gg_",
49
- __SRangeSep: "___SRangeSep_1mx7u_gg_",
50
- _fulfilled: "__fulfilled_1mx7u_gg_",
51
- __SRangeComparatorHeader: "___SRangeComparatorHeader_1mx7u_gg_",
52
- __SRangeCalendar: "___SRangeCalendar_1mx7u_gg_",
53
- __SFooter: "___SFooter_1mx7u_gg_",
54
- __SPeriodsList: "___SPeriodsList_1mx7u_gg_",
55
- __STooltip: "___STooltip_1mx7u_gg_",
56
- __SCompareToggle: "___SCompareToggle_1mx7u_gg_",
57
- __SPopper: "___SPopper_1mx7u_gg_"
30
+ __SHeader: "___SHeader_e0y8u_gg_",
31
+ __STitle: "___STitle_e0y8u_gg_",
32
+ __SToday: "___SToday_e0y8u_gg_",
33
+ __SPeriod: "___SPeriod_e0y8u_gg_",
34
+ __SButton: "___SButton_e0y8u_gg_",
35
+ __SInner: "___SInner_e0y8u_gg_",
36
+ __SInputMask: "___SInputMask_e0y8u_gg_",
37
+ _animationsDisabled: "__animationsDisabled_e0y8u_gg_",
38
+ __SValue: "___SValue_e0y8u_gg_",
39
+ __SIndicator: "___SIndicator_e0y8u_gg_",
40
+ __SRangeIndicator: "___SRangeIndicator_e0y8u_gg_",
41
+ _range_value: "_range_value_e0y8u_gg_",
42
+ _range_compare: "_range_compare_e0y8u_gg_",
43
+ _disabled: "__disabled_e0y8u_gg_",
44
+ __SHumanizedDate: "___SHumanizedDate_e0y8u_gg_",
45
+ __SMask: "___SMask_e0y8u_gg_",
46
+ __SSingleDateInput: "___SSingleDateInput_e0y8u_gg_",
47
+ __SDateRange: "___SDateRange_e0y8u_gg_",
48
+ _noHumanizedDate: "__noHumanizedDate_e0y8u_gg_",
49
+ __SRangeSep: "___SRangeSep_e0y8u_gg_",
50
+ _fulfilled: "__fulfilled_e0y8u_gg_",
51
+ __SRangeComparatorHeader: "___SRangeComparatorHeader_e0y8u_gg_",
52
+ __SRangeCalendar: "___SRangeCalendar_e0y8u_gg_",
53
+ __SFooter: "___SFooter_e0y8u_gg_",
54
+ __SPeriodsList: "___SPeriodsList_e0y8u_gg_",
55
+ __STooltip: "___STooltip_e0y8u_gg_",
56
+ __SCompareToggle: "___SCompareToggle_e0y8u_gg_",
57
+ __SPopper: "___SPopper_e0y8u_gg_"
58
58
  })
59
59
  ), _e = ["INPUT"], ge = ["ArrowDown", "Enter", " "], se = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)), M = function() {
60
60
  for (var s = arguments.length, u = new Array(s), e = 0; e < s; e++)
@@ -68,7 +68,7 @@ var le = (
68
68
  });
69
69
  var r = a[0];
70
70
  return r;
71
- }, T = /* @__PURE__ */ function(d) {
71
+ }, x = /* @__PURE__ */ function(d) {
72
72
  W(u, d);
73
73
  var s = X(u);
74
74
  function u() {
@@ -76,62 +76,62 @@ var le = (
76
76
  J(this, u);
77
77
  for (var a = arguments.length, r = new Array(a), t = 0; t < a; t++)
78
78
  r[t] = arguments[t];
79
- return e = s.call.apply(s, [this].concat(r)), y(D(e), "popperRef", /* @__PURE__ */ S.createRef()), y(D(e), "unitRefs", {}), y(D(e), "navigateView", function(n) {
80
- var o = e.asProps.displayedPeriod, _ = n >= 1 ? "add" : "subtract", i = x(o)[_](1, e.navigateStep).toDate();
79
+ return e = s.call.apply(s, [this].concat(r)), P(b(e), "popperRef", /* @__PURE__ */ S.createRef()), P(b(e), "unitRefs", {}), P(b(e), "navigateView", function(n) {
80
+ var o = e.asProps.displayedPeriod, _ = n >= 1 ? "add" : "subtract", i = f(o)[_](1, e.navigateStep).toDate();
81
81
  e.handlers.displayedPeriod(i);
82
- }), y(D(e), "bindHandlerNavigateClick", function(n) {
82
+ }), P(b(e), "bindHandlerNavigateClick", function(n) {
83
83
  return function() {
84
84
  return e.navigateView(n);
85
85
  };
86
- }), y(D(e), "handleApplyClick", function() {
86
+ }), P(b(e), "handleApplyClick", function() {
87
87
  var n = e.asProps, o = n.value, _ = n.preselectedValue, i = n.preselectedCompare;
88
88
  return e.handleApply(_ ?? (o == null ? void 0 : o.value), i ?? (o == null ? void 0 : o.compare));
89
- }), y(D(e), "handleApply", function(n, o) {
89
+ }), P(b(e), "handleApply", function(n, o) {
90
90
  e.handlers.value({
91
91
  value: n,
92
92
  compare: o
93
93
  }), e.handlers.visible(!1);
94
- }), y(D(e), "handleKeydownDown", function(n) {
94
+ }), P(b(e), "handleKeydownDown", function(n) {
95
95
  return function(o) {
96
- var _ = e.asProps, i = _.displayedPeriod, p = _.preselectedValue, v = _.visible, c = _.focusedRange, m = o.key, g = c === "compare" ? e.asProps.compareHighlighted : e.asProps.highlighted;
97
- n === "trigger" && ge.includes(m) && (o.preventDefault(), o.stopPropagation(), e.handlers.visible(!v), setTimeout(function() {
96
+ var _ = e.asProps, i = _.displayedPeriod, p = _.preselectedValue, h = _.visible, c = _.focusedRange, v = o.key, g = c === "compare" ? e.asProps.compareHighlighted : e.asProps.highlighted;
97
+ n === "trigger" && ge.includes(v) && (o.preventDefault(), o.stopPropagation(), e.handlers.visible(!h), setTimeout(function() {
98
98
  var w = e.popperRef.current;
99
99
  w && w.focus();
100
100
  }, 0));
101
- var l = e.keyDiff[m], h = function($) {
102
- var z = q($, 2), j = z[0], G = z[1], C = G || j, H = i == null ? void 0 : i.getDate(), V = C == null ? void 0 : C.getDate();
103
- e.navigateStep === "month" && (H = i == null ? void 0 : i.getMonth(), V = C == null ? void 0 : C.getMonth()), e.navigateStep === "year" && (H = i == null ? void 0 : i.getYear(), V = C == null ? void 0 : C.getYear());
101
+ var l = e.keyDiff[v], m = function($) {
102
+ var z = q($, 2), j = z[0], G = z[1], D = G || j, H = i == null ? void 0 : i.getDate(), V = D == null ? void 0 : D.getDate();
103
+ e.navigateStep === "month" && (H = i == null ? void 0 : i.getMonth(), V = D == null ? void 0 : D.getMonth()), e.navigateStep === "year" && (H = i == null ? void 0 : i.getYear(), V = D == null ? void 0 : D.getYear());
104
104
  var N = V - H;
105
- return N < 0 || N > 1 ? C : i;
105
+ return N < 0 || N > 1 ? D : i;
106
106
  };
107
107
  if (n === "popper" && o.key === " " && g.length) {
108
- var f = g[1] || g[0];
109
- e.isDisabled(f) || e.handleChange(f), o.preventDefault();
108
+ var y = g[1] || g[0];
109
+ e.isDisabled(y) || e.handleChange(y), o.preventDefault();
110
110
  }
111
111
  if (n === "popper" && o.key === "Enter" && (o.metaKey || o.ctrlKey))
112
112
  return e.handleApplyClick();
113
- var P = void 0;
113
+ var C = void 0;
114
114
  if (l) {
115
115
  if (_e.includes(o.target.tagName)) return;
116
116
  if (g.length) {
117
- var b;
118
- (p == null ? void 0 : p.length) === 1 ? (b = [p[0], x(g[1] || g[0]).add(l, e.keyStep).toDate()], P = b[1]) : (b = [x(g[0]).add(l, e.keyStep).toDate()], P = b[0]), c === "compare" ? e.handlers.compareHighlighted(b) : e.handlers.highlighted(b), e.handlers.displayedPeriod(h(b));
117
+ var R;
118
+ (p == null ? void 0 : p.length) === 1 ? (R = [p[0], f(g[1] || g[0]).add(l, e.keyStep).toDate()], C = R[1]) : (R = [f(g[0]).add(l, e.keyStep).toDate()], C = R[0]), c === "compare" ? e.handlers.compareHighlighted(R) : e.handlers.highlighted(R), e.handlers.displayedPeriod(m(R));
119
119
  } else {
120
- var I = [i || x().toDate()];
121
- c === "compare" ? e.handlers.compareHighlighted(I) : e.handlers.highlighted(I), P = I[0];
120
+ var I = [i || f().toDate()];
121
+ c === "compare" ? e.handlers.compareHighlighted(I) : e.handlers.highlighted(I), C = I[0];
122
122
  }
123
- if (o.preventDefault(), P) {
124
- var k, K = e.keyStep === "month" ? oe : ie, L = K(P, e.asProps.locale);
123
+ if (o.preventDefault(), C) {
124
+ var k, K = e.keyStep === "month" ? oe : ie, L = K(C, e.asProps.locale);
125
125
  (k = e.unitRefs[L]) === null || k === void 0 || k.focus();
126
126
  }
127
127
  }
128
128
  };
129
- }), y(D(e), "triggerFormattingProps", {
129
+ }), P(b(e), "triggerFormattingProps", {
130
130
  day: "numeric",
131
131
  month: "short",
132
132
  year: "numeric"
133
- }), y(D(e), "handleChange", function(n) {
134
- var o, _, i, p = e.asProps, v = p.focusedRange, c = p.preselectedCompare, m = p.preselectedValue, g = [], l = v === "compare" ? c : m;
133
+ }), P(b(e), "handleChange", function(n) {
134
+ var o, _, i, p = e.asProps, h = p.focusedRange, c = p.preselectedCompare, v = p.preselectedValue, g = [], l = h === "compare" ? c : v;
135
135
  if (Array.isArray(n))
136
136
  l = n;
137
137
  else if (!((o = l) !== null && o !== void 0 && o.length))
@@ -139,30 +139,30 @@ var le = (
139
139
  else if (((_ = l) === null || _ === void 0 ? void 0 : _.length) >= 2)
140
140
  l = [n], g = [n];
141
141
  else if (((i = l) === null || i === void 0 ? void 0 : i[0]) > n) {
142
- var h;
143
- l = [n, (h = l) === null || h === void 0 ? void 0 : h[0]];
142
+ var m;
143
+ l = [n, (m = l) === null || m === void 0 ? void 0 : m[0]];
144
144
  } else {
145
- var f;
146
- l = [(f = l) === null || f === void 0 ? void 0 : f[0], n];
145
+ var y;
146
+ l = [(y = l) === null || y === void 0 ? void 0 : y[0], n];
147
147
  }
148
- v === "compare" ? (e.handlers.preselectedCompare(l), e.handlers.compareHighlighted(g)) : (e.handlers.preselectedValue(l), e.handlers.highlighted(g));
148
+ h === "compare" ? (e.handlers.preselectedCompare(l), e.handlers.compareHighlighted(g)) : (e.handlers.preselectedValue(l), e.handlers.highlighted(g));
149
149
  }), e;
150
150
  }
151
151
  return Q(u, [{
152
152
  key: "getPeriodProps",
153
153
  value: function() {
154
- var a, r = this, t = this.asProps, n = t.periods, o = n === void 0 ? this.getDefaultPeriods() : n, _ = t.onHighlightedChange, i = t.onCompareHighlightedChange, p = t.onDisplayedPeriodChange, v = t.preselectedValue, c = t.preselectedCompare, m = t.focusedRange, g = t.getI18nText, l = v ?? ((a = this.asProps.value) === null || a === void 0 ? void 0 : a.value);
155
- if (m === "compare") {
156
- var h;
157
- l = c ?? ((h = this.asProps.value) === null || h === void 0 ? void 0 : h.compare);
154
+ var a, r = this, t = this.asProps, n = t.periods, o = n === void 0 ? this.getDefaultPeriods() : n, _ = t.onHighlightedChange, i = t.onCompareHighlightedChange, p = t.onDisplayedPeriodChange, h = t.preselectedValue, c = t.preselectedCompare, v = t.focusedRange, g = t.getI18nText, l = h ?? ((a = this.asProps.value) === null || a === void 0 ? void 0 : a.value);
155
+ if (v === "compare") {
156
+ var m;
157
+ l = c ?? ((m = this.asProps.value) === null || m === void 0 ? void 0 : m.compare);
158
158
  }
159
159
  return {
160
160
  periods: o,
161
161
  value: l,
162
- onChange: function(P) {
163
- m === "compare" ? r.handlers.preselectedCompare(P) : r.handlers.preselectedValue(P);
162
+ onChange: function(C) {
163
+ v === "compare" ? r.handlers.preselectedCompare(C) : r.handlers.preselectedValue(C);
164
164
  },
165
- onHighlightedChange: m === "compare" ? i : _,
165
+ onHighlightedChange: v === "compare" ? i : _,
166
166
  onDisplayedPeriodChange: p,
167
167
  role: "listbox",
168
168
  "aria-label": g("periods")
@@ -206,8 +206,8 @@ var le = (
206
206
  if (p && p !== i)
207
207
  a.handlers.displayedPeriod(p);
208
208
  else if (!p) {
209
- var v = a.props, c = v.displayedPeriod, m = v.defaultDisplayedPeriod;
210
- a.handlers.displayedPeriod(c || m);
209
+ var h = a.props, c = h.displayedPeriod, v = h.defaultDisplayedPeriod;
210
+ a.handlers.displayedPeriod(c || v);
211
211
  }
212
212
  }
213
213
  }],
@@ -250,7 +250,7 @@ var le = (
250
250
  key: "isDisabled",
251
251
  value: function(a) {
252
252
  var r = this.asProps.disabled;
253
- return r.some(ne(x(a), "date"));
253
+ return r.some(ne(f(a), "date"));
254
254
  }
255
255
  }, {
256
256
  key: "getDefaultPeriods",
@@ -258,16 +258,16 @@ var le = (
258
258
  var a = this.asProps.getI18nText, r = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0));
259
259
  return [{
260
260
  children: a("lastMonth"),
261
- value: [x(r).subtract(1, "month").startOf("month").toDate(), x(r).startOf("month").toDate()]
261
+ value: [f(r).subtract(1, "month").startOf("month").toDate(), f(r).startOf("month").toDate()]
262
262
  }, {
263
263
  children: a("last3Months"),
264
- value: [x(r).subtract(2, "month").startOf("month").toDate(), x(r).startOf("month").toDate()]
264
+ value: [f(r).subtract(2, "month").startOf("month").toDate(), f(r).startOf("month").toDate()]
265
265
  }, {
266
266
  children: a("last6Months"),
267
- value: [x(r).subtract(5, "month").startOf("month").toDate(), x(r).startOf("month").toDate()]
267
+ value: [f(r).subtract(5, "month").startOf("month").toDate(), f(r).startOf("month").toDate()]
268
268
  }, {
269
269
  children: a("last12Months"),
270
- value: [x(r).subtract(11, "month").startOf("month").toDate(), x(r).startOf("month").toDate()]
270
+ value: [f(r).subtract(11, "month").startOf("month").toDate(), f(r).startOf("month").toDate()]
271
271
  }];
272
272
  }
273
273
  }, {
@@ -278,20 +278,20 @@ var le = (
278
278
  children: new Intl.DateTimeFormat(n, {
279
279
  month: "long",
280
280
  year: "numeric"
281
- }).format(x(o).add(r, this.navigateStep).startOf(this.navigateStep).toDate())
281
+ }).format(f(o).add(r, this.navigateStep).startOf(this.navigateStep).toDate())
282
282
  };
283
283
  }
284
284
  }, {
285
285
  key: "getTriggerProps",
286
286
  value: function(a) {
287
- var r, t, n = this, o = a.placeholder, _ = o === void 0 ? "Select date ranges" : o, i = a.separator, p = i === void 0 ? "vs." : i, v = this.asProps, c = v.locale, m = v.visible, g = (r = this.asProps.value) === null || r === void 0 ? void 0 : r.value, l = (t = this.asProps.value) === null || t === void 0 ? void 0 : t.compare, h = U({
287
+ var r, t, n = this, o = a.placeholder, _ = o === void 0 ? "Select date ranges" : o, i = a.separator, p = i === void 0 ? "vs." : i, h = this.asProps, c = h.locale, v = h.visible, g = (r = this.asProps.value) === null || r === void 0 ? void 0 : r.value, l = (t = this.asProps.value) === null || t === void 0 ? void 0 : t.compare, m = U({
288
288
  locale: c
289
- }, this.triggerFormattingProps), f = _;
290
- return g != null && g[0] && g !== null && g !== void 0 && g[1] && (f = F(g, h)), l != null && l[0] && l !== null && l !== void 0 && l[1] && (f = "".concat(f || "", " ").concat(p, " ").concat(F(l, h))), {
291
- children: f,
292
- visible: m,
289
+ }, this.triggerFormattingProps), y = _;
290
+ return g != null && g[0] && g !== null && g !== void 0 && g[1] && (y = F(g, m)), l != null && l[0] && l !== null && l !== void 0 && l[1] && (y = "".concat(y || "", " ").concat(p, " ").concat(F(l, m))), {
291
+ children: y,
292
+ visible: v,
293
293
  onClick: function() {
294
- return n.handlers.visible(!m);
294
+ return n.handlers.visible(!v);
295
295
  },
296
296
  onKeyDown: this.handleKeydownDown("trigger")
297
297
  };
@@ -311,13 +311,13 @@ var le = (
311
311
  }, {
312
312
  key: "getValueDateRangeProps",
313
313
  value: function() {
314
- var a = this, r = this.asProps, t = r.value, n = r.onDisplayedPeriodChange, o = r.locale, _ = r.disabled, i = r.disabledErrorText, p = r.getI18nText, v = r.focusedRange, c = r.preselectedValue, m = r.animationsDisabled, g = r.visible;
314
+ var a = this, r = this.asProps, t = r.value, n = r.onDisplayedPeriodChange, o = r.locale, _ = r.disabled, i = r.disabledErrorText, p = r.getI18nText, h = r.focusedRange, c = r.preselectedValue, v = r.animationsDisabled, g = r.visible;
315
315
  return {
316
316
  popoverVisible: g,
317
- focused: v === "value" ? !0 : void 0,
317
+ focused: h === "value" ? !0 : void 0,
318
318
  value: c ?? (t == null ? void 0 : t.value),
319
- onChange: function(h) {
320
- return a.handlers.preselectedValue(h);
319
+ onChange: function(m) {
320
+ return a.handlers.preselectedValue(m);
321
321
  },
322
322
  onDisplayedPeriodChange: n,
323
323
  locale: o,
@@ -328,26 +328,26 @@ var le = (
328
328
  onFocus: function() {
329
329
  a.handlers.focusedRange("value");
330
330
  },
331
- animationsDisabled: m
331
+ animationsDisabled: v
332
332
  };
333
333
  }
334
334
  }, {
335
335
  key: "getCompareDateRangeProps",
336
336
  value: function() {
337
- var a, r = this, t = this.asProps, n = t.value, o = t.onDisplayedPeriodChange, _ = t.locale, i = t.disabled, p = t.disabledErrorText, v = t.getI18nText, c = t.focusedRange, m = t.preselectedCompare, g = t.compareToggle, l = t.animationsDisabled, h = t.visible;
337
+ var a, r = this, t = this.asProps, n = t.value, o = t.onDisplayedPeriodChange, _ = t.locale, i = t.disabled, p = t.disabledErrorText, h = t.getI18nText, c = t.focusedRange, v = t.preselectedCompare, g = t.compareToggle, l = t.animationsDisabled, m = t.visible;
338
338
  return {
339
- popoverVisible: h,
339
+ popoverVisible: m,
340
340
  focused: c === "compare" ? !0 : void 0,
341
341
  disabled: !(g ?? (n == null || (a = n.compare) === null || a === void 0 ? void 0 : a.length)),
342
- value: m ?? (n == null ? void 0 : n.compare),
343
- onChange: function(P) {
344
- return r.handlers.preselectedCompare(P);
342
+ value: v ?? (n == null ? void 0 : n.compare),
343
+ onChange: function(C) {
344
+ return r.handlers.preselectedCompare(C);
345
345
  },
346
346
  onDisplayedPeriodChange: o,
347
347
  locale: _,
348
348
  disabledDates: i,
349
349
  children: this.getRangeInput(),
350
- getI18nText: v,
350
+ getI18nText: h,
351
351
  disabledErrorText: p,
352
352
  onFocus: function() {
353
353
  r.handlers.focusedRange("compare");
@@ -372,21 +372,21 @@ var le = (
372
372
  }, {
373
373
  key: "getCalendarProps",
374
374
  value: function(a, r) {
375
- var t = this.asProps, n = t.locale, o = t.displayedPeriod, _ = t.disabled, i = t.value, p = t.onCompareHighlightedChange, v = t.highlighted, c = t.compareHighlighted, m = t.onHighlightedChange, g = t.preselectedCompare, l = t.preselectedValue, h = t.focusedRange, f = t.getI18nText;
375
+ var t = this.asProps, n = t.locale, o = t.displayedPeriod, _ = t.disabled, i = t.value, p = t.onCompareHighlightedChange, h = t.highlighted, c = t.compareHighlighted, v = t.onHighlightedChange, g = t.preselectedCompare, l = t.preselectedValue, m = t.focusedRange, y = t.getI18nText;
376
376
  return {
377
377
  locale: n,
378
- displayedPeriod: x(o).add(r, this.navigateStep).startOf(this.navigateStep).toDate(),
378
+ displayedPeriod: f(o).add(r, this.navigateStep).startOf(this.navigateStep).toDate(),
379
379
  disabled: _,
380
380
  onChange: this.handleChange,
381
- highlighted: v,
381
+ highlighted: h,
382
382
  compareHighlighted: c,
383
383
  onCompareHighlightedChange: p,
384
- onHighlightedChange: m,
385
- range: h,
384
+ onHighlightedChange: v,
385
+ range: m,
386
386
  value: l ?? (i == null ? void 0 : i.value),
387
387
  compare: g ?? (i == null ? void 0 : i.compare),
388
388
  unitRefs: this.unitRefs,
389
- getI18nText: f,
389
+ getI18nText: y,
390
390
  actionsDescribing: r === 0 ? "range-compare" : null,
391
391
  tabIndex: r === 0 ? 0 : -1
392
392
  };
@@ -404,7 +404,7 @@ var le = (
404
404
  key: "render",
405
405
  value: function() {
406
406
  var a = this.asProps, r, t = this.asProps, n = t.Children, o = t.styles, _ = t["aria-label"];
407
- return /* @__PURE__ */ S.createElement(S.Fragment, null, (r = R(o), /* @__PURE__ */ S.createElement(Y, E({
407
+ return /* @__PURE__ */ S.createElement(S.Fragment, null, (r = T(o), /* @__PURE__ */ S.createElement(Y, E({
408
408
  "use:aria-label": _,
409
409
  __excludeProps: ["onChange", "value"]
410
410
  }, a), /* @__PURE__ */ S.createElement(n, r.cn("Children", {})))));
@@ -431,11 +431,11 @@ var le = (
431
431
  }
432
432
  }]), u;
433
433
  }(ee);
434
- y(T, "displayName", "DateRangeComparator");
435
- y(T, "style", le);
436
- y(T, "enhance", [ae(B)]);
437
- y(T, "subtract", function(d, s, u) {
438
- return x(d).subtract(s, u).toDate();
434
+ P(x, "displayName", "DateRangeComparator");
435
+ P(x, "style", le);
436
+ P(x, "enhance", [ae(B)]);
437
+ P(x, "subtract", function(d, s, u) {
438
+ return f(d).subtract(s, u).toDate();
439
439
  });
440
440
  function Me(d) {
441
441
  var s = arguments[0], u = d.getI18nText;
@@ -454,21 +454,21 @@ function Ee(d) {
454
454
  }
455
455
  function Ae(d) {
456
456
  var s, u = d.Root, e = d.styles;
457
- return s = R(e), /* @__PURE__ */ S.createElement(u, s.cn("STrigger", {
457
+ return s = T(e), /* @__PURE__ */ S.createElement(u, s.cn("STrigger", {
458
458
  render: Y.Trigger,
459
459
  tag: te
460
460
  }));
461
461
  }
462
462
  function ze(d) {
463
463
  var s, u = d.Root, e = d.styles, a = d.getI18nText;
464
- return s = R(e), /* @__PURE__ */ S.createElement(u, s.cn("SCompareToggle", {
464
+ return s = T(e), /* @__PURE__ */ S.createElement(u, s.cn("SCompareToggle", {
465
465
  render: re,
466
466
  label: a("compare")
467
467
  }));
468
468
  }
469
469
  function Ne(d) {
470
470
  var s, u = d.Root, e = d.Children, a = d.styles;
471
- return s = R(a), /* @__PURE__ */ S.createElement(u, s.cn("SRangeComparatorHeader", {
471
+ return s = T(a), /* @__PURE__ */ S.createElement(u, s.cn("SRangeComparatorHeader", {
472
472
  render: A,
473
473
  gap: 4,
474
474
  alignItems: "center"
@@ -476,14 +476,14 @@ function Ne(d) {
476
476
  }
477
477
  function Fe(d) {
478
478
  var s, u = d.Root, e = d.Children, a = d.styles;
479
- return s = R(a), /* @__PURE__ */ S.createElement(u, s.cn("SBody", {
479
+ return s = T(a), /* @__PURE__ */ S.createElement(u, s.cn("SBody", {
480
480
  render: A,
481
481
  gap: 4
482
482
  }), /* @__PURE__ */ S.createElement(e, s.cn("Children", {})));
483
483
  }
484
484
  function Oe(d) {
485
485
  var s, u = d.Root, e = d.styles, a = d.Children;
486
- return s = R(e), /* @__PURE__ */ S.createElement(u, s.cn("SFooter", {
486
+ return s = T(e), /* @__PURE__ */ S.createElement(u, s.cn("SFooter", {
487
487
  render: A,
488
488
  gap: 2
489
489
  }), /* @__PURE__ */ S.createElement(a, s.cn("Children", {})));
@@ -496,5 +496,5 @@ export {
496
496
  Ne as Header,
497
497
  Ee as Reset,
498
498
  Ae as Trigger,
499
- T as default
499
+ x as default
500
500
  };