@mailstep/design-system 0.6.2-beta.7 → 0.6.2-beta.8

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