@zohodesk/components 1.1.0 → 1.2.0-temp-195

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 (854) hide show
  1. package/.cli/MissedPropType_Keys.html +101 -0
  2. package/.cli/PropLessFiles.html +101 -0
  3. package/.cli/PropUnificationExcludeFilesArray.js +231 -0
  4. package/.cli/PropValidationExcludeFilesArray.js +1 -0
  5. package/.cli/ThemeValidationExcludeFiles.js +1 -0
  6. package/.cli/UnValidatedFiles.html +101 -0
  7. package/.cli/propValidation_report.html +182 -0
  8. package/.cli/stringContains.js +1 -0
  9. package/PropValidationExcludeFilesArray.js +1 -0
  10. package/README.md +1418 -1266
  11. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +174 -169
  12. package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +465 -450
  13. package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +31 -30
  14. package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +24 -24
  15. package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +465 -450
  16. package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +31 -30
  17. package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +24 -24
  18. package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +465 -450
  19. package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +31 -30
  20. package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +24 -24
  21. package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +465 -450
  22. package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +31 -30
  23. package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +24 -24
  24. package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +465 -450
  25. package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +31 -30
  26. package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +24 -24
  27. package/assets/Appearance/light/mode/Component_LightMode.module.css +173 -168
  28. package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +465 -450
  29. package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +31 -30
  30. package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +24 -24
  31. package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +465 -450
  32. package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +31 -30
  33. package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +24 -24
  34. package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +465 -450
  35. package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +31 -30
  36. package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +24 -24
  37. package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +465 -450
  38. package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +31 -30
  39. package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +24 -24
  40. package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +465 -450
  41. package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +31 -30
  42. package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +24 -24
  43. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +174 -169
  44. package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +465 -450
  45. package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +31 -30
  46. package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +24 -24
  47. package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +465 -450
  48. package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +31 -30
  49. package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +24 -24
  50. package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +465 -450
  51. package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +31 -30
  52. package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +24 -24
  53. package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +465 -450
  54. package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +31 -30
  55. package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +24 -24
  56. package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +465 -450
  57. package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +31 -30
  58. package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +24 -24
  59. package/assets/Contrast/darkContrastLightness.module.css +34 -34
  60. package/assets/Contrast/lightContrastLightness.module.css +34 -34
  61. package/assets/Contrast/pureDarkContrastLightness.module.css +34 -34
  62. package/es/Animation/Animation.js +4 -86
  63. package/es/Animation/utils.js +83 -0
  64. package/es/AppContainer/AppContainer.js +13 -9
  65. package/es/AppContainer/AppContainer.module.css +18 -18
  66. package/es/Avatar/Avatar.js +14 -14
  67. package/es/Avatar/Avatar.module.css +175 -175
  68. package/es/Avatar/__tests__/Avatar.spec.js +178 -158
  69. package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -288
  70. package/es/AvatarTeam/AvatarTeam.js +14 -14
  71. package/es/AvatarTeam/AvatarTeam.module.css +189 -189
  72. package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +118 -56
  73. package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +705 -226
  74. package/es/Button/Button.js +14 -11
  75. package/es/Button/__tests__/Button.spec.js +122 -0
  76. package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
  77. package/es/Button/css/Button.module.css +528 -526
  78. package/es/Button/css/cssJSLogic.js +1 -1
  79. package/es/Button/props/defaultProps.js +2 -1
  80. package/es/Button/props/propTypes.js +3 -2
  81. package/es/Buttongroup/Buttongroup.js +1 -1
  82. package/es/Buttongroup/Buttongroup.module.css +104 -105
  83. package/es/Buttongroup/__tests__/Buttongroup.spec.js +37 -0
  84. package/es/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +191 -0
  85. package/es/Card/Card.js +4 -4
  86. package/es/Card/Card.module.css +20 -20
  87. package/es/Card/props/propTypes.js +9 -4
  88. package/es/CheckBox/CheckBox.js +18 -8
  89. package/es/CheckBox/CheckBox.module.css +157 -157
  90. package/es/CheckBox/props/propTypes.js +1 -2
  91. package/es/DateTime/CalendarView.js +0 -0
  92. package/es/DateTime/DateTime.js +2 -29
  93. package/es/DateTime/DateTime.module.css +248 -235
  94. package/es/DateTime/DateTimePopupFooter.js +5 -1
  95. package/es/DateTime/DateTimePopupHeader.js +3 -1
  96. package/es/DateTime/DateWidget.js +17 -12
  97. package/es/DateTime/DateWidget.module.css +38 -38
  98. package/es/DateTime/DaysRow.js +3 -1
  99. package/es/DateTime/Time.js +4 -0
  100. package/es/DateTime/YearView.js +0 -1
  101. package/es/DateTime/YearView.module.css +98 -98
  102. package/es/DateTime/common.js +0 -0
  103. package/es/DateTime/dateFormatUtils/dateFormat.js +14 -2
  104. package/es/DateTime/dateFormatUtils/dayChange.js +2 -1
  105. package/es/DateTime/dateFormatUtils/index.js +3 -5
  106. package/es/DateTime/dateFormatUtils/monthChange.js +2 -1
  107. package/es/DateTime/dateFormatUtils/timeChange.js +4 -4
  108. package/es/DateTime/dateFormatUtils/yearChange.js +2 -1
  109. package/es/DateTime/index.js +0 -0
  110. package/es/DateTime/objectUtils.js +0 -0
  111. package/es/DateTime/props/defaultProps.js +6 -0
  112. package/es/DateTime/props/propTypes.js +58 -6
  113. package/es/DateTime/typeChecker.js +0 -0
  114. package/es/DateTime/validator.js +0 -0
  115. package/es/DropBox/DropBox.js +24 -35
  116. package/es/DropBox/DropBoxElement/DropBoxElement.js +3 -2
  117. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +431 -434
  118. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +1 -1
  119. package/es/DropBox/DropBoxElement/props/propTypes.js +7 -1
  120. package/es/DropBox/DropBoxPositionMapping.json +144 -144
  121. package/es/DropBox/css/DropBox.module.css +58 -58
  122. package/es/DropBox/props/propTypes.js +2 -1
  123. package/es/DropBox/utils/isMobilePopover.js +17 -0
  124. package/es/DropDown/DropDown.js +3 -8
  125. package/es/DropDown/DropDown.module.css +5 -5
  126. package/es/DropDown/DropDownHeading.js +0 -0
  127. package/es/DropDown/DropDownHeading.module.css +53 -53
  128. package/es/DropDown/DropDownItem.js +0 -0
  129. package/es/DropDown/DropDownItem.module.css +94 -94
  130. package/es/DropDown/DropDownSearch.js +0 -0
  131. package/es/DropDown/DropDownSearch.module.css +14 -14
  132. package/es/DropDown/DropDownSeparator.js +0 -0
  133. package/es/DropDown/DropDownSeparator.module.css +7 -7
  134. package/es/DropDown/props/propTypes.js +5 -18
  135. package/es/Heading/Heading.module.css +4 -4
  136. package/es/Label/Label.js +9 -4
  137. package/es/Label/Label.module.css +57 -52
  138. package/es/Label/LabelColors.module.css +20 -20
  139. package/es/Label/__tests__/Label.spec.js +76 -97
  140. package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -101
  141. package/es/Label/props/propTypes.js +5 -1
  142. package/es/Layout/Box.js +2 -1
  143. package/es/Layout/Container.js +2 -1
  144. package/es/Layout/Layout.module.css +335 -335
  145. package/es/Layout/utils.js +0 -0
  146. package/es/ListItem/ListContainer.js +8 -6
  147. package/es/ListItem/ListItem.js +4 -5
  148. package/es/ListItem/ListItem.module.css +205 -216
  149. package/es/ListItem/ListItemWithAvatar.js +4 -5
  150. package/es/ListItem/ListItemWithCheckBox.js +4 -5
  151. package/es/ListItem/ListItemWithIcon.js +4 -5
  152. package/es/ListItem/ListItemWithRadio.js +4 -5
  153. package/es/ListItem/props/propTypes.js +9 -4
  154. package/es/Modal/Modal.js +4 -5
  155. package/es/Modal/props/propTypes.js +2 -1
  156. package/es/MultiSelect/AdvancedGroupMultiSelect.js +12 -10
  157. package/es/MultiSelect/AdvancedMultiSelect.js +12 -13
  158. package/es/MultiSelect/MobileHeader/MobileHeader.js +50 -0
  159. package/es/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
  160. package/es/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
  161. package/es/MultiSelect/MobileHeader/props/propTypes.js +7 -0
  162. package/es/MultiSelect/MultiSelect.js +183 -179
  163. package/es/MultiSelect/MultiSelect.module.css +204 -207
  164. package/es/MultiSelect/MultiSelectHeader.js +1 -2
  165. package/es/MultiSelect/MultiSelectWithAvatar.js +75 -190
  166. package/es/MultiSelect/SelectedOptions.js +6 -8
  167. package/es/MultiSelect/SelectedOptions.module.css +15 -15
  168. package/es/MultiSelect/Suggestions.js +8 -9
  169. package/es/MultiSelect/props/defaultProps.js +6 -2
  170. package/es/MultiSelect/props/propTypes.js +149 -211
  171. package/es/PopOver/PopOver.js +1 -9
  172. package/es/PopOver/PopOver.module.css +9 -8
  173. package/es/Popup/Popup.js +3 -4
  174. package/es/Popup/PositionMapping.json +73 -73
  175. package/es/Radio/Radio.js +26 -12
  176. package/es/Radio/Radio.module.css +115 -112
  177. package/es/Radio/__tests__/Radio.spec.js +241 -0
  178. package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +1837 -0
  179. package/es/Radio/props/defaultProps.js +1 -0
  180. package/es/Radio/props/propTypes.js +10 -2
  181. package/es/Responsive/CustomResponsive.js +0 -0
  182. package/es/Responsive/RefWrapper.js +2 -1
  183. package/es/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
  184. package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -6
  185. package/es/ResponsiveDropBox/props/propTypes.js +2 -1
  186. package/es/Ribbon/Ribbon.js +0 -0
  187. package/es/Ribbon/Ribbon.module.css +499 -454
  188. package/es/Ribbon/__tests__/Ribbon.spec.js +49 -165
  189. package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -163
  190. package/es/RippleEffect/RippleEffect.js +3 -2
  191. package/es/RippleEffect/RippleEffect.module.css +92 -92
  192. package/es/RippleEffect/__tests__/RippleEffect.spec.js +69 -0
  193. package/es/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +171 -0
  194. package/es/RippleEffect/props/defaultProps.js +1 -0
  195. package/es/RippleEffect/props/propTypes.js +1 -0
  196. package/es/Select/GroupSelect.js +14 -11
  197. package/es/Select/Select.js +20 -16
  198. package/es/Select/Select.module.css +134 -108
  199. package/es/Select/SelectWithAvatar.js +2 -1
  200. package/es/Select/SelectWithIcon.js +5 -2
  201. package/es/Select/props/defaultProps.js +1 -0
  202. package/es/Select/props/propTypes.js +20 -7
  203. package/es/Stencils/Stencils.js +0 -0
  204. package/es/Stencils/Stencils.module.css +96 -96
  205. package/es/Stencils/__tests__/Stencils.spec.js +43 -66
  206. package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +89 -49
  207. package/es/Switch/Switch.js +10 -10
  208. package/es/Switch/Switch.module.css +127 -127
  209. package/es/Switch/__tests__/Switch.spec.js +156 -0
  210. package/es/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -0
  211. package/es/Tab/Tab.js +4 -5
  212. package/es/Tab/Tab.module.css +100 -100
  213. package/es/Tab/TabContent.module.css +4 -4
  214. package/es/Tab/TabContentWrapper.js +6 -2
  215. package/es/Tab/TabWrapper.js +2 -4
  216. package/es/Tab/Tabs.js +33 -33
  217. package/es/Tab/Tabs.module.css +136 -136
  218. package/es/Tab/props/defaultProps.js +2 -1
  219. package/es/Tab/props/propTypes.js +3 -2
  220. package/es/Tag/Tag.js +12 -11
  221. package/es/Tag/Tag.module.css +253 -254
  222. package/es/Tag/props/propTypes.js +2 -1
  223. package/es/TextBox/TextBox.js +16 -9
  224. package/es/TextBox/TextBox.module.css +197 -158
  225. package/es/TextBox/props/defaultProps.js +1 -1
  226. package/es/TextBox/props/propTypes.js +3 -1
  227. package/es/TextBoxIcon/TextBoxIcon.js +4 -4
  228. package/es/TextBoxIcon/TextBoxIcon.module.css +79 -79
  229. package/es/TextBoxIcon/props/defaultProps.js +1 -0
  230. package/es/TextBoxIcon/props/propTypes.js +3 -1
  231. package/es/Textarea/Textarea.js +4 -6
  232. package/es/Textarea/Textarea.module.css +140 -139
  233. package/es/Textarea/props/propTypes.js +0 -1
  234. package/es/Tooltip/Tooltip.js +4 -2
  235. package/es/Tooltip/Tooltip.module.css +140 -140
  236. package/es/Tooltip/props/propTypes.js +0 -3
  237. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
  238. package/es/common/a11y.module.css +3 -3
  239. package/es/common/animation.module.css +624 -624
  240. package/es/common/avatarsizes.module.css +48 -48
  241. package/es/common/basic.module.css +33 -33
  242. package/es/common/basicReset.module.css +40 -40
  243. package/es/common/boxShadow.module.css +33 -33
  244. package/es/common/common.module.css +524 -524
  245. package/es/common/customscroll.module.css +142 -91
  246. package/es/common/reset.module.css +13 -13
  247. package/es/common/transition.module.css +146 -146
  248. package/es/deprecated/PortalLayer/PortalLayer.js +11 -8
  249. package/es/deprecated/PortalLayer/props/propTypes.js +10 -1
  250. package/es/index.js +2 -1
  251. package/es/semantic/Button/props/propTypes.js +1 -5
  252. package/es/semantic/Button/semanticButton.module.css +9 -9
  253. package/es/utils/Common.js +3 -0
  254. package/es/utils/dropDownUtils.js +0 -0
  255. package/es/utils/index.js +0 -2
  256. package/es/v1/Accordion/Accordion.js +66 -0
  257. package/es/v1/Accordion/AccordionItem.js +57 -0
  258. package/es/v1/Accordion/index.js +2 -0
  259. package/es/v1/Accordion/props/defaultProps.js +12 -0
  260. package/es/v1/Accordion/props/propTypes.js +33 -0
  261. package/es/v1/Animation/Animation.js +45 -0
  262. package/es/v1/Animation/props/defaultProps.js +7 -0
  263. package/es/v1/Animation/props/propTypes.js +12 -0
  264. package/es/v1/Animation/utils.js +83 -0
  265. package/es/v1/AppContainer/AppContainer.js +121 -0
  266. package/es/v1/AppContainer/props/defaultProps.js +10 -0
  267. package/es/v1/AppContainer/props/propTypes.js +17 -0
  268. package/es/v1/Avatar/Avatar.js +139 -0
  269. package/es/v1/Avatar/props/defaultProps.js +17 -0
  270. package/es/v1/Avatar/props/propTypes.js +26 -0
  271. package/es/v1/AvatarTeam/AvatarTeam.js +70 -0
  272. package/es/v1/AvatarTeam/props/defaultProps.js +17 -0
  273. package/es/v1/AvatarTeam/props/propTypes.js +27 -0
  274. package/es/v1/Button/Button.js +67 -0
  275. package/es/v1/Button/props/defaultProps.js +18 -0
  276. package/es/v1/Button/props/propTypes.js +27 -0
  277. package/es/v1/Buttongroup/Buttongroup.js +31 -0
  278. package/es/v1/Buttongroup/props/defaultProps.js +6 -0
  279. package/es/v1/Buttongroup/props/propTypes.js +9 -0
  280. package/es/v1/Card/Card.js +237 -0
  281. package/es/v1/Card/index.js +4 -0
  282. package/es/v1/Card/props/defaultProps.js +25 -0
  283. package/es/v1/Card/props/propTypes.js +48 -0
  284. package/es/v1/CheckBox/CheckBox.js +161 -0
  285. package/es/v1/CheckBox/props/defaultProps.js +18 -0
  286. package/es/v1/CheckBox/props/propTypes.js +41 -0
  287. package/es/v1/DateTime/CalendarView.js +251 -0
  288. package/es/v1/DateTime/DateTime.js +760 -0
  289. package/es/v1/DateTime/DateTimePopupFooter.js +47 -0
  290. package/es/v1/DateTime/DateTimePopupHeader.js +105 -0
  291. package/es/v1/DateTime/DateWidget.js +1107 -0
  292. package/es/v1/DateTime/DaysRow.js +31 -0
  293. package/es/v1/DateTime/Time.js +166 -0
  294. package/es/v1/DateTime/YearView.js +264 -0
  295. package/es/v1/DateTime/index.js +1 -0
  296. package/es/v1/DateTime/props/defaultProps.js +57 -0
  297. package/es/v1/DateTime/props/propTypes.js +195 -0
  298. package/es/v1/DropBox/DropBox.js +79 -0
  299. package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +133 -0
  300. package/es/v1/DropBox/DropBoxElement/props/defaultProps.js +18 -0
  301. package/es/v1/DropBox/DropBoxElement/props/propTypes.js +51 -0
  302. package/es/v1/DropBox/props/defaultProps.js +14 -0
  303. package/es/v1/DropBox/props/propTypes.js +16 -0
  304. package/es/v1/DropBox/utils/isMobilePopover.js +17 -0
  305. package/es/v1/DropDown/DropDown.js +53 -0
  306. package/es/v1/DropDown/DropDownHeading.js +36 -0
  307. package/es/v1/DropDown/DropDownItem.js +56 -0
  308. package/es/v1/DropDown/DropDownSearch.js +55 -0
  309. package/es/v1/DropDown/DropDownSeparator.js +12 -0
  310. package/es/v1/DropDown/props/defaultProps.js +20 -0
  311. package/es/v1/DropDown/props/propTypes.js +65 -0
  312. package/es/v1/Heading/Heading.js +32 -0
  313. package/es/v1/Heading/props/defaultProps.js +5 -0
  314. package/es/v1/Heading/props/propTypes.js +11 -0
  315. package/es/v1/Label/Label.js +40 -0
  316. package/es/v1/Label/props/defaultProps.js +11 -0
  317. package/es/v1/Label/props/propTypes.js +19 -0
  318. package/es/v1/Layout/Box.js +115 -0
  319. package/es/v1/Layout/Container.js +132 -0
  320. package/es/v1/Layout/index.js +2 -0
  321. package/es/v1/Layout/props/defaultProps.js +16 -0
  322. package/es/v1/Layout/props/propTypes.js +46 -0
  323. package/es/v1/ListItem/ListContainer.js +104 -0
  324. package/es/v1/ListItem/ListItem.js +123 -0
  325. package/es/v1/ListItem/ListItemWithAvatar.js +143 -0
  326. package/es/v1/ListItem/ListItemWithCheckBox.js +103 -0
  327. package/es/v1/ListItem/ListItemWithIcon.js +126 -0
  328. package/es/v1/ListItem/ListItemWithRadio.js +104 -0
  329. package/es/v1/ListItem/index.js +6 -0
  330. package/es/v1/ListItem/props/defaultProps.js +97 -0
  331. package/es/v1/ListItem/props/propTypes.js +202 -0
  332. package/es/v1/Modal/Modal.js +125 -0
  333. package/es/v1/Modal/props/defaultProps.js +3 -0
  334. package/es/v1/Modal/props/propTypes.js +7 -0
  335. package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1079 -0
  336. package/es/v1/MultiSelect/AdvancedMultiSelect.js +567 -0
  337. package/es/v1/MultiSelect/EmptyState.js +64 -0
  338. package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +50 -0
  339. package/es/v1/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
  340. package/es/v1/MultiSelect/MobileHeader/props/propTypes.js +7 -0
  341. package/es/v1/MultiSelect/MultiSelect.js +1103 -0
  342. package/es/v1/MultiSelect/MultiSelectHeader.js +32 -0
  343. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +199 -0
  344. package/es/v1/MultiSelect/SelectedOptions.js +80 -0
  345. package/es/v1/MultiSelect/Suggestions.js +141 -0
  346. package/es/v1/MultiSelect/index.js +4 -0
  347. package/es/v1/MultiSelect/props/defaultProps.js +155 -0
  348. package/es/v1/MultiSelect/props/propTypes.js +312 -0
  349. package/es/v1/PopOver/PopOver.js +176 -0
  350. package/es/v1/PopOver/props/defaultProps.js +7 -0
  351. package/es/v1/PopOver/props/propTypes.js +53 -0
  352. package/es/v1/Popup/Popup.js +644 -0
  353. package/es/v1/Radio/Radio.js +130 -0
  354. package/es/v1/Radio/props/defaultProps.js +15 -0
  355. package/es/v1/Radio/props/propTypes.js +40 -0
  356. package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +56 -0
  357. package/es/v1/ResponsiveDropBox/props/defaultProps.js +4 -0
  358. package/es/v1/ResponsiveDropBox/props/propTypes.js +8 -0
  359. package/es/v1/Ribbon/Ribbon.js +33 -0
  360. package/es/v1/Ribbon/props/defaultProps.js +9 -0
  361. package/es/v1/Ribbon/props/propTypes.js +11 -0
  362. package/es/v1/RippleEffect/RippleEffect.js +25 -0
  363. package/es/v1/RippleEffect/props/defaultProps.js +10 -0
  364. package/es/v1/RippleEffect/props/propTypes.js +12 -0
  365. package/es/v1/Select/GroupSelect.js +805 -0
  366. package/es/v1/Select/Select.js +973 -0
  367. package/es/v1/Select/SelectWithAvatar.js +344 -0
  368. package/es/v1/Select/SelectWithIcon.js +535 -0
  369. package/es/v1/Select/index.js +4 -0
  370. package/es/v1/Select/props/defaultProps.js +120 -0
  371. package/es/v1/Select/props/propTypes.js +288 -0
  372. package/es/v1/Stencils/Stencils.js +26 -0
  373. package/es/v1/Stencils/props/defaultProps.js +6 -0
  374. package/es/v1/Stencils/props/propTypes.js +7 -0
  375. package/es/v1/Switch/Switch.js +94 -0
  376. package/es/v1/Switch/props/defaultProps.js +11 -0
  377. package/es/v1/Switch/props/propTypes.js +28 -0
  378. package/es/v1/Tab/Tab.js +106 -0
  379. package/es/v1/Tab/TabContent.js +30 -0
  380. package/es/v1/Tab/TabContentWrapper.js +33 -0
  381. package/es/v1/Tab/TabWrapper.js +55 -0
  382. package/es/v1/Tab/Tabs.js +523 -0
  383. package/es/v1/Tab/index.js +5 -0
  384. package/es/v1/Tab/props/defaultProps.js +45 -0
  385. package/es/v1/Tab/props/propTypes.js +108 -0
  386. package/es/v1/Tab/v1Tab.module.css +100 -0
  387. package/es/v1/Tab/v1TabContent.module.css +4 -0
  388. package/es/v1/Tab/v1Tabs.module.css +137 -0
  389. package/es/v1/Tag/Tag.js +138 -0
  390. package/es/v1/Tag/props/defaultProps.js +14 -0
  391. package/es/v1/Tag/props/propTypes.js +35 -0
  392. package/es/v1/TextBox/TextBox.js +160 -0
  393. package/es/v1/TextBox/props/defaultProps.js +20 -0
  394. package/es/v1/TextBox/props/propTypes.js +56 -0
  395. package/es/v1/TextBoxIcon/TextBoxIcon.js +158 -0
  396. package/es/v1/TextBoxIcon/props/defaultProps.js +23 -0
  397. package/es/v1/TextBoxIcon/props/propTypes.js +52 -0
  398. package/es/v1/Textarea/Textarea.js +100 -0
  399. package/es/v1/Textarea/props/defaultProps.js +17 -0
  400. package/es/v1/Textarea/props/propTypes.js +31 -0
  401. package/es/v1/Tooltip/Tooltip.js +520 -0
  402. package/es/v1/Tooltip/props/defaultProps.js +4 -0
  403. package/es/v1/Tooltip/props/propTypes.js +5 -0
  404. package/es/v1/Typography/Typography.js +38 -0
  405. package/es/v1/Typography/css/Typography.module.css +380 -0
  406. package/es/v1/Typography/css/cssJSLogic.js +56 -0
  407. package/es/v1/Typography/props/defaultProps.js +8 -0
  408. package/es/v1/Typography/props/propTypes.js +27 -0
  409. package/es/v1/Typography/utils/index.js +50 -0
  410. package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +69 -0
  411. package/es/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +7 -0
  412. package/es/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +12 -0
  413. package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +99 -0
  414. package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +15 -0
  415. package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +19 -0
  416. package/es/v1/semantic/Button/Button.js +53 -0
  417. package/es/v1/semantic/Button/props/defaultProps.js +12 -0
  418. package/es/v1/semantic/Button/props/propTypes.js +22 -0
  419. package/es/v1/semantic/index.js +1 -0
  420. package/install.md +10 -10
  421. package/lib/Animation/Animation.js +4 -86
  422. package/lib/Animation/utils.js +94 -0
  423. package/lib/AppContainer/AppContainer.js +5 -0
  424. package/lib/AppContainer/AppContainer.module.css +18 -18
  425. package/lib/Avatar/Avatar.js +11 -10
  426. package/lib/Avatar/Avatar.module.css +175 -175
  427. package/lib/Avatar/__tests__/Avatar.spec.js +156 -176
  428. package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -288
  429. package/lib/AvatarTeam/AvatarTeam.js +7 -7
  430. package/lib/AvatarTeam/AvatarTeam.module.css +189 -189
  431. package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +125 -72
  432. package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +705 -226
  433. package/lib/Button/Button.js +11 -7
  434. package/lib/Button/__tests__/Button.spec.js +129 -0
  435. package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
  436. package/lib/Button/css/Button.module.css +528 -526
  437. package/lib/Button/css/cssJSLogic.js +1 -1
  438. package/lib/Button/props/defaultProps.js +2 -1
  439. package/lib/Button/props/propTypes.js +3 -2
  440. package/lib/Buttongroup/Buttongroup.js +1 -1
  441. package/lib/Buttongroup/Buttongroup.module.css +104 -105
  442. package/lib/Buttongroup/__tests__/Buttongroup.spec.js +44 -0
  443. package/lib/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +191 -0
  444. package/lib/Card/Card.js +4 -4
  445. package/lib/Card/Card.module.css +20 -20
  446. package/lib/Card/props/propTypes.js +9 -4
  447. package/lib/CheckBox/CheckBox.js +34 -24
  448. package/lib/CheckBox/CheckBox.module.css +157 -157
  449. package/lib/CheckBox/props/propTypes.js +1 -2
  450. package/lib/DateTime/CalendarView.js +0 -0
  451. package/lib/DateTime/DateTime.js +3 -30
  452. package/lib/DateTime/DateTime.module.css +248 -235
  453. package/lib/DateTime/DateTimePopupFooter.js +7 -1
  454. package/lib/DateTime/DateTimePopupHeader.js +4 -1
  455. package/lib/DateTime/DateWidget.js +24 -19
  456. package/lib/DateTime/DateWidget.module.css +38 -38
  457. package/lib/DateTime/DaysRow.js +4 -1
  458. package/lib/DateTime/Time.js +6 -0
  459. package/lib/DateTime/YearView.js +0 -1
  460. package/lib/DateTime/YearView.module.css +98 -98
  461. package/lib/DateTime/common.js +0 -0
  462. package/lib/DateTime/dateFormatUtils/dateFormat.js +16 -2
  463. package/lib/DateTime/dateFormatUtils/dayChange.js +3 -1
  464. package/lib/DateTime/dateFormatUtils/index.js +3 -7
  465. package/lib/DateTime/dateFormatUtils/monthChange.js +3 -1
  466. package/lib/DateTime/dateFormatUtils/timeChange.js +3 -3
  467. package/lib/DateTime/dateFormatUtils/yearChange.js +3 -1
  468. package/lib/DateTime/index.js +0 -0
  469. package/lib/DateTime/objectUtils.js +0 -0
  470. package/lib/DateTime/props/defaultProps.js +10 -2
  471. package/lib/DateTime/props/propTypes.js +64 -8
  472. package/lib/DateTime/typeChecker.js +0 -0
  473. package/lib/DateTime/validator.js +0 -0
  474. package/lib/DropBox/DropBox.js +18 -28
  475. package/lib/DropBox/DropBoxElement/DropBoxElement.js +3 -2
  476. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +431 -434
  477. package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +1 -1
  478. package/lib/DropBox/DropBoxElement/props/propTypes.js +7 -1
  479. package/lib/DropBox/DropBoxPositionMapping.json +144 -144
  480. package/lib/DropBox/css/DropBox.module.css +58 -58
  481. package/lib/DropBox/props/propTypes.js +2 -1
  482. package/lib/DropBox/utils/isMobilePopover.js +25 -0
  483. package/lib/DropDown/DropDown.js +1 -6
  484. package/lib/DropDown/DropDown.module.css +5 -5
  485. package/lib/DropDown/DropDownHeading.js +0 -0
  486. package/lib/DropDown/DropDownHeading.module.css +53 -53
  487. package/lib/DropDown/DropDownItem.js +0 -0
  488. package/lib/DropDown/DropDownItem.module.css +94 -94
  489. package/lib/DropDown/DropDownSearch.js +0 -0
  490. package/lib/DropDown/DropDownSearch.module.css +14 -14
  491. package/lib/DropDown/DropDownSeparator.js +0 -0
  492. package/lib/DropDown/DropDownSeparator.module.css +7 -7
  493. package/lib/DropDown/props/propTypes.js +11 -19
  494. package/lib/Heading/Heading.module.css +4 -4
  495. package/lib/Label/Label.js +6 -2
  496. package/lib/Label/Label.module.css +57 -52
  497. package/lib/Label/LabelColors.module.css +20 -20
  498. package/lib/Label/__tests__/Label.spec.js +86 -117
  499. package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -101
  500. package/lib/Label/props/propTypes.js +5 -1
  501. package/lib/Layout/Box.js +0 -1
  502. package/lib/Layout/Container.js +0 -1
  503. package/lib/Layout/Layout.module.css +335 -335
  504. package/lib/Layout/utils.js +0 -0
  505. package/lib/ListItem/ListContainer.js +10 -2
  506. package/lib/ListItem/ListItem.js +0 -0
  507. package/lib/ListItem/ListItem.module.css +205 -216
  508. package/lib/ListItem/props/propTypes.js +9 -4
  509. package/lib/Modal/props/propTypes.js +2 -1
  510. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +12 -11
  511. package/lib/MultiSelect/AdvancedMultiSelect.js +4 -4
  512. package/lib/MultiSelect/MobileHeader/MobileHeader.js +62 -0
  513. package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
  514. package/lib/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
  515. package/lib/MultiSelect/MobileHeader/props/propTypes.js +18 -0
  516. package/lib/MultiSelect/MultiSelect.js +183 -180
  517. package/lib/MultiSelect/MultiSelect.module.css +204 -207
  518. package/lib/MultiSelect/MultiSelectHeader.js +1 -2
  519. package/lib/MultiSelect/MultiSelectWithAvatar.js +76 -188
  520. package/lib/MultiSelect/SelectedOptions.module.css +15 -15
  521. package/lib/MultiSelect/Suggestions.js +2 -1
  522. package/lib/MultiSelect/props/defaultProps.js +6 -2
  523. package/lib/MultiSelect/props/propTypes.js +163 -215
  524. package/lib/PopOver/PopOver.js +1 -8
  525. package/lib/PopOver/PopOver.module.css +9 -8
  526. package/lib/Popup/Popup.js +0 -0
  527. package/lib/Popup/PositionMapping.json +73 -73
  528. package/lib/Radio/Radio.js +46 -32
  529. package/lib/Radio/Radio.module.css +115 -112
  530. package/lib/Radio/__tests__/Radio.spec.js +250 -0
  531. package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +1837 -0
  532. package/lib/Radio/props/defaultProps.js +1 -0
  533. package/lib/Radio/props/propTypes.js +10 -2
  534. package/lib/Responsive/CustomResponsive.js +0 -0
  535. package/lib/Responsive/RefWrapper.js +2 -1
  536. package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -6
  537. package/lib/ResponsiveDropBox/props/propTypes.js +11 -2
  538. package/lib/Ribbon/Ribbon.js +0 -0
  539. package/lib/Ribbon/Ribbon.module.css +499 -454
  540. package/lib/Ribbon/__tests__/Ribbon.spec.js +38 -172
  541. package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -163
  542. package/lib/RippleEffect/RippleEffect.js +5 -4
  543. package/lib/RippleEffect/RippleEffect.module.css +92 -92
  544. package/lib/RippleEffect/__tests__/RippleEffect.spec.js +76 -0
  545. package/lib/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +171 -0
  546. package/lib/RippleEffect/props/defaultProps.js +1 -0
  547. package/lib/RippleEffect/props/propTypes.js +1 -0
  548. package/lib/Select/GroupSelect.js +13 -8
  549. package/lib/Select/Select.js +19 -9
  550. package/lib/Select/Select.module.css +134 -108
  551. package/lib/Select/SelectWithAvatar.js +2 -1
  552. package/lib/Select/SelectWithIcon.js +5 -3
  553. package/lib/Select/props/defaultProps.js +1 -0
  554. package/lib/Select/props/propTypes.js +29 -8
  555. package/lib/Stencils/Stencils.js +0 -0
  556. package/lib/Stencils/Stencils.module.css +96 -96
  557. package/lib/Stencils/__tests__/Stencils.spec.js +34 -65
  558. package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +89 -49
  559. package/lib/Switch/Switch.js +2 -2
  560. package/lib/Switch/Switch.module.css +127 -127
  561. package/lib/Switch/__tests__/Switch.spec.js +163 -0
  562. package/lib/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -0
  563. package/lib/Tab/Tab.module.css +100 -100
  564. package/lib/Tab/TabContent.module.css +4 -4
  565. package/lib/Tab/TabContentWrapper.js +9 -4
  566. package/lib/Tab/Tabs.js +11 -11
  567. package/lib/Tab/Tabs.module.css +136 -136
  568. package/lib/Tab/props/defaultProps.js +2 -1
  569. package/lib/Tab/props/propTypes.js +3 -2
  570. package/lib/Tag/Tag.js +12 -11
  571. package/lib/Tag/Tag.module.css +253 -254
  572. package/lib/Tag/props/propTypes.js +2 -1
  573. package/lib/TextBox/TextBox.js +19 -11
  574. package/lib/TextBox/TextBox.module.css +197 -158
  575. package/lib/TextBox/props/defaultProps.js +1 -1
  576. package/lib/TextBox/props/propTypes.js +1 -1
  577. package/lib/TextBoxIcon/TextBoxIcon.js +2 -0
  578. package/lib/TextBoxIcon/TextBoxIcon.module.css +79 -79
  579. package/lib/TextBoxIcon/props/defaultProps.js +1 -0
  580. package/lib/TextBoxIcon/props/propTypes.js +12 -2
  581. package/lib/Textarea/Textarea.js +0 -0
  582. package/lib/Textarea/Textarea.module.css +140 -139
  583. package/lib/Textarea/props/propTypes.js +0 -1
  584. package/lib/Tooltip/Tooltip.js +4 -2
  585. package/lib/Tooltip/Tooltip.module.css +140 -140
  586. package/lib/Tooltip/props/propTypes.js +0 -3
  587. package/lib/common/a11y.module.css +3 -3
  588. package/lib/common/animation.module.css +624 -624
  589. package/lib/common/avatarsizes.module.css +48 -48
  590. package/lib/common/basic.module.css +33 -33
  591. package/lib/common/basicReset.module.css +40 -40
  592. package/lib/common/boxShadow.module.css +33 -33
  593. package/lib/common/common.module.css +524 -524
  594. package/lib/common/customscroll.module.css +142 -91
  595. package/lib/common/reset.module.css +13 -13
  596. package/lib/common/transition.module.css +146 -146
  597. package/lib/deprecated/PortalLayer/PortalLayer.js +2 -1
  598. package/lib/deprecated/PortalLayer/props/propTypes.js +13 -3
  599. package/lib/index.js +10 -1
  600. package/lib/semantic/Button/props/propTypes.js +1 -5
  601. package/lib/semantic/Button/semanticButton.module.css +9 -9
  602. package/lib/utils/Common.js +5 -0
  603. package/lib/utils/dropDownUtils.js +0 -0
  604. package/lib/utils/index.js +1 -19
  605. package/lib/v1/Accordion/Accordion.js +98 -0
  606. package/lib/v1/Accordion/AccordionItem.js +68 -0
  607. package/lib/v1/Accordion/index.js +23 -0
  608. package/lib/v1/Accordion/props/defaultProps.js +20 -0
  609. package/lib/v1/Accordion/props/propTypes.js +45 -0
  610. package/lib/v1/Animation/Animation.js +61 -0
  611. package/lib/v1/Animation/props/defaultProps.js +14 -0
  612. package/lib/v1/Animation/props/propTypes.js +23 -0
  613. package/lib/v1/Animation/utils.js +94 -0
  614. package/lib/v1/AppContainer/AppContainer.js +158 -0
  615. package/lib/v1/AppContainer/props/defaultProps.js +17 -0
  616. package/lib/v1/AppContainer/props/propTypes.js +28 -0
  617. package/lib/v1/Avatar/Avatar.js +191 -0
  618. package/lib/v1/Avatar/props/defaultProps.js +24 -0
  619. package/lib/v1/Avatar/props/propTypes.js +37 -0
  620. package/lib/v1/AvatarTeam/AvatarTeam.js +81 -0
  621. package/lib/v1/AvatarTeam/props/defaultProps.js +24 -0
  622. package/lib/v1/AvatarTeam/props/propTypes.js +38 -0
  623. package/lib/v1/Button/Button.js +82 -0
  624. package/lib/v1/Button/props/defaultProps.js +27 -0
  625. package/lib/v1/Button/props/propTypes.js +39 -0
  626. package/lib/v1/Buttongroup/Buttongroup.js +44 -0
  627. package/lib/v1/Buttongroup/props/defaultProps.js +13 -0
  628. package/lib/v1/Buttongroup/props/propTypes.js +20 -0
  629. package/lib/v1/Card/Card.js +269 -0
  630. package/lib/v1/Card/index.js +37 -0
  631. package/lib/v1/Card/props/defaultProps.js +35 -0
  632. package/lib/v1/Card/props/propTypes.js +62 -0
  633. package/lib/v1/CheckBox/CheckBox.js +172 -0
  634. package/lib/v1/CheckBox/props/defaultProps.js +25 -0
  635. package/lib/v1/CheckBox/props/propTypes.js +52 -0
  636. package/lib/v1/DateTime/CalendarView.js +319 -0
  637. package/lib/v1/DateTime/DateTime.js +849 -0
  638. package/lib/v1/DateTime/DateTimePopupFooter.js +96 -0
  639. package/lib/v1/DateTime/DateTimePopupHeader.js +166 -0
  640. package/lib/v1/DateTime/DateWidget.js +1134 -0
  641. package/lib/v1/DateTime/DaysRow.js +80 -0
  642. package/lib/v1/DateTime/Time.js +254 -0
  643. package/lib/v1/DateTime/YearView.js +325 -0
  644. package/lib/v1/DateTime/index.js +15 -0
  645. package/lib/v1/DateTime/props/defaultProps.js +70 -0
  646. package/lib/v1/DateTime/props/propTypes.js +227 -0
  647. package/lib/v1/DropBox/DropBox.js +109 -0
  648. package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +146 -0
  649. package/lib/v1/DropBox/DropBoxElement/props/defaultProps.js +25 -0
  650. package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +62 -0
  651. package/lib/v1/DropBox/props/defaultProps.js +30 -0
  652. package/lib/v1/DropBox/props/propTypes.js +35 -0
  653. package/lib/v1/DropBox/utils/isMobilePopover.js +25 -0
  654. package/lib/v1/DropDown/DropDown.js +74 -0
  655. package/lib/v1/DropDown/DropDownHeading.js +47 -0
  656. package/lib/v1/DropDown/DropDownItem.js +75 -0
  657. package/lib/v1/DropDown/DropDownSearch.js +74 -0
  658. package/lib/v1/DropDown/DropDownSeparator.js +24 -0
  659. package/lib/v1/DropDown/props/defaultProps.js +30 -0
  660. package/lib/v1/DropDown/props/propTypes.js +87 -0
  661. package/lib/v1/Heading/Heading.js +49 -0
  662. package/lib/v1/Heading/props/defaultProps.js +12 -0
  663. package/lib/v1/Heading/props/propTypes.js +22 -0
  664. package/lib/v1/Label/Label.js +51 -0
  665. package/lib/v1/Label/props/defaultProps.js +18 -0
  666. package/lib/v1/Label/props/propTypes.js +30 -0
  667. package/lib/v1/Layout/Box.js +128 -0
  668. package/lib/v1/Layout/Container.js +145 -0
  669. package/lib/v1/Layout/index.js +23 -0
  670. package/lib/v1/Layout/props/defaultProps.js +24 -0
  671. package/lib/v1/Layout/props/propTypes.js +58 -0
  672. package/lib/v1/ListItem/ListContainer.js +128 -0
  673. package/lib/v1/ListItem/ListItem.js +138 -0
  674. package/lib/v1/ListItem/ListItemWithAvatar.js +167 -0
  675. package/lib/v1/ListItem/ListItemWithCheckBox.js +125 -0
  676. package/lib/v1/ListItem/ListItemWithIcon.js +143 -0
  677. package/lib/v1/ListItem/ListItemWithRadio.js +126 -0
  678. package/lib/v1/ListItem/index.js +55 -0
  679. package/lib/v1/ListItem/props/defaultProps.js +109 -0
  680. package/lib/v1/ListItem/props/propTypes.js +196 -0
  681. package/lib/v1/Modal/Modal.js +166 -0
  682. package/lib/v1/Modal/props/defaultProps.js +10 -0
  683. package/lib/v1/Modal/props/propTypes.js +18 -0
  684. package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1167 -0
  685. package/lib/v1/MultiSelect/AdvancedMultiSelect.js +634 -0
  686. package/lib/v1/MultiSelect/EmptyState.js +112 -0
  687. package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +62 -0
  688. package/lib/v1/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
  689. package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +18 -0
  690. package/lib/v1/MultiSelect/MultiSelect.js +1186 -0
  691. package/lib/{Tooltip/__tests__/Tooltip.spec.js → v1/MultiSelect/MultiSelectHeader.js} +38 -58
  692. package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +253 -0
  693. package/lib/v1/MultiSelect/SelectedOptions.js +126 -0
  694. package/lib/v1/MultiSelect/Suggestions.js +196 -0
  695. package/lib/v1/MultiSelect/index.js +39 -0
  696. package/lib/v1/MultiSelect/props/defaultProps.js +171 -0
  697. package/lib/v1/MultiSelect/props/propTypes.js +340 -0
  698. package/lib/v1/PopOver/PopOver.js +197 -0
  699. package/lib/v1/PopOver/props/defaultProps.js +15 -0
  700. package/lib/v1/PopOver/props/propTypes.js +66 -0
  701. package/lib/v1/Popup/Popup.js +715 -0
  702. package/lib/v1/Radio/Radio.js +141 -0
  703. package/lib/v1/Radio/props/defaultProps.js +22 -0
  704. package/lib/v1/Radio/props/propTypes.js +51 -0
  705. package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +79 -0
  706. package/lib/v1/ResponsiveDropBox/props/defaultProps.js +11 -0
  707. package/lib/v1/ResponsiveDropBox/props/propTypes.js +27 -0
  708. package/lib/v1/Ribbon/Ribbon.js +44 -0
  709. package/lib/v1/Ribbon/props/defaultProps.js +16 -0
  710. package/lib/v1/Ribbon/props/propTypes.js +22 -0
  711. package/lib/v1/RippleEffect/RippleEffect.js +40 -0
  712. package/lib/v1/RippleEffect/props/defaultProps.js +17 -0
  713. package/lib/v1/RippleEffect/props/propTypes.js +23 -0
  714. package/lib/v1/Select/GroupSelect.js +881 -0
  715. package/lib/v1/Select/Select.js +1023 -0
  716. package/lib/v1/Select/SelectWithAvatar.js +394 -0
  717. package/lib/v1/Select/SelectWithIcon.js +597 -0
  718. package/lib/v1/Select/index.js +39 -0
  719. package/lib/v1/Select/props/defaultProps.js +121 -0
  720. package/lib/v1/Select/props/propTypes.js +310 -0
  721. package/lib/{DateTime/__tests__/CalendarView.spec.js → v1/Stencils/Stencils.js} +30 -32
  722. package/lib/v1/Stencils/props/defaultProps.js +13 -0
  723. package/lib/v1/Stencils/props/propTypes.js +18 -0
  724. package/lib/v1/Switch/Switch.js +108 -0
  725. package/lib/v1/Switch/props/defaultProps.js +18 -0
  726. package/lib/v1/Switch/props/propTypes.js +39 -0
  727. package/lib/v1/Tab/Tab.js +132 -0
  728. package/lib/v1/Tab/TabContent.js +42 -0
  729. package/lib/v1/Tab/TabContentWrapper.js +47 -0
  730. package/lib/v1/Tab/TabWrapper.js +89 -0
  731. package/lib/v1/Tab/Tabs.js +591 -0
  732. package/lib/v1/Tab/index.js +47 -0
  733. package/lib/v1/Tab/props/defaultProps.js +56 -0
  734. package/lib/v1/Tab/props/propTypes.js +123 -0
  735. package/lib/v1/Tab/v1Tab.module.css +100 -0
  736. package/lib/v1/Tab/v1TabContent.module.css +4 -0
  737. package/lib/v1/Tab/v1Tabs.module.css +137 -0
  738. package/lib/v1/Tag/Tag.js +157 -0
  739. package/lib/v1/Tag/props/defaultProps.js +21 -0
  740. package/lib/v1/Tag/props/propTypes.js +46 -0
  741. package/lib/v1/TextBox/TextBox.js +175 -0
  742. package/lib/v1/TextBox/props/defaultProps.js +27 -0
  743. package/lib/v1/TextBox/props/propTypes.js +62 -0
  744. package/lib/v1/TextBoxIcon/TextBoxIcon.js +198 -0
  745. package/lib/v1/TextBoxIcon/props/defaultProps.js +30 -0
  746. package/lib/v1/TextBoxIcon/props/propTypes.js +71 -0
  747. package/lib/v1/Textarea/Textarea.js +118 -0
  748. package/lib/v1/Textarea/props/defaultProps.js +24 -0
  749. package/lib/v1/Textarea/props/propTypes.js +42 -0
  750. package/lib/v1/Tooltip/Tooltip.js +588 -0
  751. package/lib/v1/Tooltip/props/defaultProps.js +11 -0
  752. package/lib/v1/Tooltip/props/propTypes.js +16 -0
  753. package/lib/v1/Typography/Typography.js +56 -0
  754. package/lib/v1/Typography/css/Typography.module.css +380 -0
  755. package/lib/v1/Typography/css/cssJSLogic.js +48 -0
  756. package/lib/v1/Typography/props/defaultProps.js +15 -0
  757. package/lib/v1/Typography/props/propTypes.js +38 -0
  758. package/lib/v1/Typography/utils/index.js +59 -0
  759. package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +90 -0
  760. package/lib/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +14 -0
  761. package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +23 -0
  762. package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +126 -0
  763. package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +22 -0
  764. package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +30 -0
  765. package/lib/v1/semantic/Button/Button.js +63 -0
  766. package/lib/v1/semantic/Button/props/defaultProps.js +19 -0
  767. package/lib/v1/semantic/Button/props/propTypes.js +33 -0
  768. package/lib/v1/semantic/index.js +15 -0
  769. package/package.json +98 -117
  770. package/postPublish.js +8 -8
  771. package/prePublish.js +70 -70
  772. package/propValidationArg.json +12 -0
  773. package/react-cli.config.js +24 -0
  774. package/result.json +1 -0
  775. package/es/Accordion/__tests__/Accordion.spec.js +0 -79
  776. package/es/Animation/__tests__/Animation.spec.js +0 -17
  777. package/es/Buttongroup/__test__/Buttongroup.spec.js +0 -73
  778. package/es/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
  779. package/es/Card/__tests__/Card.spec.js +0 -36
  780. package/es/CheckBox/__tests__/CheckBox.spec.js +0 -12
  781. package/es/DateTime/__tests__/CalendarView.spec.js +0 -33
  782. package/es/DateTime/__tests__/DateTime.spec.js +0 -115
  783. package/es/DateTime/__tests__/DateWidget.spec.js +0 -75
  784. package/es/DropBox/__tests__/DropBox.spec.js +0 -81
  785. package/es/DropDown/__tests__/DropDown.spec.js +0 -44
  786. package/es/DropDown/__tests__/DropDownItem.spec.js +0 -45
  787. package/es/DropDown/__tests__/DropDownSearch.spec.js +0 -11
  788. package/es/Layout/__tests__/Box.spec.js +0 -114
  789. package/es/Layout/__tests__/Container.spec.js +0 -120
  790. package/es/MultiSelect/__tests__/MultiSelect.spec.js +0 -160
  791. package/es/PopOver/__tests__/PopOver.spec.js +0 -14
  792. package/es/Popup/__tests__/Popup.spec.js +0 -134
  793. package/es/Radio/__tests__/Radiospec.js +0 -23
  794. package/es/Select/__tests__/Select.spec.js +0 -345
  795. package/es/Tab/__tests__/Tab.spec.js +0 -117
  796. package/es/Tab/__tests__/TabContent.spec.js +0 -16
  797. package/es/Tab/__tests__/TabContentWrapper.spec.js +0 -50
  798. package/es/Tab/__tests__/TabWrapper.spec.js +0 -86
  799. package/es/Tab/__tests__/Tabs.spec.js +0 -115
  800. package/es/Tag/__tests__/Tag.spec.js +0 -28
  801. package/es/TextBox/__tests__/TextBox.spec.js +0 -189
  802. package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
  803. package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -212
  804. package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
  805. package/es/Textarea/__tests__/Textarea.spec.js +0 -171
  806. package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
  807. package/es/Tooltip/__tests__/Tooltip.spec.js +0 -52
  808. package/es/deprecated/AdvancedMultiSelect.module.css +0 -127
  809. package/es/deprecated/advancedMultiSelectVariableJson.js +0 -80
  810. package/es/utils/__tests__/constructFullName.spec.js +0 -9
  811. package/es/utils/__tests__/debounce.spec.js +0 -37
  812. package/es/utils/__tests__/getInitial.spec.js +0 -23
  813. package/es/utils/css/compileClassNames.js +0 -28
  814. package/es/utils/css/mergeStyle.js +0 -57
  815. package/es/utils/css/utils.js +0 -24
  816. package/lib/Accordion/__tests__/Accordion.spec.js +0 -85
  817. package/lib/Animation/__tests__/Animation.spec.js +0 -23
  818. package/lib/Buttongroup/__test__/Buttongroup.spec.js +0 -86
  819. package/lib/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
  820. package/lib/Card/__tests__/Card.spec.js +0 -56
  821. package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -18
  822. package/lib/DateTime/__tests__/DateTime.spec.js +0 -127
  823. package/lib/DateTime/__tests__/DateWidget.spec.js +0 -81
  824. package/lib/DropBox/__tests__/DropBox.spec.js +0 -87
  825. package/lib/DropDown/__tests__/DropDown.spec.js +0 -50
  826. package/lib/DropDown/__tests__/DropDownItem.spec.js +0 -51
  827. package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -17
  828. package/lib/Layout/__tests__/Box.spec.js +0 -121
  829. package/lib/Layout/__tests__/Container.spec.js +0 -127
  830. package/lib/MultiSelect/__tests__/MultiSelect.spec.js +0 -170
  831. package/lib/PopOver/__tests__/PopOver.spec.js +0 -20
  832. package/lib/Popup/__tests__/Popup.spec.js +0 -192
  833. package/lib/Radio/__tests__/Radiospec.js +0 -29
  834. package/lib/Select/__tests__/Select.spec.js +0 -383
  835. package/lib/Tab/__tests__/Tab.spec.js +0 -123
  836. package/lib/Tab/__tests__/TabContent.spec.js +0 -22
  837. package/lib/Tab/__tests__/TabContentWrapper.spec.js +0 -59
  838. package/lib/Tab/__tests__/TabWrapper.spec.js +0 -100
  839. package/lib/Tab/__tests__/Tabs.spec.js +0 -123
  840. package/lib/Tag/__tests__/Tag.spec.js +0 -35
  841. package/lib/TextBox/__tests__/TextBox.spec.js +0 -205
  842. package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
  843. package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -228
  844. package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
  845. package/lib/Textarea/__tests__/Textarea.spec.js +0 -186
  846. package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
  847. package/lib/deprecated/AdvancedMultiSelect.module.css +0 -127
  848. package/lib/deprecated/advancedMultiSelectVariableJson.js +0 -82
  849. package/lib/utils/__tests__/constructFullName.spec.js +0 -12
  850. package/lib/utils/__tests__/debounce.spec.js +0 -40
  851. package/lib/utils/__tests__/getInitial.spec.js +0 -26
  852. package/lib/utils/css/compileClassNames.js +0 -37
  853. package/lib/utils/css/mergeStyle.js +0 -69
  854. package/lib/utils/css/utils.js +0 -41
@@ -0,0 +1,1107 @@
1
+ /**** Libraries ****/
2
+ import React from 'react';
3
+ import { DateWidget_propTypes } from './props/propTypes';
4
+ import { DateWidget_defaultProps } from './props/defaultProps';
5
+ /**** Components ****/
6
+
7
+ import DateTime from './DateTime';
8
+ import Popup from '../Popup/Popup';
9
+ import { Icon } from '@zohodesk/icons';
10
+ import { Container } from '../Layout';
11
+ import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
12
+ /**** CSS ****/
13
+
14
+ import style from '../../DateTime/DateWidget.module.css';
15
+ /**** Methods ****/
16
+
17
+ import validator from '../../DateTime/validator';
18
+ import { formatDate } from '../../utils/datetime/common';
19
+ import { getIsSupportedKey, arrayIsNotEqual } from '../../DateTime/dateFormatUtils';
20
+ import { getDateFormatDetails, getDateFormatSelection, getDateTimeString, getDateDetails, getIsValidDate, getSelectedDate, getDateText } from '../../DateTime/dateFormatUtils/dateFormat';
21
+ import { getChangedDay } from '../../DateTime/dateFormatUtils/dayChange';
22
+ import { getChangedMonth } from '../../DateTime/dateFormatUtils/monthChange';
23
+ import { getChangedYear } from '../../DateTime/dateFormatUtils/yearChange';
24
+ import { getChangedHour, getChangedMinute, getChangedNoon } from '../../DateTime/dateFormatUtils/timeChange';
25
+ import { getIsEmptyValue } from '../../utils/Common';
26
+ /** * Constants ** */
27
+
28
+ import { INVALID_DATE, i18nShortMonths, i18nMonths } from '../../DateTime/constants';
29
+ /* eslint-disable react/no-unused-prop-types */
30
+
31
+ /* eslint css-modules/no-unused-class: [0, { markAsUsed: 'inputLine'] }] */
32
+
33
+ class DateWidgetComponent extends React.Component {
34
+ constructor(props) {
35
+ super(props);
36
+ this.handleSelect = this.handleSelect.bind(this);
37
+ this.handleTogglePopup = this.handleTogglePopup.bind(this);
38
+ this.handleGetDisplayText = this.handleGetDisplayText.bind(this);
39
+ this.handleKeyDown = this.handleKeyDown.bind(this);
40
+ this.handleFocus = this.handleFocus.bind(this);
41
+ this.getValueInputRef = this.getValueInputRef.bind(this);
42
+ this.handleGetMethods = this.handleGetMethods.bind(this);
43
+ this.handleInputClick = this.handleInputClick.bind(this);
44
+ this.handleGetShowValue = this.handleGetShowValue.bind(this);
45
+ this.handleSelection = this.handleSelection.bind(this);
46
+ this.handleDateType = this.handleDateType.bind(this);
47
+ this.handleBlur = this.handleBlur.bind(this);
48
+ this.handleGetAllowedType = this.handleGetAllowedType.bind(this);
49
+ this.handleDateClear = this.handleDateClear.bind(this);
50
+ this.handleDateTimeClear = this.handleDateTimeClear.bind(this);
51
+ this.handleMouseDown = this.handleMouseDown.bind(this);
52
+ this.handleDateIconClick = this.handleDateIconClick.bind(this);
53
+ this.handleSelectionRangeDetails = this.handleSelectionRangeDetails.bind(this);
54
+ this.handleBlurSelectionRange = this.handleBlurSelectionRange.bind(this);
55
+ this.state = {
56
+ selected: '',
57
+ displayText: '',
58
+ dateFormatDetails: {},
59
+ dateFormatSelection: {},
60
+ day: '',
61
+ month: '',
62
+ year: '',
63
+ hour: '',
64
+ minute: '',
65
+ noon: '',
66
+ isDateEdited: false,
67
+ stateFocusOrder: '',
68
+ isError: false,
69
+ isFocused: false
70
+ };
71
+ this.oldFocusOrder = '';
72
+ this.focusOrder = '';
73
+ this.oldKeyDownAction = ''; //'Arrow' || 'valueTyped'
74
+
75
+ this.keyDownAction = ''; //'Arrow' || 'valueTyped'
76
+
77
+ this.isMouseDown = false;
78
+ }
79
+
80
+ componentDidMount() {
81
+ const {
82
+ validation
83
+ } = this.props;
84
+ const {
85
+ selected
86
+ } = this.state;
87
+
88
+ if (validation && validation.validate) {
89
+ this.validateOnSelect(selected, this.props);
90
+ }
91
+
92
+ const {
93
+ displayText,
94
+ selected: newSelected
95
+ } = this.handleGetDisplayText(this.props);
96
+ this.setState({
97
+ displayText,
98
+ selected: newSelected
99
+ });
100
+ this.handleSelectionRangeDetails(this.props);
101
+ }
102
+
103
+ componentDidUpdate(prevProps, prevState) {
104
+ const {
105
+ selected,
106
+ day,
107
+ month,
108
+ year,
109
+ hour,
110
+ minute,
111
+ noon,
112
+ isDateEdited,
113
+ stateFocusOrder,
114
+ isFocused
115
+ } = this.state;
116
+ const {
117
+ value,
118
+ validation,
119
+ isPopupReady,
120
+ dateFormat = '',
121
+ is24Hour,
122
+ isHideCurrentYear
123
+ } = this.props;
124
+
125
+ if (validation && validation.validate) {
126
+ this.validateOnSelect(selected, this.props);
127
+ }
128
+
129
+ if (value !== prevProps.value || dateFormat !== prevProps.dateFormat || is24Hour !== prevProps.is24Hour || isHideCurrentYear !== prevProps.isHideCurrentYear) {
130
+ const {
131
+ displayText,
132
+ selected
133
+ } = this.handleGetDisplayText(this.props);
134
+ this.setState({
135
+ selected,
136
+ displayText
137
+ });
138
+
139
+ if (value !== INVALID_DATE) {
140
+ this.setState({
141
+ day: '',
142
+ month: '',
143
+ year: '',
144
+ hour: '',
145
+ minute: '',
146
+ noon: '',
147
+ isDateEdited: false,
148
+ isError: false
149
+ });
150
+ }
151
+ }
152
+
153
+ if (prevProps.isPopupReady !== isPopupReady) {
154
+ if (isPopupReady) {
155
+ this.resetLocalDate && this.resetLocalDate();
156
+ }
157
+ }
158
+
159
+ const haveLocalValue = [day, month, year, hour, minute, noon].some(value => !getIsEmptyValue(value));
160
+
161
+ if (isDateEdited !== haveLocalValue) {
162
+ this.setState({
163
+ isDateEdited: haveLocalValue
164
+ });
165
+ }
166
+
167
+ if (value !== prevProps.value || dateFormat !== prevProps.dateFormat || is24Hour !== prevProps.is24Hour || arrayIsNotEqual([day, month, year, hour, minute, noon], [prevState.day, prevState.month, prevState.year, prevState.hour, prevState.minute, prevState.noon])) {
168
+ this.handleSelectionRangeDetails(this.props);
169
+ } // if (stateFocusOrder !== prevState.stateFocusOrder) {
170
+
171
+
172
+ isFocused && !getIsEmptyValue(stateFocusOrder) && this.handleSelection(stateFocusOrder);
173
+ this.handleBlurSelectionRange(stateFocusOrder, prevState.stateFocusOrder); // }
174
+ // if (prevProps.isPopupOpen !== isPopupOpen) {
175
+ // if (!isPopupOpen) {
176
+ // this.valueInput && this.valueInput.focus({preventScroll:true});
177
+ // }
178
+ // }
179
+ }
180
+
181
+ handleSelect(userZoneSelectedTime, fotmattedValue, e) {
182
+ const {
183
+ id,
184
+ onSelect,
185
+ closePopupOnly,
186
+ validation
187
+ } = this.props;
188
+
189
+ if (validation && validation.validateOn) {
190
+ const {
191
+ selected
192
+ } = this.state;
193
+ this.validateOnSelect(selected, this.props);
194
+ }
195
+
196
+ onSelect && onSelect(userZoneSelectedTime, id);
197
+ this.valueInput && this.valueInput.focus({
198
+ preventScroll: true
199
+ });
200
+ closePopupOnly(e);
201
+ }
202
+
203
+ validateOnSelect(value, props) {
204
+ const defaultCheckPropsRules = ['required'];
205
+ const defaultValidateRules = ['required'];
206
+ const defaultType = 'onegroup';
207
+ const {
208
+ validation,
209
+ onPassValidation,
210
+ onFailValidation
211
+ } = props;
212
+ const targetTag = this.elementRef;
213
+
214
+ if (validation) {
215
+ //validateOn won't work here ...
216
+ const newValidation = validator.combinePropsValidation(this.props, defaultType, 'onSelect', validation, defaultCheckPropsRules, defaultValidateRules);
217
+ const validationObj = {
218
+ validation: newValidation,
219
+ onPassValidation,
220
+ onFailValidation
221
+ };
222
+ validator.executeValidation(value, targetTag, validationObj, defaultType);
223
+ } else {
224
+ onPassValidation && onPassValidation(value, targetTag);
225
+ }
226
+ }
227
+
228
+ handleTogglePopup(e, isOpenOnly) {
229
+ const {
230
+ togglePopup,
231
+ defaultPosition = 'bottom',
232
+ isPopupOpen,
233
+ removeClose
234
+ } = this.props;
235
+
236
+ if (isOpenOnly) {
237
+ if (!isPopupOpen) {
238
+ togglePopup(e, `${defaultPosition}Right`);
239
+ } else {
240
+ removeClose(e);
241
+ }
242
+ }
243
+
244
+ !isOpenOnly && togglePopup(e, `${defaultPosition}Right`);
245
+ }
246
+
247
+ handleSelectionRangeDetails(props) {
248
+ const {
249
+ timeZone,
250
+ dateFormat,
251
+ isDateTime,
252
+ value,
253
+ is24Hour
254
+ } = props;
255
+ const {
256
+ day,
257
+ month,
258
+ year,
259
+ hour,
260
+ minute,
261
+ noon
262
+ } = this.state;
263
+ const selected = value === INVALID_DATE ? '' : value; //New UI Changes
264
+
265
+ const dateFormatDetails = getDateFormatDetails(dateFormat, {
266
+ isHideCurrentYear: false,
267
+ value,
268
+ timeZone,
269
+ isDateTime
270
+ });
271
+ const dateFormatSelection = getDateFormatSelection(dateFormatDetails, isDateTime, {
272
+ i18nShortMonths,
273
+ i18nMonths,
274
+ selectedValue: selected,
275
+ day,
276
+ month,
277
+ year,
278
+ hour,
279
+ minute,
280
+ noon,
281
+ timeZone,
282
+ is24Hour
283
+ });
284
+ const {
285
+ dateFormat: newDateFormat
286
+ } = dateFormatDetails;
287
+ this.setState({
288
+ dateFormatDetails,
289
+ dateFormatSelection,
290
+ newDateFormat
291
+ });
292
+ }
293
+
294
+ handleGetDisplayText(props) {
295
+ const {
296
+ timeZone,
297
+ dateFormat,
298
+ isDateTime,
299
+ value,
300
+ is24Hour,
301
+ isHideCurrentYear
302
+ } = props;
303
+ const dateFormatDetails = getDateFormatDetails(dateFormat, {
304
+ isHideCurrentYear,
305
+ value,
306
+ timeZone,
307
+ isDateTime
308
+ });
309
+ const {
310
+ dateFormat: newDateFormat
311
+ } = dateFormatDetails;
312
+ let displayText = '';
313
+ const selected = value === INVALID_DATE ? '' : value;
314
+
315
+ if (selected) {
316
+ let format = newDateFormat,
317
+ convertedValue = getDateText(value, isDateTime, timeZone);
318
+
319
+ if (isDateTime) {
320
+ format = `${newDateFormat} ${is24Hour ? 'HH:mm' : 'hh:mm A'}`;
321
+ }
322
+
323
+ displayText = formatDate(convertedValue, format);
324
+ }
325
+
326
+ return {
327
+ displayText,
328
+ selected
329
+ };
330
+ }
331
+
332
+ handleKeyDown(e) {
333
+ const {
334
+ keyCode
335
+ } = e;
336
+ const {
337
+ isPopupOpen,
338
+ isPopupOpenOnEnter,
339
+ onKeyDown,
340
+ closePopupOnly,
341
+ cantEditOnPopupOpen
342
+ } = this.props;
343
+ const isAllowedDateType = this.handleGetAllowedType();
344
+
345
+ if (isPopupOpen) {
346
+ if (keyCode === 9 && !isAllowedDateType) {
347
+ //on tab click popup close
348
+ closePopupOnly(e);
349
+ } // ~~~~~~~ handle date navigation in dateTime popup ~~~~~
350
+
351
+
352
+ if (isAllowedDateType) {
353
+ cantEditOnPopupOpen && this.handleDateType(e);
354
+ }
355
+ } else if (!isPopupOpen) {
356
+ if (isPopupOpenOnEnter && keyCode === 13) {
357
+ //onEnter popup open
358
+ this.handleTogglePopup(e);
359
+ } else if (keyCode === 13) {
360
+ //onEnter submit case
361
+ onKeyDown && onKeyDown(e);
362
+ } else if (isAllowedDateType) {
363
+ this.handleDateType(e);
364
+ }
365
+ }
366
+ }
367
+
368
+ getValueInputRef(el) {
369
+ const {
370
+ getRef
371
+ } = this.props;
372
+ this.valueInput = el;
373
+ getRef && getRef(el);
374
+ }
375
+
376
+ handleFocus() {
377
+ const isAllowedDateType = this.handleGetAllowedType();
378
+ const {
379
+ isMouseDown
380
+ } = this;
381
+
382
+ if (isAllowedDateType && !isMouseDown) {
383
+ const {
384
+ dateFormatSelection
385
+ } = this.state;
386
+ const {
387
+ focusedIndex
388
+ } = dateFormatSelection;
389
+ const {
390
+ selectionStart: newSelectionStart,
391
+ selectionEnd: newSelectionEnd
392
+ } = this.valueInput;
393
+ const focusedOrder = focusedIndex[`${newSelectionStart}_${newSelectionEnd}`] || 0;
394
+ isAllowedDateType && this.setState({
395
+ stateFocusOrder: focusedOrder,
396
+ isFocused: true
397
+ });
398
+ } else if (!isAllowedDateType) {
399
+ const {
400
+ valueInput
401
+ } = this;
402
+ document.getSelection().removeAllRanges();
403
+ valueInput && valueInput.setSelectionRange(0, 0);
404
+ this.setState({
405
+ isFocused: true
406
+ });
407
+ }
408
+
409
+ const {
410
+ onFocus
411
+ } = this.props;
412
+ onFocus && onFocus();
413
+ }
414
+
415
+ handleBlur() {
416
+ this.focusOrder = '';
417
+ this.oldFocusOrder = '';
418
+ this.oldKeyDownAction = '';
419
+ this.keyDownAction = '';
420
+ this.setState({
421
+ isFocused: false
422
+ }); // const { valueInput } = this;
423
+ // document.getSelection().removeAllRanges();
424
+ // valueInput && valueInput.setSelectionRange(0, 0);
425
+
426
+ const {
427
+ onBlur
428
+ } = this.props;
429
+ onBlur && onBlur();
430
+ }
431
+
432
+ handleGetMethods(methods) {
433
+ const {
434
+ getMethods
435
+ } = this.props;
436
+ const {
437
+ resetLocalDate,
438
+ getStateValues,
439
+ toggleYearView
440
+ } = methods;
441
+ this.resetLocalDate = resetLocalDate;
442
+ this.getDateTimeStateValues = getStateValues;
443
+ this.DateTimeYearViewToggle = toggleYearView;
444
+ getMethods && getMethods(methods);
445
+ }
446
+
447
+ handleDateType(e) {
448
+ const {
449
+ keyCode,
450
+ shiftKey
451
+ } = e;
452
+ const input = e.target;
453
+
454
+ if (getIsSupportedKey(e)) {
455
+ e.preventDefault();
456
+ }
457
+
458
+ const {
459
+ isDateTime,
460
+ timeZone,
461
+ value,
462
+ onSelect,
463
+ id,
464
+ min,
465
+ max,
466
+ minErrorText,
467
+ maxErrorText,
468
+ onError,
469
+ closePopupOnly,
470
+ is24Hour
471
+ } = this.props;
472
+ const {
473
+ dateFormatSelection,
474
+ day,
475
+ month,
476
+ year,
477
+ hour,
478
+ minute,
479
+ noon,
480
+ selected,
481
+ dateFormatDetails
482
+ } = this.state;
483
+ const {
484
+ focusedIndex,
485
+ order
486
+ } = dateFormatSelection;
487
+ const {
488
+ yearInfo
489
+ } = dateFormatDetails;
490
+ const {
491
+ day: selectedDay = '',
492
+ month: selectedMonth = '',
493
+ year: selectedYear = '',
494
+ hour: selectedHour = '',
495
+ minute: selectedMinute = '',
496
+ noon: selectedNoon = ''
497
+ } = getDateDetails(selected, {
498
+ day,
499
+ month,
500
+ year,
501
+ hour,
502
+ minute,
503
+ noon
504
+ }, isDateTime, timeZone, {
505
+ is24Hour
506
+ });
507
+ const {
508
+ selectionStart: newSelectionStart,
509
+ selectionEnd: newSelectionEnd
510
+ } = input;
511
+ const focusedOrder = focusedIndex[`${newSelectionStart}_${newSelectionEnd}`];
512
+ const {
513
+ type
514
+ } = order[focusedOrder] || {};
515
+ this.oldFocusOrder = this.focusOrder;
516
+ this.focusOrder = focusedOrder;
517
+
518
+ if (keyCode === 38 || keyCode === 40) {
519
+ //up arrow && down arrow
520
+ this.oldKeyDownAction = this.keyDownAction;
521
+ this.keyDownAction = 'Arrow';
522
+ } else {
523
+ this.oldKeyDownAction = this.keyDownAction;
524
+ this.keyDownAction = 'valueTyped';
525
+ }
526
+
527
+ const focusedOrders = {
528
+ focusOrder: this.focusOrder,
529
+ oldFocusOrder: this.oldFocusOrder
530
+ };
531
+ const keyActions = {
532
+ oldKeyAction: this.oldKeyDownAction,
533
+ keyAction: this.keyDownAction
534
+ };
535
+ let newDay = selectedDay,
536
+ newMonth = selectedMonth,
537
+ newYear = selectedYear,
538
+ newHour = selectedHour,
539
+ newMinute = selectedMinute,
540
+ newNoon = selectedNoon,
541
+ isValueChanged = false,
542
+ newFocusOrder = focusedOrder;
543
+
544
+ if (keyCode === 9 && shiftKey && !getIsEmptyValue(focusedOrder) && focusedOrder !== 0) {
545
+ e.preventDefault();
546
+ this.setState({
547
+ stateFocusOrder: focusedOrder - 1
548
+ });
549
+ } else if (keyCode === 9 && !shiftKey && !getIsEmptyValue(focusedOrder) && order.length - 1 !== focusedOrder) {
550
+ e.preventDefault();
551
+ this.setState({
552
+ stateFocusOrder: focusedOrder + 1
553
+ });
554
+ } else if (keyCode === 39) {
555
+ //arrow right
556
+ getIsEmptyValue(focusedOrder) ? this.setState({
557
+ stateFocusOrder: 0
558
+ }) : this.setState({
559
+ stateFocusOrder: focusedOrder + 1
560
+ });
561
+ } else if (keyCode === 37) {
562
+ //arrow left
563
+ getIsEmptyValue(focusedOrder) ? this.setState({
564
+ stateFocusOrder: order.length - 1
565
+ }) : this.setState({
566
+ stateFocusOrder: focusedOrder - 1
567
+ });
568
+ } else if (keyCode === 9) {
569
+ //on tab click popup close
570
+ closePopupOnly(e);
571
+ } else if (type === 'day') {
572
+ ({
573
+ day: newDay,
574
+ isChanged: isValueChanged,
575
+ focusOrder: newFocusOrder
576
+ } = getChangedDay({
577
+ day: selectedDay,
578
+ month: selectedMonth,
579
+ year: selectedYear
580
+ }, e, focusedOrders, keyActions));
581
+ } else if (type === 'month') {
582
+ ({
583
+ /*day: newDay,*/
584
+ month: newMonth,
585
+ isChanged: isValueChanged,
586
+ focusOrder: newFocusOrder
587
+ } = getChangedMonth({
588
+ day: selectedDay,
589
+ month: selectedMonth,
590
+ year: selectedYear
591
+ }, e, focusedOrders, keyActions));
592
+ } else if (type === 'year') {
593
+ ({
594
+ /*day: newDay,*/
595
+ year: newYear,
596
+ isChanged: isValueChanged,
597
+ focusOrder: newFocusOrder
598
+ } = getChangedYear({
599
+ day: selectedDay,
600
+ month: selectedMonth,
601
+ year: selectedYear
602
+ }, e, focusedOrders, keyActions, {
603
+ yearInfo
604
+ }));
605
+ } else if (type === 'hour') {
606
+ ({
607
+ hour: newHour,
608
+ isChanged: isValueChanged,
609
+ focusOrder: newFocusOrder
610
+ } = getChangedHour({
611
+ hour: selectedHour
612
+ }, e, focusedOrders, keyActions, {
613
+ is24Hour
614
+ }));
615
+ } else if (type === 'minute') {
616
+ ({
617
+ minute: newMinute,
618
+ isChanged: isValueChanged,
619
+ focusOrder: newFocusOrder
620
+ } = getChangedMinute({
621
+ minute: selectedMinute
622
+ }, e, focusedOrders, keyActions));
623
+ } else if (type === 'noon') {
624
+ ({
625
+ noon: newNoon,
626
+ isChanged: isValueChanged,
627
+ focusOrder: newFocusOrder
628
+ } = getChangedNoon({
629
+ noon: selectedNoon
630
+ }, e, focusedOrders, keyActions));
631
+ }
632
+
633
+ if (isValueChanged) {
634
+ const currentValue = {
635
+ day: newDay,
636
+ month: newMonth,
637
+ year: newYear,
638
+ hour: newHour,
639
+ minute: newMinute,
640
+ noon: newNoon
641
+ };
642
+
643
+ const errorCaseHandle = isEmptyValError => {
644
+ this.setState(() => ({
645
+ day: newDay,
646
+ month: newMonth,
647
+ year: newYear,
648
+ hour: newHour,
649
+ minute: newMinute,
650
+ noon: newNoon,
651
+ stateFocusOrder: newFocusOrder,
652
+ isDateEdited: true,
653
+ isError: !isEmptyValError
654
+ }));
655
+ const newSelected = isEmptyValError ? '' : INVALID_DATE;
656
+ value !== newSelected && onSelect && onSelect(newSelected, id);
657
+ };
658
+
659
+ const {
660
+ isError,
661
+ isEmptyValError
662
+ } = getIsValidDate(currentValue, isDateTime, {
663
+ is24Hour
664
+ });
665
+
666
+ if (isError) {
667
+ errorCaseHandle(isEmptyValError);
668
+ } else {
669
+ const {
670
+ selectedValue,
671
+ isError: selectedDateError,
672
+ errorType
673
+ } = getSelectedDate(currentValue, {
674
+ min,
675
+ max,
676
+ timeZone,
677
+ isDateTime,
678
+ is24Hour
679
+ });
680
+
681
+ if (selectedDateError) {
682
+ if (errorType === 'MIN') {
683
+ onError && onError(minErrorText, true);
684
+ } else if (errorType === 'MAX') {
685
+ onError && onError(maxErrorText, true);
686
+ }
687
+
688
+ errorCaseHandle();
689
+ } else {
690
+ this.setState(() => ({
691
+ day: '',
692
+ month: '',
693
+ year: '',
694
+ hour: '',
695
+ minute: '',
696
+ noon: '',
697
+ isDateEdited: false,
698
+ stateFocusOrder: newFocusOrder,
699
+ isError: false
700
+ }));
701
+ onSelect && onSelect(selectedValue, id);
702
+ }
703
+ }
704
+ }
705
+ }
706
+
707
+ handleSelection() {
708
+ let focusOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
709
+ const isAllowedDateType = this.handleGetAllowedType();
710
+
711
+ if (isAllowedDateType) {
712
+ const {
713
+ dateFormatSelection
714
+ } = this.state;
715
+ const {
716
+ order = {}
717
+ } = dateFormatSelection;
718
+ let {
719
+ index
720
+ } = order[focusOrder] || {};
721
+
722
+ if (!index) {
723
+ focusOrder = 0;
724
+ ({
725
+ index
726
+ } = order[focusOrder] || {});
727
+ }
728
+
729
+ if (index && this.valueInput) {
730
+ document.getSelection().removeAllRanges();
731
+ this.valueInput.setSelectionRange(index[0], index[1]);
732
+ }
733
+ }
734
+ }
735
+
736
+ handleInputClick(e) {
737
+ this.isMouseDown = false;
738
+ const {
739
+ dateFormatSelection
740
+ } = this.state;
741
+ const input = e.target;
742
+ const {
743
+ selectionEnd
744
+ } = input;
745
+ e.preventDefault();
746
+ const {
747
+ clickIndex
748
+ } = dateFormatSelection;
749
+ const focusOrder = clickIndex[selectionEnd] || clickIndex[selectionEnd - 1] || 0;
750
+ const isAllowedDateType = this.handleGetAllowedType();
751
+
752
+ if (isAllowedDateType) {
753
+ this.setState({
754
+ stateFocusOrder: focusOrder,
755
+ isFocused: true
756
+ });
757
+ }
758
+
759
+ if (!isAllowedDateType) {
760
+ this.handleTogglePopup(e);
761
+ } else {
762
+ const {
763
+ isPopupOpenOnClick,
764
+ isReadOnly,
765
+ isDisabled
766
+ } = this.props;
767
+
768
+ if (isPopupOpenOnClick && (!isReadOnly || !isDisabled)) {
769
+ this.handleTogglePopup(e, true);
770
+ }
771
+
772
+ const {
773
+ isPopupCloseOnClick,
774
+ isPopupOpen,
775
+ closePopupOnly
776
+ } = this.props;
777
+
778
+ if (isPopupCloseOnClick && !isPopupOpen) {
779
+ closePopupOnly && closePopupOnly(e);
780
+ }
781
+ }
782
+ }
783
+
784
+ handleMouseDown() {
785
+ this.isMouseDown = true;
786
+ }
787
+
788
+ handleGetShowValue() {
789
+ const {
790
+ day,
791
+ month,
792
+ year,
793
+ hour,
794
+ minute,
795
+ noon,
796
+ dateFormatDetails,
797
+ displayText,
798
+ newDateFormat,
799
+ isDateEdited,
800
+ isFocused,
801
+ selected
802
+ } = this.state;
803
+ const {
804
+ isDateTime,
805
+ is24Hour,
806
+ isPopupReady,
807
+ timeZone,
808
+ isPopupOpen
809
+ } = this.props;
810
+
811
+ if (isDateEdited || isFocused || isPopupReady || isPopupOpen) {
812
+ const {
813
+ day: selectedDay = '',
814
+ month: selectedMonth = '',
815
+ year: selectedYear = '',
816
+ hour: selectedHour = '',
817
+ minute: selectedMinute = '',
818
+ noon: selectedNoon = ''
819
+ } = getDateDetails(selected, {
820
+ day,
821
+ month,
822
+ year,
823
+ hour,
824
+ minute,
825
+ noon
826
+ }, isDateTime, timeZone, {
827
+ is24Hour
828
+ });
829
+ const dateTimeString = getDateTimeString({
830
+ day: selectedDay,
831
+ month: selectedMonth,
832
+ year: selectedYear,
833
+ hour: selectedHour,
834
+ minute: selectedMinute,
835
+ noon: selectedNoon
836
+ }, dateFormatDetails, isDateTime, {
837
+ i18nShortMonths,
838
+ i18nMonths,
839
+ is24Hour
840
+ });
841
+ return dateTimeString;
842
+ } else if (displayText) {
843
+ return displayText;
844
+ }
845
+
846
+ const timeFormat = is24Hour ? ' HH:mm' : ' hh:mm --';
847
+ const dateTimeFormat = isDateTime ? `${newDateFormat}${timeFormat}` : newDateFormat;
848
+ return dateTimeFormat || '';
849
+ }
850
+
851
+ handleGetAllowedType() {
852
+ const {
853
+ isReadOnly,
854
+ isDisabled,
855
+ isEditable
856
+ } = this.props;
857
+
858
+ if (isEditable) {
859
+ if (isReadOnly || isDisabled) {
860
+ return false;
861
+ }
862
+
863
+ return true;
864
+ }
865
+
866
+ return false;
867
+ }
868
+
869
+ handleDateClear() {
870
+ const {
871
+ id,
872
+ onSelect,
873
+ value
874
+ } = this.props;
875
+ this.setState({
876
+ day: '',
877
+ month: '',
878
+ year: '',
879
+ hour: '',
880
+ minute: '',
881
+ noon: '',
882
+ isDateEdited: false,
883
+ stateFocusOrder: 0,
884
+ isError: false
885
+ });
886
+ value && onSelect && onSelect('', id); // this.valueInput && this.valueInput.focus({ preventScroll: true });
887
+ }
888
+
889
+ handleDateTimeClear(e) {
890
+ this.handleDateClear();
891
+ const {
892
+ closePopupOnly
893
+ } = this.props;
894
+ closePopupOnly(e);
895
+ }
896
+
897
+ handleDateIconClick(e) {
898
+ this.handleTogglePopup(e);
899
+ this.valueInput && this.valueInput.focus({
900
+ preventScroll: true
901
+ });
902
+ }
903
+
904
+ handleBlurSelectionRange() {
905
+ let focusOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
906
+ let oldFocusOrder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
907
+ const isAllowedDateType = this.handleGetAllowedType();
908
+
909
+ if (isAllowedDateType) {
910
+ // if (focusOrder !== oldFocusOrder) {
911
+ const {
912
+ dateFormatSelection = {},
913
+ isFocused
914
+ } = this.state;
915
+ const {
916
+ order = []
917
+ } = dateFormatSelection;
918
+ const {
919
+ isPopupOpen
920
+ } = this.props; // const { type: oldFocusedType = '' } = order[oldFocusOrder] || {};
921
+
922
+ const {
923
+ type: focusedType = ''
924
+ } = order[focusOrder] || {};
925
+ const {
926
+ /*isActive,*/
927
+ isYearView,
928
+ isMonthOpen: oldIsMonthOpen
929
+ } = this.getDateTimeStateValues();
930
+ const yearViewTypes = ['month', 'year'];
931
+ const isMonthOpen = focusedType === 'month';
932
+
933
+ if (isPopupOpen) {
934
+ if (yearViewTypes.indexOf(focusedType) >= 0 && (!isYearView || isMonthOpen !== oldIsMonthOpen)) {
935
+ if (!isFocused && isYearView) {
936
+ this.DateTimeYearViewToggle(true, oldIsMonthOpen);
937
+ } else {
938
+ this.DateTimeYearViewToggle(true, isMonthOpen);
939
+ }
940
+ } else if (yearViewTypes.indexOf(focusedType) === -1) {
941
+ if (!isFocused && isYearView) {
942
+ this.DateTimeYearViewToggle(isYearView, oldIsMonthOpen);
943
+ } else {
944
+ this.DateTimeYearViewToggle(false, false);
945
+ }
946
+ }
947
+ } // }
948
+
949
+ }
950
+ }
951
+
952
+ render() {
953
+ const {
954
+ removeClose,
955
+ minErrorText,
956
+ maxErrorText,
957
+ min,
958
+ max,
959
+ placeholder,
960
+ isPopupOpen,
961
+ isPopupReady,
962
+ isDateTime,
963
+ position,
964
+ textBoxVariant,
965
+ textBoxSize,
966
+ children = null,
967
+ isDisabled,
968
+ getContainerRef,
969
+ getTargetRef,
970
+ timeZone,
971
+ isReadOnly,
972
+ dataId,
973
+ needResponsive,
974
+ className,
975
+ needBorder,
976
+ defaultTime,
977
+ needDefaultTime,
978
+ borderColor,
979
+ i18nKeys,
980
+ needErrorOnBlur,
981
+ htmlId,
982
+ iconOnHover,
983
+ is24Hour,
984
+ isAbsolutePositioningNeeded,
985
+ positionsOffset,
986
+ targetOffset,
987
+ isRestrictScroll,
988
+ dropBoxPortalId,
989
+ a11y,
990
+ boxSize,
991
+ onError,
992
+ startDate,
993
+ endDate
994
+ } = this.props;
995
+ const {
996
+ selected: value = '',
997
+ isError,
998
+ isDateEdited,
999
+ isFocused
1000
+ } = this.state;
1001
+ const showValue = this.handleGetShowValue();
1002
+ const isAllowedDateType = this.handleGetAllowedType();
1003
+ const showClear = !(isDisabled || isReadOnly) && (isDateEdited || value) ? true : false;
1004
+ const showError = needErrorOnBlur ? isError && !isFocused && !isPopupOpen : isError;
1005
+ return /*#__PURE__*/React.createElement("div", {
1006
+ className: `${style.container}`
1007
+ }, children ? /*#__PURE__*/React.createElement("div", {
1008
+ "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
1009
+ "data-test-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
1010
+ onClick: isDisabled || isReadOnly ? null : this.handleTogglePopup,
1011
+ ref: getTargetRef,
1012
+ className: `${className ? className : ''} ${isDisabled ? style.disabled : style.enabled}`
1013
+ }, children) : /*#__PURE__*/React.createElement("div", {
1014
+ "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
1015
+ "data-test-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
1016
+ className: `${className ? className : ''} ${style.textBox} ${isPopupOpen && !isDisabled ? style.textBoxFocus : ''} ${isDisabled ? style.disabled : isReadOnly ? style.readOnly : style.enabled}`,
1017
+ onClick: !isAllowedDateType ? isDisabled || isReadOnly ? null : this.handleTogglePopup : null,
1018
+ ref: getTargetRef
1019
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
1020
+ htmlId: htmlId,
1021
+ value: showValue ? showValue : placeholder,
1022
+ needBorder: needBorder,
1023
+ size: textBoxSize,
1024
+ variant: textBoxVariant,
1025
+ inputRef: this.getValueInputRef,
1026
+ isDisabled: isDisabled,
1027
+ dataId: dataId,
1028
+ needReadOnlyStyle: isReadOnly || isDisabled,
1029
+ onKeyDown: this.handleKeyDown,
1030
+ onFocus: this.handleFocus,
1031
+ borderColor: showError ? 'error' : borderColor,
1032
+ needEffect: !(isDisabled || isReadOnly || showError),
1033
+ isClickable: true,
1034
+ onClick: isDisabled || isReadOnly ? null : this.handleInputClick,
1035
+ onBlur: this.handleBlur,
1036
+ onClear: showClear ? this.handleDateClear : null,
1037
+ isReadOnly: isReadOnly,
1038
+ onMouseDown: this.handleMouseDown,
1039
+ showClearIcon: showClear,
1040
+ customClass: {
1041
+ customTBoxWrap: isDateEdited || value ? '' : style.placeHolder
1042
+ },
1043
+ iconOnHover: iconOnHover,
1044
+ isFocus: isPopupReady,
1045
+ autoComplete: false,
1046
+ a11y: a11y
1047
+ }, /*#__PURE__*/React.createElement(Container, {
1048
+ align: "both",
1049
+ onClick: isDisabled || isReadOnly ? null : this.handleDateIconClick
1050
+ }, /*#__PURE__*/React.createElement(Icon, {
1051
+ name: "ZD-datepicker",
1052
+ size: "12"
1053
+ })))), isReadOnly || isDisabled ? null : /*#__PURE__*/React.createElement(DateTime, {
1054
+ value: value,
1055
+ isDateTimeField: isDateTime,
1056
+ onSelect: this.handleSelect,
1057
+ timeZone: timeZone,
1058
+ min: min,
1059
+ max: max,
1060
+ maxErrorText: maxErrorText,
1061
+ minErrorText: minErrorText,
1062
+ position: position,
1063
+ isReady: isPopupOpen,
1064
+ isActive: isPopupReady,
1065
+ getRef: getContainerRef,
1066
+ onClick: removeClose,
1067
+ needResponsive: needResponsive,
1068
+ dataId: dataId,
1069
+ defaultTime: defaultTime,
1070
+ needDefaultTime: needDefaultTime,
1071
+ getMethods: this.handleGetMethods,
1072
+ onClear: this.handleDateTimeClear,
1073
+ needAction: isDateTime,
1074
+ onDateSelect: !isDateTime ? this.handleSelect : null,
1075
+ i18nKeys: i18nKeys,
1076
+ is24Hour: is24Hour,
1077
+ isAbsolute: isAbsolutePositioningNeeded,
1078
+ positionsOffset: positionsOffset,
1079
+ targetOffset: targetOffset,
1080
+ isRestrictScroll: isRestrictScroll,
1081
+ dropBoxPortalId: dropBoxPortalId,
1082
+ boxSize: boxSize,
1083
+ onError: onError,
1084
+ startDate: startDate,
1085
+ endDate: endDate
1086
+ }));
1087
+ }
1088
+
1089
+ }
1090
+
1091
+ DateWidgetComponent.defaultProps = DateWidget_defaultProps;
1092
+ DateWidgetComponent.propTypes = DateWidget_propTypes;
1093
+ const DateWidget = Popup(DateWidgetComponent);
1094
+ DateWidget.defaultProps = DateWidgetComponent.defaultProps;
1095
+ DateWidget.propTypes = DateWidgetComponent.propTypes; // eslint-disable-next-line no-undef
1096
+ // if (__DOCS__) {
1097
+ // DateWidgetComponent.docs = {
1098
+ // componentGroup: 'Form Elements',
1099
+ // folderName: 'Style Guide',
1100
+ // external: true,
1101
+ // description: ' '
1102
+ // };
1103
+ // // eslint-disable-next-line react/forbid-foreign-prop-types
1104
+ // DateWidget.propTypes = DateWidgetComponent.propTypes;
1105
+ // }
1106
+
1107
+ export default DateWidget;