@zohodesk/components 1.0.0-temp-192 → 1.0.0-temp-194

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 (94) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/es/AppContainer/AppContainer.js +10 -9
  3. package/es/Avatar/Avatar.js +4 -5
  4. package/es/AvatarTeam/AvatarTeam.js +7 -7
  5. package/es/Button/Button.js +5 -6
  6. package/es/CheckBox/CheckBox.js +8 -8
  7. package/es/DropBox/DropBox.js +10 -11
  8. package/es/DropDown/DropDown.js +2 -1
  9. package/es/ListItem/ListContainer.js +6 -5
  10. package/es/ListItem/ListItem.js +6 -7
  11. package/es/ListItem/ListItem.module.css +18 -85
  12. package/es/ListItem/ListItemWithAvatar.js +7 -8
  13. package/es/ListItem/ListItemWithCheckBox.js +4 -5
  14. package/es/ListItem/ListItemWithIcon.js +6 -7
  15. package/es/ListItem/ListItemWithRadio.js +4 -5
  16. package/es/Modal/Modal.js +4 -5
  17. package/es/MultiSelect/AdvancedGroupMultiSelect.js +3 -9
  18. package/es/MultiSelect/AdvancedMultiSelect.js +8 -9
  19. package/es/MultiSelect/MultiSelect.js +3 -9
  20. package/es/MultiSelect/MultiSelectWithAvatar.js +3 -6
  21. package/es/MultiSelect/SelectedOptions.js +6 -8
  22. package/es/MultiSelect/Suggestions.js +10 -16
  23. package/es/MultiSelect/props/defaultProps.js +5 -9
  24. package/es/MultiSelect/props/propTypes.js +3 -7
  25. package/es/Popup/Popup.js +3 -4
  26. package/es/Radio/Radio.js +8 -8
  27. package/es/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
  28. package/es/Select/GroupSelect.js +3 -9
  29. package/es/Select/Select.js +4 -5
  30. package/es/Select/SelectWithAvatar.js +3 -9
  31. package/es/Select/SelectWithIcon.js +3 -9
  32. package/es/Select/props/defaultProps.js +3 -6
  33. package/es/Select/props/propTypes.js +3 -6
  34. package/es/Switch/Switch.js +8 -8
  35. package/es/Tab/Tab.js +4 -5
  36. package/es/Tab/TabContentWrapper.js +4 -5
  37. package/es/Tab/TabWrapper.js +5 -6
  38. package/es/Tab/Tabs.js +16 -16
  39. package/es/Tab/props/propTypes.js +1 -0
  40. package/es/TextBox/TextBox.js +5 -5
  41. package/es/TextBoxIcon/TextBoxIcon.js +2 -4
  42. package/es/Textarea/Textarea.js +4 -6
  43. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
  44. package/es/deprecated/PortalLayer/PortalLayer.js +8 -6
  45. package/es/v1/AppContainer/AppContainer.js +10 -9
  46. package/es/v1/Avatar/Avatar.js +4 -5
  47. package/es/v1/AvatarTeam/AvatarTeam.js +7 -7
  48. package/es/v1/Button/Button.js +5 -6
  49. package/es/v1/CheckBox/CheckBox.js +8 -8
  50. package/es/v1/DropBox/DropBox.js +10 -11
  51. package/es/v1/DropDown/DropDown.js +2 -1
  52. package/es/v1/ListItem/ListContainer.js +6 -5
  53. package/es/v1/ListItem/ListItem.js +4 -5
  54. package/es/v1/ListItem/ListItemWithAvatar.js +4 -5
  55. package/es/v1/ListItem/ListItemWithCheckBox.js +4 -5
  56. package/es/v1/ListItem/ListItemWithIcon.js +4 -5
  57. package/es/v1/ListItem/ListItemWithRadio.js +4 -5
  58. package/es/v1/Modal/Modal.js +4 -5
  59. package/es/v1/MultiSelect/AdvancedMultiSelect.js +8 -9
  60. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +4 -5
  61. package/es/v1/MultiSelect/SelectedOptions.js +6 -8
  62. package/es/v1/MultiSelect/Suggestions.js +6 -8
  63. package/es/v1/Popup/Popup.js +3 -4
  64. package/es/v1/Radio/Radio.js +8 -8
  65. package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
  66. package/es/v1/Select/Select.js +4 -5
  67. package/es/v1/Switch/Switch.js +8 -8
  68. package/es/v1/Tab/Tab.js +4 -5
  69. package/es/v1/Tab/TabContentWrapper.js +4 -5
  70. package/es/v1/Tab/TabWrapper.js +2 -4
  71. package/es/v1/Tab/Tabs.js +16 -16
  72. package/es/v1/TextBox/TextBox.js +5 -5
  73. package/es/v1/TextBoxIcon/TextBoxIcon.js +2 -4
  74. package/es/v1/Textarea/Textarea.js +4 -6
  75. package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
  76. package/lib/ListItem/ListItem.js +2 -2
  77. package/lib/ListItem/ListItem.module.css +18 -85
  78. package/lib/ListItem/ListItemWithAvatar.js +3 -3
  79. package/lib/ListItem/ListItemWithIcon.js +2 -2
  80. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -7
  81. package/lib/MultiSelect/MultiSelect.js +3 -8
  82. package/lib/MultiSelect/MultiSelectWithAvatar.js +1 -3
  83. package/lib/MultiSelect/Suggestions.js +4 -8
  84. package/lib/MultiSelect/props/defaultProps.js +5 -9
  85. package/lib/MultiSelect/props/propTypes.js +6 -9
  86. package/lib/Select/GroupSelect.js +3 -8
  87. package/lib/Select/SelectWithAvatar.js +3 -8
  88. package/lib/Select/SelectWithIcon.js +3 -8
  89. package/lib/Select/props/defaultProps.js +3 -5
  90. package/lib/Select/props/propTypes.js +3 -6
  91. package/lib/Tab/TabWrapper.js +3 -2
  92. package/lib/Tab/props/propTypes.js +1 -0
  93. package/package.json +3 -3
  94. package/result.json +1 -1
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React, { Component } from 'react';
4
2
  import { SelectWithIcon_defaultProps } from './props/defaultProps';
5
3
  import { SelectWithIcon_propTypes } from './props/propTypes';
@@ -347,12 +345,8 @@ class SelectWithIcon extends Component {
347
345
  i18nKeys,
348
346
  htmlId,
349
347
  isLoading,
350
- dataSelectorId,
351
- customProps
348
+ dataSelectorId
352
349
  } = this.props;
353
- const {
354
- listItemProps = {}
355
- } = customProps;
356
350
  i18nKeys = Object.assign({}, i18nKeys, {
357
351
  emptyText: i18nKeys.emptyText || emptyMessage,
358
352
  searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
@@ -483,7 +477,7 @@ class SelectWithIcon extends Component {
483
477
  iconSize,
484
478
  iconColor
485
479
  } = options;
486
- return /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({
480
+ return /*#__PURE__*/React.createElement(ListItemWithIcon, {
487
481
  key: options[idKey],
488
482
  value: options[valueKey],
489
483
  size: "medium",
@@ -507,7 +501,7 @@ class SelectWithIcon extends Component {
507
501
  ariaSelected: selectedId === options[idKey],
508
502
  ariaLabel: options[valueKey]
509
503
  }
510
- }, listItemProps));
504
+ });
511
505
  })) : /*#__PURE__*/React.createElement(EmptyState, {
512
506
  isLoading: isFetchingOptions,
513
507
  options: options,
@@ -66,8 +66,7 @@ export const GroupSelect_defaultProps = {
66
66
  isSearchClearOnClose: true,
67
67
  i18nKeys: {},
68
68
  iconOnHover: false,
69
- isLoading: false,
70
- customProps: {}
69
+ isLoading: false
71
70
  };
72
71
  export const SelectWithAvatar_defaultProps = {
73
72
  animationStyle: 'bounce',
@@ -91,8 +90,7 @@ export const SelectWithAvatar_defaultProps = {
91
90
  isSearchClearOnClose: true,
92
91
  i18nKeys: {},
93
92
  needEffect: true,
94
- isLoading: false,
95
- customProps: {}
93
+ isLoading: false
96
94
  };
97
95
  export const SelectWithIcon_defaultProps = {
98
96
  isReadOnly: false,
@@ -117,6 +115,5 @@ export const SelectWithIcon_defaultProps = {
117
115
  needIcon: true,
118
116
  iconSize: '14',
119
117
  i18nKeys: {},
120
- isLoading: false,
121
- customProps: {}
118
+ isLoading: false
122
119
  };
@@ -169,8 +169,7 @@ export const GroupSelect_propTypes = {
169
169
  }),
170
170
  isLoading: PropTypes.bool,
171
171
  dataSelectorId: PropTypes.string,
172
- isDefaultSelectValue: PropTypes.bool,
173
- customProps: PropTypes.string
172
+ isDefaultSelectValue: PropTypes.bool
174
173
  };
175
174
  export const SelectWithAvatar_propTypes = { ...Select_propTypes,
176
175
  textBoxClass: PropTypes.string,
@@ -231,8 +230,7 @@ export const SelectWithAvatar_propTypes = { ...Select_propTypes,
231
230
  htmlId: PropTypes.string,
232
231
  needEffect: PropTypes.bool,
233
232
  isLoading: PropTypes.bool,
234
- dataSelectorId: PropTypes.string,
235
- customProps: PropTypes.string
233
+ dataSelectorId: PropTypes.string
236
234
  };
237
235
  export const SelectWithIcon_propTypes = {
238
236
  animationStyle: PropTypes.oneOf(['default', 'bounce']),
@@ -286,6 +284,5 @@ export const SelectWithIcon_propTypes = {
286
284
  searchBoxSize: PropTypes.string,
287
285
  needResponsive: PropTypes.bool,
288
286
  boxSize: PropTypes.string,
289
- emptyMessage: PropTypes.string,
290
- customProps: PropTypes.string
287
+ emptyMessage: PropTypes.string
291
288
  };
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -50,7 +48,7 @@ export default class Switch extends React.Component {
50
48
  customLabel = ''
51
49
  } = customClass;
52
50
  size !== 'small' ? size = 'switch_medium' : size = 'switch_small';
53
- return /*#__PURE__*/React.createElement(Container, _extends({
51
+ return /*#__PURE__*/React.createElement(Container, {
54
52
  align: "vertical",
55
53
  isCover: false,
56
54
  alignBox: "row",
@@ -59,8 +57,9 @@ export default class Switch extends React.Component {
59
57
  "data-title": disabled ? disableTitle : title,
60
58
  "aria-checked": checked,
61
59
  role: "switch",
62
- dataSelectorId: dataSelectorId
63
- }, SwitchProps), /*#__PURE__*/React.createElement(Box, {
60
+ dataSelectorId: dataSelectorId,
61
+ ...SwitchProps
62
+ }, /*#__PURE__*/React.createElement(Box, {
64
63
  className: `${style[size]} ${customSwitchSize}`
65
64
  }, /*#__PURE__*/React.createElement("input", {
66
65
  type: "checkbox",
@@ -78,15 +77,16 @@ export default class Switch extends React.Component {
78
77
  "data-test-id": dataId,
79
78
  className: `${style.label} ${style[`${size}Label`]} ${customSwitch}`,
80
79
  tabIndex: isReadOnly || disabled ? '-1' : '0'
81
- })), text && /*#__PURE__*/React.createElement(Label, _extends({
80
+ })), text && /*#__PURE__*/React.createElement(Label, {
82
81
  text: text,
83
82
  palette: labelPalette,
84
83
  id: id,
85
84
  size: labelSize,
86
85
  type: "subtitle",
87
86
  onClick: !disabled || !isReadOnly ? this.onChange : null,
88
- customClass: customLabel
89
- }, LabelProps)));
87
+ customClass: customLabel,
88
+ ...LabelProps
89
+ }));
90
90
  }
91
91
 
92
92
  }
package/es/Tab/Tab.js CHANGED
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /* eslint-disable react/forbid-component-props */
4
2
 
5
3
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['text', 'tabAlpha', 'alphaActive', 'gammaActive', 'betaActive', 'deltaActive', 'tabGamma', 'tabBeta', 'tabDelta',', 'specialActive', 'tabSpecial', 'alphaActive_border', 'gammaActive_border', 'betaActive_border', 'deltaActive_border'] }] */
@@ -70,7 +68,7 @@ export default function Tab(_ref) {
70
68
  let activeClasses = cs([needAppearance && activeWithAppearance, activeClass]);
71
69
  let inActiveClasses = needAppearance && cs([styles[styleContent.tab], tabTypes[type] && styles[`${`${type}Hover`}`]]);
72
70
  let tabClass = cs([styles.tab, align === 'vertical' ? styles.vertical : styles.horizontal, isDisabled && styles.disabled, needBorder && !isAnimate && needAppearance && styles.border, isActive ? activeClasses : inActiveClasses, className]);
73
- return /*#__PURE__*/React.createElement(Box, _extends({
71
+ return /*#__PURE__*/React.createElement(Box, {
74
72
  tourId: tourId,
75
73
  tagName: isLink ? 'a' : 'div',
76
74
  className: tabClass,
@@ -88,8 +86,9 @@ export default function Tab(_ref) {
88
86
  "aria-selected": isActive ? true : false,
89
87
  tabIndex: isLink ? undefined : isActive && !isDisabled ? '0' : '0',
90
88
  "aria-label": text ? text : null,
91
- dataSelectorId: dataSelectorId
92
- }, customProps), /*#__PURE__*/React.createElement(Container, {
89
+ dataSelectorId: dataSelectorId,
90
+ ...customProps
91
+ }, /*#__PURE__*/React.createElement(Container, {
93
92
  alignBox: "row",
94
93
  align: "both",
95
94
  className: styles.textContainer
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from 'react';
4
2
  import { TabContentWrapper_defaultProps } from './props/defaultProps';
5
3
  import { TabContentWrapper_propTypes } from './props/propTypes';
@@ -18,15 +16,16 @@ const TabContentWrapper = _ref => {
18
16
  tagName,
19
17
  a11y
20
18
  } = _ref;
21
- return /*#__PURE__*/React.createElement(Box, _extends({
19
+ return /*#__PURE__*/React.createElement(Box, {
22
20
  flexible: true,
23
21
  style: style,
24
22
  dataId: dataId,
25
23
  className: className,
26
24
  onScroll: onScroll,
27
25
  dataSelectorId: dataSelectorId,
28
- tagName: tagName
29
- }, a11y), React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) && child.props.id === selectedTab ? child : null));
26
+ tagName: tagName,
27
+ ...a11y
28
+ }, React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) && child.props.id === selectedTab ? child : null));
30
29
  };
31
30
 
32
31
  TabContentWrapper.defaultProps = TabContentWrapper_defaultProps;
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React, { useState, useCallback } from 'react';
4
2
  import { TabWrapper_defaultProps } from './props/defaultProps';
5
3
  import { TabWrapper_propTypes } from './props/propTypes';
@@ -19,7 +17,8 @@ function TabWrapper(_ref) {
19
17
  align,
20
18
  dataId,
21
19
  children,
22
- dataSelectorId
20
+ dataSelectorId,
21
+ alignWrapper
23
22
  } = _ref;
24
23
  let [selectedTabInternal, setSelected] = useState(!hookToDisableInternalState ? defaultTab || 0 : null);
25
24
  const setSelectedTab = useCallback(id => {
@@ -30,14 +29,14 @@ function TabWrapper(_ref) {
30
29
  onSelect && onSelect(id);
31
30
  }, [hookToDisableInternalState, onSelect]);
32
31
  return /*#__PURE__*/React.createElement(Container, {
33
- alignBox: align === 'vertical' ? 'column' : 'row',
32
+ alignBox: alignWrapper ? alignWrapper : align === 'vertical' ? 'column' : 'row',
34
33
  dataId: dataId,
35
34
  dataSelectorId: dataSelectorId
36
35
  }, React.Children.map(children, child => {
37
36
  let TabsChild = child.type;
38
37
  let selectedTab = hookToDisableInternalState ? defaultTab : selectedTabInternal;
39
38
  return /*#__PURE__*/React.createElement(TabsChild // eslint-disable-next-line react/no-array-index-key
40
- , _extends({}, child.props, {
39
+ , { ...child.props,
41
40
  selectedTab: selectedTab,
42
41
  onSelect: setSelectedTab,
43
42
  type: type,
@@ -48,7 +47,7 @@ function TabWrapper(_ref) {
48
47
  needAppearance: needAppearance,
49
48
  hookToDisableInternalState: hookToDisableInternalState,
50
49
  align: align
51
- }));
50
+ });
52
51
  }));
53
52
  }
54
53
 
package/es/Tab/Tabs.js CHANGED
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /* eslint-disable react/forbid-component-props */
4
2
 
5
3
  /* eslint css-modules/no-unused-class: [2, {
@@ -459,7 +457,7 @@ class Tabs extends React.Component {
459
457
  classProps.className = itemClass;
460
458
  }
461
459
 
462
- return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(MainTab, _extends({}, child.props, {
460
+ return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(MainTab, { ...child.props,
463
461
  key: child.props.id,
464
462
  getTabRef: this.getTabRef,
465
463
  onSelect: onSelect,
@@ -470,22 +468,23 @@ class Tabs extends React.Component {
470
468
  needBorder: needTabBorder,
471
469
  needAppearance: needAppearance,
472
470
  align: align,
473
- isVirtual: isVirtual
474
- }, classProps));
471
+ isVirtual: isVirtual,
472
+ ...classProps
473
+ });
475
474
  }), React.Children.count(moreTabs) ? /*#__PURE__*/React.createElement(Box, {
476
475
  className: `${tabsStyle.menu} `,
477
476
  dataSelectorId: `${dataSelectorId}_moreIcon`
478
- }, /*#__PURE__*/React.createElement(Container, _extends({
477
+ }, /*#__PURE__*/React.createElement(Container, {
479
478
  className: `${btnstyle.buttonReset} ${moreButtonClass} ${isPopupOpen ? moreButtonActiveClass : ''}`,
480
479
  align: "both",
481
480
  onClick: this.togglePopup,
482
481
  dataId: "moreTabs",
483
- eleRef: getTargetRef
484
- }, MoreButtonProps, {
482
+ eleRef: getTargetRef,
483
+ ...MoreButtonProps,
485
484
  "aria-label": "MoreTabs",
486
485
  role: "link",
487
486
  tagName: "button"
488
- }), /*#__PURE__*/React.createElement(Icon, {
487
+ }, /*#__PURE__*/React.createElement(Icon, {
489
488
  name: iconName,
490
489
  size: iconSize
491
490
  })), isPopupOpen && /*#__PURE__*/React.createElement(ResponsiveReceiver, {
@@ -495,7 +494,7 @@ class Tabs extends React.Component {
495
494
  let {
496
495
  tabletMode
497
496
  } = _ref2;
498
- return /*#__PURE__*/React.createElement(ResponsiveDropBox, _extends({
497
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
499
498
  isActive: isPopupReady,
500
499
  isAnimate: true,
501
500
  size: "medium",
@@ -505,12 +504,12 @@ class Tabs extends React.Component {
505
504
  boxPosition: position,
506
505
  getRef: getContainerRef,
507
506
  isBoxPaddingNeed: true,
508
- isArrow: false
509
- }, DropBoxProps, {
507
+ isArrow: false,
508
+ ...DropBoxProps,
510
509
  isResponsivePadding: true,
511
510
  needFocusScope: true,
512
511
  onClose: this.togglePopup
513
- }), getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(this.props), /*#__PURE__*/React.createElement(Box, {
512
+ }, getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(this.props), /*#__PURE__*/React.createElement(Box, {
514
513
  flexible: true,
515
514
  shrink: true,
516
515
  scroll: "vertical",
@@ -531,7 +530,7 @@ class Tabs extends React.Component {
531
530
  dataId
532
531
  } = child.props;
533
532
  const value = text ? text : showTitleInMoreOptions ? title : null;
534
- return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(ListItem, _extends({
533
+ return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(ListItem, {
535
534
  key: id,
536
535
  value: value,
537
536
  onClick: this.moreTabSelect,
@@ -544,8 +543,9 @@ class Tabs extends React.Component {
544
543
  customListItem: menuItemClass
545
544
  },
546
545
  target: "self",
547
- dataId: `${dataId}_Tab`
548
- }, ListItemProps), !showTitleInMoreOptions ? children : null);
546
+ dataId: `${dataId}_Tab`,
547
+ ...ListItemProps
548
+ }, !showTitleInMoreOptions ? children : null);
549
549
  })));
550
550
  })) : null);
551
551
  }
@@ -93,6 +93,7 @@ export const Tabs_propTypes = {
93
93
  };
94
94
  export const TabWrapper_propTypes = {
95
95
  align: PropTypes.oneOf(['vertical', 'horizontal']),
96
+ alignWrapper: PropTypes.string,
96
97
  children: PropTypes.node,
97
98
  dataId: PropTypes.string,
98
99
  defaultTab: PropTypes.string,
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -139,7 +137,7 @@ export default class TextBox extends React.PureComponent {
139
137
 
140
138
  let classList = needAppearance ? `${style.container} ${style[size]} ${style[variant]} ${needBorder ? style.border : ''} ${isDisabled && !needEffect || isReadOnly && !needEffect ? '' : style.effect} ${isFocus ? style.focus : ''}` : `${style.basic}`;
141
139
  value = value === null || value === undefined ? '' : value;
142
- return /*#__PURE__*/React.createElement("input", _extends({
140
+ return /*#__PURE__*/React.createElement("input", {
143
141
  "aria-label": ariaLabel,
144
142
  "aria-invalid": ariaInvalid,
145
143
  "aria-autocomplete": ariaAutocomplete,
@@ -173,8 +171,10 @@ export default class TextBox extends React.PureComponent {
173
171
  value: value,
174
172
  onScroll: isScrollPrevent ? this.handlePreventTextBoxScroll : '',
175
173
  onKeyPress: onKeyPress,
176
- onMouseDown: onMouseDown
177
- }, options, customProps));
174
+ onMouseDown: onMouseDown,
175
+ ...options,
176
+ ...customProps
177
+ });
178
178
  }
179
179
 
180
180
  }
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -127,7 +125,7 @@ export default class TextBoxIcon extends React.Component {
127
125
  "data-title": isDisabled ? title : null
128
126
  }, /*#__PURE__*/React.createElement(Box, {
129
127
  flexible: true
130
- }, /*#__PURE__*/React.createElement(TextBox, _extends({}, this.props, {
128
+ }, /*#__PURE__*/React.createElement(TextBox, { ...this.props,
131
129
  dataId: dataId,
132
130
  size: size,
133
131
  variant: variant,
@@ -155,7 +153,7 @@ export default class TextBoxIcon extends React.Component {
155
153
  isScrollPrevent: isScrollPrevent,
156
154
  customClass: customTextBox,
157
155
  customProps: TextBoxProps
158
- }))), /*#__PURE__*/React.createElement(Box, {
156
+ })), /*#__PURE__*/React.createElement(Box, {
159
157
  className: `${style.iconContainer} ${customTBoxIcon}`
160
158
  }, /*#__PURE__*/React.createElement(Container, {
161
159
  alignBox: "row"
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -87,12 +85,12 @@ export default class Textarea extends React.Component {
87
85
  }
88
86
 
89
87
  let classList = needAppearance ? `${style.container} ${style[size]} ${style[variant]} ${needBorder ? style.needBorder : style.noBorder} ${resize ? style[resizes[resize]] : style[resizes.none]} ${animated ? `${style[`${size}animated`]}` : ''} ${isDisabled && !needEffect || isReadOnly && !needEffect ? '' : style.effect}` : `${style.basic}`;
90
- return /*#__PURE__*/React.createElement("textarea", _extends({
88
+ return /*#__PURE__*/React.createElement("textarea", {
91
89
  "aria-label": ariaLabel,
92
90
  "aria-labelledby": ariaLabelledby,
93
91
  className: `${customClass} ${isReadOnly && needReadOnlyStyle ? style.readonly : ''} ${classList} ${style[`borderColor_${borderColor}`]}`,
94
- placeholder: placeHolder
95
- }, options, {
92
+ placeholder: placeHolder,
93
+ ...options,
96
94
  "data-id": dataId,
97
95
  "data-test-id": dataId,
98
96
  maxLength: maxLength,
@@ -104,7 +102,7 @@ export default class Textarea extends React.Component {
104
102
  value: text,
105
103
  id: htmlId,
106
104
  "data-selector-id": dataSelectorId
107
- }));
105
+ });
108
106
  }
109
107
 
110
108
  }
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -86,14 +84,15 @@ export default class VelocityAnimationGroup extends React.Component {
86
84
  delay: exitDelay ? exitDelay : 0,
87
85
  display: 'none'
88
86
  };
89
- return /*#__PURE__*/React.createElement(VelocityTransitionGroup, _extends({
87
+ return /*#__PURE__*/React.createElement(VelocityTransitionGroup, {
90
88
  enter: enterAnimation,
91
89
  leave: exitAnimation,
92
90
  component: component && component,
93
91
  runOnMount: runOnMount,
94
92
  enterHideStyle: enterHideStyle,
95
- enterShowStyle: enterShowStyle
96
- }, childProps), isActive ? children : null);
93
+ enterShowStyle: enterShowStyle,
94
+ ...childProps
95
+ }, isActive ? children : null);
97
96
  }
98
97
 
99
98
  }
@@ -11,12 +11,14 @@ let RefElement = /*#__PURE__*/React.forwardRef((props, ref) => {
11
11
  isChildrenRestrictionNeeded = true,
12
12
  isActive
13
13
  } = props;
14
- return isChildrenRestrictionNeeded ? isActive ? renderChildren ? renderChildren(ref) : /*#__PURE__*/React.createElement(Element, Object.assign({}, elementProps, {
15
- forwardRef: ref
16
- })) : null : renderChildren ? renderChildren(ref, isActive) : /*#__PURE__*/React.createElement(Element, Object.assign({}, elementProps, {
17
- isActive,
18
- forwardRef: ref
19
- }));
14
+ return isChildrenRestrictionNeeded ? isActive ? renderChildren ? renderChildren(ref) : /*#__PURE__*/React.createElement(Element, { ...Object.assign({}, elementProps, {
15
+ forwardRef: ref
16
+ })
17
+ }) : null : renderChildren ? renderChildren(ref, isActive) : /*#__PURE__*/React.createElement(Element, { ...Object.assign({}, elementProps, {
18
+ isActive,
19
+ forwardRef: ref
20
+ })
21
+ });
20
22
  });
21
23
  RefElement.propTypes = RefElement_propTypes;
22
24
  export { RefElement };
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React, { useEffect, useRef, useLayoutEffect } from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -93,23 +91,26 @@ export default function AppContainer(props) {
93
91
  }
94
92
  };
95
93
  }, []);
96
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, _extends({
94
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, {
97
95
  className: `${style.container} ${className}`,
98
96
  dataId: dataId,
99
97
  dataSelectorId: dataSelectorId,
100
98
  tagName: tagName,
101
- eleRef: getContainerRef
102
- }, ContainerProps, ExtraProps), /*#__PURE__*/React.createElement(Box, {
99
+ eleRef: getContainerRef,
100
+ ...ContainerProps,
101
+ ...ExtraProps
102
+ }, /*#__PURE__*/React.createElement(Box, {
103
103
  flexible: true
104
- }, children)), needTooltip ? /*#__PURE__*/React.createElement("div", _extends({}, ExtraProps, {
104
+ }, children)), needTooltip ? /*#__PURE__*/React.createElement("div", { ...ExtraProps,
105
105
  className: `${style.container} ${style.tooltip} ${tooltipParentClass}`,
106
106
  "data-id": `${dataId}_tooltip`,
107
107
  "data-test-id": `${dataId}_tooltip`,
108
108
  "data-selector-id": `${dataSelectorId}_tooltip`
109
- }), /*#__PURE__*/React.createElement(Tooltip, _extends({
109
+ }, /*#__PURE__*/React.createElement(Tooltip, {
110
110
  ref: setTooltipRef,
111
- customClass: tooltipClass
112
- }, TooltipProps))) : null);
111
+ customClass: tooltipClass,
112
+ ...TooltipProps
113
+ })) : null);
113
114
  }
114
115
  AppContainer.propTypes = propTypes;
115
116
  AppContainer.defaultProps = defaultProps; // if (__DOCS__) {
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React, { useState } from 'react';
4
2
  import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
5
3
  import { defaultProps } from './props/defaultProps';
@@ -105,15 +103,16 @@ function Avatar(props) {
105
103
  let showDefaultBorder = src && !isInvalidImageList && needDefaultBorder;
106
104
  let borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
107
105
  borderStyle = showAlternateAvatar ? '' : borderStyle;
108
- return /*#__PURE__*/React.createElement("div", _extends({
106
+ return /*#__PURE__*/React.createElement("div", {
109
107
  className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
110
108
  "data-title": needTitle ? title ? title : name : null,
111
109
  "data-id": dataId,
112
110
  "data-test-id": dataId,
113
111
  onClick: onClick,
114
112
  "data-selector-id": dataSelectorId,
115
- tabIndex: onClick ? 0 : null
116
- }, AvatarProps), showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
113
+ tabIndex: onClick ? 0 : null,
114
+ ...AvatarProps
115
+ }, showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
117
116
  className: `${style.initial}`,
118
117
  "data-id": `${dataId}_AvatarInitial`,
119
118
  "data-test-id": `${dataId}_AvatarInitial`,
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -41,12 +39,13 @@ export default function AvatarTeam(props) {
41
39
  customAvatarTeam = ''
42
40
  } = customClass;
43
41
  const border = borderOnHover || onClick;
44
- return /*#__PURE__*/React.createElement("span", _extends({
42
+ return /*#__PURE__*/React.createElement("span", {
45
43
  className: `${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} `,
46
44
  "data-id": dataId,
47
45
  "data-test-id": dataId,
48
- "data-selector-id": dataSelectorId
49
- }, AvatarTeamProps), /*#__PURE__*/React.createElement(Avatar, _extends({
46
+ "data-selector-id": dataSelectorId,
47
+ ...AvatarTeamProps
48
+ }, /*#__PURE__*/React.createElement(Avatar, {
50
49
  name: name,
51
50
  onClick: onClick,
52
51
  palette: palette,
@@ -60,8 +59,9 @@ export default function AvatarTeam(props) {
60
59
  borderOnHover: border,
61
60
  needInnerBorder: needInnerBorder,
62
61
  needBorder: needBorder,
63
- needDefaultBorder: needDefaultBorder
64
- }, AvatarProps)), /*#__PURE__*/React.createElement("span", {
62
+ needDefaultBorder: needDefaultBorder,
63
+ ...AvatarProps
64
+ }), /*#__PURE__*/React.createElement("span", {
65
65
  className: `${style.team} ${isFilled ? `${style[`${palette}Filled`]}` : style.nofill}
66
66
  ${style[`${size}team`]} ${customAvatarTeam}`
67
67
  }));
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -39,7 +37,7 @@ export default function Button(props) {
39
37
  style: finalStyle
40
38
  });
41
39
  let statusLower = status.toLowerCase();
42
- return /*#__PURE__*/React.createElement("button", _extends({
40
+ return /*#__PURE__*/React.createElement("button", {
43
41
  className: buttonClass,
44
42
  "data-id": disabled ? `${dataId}_disabled` : dataId,
45
43
  "data-test-id": disabled ? `${dataId}_disabled` : dataId,
@@ -48,10 +46,11 @@ export default function Button(props) {
48
46
  "data-title": title,
49
47
  type: "button",
50
48
  ref: getRef,
51
- "data-selector-id": dataSelectorId
52
- }, customProps, a11y, {
49
+ "data-selector-id": dataSelectorId,
50
+ ...customProps,
51
+ ...a11y,
53
52
  id: id
54
- }), children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/React.createElement("div", {
53
+ }, children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/React.createElement("div", {
55
54
  className: finalStyle.overlay
56
55
  }, /*#__PURE__*/React.createElement("div", {
57
56
  className: loaderParentClass
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from 'react';
4
2
  import { propTypes } from './props/propTypes';
5
3
  import { defaultProps } from './props/defaultProps';
@@ -66,7 +64,7 @@ const CheckBox = props => {
66
64
  role = 'checkbox',
67
65
  ariaChecked = checked
68
66
  } = a11y;
69
- return /*#__PURE__*/React.createElement(Container, _extends({
67
+ return /*#__PURE__*/React.createElement(Container, {
70
68
  dataId: dataId,
71
69
  isCover: false,
72
70
  isInline: text ? false : true,
@@ -83,8 +81,9 @@ const CheckBox = props => {
83
81
  "aria-label": ariaLabel,
84
82
  "aria-labelledby": ariaLabelledby,
85
83
  "aria-hidden": ariaHidden,
86
- "data-selector-id": dataSelectorId || id
87
- }, CheckBoxProps), /*#__PURE__*/React.createElement(Box, {
84
+ "data-selector-id": dataSelectorId || id,
85
+ ...CheckBoxProps
86
+ }, /*#__PURE__*/React.createElement(Box, {
88
87
  className: `${style.boxContainer} ${style[size]} ${customCBoxSize} ${isFilled ? style.filled : ''}`
89
88
  }, /*#__PURE__*/React.createElement("input", {
90
89
  type: "hidden",
@@ -136,7 +135,7 @@ const CheckBox = props => {
136
135
  }) : null))), text && /*#__PURE__*/React.createElement(Box, {
137
136
  flexible: true,
138
137
  className: style.text
139
- }, /*#__PURE__*/React.createElement(Label, _extends({
138
+ }, /*#__PURE__*/React.createElement(Label, {
140
139
  text: text,
141
140
  palette: disabled ? 'disable' : labelPalette,
142
141
  id: id,
@@ -147,8 +146,9 @@ const CheckBox = props => {
147
146
  customClass: `${active && !disabled ? `${style[`active${palette}Label`]}` : ''}
148
147
  ${checked && active ? `${style[`checked${palette}Label`]}` : ''}
149
148
  ${accessMode} ${customLabel}`,
150
- title: toolTip ? toolTip : text
151
- }, LabelProps))));
149
+ title: toolTip ? toolTip : text,
150
+ ...LabelProps
151
+ })));
152
152
  };
153
153
 
154
154
  export default CheckBox;