linear-react-components-ui 1.1.20-beta.21 → 1.1.20-beta.22

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 (127) hide show
  1. package/lib/alerts/BaseAlert.js +1 -1
  2. package/lib/alerts/Message.js +1 -1
  3. package/lib/avatar/index.js +8 -9
  4. package/lib/badge/index.js +4 -4
  5. package/lib/buttons/DangerButton.js +1 -1
  6. package/lib/buttons/DefaultButton.js +2 -11
  7. package/lib/buttons/InfoButton.js +1 -1
  8. package/lib/buttons/PrimaryButton.js +1 -1
  9. package/lib/buttons/SuccessButton.js +1 -1
  10. package/lib/buttons/WarningButton.js +1 -1
  11. package/lib/buttons/button_container/index.js +1 -1
  12. package/lib/buttons/split_button/index.js +1 -1
  13. package/lib/calendar/base/Day.js +1 -1
  14. package/lib/calendar/base/Month.js +1 -1
  15. package/lib/calendar/base/helpers.js +2 -2
  16. package/lib/calendar/base/index.js +1 -1
  17. package/lib/checkbox/Label.js +31 -0
  18. package/lib/checkbox/index.js +1 -1
  19. package/lib/dialog/Custom.js +1 -1
  20. package/lib/dialog/Question.js +4 -2
  21. package/lib/dialog/base/Content.js +1 -1
  22. package/lib/dialog/base/Header.js +2 -2
  23. package/lib/dialog/base/index.js +5 -4
  24. package/lib/dialog/form/index.js +1 -1
  25. package/lib/dialog/wizard/progressbar.js +1 -1
  26. package/lib/dialog/wizard/step.js +1 -1
  27. package/lib/drawer/Drawer.js +3 -3
  28. package/lib/drawer/Header.js +1 -1
  29. package/lib/dropdown/Popup.js +6 -6
  30. package/lib/dropdown/helper.js +1 -1
  31. package/lib/dropdown/withDropdown.js +2 -2
  32. package/lib/fieldset/index.js +7 -7
  33. package/lib/form/FieldArray.js +1 -1
  34. package/lib/form/FieldNumber.js +4 -4
  35. package/lib/form/FieldPeriod.js +2 -2
  36. package/lib/form/index.js +2 -2
  37. package/lib/gridlayout/GridCol.js +5 -5
  38. package/lib/gridlayout/GridRow.js +1 -4
  39. package/lib/hint/index.js +1 -7
  40. package/lib/icons/index.js +27 -24
  41. package/lib/inputs/base/InputTextBase.js +8 -6
  42. package/lib/inputs/base/Label.js +1 -1
  43. package/lib/inputs/base/helpers.js +3 -7
  44. package/lib/inputs/date/helpers.js +1 -4
  45. package/lib/inputs/date/index.js +15 -9
  46. package/lib/inputs/errorMessage/index.js +1 -1
  47. package/lib/inputs/file/DefaultFile.js +6 -5
  48. package/lib/inputs/file/DragDropFile.js +17 -15
  49. package/lib/inputs/file/File.js +4 -3
  50. package/lib/inputs/mask/BaseMask.js +1 -1
  51. package/lib/inputs/mask/helpers.d.ts +1 -1
  52. package/lib/inputs/mask/imaskHOC.js +203 -0
  53. package/lib/inputs/multiSelect/Dropdown.js +10 -9
  54. package/lib/inputs/multiSelect/helper.js +2 -1
  55. package/lib/inputs/multiSelect/index.js +9 -7
  56. package/lib/inputs/period/PeriodList.js +1 -1
  57. package/lib/inputs/period/helper.js +1 -3
  58. package/lib/inputs/period/index.js +14 -9
  59. package/lib/inputs/search/index.js +1 -1
  60. package/lib/inputs/select/Dropdown.js +1 -1
  61. package/lib/inputs/select/helper.js +13 -10
  62. package/lib/inputs/select/multiple/Selecteds.js +1 -1
  63. package/lib/inputs/select/multiple/index.js +14 -9
  64. package/lib/inputs/select/simple/index.js +17 -10
  65. package/lib/inputs/textarea/index.js +1 -1
  66. package/lib/internals/withTooltip.js +9 -9
  67. package/lib/labelMessages/index.js +3 -4
  68. package/lib/labels/DefaultLabel.js +1 -4
  69. package/lib/labels/label_container/index.js +1 -1
  70. package/lib/list/Header.js +1 -1
  71. package/lib/list/Item.js +7 -9
  72. package/lib/list/index.js +1 -2
  73. package/lib/menus/float/MenuItem.js +2 -2
  74. package/lib/menus/float/SubMenuContainer.js +1 -1
  75. package/lib/menus/float/index.js +1 -1
  76. package/lib/menus/sidenav/ExpandMenu.js +1 -1
  77. package/lib/menus/sidenav/NavMenuGroup.js +1 -1
  78. package/lib/menus/sidenav/NavMenuItem.js +9 -7
  79. package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
  80. package/lib/menus/sidenav/helpers.js +1 -1
  81. package/lib/menus/sidenav/index.js +5 -5
  82. package/lib/menus/sidenav/popup_menu_help/index.js +85 -0
  83. package/lib/panel/Content.js +7 -5
  84. package/lib/panel/Default.js +2 -2
  85. package/lib/panel/Header.js +3 -3
  86. package/lib/permissionValidations.js +1 -1
  87. package/lib/popover/index.js +1 -1
  88. package/lib/progress/Bar.js +6 -6
  89. package/lib/radio/index.js +2 -2
  90. package/lib/shortcuts/index.js +1 -1
  91. package/lib/skeleton/SkeletonContainer.js +1 -2
  92. package/lib/skeleton/index.js +1 -4
  93. package/lib/spinner/index.js +2 -2
  94. package/lib/split/Split.js +1 -1
  95. package/lib/split/SplitSide.js +3 -3
  96. package/lib/table/Body.js +3 -3
  97. package/lib/table/Header.js +11 -8
  98. package/lib/table/HeaderColumn.js +1 -1
  99. package/lib/table/Row.js +3 -3
  100. package/lib/table/RowColumn.js +1 -1
  101. package/lib/table/index.js +1 -6
  102. package/lib/tabs/DropdownItems.js +62 -0
  103. package/lib/tabs/DropdownTabs.js +1 -1
  104. package/lib/tabs/Menu.js +1 -1
  105. package/lib/tabs/MenuItems.js +70 -0
  106. package/lib/tabs/MenuTabs.js +2 -2
  107. package/lib/tabs/Panel.js +7 -5
  108. package/lib/tabs/context.js +6 -3
  109. package/lib/textContent/index.js +1 -1
  110. package/lib/toolbar/ButtonBar.js +1 -1
  111. package/lib/toolbar/index.js +1 -1
  112. package/lib/tooltip/index.js +7 -7
  113. package/lib/treetable/Body.js +1 -1
  114. package/lib/treetable/Header.js +2 -2
  115. package/lib/treetable/Row.d.ts +1 -1
  116. package/lib/treetable/Row.js +13 -9
  117. package/lib/treetable/helpers.d.ts +1 -1
  118. package/lib/treetable/index.d.ts +2 -2
  119. package/lib/treeview/Header.js +1 -1
  120. package/lib/treeview/Node.js +5 -5
  121. package/lib/treeview/index.js +4 -4
  122. package/lib/treeview_old/Header.js +29 -0
  123. package/lib/treeview_old/Node.js +68 -0
  124. package/lib/treeview_old/index.js +43 -0
  125. package/lib/{types.d-73cece43.d.ts → types.d-3d9e44cd.d.ts} +1 -0
  126. package/lib/uitour/index.js +8 -6
  127. package/package.json +1 -1
@@ -12,10 +12,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
12
12
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
- const getClass = props => `row ${props.customClass}
16
- ${props.withTrim && ' -withtrim'}
17
- ${props.verticalAlign && ` align-items-${props.verticalAlign}`}
18
- ${props.horizontalAlign && ` justify-content-${props.horizontalAlign}`}`;
15
+ const getClass = props => "row ".concat(props.customClass, "\n ").concat(props.withTrim && ' -withtrim', "\n ").concat(props.verticalAlign && " align-items-".concat(props.verticalAlign), "\n ").concat(props.horizontalAlign && " justify-content-".concat(props.horizontalAlign));
19
16
  const GridRow = props => {
20
17
  const {
21
18
  style,
package/lib/hint/index.js CHANGED
@@ -22,13 +22,7 @@ const Hint = _ref => {
22
22
  return /*#__PURE__*/_react.default.createElement("div", {
23
23
  "aria-disabled": disabled,
24
24
  style: style,
25
- className: `
26
- hint-component
27
- ${customClass}
28
- ${skeletonize ? '-skeletonized' : ''}
29
- ${disabled ? '-disabled' : ''}
30
- -${color}
31
- `
25
+ className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ").concat(disabled ? '-disabled' : '', "\n -").concat(color, "\n ")
32
26
  }, Array.isArray(description) ? (0, _helpers.showHintList)(description) : /*#__PURE__*/_react.default.createElement("span", {
33
27
  "aria-disabled": disabled
34
28
  }, description));
@@ -34,35 +34,38 @@ const Icon = _ref => {
34
34
  const isUsingColorStyle = colorStyle !== 'default';
35
35
  const colorFromProp = isUsingColorStyle || !color ? undefined : color;
36
36
  const refSvg = (0, _react.useRef)(null);
37
- const viewBoxFromIconOrSvgStrcut = name ? listIcon[name].viewbox : svgStruct?.viewbox;
38
- const getPaths = () => name ? listIcon[name].paths : svgStruct?.paths;
39
- const getSvg = () => /*#__PURE__*/_react.default.createElement("svg", {
40
- "data-testid": "icon",
41
- "data-color-style": colorStyle,
42
- onClick: () => {
43
- if (onClick && !disabled) onClick();
44
- },
45
- ref: r => {
46
- refSvg.current = r;
47
- },
48
- width: `${size}px`,
49
- height: `${size}px`,
50
- fill: disabled ? disabledIconColor : colorFromProp,
51
- viewBox: viewBox || viewBoxFromIconOrSvgStrcut,
52
- className: `icon-component ${customClass}`,
53
- pointerEvents: pointerEvents,
54
- style: style
55
- }, getPaths()?.map(value => /*#__PURE__*/_react.default.createElement("path", {
56
- "data-testid": "icon-path",
57
- d: value,
58
- key: value
59
- })));
37
+ const viewBoxFromIconOrSvgStrcut = name ? listIcon[name].viewbox : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.viewbox;
38
+ const getPaths = () => name ? listIcon[name].paths : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.paths;
39
+ const getSvg = () => {
40
+ var _getPaths;
41
+ return /*#__PURE__*/_react.default.createElement("svg", {
42
+ "data-testid": "icon",
43
+ "data-color-style": colorStyle,
44
+ onClick: () => {
45
+ if (onClick && !disabled) onClick();
46
+ },
47
+ ref: r => {
48
+ refSvg.current = r;
49
+ },
50
+ width: "".concat(size, "px"),
51
+ height: "".concat(size, "px"),
52
+ fill: disabled ? disabledIconColor : colorFromProp,
53
+ viewBox: viewBox || viewBoxFromIconOrSvgStrcut,
54
+ className: "icon-component ".concat(customClass),
55
+ pointerEvents: pointerEvents,
56
+ style: style
57
+ }, (_getPaths = getPaths()) === null || _getPaths === void 0 ? void 0 : _getPaths.map(value => /*#__PURE__*/_react.default.createElement("path", {
58
+ "data-testid": "icon-path",
59
+ d: value,
60
+ key: value
61
+ })));
62
+ };
60
63
  if (color && colorStyle !== 'default') throw new Error('Expected only one of the two properties: colorStyle or color');
61
64
  if (!name && !svgStruct) throw new Error('One of the "name" and "svgStruct" props must be filled');
62
65
  if (!visible) return null;
63
66
  if (!tooltip) return getSvg();
64
67
  return /*#__PURE__*/_react.default.createElement("div", {
65
- className: `icon-component-container ${customClassForContainer}`,
68
+ className: "icon-component-container ".concat(customClassForContainer),
66
69
  ref: r => {
67
70
  if (targetRef && r) targetRef(r);
68
71
  }
@@ -122,11 +122,13 @@ const InputTextBase = props => {
122
122
  if (!disableCallbacks) {
123
123
  propsInput = _objectSpread(_objectSpread({}, propsInput), {}, {
124
124
  onFocus: e => {
125
- props.onInputReceiveFocus?.();
125
+ var _props$onInputReceive;
126
+ (_props$onInputReceive = props.onInputReceiveFocus) === null || _props$onInputReceive === void 0 ? void 0 : _props$onInputReceive.call(props);
126
127
  if (props.onFocus) props.onFocus(e);
127
128
  },
128
129
  onBlur: e => {
129
- props.onInputLostFocus?.();
130
+ var _props$onInputLostFoc;
131
+ (_props$onInputLostFoc = props.onInputLostFocus) === null || _props$onInputLostFoc === void 0 ? void 0 : _props$onInputLostFoc.call(props);
130
132
  if (props.onBlur) props.onBlur(e);
131
133
  },
132
134
  onKeyDown: e => {
@@ -190,7 +192,7 @@ const InputTextBase = props => {
190
192
  if (!visible || unvisible) return null;
191
193
  return /*#__PURE__*/_react.default.createElement("div", {
192
194
  style: style,
193
- className: `input-base-component ${skeletonize ? '-skeletonized' : ''} ${customClass}`,
195
+ className: "input-base-component ".concat(skeletonize ? '-skeletonized' : '', " ").concat(customClass),
194
196
  ref: inputBaseRef
195
197
  }, label && /*#__PURE__*/_react.default.createElement("div", {
196
198
  className: "labelcontainer",
@@ -212,7 +214,7 @@ const InputTextBase = props => {
212
214
  display: 'flex'
213
215
  }
214
216
  }, /*#__PURE__*/_react.default.createElement("div", {
215
- className: `label ${customClassForLabel} ${labelUppercase && ' -uppercase'}`,
217
+ className: "label ".concat(customClassForLabel, " ").concat(labelUppercase && ' -uppercase'),
216
218
  style: {
217
219
  alignSelf: 'center'
218
220
  }
@@ -236,11 +238,11 @@ const InputTextBase = props => {
236
238
  }))
237
239
  }, leftElements && /*#__PURE__*/_react.default.createElement("div", {
238
240
  style: styleForSideButtons,
239
- className: `sidebuttons ${customClassForSideButtons}`
241
+ className: "sidebuttons ".concat(customClassForSideButtons)
240
242
  }, leftElements), /*#__PURE__*/_react.default.createElement("div", {
241
243
  "data-testid": "testInputContent",
242
244
  style: styleForInputContent,
243
- className: `inputcontent ${customClassForInputContent}`
245
+ className: "inputcontent ".concat(customClassForInputContent)
244
246
  }, type === 'textarea' ? /*#__PURE__*/_react.default.createElement("textarea", _extends({
245
247
  rows: props.rows,
246
248
  cols: props.cols,
@@ -27,7 +27,7 @@ const Label = props => {
27
27
  }
28
28
  },
29
29
  onMouseEnter: onHoverLabel,
30
- className: `label ${customClassForLabel} ${labelUppercase && ' -uppercase'}`
30
+ className: "label ".concat(customClassForLabel, " ").concat(labelUppercase && ' -uppercase')
31
31
  }, label, required && /*#__PURE__*/_react.default.createElement("span", {
32
32
  className: "-requiredlabel"
33
33
  }, "*"));
@@ -13,7 +13,7 @@ const getInputClass = _ref => {
13
13
  readOnly,
14
14
  readOnlyClass
15
15
  } = _ref;
16
- return `textinput text-align-${textAlign} ${readOnlyClass} ${readOnly ? ' -readonly' : ''}`;
16
+ return "textinput text-align-".concat(textAlign, " ").concat(readOnlyClass, " ").concat(readOnly ? ' -readonly' : '');
17
17
  };
18
18
  exports.getInputClass = getInputClass;
19
19
  const getInputWrapperClass = props => {
@@ -24,11 +24,7 @@ const getInputWrapperClass = props => {
24
24
  errorMessages,
25
25
  disabled
26
26
  } = props;
27
- return `inputwrapper ${inputHasFocus && ' -focusable'}
28
- ${customClassForWrapper}
29
- ${errorMessages && errorMessages.length > 0 && ' -requirederror'}
30
- ${rounded && ' -roundedborders'}
31
- ${disabled && ' -disabled'}`;
27
+ return "inputwrapper ".concat(inputHasFocus && ' -focusable', "\n ").concat(customClassForWrapper, "\n ").concat(errorMessages && errorMessages.length > 0 && ' -requirederror', "\n ").concat(rounded && ' -roundedborders', "\n ").concat(disabled && ' -disabled');
32
28
  };
33
29
  exports.getInputWrapperClass = getInputWrapperClass;
34
30
  const getRightElements = (errorMessages, skeletonize, rightElements) => {
@@ -38,7 +34,7 @@ const getRightElements = (errorMessages, skeletonize, rightElements) => {
38
34
  elements = [elements];
39
35
  }
40
36
  elements = elements.map((element, index) => element && /*#__PURE__*/_react.default.cloneElement(element, {
41
- key: `rightelement-${index + 1}`
37
+ key: "rightelement-".concat(index + 1)
42
38
  }));
43
39
  if (errorMessages) return elements;
44
40
  return elements;
@@ -15,10 +15,7 @@ const getCalendarDropdownStyle = _ref => {
15
15
  width,
16
16
  minWidth
17
17
  } = _ref;
18
- return `top: ${topPosition}px;
19
- left: ${leftPosition}px;
20
- width: ${width}px;
21
- min-width: ${minWidth}px;`;
18
+ return "top: ".concat(topPosition, "px;\n left: ").concat(leftPosition, "px;\n width: ").concat(width, "px;\n min-width: ").concat(minWidth, "px;");
22
19
  };
23
20
  exports.getCalendarDropdownStyle = getCalendarDropdownStyle;
24
21
  const getMomentValue = value => {
@@ -22,6 +22,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
22
22
  const CALENDAR_BUTTON_WIDTH = 24;
23
23
  const CALENDAR_MIN_WIDTH = 250;
24
24
  const DatePicker = props => {
25
+ var _window;
25
26
  const {
26
27
  showButtonOpen = true,
27
28
  openOnFocus = true,
@@ -53,14 +54,16 @@ const DatePicker = props => {
53
54
  const dropdownContainer = (0, _react.useRef)();
54
55
  const [insideDropdown, setInsideDropdown] = (0, _react.useState)(false);
55
56
  const onScreenResize = () => {
56
- setInputDimensions(inputRef?.current?.getBoundingClientRect());
57
+ var _inputRef$current;
58
+ setInputDimensions(inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.getBoundingClientRect());
57
59
  };
58
60
  const onClickOutside = event => {
61
+ var _buttonOpenRef$curren;
59
62
  const {
60
63
  target
61
64
  } = event;
62
65
  if (!dropdownContainer || target === inputRef.current || target === buttonOpenRef.current) return;
63
- if (target !== dropdownContainer.current && dropdownContainer && dropdownContainer.current && !dropdownContainer.current.contains(target) && buttonOpenRef && !buttonOpenRef?.current?.contains(target)) {
66
+ if (target !== dropdownContainer.current && dropdownContainer && dropdownContainer.current && !dropdownContainer.current.contains(target) && buttonOpenRef && !(buttonOpenRef !== null && buttonOpenRef !== void 0 && (_buttonOpenRef$curren = buttonOpenRef.current) !== null && _buttonOpenRef$curren !== void 0 && _buttonOpenRef$curren.contains(target))) {
64
67
  setShowCalendar(false);
65
68
  }
66
69
  };
@@ -106,7 +109,8 @@ const DatePicker = props => {
106
109
  const onInputChange = function (event) {
107
110
  let valueInput = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
108
111
  if (typeof valueInput === 'string') {
109
- const date = event.target.value ?? '';
112
+ var _event$target$value;
113
+ const date = (_event$target$value = event.target.value) !== null && _event$target$value !== void 0 ? _event$target$value : '';
110
114
  if (props.onChange) {
111
115
  if (isValidDate(date)) {
112
116
  const newValue = (0, _moment.default)(date, _helpers.PT_BR_FORMAT).format(_helpers.EN_US_FORMAT);
@@ -132,9 +136,10 @@ const DatePicker = props => {
132
136
  }
133
137
  };
134
138
  const setValue = function () {
139
+ var _inputRef$current2;
135
140
  let valueParam = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
136
141
  let e = arguments.length > 1 ? arguments[1] : undefined;
137
- if (showCalendar && setFocusOnSelect) inputRef.current?.focus();
142
+ if (showCalendar && setFocusOnSelect) (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
138
143
  if (props.onComplete) props.onComplete(e, valueParam);
139
144
  if (props.onChange) onInputChange({
140
145
  target: {
@@ -179,7 +184,7 @@ const DatePicker = props => {
179
184
  return /*#__PURE__*/_react.default.createElement(_Dialog.default, {
180
185
  dialogSize: dialogSize,
181
186
  handlerClose: setShowCalendar
182
- }, getCalendar(valueState, props?.calendarColorStyle));
187
+ }, getCalendar(valueState, props === null || props === void 0 ? void 0 : props.calendarColorStyle));
183
188
  }
184
189
  return /*#__PURE__*/_react.default.createElement(_Dropdown.default, {
185
190
  topPosition: inputDimensions ? inputDimensions.top + inputDimensions.height + 5 : '',
@@ -189,16 +194,16 @@ const DatePicker = props => {
189
194
  dropdownRef: el => {
190
195
  dropdownContainer.current = el;
191
196
  }
192
- }, getCalendar(valueState, props?.calendarColorStyle));
197
+ }, getCalendar(valueState, props === null || props === void 0 ? void 0 : props.calendarColorStyle));
193
198
  };
194
199
  (0, _react.useEffect)(() => {
195
200
  const screenWidth = window.innerWidth;
196
201
  if (inputDimensions && screenWidth < inputDimensions.left + CALENDAR_MIN_WIDTH) {
197
202
  setFormatedLeftPosition(inputDimensions.left - (CALENDAR_MIN_WIDTH - inputDimensions.width - CALENDAR_BUTTON_WIDTH));
198
203
  } else {
199
- setFormatedLeftPosition(inputDimensions?.left);
204
+ setFormatedLeftPosition(inputDimensions === null || inputDimensions === void 0 ? void 0 : inputDimensions.left);
200
205
  }
201
- }, [window?.innerWidth, inputDimensions]);
206
+ }, [(_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth, inputDimensions]);
202
207
  (0, _react.useEffect)(() => {
203
208
  window.addEventListener('resize', onScreenResize);
204
209
  document.addEventListener('click', onClickOutside);
@@ -228,7 +233,8 @@ const DatePicker = props => {
228
233
  mask: "00/00/0000",
229
234
  onComplete: e => {
230
235
  if (e) {
231
- setValue(e.target?.maskedValue, e);
236
+ var _e$target;
237
+ setValue((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.maskedValue, e);
232
238
  }
233
239
  },
234
240
  onBlur: onInputBlur,
@@ -19,7 +19,7 @@ const ErrorMessage = exports.ErrorMessage = /*#__PURE__*/(0, _react.forwardRef)(
19
19
  return /*#__PURE__*/_react.default.createElement("p", {
20
20
  ref: ref,
21
21
  style: style,
22
- className: `errormessages-component ${customClass}`
22
+ className: "errormessages-component ".concat(customClass)
23
23
  }, messages.join(', '));
24
24
  });
25
25
  ErrorMessage.displayName = 'ErrorMessage';
@@ -27,16 +27,16 @@ const DefaultFile = props => {
27
27
  hint = [],
28
28
  onChange
29
29
  } = props;
30
- const getFilesList = files => !files?.length ? [] : _lodash.default.map(files, file => file);
30
+ const getFilesList = files => !(files !== null && files !== void 0 && files.length) ? [] : _lodash.default.map(files, file => file);
31
31
  const [fileList, setFileList] = (0, _react.useState)(defaultFiles);
32
32
  const ifExistFiles = fileList instanceof Array && fileList.length > 0;
33
33
  const popUpDescription = () => /*#__PURE__*/_react.default.createElement("div", {
34
- className: `size-position-icon ${!ifExistFiles ? '-disabled-popover' : ''}`
34
+ className: "size-position-icon ".concat(!ifExistFiles ? '-disabled-popover' : '')
35
35
  }, /*#__PURE__*/_react.default.createElement(_popover.default, {
36
36
  iconSize: 16
37
37
  }, /*#__PURE__*/_react.default.createElement(_popover.PopoverText, null, /*#__PURE__*/_react.default.createElement("strong", null, "Arquivos"), /*#__PURE__*/_react.default.createElement("br", null), ifExistFiles && fileList.map(file => /*#__PURE__*/_react.default.createElement("div", {
38
38
  className: "list-simple-file",
39
- key: `${file.name}${file.size}`
39
+ key: "".concat(file.name).concat(file.size)
40
40
  }, /*#__PURE__*/_react.default.createElement("div", {
41
41
  className: "file-name"
42
42
  }, /*#__PURE__*/_react.default.createElement("span", null, file.name)))))));
@@ -55,10 +55,11 @@ const DefaultFile = props => {
55
55
  })
56
56
  });
57
57
  const handleChange = e => {
58
- e.preventDefault?.();
58
+ var _e$preventDefault;
59
+ (_e$preventDefault = e.preventDefault) === null || _e$preventDefault === void 0 ? void 0 : _e$preventDefault.call(e);
59
60
  const files = getFilesList(e.target.files);
60
61
  setFileList(files);
61
- onChange?.(files, e);
62
+ onChange === null || onChange === void 0 ? void 0 : onChange(files, e);
62
63
  };
63
64
  return /*#__PURE__*/_react.default.createElement("div", {
64
65
  className: "input-simple-file-container"
@@ -15,7 +15,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
15
15
  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); }
16
16
  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
17
  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); }
18
- const getFilesList = files => !files?.length ? [] : _lodash.default.map(files, file => file);
18
+ const getFilesList = files => !(files !== null && files !== void 0 && files.length) ? [] : _lodash.default.map(files, file => file);
19
19
  const getAcceptFilesLabel = valueAccept => valueAccept.split(',').map(value => value.includes('.') ? value.split('.')[1] : value.split('/')[1]).join(', ');
20
20
  const getAcceptFilesWithoutRemoveText = value => value.split(', ');
21
21
  const DragDropFile = props => {
@@ -49,8 +49,9 @@ const DragDropFile = props => {
49
49
  error: false
50
50
  });
51
51
  const handleDrag = e => {
52
- e.preventDefault?.();
53
- e.stopPropagation?.();
52
+ var _e$preventDefault, _e$stopPropagation;
53
+ (_e$preventDefault = e.preventDefault) === null || _e$preventDefault === void 0 ? void 0 : _e$preventDefault.call(e);
54
+ (_e$stopPropagation = e.stopPropagation) === null || _e$stopPropagation === void 0 ? void 0 : _e$stopPropagation.call(e);
54
55
  };
55
56
  const checkTypeNotAccept = (types, getTypesArray, e) => {
56
57
  setTypeNotAccept(false);
@@ -71,7 +72,7 @@ const DragDropFile = props => {
71
72
  setMessage({
72
73
  class: 'disapprovedFile',
73
74
  text: 'Por favor, verifique a extensão do(s) arquivo(s) inserido(s).',
74
- subtitle: `Apenas as extensões ${getAcceptFilesLabel(accept)} são permitidas.`,
75
+ subtitle: "Apenas as extens\xF5es ".concat(getAcceptFilesLabel(accept), " s\xE3o permitidas."),
75
76
  error: true
76
77
  });
77
78
  } else {
@@ -101,7 +102,7 @@ const DragDropFile = props => {
101
102
  checkTypeNotAccept(arrayTypes, getTypesArray, e);
102
103
  handleDrag(e);
103
104
  setDragActive(true);
104
- onDragEnter?.(e);
105
+ onDragEnter === null || onDragEnter === void 0 ? void 0 : onDragEnter(e);
105
106
  };
106
107
  const handleDragLeave = e => {
107
108
  setMessage({
@@ -112,11 +113,11 @@ const DragDropFile = props => {
112
113
  });
113
114
  handleDrag(e);
114
115
  setDragActive(false);
115
- onDragLeave?.(e);
116
+ onDragLeave === null || onDragLeave === void 0 ? void 0 : onDragLeave(e);
116
117
  };
117
118
  const handleDragOver = e => {
118
119
  handleDrag(e);
119
- onDragOver?.(e);
120
+ onDragOver === null || onDragOver === void 0 ? void 0 : onDragOver(e);
120
121
  };
121
122
  const handleDrop = e => {
122
123
  handleDrag(e);
@@ -134,8 +135,8 @@ const DragDropFile = props => {
134
135
  return !ids.includes(name, index + 1);
135
136
  });
136
137
  setFileList(filtered);
137
- onChange?.(files, e);
138
- onDrop?.(e);
138
+ onChange === null || onChange === void 0 ? void 0 : onChange(files, e);
139
+ onDrop === null || onDrop === void 0 ? void 0 : onDrop(e);
139
140
  }
140
141
  }
141
142
  setMessage({
@@ -146,7 +147,8 @@ const DragDropFile = props => {
146
147
  });
147
148
  };
148
149
  const handleChange = e => {
149
- e.preventDefault?.();
150
+ var _e$preventDefault2;
151
+ (_e$preventDefault2 = e.preventDefault) === null || _e$preventDefault2 === void 0 ? void 0 : _e$preventDefault2.call(e);
150
152
  const files = getFilesList(e.target.files);
151
153
  if (files.length > 0 && !typeNotAccept) {
152
154
  const fileNoRepeat = fileList.concat(files);
@@ -158,7 +160,7 @@ const DragDropFile = props => {
158
160
  return !ids.includes(name, index + 1);
159
161
  });
160
162
  setFileList(filesFiltered);
161
- onChange?.(files, e);
163
+ onChange === null || onChange === void 0 ? void 0 : onChange(files, e);
162
164
  }
163
165
  };
164
166
  const onButtonClickRemoveAll = () => setFileList([]);
@@ -166,7 +168,7 @@ const DragDropFile = props => {
166
168
  setFileList(prevState => prevState.filter(file => file.name !== fileName));
167
169
  };
168
170
  const generateListArray = () => {
169
- if (fileList?.length === 1) {
171
+ if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) === 1) {
170
172
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, fileList[0].type === 'image/jpeg' || fileList[0].type === 'image/png' ? /*#__PURE__*/_react.default.createElement("img", {
171
173
  alt: fileList[0].name,
172
174
  src: URL.createObjectURL(fileList[0])
@@ -184,7 +186,7 @@ const DragDropFile = props => {
184
186
  return /*#__PURE__*/_react.default.createElement("ul", {
185
187
  className: "file-list"
186
188
  }, fileList.length > 0 && fileList.map(file => /*#__PURE__*/_react.default.createElement("li", {
187
- key: `${file.name}${file.size}`,
189
+ key: "".concat(file.name).concat(file.size),
188
190
  className: "file-card"
189
191
  }, /*#__PURE__*/_react.default.createElement(_buttons.DangerButton, {
190
192
  transparent: true,
@@ -212,9 +214,9 @@ const DragDropFile = props => {
212
214
  onDragEnter: handleDragEnter,
213
215
  onSubmit: e => e.preventDefault()
214
216
  }, /*#__PURE__*/_react.default.createElement("div", {
215
- className: `drag-content ${skeletonize ? '-skeletonized' : ''}`
217
+ className: "drag-content ".concat(skeletonize ? '-skeletonized' : '')
216
218
  }, /*#__PURE__*/_react.default.createElement("div", {
217
- className: `${message.class} ${!skeletonize ? 'content' : ''}`
219
+ className: "".concat(message.class, " ").concat(!skeletonize ? 'content' : '')
218
220
  }, message.error || fileList.length === 0 ? /*#__PURE__*/_react.default.createElement("label", {
219
221
  htmlFor: id
220
222
  }, /*#__PURE__*/_react.default.createElement("h1", {
@@ -26,7 +26,8 @@ const File = _ref => {
26
26
  rest = _objectWithoutProperties(_ref, _excluded);
27
27
  const inputFileRef = (0, _react.useRef)(null);
28
28
  const onBtnClickInsert = () => {
29
- inputFileRef.current?.click();
29
+ var _inputFileRef$current;
30
+ (_inputFileRef$current = inputFileRef.current) === null || _inputFileRef$current === void 0 ? void 0 : _inputFileRef$current.click();
30
31
  };
31
32
  const onBtnClickRemove = () => {
32
33
  if (inputFileRef.current) {
@@ -35,10 +36,10 @@ const File = _ref => {
35
36
  if (onBtnClickRemoveProp) onBtnClickRemoveProp();
36
37
  };
37
38
  (0, _react.useEffect)(() => {
38
- if (inputFileRef?.current && defaultFiles) {
39
+ if (inputFileRef !== null && inputFileRef !== void 0 && inputFileRef.current && defaultFiles) {
39
40
  inputFileRef.current.files = (0, _helpers.transformFilesToFileList)(defaultFiles);
40
41
  }
41
- }, [inputFileRef?.current]);
42
+ }, [inputFileRef === null || inputFileRef === void 0 ? void 0 : inputFileRef.current]);
42
43
  const component = applyDragDrop ? /*#__PURE__*/_react.default.createElement(_DragDropFile.default, _extends({}, rest, {
43
44
  defaultFiles: defaultFiles,
44
45
  inputRef: inputFileRef,
@@ -149,7 +149,7 @@ const BaseMask = _ref => {
149
149
  }
150
150
  });
151
151
  (0, _react.useEffect)(() => {
152
- if (typeof valueProp === 'number') setTypedValue(valueProp);else setValue(valueProp ?? '');
152
+ if (typeof valueProp === 'number') setTypedValue(valueProp);else setValue(valueProp !== null && valueProp !== void 0 ? valueProp : '');
153
153
  }, [valueProp]);
154
154
  return /*#__PURE__*/_react.default.createElement(_InputTextBase.default, _extends({
155
155
  inputRef: r => {
@@ -42,7 +42,7 @@ declare const getMaskOptions: ({ isDateField, placeholderChar, min, max, lazy, p
42
42
  mask?: any;
43
43
  hint?: string | string[] | undefined;
44
44
  hintPosition?: "below" | "onLabelRight" | undefined;
45
- themePopover?: "light" | "dark" | undefined;
45
+ themePopover?: "dark" | "light" | undefined;
46
46
  popoverAlign?: "left" | "right" | undefined;
47
47
  placeholderChar: string;
48
48
  min: any;