linear-react-components-ui 1.1.20-beta.27 → 1.1.20-beta.29

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 (128) hide show
  1. package/lib/alerts/BaseAlert.js +1 -1
  2. package/lib/alerts/Message.js +1 -1
  3. package/lib/avatar/index.js +9 -8
  4. package/lib/badge/index.js +4 -4
  5. package/lib/buttons/DangerButton.js +1 -1
  6. package/lib/buttons/DefaultButton.js +12 -4
  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/index.js +1 -1
  18. package/lib/dialog/Custom.js +1 -1
  19. package/lib/dialog/Question.js +2 -4
  20. package/lib/dialog/base/Content.js +1 -1
  21. package/lib/dialog/base/Header.js +2 -2
  22. package/lib/dialog/base/index.js +4 -5
  23. package/lib/dialog/form/index.js +1 -1
  24. package/lib/dialog/wizard/progressbar.js +1 -1
  25. package/lib/dialog/wizard/step.js +1 -1
  26. package/lib/drawer/Drawer.js +3 -3
  27. package/lib/drawer/Header.js +1 -1
  28. package/lib/dropdown/Popup.js +6 -6
  29. package/lib/dropdown/helper.js +1 -1
  30. package/lib/dropdown/withDropdown.js +2 -2
  31. package/lib/fieldset/index.js +7 -7
  32. package/lib/form/FieldArray.js +1 -1
  33. package/lib/form/FieldNumber.js +3 -3
  34. package/lib/form/FieldPeriod.js +2 -2
  35. package/lib/form/index.js +2 -2
  36. package/lib/gridlayout/GridCol.js +5 -5
  37. package/lib/gridlayout/GridRow.js +4 -1
  38. package/lib/hint/index.js +7 -1
  39. package/lib/icons/index.js +24 -27
  40. package/lib/inputs/base/InputTextBase.js +6 -8
  41. package/lib/inputs/base/Label.js +1 -1
  42. package/lib/inputs/base/helpers.js +7 -3
  43. package/lib/inputs/date/helpers.js +4 -1
  44. package/lib/inputs/date/index.js +9 -15
  45. package/lib/inputs/errorMessage/index.js +1 -1
  46. package/lib/inputs/file/DefaultFile.js +5 -6
  47. package/lib/inputs/file/DragDropFile.js +15 -17
  48. package/lib/inputs/file/File.js +3 -4
  49. package/lib/inputs/mask/BaseMask.js +1 -2
  50. package/lib/inputs/multiSelect/Dropdown.js +9 -10
  51. package/lib/inputs/multiSelect/helper.js +1 -2
  52. package/lib/inputs/multiSelect/index.js +7 -9
  53. package/lib/inputs/number/index.js +1 -1
  54. package/lib/inputs/period/PeriodList.js +1 -1
  55. package/lib/inputs/period/helper.js +3 -1
  56. package/lib/inputs/period/index.js +9 -14
  57. package/lib/inputs/search/index.js +1 -1
  58. package/lib/inputs/select/Dropdown.js +1 -1
  59. package/lib/inputs/select/helper.js +10 -13
  60. package/lib/inputs/select/multiple/Selecteds.js +1 -1
  61. package/lib/inputs/select/multiple/index.js +9 -14
  62. package/lib/inputs/select/simple/index.js +10 -17
  63. package/lib/inputs/textarea/index.js +1 -1
  64. package/lib/internals/withTooltip.js +9 -9
  65. package/lib/labelMessages/index.js +4 -3
  66. package/lib/labels/DefaultLabel.js +4 -1
  67. package/lib/labels/label_container/index.js +1 -1
  68. package/lib/list/Header.js +1 -1
  69. package/lib/list/Item.js +9 -7
  70. package/lib/list/index.js +2 -1
  71. package/lib/menus/float/MenuItem.js +2 -2
  72. package/lib/menus/float/SubMenuContainer.js +1 -1
  73. package/lib/menus/float/index.js +1 -1
  74. package/lib/menus/sidenav/ExpandMenu.js +1 -1
  75. package/lib/menus/sidenav/NavMenuGroup.js +1 -1
  76. package/lib/menus/sidenav/NavMenuItem.js +7 -9
  77. package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
  78. package/lib/menus/sidenav/helpers.js +1 -1
  79. package/lib/menus/sidenav/index.js +39 -31
  80. package/lib/menus/sidenav/types.d.ts +1 -0
  81. package/lib/panel/Content.js +5 -7
  82. package/lib/panel/Default.js +2 -2
  83. package/lib/panel/Header.js +3 -3
  84. package/lib/permissionValidations.js +1 -1
  85. package/lib/popover/index.js +1 -1
  86. package/lib/progress/Bar.js +6 -6
  87. package/lib/radio/index.js +2 -2
  88. package/lib/shortcuts/index.js +1 -1
  89. package/lib/skeleton/SkeletonContainer.js +2 -1
  90. package/lib/skeleton/index.js +4 -1
  91. package/lib/spinner/index.js +2 -2
  92. package/lib/split/Split.js +1 -1
  93. package/lib/split/SplitSide.js +3 -3
  94. package/lib/table/Body.js +3 -3
  95. package/lib/table/Header.js +8 -11
  96. package/lib/table/HeaderColumn.js +1 -1
  97. package/lib/table/Row.js +3 -3
  98. package/lib/table/RowColumn.js +1 -1
  99. package/lib/table/index.js +6 -1
  100. package/lib/tabs/DropdownTabs.js +1 -1
  101. package/lib/tabs/Menu.js +1 -1
  102. package/lib/tabs/MenuTabs.js +2 -2
  103. package/lib/tabs/Panel.js +5 -7
  104. package/lib/tabs/context.js +3 -6
  105. package/lib/textContent/index.js +1 -1
  106. package/lib/toolbar/ButtonBar.js +1 -1
  107. package/lib/toolbar/index.js +1 -1
  108. package/lib/tooltip/index.js +7 -7
  109. package/lib/treetable/Body.js +1 -1
  110. package/lib/treetable/Header.js +2 -2
  111. package/lib/treetable/Row.d.ts +1 -1
  112. package/lib/treetable/Row.js +12 -16
  113. package/lib/treetable/helpers.d.ts +1 -1
  114. package/lib/treetable/index.d.ts +2 -2
  115. package/lib/treeview/Header.js +1 -1
  116. package/lib/treeview/Node.js +5 -5
  117. package/lib/treeview/index.js +4 -4
  118. package/lib/{types.d-b477e076.d.ts → types.d-73cece43.d.ts} +0 -1
  119. package/lib/uitour/index.js +6 -8
  120. package/package.json +1 -1
  121. package/lib/checkbox/Label.js +0 -31
  122. package/lib/inputs/mask/imaskHOC.js +0 -203
  123. package/lib/menus/sidenav/popup_menu_help/index.js +0 -85
  124. package/lib/tabs/DropdownItems.js +0 -62
  125. package/lib/tabs/MenuItems.js +0 -70
  126. package/lib/treeview_old/Header.js +0 -29
  127. package/lib/treeview_old/Node.js +0 -68
  128. package/lib/treeview_old/index.js +0 -43
@@ -26,7 +26,7 @@ const BaseAlert = _ref => {
26
26
  alert.appendChild(messageContainerEl);
27
27
  }
28
28
  return () => {
29
- alert === null || alert === void 0 ? void 0 : alert.removeChild(messageContainerEl);
29
+ alert?.removeChild(messageContainerEl);
30
30
  };
31
31
  }, []);
32
32
  return /*#__PURE__*/_reactDom.default.createPortal(children, messageContainerEl);
@@ -15,7 +15,7 @@ const getClass = _ref => {
15
15
  customClass,
16
16
  className
17
17
  } = _ref;
18
- return "".concat(className, " ").concat(customClass);
18
+ return `${className} ${customClass}`;
19
19
  };
20
20
  const getIcon = (icon, iconName, color) => {
21
21
  if (icon !== null) {
@@ -23,7 +23,8 @@ const getClass = _ref => {
23
23
  disabled,
24
24
  size = 'default'
25
25
  } = _ref;
26
- return "avatar-component ".concat(className).concat(disabled && '-disabled', " \n ").concat(square && '-square', " ").concat(size && "-".concat(size));
26
+ return `avatar-component ${className}${disabled && '-disabled'}
27
+ ${square && '-square'} ${size && `-${size}`}`;
27
28
  };
28
29
  const getIcon = (iconName, icon) => {
29
30
  if (icon) {
@@ -70,18 +71,18 @@ const Avatar = props => {
70
71
  if (targetRef) targetRef(r);
71
72
  dropdownRef.current = r;
72
73
  },
73
- className: "".concat(getClass(props), " ").concat(customClass),
74
+ className: `${getClass(props)} ${customClass}`,
74
75
  style: _objectSpread({
75
- width: "".concat(width),
76
- height: "".concat(height),
77
- backgroundColor: "".concat(color),
78
- cursor: "".concat(dropdown ? 'pointer' : 'normal')
76
+ width: `${width}`,
77
+ height: `${height}`,
78
+ backgroundColor: `${color}`,
79
+ cursor: `${dropdown ? 'pointer' : 'normal'}`
79
80
  }, style)
80
81
  }, (iconName || icon) && !src && getIcon(iconName, icon), src && /*#__PURE__*/_react.default.createElement("img", {
81
82
  className: "imgavatar",
82
83
  style: {
83
- width: "".concat(width),
84
- height: "".concat(height)
84
+ width: `${width}`,
85
+ height: `${height}`
85
86
  },
86
87
  src: src,
87
88
  alt: srcAlt
@@ -18,12 +18,12 @@ const Badge = props => {
18
18
  right = '-11px'
19
19
  } = props;
20
20
  return /*#__PURE__*/_react.default.createElement("div", {
21
- className: "badge-component ".concat(customClass)
21
+ className: `badge-component ${customClass}`
22
22
  }, children, /*#__PURE__*/_react.default.createElement("span", {
23
- className: "badge -".concat(color, " ").concat(customClassForBadge),
23
+ className: `badge -${color} ${customClassForBadge}`,
24
24
  style: {
25
- top: "".concat(top),
26
- right: "".concat(right)
25
+ top: `${top}`,
26
+ right: `${right}`
27
27
  }
28
28
  }, content));
29
29
  };
@@ -17,7 +17,7 @@ const DangerButton = _ref => {
17
17
  } = _ref,
18
18
  rest = _objectWithoutProperties(_ref, _excluded);
19
19
  return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({
20
- customClass: "-danger ".concat(customClass)
20
+ customClass: `-danger ${customClass}`
21
21
  }, rest));
22
22
  };
23
23
  var _default = exports.default = DangerButton;
@@ -72,7 +72,16 @@ const DefaultButton = _ref => {
72
72
  const {
73
73
  handlerSetOnDeniedText
74
74
  } = (0, _react.useContext)(_withTooltip.TooltipContext);
75
- const getClass = () => "button-component ".concat(className, "\n ").concat(customClass, "\n ").concat(transparent && '-transparent', "\n ").concat(isDisabled && '-disabled', "\n ").concat(size && "-".concat(size), "\n ").concat(dropdown && !round && 'icon-right', "\n ").concat(dropdown && round && 'icon-center', "\n ").concat(iconAlign && !dropdown && "icon-".concat(iconAlign), "\n ").concat(boxShadow ? '' : '-shadowsdisabled', "\n ").concat(round && '-round');
75
+ const getClass = () => `button-component ${className}
76
+ ${customClass}
77
+ ${transparent && '-transparent'}
78
+ ${isDisabled && '-disabled'}
79
+ ${size && `-${size}`}
80
+ ${dropdown && !round && 'icon-right'}
81
+ ${dropdown && round && 'icon-center'}
82
+ ${iconAlign && !dropdown && `icon-${iconAlign}`}
83
+ ${boxShadow ? '' : '-shadowsdisabled'}
84
+ ${round && '-round'}`;
76
85
  const returnPadlockIcon = resultantStyle => /*#__PURE__*/_react.default.createElement(_icons.default, {
77
86
  name: "padlock",
78
87
  size: 16,
@@ -128,11 +137,10 @@ const DefaultButton = _ref => {
128
137
  style: style,
129
138
  onKeyDown: e => {
130
139
  if (e && (e.key === 'Enter' || e.key === ' ')) {
131
- var _refButton$current;
132
140
  e.preventDefault();
133
141
  e.stopPropagation();
134
142
  if (isDisabled) return;
135
- if (onClick) refButton === null || refButton === void 0 ? void 0 : (_refButton$current = refButton.current) === null || _refButton$current === void 0 ? void 0 : _refButton$current.click();
143
+ if (onClick) refButton?.current?.click();
136
144
  if (dropdown && showDropdown) showDropdown();
137
145
  if (onClick && toggleable) setActiveButton(!activeButton);
138
146
  }
@@ -145,7 +153,7 @@ const DefaultButton = _ref => {
145
153
  if (dropdown && showDropdown) showDropdown();
146
154
  if (onClick && toggleable) setActiveButton(!activeButton);
147
155
  },
148
- className: "".concat(getClass(), " ").concat(activeButton ? '-toggleable' : '', " ").concat(skeletonize ? '-skeletonized' : ''),
156
+ className: `${getClass()} ${activeButton ? '-toggleable' : ''} ${skeletonize ? '-skeletonized' : ''}`,
149
157
  ref: r => {
150
158
  if (buttonRef) {
151
159
  if (!_lodash.default.isFunction(buttonRef)) {
@@ -17,7 +17,7 @@ const InfoButton = _ref => {
17
17
  } = _ref,
18
18
  rest = _objectWithoutProperties(_ref, _excluded);
19
19
  return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({
20
- customClass: "-info ".concat(customClass)
20
+ customClass: `-info ${customClass}`
21
21
  }, rest));
22
22
  };
23
23
  var _default = exports.default = InfoButton;
@@ -17,7 +17,7 @@ const PrimaryButton = _ref => {
17
17
  } = _ref,
18
18
  rest = _objectWithoutProperties(_ref, _excluded);
19
19
  return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({
20
- customClass: "-primary ".concat(customClass)
20
+ customClass: `-primary ${customClass}`
21
21
  }, rest));
22
22
  };
23
23
  var _default = exports.default = PrimaryButton;
@@ -17,7 +17,7 @@ const SuccessButton = _ref => {
17
17
  } = _ref,
18
18
  rest = _objectWithoutProperties(_ref, _excluded);
19
19
  return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({}, rest, {
20
- customClass: "-success ".concat(customClass)
20
+ customClass: `-success ${customClass}`
21
21
  }));
22
22
  };
23
23
  var _default = exports.default = SuccessButton;
@@ -17,7 +17,7 @@ const WarningButton = _ref => {
17
17
  } = _ref,
18
18
  rest = _objectWithoutProperties(_ref, _excluded);
19
19
  return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({}, rest, {
20
- customClass: "-warning ".concat(customClass)
20
+ customClass: `-warning ${customClass}`
21
21
  }));
22
22
  };
23
23
  var _default = exports.default = WarningButton;
@@ -23,7 +23,7 @@ const ButtonContainer = _ref => {
23
23
  } = _ref;
24
24
  return /*#__PURE__*/_react.default.createElement("div", {
25
25
  "data-testid": "button-container",
26
- className: "btn-container ".concat(customClass),
26
+ className: `btn-container ${customClass}`,
27
27
  style: getStyles(style, position)
28
28
  }, children);
29
29
  };
@@ -37,7 +37,7 @@ const SplitButton = props => {
37
37
  }
38
38
  })), /*#__PURE__*/_react.default.createElement(_DefaultButton.default, _extends({}, splitProps, {
39
39
  iconName: "down",
40
- customClass: "".concat(customClass, " -transparenttext"),
40
+ customClass: `${customClass} -transparenttext`,
41
41
  iconStyle: {
42
42
  marginRight: -7,
43
43
  marginLeft: 0
@@ -25,7 +25,7 @@ const Day = _ref => {
25
25
  onClick: () => {
26
26
  if (handleDateChange) handleDateChange(day);
27
27
  },
28
- customClass: " ".concat((0, _helpers.getDayCssClass)(currentDate, day), " numberdaycalendar"),
28
+ customClass: ` ${(0, _helpers.getDayCssClass)(currentDate, day)} numberdaycalendar`,
29
29
  label: day.format('D')
30
30
  }));
31
31
  };
@@ -21,7 +21,7 @@ const Month = _ref => {
21
21
  const week = /*#__PURE__*/_react.default.createElement(_Week.default, {
22
22
  currentDate: currentDate,
23
23
  weekStartDate: startOfWeek,
24
- key: "week-".concat(startOfWeek.format('YYYYMMDD'))
24
+ key: `week-${startOfWeek.format('YYYYMMDD')}`
25
25
  });
26
26
  weeks = [...weeks, week];
27
27
  weekIndex += 1;
@@ -89,8 +89,8 @@ function getCalendarCssClass(_ref) {
89
89
  customClass,
90
90
  colorStyle
91
91
  } = _ref;
92
- let cssClass = "calendar-component ".concat(customClass);
93
- cssClass += " -".concat(colorStyle);
92
+ let cssClass = `calendar-component ${customClass}`;
93
+ cssClass += ` -${colorStyle}`;
94
94
  cssClass += unpadding ? ' -unpadding' : '';
95
95
  cssClass += drawGridLines ? ' -draw-grid-lines' : '';
96
96
  return cssClass;
@@ -71,7 +71,7 @@ const Calendar = props => {
71
71
  })), /*#__PURE__*/_react.default.createElement("div", {
72
72
  className: "daynames"
73
73
  }, (0, _helpers.dayNames)().map(name => /*#__PURE__*/_react.default.createElement("div", {
74
- key: "day-".concat(name)
74
+ key: `day-${name}`
75
75
  }, name))), /*#__PURE__*/_react.default.createElement(_Month.default, {
76
76
  currentDate: dataAtual
77
77
  })));
@@ -69,7 +69,7 @@ const CheckBox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
69
69
  onClick: () => {
70
70
  if (!shouldDisable() && !skeletonize) {
71
71
  setIsChecked(!isChecked);
72
- onChange === null || onChange === void 0 ? void 0 : onChange({
72
+ onChange?.({
73
73
  target
74
74
  });
75
75
  }
@@ -50,7 +50,7 @@ const Custom = props => {
50
50
  }, props.text)), props.buttons && props.buttons.length > 0 && /*#__PURE__*/_react.default.createElement(_Footer.default, props, /*#__PURE__*/_react.default.createElement(_buttons.ButtonContainer, {
51
51
  position: "right"
52
52
  }, props.buttons.map(button => /*#__PURE__*/_react.default.cloneElement(button, {
53
- key: "button-".concat(uuid.v1())
53
+ key: `button-${uuid.v1()}`
54
54
  })))));
55
55
  };
56
56
  var _default = exports.default = Custom;
@@ -37,14 +37,12 @@ const Question = props => {
37
37
  (0, _react.useLayoutEffect)(() => {
38
38
  const lastElementActive = document.activeElement;
39
39
  return () => {
40
- var _lastElementActive$fo;
41
- lastElementActive === null || lastElementActive === void 0 ? void 0 : (_lastElementActive$fo = lastElementActive.focus) === null || _lastElementActive$fo === void 0 ? void 0 : _lastElementActive$fo.call(lastElementActive);
40
+ lastElementActive?.focus?.();
42
41
  };
43
42
  }, [visible]);
44
43
  (0, _react.useEffect)(() => {
45
- var _buttonUnconfirm$focu;
46
44
  const buttonUnconfirm = document.getElementById(idUnconfirm);
47
- buttonUnconfirm === null || buttonUnconfirm === void 0 ? void 0 : (_buttonUnconfirm$focu = buttonUnconfirm.focus) === null || _buttonUnconfirm$focu === void 0 ? void 0 : _buttonUnconfirm$focu.call(buttonUnconfirm);
45
+ buttonUnconfirm?.focus?.();
48
46
  }, [visible, document.activeElement]);
49
47
  if (!visible) return null;
50
48
  return /*#__PURE__*/_react.default.createElement(_Custom.default, _extends({}, props, {
@@ -15,7 +15,7 @@ const Content = _ref => {
15
15
  } = _ref;
16
16
  return /*#__PURE__*/_react.default.createElement("div", {
17
17
  id: "modal-dialog-content",
18
- className: "dialog-content ".concat(className),
18
+ className: `dialog-content ${className}`,
19
19
  style: styleForContent
20
20
  }, children);
21
21
  };
@@ -46,10 +46,10 @@ const Header = _ref => {
46
46
  tabIndex: -1,
47
47
  onFocus: () => {},
48
48
  onBlur: () => {},
49
- ref: formDialogContext === null || formDialogContext === void 0 ? void 0 : formDialogContext.headerRef,
49
+ ref: formDialogContext?.headerRef,
50
50
  className: "dialog-header"
51
51
  }, /*#__PURE__*/_react.default.createElement("div", {
52
- className: "".concat(icon !== null || titleIcon !== null ? 'left' : '')
52
+ className: `${icon !== null || titleIcon !== null ? 'left' : ''}`
53
53
  }, getIcon(titleIcon, icon)), /*#__PURE__*/_react.default.createElement("div", {
54
54
  className: "right"
55
55
  }, /*#__PURE__*/_react.default.createElement("h5", {
@@ -58,7 +58,7 @@ const BaseDialog = props => {
58
58
  }
59
59
  };
60
60
  const handleCloseOnEsc = event => {
61
- if ((event === null || event === void 0 ? void 0 : event.key) === 'Escape') {
61
+ if (event?.key === 'Escape') {
62
62
  event.stopPropagation();
63
63
  handleClose();
64
64
  }
@@ -77,7 +77,7 @@ const BaseDialog = props => {
77
77
  let y = positionY <= 0 ? 0 : positionY;
78
78
  if (x + width >= window.innerWidth) x = window.innerWidth - width;
79
79
  if (y + height >= window.innerHeight) y = window.innerHeight - height;
80
- wrapperEl.current.style.transform = "translate(".concat(x, "px, ").concat(y, "px)");
80
+ wrapperEl.current.style.transform = `translate(${x}px, ${y}px)`;
81
81
  wrapperEl.current.style.transition = 'none';
82
82
  wrapperEl.current.style.left = '0';
83
83
  wrapperEl.current.style.top = '0';
@@ -97,9 +97,8 @@ const BaseDialog = props => {
97
97
  }
98
98
  };
99
99
  const onMouseDown = event => {
100
- var _headerRef$current;
101
100
  const element = event.target;
102
- const isHeader = headerRef === null || headerRef === void 0 ? void 0 : (_headerRef$current = headerRef.current) === null || _headerRef$current === void 0 ? void 0 : _headerRef$current.contains(element);
101
+ const isHeader = headerRef?.current?.contains(element);
103
102
  if (wrapperEl.current && isHeader) setIsDragging(true);
104
103
  };
105
104
  const onMouseUp = () => {
@@ -116,7 +115,7 @@ const BaseDialog = props => {
116
115
  className: "modal-overlay",
117
116
  "data-testid": "modal-overlay"
118
117
  }), /*#__PURE__*/_react.default.createElement("div", {
119
- className: "dialog ".concat(className),
118
+ className: `dialog ${className}`,
120
119
  "data-testid": "dialog-component"
121
120
  }, /*#__PURE__*/_react.default.createElement("div", {
122
121
  className: wrapperClassName,
@@ -60,7 +60,7 @@ const ModalForm = props => {
60
60
  height: height
61
61
  }, props, {
62
62
  className: className,
63
- wrapperClassName: "dialog-form-wrapper ".concat(wrapperClassName)
63
+ wrapperClassName: `dialog-form-wrapper ${wrapperClassName}`
64
64
  }), props.title && /*#__PURE__*/_react.default.createElement("div", {
65
65
  className: "header-form"
66
66
  }, /*#__PURE__*/_react.default.createElement(_Header.default, {
@@ -19,7 +19,7 @@ function Progressbar(_ref) {
19
19
  currentStep
20
20
  } = context;
21
21
  return /*#__PURE__*/_react.default.createElement("div", {
22
- className: "wizard-progresbar ".concat(customClass),
22
+ className: `wizard-progresbar ${customClass}`,
23
23
  style: customStyle
24
24
  }, stepsTitle.map(step => /*#__PURE__*/_react.default.createElement("div", {
25
25
  key: step.number,
@@ -16,7 +16,7 @@ function WizardStep(_ref) {
16
16
  const context = (0, _.useWizardContext)();
17
17
  if (!context) throw new Error('WizardStep must be used within a Wizard component');
18
18
  return /*#__PURE__*/_react.default.createElement("div", {
19
- className: "wizard-step-component ".concat(customClass),
19
+ className: `wizard-step-component ${customClass}`,
20
20
  style: customStyle
21
21
  }, children);
22
22
  }
@@ -83,7 +83,7 @@ const BaseDrawer = _ref => {
83
83
  };
84
84
  const closeDrawerOnEsc = e => {
85
85
  if (closeOnEsc && e.key === 'Escape') {
86
- handlerClose === null || handlerClose === void 0 ? void 0 : handlerClose();
86
+ handlerClose?.();
87
87
  e.stopPropagation();
88
88
  }
89
89
  };
@@ -124,12 +124,12 @@ const BaseDrawer = _ref => {
124
124
  value: contextValues
125
125
  }, /*#__PURE__*/_react.default.createElement("div", {
126
126
  "data-testid": "drawercontainer-component",
127
- className: "".concat(position, " ").concat(customClass),
127
+ className: `${position} ${customClass}`,
128
128
  style: style
129
129
  }, /*#__PURE__*/_react.default.createElement("div", {
130
130
  style: overlayStyle,
131
131
  "data-testid": "drawercontent",
132
- className: "drawercontent ".concat(skeletonize ? '-skeletonized' : '', " ").concat(customClassForContent)
132
+ className: `drawercontent ${skeletonize ? '-skeletonized' : ''} ${customClassForContent}`
133
133
  }, title && /*#__PURE__*/_react.default.createElement(_.DrawerHeader, _extends({}, headerProps, {
134
134
  customClass: customClassForDrawer
135
135
  })), content ? /*#__PURE__*/_react.default.createElement(_.DrawerContent, null, content) : children, getSpinner())));
@@ -61,7 +61,7 @@ const Header = _ref => {
61
61
  };
62
62
  const checkHandlerClose = () => handlerClose ? handlerClose() : undefined;
63
63
  return /*#__PURE__*/_react.default.createElement("div", {
64
- className: "drawerheader ".concat(customClass),
64
+ className: `drawerheader ${customClass}`,
65
65
  "data-testid": "drawerheader"
66
66
  }, /*#__PURE__*/_react.default.createElement("div", {
67
67
  className: "left"
@@ -20,11 +20,11 @@ const getCalendarDropdownStyle = _ref => {
20
20
  isFloatMenu,
21
21
  minWidth
22
22
  } = _ref;
23
- let style = "top: ".concat(topPosition + (isFloatMenu ? 6 : 2), "px; min-width: ").concat(minWidth, "px;");
23
+ let style = `top: ${topPosition + (isFloatMenu ? 6 : 2)}px; min-width: ${minWidth}px;`;
24
24
  if (align === 'left') {
25
- style += "left: ".concat(leftPosition, "px;");
25
+ style += `left: ${leftPosition}px;`;
26
26
  } else if (align === 'right') {
27
- style += "right: ".concat(rightPosition, "px;");
27
+ style += `right: ${rightPosition}px;`;
28
28
  }
29
29
  return style;
30
30
  };
@@ -42,7 +42,7 @@ const DropdownPopup = _ref2 => {
42
42
  } = _ref2,
43
43
  props = _objectWithoutProperties(_ref2, _excluded);
44
44
  const popup = (0, _react.useRef)(document.createElement('div'));
45
- popup.current.className = "dropdown-component ".concat(customClassForDropdown);
45
+ popup.current.className = `dropdown-component ${customClassForDropdown}`;
46
46
  popup.current.dataset.testid = 'dropdown-component';
47
47
  popup.current.style.cssText = getCalendarDropdownStyle({
48
48
  topPosition,
@@ -55,11 +55,11 @@ const DropdownPopup = _ref2 => {
55
55
  if (popup && popup.current) {
56
56
  const modalContainers = document.body.getElementsByClassName('modalcontainer');
57
57
  const lastModalContainer = modalContainers[modalContainers.length - 1];
58
- popup.current.style.zIndex = "".concat(modalContainers.length ? Number(lastModalContainer.style.zIndex) + 1 : 99999);
58
+ popup.current.style.zIndex = `${modalContainers.length ? Number(lastModalContainer.style.zIndex) + 1 : 99999}`;
59
59
  }
60
60
  (0, _react.useEffect)(() => {
61
61
  body.appendChild(popup.current);
62
- popup.current.id = id || "dropdown-component-".concat((0, _uuid.v1)());
62
+ popup.current.id = id || `dropdown-component-${(0, _uuid.v1)()}`;
63
63
  return () => {
64
64
  body.removeChild(popup.current);
65
65
  };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getDropdownItemCssClass = exports.contentClass = void 0;
7
- const contentClass = showClearButton => "content ".concat(showClearButton ? '' : 'noclear');
7
+ const contentClass = showClearButton => `content ${showClearButton ? '' : 'noclear'}`;
8
8
  exports.contentClass = contentClass;
9
9
  const getDropdownItemCssClass = (selected, disabled, striped) => {
10
10
  let className = 'item';
@@ -38,7 +38,7 @@ const withDropdown = WrappedComponent => {
38
38
  const {
39
39
  target
40
40
  } = event;
41
- if (popupRef !== null && popupRef !== void 0 && popupRef.current && target !== (popupRef === null || popupRef === void 0 ? void 0 : popupRef.current) && !event.composedPath().includes(popupRef.current) && wrappedComponentRef.current !== target) {
41
+ if (popupRef?.current && target !== popupRef?.current && !event.composedPath().includes(popupRef.current) && wrappedComponentRef.current !== target) {
42
42
  setOpened(false);
43
43
  }
44
44
  };
@@ -86,7 +86,7 @@ const withDropdown = WrappedComponent => {
86
86
  value: contextValues
87
87
  }, /*#__PURE__*/_react.default.createElement(WrappedComponent, _extends({}, props, newProps)));
88
88
  };
89
- EnhancedComponent.displayName = "withDropdown(".concat(getDisplayName(WrappedComponent), ")");
89
+ EnhancedComponent.displayName = `withDropdown(${getDisplayName(WrappedComponent)})`;
90
90
  return EnhancedComponent;
91
91
  };
92
92
  var _default = exports.default = withDropdown;
@@ -43,9 +43,9 @@ const Fieldset = props => {
43
43
  customClass,
44
44
  hasError
45
45
  } = _ref;
46
- let cssClass = "fieldset-component ".concat(customClass);
47
- if (type) cssClass = "".concat(cssClass, " -").concat(type);
48
- if (hasError) cssClass = "".concat(cssClass, " -witherror");
46
+ let cssClass = `fieldset-component ${customClass}`;
47
+ if (type) cssClass = `${cssClass} -${type}`;
48
+ if (hasError) cssClass = `${cssClass} -witherror`;
49
49
  return cssClass;
50
50
  };
51
51
  const getContentStyle = _ref2 => {
@@ -55,11 +55,11 @@ const Fieldset = props => {
55
55
  } = _ref2;
56
56
  if (template === 'rows') {
57
57
  return {
58
- gridTemplateRows: "repeat(".concat(rowsCount, ", 1fr)")
58
+ gridTemplateRows: `repeat(${rowsCount}, 1fr)`
59
59
  };
60
60
  } else if (template === 'columns') {
61
61
  return {
62
- gridTemplateColumns: "repeat(".concat(colsCount, ", 1fr)")
62
+ gridTemplateColumns: `repeat(${colsCount}, 1fr)`
63
63
  };
64
64
  }
65
65
  return {};
@@ -70,9 +70,9 @@ const Fieldset = props => {
70
70
  }, onDenied.hideContent ? /*#__PURE__*/_react.default.createElement(_noPermission.default, null) : /*#__PURE__*/_react.default.createElement(_react.Fragment, null, title && /*#__PURE__*/_react.default.createElement("legend", {
71
71
  style: styleTitle,
72
72
  align: titleAlign,
73
- className: "legend ".concat(titleCustomClass)
73
+ className: `legend ${titleCustomClass}`
74
74
  }, leftElements, title, rightElements), /*#__PURE__*/_react.default.createElement("div", {
75
- className: "contentfieldset -template".concat(template, " "),
75
+ className: `contentfieldset -template${template} `,
76
76
  style: Object.assign(getContentStyle(props), styleContent)
77
77
  }, children)));
78
78
  if (onDenied.unvisible) return null;
@@ -77,7 +77,7 @@ const FieldArray = props => {
77
77
  if (!skipLabel && label) {
78
78
  content = /*#__PURE__*/_react.default.createElement(_fieldset.default, {
79
79
  title: label,
80
- customClass: "arraycontainer ".concat(bordered && '-bordered'),
80
+ customClass: `arraycontainer ${bordered && '-bordered'}`,
81
81
  style: labelContainerStyle,
82
82
  titleCustomClass: "label"
83
83
  }, /*#__PURE__*/_react.default.createElement(Component, _extends({}, rest, getDefaultProps(props), {
@@ -31,18 +31,18 @@ const getEventProps = _ref => {
31
31
  } = _ref;
32
32
  return {
33
33
  onBlur: e => {
34
- if ((component === null || component === void 0 ? void 0 : component.name) !== 'NumberField' && handlerFieldChange) handlerFieldChange(e);
34
+ if (component?.name !== 'NumberField' && handlerFieldChange) handlerFieldChange(e);
35
35
  if (validators && handlerFieldValidate) handlerFieldValidate(name, e.target.value, validators);
36
36
  if (onBlur) onBlur(e);
37
37
  },
38
38
  onKeyDown: e => {
39
39
  if ([constants.keyCodes.ENTER].includes(e.keyCode)) {
40
- if (validators) handlerFieldValidate === null || handlerFieldValidate === void 0 ? void 0 : handlerFieldValidate(name, e.target.value, validators);
40
+ if (validators) handlerFieldValidate?.(name, e.target.value, validators);
41
41
  if (onKeyDown) onKeyDown(e);
42
42
  }
43
43
  },
44
44
  onChange: e => {
45
- if ((component === null || component === void 0 ? void 0 : component.name) === 'NumberField') {
45
+ if (component?.name === 'NumberField') {
46
46
  if (validators && e.target && handlerFieldValidate) {
47
47
  handlerFieldValidate(name, e.target.value, validators);
48
48
  }
@@ -79,8 +79,8 @@ const FieldPeriod = props => {
79
79
  });
80
80
  },
81
81
  value: {
82
- initial: _lodash.default.get(data, "".concat(name, ".").concat(nameDateInitial)),
83
- final: _lodash.default.get(data, "".concat(name, ".").concat(nameDateFinal))
82
+ initial: _lodash.default.get(data, `${name}.${nameDateInitial}`),
83
+ final: _lodash.default.get(data, `${name}.${nameDateFinal}`)
84
84
  }
85
85
  }));
86
86
  }
package/lib/form/index.js CHANGED
@@ -240,7 +240,7 @@ const Form = _ref => {
240
240
  }
241
241
  }, [submitOnPressEnterKey]);
242
242
  (0, _react.useEffect)(() => {
243
- const validatorsQuantity = Object.values(fieldsValidators.current).reduce((acc, currentValue) => acc + ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.length) || 0), 0);
243
+ const validatorsQuantity = Object.values(fieldsValidators.current).reduce((acc, currentValue) => acc + (currentValue?.length || 0), 0);
244
244
  if (fieldsValidators.current && onValidateForm && oldFieldsValidatorsQuantity !== validatorsQuantity) {
245
245
  setOldFieldsValidatorsQuantity(validatorsQuantity);
246
246
  onValidateForm(checkIsValid(usedData, true, fieldsValidators.current));
@@ -270,7 +270,7 @@ const Form = _ref => {
270
270
  style: style
271
271
  }, formProps(), {
272
272
  role: "presentation",
273
- className: "form-component ".concat(customClass)
273
+ className: `form-component ${customClass}`
274
274
  }), children)), /*#__PURE__*/_react.default.createElement(_dialog.DialogQuestion, {
275
275
  zIndex: "99999999",
276
276
  title: securityTitle || 'Dados Alterados',
@@ -10,10 +10,10 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
10
10
  const getClass = col => {
11
11
  const cols = col ? col.split(' ') : [];
12
12
  let classes = 'grid-container ';
13
- if (cols[0]) classes += "col-xs-".concat(cols[0]);
14
- if (cols[1]) classes += " col-sm-".concat(cols[1]);
15
- if (cols[2]) classes += " col-md-".concat(cols[2]);
16
- if (cols[3]) classes += " col-lg-".concat(cols[3]);
13
+ if (cols[0]) classes += `col-xs-${cols[0]}`;
14
+ if (cols[1]) classes += ` col-sm-${cols[1]}`;
15
+ if (cols[2]) classes += ` col-md-${cols[2]}`;
16
+ if (cols[3]) classes += ` col-lg-${cols[3]}`;
17
17
  return classes;
18
18
  };
19
19
  const GridCol = props => {
@@ -27,7 +27,7 @@ const GridCol = props => {
27
27
  const gridClasses = getClass(cols || '');
28
28
  if (!visible) return null;
29
29
  return /*#__PURE__*/_react.default.createElement("div", {
30
- className: "".concat(customClass, " ").concat(gridClasses),
30
+ className: `${customClass} ${gridClasses}`,
31
31
  style: style
32
32
  }, children);
33
33
  };
@@ -12,7 +12,10 @@ 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 ".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));
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}`}`;
16
19
  const GridRow = props => {
17
20
  const {
18
21
  style,
package/lib/hint/index.js CHANGED
@@ -22,7 +22,13 @@ const Hint = _ref => {
22
22
  return /*#__PURE__*/_react.default.createElement("div", {
23
23
  "aria-disabled": disabled,
24
24
  style: style,
25
- className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ").concat(disabled ? '-disabled' : '', "\n -").concat(color, "\n ")
25
+ className: `
26
+ hint-component
27
+ ${customClass}
28
+ ${skeletonize ? '-skeletonized' : ''}
29
+ ${disabled ? '-disabled' : ''}
30
+ -${color}
31
+ `
26
32
  }, Array.isArray(description) ? (0, _helpers.showHintList)(description) : /*#__PURE__*/_react.default.createElement("span", {
27
33
  "aria-disabled": disabled
28
34
  }, description));