@zohodesk/components 1.0.0-temp-193 → 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 (79) 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/DateTime/DateTime.js +2 -8
  8. package/es/DateTime/DateWidget.js +3 -14
  9. package/es/DateTime/Time.js +13 -30
  10. package/es/DateTime/props/defaultProps.js +2 -4
  11. package/es/DateTime/props/propTypes.js +3 -6
  12. package/es/DropBox/DropBox.js +10 -11
  13. package/es/DropDown/DropDown.js +2 -1
  14. package/es/ListItem/ListContainer.js +6 -5
  15. package/es/ListItem/ListItem.js +4 -5
  16. package/es/ListItem/ListItemWithAvatar.js +4 -5
  17. package/es/ListItem/ListItemWithCheckBox.js +4 -5
  18. package/es/ListItem/ListItemWithIcon.js +4 -5
  19. package/es/ListItem/ListItemWithRadio.js +4 -5
  20. package/es/Modal/Modal.js +4 -5
  21. package/es/MultiSelect/AdvancedMultiSelect.js +8 -9
  22. package/es/MultiSelect/MultiSelectWithAvatar.js +4 -5
  23. package/es/MultiSelect/SelectedOptions.js +6 -8
  24. package/es/MultiSelect/Suggestions.js +6 -8
  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/Select.js +4 -5
  29. package/es/Switch/Switch.js +8 -8
  30. package/es/Tab/Tab.js +4 -5
  31. package/es/Tab/TabContentWrapper.js +4 -5
  32. package/es/Tab/TabWrapper.js +5 -6
  33. package/es/Tab/Tabs.js +16 -16
  34. package/es/Tab/props/propTypes.js +1 -0
  35. package/es/TextBox/TextBox.js +5 -5
  36. package/es/TextBoxIcon/TextBoxIcon.js +2 -4
  37. package/es/Textarea/Textarea.js +4 -6
  38. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
  39. package/es/deprecated/PortalLayer/PortalLayer.js +8 -6
  40. package/es/v1/AppContainer/AppContainer.js +10 -9
  41. package/es/v1/Avatar/Avatar.js +4 -5
  42. package/es/v1/AvatarTeam/AvatarTeam.js +7 -7
  43. package/es/v1/Button/Button.js +5 -6
  44. package/es/v1/CheckBox/CheckBox.js +8 -8
  45. package/es/v1/DropBox/DropBox.js +10 -11
  46. package/es/v1/DropDown/DropDown.js +2 -1
  47. package/es/v1/ListItem/ListContainer.js +6 -5
  48. package/es/v1/ListItem/ListItem.js +4 -5
  49. package/es/v1/ListItem/ListItemWithAvatar.js +4 -5
  50. package/es/v1/ListItem/ListItemWithCheckBox.js +4 -5
  51. package/es/v1/ListItem/ListItemWithIcon.js +4 -5
  52. package/es/v1/ListItem/ListItemWithRadio.js +4 -5
  53. package/es/v1/Modal/Modal.js +4 -5
  54. package/es/v1/MultiSelect/AdvancedMultiSelect.js +8 -9
  55. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +4 -5
  56. package/es/v1/MultiSelect/SelectedOptions.js +6 -8
  57. package/es/v1/MultiSelect/Suggestions.js +6 -8
  58. package/es/v1/Popup/Popup.js +3 -4
  59. package/es/v1/Radio/Radio.js +8 -8
  60. package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
  61. package/es/v1/Select/Select.js +4 -5
  62. package/es/v1/Switch/Switch.js +8 -8
  63. package/es/v1/Tab/Tab.js +4 -5
  64. package/es/v1/Tab/TabContentWrapper.js +4 -5
  65. package/es/v1/Tab/TabWrapper.js +2 -4
  66. package/es/v1/Tab/Tabs.js +16 -16
  67. package/es/v1/TextBox/TextBox.js +5 -5
  68. package/es/v1/TextBoxIcon/TextBoxIcon.js +2 -4
  69. package/es/v1/Textarea/Textarea.js +4 -6
  70. package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
  71. package/lib/DateTime/DateTime.js +2 -13
  72. package/lib/DateTime/DateWidget.js +3 -19
  73. package/lib/DateTime/Time.js +13 -35
  74. package/lib/DateTime/props/defaultProps.js +2 -4
  75. package/lib/DateTime/props/propTypes.js +3 -6
  76. package/lib/Tab/TabWrapper.js +3 -2
  77. package/lib/Tab/props/propTypes.js +1 -0
  78. package/package.json +1 -1
  79. 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
  /**** Libraries ****/
4
2
  import React from 'react';
5
3
  import { AdvancedMultiSelect_propTypes } from './props/propTypes';
@@ -488,7 +486,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
488
486
  let {
489
487
  tabletMode
490
488
  } = _ref2;
491
- return /*#__PURE__*/React.createElement(ResponsiveDropBox, _extends({
489
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
492
490
  animationStyle: animationStyle,
493
491
  boxPosition: position || `${defaultDropBoxPosition}Center`,
494
492
  getRef: getContainerRef,
@@ -502,11 +500,11 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
502
500
  a11y: {
503
501
  role: 'listbox',
504
502
  ariaMultiselectable: true
505
- }
506
- }, DropBoxProps, {
503
+ },
504
+ ...DropBoxProps,
507
505
  alignBox: "row",
508
506
  isResponsivePadding: getFooter ? false : true
509
- }), isLoading ? /*#__PURE__*/React.createElement(Container, {
507
+ }, isLoading ? /*#__PURE__*/React.createElement(Container, {
510
508
  align: "both",
511
509
  className: style.loader
512
510
  }, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(Box, {
@@ -523,7 +521,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
523
521
  shrink: true,
524
522
  customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
525
523
  eleRef: this.suggestionContainerRef
526
- }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
524
+ }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
527
525
  suggestions: suggestions,
528
526
  selectedOptions: allselectedOptionIds,
529
527
  getRef: this.suggestionItemRef,
@@ -534,8 +532,9 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
534
532
  listItemSize: listItemSize,
535
533
  a11y: {
536
534
  role: 'option'
537
- }
538
- }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
535
+ },
536
+ ...SuggestionsProps
537
+ }) : /*#__PURE__*/React.createElement(EmptyState, {
539
538
  isLoading: isFetchingOptions,
540
539
  options: options,
541
540
  searchString: searchStr,
@@ -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
  /**** Libraries ****/
4
2
  import React from 'react';
5
3
  import { MultiSelectWithAvatar_propTypes } from './props/propTypes';
@@ -157,7 +155,7 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
157
155
  shrink: true,
158
156
  customClass: !isModel && dropBoxSize ? style[dropBoxSize] : '',
159
157
  eleRef: this.suggestionContainerRef
160
- }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
158
+ }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
161
159
  needTick: keepSelectedOptions,
162
160
  suggestions: suggestions,
163
161
  getRef: this.suggestionItemRef,
@@ -170,8 +168,9 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
170
168
  selectedOptions: selectedOptionIds,
171
169
  a11y: {
172
170
  role: 'option'
173
- }
174
- }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
171
+ },
172
+ ...SuggestionsProps
173
+ }) : /*#__PURE__*/React.createElement(EmptyState, {
175
174
  isLoading: isFetchingOptions,
176
175
  options: options,
177
176
  searchString: searchStr,
@@ -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
  /**** Libraries ****/
4
2
  import React from 'react';
5
3
  import { SelectedOptions_propTypes } from './props/propTypes';
@@ -52,28 +50,28 @@ export default class SelectedOptions extends React.PureComponent {
52
50
  return /*#__PURE__*/React.createElement(Box, {
53
51
  className: `${style.tag} ${style[size]}`,
54
52
  key: `${id}photoTag`
55
- }, /*#__PURE__*/React.createElement(Tag, _extends({}, commonProps, {
53
+ }, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
56
54
  active: highLightedSelectOptions.indexOf(id) >= 0,
57
55
  hasAvatar: true,
58
56
  imageURL: photoURL
59
- })));
57
+ }));
60
58
  } else if (optionType === 'icon') {
61
59
  return /*#__PURE__*/React.createElement(Box, {
62
60
  className: `${style.tag} ${style[size]}`,
63
61
  key: `${id}iconTag`
64
- }, /*#__PURE__*/React.createElement(Tag, _extends({}, commonProps, {
62
+ }, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
65
63
  active: highLightedSelectOptions.indexOf(id) >= 0,
66
64
  iconName: icon,
67
65
  iconSize: iconSize
68
- })));
66
+ }));
69
67
  }
70
68
 
71
69
  return /*#__PURE__*/React.createElement(Box, {
72
70
  className: `${style.tag} ${style[size]}`,
73
71
  key: `${id}tag`
74
- }, /*#__PURE__*/React.createElement(Tag, _extends({}, commonProps, {
72
+ }, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
75
73
  active: highLightedSelectOptions.indexOf(id) >= 0
76
- })));
74
+ }));
77
75
  }));
78
76
  }
79
77
 
@@ -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
  /**** Libraries ****/
4
2
  import React from 'react';
5
3
  import { Suggestions_propTypes } from './props/propTypes';
@@ -76,7 +74,7 @@ export default class Suggestions extends React.PureComponent {
76
74
  }
77
75
 
78
76
  if (optionType === 'avatar') {
79
- return /*#__PURE__*/React.createElement(ListItemWithAvatar, _extends({}, commonProps, {
77
+ return /*#__PURE__*/React.createElement(ListItemWithAvatar, { ...commonProps,
80
78
  autoHover: false,
81
79
  getRef: getRef,
82
80
  highlight: isHighlight,
@@ -95,9 +93,9 @@ export default class Suggestions extends React.PureComponent {
95
93
  avatarPalette: avatarPalette,
96
94
  palette: palette,
97
95
  a11y: list_a11y
98
- }));
96
+ });
99
97
  } else if (optionType === 'icon') {
100
- return /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({}, commonProps, {
98
+ return /*#__PURE__*/React.createElement(ListItemWithIcon, { ...commonProps,
101
99
  autoHover: false,
102
100
  getRef: getRef,
103
101
  highlight: isHighlight,
@@ -115,10 +113,10 @@ export default class Suggestions extends React.PureComponent {
115
113
  size: listItemSize,
116
114
  palette: palette,
117
115
  a11y: list_a11y
118
- }));
116
+ });
119
117
  }
120
118
 
121
- return /*#__PURE__*/React.createElement(ListItem, _extends({}, commonProps, {
119
+ return /*#__PURE__*/React.createElement(ListItem, { ...commonProps,
122
120
  autoHover: false,
123
121
  getRef: getRef,
124
122
  highlight: isHighlight,
@@ -134,7 +132,7 @@ export default class Suggestions extends React.PureComponent {
134
132
  size: listItemSize,
135
133
  palette: palette,
136
134
  a11y: list_a11y
137
- }));
135
+ });
138
136
  })));
139
137
  }
140
138
 
package/es/Popup/Popup.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
  /**** Libraries ****/
4
2
  import React from 'react';
5
3
  import PropTypes from 'prop-types';
@@ -623,14 +621,15 @@ const Popup = function (Component) {
623
621
  isPopupOpen
624
622
  } = this.state;
625
623
  const localState = isPopupReady ? this.state : {};
626
- return /*#__PURE__*/React.createElement(Component, _extends({}, this.props, this.state, {
624
+ return /*#__PURE__*/React.createElement(Component, { ...this.props,
625
+ ...this.state,
627
626
  openPopupOnly: this.openPopupOnly,
628
627
  closePopupOnly: this.closePopupOnly,
629
628
  togglePopup: this.togglePopup,
630
629
  removeClose: this.removeClose,
631
630
  getTargetRef: this.getTargetRef,
632
631
  getContainerRef: this.getContainerRef
633
- }));
632
+ });
634
633
  }
635
634
 
636
635
  }
package/es/Radio/Radio.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 css-modules/no-unused-class: [2, { markAsUsed: ['small', 'medium'] }] */
4
2
  import React from 'react';
5
3
  import { defaultProps } from './props/defaultProps';
@@ -73,7 +71,7 @@ export default class Radio extends React.Component {
73
71
  ContainerProps = {},
74
72
  LabelProps = {}
75
73
  } = customProps;
76
- return /*#__PURE__*/React.createElement(Container, _extends({
74
+ return /*#__PURE__*/React.createElement(Container, {
77
75
  dataId: value ? value.toLowerCase() : 'RadioComp',
78
76
  isCover: false,
79
77
  isInline: text ? false : true,
@@ -89,8 +87,9 @@ export default class Radio extends React.Component {
89
87
  "aria-Hidden": ariaHidden,
90
88
  "aria-label": ariaLabel,
91
89
  "aria-labelledby": ariaLabelledby,
92
- "aria-readonly": ariaReadonly
93
- }, ContainerProps), /*#__PURE__*/React.createElement(Box, {
90
+ "aria-readonly": ariaReadonly,
91
+ ...ContainerProps
92
+ }, /*#__PURE__*/React.createElement(Box, {
94
93
  className: `${style.radio} ${checked ? `${style[`rdBox${palette}`]}` : ''}
95
94
  ${isReadOnly || disabled ? '' : `${style[`hover${palette}`]}`} ${style[size]} ${isFilled ? style.filled : ''} ${style[`centerPath${palette}`]} ${customRadio}`
96
95
  }, /*#__PURE__*/React.createElement("input", {
@@ -116,7 +115,7 @@ export default class Radio extends React.Component {
116
115
  }) : null))), text && /*#__PURE__*/React.createElement(Box, {
117
116
  flexible: true,
118
117
  className: style.text
119
- }, /*#__PURE__*/React.createElement(Label, _extends({
118
+ }, /*#__PURE__*/React.createElement(Label, {
120
119
  text: text,
121
120
  palette: labelPalette,
122
121
  size: labelSize,
@@ -126,8 +125,9 @@ export default class Radio extends React.Component {
126
125
  variant: variant,
127
126
  title: toolTip ? toolTip : text,
128
127
  customClass: `${checked && active ? `${style[`${palette}checkedActive`]}` : ''}
129
- ${style[`${palette}Label`]} ${accessMode} ${customLabel}`
130
- }, LabelProps))), children);
128
+ ${style[`${palette}Label`]} ${accessMode} ${customLabel}`,
129
+ ...LabelProps
130
+ })), children);
131
131
  }
132
132
 
133
133
  }
@@ -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 { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -45,9 +43,9 @@ export default class ResponsiveDropBox extends Component {
45
43
  customMobileDropBoxWrap: `${customMobileDropBoxWrap}`,
46
44
  customResponsiveContainer: `${customResponsiveContainer}`
47
45
  };
48
- return /*#__PURE__*/React.createElement(DropBox, _extends({}, this.props, {
46
+ return /*#__PURE__*/React.createElement(DropBox, { ...this.props,
49
47
  customClass: dropBoxClasses
50
- }), /*#__PURE__*/React.createElement(ResponsiveReceiver, {
48
+ }, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
51
49
  query: this.responsiveFunc,
52
50
  responsiveId: "Helmet"
53
51
  }, _ref2 => {
@@ -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
  /**** Libraries ****/
4
2
  import React, { Component } from 'react';
5
3
  import { Select_defaultProps } from './props/defaultProps';
@@ -917,7 +915,7 @@ export class SelectComponent extends Component {
917
915
  shrink: true,
918
916
  customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
919
917
  eleRef: this.suggestionContainerRef
920
- }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
918
+ }, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
921
919
  activeId: selectedId,
922
920
  suggestions: suggestions,
923
921
  getRef: this.suggestionItemRef,
@@ -934,8 +932,9 @@ export class SelectComponent extends Component {
934
932
  a11y: {
935
933
  ariaParentRole: 'listbox',
936
934
  role: 'option'
937
- }
938
- }, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
935
+ },
936
+ ...SuggestionsProps
937
+ }) : /*#__PURE__*/React.createElement(EmptyState, {
939
938
  isLoading: isFetchingOptions,
940
939
  options: options,
941
940
  searchString: searchStr,
@@ -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
  }