@zohodesk/components 1.2.3 → 1.2.5

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 (205) hide show
  1. package/.cli/PropLessFiles.html +1 -1
  2. package/.cli/PropValidationExcludeFilesArray.js +10 -2
  3. package/.cli/propValidation_report.html +1 -1
  4. package/README.md +8 -0
  5. package/coverage/Button/Button.js.html +1 -1
  6. package/coverage/Button/css/Button.module.css.html +1 -1
  7. package/coverage/Button/css/cssJSLogic.js.html +1 -1
  8. package/coverage/Button/css/index.html +1 -1
  9. package/coverage/Button/index.html +1 -1
  10. package/coverage/Button/props/defaultProps.js.html +1 -1
  11. package/coverage/Button/props/index.html +1 -1
  12. package/coverage/Button/props/propTypes.js.html +1 -1
  13. package/coverage/Buttongroup/Buttongroup.js.html +1 -1
  14. package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
  15. package/coverage/Buttongroup/index.html +1 -1
  16. package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
  17. package/coverage/Buttongroup/props/index.html +1 -1
  18. package/coverage/Buttongroup/props/propTypes.js.html +1 -1
  19. package/coverage/index.html +1 -1
  20. package/coverage/utils/dummyFunction.js.html +1 -1
  21. package/coverage/utils/index.html +1 -1
  22. package/es/index.js +2 -1
  23. package/es/v1/Accordion/Accordion.js +65 -0
  24. package/es/v1/Accordion/AccordionItem.js +57 -0
  25. package/es/v1/Accordion/index.js +2 -0
  26. package/es/v1/Animation/Animation.js +127 -0
  27. package/es/v1/AppContainer/AppContainer.js +134 -0
  28. package/es/v1/Avatar/Avatar.js +189 -0
  29. package/es/v1/AvatarTeam/AvatarTeam.js +70 -0
  30. package/es/v1/Button/Button.js +68 -0
  31. package/es/v1/Buttongroup/Buttongroup.js +31 -0
  32. package/es/v1/Card/Card.js +271 -0
  33. package/es/v1/CheckBox/CheckBox.js +155 -0
  34. package/es/v1/DateTime/CalendarView.js +218 -0
  35. package/es/v1/DateTime/DateTime.js +783 -0
  36. package/es/v1/DateTime/DateTimePopupFooter.js +47 -0
  37. package/es/v1/DateTime/DateTimePopupHeader.js +105 -0
  38. package/es/v1/DateTime/DateWidget.js +1098 -0
  39. package/es/v1/DateTime/DaysRow.js +31 -0
  40. package/es/v1/DateTime/Time.js +166 -0
  41. package/es/v1/DateTime/YearView.js +264 -0
  42. package/es/v1/DateTime/index.js +1 -0
  43. package/es/v1/DropBox/DropBox.js +91 -0
  44. package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +132 -0
  45. package/es/v1/DropDown/DropDown.js +73 -0
  46. package/es/v1/DropDown/DropDownHeading.js +44 -0
  47. package/es/v1/DropDown/DropDownItem.js +76 -0
  48. package/es/v1/DropDown/DropDownSearch.js +63 -0
  49. package/es/v1/DropDown/DropDownSeparator.js +15 -0
  50. package/es/v1/Heading/Heading.js +32 -0
  51. package/es/v1/Label/Label.js +40 -0
  52. package/es/v1/Layout/Box.js +115 -0
  53. package/es/v1/Layout/Container.js +132 -0
  54. package/es/v1/Layout/index.js +2 -0
  55. package/es/v1/ListItem/ListContainer.js +102 -0
  56. package/es/v1/ListItem/ListItem.js +124 -0
  57. package/es/v1/ListItem/ListItemWithAvatar.js +145 -0
  58. package/es/v1/ListItem/ListItemWithCheckBox.js +104 -0
  59. package/es/v1/ListItem/ListItemWithIcon.js +127 -0
  60. package/es/v1/ListItem/ListItemWithRadio.js +105 -0
  61. package/es/v1/ListItem/index.js +6 -0
  62. package/es/v1/Modal/Modal.js +154 -0
  63. package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1079 -0
  64. package/es/v1/MultiSelect/AdvancedMultiSelect.js +568 -0
  65. package/es/v1/MultiSelect/EmptyState.js +64 -0
  66. package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +50 -0
  67. package/es/v1/MultiSelect/MultiSelect.js +1120 -0
  68. package/es/v1/MultiSelect/MultiSelectHeader.js +32 -0
  69. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +216 -0
  70. package/es/v1/MultiSelect/SelectedOptions.js +82 -0
  71. package/es/v1/MultiSelect/Suggestions.js +142 -0
  72. package/es/v1/MultiSelect/index.js +4 -0
  73. package/es/v1/PopOver/PopOver.js +211 -0
  74. package/es/v1/Popup/Popup.js +645 -0
  75. package/es/v1/Radio/Radio.js +115 -0
  76. package/es/v1/Responsive/CustomResponsive.js +195 -0
  77. package/es/v1/Responsive/RefWrapper.js +39 -0
  78. package/es/v1/Responsive/ResizeComponent.js +197 -0
  79. package/es/v1/Responsive/ResizeObserver.js +140 -0
  80. package/es/v1/Responsive/Responsive.js +194 -0
  81. package/es/v1/Responsive/index.js +9 -0
  82. package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +58 -0
  83. package/es/v1/Ribbon/Ribbon.js +33 -0
  84. package/es/v1/RippleEffect/RippleEffect.js +24 -0
  85. package/es/v1/Select/GroupSelect.js +803 -0
  86. package/es/v1/Select/Select.js +969 -0
  87. package/es/v1/Select/SelectWithAvatar.js +344 -0
  88. package/es/v1/Select/SelectWithIcon.js +535 -0
  89. package/es/v1/Select/index.js +4 -0
  90. package/es/v1/Stencils/Stencils.js +26 -0
  91. package/es/v1/Switch/Switch.js +94 -0
  92. package/es/v1/Tab/Tab.js +108 -0
  93. package/es/v1/Tab/TabContent.js +30 -0
  94. package/es/v1/Tab/TabContentWrapper.js +29 -0
  95. package/es/v1/Tab/TabWrapper.js +57 -0
  96. package/es/v1/Tab/Tabs.js +612 -0
  97. package/es/v1/Tab/index.js +5 -0
  98. package/es/v1/Tag/Tag.js +134 -0
  99. package/es/v1/TextBox/TextBox.js +154 -0
  100. package/es/v1/TextBoxIcon/TextBoxIcon.js +158 -0
  101. package/es/v1/Textarea/Textarea.js +102 -0
  102. package/es/v1/Tooltip/Tooltip.js +518 -0
  103. package/es/v1/Typography/Typography.js +38 -0
  104. package/es/v1/Typography/css/Typography.module.css +376 -0
  105. package/es/v1/Typography/css/cssJSLogic.js +46 -0
  106. package/es/v1/Typography/css/letterSpacingMap.js +12 -0
  107. package/es/v1/Typography/props/defaultProps.js +8 -0
  108. package/es/v1/Typography/props/propTypes.js +24 -0
  109. package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +69 -0
  110. package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +100 -0
  111. package/es/v1/semantic/Button/Button.js +53 -0
  112. package/es/v1/semantic/index.js +1 -0
  113. package/lib/index.js +10 -1
  114. package/lib/v1/Accordion/Accordion.js +96 -0
  115. package/lib/v1/Accordion/AccordionItem.js +68 -0
  116. package/lib/v1/Accordion/index.js +23 -0
  117. package/lib/v1/Animation/Animation.js +143 -0
  118. package/lib/v1/AppContainer/AppContainer.js +204 -0
  119. package/lib/v1/Avatar/Avatar.js +246 -0
  120. package/lib/v1/AvatarTeam/AvatarTeam.js +81 -0
  121. package/lib/v1/Button/Button.js +82 -0
  122. package/lib/v1/Buttongroup/Buttongroup.js +44 -0
  123. package/lib/v1/Card/Card.js +365 -0
  124. package/lib/v1/CheckBox/CheckBox.js +166 -0
  125. package/lib/v1/DateTime/CalendarView.js +285 -0
  126. package/lib/v1/DateTime/DateTime.js +872 -0
  127. package/lib/v1/DateTime/DateTimePopupFooter.js +96 -0
  128. package/lib/v1/DateTime/DateTimePopupHeader.js +166 -0
  129. package/lib/v1/DateTime/DateWidget.js +1125 -0
  130. package/lib/v1/DateTime/DaysRow.js +80 -0
  131. package/lib/v1/DateTime/Time.js +254 -0
  132. package/lib/v1/DateTime/YearView.js +325 -0
  133. package/lib/v1/DateTime/index.js +15 -0
  134. package/lib/v1/DropBox/DropBox.js +119 -0
  135. package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +145 -0
  136. package/lib/v1/DropDown/DropDown.js +170 -0
  137. package/lib/v1/DropDown/DropDownHeading.js +93 -0
  138. package/lib/v1/DropDown/DropDownItem.js +127 -0
  139. package/lib/v1/DropDown/DropDownSearch.js +113 -0
  140. package/lib/v1/DropDown/DropDownSeparator.js +64 -0
  141. package/lib/v1/Heading/Heading.js +49 -0
  142. package/lib/v1/Label/Label.js +51 -0
  143. package/lib/v1/Layout/Box.js +128 -0
  144. package/lib/v1/Layout/Container.js +145 -0
  145. package/lib/v1/Layout/index.js +23 -0
  146. package/lib/v1/ListItem/ListContainer.js +120 -0
  147. package/lib/v1/ListItem/ListItem.js +138 -0
  148. package/lib/v1/ListItem/ListItemWithAvatar.js +162 -0
  149. package/lib/v1/ListItem/ListItemWithCheckBox.js +125 -0
  150. package/lib/v1/ListItem/ListItemWithIcon.js +143 -0
  151. package/lib/v1/ListItem/ListItemWithRadio.js +126 -0
  152. package/lib/v1/ListItem/index.js +55 -0
  153. package/lib/v1/Modal/Modal.js +212 -0
  154. package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1167 -0
  155. package/lib/v1/MultiSelect/AdvancedMultiSelect.js +634 -0
  156. package/lib/v1/MultiSelect/EmptyState.js +112 -0
  157. package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +62 -0
  158. package/lib/v1/MultiSelect/MultiSelect.js +1201 -0
  159. package/lib/v1/MultiSelect/MultiSelectHeader.js +78 -0
  160. package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +270 -0
  161. package/lib/v1/MultiSelect/SelectedOptions.js +126 -0
  162. package/lib/v1/MultiSelect/Suggestions.js +195 -0
  163. package/lib/v1/MultiSelect/index.js +39 -0
  164. package/lib/v1/PopOver/PopOver.js +293 -0
  165. package/lib/v1/Popup/Popup.js +715 -0
  166. package/lib/v1/Radio/Radio.js +126 -0
  167. package/lib/v1/Responsive/CustomResponsive.js +242 -0
  168. package/lib/v1/Responsive/RefWrapper.js +57 -0
  169. package/lib/v1/Responsive/ResizeComponent.js +268 -0
  170. package/lib/v1/Responsive/ResizeObserver.js +168 -0
  171. package/lib/v1/Responsive/Responsive.js +274 -0
  172. package/lib/v1/Responsive/index.js +55 -0
  173. package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +79 -0
  174. package/lib/v1/Ribbon/Ribbon.js +44 -0
  175. package/lib/v1/RippleEffect/RippleEffect.js +39 -0
  176. package/lib/v1/Select/GroupSelect.js +877 -0
  177. package/lib/v1/Select/Select.js +1013 -0
  178. package/lib/v1/Select/SelectWithAvatar.js +394 -0
  179. package/lib/v1/Select/SelectWithIcon.js +597 -0
  180. package/lib/v1/Select/index.js +39 -0
  181. package/lib/v1/Stencils/Stencils.js +43 -0
  182. package/lib/v1/Switch/Switch.js +108 -0
  183. package/lib/v1/Tab/Tab.js +132 -0
  184. package/lib/v1/Tab/TabContent.js +42 -0
  185. package/lib/v1/Tab/TabContentWrapper.js +42 -0
  186. package/lib/v1/Tab/TabWrapper.js +89 -0
  187. package/lib/v1/Tab/Tabs.js +680 -0
  188. package/lib/v1/Tab/index.js +47 -0
  189. package/lib/v1/Tag/Tag.js +154 -0
  190. package/lib/v1/TextBox/TextBox.js +168 -0
  191. package/lib/v1/TextBoxIcon/TextBoxIcon.js +196 -0
  192. package/lib/v1/Textarea/Textarea.js +118 -0
  193. package/lib/v1/Tooltip/Tooltip.js +586 -0
  194. package/lib/v1/Typography/Typography.js +56 -0
  195. package/lib/v1/Typography/css/Typography.module.css +376 -0
  196. package/lib/v1/Typography/css/cssJSLogic.js +41 -0
  197. package/lib/v1/Typography/css/letterSpacingMap.js +20 -0
  198. package/lib/v1/Typography/props/defaultProps.js +15 -0
  199. package/lib/v1/Typography/props/propTypes.js +35 -0
  200. package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +90 -0
  201. package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +126 -0
  202. package/lib/v1/semantic/Button/Button.js +63 -0
  203. package/lib/v1/semantic/index.js +15 -0
  204. package/package.json +4 -4
  205. package/result.json +1 -1
@@ -0,0 +1,195 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _propTypes = require("../../MultiSelect/props/propTypes");
13
+
14
+ var _defaultProps = require("../../MultiSelect/props/defaultProps");
15
+
16
+ var _ListItem = _interopRequireDefault(require("../ListItem/ListItem"));
17
+
18
+ var _ListItemWithAvatar = _interopRequireDefault(require("../ListItem/ListItemWithAvatar"));
19
+
20
+ var _ListItemWithIcon = _interopRequireDefault(require("../ListItem/ListItemWithIcon"));
21
+
22
+ var _Layout = require("../Layout");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ 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); }
27
+
28
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
29
+
30
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
31
+
32
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
33
+
34
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
35
+
36
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
37
+
38
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
39
+
40
+ 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); }
41
+
42
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
43
+
44
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
45
+
46
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
47
+
48
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
49
+
50
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
51
+
52
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
53
+
54
+ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
55
+ _inherits(Suggestions, _React$PureComponent);
56
+
57
+ var _super = _createSuper(Suggestions);
58
+
59
+ function Suggestions() {
60
+ _classCallCheck(this, Suggestions);
61
+
62
+ return _super.apply(this, arguments);
63
+ }
64
+
65
+ _createClass(Suggestions, [{
66
+ key: "render",
67
+ value: function render() {
68
+ var _this$props = this.props,
69
+ suggestions = _this$props.suggestions,
70
+ getRef = _this$props.getRef,
71
+ hoverOption = _this$props.hoverOption,
72
+ onClick = _this$props.onClick,
73
+ onMouseEnter = _this$props.onMouseEnter,
74
+ needTick = _this$props.needTick,
75
+ needBorder = _this$props.needBorder,
76
+ _this$props$selectedO = _this$props.selectedOptions,
77
+ selectedOptions = _this$props$selectedO === void 0 ? [] : _this$props$selectedO,
78
+ activeId = _this$props.activeId,
79
+ hoverId = _this$props.hoverId,
80
+ dataId = _this$props.dataId,
81
+ listItemSize = _this$props.listItemSize,
82
+ className = _this$props.className,
83
+ avatarPalette = _this$props.avatarPalette,
84
+ palette = _this$props.palette,
85
+ htmlId = _this$props.htmlId,
86
+ a11y = _this$props.a11y;
87
+ var ariaParentRole = a11y.ariaParentRole,
88
+ ariaMultiselectable = a11y.ariaMultiselectable;
89
+ return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
90
+ isCover: false,
91
+ role: ariaParentRole,
92
+ id: htmlId,
93
+ tabindex: "0",
94
+ "aria-multiselectable": ariaMultiselectable
95
+ }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
96
+ dataId: "".concat(dataId),
97
+ className: className ? className : ''
98
+ }, suggestions.map(function (suggestion, index) {
99
+ var id = suggestion.id,
100
+ value = suggestion.value,
101
+ photoURL = suggestion.photoURL,
102
+ icon = suggestion.icon,
103
+ optionType = suggestion.optionType,
104
+ iconSize = suggestion.iconSize,
105
+ isDisabled = suggestion.isDisabled,
106
+ listItemProps = suggestion.listItemProps,
107
+ _suggestion$listItemC = suggestion.listItemCustomProps,
108
+ listItemCustomProps = _suggestion$listItemC === void 0 ? {} : _suggestion$listItemC;
109
+ var isActive = activeId === id || selectedOptions.indexOf(id) >= 0;
110
+ var isHighlight = hoverOption === index || id === hoverId ? true : false;
111
+ var list_a11y = Object.assign({}, a11y, {
112
+ ariaSelected: isActive,
113
+ ariaLabel: value
114
+ });
115
+
116
+ var commonProps = _objectSpread({
117
+ isDisabled: isDisabled
118
+ }, listItemCustomProps);
119
+
120
+ if (listItemProps) {
121
+ commonProps.customProps = {
122
+ ListItemProps: _objectSpread({}, listItemProps)
123
+ };
124
+ }
125
+
126
+ if (optionType === 'avatar') {
127
+ return /*#__PURE__*/_react["default"].createElement(_ListItemWithAvatar["default"], _extends({}, commonProps, {
128
+ autoHover: false,
129
+ getRef: getRef,
130
+ highlight: isHighlight,
131
+ id: id,
132
+ imgSrc: photoURL,
133
+ key: "".concat(id, "avatarListItem"),
134
+ name: value,
135
+ onClick: onClick,
136
+ onMouseEnter: onMouseEnter,
137
+ value: value,
138
+ title: value,
139
+ needTick: needTick,
140
+ needBorder: needBorder,
141
+ active: isActive,
142
+ size: listItemSize,
143
+ avatarPalette: avatarPalette,
144
+ palette: palette,
145
+ a11y: list_a11y
146
+ }));
147
+ } else if (optionType === 'icon') {
148
+ return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], _extends({}, commonProps, {
149
+ autoHover: false,
150
+ getRef: getRef,
151
+ highlight: isHighlight,
152
+ id: id,
153
+ key: "".concat(id, "iconListItem"),
154
+ onClick: onClick,
155
+ onMouseEnter: onMouseEnter,
156
+ value: value,
157
+ title: value,
158
+ iconName: icon,
159
+ needTick: needTick,
160
+ needBorder: needBorder,
161
+ active: isActive,
162
+ iconSize: iconSize,
163
+ size: listItemSize,
164
+ palette: palette,
165
+ a11y: list_a11y
166
+ }));
167
+ }
168
+
169
+ return /*#__PURE__*/_react["default"].createElement(_ListItem["default"], _extends({}, commonProps, {
170
+ autoHover: false,
171
+ getRef: getRef,
172
+ highlight: isHighlight,
173
+ id: id,
174
+ key: "".concat(id, "listItem"),
175
+ onClick: onClick,
176
+ onMouseEnter: onMouseEnter,
177
+ value: value,
178
+ title: value,
179
+ needTick: needTick,
180
+ needBorder: needBorder,
181
+ active: isActive,
182
+ size: listItemSize,
183
+ palette: palette,
184
+ a11y: list_a11y
185
+ }));
186
+ })));
187
+ }
188
+ }]);
189
+
190
+ return Suggestions;
191
+ }(_react["default"].PureComponent);
192
+
193
+ exports["default"] = Suggestions;
194
+ Suggestions.propTypes = _propTypes.Suggestions_propTypes;
195
+ Suggestions.defaultProps = _defaultProps.Suggestions_defaultProps;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "AdvancedGroupMultiSelect", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _AdvancedGroupMultiSelect["default"];
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "AdvancedMultiSelect", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _AdvancedMultiSelect["default"];
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "MultiSelect", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _MultiSelect["default"];
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "MultiSelectWithAvatar", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _MultiSelectWithAvatar["default"];
28
+ }
29
+ });
30
+
31
+ var _MultiSelect = _interopRequireDefault(require("./MultiSelect"));
32
+
33
+ var _MultiSelectWithAvatar = _interopRequireDefault(require("./MultiSelectWithAvatar"));
34
+
35
+ var _AdvancedMultiSelect = _interopRequireDefault(require("./AdvancedMultiSelect"));
36
+
37
+ var _AdvancedGroupMultiSelect = _interopRequireDefault(require("./AdvancedGroupMultiSelect"));
38
+
39
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -0,0 +1,293 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = exports.PopOverTarget = exports.PopOverContainer = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _defaultProps = require("../../PopOver/props/defaultProps");
13
+
14
+ var _propTypes = require("../../PopOver/props/propTypes");
15
+
16
+ var _Popup = _interopRequireDefault(require("../Popup/Popup"));
17
+
18
+ var _Layout = require("../Layout");
19
+
20
+ var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
21
+
22
+ var _PopOverModule = _interopRequireDefault(require("../../PopOver/PopOver.module.css"));
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27
+
28
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
29
+
30
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
31
+
32
+ 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); }
33
+
34
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
+
36
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
37
+
38
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
39
+
40
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
41
+
42
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
+
44
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
45
+
46
+ var PopOver = /*#__PURE__*/function (_React$Component) {
47
+ _inherits(PopOver, _React$Component);
48
+
49
+ var _super = _createSuper(PopOver);
50
+
51
+ function PopOver(props) {
52
+ var _this;
53
+
54
+ _classCallCheck(this, PopOver);
55
+
56
+ _this = _super.call(this, props);
57
+ _this.popOverTargetRef = _this.popOverTargetRef.bind(_assertThisInitialized(_this));
58
+ _this.popOverContainerRef = _this.popOverContainerRef.bind(_assertThisInitialized(_this));
59
+ _this.togglePopup = _this.togglePopup.bind(_assertThisInitialized(_this));
60
+ return _this;
61
+ }
62
+
63
+ _createClass(PopOver, [{
64
+ key: "componentDidUpdate",
65
+ value: function componentDidUpdate(prevProps) {
66
+ var _this$props = this.props,
67
+ isPopupOpen = _this$props.isPopupOpen,
68
+ onPopupOpen = _this$props.onPopupOpen,
69
+ onPopupClose = _this$props.onPopupClose;
70
+
71
+ if (prevProps.isPopupOpen !== isPopupOpen) {
72
+ isPopupOpen && onPopupOpen && onPopupOpen();
73
+ !isPopupOpen && onPopupClose && onPopupClose();
74
+ }
75
+ }
76
+ }, {
77
+ key: "popOverTargetRef",
78
+ value: function popOverTargetRef(el) {
79
+ this.popOverTarget = el;
80
+ var getTargetRef = this.props.getTargetRef;
81
+ getTargetRef(el);
82
+ }
83
+ }, {
84
+ key: "popOverContainerRef",
85
+ value: function popOverContainerRef(el) {
86
+ this.popOverContainer = el;
87
+ var getContainerRef = this.props.getContainerRef;
88
+ getContainerRef(el);
89
+ }
90
+ }, {
91
+ key: "togglePopup",
92
+ value: function togglePopup(e) {
93
+ var _this$props2 = this.props,
94
+ togglePopup = _this$props2.togglePopup,
95
+ boxPosition = _this$props2.boxPosition;
96
+ togglePopup(e, boxPosition);
97
+ }
98
+ }, {
99
+ key: "render",
100
+ value: function render() {
101
+ var _this2 = this;
102
+
103
+ var _this$props3 = this.props,
104
+ children = _this$props3.children,
105
+ isPopupOpen = _this$props3.isPopupOpen,
106
+ removeClose = _this$props3.removeClose,
107
+ right = _this$props3.right,
108
+ left = _this$props3.left,
109
+ top = _this$props3.top,
110
+ bottom = _this$props3.bottom,
111
+ arrowRight = _this$props3.arrowRight,
112
+ arrowLeft = _this$props3.arrowLeft,
113
+ arrowTop = _this$props3.arrowTop,
114
+ arrowBottom = _this$props3.arrowBottom,
115
+ isAnimate = _this$props3.isAnimate,
116
+ isArrow = _this$props3.isArrow,
117
+ arrowPosition = _this$props3.arrowPosition,
118
+ position = _this$props3.position,
119
+ size = _this$props3.size,
120
+ onClick = _this$props3.onClick,
121
+ isPopupReady = _this$props3.isPopupReady;
122
+
123
+ var childrens = _react["default"].Children.map(children, function (child, index) {
124
+ var element = index === 1 ? /*#__PURE__*/_react["default"].cloneElement(child, {
125
+ isPopupOpen: isPopupOpen,
126
+ togglePopup: _this2.togglePopup,
127
+ removeClose: removeClose,
128
+ right: right,
129
+ left: left,
130
+ top: top,
131
+ bottom: bottom,
132
+ arrowRight: arrowRight,
133
+ arrowLeft: arrowLeft,
134
+ arrowTop: arrowTop,
135
+ arrowBottom: arrowBottom,
136
+ boxPosition: position,
137
+ isAnimate: isAnimate,
138
+ isArrow: isArrow,
139
+ arrowPosition: arrowPosition,
140
+ size: size,
141
+ onClick: onClick,
142
+ getRef: _this2.popOverContainerRef,
143
+ isPopupReady: isPopupReady
144
+ }) : /*#__PURE__*/_react["default"].cloneElement(child, {
145
+ isPopupOpen: isPopupOpen,
146
+ togglePopup: _this2.togglePopup,
147
+ removeClose: removeClose,
148
+ getRef: _this2.popOverTargetRef
149
+ });
150
+ return element;
151
+ });
152
+
153
+ return /*#__PURE__*/_react["default"].createElement("div", {
154
+ className: _PopOverModule["default"].popup
155
+ }, childrens);
156
+ }
157
+ }]);
158
+
159
+ return PopOver;
160
+ }(_react["default"].Component);
161
+
162
+ PopOver.defaultProps = _defaultProps.PopOver_defaultProps;
163
+ PopOver.propTypes = _propTypes.PopOver_propTypes;
164
+
165
+ var _default = (0, _Popup["default"])(PopOver);
166
+
167
+ exports["default"] = _default;
168
+
169
+ var PopOverTarget = /*#__PURE__*/function (_React$Component2) {
170
+ _inherits(PopOverTarget, _React$Component2);
171
+
172
+ var _super2 = _createSuper(PopOverTarget);
173
+
174
+ function PopOverTarget(props) {
175
+ var _this3;
176
+
177
+ _classCallCheck(this, PopOverTarget);
178
+
179
+ _this3 = _super2.call(this, props);
180
+ _this3.getRef = _this3.getRef.bind(_assertThisInitialized(_this3));
181
+ return _this3;
182
+ }
183
+
184
+ _createClass(PopOverTarget, [{
185
+ key: "getRef",
186
+ value: function getRef(el) {
187
+ var getRef = this.props.getRef;
188
+ getRef(el);
189
+ }
190
+ }, {
191
+ key: "render",
192
+ value: function render() {
193
+ var _this$props4 = this.props,
194
+ children = _this$props4.children,
195
+ togglePopup = _this$props4.togglePopup;
196
+ return /*#__PURE__*/_react["default"].createElement("div", {
197
+ className: _PopOverModule["default"].target,
198
+ onClick: togglePopup,
199
+ ref: this.getRef
200
+ }, children);
201
+ }
202
+ }]);
203
+
204
+ return PopOverTarget;
205
+ }(_react["default"].Component);
206
+
207
+ exports.PopOverTarget = PopOverTarget;
208
+ PopOverTarget.propTypes = _propTypes.PopOverTarget_propTypes;
209
+
210
+ var PopOverContainer = /*#__PURE__*/function (_React$Component3) {
211
+ _inherits(PopOverContainer, _React$Component3);
212
+
213
+ var _super3 = _createSuper(PopOverContainer);
214
+
215
+ function PopOverContainer(props) {
216
+ var _this4;
217
+
218
+ _classCallCheck(this, PopOverContainer);
219
+
220
+ _this4 = _super3.call(this, props);
221
+ _this4.handleClick = _this4.handleClick.bind(_assertThisInitialized(_this4));
222
+ _this4.getRef = _this4.getRef.bind(_assertThisInitialized(_this4));
223
+ return _this4;
224
+ }
225
+
226
+ _createClass(PopOverContainer, [{
227
+ key: "getRef",
228
+ value: function getRef(el) {
229
+ var getRef = this.props.getRef;
230
+ getRef && getRef(el);
231
+ }
232
+ }, {
233
+ key: "handleClick",
234
+ value: function handleClick(e) {
235
+ var _this$props5 = this.props,
236
+ onClick = _this$props5.onClick,
237
+ removeClose = _this$props5.removeClose;
238
+ removeClose && removeClose(e);
239
+ onClick && onClick();
240
+ }
241
+ }, {
242
+ key: "render",
243
+ value: function render() {
244
+ var _this$props6 = this.props,
245
+ children = _this$props6.children,
246
+ isPopupOpen = _this$props6.isPopupOpen,
247
+ isAnimate = _this$props6.isAnimate,
248
+ isArrow = _this$props6.isArrow,
249
+ size = _this$props6.size,
250
+ arrowPosition = _this$props6.arrowPosition,
251
+ boxPosition = _this$props6.boxPosition,
252
+ right = _this$props6.right,
253
+ left = _this$props6.left,
254
+ top = _this$props6.top,
255
+ bottom = _this$props6.bottom,
256
+ arrowRight = _this$props6.arrowRight,
257
+ arrowLeft = _this$props6.arrowLeft,
258
+ arrowTop = _this$props6.arrowTop,
259
+ arrowBottom = _this$props6.arrowBottom,
260
+ animationStyle = _this$props6.animationStyle,
261
+ getRef = _this$props6.getRef;
262
+ return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
263
+ animationStyle: animationStyle,
264
+ arrowBottom: arrowBottom,
265
+ arrowLeft: arrowLeft,
266
+ arrowPosition: arrowPosition,
267
+ arrowRight: arrowRight,
268
+ arrowTop: arrowTop,
269
+ bottom: bottom,
270
+ boxPosition: boxPosition,
271
+ getRef: getRef,
272
+ isActive: isPopupOpen,
273
+ isAnimate: isAnimate,
274
+ isArrow: isArrow,
275
+ left: left,
276
+ right: right,
277
+ size: size,
278
+ top: top,
279
+ alignBox: "row"
280
+ }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
281
+ flexible: true,
282
+ shrink: true,
283
+ scroll: "vertical"
284
+ }, children));
285
+ }
286
+ }]);
287
+
288
+ return PopOverContainer;
289
+ }(_react["default"].Component);
290
+
291
+ exports.PopOverContainer = PopOverContainer;
292
+ PopOverContainer.defaultProps = _defaultProps.PopOverContainer_defaultProps;
293
+ PopOverContainer.propTypes = _propTypes.PopOverContainer_propTypes;