@zohodesk/components 1.0.0-temp-227 → 1.0.0-temp-228

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 (357) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +31 -20
  3. package/assets/Appearance/dark/mode/Component_v2_DarkMode.module.css +11 -0
  4. package/assets/Appearance/light/mode/Component_v2_LightMode.module.css +11 -0
  5. package/assets/Appearance/pureDark/mode/Component_v2_PureDarkMode.module.css +11 -0
  6. package/es/Accordion/Accordion.js +2 -2
  7. package/es/Accordion/AccordionItem.js +4 -4
  8. package/es/Accordion/__tests__/Accordion.spec.js +1 -1
  9. package/es/Accordion/__tests__/AccordionItem.spec.js +1 -1
  10. package/es/Accordion/index.js +2 -2
  11. package/es/Animation/Animation.js +3 -3
  12. package/es/Animation/__tests__/Animation.spec.js +1 -1
  13. package/es/Animation/utils.js +1 -1
  14. package/es/AppContainer/AppContainer.js +13 -14
  15. package/es/AppContainer/__tests__/AppContainer.spec.js +1 -1
  16. package/es/Avatar/Avatar.js +5 -5
  17. package/es/Avatar/__tests__/Avatar.spec.js +1 -1
  18. package/es/AvatarTeam/AvatarTeam.js +4 -4
  19. package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +1 -1
  20. package/es/AvatarTeam/props/propTypes.js +1 -1
  21. package/es/Button/Button.js +4 -4
  22. package/es/Button/__tests__/Button.spec.js +2 -135
  23. package/es/Button/index.js +2 -2
  24. package/es/Button/props/defaultProps.js +1 -1
  25. package/es/Buttongroup/Buttongroup.js +3 -3
  26. package/es/Buttongroup/__tests__/Buttongroup.spec.js +1 -1
  27. package/es/Card/Card.js +5 -5
  28. package/es/Card/__tests__/Card.spec.js +1 -1
  29. package/es/Card/index.js +4 -4
  30. package/es/CheckBox/CheckBox.js +6 -6
  31. package/es/CheckBox/__tests__/CheckBox.spec.js +1 -1
  32. package/es/DateTime/CalendarView.js +6 -6
  33. package/es/DateTime/DateTime.js +15 -15
  34. package/es/DateTime/DateTimePopupFooter.js +5 -5
  35. package/es/DateTime/DateTimePopupHeader.js +4 -4
  36. package/es/DateTime/DateWidget.js +17 -17
  37. package/es/DateTime/DaysRow.js +3 -3
  38. package/es/DateTime/Time.js +5 -5
  39. package/es/DateTime/YearView.js +6 -6
  40. package/es/DateTime/__tests__/CalendarView.spec.js +1 -1
  41. package/es/DateTime/__tests__/DateTime.spec.js +1 -1
  42. package/es/DateTime/__tests__/DateTimePopupFooter.spec.js +1 -1
  43. package/es/DateTime/__tests__/DateTimePopupHeader.spec.js +1 -1
  44. package/es/DateTime/__tests__/DateWidget.spec.js +1 -1
  45. package/es/DateTime/__tests__/DaysRow.spec.js +1 -1
  46. package/es/DateTime/__tests__/Time.spec.js +1 -1
  47. package/es/DateTime/__tests__/YearView.spec.js +3 -2
  48. package/es/DateTime/__tests__/__snapshots__/YearView.spec.js.snap +61 -0
  49. package/es/DateTime/dateFormatUtils/dateFormat.js +4 -4
  50. package/es/DateTime/dateFormatUtils/dayChange.js +2 -2
  51. package/es/DateTime/dateFormatUtils/index.js +3 -3
  52. package/es/DateTime/dateFormatUtils/monthChange.js +2 -2
  53. package/es/DateTime/dateFormatUtils/timeChange.js +2 -2
  54. package/es/DateTime/dateFormatUtils/yearChange.js +2 -2
  55. package/es/DateTime/index.js +1 -1
  56. package/es/DateTime/props/propTypes.js +1 -1
  57. package/es/DateTime/validator.js +2 -2
  58. package/es/DropBox/DropBox.js +9 -9
  59. package/es/DropBox/DropBoxElement/DropBoxElement.js +6 -6
  60. package/es/DropBox/DropBoxElement/__tests__/DropBoxElement.spec.js +1 -1
  61. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +1 -1
  62. package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +1 -1
  63. package/es/DropBox/__tests__/DropBox.spec.js +1 -1
  64. package/es/DropBox/css/cssJSLogic.js +1 -1
  65. package/es/DropBox/props/defaultProps.js +1 -1
  66. package/es/DropBox/props/propTypes.js +1 -1
  67. package/es/DropBox/utils/isMobilePopover.js +1 -1
  68. package/es/DropDown/DropDown.js +4 -4
  69. package/es/DropDown/DropDownHeading.js +3 -3
  70. package/es/DropDown/DropDownItem.js +3 -3
  71. package/es/DropDown/DropDownSearch.js +4 -4
  72. package/es/DropDown/DropDownSeparator.js +2 -2
  73. package/es/DropDown/__tests__/DropDown.spec.js +1 -1
  74. package/es/DropDown/__tests__/DropDownHeading.spec.js +1 -1
  75. package/es/DropDown/__tests__/DropDownItem.spec.js +1 -1
  76. package/es/DropDown/__tests__/DropDownSearch.spec.js +1 -1
  77. package/es/DropDown/__tests__/DropDownSeparator.spec.js +1 -1
  78. package/es/DropDown/index.js +7 -7
  79. package/es/DropDown/props/propTypes.js +1 -1
  80. package/es/Heading/Heading.js +4 -4
  81. package/es/Heading/__tests__/Heading.spec.js +1 -1
  82. package/es/Label/Label.js +4 -4
  83. package/es/Label/__tests__/Label.spec.js +1 -1
  84. package/es/Layout/Box.js +4 -4
  85. package/es/Layout/Container.js +4 -4
  86. package/es/Layout/__tests__/Box.spec.js +1 -1
  87. package/es/Layout/__tests__/Container.spec.js +1 -1
  88. package/es/Layout/index.js +2 -2
  89. package/es/ListItem/ListContainer.js +6 -6
  90. package/es/ListItem/ListItem.js +5 -5
  91. package/es/ListItem/ListItemWithAvatar.js +7 -7
  92. package/es/ListItem/ListItemWithCheckBox.js +6 -6
  93. package/es/ListItem/ListItemWithIcon.js +5 -5
  94. package/es/ListItem/ListItemWithRadio.js +6 -6
  95. package/es/ListItem/__tests__/ListContainer.spec.js +1 -1
  96. package/es/ListItem/__tests__/ListItem.spec.js +1 -1
  97. package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +1 -1
  98. package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +1 -1
  99. package/es/ListItem/__tests__/ListItemWithIcon.spec.js +1 -1
  100. package/es/ListItem/__tests__/ListItemWithRadio.spec.js +1 -1
  101. package/es/ListItem/index.js +6 -6
  102. package/es/ListItem/props/propTypes.js +2 -2
  103. package/es/Modal/Modal.js +3 -3
  104. package/es/Modal/__tests__/Modal.spec.js +1 -1
  105. package/es/MultiSelect/AdvancedGroupMultiSelect.js +17 -17
  106. package/es/MultiSelect/AdvancedMultiSelect.js +17 -17
  107. package/es/MultiSelect/EmptyState.js +3 -3
  108. package/es/MultiSelect/MobileHeader/MobileHeader.js +5 -5
  109. package/es/MultiSelect/MobileHeader/__tests__/MobileHeader.spec.js +1 -1
  110. package/es/MultiSelect/MultiSelect.js +22 -35
  111. package/es/MultiSelect/MultiSelectHeader.js +4 -4
  112. package/es/MultiSelect/MultiSelectWithAvatar.js +16 -16
  113. package/es/MultiSelect/SelectedOptions.js +5 -5
  114. package/es/MultiSelect/Suggestions.js +6 -6
  115. package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +1 -1
  116. package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +2 -9
  117. package/es/MultiSelect/__tests__/EmptyState.spec.js +1 -1
  118. package/es/MultiSelect/__tests__/MultiSelect.spec.js +1 -1
  119. package/es/MultiSelect/__tests__/MultiSelectHeader.spec.js +1 -1
  120. package/es/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +1 -1
  121. package/es/MultiSelect/__tests__/SelectedOptions.spec.js +1 -1
  122. package/es/MultiSelect/__tests__/Suggestions.spec.js +1 -1
  123. package/es/MultiSelect/index.js +4 -4
  124. package/es/MultiSelect/props/defaultProps.js +1 -1
  125. package/es/MultiSelect/props/propTypes.js +1 -3
  126. package/es/PopOver/PopOver.js +6 -6
  127. package/es/PopOver/__tests__/PopOver.spec.js +1 -1
  128. package/es/PopOver/index.js +3 -3
  129. package/es/Popup/Popup.js +7 -7
  130. package/es/Provider/AvatarSize.js +1 -1
  131. package/es/Provider/CssProvider.js +1 -1
  132. package/es/Provider/IdProvider.js +3 -3
  133. package/es/Provider/LibraryContext.js +5 -3
  134. package/es/Provider/ZindexProvider.js +2 -2
  135. package/es/Provider/index.js +4 -4
  136. package/es/Radio/Radio.js +6 -6
  137. package/es/Radio/__tests__/Radio.spec.js +1 -1
  138. package/es/Responsive/CustomResponsive.js +7 -7
  139. package/es/Responsive/ResizeComponent.js +2 -2
  140. package/es/Responsive/Responsive.js +6 -6
  141. package/es/Responsive/index.js +3 -3
  142. package/es/Responsive/utils/index.js +1 -1
  143. package/es/Responsive/windowResizeObserver.js +1 -1
  144. package/es/ResponsiveDropBox/ResponsiveDropBox.js +6 -6
  145. package/es/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +1 -1
  146. package/es/ResponsiveDropBox/props/propTypes.js +1 -1
  147. package/es/Ribbon/Ribbon.js +3 -3
  148. package/es/Ribbon/__tests__/Ribbon.spec.js +1 -1
  149. package/es/RippleEffect/RippleEffect.js +4 -4
  150. package/es/RippleEffect/__tests__/RippleEffect.spec.js +1 -1
  151. package/es/Select/GroupSelect.js +16 -16
  152. package/es/Select/Select.js +21 -30
  153. package/es/Select/SelectWithAvatar.js +17 -17
  154. package/es/Select/SelectWithIcon.js +13 -13
  155. package/es/Select/__tests__/GroupSelect.spec.js +1 -1
  156. package/es/Select/__tests__/Select.spec.js +5 -1131
  157. package/es/Select/__tests__/SelectWithAvatar.spec.js +1 -1
  158. package/es/Select/__tests__/SelectWithIcon.spec.js +1 -1
  159. package/es/Select/__tests__/__snapshots__/Select.spec.js.snap +1 -9621
  160. package/es/Select/index.js +4 -4
  161. package/es/Select/props/defaultProps.js +1 -1
  162. package/es/Select/props/propTypes.js +1 -3
  163. package/es/Stencils/Stencils.js +15 -8
  164. package/es/Stencils/Stencils.module.css +7 -11
  165. package/es/Stencils/__tests__/Stencils.spec.js +2 -10
  166. package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +11 -27
  167. package/es/Stencils/props/defaultProps.js +1 -2
  168. package/es/Stencils/props/propTypes.js +2 -3
  169. package/es/Switch/Switch.js +5 -5
  170. package/es/Switch/__tests__/Switch.spec.js +1 -1
  171. package/es/Tab/Tab.js +6 -7
  172. package/es/Tab/TabContent.js +4 -4
  173. package/es/Tab/TabContentWrapper.js +3 -3
  174. package/es/Tab/TabWrapper.js +4 -5
  175. package/es/Tab/Tabs.js +23 -23
  176. package/es/Tab/__tests__/Tab.spec.js +1 -1
  177. package/es/Tab/__tests__/TabContent.spec.js +1 -1
  178. package/es/Tab/__tests__/TabContentWrapper.spec.js +1 -1
  179. package/es/Tab/__tests__/TabWrapper.spec.js +1 -1
  180. package/es/Tab/__tests__/Tabs.spec.js +1 -1
  181. package/es/Tab/index.js +5 -5
  182. package/es/Tab/props/propTypes.js +2 -2
  183. package/es/Tag/Tag.js +7 -7
  184. package/es/Tag/__tests__/Tag.spec.js +2 -9
  185. package/es/Tag/props/propTypes.js +1 -1
  186. package/es/TextBox/TextBox.js +3 -3
  187. package/es/TextBox/__tests__/TextBox.spec.js +1 -1
  188. package/es/TextBoxIcon/TextBoxIcon.js +8 -12
  189. package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +1 -1
  190. package/es/TextBoxIcon/props/propTypes.js +2 -3
  191. package/es/Textarea/Textarea.js +3 -3
  192. package/es/Textarea/__tests__/Textarea.spec.js +1 -1
  193. package/es/Tooltip/Tooltip.js +6 -6
  194. package/es/Typography/Typography.js +4 -4
  195. package/es/Typography/css/cssJSLogic.js +1 -1
  196. package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
  197. package/es/VelocityAnimation/VelocityAnimation/__tests__/VelocityAnimation.spec.js +1 -1
  198. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +6 -43
  199. package/es/VelocityAnimation/VelocityAnimationGroup/__tests__/VelocityAnimationGroup.spec.js +1 -1
  200. package/es/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +1 -4
  201. package/es/VelocityAnimation/index.js +2 -2
  202. package/es/components-v2/Switch/Switch.js +151 -0
  203. package/es/components-v2/Switch/contants/index.js +12 -0
  204. package/es/components-v2/Switch/css/Switch_v2.module.css +140 -0
  205. package/es/components-v2/Switch/css/cssJSLogic.js +48 -0
  206. package/es/components-v2/Switch/props/defaultProps.js +12 -0
  207. package/es/components-v2/Switch/props/propTypes.js +32 -0
  208. package/es/components-v2/Switch/useSwitch.js +29 -0
  209. package/es/css.js +37 -37
  210. package/es/deprecated/PortalLayer/PortalLayer.js +3 -3
  211. package/es/index.js +39 -39
  212. package/es/semantic/Button/Button.js +3 -3
  213. package/es/semantic/Button/__tests__/Button.spec.js +1 -1
  214. package/es/semantic/index.js +1 -1
  215. package/es/utils/Common.js +2 -2
  216. package/es/utils/ContextOptimizer.js +1 -1
  217. package/es/utils/cssUtils.js +1 -1
  218. package/es/utils/datetime/common.js +1 -1
  219. package/es/utils/dropDownUtils.js +1 -1
  220. package/es/utils/index.js +1 -1
  221. package/es/v1/Accordion/Accordion.js +2 -2
  222. package/es/v1/Accordion/AccordionItem.js +4 -4
  223. package/es/v1/Accordion/index.js +2 -2
  224. package/es/v1/Animation/Animation.js +3 -3
  225. package/es/v1/Animation/utils.js +1 -1
  226. package/es/v1/AppContainer/AppContainer.js +8 -8
  227. package/es/v1/Avatar/Avatar.js +5 -5
  228. package/es/v1/AvatarTeam/AvatarTeam.js +4 -4
  229. package/es/v1/Button/Button.js +4 -4
  230. package/es/v1/Button/props/defaultProps.js +1 -1
  231. package/es/v1/Buttongroup/Buttongroup.js +3 -3
  232. package/es/v1/Card/Card.js +5 -5
  233. package/es/v1/Card/index.js +4 -4
  234. package/es/v1/CheckBox/CheckBox.js +6 -6
  235. package/es/v1/DateTime/CalendarView.js +7 -7
  236. package/es/v1/DateTime/DateTime.js +15 -15
  237. package/es/v1/DateTime/DateTimePopupFooter.js +5 -5
  238. package/es/v1/DateTime/DateTimePopupHeader.js +4 -4
  239. package/es/v1/DateTime/DateWidget.js +17 -17
  240. package/es/v1/DateTime/DaysRow.js +3 -3
  241. package/es/v1/DateTime/Time.js +5 -5
  242. package/es/v1/DateTime/YearView.js +6 -6
  243. package/es/v1/DateTime/index.js +1 -1
  244. package/es/v1/DateTime/props/propTypes.js +1 -1
  245. package/es/v1/DropBox/DropBox.js +9 -9
  246. package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +6 -6
  247. package/es/v1/DropBox/props/defaultProps.js +1 -1
  248. package/es/v1/DropBox/props/propTypes.js +1 -1
  249. package/es/v1/DropBox/utils/isMobilePopover.js +1 -1
  250. package/es/v1/DropDown/DropDown.js +4 -4
  251. package/es/v1/DropDown/DropDownHeading.js +3 -3
  252. package/es/v1/DropDown/DropDownItem.js +3 -3
  253. package/es/v1/DropDown/DropDownSearch.js +4 -4
  254. package/es/v1/DropDown/DropDownSeparator.js +2 -2
  255. package/es/v1/DropDown/props/propTypes.js +1 -1
  256. package/es/v1/Heading/Heading.js +4 -4
  257. package/es/v1/Label/Label.js +4 -4
  258. package/es/v1/Layout/Box.js +4 -4
  259. package/es/v1/Layout/Container.js +4 -4
  260. package/es/v1/Layout/index.js +2 -2
  261. package/es/v1/ListItem/ListContainer.js +6 -6
  262. package/es/v1/ListItem/ListItem.js +5 -5
  263. package/es/v1/ListItem/ListItemWithAvatar.js +7 -7
  264. package/es/v1/ListItem/ListItemWithCheckBox.js +6 -6
  265. package/es/v1/ListItem/ListItemWithIcon.js +5 -5
  266. package/es/v1/ListItem/ListItemWithRadio.js +6 -6
  267. package/es/v1/ListItem/index.js +6 -6
  268. package/es/v1/Modal/Modal.js +3 -3
  269. package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +17 -17
  270. package/es/v1/MultiSelect/AdvancedMultiSelect.js +17 -17
  271. package/es/v1/MultiSelect/EmptyState.js +3 -3
  272. package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +5 -5
  273. package/es/v1/MultiSelect/MultiSelect.js +19 -19
  274. package/es/v1/MultiSelect/MultiSelectHeader.js +4 -4
  275. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +16 -16
  276. package/es/v1/MultiSelect/SelectedOptions.js +5 -5
  277. package/es/v1/MultiSelect/Suggestions.js +6 -6
  278. package/es/v1/MultiSelect/index.js +4 -4
  279. package/es/v1/MultiSelect/props/defaultProps.js +1 -1
  280. package/es/v1/PopOver/PopOver.js +6 -6
  281. package/es/v1/Popup/Popup.js +3 -3
  282. package/es/v1/Radio/Radio.js +5 -5
  283. package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +6 -6
  284. package/es/v1/ResponsiveDropBox/props/propTypes.js +1 -1
  285. package/es/v1/Ribbon/Ribbon.js +3 -3
  286. package/es/v1/RippleEffect/RippleEffect.js +4 -4
  287. package/es/v1/Select/GroupSelect.js +16 -16
  288. package/es/v1/Select/Select.js +15 -15
  289. package/es/v1/Select/SelectWithAvatar.js +17 -17
  290. package/es/v1/Select/SelectWithIcon.js +13 -13
  291. package/es/v1/Select/index.js +4 -4
  292. package/es/v1/Select/props/defaultProps.js +1 -1
  293. package/es/v1/Stencils/Stencils.js +3 -3
  294. package/es/v1/Switch/Switch.js +5 -5
  295. package/es/v1/Tab/Tab.js +5 -5
  296. package/es/v1/Tab/TabContent.js +4 -4
  297. package/es/v1/Tab/TabContentWrapper.js +3 -3
  298. package/es/v1/Tab/TabWrapper.js +3 -3
  299. package/es/v1/Tab/Tabs.js +13 -13
  300. package/es/v1/Tab/index.js +5 -5
  301. package/es/v1/Tag/Tag.js +7 -7
  302. package/es/v1/TextBox/TextBox.js +3 -3
  303. package/es/v1/TextBoxIcon/TextBoxIcon.js +6 -6
  304. package/es/v1/TextBoxIcon/props/propTypes.js +1 -1
  305. package/es/v1/Textarea/Textarea.js +3 -3
  306. package/es/v1/Tooltip/Tooltip.js +6 -6
  307. package/es/v1/Typography/Typography.js +4 -4
  308. package/es/v1/Typography/css/cssJSLogic.js +1 -1
  309. package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
  310. package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
  311. package/es/v1/semantic/Button/Button.js +3 -3
  312. package/es/v1/semantic/index.js +1 -1
  313. package/lib/AppContainer/AppContainer.js +6 -7
  314. package/lib/Button/__tests__/Button.spec.js +0 -140
  315. package/lib/DateTime/__tests__/YearView.spec.js +2 -1
  316. package/lib/DateTime/__tests__/__snapshots__/YearView.spec.js.snap +61 -0
  317. package/lib/MultiSelect/MultiSelect.js +3 -16
  318. package/lib/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +0 -8
  319. package/lib/MultiSelect/props/propTypes.js +1 -3
  320. package/lib/Provider/IdProvider.js +0 -1
  321. package/lib/Provider/LibraryContext.js +3 -1
  322. package/lib/Select/Select.js +7 -16
  323. package/lib/Select/__tests__/Select.spec.js +3 -1364
  324. package/lib/Select/__tests__/__snapshots__/Select.spec.js.snap +1 -9621
  325. package/lib/Select/props/propTypes.js +1 -3
  326. package/lib/Stencils/Stencils.js +12 -5
  327. package/lib/Stencils/Stencils.module.css +7 -11
  328. package/lib/Stencils/__tests__/Stencils.spec.js +3 -11
  329. package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +11 -27
  330. package/lib/Stencils/props/defaultProps.js +1 -2
  331. package/lib/Stencils/props/propTypes.js +2 -3
  332. package/lib/Tab/Tab.js +1 -3
  333. package/lib/Tab/TabWrapper.js +1 -3
  334. package/lib/Tab/Tabs.js +10 -11
  335. package/lib/Tab/props/propTypes.js +2 -2
  336. package/lib/Tag/__tests__/Tag.spec.js +2 -10
  337. package/lib/TextBoxIcon/TextBoxIcon.js +2 -6
  338. package/lib/TextBoxIcon/props/propTypes.js +1 -2
  339. package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +26 -80
  340. package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +1 -4
  341. package/lib/components-v2/Switch/Switch.js +169 -0
  342. package/lib/components-v2/Switch/contants/index.js +20 -0
  343. package/lib/components-v2/Switch/css/Switch_v2.module.css +140 -0
  344. package/lib/components-v2/Switch/css/cssJSLogic.js +37 -0
  345. package/lib/components-v2/Switch/props/defaultProps.js +19 -0
  346. package/lib/components-v2/Switch/props/propTypes.js +43 -0
  347. package/lib/components-v2/Switch/useSwitch.js +52 -0
  348. package/lib/utils/Common.js +1 -1
  349. package/package.json +4 -3
  350. package/react-cli.config.js +2 -2
  351. package/result.json +1 -0
  352. package/es/Tab/__tests__/TabLayout.spec.js +0 -34
  353. package/es/Tab/__tests__/__snapshots__/TabLayout.spec.js.snap +0 -341
  354. package/es/Tab/utils/tabConfigs.js +0 -18
  355. package/lib/Tab/__tests__/TabLayout.spec.js +0 -41
  356. package/lib/Tab/__tests__/__snapshots__/TabLayout.spec.js.snap +0 -341
  357. package/lib/Tab/utils/tabConfigs.js +0 -27
@@ -110,9 +110,7 @@ var Select_propTypes = {
110
110
  targetOffset: _propTypes["default"].object,
111
111
  isRestrictScroll: _propTypes["default"].bool,
112
112
  dropBoxPortalId: _propTypes["default"].string,
113
- allowValueFallback: _propTypes["default"].bool,
114
- renderCustomToggleIndicator: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node]),
115
- renderCustomSearchClearComponent: _propTypes["default"].func
113
+ allowValueFallback: _propTypes["default"].bool
116
114
  };
117
115
  exports.Select_propTypes = Select_propTypes;
118
116
  var GroupSelect_propTypes = {
@@ -55,11 +55,11 @@ var Stencils = /*#__PURE__*/function (_React$PureComponent) {
55
55
  shape = _this$props.shape,
56
56
  size = _this$props.size,
57
57
  palette = _this$props.palette,
58
- customClass = _this$props.customClass,
59
- isAnimated = _this$props.isAnimated;
60
- size = shape === 'rect' ? _StencilsModule["default"][size] : _StencilsModule["default"]["size_".concat(size)];
58
+ customClass = _this$props.customClass;
59
+ size = shape === 'rect' ? _StencilsModule["default"][size] : _StencilsModule["default"]["c".concat(size)];
60
+ shape = shape === 'rect' ? _StencilsModule["default"].rectangular : _StencilsModule["default"].circle;
61
61
  return /*#__PURE__*/_react["default"].createElement("div", {
62
- className: "".concat(_StencilsModule["default"].container, " ").concat(isAnimated ? _StencilsModule["default"].animate : '', " ").concat(_StencilsModule["default"][shape], " ").concat(size, " ").concat(_StencilsModule["default"][palette], " ").concat(customClass)
62
+ className: "".concat(_StencilsModule["default"].container, " ").concat(shape, " ").concat(size, " ").concat(_StencilsModule["default"][palette], " ").concat(customClass)
63
63
  });
64
64
  }
65
65
  }]);
@@ -69,4 +69,11 @@ var Stencils = /*#__PURE__*/function (_React$PureComponent) {
69
69
 
70
70
  exports["default"] = Stencils;
71
71
  Stencils.propTypes = _propTypes.propTypes;
72
- Stencils.defaultProps = _defaultProps.defaultProps;
72
+ Stencils.defaultProps = _defaultProps.defaultProps; // if (__DOCS__) {
73
+ // Stencils.docs = {
74
+ // componentGroup: 'Atom',
75
+ // folderName: 'Style Guide',
76
+ // description: ' ',
77
+ // external: true
78
+ // };
79
+ // }
@@ -13,14 +13,14 @@
13
13
  .stencil {
14
14
  background-size: 800px 1px;
15
15
  }
16
- [dir=ltr] .animate{
16
+ [dir=ltr] .stencil {
17
17
  animation-name: placeHolderShimmer-ltr ;
18
18
  animation-fill-mode: forwards;
19
19
  animation-iteration-count: infinite;
20
20
  animation-duration: var(--zd_transition10);
21
21
  animation-timing-function: linear;
22
22
  }
23
- [dir=rtl] .animate{
23
+ [dir=rtl] .stencil {
24
24
  animation-name: placeHolderShimmer-rtl ;
25
25
  animation-fill-mode: forwards;
26
26
  animation-iteration-count: infinite;
@@ -46,7 +46,7 @@
46
46
  }
47
47
  }
48
48
 
49
- .rect {
49
+ .rectangular {
50
50
  composes: stencil;
51
51
  --stencil_height: var(--zd_size9);
52
52
  --stencil_border_radius: 5px;
@@ -81,20 +81,16 @@
81
81
  composes: stencil;
82
82
  --stencil_border_radius: 50%;
83
83
  }
84
- .square {
85
- composes: stencil;
86
- --stencil_border_radius: 4px;
87
- }
88
- .size_large {
84
+ .clarge {
89
85
  --stencil_width: var(--zd_size42);
90
86
  --stencil_height: var(--zd_size42);
91
87
  }
92
- .size_medium,
93
- .size_default {
88
+ .cmedium,
89
+ .cdefault {
94
90
  --stencil_width: var(--zd_size30);
95
91
  --stencil_height: var(--zd_size30);
96
92
  }
97
- .size_small {
93
+ .csmall {
98
94
  --stencil_width: var(--zd_size20);
99
95
  --stencil_height: var(--zd_size20);
100
96
  }
@@ -24,7 +24,7 @@ describe('Stencils', function () {
24
24
 
25
25
  expect(asFragment()).toMatchSnapshot();
26
26
  });
27
- var shape = ['rect', 'circle', 'square'];
27
+ var shape = ['rect', 'circle'];
28
28
  test.each(shape)('rendering the shape of- %s', function (shape) {
29
29
  var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Stencils["default"], {
30
30
  shape: shape
@@ -42,19 +42,11 @@ describe('Stencils', function () {
42
42
 
43
43
  expect(asFragment()).toMatchSnapshot();
44
44
  });
45
- test('rendering without animation', function () {
46
- var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Stencils["default"], {
47
- isAnimated: false
48
- })),
49
- asFragment = _render5.asFragment;
50
-
51
- expect(asFragment()).toMatchSnapshot();
52
- });
53
45
  test('rendering the customClass', function () {
54
- var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Stencils["default"], {
46
+ var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Stencils["default"], {
55
47
  customClass: "StencilsCustomClass"
56
48
  })),
57
- asFragment = _render6.asFragment;
49
+ asFragment = _render5.asFragment;
58
50
 
59
51
  expect(asFragment()).toMatchSnapshot();
60
52
  });
@@ -3,7 +3,7 @@
3
3
  exports[`Stencils rendering the customClass 1`] = `
4
4
  <DocumentFragment>
5
5
  <div
6
- class="container animate rect medium primary StencilsCustomClass"
6
+ class="container rectangular medium primary StencilsCustomClass"
7
7
  />
8
8
  </DocumentFragment>
9
9
  `;
@@ -11,7 +11,7 @@ exports[`Stencils rendering the customClass 1`] = `
11
11
  exports[`Stencils rendering the defult props 1`] = `
12
12
  <DocumentFragment>
13
13
  <div
14
- class="container animate rect medium primary "
14
+ class="container rectangular medium primary "
15
15
  />
16
16
  </DocumentFragment>
17
17
  `;
@@ -19,7 +19,7 @@ exports[`Stencils rendering the defult props 1`] = `
19
19
  exports[`Stencils rendering the palette of- dark 1`] = `
20
20
  <DocumentFragment>
21
21
  <div
22
- class="container animate rect medium dark "
22
+ class="container rectangular medium dark "
23
23
  />
24
24
  </DocumentFragment>
25
25
  `;
@@ -27,7 +27,7 @@ exports[`Stencils rendering the palette of- dark 1`] = `
27
27
  exports[`Stencils rendering the palette of- primary 1`] = `
28
28
  <DocumentFragment>
29
29
  <div
30
- class="container animate rect medium primary "
30
+ class="container rectangular medium primary "
31
31
  />
32
32
  </DocumentFragment>
33
33
  `;
@@ -35,7 +35,7 @@ exports[`Stencils rendering the palette of- primary 1`] = `
35
35
  exports[`Stencils rendering the palette of- secondary 1`] = `
36
36
  <DocumentFragment>
37
37
  <div
38
- class="container animate rect medium secondary "
38
+ class="container rectangular medium secondary "
39
39
  />
40
40
  </DocumentFragment>
41
41
  `;
@@ -43,7 +43,7 @@ exports[`Stencils rendering the palette of- secondary 1`] = `
43
43
  exports[`Stencils rendering the shape of- circle 1`] = `
44
44
  <DocumentFragment>
45
45
  <div
46
- class="container animate circle size_medium primary "
46
+ class="container circle cmedium primary "
47
47
  />
48
48
  </DocumentFragment>
49
49
  `;
@@ -51,15 +51,7 @@ exports[`Stencils rendering the shape of- circle 1`] = `
51
51
  exports[`Stencils rendering the shape of- rect 1`] = `
52
52
  <DocumentFragment>
53
53
  <div
54
- class="container animate rect medium primary "
55
- />
56
- </DocumentFragment>
57
- `;
58
-
59
- exports[`Stencils rendering the shape of- square 1`] = `
60
- <DocumentFragment>
61
- <div
62
- class="container animate square size_medium primary "
54
+ class="container rectangular medium primary "
63
55
  />
64
56
  </DocumentFragment>
65
57
  `;
@@ -67,7 +59,7 @@ exports[`Stencils rendering the shape of- square 1`] = `
67
59
  exports[`Stencils rendering the size of- default 1`] = `
68
60
  <DocumentFragment>
69
61
  <div
70
- class="container animate rect default primary "
62
+ class="container rectangular default primary "
71
63
  />
72
64
  </DocumentFragment>
73
65
  `;
@@ -75,7 +67,7 @@ exports[`Stencils rendering the size of- default 1`] = `
75
67
  exports[`Stencils rendering the size of- large 1`] = `
76
68
  <DocumentFragment>
77
69
  <div
78
- class="container animate rect large primary "
70
+ class="container rectangular large primary "
79
71
  />
80
72
  </DocumentFragment>
81
73
  `;
@@ -83,7 +75,7 @@ exports[`Stencils rendering the size of- large 1`] = `
83
75
  exports[`Stencils rendering the size of- medium 1`] = `
84
76
  <DocumentFragment>
85
77
  <div
86
- class="container animate rect medium primary "
78
+ class="container rectangular medium primary "
87
79
  />
88
80
  </DocumentFragment>
89
81
  `;
@@ -91,15 +83,7 @@ exports[`Stencils rendering the size of- medium 1`] = `
91
83
  exports[`Stencils rendering the size of- small 1`] = `
92
84
  <DocumentFragment>
93
85
  <div
94
- class="container animate rect small primary "
95
- />
96
- </DocumentFragment>
97
- `;
98
-
99
- exports[`Stencils rendering without animation 1`] = `
100
- <DocumentFragment>
101
- <div
102
- class="container rect medium primary "
86
+ class="container rectangular small primary "
103
87
  />
104
88
  </DocumentFragment>
105
89
  `;
@@ -8,7 +8,6 @@ var defaultProps = {
8
8
  palette: 'primary',
9
9
  shape: 'rect',
10
10
  size: 'medium',
11
- customClass: '',
12
- isAnimated: true
11
+ customClass: ''
13
12
  };
14
13
  exports.defaultProps = defaultProps;
@@ -11,9 +11,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
11
11
 
12
12
  var propTypes = {
13
13
  palette: _propTypes["default"].oneOf(['primary', 'secondary', 'dark']),
14
- shape: _propTypes["default"].oneOf(['rect', 'circle', 'square']),
14
+ shape: _propTypes["default"].oneOf(['rect', 'circle']),
15
15
  size: _propTypes["default"].oneOf(['small', 'medium', 'large', 'default']),
16
- customClass: _propTypes["default"].string,
17
- isAnimated: _propTypes["default"].bool
16
+ customClass: _propTypes["default"].string
18
17
  };
19
18
  exports.propTypes = propTypes;
package/lib/Tab/Tab.js CHANGED
@@ -17,8 +17,6 @@ var _Layout = require("../Layout");
17
17
 
18
18
  var _Common = require("../utils/Common");
19
19
 
20
- var _tabConfigs = require("./utils/tabConfigs");
21
-
22
20
  var _TabModule = _interopRequireDefault(require("./Tab.module.css"));
23
21
 
24
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -92,7 +90,7 @@ function Tab(_ref) {
92
90
  var activeWithAppearance = (0, _Common.cs)([_TabModule["default"][styleContent.active], needBorder && !isAnimate && _TabModule["default"]["".concat(styleContent.active, "_border")]]);
93
91
  var activeClasses = (0, _Common.cs)([needAppearance && activeWithAppearance, activeClass]);
94
92
  var inActiveClasses = needAppearance && (0, _Common.cs)([_TabModule["default"][styleContent.tab], tabTypes[type] && _TabModule["default"]["".concat("".concat(type, "Hover"))]]);
95
- var tabClass = (0, _Common.cs)([_TabModule["default"].tab, _tabConfigs.TAB_DIRECTION_MAPPING[align] === 'column' ? _TabModule["default"].vertical : _TabModule["default"].horizontal, isDisabled && _TabModule["default"].disabled, needBorder && !isAnimate && needAppearance && _TabModule["default"].border, isActive ? activeClasses : inActiveClasses, className]);
93
+ var tabClass = (0, _Common.cs)([_TabModule["default"].tab, align === 'vertical' ? _TabModule["default"].vertical : _TabModule["default"].horizontal, isDisabled && _TabModule["default"].disabled, needBorder && !isAnimate && needAppearance && _TabModule["default"].border, isActive ? activeClasses : inActiveClasses, className]);
96
94
  return /*#__PURE__*/_react["default"].createElement(_Layout.Box, _extends({
97
95
  tourId: tourId,
98
96
  tagName: isLink ? 'a' : 'div',
@@ -15,8 +15,6 @@ var _propTypes = require("./props/propTypes");
15
15
 
16
16
  var _Layout = require("../Layout");
17
17
 
18
- var _tabConfigs = require("./utils/tabConfigs");
19
-
20
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
19
 
22
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -63,7 +61,7 @@ function TabWrapper(_ref) {
63
61
  onSelect && onSelect(id);
64
62
  }, [hookToDisableInternalState, onSelect]);
65
63
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
66
- alignBox: _tabConfigs.TAB_ALIGN_MAPPING[align],
64
+ alignBox: align === 'vertical' ? 'column' : 'row',
67
65
  dataId: dataId,
68
66
  dataSelectorId: dataSelectorId
69
67
  }, _react["default"].Children.map(children, function (child) {
package/lib/Tab/Tabs.js CHANGED
@@ -37,8 +37,6 @@ var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/Re
37
37
 
38
38
  var _CustomResponsive = require("../Responsive/CustomResponsive");
39
39
 
40
- var _tabConfigs = require("./utils/tabConfigs");
41
-
42
40
  var _semanticButtonModule = _interopRequireDefault(require("../semantic/Button/semanticButton.module.css"));
43
41
 
44
42
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -178,14 +176,14 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
178
176
  if (totalDimension && this[selectedTab]) {
179
177
  var align = this.props.align;
180
178
  var newDim = "".concat((0, _Common.remConvert)(totalDimension), "rem");
181
- _tabConfigs.TAB_DIRECTION_MAPPING[align] === 'column' ? this[selectedTab].style.maxWidth = newDim : this[selectedTab].style.maxHeight = newDim;
179
+ align === 'vertical' ? this[selectedTab].style.maxWidth = newDim : this[selectedTab].style.maxHeight = newDim;
182
180
  }
183
181
  }
184
182
  }, {
185
183
  key: "getHighlightDim",
186
184
  value: function getHighlightDim() {
187
185
  var align = this.props.align;
188
- return _tabConfigs.TAB_DIRECTION_MAPPING[align] === 'column' ? this.highlight.offsetLeft : this.highlight.offsetTop;
186
+ return align === 'vertical' ? this.highlight.offsetLeft : this.highlight.offsetTop;
189
187
  }
190
188
  }, {
191
189
  key: "componentDidUpdate",
@@ -262,12 +260,12 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
262
260
  if (tabActive) {
263
261
  var position, dimension;
264
262
 
265
- if (_tabConfigs.TAB_DIRECTION_MAPPING[align] === 'column') {
263
+ if (align === 'vertical') {
266
264
  position = tabActive.offsetLeft;
267
265
  dimension = tabActive.offsetWidth;
268
266
  node.style.transform = "translateX(".concat((0, _Common.remConvert)(position - highlightInitialDimension), "rem)");
269
267
  node.style.width = "".concat((0, _Common.remConvert)(dimension), "rem");
270
- } else if (_tabConfigs.TAB_DIRECTION_MAPPING[align] === 'row') {
268
+ } else if (align === 'horizontal') {
271
269
  position = tabActive.offsetTop;
272
270
  dimension = tabActive.offsetHeight;
273
271
  node.style.transform = "translateY(".concat((0, _Common.remConvert)(position - highlightInitialDimension), "rem)");
@@ -473,7 +471,8 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
473
471
  align = _this$props8.align,
474
472
  removeClose = _this$props8.removeClose;
475
473
  removeClose && removeClose(e);
476
- boxPosition = boxPosition ? boxPosition : _tabConfigs.TAB_POPUP_POSITION_MAPPING[align];
474
+ var popupPosition = align === 'vertical' ? 'bottomLeft' : 'rightTop';
475
+ boxPosition = boxPosition ? boxPosition : popupPosition;
477
476
  togglePopup(e, boxPosition);
478
477
  }
479
478
  }, {
@@ -593,7 +592,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
593
592
  MoreButtonProps = _customProps$MoreButt === void 0 ? {} : _customProps$MoreButt,
594
593
  _customProps$TextBoxI = customProps.TextBoxIconProps,
595
594
  TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI;
596
- var popupClass = _tabConfigs.TAB_DIRECTION_MAPPING[align] === 'column' ? _TabsModule["default"][position] ? _TabsModule["default"][position] : '' : '';
595
+ var popupClass = align === 'vertical' ? _TabsModule["default"][position] ? _TabsModule["default"][position] : '' : '';
597
596
  var moreTabsListItems = this.handleFilterSuggestions({
598
597
  moreTabs: moreTabs
599
598
  });
@@ -754,17 +753,17 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
754
753
  className: containerClass,
755
754
  dataSelectorId: dataSelectorId
756
755
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
757
- alignBox: _tabConfigs.TAB_DIRECTION_MAPPING[align] === 'column' ? 'row' : 'column',
756
+ alignBox: align === 'vertical' ? 'row' : 'column',
758
757
  className: tabsClass,
759
758
  style: style
760
759
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
761
760
  eleRef: this.getTabsRef,
762
761
  flexible: true
763
762
  }, renderVirtualTabs && /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
764
- alignBox: _tabConfigs.TAB_DIRECTION_MAPPING[align] === 'column' ? 'row' : 'column',
763
+ alignBox: align === 'vertical' ? 'row' : 'column',
765
764
  className: _TabsModule["default"].hidden
766
765
  }, this.renderTabs(children, [], true)), /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
767
- alignBox: _tabConfigs.TAB_DIRECTION_MAPPING[align] === 'column' ? 'row' : 'column'
766
+ alignBox: align === 'vertical' ? 'row' : 'column'
768
767
  }, this.renderTabs(mainTabs, moreTabs, false))), otherTabs.length ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, otherTabs) : null, isAnimate && needTabBorder && needAppearance && /*#__PURE__*/_react["default"].createElement("div", {
769
768
  className: hlClass,
770
769
  ref: this.getHighlightRef,
@@ -11,7 +11,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
11
11
 
12
12
  var Tab_propTypes = {
13
13
  activeClass: _propTypes["default"].string,
14
- align: _propTypes["default"].oneOf(['vertical', 'horizontal']),
14
+ align: _propTypes["default"].string,
15
15
  children: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].string]),
16
16
  className: _propTypes["default"].string,
17
17
  dataId: _propTypes["default"].string,
@@ -115,7 +115,7 @@ var Tabs_propTypes = {
115
115
  };
116
116
  exports.Tabs_propTypes = Tabs_propTypes;
117
117
  var TabWrapper_propTypes = {
118
- align: _propTypes["default"].oneOf(['vertical', 'horizontal', 'vertical-reverse', 'horizontal-reverse']),
118
+ align: _propTypes["default"].oneOf(['vertical', 'horizontal']),
119
119
  children: _propTypes["default"].node,
120
120
  dataId: _propTypes["default"].string,
121
121
  defaultTab: _propTypes["default"].string,
@@ -2,20 +2,12 @@
2
2
 
3
3
  var _react = _interopRequireDefault(require("react"));
4
4
 
5
- var _react2 = require("@testing-library/react");
6
-
7
- var _IdProvider = require("../../Provider/IdProvider");
8
-
9
5
  var _Tag = _interopRequireDefault(require("../Tag"));
10
6
 
7
+ var _react2 = require("@testing-library/react");
8
+
11
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
10
 
13
- beforeEach(function () {
14
- (0, _IdProvider.setGlobalId)(0);
15
- });
16
- afterEach(function () {
17
- (0, _react2.cleanup)();
18
- });
19
11
  describe('Tag component', function () {
20
12
  var size = ['small', 'medium'];
21
13
  var palette = ['default', 'danger', 'secondary', 'pureDotted', 'primaryDotted', 'dark', 'pureDarkDotted', 'darkPrimaryDotted', 'defaultLink'];
@@ -158,8 +158,7 @@ var TextBoxIcon = /*#__PURE__*/function (_React$Component) {
158
158
  isScrollPrevent = _this$props2.isScrollPrevent,
159
159
  customProps = _this$props2.customProps,
160
160
  needInputFocusOnWrapperClick = _this$props2.needInputFocusOnWrapperClick,
161
- renderRightPlaceholderNode = _this$props2.renderRightPlaceholderNode,
162
- renderCustomClearComponent = _this$props2.renderCustomClearComponent;
161
+ renderRightPlaceholderNode = _this$props2.renderRightPlaceholderNode;
163
162
  var isActive = this.state.isActive;
164
163
  var _customClass$customTB = customClass.customTBoxWrap,
165
164
  customTBoxWrap = _customClass$customTB === void 0 ? '' : _customClass$customTB,
@@ -214,10 +213,7 @@ var TextBoxIcon = /*#__PURE__*/function (_React$Component) {
214
213
  className: "".concat(_TextBoxIconModule["default"].iconContainer, " ").concat(customTBoxIcon)
215
214
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
216
215
  alignBox: "row"
217
- }, value && onClear && value.length > 1 && !isDisabled && !isReadOnly || showClearIcon ? typeof renderCustomClearComponent == 'function' ? renderCustomClearComponent({
218
- clearText: clearText,
219
- handleClear: this.handleClear
220
- }) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
216
+ }, value && onClear && value.length > 1 && !isDisabled && !isReadOnly || showClearIcon ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
221
217
  className: "".concat(_semanticButtonModule["default"].buttonReset, " ").concat(_TextBoxIconModule["default"].icon),
222
218
  onClick: this.handleClear,
223
219
  dataId: "".concat(dataId, "_ClearIcon"),
@@ -67,8 +67,7 @@ var propTypes = _objectSpread(_objectSpread({}, _propTypes2.propTypes), {}, {
67
67
  customProps: _propTypes["default"].shape({
68
68
  TextBoxProps: _propTypes["default"].object
69
69
  }),
70
- renderRightPlaceholderNode: _propTypes["default"].node,
71
- renderCustomClearComponent: _propTypes["default"].func
70
+ renderRightPlaceholderNode: _propTypes["default"].node
72
71
  });
73
72
 
74
73
  exports.propTypes = propTypes;
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
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
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -27,20 +29,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
27
29
 
28
30
  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); }
29
31
 
30
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
31
-
32
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
33
-
34
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
35
-
36
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
37
-
38
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
39
-
40
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
-
42
- 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); }
43
-
44
32
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
45
33
 
46
34
  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); } }
@@ -75,75 +63,35 @@ var VelocityAnimationGroup = /*#__PURE__*/function (_React$Component) {
75
63
  var _super = _createSuper(VelocityAnimationGroup);
76
64
 
77
65
  function VelocityAnimationGroup(props) {
78
- var _this;
79
-
80
66
  _classCallCheck(this, VelocityAnimationGroup);
81
67
 
82
- _this = _super.call(this, props);
83
- _this.handleEnterComplete = _this.handleEnterComplete.bind(_assertThisInitialized(_this));
84
- _this.handleExitComplete = _this.handleExitComplete.bind(_assertThisInitialized(_this));
85
- return _this;
68
+ return _super.call(this, props);
86
69
  }
87
70
 
88
71
  _createClass(VelocityAnimationGroup, [{
89
- key: "handleEnterComplete",
90
- value: function handleEnterComplete(elements) {
91
- var _this$props = this.props,
92
- onEnterComplete = _this$props.onEnterComplete,
93
- postEnterStyles = _this$props.postEnterStyles;
94
-
95
- if (typeof onEnterComplete === 'function') {
96
- onEnterComplete(elements);
97
- }
98
-
99
- if (postEnterStyles && _typeof(postEnterStyles) === 'object') {
100
- elements.forEach(function (rootElement) {
101
- Object.entries(postEnterStyles).forEach(function (_ref) {
102
- var _ref2 = _slicedToArray(_ref, 2),
103
- cssProperty = _ref2[0],
104
- cssValue = _ref2[1];
105
-
106
- rootElement.style[cssProperty] = cssValue;
107
- });
108
- });
109
- }
110
- }
111
- }, {
112
- key: "handleExitComplete",
113
- value: function handleExitComplete(elements) {
114
- var onExitComplete = this.props.onExitComplete;
115
-
116
- if (typeof onExitComplete === 'function') {
117
- onExitComplete(elements);
118
- }
119
- }
120
- }, {
121
72
  key: "render",
122
73
  value: function render() {
123
- var _this$props2 = this.props,
124
- children = _this$props2.children,
125
- enterName = _this$props2.enterName,
126
- exitName = _this$props2.exitName,
127
- enterDuration = _this$props2.enterDuration,
128
- exitDuration = _this$props2.exitDuration,
129
- isActive = _this$props2.isActive,
130
- component = _this$props2.component,
131
- runOnMount = _this$props2.runOnMount,
132
- enterShowStyle = _this$props2.enterShowStyle,
133
- enterHideStyle = _this$props2.enterHideStyle,
134
- exitDelay = _this$props2.exitDelay,
135
- isFlex = _this$props2.isFlex,
136
- enterDelay = _this$props2.enterDelay,
137
- isCustomized = _this$props2.isCustomized,
138
- name = _this$props2.name,
139
- needUIPack = _this$props2.needUIPack,
140
- onEnterComplete = _this$props2.onEnterComplete,
141
- onExitComplete = _this$props2.onExitComplete,
142
- postEnterStyles = _this$props2.postEnterStyles;
143
-
144
- var _ref3 = this.context || {},
145
- direction = _ref3.direction,
146
- isReducedMotion = _ref3.isReducedMotion;
74
+ var _this$props = this.props,
75
+ children = _this$props.children,
76
+ enterName = _this$props.enterName,
77
+ exitName = _this$props.exitName,
78
+ enterDuration = _this$props.enterDuration,
79
+ exitDuration = _this$props.exitDuration,
80
+ isActive = _this$props.isActive,
81
+ component = _this$props.component,
82
+ runOnMount = _this$props.runOnMount,
83
+ enterShowStyle = _this$props.enterShowStyle,
84
+ enterHideStyle = _this$props.enterHideStyle,
85
+ exitDelay = _this$props.exitDelay,
86
+ isFlex = _this$props.isFlex,
87
+ enterDelay = _this$props.enterDelay,
88
+ isCustomized = _this$props.isCustomized,
89
+ name = _this$props.name,
90
+ needUIPack = _this$props.needUIPack;
91
+
92
+ var _ref = this.context || {},
93
+ direction = _ref.direction,
94
+ isReducedMotion = _ref.isReducedMotion;
147
95
 
148
96
  var childProps = clearProps(this.props);
149
97
  var enterAnimationObj = {
@@ -180,15 +128,13 @@ var VelocityAnimationGroup = /*#__PURE__*/function (_React$Component) {
180
128
  animation: isCustomized ? enterAnimationObj[name] : needUIPack ? "transition.".concat(enterName, "In") : enterName,
181
129
  duration: !isReducedMotion ? enterDuration : 0,
182
130
  delay: enterDelay ? enterDelay : 0,
183
- display: isFlex ? 'flex' : '',
184
- complete: onEnterComplete || postEnterStyles ? this.handleEnterComplete : undefined
131
+ display: isFlex ? 'flex' : ''
185
132
  };
186
133
  var exitAnimation = {
187
134
  animation: isCustomized ? exitAnimationObj[name] : needUIPack ? "transition.".concat(exitName ? exitName : enterName, "Out") : exitName ? exitName : enterName,
188
135
  duration: !isReducedMotion ? exitDuration : 0,
189
136
  delay: exitDelay ? exitDelay : 0,
190
- display: 'none',
191
- complete: onExitComplete ? this.handleExitComplete : undefined
137
+ display: 'none'
192
138
  };
193
139
  return /*#__PURE__*/_react["default"].createElement(_velocityReact.VelocityTransitionGroup, _extends({
194
140
  enter: enterAnimation,
@@ -25,9 +25,6 @@ var propTypes = {
25
25
  isFlex: _propTypes["default"].bool,
26
26
  name: _propTypes["default"].oneOf(['fade', 'slideDown', 'flyDown', 'slideRight', 'shrink', 'expand', 'slideLeft']),
27
27
  needUIPack: _propTypes["default"].bool,
28
- runOnMount: _propTypes["default"].bool,
29
- onEnterComplete: _propTypes["default"].func,
30
- onExitComplete: _propTypes["default"].func,
31
- postEnterStyles: _propTypes["default"].object
28
+ runOnMount: _propTypes["default"].bool
32
29
  };
33
30
  exports.propTypes = propTypes;