@semcore/date-picker 4.56.1 → 4.57.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.
@@ -1,21 +1,21 @@
1
- import U from "@babel/runtime/helpers/esm/objectSpread2";
2
- import q from "@babel/runtime/helpers/esm/slicedToArray";
1
+ import G from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import U 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 b from "@babel/runtime/helpers/esm/assertThisInitialized";
5
+ import D 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
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 T, assignProps as E, Component as ee } from "@semcore/core";
11
- import S from "react";
12
- import f from "dayjs";
13
- import O from "@semcore/button";
14
- import { Flex as A } from "@semcore/flex-box";
15
- import Y from "@semcore/dropdown";
10
+ import { sstyled as b, assignProps as V, Component as ee } from "@semcore/core";
11
+ import y from "react";
12
+ import S from "dayjs";
13
+ import N from "@semcore/button";
14
+ import { Flex as M } from "@semcore/flex-box";
15
+ import F from "@semcore/dropdown";
16
16
  import ae from "@semcore/utils/lib/enhances/i18nEnhance";
17
- import { localizedMessages as B } from "../translations/__intergalactic-dynamic-locales.mjs";
18
- import F from "../utils/shortDateRangeFormat.mjs";
17
+ import { localizedMessages as O } from "../translations/__intergalactic-dynamic-locales.mjs";
18
+ import z from "../utils/shortDateRangeFormat.mjs";
19
19
  import re from "@semcore/checkbox";
20
20
  import { LinkTrigger as te } from "@semcore/base-trigger";
21
21
  import { includesDate as ne } from "../utils/includesDate.mjs";
@@ -24,42 +24,42 @@ var le = (
24
24
  /*__reshadow_css_start__*/
25
25
  (Z.insert(
26
26
  /*__inner_css_start__*/
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_"
27
+ ".___SPopper_182qj_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_182qj_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_182qj_gg_:active,.___SPopper_182qj_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_182qj_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SPopper_182qj_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_182qj_gg_,.___STitle_182qj_gg_{display:flex;align-items:center}.___STitle_182qj_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_182qj_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_182qj_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_182qj_gg_ .___SInner_182qj_gg_{justify-content:flex-start}.___SInputMask_182qj_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_182qj_gg_.__animationsDisabled_182qj_gg_{transition:none}.___SInputMask_182qj_gg_ .___SValue_182qj_gg_{letter-spacing:0}.___SIndicator_182qj_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_182qj_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_182qj_gg_._range_value_182qj_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_182qj_gg_._range_compare_182qj_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_182qj_gg_.__disabled_182qj_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_182qj_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_182qj_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_182qj_gg_ .___SMask_182qj_gg_,.___SDateRange_182qj_gg_ .___SValue_182qj_gg_,.___SSingleDateInput_182qj_gg_ .___SMask_182qj_gg_,.___SSingleDateInput_182qj_gg_ .___SValue_182qj_gg_{opacity:0}.___SSingleDateInput_182qj_gg_:focus-within .___SHumanizedDate_182qj_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_182qj_gg_:focus-within .___SMask_182qj_gg_,.___SSingleDateInput_182qj_gg_:focus-within .___SValue_182qj_gg_{opacity:1}.___SDateRange_182qj_gg_:focus-within .___SHumanizedDate_182qj_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_182qj_gg_:focus-within .___SMask_182qj_gg_,.___SDateRange_182qj_gg_:focus-within .___SValue_182qj_gg_{opacity:1}.___SInputMask_182qj_gg_.__noHumanizedDate_182qj_gg_ .___SMask_182qj_gg_,.___SInputMask_182qj_gg_.__noHumanizedDate_182qj_gg_ .___SValue_182qj_gg_{opacity:1}.___SDateRange_182qj_gg_ .___SInputMask_182qj_gg_:focus-within .___SMask_182qj_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_182qj_gg_:focus-within .___SRangeSep_182qj_gg_,.___SRangeSep_182qj_gg_.__fulfilled_182qj_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_182qj_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_182qj_gg_,.___SRangeComparatorHeader_182qj_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_182qj_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_182qj_gg_,.___SPeriodsList_182qj_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_182qj_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_182qj_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_182qj_gg_{transition:none}}",
28
+ "182qj_gg_"
29
29
  ), {
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_"
30
+ __SHeader: "___SHeader_182qj_gg_",
31
+ __STitle: "___STitle_182qj_gg_",
32
+ __SToday: "___SToday_182qj_gg_",
33
+ __SPeriod: "___SPeriod_182qj_gg_",
34
+ __SButton: "___SButton_182qj_gg_",
35
+ __SInner: "___SInner_182qj_gg_",
36
+ __SInputMask: "___SInputMask_182qj_gg_",
37
+ _animationsDisabled: "__animationsDisabled_182qj_gg_",
38
+ __SValue: "___SValue_182qj_gg_",
39
+ __SIndicator: "___SIndicator_182qj_gg_",
40
+ __SRangeIndicator: "___SRangeIndicator_182qj_gg_",
41
+ _range_value: "_range_value_182qj_gg_",
42
+ _range_compare: "_range_compare_182qj_gg_",
43
+ _disabled: "__disabled_182qj_gg_",
44
+ __SHumanizedDate: "___SHumanizedDate_182qj_gg_",
45
+ __SMask: "___SMask_182qj_gg_",
46
+ __SSingleDateInput: "___SSingleDateInput_182qj_gg_",
47
+ __SDateRange: "___SDateRange_182qj_gg_",
48
+ _noHumanizedDate: "__noHumanizedDate_182qj_gg_",
49
+ __SRangeSep: "___SRangeSep_182qj_gg_",
50
+ _fulfilled: "__fulfilled_182qj_gg_",
51
+ __SRangeComparatorHeader: "___SRangeComparatorHeader_182qj_gg_",
52
+ __SRangeCalendar: "___SRangeCalendar_182qj_gg_",
53
+ __SFooter: "___SFooter_182qj_gg_",
54
+ __SPeriodsList: "___SPeriodsList_182qj_gg_",
55
+ __STooltip: "___STooltip_182qj_gg_",
56
+ __SCompareToggle: "___SCompareToggle_182qj_gg_",
57
+ __SPopper: "___SPopper_182qj_gg_"
58
58
  })
59
- ), _e = ["INPUT"], ge = ["ArrowDown", "Enter", " "], se = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)), M = function() {
60
- for (var s = arguments.length, u = new Array(s), e = 0; e < s; e++)
61
- u[e] = arguments[e];
62
- var a = u.flat().filter(Boolean).filter(function(t) {
59
+ ), _e = ["INPUT"], ge = ["ArrowDown", "Enter", " "], se = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)), H = function() {
60
+ for (var s = arguments.length, p = new Array(s), e = 0; e < s; e++)
61
+ p[e] = arguments[e];
62
+ var a = p.flat().filter(Boolean).filter(function(t) {
63
63
  return !Number.isNaN(new Date(t).getTime());
64
64
  });
65
65
  if (!a.length) return null;
@@ -68,45 +68,45 @@ var le = (
68
68
  });
69
69
  var r = a[0];
70
70
  return r;
71
- }, x = /* @__PURE__ */ function(d) {
72
- W(u, d);
73
- var s = X(u);
74
- function u() {
71
+ }, R = /* @__PURE__ */ function(d) {
72
+ W(p, d);
73
+ var s = X(p);
74
+ function p() {
75
75
  var e;
76
- J(this, u);
76
+ J(this, p);
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)), 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();
79
+ return e = s.call.apply(s, [this].concat(r)), P(D(e), "popperRef", /* @__PURE__ */ y.createRef()), P(D(e), "unitRefs", {}), P(D(e), "navigateView", function(n) {
80
+ var o = e.asProps.displayedPeriod, _ = n >= 1 ? "add" : "subtract", i = S(o)[_](1, e.navigateStep).toDate();
81
81
  e.handlers.displayedPeriod(i);
82
- }), P(b(e), "bindHandlerNavigateClick", function(n) {
82
+ }), P(D(e), "bindHandlerNavigateClick", function(n) {
83
83
  return function() {
84
84
  return e.navigateView(n);
85
85
  };
86
- }), P(b(e), "handleApplyClick", function() {
86
+ }), P(D(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
- }), P(b(e), "handleApply", function(n, o) {
89
+ }), P(D(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
- }), P(b(e), "handleKeydownDown", function(n) {
94
+ }), P(D(e), "handleKeydownDown", function(n) {
95
95
  return function(o) {
96
- var _ = e.asProps, i = _.displayedPeriod, p = _.preselectedValue, h = _.visible, c = _.focusedRange, v = o.key, g = c === "compare" ? e.asProps.compareHighlighted : e.asProps.highlighted;
96
+ var _ = e.asProps, i = _.displayedPeriod, c = _.preselectedValue, h = _.visible, u = _.focusedRange, v = o.key, g = u === "compare" ? e.asProps.compareHighlighted : e.asProps.highlighted;
97
97
  n === "trigger" && ge.includes(v) && (o.preventDefault(), o.stopPropagation(), e.handlers.visible(!h), setTimeout(function() {
98
- var w = e.popperRef.current;
99
- w && w.focus();
98
+ var I = e.popperRef.current;
99
+ I && I.focus();
100
100
  }, 0));
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
- var N = V - H;
105
- return N < 0 || N > 1 ? D : i;
101
+ var l = e.keyDiff[v], m = function(K) {
102
+ var E = U(K, 2), L = E[0], $ = E[1], j = $ || L, k = i == null ? void 0 : i.getDate(), w = j == null ? void 0 : j.getDate();
103
+ e.navigateStep === "month" && (k = i == null ? void 0 : i.getMonth(), w = j == null ? void 0 : j.getMonth()), e.navigateStep === "year" && (k = i == null ? void 0 : i.getYear(), w = j == null ? void 0 : j.getYear());
104
+ var A = w - k;
105
+ return A < 0 || A > 1 ? j : i;
106
106
  };
107
107
  if (n === "popper" && o.key === " " && g.length) {
108
- var y = g[1] || g[0];
109
- e.isDisabled(y) || e.handleChange(y), o.preventDefault();
108
+ var f = g[1] || g[0];
109
+ e.isDisabled(f) || e.handleChange(f), o.preventDefault();
110
110
  }
111
111
  if (n === "popper" && o.key === "Enter" && (o.metaKey || o.ctrlKey))
112
112
  return e.handleApplyClick();
@@ -114,24 +114,24 @@ var le = (
114
114
  if (l) {
115
115
  if (_e.includes(o.target.tagName)) return;
116
116
  if (g.length) {
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));
117
+ var q;
118
+ (c == null ? void 0 : c.length) === 1 ? (q = [c[0], S(g[1] || g[0]).add(l, e.keyStep).toDate()], C = q[1]) : (q = [S(g[0]).add(l, e.keyStep).toDate()], C = q[0]), u === "compare" ? e.handlers.compareHighlighted(q) : e.handlers.highlighted(q), e.handlers.displayedPeriod(m(q));
119
119
  } else {
120
- var I = [i || f().toDate()];
121
- c === "compare" ? e.handlers.compareHighlighted(I) : e.handlers.highlighted(I), C = I[0];
120
+ var T = [i || S().toDate()];
121
+ u === "compare" ? e.handlers.compareHighlighted(T) : e.handlers.highlighted(T), C = T[0];
122
122
  }
123
123
  if (o.preventDefault(), C) {
124
- var k, K = e.keyStep === "month" ? oe : ie, L = K(C, e.asProps.locale);
125
- (k = e.unitRefs[L]) === null || k === void 0 || k.focus();
124
+ var x, Y = e.keyStep === "month" ? oe : ie, B = Y(C, e.asProps.locale);
125
+ (x = e.unitRefs[B]) === null || x === void 0 || x.focus();
126
126
  }
127
127
  }
128
128
  };
129
- }), P(b(e), "triggerFormattingProps", {
129
+ }), P(D(e), "triggerFormattingProps", {
130
130
  day: "numeric",
131
131
  month: "short",
132
132
  year: "numeric"
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;
133
+ }), P(D(e), "handleChange", function(n) {
134
+ var o, _, i, c = e.asProps, h = c.focusedRange, u = c.preselectedCompare, v = c.preselectedValue, g = [], l = h === "compare" ? u : v;
135
135
  if (Array.isArray(n))
136
136
  l = n;
137
137
  else if (!((o = l) !== null && o !== void 0 && o.length))
@@ -142,19 +142,19 @@ var le = (
142
142
  var m;
143
143
  l = [n, (m = l) === null || m === void 0 ? void 0 : m[0]];
144
144
  } else {
145
- var y;
146
- l = [(y = l) === null || y === void 0 ? void 0 : y[0], n];
145
+ var f;
146
+ l = [(f = l) === null || f === void 0 ? void 0 : f[0], n];
147
147
  }
148
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
- return Q(u, [{
151
+ return Q(p, [{
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, 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);
154
+ var a, r = this, t = this.asProps, n = t.periods, o = n === void 0 ? this.getDefaultPeriods() : n, _ = t.onHighlightedChange, i = t.onCompareHighlightedChange, c = t.onDisplayedPeriodChange, h = t.preselectedValue, u = t.preselectedCompare, v = t.focusedRange, g = t.getI18nText, l = h ?? ((a = this.asProps.value) === null || a === void 0 ? void 0 : a.value);
155
155
  if (v === "compare") {
156
156
  var m;
157
- l = c ?? ((m = this.asProps.value) === null || m === void 0 ? void 0 : m.compare);
157
+ l = u ?? ((m = this.asProps.value) === null || m === void 0 ? void 0 : m.compare);
158
158
  }
159
159
  return {
160
160
  periods: o,
@@ -163,7 +163,7 @@ var le = (
163
163
  v === "compare" ? r.handlers.preselectedCompare(C) : r.handlers.preselectedValue(C);
164
164
  },
165
165
  onHighlightedChange: v === "compare" ? i : _,
166
- onDisplayedPeriodChange: p,
166
+ onDisplayedPeriodChange: c,
167
167
  role: "listbox",
168
168
  "aria-label": g("periods")
169
169
  };
@@ -201,13 +201,13 @@ var le = (
201
201
  var t, n;
202
202
  a.handlers.compareToggle(!!((t = a.asProps.value) !== null && t !== void 0 && (n = t.compare) !== null && n !== void 0 && n.length));
203
203
  }
204
- var o = a.asProps, _ = o.value, i = o.displayedPeriod, p = _ ? M(_.value, _.compare) : void 0;
204
+ var o = a.asProps, _ = o.value, i = o.displayedPeriod, c = _ ? H(_.value, _.compare) : void 0;
205
205
  if (r) {
206
- if (p && p !== i)
207
- a.handlers.displayedPeriod(p);
208
- else if (!p) {
209
- var h = a.props, c = h.displayedPeriod, v = h.defaultDisplayedPeriod;
210
- a.handlers.displayedPeriod(c || v);
206
+ if (c && c !== i)
207
+ a.handlers.displayedPeriod(c);
208
+ else if (!c) {
209
+ var h = a.props, u = h.displayedPeriod, v = h.defaultDisplayedPeriod;
210
+ a.handlers.displayedPeriod(u || v);
211
211
  }
212
212
  }
213
213
  }],
@@ -222,7 +222,7 @@ var le = (
222
222
  var o;
223
223
  return n == null || (o = n.isValid) === null || o === void 0 ? void 0 : o.call(n);
224
224
  });
225
- t.length > 0 && a.handlers.displayedPeriod(M(r));
225
+ t.length > 0 && a.handlers.displayedPeriod(H(r));
226
226
  }]
227
227
  };
228
228
  }
@@ -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(f(a), "date"));
253
+ return r.some(ne(S(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: [f(r).subtract(1, "month").startOf("month").toDate(), f(r).startOf("month").toDate()]
261
+ value: [S(r).subtract(1, "month").startOf("month").toDate(), S(r).startOf("month").toDate()]
262
262
  }, {
263
263
  children: a("last3Months"),
264
- value: [f(r).subtract(2, "month").startOf("month").toDate(), f(r).startOf("month").toDate()]
264
+ value: [S(r).subtract(2, "month").startOf("month").toDate(), S(r).startOf("month").toDate()]
265
265
  }, {
266
266
  children: a("last6Months"),
267
- value: [f(r).subtract(5, "month").startOf("month").toDate(), f(r).startOf("month").toDate()]
267
+ value: [S(r).subtract(5, "month").startOf("month").toDate(), S(r).startOf("month").toDate()]
268
268
  }, {
269
269
  children: a("last12Months"),
270
- value: [f(r).subtract(11, "month").startOf("month").toDate(), f(r).startOf("month").toDate()]
270
+ value: [S(r).subtract(11, "month").startOf("month").toDate(), S(r).startOf("month").toDate()]
271
271
  }];
272
272
  }
273
273
  }, {
@@ -278,17 +278,17 @@ var le = (
278
278
  children: new Intl.DateTimeFormat(n, {
279
279
  month: "long",
280
280
  year: "numeric"
281
- }).format(f(o).add(r, this.navigateStep).startOf(this.navigateStep).toDate())
281
+ }).format(S(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, 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
- locale: c
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,
287
+ var r, t, n = this, o = a.placeholder, _ = o === void 0 ? "Select date ranges" : o, i = a.separator, c = i === void 0 ? "vs." : i, h = this.asProps, u = 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 = G({
288
+ locale: u
289
+ }, this.triggerFormattingProps), f = _;
290
+ return g != null && g[0] && g !== null && g !== void 0 && g[1] && (f = z(g, m)), l != null && l[0] && l !== null && l !== void 0 && l[1] && (f = "".concat(f || "", " ").concat(c, " ").concat(z(l, m))), {
291
+ children: f,
292
292
  visible: v,
293
293
  onClick: function() {
294
294
  return n.handlers.visible(!v);
@@ -311,11 +311,11 @@ 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, h = r.focusedRange, c = r.preselectedValue, v = 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, c = r.getI18nText, h = r.focusedRange, u = r.preselectedValue, v = r.animationsDisabled, g = r.visible;
315
315
  return {
316
316
  popoverVisible: g,
317
317
  focused: h === "value" ? !0 : void 0,
318
- value: c ?? (t == null ? void 0 : t.value),
318
+ value: u ?? (t == null ? void 0 : t.value),
319
319
  onChange: function(m) {
320
320
  return a.handlers.preselectedValue(m);
321
321
  },
@@ -324,7 +324,7 @@ var le = (
324
324
  disabledDates: _,
325
325
  disabledErrorText: i,
326
326
  children: this.getRangeInput(),
327
- getI18nText: p,
327
+ getI18nText: c,
328
328
  onFocus: function() {
329
329
  a.handlers.focusedRange("value");
330
330
  },
@@ -334,10 +334,10 @@ var le = (
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, h = t.getI18nText, c = t.focusedRange, v = t.preselectedCompare, g = t.compareToggle, l = t.animationsDisabled, m = t.visible;
337
+ var a, r = this, t = this.asProps, n = t.value, o = t.onDisplayedPeriodChange, _ = t.locale, i = t.disabled, c = t.disabledErrorText, h = t.getI18nText, u = t.focusedRange, v = t.preselectedCompare, g = t.compareToggle, l = t.animationsDisabled, m = t.visible;
338
338
  return {
339
339
  popoverVisible: m,
340
- focused: c === "compare" ? !0 : void 0,
340
+ focused: u === "compare" ? !0 : void 0,
341
341
  disabled: !(g ?? (n == null || (a = n.compare) === null || a === void 0 ? void 0 : a.length)),
342
342
  value: v ?? (n == null ? void 0 : n.compare),
343
343
  onChange: function(C) {
@@ -348,7 +348,7 @@ var le = (
348
348
  disabledDates: i,
349
349
  children: this.getRangeInput(),
350
350
  getI18nText: h,
351
- disabledErrorText: p,
351
+ disabledErrorText: c,
352
352
  onFocus: function() {
353
353
  r.handlers.focusedRange("compare");
354
354
  },
@@ -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, h = t.highlighted, c = t.compareHighlighted, v = t.onHighlightedChange, g = t.preselectedCompare, l = t.preselectedValue, m = t.focusedRange, y = t.getI18nText;
375
+ var t = this.asProps, n = t.locale, o = t.displayedPeriod, _ = t.disabled, i = t.value, c = t.onCompareHighlightedChange, h = t.highlighted, u = t.compareHighlighted, v = t.onHighlightedChange, g = t.preselectedCompare, l = t.preselectedValue, m = t.focusedRange, f = t.getI18nText;
376
376
  return {
377
377
  locale: n,
378
- displayedPeriod: f(o).add(r, this.navigateStep).startOf(this.navigateStep).toDate(),
378
+ displayedPeriod: S(o).add(r, this.navigateStep).startOf(this.navigateStep).toDate(),
379
379
  disabled: _,
380
380
  onChange: this.handleChange,
381
381
  highlighted: h,
382
- compareHighlighted: c,
383
- onCompareHighlightedChange: p,
382
+ compareHighlighted: u,
383
+ onCompareHighlightedChange: c,
384
384
  onHighlightedChange: v,
385
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: y,
389
+ getI18nText: f,
390
390
  actionsDescribing: r === 0 ? "range-compare" : null,
391
391
  tabIndex: r === 0 ? 0 : -1
392
392
  };
@@ -404,22 +404,22 @@ 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 = T(o), /* @__PURE__ */ S.createElement(Y, E({
407
+ return /* @__PURE__ */ y.createElement(y.Fragment, null, (r = b(o), /* @__PURE__ */ y.createElement(F, V({
408
408
  "use:aria-label": _,
409
409
  __excludeProps: ["onChange", "value"]
410
- }, a), /* @__PURE__ */ S.createElement(n, r.cn("Children", {})))));
410
+ }, a), /* @__PURE__ */ y.createElement(n, r.cn("Children", {})))));
411
411
  }
412
412
  }], [{
413
413
  key: "defaultProps",
414
414
  value: function(a) {
415
415
  var r = a.primaryRange, t = a.defaultPrimaryRange, n = a.secondaryRange, o = a.defaultSecondaryRange;
416
416
  return {
417
- i18n: B,
417
+ i18n: O,
418
418
  locale: "en",
419
419
  defaultValue: null,
420
420
  defaultHighlighted: [],
421
421
  defaultCompareHighlighted: [],
422
- defaultDisplayedPeriod: M(r, t, n, o) || se,
422
+ defaultDisplayedPeriod: H(r, t, n, o) || se,
423
423
  defaultVisible: !1,
424
424
  defaultPreselectedValue: null,
425
425
  defaultPreselectedCompare: null,
@@ -429,72 +429,72 @@ var le = (
429
429
  size: "m"
430
430
  };
431
431
  }
432
- }]), u;
432
+ }]), p;
433
433
  }(ee);
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();
434
+ P(R, "displayName", "DateRangeComparator");
435
+ P(R, "style", le);
436
+ P(R, "enhance", [ae(O)]);
437
+ P(R, "subtract", function(d, s, p) {
438
+ return S(d).subtract(s, p).toDate();
439
439
  });
440
- function Me(d) {
441
- var s = arguments[0], u = d.getI18nText;
442
- return /* @__PURE__ */ S.createElement(O, E({
440
+ function He(d) {
441
+ var s = arguments[0], p = d.getI18nText;
442
+ return /* @__PURE__ */ y.createElement(N, V({
443
443
  use: "primary",
444
- children: u("apply")
444
+ children: p("apply")
445
445
  }, s));
446
446
  }
447
- function Ee(d) {
448
- var s = arguments[0], u = d.getI18nText;
449
- return /* @__PURE__ */ S.createElement(O, E({
447
+ function Ve(d) {
448
+ var s = arguments[0], p = d.getI18nText;
449
+ return /* @__PURE__ */ y.createElement(N, V({
450
450
  use: "tertiary",
451
451
  theme: "muted",
452
- children: u("reset")
452
+ children: p("reset")
453
453
  }, s));
454
454
  }
455
- function Ae(d) {
456
- var s, u = d.Root, e = d.styles;
457
- return s = T(e), /* @__PURE__ */ S.createElement(u, s.cn("STrigger", {
458
- render: Y.Trigger,
455
+ function Me(d) {
456
+ var s, p = d.Root, e = d.styles;
457
+ return s = b(e), /* @__PURE__ */ y.createElement(p, s.cn("STrigger", {
458
+ render: F.Trigger,
459
459
  tag: te
460
460
  }));
461
461
  }
462
- function ze(d) {
463
- var s, u = d.Root, e = d.styles, a = d.getI18nText;
464
- return s = T(e), /* @__PURE__ */ S.createElement(u, s.cn("SCompareToggle", {
462
+ function Ee(d) {
463
+ var s, p = d.Root, e = d.styles, a = d.getI18nText;
464
+ return s = b(e), /* @__PURE__ */ y.createElement(p, s.cn("SCompareToggle", {
465
465
  render: re,
466
466
  label: a("compare")
467
467
  }));
468
468
  }
469
- function Ne(d) {
470
- var s, u = d.Root, e = d.Children, a = d.styles;
471
- return s = T(a), /* @__PURE__ */ S.createElement(u, s.cn("SRangeComparatorHeader", {
472
- render: A,
469
+ function Ae(d) {
470
+ var s, p = d.Root, e = d.Children, a = d.styles;
471
+ return s = b(a), /* @__PURE__ */ y.createElement(p, s.cn("SRangeComparatorHeader", {
472
+ render: M,
473
473
  gap: 4,
474
474
  alignItems: "center"
475
- }), /* @__PURE__ */ S.createElement(e, s.cn("Children", {})));
475
+ }), /* @__PURE__ */ y.createElement(e, s.cn("Children", {})));
476
476
  }
477
- function Fe(d) {
478
- var s, u = d.Root, e = d.Children, a = d.styles;
479
- return s = T(a), /* @__PURE__ */ S.createElement(u, s.cn("SBody", {
480
- render: A,
477
+ function ze(d) {
478
+ var s, p = d.Root, e = d.Children, a = d.styles;
479
+ return s = b(a), /* @__PURE__ */ y.createElement(p, s.cn("SBody", {
480
+ render: M,
481
481
  gap: 4
482
- }), /* @__PURE__ */ S.createElement(e, s.cn("Children", {})));
482
+ }), /* @__PURE__ */ y.createElement(e, s.cn("Children", {})));
483
483
  }
484
- function Oe(d) {
485
- var s, u = d.Root, e = d.styles, a = d.Children;
486
- return s = T(e), /* @__PURE__ */ S.createElement(u, s.cn("SFooter", {
487
- render: A,
484
+ function Ne(d) {
485
+ var s, p = d.Root, e = d.styles, a = d.Children;
486
+ return s = b(e), /* @__PURE__ */ y.createElement(p, s.cn("SFooter", {
487
+ render: M,
488
488
  gap: 2
489
- }), /* @__PURE__ */ S.createElement(a, s.cn("Children", {})));
489
+ }), /* @__PURE__ */ y.createElement(a, s.cn("Children", {})));
490
490
  }
491
491
  export {
492
- Me as Apply,
493
- Fe as Body,
494
- ze as CompareToggle,
495
- Oe as Footer,
496
- Ne as Header,
497
- Ee as Reset,
498
- Ae as Trigger,
499
- x as default
492
+ He as Apply,
493
+ ze as Body,
494
+ Ee as CompareToggle,
495
+ Ne as Footer,
496
+ Ae as Header,
497
+ Ve as Reset,
498
+ Me as Trigger,
499
+ R as default
500
500
  };