@zohodesk/components 1.0.0-alpha-271 → 1.0.0-alpha-272

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 (352) hide show
  1. package/README.md +4 -0
  2. package/es/Accordion/Accordion.js +7 -3
  3. package/es/Accordion/AccordionItem.js +4 -2
  4. package/es/Animation/Animation.js +3 -3
  5. package/es/AppContainer/AppContainer.js +13 -5
  6. package/es/Avatar/Avatar.js +23 -11
  7. package/es/AvatarTeam/AvatarTeam.js +3 -3
  8. package/es/Button/Button.js +4 -3
  9. package/es/Buttongroup/Buttongroup.js +3 -3
  10. package/es/Card/Card.js +21 -10
  11. package/es/CheckBox/CheckBox.js +5 -3
  12. package/es/DateTime/CalendarView.js +32 -20
  13. package/es/DateTime/DateTime.js +75 -10
  14. package/es/DateTime/DateTimePopupFooter.js +4 -2
  15. package/es/DateTime/DateTimePopupHeader.js +8 -2
  16. package/es/DateTime/DateWidget.js +98 -35
  17. package/es/DateTime/DaysRow.js +4 -2
  18. package/es/DateTime/Time.js +10 -2
  19. package/es/DateTime/YearView.js +28 -4
  20. package/es/DateTime/__tests__/CalendarView.spec.js +1 -0
  21. package/es/DateTime/__tests__/DateTime.spec.js +1 -0
  22. package/es/DateTime/__tests__/DateWidget.spec.js +2 -3
  23. package/es/DateTime/common.js +3 -0
  24. package/es/DateTime/constants.js +1 -0
  25. package/es/DateTime/dateFormatUtils/dateFormat.js +63 -30
  26. package/es/DateTime/dateFormatUtils/dateFormats.js +0 -1
  27. package/es/DateTime/dateFormatUtils/dayChange.js +13 -4
  28. package/es/DateTime/dateFormatUtils/index.js +32 -2
  29. package/es/DateTime/dateFormatUtils/monthChange.js +8 -0
  30. package/es/DateTime/dateFormatUtils/timeChange.js +22 -6
  31. package/es/DateTime/dateFormatUtils/yearChange.js +11 -2
  32. package/es/DateTime/objectUtils.js +14 -20
  33. package/es/DateTime/props/defaultProps.js +2 -1
  34. package/es/DateTime/typeChecker.js +3 -0
  35. package/es/DateTime/validator.js +58 -6
  36. package/es/DropBox/DropBox.js +6 -2
  37. package/es/DropBox/DropBoxElement/DropBoxElement.js +7 -0
  38. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +5 -3
  39. package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +3 -0
  40. package/es/DropBox/props/defaultProps.js +1 -2
  41. package/es/DropBox/props/propTypes.js +1 -2
  42. package/es/DropDown/DropDown.js +8 -4
  43. package/es/DropDown/DropDownHeading.js +4 -5
  44. package/es/DropDown/DropDownItem.js +6 -0
  45. package/es/DropDown/DropDownSearch.js +4 -0
  46. package/es/DropDown/DropDownSeparator.js +1 -0
  47. package/es/DropDown/__tests__/DropDown.spec.js +1 -2
  48. package/es/Heading/Heading.js +2 -3
  49. package/es/Label/Label.js +2 -3
  50. package/es/Layout/Box.js +13 -0
  51. package/es/Layout/Container.js +12 -1
  52. package/es/Layout/index.js +1 -2
  53. package/es/ListItem/ListContainer.js +8 -3
  54. package/es/ListItem/ListItem.js +9 -3
  55. package/es/ListItem/ListItemWithAvatar.js +9 -3
  56. package/es/ListItem/ListItemWithCheckBox.js +7 -2
  57. package/es/ListItem/ListItemWithIcon.js +8 -3
  58. package/es/ListItem/ListItemWithRadio.js +7 -3
  59. package/es/Modal/Modal.js +28 -11
  60. package/es/MultiSelect/AdvancedGroupMultiSelect.js +89 -13
  61. package/es/MultiSelect/AdvancedMultiSelect.js +32 -9
  62. package/es/MultiSelect/EmptyState.js +2 -0
  63. package/es/MultiSelect/MultiSelect.js +99 -32
  64. package/es/MultiSelect/MultiSelectHeader.js +3 -0
  65. package/es/MultiSelect/MultiSelectWithAvatar.js +12 -6
  66. package/es/MultiSelect/SelectedOptions.js +6 -3
  67. package/es/MultiSelect/Suggestions.js +7 -3
  68. package/es/MultiSelect/__tests__/MultiSelect.spec.js +4 -6
  69. package/es/MultiSelect/props/propTypes.js +2 -0
  70. package/es/PopOver/PopOver.js +18 -2
  71. package/es/PopOver/__tests__/PopOver.spec.js +2 -1
  72. package/es/Popup/Popup.js +77 -24
  73. package/es/Popup/__tests__/Popup.spec.js +17 -5
  74. package/es/Popup/viewPort.js +16 -4
  75. package/es/Provider/IdProvider.js +10 -5
  76. package/es/Provider/LibraryContext.js +6 -4
  77. package/es/Provider/NumberGenerator/NumberGenerator.js +21 -7
  78. package/es/Provider/ZindexProvider.js +9 -2
  79. package/es/Radio/Radio.js +4 -2
  80. package/es/Responsive/CustomResponsive.js +30 -18
  81. package/es/Responsive/RefWrapper.js +6 -7
  82. package/es/Responsive/ResizeComponent.js +35 -25
  83. package/es/Responsive/ResizeObserver.js +26 -6
  84. package/es/Responsive/Responsive.js +34 -20
  85. package/es/Responsive/index.js +1 -3
  86. package/es/Responsive/sizeObservers.js +28 -7
  87. package/es/Responsive/utils/index.js +7 -5
  88. package/es/Responsive/utils/shallowCompare.js +7 -2
  89. package/es/Responsive/windowResizeObserver.js +7 -0
  90. package/es/ResponsiveDropBox/ResponsiveDropBox.js +4 -0
  91. package/es/Ribbon/Ribbon.js +3 -2
  92. package/es/RippleEffect/RippleEffect.js +1 -3
  93. package/es/Select/GroupSelect.js +58 -14
  94. package/es/Select/Select.js +79 -33
  95. package/es/Select/SelectWithAvatar.js +17 -4
  96. package/es/Select/SelectWithIcon.js +46 -5
  97. package/es/Select/__tests__/Select.spec.js +6 -8
  98. package/es/Select/props/propTypes.js +1 -0
  99. package/es/Stencils/Stencils.js +3 -3
  100. package/es/Switch/Switch.js +5 -3
  101. package/es/Tab/Tab.js +4 -4
  102. package/es/Tab/TabContent.js +1 -0
  103. package/es/Tab/TabContentWrapper.js +2 -0
  104. package/es/Tab/TabWrapper.js +5 -2
  105. package/es/Tab/Tabs.js +54 -7
  106. package/es/Tab/__tests__/Tab.spec.js +1 -3
  107. package/es/Tab/__tests__/TabWrapper.spec.js +1 -0
  108. package/es/Tag/Tag.js +6 -3
  109. package/es/TextBox/TextBox.js +15 -3
  110. package/es/TextBox/__tests__/TextBox.spec.js +1 -4
  111. package/es/TextBoxIcon/TextBoxIcon.js +9 -2
  112. package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +2 -7
  113. package/es/Textarea/Textarea.js +12 -3
  114. package/es/Textarea/__tests__/Textarea.spec.js +2 -2
  115. package/es/Tooltip/Tooltip.js +58 -14
  116. package/es/Tooltip/__tests__/Tooltip.spec.js +5 -0
  117. package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -2
  118. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +7 -5
  119. package/es/deprecated/PortalLayer/PortalLayer.js +25 -20
  120. package/es/semantic/Button/Button.js +3 -2
  121. package/es/utils/Common.js +54 -9
  122. package/es/utils/ContextOptimizer.js +4 -5
  123. package/es/utils/__tests__/debounce.spec.js +2 -2
  124. package/es/utils/constructFullName.js +2 -0
  125. package/es/utils/css/compileClassNames.js +5 -0
  126. package/es/utils/css/mergeStyle.js +7 -6
  127. package/es/utils/css/utils.js +1 -0
  128. package/es/utils/datetime/GMTZones.js +48 -0
  129. package/es/utils/datetime/common.js +31 -7
  130. package/es/utils/debounce.js +5 -1
  131. package/es/utils/dropDownUtils.js +68 -11
  132. package/es/utils/getInitial.js +4 -0
  133. package/es/utils/shallowEqual.js +6 -0
  134. package/lib/Accordion/Accordion.js +42 -18
  135. package/lib/Accordion/AccordionItem.js +40 -18
  136. package/lib/Accordion/__tests__/Accordion.spec.js +3 -0
  137. package/lib/Accordion/index.js +3 -0
  138. package/lib/Accordion/props/propTypes.js +3 -0
  139. package/lib/Animation/Animation.js +38 -18
  140. package/lib/Animation/__tests__/Animation.spec.js +11 -7
  141. package/lib/Animation/props/propTypes.js +3 -0
  142. package/lib/AppContainer/AppContainer.js +56 -21
  143. package/lib/AppContainer/props/propTypes.js +3 -0
  144. package/lib/Avatar/Avatar.js +78 -38
  145. package/lib/Avatar/__tests__/Avatar.spec.js +44 -0
  146. package/lib/Avatar/props/propTypes.js +3 -0
  147. package/lib/AvatarTeam/AvatarTeam.js +52 -30
  148. package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +13 -0
  149. package/lib/AvatarTeam/props/propTypes.js +3 -0
  150. package/lib/Button/Button.js +31 -20
  151. package/lib/Button/css/cssJSLogic.js +18 -17
  152. package/lib/Button/index.js +3 -0
  153. package/lib/Button/props/defaultProps.js +2 -0
  154. package/lib/Button/props/propTypes.js +3 -0
  155. package/lib/Buttongroup/Buttongroup.js +32 -12
  156. package/lib/Buttongroup/__test__/Buttongroup.spec.js +10 -0
  157. package/lib/Buttongroup/props/propTypes.js +3 -0
  158. package/lib/Card/Card.js +102 -46
  159. package/lib/Card/__tests__/Card.spec.js +10 -1
  160. package/lib/Card/index.js +4 -0
  161. package/lib/Card/props/propTypes.js +3 -0
  162. package/lib/CheckBox/CheckBox.js +71 -47
  163. package/lib/CheckBox/__tests__/CheckBox.spec.js +3 -0
  164. package/lib/CheckBox/props/propTypes.js +3 -0
  165. package/lib/DateTime/CalendarView.js +82 -42
  166. package/lib/DateTime/DateTime.js +246 -158
  167. package/lib/DateTime/DateTimePopupFooter.js +31 -8
  168. package/lib/DateTime/DateTimePopupHeader.js +48 -17
  169. package/lib/DateTime/DateWidget.js +352 -250
  170. package/lib/DateTime/DaysRow.js +27 -5
  171. package/lib/DateTime/Time.js +73 -32
  172. package/lib/DateTime/YearView.js +77 -28
  173. package/lib/DateTime/__tests__/CalendarView.spec.js +13 -5
  174. package/lib/DateTime/__tests__/DateTime.spec.js +51 -37
  175. package/lib/DateTime/__tests__/DateWidget.spec.js +10 -8
  176. package/lib/DateTime/common.js +6 -0
  177. package/lib/DateTime/constants.js +1 -0
  178. package/lib/DateTime/dateFormatUtils/dateFormat.js +184 -122
  179. package/lib/DateTime/dateFormatUtils/dateFormats.js +0 -1
  180. package/lib/DateTime/dateFormatUtils/dayChange.js +14 -7
  181. package/lib/DateTime/dateFormatUtils/index.js +74 -16
  182. package/lib/DateTime/dateFormatUtils/monthChange.js +19 -9
  183. package/lib/DateTime/dateFormatUtils/timeChange.js +54 -22
  184. package/lib/DateTime/dateFormatUtils/yearChange.js +22 -11
  185. package/lib/DateTime/index.js +2 -0
  186. package/lib/DateTime/objectUtils.js +24 -20
  187. package/lib/DateTime/props/defaultProps.js +2 -1
  188. package/lib/DateTime/props/propTypes.js +11 -1
  189. package/lib/DateTime/typeChecker.js +4 -0
  190. package/lib/DateTime/validator.js +73 -10
  191. package/lib/DropBox/DropBox.js +34 -10
  192. package/lib/DropBox/DropBoxElement/DropBoxElement.js +59 -38
  193. package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +42 -34
  194. package/lib/DropBox/DropBoxElement/props/propTypes.js +3 -0
  195. package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +14 -9
  196. package/lib/DropBox/__tests__/DropBox.spec.js +6 -2
  197. package/lib/DropBox/css/cssJSLogic.js +3 -1
  198. package/lib/DropBox/props/defaultProps.js +8 -4
  199. package/lib/DropBox/props/propTypes.js +10 -4
  200. package/lib/DropDown/DropDown.js +52 -8
  201. package/lib/DropDown/DropDownHeading.js +39 -20
  202. package/lib/DropDown/DropDownItem.js +42 -20
  203. package/lib/DropDown/DropDownSearch.js +40 -17
  204. package/lib/DropDown/DropDownSeparator.js +24 -4
  205. package/lib/DropDown/__tests__/DropDown.spec.js +15 -9
  206. package/lib/DropDown/__tests__/DropDownItem.spec.js +9 -4
  207. package/lib/DropDown/__tests__/DropDownSearch.spec.js +3 -0
  208. package/lib/DropDown/index.js +9 -0
  209. package/lib/DropDown/props/propTypes.js +6 -4
  210. package/lib/Heading/Heading.js +37 -15
  211. package/lib/Heading/props/propTypes.js +3 -0
  212. package/lib/Label/Label.js +39 -19
  213. package/lib/Label/__tests__/Label.spec.js +14 -1
  214. package/lib/Label/props/propTypes.js +3 -0
  215. package/lib/Layout/Box.js +31 -11
  216. package/lib/Layout/Container.js +29 -10
  217. package/lib/Layout/__tests__/Box.spec.js +65 -49
  218. package/lib/Layout/__tests__/Container.spec.js +67 -50
  219. package/lib/Layout/index.js +3 -0
  220. package/lib/Layout/props/propTypes.js +3 -0
  221. package/lib/Layout/utils.js +10 -0
  222. package/lib/ListItem/ListContainer.js +48 -27
  223. package/lib/ListItem/ListItem.js +69 -45
  224. package/lib/ListItem/ListItemWithAvatar.js +75 -48
  225. package/lib/ListItem/ListItemWithCheckBox.js +64 -39
  226. package/lib/ListItem/ListItemWithIcon.js +68 -44
  227. package/lib/ListItem/ListItemWithRadio.js +65 -41
  228. package/lib/ListItem/index.js +7 -0
  229. package/lib/ListItem/props/propTypes.js +6 -4
  230. package/lib/Modal/Modal.js +45 -10
  231. package/lib/Modal/props/propTypes.js +3 -0
  232. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +294 -166
  233. package/lib/MultiSelect/AdvancedMultiSelect.js +202 -125
  234. package/lib/MultiSelect/EmptyState.js +45 -24
  235. package/lib/MultiSelect/MultiSelect.js +323 -206
  236. package/lib/MultiSelect/MultiSelectHeader.js +30 -8
  237. package/lib/MultiSelect/MultiSelectWithAvatar.js +105 -63
  238. package/lib/MultiSelect/SelectedOptions.js +43 -17
  239. package/lib/MultiSelect/Suggestions.js +64 -32
  240. package/lib/MultiSelect/__tests__/MultiSelect.spec.js +86 -75
  241. package/lib/MultiSelect/index.js +5 -0
  242. package/lib/MultiSelect/props/defaultProps.js +2 -0
  243. package/lib/MultiSelect/props/propTypes.js +5 -0
  244. package/lib/PopOver/PopOver.js +95 -49
  245. package/lib/PopOver/__tests__/PopOver.spec.js +4 -1
  246. package/lib/PopOver/index.js +4 -0
  247. package/lib/PopOver/props/propTypes.js +3 -0
  248. package/lib/Popup/Popup.js +158 -81
  249. package/lib/Popup/__tests__/Popup.spec.js +43 -8
  250. package/lib/Popup/viewPort.js +28 -14
  251. package/lib/Provider/AvatarSize.js +4 -0
  252. package/lib/Provider/Config.js +2 -0
  253. package/lib/Provider/CssProvider.js +4 -0
  254. package/lib/Provider/IdProvider.js +17 -6
  255. package/lib/Provider/LibraryContext.js +35 -15
  256. package/lib/Provider/LibraryContextInit.js +4 -0
  257. package/lib/Provider/NumberGenerator/NumberGenerator.js +44 -15
  258. package/lib/Provider/ZindexProvider.js +15 -3
  259. package/lib/Provider/index.js +5 -0
  260. package/lib/Radio/Radio.js +61 -38
  261. package/lib/Radio/__tests__/Radiospec.js +9 -5
  262. package/lib/Radio/props/propTypes.js +3 -0
  263. package/lib/Responsive/CustomResponsive.js +73 -29
  264. package/lib/Responsive/RefWrapper.js +17 -11
  265. package/lib/Responsive/ResizeComponent.js +62 -36
  266. package/lib/Responsive/ResizeObserver.js +24 -10
  267. package/lib/Responsive/Responsive.js +80 -30
  268. package/lib/Responsive/index.js +4 -0
  269. package/lib/Responsive/props/propTypes.js +3 -0
  270. package/lib/Responsive/sizeObservers.js +53 -17
  271. package/lib/Responsive/utils/index.js +11 -3
  272. package/lib/Responsive/utils/shallowCompare.js +11 -2
  273. package/lib/Responsive/windowResizeObserver.js +8 -0
  274. package/lib/ResponsiveDropBox/ResponsiveDropBox.js +45 -17
  275. package/lib/ResponsiveDropBox/props/propTypes.js +3 -0
  276. package/lib/Ribbon/Ribbon.js +33 -13
  277. package/lib/Ribbon/__tests__/Ribbon.spec.js +22 -0
  278. package/lib/Ribbon/props/propTypes.js +3 -0
  279. package/lib/RippleEffect/RippleEffect.js +18 -10
  280. package/lib/RippleEffect/props/propTypes.js +3 -0
  281. package/lib/Select/GroupSelect.js +229 -130
  282. package/lib/Select/Select.js +290 -209
  283. package/lib/Select/SelectWithAvatar.js +102 -56
  284. package/lib/Select/SelectWithIcon.js +132 -76
  285. package/lib/Select/__tests__/Select.spec.js +133 -91
  286. package/lib/Select/index.js +5 -0
  287. package/lib/Select/props/defaultProps.js +5 -4
  288. package/lib/Select/props/propTypes.js +4 -0
  289. package/lib/Stencils/Stencils.js +29 -10
  290. package/lib/Stencils/__tests__/Stencils.spec.js +12 -0
  291. package/lib/Stencils/props/propTypes.js +3 -0
  292. package/lib/Switch/Switch.js +57 -34
  293. package/lib/Switch/props/propTypes.js +3 -0
  294. package/lib/Tab/Tab.js +40 -27
  295. package/lib/Tab/TabContent.js +12 -5
  296. package/lib/Tab/TabContentWrapper.js +13 -6
  297. package/lib/Tab/TabWrapper.js +37 -19
  298. package/lib/Tab/Tabs.js +171 -91
  299. package/lib/Tab/__tests__/Tab.spec.js +67 -58
  300. package/lib/Tab/__tests__/TabContent.spec.js +10 -6
  301. package/lib/Tab/__tests__/TabContentWrapper.spec.js +28 -20
  302. package/lib/Tab/__tests__/TabWrapper.spec.js +12 -0
  303. package/lib/Tab/__tests__/Tabs.spec.js +53 -39
  304. package/lib/Tab/index.js +6 -0
  305. package/lib/Tab/props/propTypes.js +3 -0
  306. package/lib/Tag/Tag.js +72 -43
  307. package/lib/Tag/__tests__/Tag.spec.js +14 -8
  308. package/lib/Tag/props/propTypes.js +3 -0
  309. package/lib/TextBox/TextBox.js +85 -59
  310. package/lib/TextBox/__tests__/TextBox.spec.js +14 -4
  311. package/lib/TextBox/props/propTypes.js +6 -4
  312. package/lib/TextBoxIcon/TextBoxIcon.js +79 -52
  313. package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +14 -5
  314. package/lib/TextBoxIcon/props/propTypes.js +3 -0
  315. package/lib/Textarea/Textarea.js +54 -29
  316. package/lib/Textarea/__tests__/Textarea.spec.js +14 -2
  317. package/lib/Textarea/props/propTypes.js +3 -0
  318. package/lib/Tooltip/Tooltip.js +94 -31
  319. package/lib/Tooltip/__tests__/Tooltip.spec.js +24 -3
  320. package/lib/Tooltip/props/propTypes.js +3 -0
  321. package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +40 -16
  322. package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +3 -0
  323. package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +53 -25
  324. package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +3 -0
  325. package/lib/VelocityAnimation/index.js +3 -0
  326. package/lib/css.js +40 -0
  327. package/lib/deprecated/PortalLayer/PortalLayer.js +46 -23
  328. package/lib/deprecated/PortalLayer/props/propTypes.js +3 -0
  329. package/lib/index.js +57 -0
  330. package/lib/semantic/Button/Button.js +42 -22
  331. package/lib/semantic/Button/props/propTypes.js +3 -0
  332. package/lib/semantic/index.js +2 -0
  333. package/lib/utils/Common.js +110 -18
  334. package/lib/utils/ContextOptimizer.js +16 -10
  335. package/lib/utils/__tests__/constructFullName.spec.js +1 -0
  336. package/lib/utils/__tests__/debounce.spec.js +3 -2
  337. package/lib/utils/__tests__/getInitial.spec.js +1 -0
  338. package/lib/utils/constructFullName.js +13 -4
  339. package/lib/utils/css/compileClassNames.js +6 -0
  340. package/lib/utils/css/mergeStyle.js +10 -7
  341. package/lib/utils/css/utils.js +8 -0
  342. package/lib/utils/datetime/GMTZones.js +55 -0
  343. package/lib/utils/datetime/common.js +52 -7
  344. package/lib/utils/debounce.js +6 -1
  345. package/lib/utils/dropDownUtils.js +175 -59
  346. package/lib/utils/dummyFunction.js +2 -0
  347. package/lib/utils/getHTMLFontSize.js +1 -0
  348. package/lib/utils/getInitial.js +6 -0
  349. package/lib/utils/index.js +4 -0
  350. package/lib/utils/scrollTo.js +2 -0
  351. package/lib/utils/shallowEqual.js +8 -0
  352. package/package.json +1 -1
@@ -11,17 +11,21 @@ const validator = {
11
11
  let newValidationRules = validationRules ? validationRules : {};
12
12
  let checkPropsRules = defaultCheckPropsRules;
13
13
  let checkPropsOrder = [];
14
+
14
15
  for (let i = 0; i < checkPropsRules.length; i++) {
15
16
  let prop = checkPropsRules[i];
17
+
16
18
  if (Object.prototype.hasOwnProperty.call(currentProps, prop)) {
17
19
  if (newValidationRulesOrder.indexOf(prop) === -1) {
18
20
  checkPropsOrder.push(prop);
19
21
  }
22
+
20
23
  if (!Object.prototype.hasOwnProperty.call(newValidationRules, prop)) {
21
24
  newValidationRules[prop] = currentProps[prop];
22
25
  }
23
26
  }
24
27
  }
28
+
25
29
  newValidationRulesOrder = !Object.prototype.hasOwnProperty.call(newValidation, 'rulesOrder') ? checkPropsOrder.concat(newValidationRulesOrder) : validationRulesOrder;
26
30
  let isRulesFound = Object.keys(newValidationRules).length;
27
31
  newValidationRules = isRulesFound ? validator.composeRulesForValidation(newType, defaultValidateRules, newValidationRules) : newValidationRules;
@@ -47,22 +51,28 @@ const validator = {
47
51
  onFailValidation
48
52
  } = validationObj;
49
53
  let skipIfEmptyField = null;
54
+
50
55
  if (validationRules.required === false && (fieldType !== 'radio' || fieldType !== 'checkbox')) {
51
56
  skipIfEmptyField = val => {
52
57
  if (fieldType === 'onegroup' || fieldType === 'multigroup') {
53
58
  return !val || !(val.length > 0);
54
59
  }
60
+
55
61
  let value = (val || '').trim();
56
62
  return value.length < 1;
57
63
  };
58
64
  }
65
+
59
66
  if (skipIfEmptyField === null || skipIfEmptyField(text) === false) {
60
67
  for (let i = 0, len = validationRulesOrder.length; i < len; i++) {
61
68
  let rule = validationRulesOrder[i];
69
+
62
70
  if (!validationRules[rule] || !typeChecker.isFunction(validationRules[rule])) {
63
71
  continue;
64
72
  }
73
+
65
74
  let isInValid = validationRules[rule](text, inputTag);
75
+
66
76
  if (isInValid) {
67
77
  let message = validationMessages[rule] && typeChecker.isFunction(validationMessages[rule]) ? validationMessages[rule](text, inputTag) : validationMessages[rule];
68
78
  onFailValidation && onFailValidation(rule, message, inputTag);
@@ -70,52 +80,66 @@ const validator = {
70
80
  }
71
81
  }
72
82
  }
83
+
73
84
  onPassValidation && onPassValidation(text, inputTag);
74
85
  },
75
86
  composeRulesForValidation: (type, defaultValidateRules, newValidationRules) => {
76
87
  let defaultPatterns = validator.regexs;
88
+
77
89
  for (let i = 0, len = defaultValidateRules.length; i < len; i++) {
78
90
  let rule = defaultValidateRules[i];
79
91
  let ruleInfo = newValidationRules[rule] || '';
92
+
80
93
  if (ruleInfo && !typeChecker.isFunction(ruleInfo)) {
81
94
  if (rule === 'required' && ruleInfo === true) {
82
95
  newValidationRules[rule] = (val, el) => {
83
96
  if (el.willValidate && el.validity.valueMissing) {
84
97
  return true;
85
98
  }
99
+
86
100
  if (type === 'radio' || type === 'checkbox') {
87
101
  return el.checked === false;
88
102
  }
103
+
89
104
  if (type === 'onegroup' || type === 'multigroup') {
90
105
  return !val || val.length < 1;
91
106
  }
107
+
92
108
  let value = (val || '').replace(/\s{2,}/g, ' ').trim();
93
109
  return value.length < 1;
94
110
  };
95
111
  } else if (rule === 'maxLength' && !Number.isNaN(ruleInfo) && Number.isFinite(ruleInfo)) {
96
112
  let maxLength = Number(ruleInfo);
113
+
97
114
  newValidationRules[rule] = (val, el) => {
98
115
  if (el.willValidate && el.validity.tooLong) {
99
116
  return true;
100
117
  }
118
+
101
119
  let value = val || '';
120
+
102
121
  if (type !== 'multigroup') {
103
122
  value = val.trim();
104
123
  }
124
+
105
125
  return !(value.length <= maxLength);
106
126
  };
107
127
  } else if (rule === 'minLength' && !Number.isNaN(ruleInfo) && Number.isFinite(ruleInfo)) {
108
128
  let minLength = Number(ruleInfo);
129
+
109
130
  newValidationRules[rule] = val => {
110
131
  let value = val || '';
132
+
111
133
  if (type !== 'multigroup') {
112
134
  value = val.trim();
113
135
  }
136
+
114
137
  return !(value.length >= minLength);
115
138
  };
116
139
  } else if (rule === 'rangeLength' && /^([-+\d]+)*([,]{1,1}([-+\d]+))$/.test(ruleInfo) === true) {
117
140
  let rangeLength = ruleInfo;
118
141
  rangeLength = rangeLength.split(',').map(a => Number(a));
142
+
119
143
  newValidationRules[rule] = val => {
120
144
  let value = (val || '').trim();
121
145
  return !(value.length >= rangeLength[0] && value.length <= rangeLength[1]);
@@ -123,119 +147,146 @@ const validator = {
123
147
  } else if (rule === 'step' && ruleInfo) {
124
148
  let step = Number(ruleInfo);
125
149
  let stepTypes = ['number', 'range', 'date', 'datetime', 'datetime-local', 'month', 'time', 'week'];
150
+
126
151
  newValidationRules[rule] = (val, el) => {
127
152
  if (stepTypes.indexOf(type) !== -1) {
128
153
  if (el.willValidate && el.validity.stepMismatch) {
129
154
  return true;
130
155
  }
156
+
131
157
  return false;
132
158
  }
159
+
133
160
  let value = (val || '').trim();
134
161
  value = Number(value);
162
+
135
163
  if (Number.isNaN(value) || !Number.isFinite(value) || Number.isNaN(step) || !Number.isFinite(step)) {
136
164
  return true;
137
165
  }
166
+
138
167
  return !(value % step === 0);
139
168
  };
140
169
  } else if (rule === 'max') {
141
170
  let max = Number(ruleInfo);
142
171
  let maxTypes = ['number', 'range', 'date', 'datetime', 'datetime-local', 'month', 'time', 'week'];
172
+
143
173
  newValidationRules[rule] = (val, el) => {
144
174
  if (maxTypes.indexOf(type) !== -1) {
145
175
  if (el.willValidate && el.validity.rangeOverflow) {
146
176
  return true;
147
177
  }
178
+
148
179
  return false;
149
180
  }
181
+
150
182
  let value = (val || '').trim();
151
183
  value = Number(value);
184
+
152
185
  if (Number.isNaN(value) || !Number.isFinite(value) || Number.isNaN(max) || !Number.isFinite(max)) {
153
186
  return true;
154
187
  }
188
+
155
189
  return !(value <= max);
156
190
  };
157
191
  } else if (rule === 'min') {
158
192
  let min = Number(ruleInfo);
159
193
  let minTypes = ['number', 'range', 'date', 'datetime', 'datetime-local', 'month', 'time', 'week'];
194
+
160
195
  newValidationRules[rule] = (val, el) => {
161
196
  if (minTypes.indexOf(type) !== -1) {
162
197
  if (el.willValidate && el.validity.rangeUnderflow) {
163
198
  return true;
164
199
  }
200
+
165
201
  return false;
166
202
  }
203
+
167
204
  let value = (val || '').trim();
168
205
  value = Number(value);
206
+
169
207
  if (Number.isNaN(value) || !Number.isFinite(value) || Number.isNaN(min) || !Number.isFinite(min)) {
170
208
  return true;
171
209
  }
210
+
172
211
  return !(value >= min);
173
212
  };
174
213
  } else if (rule === 'range' && /^([-+\d]+)*([,]{1,1}([-+\d]+))$/.test(ruleInfo) === true) {
175
214
  let ranges;
176
215
  ranges = ranges.split(',').map(a => Number(a));
216
+
177
217
  newValidationRules[rule] = val => {
178
218
  let value = (val || '').trim();
179
219
  value = Number(value);
220
+
180
221
  if (Number.isNaN(value) || !Number.isFinite(value)) {
181
222
  return true;
182
223
  }
224
+
183
225
  return !(value >= ranges[0] && value <= ranges[1]);
184
226
  };
185
227
  } else if ((rule === 'digits' || rule === 'integer' || rule === 'double') && ruleInfo === true) {
186
228
  newValidationRules[rule] = val => {
187
229
  let value = (val || '').trim();
188
230
  value = Number(value);
231
+
189
232
  if (Number.isNaN(value) || !Number.isFinite(value)) {
190
233
  return true;
191
234
  }
235
+
192
236
  let condition = true;
237
+
193
238
  if (rule === 'integer') {
194
239
  condition = Number.isSafeInteger(value);
195
240
  }
241
+
196
242
  if (rule === 'double') {
197
243
  condition = -Number.MAX_VALUE <= value && Number.MAX_VALUE >= value;
198
244
  }
245
+
199
246
  return !defaultPatterns[rule].test(value) && condition;
200
247
  };
201
248
  } else if ((rule === 'timezonedate' || rule === 'datetimezone' || rule === 'date' || rule === 'datetime') && ruleInfo === true) {
202
249
  newValidationRules[rule] = val => {
203
250
  let value = (val || '').trim();
251
+
204
252
  if (!defaultPatterns[rule].test(value)) {
205
253
  return true;
206
254
  }
255
+
207
256
  if (rule === 'datetime') {
208
257
  let index = 0;
209
- value = value.split('T')[index];
210
- //let timings = value[1].replace("Z","").split(":")
258
+ value = value.split('T')[index]; //let timings = value[1].replace("Z","").split(":")
211
259
  //let
212
260
  //if( !defaultPatterns[rule].test(value); )
213
261
  }
214
262
 
215
263
  value = value.replace('/', '-');
216
264
  value = value.replace(':', '-');
217
- let values = value.split('-');
265
+ let values = value.split('-'); // Extract the string into month, date and year
218
266
 
219
- // Extract the string into month, date and year
220
267
  let yy = parseInt(values[0]);
221
268
  let mm = parseInt(values[1]);
222
- let dd = parseInt(values[2]);
269
+ let dd = parseInt(values[2]); // Create list of days of a month [assume there is no leap year by default]
223
270
 
224
- // Create list of days of a month [assume there is no leap year by default]
225
271
  let ListofDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
272
+
226
273
  if (mm === 1 || mm > 2) {
227
274
  if (dd > ListofDays[mm - 1]) {
228
275
  return true;
229
276
  }
230
277
  }
278
+
231
279
  if (mm === 2) {
232
280
  let lyear = false;
281
+
233
282
  if (!(yy % 4) && yy % 100 || !(yy % 400)) {
234
283
  lyear = true;
235
284
  }
285
+
236
286
  if (lyear === false && dd >= 29) {
237
287
  return true;
238
288
  }
289
+
239
290
  if (lyear === true && dd > 29) {
240
291
  return true;
241
292
  }
@@ -254,6 +305,7 @@ const validator = {
254
305
  }
255
306
  }
256
307
  }
308
+
257
309
  return newValidationRules;
258
310
  },
259
311
  regexs: {
@@ -1,4 +1,5 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
2
3
  import React, { useRef, Fragment, useContext } from 'react';
3
4
  import FocusScope from '@zohodesk/a11y/es/FocusScope/FocusScope';
4
5
  import Modal from '../Modal/Modal';
@@ -26,14 +27,17 @@ export default function DropBox(props) {
26
27
  direction
27
28
  } = DropBoxContext || {};
28
29
  let windowWidth,
29
- mobileWidth = getLibraryConfig('mobileWidth'),
30
- isModel = false;
30
+ mobileWidth = getLibraryConfig('mobileWidth'),
31
+ isModel = false;
32
+
31
33
  if (needResponsive) {
32
34
  windowWidth = window.innerWidth;
35
+
33
36
  if (windowWidth <= mobileWidth) {
34
37
  isModel = true;
35
38
  }
36
39
  }
40
+
37
41
  const {
38
42
  zIndexStyle
39
43
  } = cssJSLogic(props);
@@ -30,6 +30,7 @@ export default function DropBoxElement(props) {
30
30
  animationStyle
31
31
  } = props;
32
32
  let isAbsolute = isAbsolutePositioningNeeded;
33
+
33
34
  const FireOnAnimationEnd = () => {
34
35
  let eleClassList = subContainerRef && subContainerRef.current.classList;
35
36
  let animationStyles = animationStyle == 'default' ? style.fadeInScale : style[animationStyle];
@@ -39,19 +40,23 @@ export default function DropBoxElement(props) {
39
40
  }
40
41
  });
41
42
  };
43
+
42
44
  const getRef = ele => {
43
45
  const {
44
46
  getRef,
45
47
  forwardRef
46
48
  } = props;
47
49
  getRef && getRef(ele);
50
+
48
51
  if (forwardRef) {
49
52
  forwardRef.current = ele;
50
53
  }
51
54
  };
55
+
52
56
  if (!isAbsolutePositioningNeeded && size === 'default' && !isActive) {
53
57
  isAbsolute = true;
54
58
  }
59
+
55
60
  const {
56
61
  role,
57
62
  ariaMultiselectable,
@@ -59,12 +64,14 @@ export default function DropBoxElement(props) {
59
64
  } = a11y;
60
65
  boxPosition = boxPosition && boxPosition != 'undefined' ? boxPosition : 'bottomCenter';
61
66
  const boxDirection = positionMapping[boxPosition].direction;
67
+
62
68
  if (isAbsolute) {
63
69
  arrowPosition = arrowPosition ? arrowPosition : positionMapping[boxPosition].arrowPosition;
64
70
  boxPosition = positionMapping[boxPosition].positionStyle;
65
71
  } else {
66
72
  arrowPosition = positionMapping[boxPosition].arrowPosition;
67
73
  }
74
+
68
75
  const {
69
76
  arrowstyle,
70
77
  boxstyle,
@@ -40,9 +40,7 @@ export default function cssJSLogic(_ref) {
40
40
  customDropBoxWrap = '',
41
41
  customMobileDropBoxWrap = ''
42
42
  } = customClass;
43
- const animationValue = animationStyle === 'default' ? 'fadeInScale' : animationStyle;
44
-
45
- // const {needBoxStyle,boxstyle} = useDropboxPosCalc(props)
43
+ const animationValue = animationStyle === 'default' ? 'fadeInScale' : animationStyle; // const {needBoxStyle,boxstyle} = useDropboxPosCalc(props)
46
44
 
47
45
  let boxClassName = compileClassNames({
48
46
  [style.main]: true,
@@ -70,17 +68,21 @@ export default function cssJSLogic(_ref) {
70
68
  [style[animationValue]]: !isModel && isAnimate && !isReducedMotion && isActive && !!animationStyle
71
69
  });
72
70
  let inlineStyle = !isModel ? isAbsolute ? needBoxStyle && boxstyle : positionsOffset && positionsOffset[boxPosition] || {} : {};
71
+
73
72
  if (zIndexStyle) {
74
73
  inlineStyle = Object.assign({}, inlineStyle, zIndexStyle);
75
74
  }
75
+
76
76
  if (!isModel && !isAbsolute && size === 'default' && targetOffset && isActive) {
77
77
  inlineStyle = Object.assign({}, inlineStyle, {
78
78
  width: targetOffset.width
79
79
  });
80
80
  }
81
+
81
82
  if (customInlineStyle) {
82
83
  inlineStyle = Object.assign({}, inlineStyle, customInlineStyle);
83
84
  }
85
+
84
86
  return {
85
87
  boxClassName,
86
88
  subContainerClass,
@@ -17,6 +17,7 @@ export default function useDropboxPosCalc(props) {
17
17
  let arrowstyle = {};
18
18
  const needBoxStyle = right || left || top || bottom;
19
19
  const needArrowStyle = arrowLeft || arrowRight || arrowTop || arrowBottom;
20
+
20
21
  if (needBoxStyle) {
21
22
  boxstyle = !isModel ? direction === 'rtl' ? {
22
23
  right: [remConvert(left)] + unit,
@@ -30,6 +31,7 @@ export default function useDropboxPosCalc(props) {
30
31
  bottom: [remConvert(bottom)] + unit
31
32
  } : {};
32
33
  }
34
+
33
35
  if (needArrowStyle) {
34
36
  arrowstyle = !isModel ? direction === 'rtl' ? {
35
37
  right: [remConvert(arrowLeft)] + unit,
@@ -43,6 +45,7 @@ export default function useDropboxPosCalc(props) {
43
45
  bottom: [remConvert(arrowBottom)] + unit
44
46
  } : {};
45
47
  }
48
+
46
49
  return {
47
50
  needBoxStyle,
48
51
  boxstyle,
@@ -8,7 +8,6 @@ export const defaultProps = {
8
8
  needFocusScope: false,
9
9
  needAutoZindex: true
10
10
  };
11
- export const DropBoxDefaultProps = {
12
- ...DropBoxElementDefaultProps,
11
+ export const DropBoxDefaultProps = { ...DropBoxElementDefaultProps,
13
12
  ...defaultProps
14
13
  };
@@ -9,7 +9,6 @@ export const propTypes = {
9
9
  needFocusScope: PropTypes.bool,
10
10
  needAutoZindex: PropTypes.bool
11
11
  };
12
- export const DropBoxPropTypes = {
13
- ...DropBoxElementPropTypes,
12
+ export const DropBoxPropTypes = { ...DropBoxElementPropTypes,
14
13
  ...propTypes
15
14
  };
@@ -3,7 +3,6 @@ import { DropDown_propTypes, DropDownTarget_propTypes, DropDownContainer_propTyp
3
3
  import { DropDownItemContainer_defaultProps } from './props/defaultProps';
4
4
  import style from './DropDown.module.css';
5
5
  import PopOver, { PopOverTarget, PopOverContainer } from '../PopOver/PopOver';
6
-
7
6
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['dropdown', 'shadow', 'target', 'menu', 'header', 'headertext', 'list', 'padding', 'listHover', 'active', 'children', 'user', 'footer', 'separator', 'small', 'search', 'medium', 'heading'] }] */
8
7
 
9
8
  export default class DropDown extends React.Component {
@@ -13,10 +12,9 @@ export default class DropDown extends React.Component {
13
12
  } = this.props;
14
13
  return /*#__PURE__*/React.createElement(PopOver, this.props, /*#__PURE__*/React.createElement(PopOverTarget, null, children[0]), /*#__PURE__*/React.createElement(PopOverContainer, null, children[1]));
15
14
  }
16
- }
17
- DropDown.propTypes = DropDown_propTypes;
18
15
 
19
- // if (__DOCS__) {
16
+ }
17
+ DropDown.propTypes = DropDown_propTypes; // if (__DOCS__) {
20
18
  // DropDown.docs = {
21
19
  // componentGroup: 'Form Elements',
22
20
  // folderName: 'Style Guide'
@@ -30,6 +28,7 @@ export class DropDownTarget extends React.Component {
30
28
  } = this.props;
31
29
  return /*#__PURE__*/React.createElement("div", null, children);
32
30
  }
31
+
33
32
  }
34
33
  DropDownTarget.propTypes = DropDownTarget_propTypes;
35
34
  export class DropDownContainer extends React.Component {
@@ -39,6 +38,7 @@ export class DropDownContainer extends React.Component {
39
38
  } = this.props;
40
39
  return /*#__PURE__*/React.createElement("div", null, " ", children, " ");
41
40
  }
41
+
42
42
  }
43
43
  DropDownContainer.propTypes = DropDownContainer_propTypes;
44
44
  export class DropDownItemContainer extends React.Component {
@@ -47,18 +47,21 @@ export class DropDownItemContainer extends React.Component {
47
47
  this.getRef = this.getRef.bind(this);
48
48
  this.onScroll = this.onScroll.bind(this);
49
49
  }
50
+
50
51
  onScroll(e) {
51
52
  let {
52
53
  onScroll
53
54
  } = this.props;
54
55
  onScroll && onScroll(e);
55
56
  }
57
+
56
58
  getRef(ele) {
57
59
  let {
58
60
  getRef
59
61
  } = this.props;
60
62
  getRef && getRef(ele);
61
63
  }
64
+
62
65
  render() {
63
66
  let {
64
67
  children,
@@ -71,6 +74,7 @@ export class DropDownItemContainer extends React.Component {
71
74
  "data-id": dataId
72
75
  }, children);
73
76
  }
77
+
74
78
  }
75
79
  DropDownItemContainer.propTypes = DropDownItemContainer_propTypes;
76
80
  DropDownItemContainer.defaultProps = DropDownItemContainer_defaultProps;
@@ -28,15 +28,14 @@ export default class DropDownHeading extends React.Component {
28
28
  "aria-label": ariaLabel,
29
29
  id: htmlId,
30
30
  "data-id": dataId,
31
- "data-selector-id": dataSelectorId
32
- // tabindex='0'
31
+ "data-selector-id": dataSelectorId // tabindex='0'
32
+
33
33
  }, text, children);
34
34
  }
35
+
35
36
  }
36
37
  DropDownHeading.propTypes = DropDownHeading_propTypes;
37
- DropDownHeading.defaultProps = DropDownHeading_defaultProps;
38
-
39
- // if (__DOCS__) {
38
+ DropDownHeading.defaultProps = DropDownHeading_defaultProps; // if (__DOCS__) {
40
39
  // DropDownHeading.docs = {
41
40
  // componentGroup: 'Form Elements',
42
41
  // folderName: 'Style Guide'
@@ -10,6 +10,7 @@ export default class DropDownItem extends React.Component {
10
10
  this.getSelectedElement = this.getSelectedElement.bind(this);
11
11
  this.onHover = this.onHover.bind(this);
12
12
  }
13
+
13
14
  getRef(ele) {
14
15
  this.ele = ele;
15
16
  let {
@@ -18,9 +19,11 @@ export default class DropDownItem extends React.Component {
18
19
  } = this.props;
19
20
  getRef && getRef(ele, index);
20
21
  }
22
+
21
23
  getSelectedElement() {
22
24
  return this.ele ? this.ele : null;
23
25
  }
26
+
24
27
  onClick(e) {
25
28
  let {
26
29
  onClick,
@@ -30,6 +33,7 @@ export default class DropDownItem extends React.Component {
30
33
  } = this.props;
31
34
  onClick && onClick(id, value, index, e);
32
35
  }
36
+
33
37
  onHover(e) {
34
38
  let {
35
39
  onHover,
@@ -39,6 +43,7 @@ export default class DropDownItem extends React.Component {
39
43
  } = this.props;
40
44
  onHover && onHover(id, value, index, e);
41
45
  }
46
+
42
47
  render() {
43
48
  let {
44
49
  value,
@@ -64,6 +69,7 @@ export default class DropDownItem extends React.Component {
64
69
  className: style.user
65
70
  }, " ", children[1], " ") : '');
66
71
  }
72
+
67
73
  }
68
74
  DropDownItem.propTypes = DropDownItem_propTypes;
69
75
  DropDownItem.defaultProps = DropDownItem_defaultProps;
@@ -10,11 +10,13 @@ export default class DropDownSearch extends React.Component {
10
10
  super(props);
11
11
  this.getRef = this.getRef.bind(this);
12
12
  }
13
+
13
14
  componentDidMount() {
14
15
  this.input && this.input.focus({
15
16
  preventScroll: true
16
17
  });
17
18
  }
19
+
18
20
  getRef(ele) {
19
21
  let {
20
22
  getRef
@@ -22,6 +24,7 @@ export default class DropDownSearch extends React.Component {
22
24
  this.input = ele;
23
25
  getRef && getRef(ele);
24
26
  }
27
+
25
28
  render() {
26
29
  let {
27
30
  name,
@@ -56,6 +59,7 @@ export default class DropDownSearch extends React.Component {
56
59
  customClass: customTextBox
57
60
  }));
58
61
  }
62
+
59
63
  }
60
64
  DropDownSearch.defaultProps = DropDownSearch_defaultProps;
61
65
  DropDownSearch.propTypes = DropDownSearch_propTypes;
@@ -10,5 +10,6 @@ export default class DropDownSeparator extends React.Component {
10
10
  className: `${style.separator} ${customClass}`
11
11
  });
12
12
  }
13
+
13
14
  }
14
15
  DropDownSeparator.propTypes = DropDownSeparator_propTypes;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { DropDownItemContainer, DropDownContainer, DropDownTarget } from '../DropDown';
3
- // import renderer from 'react-test-renderer';
2
+ import { DropDownItemContainer, DropDownContainer, DropDownTarget } from '../DropDown'; // import renderer from 'react-test-renderer';
4
3
 
5
4
  const defaultProps = {
6
5
  onScroll: jest.fn(),
@@ -23,11 +23,10 @@ export default class Heading extends React.Component {
23
23
  ...a11y
24
24
  }, title);
25
25
  }
26
+
26
27
  }
27
28
  Heading.propTypes = propTypes;
28
- Heading.defaultProps = defaultProps;
29
-
30
- // if (__DOCS__) {
29
+ Heading.defaultProps = defaultProps; // if (__DOCS__) {
31
30
  // Heading.docs = {
32
31
  // folderName: 'Style Guide',
33
32
  // componentGroup: 'Accessibility'
package/es/Label/Label.js CHANGED
@@ -34,11 +34,10 @@ export default class Label extends React.Component {
34
34
  id: id
35
35
  }, text);
36
36
  }
37
+
37
38
  }
38
39
  Label.defaultProps = defaultProps;
39
- Label.propTypes = propTypes;
40
-
41
- // if (__DOCS__) {
40
+ Label.propTypes = propTypes; // if (__DOCS__) {
42
41
  // Label.docs = {
43
42
  // componentGroup: 'Form Elements',
44
43
  // folderName: 'Style Guide'