@zohodesk/components 1.0.0-temp-164 → 1.0.0-temp-166

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 (478) hide show
  1. package/README.md +34 -0
  2. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +151 -151
  3. package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +450 -450
  4. package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +30 -30
  5. package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +450 -450
  6. package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +30 -30
  7. package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +450 -450
  8. package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +30 -30
  9. package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +450 -450
  10. package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +30 -30
  11. package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +450 -450
  12. package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +30 -30
  13. package/assets/Appearance/light/mode/Component_LightMode.module.css +148 -148
  14. package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +450 -450
  15. package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +30 -30
  16. package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +450 -450
  17. package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +30 -30
  18. package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +450 -450
  19. package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +30 -30
  20. package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +450 -450
  21. package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +30 -30
  22. package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +450 -450
  23. package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +30 -30
  24. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +153 -153
  25. package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +450 -450
  26. package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +30 -30
  27. package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +450 -450
  28. package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +30 -30
  29. package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +450 -450
  30. package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +30 -30
  31. package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +450 -450
  32. package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +30 -30
  33. package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +450 -450
  34. package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +30 -30
  35. package/es/Accordion/Accordion.js +8 -3
  36. package/es/Accordion/AccordionItem.js +5 -2
  37. package/es/Animation/Animation.js +3 -3
  38. package/es/AppContainer/AppContainer.js +27 -10
  39. package/es/AppContainer/AppContainer.module.css +2 -2
  40. package/es/AppContainer/props/defaultProps.js +2 -1
  41. package/es/AppContainer/props/propTypes.js +1 -0
  42. package/es/Avatar/Avatar.js +26 -11
  43. package/es/Avatar/Avatar.module.css +18 -18
  44. package/es/AvatarTeam/AvatarTeam.js +4 -3
  45. package/es/AvatarTeam/AvatarTeam.module.css +35 -35
  46. package/es/Button/Button.js +5 -3
  47. package/es/Button/css/Button.module.css +70 -70
  48. package/es/Buttongroup/Buttongroup.js +4 -3
  49. package/es/Buttongroup/Buttongroup.module.css +14 -15
  50. package/es/Card/Card.js +21 -10
  51. package/es/CheckBox/CheckBox.js +5 -3
  52. package/es/CheckBox/CheckBox.module.css +15 -15
  53. package/es/DateTime/CalendarView.js +33 -20
  54. package/es/DateTime/DateTime.js +113 -12
  55. package/es/DateTime/DateTime.module.css +39 -39
  56. package/es/DateTime/DateTimePopupFooter.js +4 -2
  57. package/es/DateTime/DateTimePopupHeader.js +8 -2
  58. package/es/DateTime/DateWidget.js +100 -35
  59. package/es/DateTime/DateWidget.module.css +5 -5
  60. package/es/DateTime/DaysRow.js +4 -2
  61. package/es/DateTime/Time.js +10 -2
  62. package/es/DateTime/YearView.js +28 -4
  63. package/es/DateTime/YearView.module.css +15 -15
  64. package/es/DateTime/__tests__/CalendarView.spec.js +1 -0
  65. package/es/DateTime/__tests__/DateTime.spec.js +1 -0
  66. package/es/DateTime/__tests__/DateWidget.spec.js +2 -3
  67. package/es/DateTime/common.js +3 -0
  68. package/es/DateTime/constants.js +1 -0
  69. package/es/DateTime/dateFormatUtils/dateFormat.js +63 -30
  70. package/es/DateTime/dateFormatUtils/dateFormats.js +0 -1
  71. package/es/DateTime/dateFormatUtils/dayChange.js +13 -4
  72. package/es/DateTime/dateFormatUtils/index.js +32 -2
  73. package/es/DateTime/dateFormatUtils/monthChange.js +8 -0
  74. package/es/DateTime/dateFormatUtils/timeChange.js +22 -6
  75. package/es/DateTime/dateFormatUtils/yearChange.js +11 -2
  76. package/es/DateTime/objectUtils.js +14 -20
  77. package/es/DateTime/props/defaultProps.js +2 -1
  78. package/es/DateTime/typeChecker.js +3 -0
  79. package/es/DateTime/validator.js +58 -6
  80. package/es/DropBox/DropBox.js +9 -5
  81. package/es/DropBox/DropBoxElement/DropBoxElement.js +18 -6
  82. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +85 -79
  83. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +6 -4
  84. package/es/DropBox/DropBoxElement/props/propTypes.js +1 -1
  85. package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +3 -0
  86. package/es/DropBox/__tests__/DropBox.spec.js +2 -2
  87. package/es/DropBox/css/DropBox.module.css +6 -6
  88. package/es/DropBox/props/defaultProps.js +1 -2
  89. package/es/DropBox/props/propTypes.js +1 -2
  90. package/es/DropDown/DropDown.js +10 -5
  91. package/es/DropDown/DropDown.module.css +2 -2
  92. package/es/DropDown/DropDownHeading.js +5 -5
  93. package/es/DropDown/DropDownHeading.module.css +6 -6
  94. package/es/DropDown/DropDownItem.js +8 -1
  95. package/es/DropDown/DropDownItem.module.css +12 -12
  96. package/es/DropDown/DropDownSearch.js +4 -0
  97. package/es/DropDown/DropDownSearch.module.css +3 -3
  98. package/es/DropDown/DropDownSeparator.js +1 -0
  99. package/es/DropDown/DropDownSeparator.module.css +2 -2
  100. package/es/DropDown/__tests__/DropDown.spec.js +1 -2
  101. package/es/Heading/Heading.js +3 -3
  102. package/es/Heading/Heading.module.css +2 -2
  103. package/es/Label/Label.js +3 -3
  104. package/es/Label/Label.module.css +5 -5
  105. package/es/Layout/Box.js +17 -3
  106. package/es/Layout/Container.js +16 -4
  107. package/es/Layout/Layout.module.css +15 -15
  108. package/es/Layout/index.js +1 -2
  109. package/es/Layout/props/defaultProps.js +2 -0
  110. package/es/Layout/props/propTypes.js +2 -0
  111. package/es/Layout/utils.js +5 -1
  112. package/es/ListItem/ListContainer.js +8 -3
  113. package/es/ListItem/ListItem.js +9 -3
  114. package/es/ListItem/ListItem.module.css +38 -38
  115. package/es/ListItem/ListItemWithAvatar.js +9 -3
  116. package/es/ListItem/ListItemWithCheckBox.js +7 -2
  117. package/es/ListItem/ListItemWithIcon.js +8 -3
  118. package/es/ListItem/ListItemWithRadio.js +7 -3
  119. package/es/Modal/Modal.js +28 -11
  120. package/es/MultiSelect/AdvancedGroupMultiSelect.js +90 -13
  121. package/es/MultiSelect/AdvancedMultiSelect.js +33 -9
  122. package/es/MultiSelect/EmptyState.js +6 -0
  123. package/es/MultiSelect/MultiSelect.js +100 -32
  124. package/es/MultiSelect/MultiSelect.module.css +31 -31
  125. package/es/MultiSelect/MultiSelectHeader.js +3 -0
  126. package/es/MultiSelect/MultiSelectWithAvatar.js +13 -6
  127. package/es/MultiSelect/SelectedOptions.js +6 -3
  128. package/es/MultiSelect/SelectedOptions.module.css +5 -5
  129. package/es/MultiSelect/Suggestions.js +7 -3
  130. package/es/MultiSelect/__tests__/MultiSelect.spec.js +4 -6
  131. package/es/MultiSelect/props/propTypes.js +2 -0
  132. package/es/PopOver/PopOver.js +18 -2
  133. package/es/PopOver/__tests__/PopOver.spec.js +2 -1
  134. package/es/Popup/Popup.js +77 -27
  135. package/es/Popup/__tests__/Popup.spec.js +17 -5
  136. package/es/Popup/viewPort.js +16 -4
  137. package/es/Provider/IdProvider.js +10 -5
  138. package/es/Provider/LibraryContext.js +6 -4
  139. package/es/Provider/NumberGenerator/NumberGenerator.js +21 -7
  140. package/es/Provider/ZindexProvider.js +9 -2
  141. package/es/Radio/Radio.js +4 -2
  142. package/es/Radio/Radio.module.css +9 -9
  143. package/es/Responsive/CustomResponsive.js +30 -18
  144. package/es/Responsive/RefWrapper.js +6 -7
  145. package/es/Responsive/ResizeComponent.js +35 -25
  146. package/es/Responsive/ResizeObserver.js +26 -6
  147. package/es/Responsive/Responsive.js +34 -20
  148. package/es/Responsive/index.js +1 -3
  149. package/es/Responsive/sizeObservers.js +28 -7
  150. package/es/Responsive/utils/index.js +7 -5
  151. package/es/Responsive/utils/shallowCompare.js +7 -2
  152. package/es/Responsive/windowResizeObserver.js +7 -0
  153. package/es/ResponsiveDropBox/ResponsiveDropBox.js +4 -0
  154. package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
  155. package/es/Ribbon/Ribbon.js +4 -2
  156. package/es/Ribbon/Ribbon.module.css +46 -48
  157. package/es/RippleEffect/RippleEffect.js +1 -3
  158. package/es/Select/GroupSelect.js +59 -14
  159. package/es/Select/Select.js +81 -34
  160. package/es/Select/Select.module.css +23 -23
  161. package/es/Select/SelectWithAvatar.js +19 -4
  162. package/es/Select/SelectWithIcon.js +48 -6
  163. package/es/Select/__tests__/Select.spec.js +6 -8
  164. package/es/Select/props/propTypes.js +1 -0
  165. package/es/Stencils/Stencils.js +3 -3
  166. package/es/Stencils/Stencils.module.css +11 -11
  167. package/es/Switch/Switch.js +6 -3
  168. package/es/Switch/Switch.module.css +23 -23
  169. package/es/Tab/Tab.js +4 -4
  170. package/es/Tab/Tab.module.css +14 -14
  171. package/es/Tab/TabContent.js +1 -0
  172. package/es/Tab/TabContentWrapper.js +2 -0
  173. package/es/Tab/TabWrapper.js +5 -2
  174. package/es/Tab/Tabs.js +56 -8
  175. package/es/Tab/Tabs.module.css +24 -42
  176. package/es/Tab/__tests__/Tab.spec.js +1 -3
  177. package/es/Tab/__tests__/TabWrapper.spec.js +1 -0
  178. package/es/Tag/Tag.js +7 -3
  179. package/es/Tag/Tag.module.css +25 -25
  180. package/es/TextBox/TextBox.js +16 -3
  181. package/es/TextBox/TextBox.module.css +9 -9
  182. package/es/TextBox/__tests__/TextBox.spec.js +1 -4
  183. package/es/TextBoxIcon/TextBoxIcon.js +9 -2
  184. package/es/TextBoxIcon/TextBoxIcon.module.css +7 -7
  185. package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +2 -7
  186. package/es/Textarea/Textarea.js +13 -3
  187. package/es/Textarea/Textarea.module.css +21 -21
  188. package/es/Textarea/__tests__/Textarea.spec.js +2 -2
  189. package/es/Tooltip/Tooltip.js +60 -15
  190. package/es/Tooltip/Tooltip.module.css +5 -5
  191. package/es/Tooltip/__tests__/Tooltip.spec.js +5 -0
  192. package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -2
  193. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +7 -5
  194. package/es/common/animation.module.css +8 -8
  195. package/es/common/avatarsizes.module.css +16 -16
  196. package/es/common/basicReset.module.css +3 -3
  197. package/es/common/common.module.css +24 -24
  198. package/es/common/customscroll.module.css +2 -2
  199. package/es/deprecated/AdvancedMultiSelect.module.css +18 -18
  200. package/es/deprecated/PortalLayer/PortalLayer.js +25 -20
  201. package/es/semantic/Button/Button.js +4 -2
  202. package/es/semantic/Button/semanticButton.module.css +1 -1
  203. package/es/utils/Common.js +58 -9
  204. package/es/utils/ContextOptimizer.js +4 -5
  205. package/es/utils/__tests__/debounce.spec.js +2 -2
  206. package/es/utils/constructFullName.js +2 -0
  207. package/es/utils/css/compileClassNames.js +5 -0
  208. package/es/utils/css/mergeStyle.js +7 -6
  209. package/es/utils/css/utils.js +1 -0
  210. package/es/utils/datetime/GMTZones.js +48 -0
  211. package/es/utils/datetime/common.js +31 -7
  212. package/es/utils/debounce.js +5 -1
  213. package/es/utils/dropDownUtils.js +68 -11
  214. package/es/utils/getInitial.js +4 -0
  215. package/es/utils/shallowEqual.js +6 -0
  216. package/lib/Accordion/Accordion.js +43 -18
  217. package/lib/Accordion/AccordionItem.js +41 -18
  218. package/lib/Accordion/__tests__/Accordion.spec.js +3 -0
  219. package/lib/Accordion/index.js +3 -0
  220. package/lib/Accordion/props/propTypes.js +3 -0
  221. package/lib/Animation/Animation.js +38 -18
  222. package/lib/Animation/__tests__/Animation.spec.js +11 -7
  223. package/lib/Animation/props/propTypes.js +3 -0
  224. package/lib/AppContainer/AppContainer.js +66 -26
  225. package/lib/AppContainer/AppContainer.module.css +2 -2
  226. package/lib/AppContainer/props/defaultProps.js +2 -1
  227. package/lib/AppContainer/props/propTypes.js +4 -0
  228. package/lib/Avatar/Avatar.js +81 -38
  229. package/lib/Avatar/Avatar.module.css +18 -18
  230. package/lib/Avatar/__tests__/Avatar.spec.js +44 -0
  231. package/lib/Avatar/props/propTypes.js +3 -0
  232. package/lib/AvatarTeam/AvatarTeam.js +53 -30
  233. package/lib/AvatarTeam/AvatarTeam.module.css +35 -35
  234. package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +13 -0
  235. package/lib/AvatarTeam/props/propTypes.js +3 -0
  236. package/lib/Button/Button.js +32 -20
  237. package/lib/Button/css/Button.module.css +70 -70
  238. package/lib/Button/css/cssJSLogic.js +18 -17
  239. package/lib/Button/index.js +3 -0
  240. package/lib/Button/props/defaultProps.js +2 -0
  241. package/lib/Button/props/propTypes.js +3 -0
  242. package/lib/Buttongroup/Buttongroup.js +33 -12
  243. package/lib/Buttongroup/Buttongroup.module.css +14 -15
  244. package/lib/Buttongroup/__test__/Buttongroup.spec.js +10 -0
  245. package/lib/Buttongroup/props/propTypes.js +3 -0
  246. package/lib/Card/Card.js +102 -46
  247. package/lib/Card/__tests__/Card.spec.js +10 -1
  248. package/lib/Card/index.js +4 -0
  249. package/lib/Card/props/propTypes.js +3 -0
  250. package/lib/CheckBox/CheckBox.js +71 -47
  251. package/lib/CheckBox/CheckBox.module.css +15 -15
  252. package/lib/CheckBox/__tests__/CheckBox.spec.js +3 -0
  253. package/lib/CheckBox/props/propTypes.js +3 -0
  254. package/lib/DateTime/CalendarView.js +83 -42
  255. package/lib/DateTime/DateTime.js +287 -160
  256. package/lib/DateTime/DateTime.module.css +39 -39
  257. package/lib/DateTime/DateTimePopupFooter.js +31 -8
  258. package/lib/DateTime/DateTimePopupHeader.js +48 -17
  259. package/lib/DateTime/DateWidget.js +354 -250
  260. package/lib/DateTime/DateWidget.module.css +5 -5
  261. package/lib/DateTime/DaysRow.js +27 -5
  262. package/lib/DateTime/Time.js +73 -32
  263. package/lib/DateTime/YearView.js +77 -28
  264. package/lib/DateTime/YearView.module.css +15 -15
  265. package/lib/DateTime/__tests__/CalendarView.spec.js +13 -5
  266. package/lib/DateTime/__tests__/DateTime.spec.js +51 -37
  267. package/lib/DateTime/__tests__/DateWidget.spec.js +10 -8
  268. package/lib/DateTime/common.js +6 -0
  269. package/lib/DateTime/constants.js +1 -0
  270. package/lib/DateTime/dateFormatUtils/dateFormat.js +184 -122
  271. package/lib/DateTime/dateFormatUtils/dateFormats.js +0 -1
  272. package/lib/DateTime/dateFormatUtils/dayChange.js +14 -7
  273. package/lib/DateTime/dateFormatUtils/index.js +74 -16
  274. package/lib/DateTime/dateFormatUtils/monthChange.js +19 -9
  275. package/lib/DateTime/dateFormatUtils/timeChange.js +54 -22
  276. package/lib/DateTime/dateFormatUtils/yearChange.js +22 -11
  277. package/lib/DateTime/index.js +2 -0
  278. package/lib/DateTime/objectUtils.js +24 -20
  279. package/lib/DateTime/props/defaultProps.js +2 -1
  280. package/lib/DateTime/props/propTypes.js +11 -1
  281. package/lib/DateTime/typeChecker.js +4 -0
  282. package/lib/DateTime/validator.js +73 -10
  283. package/lib/DropBox/DropBox.js +36 -12
  284. package/lib/DropBox/DropBoxElement/DropBoxElement.js +68 -42
  285. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +85 -79
  286. package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +43 -34
  287. package/lib/DropBox/DropBoxElement/props/propTypes.js +4 -1
  288. package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +14 -9
  289. package/lib/DropBox/__tests__/DropBox.spec.js +8 -4
  290. package/lib/DropBox/css/DropBox.module.css +6 -6
  291. package/lib/DropBox/css/cssJSLogic.js +3 -1
  292. package/lib/DropBox/props/defaultProps.js +8 -4
  293. package/lib/DropBox/props/propTypes.js +10 -4
  294. package/lib/DropDown/DropDown.js +54 -9
  295. package/lib/DropDown/DropDown.module.css +2 -2
  296. package/lib/DropDown/DropDownHeading.js +40 -20
  297. package/lib/DropDown/DropDownHeading.module.css +6 -6
  298. package/lib/DropDown/DropDownItem.js +44 -21
  299. package/lib/DropDown/DropDownItem.module.css +12 -12
  300. package/lib/DropDown/DropDownSearch.js +40 -17
  301. package/lib/DropDown/DropDownSearch.module.css +3 -3
  302. package/lib/DropDown/DropDownSeparator.js +24 -4
  303. package/lib/DropDown/DropDownSeparator.module.css +2 -2
  304. package/lib/DropDown/__tests__/DropDown.spec.js +15 -9
  305. package/lib/DropDown/__tests__/DropDownItem.spec.js +9 -4
  306. package/lib/DropDown/__tests__/DropDownSearch.spec.js +3 -0
  307. package/lib/DropDown/index.js +9 -0
  308. package/lib/DropDown/props/propTypes.js +6 -4
  309. package/lib/Heading/Heading.js +39 -16
  310. package/lib/Heading/Heading.module.css +2 -2
  311. package/lib/Heading/props/propTypes.js +3 -0
  312. package/lib/Label/Label.js +40 -19
  313. package/lib/Label/Label.module.css +5 -5
  314. package/lib/Label/__tests__/Label.spec.js +14 -1
  315. package/lib/Label/props/propTypes.js +3 -0
  316. package/lib/Layout/Box.js +39 -15
  317. package/lib/Layout/Container.js +37 -14
  318. package/lib/Layout/Layout.module.css +15 -15
  319. package/lib/Layout/__tests__/Box.spec.js +65 -49
  320. package/lib/Layout/__tests__/Container.spec.js +67 -50
  321. package/lib/Layout/index.js +3 -0
  322. package/lib/Layout/props/defaultProps.js +2 -0
  323. package/lib/Layout/props/propTypes.js +5 -0
  324. package/lib/Layout/utils.js +15 -1
  325. package/lib/ListItem/ListContainer.js +48 -27
  326. package/lib/ListItem/ListItem.js +69 -45
  327. package/lib/ListItem/ListItem.module.css +38 -38
  328. package/lib/ListItem/ListItemWithAvatar.js +75 -48
  329. package/lib/ListItem/ListItemWithCheckBox.js +64 -39
  330. package/lib/ListItem/ListItemWithIcon.js +68 -44
  331. package/lib/ListItem/ListItemWithRadio.js +65 -41
  332. package/lib/ListItem/index.js +7 -0
  333. package/lib/ListItem/props/propTypes.js +6 -4
  334. package/lib/Modal/Modal.js +45 -10
  335. package/lib/Modal/props/propTypes.js +3 -0
  336. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +295 -166
  337. package/lib/MultiSelect/AdvancedMultiSelect.js +203 -125
  338. package/lib/MultiSelect/EmptyState.js +49 -24
  339. package/lib/MultiSelect/MultiSelect.js +324 -206
  340. package/lib/MultiSelect/MultiSelect.module.css +31 -31
  341. package/lib/MultiSelect/MultiSelectHeader.js +30 -8
  342. package/lib/MultiSelect/MultiSelectWithAvatar.js +106 -63
  343. package/lib/MultiSelect/SelectedOptions.js +43 -17
  344. package/lib/MultiSelect/SelectedOptions.module.css +5 -5
  345. package/lib/MultiSelect/Suggestions.js +64 -32
  346. package/lib/MultiSelect/__tests__/MultiSelect.spec.js +86 -75
  347. package/lib/MultiSelect/index.js +5 -0
  348. package/lib/MultiSelect/props/defaultProps.js +2 -0
  349. package/lib/MultiSelect/props/propTypes.js +5 -0
  350. package/lib/PopOver/PopOver.js +95 -49
  351. package/lib/PopOver/__tests__/PopOver.spec.js +4 -1
  352. package/lib/PopOver/index.js +4 -0
  353. package/lib/PopOver/props/propTypes.js +3 -0
  354. package/lib/Popup/Popup.js +158 -84
  355. package/lib/Popup/__tests__/Popup.spec.js +43 -8
  356. package/lib/Popup/viewPort.js +28 -14
  357. package/lib/Provider/AvatarSize.js +4 -0
  358. package/lib/Provider/Config.js +2 -0
  359. package/lib/Provider/CssProvider.js +4 -0
  360. package/lib/Provider/IdProvider.js +17 -6
  361. package/lib/Provider/LibraryContext.js +35 -15
  362. package/lib/Provider/LibraryContextInit.js +4 -0
  363. package/lib/Provider/NumberGenerator/NumberGenerator.js +44 -15
  364. package/lib/Provider/ZindexProvider.js +15 -3
  365. package/lib/Provider/index.js +5 -0
  366. package/lib/Radio/Radio.js +61 -38
  367. package/lib/Radio/Radio.module.css +9 -9
  368. package/lib/Radio/__tests__/Radiospec.js +9 -5
  369. package/lib/Radio/props/propTypes.js +3 -0
  370. package/lib/Responsive/CustomResponsive.js +73 -29
  371. package/lib/Responsive/RefWrapper.js +17 -11
  372. package/lib/Responsive/ResizeComponent.js +62 -36
  373. package/lib/Responsive/ResizeObserver.js +24 -10
  374. package/lib/Responsive/Responsive.js +80 -30
  375. package/lib/Responsive/index.js +4 -0
  376. package/lib/Responsive/props/propTypes.js +3 -0
  377. package/lib/Responsive/sizeObservers.js +53 -17
  378. package/lib/Responsive/utils/index.js +11 -3
  379. package/lib/Responsive/utils/shallowCompare.js +11 -2
  380. package/lib/Responsive/windowResizeObserver.js +8 -0
  381. package/lib/ResponsiveDropBox/ResponsiveDropBox.js +45 -17
  382. package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
  383. package/lib/ResponsiveDropBox/props/propTypes.js +3 -0
  384. package/lib/Ribbon/Ribbon.js +34 -13
  385. package/lib/Ribbon/Ribbon.module.css +46 -48
  386. package/lib/Ribbon/__tests__/Ribbon.spec.js +22 -0
  387. package/lib/Ribbon/props/propTypes.js +3 -0
  388. package/lib/RippleEffect/RippleEffect.js +18 -10
  389. package/lib/RippleEffect/props/propTypes.js +3 -0
  390. package/lib/Select/GroupSelect.js +230 -130
  391. package/lib/Select/Select.js +292 -210
  392. package/lib/Select/Select.module.css +23 -23
  393. package/lib/Select/SelectWithAvatar.js +104 -56
  394. package/lib/Select/SelectWithIcon.js +134 -77
  395. package/lib/Select/__tests__/Select.spec.js +133 -91
  396. package/lib/Select/index.js +5 -0
  397. package/lib/Select/props/defaultProps.js +5 -4
  398. package/lib/Select/props/propTypes.js +4 -0
  399. package/lib/Stencils/Stencils.js +29 -10
  400. package/lib/Stencils/Stencils.module.css +11 -11
  401. package/lib/Stencils/__tests__/Stencils.spec.js +12 -0
  402. package/lib/Stencils/props/propTypes.js +3 -0
  403. package/lib/Switch/Switch.js +58 -34
  404. package/lib/Switch/Switch.module.css +23 -23
  405. package/lib/Switch/props/propTypes.js +3 -0
  406. package/lib/Tab/Tab.js +40 -27
  407. package/lib/Tab/Tab.module.css +14 -14
  408. package/lib/Tab/TabContent.js +12 -5
  409. package/lib/Tab/TabContentWrapper.js +13 -6
  410. package/lib/Tab/TabWrapper.js +37 -19
  411. package/lib/Tab/Tabs.js +173 -92
  412. package/lib/Tab/Tabs.module.css +24 -42
  413. package/lib/Tab/__tests__/Tab.spec.js +67 -58
  414. package/lib/Tab/__tests__/TabContent.spec.js +10 -6
  415. package/lib/Tab/__tests__/TabContentWrapper.spec.js +28 -20
  416. package/lib/Tab/__tests__/TabWrapper.spec.js +12 -0
  417. package/lib/Tab/__tests__/Tabs.spec.js +53 -39
  418. package/lib/Tab/index.js +6 -0
  419. package/lib/Tab/props/propTypes.js +3 -0
  420. package/lib/Tag/Tag.js +73 -43
  421. package/lib/Tag/Tag.module.css +25 -25
  422. package/lib/Tag/__tests__/Tag.spec.js +14 -8
  423. package/lib/Tag/props/propTypes.js +3 -0
  424. package/lib/TextBox/TextBox.js +86 -59
  425. package/lib/TextBox/TextBox.module.css +9 -9
  426. package/lib/TextBox/__tests__/TextBox.spec.js +14 -4
  427. package/lib/TextBox/props/propTypes.js +6 -4
  428. package/lib/TextBoxIcon/TextBoxIcon.js +79 -52
  429. package/lib/TextBoxIcon/TextBoxIcon.module.css +7 -7
  430. package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +14 -5
  431. package/lib/TextBoxIcon/props/propTypes.js +3 -0
  432. package/lib/Textarea/Textarea.js +55 -29
  433. package/lib/Textarea/Textarea.module.css +21 -21
  434. package/lib/Textarea/__tests__/Textarea.spec.js +14 -2
  435. package/lib/Textarea/props/propTypes.js +3 -0
  436. package/lib/Tooltip/Tooltip.js +96 -32
  437. package/lib/Tooltip/Tooltip.module.css +5 -5
  438. package/lib/Tooltip/__tests__/Tooltip.spec.js +24 -3
  439. package/lib/Tooltip/props/propTypes.js +3 -0
  440. package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +40 -16
  441. package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +3 -0
  442. package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +53 -25
  443. package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +3 -0
  444. package/lib/VelocityAnimation/index.js +3 -0
  445. package/lib/common/animation.module.css +8 -8
  446. package/lib/common/avatarsizes.module.css +16 -16
  447. package/lib/common/basicReset.module.css +3 -3
  448. package/lib/common/common.module.css +24 -24
  449. package/lib/common/customscroll.module.css +2 -2
  450. package/lib/css.js +40 -0
  451. package/lib/deprecated/AdvancedMultiSelect.module.css +18 -18
  452. package/lib/deprecated/PortalLayer/PortalLayer.js +46 -23
  453. package/lib/deprecated/PortalLayer/props/propTypes.js +3 -0
  454. package/lib/index.js +57 -0
  455. package/lib/semantic/Button/Button.js +43 -22
  456. package/lib/semantic/Button/props/propTypes.js +3 -0
  457. package/lib/semantic/Button/semanticButton.module.css +1 -1
  458. package/lib/semantic/index.js +2 -0
  459. package/lib/utils/Common.js +117 -19
  460. package/lib/utils/ContextOptimizer.js +16 -10
  461. package/lib/utils/__tests__/constructFullName.spec.js +1 -0
  462. package/lib/utils/__tests__/debounce.spec.js +3 -2
  463. package/lib/utils/__tests__/getInitial.spec.js +1 -0
  464. package/lib/utils/constructFullName.js +13 -4
  465. package/lib/utils/css/compileClassNames.js +6 -0
  466. package/lib/utils/css/mergeStyle.js +10 -7
  467. package/lib/utils/css/utils.js +8 -0
  468. package/lib/utils/datetime/GMTZones.js +55 -0
  469. package/lib/utils/datetime/common.js +52 -7
  470. package/lib/utils/debounce.js +6 -1
  471. package/lib/utils/dropDownUtils.js +175 -59
  472. package/lib/utils/dummyFunction.js +2 -0
  473. package/lib/utils/getHTMLFontSize.js +1 -0
  474. package/lib/utils/getInitial.js +6 -0
  475. package/lib/utils/index.js +4 -0
  476. package/lib/utils/scrollTo.js +2 -0
  477. package/lib/utils/shallowEqual.js +8 -0
  478. package/package.json +18 -27
@@ -26,30 +26,37 @@ export default function DropBoxElement(props) {
26
26
  tabIndex,
27
27
  palette,
28
28
  subContainerRef,
29
- customStyle
29
+ customStyle,
30
+ animationStyle
30
31
  } = props;
31
32
  let isAbsolute = isAbsolutePositioningNeeded;
33
+
32
34
  const FireOnAnimationEnd = () => {
33
- let element = subContainerRef && subContainerRef.current.classList;
34
- (isAnimate ? style.fadeIn : style.bounce).split(' ').map(rmStyle => {
35
- if (element && element.contains(rmStyle)) {
36
- element.remove(rmStyle);
35
+ let eleClassList = subContainerRef && subContainerRef.current.classList;
36
+ let animationStyles = animationStyle == 'default' ? style.fadeInScale : style[animationStyle];
37
+ animationStyles.split(' ').map(rmStyle => {
38
+ if (eleClassList && eleClassList.contains(rmStyle)) {
39
+ eleClassList.remove(rmStyle);
37
40
  }
38
41
  });
39
42
  };
43
+
40
44
  const getRef = ele => {
41
45
  const {
42
46
  getRef,
43
47
  forwardRef
44
48
  } = props;
45
49
  getRef && getRef(ele);
50
+
46
51
  if (forwardRef) {
47
52
  forwardRef.current = ele;
48
53
  }
49
54
  };
55
+
50
56
  if (!isAbsolutePositioningNeeded && size === 'default' && !isActive) {
51
57
  isAbsolute = true;
52
58
  }
59
+
53
60
  const {
54
61
  role,
55
62
  ariaMultiselectable,
@@ -57,12 +64,14 @@ export default function DropBoxElement(props) {
57
64
  } = a11y;
58
65
  boxPosition = boxPosition && boxPosition != 'undefined' ? boxPosition : 'bottomCenter';
59
66
  const boxDirection = positionMapping[boxPosition].direction;
67
+
60
68
  if (isAbsolute) {
61
69
  arrowPosition = arrowPosition ? arrowPosition : positionMapping[boxPosition].arrowPosition;
62
70
  boxPosition = positionMapping[boxPosition].positionStyle;
63
71
  } else {
64
72
  arrowPosition = positionMapping[boxPosition].arrowPosition;
65
73
  }
74
+
66
75
  const {
67
76
  arrowstyle,
68
77
  boxstyle,
@@ -87,6 +96,7 @@ export default function DropBoxElement(props) {
87
96
  return /*#__PURE__*/React.createElement("div", {
88
97
  className: boxClassName,
89
98
  "data-id": `${dataId}`,
99
+ "data-test-id": `${dataId}`,
90
100
  "data-selector-id": dataSelectorId,
91
101
  ref: getRef,
92
102
  style: inlineStyle,
@@ -97,12 +107,13 @@ export default function DropBoxElement(props) {
97
107
  "aria-multiselectable": ariaMultiselectable,
98
108
  "aria-labelledby": ariaLabelledby,
99
109
  tabIndex: tabIndex,
100
- onAnimationEnd: FireOnAnimationEnd
110
+ onAnimationEnd: isAnimate && FireOnAnimationEnd
101
111
  }, /*#__PURE__*/React.createElement("div", {
102
112
  tabIndex: "-1",
103
113
  className: `${subContainerClass} ${style[`${palette}Palette`]}`,
104
114
  onClick: onClick,
105
115
  "data-id": `${dataId}_subcontainer`,
116
+ "data-test-id": `${dataId}_subcontainer`,
106
117
  "data-selector-id": `${dataSelectorId}_subcontainer`,
107
118
  ref: subContainerRef
108
119
  }, isModel ? /*#__PURE__*/React.createElement("div", {
@@ -111,6 +122,7 @@ export default function DropBoxElement(props) {
111
122
  className: style[arrowPosition],
112
123
  style: arrowstyle,
113
124
  "data-id": `${dataId}_arrow`,
125
+ "data-test-id": `${dataId}_arrow`,
114
126
  "data-selector-id": `${dataSelectorId}_arrow`
115
127
  }, /*#__PURE__*/React.createElement("div", {
116
128
  className: style.arrowShape
@@ -28,48 +28,48 @@
28
28
 
29
29
  .mobRadius {
30
30
  --dropbox_border_radius: 30px 30px 0 0;
31
- --dropbox_padding: 10px 0 0 0;
31
+ --dropbox_padding: var(--zd_size10) 0 0 0;
32
32
  }
33
33
 
34
34
  /* sizes */
35
35
  .mini {
36
- width: 140px;
36
+ width: var(--zd_size140) ;
37
37
  }
38
38
 
39
39
  .xmini {
40
- width: 160px;
40
+ width: var(--zd_size160) ;
41
41
  }
42
42
 
43
43
  .xsmall {
44
- width: 180px;
44
+ width: var(--zd_size180) ;
45
45
  }
46
46
 
47
47
  .small {
48
- width: 200px;
48
+ width: var(--zd_size200) ;
49
49
  }
50
50
 
51
51
  .medium {
52
- width: 220px;
52
+ width: var(--zd_size220) ;
53
53
  }
54
54
 
55
55
  .large {
56
- width: 260px;
56
+ width: var(--zd_size260) ;
57
57
  }
58
58
 
59
59
  .mlarge {
60
- width: 280px;
60
+ width: var(--zd_size280) ;
61
61
  }
62
62
 
63
63
  .xlarge {
64
- width: 304px;
64
+ width: var(--zd_size304) ;
65
65
  }
66
66
 
67
67
  .xxlarge {
68
- width: 364px;
68
+ width: var(--zd_size364) ;
69
69
  }
70
70
 
71
71
  .default {
72
- width: 100%;
72
+ width: 100% ;
73
73
  }
74
74
 
75
75
  /* shadow */
@@ -95,120 +95,120 @@
95
95
 
96
96
  /* box direction styles */
97
97
  .topStart {
98
- bottom: 100%;
99
- right: 0;
98
+ bottom: 100% ;
99
+ right: 0 ;
100
100
  }
101
101
 
102
102
  .topEnd {
103
- bottom: 100%;
104
- left: 0;
103
+ bottom: 100% ;
104
+ left: 0 ;
105
105
  }
106
106
 
107
107
  .topMid {
108
- bottom: 100%;
109
- left: 50%;
108
+ bottom: 100% ;
109
+ left: 50% ;
110
110
  transform: translateX(-50%);
111
111
  }
112
112
 
113
113
  .bottomStart {
114
- top: 100%;
115
- right: 0;
114
+ top: 100% ;
115
+ right: 0 ;
116
116
  }
117
117
 
118
118
  .bottomEnd {
119
- top: 100%;
120
- left: 0;
119
+ top: 100% ;
120
+ left: 0 ;
121
121
  }
122
122
 
123
123
  .bottomMid {
124
- top: 100%;
125
- left: 50%;
124
+ top: 100% ;
125
+ left: 50% ;
126
126
  transform: translateX(-50%);
127
127
  }
128
128
 
129
129
  .rightStart {
130
- left: 100%;
131
- bottom: 0;
130
+ left: 100% ;
131
+ bottom: 0 ;
132
132
  }
133
133
 
134
134
  .rightEnd {
135
- left: 100%;
136
- top: 0;
135
+ left: 100% ;
136
+ top: 0 ;
137
137
  }
138
138
 
139
139
  .rightMid {
140
- left: 100%;
141
- top: 50%;
140
+ left: 100% ;
141
+ top: 50% ;
142
142
  transform: translateY(-50%);
143
143
  }
144
144
 
145
145
  .leftStart {
146
- right: 100%;
147
- bottom: 0;
146
+ right: 100% ;
147
+ bottom: 0 ;
148
148
  }
149
149
 
150
150
  .leftEnd {
151
- right: 100%;
152
- top: 0;
151
+ right: 100% ;
152
+ top: 0 ;
153
153
  }
154
154
 
155
155
  .leftMid {
156
- right: 100%;
157
- top: 50%;
156
+ right: 100% ;
157
+ top: 50% ;
158
158
  transform: translateY(-50%);
159
159
  }
160
160
 
161
161
  /* space for arrow */
162
162
  .arrowtop {
163
- padding-bottom: 10px;
163
+ padding-bottom: var(--zd_size10) ;
164
164
  }
165
165
 
166
166
  .arrowright {
167
- padding-left: 10px;
167
+ padding-left: var(--zd_size10) ;
168
168
  }
169
169
 
170
170
  .arrowleft {
171
- padding-right: 10px;
171
+ padding-right: var(--zd_size10) ;
172
172
  }
173
173
 
174
174
  .arrowbottom {
175
- padding-top: 10px;
175
+ padding-top: var(--zd_size10) ;
176
176
  }
177
177
 
178
178
  /* space from target */
179
179
  .paddingSpace_top {
180
- padding-bottom: 5px;
180
+ padding-bottom: var(--zd_size5) ;
181
181
  }
182
182
 
183
183
  .paddingSpace_right {
184
- padding-left: 5px;
184
+ padding-left: var(--zd_size5) ;
185
185
  }
186
186
 
187
187
  .paddingSpace_left {
188
- padding-right: 5px;
188
+ padding-right: var(--zd_size5) ;
189
189
  }
190
190
 
191
191
  .paddingSpace_bottom {
192
- padding-top: 5px;
192
+ padding-top: var(--zd_size5) ;
193
193
  }
194
194
 
195
195
  .arrow {
196
196
  position: absolute;
197
- height: 34px;
198
- width: 34px;
199
- clip: rect(3px,
200
- 29px,
201
- 17px,
202
- 8px);
203
- padding: 4px;
197
+ height: var(--zd_size34) ;
198
+ width: var(--zd_size34) ;
199
+ clip: rect(var(--zd_size3),
200
+ undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined var(--zd_size29),
201
+ undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined var(--zd_size17),
202
+ undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined var(--zd_size8)) ;
203
+ padding: var(--zd_size4) ;
204
204
  display: flex;
205
205
  align-items: center;
206
206
  justify-content: center;
207
207
  }
208
208
 
209
209
  .arrowShape {
210
- height: 10px;
211
- width: 10px;
210
+ height: var(--zd_size10) ;
211
+ width: var(--zd_size10) ;
212
212
  box-shadow: 1px -1px 2px 0 var(--dropbox_arrow_box_shadow_color);
213
213
  background-color: var(--dropbox_bg_color);
214
214
  -webkit-transform: rotateZ(-45deg);
@@ -225,20 +225,20 @@
225
225
  .top .start,
226
226
  .top .end,
227
227
  .top .mid {
228
- bottom: -17px;
228
+ bottom: calc( var(--zd_size17) * -1 ) ;
229
229
  }
230
230
 
231
231
  .top .start {
232
- left: 28px;
232
+ left: var(--zd_size28) ;
233
233
  }
234
234
 
235
235
  .top .end {
236
- right: 28px;
236
+ right: var(--zd_size28) ;
237
237
  transform: rotate(180deg) translateX(-50%);
238
238
  }
239
239
 
240
240
  .top .mid {
241
- left: 50%;
241
+ left: 50% ;
242
242
  }
243
243
 
244
244
  .top .start,
@@ -249,19 +249,19 @@
249
249
  .bottom .start,
250
250
  .bottom .end,
251
251
  .bottom .mid {
252
- top: -17px;
252
+ top: calc( var(--zd_size17) * -1 ) ;
253
253
  }
254
254
 
255
255
  .bottom .start {
256
- left: 28px;
256
+ left: var(--zd_size28) ;
257
257
  }
258
258
 
259
259
  .bottom .mid {
260
- left: 50%;
260
+ left: 50% ;
261
261
  }
262
262
 
263
263
  .bottom .end {
264
- right: 28px;
264
+ right: var(--zd_size28) ;
265
265
  transform: translateX(50%);
266
266
  }
267
267
 
@@ -273,20 +273,20 @@
273
273
  .left .start,
274
274
  .left .mid,
275
275
  .left .end {
276
- right: -17px;
276
+ right: calc( var(--zd_size17) * -1 ) ;
277
277
  }
278
278
 
279
279
  .left .start {
280
- top: 28px;
280
+ top: var(--zd_size28) ;
281
281
  }
282
282
 
283
283
  .left .end {
284
284
  transform: rotate(90deg) translateX(50%);
285
- bottom: 28px;
285
+ bottom: var(--zd_size28) ;
286
286
  }
287
287
 
288
288
  .left .mid {
289
- top: 50%;
289
+ top: 50% ;
290
290
  }
291
291
 
292
292
  .left .start,
@@ -297,15 +297,15 @@
297
297
  .right .start,
298
298
  .right .mid,
299
299
  .right .end {
300
- left: -17px;
300
+ left: calc( var(--zd_size17) * -1 ) ;
301
301
  }
302
302
 
303
303
  .right .start {
304
- top: 28px;
304
+ top: var(--zd_size28) ;
305
305
  }
306
306
 
307
307
  .right .mid {
308
- top: 50%;
308
+ top: 50% ;
309
309
  }
310
310
 
311
311
  .right .start,
@@ -314,7 +314,7 @@
314
314
  }
315
315
 
316
316
  .right .end {
317
- bottom: 28px;
317
+ bottom: var(--zd_size28) ;
318
318
  transform: rotate(-90deg) translateX(-50%);
319
319
  }
320
320
  .hidden {
@@ -336,20 +336,26 @@
336
336
  animation-duration: var(--zd_transition2);
337
337
  }
338
338
 
339
- .fadeIn {
339
+ .fadeInScale {
340
340
  composes: animationBasic;
341
341
  composes: fadeInScale modeForward from '../../../common/animation.module.css';
342
342
  }
343
343
 
344
+ .fadeIn {
345
+ composes: animationBasic;
346
+ composes: fadeIn modeForward from '../../../common/animation.module.css';
347
+ }
348
+ .scaleIn {
349
+ composes: animationBasic;
350
+ composes: scaleIn from '../../../common/animation.module.css';
351
+ }
344
352
  .bounce {
345
353
  composes: animationBasic;
346
354
  }
347
-
348
355
  [dir=ltr] .bounce {
349
356
  animation-name: animation;
350
357
  animation-timing-function: cubic-bezier(0.4, 1, 0.65, 1.1);
351
358
  }
352
-
353
359
  [dir=rtl] .bounce {
354
360
  animation-name: animation;
355
361
  animation-timing-function: cubic-bezier(0.4, 1, 0.65, 1.1);
@@ -397,31 +403,31 @@
397
403
 
398
404
  .responsive {
399
405
  position: absolute;
400
- bottom: 0;
401
- width: 100%;
402
- max-height: 90%;
406
+ bottom: 0 ;
407
+ width: 100% ;
408
+ max-height: 90% ;
403
409
  }
404
410
 
405
411
  [dir=ltr] .responsive {
406
- left: 0;
412
+ left: 0 ;
407
413
  }
408
414
 
409
415
  [dir=rtl] .responsive {
410
- right: 0;
416
+ right: 0 ;
411
417
  }
412
418
 
413
419
  .closeBar {
414
420
  /* Variable:Ignore */
415
421
  height: 6px;
416
- width: 20%;
422
+ width: 20% ;
417
423
  border-radius: 5px;
418
424
  background-color: var(--dropbox_mob_close_bg_color);
419
425
  cursor: pointer;
420
- margin: 0 auto 10px;
426
+ margin: 0 auto var(--zd_size10) ;
421
427
  }
422
428
 
423
429
  .boxPadding {
424
- --dropbox_padding: 10px 0;
430
+ --dropbox_padding: var(--zd_size10) 0;
425
431
  }
426
432
 
427
433
  .darkPalette {
@@ -40,8 +40,7 @@ export default function cssJSLogic(_ref) {
40
40
  customDropBoxWrap = '',
41
41
  customMobileDropBoxWrap = ''
42
42
  } = customClass;
43
-
44
- // const {needBoxStyle,boxstyle} = useDropboxPosCalc(props)
43
+ const animationValue = animationStyle === 'default' ? 'fadeInScale' : animationStyle; // const {needBoxStyle,boxstyle} = useDropboxPosCalc(props)
45
44
 
46
45
  let boxClassName = compileClassNames({
47
46
  [style.main]: true,
@@ -66,21 +65,24 @@ export default function cssJSLogic(_ref) {
66
65
  [style[`${boxDirection}_shadow`]]: !isModel,
67
66
  [style.boxPadding]: !isModel && isBoxPaddingNeed,
68
67
  [style.radius]: !isModel && isRadius,
69
- [style.fadeIn]: !isModel && isAnimate && !isReducedMotion && isActive && animationStyle === 'default',
70
- [style.bounce]: !isModel && isAnimate && !isReducedMotion && isActive && animationStyle === 'bounce'
68
+ [style[animationValue]]: !isModel && isAnimate && !isReducedMotion && isActive && !!animationStyle
71
69
  });
72
70
  let inlineStyle = !isModel ? isAbsolute ? needBoxStyle && boxstyle : positionsOffset && positionsOffset[boxPosition] || {} : {};
71
+
73
72
  if (zIndexStyle) {
74
73
  inlineStyle = Object.assign({}, inlineStyle, zIndexStyle);
75
74
  }
75
+
76
76
  if (!isModel && !isAbsolute && size === 'default' && targetOffset && isActive) {
77
77
  inlineStyle = Object.assign({}, inlineStyle, {
78
78
  width: targetOffset.width
79
79
  });
80
80
  }
81
+
81
82
  if (customInlineStyle) {
82
83
  inlineStyle = Object.assign({}, inlineStyle, customInlineStyle);
83
84
  }
85
+
84
86
  return {
85
87
  boxClassName,
86
88
  subContainerClass,
@@ -1,6 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  export const DropBoxElementPropTypes = {
3
- animationStyle: PropTypes.oneOf(['default', 'bounce']),
3
+ animationStyle: PropTypes.oneOf(['default', 'bounce', 'fadeIn', 'scaleIn']),
4
4
  arrowBottom: PropTypes.number,
5
5
  arrowLeft: PropTypes.number,
6
6
  arrowPosition: PropTypes.oneOf(['start', 'mid', 'end']),
@@ -17,6 +17,7 @@ export default function useDropboxPosCalc(props) {
17
17
  let arrowstyle = {};
18
18
  const needBoxStyle = right || left || top || bottom;
19
19
  const needArrowStyle = arrowLeft || arrowRight || arrowTop || arrowBottom;
20
+
20
21
  if (needBoxStyle) {
21
22
  boxstyle = !isModel ? direction === 'rtl' ? {
22
23
  right: [remConvert(left)] + unit,
@@ -30,6 +31,7 @@ export default function useDropboxPosCalc(props) {
30
31
  bottom: [remConvert(bottom)] + unit
31
32
  } : {};
32
33
  }
34
+
33
35
  if (needArrowStyle) {
34
36
  arrowstyle = !isModel ? direction === 'rtl' ? {
35
37
  right: [remConvert(arrowLeft)] + unit,
@@ -43,6 +45,7 @@ export default function useDropboxPosCalc(props) {
43
45
  bottom: [remConvert(arrowBottom)] + unit
44
46
  } : {};
45
47
  }
48
+
46
49
  return {
47
50
  needBoxStyle,
48
51
  boxstyle,
@@ -58,7 +58,7 @@ describe('DropBox component', () => {
58
58
  isAnimate: true,
59
59
  isActive: true
60
60
  }));
61
- let x = TestUtils.scryRenderedDOMComponentsWithClass(renderedDOM, 'fadeIn');
61
+ let x = TestUtils.scryRenderedDOMComponentsWithClass(renderedDOM, 'fadeInScale');
62
62
  expect(x.length).toBe(1);
63
63
  });
64
64
  it('Should check render proper class name(isAnimate & isActive)', () => {
@@ -67,7 +67,7 @@ describe('DropBox component', () => {
67
67
  isAnimate: true,
68
68
  isActive: true
69
69
  }));
70
- let x = TestUtils.scryRenderedDOMComponentsWithClass(renderedDOM, 'fadeIn');
70
+ let x = TestUtils.scryRenderedDOMComponentsWithClass(renderedDOM, 'fadeInScale');
71
71
  expect(x.length).toBe(1);
72
72
  });
73
73
  it('Should check render proper class name(arrowPosition)', () => {
@@ -32,19 +32,19 @@
32
32
 
33
33
  .freezeLayer {
34
34
  position: absolute;
35
- top: 0;
36
- bottom: 0;
35
+ top: 0 ;
36
+ bottom: 0 ;
37
37
  composes: activateInDelay;
38
38
  }
39
39
 
40
40
  [dir=ltr] .freezeLayer {
41
- left: 0;
42
- right: 0;
41
+ left: 0 ;
42
+ right: 0 ;
43
43
  }
44
44
 
45
45
  [dir=rtl] .freezeLayer {
46
- right: 0;
47
- left: 0;
46
+ right: 0 ;
47
+ left: 0 ;
48
48
  }
49
49
 
50
50
  .freeze {
@@ -8,7 +8,6 @@ export const defaultProps = {
8
8
  needFocusScope: false,
9
9
  needAutoZindex: true
10
10
  };
11
- export const DropBoxDefaultProps = {
12
- ...DropBoxElementDefaultProps,
11
+ export const DropBoxDefaultProps = { ...DropBoxElementDefaultProps,
13
12
  ...defaultProps
14
13
  };
@@ -9,7 +9,6 @@ export const propTypes = {
9
9
  needFocusScope: PropTypes.bool,
10
10
  needAutoZindex: PropTypes.bool
11
11
  };
12
- export const DropBoxPropTypes = {
13
- ...DropBoxElementPropTypes,
12
+ export const DropBoxPropTypes = { ...DropBoxElementPropTypes,
14
13
  ...propTypes
15
14
  };
@@ -3,7 +3,6 @@ import { DropDown_propTypes, DropDownTarget_propTypes, DropDownContainer_propTyp
3
3
  import { DropDownItemContainer_defaultProps } from './props/defaultProps';
4
4
  import style from './DropDown.module.css';
5
5
  import PopOver, { PopOverTarget, PopOverContainer } from '../PopOver/PopOver';
6
-
7
6
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['dropdown', 'shadow', 'target', 'menu', 'header', 'headertext', 'list', 'padding', 'listHover', 'active', 'children', 'user', 'footer', 'separator', 'small', 'search', 'medium', 'heading'] }] */
8
7
 
9
8
  export default class DropDown extends React.Component {
@@ -13,10 +12,9 @@ export default class DropDown extends React.Component {
13
12
  } = this.props;
14
13
  return /*#__PURE__*/React.createElement(PopOver, this.props, /*#__PURE__*/React.createElement(PopOverTarget, null, children[0]), /*#__PURE__*/React.createElement(PopOverContainer, null, children[1]));
15
14
  }
16
- }
17
- DropDown.propTypes = DropDown_propTypes;
18
15
 
19
- // if (__DOCS__) {
16
+ }
17
+ DropDown.propTypes = DropDown_propTypes; // if (__DOCS__) {
20
18
  // DropDown.docs = {
21
19
  // componentGroup: 'Form Elements',
22
20
  // folderName: 'Style Guide'
@@ -30,6 +28,7 @@ export class DropDownTarget extends React.Component {
30
28
  } = this.props;
31
29
  return /*#__PURE__*/React.createElement("div", null, children);
32
30
  }
31
+
33
32
  }
34
33
  DropDownTarget.propTypes = DropDownTarget_propTypes;
35
34
  export class DropDownContainer extends React.Component {
@@ -39,6 +38,7 @@ export class DropDownContainer extends React.Component {
39
38
  } = this.props;
40
39
  return /*#__PURE__*/React.createElement("div", null, " ", children, " ");
41
40
  }
41
+
42
42
  }
43
43
  DropDownContainer.propTypes = DropDownContainer_propTypes;
44
44
  export class DropDownItemContainer extends React.Component {
@@ -47,18 +47,21 @@ export class DropDownItemContainer extends React.Component {
47
47
  this.getRef = this.getRef.bind(this);
48
48
  this.onScroll = this.onScroll.bind(this);
49
49
  }
50
+
50
51
  onScroll(e) {
51
52
  let {
52
53
  onScroll
53
54
  } = this.props;
54
55
  onScroll && onScroll(e);
55
56
  }
57
+
56
58
  getRef(ele) {
57
59
  let {
58
60
  getRef
59
61
  } = this.props;
60
62
  getRef && getRef(ele);
61
63
  }
64
+
62
65
  render() {
63
66
  let {
64
67
  children,
@@ -68,9 +71,11 @@ export class DropDownItemContainer extends React.Component {
68
71
  className: style.listGroup,
69
72
  onScroll: this.onScroll,
70
73
  ref: this.getRef,
71
- "data-id": dataId
74
+ "data-id": dataId,
75
+ "data-test-id": dataId
72
76
  }, children);
73
77
  }
78
+
74
79
  }
75
80
  DropDownItemContainer.propTypes = DropDownItemContainer_propTypes;
76
81
  DropDownItemContainer.defaultProps = DropDownItemContainer_defaultProps;
@@ -1,5 +1,5 @@
1
1
  .listGroup {
2
- max-height: 220px;
2
+ max-height: var(--zd_size220) ;
3
3
  composes: oflowy from '../common/common.module.css';
4
- margin: 8px 0 4px;
4
+ margin: var(--zd_size8) 0 var(--zd_size4) ;
5
5
  }