@zohodesk/components 1.2.55 → 1.2.57

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 (310) hide show
  1. package/README.md +14 -0
  2. package/es/Accordion/Accordion.js +2 -2
  3. package/es/Accordion/AccordionItem.js +4 -4
  4. package/es/Accordion/__tests__/Accordion.spec.js +1 -1
  5. package/es/Accordion/__tests__/AccordionItem.spec.js +1 -1
  6. package/es/Accordion/index.js +2 -2
  7. package/es/Animation/Animation.js +3 -3
  8. package/es/Animation/__tests__/Animation.spec.js +1 -1
  9. package/es/Animation/utils.js +1 -1
  10. package/es/AppContainer/AppContainer.js +9 -9
  11. package/es/AppContainer/__tests__/AppContainer.spec.js +1 -1
  12. package/es/Avatar/Avatar.js +5 -5
  13. package/es/Avatar/__tests__/Avatar.spec.js +1 -1
  14. package/es/AvatarTeam/AvatarTeam.js +4 -4
  15. package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +1 -1
  16. package/es/AvatarTeam/props/propTypes.js +1 -1
  17. package/es/Button/Button.js +4 -4
  18. package/es/Button/__tests__/Button.spec.js +1 -1
  19. package/es/Button/index.js +2 -2
  20. package/es/Button/props/defaultProps.js +1 -1
  21. package/es/Buttongroup/Buttongroup.js +3 -3
  22. package/es/Buttongroup/__tests__/Buttongroup.spec.js +1 -1
  23. package/es/Card/Card.js +5 -5
  24. package/es/Card/__tests__/Card.spec.js +1 -1
  25. package/es/Card/index.js +4 -4
  26. package/es/CheckBox/CheckBox.js +7 -7
  27. package/es/CheckBox/__tests__/CheckBox.spec.js +1 -1
  28. package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +2 -2
  29. package/es/DateTime/CalendarView.js +6 -6
  30. package/es/DateTime/DateTime.js +15 -15
  31. package/es/DateTime/DateTimePopupFooter.js +5 -5
  32. package/es/DateTime/DateTimePopupHeader.js +4 -4
  33. package/es/DateTime/DateWidget.js +17 -17
  34. package/es/DateTime/DaysRow.js +3 -3
  35. package/es/DateTime/Time.js +5 -5
  36. package/es/DateTime/YearView.js +6 -6
  37. package/es/DateTime/__tests__/CalendarView.spec.js +1 -1
  38. package/es/DateTime/__tests__/DateTime.spec.js +1 -1
  39. package/es/DateTime/__tests__/DateTimePopupFooter.spec.js +1 -1
  40. package/es/DateTime/__tests__/DateTimePopupHeader.spec.js +1 -1
  41. package/es/DateTime/__tests__/DateWidget.spec.js +1 -1
  42. package/es/DateTime/__tests__/DaysRow.spec.js +1 -1
  43. package/es/DateTime/__tests__/Time.spec.js +1 -1
  44. package/es/DateTime/__tests__/YearView.spec.js +1 -1
  45. package/es/DateTime/dateFormatUtils/dateFormat.js +4 -4
  46. package/es/DateTime/dateFormatUtils/dayChange.js +2 -2
  47. package/es/DateTime/dateFormatUtils/index.js +3 -3
  48. package/es/DateTime/dateFormatUtils/monthChange.js +2 -2
  49. package/es/DateTime/dateFormatUtils/timeChange.js +2 -2
  50. package/es/DateTime/dateFormatUtils/yearChange.js +2 -2
  51. package/es/DateTime/index.js +1 -1
  52. package/es/DateTime/props/propTypes.js +1 -1
  53. package/es/DateTime/validator.js +2 -2
  54. package/es/DropBox/DropBox.js +9 -9
  55. package/es/DropBox/DropBoxElement/DropBoxElement.js +9 -7
  56. package/es/DropBox/DropBoxElement/__tests__/DropBoxElement.spec.js +1 -1
  57. package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +4 -2
  58. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +54 -51
  59. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +5 -5
  60. package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +1 -1
  61. package/es/DropBox/__tests__/DropBox.spec.js +1 -1
  62. package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +4 -2
  63. package/es/DropBox/css/cssJSLogic.js +1 -1
  64. package/es/DropBox/props/defaultProps.js +1 -1
  65. package/es/DropBox/props/propTypes.js +1 -1
  66. package/es/DropBox/utils/isMobilePopover.js +1 -1
  67. package/es/DropDown/DropDown.js +4 -4
  68. package/es/DropDown/DropDownHeading.js +3 -3
  69. package/es/DropDown/DropDownItem.js +3 -3
  70. package/es/DropDown/DropDownSearch.js +4 -4
  71. package/es/DropDown/DropDownSeparator.js +2 -2
  72. package/es/DropDown/__tests__/DropDown.spec.js +1 -1
  73. package/es/DropDown/__tests__/DropDownHeading.spec.js +1 -1
  74. package/es/DropDown/__tests__/DropDownItem.spec.js +1 -1
  75. package/es/DropDown/__tests__/DropDownSearch.spec.js +1 -1
  76. package/es/DropDown/__tests__/DropDownSeparator.spec.js +1 -1
  77. package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +3 -1
  78. package/es/DropDown/index.js +7 -7
  79. package/es/DropDown/props/propTypes.js +1 -1
  80. package/es/Heading/Heading.js +4 -4
  81. package/es/Heading/__tests__/Heading.spec.js +1 -1
  82. package/es/Label/Label.js +4 -4
  83. package/es/Label/__tests__/Label.spec.js +1 -1
  84. package/es/Layout/Box.js +4 -4
  85. package/es/Layout/Container.js +4 -4
  86. package/es/Layout/__tests__/Box.spec.js +1 -1
  87. package/es/Layout/__tests__/Container.spec.js +1 -1
  88. package/es/Layout/index.js +2 -2
  89. package/es/ListItem/ListContainer.js +6 -6
  90. package/es/ListItem/ListItem.js +5 -5
  91. package/es/ListItem/ListItemWithAvatar.js +7 -7
  92. package/es/ListItem/ListItemWithCheckBox.js +6 -6
  93. package/es/ListItem/ListItemWithIcon.js +5 -5
  94. package/es/ListItem/ListItemWithRadio.js +6 -6
  95. package/es/ListItem/__tests__/ListContainer.spec.js +1 -1
  96. package/es/ListItem/__tests__/ListItem.spec.js +1 -1
  97. package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +1 -1
  98. package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +1 -1
  99. package/es/ListItem/__tests__/ListItemWithIcon.spec.js +1 -1
  100. package/es/ListItem/__tests__/ListItemWithRadio.spec.js +1 -1
  101. package/es/ListItem/index.js +6 -6
  102. package/es/ListItem/props/propTypes.js +2 -2
  103. package/es/Modal/Modal.js +3 -3
  104. package/es/Modal/__tests__/Modal.spec.js +1 -1
  105. package/es/MultiSelect/AdvancedGroupMultiSelect.js +17 -17
  106. package/es/MultiSelect/AdvancedMultiSelect.js +17 -17
  107. package/es/MultiSelect/EmptyState.js +3 -3
  108. package/es/MultiSelect/MobileHeader/MobileHeader.js +5 -5
  109. package/es/MultiSelect/MobileHeader/__tests__/MobileHeader.spec.js +1 -1
  110. package/es/MultiSelect/MultiSelect.js +20 -20
  111. package/es/MultiSelect/MultiSelectHeader.js +4 -4
  112. package/es/MultiSelect/MultiSelectWithAvatar.js +16 -16
  113. package/es/MultiSelect/SelectedOptions.js +5 -5
  114. package/es/MultiSelect/Suggestions.js +6 -6
  115. package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +1 -1
  116. package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +1 -1
  117. package/es/MultiSelect/__tests__/EmptyState.spec.js +1 -1
  118. package/es/MultiSelect/__tests__/MultiSelect.spec.js +1 -1
  119. package/es/MultiSelect/__tests__/MultiSelectHeader.spec.js +1 -1
  120. package/es/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +1 -1
  121. package/es/MultiSelect/__tests__/SelectedOptions.spec.js +1 -1
  122. package/es/MultiSelect/__tests__/Suggestions.spec.js +1 -1
  123. package/es/MultiSelect/index.js +4 -4
  124. package/es/MultiSelect/props/defaultProps.js +1 -1
  125. package/es/PopOver/PopOver.js +6 -6
  126. package/es/PopOver/__tests__/PopOver.spec.js +1 -1
  127. package/es/PopOver/index.js +3 -3
  128. package/es/Popup/Popup.js +236 -87
  129. package/es/Provider/AvatarSize.js +1 -1
  130. package/es/Provider/CssProvider.js +1 -1
  131. package/es/Provider/IdProvider.js +2 -2
  132. package/es/Provider/LibraryContext.js +2 -2
  133. package/es/Provider/ZindexProvider.js +2 -2
  134. package/es/Provider/index.js +4 -4
  135. package/es/Radio/Radio.js +6 -6
  136. package/es/Radio/__tests__/Radio.spec.js +1 -1
  137. package/es/Responsive/CustomResponsive.js +7 -7
  138. package/es/Responsive/ResizeComponent.js +2 -2
  139. package/es/Responsive/Responsive.js +6 -6
  140. package/es/Responsive/index.js +3 -3
  141. package/es/Responsive/utils/index.js +1 -1
  142. package/es/Responsive/windowResizeObserver.js +1 -1
  143. package/es/ResponsiveDropBox/ResponsiveDropBox.js +6 -6
  144. package/es/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +1 -1
  145. package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +4 -2
  146. package/es/ResponsiveDropBox/props/propTypes.js +1 -1
  147. package/es/Ribbon/Ribbon.js +3 -3
  148. package/es/Ribbon/__tests__/Ribbon.spec.js +1 -1
  149. package/es/RippleEffect/RippleEffect.js +4 -4
  150. package/es/RippleEffect/__tests__/RippleEffect.spec.js +1 -1
  151. package/es/Select/GroupSelect.js +16 -16
  152. package/es/Select/Select.js +15 -15
  153. package/es/Select/SelectWithAvatar.js +17 -17
  154. package/es/Select/SelectWithIcon.js +13 -13
  155. package/es/Select/__tests__/GroupSelect.spec.js +1 -1
  156. package/es/Select/__tests__/Select.spec.js +1 -1
  157. package/es/Select/__tests__/SelectWithAvatar.spec.js +1 -1
  158. package/es/Select/__tests__/SelectWithIcon.spec.js +1 -1
  159. package/es/Select/index.js +4 -4
  160. package/es/Select/props/defaultProps.js +1 -1
  161. package/es/Stencils/Stencils.js +3 -3
  162. package/es/Stencils/__tests__/Stencils.spec.js +1 -1
  163. package/es/Switch/Switch.js +5 -5
  164. package/es/Switch/__tests__/Switch.spec.js +1 -1
  165. package/es/Tab/Tab.js +5 -5
  166. package/es/Tab/TabContent.js +4 -4
  167. package/es/Tab/TabContentWrapper.js +3 -3
  168. package/es/Tab/TabWrapper.js +3 -3
  169. package/es/Tab/Tabs.js +13 -13
  170. package/es/Tab/__tests__/Tab.spec.js +1 -1
  171. package/es/Tab/__tests__/TabContent.spec.js +1 -1
  172. package/es/Tab/__tests__/TabContentWrapper.spec.js +1 -1
  173. package/es/Tab/__tests__/TabWrapper.spec.js +1 -1
  174. package/es/Tab/__tests__/Tabs.spec.js +1 -1
  175. package/es/Tab/index.js +5 -5
  176. package/es/Tag/Tag.js +7 -7
  177. package/es/Tag/__tests__/Tag.spec.js +1 -1
  178. package/es/Tag/props/propTypes.js +1 -1
  179. package/es/TextBox/TextBox.js +3 -3
  180. package/es/TextBox/__tests__/TextBox.spec.js +1 -1
  181. package/es/TextBoxIcon/TextBoxIcon.js +6 -6
  182. package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +1 -1
  183. package/es/TextBoxIcon/props/propTypes.js +1 -1
  184. package/es/Textarea/Textarea.js +3 -3
  185. package/es/Textarea/__tests__/Textarea.spec.js +1 -1
  186. package/es/Tooltip/Tooltip.js +6 -6
  187. package/es/Typography/Typography.js +4 -4
  188. package/es/Typography/css/cssJSLogic.js +1 -1
  189. package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
  190. package/es/VelocityAnimation/VelocityAnimation/__tests__/VelocityAnimation.spec.js +1 -1
  191. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
  192. package/es/VelocityAnimation/VelocityAnimationGroup/__tests__/VelocityAnimationGroup.spec.js +1 -1
  193. package/es/VelocityAnimation/index.js +2 -2
  194. package/es/css.js +37 -37
  195. package/es/deprecated/PortalLayer/PortalLayer.js +3 -3
  196. package/es/index.js +39 -39
  197. package/es/semantic/Button/Button.js +3 -3
  198. package/es/semantic/Button/__tests__/Button.spec.js +1 -1
  199. package/es/semantic/index.js +1 -1
  200. package/es/utils/Common.js +3 -2
  201. package/es/utils/ContextOptimizer.js +1 -1
  202. package/es/utils/cssUtils.js +1 -1
  203. package/es/utils/datetime/common.js +1 -1
  204. package/es/utils/dropDownUtils.js +1 -1
  205. package/es/utils/index.js +1 -1
  206. package/es/v1/Accordion/Accordion.js +2 -2
  207. package/es/v1/Accordion/AccordionItem.js +4 -4
  208. package/es/v1/Accordion/index.js +2 -2
  209. package/es/v1/Animation/Animation.js +3 -3
  210. package/es/v1/Animation/utils.js +1 -1
  211. package/es/v1/AppContainer/AppContainer.js +8 -8
  212. package/es/v1/Avatar/Avatar.js +5 -5
  213. package/es/v1/AvatarTeam/AvatarTeam.js +4 -4
  214. package/es/v1/Button/Button.js +4 -4
  215. package/es/v1/Button/props/defaultProps.js +1 -1
  216. package/es/v1/Buttongroup/Buttongroup.js +3 -3
  217. package/es/v1/Card/Card.js +5 -5
  218. package/es/v1/Card/index.js +4 -4
  219. package/es/v1/CheckBox/CheckBox.js +6 -6
  220. package/es/v1/DateTime/CalendarView.js +7 -7
  221. package/es/v1/DateTime/DateTime.js +15 -15
  222. package/es/v1/DateTime/DateTimePopupFooter.js +5 -5
  223. package/es/v1/DateTime/DateTimePopupHeader.js +4 -4
  224. package/es/v1/DateTime/DateWidget.js +17 -17
  225. package/es/v1/DateTime/DaysRow.js +3 -3
  226. package/es/v1/DateTime/Time.js +5 -5
  227. package/es/v1/DateTime/YearView.js +6 -6
  228. package/es/v1/DateTime/index.js +1 -1
  229. package/es/v1/DateTime/props/propTypes.js +1 -1
  230. package/es/v1/DropBox/DropBox.js +9 -9
  231. package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +6 -6
  232. package/es/v1/DropBox/props/defaultProps.js +1 -1
  233. package/es/v1/DropBox/props/propTypes.js +1 -1
  234. package/es/v1/DropBox/utils/isMobilePopover.js +1 -1
  235. package/es/v1/DropDown/DropDown.js +4 -4
  236. package/es/v1/DropDown/DropDownHeading.js +3 -3
  237. package/es/v1/DropDown/DropDownItem.js +3 -3
  238. package/es/v1/DropDown/DropDownSearch.js +4 -4
  239. package/es/v1/DropDown/DropDownSeparator.js +2 -2
  240. package/es/v1/DropDown/props/propTypes.js +1 -1
  241. package/es/v1/Heading/Heading.js +4 -4
  242. package/es/v1/Label/Label.js +4 -4
  243. package/es/v1/Layout/Box.js +4 -4
  244. package/es/v1/Layout/Container.js +4 -4
  245. package/es/v1/Layout/index.js +2 -2
  246. package/es/v1/ListItem/ListContainer.js +6 -6
  247. package/es/v1/ListItem/ListItem.js +5 -5
  248. package/es/v1/ListItem/ListItemWithAvatar.js +7 -7
  249. package/es/v1/ListItem/ListItemWithCheckBox.js +6 -6
  250. package/es/v1/ListItem/ListItemWithIcon.js +5 -5
  251. package/es/v1/ListItem/ListItemWithRadio.js +6 -6
  252. package/es/v1/ListItem/index.js +6 -6
  253. package/es/v1/Modal/Modal.js +3 -3
  254. package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +17 -17
  255. package/es/v1/MultiSelect/AdvancedMultiSelect.js +17 -17
  256. package/es/v1/MultiSelect/EmptyState.js +3 -3
  257. package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +5 -5
  258. package/es/v1/MultiSelect/MultiSelect.js +19 -19
  259. package/es/v1/MultiSelect/MultiSelectHeader.js +4 -4
  260. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +16 -16
  261. package/es/v1/MultiSelect/SelectedOptions.js +5 -5
  262. package/es/v1/MultiSelect/Suggestions.js +6 -6
  263. package/es/v1/MultiSelect/index.js +4 -4
  264. package/es/v1/MultiSelect/props/defaultProps.js +1 -1
  265. package/es/v1/PopOver/PopOver.js +6 -6
  266. package/es/v1/Popup/Popup.js +3 -3
  267. package/es/v1/Radio/Radio.js +5 -5
  268. package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +6 -6
  269. package/es/v1/ResponsiveDropBox/props/propTypes.js +1 -1
  270. package/es/v1/Ribbon/Ribbon.js +3 -3
  271. package/es/v1/RippleEffect/RippleEffect.js +4 -4
  272. package/es/v1/Select/GroupSelect.js +16 -16
  273. package/es/v1/Select/Select.js +15 -15
  274. package/es/v1/Select/SelectWithAvatar.js +17 -17
  275. package/es/v1/Select/SelectWithIcon.js +13 -13
  276. package/es/v1/Select/index.js +4 -4
  277. package/es/v1/Select/props/defaultProps.js +1 -1
  278. package/es/v1/Stencils/Stencils.js +3 -3
  279. package/es/v1/Switch/Switch.js +5 -5
  280. package/es/v1/Tab/Tab.js +5 -5
  281. package/es/v1/Tab/TabContent.js +4 -4
  282. package/es/v1/Tab/TabContentWrapper.js +3 -3
  283. package/es/v1/Tab/TabWrapper.js +3 -3
  284. package/es/v1/Tab/Tabs.js +13 -13
  285. package/es/v1/Tab/index.js +5 -5
  286. package/es/v1/Tag/Tag.js +7 -7
  287. package/es/v1/TextBox/TextBox.js +3 -3
  288. package/es/v1/TextBoxIcon/TextBoxIcon.js +6 -6
  289. package/es/v1/TextBoxIcon/props/propTypes.js +1 -1
  290. package/es/v1/Textarea/Textarea.js +3 -3
  291. package/es/v1/Tooltip/Tooltip.js +6 -6
  292. package/es/v1/Typography/Typography.js +4 -4
  293. package/es/v1/Typography/css/cssJSLogic.js +1 -1
  294. package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
  295. package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
  296. package/es/v1/semantic/Button/Button.js +3 -3
  297. package/es/v1/semantic/index.js +1 -1
  298. package/lib/CheckBox/CheckBox.js +1 -1
  299. package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +2 -2
  300. package/lib/DropBox/DropBoxElement/DropBoxElement.js +3 -1
  301. package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +4 -2
  302. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +54 -51
  303. package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +2 -2
  304. package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +4 -2
  305. package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +3 -1
  306. package/lib/Popup/Popup.js +282 -114
  307. package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +4 -2
  308. package/lib/utils/Common.js +5 -1
  309. package/package.json +2 -2
  310. package/result.json +1 -1
package/es/Popup/Popup.js CHANGED
@@ -1,14 +1,17 @@
1
1
  /**** Libraries ****/
2
2
  import React from 'react';
3
3
  import hoistStatics from 'hoist-non-react-statics';
4
- import { PopupPropTypes, ContextTypes } from './props/propTypes';
4
+ import { PopupPropTypes, ContextTypes } from "./props/propTypes";
5
5
  /**** Methods ****/
6
6
 
7
- import { debounce, isDescendant, isTextSelected, cancelBubblingEffect } from '../utils/Common.js';
8
- import viewPort from './viewPort';
9
- import { absolutePositionMapping, rtlAbsolutePositionMapping, rtlFixedPositionMapping } from './PositionMapping.js';
7
+ import { debounce, isDescendant, isTextSelected, cancelBubblingEffect, DUMMY_OBJECT } from "../utils/Common.js";
8
+ import viewPort from "./viewPort";
9
+ import { absolutePositionMapping, rtlAbsolutePositionMapping, rtlFixedPositionMapping } from "./PositionMapping.js";
10
10
  import ResizeObserver from '@zohodesk/virtualizer/lib/commons/ResizeObserver.js';
11
- import { addIntersectionObserver, removeIntersectionObserver } from './intersectionObserver';
11
+ import { addIntersectionObserver, removeIntersectionObserver } from "./intersectionObserver";
12
+ import { positionMapping } from "../DropBox/DropBoxPositionMapping.js";
13
+ import isMobilePopover from "../DropBox/utils/isMobilePopover.js";
14
+ import selectn from 'selectn';
12
15
  let lastOpenedGroup = [];
13
16
  let popups = {};
14
17
 
@@ -47,7 +50,8 @@ const Popup = function (Component) {
47
50
  isArrow: needPopupArrow = false,
48
51
  customOrder: customPositionOrder = [],
49
52
  scrollDebounceTime: popupScrollDebounceTime = 0,
50
- closeOnScroll: closeOnScrollPopup = false
53
+ closeOnScroll: closeOnScrollPopup = false,
54
+ isOutsideScrollBlocked: isOutsideScrollBlock = false
51
55
  } = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
52
56
 
53
57
  class Popup extends React.Component {
@@ -66,7 +70,8 @@ const Popup = function (Component) {
66
70
  //{height: ‘’, width: ‘’,}
67
71
  popupOffset: {},
68
72
  //{height: ‘’, width: ‘’,}
69
- isAbsolutePositioningNeeded: true
73
+ isAbsolutePositioningNeeded: true,
74
+ isMobile: false
70
75
  };
71
76
  this.togglePopup = this.togglePopup.bind(this);
72
77
  this.documentClickHandler = this.documentClickHandler.bind(this);
@@ -81,10 +86,11 @@ const Popup = function (Component) {
81
86
  this.handleResize = debounce(this.handleResize.bind(this), 300);
82
87
  this.handlePopupResize = this.handlePopupResize.bind(this);
83
88
  this.getIsAbsolutePopup = this.getIsAbsolutePopup.bind(this);
89
+ this.getIsOutsideScrollBlocked = this.getIsOutsideScrollBlocked.bind(this);
84
90
  this.getNeedArrow = this.getNeedArrow.bind(this);
85
91
  this.getCustomPositionOrder = this.getCustomPositionOrder.bind(this);
86
- this.handleOpenPopupPositionChange = this.handleOpenPopupPositionChange.bind(this);
87
- this.getScrollDebounceTime = this.getScrollDebounceTime.bind(this);
92
+ this.handleOpenPopupPositionChange = this.handleOpenPopupPositionChange.bind(this); // this.getScrollDebounceTime = this.getScrollDebounceTime.bind(this);
93
+
88
94
  this.getCloseOnScrollPopup = this.getCloseOnScrollPopup.bind(this);
89
95
  this.handleCloseLastOpenedGroup = this.handleCloseLastOpenedGroup.bind(this);
90
96
  this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
@@ -98,19 +104,26 @@ const Popup = function (Component) {
98
104
  this.handleAddingScrollBlock = this.handleAddingScrollBlock.bind(this);
99
105
  this.handleRemovingScrollBlock = this.handleRemovingScrollBlock.bind(this);
100
106
  this.handleIntersectionObserver = this.handleIntersectionObserver.bind(this);
107
+ this.updateVisibilityOnIntersection = this.updateVisibilityOnIntersection.bind(this);
108
+ this.handleAddingScrollToUpdatePosition = this.handleAddingScrollToUpdatePosition.bind(this);
109
+ this.handleRemovingScrollToUpdatePosition = this.handleRemovingScrollToUpdatePosition.bind(this);
110
+ this.updatePositionOnScroll = this.updatePositionOnScroll.bind(this);
111
+ this.setContainerDynamicPositioning = this.setContainerDynamicPositioning.bind(this);
112
+ this.updatePopupState = this.updatePopupState.bind(this);
113
+ this.handleScrollAndBlockEvents = this.handleScrollAndBlockEvents.bind(this);
114
+ this.handleDropElementStyleUpdate = this.handleDropElementStyleUpdate.bind(this);
115
+ this.positionRef = /*#__PURE__*/React.createRef();
101
116
  this.popupObserver = new ResizeObserver(this.handlePopupResize); //dropBoxSize
102
117
 
103
118
  this.size = null;
119
+ this.isTargetElementVisible = false;
104
120
  this.isAbsolutePopup = isAbsolutePopup;
105
121
  this.needPopupArrow = needPopupArrow;
106
122
  this.customPositionOrder = customPositionOrder;
107
123
  this.scrollDebounceTime = popupScrollDebounceTime;
108
124
  this.closeOnScroll = closeOnScrollPopup;
109
- const {
110
- scrollDebounceTime
111
- } = this.getScrollDebounceTime(this);
112
- this.handleScroll = debounce(this.handleScroll.bind(this), scrollDebounceTime);
113
- this.handleDebouncedPositionChange = debounce(this.handlePositionChange.bind(this), 100);
125
+ this.isOutsideScrollBlock = isOutsideScrollBlock; // const { scrollDebounceTime } = this.getScrollDebounceTime(this);
126
+ // this.handleScroll = debounce(this.handleScroll.bind(this), scrollDebounceTime);
114
127
  }
115
128
 
116
129
  componentDidMount() {
@@ -143,12 +156,24 @@ const Popup = function (Component) {
143
156
  }
144
157
  }
145
158
 
159
+ handleScrollAndBlockEvents(isPopupReady, isMobile) {
160
+ if (isPopupReady && !isMobile) {
161
+ this.handleAddingScrollBlock();
162
+ this.handleAddingScrollToUpdatePosition();
163
+ } else {
164
+ this.handleRemovingScrollBlock();
165
+ this.handleRemovingScrollToUpdatePosition();
166
+ }
167
+ }
168
+
146
169
  componentDidUpdate(prevProps, prevState) {
147
170
  const {
148
- isPopupReady
171
+ isPopupReady,
172
+ isMobile
149
173
  } = this.state;
150
174
  const {
151
- isPopupReady: oldStateOpen = false
175
+ isPopupReady: oldStateOpen = false,
176
+ isMobile: oldIsMobileState
152
177
  } = prevState || {};
153
178
  const {
154
179
  dropElement
@@ -164,12 +189,10 @@ const Popup = function (Component) {
164
189
  this.size = null;
165
190
  this.popupObserver.disconnect();
166
191
  }
192
+ }
167
193
 
168
- if (isPopupReady) {
169
- this.handleAddingScrollBlock();
170
- } else {
171
- this.handleRemovingScrollBlock();
172
- }
194
+ if (oldStateOpen !== isPopupReady && !isMobile || oldIsMobileState !== isMobile) {
195
+ this.handleScrollAndBlockEvents(isPopupReady, isMobile);
173
196
  }
174
197
  }
175
198
 
@@ -186,6 +209,7 @@ const Popup = function (Component) {
186
209
  return res;
187
210
  }, popups);
188
211
  this.handleRemovingScrollBlock();
212
+ this.handleRemovingScrollToUpdatePosition();
189
213
  let noPopups = true;
190
214
 
191
215
  for (const i in popups) {
@@ -211,10 +235,8 @@ const Popup = function (Component) {
211
235
  }
212
236
 
213
237
  handleAddingScrollBlock() {
214
- const {
215
- isAbsolutePositioningNeeded,
216
- isOutsideScrollBlocked
217
- } = this.props;
238
+ const isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
239
+ const isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
218
240
 
219
241
  if (isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
220
242
  addIntersectionObserver(this.placeHolderElement, this.handleIntersectionObserver);
@@ -223,10 +245,8 @@ const Popup = function (Component) {
223
245
  }
224
246
 
225
247
  handleRemovingScrollBlock() {
226
- const {
227
- isAbsolutePositioningNeeded,
228
- isOutsideScrollBlocked
229
- } = this.props;
248
+ const isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
249
+ const isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
230
250
 
231
251
  if (isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
232
252
  removeIntersectionObserver(this.placeHolderElement, this.handleIntersectionObserver);
@@ -234,6 +254,98 @@ const Popup = function (Component) {
234
254
  }
235
255
  }
236
256
 
257
+ handleAddingScrollToUpdatePosition() {
258
+ const isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
259
+ const isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
260
+
261
+ if (!isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
262
+ addIntersectionObserver(this.placeHolderElement, this.updateVisibilityOnIntersection);
263
+ document.addEventListener('scroll', this.updatePositionOnScroll, {
264
+ capture: true,
265
+ passive: false
266
+ });
267
+ }
268
+ }
269
+
270
+ handleRemovingScrollToUpdatePosition() {
271
+ const isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
272
+ const isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
273
+
274
+ if (!isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
275
+ removeIntersectionObserver(this.placeHolderElement, this.updateVisibilityOnIntersection);
276
+ document.removeEventListener('scroll', this.updatePositionOnScroll, {
277
+ capture: true,
278
+ passive: false
279
+ });
280
+ }
281
+ }
282
+
283
+ handleDropElementStyleUpdate(_ref) {
284
+ let {
285
+ top = '',
286
+ left = '',
287
+ bottom = '',
288
+ right = ''
289
+ } = _ref;
290
+ const {
291
+ dropElement
292
+ } = this;
293
+ Object.assign(dropElement.style, {
294
+ top: top ? `${top}px` : '',
295
+ left: left ? `${left}px` : '',
296
+ right: right ? `${right}px` : '',
297
+ bottom: bottom ? `${bottom}px` : ''
298
+ });
299
+ }
300
+
301
+ setContainerDynamicPositioning(betterPosition, needArrow) {
302
+ const {
303
+ dropElement
304
+ } = this;
305
+ const {
306
+ isMobile
307
+ } = this.state;
308
+ const {
309
+ view,
310
+ viewsOffset
311
+ } = betterPosition || DUMMY_OBJECT;
312
+ const styleToApply = selectn(`${view}`, viewsOffset);
313
+
314
+ if (isMobile) {
315
+ this.handleDropElementStyleUpdate({
316
+ top: '',
317
+ left: '',
318
+ right: '',
319
+ bottom: ''
320
+ });
321
+ } else {
322
+ this.handleDropElementStyleUpdate(styleToApply);
323
+
324
+ if (this.positionRef.current !== view) {
325
+ dropElement.setAttribute('data-position', `${view}`);
326
+ dropElement.setAttribute('data-box-direction', selectn(`${view}.direction`, positionMapping));
327
+
328
+ if (needArrow) {
329
+ dropElement.setAttribute('data-arrow-position', selectn(`${view}.arrowPosition`, positionMapping));
330
+ }
331
+
332
+ this.positionRef.current = view;
333
+ }
334
+ }
335
+ }
336
+
337
+ updatePositionOnScroll(e) {
338
+ const {
339
+ placeHolderElement,
340
+ defaultPosition,
341
+ isTargetElementVisible
342
+ } = this;
343
+
344
+ if (e.target.contains(placeHolderElement) && isTargetElementVisible) {
345
+ this.handlePopupPosition(defaultPosition, true);
346
+ }
347
+ }
348
+
237
349
  addScrollBlockListeners() {
238
350
  document.addEventListener('wheel', this.handleBlockScroll, {
239
351
  capture: true,
@@ -243,7 +355,7 @@ const Popup = function (Component) {
243
355
  capture: true,
244
356
  passive: false
245
357
  });
246
- document.addEventListener('scroll', this.handleDebouncedPositionChange, {
358
+ document.addEventListener('scroll', this.handlePositionChange, {
247
359
  capture: true,
248
360
  passive: false
249
361
  });
@@ -262,7 +374,7 @@ const Popup = function (Component) {
262
374
  capture: true,
263
375
  passive: false
264
376
  });
265
- document.removeEventListener('scroll', this.handleDebouncedPositionChange, {
377
+ document.removeEventListener('scroll', this.handlePositionChange, {
266
378
  capture: true,
267
379
  passive: false
268
380
  });
@@ -291,7 +403,7 @@ const Popup = function (Component) {
291
403
  const containerElement = this.dropElement;
292
404
 
293
405
  if (containerElement && containerElement !== event.target && !containerElement.contains(event.target) && targetElement && targetElement !== event.target && !targetElement.contains(event.target) && event.target.contains(targetElement)) {
294
- this.handlePopupPosition(this.state.position); // this.closePopupOnly(event);
406
+ this.handlePopupPosition(this.state.position, true); // this.closePopupOnly(event);
295
407
  }
296
408
  }
297
409
 
@@ -305,11 +417,25 @@ const Popup = function (Component) {
305
417
  }
306
418
 
307
419
  handleIntersectionObserver(entry) {
308
- if (entry.intersectionRatio === 0) {
420
+ if (entry.intersectionRatio === 0 && entry.isIntersecting === false) {
309
421
  this.closePopupOnly();
310
422
  }
311
423
  }
312
424
 
425
+ updateVisibilityOnIntersection(entry) {
426
+ const {
427
+ dropElement
428
+ } = this;
429
+
430
+ if (entry.isIntersecting === true) {
431
+ this.isTargetElementVisible = true;
432
+ dropElement.setAttribute('data-visible', 'visible');
433
+ } else if (entry.intersectionRatio === 0 && entry.isIntersecting === false) {
434
+ this.isTargetElementVisible = false;
435
+ dropElement.setAttribute('data-visible', 'hidden');
436
+ }
437
+ }
438
+
313
439
  getGroup() {
314
440
  const {
315
441
  popupGroup
@@ -325,17 +451,12 @@ const Popup = function (Component) {
325
451
  needPopupArrow
326
452
  } = popup;
327
453
  return isArrow !== undefined ? isArrow : needPopupArrow;
328
- }
454
+ } // getScrollDebounceTime(popup) {
455
+ // const { scrollDebounceTime } = popup.props;
456
+ // const { scrollDebounceTime: popupScrollDebounceTime } = popup;
457
+ // return scrollDebounceTime !== undefined ? scrollDebounceTime : popupScrollDebounceTime;
458
+ // }
329
459
 
330
- getScrollDebounceTime(popup) {
331
- const {
332
- scrollDebounceTime
333
- } = popup.props;
334
- const {
335
- scrollDebounceTime: popupScrollDebounceTime
336
- } = popup;
337
- return scrollDebounceTime !== undefined ? scrollDebounceTime : popupScrollDebounceTime;
338
- }
339
460
 
340
461
  getCloseOnScrollPopup(popup) {
341
462
  const {
@@ -357,6 +478,16 @@ const Popup = function (Component) {
357
478
  return isAbsolutePositioningNeeded !== undefined ? isAbsolutePositioningNeeded : isAbsolutePopup;
358
479
  }
359
480
 
481
+ getIsOutsideScrollBlocked(popup) {
482
+ const {
483
+ isOutsideScrollBlocked
484
+ } = popup.props;
485
+ const {
486
+ isOutsideScrollBlock
487
+ } = popup;
488
+ return isOutsideScrollBlocked !== undefined ? isOutsideScrollBlocked : isOutsideScrollBlock;
489
+ }
490
+
360
491
  getCustomPositionOrder(popup) {
361
492
  const {
362
493
  customOrder = []
@@ -527,10 +658,24 @@ const Popup = function (Component) {
527
658
  cancelBubblingEffect(e);
528
659
  }
529
660
 
661
+ updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute) {
662
+ const isMobile = isMobilePopover(true);
663
+ this.setState({
664
+ isPopupReady: true,
665
+ position: view,
666
+ positions: views,
667
+ positionsOffset: viewsOffset,
668
+ targetOffset,
669
+ popupOffset,
670
+ isAbsolutePositioningNeeded: isAbsolute,
671
+ isMobile: isMobile
672
+ });
673
+ }
674
+
530
675
  handlePopupPosition() {
531
676
  let defaultPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bottomCenter';
532
- let isResizeHandling = arguments.length > 1 ? arguments[1] : undefined;
533
- // isResizeHandling --->>> Window resize and dropBox resize
677
+ let isUpdatePosition = arguments.length > 1 ? arguments[1] : undefined;
678
+ // isUpdatePosition --->>> Window resize and dropBox resize and to update the position
534
679
  const {
535
680
  direction
536
681
  } = this.context || {};
@@ -549,9 +694,11 @@ const Popup = function (Component) {
549
694
  }
550
695
 
551
696
  if (!placeHolderElement && !dropElement) {
697
+ const isMobile = isMobilePopover(true);
552
698
  this.setState({
553
699
  isPopupOpen: true,
554
- isPopupReady: true
700
+ isPopupReady: true,
701
+ isMobile: isMobile
555
702
  });
556
703
  return;
557
704
  }
@@ -578,23 +725,27 @@ const Popup = function (Component) {
578
725
  viewsOffset,
579
726
  targetOffset,
580
727
  popupOffset
581
- } = betterPosition || {};
582
-
583
- if (position !== view || !isPopupReady) {
584
- this.setState({
585
- isPopupReady: true,
586
- position: view,
587
- positions: views,
588
- positionsOffset: viewsOffset,
589
- targetOffset,
590
- popupOffset,
591
- isAbsolutePositioningNeeded: isAbsolute
592
- });
728
+ } = betterPosition || DUMMY_OBJECT;
729
+
730
+ if (!isAbsolute) {
731
+ if (!isPopupReady) {
732
+ this.updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute);
733
+ }
734
+
735
+ if (!dropElement) {
736
+ return;
737
+ }
738
+
739
+ this.setContainerDynamicPositioning(betterPosition, needArrow);
740
+ } else {
741
+ if (position !== view || !isPopupReady) {
742
+ this.updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute);
743
+ }
593
744
  }
594
745
  });
595
746
  };
596
747
 
597
- if (isResizeHandling) {
748
+ if (isUpdatePosition) {
598
749
  setPosition();
599
750
  } else {
600
751
  this.defaultPosition = defaultPosition;
@@ -626,6 +777,7 @@ const Popup = function (Component) {
626
777
  const needArrow = this.getNeedArrow(popup);
627
778
  const isAbsolute = this.getIsAbsolutePopup(popup);
628
779
  const customOrder = this.getCustomPositionOrder(popup);
780
+ const isMobile = isMobilePopover(true);
629
781
  const betterPosition = viewPort.betterView(dropElement, placeHolderElement, defaultPosition, scrollContainer, {
630
782
  needArrow,
631
783
  isAbsolute,
@@ -641,14 +793,16 @@ const Popup = function (Component) {
641
793
  const {
642
794
  left: oldLeft = '',
643
795
  top: oldTop = '',
644
- bottom: oldBottom = ''
796
+ bottom: oldBottom = '',
797
+ right: oldRight = ''
645
798
  } = positionsOffset[position] || {};
646
799
  const {
647
800
  left = '',
648
801
  top = '',
649
- bottom = ''
802
+ bottom = '',
803
+ right = ''
650
804
  } = viewsOffset[view] || {};
651
- const changeState = isAbsolute ? position !== view : oldLeft !== left || oldTop !== top || oldBottom !== bottom; // let isInViewPort = viewPort.isInViewPort(
805
+ const changeState = isAbsolute ? position !== view : oldLeft !== left || oldTop !== top || oldBottom !== bottom || oldRight !== right; // let isInViewPort = viewPort.isInViewPort(
652
806
  // placeHolderElement,
653
807
  // scrollContainer
654
808
  // );
@@ -660,7 +814,8 @@ const Popup = function (Component) {
660
814
  positionsOffset: viewsOffset,
661
815
  targetOffset,
662
816
  popupOffset,
663
- isAbsolutePositioningNeeded: isAbsolute
817
+ isAbsolutePositioningNeeded: isAbsolute,
818
+ isMobile: isMobile
664
819
  });
665
820
  } // if (!isInViewPort && !isAbsolute) {
666
821
  // popup.setState({ isPopupOpen: false, isPopupReady: false });
@@ -684,26 +839,19 @@ const Popup = function (Component) {
684
839
 
685
840
  handleResize() {
686
841
  this.handleOpenPopupPositionChange();
687
- }
688
-
689
- handleScroll(e) {
690
- // this.handleOpenPopupPositionChange();
691
- const {
692
- closeOnScroll
693
- } = this.getCloseOnScrollPopup(this);
694
- const {
695
- isPopupReady
696
- } = this.state;
697
-
698
- if (isPopupReady) {
699
- console.log('onscrollPopupREady');
700
- }
842
+ } // handleScroll(e) {
843
+ // // this.handleOpenPopupPositionChange();
844
+ // const { closeOnScroll } = this.getCloseOnScrollPopup(this);
845
+ // const { isPopupReady } = this.state;
846
+ // if (isPopupReady) {
847
+ // console.log('onscrollPopupREady');
848
+ // }
849
+ // if (isPopupReady && closeOnScroll) {
850
+ // console.log(this, 'handle Scroll');
851
+ // this.togglePopup(e);
852
+ // }
853
+ // }
701
854
 
702
- if (isPopupReady && closeOnScroll) {
703
- console.log(this, 'handle Scroll');
704
- this.togglePopup(e);
705
- }
706
- }
707
855
 
708
856
  handlePopupResize(popupSize) {
709
857
  const {
@@ -735,13 +883,14 @@ const Popup = function (Component) {
735
883
  }
736
884
 
737
885
  render() {
886
+ // const { isPopupReady, isPopupOpen } = this.state;
738
887
  const {
739
- isPopupReady,
740
- isPopupOpen
741
- } = this.state;
742
- const localState = isPopupReady ? this.state : {};
888
+ isMobile,
889
+ ...restState
890
+ } = this.state; // const localState = isPopupReady ? this.state : {};
891
+
743
892
  return /*#__PURE__*/React.createElement(Component, { ...this.props,
744
- ...this.state,
893
+ ...restState,
745
894
  openPopupOnly: this.openPopupOnly,
746
895
  closePopupOnly: this.closePopupOnly,
747
896
  togglePopup: this.togglePopup,
@@ -1,4 +1,4 @@
1
- import style from '../common/avatarsizes.module.css';
1
+ import style from "../common/avatarsizes.module.css";
2
2
  let styleList = {
3
3
  small: style.small,
4
4
  xsmall: style.xsmall,
@@ -1,4 +1,4 @@
1
- import style from '../common/common.module.css';
1
+ import style from "../common/common.module.css";
2
2
  let styleList = {
3
3
  hide: style.hide,
4
4
  isDisabled: style.disabled,
@@ -1,5 +1,5 @@
1
- import { useNumberGenerator, getNumberGenerators } from './NumberGenerator/NumberGenerator';
2
- import { getLibraryConfig } from './Config';
1
+ import { useNumberGenerator, getNumberGenerators } from "./NumberGenerator/NumberGenerator";
2
+ import { getLibraryConfig } from "./Config";
3
3
  let globalId = getLibraryConfig('idCounter'),
4
4
  deletedIndexes = [],
5
5
  globalPrefix;
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import LibraryContextInit from './LibraryContextInit';
4
- import { getLibraryConfig } from './Config';
3
+ import LibraryContextInit from "./LibraryContextInit";
4
+ import { getLibraryConfig } from "./Config";
5
5
 
6
6
  const LibraryContextProvider = _ref => {
7
7
  let {
@@ -1,5 +1,5 @@
1
- import { useNumberGenerator, getNumberGenerators } from './NumberGenerator/NumberGenerator';
2
- import { getLibraryConfig } from './Config';
1
+ import { useNumberGenerator, getNumberGenerators } from "./NumberGenerator/NumberGenerator";
2
+ import { getLibraryConfig } from "./Config";
3
3
  let globalId = getLibraryConfig('zindexCounter'),
4
4
  deletedIndexes = [],
5
5
  globalPrefix;
@@ -1,4 +1,4 @@
1
- export { getLibraryConfig, setLibraryConfig } from './Config';
2
- export { default as LibraryContextProvider } from './LibraryContext';
3
- export { removeGlobalZIndexPrefix, setInitialZIndex, useZIndex, getZIndex } from './ZindexProvider';
4
- export { setGlobalIdPrefix, removeGlobalIdPrefix, useUniqueId, getUniqueId } from './IdProvider';
1
+ export { getLibraryConfig, setLibraryConfig } from "./Config";
2
+ export { default as LibraryContextProvider } from "./LibraryContext";
3
+ export { removeGlobalZIndexPrefix, setInitialZIndex, useZIndex, getZIndex } from "./ZindexProvider";
4
+ export { setGlobalIdPrefix, removeGlobalIdPrefix, useUniqueId, getUniqueId } from "./IdProvider";
package/es/Radio/Radio.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['small', 'medium'] }] */
2
2
  import React from 'react';
3
- import { defaultProps } from './props/defaultProps';
4
- import { propTypes } from './props/propTypes';
5
- import Label from '../Label/Label';
6
- import { Container, Box } from '../Layout';
7
- import CssProvider from '../Provider/CssProvider';
8
- import style from './Radio.module.css';
3
+ import { defaultProps } from "./props/defaultProps";
4
+ import { propTypes } from "./props/propTypes";
5
+ import Label from "../Label/Label";
6
+ import { Container, Box } from "../Layout";
7
+ import CssProvider from "../Provider/CssProvider";
8
+ import style from "./Radio.module.css";
9
9
  export default class Radio extends React.Component {
10
10
  constructor(props) {
11
11
  super(props);
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
- import Radio from '../Radio.js';
3
+ import Radio from "../Radio.js";
4
4
  describe('Radio', () => {
5
5
  test('rendering the defult props', () => {
6
6
  const {
@@ -1,11 +1,11 @@
1
1
  import React, { useContext, useEffect, useState, useRef, useMemo } from 'react';
2
- import { CustomResponsiveSender_defaultProps, CustomResponsiveReceiver_defaultProps } from './props/defaultProps';
3
- import { CustomResponsiveSender_propTypes, CustomResponsiveReceiver_propTypes } from './props/propTypes';
4
- import ResizeObserver from './ResizeObserver';
5
- import DOMRefWrapper from './RefWrapper';
6
- import shallowCompare from './utils/shallowCompare';
7
- import { isBreackPointMatched, Subscribale, isTouchDevice, windowResizeObserver } from './sizeObservers';
8
- import { ContextOptimizer } from '../utils/ContextOptimizer'; // const commonBreakPoints = [ 480, 640, 768, 1024, 1440 ];
2
+ import { CustomResponsiveSender_defaultProps, CustomResponsiveReceiver_defaultProps } from "./props/defaultProps";
3
+ import { CustomResponsiveSender_propTypes, CustomResponsiveReceiver_propTypes } from "./props/propTypes";
4
+ import ResizeObserver from "./ResizeObserver";
5
+ import DOMRefWrapper from "./RefWrapper";
6
+ import shallowCompare from "./utils/shallowCompare";
7
+ import { isBreackPointMatched, Subscribale, isTouchDevice, windowResizeObserver } from "./sizeObservers";
8
+ import { ContextOptimizer } from "../utils/ContextOptimizer"; // const commonBreakPoints = [ 480, 640, 768, 1024, 1440 ];
9
9
  // const otherBreakPoints = [320, 360, 375, 720, 1280, 1600, 1920];
10
10
  // defaultResponsiveId means if ResponsiveSender do not recive id This will be id
11
11
 
@@ -4,8 +4,8 @@
4
4
  // 2) debounce Mutation observer and resize observer
5
5
  import React from 'react';
6
6
  import PropTypes from 'prop-types';
7
- import ResizeObserver from './ResizeObserver';
8
- import { getElementSpace, debounce } from '../utils/Common';
7
+ import ResizeObserver from "./ResizeObserver";
8
+ import { getElementSpace, debounce } from "../utils/Common";
9
9
  export default class ResizeComponent extends React.Component {
10
10
  constructor(props) {
11
11
  super(props);
@@ -1,11 +1,11 @@
1
1
  import React, { useContext, useEffect, useState, useMemo } from 'react'; // import React, { useState, useMemo, useCallback, useContext } from 'react';
2
2
 
3
- import { ResponsiveSender_defaultProps, ResponsiveReceiver_defaultProps } from './props/defaultProps';
4
- import { ResponsiveSender_propTypes, ResponsiveReceiver_propTypes } from './props/propTypes';
5
- import ResizeObserver from './ResizeObserver';
6
- import DOMRefWrapper from './RefWrapper';
7
- import { windowResizeObserver } from './windowResizeObserver';
8
- import { getBreakPointValue, defaultMatcher } from './utils/'; // const sortedBreackPointKey = [ 'MOBILE_XS', 'MOBILE_S', 'MOBILE_M', 'MOBILE', 'TABLET_S', 'TABLET_M', 'TABLET', 'LAPTOP_S', 'LAPTOP_M', 'LAPTOP', 'MONITOR_M', 'MONITOR'];
3
+ import { ResponsiveSender_defaultProps, ResponsiveReceiver_defaultProps } from "./props/defaultProps";
4
+ import { ResponsiveSender_propTypes, ResponsiveReceiver_propTypes } from "./props/propTypes";
5
+ import ResizeObserver from "./ResizeObserver";
6
+ import DOMRefWrapper from "./RefWrapper";
7
+ import { windowResizeObserver } from "./windowResizeObserver";
8
+ import { getBreakPointValue, defaultMatcher } from "./utils/"; // const sortedBreackPointKey = [ 'MOBILE_XS', 'MOBILE_S', 'MOBILE_M', 'MOBILE', 'TABLET_S', 'TABLET_M', 'TABLET', 'LAPTOP_S', 'LAPTOP_M', 'LAPTOP', 'MONITOR_M', 'MONITOR'];
9
9
 
10
10
  export const ResponsiveContext = /*#__PURE__*/React.createContext({});
11
11
  const defaultResponsiveId = 'parentReceiver';