@zohodesk/components 1.0.0-alpha-227 → 1.0.0-alpha-230

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 (99) hide show
  1. package/README.md +12 -0
  2. package/assets/Appearance/dark/mode/darkMode.module.css +2 -0
  3. package/assets/Appearance/default/mode/defaultMode.module.css +2 -0
  4. package/es/Animation/Animation.js +7 -8
  5. package/es/Avatar/Avatar.js +11 -11
  6. package/es/Button/Button.js +15 -16
  7. package/es/Button/Button.module.css +6 -2
  8. package/es/Card/Card.js +4 -5
  9. package/es/DropBox/DropBox.js +2 -2
  10. package/es/ListItem/ListContainer.js +3 -8
  11. package/es/ListItem/ListItem.module.css +0 -1
  12. package/es/MultiSelect/AdvancedGroupMultiSelect.js +1 -1
  13. package/es/MultiSelect/AdvancedMultiSelect.js +17 -6
  14. package/es/MultiSelect/MultiSelect.js +21 -11
  15. package/es/MultiSelect/MultiSelectWithAvatar.js +1 -1
  16. package/es/PopOver/PopOver.js +19 -20
  17. package/es/Popup/Popup.js +1 -1
  18. package/es/Responsive/sizeObservers.js +8 -1
  19. package/es/Ribbon/Ribbon.js +8 -8
  20. package/es/Select/GroupSelect.js +1 -1
  21. package/es/Select/Select.js +4 -5
  22. package/es/Select/SelectWithAvatar.js +1 -1
  23. package/es/Select/SelectWithIcon.js +1 -1
  24. package/es/Stencils/Stencils.js +5 -6
  25. package/es/TextBoxIcon/TextBoxIcon.js +1 -1
  26. package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +1 -1
  27. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +1 -1
  28. package/es/utils/dropDownUtils.js +39 -1
  29. package/lib/Accordion/Accordion.js +1 -1
  30. package/lib/Accordion/AccordionItem.js +1 -1
  31. package/lib/Animation/Animation.js +8 -9
  32. package/lib/AppContainer/AppContainer.js +1 -1
  33. package/lib/Avatar/Avatar.js +12 -12
  34. package/lib/AvatarTeam/AvatarTeam.js +1 -1
  35. package/lib/Button/Button.js +16 -17
  36. package/lib/Button/Button.module.css +6 -2
  37. package/lib/Buttongroup/Buttongroup.js +1 -1
  38. package/lib/Card/Card.js +5 -6
  39. package/lib/CheckBox/CheckBox.js +1 -1
  40. package/lib/DateTime/CalendarView.js +1 -1
  41. package/lib/DateTime/DateTime.js +1 -1
  42. package/lib/DateTime/DateTimePopupFooter.js +1 -1
  43. package/lib/DateTime/DateTimePopupHeader.js +1 -1
  44. package/lib/DateTime/DateWidget.js +1 -1
  45. package/lib/DateTime/DaysRow.js +1 -1
  46. package/lib/DateTime/Time.js +1 -1
  47. package/lib/DateTime/YearView.js +1 -1
  48. package/lib/DropBox/DropBox.js +7 -3
  49. package/lib/DropDown/DropDown.js +1 -1
  50. package/lib/DropDown/DropDownHeading.js +1 -1
  51. package/lib/DropDown/DropDownItem.js +1 -1
  52. package/lib/DropDown/DropDownSearch.js +1 -1
  53. package/lib/DropDown/DropDownSeparator.js +1 -1
  54. package/lib/Label/Label.js +1 -1
  55. package/lib/ListItem/ListContainer.js +3 -8
  56. package/lib/ListItem/ListItem.js +1 -1
  57. package/lib/ListItem/ListItem.module.css +0 -1
  58. package/lib/ListItem/ListItemWithAvatar.js +1 -1
  59. package/lib/ListItem/ListItemWithCheckBox.js +1 -1
  60. package/lib/ListItem/ListItemWithIcon.js +1 -1
  61. package/lib/ListItem/ListItemWithRadio.js +1 -1
  62. package/lib/Modal/Modal.js +1 -1
  63. package/lib/Modal/__docs__/Modal__default.docs.js +1 -1
  64. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +2 -2
  65. package/lib/MultiSelect/AdvancedMultiSelect.js +18 -6
  66. package/lib/MultiSelect/EmptyState.js +1 -1
  67. package/lib/MultiSelect/MultiSelect.js +22 -11
  68. package/lib/MultiSelect/MultiSelectHeader.js +1 -1
  69. package/lib/MultiSelect/MultiSelectWithAvatar.js +2 -2
  70. package/lib/MultiSelect/SelectedOptions.js +1 -1
  71. package/lib/MultiSelect/Suggestions.js +1 -1
  72. package/lib/PopOver/PopOver.js +20 -21
  73. package/lib/Popup/Popup.js +33 -30
  74. package/lib/Popup/__tests__/Popup.spec.js +1 -1
  75. package/lib/Provider.js +1 -1
  76. package/lib/Radio/Radio.js +1 -1
  77. package/lib/Responsive/ResizeComponent.js +1 -1
  78. package/lib/Responsive/Responsive.js +1 -1
  79. package/lib/Responsive/sizeObservers.js +9 -2
  80. package/lib/Ribbon/Ribbon.js +9 -9
  81. package/lib/Select/GroupSelect.js +2 -2
  82. package/lib/Select/Select.js +5 -6
  83. package/lib/Select/SelectWithAvatar.js +2 -2
  84. package/lib/Select/SelectWithIcon.js +2 -2
  85. package/lib/Stencils/Stencils.js +6 -7
  86. package/lib/Switch/Switch.js +1 -1
  87. package/lib/Tab/Tabs.js +1 -1
  88. package/lib/Tag/Tag.js +1 -1
  89. package/lib/TextBox/TextBox.js +1 -1
  90. package/lib/TextBoxIcon/TextBoxIcon.js +2 -2
  91. package/lib/Textarea/Textarea.js +1 -1
  92. package/lib/Tooltip/Tooltip.js +1 -1
  93. package/lib/Tooltip/__tests__/Tooltip.spec.js +1 -1
  94. package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +6 -4
  95. package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +6 -4
  96. package/lib/deprecated/PortalLayer/PortalLayer.js +1 -1
  97. package/lib/semantic/Button/Button.js +1 -1
  98. package/lib/utils/dropDownUtils.js +45 -2
  99. package/package.json +4 -4
@@ -21,7 +21,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
21
21
 
22
22
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
23
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -84,14 +84,14 @@ Ribbon.propTypes = {
84
84
  text: _propTypes["default"].string,
85
85
  type: _propTypes["default"].oneOf(['default', 'flag', 'plain', 'ribbon', 'box', 'stamp', 'sticker', 'tag']),
86
86
  customClass: _propTypes["default"].string
87
- };
88
- Ribbon.propTypesDescription = {
89
- text: ' ',
90
- type: ' ',
91
- children: ' ',
92
- palette: ' ',
93
- size: ' '
94
- };
87
+ }; // Ribbon.propTypesDescription = {
88
+ // text: ' ',
89
+ // type: ' ',
90
+ // children: ' ',
91
+ // palette: ' ',
92
+ // size: ' '
93
+ // };
94
+
95
95
  Ribbon.defaultProps = {
96
96
  palette: 'default',
97
97
  size: 'large',
@@ -63,7 +63,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
63
63
 
64
64
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
65
65
 
66
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
66
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
67
67
 
68
68
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
69
69
 
@@ -669,7 +669,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
669
669
  return /*#__PURE__*/_react["default"].createElement("div", {
670
670
  className: "".concat(_SelectModule["default"].container, " ").concat(_SelectModule["default"]["box_".concat(size)], " ").concat(isReadOnly ? _SelectModule["default"].readonly : '', " ").concat(borderColor === 'transparent' ? _SelectModule["default"].transparentContainer : '', " ").concat(iconOnHover && (isReadOnly || isDisabled) ? _SelectModule["default"].iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? _SelectModule["default"].iconOnHoverStyle : ''),
671
671
  "data-id": dataIdSlctComp,
672
- "data-title": isDisabled ? title : ''
672
+ "data-title": isDisabled ? title : null
673
673
  }, /*#__PURE__*/_react["default"].createElement("div", {
674
674
  className: "".concat(className ? className : ''),
675
675
  onClick: isDisabled || isReadOnly ? null : this.togglePopup,
@@ -51,7 +51,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
51
51
 
52
52
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
53
53
 
54
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
54
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
55
55
 
56
56
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
57
57
 
@@ -543,7 +543,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
543
543
  defaultDropBoxPosition = _this$props7.defaultDropBoxPosition,
544
544
  onFocus = _this$props7.onFocus,
545
545
  isPopupOpen = _this$props7.isPopupOpen;
546
- !isReadOnly && togglePopup(e, defaultDropBoxPosition ? "".concat(defaultDropBoxPosition, "Center") : null);
546
+ !isReadOnly && togglePopup(e, defaultDropBoxPosition ? "".concat(defaultDropBoxPosition) : null);
547
547
  !isPopupOpen && typeof onFocus === 'function' && onFocus(e);
548
548
  }
549
549
  }, {
@@ -778,7 +778,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
778
778
  SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti;
779
779
  return /*#__PURE__*/_react["default"].createElement("div", {
780
780
  className: "".concat(isParentBased || isReadOnly || isDisabled ? _SelectModule["default"].container : '', " ").concat(_SelectModule["default"]["box_".concat(size)], " ").concat(isReadOnly ? _SelectModule["default"].readonly : '', " ").concat(borderColor === 'transparent' ? _SelectModule["default"].transparentContainer : '', " ").concat(iconOnHover && (isReadOnly || isDisabled) ? _SelectModule["default"].iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? _SelectModule["default"].iconOnHoverStyle : ''),
781
- "data-title": isDisabled ? title : ''
781
+ "data-title": isDisabled ? title : null
782
782
  }, /*#__PURE__*/_react["default"].createElement("div", {
783
783
  className: "".concat(className ? className : ''),
784
784
  onClick: isDisabled || isReadOnly ? null : this.togglePopup,
@@ -870,7 +870,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
870
870
  customProps: TextBoxProps
871
871
  })), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_DropBox["default"], {
872
872
  animationStyle: animationStyle,
873
- boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
873
+ boxPosition: position || "".concat(defaultDropBoxPosition),
874
874
  getRef: getContainerRef,
875
875
  isActive: isPopupReady,
876
876
  isAnimate: true,
@@ -951,7 +951,7 @@ SelectComponent.propTypes = {
951
951
  className: _propTypes["default"].string,
952
952
  closePopupOnly: _propTypes["default"].func,
953
953
  dataId: _propTypes["default"].string,
954
- defaultDropBoxPosition: _propTypes["default"].oneOf(['bottom', 'top', 'left', 'right']),
954
+ defaultDropBoxPosition: _propTypes["default"].string,
955
955
  dropBoxSize: _propTypes["default"].oneOf(['small', 'medium', 'large']),
956
956
  emptyMessage: _propTypes["default"].string,
957
957
  excludeOptions: _propTypes["default"].array,
@@ -1031,7 +1031,6 @@ SelectComponent.defaultProps = {
1031
1031
  animationStyle: 'bounce',
1032
1032
  autoSelectOnType: true,
1033
1033
  dataId: 'selectComponent',
1034
- defaultDropBoxPosition: 'bottom',
1035
1034
  dropBoxSize: 'small',
1036
1035
  isDefaultSelectValue: true,
1037
1036
  isDisabled: false,
@@ -51,7 +51,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
51
51
 
52
52
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
53
53
 
54
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
54
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
55
55
 
56
56
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
57
57
 
@@ -212,7 +212,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
212
212
  return /*#__PURE__*/_react["default"].createElement("div", {
213
213
  className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : '', " ").concat(className ? className : ''),
214
214
  "data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
215
- "data-title": isDisabled ? title : ''
215
+ "data-title": isDisabled ? title : null
216
216
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
217
217
  align: "vertical",
218
218
  alignBox: "row",
@@ -49,7 +49,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
49
49
 
50
50
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
51
51
 
52
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
52
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
53
53
 
54
54
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
55
55
 
@@ -352,7 +352,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
352
352
  var ariaErrorId = this.getNextAriaId();
353
353
  return /*#__PURE__*/_react["default"].createElement("div", {
354
354
  className: "".concat(_SelectModule["default"].container, " ").concat(_SelectModule["default"]["box_".concat(size)], " ").concat(isReadOnly ? _SelectModule["default"].readonly : '', " ").concat(borderColor === 'transparent' ? _SelectModule["default"].transparentContainer : ''),
355
- "data-title": isDisabled ? title : ''
355
+ "data-title": isDisabled ? title : null
356
356
  }, /*#__PURE__*/_react["default"].createElement("div", {
357
357
  className: "".concat(className ? className : ''),
358
358
  onClick: isDisabled || isReadOnly ? null : this.togglePopup,
@@ -21,7 +21,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
21
21
 
22
22
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
23
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -77,12 +77,11 @@ Stencils.defaultProps = {
77
77
  shape: 'rect',
78
78
  size: 'medium',
79
79
  customClass: ''
80
- };
81
- Stencils.propTypesDescription = {
82
- shape: ' ',
83
- size: ' ',
84
- palette: ' '
85
- };
80
+ }; // Stencils.propTypesDescription = {
81
+ // shape: ' ',
82
+ // size: ' ',
83
+ // palette: ' '
84
+ // };
86
85
 
87
86
  if (false) {
88
87
  Stencils.docs = {
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
30
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
package/lib/Tab/Tabs.js CHANGED
@@ -41,7 +41,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
41
41
 
42
42
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
43
43
 
44
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
44
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
45
45
 
46
46
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
47
47
 
package/lib/Tag/Tag.js CHANGED
@@ -35,7 +35,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
35
35
 
36
36
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
37
37
 
38
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
38
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
39
39
 
40
40
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
41
41
 
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
30
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -31,7 +31,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
31
31
 
32
32
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
33
33
 
34
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
34
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
35
35
 
36
36
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
37
37
 
@@ -145,7 +145,7 @@ var TextBoxIcon = /*#__PURE__*/function (_React$Component) {
145
145
  alignBox: "row",
146
146
  isCover: false,
147
147
  className: "".concat(_TextBoxIconModule["default"].container, " ").concat(isDisabled ? _TextBoxIconModule["default"].disabled : isReadOnly ? needEffect ? _TextBoxIconModule["default"].effect : _TextBoxIconModule["default"].readonly : _TextBoxIconModule["default"].effect, " ").concat(isActive || isFocus ? _TextBoxIconModule["default"].effectFocused : '', " ").concat(customTBoxWrap, " ").concat(iconOnHover && (isReadOnly || isDisabled) ? _TextBoxIconModule["default"].iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? _TextBoxIconModule["default"].iconOnHoverStyle : ''),
148
- "data-title": isDisabled ? title : ''
148
+ "data-title": isDisabled ? title : null
149
149
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
150
150
  flexible: true
151
151
  }, /*#__PURE__*/_react["default"].createElement(_TextBox["default"], _extends({}, this.props, {
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
23
 
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
 
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
27
 
28
28
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
@@ -21,7 +21,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
21
21
 
22
22
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
23
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -16,7 +16,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
16
16
 
17
17
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18
18
 
19
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
19
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
20
20
 
21
21
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
22
 
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
26
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
27
 
28
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
29
29
 
30
30
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
31
 
@@ -63,9 +63,11 @@ var VelocityAnimation = /*#__PURE__*/function (_React$Component) {
63
63
  isCustomized = _this$props.isCustomized,
64
64
  needUIPack = _this$props.needUIPack,
65
65
  isFlex = _this$props.isFlex;
66
- var _this$context = this.context,
67
- direction = _this$context.direction,
68
- isReducedMotion = _this$context.isReducedMotion;
66
+
67
+ var _ref = this.context || {},
68
+ direction = _ref.direction,
69
+ isReducedMotion = _ref.isReducedMotion;
70
+
69
71
  var enterAnimationObj = {
70
72
  fade: 'transition.fadeIn',
71
73
  slideDown: 'slideDown',
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
30
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -80,9 +80,11 @@ var VelocityAnimationGroup = /*#__PURE__*/function (_React$Component) {
80
80
  isCustomized = _this$props.isCustomized,
81
81
  name = _this$props.name,
82
82
  needUIPack = _this$props.needUIPack;
83
- var _this$context = this.context,
84
- direction = _this$context.direction,
85
- isReducedMotion = _this$context.isReducedMotion;
83
+
84
+ var _ref = this.context || {},
85
+ direction = _ref.direction,
86
+ isReducedMotion = _ref.isReducedMotion;
87
+
86
88
  var childProps = clearProps(this.props);
87
89
  var enterAnimationObj = {
88
90
  fade: 'transition.fadeIn',
@@ -21,7 +21,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
21
21
 
22
22
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
23
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -21,7 +21,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
21
21
 
22
22
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
23
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.optionIdGrouping = exports.makeObjectConcat = exports.makeGetSelectedValueText = exports.makeGetOptionIdChange = exports.makeGetMultiSelectSelectedOptions = exports.makeGetMultiSelectFilterSuggestions = exports.makeGetGroupSelectOptions = exports.makeGetGroupSelectFilterSuggestions = exports.makeFormatOptions = exports.getValueField = exports.getTextField = exports.getPrefixText = exports.getOptions = exports.getOptionType = exports.getImageField = exports.getIconSize = exports.getIconName = exports.filterSelectedOptions = exports.extractOptionId = exports.dummyObj = exports.dummyArray = void 0;
6
+ exports.optionIdGrouping = exports.makeObjectConcat = exports.makeGetSelectedValueText = exports.makeGetOptionIdChange = exports.makeGetMultiSelectSelectedOptions = exports.makeGetMultiSelectFilterSuggestions = exports.makeGetIsShowClearIcon = exports.makeGetGroupSelectOptions = exports.makeGetGroupSelectFilterSuggestions = exports.makeFormatOptions = exports.getValueField = exports.getTextField = exports.getPrefixText = exports.getOptions = exports.getOptionType = exports.getImageField = exports.getIconSize = exports.getIconName = exports.filterSelectedOptions = exports.extractOptionId = exports.dummyObj = exports.dummyArray = void 0;
7
7
 
8
8
  var _reselect = require("reselect");
9
9
 
@@ -562,4 +562,47 @@ var filterSelectedOptions = function filterSelectedOptions() {
562
562
  };
563
563
  };
564
564
 
565
- exports.filterSelectedOptions = filterSelectedOptions;
565
+ exports.filterSelectedOptions = filterSelectedOptions;
566
+
567
+ var makeGetIsShowClearIcon = function makeGetIsShowClearIcon() {
568
+ return (0, _reselect.createSelector)([getSelectedOptionsSel, getDisabledOptions], function (selectedOptions, disabledOptions) {
569
+ var countForShowClear = 2;
570
+ var enabledOptionsLength = 0;
571
+ var isShowClearIcon = selectedOptions.length >= countForShowClear;
572
+
573
+ if (disabledOptions.length) {
574
+ var isHaveEnabledOptions = false;
575
+ var isAllDisabled = disabledOptions.length === selectedOptions.length;
576
+
577
+ if (!isAllDisabled) {
578
+ isHaveEnabledOptions = selectedOptions.some(function (option) {
579
+ var _ref5 = option || {},
580
+ _ref5$isDisabled = _ref5.isDisabled,
581
+ isDisabled = _ref5$isDisabled === void 0 ? false : _ref5$isDisabled;
582
+
583
+ if (!isDisabled) {
584
+ enabledOptionsLength += 1;
585
+
586
+ if (enabledOptionsLength === countForShowClear) {
587
+ return true;
588
+ }
589
+
590
+ return false;
591
+ }
592
+
593
+ return false;
594
+ });
595
+ }
596
+
597
+ return {
598
+ isShowClearIcon: isAllDisabled ? !isAllDisabled : isHaveEnabledOptions
599
+ };
600
+ }
601
+
602
+ return {
603
+ isShowClearIcon: isShowClearIcon
604
+ };
605
+ });
606
+ };
607
+
608
+ exports.makeGetIsShowClearIcon = makeGetIsShowClearIcon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.0.0-alpha-227",
3
+ "version": "1.0.0-alpha-230",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "jsnext:main": "es/index.js",
@@ -48,9 +48,9 @@
48
48
  "selectn": "1.1.2"
49
49
  },
50
50
  "peerDependencies": {
51
- "@zohodesk/icons": "1.0.0-beta.92",
52
- "@zohodesk/variables": "1.0.0-beta.29",
53
- "@zohodesk/svg": "1.0.0-beta.41",
51
+ "@zohodesk/icons": "^1.0.0-beta.92",
52
+ "@zohodesk/variables": "^1.0.0-beta.29",
53
+ "@zohodesk/svg": "^1.0.0-beta.41",
54
54
  "@zohodesk/virtualizer": "^1.0.3",
55
55
  "velocity-react": "^1.4.1",
56
56
  "react-sortable-hoc": "^0.8.3"