@zohodesk/components 1.0.0-temp-158 → 1.0.0-temp-159

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 (355) hide show
  1. package/es/Accordion/Accordion.js +3 -7
  2. package/es/Accordion/AccordionItem.js +2 -4
  3. package/es/Animation/Animation.js +3 -3
  4. package/es/AppContainer/AppContainer.js +5 -13
  5. package/es/Avatar/Avatar.js +11 -23
  6. package/es/AvatarTeam/AvatarTeam.js +3 -3
  7. package/es/Button/Button.js +3 -4
  8. package/es/Buttongroup/Buttongroup.js +3 -3
  9. package/es/Card/Card.js +10 -21
  10. package/es/CheckBox/CheckBox.js +3 -5
  11. package/es/DateTime/CalendarView.js +20 -32
  12. package/es/DateTime/DateTime.js +10 -75
  13. package/es/DateTime/DateTimePopupFooter.js +2 -4
  14. package/es/DateTime/DateTimePopupHeader.js +2 -8
  15. package/es/DateTime/DateWidget.js +35 -98
  16. package/es/DateTime/DaysRow.js +2 -4
  17. package/es/DateTime/Time.js +2 -10
  18. package/es/DateTime/YearView.js +4 -28
  19. package/es/DateTime/__tests__/CalendarView.spec.js +0 -1
  20. package/es/DateTime/__tests__/DateTime.spec.js +0 -1
  21. package/es/DateTime/__tests__/DateWidget.spec.js +3 -2
  22. package/es/DateTime/common.js +0 -3
  23. package/es/DateTime/constants.js +0 -1
  24. package/es/DateTime/dateFormatUtils/dateFormat.js +30 -63
  25. package/es/DateTime/dateFormatUtils/dateFormats.js +1 -0
  26. package/es/DateTime/dateFormatUtils/dayChange.js +4 -13
  27. package/es/DateTime/dateFormatUtils/index.js +2 -32
  28. package/es/DateTime/dateFormatUtils/monthChange.js +0 -8
  29. package/es/DateTime/dateFormatUtils/timeChange.js +6 -22
  30. package/es/DateTime/dateFormatUtils/yearChange.js +2 -11
  31. package/es/DateTime/objectUtils.js +20 -14
  32. package/es/DateTime/props/defaultProps.js +1 -2
  33. package/es/DateTime/typeChecker.js +0 -3
  34. package/es/DateTime/validator.js +6 -58
  35. package/es/DropBox/DropBox.js +2 -6
  36. package/es/DropBox/DropBoxElement/DropBoxElement.js +0 -7
  37. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +3 -5
  38. package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +0 -3
  39. package/es/DropBox/props/defaultProps.js +2 -1
  40. package/es/DropBox/props/propTypes.js +2 -1
  41. package/es/DropDown/DropDown.js +4 -8
  42. package/es/DropDown/DropDownHeading.js +5 -4
  43. package/es/DropDown/DropDownItem.js +0 -6
  44. package/es/DropDown/DropDownSearch.js +0 -4
  45. package/es/DropDown/DropDownSeparator.js +0 -1
  46. package/es/DropDown/__tests__/DropDown.spec.js +2 -1
  47. package/es/Heading/Heading.js +3 -2
  48. package/es/Label/Label.js +3 -2
  49. package/es/Layout/Box.js +0 -13
  50. package/es/Layout/Container.js +1 -12
  51. package/es/Layout/index.js +2 -1
  52. package/es/ListItem/ListContainer.js +3 -8
  53. package/es/ListItem/ListItem.js +3 -9
  54. package/es/ListItem/ListItemWithAvatar.js +3 -9
  55. package/es/ListItem/ListItemWithCheckBox.js +2 -7
  56. package/es/ListItem/ListItemWithIcon.js +3 -8
  57. package/es/ListItem/ListItemWithRadio.js +3 -7
  58. package/es/Modal/Modal.js +11 -28
  59. package/es/MultiSelect/AdvancedGroupMultiSelect.js +13 -89
  60. package/es/MultiSelect/AdvancedMultiSelect.js +9 -32
  61. package/es/MultiSelect/EmptyState.js +0 -2
  62. package/es/MultiSelect/MultiSelect.js +32 -99
  63. package/es/MultiSelect/MultiSelectHeader.js +0 -3
  64. package/es/MultiSelect/MultiSelectWithAvatar.js +6 -12
  65. package/es/MultiSelect/SelectedOptions.js +3 -6
  66. package/es/MultiSelect/Suggestions.js +3 -7
  67. package/es/MultiSelect/__tests__/MultiSelect.spec.js +6 -4
  68. package/es/MultiSelect/props/propTypes.js +0 -2
  69. package/es/PopOver/PopOver.js +2 -18
  70. package/es/PopOver/__tests__/PopOver.spec.js +1 -2
  71. package/es/Popup/Popup.js +24 -77
  72. package/es/Popup/__tests__/Popup.spec.js +5 -17
  73. package/es/Popup/viewPort.js +4 -16
  74. package/es/Provider/IdProvider.js +5 -10
  75. package/es/Provider/LibraryContext.js +4 -6
  76. package/es/Provider/NumberGenerator/NumberGenerator.js +7 -21
  77. package/es/Provider/ZindexProvider.js +2 -9
  78. package/es/Radio/Radio.js +2 -4
  79. package/es/Responsive/CustomResponsive.js +18 -30
  80. package/es/Responsive/RefWrapper.js +7 -6
  81. package/es/Responsive/ResizeComponent.js +25 -35
  82. package/es/Responsive/ResizeObserver.js +6 -26
  83. package/es/Responsive/Responsive.js +20 -34
  84. package/es/Responsive/index.js +3 -1
  85. package/es/Responsive/sizeObservers.js +7 -28
  86. package/es/Responsive/utils/index.js +5 -7
  87. package/es/Responsive/utils/shallowCompare.js +2 -7
  88. package/es/Responsive/windowResizeObserver.js +0 -7
  89. package/es/ResponsiveDropBox/ResponsiveDropBox.js +0 -4
  90. package/es/Ribbon/Ribbon.js +2 -3
  91. package/es/RippleEffect/RippleEffect.js +3 -1
  92. package/es/Select/GroupSelect.js +14 -58
  93. package/es/Select/Select.js +33 -79
  94. package/es/Select/SelectWithAvatar.js +4 -17
  95. package/es/Select/SelectWithIcon.js +5 -46
  96. package/es/Select/__tests__/Select.spec.js +8 -6
  97. package/es/Select/props/propTypes.js +0 -1
  98. package/es/Stencils/Stencils.js +3 -3
  99. package/es/Switch/Switch.js +3 -5
  100. package/es/Tab/Tab.js +4 -4
  101. package/es/Tab/TabContent.js +0 -1
  102. package/es/Tab/TabContentWrapper.js +0 -2
  103. package/es/Tab/TabWrapper.js +2 -5
  104. package/es/Tab/Tabs.js +7 -54
  105. package/es/Tab/__tests__/Tab.spec.js +3 -1
  106. package/es/Tab/__tests__/TabWrapper.spec.js +0 -1
  107. package/es/Tag/Tag.js +3 -6
  108. package/es/TextBox/TextBox.js +3 -15
  109. package/es/TextBox/TextBox.module.css +8 -5
  110. package/es/TextBox/__tests__/TextBox.spec.js +4 -1
  111. package/es/TextBoxIcon/TextBoxIcon.js +2 -9
  112. package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +7 -2
  113. package/es/Textarea/Textarea.js +3 -12
  114. package/es/Textarea/Textarea.module.css +3 -4
  115. package/es/Textarea/__tests__/Textarea.spec.js +2 -2
  116. package/es/Tooltip/Tooltip.js +14 -58
  117. package/es/Tooltip/__tests__/Tooltip.spec.js +0 -5
  118. package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +2 -3
  119. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +5 -7
  120. package/es/deprecated/PortalLayer/PortalLayer.js +20 -25
  121. package/es/semantic/Button/Button.js +2 -3
  122. package/es/utils/Common.js +9 -54
  123. package/es/utils/ContextOptimizer.js +5 -4
  124. package/es/utils/__tests__/debounce.spec.js +2 -2
  125. package/es/utils/constructFullName.js +0 -2
  126. package/es/utils/css/compileClassNames.js +0 -5
  127. package/es/utils/css/mergeStyle.js +6 -7
  128. package/es/utils/css/utils.js +0 -1
  129. package/es/utils/datetime/common.js +7 -31
  130. package/es/utils/debounce.js +1 -5
  131. package/es/utils/dropDownUtils.js +11 -68
  132. package/es/utils/getInitial.js +0 -4
  133. package/es/utils/shallowEqual.js +0 -6
  134. package/lib/Accordion/Accordion.js +18 -42
  135. package/lib/Accordion/AccordionItem.js +18 -40
  136. package/lib/Accordion/__tests__/Accordion.spec.js +0 -3
  137. package/lib/Accordion/index.js +0 -3
  138. package/lib/Accordion/props/propTypes.js +0 -3
  139. package/lib/Animation/Animation.js +18 -38
  140. package/lib/Animation/__tests__/Animation.spec.js +7 -11
  141. package/lib/Animation/props/propTypes.js +0 -3
  142. package/lib/AppContainer/AppContainer.js +21 -56
  143. package/lib/AppContainer/props/propTypes.js +0 -3
  144. package/lib/Avatar/Avatar.js +38 -78
  145. package/lib/Avatar/__tests__/Avatar.spec.js +0 -44
  146. package/lib/Avatar/props/propTypes.js +0 -3
  147. package/lib/AvatarTeam/AvatarTeam.js +30 -52
  148. package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -13
  149. package/lib/AvatarTeam/props/propTypes.js +0 -3
  150. package/lib/Button/Button.js +20 -31
  151. package/lib/Button/css/cssJSLogic.js +17 -18
  152. package/lib/Button/index.js +0 -3
  153. package/lib/Button/props/defaultProps.js +0 -2
  154. package/lib/Button/props/propTypes.js +0 -3
  155. package/lib/Buttongroup/Buttongroup.js +12 -32
  156. package/lib/Buttongroup/__test__/Buttongroup.spec.js +0 -10
  157. package/lib/Buttongroup/props/propTypes.js +0 -3
  158. package/lib/Card/Card.js +46 -102
  159. package/lib/Card/__tests__/Card.spec.js +1 -10
  160. package/lib/Card/index.js +0 -4
  161. package/lib/Card/props/propTypes.js +0 -3
  162. package/lib/CheckBox/CheckBox.js +47 -71
  163. package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -3
  164. package/lib/CheckBox/props/propTypes.js +0 -3
  165. package/lib/DateTime/CalendarView.js +42 -82
  166. package/lib/DateTime/DateTime.js +159 -247
  167. package/lib/DateTime/DateTimePopupFooter.js +9 -32
  168. package/lib/DateTime/DateTimePopupHeader.js +18 -49
  169. package/lib/DateTime/DateWidget.js +251 -353
  170. package/lib/DateTime/DaysRow.js +6 -28
  171. package/lib/DateTime/Time.js +33 -74
  172. package/lib/DateTime/YearView.js +29 -78
  173. package/lib/DateTime/__tests__/CalendarView.spec.js +5 -13
  174. package/lib/DateTime/__tests__/DateTime.spec.js +37 -51
  175. package/lib/DateTime/__tests__/DateWidget.spec.js +8 -10
  176. package/lib/DateTime/common.js +0 -6
  177. package/lib/DateTime/constants.js +0 -1
  178. package/lib/DateTime/dateFormatUtils/dateFormat.js +122 -184
  179. package/lib/DateTime/dateFormatUtils/dateFormats.js +1 -0
  180. package/lib/DateTime/dateFormatUtils/dayChange.js +7 -14
  181. package/lib/DateTime/dateFormatUtils/index.js +16 -74
  182. package/lib/DateTime/dateFormatUtils/monthChange.js +9 -19
  183. package/lib/DateTime/dateFormatUtils/timeChange.js +23 -55
  184. package/lib/DateTime/dateFormatUtils/yearChange.js +11 -22
  185. package/lib/DateTime/index.js +0 -2
  186. package/lib/DateTime/objectUtils.js +20 -24
  187. package/lib/DateTime/props/defaultProps.js +1 -2
  188. package/lib/DateTime/props/propTypes.js +1 -11
  189. package/lib/DateTime/typeChecker.js +0 -4
  190. package/lib/DateTime/validator.js +10 -73
  191. package/lib/DropBox/DropBox.js +10 -34
  192. package/lib/DropBox/DropBoxElement/DropBoxElement.js +37 -58
  193. package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +33 -41
  194. package/lib/DropBox/DropBoxElement/props/propTypes.js +0 -3
  195. package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +9 -14
  196. package/lib/DropBox/__tests__/DropBox.spec.js +2 -6
  197. package/lib/DropBox/css/cssJSLogic.js +1 -3
  198. package/lib/DropBox/props/defaultProps.js +4 -8
  199. package/lib/DropBox/props/propTypes.js +4 -10
  200. package/lib/DropDown/DropDown.js +8 -52
  201. package/lib/DropDown/DropDownHeading.js +20 -39
  202. package/lib/DropDown/DropDownItem.js +20 -42
  203. package/lib/DropDown/DropDownSearch.js +17 -40
  204. package/lib/DropDown/DropDownSeparator.js +4 -24
  205. package/lib/DropDown/__tests__/DropDown.spec.js +9 -15
  206. package/lib/DropDown/__tests__/DropDownItem.spec.js +4 -9
  207. package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -3
  208. package/lib/DropDown/index.js +0 -9
  209. package/lib/DropDown/props/propTypes.js +4 -6
  210. package/lib/Heading/Heading.js +15 -37
  211. package/lib/Heading/props/propTypes.js +0 -3
  212. package/lib/Label/Label.js +22 -40
  213. package/lib/Label/__tests__/Label.spec.js +1 -14
  214. package/lib/Label/props/propTypes.js +0 -3
  215. package/lib/Layout/Box.js +11 -31
  216. package/lib/Layout/Container.js +10 -29
  217. package/lib/Layout/__tests__/Box.spec.js +49 -65
  218. package/lib/Layout/__tests__/Container.spec.js +50 -67
  219. package/lib/Layout/index.js +0 -3
  220. package/lib/Layout/props/propTypes.js +0 -3
  221. package/lib/Layout/utils.js +0 -10
  222. package/lib/ListItem/ListContainer.js +28 -49
  223. package/lib/ListItem/ListItem.js +46 -70
  224. package/lib/ListItem/ListItemWithAvatar.js +49 -76
  225. package/lib/ListItem/ListItemWithCheckBox.js +39 -64
  226. package/lib/ListItem/ListItemWithIcon.js +45 -69
  227. package/lib/ListItem/ListItemWithRadio.js +41 -65
  228. package/lib/ListItem/index.js +0 -7
  229. package/lib/ListItem/props/propTypes.js +4 -6
  230. package/lib/Modal/Modal.js +11 -46
  231. package/lib/Modal/props/propTypes.js +0 -3
  232. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +167 -295
  233. package/lib/MultiSelect/AdvancedMultiSelect.js +125 -203
  234. package/lib/MultiSelect/EmptyState.js +25 -46
  235. package/lib/MultiSelect/MultiSelect.js +206 -324
  236. package/lib/MultiSelect/MultiSelectHeader.js +9 -31
  237. package/lib/MultiSelect/MultiSelectWithAvatar.js +64 -106
  238. package/lib/MultiSelect/SelectedOptions.js +18 -44
  239. package/lib/MultiSelect/Suggestions.js +33 -65
  240. package/lib/MultiSelect/__tests__/MultiSelect.spec.js +75 -86
  241. package/lib/MultiSelect/index.js +0 -5
  242. package/lib/MultiSelect/props/defaultProps.js +0 -2
  243. package/lib/MultiSelect/props/propTypes.js +0 -5
  244. package/lib/PopOver/PopOver.js +49 -95
  245. package/lib/PopOver/__tests__/PopOver.spec.js +1 -4
  246. package/lib/PopOver/index.js +0 -4
  247. package/lib/PopOver/props/propTypes.js +0 -3
  248. package/lib/Popup/Popup.js +82 -159
  249. package/lib/Popup/__tests__/Popup.spec.js +9 -44
  250. package/lib/Popup/viewPort.js +14 -28
  251. package/lib/Provider/AvatarSize.js +0 -4
  252. package/lib/Provider/Config.js +0 -2
  253. package/lib/Provider/CssProvider.js +0 -4
  254. package/lib/Provider/IdProvider.js +6 -17
  255. package/lib/Provider/LibraryContext.js +15 -35
  256. package/lib/Provider/LibraryContextInit.js +0 -4
  257. package/lib/Provider/NumberGenerator/NumberGenerator.js +15 -44
  258. package/lib/Provider/ZindexProvider.js +3 -15
  259. package/lib/Provider/index.js +0 -5
  260. package/lib/Radio/Radio.js +39 -62
  261. package/lib/Radio/__tests__/Radiospec.js +5 -9
  262. package/lib/Radio/props/propTypes.js +0 -3
  263. package/lib/Responsive/CustomResponsive.js +28 -73
  264. package/lib/Responsive/RefWrapper.js +11 -17
  265. package/lib/Responsive/ResizeComponent.js +39 -63
  266. package/lib/Responsive/ResizeObserver.js +10 -24
  267. package/lib/Responsive/Responsive.js +31 -81
  268. package/lib/Responsive/index.js +0 -4
  269. package/lib/Responsive/props/propTypes.js +0 -3
  270. package/lib/Responsive/sizeObservers.js +17 -53
  271. package/lib/Responsive/utils/index.js +3 -11
  272. package/lib/Responsive/utils/shallowCompare.js +2 -11
  273. package/lib/Responsive/windowResizeObserver.js +0 -8
  274. package/lib/ResponsiveDropBox/ResponsiveDropBox.js +17 -45
  275. package/lib/ResponsiveDropBox/props/propTypes.js +0 -3
  276. package/lib/Ribbon/Ribbon.js +14 -34
  277. package/lib/Ribbon/__tests__/Ribbon.spec.js +0 -22
  278. package/lib/Ribbon/props/propTypes.js +0 -3
  279. package/lib/RippleEffect/RippleEffect.js +10 -18
  280. package/lib/RippleEffect/props/propTypes.js +0 -3
  281. package/lib/Select/GroupSelect.js +131 -230
  282. package/lib/Select/Select.js +209 -291
  283. package/lib/Select/SelectWithAvatar.js +57 -103
  284. package/lib/Select/SelectWithIcon.js +77 -133
  285. package/lib/Select/__tests__/Select.spec.js +92 -134
  286. package/lib/Select/index.js +0 -5
  287. package/lib/Select/props/defaultProps.js +4 -5
  288. package/lib/Select/props/propTypes.js +0 -4
  289. package/lib/Stencils/Stencils.js +11 -30
  290. package/lib/Stencils/__tests__/Stencils.spec.js +0 -12
  291. package/lib/Stencils/props/propTypes.js +0 -3
  292. package/lib/Switch/Switch.js +34 -57
  293. package/lib/Switch/props/propTypes.js +0 -3
  294. package/lib/Tab/Tab.js +28 -41
  295. package/lib/Tab/TabContent.js +5 -12
  296. package/lib/Tab/TabContentWrapper.js +6 -13
  297. package/lib/Tab/TabWrapper.js +19 -37
  298. package/lib/Tab/Tabs.js +98 -172
  299. package/lib/Tab/__tests__/Tab.spec.js +58 -67
  300. package/lib/Tab/__tests__/TabContent.spec.js +6 -10
  301. package/lib/Tab/__tests__/TabContentWrapper.spec.js +20 -28
  302. package/lib/Tab/__tests__/TabWrapper.spec.js +0 -12
  303. package/lib/Tab/__tests__/Tabs.spec.js +39 -53
  304. package/lib/Tab/index.js +0 -6
  305. package/lib/Tab/props/propTypes.js +0 -3
  306. package/lib/Tag/Tag.js +43 -72
  307. package/lib/Tag/__tests__/Tag.spec.js +8 -14
  308. package/lib/Tag/props/propTypes.js +0 -3
  309. package/lib/TextBox/TextBox.js +60 -86
  310. package/lib/TextBox/TextBox.module.css +8 -5
  311. package/lib/TextBox/__tests__/TextBox.spec.js +4 -14
  312. package/lib/TextBox/props/propTypes.js +4 -6
  313. package/lib/TextBoxIcon/TextBoxIcon.js +52 -79
  314. package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +4 -14
  315. package/lib/TextBoxIcon/props/propTypes.js +0 -3
  316. package/lib/Textarea/Textarea.js +30 -55
  317. package/lib/Textarea/Textarea.module.css +3 -4
  318. package/lib/Textarea/__tests__/Textarea.spec.js +2 -14
  319. package/lib/Textarea/props/propTypes.js +0 -3
  320. package/lib/Tooltip/Tooltip.js +31 -94
  321. package/lib/Tooltip/__tests__/Tooltip.spec.js +3 -24
  322. package/lib/Tooltip/props/propTypes.js +0 -3
  323. package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +16 -40
  324. package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -3
  325. package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +25 -53
  326. package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -3
  327. package/lib/VelocityAnimation/index.js +0 -3
  328. package/lib/css.js +0 -40
  329. package/lib/deprecated/PortalLayer/PortalLayer.js +24 -47
  330. package/lib/deprecated/PortalLayer/props/propTypes.js +0 -3
  331. package/lib/index.js +0 -57
  332. package/lib/semantic/Button/Button.js +22 -42
  333. package/lib/semantic/Button/props/propTypes.js +0 -3
  334. package/lib/semantic/index.js +0 -2
  335. package/lib/utils/Common.js +18 -108
  336. package/lib/utils/ContextOptimizer.js +10 -16
  337. package/lib/utils/__tests__/constructFullName.spec.js +0 -1
  338. package/lib/utils/__tests__/debounce.spec.js +2 -3
  339. package/lib/utils/__tests__/getInitial.spec.js +0 -1
  340. package/lib/utils/constructFullName.js +4 -13
  341. package/lib/utils/css/compileClassNames.js +0 -6
  342. package/lib/utils/css/mergeStyle.js +7 -10
  343. package/lib/utils/css/utils.js +0 -8
  344. package/lib/utils/datetime/common.js +7 -52
  345. package/lib/utils/debounce.js +1 -6
  346. package/lib/utils/dropDownUtils.js +60 -176
  347. package/lib/utils/dummyFunction.js +0 -2
  348. package/lib/utils/getHTMLFontSize.js +0 -1
  349. package/lib/utils/getInitial.js +0 -6
  350. package/lib/utils/index.js +0 -4
  351. package/lib/utils/scrollTo.js +0 -2
  352. package/lib/utils/shallowEqual.js +0 -8
  353. package/package.json +2 -2
  354. package/es/utils/datetime/GMTZones.js +0 -48
  355. package/lib/utils/datetime/GMTZones.js +0 -55
@@ -9,22 +9,18 @@ export default class Accordion extends React.Component {
9
9
  };
10
10
  this.selectMenu = this.selectMenu.bind(this);
11
11
  }
12
-
13
12
  selectMenu(selectedItem) {
14
13
  let {
15
14
  onSelect,
16
15
  disableInternalState
17
16
  } = this.props;
18
-
19
17
  if (onSelect) {
20
18
  onSelect(selectedItem);
21
19
  }
22
-
23
20
  !disableInternalState && this.setState({
24
21
  selectedItem
25
22
  });
26
23
  }
27
-
28
24
  componentWillReceiveProps(nextProps) {
29
25
  if (this.props.selectedItem !== nextProps.selectedItem && !this.props.disableInternalState) {
30
26
  this.setState({
@@ -32,7 +28,6 @@ export default class Accordion extends React.Component {
32
28
  });
33
29
  }
34
30
  }
35
-
36
31
  render() {
37
32
  let {
38
33
  className,
@@ -73,10 +68,11 @@ export default class Accordion extends React.Component {
73
68
  "data-selector-id": dataSelectorId
74
69
  }, children);
75
70
  }
76
-
77
71
  }
78
72
  Accordion.propTypes = Accordion_propTypes;
79
- Accordion.defaultProps = Accordion_defaultProps; // if (__DOCS__) {
73
+ Accordion.defaultProps = Accordion_defaultProps;
74
+
75
+ // if (__DOCS__) {
80
76
  // Accordion.docs = {
81
77
  // componentGroup: 'Animation',
82
78
  // folderName: 'Style Guide'
@@ -8,7 +8,6 @@ export default class AccordionItem extends React.Component {
8
8
  super(props);
9
9
  this.equalityCheck = this.equalityCheck.bind(this);
10
10
  }
11
-
12
11
  equalityCheck() {
13
12
  let {
14
13
  equalityCheck,
@@ -17,7 +16,6 @@ export default class AccordionItem extends React.Component {
17
16
  } = this.props;
18
17
  return equalityCheck ? equalityCheck(id, selectedItem) : selectedItem == id;
19
18
  }
20
-
21
19
  render() {
22
20
  let {
23
21
  id,
@@ -51,10 +49,10 @@ export default class AccordionItem extends React.Component {
51
49
  isActive: this.equalityCheck()
52
50
  }, children[1]));
53
51
  }
54
-
55
52
  }
56
53
  AccordionItem.propTypes = AccordionItem_propTypes;
57
- AccordionItem.defaultProps = AccordionItem_defaultProps; // if (__DOCS__) {
54
+ AccordionItem.defaultProps = AccordionItem_defaultProps;
55
+ // if (__DOCS__) {
58
56
  // AccordionItem.docs = {
59
57
  // componentGroup: 'Animation',
60
58
  // folderName: 'Style Guide'
@@ -7,7 +7,6 @@ export default class Animation extends React.Component {
7
7
  constructor(props) {
8
8
  super(props);
9
9
  }
10
-
11
10
  render() {
12
11
  let {
13
12
  name,
@@ -121,10 +120,11 @@ export default class Animation extends React.Component {
121
120
  onExit: onExit
122
121
  }, /*#__PURE__*/React.createElement(React.Fragment, null, children));
123
122
  }
124
-
125
123
  }
126
124
  Animation.propTypes = propTypes;
127
- Animation.defaultProps = defaultProps; // if (__DOCS__) {
125
+ Animation.defaultProps = defaultProps;
126
+
127
+ // if (__DOCS__) {
128
128
  // Animation.docs = {
129
129
  // componentGroup: 'Animation',
130
130
  // folderName: 'Style Guide',
@@ -1,5 +1,4 @@
1
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
2
  import React from 'react';
4
3
  import { defaultProps } from './props/defaultProps';
5
4
  import { propTypes } from './props/propTypes';
@@ -31,27 +30,22 @@ export default class AppContainer extends React.Component {
31
30
  getTooltipContainer: () => this.containerElement
32
31
  });
33
32
  }
34
-
35
33
  mouseOverDispatch(e) {
36
34
  if (this.tooltipRef) {
37
35
  this.tooltipRef.handleOver(e, this.containerElement);
38
36
  }
39
37
  }
40
-
41
38
  removeTimeout() {
42
39
  if (this.timer) {
43
40
  this.timer = clearTimeout(this.timer);
44
41
  }
45
42
  }
46
-
47
43
  handleOver(e) {
48
44
  if (this.timer) {
49
45
  this.timer = clearTimeout(this.timer);
50
46
  }
51
-
52
47
  this.timer = setTimeout(() => this.mouseOverDispatch(e), this.tooltipDebounce);
53
48
  }
54
-
55
49
  getContainerRef(ref) {
56
50
  let {
57
51
  eleRef
@@ -59,11 +53,9 @@ export default class AppContainer extends React.Component {
59
53
  this.containerElement = ref;
60
54
  eleRef && eleRef(ref);
61
55
  }
62
-
63
56
  setTooltipRef(ref) {
64
57
  this.tooltipRef = ref;
65
58
  }
66
-
67
59
  componentDidMount() {
68
60
  if (this.containerElement) {
69
61
  this.containerElement.addEventListener('mouseover', this.handleOver, false);
@@ -71,7 +63,6 @@ export default class AppContainer extends React.Component {
71
63
  this.tooltipRef.observeElement();
72
64
  }
73
65
  }
74
-
75
66
  componentWillUnmount() {
76
67
  if (this.containerElement) {
77
68
  this.containerElement.removeEventListener('mouseover', this.handleOver, false);
@@ -79,7 +70,6 @@ export default class AppContainer extends React.Component {
79
70
  this.tooltipRef.unObserveElement();
80
71
  }
81
72
  }
82
-
83
73
  render() {
84
74
  let {
85
75
  className,
@@ -97,7 +87,8 @@ export default class AppContainer extends React.Component {
97
87
  ExtraProps = {}
98
88
  } = customProps;
99
89
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, _extends({
100
- className: `${style.container} ${className}` //onMouseOver={this.handleOver}
90
+ className: `${style.container} ${className}`
91
+ //onMouseOver={this.handleOver}
101
92
  ,
102
93
  dataId: dataId,
103
94
  dataSelectorId: dataSelectorId,
@@ -114,10 +105,11 @@ export default class AppContainer extends React.Component {
114
105
  customClass: tooltipClass
115
106
  }, TooltipProps))));
116
107
  }
117
-
118
108
  }
119
109
  AppContainer.propTypes = propTypes;
120
- AppContainer.defaultProps = defaultProps; // if (__DOCS__) {
110
+ AppContainer.defaultProps = defaultProps;
111
+
112
+ // if (__DOCS__) {
121
113
  // AppContainer.docs = {
122
114
  // componentGroup: 'Template',
123
115
  // folderName: 'Style Guide'
@@ -1,5 +1,4 @@
1
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
2
  import React from 'react';
4
3
  import { defaultProps } from './props/defaultProps';
5
4
  import { propTypes } from './props/propTypes';
@@ -18,7 +17,6 @@ eslint css-modules/no-unused-class: [2, { markAsUsed: ['circle', 'square',
18
17
  'small','medium','xmedium',"xsmall", "large", "xlarge", "primary", "secondary",
19
18
  "info","default"] }]
20
19
  */
21
-
22
20
  export default class Avatar extends React.Component {
23
21
  constructor(props) {
24
22
  super(props);
@@ -29,7 +27,6 @@ export default class Avatar extends React.Component {
29
27
  this.putValidImageURLJSON = this.putValidImageURLJSON.bind(this);
30
28
  this.getInitialByFullName = this.getInitialByFullName.bind(this);
31
29
  }
32
-
33
30
  componentDidUpdate(prevProps, prevState) {
34
31
  let {
35
32
  src
@@ -37,14 +34,12 @@ export default class Avatar extends React.Component {
37
34
  let {
38
35
  isLoaded
39
36
  } = this.state;
40
-
41
37
  if (prevProps.src !== src) {
42
38
  this.setState({
43
39
  isLoaded: !isLoaded
44
40
  });
45
41
  }
46
42
  }
47
-
48
43
  putInvalidImageURLJSON() {
49
44
  const {
50
45
  src,
@@ -54,25 +49,23 @@ export default class Avatar extends React.Component {
54
49
  isLoaded
55
50
  } = this.state;
56
51
  let _validImgArr = [...Avatar.validImageURLs];
57
- let _invalidImgArr = [...Avatar.invalidImageURLs]; // if (alternateSrc) {
52
+ let _invalidImgArr = [...Avatar.invalidImageURLs];
53
+
54
+ // if (alternateSrc) {
58
55
  // _validImgArr.push(alternateSrc);
59
56
  // }
60
57
 
61
58
  const validIndex = _validImgArr.indexOf(src);
62
-
63
59
  if (validIndex !== -1) {
64
60
  _validImgArr.splice(validIndex, 1);
65
61
  }
66
-
67
62
  _invalidImgArr.push(src);
68
-
69
63
  Avatar.invalidImageURLs = _invalidImgArr;
70
64
  Avatar.validImageURLs = _validImgArr;
71
65
  this.setState({
72
66
  isLoaded: !isLoaded
73
67
  });
74
68
  }
75
-
76
69
  putValidImageURLJSON() {
77
70
  const {
78
71
  src
@@ -82,32 +75,28 @@ export default class Avatar extends React.Component {
82
75
  } = this.state;
83
76
  const validImgArr = Avatar.validImageURLs;
84
77
  const invalidImgArr = Avatar.invalidImageURLs;
85
-
86
78
  if (src && validImgArr.indexOf(src) === -1 && invalidImgArr.indexOf(src) === -1) {
87
79
  let _validImgArr = [...validImgArr];
88
-
89
80
  _validImgArr.push(src);
90
-
91
81
  Avatar.validImageURLs = _validImgArr;
92
82
  this.setState({
93
83
  isLoaded: !isLoaded
94
84
  });
95
85
  }
96
86
  }
97
- /* this will cause error if user name already have some space need to move firstName lastName user preference pattern*/
98
-
99
87
 
88
+ /* this will cause error if user name already have some space need to move firstName lastName user preference pattern*/
100
89
  getInitialByFullName() {
101
90
  let fullName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
102
91
  fullName = (fullName || '').trim();
103
92
  let nameList = fullName.split(' ');
104
-
105
93
  if (nameList.length === 1) {
106
94
  return getInitial('', nameList[0]);
107
95
  }
108
-
109
96
  return getInitial(nameList[0], nameList[1]);
110
- } // componentDidMount() {
97
+ }
98
+
99
+ // componentDidMount() {
111
100
  // const { src } = this.props;
112
101
  // const validImgArr = Avatar.validImageURLs;
113
102
  // if (validImgArr.indexOf(src) === -1) {
@@ -116,7 +105,6 @@ export default class Avatar extends React.Component {
116
105
  // }
117
106
  // }
118
107
 
119
-
120
108
  render() {
121
109
  let {
122
110
  src,
@@ -147,8 +135,8 @@ export default class Avatar extends React.Component {
147
135
  let textStyle = textPalette ? style[textPalette] : palette === 'secondary' ? style.white : style.black;
148
136
  let shapeStyle = shape === 'circle' ? 'circle' : `square_${size}`;
149
137
  initial = initial || this.getInitialByFullName(name);
150
- let isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1; //let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
151
-
138
+ let isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1;
139
+ //let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
152
140
  let showAvatar = src && !isInvalidImageList;
153
141
  let showInitial = !showAvatar || showAvatar && isInvalidImageList;
154
142
  const showAlternateAvatar = alternateSrc ? showInitial : false;
@@ -179,12 +167,12 @@ export default class Avatar extends React.Component {
179
167
  className: `${style.shadow} ${textStyle} `
180
168
  })));
181
169
  }
182
-
183
170
  }
184
171
  Avatar.defaultProps = defaultProps;
185
172
  Avatar.propTypes = propTypes;
186
173
  Avatar.invalidImageURLs = [];
187
- Avatar.validImageURLs = []; // if (__DOCS__) {
174
+ Avatar.validImageURLs = [];
175
+ // if (__DOCS__) {
188
176
  // Avatar.docs = {
189
177
  // componentGroup: 'Avatar Group',
190
178
  // folderName: 'Style Guide'
@@ -1,5 +1,4 @@
1
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
2
  import React from 'react';
4
3
  import { defaultProps } from './props/defaultProps';
5
4
  import { propTypes } from './props/propTypes';
@@ -71,10 +70,11 @@ export default class AvatarTeam extends React.Component {
71
70
  ${style[`${size}team`]} ${customAvatarTeam}`
72
71
  }));
73
72
  }
74
-
75
73
  }
76
74
  AvatarTeam.defaultProps = defaultProps;
77
- AvatarTeam.propTypes = propTypes; // if (__DOCS__) {
75
+ AvatarTeam.propTypes = propTypes;
76
+
77
+ // if (__DOCS__) {
78
78
  // AvatarTeam.docs = {
79
79
  // componentGroup: 'Avatar Group',
80
80
  // folderName: 'Style Guide',
@@ -1,5 +1,4 @@
1
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
2
  import React from 'react';
4
3
  import { defaultProps } from './props/defaultProps';
5
4
  import { propTypes } from './props/propTypes';
@@ -11,9 +10,7 @@ Button text and children props?
11
10
  use children for both cases
12
11
  toLowerCase check needed?
13
12
  */
14
-
15
13
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['small','medium','large','xlarge','button_medium','button_small','primary','primaryfilled','danger','dangerfilled','plainprimary', 'plainsecondary', 'secondary', 'secondaryfilled', 'successFilled','tertiaryFilled'] }] */
16
-
17
14
  export default function Button(props) {
18
15
  let {
19
16
  text,
@@ -57,7 +54,9 @@ export default function Button(props) {
57
54
  }))));
58
55
  }
59
56
  Button.defaultProps = defaultProps;
60
- Button.propTypes = propTypes; // if (__DOCS__) {
57
+ Button.propTypes = propTypes;
58
+
59
+ // if (__DOCS__) {
61
60
  // Button.docs = {
62
61
  // componentGroup: 'Form Elements',
63
62
  // folderName: 'Style Guide'
@@ -4,7 +4,6 @@ import { propTypes } from './props/propTypes';
4
4
  import style from './Buttongroup.module.css';
5
5
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['footer','header',
6
6
  'tab','alignleft','alignright','aligncenter' ] }] */
7
-
8
7
  export default class Buttongroup extends React.Component {
9
8
  render() {
10
9
  let {
@@ -30,10 +29,11 @@ export default class Buttongroup extends React.Component {
30
29
  className: style[`align${buttonPosition}`]
31
30
  }, children));
32
31
  }
33
-
34
32
  }
35
33
  Buttongroup.defaultProps = defaultProps;
36
- Buttongroup.propTypes = propTypes; // if (__DOCS__) {
34
+ Buttongroup.propTypes = propTypes;
35
+
36
+ // if (__DOCS__) {
37
37
  // Buttongroup.docs = {
38
38
  // componentGroup: 'Molecule',
39
39
  // folderName: 'Style Guide',
package/es/Card/Card.js CHANGED
@@ -4,6 +4,7 @@ import { Card_defaultProps, CardHeader_defaultProps, CardContent_defaultProps, C
4
4
  import { Container, Box } from '../Layout';
5
5
  import { getLibraryConfig } from '../Provider/Config';
6
6
  import style from './Card.module.css';
7
+
7
8
  /* eslint-disable react/forbid-component-props */
8
9
 
9
10
  /*
@@ -13,24 +14,20 @@ scroll logic move to virtualizer list
13
14
  */
14
15
 
15
16
  /* performance handling pending in card component moving to ref instead of setState */
16
-
17
17
  export class CardHeader extends Component {
18
18
  constructor(props) {
19
19
  super(props);
20
20
  this.getCardHeaderDom = this.getCardHeaderDom.bind(this);
21
21
  this.cardHeader = null;
22
22
  }
23
-
24
23
  getCardHeaderDom(ele) {
25
24
  this.cardHeader = ele;
26
25
  }
27
-
28
26
  setScrollClassName() {
29
27
  if (!this.cardHeader) {
30
28
  return null;
31
29
  }
32
30
  }
33
-
34
31
  render() {
35
32
  let {
36
33
  isScroll,
@@ -46,7 +43,6 @@ export class CardHeader extends Component {
46
43
  dataSelectorId: dataSelectorId
47
44
  }, children);
48
45
  }
49
-
50
46
  }
51
47
  CardHeader.propTypes = CardHeader_propTypes;
52
48
  CardHeader.defaultProps = CardHeader_defaultProps;
@@ -77,7 +73,6 @@ export class CardContent extends Component {
77
73
  dataSelectorId: dataSelectorId
78
74
  }, children);
79
75
  }
80
-
81
76
  }
82
77
  CardContent.propTypes = CardContent_propTypes;
83
78
  CardContent.defaultProps = CardContent_defaultProps;
@@ -96,7 +91,8 @@ export default class Card extends Component {
96
91
  this.to = from + 3 * limit;
97
92
  this.isFetching = false;
98
93
  this.lastScrollTop = 0;
99
- this.onScroll = this.onScroll.bind(this); //this.onSetScroll = debounce(this.setScroll.bind(this, true), 10, true);
94
+ this.onScroll = this.onScroll.bind(this);
95
+ //this.onSetScroll = debounce(this.setScroll.bind(this, true), 10, true);
100
96
  //this.onClearScroll = debounce(this.setScroll.bind(this, false), 500);
101
97
  }
102
98
 
@@ -105,7 +101,6 @@ export default class Card extends Component {
105
101
  this.from = nextProps.from;
106
102
  }
107
103
  }
108
-
109
104
  onScroll(e) {
110
105
  let scrollContainerObj = e.currentTarget;
111
106
  let {
@@ -129,20 +124,16 @@ export default class Card extends Component {
129
124
  // isScrollShadow,
130
125
  isPercentageScroll
131
126
  } = this.props;
132
-
133
127
  if (scrollTop > this.lastScrollTop) {
134
128
  this.scrollDirection = 'down';
135
129
  } else {
136
130
  this.scrollDirection = 'up';
137
131
  }
138
-
139
132
  this.lastScrollTop = scrollTop;
140
-
141
133
  if (fetchData && !this.isFetching) {
142
134
  if (this.scrollDirection === 'down' && !noMoreData) {
143
135
  const scrollingPercentage = (scrollTop + offsetHeight) / (scrollHeight - scrollAt) * 100;
144
136
  const prefetch = isPercentageScroll ? scrollingPercentage >= getLibraryConfig('scrollFetchLimit') : scrollHeight - scrollAt <= scrollTop + offsetHeight;
145
-
146
137
  if (prefetch) {
147
138
  this.isFetching = true;
148
139
  fetchData(this.from + this.limit, this.limit + this.to, this.scrollDirection).then(() => {
@@ -164,18 +155,19 @@ export default class Card extends Component {
164
155
  }
165
156
  }
166
157
  }
167
-
168
158
  if (fetchData && !noNeedUpScroll) {
169
159
  if (this.from !== 0 && scrollTop === 0 && !noNeedUpScroll) {
170
160
  scrollContainerObj.scrollTop = scrollTop + offsetHeight / 3;
171
161
  } else if (scrollHeight === scrollTop + offsetHeight && !noMoreData) {
172
162
  scrollContainerObj.scrollTop = scrollTop - offsetHeight / 2;
173
163
  }
174
- } // if (isScrollShadow) {
164
+ }
165
+ // if (isScrollShadow) {
175
166
  // this.onSetScroll();
176
167
  // }
168
+ }
177
169
 
178
- } // setScroll(isScroll) {
170
+ // setScroll(isScroll) {
179
171
  // let { isScroll: stateIsScroll } = this.state;
180
172
  // if (isScroll && !stateIsScroll) {
181
173
  // this.setState({ isScroll: true }, () => {
@@ -186,7 +178,6 @@ export default class Card extends Component {
186
178
  // }
187
179
  // }
188
180
 
189
-
190
181
  render() {
191
182
  let {
192
183
  onClick,
@@ -214,7 +205,6 @@ export default class Card extends Component {
214
205
  if (!child) {
215
206
  return child;
216
207
  }
217
-
218
208
  if (child.type === CardHeader || this.props.childTypes && child.type === this.props.childTypes.cardHeader) {
219
209
  return /*#__PURE__*/React.cloneElement(child, {
220
210
  isScroll
@@ -235,14 +225,14 @@ export default class Card extends Component {
235
225
  dataSelectorId: child.props.dataSelectorId
236
226
  }, child.props.children);
237
227
  }
238
-
239
228
  return child;
240
229
  }));
241
230
  }
242
-
243
231
  }
244
232
  Card.propTypes = Card_propTypes;
245
- Card.defaultProps = Card_defaultProps; // if (__DOCS__) {
233
+ Card.defaultProps = Card_defaultProps;
234
+
235
+ // if (__DOCS__) {
246
236
  // Card.docs = {
247
237
  // componentGroup: 'Template',
248
238
  // folderName: 'Style Guide',
@@ -265,7 +255,6 @@ export class CardFooter extends Component {
265
255
  dataSelectorId: dataSelectorId
266
256
  }, children);
267
257
  }
268
-
269
258
  }
270
259
  CardFooter.propTypes = CardFooter_propTypes;
271
260
  CardFooter.defaultProps = CardFooter_defaultProps;
@@ -1,5 +1,4 @@
1
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
2
  import React from 'react';
4
3
  import { propTypes } from './props/propTypes';
5
4
  import { defaultProps } from './props/defaultProps';
@@ -12,7 +11,6 @@ export default class CheckBox extends React.Component {
12
11
  super(props);
13
12
  this.onChange = this.onChange.bind(this);
14
13
  }
15
-
16
14
  onChange(e) {
17
15
  let {
18
16
  onChange,
@@ -20,7 +18,6 @@ export default class CheckBox extends React.Component {
20
18
  } = this.props;
21
19
  onChange && onChange(!checked, e);
22
20
  }
23
-
24
21
  render() {
25
22
  let {
26
23
  id,
@@ -149,10 +146,11 @@ export default class CheckBox extends React.Component {
149
146
  title: toolTip ? toolTip : text
150
147
  }, LabelProps))));
151
148
  }
152
-
153
149
  }
154
150
  CheckBox.defaultProps = defaultProps;
155
- CheckBox.propTypes = propTypes; // if (__DOCS__) {
151
+ CheckBox.propTypes = propTypes;
152
+
153
+ // if (__DOCS__) {
156
154
  // CheckBox.docs = {
157
155
  // componentGroup: 'Form Elements',
158
156
  // folderName: 'Style Guide'