linear-react-components-ui 1.1.20-beta.12 → 1.1.20-beta.14

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 (150) hide show
  1. package/lib/alerts/BaseAlert.js +1 -1
  2. package/lib/alerts/Message.js +1 -1
  3. package/lib/assets/styles/button.scss +0 -1
  4. package/lib/assets/styles/select.scss +2 -1
  5. package/lib/assets/styles/table.scss +10 -6
  6. package/lib/assets/styles/toolbar.scss +3 -0
  7. package/lib/assets/styles/wizard.scss +127 -0
  8. package/lib/avatar/index.js +8 -9
  9. package/lib/badge/index.js +4 -4
  10. package/lib/buttons/DangerButton.js +1 -1
  11. package/lib/buttons/DefaultButton.js +5 -17
  12. package/lib/buttons/InfoButton.js +1 -1
  13. package/lib/buttons/PrimaryButton.js +1 -1
  14. package/lib/buttons/SuccessButton.js +1 -1
  15. package/lib/buttons/WarningButton.js +1 -1
  16. package/lib/buttons/button_container/index.js +1 -1
  17. package/lib/buttons/split_button/index.js +1 -1
  18. package/lib/buttons/types.d.ts +0 -1
  19. package/lib/calendar/base/Day.js +1 -1
  20. package/lib/calendar/base/Month.js +1 -1
  21. package/lib/calendar/base/helpers.js +2 -2
  22. package/lib/calendar/base/index.js +1 -1
  23. package/lib/dialog/Custom.js +1 -1
  24. package/lib/dialog/base/Content.d.ts +1 -1
  25. package/lib/dialog/base/Content.js +3 -2
  26. package/lib/dialog/base/Header.js +2 -2
  27. package/lib/dialog/base/index.js +6 -4
  28. package/lib/dialog/form/index.js +8 -3
  29. package/lib/dialog/types.d.ts +36 -4
  30. package/lib/dialog/wizard/index.d.ts +13 -0
  31. package/lib/dialog/wizard/index.js +78 -0
  32. package/lib/dialog/wizard/progressbar.d.ts +13 -0
  33. package/lib/dialog/wizard/progressbar.js +36 -0
  34. package/lib/dialog/wizard/step.d.ts +9 -0
  35. package/lib/dialog/wizard/step.js +22 -0
  36. package/lib/dialog/wizard/useWizard.d.ts +9 -0
  37. package/lib/dialog/wizard/useWizard.js +48 -0
  38. package/lib/drawer/Drawer.js +3 -3
  39. package/lib/drawer/Header.js +1 -1
  40. package/lib/dropdown/Popup.d.ts +1 -1
  41. package/lib/dropdown/Popup.js +22 -43
  42. package/lib/dropdown/helper.js +1 -1
  43. package/lib/dropdown/types.d.ts +2 -6
  44. package/lib/dropdown/withDropdown.js +6 -7
  45. package/lib/fieldset/index.js +7 -7
  46. package/lib/form/Field.js +11 -24
  47. package/lib/form/FieldArray.js +10 -25
  48. package/lib/form/FieldNumber.js +9 -21
  49. package/lib/form/FieldPeriod.js +5 -5
  50. package/lib/form/index.js +9 -6
  51. package/lib/form/types.d.ts +10 -6
  52. package/lib/form/withFieldHOC.js +2 -2
  53. package/lib/gridlayout/GridCol.js +5 -5
  54. package/lib/gridlayout/GridRow.js +1 -4
  55. package/lib/gridlayout/types.d.ts +1 -1
  56. package/lib/hint/index.js +1 -7
  57. package/lib/icons/helper.d.ts +20 -0
  58. package/lib/icons/helper.js +20 -0
  59. package/lib/icons/index.js +27 -24
  60. package/lib/inputs/base/InputTextBase.js +9 -6
  61. package/lib/inputs/base/Label.js +1 -1
  62. package/lib/inputs/base/helpers.js +3 -7
  63. package/lib/inputs/date/helpers.js +1 -4
  64. package/lib/inputs/date/index.js +15 -9
  65. package/lib/inputs/errorMessage/index.js +1 -1
  66. package/lib/inputs/file/DefaultFile.js +6 -5
  67. package/lib/inputs/file/DragDropFile.js +17 -15
  68. package/lib/inputs/file/File.js +4 -3
  69. package/lib/inputs/mask/BaseMask.js +1 -1
  70. package/lib/inputs/multiSelect/Dropdown.js +10 -9
  71. package/lib/inputs/multiSelect/helper.js +2 -1
  72. package/lib/inputs/multiSelect/index.js +9 -7
  73. package/lib/inputs/number/BaseNumber.d.ts +1 -1
  74. package/lib/inputs/number/BaseNumber.js +2 -9
  75. package/lib/inputs/number/Currency.d.ts +1 -1
  76. package/lib/inputs/number/Currency.js +4 -11
  77. package/lib/inputs/number/index.js +1 -1
  78. package/lib/inputs/period/PeriodList.js +1 -1
  79. package/lib/inputs/period/helper.js +1 -3
  80. package/lib/inputs/period/index.js +14 -9
  81. package/lib/inputs/search/index.js +1 -1
  82. package/lib/inputs/select/Dropdown.js +1 -1
  83. package/lib/inputs/select/helper.js +13 -10
  84. package/lib/inputs/select/multiple/Selecteds.js +1 -1
  85. package/lib/inputs/select/multiple/index.js +19 -12
  86. package/lib/inputs/select/simple/index.js +22 -13
  87. package/lib/inputs/select/types.d.ts +1 -0
  88. package/lib/inputs/textarea/index.js +1 -1
  89. package/lib/internals/withTooltip.js +9 -9
  90. package/lib/labelMessages/index.js +3 -4
  91. package/lib/labels/DefaultLabel.js +1 -4
  92. package/lib/labels/label_container/index.js +1 -1
  93. package/lib/list/Header.js +1 -1
  94. package/lib/list/Item.js +7 -9
  95. package/lib/list/index.js +1 -1
  96. package/lib/menus/float/MenuItem.js +2 -2
  97. package/lib/menus/float/SubMenuContainer.js +1 -1
  98. package/lib/menus/float/index.js +1 -1
  99. package/lib/menus/sidenav/ExpandMenu.js +1 -1
  100. package/lib/menus/sidenav/NavMenuGroup.js +1 -1
  101. package/lib/menus/sidenav/NavMenuItem.js +9 -7
  102. package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
  103. package/lib/menus/sidenav/helpers.js +1 -1
  104. package/lib/menus/sidenav/index.js +5 -5
  105. package/lib/panel/Content.js +7 -5
  106. package/lib/panel/Default.js +2 -2
  107. package/lib/panel/Header.js +3 -3
  108. package/lib/permissionValidations.js +1 -1
  109. package/lib/popover/PopoverText.d.ts +2 -3
  110. package/lib/popover/PopoverText.js +8 -5
  111. package/lib/popover/PopoverTitle.d.ts +0 -1
  112. package/lib/popover/index.d.ts +5 -3
  113. package/lib/popover/index.js +14 -20
  114. package/lib/popover/types.d.ts +1 -12
  115. package/lib/progress/Bar.js +6 -6
  116. package/lib/radio/index.d.ts +1 -1
  117. package/lib/radio/index.js +4 -4
  118. package/lib/radio/types.d.ts +2 -1
  119. package/lib/shortcuts/index.js +1 -1
  120. package/lib/skeleton/SkeletonContainer.js +1 -2
  121. package/lib/skeleton/index.js +1 -4
  122. package/lib/spinner/index.js +2 -2
  123. package/lib/split/Split.js +1 -1
  124. package/lib/split/SplitSide.js +3 -3
  125. package/lib/table/Body.js +3 -3
  126. package/lib/table/Header.js +11 -8
  127. package/lib/table/HeaderColumn.d.ts +1 -1
  128. package/lib/table/HeaderColumn.js +7 -6
  129. package/lib/table/Row.js +3 -3
  130. package/lib/table/RowColumn.js +3 -2
  131. package/lib/table/index.js +1 -6
  132. package/lib/table/types.d.ts +4 -2
  133. package/lib/tabs/DropdownTabs.js +1 -1
  134. package/lib/tabs/Menu.js +1 -1
  135. package/lib/tabs/MenuTabs.js +2 -2
  136. package/lib/tabs/Panel.js +7 -5
  137. package/lib/tabs/context.js +6 -3
  138. package/lib/textContent/index.js +1 -1
  139. package/lib/toolbar/ButtonBar.js +1 -1
  140. package/lib/toolbar/index.js +1 -1
  141. package/lib/tooltip/index.js +7 -7
  142. package/lib/treetable/Body.js +1 -1
  143. package/lib/treetable/Header.js +2 -2
  144. package/lib/treetable/Row.js +10 -13
  145. package/lib/treeview/Header.js +1 -1
  146. package/lib/treeview/Node.js +15 -11
  147. package/lib/treeview/index.js +11 -7
  148. package/lib/treeview/types.d.ts +4 -0
  149. package/lib/uitour/index.js +8 -6
  150. package/package.json +2 -2
@@ -70,7 +70,7 @@ const SideNav = props => {
70
70
  width,
71
71
  height
72
72
  } = sideNavDimensions;
73
- const style = `left: ${left + width + 5}px; top: ${top + 1}px; height: ${height - 8}px;`;
73
+ const style = "left: ".concat(left + width + 5, "px; top: ").concat(top + 1, "px; height: ").concat(height - 8, "px;");
74
74
  return style;
75
75
  };
76
76
  const closeSearchMenuPopup = () => {
@@ -82,7 +82,7 @@ const SideNav = props => {
82
82
  } = child;
83
83
  if ((type === _NavMenuItem.default || type === _NavSubMenuItem.default) && !child.props.children) {
84
84
  setMenuItemsContent(prevState => [...prevState, {
85
- id: `${child.props.title}-${uuid.v1()}`,
85
+ id: "".concat(child.props.title, "-").concat(uuid.v1()),
86
86
  content: child.props.title,
87
87
  url: child.props.url
88
88
  }]);
@@ -127,7 +127,7 @@ const SideNav = props => {
127
127
  }, [expanded]);
128
128
  const returnMenuItems = () => menuItemsContent.filter(item => item.content !== '');
129
129
  const getPopupMenuSearch = () => /*#__PURE__*/_react.default.createElement(_NavMenuGroup.default, {
130
- key: `popup-menusearch-${uuid.v1()}`
130
+ key: "popup-menusearch-".concat(uuid.v1())
131
131
  }, /*#__PURE__*/_react.default.createElement(_NavMenuItem.default, {
132
132
  childrenIsSubMenu: false,
133
133
  customClass: "-customsidenavitem",
@@ -165,10 +165,10 @@ const SideNav = props => {
165
165
  return /*#__PURE__*/_react.default.createElement(_helpers.SideNavContext.Provider, {
166
166
  value: contextValues
167
167
  }, /*#__PURE__*/_react.default.createElement("div", {
168
- className: `sidenav-component ${isExpanded ? '-expanded' : ''} ${openSearchMenuPopup ? '-blocked' : ''} ${customClass}`,
168
+ className: "sidenav-component ".concat(isExpanded ? '-expanded' : '', " ").concat(openSearchMenuPopup ? '-blocked' : '', " ").concat(customClass),
169
169
  ref: sideNavRef
170
170
  }, showExpandMenu && /*#__PURE__*/_react.default.createElement(_ExpandMenu.default, {
171
- expandMenuCustomClass: `${isExpanded && 'closefromexpanded'} ${expandMenuCustomClass}`,
171
+ expandMenuCustomClass: "".concat(isExpanded && 'closefromexpanded', " ").concat(expandMenuCustomClass),
172
172
  onExpandMenu: onHeaderClick,
173
173
  iconName: isExpanded ? 'arrow_left' : 'arrow_right'
174
174
  }), getSideNavContent()));
@@ -56,8 +56,9 @@ const PanelContent = _ref => {
56
56
  scrollHeight
57
57
  } = rootElementRef.current;
58
58
  if (scrollHeight !== lastScrollHeight.current) {
59
+ var _observer;
59
60
  enableOnEndReached.current = true;
60
- observer?.disconnect();
61
+ (_observer = observer) === null || _observer === void 0 ? void 0 : _observer.disconnect();
61
62
  }
62
63
  });
63
64
  observer.observe(rootElementRef.current);
@@ -65,15 +66,16 @@ const PanelContent = _ref => {
65
66
  rootElementRef.current.addEventListener('resize', onScrollEndReached);
66
67
  }
67
68
  return () => {
68
- rootElementRef.current?.removeEventListener('scroll', onScrollEndReached);
69
- rootElementRef.current?.removeEventListener('resize', onScrollEndReached);
70
- observer?.disconnect();
69
+ var _rootElementRef$curre, _rootElementRef$curre2, _observer2;
70
+ (_rootElementRef$curre = rootElementRef.current) === null || _rootElementRef$curre === void 0 ? void 0 : _rootElementRef$curre.removeEventListener('scroll', onScrollEndReached);
71
+ (_rootElementRef$curre2 = rootElementRef.current) === null || _rootElementRef$curre2 === void 0 ? void 0 : _rootElementRef$curre2.removeEventListener('resize', onScrollEndReached);
72
+ (_observer2 = observer) === null || _observer2 === void 0 ? void 0 : _observer2.disconnect();
71
73
  };
72
74
  }, [onScrollEndReached]);
73
75
  if (!opened) return null;
74
76
  return hideContent ? /*#__PURE__*/_react.default.createElement(_noPermission.default, null) : /*#__PURE__*/_react.default.createElement("div", _extends({
75
77
  ref: rootElementRef,
76
- className: `panel-content ${customClass ?? ''}`
78
+ className: "panel-content ".concat(customClass !== null && customClass !== void 0 ? customClass : '')
77
79
  }, rest), opened && children);
78
80
  };
79
81
  var _default = exports.default = PanelContent;
@@ -37,8 +37,8 @@ const DefaultPanel = _ref => {
37
37
  } = _permissionValidations.OPTIONS_ON_DENIED;
38
38
  const [onDenied] = (0, _react.useState)((0, _permissionValidations.actionsOnPermissionDenied)([hideContent, unvisible], permissionAttr));
39
39
  const getCssClass = () => {
40
- let cssClass = `panel-component ${customClass}`;
41
- cssClass += colorStyle !== '' ? ` -${colorStyle}` : '';
40
+ let cssClass = "panel-component ".concat(customClass);
41
+ cssClass += colorStyle !== '' ? " -".concat(colorStyle) : '';
42
42
  return cssClass;
43
43
  };
44
44
  const renderContent = () => /*#__PURE__*/_react.default.createElement("div", _extends({
@@ -32,7 +32,7 @@ const getClassName = _ref => {
32
32
  customClass,
33
33
  headerColored = true
34
34
  } = _ref;
35
- let className = `panel-header ${customClass ?? ''}`;
35
+ let className = "panel-header ".concat(customClass !== null && customClass !== void 0 ? customClass : '');
36
36
  if (!headerColored) className += ' -uncolored';
37
37
  return className;
38
38
  };
@@ -56,9 +56,9 @@ const PanelHeader = props => {
56
56
  return /*#__PURE__*/_react.default.createElement("div", _extends({
57
57
  className: getClassName(props)
58
58
  }, rest), (icon || titleIcon) && /*#__PURE__*/_react.default.createElement("div", {
59
- className: `${icon !== null || titleIcon !== null ? 'icon-left-panel' : ''}`
59
+ className: "".concat(icon !== null || titleIcon !== null ? 'icon-left-panel' : '')
60
60
  }, getIcon(titleIcon, icon)), title && /*#__PURE__*/_react.default.createElement("h1", {
61
- className: `title ${customClassForTitle ?? ''}`,
61
+ className: "title ".concat(customClassForTitle !== null && customClassForTitle !== void 0 ? customClassForTitle : ''),
62
62
  style: styleForTitle
63
63
  }, title), toggleable && /*#__PURE__*/_react.default.createElement(_buttons.ButtonContainer, {
64
64
  position: "right"
@@ -45,7 +45,7 @@ const actionsOnPermissionDenied = (options, permissionAttr) => {
45
45
  }
46
46
  const result = {};
47
47
  options.forEach(option => {
48
- result[option] = hasPermission ? false : option === permissionsAttr?.[0].onDenied;
48
+ result[option] = hasPermission ? false : option === (permissionsAttr === null || permissionsAttr === void 0 ? void 0 : permissionsAttr[0].onDenied);
49
49
  });
50
50
  return result;
51
51
  };
@@ -1,11 +1,10 @@
1
+ import React__default from 'react';
1
2
  import { PopoverTextProps } from './types.js';
2
- import 'react';
3
3
  import '../@types/Position.js';
4
4
  import '../@types/SizePixels.js';
5
5
  import '../@types/Icon.js';
6
6
  import '../icons/helper.js';
7
- import '../@types/PermissionAttr.js';
8
7
 
9
- declare const PopoverText: ({ children }: PopoverTextProps) => JSX.Element;
8
+ declare const PopoverText: React__default.ForwardRefExoticComponent<PopoverTextProps & React__default.RefAttributes<HTMLParagraphElement>>;
10
9
 
11
10
  export { PopoverText as default };
@@ -4,14 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- const PopoverText = _ref => {
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ 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); }
9
+ 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
+ const PopoverText = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
10
11
  let {
11
12
  children
12
13
  } = _ref;
13
14
  return /*#__PURE__*/_react.default.createElement("p", {
14
- className: "text"
15
+ className: "text",
16
+ ref: ref
15
17
  }, children);
16
- };
18
+ });
19
+ PopoverText.displayName = 'PopoverText';
17
20
  var _default = exports.default = PopoverText;
@@ -4,7 +4,6 @@ import '../@types/Position.js';
4
4
  import '../@types/SizePixels.js';
5
5
  import '../@types/Icon.js';
6
6
  import '../icons/helper.js';
7
- import '../@types/PermissionAttr.js';
8
7
 
9
8
  declare const PopoverTitle: ({ children }: PopoverTitleProps) => JSX.Element;
10
9
 
@@ -6,8 +6,10 @@ import '../@types/Position.js';
6
6
  import '../@types/SizePixels.js';
7
7
  import '../@types/Icon.js';
8
8
  import '../icons/helper.js';
9
- import '../@types/PermissionAttr.js';
10
9
 
11
- declare const Popover: ({ children, align, theme, iconName, iconSize, iconColor, customClass, customStyle, ...rest }: IPopoverProps) => JSX.Element;
10
+ declare const _default: {
11
+ (props: IPopoverProps): JSX.Element;
12
+ displayName: string;
13
+ };
12
14
 
13
- export { Popover as default };
15
+ export { _default as default };
@@ -21,25 +21,20 @@ var _buttons = _interopRequireDefault(require("../buttons"));
21
21
  var _icons = _interopRequireDefault(require("../icons"));
22
22
  var _PopoverText = _interopRequireDefault(require("./PopoverText"));
23
23
  var _PopoverTitle = _interopRequireDefault(require("./PopoverTitle"));
24
+ var _withDropdown = _interopRequireDefault(require("../dropdown/withDropdown"));
24
25
  require("../assets/styles/popover.scss");
25
- const _excluded = ["children", "align", "theme", "iconName", "iconSize", "iconColor", "customClass", "customStyle"];
26
26
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
27
- 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); }
28
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
29
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
30
27
  const Popover = _ref => {
31
28
  let {
32
- children,
33
- align = 'left',
34
- theme = 'dark',
35
- iconName,
36
- iconSize = 16,
37
- iconColor = '',
38
- customClass = '',
39
- customStyle
40
- } = _ref,
41
- rest = _objectWithoutProperties(_ref, _excluded);
42
- return /*#__PURE__*/_react.default.createElement(_buttons.default, _extends({
29
+ children,
30
+ align = 'left',
31
+ theme = 'dark',
32
+ iconName,
33
+ iconSize = 16,
34
+ iconColor = '',
35
+ customClass = ''
36
+ } = _ref;
37
+ return /*#__PURE__*/_react.default.createElement(_buttons.default, {
43
38
  round: true,
44
39
  dropdown: true,
45
40
  transparent: true,
@@ -62,10 +57,9 @@ const Popover = _ref => {
62
57
  onClick: e => {
63
58
  e.preventDefault();
64
59
  }
65
- }, rest), /*#__PURE__*/_react.default.createElement("div", {
66
- className: `popovercontainer -${theme} ${customClass}`,
67
- "data-testid": "popover-container",
68
- style: customStyle
60
+ }, /*#__PURE__*/_react.default.createElement("div", {
61
+ className: "".concat(customClass, " popovercontainer -").concat(theme),
62
+ "data-testid": "popover-container"
69
63
  }, children));
70
64
  };
71
- var _default = exports.default = Popover;
65
+ var _default = exports.default = (0, _withDropdown.default)(Popover);
@@ -1,8 +1,7 @@
1
- import { ReactNode, CSSProperties } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { Position } from '../@types/Position.js';
3
3
  import { SizePixels } from '../@types/SizePixels.js';
4
4
  import { IconNames } from '../@types/Icon.js';
5
- import { PermissionAttr } from '../@types/PermissionAttr.js';
6
5
  import '../icons/helper.js';
7
6
 
8
7
  interface PopoverTitleProps {
@@ -19,16 +18,6 @@ interface IPopoverProps {
19
18
  theme?: 'light' | 'dark';
20
19
  align?: Extract<Position, 'left' | 'right'>;
21
20
  iconSize?: Extract<SizePixels, 10 | 16 | 24 | 32 | 40 | 64>;
22
- disabled?: boolean;
23
- customStyle?: CSSProperties;
24
- isLoading?: boolean;
25
- visible?: boolean;
26
- skeletonize?: boolean;
27
- tooltipPosition?: Exclude<Position, 'center'>;
28
- tooltipWidth?: string | number;
29
- tooltip?: string;
30
- handlerClose?: (cb: () => void) => void;
31
- permissionAttr?: PermissionAttr | PermissionAttr[];
32
21
  }
33
22
 
34
23
  export { IPopoverProps, PopoverTextProps, PopoverTitleProps };
@@ -18,8 +18,8 @@ const getPercentage = _ref => {
18
18
  };
19
19
  const getClass = props => {
20
20
  let style = 'bar';
21
- if (props.customClass) style += `${props.customClass}`;
22
- if (props.type) style += ` -${props.type}`;
21
+ if (props.customClass) style += "".concat(props.customClass);
22
+ if (props.type) style += " -".concat(props.type);
23
23
  if (props.effect) style += ' -effect';
24
24
  if (props.animated) style += ' -animated';
25
25
  if (props.indeterminate) style += ' -indeterminate';
@@ -28,7 +28,7 @@ const getClass = props => {
28
28
  const getLabel = progress => {
29
29
  let value = progress.label;
30
30
  if (!progress.label) {
31
- value = `${getPercentage(progress)}%`;
31
+ value = "".concat(getPercentage(progress), "%");
32
32
  }
33
33
  return /*#__PURE__*/_react.default.createElement("span", {
34
34
  className: "progressbar-label "
@@ -46,12 +46,12 @@ const getStyle = props => {
46
46
  return {
47
47
  width: progressWidth,
48
48
  height,
49
- animationDuration: `${indeterminateDuration}s`,
50
- animationDelay: `${indeterminateDelay}s`
49
+ animationDuration: "".concat(indeterminateDuration, "s"),
50
+ animationDelay: "".concat(indeterminateDelay, "s")
51
51
  };
52
52
  }
53
53
  return {
54
- width: `${getPercentage(props)}%`,
54
+ width: "".concat(getPercentage(props), "%"),
55
55
  height
56
56
  };
57
57
  };
@@ -8,6 +8,6 @@ import '../@types/Size.js';
8
8
  * o componente Field dentro do componente Form, pois o mesmo leva em consideração o tipo do
9
9
  * componente para gerar propriedades customizadas.
10
10
  */
11
- declare const Radio: ({ id, label, value, checked, onChange, name, disabled, required, skeletonize, defaultChecked, forwardedRef, size, permissionAttr }: IRadioProps) => JSX.Element | null;
11
+ declare const Radio: ({ id, label, value, checked, onChange, name, disabled, required, skeletonize, defaultChecked, inputRef, size, permissionAttr }: IRadioProps) => JSX.Element | null;
12
12
 
13
13
  export { Radio as default };
@@ -33,7 +33,7 @@ const Radio = _ref => {
33
33
  required = false,
34
34
  skeletonize = false,
35
35
  defaultChecked = false,
36
- forwardedRef,
36
+ inputRef,
37
37
  size = 'medium',
38
38
  permissionAttr
39
39
  } = _ref;
@@ -64,9 +64,9 @@ const Radio = _ref => {
64
64
  };
65
65
  if (onDenied.unvisible) return null;
66
66
  return /*#__PURE__*/_react.default.createElement("div", {
67
- className: `radio-button ${disabled ? 'disabled' : ''} ${skeletonize ? '-skeletonized' : ''}`
67
+ className: "radio-button ".concat(disabled ? 'disabled' : '', " ").concat(skeletonize ? '-skeletonized' : '')
68
68
  }, /*#__PURE__*/_react.default.createElement("input", _extends({}, getCustomProps(), {
69
- ref: forwardedRef,
69
+ ref: inputRef,
70
70
  className: "radio-component",
71
71
  type: "radio",
72
72
  value: value,
@@ -75,7 +75,7 @@ const Radio = _ref => {
75
75
  required: required,
76
76
  disabled: shouldDisable()
77
77
  })), /*#__PURE__*/_react.default.createElement("label", {
78
- className: `description ${size && `-${size}`}`,
78
+ className: "description ".concat(size && "-".concat(size)),
79
79
  htmlFor: id
80
80
  }, /*#__PURE__*/_react.default.createElement("span", null, label)));
81
81
  };
@@ -1,4 +1,4 @@
1
- import { ChangeEvent, Ref } from 'react';
1
+ import { ChangeEvent, Ref, RefObject } from 'react';
2
2
  import { PermissionAttr } from '../@types/PermissionAttr.js';
3
3
  import { Size } from '../@types/Size.js';
4
4
 
@@ -16,6 +16,7 @@ interface IRadioProps {
16
16
  permissionAttr?: PermissionAttr | PermissionAttr;
17
17
  skeletonize?: boolean;
18
18
  forwardedRef?: Ref<HTMLInputElement>;
19
+ inputRef?: RefObject<HTMLInputElement>;
19
20
  }
20
21
 
21
22
  export { IRadioProps };
@@ -21,7 +21,7 @@ const Shortcuts = _ref => {
21
21
  style: style
22
22
  }, /*#__PURE__*/_react.default.createElement("kbd", {
23
23
  "data-testid": "shortcut",
24
- className: `shortcut-component ${type && `-${type}`}`,
24
+ className: "shortcut-component ".concat(type && "-".concat(type)),
25
25
  style: styleShortcut
26
26
  }, shortcut), ":\xA0", description);
27
27
  };
@@ -13,8 +13,7 @@ const SkeletonContainer = _ref => {
13
13
  customClass,
14
14
  style
15
15
  } = _ref;
16
- const getClass = () => `skeletoncontainer-component ${customClass}
17
- ${row && '-row'}`;
16
+ const getClass = () => "skeletoncontainer-component ".concat(customClass, "\n ").concat(row && '-row');
18
17
  return /*#__PURE__*/_react.default.createElement("div", {
19
18
  className: getClass(),
20
19
  style: style
@@ -35,10 +35,7 @@ const Skeleton = props => {
35
35
  width,
36
36
  height
37
37
  };
38
- const getClass = () => `skeleton-component ${customClass}
39
- ${color && `-${color}`}
40
- ${round && '-round'}
41
- ${round && size && `-${size}`}`;
38
+ const getClass = () => "skeleton-component ".concat(customClass, "\n ").concat(color && "-".concat(color), "\n ").concat(round && '-round', "\n ").concat(round && size && "-".concat(size));
42
39
  const renderContent = () => /*#__PURE__*/_react.default.createElement("div", {
43
40
  className: getClass(),
44
41
  style: _objectSpread(_objectSpread({}, customStyles), style)
@@ -37,8 +37,8 @@ const Spinner = props => {
37
37
  };
38
38
  }, []);
39
39
  const getCssClass = () => {
40
- let css = `spinner-component -${align} ${customClass} `;
41
- if (heightAuto) css = `${css} -heightauto`;
40
+ let css = "spinner-component -".concat(align, " ").concat(customClass, " ");
41
+ if (heightAuto) css = "".concat(css, " -heightauto");
42
42
  return css;
43
43
  };
44
44
  if (delay) return null;
@@ -246,7 +246,7 @@ const Split = _ref => {
246
246
  } = state;
247
247
  let containerClasses = 'split-component';
248
248
  if (customClass) {
249
- containerClasses += ` ${customClass}`;
249
+ containerClasses += " ".concat(customClass);
250
250
  }
251
251
  if (vertical) {
252
252
  containerClasses += ' splitter-layout-vertical';
@@ -27,15 +27,15 @@ const SplitSide = _ref => {
27
27
  const splitSideStyle = {};
28
28
  if (!primary) {
29
29
  if (vertical) {
30
- splitSideStyle.height = `${sizeSplitSide}${unit}`;
30
+ splitSideStyle.height = "".concat(sizeSplitSide).concat(unit);
31
31
  } else {
32
- splitSideStyle.width = `${sizeSplitSide}${unit}`;
32
+ splitSideStyle.width = "".concat(sizeSplitSide).concat(unit);
33
33
  }
34
34
  } else {
35
35
  classes += ' layout-pane-primary';
36
36
  }
37
37
  return /*#__PURE__*/_react.default.createElement("div", {
38
- className: `${classes} ${customClass}`,
38
+ className: "".concat(classes, " ").concat(customClass),
39
39
  style: Object.assign({}, splitSideStyle, style)
40
40
  }, children);
41
41
  };
package/lib/table/Body.js CHANGED
@@ -28,7 +28,7 @@ const renderChildren = (children, _ref) => {
28
28
  key: index
29
29
  }, columns.map(id => /*#__PURE__*/_react.default.createElement(_index.Td, {
30
30
  style: {
31
- width: columnsWidth?.[id - 1]
31
+ width: columnsWidth === null || columnsWidth === void 0 ? void 0 : columnsWidth[id - 1]
32
32
  },
33
33
  key: id
34
34
  }, /*#__PURE__*/_react.default.createElement(_skeleton.default, {
@@ -63,9 +63,9 @@ const TableBody = _ref2 => {
63
63
  contain: strict ? 'strict' : 'size layout style'
64
64
  }
65
65
  }, /*#__PURE__*/_react.default.createElement("tbody", {
66
- className: `tbody ${isSkeletonized ? 'skeleton-transparency' : ''} ${customClass}`
66
+ className: "tbody ".concat(isSkeletonized ? 'skeleton-transparency' : '', " ").concat(customClass)
67
67
  }, renderChildren(children, context)))) : /*#__PURE__*/_react.default.createElement("tbody", {
68
- className: `tbody ${isSkeletonized ? 'skeleton-transparency' : ''} ${customClass}`
68
+ className: "tbody ".concat(isSkeletonized ? 'skeleton-transparency' : '', " ").concat(customClass)
69
69
  }, renderChildren(children, context));
70
70
  };
71
71
  var _default = exports.default = TableBody;
@@ -12,7 +12,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
12
12
  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; }
13
13
  const getColumnsWidth = children => {
14
14
  const columnsWidth = [];
15
- if (/*#__PURE__*/(0, _react.isValidElement)(children) && children.props) {
15
+ if ( /*#__PURE__*/(0, _react.isValidElement)(children) && children.props) {
16
16
  let columns = children.props.children;
17
17
  if (!_lodash.default.isArray(columns)) columns = [columns];
18
18
  columns.forEach(element => {
@@ -20,12 +20,14 @@ const getColumnsWidth = children => {
20
20
  if (_lodash.default.isArray(element)) {
21
21
  element.forEach(elementArray => {
22
22
  if (elementArray && elementArray.props) {
23
- colWidth = elementArray.props?.style?.width;
23
+ var _elementArray$props, _elementArray$props$s;
24
+ colWidth = (_elementArray$props = elementArray.props) === null || _elementArray$props === void 0 ? void 0 : (_elementArray$props$s = _elementArray$props.style) === null || _elementArray$props$s === void 0 ? void 0 : _elementArray$props$s.width;
24
25
  }
25
26
  columnsWidth.push(colWidth);
26
27
  });
27
28
  } else if (element && element.props) {
28
- colWidth = element.props?.style?.width;
29
+ var _element$props, _element$props$style;
30
+ colWidth = (_element$props = element.props) === null || _element$props === void 0 ? void 0 : (_element$props$style = _element$props.style) === null || _element$props$style === void 0 ? void 0 : _element$props$style.width;
29
31
  columnsWidth.push(colWidth);
30
32
  }
31
33
  });
@@ -34,8 +36,9 @@ const getColumnsWidth = children => {
34
36
  };
35
37
  const countColumnsFromChildren = (element, columnsCount) => {
36
38
  const count = columnsCount;
37
- if (/*#__PURE__*/(0, _react.isValidElement)(element)) {
38
- if (_lodash.default.isArray(element?.props?.children)) {
39
+ if ( /*#__PURE__*/(0, _react.isValidElement)(element)) {
40
+ var _element$props2;
41
+ if (_lodash.default.isArray(element === null || element === void 0 ? void 0 : (_element$props2 = element.props) === null || _element$props2 === void 0 ? void 0 : _element$props2.children)) {
39
42
  const currentElement = element.props;
40
43
  currentElement.children.forEach(child => countColumnsFromChildren(child, count));
41
44
  } else if (element) {
@@ -48,7 +51,7 @@ const countColumnsFromChildren = (element, columnsCount) => {
48
51
  const getColumnsCount = (children, columnsCount) => {
49
52
  if (_lodash.default.isArray(children) && children.length > 0 && children[0].props) {
50
53
  countColumnsFromChildren(children[0].props.children, columnsCount);
51
- } else if (/*#__PURE__*/(0, _react.isValidElement)(children) && children.props && children.props.children) {
54
+ } else if ( /*#__PURE__*/(0, _react.isValidElement)(children) && children.props && children.props.children) {
52
55
  countColumnsFromChildren(children.props.children, columnsCount);
53
56
  }
54
57
  return columnsCount.current;
@@ -82,9 +85,9 @@ const Header = _ref => {
82
85
  tableLayout: 'fixed'
83
86
  }
84
87
  }, /*#__PURE__*/_react.default.createElement("thead", {
85
- className: `theader ${customClass}`
88
+ className: "theader ".concat(customClass)
86
89
  }, children))) : /*#__PURE__*/_react.default.createElement("thead", {
87
- className: `theader ${customClass}`
90
+ className: "theader ".concat(customClass)
88
91
  }, children);
89
92
  };
90
93
  var _default = exports.default = Header;
@@ -1,6 +1,6 @@
1
1
  import { ITableHeaderProps } from './types.js';
2
2
  import 'react';
3
3
 
4
- declare const HeaderColumn: ({ customClass, style, children, textAlign, visible, id, rowSpan, colSpan, isMenuColumn, }: ITableHeaderProps) => JSX.Element | null;
4
+ declare const HeaderColumn: (props: ITableHeaderProps) => JSX.Element | null;
5
5
 
6
6
  export { HeaderColumn as default };
@@ -11,8 +11,9 @@ var _helpers = _interopRequireDefault(require("./helpers"));
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  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); }
13
13
  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; }
14
- const HeaderColumn = _ref => {
15
- let {
14
+ 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); }
15
+ const HeaderColumn = props => {
16
+ const {
16
17
  customClass,
17
18
  style,
18
19
  children,
@@ -22,7 +23,7 @@ const HeaderColumn = _ref => {
22
23
  rowSpan,
23
24
  colSpan,
24
25
  isMenuColumn = false
25
- } = _ref;
26
+ } = props;
26
27
  const {
27
28
  skeletonize,
28
29
  vertical,
@@ -38,13 +39,13 @@ const HeaderColumn = _ref => {
38
39
  });
39
40
  };
40
41
  if (!visible) return null;
41
- return /*#__PURE__*/_react.default.createElement("th", {
42
+ return /*#__PURE__*/_react.default.createElement("th", _extends({}, props, {
42
43
  id: id,
43
44
  rowSpan: rowSpan,
44
45
  colSpan: colSpan,
45
- className: `headercolumn ${customClass} text-align-${textAlign} ${isMenuColumn && 'menu-column'}`,
46
+ className: "headercolumn ".concat(customClass, " text-align-").concat(textAlign, " ").concat(isMenuColumn && 'menu-column'),
46
47
  style: style
47
- }, skeletonize && (skeletonInHeader || !skeletonInRows) && !vertical ? /*#__PURE__*/_react.default.createElement(_skeleton.default, {
48
+ }), skeletonize && (skeletonInHeader || !skeletonInRows) && !vertical ? /*#__PURE__*/_react.default.createElement(_skeleton.default, {
48
49
  height: style && style.height ? undefined : 16,
49
50
  style: {
50
51
  marginBottom: 0
package/lib/table/Row.js CHANGED
@@ -53,7 +53,7 @@ const Row = props => {
53
53
  }, !divider ? /*#__PURE__*/_react.default.createElement("tr", {
54
54
  onMouseEnter: onMouseEnter,
55
55
  onMouseLeave: onMouseLeave,
56
- className: `trow ${customClass} ${rowId && selectedRowId === rowId ? '-selected' : ''}`,
56
+ className: "trow ".concat(customClass, " ").concat(rowId && selectedRowId === rowId ? '-selected' : ''),
57
57
  onClick: e => {
58
58
  if (handleSelectRow && (rowId !== undefined || rowId !== null)) handleSelectRow(rowId);
59
59
  if (handleTableRowClick) handleTableRowClick(e, dataId);
@@ -67,11 +67,11 @@ const Row = props => {
67
67
  className: "trow trow-divider"
68
68
  }, vertical ? /*#__PURE__*/_react.default.createElement("th", {
69
69
  colSpan: dividerColSpan,
70
- className: `-divider -${dividerColor}`,
70
+ className: "-divider -".concat(dividerColor),
71
71
  style: dividerStyle
72
72
  }, dividerTitle || '') : /*#__PURE__*/_react.default.createElement("td", {
73
73
  colSpan: dividerColSpan,
74
- className: `-divider -${dividerColor}`,
74
+ className: "-divider -".concat(dividerColor),
75
75
  style: dividerStyle
76
76
  }, dividerTitle || '')));
77
77
  };
@@ -43,7 +43,8 @@ const RowColumn = props => {
43
43
  visible = true,
44
44
  rowSpan,
45
45
  colSpan,
46
- children
46
+ children,
47
+ isMenuColumn = false
47
48
  } = props;
48
49
  const context = (0, _react.useContext)(_helpers.RowContext);
49
50
  const {
@@ -70,7 +71,7 @@ const RowColumn = props => {
70
71
  return /*#__PURE__*/_react.default.createElement("td", {
71
72
  rowSpan: rowSpan,
72
73
  colSpan: colSpan,
73
- className: `rowcolumn ${customClass} text-align-${textAlign} ${!context.rowBorder && ' -noborder'} ${!rowSpan ? ' -norowspan' : ''}`,
74
+ className: "rowcolumn ".concat(customClass, " text-align-").concat(textAlign, " ").concat(!context.rowBorder && ' -noborder', " ").concat(!rowSpan ? ' -norowspan' : '', " ").concat(isMenuColumn && 'menu-column'),
74
75
  style: style,
75
76
  onClick: e => getColClickEvent(e, _objectSpread(_objectSpread({}, context), props)),
76
77
  role: "presentation",
@@ -65,12 +65,7 @@ const getClass = _ref => {
65
65
  bodyScrollable,
66
66
  skeletonInRows = 10
67
67
  } = _ref;
68
- return `table-component ${customClass} ${striped && '-striped'}
69
- ${bordered && '-bordered'} ${hovered && '-hovered'} ${headerColored && '-headercolor'}
70
- ${condensed && '-condensed'}
71
- ${vertical && '-vertical'}
72
- ${skeletonize && !skeletonInRows ? '-skeletonized' : ''}
73
- ${bodyScrollable ? '-scrollable' : ''}`;
68
+ return "table-component ".concat(customClass, " ").concat(striped && '-striped', " \n ").concat(bordered && '-bordered', " ").concat(hovered && '-hovered', " ").concat(headerColored && '-headercolor', "\n ").concat(condensed && '-condensed', "\n ").concat(vertical && '-vertical', "\n ").concat(skeletonize && !skeletonInRows ? '-skeletonized' : '', "\n ").concat(bodyScrollable ? '-scrollable' : '');
74
69
  };
75
70
  const Table = _ref2 => {
76
71
  let {