@mailstep/design-system 0.6.2-beta.3 → 0.6.2-beta.5

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 (368) hide show
  1. package/package.json +5 -4
  2. package/ui/Blocks/CommonGrid/CommonGrid.js +33 -38
  3. package/ui/Blocks/CommonGrid/CommonGridContainer.js +28 -33
  4. package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +8 -10
  5. package/ui/Blocks/CommonGrid/StandardButtons.js +11 -20
  6. package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +21 -26
  7. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +8 -13
  8. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +20 -48
  9. package/ui/Blocks/CommonGrid/components/ActionHead/index.js +2 -7
  10. package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.js +10 -15
  11. package/ui/Blocks/CommonGrid/components/BooleanSelect/index.js +2 -7
  12. package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +14 -19
  13. package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +2 -7
  14. package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +17 -22
  15. package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +22 -50
  16. package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +2 -7
  17. package/ui/Blocks/CommonGrid/components/ColumnTitle.js +8 -13
  18. package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +9 -38
  19. package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +2 -7
  20. package/ui/Blocks/CommonGrid/components/DataCell.js +13 -18
  21. package/ui/Blocks/CommonGrid/components/DataRow.js +30 -35
  22. package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.js +31 -59
  23. package/ui/Blocks/CommonGrid/components/DatePickerRange/index.js +2 -7
  24. package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.js +1 -5
  25. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +12 -41
  26. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +2 -7
  27. package/ui/Blocks/CommonGrid/components/FilterDropdown.js +8 -13
  28. package/ui/Blocks/CommonGrid/components/FilterRow.js +15 -20
  29. package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +17 -23
  30. package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +2 -7
  31. package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.js +10 -15
  32. package/ui/Blocks/CommonGrid/components/GridSelect/index.js +2 -7
  33. package/ui/Blocks/CommonGrid/components/GroupRow.js +10 -15
  34. package/ui/Blocks/CommonGrid/components/HeadCell.js +14 -19
  35. package/ui/Blocks/CommonGrid/components/HeadRow.js +17 -45
  36. package/ui/Blocks/CommonGrid/components/IconList/IconList.js +12 -18
  37. package/ui/Blocks/CommonGrid/components/IconList/index.js +2 -7
  38. package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +12 -14
  39. package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +17 -24
  40. package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +2 -7
  41. package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.js +23 -28
  42. package/ui/Blocks/CommonGrid/components/NumberRange/index.js +2 -7
  43. package/ui/Blocks/CommonGrid/components/NumberRange/types.js +1 -2
  44. package/ui/Blocks/CommonGrid/components/OversizedScroll.js +11 -39
  45. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.js +10 -12
  46. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.js +2 -7
  47. package/ui/Blocks/CommonGrid/components/Resize.js +7 -12
  48. package/ui/Blocks/CommonGrid/components/Table.js +9 -37
  49. package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +12 -40
  50. package/ui/Blocks/CommonGrid/components/TablePagination/index.js +2 -7
  51. package/ui/Blocks/CommonGrid/components/TextRange/TextRange.js +30 -36
  52. package/ui/Blocks/CommonGrid/components/TextRange/index.js +2 -7
  53. package/ui/Blocks/CommonGrid/components/TextRange/types.js +1 -2
  54. package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +12 -41
  55. package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.js +4 -11
  56. package/ui/Blocks/CommonGrid/components/gridCells/Date.js +6 -13
  57. package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +6 -13
  58. package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +9 -16
  59. package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +8 -15
  60. package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +8 -15
  61. package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +9 -16
  62. package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +3 -9
  63. package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +11 -18
  64. package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +13 -20
  65. package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +5 -12
  66. package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +4 -11
  67. package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.js +10 -40
  68. package/ui/Blocks/CommonGrid/components/gridCells/index.js +14 -31
  69. package/ui/Blocks/CommonGrid/components/icons/Edit.js +3 -5
  70. package/ui/Blocks/CommonGrid/components/icons/EyeOpen.js +3 -5
  71. package/ui/Blocks/CommonGrid/components/icons/Sorting.js +3 -8
  72. package/ui/Blocks/CommonGrid/components/utils.js +3 -7
  73. package/ui/Blocks/CommonGrid/hooks/useAddFilter.js +6 -10
  74. package/ui/Blocks/CommonGrid/hooks/useColumnSizes.js +13 -18
  75. package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +7 -12
  76. package/ui/Blocks/CommonGrid/hooks/useFloatingButton.js +3 -5
  77. package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +9 -11
  78. package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.js +7 -14
  79. package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +6 -8
  80. package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.js +3 -8
  81. package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.js +4 -8
  82. package/ui/Blocks/CommonGrid/hooks/useUxReset.js +4 -9
  83. package/ui/Blocks/CommonGrid/index.js +10 -51
  84. package/ui/Blocks/CommonGrid/store/index.js +77 -86
  85. package/ui/Blocks/CommonGrid/store/migrateState.js +1 -3
  86. package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +17 -24
  87. package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +12 -19
  88. package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +8 -15
  89. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +8 -15
  90. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +8 -15
  91. package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +12 -19
  92. package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +10 -17
  93. package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +12 -19
  94. package/ui/Blocks/CommonGrid/storybook/utils/actions.js +4 -11
  95. package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +11 -17
  96. package/ui/Blocks/CommonGrid/storybook/utils/linguiContainer.js +6 -10
  97. package/ui/Blocks/CommonGrid/storybook/utils/utils.js +26 -35
  98. package/ui/Blocks/CommonGrid/storybook/utils/withRedux.js +10 -17
  99. package/ui/Blocks/CommonGrid/storybook/utils/withRouter.js +4 -6
  100. package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +1 -3
  101. package/ui/Blocks/CommonGrid/styles.js +10 -39
  102. package/ui/Blocks/CommonGrid/translations.js +3 -5
  103. package/ui/Blocks/CommonGrid/types.js +3 -6
  104. package/ui/Blocks/CommonGrid/utils/index.js +23 -40
  105. package/ui/Blocks/CornerDialog/CornerDialog.js +11 -15
  106. package/ui/Blocks/CornerDialog/index.js +2 -4
  107. package/ui/Blocks/CornerDialog/stories/CornerDialog.stories.js +7 -10
  108. package/ui/Blocks/CornerDialog/styles.js +9 -35
  109. package/ui/Blocks/CornerDialog/types.js +1 -2
  110. package/ui/Blocks/CornerDialog/utils.js +2 -5
  111. package/ui/Blocks/HidePrint/HidePrint.js +5 -10
  112. package/ui/Blocks/ImageList/ImageList.js +15 -42
  113. package/ui/Blocks/ImageList/components/AddPhoto/index.js +7 -11
  114. package/ui/Blocks/ImageList/components/AddPhoto/styles.js +3 -29
  115. package/ui/Blocks/ImageList/components/CloseButton/index.js +5 -9
  116. package/ui/Blocks/ImageList/components/CloseButton/styles.js +3 -29
  117. package/ui/Blocks/ImageList/components/ImageElement/index.js +7 -11
  118. package/ui/Blocks/ImageList/components/ImageElement/styles.js +3 -29
  119. package/ui/Blocks/ImageList/components/ImageTag/index.js +5 -12
  120. package/ui/Blocks/ImageList/components/ImageTag/styles.js +2 -8
  121. package/ui/Blocks/ImageList/index.js +2 -4
  122. package/ui/Blocks/ImageList/stories/ImageList.stories.js +6 -9
  123. package/ui/Blocks/ImageList/styles.js +2 -8
  124. package/ui/Blocks/ImageList/types.js +1 -2
  125. package/ui/Blocks/LightBox/LightBox.js +8 -15
  126. package/ui/Blocks/LightBox/hooks/useLightBox.js +5 -9
  127. package/ui/Blocks/LightBox/index.js +3 -7
  128. package/ui/Blocks/LightBox/stories/LightBox.stories.js +4 -7
  129. package/ui/Blocks/LightBox/styles.js +5 -11
  130. package/ui/Blocks/LightBox/types.js +1 -2
  131. package/ui/Blocks/Modal/Modal.js +17 -20
  132. package/ui/Blocks/Modal/hooks/useClickOutside.js +6 -10
  133. package/ui/Blocks/Modal/hooks/useModal.js +6 -10
  134. package/ui/Blocks/Modal/index.js +4 -9
  135. package/ui/Blocks/Modal/stories/Modal.stories.js +42 -48
  136. package/ui/Blocks/Modal/styles.js +20 -46
  137. package/ui/Blocks/Modal/types.js +1 -2
  138. package/ui/Blocks/Modal/utils.js +1 -4
  139. package/ui/Blocks/Popover/index.js +10 -15
  140. package/ui/Blocks/Tabs/TabContent.js +1 -5
  141. package/ui/Blocks/Tabs/Tabs.js +10 -14
  142. package/ui/Blocks/Tabs/hooks/useTabs.js +4 -8
  143. package/ui/Blocks/Tabs/index.js +4 -9
  144. package/ui/Blocks/Tabs/stories/Tabs.stories.js +6 -9
  145. package/ui/Blocks/Tabs/styles.js +8 -34
  146. package/ui/Blocks/Tabs/types.js +1 -2
  147. package/ui/Elements/Alert/Alert.js +10 -12
  148. package/ui/Elements/Alert/index.js +3 -9
  149. package/ui/Elements/Alert/stories/Alert.stories.js +11 -14
  150. package/ui/Elements/Alert/styles.js +14 -20
  151. package/ui/Elements/Alert/types.js +1 -2
  152. package/ui/Elements/Avatar/Avatar.js +7 -14
  153. package/ui/Elements/Avatar/index.js +3 -7
  154. package/ui/Elements/Avatar/stories/Avatar.stories.js +5 -8
  155. package/ui/Elements/Avatar/types.js +1 -2
  156. package/ui/Elements/Badge/Badge.js +13 -38
  157. package/ui/Elements/Badge/index.js +3 -9
  158. package/ui/Elements/Badge/stories/Badge.stories.js +5 -11
  159. package/ui/Elements/BorderedBox/BorderedBox.js +5 -30
  160. package/ui/Elements/BorderedBox/index.js +3 -9
  161. package/ui/Elements/BorderedBox/stories/BorderedBox.stories.js +4 -7
  162. package/ui/Elements/BorderedBox/types.js +1 -2
  163. package/ui/Elements/Button/Button.js +5 -7
  164. package/ui/Elements/Button/index.js +3 -9
  165. package/ui/Elements/Button/stories/Button.stories.js +13 -16
  166. package/ui/Elements/Button/styles.js +8 -14
  167. package/ui/Elements/Button/types.js +1 -2
  168. package/ui/Elements/Card/Card.js +14 -20
  169. package/ui/Elements/Card/index.js +3 -12
  170. package/ui/Elements/Card/stories/Card.stories.js +8 -11
  171. package/ui/Elements/Card/stories/CardComponent.stories.js +6 -12
  172. package/ui/Elements/Card/styles.js +12 -38
  173. package/ui/Elements/Card/types.js +1 -2
  174. package/ui/Elements/DatePicker/DatePicker.js +25 -53
  175. package/ui/Elements/DatePicker/Datetime/DateTime.js +26 -31
  176. package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +20 -47
  177. package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +3 -6
  178. package/ui/Elements/DatePicker/Datetime/types.js +1 -2
  179. package/ui/Elements/DatePicker/Datetime/views/DaysView.js +13 -18
  180. package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +9 -14
  181. package/ui/Elements/DatePicker/Datetime/views/YearsView.js +9 -14
  182. package/ui/Elements/DatePicker/index.js +2 -7
  183. package/ui/Elements/DatePicker/styles.js +3 -29
  184. package/ui/Elements/Dropdown/Dropdown.js +10 -15
  185. package/ui/Elements/Dropdown/index.js +3 -9
  186. package/ui/Elements/Dropdown/stories/Dropdown.stories.js +4 -10
  187. package/ui/Elements/Dropdown/types.js +1 -2
  188. package/ui/Elements/DropdownMenu/DropdownMenu.js +8 -15
  189. package/ui/Elements/DropdownMenu/components/DefaultItem.js +7 -32
  190. package/ui/Elements/DropdownMenu/components/MenuItem.js +10 -15
  191. package/ui/Elements/DropdownMenu/components/MenuList.js +5 -10
  192. package/ui/Elements/DropdownMenu/index.js +1 -5
  193. package/ui/Elements/DropdownMenu/types.js +1 -2
  194. package/ui/Elements/DropdownSelect/DropdownSelect.js +21 -50
  195. package/ui/Elements/DropdownSelect/index.js +3 -10
  196. package/ui/Elements/ErrorMessage/ErrorMessage.js +9 -34
  197. package/ui/Elements/ErrorMessage/index.js +3 -9
  198. package/ui/Elements/ErrorMessage/stories/ErrorMessage.stories.js +5 -11
  199. package/ui/Elements/ErrorMessage/types.js +1 -2
  200. package/ui/Elements/HighlightBox/HighlightBox.js +12 -38
  201. package/ui/Elements/HighlightBox/index.js +2 -7
  202. package/ui/Elements/Icon/BadgeIcon.js +10 -17
  203. package/ui/Elements/Icon/Icon.js +216 -245
  204. package/ui/Elements/Icon/icons/AddPhoto.js +2 -6
  205. package/ui/Elements/Icon/icons/BarcodeScan.js +2 -6
  206. package/ui/Elements/Icon/icons/Box.js +2 -6
  207. package/ui/Elements/Icon/icons/Calendar.js +2 -6
  208. package/ui/Elements/Icon/icons/Cancel.js +2 -6
  209. package/ui/Elements/Icon/icons/CheckedBox.js +2 -6
  210. package/ui/Elements/Icon/icons/Company.js +2 -6
  211. package/ui/Elements/Icon/icons/Complaint.js +2 -6
  212. package/ui/Elements/Icon/icons/Consolidation.js +2 -6
  213. package/ui/Elements/Icon/icons/Dispatch.js +2 -6
  214. package/ui/Elements/Icon/icons/EmptyRack.js +2 -6
  215. package/ui/Elements/Icon/icons/Expeditions.js +2 -6
  216. package/ui/Elements/Icon/icons/FlagCZ.js +2 -6
  217. package/ui/Elements/Icon/icons/FlagEL.js +2 -6
  218. package/ui/Elements/Icon/icons/FlagESP.js +2 -6
  219. package/ui/Elements/Icon/icons/FlagITA.js +2 -6
  220. package/ui/Elements/Icon/icons/FlagRUS.js +2 -6
  221. package/ui/Elements/Icon/icons/FlagSVK.js +2 -6
  222. package/ui/Elements/Icon/icons/FlagUSA.js +2 -6
  223. package/ui/Elements/Icon/icons/Gift.js +2 -6
  224. package/ui/Elements/Icon/icons/Group.js +2 -6
  225. package/ui/Elements/Icon/icons/HamburgerMenu.js +2 -6
  226. package/ui/Elements/Icon/icons/HelpCircle1.js +2 -6
  227. package/ui/Elements/Icon/icons/ImagePlaceholder.js +2 -6
  228. package/ui/Elements/Icon/icons/Income.js +2 -6
  229. package/ui/Elements/Icon/icons/Info.js +2 -6
  230. package/ui/Elements/Icon/icons/Integrations.js +2 -6
  231. package/ui/Elements/Icon/icons/Inventory.js +2 -6
  232. package/ui/Elements/Icon/icons/Inventory2.js +2 -6
  233. package/ui/Elements/Icon/icons/Link.js +2 -6
  234. package/ui/Elements/Icon/icons/Location.js +2 -6
  235. package/ui/Elements/Icon/icons/Logout1.js +2 -6
  236. package/ui/Elements/Icon/icons/MakePhoto.js +2 -6
  237. package/ui/Elements/Icon/icons/MenuItems.js +2 -6
  238. package/ui/Elements/Icon/icons/MobileCancel.js +2 -6
  239. package/ui/Elements/Icon/icons/Notification2.js +2 -6
  240. package/ui/Elements/Icon/icons/OpenBox.js +2 -6
  241. package/ui/Elements/Icon/icons/Plus1.js +2 -6
  242. package/ui/Elements/Icon/icons/Print.js +2 -6
  243. package/ui/Elements/Icon/icons/Product.js +2 -6
  244. package/ui/Elements/Icon/icons/Products.js +2 -6
  245. package/ui/Elements/Icon/icons/Profile.js +2 -6
  246. package/ui/Elements/Icon/icons/Puzzle1.js +2 -6
  247. package/ui/Elements/Icon/icons/QRCode.js +2 -6
  248. package/ui/Elements/Icon/icons/Rack.js +2 -6
  249. package/ui/Elements/Icon/icons/Return.js +2 -6
  250. package/ui/Elements/Icon/icons/Rows.js +2 -6
  251. package/ui/Elements/Icon/icons/Settings2.js +2 -6
  252. package/ui/Elements/Icon/icons/ShoppingBag.js +2 -6
  253. package/ui/Elements/Icon/icons/ThreeDots.js +2 -6
  254. package/ui/Elements/Icon/icons/Transfer.js +2 -6
  255. package/ui/Elements/Icon/icons/Truck.js +2 -6
  256. package/ui/Elements/Icon/icons/TwoBoxes.js +2 -6
  257. package/ui/Elements/Icon/icons/TwoCheckedBoxes.js +2 -6
  258. package/ui/Elements/Icon/icons/TwoUsers.js +2 -6
  259. package/ui/Elements/Icon/icons/index.js +55 -114
  260. package/ui/Elements/Icon/index.js +5 -26
  261. package/ui/Elements/Icon/stories/BadgeIcon.stories.js +6 -12
  262. package/ui/Elements/Icon/stories/Icon.stories.js +9 -12
  263. package/ui/Elements/Icon/types.js +1 -2
  264. package/ui/Elements/Image/Image.js +4 -6
  265. package/ui/Elements/Image/index.js +3 -9
  266. package/ui/Elements/Image/stories/Image.stories.js +9 -15
  267. package/ui/Elements/Image/types.js +1 -2
  268. package/ui/Elements/Label/Label.js +9 -35
  269. package/ui/Elements/Label/index.js +3 -8
  270. package/ui/Elements/Label/stories/Label.stories.js +5 -8
  271. package/ui/Elements/Line/Line.js +5 -10
  272. package/ui/Elements/Line/index.js +3 -9
  273. package/ui/Elements/Line/stories/Line.stories.js +10 -16
  274. package/ui/Elements/Line/types.js +1 -2
  275. package/ui/Elements/Link/Link.js +14 -39
  276. package/ui/Elements/Link/index.js +3 -9
  277. package/ui/Elements/Link/stories/Link.stories.js +10 -13
  278. package/ui/Elements/Logo/Logo.js +25 -30
  279. package/ui/Elements/Logo/index.js +3 -9
  280. package/ui/Elements/Logo/stories/Logo.stories.js +18 -24
  281. package/ui/Elements/Logo/types.js +1 -2
  282. package/ui/Elements/MultiSelect/MultiSelect.js +4 -9
  283. package/ui/Elements/MultiSelect/index.js +2 -7
  284. package/ui/Elements/Pagination/Pagination.js +7 -9
  285. package/ui/Elements/Pagination/index.js +3 -9
  286. package/ui/Elements/Pagination/stories/Pagination.stories.js +5 -8
  287. package/ui/Elements/Pagination/styled.js +12 -41
  288. package/ui/Elements/Portal/index.js +7 -14
  289. package/ui/Elements/ProgressBar/ProgressBar.js +4 -6
  290. package/ui/Elements/ProgressBar/index.js +3 -9
  291. package/ui/Elements/ProgressBar/stories/ProgressBar.stories.js +6 -12
  292. package/ui/Elements/ProgressBar/styles.js +12 -38
  293. package/ui/Elements/Select/Select.js +20 -25
  294. package/ui/Elements/Select/index.js +2 -7
  295. package/ui/Elements/Select/styles.js +7 -13
  296. package/ui/Elements/Select/themes/CustomComponents.js +37 -72
  297. package/ui/Elements/Select/themes/baseStyles.js +6 -12
  298. package/ui/Elements/Select/themes/formStyles.js +23 -27
  299. package/ui/Elements/Select/themes/index.js +16 -20
  300. package/ui/Elements/Select/types.js +1 -2
  301. package/ui/Elements/SimpleLink/SimpleLink.js +6 -31
  302. package/ui/Elements/SimpleLink/index.js +3 -9
  303. package/ui/Elements/SingleSelect/SingleSelect.js +27 -32
  304. package/ui/Elements/SingleSelect/index.js +2 -7
  305. package/ui/Elements/SpaceAround/SpaceAround.js +11 -36
  306. package/ui/Elements/SpaceAround/index.js +3 -9
  307. package/ui/Elements/SpaceAround/stories/SpaceAround.stories.js +5 -8
  308. package/ui/Elements/SpaceAround/types.js +1 -2
  309. package/ui/Elements/Spinner/Spinner.js +8 -12
  310. package/ui/Elements/Spinner/index.js +3 -9
  311. package/ui/Elements/Spinner/stories/Spinner.stories.js +13 -16
  312. package/ui/Elements/Spinner/styles.js +7 -33
  313. package/ui/Elements/Spinner/types.js +1 -2
  314. package/ui/Elements/Tag/Tag.js +6 -31
  315. package/ui/Elements/Tag/index.js +3 -10
  316. package/ui/Elements/Tag/palletes.js +1 -4
  317. package/ui/Elements/Tag/stories/Tag.stories.js +15 -21
  318. package/ui/Elements/Tag/stories/components/predefinedTags.js +6 -11
  319. package/ui/Elements/Tag/types.js +1 -2
  320. package/ui/Elements/Text/Text.js +4 -6
  321. package/ui/Elements/Text/index.js +2 -8
  322. package/ui/Elements/Text/stories/Text.stories.js +9 -15
  323. package/ui/Elements/Text/types.js +1 -2
  324. package/ui/Elements/Toast/Toast.js +10 -15
  325. package/ui/Elements/Toast/index.js +3 -9
  326. package/ui/Elements/Toggle/Toggle.js +13 -38
  327. package/ui/Elements/Toggle/index.js +3 -9
  328. package/ui/Elements/Toggle/stories/Toggle.stories.js +7 -13
  329. package/ui/Elements/Toggle/types.js +1 -2
  330. package/ui/Elements/Typography/Typography.js +28 -44
  331. package/ui/Elements/Typography/index.js +3 -19
  332. package/ui/Elements/Typography/stories/Typography.stories.js +15 -18
  333. package/ui/Forms/Checkbox/Checkbox.js +9 -11
  334. package/ui/Forms/Checkbox/index.js +3 -9
  335. package/ui/Forms/Checkbox/stories/Checkbox.stories.js +7 -13
  336. package/ui/Forms/Checkbox/styles.js +6 -32
  337. package/ui/Forms/Checkbox/types.js +1 -2
  338. package/ui/Forms/Input/Input.js +16 -20
  339. package/ui/Forms/Input/index.js +3 -6
  340. package/ui/Forms/Input/stories/Input.stories.js +11 -14
  341. package/ui/Forms/Input/styles.js +20 -46
  342. package/ui/Forms/Input/types.js +1 -2
  343. package/ui/Forms/RadioButton/RadioButton.js +6 -8
  344. package/ui/Forms/RadioButton/index.js +3 -9
  345. package/ui/Forms/RadioButton/stories/RadioButton.stories.js +7 -13
  346. package/ui/Forms/RadioButton/styles.js +7 -13
  347. package/ui/Forms/RadioButton/types.js +1 -2
  348. package/ui/Forms/TextArea/TextArea.js +8 -13
  349. package/ui/Forms/TextArea/index.js +2 -7
  350. package/ui/Forms/TextArea/styles.js +13 -39
  351. package/ui/System/Fonts/index.js +9 -14
  352. package/ui/ThemeProvider/ThemeProvider.js +7 -13
  353. package/ui/ThemeProvider/index.js +5 -25
  354. package/ui/ThemeProvider/themes/default.js +1 -3
  355. package/ui/ThemeProvider/themes/index.js +7 -12
  356. package/ui/ThemeProvider/themes/light.js +1 -3
  357. package/ui/ThemeProvider/themes/mailwise.js +1 -3
  358. package/ui/ThemeProvider/types.js +1 -2
  359. package/ui/index.es.js +19551 -23227
  360. package/ui/index.js +85 -146
  361. package/ui/index.umd.js +484 -510
  362. package/ui/utils/CreateRgba/createRgba.js +5 -12
  363. package/ui/utils/CreateRgba/types.js +1 -2
  364. package/ui/utils/KeyPress/KeyPress.js +4 -6
  365. package/ui/utils/KeyPress/KeyPress.stories.js +6 -12
  366. package/ui/utils/KeyPress/index.js +2 -7
  367. package/ui/utils/KeyPress/types.js +1 -2
  368. package/ui/utils/index.js +6 -13
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __assign = (this && this.__assign) || function () {
3
2
  __assign = Object.assign || function(t) {
4
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -10,29 +9,6 @@ var __assign = (this && this.__assign) || function () {
10
9
  };
11
10
  return __assign.apply(this, arguments);
12
11
  };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
12
  var __rest = (this && this.__rest) || function (s, e) {
37
13
  var t = {};
38
14
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -44,50 +20,46 @@ var __rest = (this && this.__rest) || function (s, e) {
44
20
  }
45
21
  return t;
46
22
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- var jsx_runtime_1 = require("react/jsx-runtime");
52
- var moment_1 = __importDefault(require("moment"));
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import moment from 'moment';
53
25
  // @TODO each language has 62kb gziped, please replace moment with different lib
54
- require("moment/dist/locale/cs");
55
- require("moment/dist/locale/ru");
56
- require("moment/dist/locale/sk");
57
- require("moment/dist/locale/it");
58
- require("moment/dist/locale/el");
59
- var react_1 = __importStar(require("react"));
60
- var DateTime_1 = __importDefault(require("./Datetime/DateTime"));
61
- var styled_components_1 = require("@xstyled/styled-components");
62
- var styles_1 = require("./styles");
63
- var SpaceAround_1 = __importDefault(require("../SpaceAround"));
64
- var Input_1 = __importDefault(require("../../Forms/Input"));
65
- var ThemeProvider_1 = require("../../ThemeProvider/ThemeProvider");
26
+ import 'moment/dist/locale/cs';
27
+ import 'moment/dist/locale/ru';
28
+ import 'moment/dist/locale/sk';
29
+ import 'moment/dist/locale/it';
30
+ import 'moment/dist/locale/el';
31
+ import React, { useCallback, useContext } from 'react';
32
+ import DatetimePicker from './Datetime/DateTime.js';
33
+ import { x } from '@xstyled/styled-components';
34
+ import { DatePickerBase } from './styles.js';
35
+ import SpaceAroundWrap from '../SpaceAround/index.js';
36
+ import Input from '../../Forms/Input/index.js';
37
+ import { LanguageContext } from '../../ThemeProvider/ThemeProvider.js';
66
38
  var defaultDateFormat = 'DD.MM.YYYY';
67
39
  var DatePicker = function (_a) {
68
40
  var name = _a.name, value = _a.value, initialViewDate = _a.initialViewDate, error = _a.error, label = _a.label, disabled = _a.disabled, isValidDate = _a.isValidDate, onChange = _a.onChange, _b = _a.dateFormat, dateFormat = _b === void 0 ? defaultDateFormat : _b, _c = _a.timeFormat, timeFormat = _c === void 0 ? false : _c, open = _a.open, _d = _a.secondValue, secondValue = _d === void 0 ? null : _d, input = _a.input, _e = _a.icon, icon = _e === void 0 ? true : _e, _f = _a.showInputLabel, showInputLabel = _f === void 0 ? false : _f, _g = _a.showCalendarLabel, showCalendarLabel = _g === void 0 ? true : _g, _h = _a.spaceAround, spaceAround = _h === void 0 ? false : _h, className = _a.className, onClear = _a.onClear, passProps = __rest(_a, ["name", "value", "initialViewDate", "error", "label", "disabled", "isValidDate", "onChange", "dateFormat", "timeFormat", "open", "secondValue", "input", "icon", "showInputLabel", "showCalendarLabel", "spaceAround", "className", "onClear"]);
69
41
  var format = "".concat(dateFormat).concat(timeFormat ? " ".concat(timeFormat) : "");
70
- var isValid = !!value && (0, moment_1.default)(value, format).isValid();
71
- var stringValue = isValid ? (0, moment_1.default)(value, format).format(format) : value;
72
- var locale = (0, react_1.useContext)(ThemeProvider_1.LanguageContext);
73
- var handleRenderInput = (0, react_1.useCallback)(function (_, openCalendar) {
74
- return ((0, jsx_runtime_1.jsx)(Input_1.default, { type: "text", icon: icon ? 'calendar' : undefined, name: name, error: error, disabled: disabled, isInvalid: !!error, label: showInputLabel ? label : undefined, value: stringValue, onFocus: openCalendar, iconOnClick: openCalendar, onClear: onClear }));
42
+ var isValid = !!value && moment(value, format).isValid();
43
+ var stringValue = isValid ? moment(value, format).format(format) : value;
44
+ var locale = useContext(LanguageContext);
45
+ var handleRenderInput = useCallback(function (_, openCalendar) {
46
+ return (_jsx(Input, { type: "text", icon: icon ? 'calendar' : undefined, name: name, error: error, disabled: disabled, isInvalid: !!error, label: showInputLabel ? label : undefined, value: stringValue, onFocus: openCalendar, iconOnClick: openCalendar, onClear: onClear }));
75
47
  }, [name, stringValue, error, label, showInputLabel, isValid, disabled]);
76
- var handleRenderView = (0, react_1.useCallback)(function (_, renderCalendar) {
48
+ var handleRenderView = useCallback(function (_, renderCalendar) {
77
49
  if (label && !showInputLabel) {
78
- return ((0, jsx_runtime_1.jsx)(styled_components_1.x.div, { display: "flex", flexDirection: "column", children: renderCalendar() }));
50
+ return (_jsx(x.div, { display: "flex", flexDirection: "column", children: renderCalendar() }));
79
51
  }
80
52
  return renderCalendar();
81
53
  }, [label, showInputLabel]);
82
- var handleChange = (0, react_1.useCallback)(function (value) {
54
+ var handleChange = useCallback(function (value) {
83
55
  var parsed = typeof value === 'string' ? value : value.toDate();
84
56
  onChange === null || onChange === void 0 ? void 0 : onChange(parsed);
85
57
  }, [onChange]);
86
- var handleIsValid = (0, react_1.useCallback)(function (current, selected) {
58
+ var handleIsValid = useCallback(function (current, selected) {
87
59
  var _a, _b;
88
60
  var parsed = [(_a = current === null || current === void 0 ? void 0 : current.toDate) === null || _a === void 0 ? void 0 : _a.call(current), (_b = selected === null || selected === void 0 ? void 0 : selected.toDate) === null || _b === void 0 ? void 0 : _b.call(selected)];
89
61
  return isValidDate ? isValidDate.apply(void 0, parsed) : true;
90
62
  }, [isValidDate]);
91
- return ((0, jsx_runtime_1.jsx)(SpaceAround_1.default, { spaceAround: spaceAround, children: (0, jsx_runtime_1.jsx)(styles_1.DatePickerBase, { className: className, children: (0, jsx_runtime_1.jsx)(DateTime_1.default, __assign({ value: value, dateFormat: dateFormat, timeFormat: timeFormat, secondValue: secondValue, open: open, input: input, label: showCalendarLabel ? label : undefined, onChange: handleChange, isValidDate: handleIsValid, renderView: handleRenderView, renderInput: handleRenderInput, initialViewDate: initialViewDate, locale: locale }, passProps)) }) }));
63
+ return (_jsx(SpaceAroundWrap, { spaceAround: spaceAround, children: _jsx(DatePickerBase, { className: className, children: _jsx(DatetimePicker, __assign({ value: value, dateFormat: dateFormat, timeFormat: timeFormat, secondValue: secondValue, open: open, input: input, label: showCalendarLabel ? label : undefined, onChange: handleChange, isValidDate: handleIsValid, renderView: handleRenderView, renderInput: handleRenderInput, initialViewDate: initialViewDate, locale: locale }, passProps)) }) }));
92
64
  };
93
- exports.default = react_1.default.memo(DatePicker);
65
+ export default React.memo(DatePicker);
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __extends = (this && this.__extends) || (function () {
3
2
  var extendStatics = function (d, b) {
4
3
  extendStatics = Object.setPrototypeOf ||
@@ -25,18 +24,14 @@ var __assign = (this && this.__assign) || function () {
25
24
  };
26
25
  return __assign.apply(this, arguments);
27
26
  };
28
- var __importDefault = (this && this.__importDefault) || function (mod) {
29
- return (mod && mod.__esModule) ? mod : { "default": mod };
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- var jsx_runtime_1 = require("react/jsx-runtime");
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
33
28
  // @ts-nocheck
34
- var moment_1 = __importDefault(require("moment"));
35
- var react_1 = __importDefault(require("react"));
36
- var DaysView_1 = __importDefault(require("./views/DaysView"));
37
- var MonthsView_1 = __importDefault(require("./views/MonthsView"));
38
- var YearsView_1 = __importDefault(require("./views/YearsView"));
39
- var react_onclickoutside_1 = __importDefault(require("react-onclickoutside"));
29
+ import moment from 'moment';
30
+ import React from 'react';
31
+ import DaysView from './views/DaysView.js';
32
+ import MonthsView from './views/MonthsView.js';
33
+ import YearsView from './views/YearsView.js';
34
+ import onClickOutside from 'react-onclickoutside';
40
35
  var viewModes = {
41
36
  YEARS: 'years',
42
37
  MONTHS: 'months',
@@ -59,7 +54,7 @@ var Datetime = /** @class */ (function (_super) {
59
54
  isValidDate: props.isValidDate,
60
55
  updateDate: _this._updateDate,
61
56
  navigate: _this._viewNavigate,
62
- moment: moment_1.default,
57
+ moment: moment,
63
58
  showView: _this._showView,
64
59
  };
65
60
  // Probably updateOn, updateSelectedDate and setDate can be merged in the same method
@@ -69,11 +64,11 @@ var Datetime = /** @class */ (function (_super) {
69
64
  // Used viewProps
70
65
  // { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }
71
66
  viewProps.renderYear = props.renderYear;
72
- return (0, jsx_runtime_1.jsx)(YearsView_1.default, __assign({}, viewProps));
67
+ return _jsx(YearsView, __assign({}, viewProps));
73
68
  case viewModes.MONTHS:
74
69
  // { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }
75
70
  viewProps.renderMonth = props.renderMonth;
76
- return (0, jsx_runtime_1.jsx)(MonthsView_1.default, __assign({}, viewProps));
71
+ return _jsx(MonthsView, __assign({}, viewProps));
77
72
  case viewModes.DAYS:
78
73
  // { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat
79
74
  viewProps.renderDay = props.renderDay;
@@ -81,13 +76,13 @@ var Datetime = /** @class */ (function (_super) {
81
76
  viewProps.setTime = _this._setTime;
82
77
  viewProps.value = _this.props.value;
83
78
  viewProps.disabled = _this.props.disabled;
84
- return (0, jsx_runtime_1.jsx)(DaysView_1.default, __assign({}, viewProps));
79
+ return _jsx(DaysView, __assign({}, viewProps));
85
80
  default:
86
81
  viewProps.renderDay = props.renderDay;
87
82
  viewProps.timeFormat = _this.getFormat('time');
88
83
  viewProps.setTime = _this._setTime;
89
84
  viewProps.value = _this.props.value;
90
- return (0, jsx_runtime_1.jsx)(DaysView_1.default, __assign({}, viewProps));
85
+ return _jsx(DaysView, __assign({}, viewProps));
91
86
  }
92
87
  };
93
88
  _this._showView = function (view, date) {
@@ -209,16 +204,16 @@ var Datetime = /** @class */ (function (_super) {
209
204
  return _this;
210
205
  }
211
206
  Datetime.prototype.render = function () {
212
- return ((0, jsx_runtime_1.jsxs)(ClickableWrapper, { className: this.getClassName(), onClickOut: this._handleClickOutside, children: [this.renderInput(), (0, jsx_runtime_1.jsx)("div", { className: "rdtPicker", children: this.renderView() })] }));
207
+ return (_jsxs(ClickableWrapper, { className: this.getClassName(), onClickOut: this._handleClickOutside, children: [this.renderInput(), _jsx("div", { className: "rdtPicker", children: this.renderView() })] }));
213
208
  };
214
209
  Datetime.prototype.renderInput = function () {
215
210
  if (!this.props.input)
216
211
  return;
217
212
  var finalInputProps = __assign(__assign({ type: 'text', className: 'form-control', value: this.getInputValue() }, this.props.inputProps), { onFocus: this._onInputFocus, onChange: this._onInputChange, onKeyDown: this._onInputKeyDown, onClick: this._onInputClick });
218
213
  if (this.props.renderInput) {
219
- return (0, jsx_runtime_1.jsx)("div", { children: this.props.renderInput(finalInputProps, this._openCalendar, this._closeCalendar) });
214
+ return _jsx("div", { children: this.props.renderInput(finalInputProps, this._openCalendar, this._closeCalendar) });
220
215
  }
221
- return (0, jsx_runtime_1.jsx)("input", __assign({}, finalInputProps));
216
+ return _jsx("input", __assign({}, finalInputProps));
222
217
  };
223
218
  Datetime.prototype.renderView = function () {
224
219
  return this.props.renderView(this.state.currentView, this._renderCalendar);
@@ -350,13 +345,13 @@ var Datetime = /** @class */ (function (_super) {
350
345
  props = props || this.props;
351
346
  var m = null;
352
347
  if (props.utc) {
353
- m = moment_1.default.utc(date, format, props.strictParsing);
348
+ m = moment.utc(date, format, props.strictParsing);
354
349
  }
355
350
  else if (props.displayTimeZone) {
356
- m = moment_1.default.tz(date, format, props.displayTimeZone);
351
+ m = moment.tz(date, format, props.displayTimeZone);
357
352
  }
358
353
  else {
359
- m = (0, moment_1.default)(date, format, props.strictParsing);
354
+ m = moment(date, format, props.strictParsing);
360
355
  }
361
356
  if (props.locale)
362
357
  m.locale(props.locale);
@@ -364,7 +359,7 @@ var Datetime = /** @class */ (function (_super) {
364
359
  };
365
360
  Datetime.prototype.checkTZ = function () {
366
361
  var displayTimeZone = this.props.displayTimeZone;
367
- if (displayTimeZone && !this.tzWarning && !moment_1.default.tz) {
362
+ if (displayTimeZone && !this.tzWarning && !moment.tz) {
368
363
  this.tzWarning = true;
369
364
  }
370
365
  };
@@ -496,19 +491,19 @@ var Datetime = /** @class */ (function (_super) {
496
491
  renderView: function (_, renderFunc) { return renderFunc(); },
497
492
  };
498
493
  // Make moment accessible through the Datetime class
499
- Datetime.moment = moment_1.default;
494
+ Datetime.moment = moment;
500
495
  return Datetime;
501
- }(react_1.default.Component));
502
- exports.default = Datetime;
496
+ }(React.Component));
497
+ export default Datetime;
503
498
  var ClickOutBase = /** @class */ (function (_super) {
504
499
  __extends(ClickOutBase, _super);
505
500
  function ClickOutBase() {
506
501
  var _this = _super !== null && _super.apply(this, arguments) || this;
507
- _this.container = react_1.default.createRef();
502
+ _this.container = React.createRef();
508
503
  return _this;
509
504
  }
510
505
  ClickOutBase.prototype.render = function () {
511
- return ((0, jsx_runtime_1.jsx)("div", { className: this.props.className, ref: this.container, children: this.props.children }));
506
+ return (_jsx("div", { className: this.props.className, ref: this.container, children: this.props.children }));
512
507
  };
513
508
  ClickOutBase.prototype.handleClickOutside = function (e) {
514
509
  this.props.onClickOut(e);
@@ -517,5 +512,5 @@ var ClickOutBase = /** @class */ (function (_super) {
517
512
  return this.container.current;
518
513
  };
519
514
  return ClickOutBase;
520
- }(react_1.default.Component));
521
- var ClickableWrapper = (0, react_onclickoutside_1.default)(ClickOutBase);
515
+ }(React.Component));
516
+ var ClickableWrapper = onClickOutside(ClickOutBase);
@@ -1,62 +1,36 @@
1
- "use strict";
2
1
  var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
2
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
3
  return cooked;
5
4
  };
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || function (mod) {
23
- if (mod && mod.__esModule) return mod;
24
- var result = {};
25
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
- __setModuleDefault(result, mod);
27
- return result;
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.Timepicker = void 0;
31
- var jsx_runtime_1 = require("react/jsx-runtime");
32
- var react_1 = require("react");
33
- var styled_components_1 = __importStar(require("@xstyled/styled-components"));
34
- var system_1 = require("@xstyled/system");
35
- var Btn = styled_components_1.default.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transform: rotate(90deg);\n font-size: 24px;\n margin: -4px 0;\n background-color: transparent !important;\n border: none;\n color: ", ";\n &:disabled:hover {\n color: ", ";\n cursor: default;\n }\n &:hover {\n color: ", ";\n background-color: transparent !important;\n }\n"], ["\n transform: rotate(90deg);\n font-size: 24px;\n margin: -4px 0;\n background-color: transparent !important;\n border: none;\n color: ", ";\n &:disabled:hover {\n color: ", ";\n cursor: default;\n }\n &:hover {\n color: ", ";\n background-color: transparent !important;\n }\n"])), (0, system_1.th)('colors.lightGray4'), (0, system_1.th)('colors.lightGray4'), (0, system_1.th)('colors.red2'));
36
- var TimeWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: baseline;\n justify-content: center;\n border: 1px solid ", ";\n border-radius: 0.7rem;\n padding: 4px 10px;\n margin: 0 10px;\n"], ["\n display: flex;\n align-items: baseline;\n justify-content: center;\n border: 1px solid ", ";\n border-radius: 0.7rem;\n padding: 4px 10px;\n margin: 0 10px;\n"])), (0, system_1.th)('colors.lightGray2'));
37
- var Hours = styled_components_1.default.input(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 22px;\n font-weight: 700;\n width: 24px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"], ["\n font-size: 22px;\n font-weight: 700;\n width: 24px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"])));
38
- var Minutes = styled_components_1.default.input(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-weight: 700;\n font-size: 16px;\n width: 20px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"], ["\n font-weight: 700;\n font-size: 16px;\n width: 20px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"])));
39
- var Timepicker = function (_a) {
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import { useCallback, useEffect, useState } from 'react';
7
+ import styled, { x } from '@xstyled/styled-components';
8
+ import { th } from '@xstyled/system';
9
+ var Btn = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transform: rotate(90deg);\n font-size: 24px;\n margin: -4px 0;\n background-color: transparent !important;\n border: none;\n color: ", ";\n &:disabled:hover {\n color: ", ";\n cursor: default;\n }\n &:hover {\n color: ", ";\n background-color: transparent !important;\n }\n"], ["\n transform: rotate(90deg);\n font-size: 24px;\n margin: -4px 0;\n background-color: transparent !important;\n border: none;\n color: ", ";\n &:disabled:hover {\n color: ", ";\n cursor: default;\n }\n &:hover {\n color: ", ";\n background-color: transparent !important;\n }\n"])), th('colors.lightGray4'), th('colors.lightGray4'), th('colors.red2'));
10
+ var TimeWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: baseline;\n justify-content: center;\n border: 1px solid ", ";\n border-radius: 0.7rem;\n padding: 4px 10px;\n margin: 0 10px;\n"], ["\n display: flex;\n align-items: baseline;\n justify-content: center;\n border: 1px solid ", ";\n border-radius: 0.7rem;\n padding: 4px 10px;\n margin: 0 10px;\n"])), th('colors.lightGray2'));
11
+ var Hours = styled.input(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 22px;\n font-weight: 700;\n width: 24px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"], ["\n font-size: 22px;\n font-weight: 700;\n width: 24px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"])));
12
+ var Minutes = styled.input(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-weight: 700;\n font-size: 16px;\n width: 20px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"], ["\n font-weight: 700;\n font-size: 16px;\n width: 20px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"])));
13
+ export var Timepicker = function (_a) {
40
14
  var _b, _c, _d, _e;
41
15
  var setTime = _a.setTime, value = _a.value, disabled = _a.disabled;
42
16
  var initialHours = (_c = (_b = value === null || value === void 0 ? void 0 : value.getHours) === null || _b === void 0 ? void 0 : _b.call(value)) !== null && _c !== void 0 ? _c : 0;
43
17
  var initialMinutes = (_e = (_d = value === null || value === void 0 ? void 0 : value.getMinutes) === null || _d === void 0 ? void 0 : _d.call(value)) !== null && _e !== void 0 ? _e : 0;
44
18
  var regExp = '^[0-9]*$';
45
- var _f = (0, react_1.useState)(initialHours), hours = _f[0], setHours = _f[1];
46
- var _g = (0, react_1.useState)(initialMinutes), minutes = _g[0], setMinutes = _g[1];
47
- var increaseHour = (0, react_1.useCallback)(function () {
19
+ var _f = useState(initialHours), hours = _f[0], setHours = _f[1];
20
+ var _g = useState(initialMinutes), minutes = _g[0], setMinutes = _g[1];
21
+ var increaseHour = useCallback(function () {
48
22
  hours === 23 ? setHours(0) : setHours(hours + 1);
49
23
  }, [hours]);
50
- var decreaseHour = (0, react_1.useCallback)(function () {
24
+ var decreaseHour = useCallback(function () {
51
25
  hours === 0 ? setHours(23) : setHours(hours - 1);
52
26
  }, [hours]);
53
- var increaseMinutes = (0, react_1.useCallback)(function () {
27
+ var increaseMinutes = useCallback(function () {
54
28
  minutes >= 55 ? setMinutes(minutes - 55) : setMinutes(minutes + 5);
55
29
  }, [minutes]);
56
- var decreaseMinutes = (0, react_1.useCallback)(function () {
30
+ var decreaseMinutes = useCallback(function () {
57
31
  minutes <= 5 ? setMinutes(minutes + 55) : setMinutes(minutes - 5);
58
32
  }, [minutes]);
59
- var onHoursChange = (0, react_1.useCallback)(function (e) {
33
+ var onHoursChange = useCallback(function (e) {
60
34
  if (e.target.value.match(regExp) && Number(e.target.value) <= 23) {
61
35
  setHours(Number(e.target.value));
62
36
  }
@@ -64,7 +38,7 @@ var Timepicker = function (_a) {
64
38
  setHours(0);
65
39
  }
66
40
  }, []);
67
- var onMinutesChange = (0, react_1.useCallback)(function (e) {
41
+ var onMinutesChange = useCallback(function (e) {
68
42
  if (e.target.value.match(regExp) && Number(e.target.value) <= 59) {
69
43
  setMinutes(Number(e.target.value));
70
44
  }
@@ -72,13 +46,12 @@ var Timepicker = function (_a) {
72
46
  setMinutes(0);
73
47
  }
74
48
  }, []);
75
- (0, react_1.useEffect)(function () {
49
+ useEffect(function () {
76
50
  !!value && setTime('hours', hours);
77
51
  }, [hours]);
78
- (0, react_1.useEffect)(function () {
52
+ useEffect(function () {
79
53
  !!value && setTime('minutes', minutes);
80
54
  }, [minutes]);
81
- return ((0, jsx_runtime_1.jsx)("td", { colSpan: 7, children: (0, jsx_runtime_1.jsx)(styled_components_1.x.div, { display: "flex", flexDirection: "column", alignItems: "flex-start", pt: "1rem", w: "fit-content", children: (0, jsx_runtime_1.jsxs)(styled_components_1.x.div, { display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsxs)(styled_components_1.x.div, { display: "flex", flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(Btn, { disabled: disabled, onClick: increaseHour, children: "\u2039" }), (0, jsx_runtime_1.jsx)(Btn, { disabled: disabled, onClick: decreaseHour, children: "\u203A" })] }), (0, jsx_runtime_1.jsxs)(TimeWrapper, { children: [(0, jsx_runtime_1.jsx)(Hours, { value: hours < 10 ? "0".concat(hours) : hours, disabled: disabled, onChange: onHoursChange }), (0, jsx_runtime_1.jsx)(styled_components_1.x.div, { mx: "7px", color: "lightGray4", children: "|" }), (0, jsx_runtime_1.jsx)(Minutes, { value: minutes < 10 ? "0".concat(minutes) : minutes, disabled: disabled, onChange: onMinutesChange })] }), (0, jsx_runtime_1.jsxs)(styled_components_1.x.div, { display: "flex", flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(Btn, { disabled: disabled, onClick: increaseMinutes, children: "\u2039" }), (0, jsx_runtime_1.jsx)(Btn, { disabled: disabled, onClick: decreaseMinutes, children: "\u203A" })] })] }) }) }));
55
+ return (_jsx("td", { colSpan: 7, children: _jsx(x.div, { display: "flex", flexDirection: "column", alignItems: "flex-start", pt: "1rem", w: "fit-content", children: _jsxs(x.div, { display: "flex", alignItems: "center", children: [_jsxs(x.div, { display: "flex", flexDirection: "column", children: [_jsx(Btn, { disabled: disabled, onClick: increaseHour, children: "\u2039" }), _jsx(Btn, { disabled: disabled, onClick: decreaseHour, children: "\u203A" })] }), _jsxs(TimeWrapper, { children: [_jsx(Hours, { value: hours < 10 ? "0".concat(hours) : hours, disabled: disabled, onChange: onHoursChange }), _jsx(x.div, { mx: "7px", color: "lightGray4", children: "|" }), _jsx(Minutes, { value: minutes < 10 ? "0".concat(minutes) : minutes, disabled: disabled, onChange: onMinutesChange })] }), _jsxs(x.div, { display: "flex", flexDirection: "column", children: [_jsx(Btn, { disabled: disabled, onClick: increaseMinutes, children: "\u2039" }), _jsx(Btn, { disabled: disabled, onClick: decreaseMinutes, children: "\u203A" })] })] }) }) }));
82
56
  };
83
- exports.Timepicker = Timepicker;
84
57
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __assign = (this && this.__assign) || function () {
3
2
  __assign = Object.assign || function(t) {
4
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -10,10 +9,8 @@ var __assign = (this && this.__assign) || function () {
10
9
  };
11
10
  return __assign.apply(this, arguments);
12
11
  };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- var jsx_runtime_1 = require("react/jsx-runtime");
15
- function ViewNavigation(_a) {
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ export default function ViewNavigation(_a) {
16
14
  var onClickPrev = _a.onClickPrev, onClickSwitch = _a.onClickSwitch, onClickNext = _a.onClickNext, switchContent = _a.switchContent, switchColSpan = _a.switchColSpan, switchProps = _a.switchProps, label = _a.label;
17
- return ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { className: "rdtPrev", onClick: onClickPrev, children: (0, jsx_runtime_1.jsx)("span", { children: "\u2039" }) }), (0, jsx_runtime_1.jsx)("th", __assign({ className: "rdtSwitch", colSpan: switchColSpan, onClick: onClickSwitch }, switchProps, { children: switchContent })), (0, jsx_runtime_1.jsx)("th", { className: "rdtNext", onClick: onClickNext, children: (0, jsx_runtime_1.jsx)("span", { children: "\u203A" }) }), (0, jsx_runtime_1.jsx)("th", { colSpan: 2, className: "rdtLabel", children: label && label })] }));
15
+ return (_jsxs("tr", { children: [_jsx("th", { className: "rdtPrev", onClick: onClickPrev, children: _jsx("span", { children: "\u2039" }) }), _jsx("th", __assign({ className: "rdtSwitch", colSpan: switchColSpan, onClick: onClickSwitch }, switchProps, { children: switchContent })), _jsx("th", { className: "rdtNext", onClick: onClickNext, children: _jsx("span", { children: "\u203A" }) }), _jsx("th", { colSpan: 2, className: "rdtLabel", children: label && label })] }));
18
16
  }
19
- exports.default = ViewNavigation;
@@ -1,8 +1,7 @@
1
- "use strict";
2
1
  // Type definitions for react-datetime
3
2
  // Project: https://github.com/arqex/react-datetime
4
3
  // Definitions by: Ivan Verevkin <vereva@x-root.org>
5
4
  // Updates by: Aaron Spaulding <aaron@sachimp.com>,
6
5
  // Karol Janyst <http://github.com/LKay>,
7
6
  // Javier Marquez <javi@arqex.com>
8
- Object.defineProperty(exports, "__esModule", { value: true });
7
+ export {};
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __extends = (this && this.__extends) || (function () {
3
2
  var extendStatics = function (d, b) {
4
3
  extendStatics = Object.setPrototypeOf ||
@@ -25,15 +24,11 @@ var __assign = (this && this.__assign) || function () {
25
24
  };
26
25
  return __assign.apply(this, arguments);
27
26
  };
28
- var __importDefault = (this && this.__importDefault) || function (mod) {
29
- return (mod && mod.__esModule) ? mod : { "default": mod };
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- var jsx_runtime_1 = require("react/jsx-runtime");
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
33
28
  // @ts-nocheck
34
- var react_1 = __importDefault(require("react"));
35
- var Timepicker_1 = require("../components/Timepicker");
36
- var ViewNavigation_1 = __importDefault(require("../components/ViewNavigation"));
29
+ import React from 'react';
30
+ import { Timepicker } from '../components/Timepicker.js';
31
+ import ViewNavigation from '../components/ViewNavigation.js';
37
32
  var DaysView = /** @class */ (function (_super) {
38
33
  __extends(DaysView, _super);
39
34
  function DaysView() {
@@ -44,19 +39,19 @@ var DaysView = /** @class */ (function (_super) {
44
39
  return _this;
45
40
  }
46
41
  DaysView.prototype.render = function () {
47
- return ((0, jsx_runtime_1.jsx)("div", { className: "rdtDays", children: (0, jsx_runtime_1.jsxs)("table", { children: [(0, jsx_runtime_1.jsxs)("thead", { children: [this.renderNavigation(), this.renderDayHeaders()] }), (0, jsx_runtime_1.jsx)("tbody", { children: this.renderDays() }), this.renderFooter()] }) }));
42
+ return (_jsx("div", { className: "rdtDays", children: _jsxs("table", { children: [_jsxs("thead", { children: [this.renderNavigation(), this.renderDayHeaders()] }), _jsx("tbody", { children: this.renderDays() }), this.renderFooter()] }) }));
48
43
  };
49
44
  DaysView.prototype.renderNavigation = function () {
50
45
  var _this = this;
51
46
  var date = this.props.viewDate;
52
47
  var locale = date.localeData();
53
48
  var label = this.props.label;
54
- return ((0, jsx_runtime_1.jsx)(ViewNavigation_1.default, { onClickPrev: function () { return _this.props.navigate(-1, 'months'); }, onClickSwitch: function () { return _this.props.showView('months'); }, onClickNext: function () { return _this.props.navigate(1, 'months'); }, switchContent: locale.months(date, 'DD[]MMMM') + ' ' + date.year(), switchColSpan: 3, label: label, switchProps: { 'data-value': this.props.viewDate.month() } }));
49
+ return (_jsx(ViewNavigation, { onClickPrev: function () { return _this.props.navigate(-1, 'months'); }, onClickSwitch: function () { return _this.props.showView('months'); }, onClickNext: function () { return _this.props.navigate(1, 'months'); }, switchContent: locale.months(date, 'DD[]MMMM') + ' ' + date.year(), switchColSpan: 3, label: label, switchProps: { 'data-value': this.props.viewDate.month() } }));
55
50
  };
56
51
  DaysView.prototype.renderDayHeaders = function () {
57
52
  var locale = this.props.viewDate.localeData();
58
- var dayItems = getDaysOfWeek(locale).map(function (day, index) { return ((0, jsx_runtime_1.jsx)("th", { className: "dow", children: day }, day + index)); });
59
- return (0, jsx_runtime_1.jsx)("tr", { children: dayItems });
53
+ var dayItems = getDaysOfWeek(locale).map(function (day, index) { return (_jsx("th", { className: "dow", children: day }, day + index)); });
54
+ return _jsx("tr", { children: dayItems });
60
55
  };
61
56
  DaysView.prototype.renderDays = function () {
62
57
  var date = this.props.viewDate;
@@ -74,7 +69,7 @@ var DaysView = /** @class */ (function (_super) {
74
69
  row.push(this.renderDay(startDate, startOfMonth, endOfMonth));
75
70
  startDate.add(1, 'd');
76
71
  }
77
- return rows.map(function (r, i) { return (0, jsx_runtime_1.jsx)("tr", { children: r }, "".concat(endDate.month(), "_").concat(i)); });
72
+ return rows.map(function (r, i) { return _jsx("tr", { children: r }, "".concat(endDate.month(), "_").concat(i)); });
78
73
  };
79
74
  DaysView.prototype.renderDay = function (date, startOfMonth, endOfMonth) {
80
75
  var selectedDate = this.props.selectedDate;
@@ -122,15 +117,15 @@ var DaysView = /** @class */ (function (_super) {
122
117
  var setTime = this.props.setTime;
123
118
  var value = this.props.value;
124
119
  var disabled = this.props.disabled;
125
- return ((0, jsx_runtime_1.jsx)("tfoot", { children: (0, jsx_runtime_1.jsx)("tr", { children: (0, jsx_runtime_1.jsx)(Timepicker_1.Timepicker, { setTime: setTime, value: value, disabled: disabled }) }) }));
120
+ return (_jsx("tfoot", { children: _jsx("tr", { children: _jsx(Timepicker, { setTime: setTime, value: value, disabled: disabled }) }) }));
126
121
  };
127
122
  DaysView.defaultProps = {
128
123
  isValidDate: function () { return true; },
129
- renderDay: function (props, date) { return (0, jsx_runtime_1.jsx)("td", __assign({}, props, { children: date.date() })); },
124
+ renderDay: function (props, date) { return _jsx("td", __assign({}, props, { children: date.date() })); },
130
125
  };
131
126
  return DaysView;
132
- }(react_1.default.Component));
133
- exports.default = DaysView;
127
+ }(React.Component));
128
+ export default DaysView;
134
129
  function getRow(rows, day) {
135
130
  return rows[Math.floor(day / 7)];
136
131
  }
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __extends = (this && this.__extends) || (function () {
3
2
  var extendStatics = function (d, b) {
4
3
  extendStatics = Object.setPrototypeOf ||
@@ -25,14 +24,10 @@ var __assign = (this && this.__assign) || function () {
25
24
  };
26
25
  return __assign.apply(this, arguments);
27
26
  };
28
- var __importDefault = (this && this.__importDefault) || function (mod) {
29
- return (mod && mod.__esModule) ? mod : { "default": mod };
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- var jsx_runtime_1 = require("react/jsx-runtime");
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
33
28
  // @ts-nocheck
34
- var react_1 = __importDefault(require("react"));
35
- var ViewNavigation_1 = __importDefault(require("../components/ViewNavigation"));
29
+ import React from 'react';
30
+ import ViewNavigation from '../components/ViewNavigation.js';
36
31
  var MonthsView = /** @class */ (function (_super) {
37
32
  __extends(MonthsView, _super);
38
33
  function MonthsView() {
@@ -43,12 +38,12 @@ var MonthsView = /** @class */ (function (_super) {
43
38
  return _this;
44
39
  }
45
40
  MonthsView.prototype.render = function () {
46
- return ((0, jsx_runtime_1.jsxs)("div", { className: "rdtMonths", children: [(0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("thead", { children: this.renderNavigation() }) }), (0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("tbody", { children: this.renderMonths() }) })] }));
41
+ return (_jsxs("div", { className: "rdtMonths", children: [_jsx("table", { children: _jsx("thead", { children: this.renderNavigation() }) }), _jsx("table", { children: _jsx("tbody", { children: this.renderMonths() }) })] }));
47
42
  };
48
43
  MonthsView.prototype.renderNavigation = function () {
49
44
  var _this = this;
50
45
  var year = this.props.viewDate.year();
51
- return ((0, jsx_runtime_1.jsx)(ViewNavigation_1.default, { onClickPrev: function () { return _this.props.navigate(-1, 'years'); }, onClickSwitch: function () { return _this.props.showView('years'); }, onClickNext: function () { return _this.props.navigate(1, 'years'); }, switchContent: year, switchColSpan: "2" }));
46
+ return (_jsx(ViewNavigation, { onClickPrev: function () { return _this.props.navigate(-1, 'years'); }, onClickSwitch: function () { return _this.props.showView('years'); }, onClickNext: function () { return _this.props.navigate(1, 'years'); }, switchContent: year, switchColSpan: "2" }));
52
47
  };
53
48
  MonthsView.prototype.renderMonths = function () {
54
49
  // 12 months in 3 rows for every view
@@ -57,7 +52,7 @@ var MonthsView = /** @class */ (function (_super) {
57
52
  var row = getRow(rows, month);
58
53
  row.push(this.renderMonth(month));
59
54
  }
60
- return rows.map(function (months, i) { return (0, jsx_runtime_1.jsx)("tr", { children: months }, i); });
55
+ return rows.map(function (months, i) { return _jsx("tr", { children: months }, i); });
61
56
  };
62
57
  MonthsView.prototype.renderMonth = function (month) {
63
58
  var selectedDate = this.props.selectedDate;
@@ -76,7 +71,7 @@ var MonthsView = /** @class */ (function (_super) {
76
71
  if (this.props.renderMonth) {
77
72
  return this.props.renderMonth(props, month, this.props.viewDate.year(), this.props.selectedDate && this.props.selectedDate.clone());
78
73
  }
79
- return (0, jsx_runtime_1.jsx)("td", __assign({}, props, { children: this.getMonthText(month) }));
74
+ return _jsx("td", __assign({}, props, { children: this.getMonthText(month) }));
80
75
  };
81
76
  MonthsView.prototype.isDisabledMonth = function (month) {
82
77
  var isValidDate = this.props.isValidDate;
@@ -100,8 +95,8 @@ var MonthsView = /** @class */ (function (_super) {
100
95
  return capitalize(monthStr.substring(0, 3));
101
96
  };
102
97
  return MonthsView;
103
- }(react_1.default.Component));
104
- exports.default = MonthsView;
98
+ }(React.Component));
99
+ export default MonthsView;
105
100
  function getRow(rows, year) {
106
101
  if (year < 4) {
107
102
  return rows[0];
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __extends = (this && this.__extends) || (function () {
3
2
  var extendStatics = function (d, b) {
4
3
  extendStatics = Object.setPrototypeOf ||
@@ -25,14 +24,10 @@ var __assign = (this && this.__assign) || function () {
25
24
  };
26
25
  return __assign.apply(this, arguments);
27
26
  };
28
- var __importDefault = (this && this.__importDefault) || function (mod) {
29
- return (mod && mod.__esModule) ? mod : { "default": mod };
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- var jsx_runtime_1 = require("react/jsx-runtime");
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
33
28
  // @ts-nocheck
34
- var react_1 = __importDefault(require("react"));
35
- var ViewNavigation_1 = __importDefault(require("../components/ViewNavigation"));
29
+ import React from 'react';
30
+ import ViewNavigation from '../components/ViewNavigation.js';
36
31
  var YearsView = /** @class */ (function (_super) {
37
32
  __extends(YearsView, _super);
38
33
  function YearsView() {
@@ -44,12 +39,12 @@ var YearsView = /** @class */ (function (_super) {
44
39
  return _this;
45
40
  }
46
41
  YearsView.prototype.render = function () {
47
- return ((0, jsx_runtime_1.jsxs)("div", { className: "rdtYears", children: [(0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("thead", { children: this.renderNavigation() }) }), (0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("tbody", { children: this.renderYears() }) })] }));
42
+ return (_jsxs("div", { className: "rdtYears", children: [_jsx("table", { children: _jsx("thead", { children: this.renderNavigation() }) }), _jsx("table", { children: _jsx("tbody", { children: this.renderYears() }) })] }));
48
43
  };
49
44
  YearsView.prototype.renderNavigation = function () {
50
45
  var _this = this;
51
46
  var viewYear = this.getViewYear();
52
- return ((0, jsx_runtime_1.jsx)(ViewNavigation_1.default, { onClickPrev: function () { return _this.props.navigate(-10, 'years'); }, onClickSwitch: function () { return _this.props.showView('years'); }, onClickNext: function () { return _this.props.navigate(10, 'years'); }, switchContent: "".concat(viewYear, "-").concat(viewYear + 9) }));
47
+ return (_jsx(ViewNavigation, { onClickPrev: function () { return _this.props.navigate(-10, 'years'); }, onClickSwitch: function () { return _this.props.showView('years'); }, onClickNext: function () { return _this.props.navigate(10, 'years'); }, switchContent: "".concat(viewYear, "-").concat(viewYear + 9) }));
53
48
  };
54
49
  YearsView.prototype.renderYears = function () {
55
50
  var viewYear = this.getViewYear();
@@ -59,7 +54,7 @@ var YearsView = /** @class */ (function (_super) {
59
54
  var row = getRow(rows, year - viewYear);
60
55
  row.push(this.renderYear(year));
61
56
  }
62
- return rows.map(function (years, i) { return (0, jsx_runtime_1.jsx)("tr", { children: years }, i); });
57
+ return rows.map(function (years, i) { return _jsx("tr", { children: years }, i); });
63
58
  };
64
59
  YearsView.prototype.renderYear = function (year) {
65
60
  var selectedYear = this.getSelectedYear();
@@ -106,11 +101,11 @@ var YearsView = /** @class */ (function (_super) {
106
101
  return true;
107
102
  };
108
103
  YearsView.defaultProps = {
109
- renderYear: function (props, year) { return (0, jsx_runtime_1.jsx)("td", __assign({}, props, { children: year })); },
104
+ renderYear: function (props, year) { return _jsx("td", __assign({}, props, { children: year })); },
110
105
  };
111
106
  return YearsView;
112
- }(react_1.default.Component));
113
- exports.default = YearsView;
107
+ }(React.Component));
108
+ export default YearsView;
114
109
  function getRow(rows, year) {
115
110
  if (year < 3) {
116
111
  return rows[0];