@semcore/date-picker 16.2.4 → 17.0.0-prerelease.18

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/cjs/DatePicker.js +116 -139
  3. package/lib/cjs/DatePicker.js.map +1 -1
  4. package/lib/cjs/DateRangeComparator.js +144 -149
  5. package/lib/cjs/DateRangeComparator.js.map +1 -1
  6. package/lib/cjs/DateRangePicker.js +86 -101
  7. package/lib/cjs/DateRangePicker.js.map +1 -1
  8. package/lib/cjs/MonthDateRangeComparator.js +173 -180
  9. package/lib/cjs/MonthDateRangeComparator.js.map +1 -1
  10. package/lib/cjs/MonthPicker.js +70 -87
  11. package/lib/cjs/MonthPicker.js.map +1 -1
  12. package/lib/cjs/MonthRangePicker.js +96 -111
  13. package/lib/cjs/MonthRangePicker.js.map +1 -1
  14. package/lib/cjs/components/ButtonTrigger.js +12 -11
  15. package/lib/cjs/components/ButtonTrigger.js.map +1 -1
  16. package/lib/cjs/components/Calendar.js +409 -466
  17. package/lib/cjs/components/Calendar.js.map +1 -1
  18. package/lib/cjs/components/DateRangeComparatorAbstract.js +574 -626
  19. package/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
  20. package/lib/cjs/components/InputTrigger.js +585 -677
  21. package/lib/cjs/components/InputTrigger.js.map +1 -1
  22. package/lib/cjs/components/PickerAbstract.js +254 -273
  23. package/lib/cjs/components/PickerAbstract.js.map +1 -1
  24. package/lib/cjs/components/RangePickerAbstract.js +407 -439
  25. package/lib/cjs/components/RangePickerAbstract.js.map +1 -1
  26. package/lib/cjs/components/index.js +92 -102
  27. package/lib/cjs/components/index.js.map +1 -1
  28. package/lib/cjs/index.d.js.map +1 -1
  29. package/lib/cjs/index.js +15 -15
  30. package/lib/cjs/index.js.map +1 -1
  31. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +17 -17
  32. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  33. package/lib/cjs/utils/cronTabScheduler.js +13 -22
  34. package/lib/cjs/utils/cronTabScheduler.js.map +1 -1
  35. package/lib/cjs/utils/datesIntersects.js +12 -19
  36. package/lib/cjs/utils/datesIntersects.js.map +1 -1
  37. package/lib/cjs/utils/formatDate.js +11 -9
  38. package/lib/cjs/utils/formatDate.js.map +1 -1
  39. package/lib/cjs/utils/includesDate.js +11 -16
  40. package/lib/cjs/utils/includesDate.js.map +1 -1
  41. package/lib/cjs/utils/isBetweenPlugin.js +6 -6
  42. package/lib/cjs/utils/isBetweenPlugin.js.map +1 -1
  43. package/lib/cjs/utils/shortDateRangeFormat.js +29 -33
  44. package/lib/cjs/utils/shortDateRangeFormat.js.map +1 -1
  45. package/lib/es6/DatePicker.js +117 -141
  46. package/lib/es6/DatePicker.js.map +1 -1
  47. package/lib/es6/DateRangeComparator.js +130 -135
  48. package/lib/es6/DateRangeComparator.js.map +1 -1
  49. package/lib/es6/DateRangePicker.js +87 -102
  50. package/lib/es6/DateRangePicker.js.map +1 -1
  51. package/lib/es6/MonthDateRangeComparator.js +159 -166
  52. package/lib/es6/MonthDateRangeComparator.js.map +1 -1
  53. package/lib/es6/MonthPicker.js +72 -89
  54. package/lib/es6/MonthPicker.js.map +1 -1
  55. package/lib/es6/MonthRangePicker.js +97 -112
  56. package/lib/es6/MonthRangePicker.js.map +1 -1
  57. package/lib/es6/components/ButtonTrigger.js +4 -3
  58. package/lib/es6/components/ButtonTrigger.js.map +1 -1
  59. package/lib/es6/components/Calendar.js +400 -457
  60. package/lib/es6/components/Calendar.js.map +1 -1
  61. package/lib/es6/components/DateRangeComparatorAbstract.js +552 -604
  62. package/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
  63. package/lib/es6/components/InputTrigger.js +568 -660
  64. package/lib/es6/components/InputTrigger.js.map +1 -1
  65. package/lib/es6/components/PickerAbstract.js +246 -265
  66. package/lib/es6/components/PickerAbstract.js.map +1 -1
  67. package/lib/es6/components/RangePickerAbstract.js +397 -429
  68. package/lib/es6/components/RangePickerAbstract.js.map +1 -1
  69. package/lib/es6/components/index.js +74 -85
  70. package/lib/es6/components/index.js.map +1 -1
  71. package/lib/es6/index.d.js.map +1 -1
  72. package/lib/es6/translations/__intergalactic-dynamic-locales.js +16 -16
  73. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  74. package/lib/es6/utils/cronTabScheduler.js +13 -21
  75. package/lib/es6/utils/cronTabScheduler.js.map +1 -1
  76. package/lib/es6/utils/datesIntersects.js +10 -18
  77. package/lib/es6/utils/datesIntersects.js.map +1 -1
  78. package/lib/es6/utils/formatDate.js +6 -6
  79. package/lib/es6/utils/formatDate.js.map +1 -1
  80. package/lib/es6/utils/includesDate.js +10 -15
  81. package/lib/es6/utils/includesDate.js.map +1 -1
  82. package/lib/es6/utils/isBetweenPlugin.js +4 -4
  83. package/lib/es6/utils/isBetweenPlugin.js.map +1 -1
  84. package/lib/es6/utils/shortDateRangeFormat.js +27 -31
  85. package/lib/es6/utils/shortDateRangeFormat.js.map +1 -1
  86. package/lib/esm/DatePicker.mjs +109 -114
  87. package/lib/esm/DateRangeComparator.mjs +112 -105
  88. package/lib/esm/DateRangePicker.mjs +76 -80
  89. package/lib/esm/MonthDateRangeComparator.mjs +141 -134
  90. package/lib/esm/MonthPicker.mjs +65 -70
  91. package/lib/esm/MonthRangePicker.mjs +86 -88
  92. package/lib/esm/components/ButtonTrigger.mjs +4 -3
  93. package/lib/esm/components/Calendar.mjs +397 -423
  94. package/lib/esm/components/DateRangeComparatorAbstract.mjs +559 -516
  95. package/lib/esm/components/InputTrigger.mjs +550 -557
  96. package/lib/esm/components/PickerAbstract.mjs +249 -244
  97. package/lib/esm/components/RangePickerAbstract.mjs +400 -384
  98. package/lib/esm/components/index.mjs +73 -69
  99. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
  100. package/lib/esm/utils/cronTabScheduler.mjs +13 -18
  101. package/lib/esm/utils/datesIntersects.mjs +10 -14
  102. package/lib/esm/utils/formatDate.mjs +6 -6
  103. package/lib/esm/utils/includesDate.mjs +10 -13
  104. package/lib/esm/utils/isBetweenPlugin.mjs +4 -4
  105. package/lib/esm/utils/shortDateRangeFormat.mjs +27 -27
  106. package/lib/types/index.d.ts +2 -44
  107. package/package.json +16 -17
@@ -1,239 +1,212 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports["default"] = void 0;
7
+ exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
10
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
14
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
16
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
17
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
10
  var _core = require("@semcore/core");
11
+ var _baseComponents = require("@semcore/base-components");
19
12
  var _baseTrigger = _interopRequireDefault(require("@semcore/base-trigger"));
20
13
  var _assignProps8 = _interopRequireDefault(require("@semcore/core/lib/utils/assignProps"));
21
14
  var _useEnhancedEffect = _interopRequireDefault(require("@semcore/core/lib/utils/use/useEnhancedEffect"));
22
- var _flexBox = require("@semcore/flex-box");
23
15
  var _m = _interopRequireDefault(require("@semcore/icon/Calendar/m"));
24
16
  var _inputMask = _interopRequireDefault(require("@semcore/input-mask"));
25
- var _neighborLocation = _interopRequireDefault(require("@semcore/neighbor-location"));
26
17
  var _tooltip = _interopRequireDefault(require("@semcore/tooltip"));
27
18
  var _dayjs = _interopRequireDefault(require("dayjs"));
28
19
  var _react = _interopRequireDefault(require("react"));
29
20
  var _datesIntersects = require("../utils/datesIntersects");
30
21
  var _includesDate = require("../utils/includesDate");
31
- var _excluded = ["children", "id", "role", "aria-haspopup", "aria-label", "style"],
32
- _excluded2 = ["children", "id", "role", "aria-haspopup", "aria-label", "style"],
33
- _excluded3 = ["value", "onChange", "onDisplayedPeriodChange", "locale", "w", "ariaHasPopup", "showError"],
34
- _excluded4 = ["value", "locale", "onDisplayedPeriodChange", "ariaHasPopup", "showError"],
35
- _excluded5 = ["value", "locale", "onDisplayedPeriodChange", "ariaHasPopup", "inputId", "showError"],
36
- _excluded6 = ["date", "onDateChange", "onDisplayedPeriodChange", "locale", "styles", "parts", "disabledDates", "forwardRef", "placeholders", "labelPrefix", "onMaskPipeBlock", "containerFocused", "animationsDisabled", "getI18nText", "inputId", "inputRole", "__excludeProps", "Root"];
37
22
  /*!__reshadow-styles__:"../style/date-picker.shadow.css"*/
38
- var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SPopper_gjj0p_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_gjj0p_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_gjj0p_gg_:active,.___SPopper_gjj0p_gg_:focus{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_gjj0p_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___SHeader_gjj0p_gg_,.___STitle_gjj0p_gg_{display:flex;align-items:center}.___STitle_gjj0p_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_gjj0p_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_gjj0p_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_gjj0p_gg_ .___SInner_gjj0p_gg_{justify-content:flex-start}.___SInputMask_gjj0p_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_gjj0p_gg_.__animationsDisabled_gjj0p_gg_{transition:none}.___SInputMask_gjj0p_gg_ .___SValue_gjj0p_gg_{letter-spacing:0}.___SInputMask_gjj0p_gg_ .___SValue_gjj0p_gg_:focus{outline:0}.___SIndicator_gjj0p_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_gjj0p_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_gjj0p_gg_._range_value_gjj0p_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_gjj0p_gg_._range_compare_gjj0p_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_gjj0p_gg_.__disabled_gjj0p_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_gjj0p_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_gjj0p_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_gjj0p_gg_ .___SMask_gjj0p_gg_,.___SDateRange_gjj0p_gg_ .___SValue_gjj0p_gg_,.___SSingleDateInput_gjj0p_gg_ .___SMask_gjj0p_gg_,.___SSingleDateInput_gjj0p_gg_ .___SValue_gjj0p_gg_{opacity:0}.___SSingleDateInput_gjj0p_gg_:focus-within .___SHumanizedDate_gjj0p_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_gjj0p_gg_:focus-within .___SMask_gjj0p_gg_,.___SSingleDateInput_gjj0p_gg_:focus-within .___SValue_gjj0p_gg_{opacity:1}.___SDateRange_gjj0p_gg_:focus-within .___SHumanizedDate_gjj0p_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_gjj0p_gg_:focus-within .___SMask_gjj0p_gg_,.___SDateRange_gjj0p_gg_:focus-within .___SValue_gjj0p_gg_{opacity:1}.___SInputMask_gjj0p_gg_.__noHumanizedDate_gjj0p_gg_ .___SMask_gjj0p_gg_,.___SInputMask_gjj0p_gg_.__noHumanizedDate_gjj0p_gg_ .___SValue_gjj0p_gg_{opacity:1}.___SDateRange_gjj0p_gg_ .___SInputMask_gjj0p_gg_:focus-within .___SMask_gjj0p_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_gjj0p_gg_:focus-within .___SRangeSep_gjj0p_gg_,.___SRangeSep_gjj0p_gg_.__fulfilled_gjj0p_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_gjj0p_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_gjj0p_gg_,.___SRangeComparatorHeader_gjj0p_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_gjj0p_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_gjj0p_gg_,.___SPeriodsList_gjj0p_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_gjj0p_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_gjj0p_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_gjj0p_gg_{transition:none}}", /*__inner_css_end__*/"gjj0p_gg_"),
23
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SPopper_9ubmf_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_9ubmf_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_9ubmf_gg_:active,.___SPopper_9ubmf_gg_:focus{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_9ubmf_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___SHeader_9ubmf_gg_,.___STitle_9ubmf_gg_{display:flex;align-items:center}.___STitle_9ubmf_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_9ubmf_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_9ubmf_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_9ubmf_gg_ .___SInner_9ubmf_gg_{justify-content:flex-start}.___SInputMask_9ubmf_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_9ubmf_gg_.__animationsDisabled_9ubmf_gg_{transition:none}.___SInputMask_9ubmf_gg_ .___SValue_9ubmf_gg_{letter-spacing:0}.___SInputMask_9ubmf_gg_ .___SValue_9ubmf_gg_:focus{outline:0}.___SIndicator_9ubmf_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_9ubmf_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_9ubmf_gg_._range_value_9ubmf_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_9ubmf_gg_._range_compare_9ubmf_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_9ubmf_gg_.__disabled_9ubmf_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_9ubmf_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_9ubmf_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_9ubmf_gg_ .___SMask_9ubmf_gg_,.___SDateRange_9ubmf_gg_ .___SValue_9ubmf_gg_,.___SSingleDateInput_9ubmf_gg_ .___SMask_9ubmf_gg_,.___SSingleDateInput_9ubmf_gg_ .___SValue_9ubmf_gg_{opacity:0}.___SSingleDateInput_9ubmf_gg_:focus-within .___SHumanizedDate_9ubmf_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_9ubmf_gg_:focus-within .___SMask_9ubmf_gg_,.___SSingleDateInput_9ubmf_gg_:focus-within .___SValue_9ubmf_gg_{opacity:1}.___SDateRange_9ubmf_gg_:focus-within .___SHumanizedDate_9ubmf_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_9ubmf_gg_:focus-within .___SMask_9ubmf_gg_,.___SDateRange_9ubmf_gg_:focus-within .___SValue_9ubmf_gg_{opacity:1}.___SInputMask_9ubmf_gg_.__noHumanizedDate_9ubmf_gg_ .___SMask_9ubmf_gg_,.___SInputMask_9ubmf_gg_.__noHumanizedDate_9ubmf_gg_ .___SValue_9ubmf_gg_{opacity:1}.___SDateRange_9ubmf_gg_ .___SInputMask_9ubmf_gg_:focus-within .___SMask_9ubmf_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_9ubmf_gg_:focus-within .___SRangeSep_9ubmf_gg_,.___SRangeSep_9ubmf_gg_.__fulfilled_9ubmf_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_9ubmf_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_9ubmf_gg_,.___SRangeComparatorHeader_9ubmf_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_9ubmf_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_9ubmf_gg_,.___SPeriodsList_9ubmf_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_9ubmf_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_9ubmf_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_9ubmf_gg_{transition:none}}", /*__inner_css_end__*/"9ubmf_gg_"),
39
24
  /*__reshadow_css_end__*/
40
25
  {
41
- "__SHeader": "___SHeader_gjj0p_gg_",
42
- "__STitle": "___STitle_gjj0p_gg_",
43
- "__SToday": "___SToday_gjj0p_gg_",
44
- "__SPeriod": "___SPeriod_gjj0p_gg_",
45
- "__SButton": "___SButton_gjj0p_gg_",
46
- "__SInner": "___SInner_gjj0p_gg_",
47
- "__SInputMask": "___SInputMask_gjj0p_gg_",
48
- "_animationsDisabled": "__animationsDisabled_gjj0p_gg_",
49
- "__SIndicator": "___SIndicator_gjj0p_gg_",
50
- "__SRangeIndicator": "___SRangeIndicator_gjj0p_gg_",
51
- "_range_value": "_range_value_gjj0p_gg_",
52
- "_range_compare": "_range_compare_gjj0p_gg_",
53
- "_disabled": "__disabled_gjj0p_gg_",
54
- "__SHumanizedDate": "___SHumanizedDate_gjj0p_gg_",
55
- "__SMask": "___SMask_gjj0p_gg_",
56
- "__SSingleDateInput": "___SSingleDateInput_gjj0p_gg_",
57
- "__SValue": "___SValue_gjj0p_gg_",
58
- "__SDateRange": "___SDateRange_gjj0p_gg_",
59
- "_noHumanizedDate": "__noHumanizedDate_gjj0p_gg_",
60
- "__SRangeSep": "___SRangeSep_gjj0p_gg_",
61
- "_fulfilled": "__fulfilled_gjj0p_gg_",
62
- "__SRangeComparatorHeader": "___SRangeComparatorHeader_gjj0p_gg_",
63
- "__SRangeCalendar": "___SRangeCalendar_gjj0p_gg_",
64
- "__SFooter": "___SFooter_gjj0p_gg_",
65
- "__SPeriodsList": "___SPeriodsList_gjj0p_gg_",
66
- "__STooltip": "___STooltip_gjj0p_gg_",
67
- "__SCompareToggle": "___SCompareToggle_gjj0p_gg_",
68
- "__SPopper": "___SPopper_gjj0p_gg_"
26
+ "__SHeader": "___SHeader_9ubmf_gg_",
27
+ "__STitle": "___STitle_9ubmf_gg_",
28
+ "__SToday": "___SToday_9ubmf_gg_",
29
+ "__SPeriod": "___SPeriod_9ubmf_gg_",
30
+ "__SButton": "___SButton_9ubmf_gg_",
31
+ "__SInner": "___SInner_9ubmf_gg_",
32
+ "__SInputMask": "___SInputMask_9ubmf_gg_",
33
+ "_animationsDisabled": "__animationsDisabled_9ubmf_gg_",
34
+ "__SIndicator": "___SIndicator_9ubmf_gg_",
35
+ "__SRangeIndicator": "___SRangeIndicator_9ubmf_gg_",
36
+ "_range_value": "_range_value_9ubmf_gg_",
37
+ "_range_compare": "_range_compare_9ubmf_gg_",
38
+ "_disabled": "__disabled_9ubmf_gg_",
39
+ "__SHumanizedDate": "___SHumanizedDate_9ubmf_gg_",
40
+ "__SMask": "___SMask_9ubmf_gg_",
41
+ "__SSingleDateInput": "___SSingleDateInput_9ubmf_gg_",
42
+ "__SValue": "___SValue_9ubmf_gg_",
43
+ "__SDateRange": "___SDateRange_9ubmf_gg_",
44
+ "_noHumanizedDate": "__noHumanizedDate_9ubmf_gg_",
45
+ "__SRangeSep": "___SRangeSep_9ubmf_gg_",
46
+ "_fulfilled": "__fulfilled_9ubmf_gg_",
47
+ "__SRangeComparatorHeader": "___SRangeComparatorHeader_9ubmf_gg_",
48
+ "__SRangeCalendar": "___SRangeCalendar_9ubmf_gg_",
49
+ "__SFooter": "___SFooter_9ubmf_gg_",
50
+ "__SPeriodsList": "___SPeriodsList_9ubmf_gg_",
51
+ "__STooltip": "___STooltip_9ubmf_gg_",
52
+ "__SCompareToggle": "___SCompareToggle_9ubmf_gg_",
53
+ "__SPopper": "___SPopper_9ubmf_gg_"
69
54
  });
70
- var defaultAllowedParts = {
55
+ const defaultAllowedParts = {
71
56
  year: true,
72
57
  month: true,
73
58
  day: true
74
59
  };
75
- var exampleDate = new Date(2000, 4, 29);
76
- var InputTriggerRoot = /*#__PURE__*/function (_Component) {
77
- function InputTriggerRoot() {
78
- (0, _classCallCheck2["default"])(this, InputTriggerRoot);
79
- return (0, _callSuper2["default"])(this, InputTriggerRoot, arguments);
60
+ const exampleDate = new Date(2000, 4, 29);
61
+ class InputTriggerRoot extends _core.Component {
62
+ getSingleDateInputProps() {
63
+ const {
64
+ children: _children,
65
+ id,
66
+ role: _role,
67
+ 'aria-haspopup': ariaHasPopup,
68
+ // 'aria-expanded': ariaExpanded,
69
+ 'aria-label': _ariaLabel,
70
+ style: _style,
71
+ ...otherProps
72
+ } = this.asProps;
73
+ return {
74
+ ...otherProps,
75
+ ariaHasPopup,
76
+ inputId: id
77
+ };
80
78
  }
81
- (0, _inherits2["default"])(InputTriggerRoot, _Component);
82
- return (0, _createClass2["default"])(InputTriggerRoot, [{
83
- key: "getSingleDateInputProps",
84
- value: function getSingleDateInputProps() {
85
- var _this$asProps = this.asProps,
86
- _children = _this$asProps.children,
87
- id = _this$asProps.id,
88
- _role = _this$asProps.role,
89
- ariaHasPopup = _this$asProps['aria-haspopup'],
90
- _ariaLabel = _this$asProps['aria-label'],
91
- _style = _this$asProps.style,
92
- otherProps = (0, _objectWithoutProperties2["default"])(_this$asProps, _excluded);
93
- return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, otherProps), {}, {
94
- ariaHasPopup: ariaHasPopup,
95
- inputId: id
96
- });
97
- }
98
- }, {
99
- key: "getDateRangeProps",
100
- value: function getDateRangeProps() {
101
- var _this$asProps2 = this.asProps,
102
- _children = _this$asProps2.children,
103
- id = _this$asProps2.id,
104
- _rolw = _this$asProps2.role,
105
- ariaHasPopup = _this$asProps2['aria-haspopup'],
106
- _ariaLabel = _this$asProps2['aria-label'],
107
- _style = _this$asProps2.style,
108
- otherProps = (0, _objectWithoutProperties2["default"])(_this$asProps2, _excluded2);
109
- return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, otherProps), {}, {
110
- ariaHasPopup: ariaHasPopup,
111
- inputId: id
112
- });
113
- }
114
- }, {
115
- key: "render",
116
- value: function render() {
117
- var _ref = this.asProps,
118
- _ref8;
119
- var SInputTrigger = _flexBox.Box;
120
- var _this$asProps3 = this.asProps,
121
- Children = _this$asProps3.Children,
122
- style = _this$asProps3.style,
123
- getI18nText = _this$asProps3.getI18nText;
124
- return _ref8 = (0, _core.sstyled)(style), /*#__PURE__*/_react["default"].createElement(SInputTrigger, _ref8.cn("SInputTrigger", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
79
+ getDateRangeProps() {
80
+ const {
81
+ children: _children,
82
+ id,
83
+ role: _rolw,
84
+ 'aria-haspopup': ariaHasPopup,
85
+ 'aria-label': _ariaLabel,
86
+ // 'aria-expanded': ariaExpanded,
87
+ style: _style,
88
+ ...otherProps
89
+ } = this.asProps;
90
+ return {
91
+ ...otherProps,
92
+ ariaHasPopup,
93
+ inputId: id
94
+ };
95
+ }
96
+ render() {
97
+ var _ref = this.asProps,
98
+ _ref8;
99
+ const SInputTrigger = _baseComponents.Box;
100
+ const {
101
+ Children,
102
+ style,
103
+ getI18nText
104
+ } = this.asProps;
105
+ return _ref8 = (0, _core.sstyled)(style), /*#__PURE__*/_react.default.createElement(SInputTrigger, _ref8.cn("SInputTrigger", {
106
+ ...(0, _core.assignProps)({
125
107
  "aria-label": getI18nText('input'),
126
108
  "__excludeProps": ['onChange', 'value', 'role', 'id']
127
- }, _ref))), /*#__PURE__*/_react["default"].createElement(Children, _ref8.cn("Children", {})));
128
- }
129
- }]);
130
- }(_core.Component);
131
- (0, _defineProperty2["default"])(InputTriggerRoot, "displayName", 'InputTrigger');
132
- (0, _defineProperty2["default"])(InputTriggerRoot, "style", style);
133
- (0, _defineProperty2["default"])(InputTriggerRoot, "defaultProps", {
109
+ }, _ref)
110
+ }), /*#__PURE__*/_react.default.createElement(Children, _ref8.cn("Children", {})));
111
+ }
112
+ }
113
+ (0, _defineProperty2.default)(InputTriggerRoot, "displayName", 'InputTrigger');
114
+ (0, _defineProperty2.default)(InputTriggerRoot, "style", style);
115
+ (0, _defineProperty2.default)(InputTriggerRoot, "defaultProps", {
134
116
  duration: 300,
135
117
  popoverVisible: true
136
118
  });
137
- var SingleDateInputRoot = /*#__PURE__*/function (_Component2) {
138
- function SingleDateInputRoot() {
139
- var _this;
140
- (0, _classCallCheck2["default"])(this, SingleDateInputRoot);
141
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
142
- args[_key] = arguments[_key];
143
- }
144
- _this = (0, _callSuper2["default"])(this, SingleDateInputRoot, [].concat(args));
145
- (0, _defineProperty2["default"])(_this, "state", {
119
+ class SingleDateInputRoot extends _core.Component {
120
+ constructor(...args) {
121
+ super(...args);
122
+ (0, _defineProperty2.default)(this, "state", {
146
123
  errorText: null,
147
124
  showError: false,
148
125
  focused: false
149
126
  });
150
- (0, _defineProperty2["default"])(_this, "handleFocus", function () {
151
- _this.setState({
127
+ (0, _defineProperty2.default)(this, "handleFocus", () => {
128
+ this.setState({
152
129
  focused: true
153
130
  });
154
131
  });
155
- (0, _defineProperty2["default"])(_this, "handleBlur", function () {
156
- _this.setState({
132
+ (0, _defineProperty2.default)(this, "handleBlur", () => {
133
+ this.setState({
157
134
  focused: false
158
135
  });
159
136
  });
160
- (0, _defineProperty2["default"])(_this, "handleInputMaskPipeBlock", function (value) {
161
- if (value === _this.asProps.disabledDateInputAttempt) return;
162
- _this.handlers.disabledDateInputAttempt(value);
137
+ (0, _defineProperty2.default)(this, "handleInputMaskPipeBlock", value => {
138
+ if (value === this.asProps.disabledDateInputAttempt) return;
139
+ this.handlers.disabledDateInputAttempt(value);
163
140
  });
164
- return _this;
165
141
  }
166
- (0, _inherits2["default"])(SingleDateInputRoot, _Component2);
167
- return (0, _createClass2["default"])(SingleDateInputRoot, [{
168
- key: "uncontrolledProps",
169
- value: function uncontrolledProps() {
170
- var _this2 = this;
171
- return {
172
- disabledDateInputAttempt: [null, function (date) {
173
- var errorText = _this2.state.errorText;
174
- var showError = false;
175
- if (date !== null) {
176
- errorText = _this2.asProps.disabledErrorText;
177
- if (errorText === undefined) {
178
- var key = 'unavailableDate';
179
- if (_this2.asProps.parts && !_this2.asProps.parts.day) {
180
- key = 'unavailableMonth';
181
- }
182
- errorText = _this2.asProps.getI18nText(key);
183
- }
184
- if (typeof errorText === 'function') {
185
- errorText = errorText(date);
142
+ uncontrolledProps() {
143
+ return {
144
+ disabledDateInputAttempt: [null, date => {
145
+ let errorText = this.state.errorText;
146
+ let showError = false;
147
+ if (date !== null) {
148
+ errorText = this.asProps.disabledErrorText;
149
+ if (errorText === undefined) {
150
+ let key = 'unavailableDate';
151
+ if (this.asProps.parts && !this.asProps.parts.day) {
152
+ key = 'unavailableMonth';
186
153
  }
187
- showError = _this2.asProps.disabledErrorText !== null;
154
+ errorText = this.asProps.getI18nText(key);
188
155
  }
189
- _this2.setState({
190
- errorText: errorText,
191
- showError: showError
192
- });
193
- }]
194
- };
195
- }
196
- }, {
197
- key: "getMaskedInputProps",
198
- value: function getMaskedInputProps() {
199
- var _this$asProps4 = this.asProps,
200
- value = _this$asProps4.value,
201
- onChange = _this$asProps4.onChange,
202
- onDisplayedPeriodChange = _this$asProps4.onDisplayedPeriodChange,
203
- locale = _this$asProps4.locale,
204
- _w = _this$asProps4.w,
205
- _ariaHasPopup = _this$asProps4.ariaHasPopup,
206
- _showError = _this$asProps4.showError,
207
- otherProps = (0, _objectWithoutProperties2["default"])(_this$asProps4, _excluded3);
208
- return (0, _objectSpread2["default"])({
209
- 'date': value,
210
- 'onDateChange': onChange,
211
- onDisplayedPeriodChange: onDisplayedPeriodChange,
212
- locale: locale,
213
- 'aria-haspopup': 'true',
214
- 'onMaskPipeBlock': this.handleInputMaskPipeBlock
215
- }, otherProps);
216
- }
217
- }, {
218
- key: "render",
219
- value: function render() {
220
- var _ref2 = this.asProps,
221
- _ref9;
222
- var _this$asProps5 = this.asProps,
223
- Children = _this$asProps5.Children,
224
- forwardRef = _this$asProps5.forwardRef,
225
- styles = _this$asProps5.styles,
226
- state = _this$asProps5.state,
227
- showErrorProps = _this$asProps5.showError,
228
- popoverVisible = _this$asProps5.popoverVisible;
229
- var _this$state = this.state,
230
- errorText = _this$state.errorText,
231
- showErrorState = _this$state.showError,
232
- focused = _this$state.focused;
233
- var showError = showErrorState && showErrorProps;
234
- var SSingleDateInput = _inputMask["default"];
235
- return _ref9 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SSingleDateInput, _ref9.cn("SSingleDateInput", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
236
- "tag": _tooltip["default"],
156
+ if (typeof errorText === 'function') {
157
+ errorText = errorText(date);
158
+ }
159
+ showError = this.asProps.disabledErrorText !== null;
160
+ }
161
+ this.setState({
162
+ errorText,
163
+ showError
164
+ });
165
+ }]
166
+ };
167
+ }
168
+ getMaskedInputProps() {
169
+ const {
170
+ value,
171
+ onChange,
172
+ onDisplayedPeriodChange,
173
+ locale,
174
+ w: _w,
175
+ ariaHasPopup: _ariaHasPopup,
176
+ showError: _showError,
177
+ ...otherProps
178
+ } = this.asProps;
179
+ return {
180
+ 'date': value,
181
+ 'onDateChange': onChange,
182
+ onDisplayedPeriodChange,
183
+ locale,
184
+ 'aria-haspopup': 'true',
185
+ 'onMaskPipeBlock': this.handleInputMaskPipeBlock,
186
+ ...otherProps
187
+ };
188
+ }
189
+ render() {
190
+ var _ref2 = this.asProps,
191
+ _ref9;
192
+ const {
193
+ Children,
194
+ forwardRef,
195
+ styles,
196
+ state,
197
+ showError: showErrorProps,
198
+ popoverVisible
199
+ } = this.asProps;
200
+ const {
201
+ errorText,
202
+ showError: showErrorState,
203
+ focused
204
+ } = this.state;
205
+ const showError = showErrorState && showErrorProps;
206
+ const SSingleDateInput = _inputMask.default;
207
+ return _ref9 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(SSingleDateInput, _ref9.cn("SSingleDateInput", {
208
+ ...(0, _core.assignProps)({
209
+ "tag": _tooltip.default,
237
210
  "placement": 'top-start',
238
211
  "title": errorText,
239
212
  "theme": 'warning',
@@ -243,247 +216,234 @@ var SingleDateInputRoot = /*#__PURE__*/function (_Component2) {
243
216
  "onFocus": this.handleFocus,
244
217
  "onBlur": this.handleBlur,
245
218
  "__excludeProps": ['onChange', 'style', 'aria-expanded']
246
- }, _ref2))), /*#__PURE__*/_react["default"].createElement(_neighborLocation["default"], _ref9.cn("NeighborLocation", {}), /*#__PURE__*/_react["default"].createElement(Children, _ref9.cn("Children", {}))));
247
- }
248
- }]);
249
- }(_core.Component);
250
- (0, _defineProperty2["default"])(SingleDateInputRoot, "displayName", 'SingleDateInput');
251
- (0, _defineProperty2["default"])(SingleDateInputRoot, "style", style);
252
- (0, _defineProperty2["default"])(SingleDateInputRoot, "defaultProps", {
253
- children: function children() {
254
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(SingleDateInput.Indicator, null), /*#__PURE__*/_react["default"].createElement(SingleDateInput.MaskedInput, null));
255
- },
219
+ }, _ref2)
220
+ }), /*#__PURE__*/_react.default.createElement(_baseComponents.NeighborLocation, _ref9.cn("NeighborLocation", {}), /*#__PURE__*/_react.default.createElement(Children, _ref9.cn("Children", {}))));
221
+ }
222
+ }
223
+ (0, _defineProperty2.default)(SingleDateInputRoot, "displayName", 'SingleDateInput');
224
+ (0, _defineProperty2.default)(SingleDateInputRoot, "style", style);
225
+ (0, _defineProperty2.default)(SingleDateInputRoot, "defaultProps", {
226
+ children: () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(SingleDateInput.Indicator, null), /*#__PURE__*/_react.default.createElement(SingleDateInput.MaskedInput, null)),
256
227
  defaultDisabledDateInputAttempt: false,
257
228
  showError: true
258
229
  });
259
- var DateRangeRoot = /*#__PURE__*/function (_Component3) {
260
- function DateRangeRoot() {
261
- var _this3;
262
- (0, _classCallCheck2["default"])(this, DateRangeRoot);
263
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
264
- args[_key2] = arguments[_key2];
265
- }
266
- _this3 = (0, _callSuper2["default"])(this, DateRangeRoot, [].concat(args));
267
- (0, _defineProperty2["default"])(_this3, "state", {
230
+ class DateRangeRoot extends _core.Component {
231
+ constructor(...args) {
232
+ super(...args);
233
+ (0, _defineProperty2.default)(this, "state", {
268
234
  containerFocused: false,
269
235
  errorText: null,
270
236
  showError: false,
271
237
  lastChangedInput: 'from'
272
238
  });
273
- (0, _defineProperty2["default"])(_this3, "fromRef", /*#__PURE__*/_react["default"].createRef());
274
- (0, _defineProperty2["default"])(_this3, "toRef", /*#__PURE__*/_react["default"].createRef());
275
- (0, _defineProperty2["default"])(_this3, "handleFromChange", function (value, event) {
276
- var _this3$asProps$value$, _this3$asProps$value, _this3$asProps$value$2, _this3$asProps$value2;
277
- var onChange = _this3.asProps.onChange;
278
- var prevValue = [(_this3$asProps$value$ = (_this3$asProps$value = _this3.asProps.value) === null || _this3$asProps$value === void 0 ? void 0 : _this3$asProps$value[0]) !== null && _this3$asProps$value$ !== void 0 ? _this3$asProps$value$ : null, (_this3$asProps$value$2 = (_this3$asProps$value2 = _this3.asProps.value) === null || _this3$asProps$value2 === void 0 ? void 0 : _this3$asProps$value2[1]) !== null && _this3$asProps$value$2 !== void 0 ? _this3$asProps$value$2 : null];
239
+ (0, _defineProperty2.default)(this, "fromRef", /*#__PURE__*/_react.default.createRef());
240
+ (0, _defineProperty2.default)(this, "toRef", /*#__PURE__*/_react.default.createRef());
241
+ (0, _defineProperty2.default)(this, "handleFromChange", (value, event) => {
242
+ const {
243
+ onChange
244
+ } = this.asProps;
245
+ const prevValue = [this.asProps.value?.[0] ?? null, this.asProps.value?.[1] ?? null];
279
246
  onChange([value, prevValue[1]], event);
280
247
  if (value) {
281
- if (!_this3.toRef.current) return;
282
- _this3.toRef.current.focus();
283
- setTimeout(function () {
284
- if (!_this3.toRef.current) return;
285
- _this3.toRef.current.setSelectionRange(0, 0);
248
+ if (!this.toRef.current) return;
249
+ this.toRef.current.focus();
250
+ setTimeout(() => {
251
+ if (!this.toRef.current) return;
252
+ this.toRef.current.setSelectionRange(0, 0);
286
253
  }, 0);
287
254
  }
288
255
  });
289
- (0, _defineProperty2["default"])(_this3, "handleToChange", function (value, event) {
290
- var _this3$asProps$value$3, _this3$asProps$value3, _this3$asProps$value$4, _this3$asProps$value4;
291
- var onChange = _this3.asProps.onChange;
292
- var prevValue = [(_this3$asProps$value$3 = (_this3$asProps$value3 = _this3.asProps.value) === null || _this3$asProps$value3 === void 0 ? void 0 : _this3$asProps$value3[0]) !== null && _this3$asProps$value$3 !== void 0 ? _this3$asProps$value$3 : null, (_this3$asProps$value$4 = (_this3$asProps$value4 = _this3.asProps.value) === null || _this3$asProps$value4 === void 0 ? void 0 : _this3$asProps$value4[1]) !== null && _this3$asProps$value$4 !== void 0 ? _this3$asProps$value$4 : null];
256
+ (0, _defineProperty2.default)(this, "handleToChange", (value, event) => {
257
+ const {
258
+ onChange
259
+ } = this.asProps;
260
+ const prevValue = [this.asProps.value?.[0] ?? null, this.asProps.value?.[1] ?? null];
293
261
  onChange([prevValue[0], value], event);
294
262
  });
295
- (0, _defineProperty2["default"])(_this3, "handleFromKeydown", function (event) {
296
- if (!_this3.toRef.current) return;
297
- if (!_this3.fromRef.current) return;
298
- _this3.setState({
263
+ (0, _defineProperty2.default)(this, "handleFromKeydown", event => {
264
+ if (!this.toRef.current) return;
265
+ if (!this.fromRef.current) return;
266
+ this.setState({
299
267
  lastChangedInput: 'from'
300
268
  });
301
- if (event.key === 'ArrowRight' && _this3.fromRef.current.selectionStart === _this3.fromRef.current.value.length && _this3.fromRef.current.selectionEnd === _this3.fromRef.current.value.length) {
302
- _this3.toRef.current.focus();
303
- setTimeout(function () {
304
- _this3.toRef.current.setSelectionRange(0, 0);
269
+ if (event.key === 'ArrowRight' && this.fromRef.current.selectionStart === this.fromRef.current.value.length && this.fromRef.current.selectionEnd === this.fromRef.current.value.length) {
270
+ this.toRef.current.focus();
271
+ setTimeout(() => {
272
+ this.toRef.current.setSelectionRange(0, 0);
305
273
  }, 0);
306
274
  }
307
275
  });
308
- (0, _defineProperty2["default"])(_this3, "handleToKeydown", function (event) {
309
- if (!_this3.toRef.current) return;
310
- if (!_this3.fromRef.current) return;
311
- _this3.setState({
276
+ (0, _defineProperty2.default)(this, "handleToKeydown", event => {
277
+ if (!this.toRef.current) return;
278
+ if (!this.fromRef.current) return;
279
+ this.setState({
312
280
  lastChangedInput: 'to'
313
281
  });
314
- if (event.key === 'Backspace' && !_this3.toRef.current.value) {
315
- var value = _this3.fromRef.current.value;
316
- _this3.fromRef.current.focus();
317
- setTimeout(function () {
318
- _this3.fromRef.current.setSelectionRange(value.length, value.length);
282
+ if (event.key === 'Backspace' && !this.toRef.current.value) {
283
+ const value = this.fromRef.current.value;
284
+ this.fromRef.current.focus();
285
+ setTimeout(() => {
286
+ this.fromRef.current.setSelectionRange(value.length, value.length);
319
287
  }, 0);
320
288
  }
321
- if (event.key === 'ArrowLeft' && _this3.toRef.current.selectionStart === 0 && _this3.toRef.current.selectionEnd === 0) {
322
- var _value = _this3.fromRef.current.value;
323
- _this3.fromRef.current.focus();
324
- setTimeout(function () {
325
- _this3.fromRef.current.setSelectionRange(_value.length, _value.length);
289
+ if (event.key === 'ArrowLeft' && this.toRef.current.selectionStart === 0 && this.toRef.current.selectionEnd === 0) {
290
+ const value = this.fromRef.current.value;
291
+ this.fromRef.current.focus();
292
+ setTimeout(() => {
293
+ this.fromRef.current.setSelectionRange(value.length, value.length);
326
294
  }, 0);
327
295
  }
328
296
  });
329
- (0, _defineProperty2["default"])(_this3, "handleInputMaskPipeBlock", function (value) {
330
- if (value === _this3.asProps.disabledDateInputAttempt) return;
331
- _this3.handlers.disabledDateInputAttempt(value);
297
+ (0, _defineProperty2.default)(this, "handleInputMaskPipeBlock", value => {
298
+ if (value === this.asProps.disabledDateInputAttempt) return;
299
+ this.handlers.disabledDateInputAttempt(value);
332
300
  });
333
- (0, _defineProperty2["default"])(_this3, "handleFocus", function () {
334
- _this3.setState({
301
+ (0, _defineProperty2.default)(this, "handleFocus", () => {
302
+ this.setState({
335
303
  containerFocused: true
336
304
  });
337
305
  });
338
- (0, _defineProperty2["default"])(_this3, "handleBlur", function () {
339
- _this3.setState({
306
+ (0, _defineProperty2.default)(this, "handleBlur", () => {
307
+ this.setState({
340
308
  containerFocused: false
341
309
  });
342
310
  });
343
- (0, _defineProperty2["default"])(_this3, "updateDisabledDateInputAttempt", function (value) {
344
- var disabledDates = _this3.asProps.disabledDates;
345
- var invalid = false;
311
+ (0, _defineProperty2.default)(this, "updateDisabledDateInputAttempt", value => {
312
+ const {
313
+ disabledDates
314
+ } = this.asProps;
315
+ let invalid = false;
346
316
  if (value) {
347
- if (value[0] && value[1]) invalid = disabledDates.some((0, _datesIntersects.datesIntersects)([value[0], value[1]], _this3.asProps.unit));else if (value[0]) invalid = disabledDates.some((0, _includesDate.includesDate)((0, _dayjs["default"])(value[0]), _this3.asProps.unit));else if (value[1]) invalid = disabledDates.some((0, _includesDate.includesDate)((0, _dayjs["default"])(value[1]), _this3.asProps.unit));
317
+ if (value[0] && value[1]) invalid = disabledDates.some((0, _datesIntersects.datesIntersects)([value[0], value[1]], this.asProps.unit));else if (value[0]) invalid = disabledDates.some((0, _includesDate.includesDate)((0, _dayjs.default)(value[0]), this.asProps.unit));else if (value[1]) invalid = disabledDates.some((0, _includesDate.includesDate)((0, _dayjs.default)(value[1]), this.asProps.unit));
348
318
  }
349
319
  if (invalid) {
350
- var invalidValue = _this3.state.lastChangedInput === 'to' ? value[1] : value[0];
351
- setTimeout(function () {
352
- if (value === _this3.asProps.disabledDateInputAttempt) return;
353
- _this3.handlers.disabledDateInputAttempt(invalidValue);
320
+ const invalidValue = this.state.lastChangedInput === 'to' ? value[1] : value[0];
321
+ setTimeout(() => {
322
+ if (value === this.asProps.disabledDateInputAttempt) return;
323
+ this.handlers.disabledDateInputAttempt(invalidValue);
354
324
  }, 0);
355
325
  }
356
326
  });
357
- return _this3;
358
327
  }
359
- (0, _inherits2["default"])(DateRangeRoot, _Component3);
360
- return (0, _createClass2["default"])(DateRangeRoot, [{
361
- key: "uncontrolledProps",
362
- value: function uncontrolledProps() {
363
- var _this4 = this;
364
- return {
365
- disabledDateInputAttempt: [null, function (date) {
366
- var errorText = _this4.state.errorText;
367
- var showError = false;
368
- if (date !== null) {
369
- errorText = _this4.asProps.disabledErrorText;
370
- if (errorText === undefined) {
371
- var key = 'unavailableDate';
372
- if (_this4.asProps.parts && !_this4.asProps.parts.day) {
373
- key = 'unavailableMonth';
374
- }
375
- if (_this4.state.lastChangedInput === 'to') {
376
- key = 'unavailableEndDate';
377
- if (_this4.asProps.parts && !_this4.asProps.parts.day) {
378
- key = 'unavailableEndMonth';
379
- }
380
- }
381
- errorText = _this4.asProps.getI18nText(key);
328
+ uncontrolledProps() {
329
+ return {
330
+ disabledDateInputAttempt: [null, date => {
331
+ let errorText = this.state.errorText;
332
+ let showError = false;
333
+ if (date !== null) {
334
+ errorText = this.asProps.disabledErrorText;
335
+ if (errorText === undefined) {
336
+ let key = 'unavailableDate';
337
+ if (this.asProps.parts && !this.asProps.parts.day) {
338
+ key = 'unavailableMonth';
382
339
  }
383
- if (typeof errorText === 'function') {
384
- errorText = errorText(date);
340
+ if (this.state.lastChangedInput === 'to') {
341
+ key = 'unavailableEndDate';
342
+ if (this.asProps.parts && !this.asProps.parts.day) {
343
+ key = 'unavailableEndMonth';
344
+ }
385
345
  }
386
- showError = _this4.asProps.disabledErrorText !== null;
346
+ errorText = this.asProps.getI18nText(key);
387
347
  }
388
- _this4.setState({
389
- errorText: errorText,
390
- showError: showError
391
- });
392
- }]
393
- };
394
- }
395
- }, {
396
- key: "getFromMaskedInputProps",
397
- value: function getFromMaskedInputProps() {
398
- var _this$asProps6 = this.asProps,
399
- value = _this$asProps6.value,
400
- locale = _this$asProps6.locale,
401
- onDisplayedPeriodChange = _this$asProps6.onDisplayedPeriodChange,
402
- ariaHasPopup = _this$asProps6.ariaHasPopup,
403
- _showError = _this$asProps6.showError,
404
- otherProps = (0, _objectWithoutProperties2["default"])(_this$asProps6, _excluded4);
405
- return (0, _assignProps8["default"])({
406
- 'ref': this.fromRef,
407
- 'date': value === null || value === void 0 ? void 0 : value[0],
408
- 'onDateChange': this.handleFromChange,
409
- 'onKeyDown': this.handleFromKeydown,
410
- locale: locale,
411
- 'flex': 1,
412
- onDisplayedPeriodChange: onDisplayedPeriodChange,
413
- 'aria-haspopup': ariaHasPopup,
414
- 'onMaskPipeBlock': this.handleInputMaskPipeBlock,
415
- 'containerFocused': this.state.containerFocused
416
- }, otherProps);
417
- }
418
- }, {
419
- key: "getToMaskedInputProps",
420
- value: function getToMaskedInputProps() {
421
- var _this$asProps7 = this.asProps,
422
- value = _this$asProps7.value,
423
- locale = _this$asProps7.locale,
424
- onDisplayedPeriodChange = _this$asProps7.onDisplayedPeriodChange,
425
- ariaHasPopup = _this$asProps7.ariaHasPopup,
426
- _inputId = _this$asProps7.inputId,
427
- _showError = _this$asProps7.showError,
428
- otherProps = (0, _objectWithoutProperties2["default"])(_this$asProps7, _excluded5);
429
- var ariaLabel = this.asProps.getI18nText('toDate', {
430
- date: this.asProps.getI18nText('input')
431
- });
432
- return (0, _assignProps8["default"])({
433
- 'ref': this.toRef,
434
- 'date': value === null || value === void 0 ? void 0 : value[1],
435
- 'onDateChange': this.handleToChange,
436
- 'onKeyDown': this.handleToKeydown,
437
- locale: locale,
438
- 'flex': 1,
439
- onDisplayedPeriodChange: onDisplayedPeriodChange,
440
- 'aria-label': ariaLabel,
441
- 'aria-haspopup': ariaHasPopup,
442
- 'onMaskPipeBlock': this.handleInputMaskPipeBlock,
443
- 'containerFocused': this.state.containerFocused
444
- }, otherProps);
445
- }
446
- }, {
447
- key: "getRangeSepProps",
448
- value: function getRangeSepProps() {
449
- var value = this.asProps.value;
450
- return {
451
- fulfilled: !!(value && (value[0] || value[1]))
452
- };
453
- }
454
- }, {
455
- key: "componentDidUpdate",
456
- value: function componentDidUpdate(prevProps) {
457
- if (prevProps.value !== this.asProps.value) {
458
- this.updateDisabledDateInputAttempt(this.asProps.value);
459
- }
460
- }
461
- }, {
462
- key: "componentDidMount",
463
- value: function componentDidMount() {
348
+ if (typeof errorText === 'function') {
349
+ errorText = errorText(date);
350
+ }
351
+ showError = this.asProps.disabledErrorText !== null;
352
+ }
353
+ this.setState({
354
+ errorText,
355
+ showError
356
+ });
357
+ }]
358
+ };
359
+ }
360
+ getFromMaskedInputProps() {
361
+ const {
362
+ value,
363
+ locale,
364
+ onDisplayedPeriodChange,
365
+ ariaHasPopup,
366
+ showError: _showError,
367
+ ...otherProps
368
+ } = this.asProps;
369
+ return (0, _assignProps8.default)({
370
+ 'ref': this.fromRef,
371
+ 'date': value?.[0],
372
+ 'onDateChange': this.handleFromChange,
373
+ 'onKeyDown': this.handleFromKeydown,
374
+ locale,
375
+ 'flex': 1,
376
+ onDisplayedPeriodChange,
377
+ 'aria-haspopup': ariaHasPopup,
378
+ 'onMaskPipeBlock': this.handleInputMaskPipeBlock,
379
+ 'containerFocused': this.state.containerFocused
380
+ }, otherProps);
381
+ }
382
+ getToMaskedInputProps() {
383
+ const {
384
+ value,
385
+ locale,
386
+ onDisplayedPeriodChange,
387
+ ariaHasPopup,
388
+ inputId: _inputId,
389
+ showError: _showError,
390
+ ...otherProps
391
+ } = this.asProps;
392
+ const ariaLabel = this.asProps.getI18nText('toDate', {
393
+ date: this.asProps.getI18nText('input')
394
+ });
395
+ return (0, _assignProps8.default)({
396
+ 'ref': this.toRef,
397
+ 'date': value?.[1],
398
+ 'onDateChange': this.handleToChange,
399
+ 'onKeyDown': this.handleToKeydown,
400
+ locale,
401
+ 'flex': 1,
402
+ onDisplayedPeriodChange,
403
+ 'aria-label': ariaLabel,
404
+ 'aria-haspopup': ariaHasPopup,
405
+ 'onMaskPipeBlock': this.handleInputMaskPipeBlock,
406
+ 'containerFocused': this.state.containerFocused
407
+ }, otherProps);
408
+ }
409
+ getRangeSepProps() {
410
+ const {
411
+ value
412
+ } = this.asProps;
413
+ return {
414
+ fulfilled: !!(value && (value[0] || value[1]))
415
+ };
416
+ }
417
+ componentDidUpdate(prevProps) {
418
+ if (prevProps.value !== this.asProps.value) {
464
419
  this.updateDisabledDateInputAttempt(this.asProps.value);
465
420
  }
466
- }, {
467
- key: "render",
468
- value: function render() {
469
- var _ref3 = this.asProps,
470
- _ref0;
471
- var SDateRange = _inputMask["default"];
472
- var _this$asProps8 = this.asProps,
473
- Children = _this$asProps8.Children,
474
- styles = _this$asProps8.styles,
475
- w = _this$asProps8.w,
476
- state = _this$asProps8.state,
477
- showErrorProps = _this$asProps8.showError,
478
- popoverVisible = _this$asProps8.popoverVisible;
479
- var _this$state2 = this.state,
480
- errorText = _this$state2.errorText,
481
- lastChangedInput = _this$state2.lastChangedInput,
482
- showErrorState = _this$state2.showError,
483
- containerFocused = _this$state2.containerFocused;
484
- var showError = showErrorState && showErrorProps;
485
- return _ref0 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDateRange, _ref0.cn("SDateRange", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
486
- "tag": _tooltip["default"],
421
+ }
422
+ componentDidMount() {
423
+ this.updateDisabledDateInputAttempt(this.asProps.value);
424
+ }
425
+ render() {
426
+ var _ref3 = this.asProps,
427
+ _ref0;
428
+ const SDateRange = _inputMask.default;
429
+ const {
430
+ Children,
431
+ styles,
432
+ w,
433
+ state,
434
+ showError: showErrorProps,
435
+ popoverVisible
436
+ } = this.asProps;
437
+ const {
438
+ errorText,
439
+ lastChangedInput,
440
+ showError: showErrorState,
441
+ containerFocused
442
+ } = this.state;
443
+ const showError = showErrorState && showErrorProps;
444
+ return _ref0 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(SDateRange, _ref0.cn("SDateRange", {
445
+ ...(0, _core.assignProps)({
446
+ "tag": _tooltip.default,
487
447
  "ignorePortalsStacking": true,
488
448
  "placement": lastChangedInput === 'to' ? 'top-end' : 'top-start',
489
449
  "title": errorText,
@@ -494,89 +454,94 @@ var DateRangeRoot = /*#__PURE__*/function (_Component3) {
494
454
  "w": w,
495
455
  "onFocus": this.handleFocus,
496
456
  "onBlur": this.handleBlur
497
- }, _ref3))), /*#__PURE__*/_react["default"].createElement(Children, _ref0.cn("Children", {})));
498
- }
499
- }]);
500
- }(_core.Component);
501
- (0, _defineProperty2["default"])(DateRangeRoot, "displayName", 'DateRange');
502
- (0, _defineProperty2["default"])(DateRangeRoot, "style", style);
503
- (0, _defineProperty2["default"])(DateRangeRoot, "defaultProps", {
504
- children: function children() {
505
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(DateRange.Indicator, null), /*#__PURE__*/_react["default"].createElement(DateRange.FromMaskedInput, null), /*#__PURE__*/_react["default"].createElement(DateRange.RangeSep, null), /*#__PURE__*/_react["default"].createElement(DateRange.ToMaskedInput, null));
506
- },
457
+ }, _ref3)
458
+ }), /*#__PURE__*/_react.default.createElement(Children, _ref0.cn("Children", {})));
459
+ }
460
+ }
461
+ (0, _defineProperty2.default)(DateRangeRoot, "displayName", 'DateRange');
462
+ (0, _defineProperty2.default)(DateRangeRoot, "style", style);
463
+ (0, _defineProperty2.default)(DateRangeRoot, "defaultProps", {
464
+ children: () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(DateRange.Indicator, null), /*#__PURE__*/_react.default.createElement(DateRange.FromMaskedInput, null), /*#__PURE__*/_react.default.createElement(DateRange.RangeSep, null), /*#__PURE__*/_react.default.createElement(DateRange.ToMaskedInput, null)),
507
465
  defaultDisabledDateInputAttempt: false,
508
466
  showError: true
509
467
  });
510
468
  function FromMaskedInput(props) {
511
469
  var _ref4 = arguments[0],
512
470
  _ref1;
513
- var SFromMaskedInput = MaskedInput;
514
- var getI18nText = props.getI18nText;
515
- return _ref1 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SFromMaskedInput, _ref1.cn("SFromMaskedInput", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
516
- "labelPrefix": getI18nText('fromDatePlaceholder')
517
- }, _ref4))));
471
+ const SFromMaskedInput = MaskedInput;
472
+ const {
473
+ getI18nText
474
+ } = props;
475
+ return _ref1 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SFromMaskedInput, _ref1.cn("SFromMaskedInput", {
476
+ ...(0, _core.assignProps)({
477
+ "labelPrefix": getI18nText('fromDatePlaceholder')
478
+ }, _ref4)
479
+ }));
518
480
  }
519
481
  function ToMaskedInput(props) {
520
482
  var _ref5 = arguments[0],
521
483
  _ref10;
522
- var SToMaskedInput = MaskedInput;
523
- var getI18nText = props.getI18nText;
524
- return _ref10 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SToMaskedInput, _ref10.cn("SToMaskedInput", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
525
- "labelPrefix": getI18nText('toDatePlaceholder')
526
- }, _ref5))));
484
+ const SToMaskedInput = MaskedInput;
485
+ const {
486
+ getI18nText
487
+ } = props;
488
+ return _ref10 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SToMaskedInput, _ref10.cn("SToMaskedInput", {
489
+ ...(0, _core.assignProps)({
490
+ "labelPrefix": getI18nText('toDatePlaceholder')
491
+ }, _ref5)
492
+ }));
527
493
  }
528
494
  function Indicator(props) {
529
495
  var _ref6 = arguments[0],
530
496
  _ref11;
531
- var SIndicator = _inputMask["default"].Addon;
532
- return _ref11 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SIndicator, _ref11.cn("SIndicator", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
533
- "tag": _m["default"],
534
- "aria-hidden": 'true',
535
- "tabIndex": -1
536
- }, _ref6))));
497
+ const SIndicator = _inputMask.default.Addon;
498
+ return _ref11 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SIndicator, _ref11.cn("SIndicator", {
499
+ ...(0, _core.assignProps)({
500
+ "tag": _m.default,
501
+ "aria-hidden": 'true',
502
+ "tabIndex": -1
503
+ }, _ref6)
504
+ }));
537
505
  }
538
506
  function RangeSep(props) {
539
507
  var _ref7 = arguments[0],
540
508
  _ref12;
541
- var SRangeSep = _inputMask["default"].Addon;
542
- return _ref12 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SRangeSep, _ref12.cn("SRangeSep", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
543
- "tag": _flexBox.Flex,
544
- "alignItems": 'center',
545
- "justifyContent": 'center',
546
- "pl": 0,
547
- "flex": '0'
548
- }, _ref7))), "\u2013");
509
+ const SRangeSep = _inputMask.default.Addon;
510
+ return _ref12 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SRangeSep, _ref12.cn("SRangeSep", {
511
+ ...(0, _core.assignProps)({
512
+ "tag": _baseComponents.Flex,
513
+ "alignItems": 'center',
514
+ "justifyContent": 'center',
515
+ "pl": 0,
516
+ "flex": '0'
517
+ }, _ref7)
518
+ }), "\u2013");
549
519
  }
550
- function MaskedInput(_ref14) {
520
+ function MaskedInput({
521
+ date: outerValue,
522
+ onDateChange,
523
+ onDisplayedPeriodChange,
524
+ locale,
525
+ styles,
526
+ parts: allowedParts = defaultAllowedParts,
527
+ disabledDates,
528
+ forwardRef,
529
+ placeholders: providedPlaceholders,
530
+ labelPrefix = 'Date',
531
+ onMaskPipeBlock,
532
+ containerFocused,
533
+ animationsDisabled,
534
+ getI18nText,
535
+ inputId,
536
+ inputRole = 'combobox',
537
+ __excludeProps,
538
+ Root: _root,
539
+ ...otherProps
540
+ }) {
551
541
  var _ref13;
552
- var outerValue = _ref14.date,
553
- onDateChange = _ref14.onDateChange,
554
- onDisplayedPeriodChange = _ref14.onDisplayedPeriodChange,
555
- locale = _ref14.locale,
556
- styles = _ref14.styles,
557
- _ref14$parts = _ref14.parts,
558
- allowedParts = _ref14$parts === void 0 ? defaultAllowedParts : _ref14$parts,
559
- disabledDates = _ref14.disabledDates,
560
- forwardRef = _ref14.forwardRef,
561
- providedPlaceholders = _ref14.placeholders,
562
- _ref14$labelPrefix = _ref14.labelPrefix,
563
- labelPrefix = _ref14$labelPrefix === void 0 ? 'Date' : _ref14$labelPrefix,
564
- onMaskPipeBlock = _ref14.onMaskPipeBlock,
565
- containerFocused = _ref14.containerFocused,
566
- animationsDisabled = _ref14.animationsDisabled,
567
- getI18nText = _ref14.getI18nText,
568
- inputId = _ref14.inputId,
569
- _ref14$inputRole = _ref14.inputRole,
570
- inputRole = _ref14$inputRole === void 0 ? 'combobox' : _ref14$inputRole,
571
- __excludeProps = _ref14.__excludeProps,
572
- _root = _ref14.Root,
573
- otherProps = (0, _objectWithoutProperties2["default"])(_ref14, _excluded6);
574
- var ref = _react["default"].useRef();
575
- var _React$useState = _react["default"].useState(undefined),
576
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
577
- width = _React$useState2[0],
578
- setWidth = _React$useState2[1];
579
- var placeholders = _react["default"].useMemo(function () {
542
+ const ref = _react.default.useRef();
543
+ const [width, setWidth] = _react.default.useState(undefined);
544
+ const placeholders = _react.default.useMemo(() => {
580
545
  if (providedPlaceholders) return providedPlaceholders;
581
546
  return {
582
547
  year: getI18nText('placeholder-years'),
@@ -587,51 +552,43 @@ function MaskedInput(_ref14) {
587
552
  if (placeholders.year.length !== 1 || placeholders.month.length !== 1 || placeholders.day.length !== 1) {
588
553
  // eslint-disable-next-line no-console
589
554
  console.error({
590
- placeholders: placeholders
555
+ placeholders
591
556
  });
592
- throw new Error("InputTrigger placeholder prop should contain fields year, month and day each one with string value of single character length. [see above what was received] (".concat(placeholders, ")"), placeholders);
557
+ throw new Error(`InputTrigger placeholder prop should contain fields year, month and day each one with string value of single character length. [see above what was received] (${placeholders})`, placeholders);
593
558
  }
594
- var _React$useMemo = _react["default"].useMemo(function () {
595
- var options = {
596
- year: 'numeric',
597
- month: 'numeric',
598
- day: 'numeric'
599
- };
600
- var dateTimeFormat = new Intl.DateTimeFormat(locale, options);
601
- var sep = undefined;
602
- var order = [];
603
- var parts = dateTimeFormat.formatToParts(exampleDate);
604
- var _iterator = (0, _createForOfIteratorHelper2["default"])(parts),
605
- _step;
606
- try {
607
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
608
- var part = _step.value;
609
- if (!sep && part.type === 'literal') {
610
- sep = part.value;
611
- }
612
- if (order.length < 3 && ['day', 'month', 'year'].includes(part.type) && allowedParts[part.type]) {
613
- order.push(part.type);
614
- }
615
- }
616
- } catch (err) {
617
- _iterator.e(err);
618
- } finally {
619
- _iterator.f();
559
+ const {
560
+ sep,
561
+ order
562
+ } = _react.default.useMemo(() => {
563
+ const options = {
564
+ year: 'numeric',
565
+ month: 'numeric',
566
+ day: 'numeric'
567
+ };
568
+ const dateTimeFormat = new Intl.DateTimeFormat(locale, options);
569
+ let sep = undefined;
570
+ const order = [];
571
+ const parts = dateTimeFormat.formatToParts(exampleDate);
572
+ for (const part of parts) {
573
+ if (!sep && part.type === 'literal') {
574
+ sep = part.value;
620
575
  }
621
- sep = sep !== null && sep !== void 0 ? sep : ' ';
622
- return {
623
- sep: sep,
624
- order: order
625
- };
626
- }, [locale, allowedParts]),
627
- sep = _React$useMemo.sep,
628
- order = _React$useMemo.order;
629
- var outer = _react["default"].useMemo(function () {
630
- var outerDate = outerValue;
576
+ if (order.length < 3 && ['day', 'month', 'year'].includes(part.type) && allowedParts[part.type]) {
577
+ order.push(part.type);
578
+ }
579
+ }
580
+ sep = sep ?? ' ';
581
+ return {
582
+ sep,
583
+ order
584
+ };
585
+ }, [locale, allowedParts]);
586
+ const outer = _react.default.useMemo(() => {
587
+ let outerDate = outerValue;
631
588
  if (typeof outerValue === 'number' || typeof outerValue === 'string') {
632
589
  outerDate = new Date(outerValue);
633
590
  }
634
- var validDate = outerDate && outerDate instanceof Date && !Number.isNaN(outerDate.getTime());
591
+ const validDate = outerDate && outerDate instanceof Date && !Number.isNaN(outerDate.getTime());
635
592
  if (!validDate) return null;
636
593
  return {
637
594
  year: outerDate.getFullYear().toString().padStart(4, '0'),
@@ -639,89 +596,67 @@ function MaskedInput(_ref14) {
639
596
  day: outerDate.getDate().toString().padStart(2, '0')
640
597
  };
641
598
  }, [outerValue]);
642
- var stringifyValue = _react["default"].useCallback(function (value) {
599
+ const stringifyValue = _react.default.useCallback(value => {
643
600
  if (!value) return null;
644
601
  if (!value.year && !value.month && !value.day) return null;
645
- var result = [];
646
- var _iterator2 = (0, _createForOfIteratorHelper2["default"])(order),
647
- _step2;
648
- try {
649
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
650
- var part = _step2.value;
651
- if (!allowedParts[part]) continue;
652
- if (part === 'year' && value.year) result.push(value.year);
653
- if (part === 'month' && value.month) result.push(value.month);
654
- if (part === 'day' && value.day) result.push(value.day);
655
- }
656
- } catch (err) {
657
- _iterator2.e(err);
658
- } finally {
659
- _iterator2.f();
602
+ const result = [];
603
+ for (const part of order) {
604
+ if (!allowedParts[part]) continue;
605
+ if (part === 'year' && value.year) result.push(value.year);
606
+ if (part === 'month' && value.month) result.push(value.month);
607
+ if (part === 'day' && value.day) result.push(value.day);
660
608
  }
661
609
  return result.join(sep);
662
610
  }, [order, allowedParts]);
663
- var _React$useState3 = _react["default"].useState(outer),
664
- _React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
665
- internalValue = _React$useState4[0],
666
- setInternalValue = _React$useState4[1];
667
- var value = _react["default"].useMemo(function () {
668
- return stringifyValue(internalValue);
669
- }, [stringifyValue, internalValue]);
670
- var lastKnownOuterValue = _react["default"].useRef(outer);
671
- _react["default"].useEffect(function () {
672
- var _lastKnownOuterValue$, _lastKnownOuterValue$2, _lastKnownOuterValue$3;
673
- if (((_lastKnownOuterValue$ = lastKnownOuterValue.current) === null || _lastKnownOuterValue$ === void 0 ? void 0 : _lastKnownOuterValue$.day) !== (outer === null || outer === void 0 ? void 0 : outer.day) || ((_lastKnownOuterValue$2 = lastKnownOuterValue.current) === null || _lastKnownOuterValue$2 === void 0 ? void 0 : _lastKnownOuterValue$2.month) !== (outer === null || outer === void 0 ? void 0 : outer.month) || ((_lastKnownOuterValue$3 = lastKnownOuterValue.current) === null || _lastKnownOuterValue$3 === void 0 ? void 0 : _lastKnownOuterValue$3.year) !== (outer === null || outer === void 0 ? void 0 : outer.year)) {
611
+ const [internalValue, setInternalValue] = _react.default.useState(outer);
612
+ const value = _react.default.useMemo(() => stringifyValue(internalValue), [stringifyValue, internalValue]);
613
+ const lastKnownOuterValue = _react.default.useRef(outer);
614
+ _react.default.useEffect(() => {
615
+ if (lastKnownOuterValue.current?.day !== outer?.day || lastKnownOuterValue.current?.month !== outer?.month || lastKnownOuterValue.current?.year !== outer?.year) {
674
616
  setInternalValue(outer);
675
617
  }
676
618
  lastKnownOuterValue.current = outer;
677
619
  }, [outer, setInternalValue]);
678
- var pipeMask = _react["default"].useCallback(function (value) {
679
- var placeholdersOnly = true;
680
- for (var i = 0; i < value.length; i++) {
620
+ const pipeMask = _react.default.useCallback(value => {
621
+ let placeholdersOnly = true;
622
+ for (let i = 0; i < value.length; i++) {
681
623
  if (value[i] !== '_' && value[i] !== sep) {
682
624
  placeholdersOnly = false;
683
625
  break;
684
626
  }
685
627
  }
686
628
  if (placeholdersOnly) {
687
- onMaskPipeBlock === null || onMaskPipeBlock === void 0 || onMaskPipeBlock(null);
629
+ onMaskPipeBlock?.(null);
688
630
  return '';
689
631
  }
690
- var getOffsetTo = function getOffsetTo(partName) {
691
- var partsBefore = order.slice(0, order.indexOf(partName));
692
- var offset = 0;
693
- var _iterator3 = (0, _createForOfIteratorHelper2["default"])(partsBefore),
694
- _step3;
695
- try {
696
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
697
- var part = _step3.value;
698
- if (part === 'year' && allowedParts.year) offset += 4;
699
- if (part === 'month' && allowedParts.month) offset += 2;
700
- if (part === 'day' && allowedParts.day) offset += 2;
701
- }
702
- } catch (err) {
703
- _iterator3.e(err);
704
- } finally {
705
- _iterator3.f();
632
+ const getOffsetTo = partName => {
633
+ const partsBefore = order.slice(0, order.indexOf(partName));
634
+ let offset = 0;
635
+ for (const part of partsBefore) {
636
+ if (part === 'year' && allowedParts.year) offset += 4;
637
+ if (part === 'month' && allowedParts.month) offset += 2;
638
+ if (part === 'day' && allowedParts.day) offset += 2;
706
639
  }
707
640
  offset += partsBefore.length * sep.length;
708
641
  return offset;
709
642
  };
710
- var indexesOfPipedChars = [];
711
- var parsed = {};
712
- var parts = value.split(sep);
713
- for (var partName in placeholders) {
643
+ const indexesOfPipedChars = [];
644
+ const parsed = {};
645
+ const parts = value.split(sep);
646
+ for (const partName in placeholders) {
714
647
  parsed[partName] = placeholders[partName];
715
648
  }
716
- for (var _i = 0; _i < order.length; _i++) {
717
- parsed[order[_i]] = parts[_i];
649
+ for (let i = 0; i < order.length; i++) {
650
+ parsed[order[i]] = parts[i];
718
651
  }
719
- var year = parsed.year,
720
- month = parsed.month,
721
- day = parsed.day;
652
+ let {
653
+ year,
654
+ month,
655
+ day
656
+ } = parsed;
722
657
  if (allowedParts.month) {
723
658
  if (month[0] !== '_' && Number.parseInt(month[0], 10) > 1) {
724
- month = "0".concat(month[0]);
659
+ month = `0${month[0]}`;
725
660
  indexesOfPipedChars.push(getOffsetTo('month'));
726
661
  }
727
662
  if (month === '00') month = '01';
@@ -729,95 +664,82 @@ function MaskedInput(_ref14) {
729
664
  }
730
665
  if (allowedParts.day) {
731
666
  if (day[0] !== '_' && Number.parseInt(day[0], 10) > 3) {
732
- day = "0".concat(day[0]);
667
+ day = `0${day[0]}`;
733
668
  indexesOfPipedChars.push(getOffsetTo('day'));
734
669
  }
735
670
  if (day === '00') day = '01';
736
671
  if (day[0] !== '_' && day[1] !== '_' && Number.parseInt(day, 10) > 31) return false;
737
672
  }
738
- year = year.split('').map(function (_char) {
739
- return _char === '_' ? placeholders.year : _char;
740
- }).join('');
741
- month = month.split('').map(function (_char2) {
742
- return _char2 === '_' ? placeholders.month : _char2;
743
- }).join('');
744
- day = day.split('').map(function (_char3) {
745
- return _char3 === '_' ? placeholders.day : _char3;
746
- }).join('');
747
- var yearFulfilled = !allowedParts.year || year && year.length >= 4 && !year.includes(placeholders.year);
748
- var monthFulfilled = !allowedParts.month || month && month.length === 2 && !month.includes(placeholders.month);
749
- var dayFulfilled = !allowedParts.day || day && day.length === 2 && !day.includes(placeholders.day);
750
- var fulfilled = yearFulfilled && monthFulfilled && dayFulfilled;
673
+ year = year.split('').map(char => char === '_' ? placeholders.year : char).join('');
674
+ month = month.split('').map(char => char === '_' ? placeholders.month : char).join('');
675
+ day = day.split('').map(char => char === '_' ? placeholders.day : char).join('');
676
+ const yearFulfilled = !allowedParts.year || year && year.length >= 4 && !year.includes(placeholders.year);
677
+ const monthFulfilled = !allowedParts.month || month && month.length === 2 && !month.includes(placeholders.month);
678
+ const dayFulfilled = !allowedParts.day || day && day.length === 2 && !day.includes(placeholders.day);
679
+ const fulfilled = yearFulfilled && monthFulfilled && dayFulfilled;
751
680
  if (fulfilled) {
752
- var date = new Date(0, 0, 0, 0, 0, 0, 0);
753
- var yearParsed = allowedParts.year ? Number.parseInt(year, 10) : 0;
754
- var monthParsed = allowedParts.month ? Number.parseInt(month, 10) - 1 : 0;
755
- var dayParsed = allowedParts.day ? Number.parseInt(day, 10) : 1;
681
+ const date = new Date(0, 0, 0, 0, 0, 0, 0);
682
+ const yearParsed = allowedParts.year ? Number.parseInt(year, 10) : 0;
683
+ const monthParsed = allowedParts.month ? Number.parseInt(month, 10) - 1 : 0;
684
+ const dayParsed = allowedParts.day ? Number.parseInt(day, 10) : 1;
756
685
  date.setFullYear(yearParsed, monthParsed, dayParsed);
757
- if (disabledDates !== null && disabledDates !== void 0 && disabledDates.some((0, _includesDate.includesDate)((0, _dayjs["default"])(date), 'date'))) {
758
- onMaskPipeBlock === null || onMaskPipeBlock === void 0 || onMaskPipeBlock(date);
686
+ if (disabledDates?.some((0, _includesDate.includesDate)((0, _dayjs.default)(date), 'date'))) {
687
+ onMaskPipeBlock?.(date);
759
688
  return false;
760
689
  }
761
690
  if (allowedParts.day) {
762
691
  if (date.getDate() !== Number.parseInt(day, 10)) {
763
- onMaskPipeBlock === null || onMaskPipeBlock === void 0 || onMaskPipeBlock(date);
692
+ onMaskPipeBlock?.(date);
764
693
  return false;
765
694
  }
766
695
  }
767
696
  }
768
- var result = [];
769
- var _iterator4 = (0, _createForOfIteratorHelper2["default"])(order),
770
- _step4;
771
- try {
772
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
773
- var part = _step4.value;
774
- if (part === 'year') result.push(year);
775
- if (part === 'month') result.push(month);
776
- if (part === 'day') result.push(day);
777
- }
778
- } catch (err) {
779
- _iterator4.e(err);
780
- } finally {
781
- _iterator4.f();
697
+ const result = [];
698
+ for (const part of order) {
699
+ if (part === 'year') result.push(year);
700
+ if (part === 'month') result.push(month);
701
+ if (part === 'day') result.push(day);
782
702
  }
783
- onMaskPipeBlock === null || onMaskPipeBlock === void 0 || onMaskPipeBlock(null);
703
+ onMaskPipeBlock?.(null);
784
704
  return {
785
705
  value: result.join(sep),
786
- indexesOfPipedChars: indexesOfPipedChars
706
+ indexesOfPipedChars
787
707
  };
788
708
  }, [placeholders, sep, order, allowedParts, disabledDates, onMaskPipeBlock]);
789
- var handleChange = _react["default"].useCallback(function (value) {
790
- var parsed = {};
791
- for (var partName in placeholders) {
709
+ const handleChange = _react.default.useCallback(value => {
710
+ const parsed = {};
711
+ for (const partName in placeholders) {
792
712
  parsed[partName] = placeholders[partName];
793
713
  }
794
- var parts = value.split(sep);
795
- for (var i = 0; i < order.length; i++) {
714
+ const parts = value.split(sep);
715
+ for (let i = 0; i < order.length; i++) {
796
716
  parsed[order[i]] = parts[i];
797
717
  }
798
- var year = parsed.year,
799
- month = parsed.month,
800
- day = parsed.day;
718
+ const {
719
+ year,
720
+ month,
721
+ day
722
+ } = parsed;
801
723
  setInternalValue({
802
- year: year,
803
- month: month,
804
- day: day
724
+ year,
725
+ month,
726
+ day
805
727
  });
806
- var yearFulfilled = !allowedParts.year || year && year.length >= 4 && !year.includes(placeholders.year);
807
- var monthFulfilled = !allowedParts.month || month && month.length === 2 && !month.includes(placeholders.month);
808
- var dayFulfilled = !allowedParts.day || day && day.length === 2 && !day.includes(placeholders.day);
809
- var fulfilled = yearFulfilled && monthFulfilled && dayFulfilled;
728
+ const yearFulfilled = !allowedParts.year || year && year.length >= 4 && !year.includes(placeholders.year);
729
+ const monthFulfilled = !allowedParts.month || month && month.length === 2 && !month.includes(placeholders.month);
730
+ const dayFulfilled = !allowedParts.day || day && day.length === 2 && !day.includes(placeholders.day);
731
+ const fulfilled = yearFulfilled && monthFulfilled && dayFulfilled;
810
732
  if (fulfilled) {
811
- var date = new Date(0, 0, 0, 0, 0, 0, 0);
812
- var yearParsed = allowedParts.year ? Number.parseInt(year, 10) : 0;
813
- var monthParsed = allowedParts.month ? Number.parseInt(month, 10) - 1 : 0;
814
- var dayParsed = allowedParts.day ? Number.parseInt(day, 10) : 1;
733
+ const date = new Date(0, 0, 0, 0, 0, 0, 0);
734
+ const yearParsed = allowedParts.year ? Number.parseInt(year, 10) : 0;
735
+ const monthParsed = allowedParts.month ? Number.parseInt(month, 10) - 1 : 0;
736
+ const dayParsed = allowedParts.day ? Number.parseInt(day, 10) : 1;
815
737
  date.setFullYear(yearParsed, monthParsed, dayParsed);
816
738
  onDateChange(date);
817
739
  lastKnownOuterValue.current = {
818
- year: year,
819
- month: month,
820
- day: day
740
+ year,
741
+ month,
742
+ day
821
743
  };
822
744
  return;
823
745
  }
@@ -826,44 +748,40 @@ function MaskedInput(_ref14) {
826
748
  lastKnownOuterValue.current = null;
827
749
  }
828
750
  if (yearFulfilled && allowedParts.year) {
829
- var _date = new Date(0, 0, 0, 0, 0, 0, 0);
830
- _date.setFullYear(Number.parseInt(year, 10));
751
+ const date = new Date(0, 0, 0, 0, 0, 0, 0);
752
+ date.setFullYear(Number.parseInt(year, 10));
831
753
  if (monthFulfilled && allowedParts.month) {
832
- _date.setMonth(Number.parseInt(month, 10) - 1);
754
+ date.setMonth(Number.parseInt(month, 10) - 1);
833
755
  }
834
- onDisplayedPeriodChange(_date);
756
+ onDisplayedPeriodChange(date);
835
757
  }
836
758
  }, [onDateChange, setInternalValue, placeholders, onDisplayedPeriodChange, order, allowedParts]);
837
- var mask = _react["default"].useMemo(function () {
838
- var result = [];
839
- var _iterator5 = (0, _createForOfIteratorHelper2["default"])(order),
840
- _step5;
841
- try {
842
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
843
- var part = _step5.value;
844
- if (part === 'year') result.push(placeholders.year + placeholders.year + placeholders.year + placeholders.year);
845
- if (part === 'month') result.push(placeholders.month + placeholders.month);
846
- if (part === 'day') result.push(placeholders.day + placeholders.day);
847
- }
848
- } catch (err) {
849
- _iterator5.e(err);
850
- } finally {
851
- _iterator5.f();
759
+ const mask = _react.default.useMemo(() => {
760
+ const result = [];
761
+ for (const part of order) {
762
+ if (part === 'year') result.push(placeholders.year + placeholders.year + placeholders.year + placeholders.year);
763
+ if (part === 'month') result.push(placeholders.month + placeholders.month);
764
+ if (part === 'day') result.push(placeholders.day + placeholders.day);
852
765
  }
853
766
  return result.join(sep);
854
767
  }, [sep, order, placeholders]);
855
- var aliases = _react["default"].useMemo(function () {
856
- return (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, placeholders.year, /\d/), placeholders.month, /\d/), placeholders.day, /\d/);
857
- }, [placeholders]);
858
- var maskOnlySymbols = _react["default"].useMemo(function () {
859
- return (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, placeholders.year, true), placeholders.month, true), placeholders.day, true), sep, true);
860
- }, [sep, placeholders]);
861
- var humanizedDate = _react["default"].useMemo(function () {
862
- var outerDate = outerValue;
768
+ const aliases = _react.default.useMemo(() => ({
769
+ [placeholders.year]: /\d/,
770
+ [placeholders.month]: /\d/,
771
+ [placeholders.day]: /\d/
772
+ }), [placeholders]);
773
+ const maskOnlySymbols = _react.default.useMemo(() => ({
774
+ [placeholders.year]: true,
775
+ [placeholders.month]: true,
776
+ [placeholders.day]: true,
777
+ [sep]: true
778
+ }), [sep, placeholders]);
779
+ const humanizedDate = _react.default.useMemo(() => {
780
+ let outerDate = outerValue;
863
781
  if (typeof outerValue === 'number' || typeof outerValue === 'string') {
864
782
  outerDate = new Date(outerValue);
865
783
  }
866
- var validDate = outerDate && outerDate instanceof Date && !Number.isNaN(outerDate.getTime());
784
+ const validDate = outerDate && outerDate instanceof Date && !Number.isNaN(outerDate.getTime());
867
785
  if (!validDate) return null;
868
786
  return new Intl.DateTimeFormat(locale, {
869
787
  year: allowedParts.year ? 'numeric' : undefined,
@@ -871,59 +789,49 @@ function MaskedInput(_ref14) {
871
789
  day: allowedParts.day ? 'numeric' : undefined
872
790
  }).format(outerDate);
873
791
  }, [outerValue, locale, allowedParts]);
874
- (0, _useEnhancedEffect["default"])(function () {
792
+ (0, _useEnhancedEffect.default)(() => {
875
793
  if (!ref.current) return;
876
- var stringsToMeasure = humanizedDate ? [humanizedDate, mask] : [mask];
877
- var widths = [];
878
- var measureSpan = document.createElement('span');
879
- var computedStyle = window.getComputedStyle(ref.current);
880
- var typographyRelatedStyles = ['height', 'font-size', 'font-family', 'font-weight', 'font-style', 'line-height', 'letter-spacing', 'text-transform', 'word-spacing'];
881
- for (var _i2 = 0, _typographyRelatedSty = typographyRelatedStyles; _i2 < _typographyRelatedSty.length; _i2++) {
882
- var _style2 = _typographyRelatedSty[_i2];
883
- measureSpan.style[_style2] = computedStyle[_style2];
794
+ const stringsToMeasure = humanizedDate ? [humanizedDate, mask] : [mask];
795
+ const widths = [];
796
+ const measureSpan = document.createElement('span');
797
+ const computedStyle = window.getComputedStyle(ref.current);
798
+ const typographyRelatedStyles = ['height', 'font-size', 'font-family', 'font-weight', 'font-style', 'line-height', 'letter-spacing', 'text-transform', 'word-spacing'];
799
+ for (const style of typographyRelatedStyles) {
800
+ measureSpan.style[style] = computedStyle[style];
884
801
  }
885
802
  measureSpan.style.position = 'absolute';
886
803
  measureSpan.style.visibility = 'hidden';
887
804
  document.body.appendChild(measureSpan);
888
- for (var _i3 = 0, _stringsToMeasure = stringsToMeasure; _i3 < _stringsToMeasure.length; _i3++) {
889
- var string = _stringsToMeasure[_i3];
805
+ for (const string of stringsToMeasure) {
890
806
  measureSpan.innerHTML = string;
891
807
  widths.push(measureSpan.offsetWidth);
892
808
  }
893
809
  measureSpan.remove();
894
- var maxWidth = Math.max.apply(Math, widths);
810
+ const maxWidth = Math.max(...widths);
895
811
  setWidth(maxWidth);
896
812
  }, [locale, humanizedDate, allowedParts, mask]);
897
- var SHumanizedDate = 'div';
898
- var handleInputRef = _react["default"].useCallback(function (node) {
813
+ const SHumanizedDate = 'div';
814
+ const handleInputRef = _react.default.useCallback(node => {
899
815
  ref.current = node;
900
816
  if (!node || node.tagName !== 'INPUT') return;
901
817
  if (typeof forwardRef === 'function') forwardRef(node);else forwardRef.current = node;
902
818
  }, [forwardRef]);
903
- var _React$useState5 = _react["default"].useState(width),
904
- _React$useState6 = (0, _slicedToArray2["default"])(_React$useState5, 2),
905
- appliedWidth = _React$useState6[0],
906
- setAppliedWidth = _React$useState6[1];
907
- var _React$useState7 = _react["default"].useState(false),
908
- _React$useState8 = (0, _slicedToArray2["default"])(_React$useState7, 2),
909
- innerFocused = _React$useState8[0],
910
- setInnerFocused = _React$useState8[1];
911
- var focused = containerFocused !== null && containerFocused !== void 0 ? containerFocused : innerFocused;
912
- var handleFocus = _react["default"].useCallback(function (event) {
913
- var _otherProps$onFocus;
914
- (_otherProps$onFocus = otherProps.onFocus) === null || _otherProps$onFocus === void 0 || _otherProps$onFocus.call(otherProps, event);
819
+ const [appliedWidth, setAppliedWidth] = _react.default.useState(width);
820
+ const [innerFocused, setInnerFocused] = _react.default.useState(false);
821
+ const focused = containerFocused ?? innerFocused;
822
+ const handleFocus = _react.default.useCallback(event => {
823
+ otherProps.onFocus?.(event);
915
824
  setInnerFocused(true);
916
825
  }, []);
917
- var handleBlur = _react["default"].useCallback(function (event) {
918
- var _otherProps$onBlur;
919
- (_otherProps$onBlur = otherProps.onBlur) === null || _otherProps$onBlur === void 0 || _otherProps$onBlur.call(otherProps, event);
826
+ const handleBlur = _react.default.useCallback(event => {
827
+ otherProps.onBlur?.(event);
920
828
  setInnerFocused(false);
921
829
  }, []);
922
- (0, _useEnhancedEffect["default"])(function () {
830
+ (0, _useEnhancedEffect.default)(() => {
923
831
  if (focused) return;
924
832
  setAppliedWidth(width);
925
833
  }, [width, focused]);
926
- return _ref13 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(_inputMask["default"].Value, (0, _extends2["default"])({
834
+ return _ref13 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(_inputMask.default.Value, (0, _extends2.default)({
927
835
  "aria-label": labelPrefix,
928
836
  title: mask,
929
837
  mask: mask,
@@ -939,28 +847,28 @@ function MaskedInput(_ref14) {
939
847
  focused: focused,
940
848
  ref: handleInputRef,
941
849
  pipe: pipeMask,
942
- value: value !== null && value !== void 0 ? value : '',
850
+ value: value ?? '',
943
851
  onChange: handleChange,
944
852
  noHumanizedDate: !humanizedDate,
945
853
  animationsDisabled: animationsDisabled,
946
854
  inputRole: inputRole,
947
855
  inputMode: "numeric"
948
- }), humanizedDate && /*#__PURE__*/_react["default"].createElement(SHumanizedDate, _ref13.cn("SHumanizedDate", {}), humanizedDate));
856
+ }), humanizedDate && /*#__PURE__*/_react.default.createElement(SHumanizedDate, _ref13.cn("SHumanizedDate", {}), humanizedDate));
949
857
  }
950
- var SingleDateInput = (0, _core.createComponent)(SingleDateInputRoot, {
951
- Indicator: Indicator,
952
- MaskedInput: MaskedInput
858
+ const SingleDateInput = (0, _core.createComponent)(SingleDateInputRoot, {
859
+ Indicator,
860
+ MaskedInput
953
861
  });
954
- var DateRange = (0, _core.createComponent)(DateRangeRoot, {
955
- Indicator: Indicator,
956
- RangeSep: RangeSep,
957
- FromMaskedInput: FromMaskedInput,
958
- ToMaskedInput: ToMaskedInput
862
+ const DateRange = (0, _core.createComponent)(DateRangeRoot, {
863
+ Indicator,
864
+ RangeSep,
865
+ FromMaskedInput,
866
+ ToMaskedInput
959
867
  });
960
- var InputTrigger = (0, _core.createComponent)(InputTriggerRoot, {
961
- Addon: _baseTrigger["default"].Addon,
962
- SingleDateInput: SingleDateInput,
963
- DateRange: DateRange
868
+ const InputTrigger = (0, _core.createComponent)(InputTriggerRoot, {
869
+ Addon: _baseTrigger.default.Addon,
870
+ SingleDateInput,
871
+ DateRange
964
872
  });
965
- var _default = exports["default"] = InputTrigger;
873
+ var _default = exports.default = InputTrigger;
966
874
  //# sourceMappingURL=InputTrigger.js.map