linear-react-components-ui 1.1.24-beta.7 → 1.1.24-rc.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.
Files changed (186) hide show
  1. package/lib/alerts/AlertProvider.js +1 -2
  2. package/lib/alerts/BaseAlert.js +1 -1
  3. package/lib/alerts/Message.js +2 -3
  4. package/lib/alerts/withAlert.js +1 -2
  5. package/lib/avatar/index.js +9 -11
  6. package/lib/badge/index.js +4 -4
  7. package/lib/buttons/Button.js +1 -2
  8. package/lib/buttons/DangerButton.js +1 -1
  9. package/lib/buttons/DefaultButton.js +5 -14
  10. package/lib/buttons/InfoButton.js +1 -1
  11. package/lib/buttons/PrimaryButton.js +1 -1
  12. package/lib/buttons/SuccessButton.js +1 -1
  13. package/lib/buttons/WarningButton.js +1 -1
  14. package/lib/buttons/button_container/index.js +1 -1
  15. package/lib/buttons/split_button/index.js +2 -2
  16. package/lib/calendar/base/Day.js +2 -3
  17. package/lib/calendar/base/Month.js +1 -1
  18. package/lib/calendar/base/helpers.js +2 -2
  19. package/lib/calendar/base/index.js +8 -7
  20. package/lib/checkbox/index.js +2 -3
  21. package/lib/dialog/Custom.js +2 -3
  22. package/lib/dialog/Question.js +5 -4
  23. package/lib/dialog/base/Content.js +2 -3
  24. package/lib/dialog/base/Header.js +3 -4
  25. package/lib/dialog/base/index.js +10 -9
  26. package/lib/dialog/form/index.js +6 -6
  27. package/lib/dialog/wizard/index.js +1 -2
  28. package/lib/dialog/wizard/progressbar.js +1 -1
  29. package/lib/dialog/wizard/step.js +1 -1
  30. package/lib/dialog/wizard/useWizard.js +1 -2
  31. package/lib/drawer/Content.js +1 -2
  32. package/lib/drawer/Drawer.js +5 -6
  33. package/lib/drawer/Header.js +2 -3
  34. package/lib/dropdown/Popup.js +7 -7
  35. package/lib/dropdown/helper.js +1 -1
  36. package/lib/dropdown/withDropdown.js +3 -4
  37. package/lib/fieldset/index.js +8 -9
  38. package/lib/form/Field.js +2 -3
  39. package/lib/form/FieldArray.js +2 -3
  40. package/lib/form/FieldNumber.js +4 -5
  41. package/lib/form/FieldPeriod.js +3 -4
  42. package/lib/form/index.js +3 -4
  43. package/lib/form/withFieldHOC.js +1 -2
  44. package/lib/form/withFormSecurity.js +1 -2
  45. package/lib/form2/helpers.js +1 -1
  46. package/lib/form2/index.d.ts +1 -1
  47. package/lib/form2/useForm/index.js +17 -11
  48. package/lib/gridlayout/GridCol.js +5 -5
  49. package/lib/gridlayout/GridRow.js +1 -4
  50. package/lib/hint/index.js +1 -7
  51. package/lib/icons/index.js +9 -9
  52. package/lib/index-11944b1a.d.ts +26 -0
  53. package/lib/index-789dd9a5.d.ts +41 -0
  54. package/lib/index-7ad68789.d.ts +15 -0
  55. package/lib/inputs/base/InputTextBase.js +9 -8
  56. package/lib/inputs/base/helpers.js +3 -7
  57. package/lib/inputs/color/index.js +1 -2
  58. package/lib/inputs/date/Dropdown.js +6 -4
  59. package/lib/inputs/date/index.js +31 -19
  60. package/lib/inputs/errorMessage/index.js +2 -3
  61. package/lib/inputs/file/DefaultFile.js +7 -7
  62. package/lib/inputs/file/DragDropFile.js +18 -17
  63. package/lib/inputs/file/File.js +5 -5
  64. package/lib/inputs/inputHOC.js +1 -2
  65. package/lib/inputs/mask/BaseMask.js +1 -2
  66. package/lib/inputs/mask/Cnpj.js +1 -2
  67. package/lib/inputs/mask/Cpf.js +1 -2
  68. package/lib/inputs/multiSelect/ActionButtons.js +1 -2
  69. package/lib/inputs/multiSelect/Dropdown.js +11 -11
  70. package/lib/inputs/multiSelect/helper.js +2 -1
  71. package/lib/inputs/multiSelect/index.js +10 -9
  72. package/lib/inputs/number/BaseNumber.js +1 -1
  73. package/lib/inputs/number/index.js +3 -3
  74. package/lib/inputs/period/Dropdown.js +7 -4
  75. package/lib/inputs/period/PeriodList.js +1 -1
  76. package/lib/inputs/period/helper.js +1 -3
  77. package/lib/inputs/period/index.js +56 -32
  78. package/lib/inputs/search/index.js +2 -3
  79. package/lib/inputs/select/ActionButtons.js +1 -1
  80. package/lib/inputs/select/Dropdown.js +3 -4
  81. package/lib/inputs/select/helper.js +13 -10
  82. package/lib/inputs/select/multiple/Selecteds.js +2 -2
  83. package/lib/inputs/select/multiple/index.js +14 -11
  84. package/lib/inputs/select/simple/index.js +19 -13
  85. package/lib/inputs/textarea/index.js +1 -1
  86. package/lib/inputs2/checkboxfield/index.d.ts +1 -1
  87. package/lib/inputs2/checkboxfield/index.js +15 -15
  88. package/lib/inputs2/colorfield/index.js +5 -5
  89. package/lib/inputs2/date/base/constants.js +2 -1
  90. package/lib/inputs2/date/base/index.js +5 -6
  91. package/lib/inputs2/date/datefield/calendarbox.d.ts +1 -1
  92. package/lib/inputs2/date/datefield/calendarbox.js +3 -2
  93. package/lib/inputs2/date/datefield/index.js +37 -28
  94. package/lib/inputs2/date/datefield/triggers.js +1 -2
  95. package/lib/inputs2/date/dateperiodfield/calendarbox.d.ts +1 -1
  96. package/lib/inputs2/date/dateperiodfield/calendarbox.js +8 -6
  97. package/lib/inputs2/date/dateperiodfield/index.js +61 -44
  98. package/lib/inputs2/date/dateperiodfield/triggers.js +19 -14
  99. package/lib/inputs2/filefield/index.js +33 -27
  100. package/lib/inputs2/index.d.ts +3 -3
  101. package/lib/inputs2/index.js +1 -2
  102. package/lib/inputs2/mask/BaseMask.js +7 -7
  103. package/lib/inputs2/mask/Cnpj.js +4 -5
  104. package/lib/inputs2/mask/Cpf.js +4 -5
  105. package/lib/inputs2/mask/Phone.js +1 -2
  106. package/lib/inputs2/mask/ZipCode.js +1 -2
  107. package/lib/inputs2/numberfield/currency.js +6 -6
  108. package/lib/inputs2/numberfield/decimal.js +6 -6
  109. package/lib/inputs2/numberfield/index.js +6 -6
  110. package/lib/inputs2/radiofield/index.d.ts +1 -1
  111. package/lib/inputs2/radiofield/index.js +14 -13
  112. package/lib/inputs2/selectfield/index.d.ts +1 -1
  113. package/lib/inputs2/selectfield/index.js +71 -54
  114. package/lib/inputs2/selectfield/item.d.ts +1 -1
  115. package/lib/inputs2/selectfield/item.js +4 -4
  116. package/lib/inputs2/selectfield/listbox.d.ts +1 -1
  117. package/lib/inputs2/selectfield/listbox.js +7 -4
  118. package/lib/inputs2/selectfield/options.d.ts +1 -1
  119. package/lib/inputs2/selectfield/search.d.ts +1 -1
  120. package/lib/inputs2/selectfield/search.js +3 -4
  121. package/lib/inputs2/selectfield/selections.d.ts +1 -1
  122. package/lib/inputs2/selectfield/selections.js +3 -2
  123. package/lib/inputs2/selectfield/triggers.js +6 -5
  124. package/lib/inputs2/slot/index.d.ts +2 -2
  125. package/lib/inputs2/textareafield/index.js +21 -18
  126. package/lib/inputs2/textfield/index.js +15 -14
  127. package/lib/labelMessages/index.js +4 -6
  128. package/lib/labels/DefaultLabel.js +2 -6
  129. package/lib/labels/label_container/index.js +1 -1
  130. package/lib/list/Header.js +1 -1
  131. package/lib/list/Item.js +10 -12
  132. package/lib/list/index.js +2 -4
  133. package/lib/menus/float/MenuItem.js +3 -4
  134. package/lib/menus/float/SubMenuContainer.js +2 -3
  135. package/lib/menus/float/index.js +1 -1
  136. package/lib/menus/sidenav/ExpandMenu.js +1 -1
  137. package/lib/menus/sidenav/MenuLink.js +1 -2
  138. package/lib/menus/sidenav/NavMenuGroup.js +2 -3
  139. package/lib/menus/sidenav/NavMenuItem.js +10 -9
  140. package/lib/menus/sidenav/NavSubMenuItem.js +2 -3
  141. package/lib/menus/sidenav/helpers.js +1 -1
  142. package/lib/menus/sidenav/index.js +6 -7
  143. package/lib/menus/sidenav/popup_menu_search/index.js +1 -2
  144. package/lib/panel/Content.js +9 -8
  145. package/lib/panel/Default.js +3 -4
  146. package/lib/panel/Header.js +4 -5
  147. package/lib/permissionValidations.js +1 -1
  148. package/lib/popover/PopoverText.js +1 -2
  149. package/lib/popover/index.js +1 -1
  150. package/lib/progress/Bar.js +6 -6
  151. package/lib/radio/index.js +3 -4
  152. package/lib/shortcuts/index.js +1 -1
  153. package/lib/skeleton/SkeletonContainer.js +1 -2
  154. package/lib/skeleton/index.js +1 -4
  155. package/lib/spinner/index.js +3 -4
  156. package/lib/split/Split.js +2 -3
  157. package/lib/split/SplitSide.js +4 -5
  158. package/lib/table/Body.js +4 -5
  159. package/lib/table/Header.js +9 -7
  160. package/lib/table/HeaderColumn.js +2 -3
  161. package/lib/table/Row.js +4 -5
  162. package/lib/table/RowColumn.js +2 -3
  163. package/lib/table/index.js +2 -8
  164. package/lib/tabs/DropdownTabs.js +2 -3
  165. package/lib/tabs/Menu.js +1 -1
  166. package/lib/tabs/MenuTabs.js +4 -9
  167. package/lib/tabs/Panel.js +8 -7
  168. package/lib/tabs/context.js +7 -5
  169. package/lib/tabs/index.js +1 -2
  170. package/lib/textContent/index.js +2 -3
  171. package/lib/toolbar/ButtonBar.js +2 -3
  172. package/lib/toolbar/LabelBar.js +1 -2
  173. package/lib/toolbar/index.js +1 -1
  174. package/lib/tooltip/TooltipContent.js +8 -9
  175. package/lib/tooltip/useTooltip.js +8 -8
  176. package/lib/treetable/Body.js +2 -3
  177. package/lib/treetable/Header.js +3 -4
  178. package/lib/treetable/Row.js +9 -10
  179. package/lib/treeview/Header.js +1 -1
  180. package/lib/treeview/Node.js +5 -6
  181. package/lib/treeview/index.js +5 -6
  182. package/lib/uitour/index.js +9 -8
  183. package/package.json +1 -1
  184. package/lib/index-19761a50.d.ts +0 -26
  185. package/lib/index-35ba9ed8.d.ts +0 -15
  186. package/lib/index-efe0a0e4.d.ts +0 -41
@@ -14,14 +14,14 @@ var _popover = _interopRequireWildcard(require("../../popover"));
14
14
  var _tooltip = require("../../tooltip");
15
15
  var _permissionValidations = require("../../permissionValidations");
16
16
  const _excluded = ["name", "label", "errors", "onChange", "size", "onDeniedActions", "permissionAttr", "variant", "customClass", "customClassLabel", "customClassWrapper", "labelUppercase", "rounded", "customClassInputContainer", "skeletonize", "hintPosition", "gridLayout", "themePopover", "popoverAlign", "tooltip", "tooltipPosition", "tooltipWidth"];
17
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
19
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
19
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
21
20
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
22
21
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
23
22
  const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
24
23
  const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
24
+ var _props$checked, _props$hint;
25
25
  const {
26
26
  name,
27
27
  label,
@@ -54,14 +54,14 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
54
54
  hideContent,
55
55
  unvisible
56
56
  } = onDenied;
57
- const inputId = _react.default.useMemo(() => props.id || `checkboxfield-${name}`, [props.id, name]);
57
+ const inputId = _react.default.useMemo(() => props.id || "checkboxfield-".concat(name), [props.id, name]);
58
58
  const inputRootRef = _react.default.useRef(null);
59
- const isChecked = props.checked ?? Boolean(props.value);
60
- const hasLabel = !_lodash.default.isEmpty(props?.label);
59
+ const isChecked = (_props$checked = props.checked) !== null && _props$checked !== void 0 ? _props$checked : Boolean(props.value);
60
+ const hasLabel = !_lodash.default.isEmpty(props === null || props === void 0 ? void 0 : props.label);
61
61
  const isReadOnly = Boolean(props.readOnly || onDenied.readOnly);
62
62
  const isDisabled = Boolean(props.disabled || onDenied.disabled);
63
- const hasHintMessages = Boolean(props.hint?.length);
64
- const hasValidationErrors = Boolean(errors?.length);
63
+ const hasHintMessages = Boolean((_props$hint = props.hint) === null || _props$hint === void 0 ? void 0 : _props$hint.length);
64
+ const hasValidationErrors = Boolean(errors === null || errors === void 0 ? void 0 : errors.length);
65
65
  const handleOnChange = _react.default.useCallback(event => {
66
66
  if (isReadOnly || isDisabled) return;
67
67
  Object.defineProperty(event.target, 'value', {
@@ -70,7 +70,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
70
70
  enumerable: true,
71
71
  configurable: true
72
72
  });
73
- onChange?.(event);
73
+ onChange === null || onChange === void 0 ? void 0 : onChange(event);
74
74
  }, [isReadOnly, isDisabled, onChange]);
75
75
  if (unvisible || hideContent) return null;
76
76
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
@@ -78,11 +78,11 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
78
78
  }, /*#__PURE__*/_react.default.createElement("div", {
79
79
  ref: inputRootRef,
80
80
  "data-testid": "test-chebox-field-root",
81
- className: `checkbox-field-root ${customClassWrapper}`,
81
+ className: "checkbox-field-root ".concat(customClassWrapper),
82
82
  "data-state-error": hasValidationErrors
83
83
  }, /*#__PURE__*/_react.default.createElement("div", {
84
84
  "data-state-skeletonize": skeletonize,
85
- className: `container ${customClassInputContainer}`
85
+ className: "container ".concat(customClassInputContainer)
86
86
  }, /*#__PURE__*/_react.default.createElement("div", {
87
87
  className: "input-root"
88
88
  }, /*#__PURE__*/_react.default.createElement("input", _extends({
@@ -91,7 +91,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
91
91
  name: name,
92
92
  readOnly: isReadOnly,
93
93
  disabled: isDisabled,
94
- className: `input ${customClass}`,
94
+ className: "input ".concat(customClass),
95
95
  tabIndex: !isReadOnly ? 0 : -1,
96
96
  "data-testid": "test-checkbox-field-input",
97
97
  "data-state-size": size,
@@ -109,7 +109,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
109
109
  name: "checkmark",
110
110
  colorStyle: "default"
111
111
  })), hasLabel && /*#__PURE__*/_react.default.createElement("label", {
112
- className: `label ${customClassLabel}`,
112
+ className: "label ".concat(customClassLabel),
113
113
  title: label,
114
114
  htmlFor: inputId,
115
115
  "aria-readonly": isReadOnly,
@@ -126,7 +126,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
126
126
  align: popoverAlign,
127
127
  iconColor: "#03bde2"
128
128
  }, /*#__PURE__*/_react.default.createElement(_popover.PopoverText, {
129
- text: props?.hint
129
+ text: props === null || props === void 0 ? void 0 : props.hint
130
130
  }))), hintPosition === 'below' && /*#__PURE__*/_react.default.createElement(_hint.default, {
131
131
  customClass: "hint",
132
132
  description: props.hint,
@@ -137,8 +137,8 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
137
137
  className: "error",
138
138
  "data-state-skeletonize": skeletonize,
139
139
  "aria-describedby": String(name).concat('-errors')
140
- }, errors?.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
141
- key: `${index + 1}-${error}`
140
+ }, errors === null || errors === void 0 ? void 0 : errors.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
141
+ key: "".concat(index + 1, "-").concat(error)
142
142
  }, error, "\xA0"))))), /*#__PURE__*/_react.default.createElement(_tooltip.Tooltip, {
143
143
  targetRef: inputRootRef,
144
144
  text: tooltip,
@@ -23,8 +23,7 @@ var TextField = _interopRequireWildcard(require("../textfield"));
23
23
  var _buttons = _interopRequireDefault(require("../../../lib/buttons"));
24
24
  var _permissionValidations = require("../../../lib/permissionValidations");
25
25
  const _excluded = ["name", "isTypeText", "defaultValue", "onChange", "permissionAttr", "onDeniedActions"];
26
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
27
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
28
27
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
29
28
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
30
29
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
@@ -64,15 +63,16 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
64
63
  const handleTextInputChange = e => {
65
64
  const newValue = e.target.value;
66
65
  syncColorValues(newValue);
67
- onChange?.(e);
66
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
68
67
  };
69
68
  const handleColorInputChange = e => {
70
69
  const newValue = e.target.value;
71
70
  syncColorValues(newValue);
72
- onChange?.(e);
71
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
73
72
  };
74
73
  const onPaletteButtonClick = () => {
75
- inputRefColor.current?.click();
74
+ var _inputRefColor$curren;
75
+ (_inputRefColor$curren = inputRefColor.current) === null || _inputRefColor$curren === void 0 ? void 0 : _inputRefColor$curren.click();
76
76
  };
77
77
  _react.default.useLayoutEffect(() => {
78
78
  syncColorValues(String(defaultValue));
@@ -10,7 +10,8 @@ const useCalendarPosition = (calendarBoxOpen, containerRef) => {
10
10
  const [calendarBoxStyles, setCalendarBoxStyles] = _react.default.useState({});
11
11
  _react.default.useEffect(() => {
12
12
  const updatePosition = () => {
13
- const selectPositionOnScreen = containerRef.current?.getBoundingClientRect();
13
+ var _containerRef$current;
14
+ const selectPositionOnScreen = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.getBoundingClientRect();
14
15
  if (selectPositionOnScreen) {
15
16
  const {
16
17
  top,
@@ -13,8 +13,7 @@ const _excluded = ["children", "customClassWrapper", "hasValidationErrors"],
13
13
  _excluded3 = ["children", "skeletonize", "customClassInputContainer"],
14
14
  _excluded4 = ["customClass"],
15
15
  _excluded5 = ["children", "isReadOnly", "isDisabled", "skeletonize", "inputFieldId", "calendarBoxOpen", "showCalendarButton", "showClearButton", "onClearSelectedDate", "onClickTriggerCalendar", "hasValidDateSelection", "hasValidPeriodSelected", "clearButtonTestId", "calendarButtonTestId"];
16
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
18
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
20
19
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
@@ -29,7 +28,7 @@ const Root = exports.Root = /*#__PURE__*/_react.default.forwardRef((props, ref)
29
28
  return /*#__PURE__*/_react.default.createElement("div", _extends({}, rest, {
30
29
  ref: ref,
31
30
  "data-state-error": hasValidationErrors,
32
- className: `date-field-root ${customClassWrapper}`
31
+ className: "date-field-root ".concat(customClassWrapper)
33
32
  }), children);
34
33
  });
35
34
  Root.displayName = 'BaseDateRoot';
@@ -52,7 +51,7 @@ const Label = exports.Label = /*#__PURE__*/_react.default.forwardRef((props, ref
52
51
  rest = _objectWithoutProperties(props, _excluded2);
53
52
  return /*#__PURE__*/_react.default.createElement("span", _extends({}, rest, {
54
53
  ref: ref,
55
- className: `root-label ${customClassLabel}`,
54
+ className: "root-label ".concat(customClassLabel),
56
55
  "data-state-skeletonize": skeletonize
57
56
  }), /*#__PURE__*/_react.default.createElement("label", {
58
57
  className: "label",
@@ -83,7 +82,7 @@ const Container = exports.Container = /*#__PURE__*/_react.default.forwardRef((pr
83
82
  return /*#__PURE__*/_react.default.createElement("div", _extends({}, rest, {
84
83
  ref: ref,
85
84
  "data-state-skeletonize": skeletonize,
86
- className: `container ${customClassInputContainer}`
85
+ className: "container ".concat(customClassInputContainer)
87
86
  }), children);
88
87
  });
89
88
  Container.displayName = 'BaseDateContainer';
@@ -98,7 +97,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
98
97
  type: "text",
99
98
  role: "combobox",
100
99
  "aria-haspopup": "true",
101
- className: `input ${customClass}`,
100
+ className: "input ".concat(customClass),
102
101
  "aria-autocomplete": "list"
103
102
  }));
104
103
  });
@@ -2,6 +2,6 @@ import React__default from 'react';
2
2
 
3
3
  interface DateFieldCalendarBoxProps extends React__default.ComponentProps<'div'> {
4
4
  }
5
- declare const CalendarBox: React__default.ForwardRefExoticComponent<Pick<DateFieldCalendarBoxProps, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "align" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React__default.RefAttributes<HTMLDivElement>>;
5
+ declare const CalendarBox: React__default.ForwardRefExoticComponent<Pick<DateFieldCalendarBoxProps, "className" | "onClick" | "color" | "children" | "style" | "id" | "key" | "slot" | "title" | "hidden" | "onKeyPress" | "role" | "tabIndex" | "align" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React__default.RefAttributes<HTMLDivElement>>;
6
6
 
7
7
  export { CalendarBox, DateFieldCalendarBoxProps };
@@ -30,7 +30,8 @@ const CalendarBox = exports.CalendarBox = /*#__PURE__*/_react.default.forwardRef
30
30
  } = (0, _constants.useCalendarPosition)(calendarBoxOpen, dateContainerRef);
31
31
  const weeks = (0, _helpers.generateCalendarWeeks)(calendarDisplayDate);
32
32
  const handleOnMouseDown = event => {
33
- event?.preventDefault?.();
33
+ var _event$preventDefault;
34
+ event === null || event === void 0 ? void 0 : (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);
34
35
  };
35
36
  return /*#__PURE__*/_react.default.createElement("div", {
36
37
  ref: ref,
@@ -72,7 +73,7 @@ const CalendarBox = exports.CalendarBox = /*#__PURE__*/_react.default.forwardRef
72
73
  className: "date-calendar-box-days-of-week"
73
74
  }, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, _moment.default.weekdaysShort(true).map((day, idx) => /*#__PURE__*/_react.default.createElement("th", {
74
75
  role: "columnheader",
75
- key: `day-of-week-${idx + 1}`
76
+ key: "day-of-week-".concat(idx + 1)
76
77
  }, day))))), /*#__PURE__*/_react.default.createElement("div", {
77
78
  className: "date-calendar-box-grid-of-days"
78
79
  }, /*#__PURE__*/_react.default.createElement("table", {
@@ -23,13 +23,13 @@ var _calendarbox = require("./calendarbox");
23
23
  var _context = require("./context");
24
24
  const _excluded = ["label", "errors", "tooltip", "tooltipPosition", "tooltipWidth", "onDeniedActions", "permissionAttr", "customClass", "customClassLabel", "customClassWrapper", "customClassInputContainer", "textAlign", "labelUppercase", "skeletonize", "hintPosition", "gridLayout", "themePopover", "popoverAlign", "showCalendarButton", "openCalendarOnFocus", "undigitable", "shouldCloseOnSelect", "showClearDateButton", "placeholder", "returnValueType"];
25
25
  /* eslint-disable @typescript-eslint/no-use-before-define */
26
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
27
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
28
27
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
29
28
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
30
29
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
31
30
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
32
31
  const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
32
+ var _props$hint;
33
33
  const {
34
34
  label,
35
35
  errors,
@@ -68,7 +68,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
68
68
  const [calendarBoxOpen, setCalendarBoxOpen] = _react.default.useState(false);
69
69
  const [activeDescendant, setActiveDescendant] = _react.default.useState((0, _moment.default)().format(_helpers2.TOKEN_ISO_FORMAT));
70
70
  const [selectedDate, setSelectedDate] = _react.default.useState(null);
71
- const [calendarDisplayDate, setCalendarDisplayDate] = _react.default.useState(selectedDate ?? (0, _moment.default)());
71
+ const [calendarDisplayDate, setCalendarDisplayDate] = _react.default.useState(selectedDate !== null && selectedDate !== void 0 ? selectedDate : (0, _moment.default)());
72
72
  const calendarRef = _react.default.useRef(null);
73
73
  const inputRootRef = _react.default.useRef(null);
74
74
  const dateInputRef = _react.default.useRef(null);
@@ -83,7 +83,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
83
83
  placeholderChar: '_'
84
84
  }, {
85
85
  ref: dateInputRef,
86
- defaultValue: selectedDate?.format(_helpers2.TOKEN_PTBR_FORMAT),
86
+ defaultValue: selectedDate === null || selectedDate === void 0 ? void 0 : selectedDate.format(_helpers2.TOKEN_PTBR_FORMAT),
87
87
  onComplete: value => {
88
88
  const date = (0, _moment.default)(value, _helpers2.TOKEN_PTBR_FORMAT);
89
89
  if (date.isValid()) {
@@ -92,18 +92,19 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
92
92
  }
93
93
  });
94
94
  const inputId = _react.default.useMemo(() => props.id || props.name || (0, _uuid.v1)(), [props.id, props.name]);
95
- const hasLabel = !_lodash.default.isEmpty(props?.label);
95
+ const hasLabel = !_lodash.default.isEmpty(props === null || props === void 0 ? void 0 : props.label);
96
96
  const isReadOnly = Boolean(props.readOnly || onDenied.readOnly);
97
97
  const isDisabled = Boolean(props.disabled || onDenied.disabled);
98
- const hasHintMessages = Boolean(props.hint?.length);
99
- const hasValidationErrors = Boolean(errors?.length);
100
- const hasValidDateSelected = !_lodash.default.isEmpty(props?.value);
98
+ const hasHintMessages = Boolean((_props$hint = props.hint) === null || _props$hint === void 0 ? void 0 : _props$hint.length);
99
+ const hasValidationErrors = Boolean(errors === null || errors === void 0 ? void 0 : errors.length);
100
+ const hasValidDateSelected = !_lodash.default.isEmpty(props === null || props === void 0 ? void 0 : props.value);
101
101
  const handleUpdateDateState = _react.default.useCallback(date => {
102
+ var _props$onChange;
102
103
  const nonIsoDateFormat = date.format(_helpers2.TOKEN_ISO_FORMAT);
103
104
  const isoDateFormat = date.toISOString();
104
105
  setSelectedDate(date.clone());
105
106
  setCalendarDisplayDate(date.clone());
106
- props.onChange?.({
107
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, {
107
108
  target: {
108
109
  name: props.name,
109
110
  value: returnValueType === 'default' ? nonIsoDateFormat : isoDateFormat
@@ -118,7 +119,8 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
118
119
  const handleChangeCalendarBoxState = _react.default.useCallback(() => {
119
120
  setCalendarBoxOpen(prevState => {
120
121
  if (dateInputRef.current !== document.activeElement) {
121
- dateInputRef?.current?.focus?.();
122
+ var _dateInputRef$current, _dateInputRef$current2;
123
+ dateInputRef === null || dateInputRef === void 0 ? void 0 : (_dateInputRef$current = dateInputRef.current) === null || _dateInputRef$current === void 0 ? void 0 : (_dateInputRef$current2 = _dateInputRef$current.focus) === null || _dateInputRef$current2 === void 0 ? void 0 : _dateInputRef$current2.call(_dateInputRef$current);
122
124
  }
123
125
  return !prevState;
124
126
  });
@@ -140,7 +142,8 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
140
142
  });
141
143
  }, []);
142
144
  const handleOnClickClearSelectedDate = _react.default.useCallback(() => {
143
- props.onChange?.({
145
+ var _props$onChange2;
146
+ (_props$onChange2 = props.onChange) === null || _props$onChange2 === void 0 ? void 0 : _props$onChange2.call(props, {
144
147
  target: {
145
148
  name: props.name,
146
149
  value: ''
@@ -151,21 +154,23 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
151
154
  handleCloseCalendar();
152
155
  }, [props.onChange]);
153
156
  const handleOnBlur = event => {
154
- props?.onBlur?.(event);
157
+ var _props$onBlur;
158
+ props === null || props === void 0 ? void 0 : (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 ? void 0 : _props$onBlur.call(props, event);
155
159
  handleCloseCalendar();
156
- setActiveDescendant((selectedDate ?? (0, _moment.default)()).format(_helpers2.TOKEN_ISO_FORMAT));
157
- setCalendarDisplayDate(selectedDate ?? (0, _moment.default)());
160
+ setActiveDescendant((selectedDate !== null && selectedDate !== void 0 ? selectedDate : (0, _moment.default)()).format(_helpers2.TOKEN_ISO_FORMAT));
161
+ setCalendarDisplayDate(selectedDate !== null && selectedDate !== void 0 ? selectedDate : (0, _moment.default)());
158
162
  if (_lodash.default.size(unmaskedValue) !== 8) {
159
- const date = (0, _moment.default)(_lodash.default.toString(props?.value), _helpers2.TOKEN_ISO_FORMAT);
163
+ const date = (0, _moment.default)(_lodash.default.toString(props === null || props === void 0 ? void 0 : props.value), _helpers2.TOKEN_ISO_FORMAT);
160
164
  if (date.isValid()) {
161
165
  setMaskValue(date.format('DD/MM/YYYY'));
162
166
  }
163
167
  }
164
168
  };
165
169
  const handleOnFocus = event => {
166
- props?.onFocus?.(event);
167
- setActiveDescendant((selectedDate ?? (0, _moment.default)()).format(_helpers2.TOKEN_ISO_FORMAT));
168
- setCalendarDisplayDate(selectedDate ?? (0, _moment.default)());
170
+ var _props$onFocus;
171
+ props === null || props === void 0 ? void 0 : (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 ? void 0 : _props$onFocus.call(props, event);
172
+ setActiveDescendant((selectedDate !== null && selectedDate !== void 0 ? selectedDate : (0, _moment.default)()).format(_helpers2.TOKEN_ISO_FORMAT));
173
+ setCalendarDisplayDate(selectedDate !== null && selectedDate !== void 0 ? selectedDate : (0, _moment.default)());
169
174
  if (!isReadOnly && openCalendarOnFocus) {
170
175
  handleOpenCalendar();
171
176
  }
@@ -174,18 +179,21 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
174
179
  if (undigitable) {
175
180
  event.preventDefault();
176
181
  } else {
177
- props.onPaste?.(event);
182
+ var _props$onPaste;
183
+ (_props$onPaste = props.onPaste) === null || _props$onPaste === void 0 ? void 0 : _props$onPaste.call(props, event);
178
184
  }
179
185
  };
180
186
  const handleOnBeforeInput = event => {
181
187
  if (undigitable) {
182
188
  event.preventDefault();
183
189
  } else {
184
- props.onBeforeInput?.(event);
190
+ var _props$onBeforeInput;
191
+ (_props$onBeforeInput = props.onBeforeInput) === null || _props$onBeforeInput === void 0 ? void 0 : _props$onBeforeInput.call(props, event);
185
192
  }
186
193
  };
187
194
  const handleOnKeyDown = event => {
188
- props?.onKeyDown?.(event);
195
+ var _props$onKeyDown;
196
+ props === null || props === void 0 ? void 0 : (_props$onKeyDown = props.onKeyDown) === null || _props$onKeyDown === void 0 ? void 0 : _props$onKeyDown.call(props, event);
189
197
  if (calendarBoxOpen && event.key && !event.shiftKey && !event.altKey && _helpers2.NAVIGATION_KEYS.includes(event.key)) {
190
198
  event.preventDefault();
191
199
  switch (event.key) {
@@ -225,11 +233,12 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
225
233
  }
226
234
  };
227
235
  _react.default.useEffect(() => {
228
- const currentValue = props?.value ?? null;
236
+ var _props$value;
237
+ const currentValue = (_props$value = props === null || props === void 0 ? void 0 : props.value) !== null && _props$value !== void 0 ? _props$value : null;
229
238
  const date = (0, _moment.default)(_lodash.default.toString(currentValue), _helpers2.TOKEN_ISO_FORMAT);
230
239
  setSelectedDate(date.isValid() ? date : null);
231
240
  setMaskValue(date.format(_helpers2.TOKEN_PTBR_FORMAT));
232
- }, [props?.value]);
241
+ }, [props === null || props === void 0 ? void 0 : props.value]);
233
242
  const contextValues = _react.default.useMemo(() => ({
234
243
  label,
235
244
  inputFieldId: inputId,
@@ -270,11 +279,11 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
270
279
  "data-testid": "test-date-field-label",
271
280
  label: label,
272
281
  inputId: inputId,
273
- hint: props?.hint,
282
+ hint: props === null || props === void 0 ? void 0 : props.hint,
274
283
  isDisabled: isDisabled,
275
284
  isReadOnly: isReadOnly,
276
285
  skeletonize: skeletonize,
277
- required: props?.required,
286
+ required: props === null || props === void 0 ? void 0 : props.required,
278
287
  hintPosition: hintPosition,
279
288
  themePopover: themePopover,
280
289
  popoverAlign: popoverAlign,
@@ -288,7 +297,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
288
297
  }, /*#__PURE__*/_react.default.createElement(BaseDate.Input, _extends({}, rest, {
289
298
  ref: (0, _helpers.mergeRefs)(ref, dateInputRef),
290
299
  id: inputId,
291
- name: props?.name,
300
+ name: props === null || props === void 0 ? void 0 : props.name,
292
301
  value: maskedValue,
293
302
  readOnly: isReadOnly,
294
303
  disabled: isDisabled,
@@ -324,8 +333,8 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
324
333
  className: "error",
325
334
  "data-state-skeletonize": skeletonize,
326
335
  "aria-describedby": String(props.name).concat('-errors')
327
- }, errors?.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
328
- key: `${index + 1}-${error}`
336
+ }, errors === null || errors === void 0 ? void 0 : errors.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
337
+ key: "".concat(index + 1, "-").concat(error)
329
338
  }, error, "\xA0")))))), /*#__PURE__*/_react.default.createElement(_tooltip.Tooltip, {
330
339
  targetRef: inputRootRef,
331
340
  text: tooltip,
@@ -7,8 +7,7 @@ exports.Triggers = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _context = require("./context");
9
9
  var BaseDate = _interopRequireWildcard(require("../base"));
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
12
  const Triggers = () => {
14
13
  const {
@@ -2,6 +2,6 @@ import React__default from 'react';
2
2
 
3
3
  interface DateFieldCalendarBoxProps extends React__default.ComponentProps<'div'> {
4
4
  }
5
- declare const CalendarBox: React__default.ForwardRefExoticComponent<Pick<DateFieldCalendarBoxProps, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "align" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React__default.RefAttributes<HTMLDivElement>>;
5
+ declare const CalendarBox: React__default.ForwardRefExoticComponent<Pick<DateFieldCalendarBoxProps, "className" | "onClick" | "color" | "children" | "style" | "id" | "key" | "slot" | "title" | "hidden" | "onKeyPress" | "role" | "tabIndex" | "align" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React__default.RefAttributes<HTMLDivElement>>;
6
6
 
7
7
  export { CalendarBox, DateFieldCalendarBoxProps };
@@ -34,13 +34,14 @@ const CalendarBox = exports.CalendarBox = /*#__PURE__*/_react.default.forwardRef
34
34
  const isInRange = day => selectedDate.inicial && selectedDate.final && day.isAfter(selectedDate.inicial, 'day') && day.isBefore(selectedDate.final, 'day');
35
35
  const isSelected = day => selectedDate.inicial && day.isSame(selectedDate.inicial, 'day') || selectedDate.final && day.isSame(selectedDate.final, 'day');
36
36
  const handleOnMouseDown = event => {
37
- event?.preventDefault?.();
37
+ var _event$preventDefault;
38
+ event === null || event === void 0 ? void 0 : (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);
38
39
  };
39
40
  const handleOnClick = (___, daySelected) => {
40
41
  const inputActive = document.activeElement;
41
42
  let inputType = undefined;
42
- if (inputActive?.id === initialInputId) inputType = 'initial';
43
- if (inputActive?.id === finalInputId) inputType = 'final';
43
+ if ((inputActive === null || inputActive === void 0 ? void 0 : inputActive.id) === initialInputId) inputType = 'initial';
44
+ if ((inputActive === null || inputActive === void 0 ? void 0 : inputActive.id) === finalInputId) inputType = 'final';
44
45
  if (!_lodash.default.isUndefined(inputType)) {
45
46
  handleChangeUpdateDateState({
46
47
  date: daySelected,
@@ -89,7 +90,7 @@ const CalendarBox = exports.CalendarBox = /*#__PURE__*/_react.default.forwardRef
89
90
  className: "date-calendar-box-days-of-week"
90
91
  }, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, _moment.default.weekdaysShort(true).map((day, idx) => /*#__PURE__*/_react.default.createElement("th", {
91
92
  role: "columnheader",
92
- key: `day-of-week-${idx + 1}`
93
+ key: "day-of-week-".concat(idx + 1)
93
94
  }, day))))), /*#__PURE__*/_react.default.createElement("div", {
94
95
  className: "date-calendar-box-grid-of-days"
95
96
  }, /*#__PURE__*/_react.default.createElement("table", {
@@ -101,11 +102,12 @@ const CalendarBox = exports.CalendarBox = /*#__PURE__*/_react.default.forwardRef
101
102
  role: "row",
102
103
  key: weekIndex + 1
103
104
  }, week.map((day, dateIndex) => {
105
+ var _isInRange, _isSelected;
104
106
  const idActiveDescendant = day.format(_helpers.TOKEN_ISO_FORMAT);
105
107
  const isToday = _lodash.default.isEqual((0, _moment.default)().format(_helpers.TOKEN_ISO_FORMAT), day.format(_helpers.TOKEN_ISO_FORMAT));
106
- const inRange = isInRange(day) ?? false;
108
+ const inRange = (_isInRange = isInRange(day)) !== null && _isInRange !== void 0 ? _isInRange : false;
107
109
  const hasFocus = _lodash.default.isEqual(activeDescendant, day.format(_helpers.TOKEN_ISO_FORMAT));
108
- const hasSelected = isSelected(day) ?? false;
110
+ const hasSelected = (_isSelected = isSelected(day)) !== null && _isSelected !== void 0 ? _isSelected : false;
109
111
  const isCurrentMonth = day.month() === calendarDisplayDate.month();
110
112
  const descriptionDate = day.format('LL');
111
113
  return /*#__PURE__*/_react.default.createElement("td", {