@orfium/ictinus 4.75.0 → 4.76.0

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 (365) hide show
  1. package/dist/components/Avatar/Avatar.d.ts +1 -1
  2. package/dist/components/Avatar/Avatar.js +9 -22
  3. package/dist/components/Avatar/Avatar.style.js +3 -18
  4. package/dist/components/Avatar/AvatarStack/AvatarStack.d.ts +1 -1
  5. package/dist/components/Avatar/AvatarStack/AvatarStack.js +8 -24
  6. package/dist/components/Avatar/AvatarStack/AvatarStack.style.js +1 -12
  7. package/dist/components/Avatar/AvatarStack/index.js +0 -3
  8. package/dist/components/Avatar/AvatarStack/utils.js +1 -3
  9. package/dist/components/Avatar/index.js +0 -3
  10. package/dist/components/Avatar/utils.js +0 -5
  11. package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -2
  12. package/dist/components/Breadcrumb/Breadcrumb.js +5 -17
  13. package/dist/components/Breadcrumb/Breadcrumb.style.js +1 -9
  14. package/dist/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.js +2 -9
  15. package/dist/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.style.js +0 -5
  16. package/dist/components/Breadcrumb/Separator/Separator.js +1 -10
  17. package/dist/components/Breadcrumb/Separator/Separator.style.js +0 -4
  18. package/dist/components/Breadcrumb/index.js +0 -3
  19. package/dist/components/Button/Button.js +22 -37
  20. package/dist/components/Button/Button.style.js +3 -9
  21. package/dist/components/Button/ButtonLoader/ButtonLoader.js +5 -16
  22. package/dist/components/Button/ButtonLoader/ButtonLoader.style.js +0 -6
  23. package/dist/components/Button/ButtonLoader/index.js +0 -3
  24. package/dist/components/Button/index.js +0 -3
  25. package/dist/components/Button/utils.js +1 -15
  26. package/dist/components/ButtonBase/ButtonBase.d.ts +4 -4
  27. package/dist/components/ButtonBase/ButtonBase.js +31 -41
  28. package/dist/components/ButtonBase/ButtonBase.style.js +10 -28
  29. package/dist/components/ButtonBase/config.js +1 -1
  30. package/dist/components/ButtonBase/index.js +0 -3
  31. package/dist/components/ButtonBase/utils.js +6 -20
  32. package/dist/components/Card/Card.d.ts +2 -2
  33. package/dist/components/Card/Card.js +4 -10
  34. package/dist/components/Card/Card.style.js +3 -10
  35. package/dist/components/Card/index.js +0 -3
  36. package/dist/components/Chart/BarChart/BarChart.js +10 -29
  37. package/dist/components/Chart/BarChart/components/CustomLabel/CustomLabel.js +6 -13
  38. package/dist/components/Chart/BarChart/components/CustomLabel/index.js +0 -3
  39. package/dist/components/Chart/BarChart/components/CustomTooltip/CustomTooltip.js +5 -15
  40. package/dist/components/Chart/BarChart/components/CustomTooltip/CustomTooltip.style.js +1 -12
  41. package/dist/components/Chart/BarChart/components/CustomTooltip/index.js +0 -3
  42. package/dist/components/Chart/BarChart/components/CustomTooltipContent/CustomTooltipContent.js +4 -11
  43. package/dist/components/Chart/BarChart/components/CustomTooltipContent/CustomTooltipContent.style.js +1 -10
  44. package/dist/components/Chart/BarChart/components/CustomTooltipContent/index.js +0 -3
  45. package/dist/components/Chart/BarChart/index.js +0 -3
  46. package/dist/components/Chart/BarChart/utils.js +4 -24
  47. package/dist/components/Chart/DonutChart/DonutChart.js +2 -13
  48. package/dist/components/Chart/DonutChart/components/CustomLabel/CustomLabel.js +4 -11
  49. package/dist/components/Chart/DonutChart/components/CustomLabel/CustomLabel.style.js +0 -8
  50. package/dist/components/Chart/DonutChart/components/CustomLabel/index.js +0 -3
  51. package/dist/components/Chart/DonutChart/index.js +0 -3
  52. package/dist/components/Chart/LineChart/LineChart.js +7 -22
  53. package/dist/components/Chart/LineChart/components/CustomTooltip/CustomTooltip.js +2 -8
  54. package/dist/components/Chart/LineChart/components/CustomTooltip/CustomTooltip.style.js +1 -10
  55. package/dist/components/Chart/LineChart/components/CustomTooltip/index.js +0 -3
  56. package/dist/components/Chart/LineChart/components/GradientLine/GradientLine.js +1 -7
  57. package/dist/components/Chart/LineChart/components/GradientLine/index.js +0 -3
  58. package/dist/components/Chart/LineChart/index.js +0 -3
  59. package/dist/components/Chart/LineChart/story.utils.js +0 -5
  60. package/dist/components/Chart/LineChart/utils.js +3 -9
  61. package/dist/components/Chart/Wrapper.js +2 -14
  62. package/dist/components/CheckBox/CheckBox.js +17 -39
  63. package/dist/components/CheckBox/CheckBox.style.js +4 -26
  64. package/dist/components/CheckBox/index.js +0 -3
  65. package/dist/components/Chip/Chip.js +13 -33
  66. package/dist/components/Chip/Chip.style.js +5 -15
  67. package/dist/components/Chip/Chip.types.js +1 -1
  68. package/dist/components/Chip/components/Badge/Badge.js +3 -10
  69. package/dist/components/Chip/components/Badge/Badge.style.js +2 -7
  70. package/dist/components/Chip/components/Badge/index.js +0 -3
  71. package/dist/components/Chip/index.js +0 -3
  72. package/dist/components/Chip/utils.js +5 -8
  73. package/dist/components/DatePicker/DatePickInput/DatePickInput.js +16 -37
  74. package/dist/components/DatePicker/DatePickInput/DatePickInput.style.js +0 -5
  75. package/dist/components/DatePicker/DatePickInput/index.js +0 -3
  76. package/dist/components/DatePicker/DatePicker.js +31 -63
  77. package/dist/components/DatePicker/DatePicker.style.js +0 -4
  78. package/dist/components/DatePicker/Day/Day.js +15 -32
  79. package/dist/components/DatePicker/Day/Day.style.js +11 -23
  80. package/dist/components/DatePicker/Day/index.js +0 -3
  81. package/dist/components/DatePicker/Month/Month.js +6 -26
  82. package/dist/components/DatePicker/Month/Month.style.js +1 -12
  83. package/dist/components/DatePicker/Month/Month.utils.js +1 -25
  84. package/dist/components/DatePicker/Month/index.js +0 -3
  85. package/dist/components/DatePicker/OverlayComponent/OverlayComponent.js +17 -33
  86. package/dist/components/DatePicker/OverlayComponent/OverlayComponent.style.js +1 -21
  87. package/dist/components/DatePicker/OverlayComponent/components/MonthWrapper/MonthWrapper.js +13 -32
  88. package/dist/components/DatePicker/OverlayComponent/components/MonthWrapper/MonthWrapper.style.js +2 -20
  89. package/dist/components/DatePicker/OverlayComponent/index.js +0 -3
  90. package/dist/components/DatePicker/index.js +0 -4
  91. package/dist/components/DatePicker/utils.js +0 -7
  92. package/dist/components/Drawer/Drawer.js +0 -9
  93. package/dist/components/Drawer/Drawer.style.js +0 -6
  94. package/dist/components/Drawer/Navigation/MenuItem/MenuItem.js +10 -26
  95. package/dist/components/Drawer/Navigation/Navigation.js +5 -20
  96. package/dist/components/Drawer/Navigation/Navigation.style.js +1 -34
  97. package/dist/components/Drawer/index.js +0 -3
  98. package/dist/components/ExpandCollapse/ExpandCollapse.js +15 -31
  99. package/dist/components/ExpandCollapse/ExpandCollapse.style.js +0 -5
  100. package/dist/components/ExpandCollapse/index.js +0 -3
  101. package/dist/components/ExpandCollapse/useManageContentRef.js +0 -13
  102. package/dist/components/ExpandCollapse/utils.js +2 -4
  103. package/dist/components/Filter/Filter.js +54 -90
  104. package/dist/components/Filter/Filter.style.js +15 -46
  105. package/dist/components/Filter/components/FilterBase/FilterBase.js +18 -36
  106. package/dist/components/Filter/components/FilterBase/index.js +0 -3
  107. package/dist/components/Filter/components/MultiFilter/MultiFilter.js +9 -23
  108. package/dist/components/Filter/components/MultiFilter/MultiFilter.style.js +1 -11
  109. package/dist/components/Filter/components/MultiFilter/index.js +0 -3
  110. package/dist/components/Filter/components/Options/Options.js +7 -16
  111. package/dist/components/Filter/components/Options/Options.style.js +0 -6
  112. package/dist/components/Filter/components/SingleFilter/SingleFilter.js +10 -19
  113. package/dist/components/Filter/components/SingleFilter/components/SearchInput/SearchInput.js +3 -16
  114. package/dist/components/Filter/components/SingleFilter/components/SearchInput/SearchInput.style.js +1 -9
  115. package/dist/components/Filter/components/SingleFilter/components/SearchInput/index.js +0 -3
  116. package/dist/components/Filter/components/SingleFilter/index.js +0 -3
  117. package/dist/components/Filter/hooks/useMultiFilterUtils.js +14 -32
  118. package/dist/components/Filter/index.js +0 -3
  119. package/dist/components/Filter/utils.d.ts +1 -1
  120. package/dist/components/Filter/utils.js +17 -39
  121. package/dist/components/Icon/Icon.js +8 -16
  122. package/dist/components/Icon/Icon.style.js +3 -9
  123. package/dist/components/Icon/assets/iconSelector.js +0 -347
  124. package/dist/components/Icon/index.js +0 -4
  125. package/dist/components/IconButton/IconButton.js +10 -24
  126. package/dist/components/IconButton/IconButton.style.js +0 -3
  127. package/dist/components/IconButton/index.js +0 -3
  128. package/dist/components/Label/Label.js +9 -17
  129. package/dist/components/Label/Label.style.js +1 -8
  130. package/dist/components/Label/index.js +0 -3
  131. package/dist/components/List/List.js +11 -24
  132. package/dist/components/List/List.style.js +4 -16
  133. package/dist/components/List/ListItem/ListItem.js +14 -23
  134. package/dist/components/List/ListItem/ListItem.style.js +5 -14
  135. package/dist/components/List/ListItem/index.js +0 -3
  136. package/dist/components/List/ListItemGroup/ListGroupTitle/ListGroupTitle.js +4 -11
  137. package/dist/components/List/ListItemGroup/ListGroupTitle/ListGroupTitle.style.js +2 -11
  138. package/dist/components/List/ListItemGroup/ListGroupTitle/index.js +0 -3
  139. package/dist/components/List/ListItemGroup/ListItemGroup.js +6 -17
  140. package/dist/components/List/ListItemGroup/index.js +0 -3
  141. package/dist/components/List/NormalList/NormalList.js +9 -20
  142. package/dist/components/List/NormalList/index.js +0 -3
  143. package/dist/components/List/VirtualizedList/VirtualizedList.js +12 -34
  144. package/dist/components/List/VirtualizedList/index.js +0 -3
  145. package/dist/components/List/index.js +0 -3
  146. package/dist/components/List/utils.d.ts +1 -1
  147. package/dist/components/List/utils.js +5 -24
  148. package/dist/components/Loader/Loader.js +3 -10
  149. package/dist/components/Loader/Loader.style.js +0 -5
  150. package/dist/components/Loader/Loader.utils.d.ts +2 -2
  151. package/dist/components/Loader/Loader.utils.js +1 -12
  152. package/dist/components/Loader/components/DotsLoader/DotsLoader.js +1 -8
  153. package/dist/components/Loader/components/DotsLoader/DotsLoader.style.js +1 -14
  154. package/dist/components/Loader/components/DotsLoader/index.js +0 -3
  155. package/dist/components/Loader/components/IndeterminateLoader/IndeterminateLoader.js +1 -8
  156. package/dist/components/Loader/components/IndeterminateLoader/IndeterminateLoader.style.js +1 -19
  157. package/dist/components/Loader/components/IndeterminateLoader/index.js +0 -3
  158. package/dist/components/Loader/components/Spinner/Spinner.js +1 -8
  159. package/dist/components/Loader/components/Spinner/Spinner.style.js +0 -7
  160. package/dist/components/Loader/components/Spinner/index.js +0 -3
  161. package/dist/components/Loader/index.js +0 -3
  162. package/dist/components/Menu/Menu.js +24 -46
  163. package/dist/components/Menu/Menu.style.js +4 -11
  164. package/dist/components/Menu/index.js +0 -3
  165. package/dist/components/Modal/Modal.d.ts +2 -3
  166. package/dist/components/Modal/Modal.js +11 -26
  167. package/dist/components/Modal/Modal.style.js +1 -14
  168. package/dist/components/Modal/ModalContent/ModalContent.js +7 -17
  169. package/dist/components/Modal/ModalContent/ModalContent.style.js +1 -18
  170. package/dist/components/Modal/ModalContent/index.js +0 -3
  171. package/dist/components/Modal/index.js +0 -3
  172. package/dist/components/MultiTextFieldBase/MultiTextFieldBase.js +42 -67
  173. package/dist/components/MultiTextFieldBase/MultiTextFieldBase.style.js +7 -34
  174. package/dist/components/MultiTextFieldBase/hooks.js +9 -30
  175. package/dist/components/MultiTextFieldBase/index.js +0 -3
  176. package/dist/components/Notification/Banner/Banner.js +12 -20
  177. package/dist/components/Notification/Banner/index.js +0 -3
  178. package/dist/components/Notification/InlineNotification/InlineNotification.js +11 -19
  179. package/dist/components/Notification/InlineNotification/index.js +0 -3
  180. package/dist/components/Notification/Notification.style.js +3 -22
  181. package/dist/components/Notification/NotificationVisual/NotificationVisual.js +8 -19
  182. package/dist/components/Notification/NotificationVisual/NotificationVisual.style.js +1 -9
  183. package/dist/components/Notification/NotificationVisual/index.js +0 -3
  184. package/dist/components/Notification/NotificationsContainer/NotificationsContainer.js +3 -12
  185. package/dist/components/Notification/NotificationsContainer/NotificationsContainer.style.js +0 -8
  186. package/dist/components/Notification/NotificationsContainer/index.js +0 -3
  187. package/dist/components/Notification/Snackbar/Snackbar.js +13 -29
  188. package/dist/components/Notification/Snackbar/Snackbar.style.js +1 -18
  189. package/dist/components/Notification/Snackbar/index.js +0 -3
  190. package/dist/components/Notification/subcomponents/CompactNotification/CompactNotification.js +14 -32
  191. package/dist/components/Notification/subcomponents/CompactNotification/CompactNotification.style.js +1 -23
  192. package/dist/components/Notification/subcomponents/CompactNotification/index.js +0 -3
  193. package/dist/components/Notification/subcomponents/NotificationActionsArea/NotificationActionsArea.js +5 -13
  194. package/dist/components/Notification/subcomponents/NotificationActionsArea/index.js +0 -3
  195. package/dist/components/Overlay/Overlay.d.ts +1 -1
  196. package/dist/components/Overlay/Overlay.js +7 -18
  197. package/dist/components/Overlay/Overlay.style.js +3 -33
  198. package/dist/components/Overlay/index.js +0 -3
  199. package/dist/components/Pagination/Pagination.js +19 -29
  200. package/dist/components/Pagination/index.js +0 -3
  201. package/dist/components/Radio/Radio.js +19 -38
  202. package/dist/components/Radio/Radio.style.js +3 -27
  203. package/dist/components/Radio/index.js +0 -3
  204. package/dist/components/RadioGroup/RadioGroup.js +7 -22
  205. package/dist/components/RadioGroup/RadioGroupContext.js +0 -4
  206. package/dist/components/RadioGroup/index.js +0 -3
  207. package/dist/components/RadioGroup/useRadioGroup.js +0 -6
  208. package/dist/components/SearchField/SearchField.js +12 -31
  209. package/dist/components/SearchField/SearchFieldShowcase.js +4 -15
  210. package/dist/components/SearchField/index.js +0 -3
  211. package/dist/components/Select/Select.js +63 -124
  212. package/dist/components/Select/Select.style.js +1 -10
  213. package/dist/components/Select/components/SelectMenu/SelectMenu.js +7 -23
  214. package/dist/components/Select/components/SelectMenu/SelectMenu.style.js +5 -15
  215. package/dist/components/Select/components/SelectMenu/index.js +0 -3
  216. package/dist/components/Select/hooks/useMultiselectUtils.js +18 -39
  217. package/dist/components/Select/index.js +0 -3
  218. package/dist/components/Slider/Slider.js +12 -42
  219. package/dist/components/Slider/Slider.style.js +4 -9
  220. package/dist/components/Slider/components/SliderMark/SliderMark.js +7 -19
  221. package/dist/components/Slider/components/SliderMark/SliderMark.style.js +3 -7
  222. package/dist/components/Slider/components/SliderMark/index.js +0 -3
  223. package/dist/components/Slider/components/SliderThumb/SliderThumb.js +5 -13
  224. package/dist/components/Slider/components/SliderThumb/SliderThumb.style.js +4 -10
  225. package/dist/components/Slider/components/SliderThumb/index.js +0 -3
  226. package/dist/components/Slider/components/SliderTrack/SliderTrack.d.ts +2 -3
  227. package/dist/components/Slider/components/SliderTrack/SliderTrack.js +8 -20
  228. package/dist/components/Slider/components/SliderTrack/SliderTrack.style.js +1 -5
  229. package/dist/components/Slider/components/SliderTrack/index.js +0 -3
  230. package/dist/components/Slider/index.js +0 -3
  231. package/dist/components/Switch/Switch.js +8 -20
  232. package/dist/components/Switch/Switch.style.js +9 -14
  233. package/dist/components/Switch/index.js +0 -3
  234. package/dist/components/Table/Table.d.ts +4 -4
  235. package/dist/components/Table/Table.js +40 -76
  236. package/dist/components/Table/Table.style.js +1 -14
  237. package/dist/components/Table/TableRowContext.js +0 -4
  238. package/dist/components/Table/components/ExtendedColumnItem/ExtendedColumnItem.js +10 -27
  239. package/dist/components/Table/components/ExtendedColumnItem/ExtendedColumnItem.style.js +0 -9
  240. package/dist/components/Table/components/ExtendedColumnItem/index.js +0 -3
  241. package/dist/components/Table/components/RenderRowOrNestedRow/RenderRowOrNestedRow.js +30 -59
  242. package/dist/components/Table/components/RenderRowOrNestedRow/RenderRowOrNestedRow.style.js +4 -13
  243. package/dist/components/Table/components/RenderRowOrNestedRow/components/ContentCell/ContentCell.js +12 -22
  244. package/dist/components/Table/components/RenderRowOrNestedRow/components/ContentCell/ContentCell.style.js +0 -4
  245. package/dist/components/Table/components/RenderRowOrNestedRow/components/ContentCell/index.js +0 -3
  246. package/dist/components/Table/components/RenderRowOrNestedRow/components/ExpandedButtonCell/ExpandedButtonCell.js +6 -16
  247. package/dist/components/Table/components/RenderRowOrNestedRow/components/ExpandedButtonCell/index.js +0 -3
  248. package/dist/components/Table/components/RenderRowOrNestedRow/index.js +0 -3
  249. package/dist/components/Table/components/TableCell/TableCell.d.ts +2 -2
  250. package/dist/components/Table/components/TableCell/TableCell.js +24 -36
  251. package/dist/components/Table/components/TableCell/TableCell.style.js +0 -8
  252. package/dist/components/Table/components/TableCell/index.js +0 -3
  253. package/dist/components/Table/components/TableCell/utils.js +0 -3
  254. package/dist/components/Table/components/TableRow/TableRow.d.ts +2 -2
  255. package/dist/components/Table/components/TableRow/TableRow.js +6 -18
  256. package/dist/components/Table/components/TableRow/index.js +0 -3
  257. package/dist/components/Table/components/TableRowWrapper/TableRowWrapper.js +14 -24
  258. package/dist/components/Table/components/TableRowWrapper/index.js +0 -3
  259. package/dist/components/Table/index.js +0 -3
  260. package/dist/components/Table/utils/index.js +0 -2
  261. package/dist/components/Table/utils/utils.js +1 -7
  262. package/dist/components/TextArea/TextArea.js +10 -27
  263. package/dist/components/TextArea/TextArea.style.js +0 -4
  264. package/dist/components/TextArea/index.js +0 -3
  265. package/dist/components/TextField/TextField.js +55 -85
  266. package/dist/components/TextField/TextField.style.js +1 -6
  267. package/dist/components/TextField/components/commons.d.ts +3 -2
  268. package/dist/components/TextField/components/commons.js +2 -8
  269. package/dist/components/TextField/hooks/useMultiTextFieldUtils.js +14 -31
  270. package/dist/components/TextField/index.js +0 -3
  271. package/dist/components/TextInputBase/TextInputBase.d.ts +6 -6
  272. package/dist/components/TextInputBase/TextInputBase.js +21 -31
  273. package/dist/components/TextInputBase/TextInputBase.style.js +21 -43
  274. package/dist/components/TextInputBase/config.js +1 -1
  275. package/dist/components/TextInputBase/index.js +0 -4
  276. package/dist/components/ThemeProvider/ThemeProvider.d.ts +2 -3
  277. package/dist/components/ThemeProvider/ThemeProvider.js +6 -24
  278. package/dist/components/ThemeProvider/ThemeProvider.style.js +1 -9
  279. package/dist/components/ThemeProvider/index.js +0 -3
  280. package/dist/components/Toast/Toast.d.ts +2 -3
  281. package/dist/components/Toast/Toast.js +16 -33
  282. package/dist/components/Toast/Toast.style.js +1 -28
  283. package/dist/components/Toast/index.js +0 -3
  284. package/dist/components/Tooltip/Tooltip.js +11 -18
  285. package/dist/components/Tooltip/Tooltip.style.js +1 -10
  286. package/dist/components/Tooltip/index.js +0 -3
  287. package/dist/components/TopAppBar/TopAppBar.js +14 -24
  288. package/dist/components/TopAppBar/TopAppBar.style.js +0 -13
  289. package/dist/components/TopAppBar/TopAppBar.types.d.ts +2 -2
  290. package/dist/components/TopAppBar/components/Logo/Logo.style.js +1 -8
  291. package/dist/components/TopAppBar/components/Logo/Logo.wrapper.d.ts +2 -2
  292. package/dist/components/TopAppBar/components/Logo/Logo.wrapper.js +0 -7
  293. package/dist/components/TopAppBar/components/Logo/index.js +0 -3
  294. package/dist/components/TopAppBar/components/Search/Search.js +9 -18
  295. package/dist/components/TopAppBar/components/Search/Search.style.js +1 -13
  296. package/dist/components/TopAppBar/components/Search/index.js +0 -3
  297. package/dist/components/TopAppBar/components/SidebarMenuIcon/SidebarMenuIcon.js +0 -7
  298. package/dist/components/TopAppBar/components/SidebarMenuIcon/SidebarMenuIcon.style.js +0 -4
  299. package/dist/components/TopAppBar/components/SidebarMenuIcon/index.js +0 -3
  300. package/dist/components/TopAppBar/components/UserMenu/UserMenu.js +5 -12
  301. package/dist/components/TopAppBar/components/UserMenu/UserMenu.style.js +0 -4
  302. package/dist/components/TopAppBar/components/UserMenu/index.js +0 -3
  303. package/dist/components/TopAppBar/components/index.js +0 -7
  304. package/dist/components/TopAppBar/index.js +0 -3
  305. package/dist/components/TruncatedContent/TruncatedContent.d.ts +2 -2
  306. package/dist/components/TruncatedContent/TruncatedContent.js +7 -20
  307. package/dist/components/TruncatedContent/TruncatedContent.style.js +1 -5
  308. package/dist/components/TruncatedContent/index.js +0 -3
  309. package/dist/components/storyUtils/Stack/Stack.d.ts +2 -2
  310. package/dist/components/utils/ClickAwayListener/ClickAwayListener.d.ts +2 -2
  311. package/dist/components/utils/ClickAwayListener/ClickAwayListener.js +6 -17
  312. package/dist/components/utils/ClickAwayListener/index.js +0 -3
  313. package/dist/components/utils/DropdownOptions/index.js +0 -5
  314. package/dist/components/utils/PositionInScreen/PositionInScreen.d.ts +3 -2
  315. package/dist/components/utils/PositionInScreen/PositionInScreen.js +13 -24
  316. package/dist/components/utils/PositionInScreen/PositionInScreen.style.js +1 -10
  317. package/dist/components/utils/PositionInScreen/hooks.js +39 -60
  318. package/dist/components/utils/PositionInScreen/index.js +0 -3
  319. package/dist/components/utils/PositionInScreen/utils.js +1 -6
  320. package/dist/components/utils/handleSearch.js +7 -13
  321. package/dist/hooks/index.js +0 -3
  322. package/dist/hooks/useBreakpoints.js +1 -7
  323. package/dist/hooks/useCheck.d.ts +1 -1
  324. package/dist/hooks/useCheck.js +4 -9
  325. package/dist/hooks/useCombinedRefs.js +0 -7
  326. package/dist/hooks/useEscape.js +0 -4
  327. package/dist/hooks/useLoading.js +2 -7
  328. package/dist/hooks/useLocationToGetCurrentMenuItem.js +4 -10
  329. package/dist/hooks/usePagination.js +6 -17
  330. package/dist/hooks/useSearchQueryParams.js +1 -6
  331. package/dist/hooks/useTheme.js +0 -3
  332. package/dist/hooks/useThemeSwitch.d.ts +2 -2
  333. package/dist/hooks/useThemeSwitch.js +4 -15
  334. package/dist/hooks/useToggle.js +2 -9
  335. package/dist/hooks/useTypeColorToColorMatch.d.ts +4 -4
  336. package/dist/hooks/useTypeColorToColorMatch.js +6 -21
  337. package/dist/index.js +1 -108
  338. package/dist/test/index.js +0 -2
  339. package/dist/test/setup.js +2 -5
  340. package/dist/test/utils.d.ts +2 -2
  341. package/dist/test/utils.js +15 -39
  342. package/dist/theme/functions.js +5 -15
  343. package/dist/theme/index.js +0 -12
  344. package/dist/theme/palette.config.js +2 -4
  345. package/dist/theme/palette.js +12 -24
  346. package/dist/theme/spacing.js +1 -3
  347. package/dist/theme/states/disabled.js +1 -4
  348. package/dist/theme/states/focus.js +3 -7
  349. package/dist/theme/states/hover.js +2 -10
  350. package/dist/theme/states/index.js +0 -8
  351. package/dist/theme/states/pressed.js +2 -10
  352. package/dist/theme/states/statesConfig.js +1 -1
  353. package/dist/theme/states/utils.js +4 -9
  354. package/dist/theme/typography.js +0 -2
  355. package/dist/theme/utils.js +2 -23
  356. package/dist/utils/common.js +6 -3
  357. package/dist/utils/errors.js +4 -21
  358. package/dist/utils/helpers.d.ts +2 -2
  359. package/dist/utils/helpers.js +10 -26
  360. package/dist/utils/initLocaleFormat.js +1 -10
  361. package/dist/utils/size-utils.js +2 -20
  362. package/dist/utils/storyshots.js +4 -8
  363. package/dist/utils/themeFunctions.js +3 -25
  364. package/dist/utils/types.d.ts +2 -0
  365. package/package.json +16 -15
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.darkPaletteConfig = exports.lightPaletteConfig = exports.palePaletteConfig = exports.flatPaletteConfig = void 0;
5
-
6
- function _extends() { _extends = Object.assign || 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); }
7
-
4
+ exports.palePaletteConfig = exports.lightPaletteConfig = exports.flatPaletteConfig = exports.darkPaletteConfig = void 0;
5
+ 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); }
8
6
  var flatPaletteConfig = {
9
7
  greyScale: '#808080',
10
8
  darkGrey: '#32324E',
@@ -1,29 +1,25 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.getAAColor = exports.getAAColorFromSwatches = exports.getColor = exports.mainTypes = exports.MAX_SHADE = exports.BASE_SHADE = exports.MIN_SHADE = exports.colorShades = exports.paleColors = exports.flatColors = exports.colorSchemes = exports.neutralColors = void 0;
5
-
4
+ exports.paleColors = exports.neutralColors = exports.mainTypes = exports.getColor = exports.getAAColorFromSwatches = exports.getAAColor = exports.flatColors = exports.colorShades = exports.colorSchemes = exports.MIN_SHADE = exports.MAX_SHADE = exports.BASE_SHADE = void 0;
6
5
  var _polished = require("polished");
7
-
8
6
  var _helpers = require("../utils/helpers");
9
-
10
7
  var _utils = require("./utils");
11
-
12
8
  var neutralColors = ['neutralWhite', 'neutralBlack'];
13
9
  exports.neutralColors = neutralColors;
14
10
  var colorSchemes = ['light', 'dark'];
11
+
15
12
  /**
16
13
  * Here are listed all the colors available for our project
17
14
  * Flat colors are the actual colors of the system
18
15
  **/
19
-
20
16
  exports.colorSchemes = colorSchemes;
21
17
  var flatColors = ['greyScale', 'darkGrey', 'lightGrey', 'red', 'magenta', 'purple', 'darkBlue', 'blue', 'lightBlue', 'teal', 'green', 'yellow', 'orange', 'darkOrange'].concat(neutralColors);
18
+
22
19
  /**
23
20
  * Here are listed all the colors available for our project
24
21
  * Pale colors are just colors without shades
25
22
  **/
26
-
27
23
  exports.flatColors = flatColors;
28
24
  var paleColors = ['greyScale', 'darkGrey', 'lightGrey', 'red', 'magenta', 'purple', 'darkBlue', 'blue', 'lightBlue', 'teal', 'green', 'yellow', 'orange'];
29
25
  /**
@@ -33,7 +29,6 @@ var paleColors = ['greyScale', 'darkGrey', 'lightGrey', 'red', 'magenta', 'purpl
33
29
  * so there is no yellow but variations of yellow
34
30
  * default variation: 500
35
31
  **/
36
-
37
32
  exports.paleColors = paleColors;
38
33
  var colorShades = [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950];
39
34
  exports.colorShades = colorShades;
@@ -42,57 +37,51 @@ exports.MIN_SHADE = MIN_SHADE;
42
37
  var BASE_SHADE = 500;
43
38
  exports.BASE_SHADE = BASE_SHADE;
44
39
  var MAX_SHADE = 950;
40
+
45
41
  /**
46
42
  * mainTypes are not colors per se but a type of color
47
43
  * for example error is red but also defines a state that's why is listed here and not in flat colors
48
44
  * Each color has again the above variations (shades)
49
45
  **/
50
-
51
46
  exports.MAX_SHADE = MAX_SHADE;
52
47
  var mainTypes = ['primary', 'secondary', 'success', 'error', 'warning', 'info', 'light', 'link'];
53
- exports.mainTypes = mainTypes;
54
48
 
49
+ /**
50
+ * Palette is end output of what is produced and exported to the client projects
51
+ **/
52
+ exports.mainTypes = mainTypes;
55
53
  var getColor = function getColor(palette) {
56
54
  return function (color, variant, scope) {
57
55
  if (scope === void 0) {
58
56
  scope = 'flat';
59
57
  }
60
-
61
58
  var endColor;
62
-
63
59
  if (variant === null) {
64
60
  var _palette$scope;
65
-
66
- endColor = palette == null ? void 0 : (_palette$scope = palette[scope]) == null ? void 0 : _palette$scope[color];
61
+ endColor = palette == null || (_palette$scope = palette[scope]) == null ? void 0 : _palette$scope[color];
67
62
  } else if (scope === 'normal') {
68
63
  endColor = palette[color][variant];
69
64
  } else {
70
- var _palette$scope2, _palette$scope2$color;
71
-
72
- endColor = palette == null ? void 0 : (_palette$scope2 = palette[scope]) == null ? void 0 : (_palette$scope2$color = _palette$scope2[color]) == null ? void 0 : _palette$scope2$color[variant];
65
+ var _palette$scope2;
66
+ endColor = palette == null || (_palette$scope2 = palette[scope]) == null || (_palette$scope2 = _palette$scope2[color]) == null ? void 0 : _palette$scope2[variant];
73
67
  }
74
-
75
68
  (0, _helpers.errorHandler)(_utils.getColorErrors, endColor);
76
69
  return endColor;
77
70
  };
78
71
  };
72
+
79
73
  /**
80
74
  * this function picks either white or black color based on the background that is passed
81
75
  * swatches are calculated based on accessibility by getAAColor function and splited to those two colors
82
76
  **/
83
-
84
-
85
77
  exports.getColor = getColor;
86
-
87
78
  var getAAColorFromSwatches = function getAAColorFromSwatches(palette) {
88
79
  return function (color, shade) {
89
80
  var hexColorCode = getColor(palette)(color, shade);
90
81
  return getAAColor(palette)(hexColorCode);
91
82
  };
92
83
  };
93
-
94
84
  exports.getAAColorFromSwatches = getAAColorFromSwatches;
95
-
96
85
  var getAAColor = function getAAColor(palette) {
97
86
  return function (color) {
98
87
  var white = palette.white;
@@ -100,5 +89,4 @@ var getAAColor = function getAAColor(palette) {
100
89
  return (0, _polished.getContrast)(color, black) > (0, _polished.getContrast)(color, white) ? black : white;
101
90
  };
102
91
  };
103
-
104
92
  exports.getAAColor = getAAColor;
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports["default"] = exports.spaces = void 0;
5
-
4
+ exports.spaces = exports["default"] = void 0;
6
5
  var _utils = require("./utils");
7
-
8
6
  var spaces = {
9
7
  xsm: '4',
10
8
  sm: '8',
@@ -2,15 +2,13 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.getDisabled = void 0;
5
-
6
5
  var _statesConfig = require("./statesConfig");
7
-
8
6
  var opacityAmount = _statesConfig.statesConfig['light'].disabled.opacity.amount;
9
7
  var cursor = _statesConfig.statesConfig['light'].disabled.cursor.name;
8
+
10
9
  /**
11
10
  * On disabled opacity is dropped in half and cursor is 'not-allowed'
12
11
  * **/
13
-
14
12
  var getDisabled = function getDisabled() {
15
13
  return {
16
14
  style: {
@@ -21,5 +19,4 @@ var getDisabled = function getDisabled() {
21
19
  cursor: cursor
22
20
  };
23
21
  };
24
-
25
22
  exports.getDisabled = getDisabled;
@@ -2,22 +2,19 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.getFocus = void 0;
5
-
6
5
  var _utils = require("../utils");
7
-
8
6
  var _statesConfig = require("./statesConfig");
9
-
10
7
  var borderWidthStep = _statesConfig.statesConfig['light'].focus.border.width.step;
11
8
  var borderColor = _statesConfig.statesConfig['light'].focus.border.color;
9
+
12
10
  /**
13
11
  * On focus border is darken by one step in shade.
14
12
  * If we exceed the maximum value then we lighten it.
15
13
  * This will be reviewed when dark theme is implemented. **/
16
-
17
14
  var getFocus = function getFocus(_ref) {
18
15
  var theme = _ref.theme,
19
- _ref$borderWidth = _ref.borderWidth,
20
- borderWidth = _ref$borderWidth === void 0 ? 0 : _ref$borderWidth;
16
+ _ref$borderWidth = _ref.borderWidth,
17
+ borderWidth = _ref$borderWidth === void 0 ? 0 : _ref$borderWidth;
21
18
  var calculatedBorderWidth = borderWidth + borderWidthStep;
22
19
  var focusColor = theme.utils.getColor(borderColor.name, borderColor.shade);
23
20
  return {
@@ -27,5 +24,4 @@ var getFocus = function getFocus(_ref) {
27
24
  styleOutline: focusColor + " auto " + (0, _utils.rem)(calculatedBorderWidth)
28
25
  };
29
26
  };
30
-
31
27
  exports.getFocus = getFocus;
@@ -2,33 +2,26 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.getHover = void 0;
5
-
6
5
  var _rgba = _interopRequireDefault(require("polished/lib/color/rgba"));
7
-
8
6
  var _statesConfig = require("./statesConfig");
9
-
10
7
  var _utils = require("./utils");
11
-
12
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
9
  /**
15
10
  * On hover background is darken by one step in shade.
16
11
  * If we exceed the maximum value then we lighten it.
17
12
  * This will be reviewed when dark theme is implemented. **/
18
13
  var getHover = function getHover(_ref) {
19
14
  var theme = _ref.theme,
20
- color = _ref.color,
21
- shade = _ref.shade;
15
+ color = _ref.color,
16
+ shade = _ref.shade;
22
17
  var backgroundColorStep = _statesConfig.statesConfig[theme.colorScheme].hover.backgroundColor.step;
23
18
  var endColor = color || (theme.colorScheme === 'dark' ? 'darkGrey' : 'lightGrey');
24
19
  var endShade = shade || (theme.colorScheme === 'dark' ? 700 : 0);
25
-
26
20
  if (shade === 0 && color) {
27
21
  return {
28
22
  backgroundColor: (0, _rgba["default"])(theme.utils.getColor(color, 500), 0.07)
29
23
  };
30
24
  }
31
-
32
25
  var calculatedShade = (0, _utils.getShadeWithStep)({
33
26
  shade: endShade,
34
27
  step: backgroundColorStep,
@@ -38,5 +31,4 @@ var getHover = function getHover(_ref) {
38
31
  backgroundColor: theme.utils.getColor(endColor, calculatedShade)
39
32
  };
40
33
  };
41
-
42
34
  exports.getHover = getHover;
@@ -1,19 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
-
5
4
  var _disabled = require("./disabled");
6
-
7
5
  exports.getDisabled = _disabled.getDisabled;
8
-
9
6
  var _focus = require("./focus");
10
-
11
7
  exports.getFocus = _focus.getFocus;
12
-
13
8
  var _hover = require("./hover");
14
-
15
9
  exports.getHover = _hover.getHover;
16
-
17
10
  var _pressed = require("./pressed");
18
-
19
11
  exports.getPressed = _pressed.getPressed;
@@ -2,33 +2,26 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.getPressed = void 0;
5
-
6
5
  var _rgba = _interopRequireDefault(require("polished/lib/color/rgba"));
7
-
8
6
  var _statesConfig = require("./statesConfig");
9
-
10
7
  var _utils = require("./utils");
11
-
12
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
9
  /**
15
10
  * On pressed background is darken by two steps in shade.
16
11
  * If we exceed the maximum value then we lighten it by two steps.
17
12
  * This will be reviewed when dark theme is implemented. **/
18
13
  var getPressed = function getPressed(_ref) {
19
14
  var theme = _ref.theme,
20
- color = _ref.color,
21
- shade = _ref.shade;
15
+ color = _ref.color,
16
+ shade = _ref.shade;
22
17
  var backgroundColorStep = _statesConfig.statesConfig[theme.colorScheme].pressed.backgroundColor.step;
23
18
  var endColor = color || (theme.colorScheme === 'dark' ? 'darkGrey' : 'lightGrey');
24
19
  var endShade = shade || (theme.colorScheme === 'dark' ? 700 : 0);
25
-
26
20
  if (shade === 0 && color) {
27
21
  return {
28
22
  backgroundColor: (0, _rgba["default"])(theme.utils.getColor(color, 500), 0.14)
29
23
  };
30
24
  }
31
-
32
25
  var calculatedShade = (0, _utils.getShadeWithStep)({
33
26
  shade: endShade,
34
27
  step: backgroundColorStep,
@@ -38,5 +31,4 @@ var getPressed = function getPressed(_ref) {
38
31
  backgroundColor: theme.utils.getColor(endColor, calculatedShade)
39
32
  };
40
33
  };
41
-
42
34
  exports.getPressed = getPressed;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.statesConfig = exports.darkStatesConfig = exports.lightStatesConfig = void 0;
4
+ exports.statesConfig = exports.lightStatesConfig = exports.darkStatesConfig = void 0;
5
5
  var lightStatesConfig = {
6
6
  hover: {
7
7
  backgroundColor: {
@@ -2,25 +2,20 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.getShadeWithStep = void 0;
5
-
6
5
  var _palette = require("../palette");
7
-
8
6
  var getShadeWithStep = function getShadeWithStep(_ref) {
9
7
  var _ref$shade = _ref.shade,
10
- shade = _ref$shade === void 0 ? 0 : _ref$shade,
11
- _ref$step = _ref.step,
12
- step = _ref$step === void 0 ? 50 : _ref$step,
13
- colorScheme = _ref.colorScheme;
8
+ shade = _ref$shade === void 0 ? 0 : _ref$shade,
9
+ _ref$step = _ref.step,
10
+ step = _ref$step === void 0 ? 50 : _ref$step,
11
+ colorScheme = _ref.colorScheme;
14
12
  var calculation = colorScheme === 'light' ? shade + step > _palette.MAX_SHADE : shade - step > _palette.MIN_SHADE;
15
13
  var calculatedShade = shade;
16
-
17
14
  if (calculation) {
18
15
  calculatedShade -= step;
19
16
  } else {
20
17
  calculatedShade += step;
21
18
  }
22
-
23
19
  return calculatedShade;
24
20
  };
25
-
26
21
  exports.getShadeWithStep = getShadeWithStep;
@@ -2,9 +2,7 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports["default"] = void 0;
5
-
6
5
  var _utils = require("./utils");
7
-
8
6
  var defaultFontFamily = 'Roboto';
9
7
  var weights = {
10
8
  light: 300,
@@ -1,62 +1,50 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.getColorErrors = exports.rem = exports.enhancePaletteWithShades = exports.iterateObject = exports.colorShadesCreator = exports.convertPointsToPixels = void 0;
5
-
4
+ exports.rem = exports.iterateObject = exports.getColorErrors = exports.enhancePaletteWithShades = exports.convertPointsToPixels = exports.colorShadesCreator = void 0;
6
5
  var _polished = require("polished");
7
-
8
6
  var _errors = require("../utils/errors");
9
-
10
7
  var BASE_PERCENTAGE = 10;
11
8
  var SHADES = 18;
12
9
  var EXCLUDED = ['white', 'black', 'pale'];
13
-
14
10
  var convertPointsToPixels = function convertPointsToPixels(pt) {
15
11
  return 96 / 72 * pt;
16
12
  };
17
-
18
13
  exports.convertPointsToPixels = convertPointsToPixels;
19
-
20
14
  var colorShadesCreator = function colorShadesCreator(base, per, shadesCount) {
21
15
  if (per === void 0) {
22
16
  per = BASE_PERCENTAGE;
23
17
  }
24
-
25
18
  if (shadesCount === void 0) {
26
19
  shadesCount = SHADES / 2;
27
20
  }
28
-
29
21
  var newArray = function newArray(fn, length) {
30
22
  return Array.from({
31
23
  length: length
32
24
  }, fn);
33
25
  };
34
-
35
26
  var tints = function tints(weight) {
36
27
  return newArray(function (__, i) {
37
28
  return (0, _polished.tint)((i + 1) * per / 100, base);
38
29
  }, weight);
39
30
  };
40
-
41
31
  var shades = function shades(weight) {
42
32
  return newArray(function (__, i) {
43
33
  return (0, _polished.shade)((i + 1) * per / 100, base);
44
34
  }, weight);
45
35
  };
46
-
47
36
  var all = function all(weight) {
48
37
  if (weight === void 0) {
49
38
  weight = shadesCount;
50
39
  }
51
-
52
40
  return [].concat(tints(weight).reverse(), [base], shades(weight));
53
41
  };
54
-
55
42
  return all().reduce(function (acc, _, index) {
56
43
  acc["" + (index + 1) * 50] = _;
57
44
  return acc;
58
45
  }, {});
59
46
  };
47
+
60
48
  /**
61
49
  * Recursive function that iterates over the theme.
62
50
  * If, upon iteration it finds an object then it goes one level depper
@@ -69,10 +57,7 @@ var colorShadesCreator = function colorShadesCreator(base, per, shadesCount) {
69
57
  * @returns {Record<string, unknown>>} Each level will have generatedColorShades and in whole it will return
70
58
  * a complete palette.
71
59
  */
72
-
73
-
74
60
  exports.colorShadesCreator = colorShadesCreator;
75
-
76
61
  var iterateObject = function iterateObject(obj, func) {
77
62
  return Object.keys(obj).reduce(function (acc, value) {
78
63
  if (typeof obj[value] !== 'object') {
@@ -82,25 +67,19 @@ var iterateObject = function iterateObject(obj, func) {
82
67
  } else {
83
68
  acc[value] = iterateObject(obj[value], func);
84
69
  }
85
-
86
70
  return acc;
87
71
  }, {});
88
72
  };
89
-
90
73
  exports.iterateObject = iterateObject;
91
-
92
74
  var enhancePaletteWithShades = function enhancePaletteWithShades(obj) {
93
75
  return iterateObject(obj, function (value, name) {
94
76
  return EXCLUDED.includes(name) ? value : colorShadesCreator(value, BASE_PERCENTAGE);
95
77
  });
96
78
  };
97
-
98
79
  exports.enhancePaletteWithShades = enhancePaletteWithShades;
99
-
100
80
  var rem = function rem(px) {
101
81
  return (0, _polished.rem)(px, 16);
102
82
  };
103
-
104
83
  exports.rem = rem;
105
84
  var getColorErrors = [{
106
85
  condition: function condition(endColor) {
@@ -1,17 +1,20 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.FIGMA_URL = exports.Function = void 0;
5
-
4
+ exports.Function = exports.FIGMA_URL = void 0;
6
5
  var Function = function Function(_ref) {
7
6
  var children = _ref.children;
8
7
  return children();
9
8
  };
9
+
10
10
  /** A type to turn any type optional properties to required */
11
11
 
12
+ /** A generic type for native events */
12
13
 
13
- exports.Function = Function;
14
+ //@TODO fix props to not overwrite button props from base
14
15
 
16
+ //@TODO fix props to not overwrite div props from base
17
+ exports.Function = Function;
15
18
  /** URL currently used for figma version 4.5 frozen */
16
19
  var FIGMA_URL = 'https://www.figma.com/file/3deO7jGtkly8ij4TiIUpzY/Design-System-V4.5-(%E2%9D%84%EF%B8%8FDO-NOT-EDIT)';
17
20
  exports.FIGMA_URL = FIGMA_URL;
@@ -1,50 +1,33 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.PropsValidationError = exports.ValidationError = void 0;
5
-
4
+ exports.ValidationError = exports.PropsValidationError = void 0;
6
5
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
7
-
8
6
  function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
9
-
10
- function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
11
-
7
+ function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
12
8
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
-
14
9
  function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
15
-
16
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
17
-
18
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
19
-
10
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
11
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
20
12
  var ValidationError = /*#__PURE__*/function (_Error) {
21
13
  _inheritsLoose(ValidationError, _Error);
22
-
23
14
  function ValidationError(message) {
24
15
  var _this;
25
-
26
16
  _this = _Error.call(this, message) || this;
27
17
  _this.name = 'ValidationError';
28
18
  return _this;
29
19
  }
30
-
31
20
  return ValidationError;
32
21
  }( /*#__PURE__*/_wrapNativeSuper(Error));
33
-
34
22
  exports.ValidationError = ValidationError;
35
-
36
23
  var PropsValidationError = /*#__PURE__*/function (_ValidationError) {
37
24
  _inheritsLoose(PropsValidationError, _ValidationError);
38
-
39
25
  function PropsValidationError(message) {
40
26
  var _this2;
41
-
42
27
  _this2 = _ValidationError.call(this, message) || this;
43
28
  _this2.name = 'PropsValidationError';
44
29
  return _this2;
45
30
  }
46
-
47
31
  return PropsValidationError;
48
32
  }(ValidationError);
49
-
50
33
  exports.PropsValidationError = PropsValidationError;
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import { TestId } from 'utils/types';
3
3
  /** A function that generates a unique id by making a value randomly based on time also */
4
4
  export declare const generateUniqueID: (elementType?: string) => string;
5
5
  /** A function that takes two strings to generate a test data id by combining them if both exist */
6
6
  export declare const generateTestDataId: (defaultId: TestId, customId?: string | undefined) => string;
7
7
  /** A function that determines if the element passed is a function and a react element */
8
- export declare function isComponentFunctionType(element: string | number | JSX.Element | Function): element is Function;
8
+ export declare function isComponentFunctionType(element: string | number | React.ReactElement | Function): element is Function;
9
9
  /** A function that retrieves the correct date format based on system's locale */
10
10
  export declare const getLocaleFormat: (dateFormat: string | undefined) => string;
11
11
  /**
@@ -1,67 +1,52 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ exports.getLocaleFormat = exports.generateUniqueID = exports.generateTestDataId = exports.errorHandler = void 0;
4
5
  exports.isComponentFunctionType = isComponentFunctionType;
5
- exports.errorHandler = exports.getLocaleFormat = exports.generateTestDataId = exports.generateUniqueID = void 0;
6
-
7
6
  var _dayjs2 = _interopRequireDefault(require("dayjs"));
8
-
9
7
  var React = _interopRequireWildcard(require("react"));
10
-
11
8
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
-
13
9
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
-
15
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
-
17
11
  /** A function that generates a unique id by making a value randomly based on time also */
18
12
  var generateUniqueID = function generateUniqueID(elementType) {
19
13
  if (elementType === void 0) {
20
14
  elementType = '';
21
15
  }
22
-
23
16
  return elementType + '_' + (Date.now() + Math.random()).toString(36).substr(2, 9);
24
17
  };
25
- /** A function that takes two strings to generate a test data id by combining them if both exist */
26
-
27
18
 
19
+ /** A function that takes two strings to generate a test data id by combining them if both exist */
28
20
  exports.generateUniqueID = generateUniqueID;
29
-
30
21
  var generateTestDataId = function generateTestDataId(defaultId, customId) {
31
22
  return customId ? defaultId + "-" + customId : defaultId;
32
23
  };
33
- /** A function that determines if the element passed is a function and a react element */
34
-
35
24
 
25
+ /** A function that determines if the element passed is a function and a react element */
36
26
  exports.generateTestDataId = generateTestDataId;
37
-
38
- function isComponentFunctionType( // TODO this must be fixed @Panagiotis
27
+ function isComponentFunctionType(
28
+ // TODO this must be fixed @Panagiotis
39
29
  // eslint-disable-next-line @typescript-eslint/ban-types
40
30
  element) {
41
31
  return typeof element === 'function' && /*#__PURE__*/React.isValidElement(element());
42
32
  }
43
- /** A function that retrieves the correct date format based on system's locale */
44
-
45
33
 
34
+ /** A function that retrieves the correct date format based on system's locale */
46
35
  var getLocaleFormat = function getLocaleFormat(dateFormat) {
47
- var _dayjs, _dayjs$localeData;
48
-
49
- var localeFormat = (_dayjs = (0, _dayjs2["default"])()) == null ? void 0 : (_dayjs$localeData = _dayjs.localeData()) == null ? void 0 : _dayjs$localeData.longDateFormat('L');
36
+ var _dayjs;
37
+ var localeFormat = (_dayjs = (0, _dayjs2["default"])()) == null || (_dayjs = _dayjs.localeData()) == null ? void 0 : _dayjs.longDateFormat('L');
50
38
  return dateFormat ? dateFormat : localeFormat;
51
39
  };
40
+
52
41
  /**
53
42
  * A function that takes an array of errors and the component props and throws an error
54
43
  * if the condition is met
55
44
  * */
56
-
57
-
58
45
  exports.getLocaleFormat = getLocaleFormat;
59
-
60
46
  var errorHandler = function errorHandler(errors, props) {
61
47
  return errors.map(function (_ref) {
62
48
  var condition = _ref.condition,
63
- error = _ref.error;
64
-
49
+ error = _ref.error;
65
50
  if (condition(props)) {
66
51
  if (typeof error === 'function') {
67
52
  throw error(props);
@@ -71,5 +56,4 @@ var errorHandler = function errorHandler(errors, props) {
71
56
  }
72
57
  });
73
58
  };
74
-
75
59
  exports.errorHandler = errorHandler;
@@ -1,22 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _dayjs = _interopRequireDefault(require("dayjs"));
4
-
5
4
  var _localeData = _interopRequireDefault(require("dayjs/plugin/localeData"));
6
-
7
5
  var _localizedFormat = _interopRequireDefault(require("dayjs/plugin/localizedFormat"));
8
-
9
6
  require("dayjs/locale/en-gb");
10
-
11
7
  require("dayjs/locale/en");
12
-
13
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
-
15
- (function InitLocaleFormat(usLocale, euLocale) {
16
- var _navigator;
17
-
9
+ (function InitLocaleFormat(usLocale, euLocale, _navigator) {
18
10
  [_localizedFormat["default"], _localeData["default"]].forEach(_dayjs["default"].extend);
19
11
  var browserLanguage = ((_navigator = navigator) == null ? void 0 : _navigator.language) === 'en-GB' ? euLocale : usLocale;
20
-
21
12
  _dayjs["default"].locale(browserLanguage);
22
13
  })('en', 'en-gb');