@mailstep/design-system 0.4.21 → 0.5.0-beta.10

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 (285) hide show
  1. package/package.json +33 -2
  2. package/ui/Blocks/CommonGrid/CommonGrid.d.ts +3 -0
  3. package/ui/Blocks/CommonGrid/CommonGrid.js +106 -0
  4. package/ui/Blocks/CommonGrid/CommonGridContainer.d.ts +3 -0
  5. package/ui/Blocks/CommonGrid/CommonGridContainer.js +67 -0
  6. package/ui/Blocks/CommonGrid/CommonGridContext.d.ts +9 -0
  7. package/ui/Blocks/CommonGrid/CommonGridContext.js +32 -0
  8. package/ui/Blocks/CommonGrid/HoC/withReduxActions.d.ts +2 -0
  9. package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +36 -0
  10. package/ui/Blocks/CommonGrid/StandardButtons.d.ts +6 -0
  11. package/ui/Blocks/CommonGrid/StandardButtons.js +50 -0
  12. package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.d.ts +11 -0
  13. package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +53 -0
  14. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.d.ts +11 -0
  15. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +18 -0
  16. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.d.ts +12 -0
  17. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +45 -0
  18. package/ui/Blocks/CommonGrid/components/ActionHead/index.d.ts +2 -0
  19. package/ui/Blocks/CommonGrid/components/ActionHead/index.js +2 -0
  20. package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.d.ts +6 -0
  21. package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.js +35 -0
  22. package/ui/Blocks/CommonGrid/components/BooleanSelect/index.d.ts +2 -0
  23. package/ui/Blocks/CommonGrid/components/BooleanSelect/index.js +2 -0
  24. package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.d.ts +13 -0
  25. package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +32 -0
  26. package/ui/Blocks/CommonGrid/components/ButtonMore/index.d.ts +2 -0
  27. package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +2 -0
  28. package/ui/Blocks/CommonGrid/components/ColumnFilterCell.d.ts +11 -0
  29. package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +41 -0
  30. package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.d.ts +5 -0
  31. package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +58 -0
  32. package/ui/Blocks/CommonGrid/components/ColumnTitle/index.d.ts +2 -0
  33. package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +2 -0
  34. package/ui/Blocks/CommonGrid/components/ColumnTitle.d.ts +9 -0
  35. package/ui/Blocks/CommonGrid/components/ColumnTitle.js +20 -0
  36. package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.d.ts +11 -0
  37. package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +20 -0
  38. package/ui/Blocks/CommonGrid/components/ControlButtons/index.d.ts +2 -0
  39. package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +2 -0
  40. package/ui/Blocks/CommonGrid/components/DataCell.d.ts +11 -0
  41. package/ui/Blocks/CommonGrid/components/DataCell.js +52 -0
  42. package/ui/Blocks/CommonGrid/components/DataRow.d.ts +21 -0
  43. package/ui/Blocks/CommonGrid/components/DataRow.js +110 -0
  44. package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.d.ts +12 -0
  45. package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.js +113 -0
  46. package/ui/Blocks/CommonGrid/components/DatePickerRange/index.d.ts +2 -0
  47. package/ui/Blocks/CommonGrid/components/DatePickerRange/index.js +2 -0
  48. package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.d.ts +1 -0
  49. package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.js +3 -0
  50. package/ui/Blocks/CommonGrid/components/DropdownSelect/DropdownSelect.d.ts +21 -0
  51. package/ui/Blocks/CommonGrid/components/DropdownSelect/DropdownSelect.js +47 -0
  52. package/ui/Blocks/CommonGrid/components/DropdownSelect/index.d.ts +4 -0
  53. package/ui/Blocks/CommonGrid/components/DropdownSelect/index.js +3 -0
  54. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.d.ts +8 -0
  55. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +43 -0
  56. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.d.ts +2 -0
  57. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +2 -0
  58. package/ui/Blocks/CommonGrid/components/FilterDropdown.d.ts +3 -0
  59. package/ui/Blocks/CommonGrid/components/FilterDropdown.js +36 -0
  60. package/ui/Blocks/CommonGrid/components/FilterRow.d.ts +15 -0
  61. package/ui/Blocks/CommonGrid/components/FilterRow.js +34 -0
  62. package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.d.ts +7 -0
  63. package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +45 -0
  64. package/ui/Blocks/CommonGrid/components/FloatingButton/index.d.ts +2 -0
  65. package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +2 -0
  66. package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.d.ts +10 -0
  67. package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.js +19 -0
  68. package/ui/Blocks/CommonGrid/components/GridSelect/index.d.ts +2 -0
  69. package/ui/Blocks/CommonGrid/components/GridSelect/index.js +2 -0
  70. package/ui/Blocks/CommonGrid/components/GroupRow.d.ts +9 -0
  71. package/ui/Blocks/CommonGrid/components/GroupRow.js +27 -0
  72. package/ui/Blocks/CommonGrid/components/HeadCell.d.ts +27 -0
  73. package/ui/Blocks/CommonGrid/components/HeadCell.js +40 -0
  74. package/ui/Blocks/CommonGrid/components/HeadRow.d.ts +15 -0
  75. package/ui/Blocks/CommonGrid/components/HeadRow.js +69 -0
  76. package/ui/Blocks/CommonGrid/components/HidePrint/HidePrint.d.ts +6 -0
  77. package/ui/Blocks/CommonGrid/components/HidePrint/HidePrint.js +13 -0
  78. package/ui/Blocks/CommonGrid/components/IconList/IconList.d.ts +18 -0
  79. package/ui/Blocks/CommonGrid/components/IconList/IconList.js +29 -0
  80. package/ui/Blocks/CommonGrid/components/IconList/index.d.ts +2 -0
  81. package/ui/Blocks/CommonGrid/components/IconList/index.js +2 -0
  82. package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.d.ts +11 -0
  83. package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +20 -0
  84. package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.d.ts +12 -0
  85. package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +47 -0
  86. package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.d.ts +2 -0
  87. package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +2 -0
  88. package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.d.ts +3 -0
  89. package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.js +76 -0
  90. package/ui/Blocks/CommonGrid/components/NumberRange/index.d.ts +2 -0
  91. package/ui/Blocks/CommonGrid/components/NumberRange/index.js +2 -0
  92. package/ui/Blocks/CommonGrid/components/NumberRange/types.d.ts +17 -0
  93. package/ui/Blocks/CommonGrid/components/NumberRange/types.js +1 -0
  94. package/ui/Blocks/CommonGrid/components/OversizedScroll.d.ts +11 -0
  95. package/ui/Blocks/CommonGrid/components/OversizedScroll.js +21 -0
  96. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.d.ts +6 -0
  97. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.js +26 -0
  98. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.d.ts +2 -0
  99. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.js +2 -0
  100. package/ui/Blocks/CommonGrid/components/Resize.d.ts +7 -0
  101. package/ui/Blocks/CommonGrid/components/Resize.js +33 -0
  102. package/ui/Blocks/CommonGrid/components/Table.d.ts +10 -0
  103. package/ui/Blocks/CommonGrid/components/Table.js +25 -0
  104. package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.d.ts +7 -0
  105. package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +31 -0
  106. package/ui/Blocks/CommonGrid/components/TablePagination/index.d.ts +2 -0
  107. package/ui/Blocks/CommonGrid/components/TablePagination/index.js +2 -0
  108. package/ui/Blocks/CommonGrid/components/TextRange/TextRange.d.ts +4 -0
  109. package/ui/Blocks/CommonGrid/components/TextRange/TextRange.js +89 -0
  110. package/ui/Blocks/CommonGrid/components/TextRange/index.d.ts +2 -0
  111. package/ui/Blocks/CommonGrid/components/TextRange/index.js +2 -0
  112. package/ui/Blocks/CommonGrid/components/TextRange/types.d.ts +21 -0
  113. package/ui/Blocks/CommonGrid/components/TextRange/types.js +1 -0
  114. package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.d.ts +5 -0
  115. package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +22 -0
  116. package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.d.ts +4 -0
  117. package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.js +16 -0
  118. package/ui/Blocks/CommonGrid/components/gridCells/Date.d.ts +4 -0
  119. package/ui/Blocks/CommonGrid/components/gridCells/Date.js +8 -0
  120. package/ui/Blocks/CommonGrid/components/gridCells/DateTime.d.ts +4 -0
  121. package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +13 -0
  122. package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.d.ts +9 -0
  123. package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +33 -0
  124. package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.d.ts +5 -0
  125. package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +19 -0
  126. package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.d.ts +9 -0
  127. package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +15 -0
  128. package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.d.ts +6 -0
  129. package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +23 -0
  130. package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.d.ts +1 -0
  131. package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +8 -0
  132. package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.d.ts +5 -0
  133. package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +24 -0
  134. package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.d.ts +7 -0
  135. package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +30 -0
  136. package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.d.ts +4 -0
  137. package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +7 -0
  138. package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.d.ts +2 -0
  139. package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +16 -0
  140. package/ui/Blocks/CommonGrid/components/gridCells/index.d.ts +12 -0
  141. package/ui/Blocks/CommonGrid/components/gridCells/index.js +12 -0
  142. package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.d.ts +2 -0
  143. package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.js +14 -0
  144. package/ui/Blocks/CommonGrid/components/icons/Edit.d.ts +2 -0
  145. package/ui/Blocks/CommonGrid/components/icons/Edit.js +14 -0
  146. package/ui/Blocks/CommonGrid/components/icons/EyeOpen.d.ts +2 -0
  147. package/ui/Blocks/CommonGrid/components/icons/EyeOpen.js +14 -0
  148. package/ui/Blocks/CommonGrid/components/icons/Sorting.d.ts +2 -0
  149. package/ui/Blocks/CommonGrid/components/icons/Sorting.js +14 -0
  150. package/ui/Blocks/CommonGrid/components/utils.d.ts +8 -0
  151. package/ui/Blocks/CommonGrid/components/utils.js +22 -0
  152. package/ui/Blocks/CommonGrid/hooks/useColumnSizes.d.ts +12 -0
  153. package/ui/Blocks/CommonGrid/hooks/useColumnSizes.js +83 -0
  154. package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.d.ts +15 -0
  155. package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +70 -0
  156. package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.d.ts +7 -0
  157. package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +33 -0
  158. package/ui/Blocks/CommonGrid/hooks/useManageColumn.d.ts +19 -0
  159. package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +34 -0
  160. package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.d.ts +4 -0
  161. package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.js +21 -0
  162. package/ui/Blocks/CommonGrid/hooks/useUxReset.d.ts +3 -0
  163. package/ui/Blocks/CommonGrid/hooks/useUxReset.js +15 -0
  164. package/ui/Blocks/CommonGrid/index.d.ts +7 -0
  165. package/ui/Blocks/CommonGrid/index.js +7 -0
  166. package/ui/Blocks/CommonGrid/store/index.d.ts +58 -0
  167. package/ui/Blocks/CommonGrid/store/index.js +230 -0
  168. package/ui/Blocks/CommonGrid/store/migrateState.d.ts +3 -0
  169. package/ui/Blocks/CommonGrid/store/migrateState.js +14 -0
  170. package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.d.ts +11 -0
  171. package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +31 -0
  172. package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.d.ts +13 -0
  173. package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.js +49 -0
  174. package/ui/Blocks/CommonGrid/storybook/stories/default.stories.d.ts +6 -0
  175. package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +14 -0
  176. package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.d.ts +10 -0
  177. package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +11 -0
  178. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.d.ts +10 -0
  179. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +12 -0
  180. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.d.ts +10 -0
  181. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +12 -0
  182. package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.d.ts +6 -0
  183. package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +15 -0
  184. package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.d.ts +10 -0
  185. package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +15 -0
  186. package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.d.ts +14 -0
  187. package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +24 -0
  188. package/ui/Blocks/CommonGrid/storybook/utils/actions.d.ts +4 -0
  189. package/ui/Blocks/CommonGrid/storybook/utils/actions.js +6 -0
  190. package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.d.ts +10 -0
  191. package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +97 -0
  192. package/ui/Blocks/CommonGrid/storybook/utils/filters.d.ts +2 -0
  193. package/ui/Blocks/CommonGrid/storybook/utils/filters.js +23 -0
  194. package/ui/Blocks/CommonGrid/storybook/utils/utils.d.ts +17 -0
  195. package/ui/Blocks/CommonGrid/storybook/utils/utils.js +66 -0
  196. package/ui/Blocks/CommonGrid/storybook/utils/withRedux.d.ts +2 -0
  197. package/ui/Blocks/CommonGrid/storybook/utils/withRedux.js +12 -0
  198. package/ui/Blocks/CommonGrid/storybook/utils/withRouter.d.ts +2 -0
  199. package/ui/Blocks/CommonGrid/storybook/utils/withRouter.js +4 -0
  200. package/ui/Blocks/CommonGrid/storybook/utils/withTheme.d.ts +2 -0
  201. package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +18 -0
  202. package/ui/Blocks/CommonGrid/styles.d.ts +12 -0
  203. package/ui/Blocks/CommonGrid/styles.js +33 -0
  204. package/ui/Blocks/CommonGrid/translations.d.ts +1 -0
  205. package/ui/Blocks/CommonGrid/translations.js +6 -0
  206. package/ui/Blocks/CommonGrid/types.d.ts +313 -0
  207. package/ui/Blocks/CommonGrid/types.js +8 -0
  208. package/ui/Blocks/CommonGrid/utils/index.d.ts +19 -0
  209. package/ui/Blocks/CommonGrid/utils/index.js +78 -0
  210. package/ui/Blocks/CommonGrid/utils/public.d.ts +16 -0
  211. package/ui/Blocks/CommonGrid/utils/public.js +52 -0
  212. package/ui/Blocks/Popover/index.d.ts +10 -0
  213. package/ui/Blocks/Popover/index.js +19 -0
  214. package/ui/Elements/DatePicker/DatePicker.d.ts +20 -0
  215. package/ui/Elements/DatePicker/DatePicker.js +65 -0
  216. package/ui/Elements/DatePicker/Datetime/DateTime.d.ts +95 -0
  217. package/ui/Elements/DatePicker/Datetime/DateTime.js +516 -0
  218. package/ui/Elements/DatePicker/Datetime/components/Timepicker.d.ts +8 -0
  219. package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +57 -0
  220. package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.d.ts +9 -0
  221. package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +16 -0
  222. package/ui/Elements/DatePicker/Datetime/types.d.ts +61 -0
  223. package/ui/Elements/DatePicker/Datetime/types.js +7 -0
  224. package/ui/Elements/DatePicker/Datetime/views/DaysView.d.ts +14 -0
  225. package/ui/Elements/DatePicker/Datetime/views/DaysView.js +145 -0
  226. package/ui/Elements/DatePicker/Datetime/views/MonthsView.d.ts +10 -0
  227. package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +111 -0
  228. package/ui/Elements/DatePicker/Datetime/views/YearsView.d.ts +15 -0
  229. package/ui/Elements/DatePicker/Datetime/views/YearsView.js +117 -0
  230. package/ui/Elements/DatePicker/index.d.ts +2 -0
  231. package/ui/Elements/DatePicker/index.js +2 -0
  232. package/ui/Elements/DatePicker/styles.d.ts +2 -0
  233. package/ui/Elements/DatePicker/styles.js +8 -0
  234. package/ui/Elements/DatePicker/utils/getLanguage.d.ts +1 -0
  235. package/ui/Elements/DatePicker/utils/getLanguage.js +10 -0
  236. package/ui/Elements/DropdownMenu/DropdownMenu.d.ts +2 -0
  237. package/ui/Elements/DropdownMenu/DropdownMenu.js +36 -0
  238. package/ui/Elements/DropdownMenu/components/DefaultItem.d.ts +3 -0
  239. package/ui/Elements/DropdownMenu/components/DefaultItem.js +16 -0
  240. package/ui/Elements/DropdownMenu/components/MenuItem.d.ts +3 -0
  241. package/ui/Elements/DropdownMenu/components/MenuItem.js +51 -0
  242. package/ui/Elements/DropdownMenu/components/MenuList.d.ts +3 -0
  243. package/ui/Elements/DropdownMenu/components/MenuList.js +10 -0
  244. package/ui/Elements/DropdownMenu/index.d.ts +1 -0
  245. package/ui/Elements/DropdownMenu/index.js +1 -0
  246. package/ui/Elements/DropdownMenu/types.d.ts +41 -0
  247. package/ui/Elements/DropdownMenu/types.js +1 -0
  248. package/ui/Elements/HighlightBox/HighlightBox.d.ts +50 -0
  249. package/ui/Elements/HighlightBox/HighlightBox.js +65 -0
  250. package/ui/Elements/HighlightBox/index.d.ts +2 -0
  251. package/ui/Elements/HighlightBox/index.js +2 -0
  252. package/ui/Elements/MultiSelect/MultiSelect.d.ts +6 -0
  253. package/ui/Elements/MultiSelect/MultiSelect.js +29 -0
  254. package/ui/Elements/MultiSelect/index.d.ts +2 -0
  255. package/ui/Elements/MultiSelect/index.js +2 -0
  256. package/ui/Elements/Pagination/Pagination.d.ts +1 -1
  257. package/ui/Elements/Pagination/Pagination.js +6 -2
  258. package/ui/Elements/Pagination/styled.js +6 -6
  259. package/ui/Elements/Select/Select.d.ts +3 -0
  260. package/ui/Elements/Select/Select.js +69 -0
  261. package/ui/Elements/Select/index.d.ts +2 -0
  262. package/ui/Elements/Select/index.js +2 -0
  263. package/ui/Elements/Select/styles.d.ts +5 -0
  264. package/ui/Elements/Select/styles.js +12 -0
  265. package/ui/Elements/Select/themes/CustomComponents.d.ts +9 -0
  266. package/ui/Elements/Select/themes/CustomComponents.js +131 -0
  267. package/ui/Elements/Select/themes/baseStyles.d.ts +28 -0
  268. package/ui/Elements/Select/themes/baseStyles.js +70 -0
  269. package/ui/Elements/Select/themes/formStyles.d.ts +23 -0
  270. package/ui/Elements/Select/themes/formStyles.js +104 -0
  271. package/ui/Elements/Select/themes/headingStyles.d.ts +17 -0
  272. package/ui/Elements/Select/themes/headingStyles.js +99 -0
  273. package/ui/Elements/Select/themes/index.d.ts +3 -0
  274. package/ui/Elements/Select/themes/index.js +61 -0
  275. package/ui/Elements/Select/themes/leftMenuStyles.d.ts +18 -0
  276. package/ui/Elements/Select/themes/leftMenuStyles.js +57 -0
  277. package/ui/Elements/Select/types.d.ts +54 -0
  278. package/ui/Elements/Select/types.js +1 -0
  279. package/ui/Elements/SingleSelect/SingleSelect.d.ts +20 -0
  280. package/ui/Elements/SingleSelect/SingleSelect.js +197 -0
  281. package/ui/Elements/SingleSelect/index.d.ts +2 -0
  282. package/ui/Elements/SingleSelect/index.js +2 -0
  283. package/ui/Forms/Input/types.d.ts +2 -2
  284. package/ui/index.es.js +868 -1104
  285. package/ui/index.umd.js +8 -5
@@ -0,0 +1,36 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
28
+ import styled from '@xstyled/styled-components';
29
+ import MenuList from './components/MenuList';
30
+ import DefaultItem from './components/DefaultItem';
31
+ var StyledDropdownWrap = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: fit-content;\n height: fit-content;\n background-color: white;\n padding: 2;\n display: block;\n border: slim;\n border-color: lightGray2;\n border-radius: 10px;\n box-shadow: dropdownMenuShadow;\n color: red2;\n z-index: 1;\n"], ["\n width: fit-content;\n height: fit-content;\n background-color: white;\n padding: 2;\n display: block;\n border: slim;\n border-color: lightGray2;\n border-radius: 10px;\n box-shadow: dropdownMenuShadow;\n color: red2;\n z-index: 1;\n"])));
32
+ export var DropdownMenu = function (_a) {
33
+ var items = _a.items, showMenu = _a.showMenu, className = _a.className, _b = _a.ItemComponent, ItemComponent = _b === void 0 ? DefaultItem : _b, header = _a.header, footer = _a.footer, rest = __rest(_a, ["items", "showMenu", "className", "ItemComponent", "header", "footer"]);
34
+ return (_jsx(_Fragment, { children: showMenu && (_jsxs(StyledDropdownWrap, __assign({ className: className }, rest, { children: [header ? header : null, _jsx(MenuList, { items: items, ItemComponent: ItemComponent }), footer ? footer : null] }))) }));
35
+ };
36
+ var templateObject_1;
@@ -0,0 +1,3 @@
1
+ import { DefaultItem } from '../types';
2
+ declare const MenuItem: ({ icon, title, hasSeparator }: DefaultItem) => JSX.Element;
3
+ export default MenuItem;
@@ -0,0 +1,16 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import styled, { css } from '@xstyled/styled-components';
7
+ var StyledListItem = styled.li(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 10px;\n font-size: 12px;\n color: typoPrimary;\n font-weight: normal;\n\n :hover {\n background-color: bgLightGray1;\n font-weight: bold;\n cursor: pointer;\n }\n\n ", ";\n"], ["\n padding: 10px;\n font-size: 12px;\n color: typoPrimary;\n font-weight: normal;\n\n :hover {\n background-color: bgLightGray1;\n font-weight: bold;\n cursor: pointer;\n }\n\n ", ";\n"])), function (props) {
8
+ return props.hasSeparator && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-top: slim;\n border-color: lightGray2;\n "], ["\n border-top: slim;\n border-color: lightGray2;\n "])));
9
+ });
10
+ var IconWrap = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-right: 10px;\n"], ["\n margin-right: 10px;\n"])));
11
+ var MenuItem = function (_a) {
12
+ var icon = _a.icon, title = _a.title, hasSeparator = _a.hasSeparator;
13
+ return (_jsxs(StyledListItem, { hasSeparator: hasSeparator, children: [icon && _jsx(IconWrap, { children: icon }), title] }));
14
+ };
15
+ export default MenuItem;
16
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -0,0 +1,3 @@
1
+ import { Item, MenuItemProps } from '../types';
2
+ declare const MenuItem: <ItemType extends Item>({ item, ItemComponent, onClose }: MenuItemProps<ItemType>) => JSX.Element;
3
+ export default MenuItem;
@@ -0,0 +1,51 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { useCallback } from 'react';
18
+ import styled from '@xstyled/styled-components';
19
+ import { useLocation } from 'react-router';
20
+ import Link from '../../Link/Link';
21
+ var StyledLink = styled(Link)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n border-top: ", ";\n padding-top: ", ";\n color: typoPrimary;\n\n :hover > * {\n color: typoPrimary;\n background-color: bgLightGray1;\n border-radius: 6px;\n }\n ", "\n"], ["\n display: block;\n border-top: ", ";\n padding-top: ", ";\n color: typoPrimary;\n\n :hover > * {\n color: typoPrimary;\n background-color: bgLightGray1;\n border-radius: 6px;\n }\n ", "\n"])), function (_a) {
22
+ var $hasSeparator = _a.$hasSeparator;
23
+ return ($hasSeparator ? '1px solid #D2D8DF' : 'none');
24
+ }, function (_a) {
25
+ var $hasSeparator = _a.$hasSeparator;
26
+ return ($hasSeparator ? '4px' : '0');
27
+ }, function (_a) {
28
+ var $isActive = _a.$isActive;
29
+ return $isActive &&
30
+ "\n background-color: red1;\n color: white;\n border-radius: 6px;\n :hover {\n & svg {\n stroke: typoPrimary;\n }\n }\n & svg {\n stroke: white;\n }\n }\n";
31
+ });
32
+ var MenuItem = function (_a) {
33
+ var item = _a.item, ItemComponent = _a.ItemComponent, onClose = _a.onClose;
34
+ var onClick = item.onClick, link = item.link, hasSeparator = item.hasSeparator, name = item.name, autoClose = item.autoClose;
35
+ var location = useLocation();
36
+ var isActive = link === location.pathname;
37
+ var onClickCallback = useCallback(function (e) {
38
+ if (onClick) {
39
+ e.preventDefault();
40
+ onClick();
41
+ }
42
+ if (autoClose && onClose) {
43
+ setTimeout(function () {
44
+ onClose();
45
+ }, 200);
46
+ }
47
+ }, [autoClose, onClick, onClose]);
48
+ return (_jsx(StyledLink, { to: link, "$isActive": isActive, onClick: onClickCallback, "$hasSeparator": !!hasSeparator, "data-cy": name, size: "inherit", children: _jsx(ItemComponent, __assign({}, item)) }));
49
+ };
50
+ export default MenuItem;
51
+ var templateObject_1;
@@ -0,0 +1,3 @@
1
+ import { Item, MenuItems } from '../types';
2
+ declare const MenuList: <ItemType extends Item>({ items, ItemComponent, onClose }: MenuItems<ItemType>) => JSX.Element;
3
+ export default MenuList;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import MenuItem from './MenuItem';
3
+ var MenuList = function (_a) {
4
+ var items = _a.items, ItemComponent = _a.ItemComponent, onClose = _a.onClose;
5
+ return (_jsx("ul", { children: items &&
6
+ items.map(function (item, i) {
7
+ return !item.hidden && _jsx(MenuItem, { item: item, ItemComponent: ItemComponent, onClose: onClose }, i);
8
+ }) }));
9
+ };
10
+ export default MenuList;
@@ -0,0 +1 @@
1
+ export { DropdownMenu as default } from './DropdownMenu';
@@ -0,0 +1 @@
1
+ export { DropdownMenu as default } from './DropdownMenu';
@@ -0,0 +1,41 @@
1
+ import { Ref } from 'react';
2
+ export type Pathname = {
3
+ pathname: string;
4
+ };
5
+ export type DefaultItem = {
6
+ icon?: React.ReactNode;
7
+ title?: string | JSX.Element;
8
+ link?: string | Pathname;
9
+ onClick?: Function;
10
+ hasSeparator?: boolean;
11
+ hidden?: boolean;
12
+ count?: number;
13
+ autoClose?: boolean;
14
+ };
15
+ export type Item = {
16
+ link?: string | Pathname;
17
+ onClick?: Function;
18
+ hasSeparator?: boolean;
19
+ name?: string;
20
+ autoClose?: boolean;
21
+ hidden?: boolean;
22
+ };
23
+ export type MenuItemProps<ItemType extends Item> = {
24
+ item: ItemType;
25
+ ItemComponent: React.ComponentType<Omit<ItemType, 'onClick' | 'link'>>;
26
+ onClose?: Function;
27
+ };
28
+ export type MenuItems<ItemType extends Item> = {
29
+ items?: ItemType[];
30
+ ItemComponent: React.ComponentType<Omit<ItemType, 'onClick' | 'link'>>;
31
+ onClose?: Function;
32
+ };
33
+ export type DropdownMenuProps<ItemType extends Item = DefaultItem> = {
34
+ showMenu?: boolean;
35
+ className?: string;
36
+ childRef?: Ref<any>;
37
+ items?: ItemType[];
38
+ ItemComponent?: React.ComponentType<Omit<ItemType, 'onClick' | 'link'>>;
39
+ header?: React.ReactNode;
40
+ footer?: React.ReactNode;
41
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ export type FlagAppearanceType = 'neutralBold' | 'neutralSubtle' | 'blueBold' | 'blueSubtle' | 'tealBold' | 'tealSubtle' | 'greenBold' | 'greenSubtle' | 'orangeBold' | 'orangeSubtle' | 'yellowBold' | 'yellowSubtle' | 'pinkBold' | 'pinkSubtle' | 'purpleBold' | 'purpleSubtle' | 'redBold' | 'redSubtle';
3
+ export declare const flagAppearanceToColorMap: {
4
+ neutralBold: string;
5
+ neutralSubtle: string;
6
+ blueBold: string;
7
+ blueSubtle: string;
8
+ tealBold: string;
9
+ tealSubtle: string;
10
+ greenBold: string;
11
+ greenSubtle: string;
12
+ orangeBold: string;
13
+ orangeSubtle: string;
14
+ yellowBold: string;
15
+ yellowSubtle: string;
16
+ pinkBold: string;
17
+ pinkSubtle: string;
18
+ purpleBold: string;
19
+ purpleSubtle: string;
20
+ redBold: string;
21
+ redSubtle: string;
22
+ };
23
+ export declare const flagAppearanceToFontColorMap: {
24
+ neutralBold: string;
25
+ neutralSubtle: string;
26
+ blueBold: string;
27
+ blueSubtle: string;
28
+ tealBold: string;
29
+ tealSubtle: string;
30
+ greenBold: string;
31
+ greenSubtle: string;
32
+ orangeBold: string;
33
+ orangeSubtle: string;
34
+ yellowBold: string;
35
+ yellowSubtle: string;
36
+ pinkBold: string;
37
+ pinkSubtle: string;
38
+ purpleBold: string;
39
+ purpleSubtle: string;
40
+ redBold: string;
41
+ redSubtle: string;
42
+ };
43
+ type HighlightBoxType = {
44
+ children: React.ReactNode;
45
+ appearance: FlagAppearanceType;
46
+ size?: 'default' | 'small' | 'wide' | 'fitContent';
47
+ prefix?: string;
48
+ };
49
+ declare const HighlightBox: ({ children, appearance, size, prefix }: HighlightBoxType) => JSX.Element;
50
+ export default HighlightBox;
@@ -0,0 +1,65 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import styled, { useTheme } from '@xstyled/styled-components';
7
+ import { th } from '@xstyled/system';
8
+ var StyledHighlightBox = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n border-radius: ml;\n font-size: 12px;\n text-align: center;\n line-height: 19.2px;\n min-width: 0;\n font-weight: semiBold;\n .default {\n height: 24px;\n padding: 2px 8px;\n }\n .small {\n height: 18px;\n padding: 1px 6px;\n }\n .wide {\n height: 2.75em;\n display: flex;\n flex-flow: row wrap;\n width: 11rem;\n align-content: center;\n line-height: 14px;\n padding: 0.5px 12px;\n }\n .fitContent {\n width: fit-content;\n height: auto;\n padding: 4px 5px;\n font-size: 13px;\n line-height: 15px;\n font-weight: 400;\n }\n background-color: ", ";\n color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n border-radius: ml;\n font-size: 12px;\n text-align: center;\n line-height: 19.2px;\n min-width: 0;\n font-weight: semiBold;\n .default {\n height: 24px;\n padding: 2px 8px;\n }\n .small {\n height: 18px;\n padding: 1px 6px;\n }\n .wide {\n height: 2.75em;\n display: flex;\n flex-flow: row wrap;\n width: 11rem;\n align-content: center;\n line-height: 14px;\n padding: 0.5px 12px;\n }\n .fitContent {\n width: fit-content;\n height: auto;\n padding: 4px 5px;\n font-size: 13px;\n line-height: 15px;\n font-weight: 400;\n }\n background-color: ", ";\n color: ", ";\n"])), function (_a) {
9
+ var $bgcolor = _a.$bgcolor;
10
+ return $bgcolor;
11
+ }, function (_a) {
12
+ var $fontColor = _a.$fontColor;
13
+ return $fontColor;
14
+ });
15
+ var OverflowWrap = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-overflow: ellipsis;\n overflow: hidden;\n"], ["\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
16
+ export var flagAppearanceToColorMap = {
17
+ neutralBold: 'neutral300',
18
+ neutralSubtle: 'neutral20',
19
+ blueBold: 'blue70',
20
+ blueSubtle: 'blue20',
21
+ tealBold: 'teal60',
22
+ tealSubtle: 'teal20',
23
+ greenBold: 'green60',
24
+ greenSubtle: 'green20',
25
+ orangeBold: 'orange60',
26
+ orangeSubtle: 'orange20',
27
+ yellowBold: 'yellow60',
28
+ yellowSubtle: 'yellow20',
29
+ pinkBold: 'magenta60',
30
+ pinkSubtle: 'magenta20',
31
+ purpleBold: 'purple60',
32
+ purpleSubtle: 'purple20',
33
+ redBold: 'red60',
34
+ redSubtle: 'red20',
35
+ };
36
+ export var flagAppearanceToFontColorMap = {
37
+ neutralBold: 'white',
38
+ neutralSubtle: 'typoPrimary',
39
+ blueBold: 'white',
40
+ blueSubtle: 'blue80',
41
+ tealBold: 'white',
42
+ tealSubtle: 'teal90',
43
+ greenBold: 'white',
44
+ greenSubtle: 'green80',
45
+ orangeBold: 'white',
46
+ orangeSubtle: 'orange80',
47
+ yellowBold: 'typoPrimary',
48
+ yellowSubtle: 'typoPrimary',
49
+ pinkBold: 'white',
50
+ pinkSubtle: 'magenta80',
51
+ purpleBold: 'white',
52
+ purpleSubtle: 'purple80',
53
+ redBold: 'white',
54
+ redSubtle: 'red80',
55
+ };
56
+ var HighlightBox = function (_a) {
57
+ var children = _a.children, appearance = _a.appearance, _b = _a.size, size = _b === void 0 ? 'default' : _b, prefix = _a.prefix;
58
+ var theme = useTheme();
59
+ var bgColor = th.color(appearance ? flagAppearanceToColorMap[appearance] : 'transparent')({ theme: theme });
60
+ var fontColor = th.color(appearance ? flagAppearanceToFontColorMap[appearance] : 'typoPrimary')({ theme: theme });
61
+ var name = !!prefix ? "".concat(prefix, "Label") : 'label';
62
+ return (_jsx(StyledHighlightBox, { "$bgcolor": bgColor, "$fontColor": fontColor, "data-cy": name, children: _jsx(OverflowWrap, { className: size, children: children }) }));
63
+ };
64
+ export default HighlightBox;
65
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,2 @@
1
+ import HighlightBox from './HighlightBox';
2
+ export default HighlightBox;
@@ -0,0 +1,2 @@
1
+ import HighlightBox from './HighlightBox';
2
+ export default HighlightBox;
@@ -0,0 +1,6 @@
1
+ import { SelectProps } from '../Select/types';
2
+ type Props = {
3
+ checkAllButton?: boolean;
4
+ } & Omit<SelectProps, 'isMulti'>;
5
+ declare const SelectFilter: ({ checkAllButton, ...restProps }: Props) => JSX.Element;
6
+ export default SelectFilter;
@@ -0,0 +1,29 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import Select from '../Select';
25
+ var SelectFilter = function (_a) {
26
+ var checkAllButton = _a.checkAllButton, restProps = __rest(_a, ["checkAllButton"]);
27
+ return (_jsx(Select, __assign({}, restProps, { optionVariant: "checkbox", multiLabelVariant: "count", isMulti: true, showSelectAllButton: checkAllButton })));
28
+ };
29
+ export default SelectFilter;
@@ -0,0 +1,2 @@
1
+ import MultiSelect from './MultiSelect';
2
+ export default MultiSelect;
@@ -0,0 +1,2 @@
1
+ import MultiSelect from './MultiSelect';
2
+ export default MultiSelect;
@@ -2,7 +2,7 @@ export type Props = {
2
2
  page?: number;
3
3
  itemCount?: number;
4
4
  itemPerPage?: number;
5
- onPageChange?: (number: number) => void;
5
+ onPageChange?: (number: number, rows: number) => void;
6
6
  };
7
7
  declare const Pagination: ({ onPageChange, itemPerPage, itemCount, page }: Props) => JSX.Element;
8
8
  export default Pagination;
@@ -5,9 +5,9 @@ var Pagination = function (_a) {
5
5
  var onPageChange = _a.onPageChange, itemPerPage = _a.itemPerPage, itemCount = _a.itemCount, page = _a.page;
6
6
  var setPage = useCallback(function (number) { return function () {
7
7
  if (onPageChange) {
8
- onPageChange(number);
8
+ onPageChange(number, itemPerPage);
9
9
  }
10
- }; }, [onPageChange]);
10
+ }; }, [itemPerPage, onPageChange]);
11
11
  var pageX = page !== null && page !== void 0 ? page : 1;
12
12
  var pageCount = Math.max(Math.ceil((itemCount !== null && itemCount !== void 0 ? itemCount : 0) / (itemPerPage !== null && itemPerPage !== void 0 ? itemPerPage : 3)), 1);
13
13
  var arrayOfPages = useMemo(function () {
@@ -25,6 +25,10 @@ var Pagination = function (_a) {
25
25
  else if (pageX > pageCount - 4) {
26
26
  return pageNumbers.slice(pageCount - 5, pageCount - 1);
27
27
  }
28
+ else if (window.innerWidth < 768) {
29
+ // display dispersion of 1 chars from current page (part between dots)
30
+ return pageNumbers.slice(pageX - 2, pageX + 1);
31
+ }
28
32
  else {
29
33
  // display dispersion of 2 chars from current page (part between dots)
30
34
  return pageNumbers.slice(pageX - 3, pageX + 2);
@@ -3,9 +3,9 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import styled, { x } from '@xstyled/styled-components';
6
- import { th } from '@xstyled/styled-components';
7
- import { Icon } from '../Icon';
8
- export var Wrapper = styled(x.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n\n & > *:not(:last-child) {\n margin-right: 4px;\n }\n"], ["\n display: inline-flex;\n align-items: center;\n\n & > *:not(:last-child) {\n margin-right: 4px;\n }\n"])));
6
+ import { th } from '@xstyled/system';
7
+ import Icon from '../Icon';
8
+ export var Wrapper = styled(x.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n\n & > *:not(:last-child) {\n margin-right: 1px;\n @media (min-width: 1024px) {\n margin-right: 4px;\n }\n }\n"], ["\n display: inline-flex;\n align-items: center;\n\n & > *:not(:last-child) {\n margin-right: 1px;\n @media (min-width: 1024px) {\n margin-right: 4px;\n }\n }\n"])));
9
9
  export var Btn = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: transparent;\n border: none;\n cursor: ", ";\n opacity: ", ";\n"], ["\n background-color: transparent;\n border: none;\n cursor: ", ";\n opacity: ", ";\n"])), function (_a) {
10
10
  var disabled = _a.disabled;
11
11
  return (disabled ? 'default' : 'pointer');
@@ -13,14 +13,14 @@ export var Btn = styled.button(templateObject_2 || (templateObject_2 = __makeTem
13
13
  var disabled = _a.disabled;
14
14
  return (disabled ? 0 : 1);
15
15
  });
16
- export var ArrowIcon = styled(Icon)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 50%;\n aspect-ratio: 1 / 1;\n width: 16px;\n display: flex;\n align-items: center;\n color: gray1;\n\n &:hover {\n color: blue2;\n }\n"], ["\n border-radius: 50%;\n aspect-ratio: 1 / 1;\n width: 16px;\n display: flex;\n align-items: center;\n color: gray1;\n\n &:hover {\n color: blue2;\n }\n"])));
17
- export var GoIcon = styled(ArrowIcon)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin: 0 8px;\n font-size: 11px;\n & > svg {\n width: 10px;\n }\n"], ["\n margin: 0 8px;\n font-size: 11px;\n & > svg {\n width: 10px;\n }\n"])));
16
+ export var ArrowIcon = styled(Icon)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 50%;\n aspect-ratio: 1 / 1;\n width: 16px;\n display: flex;\n align-items: center;\n color: blue2;\n\n &:hover {\n color: blue2;\n }\n"], ["\n border-radius: 50%;\n aspect-ratio: 1 / 1;\n width: 16px;\n display: flex;\n align-items: center;\n color: blue2;\n\n &:hover {\n color: blue2;\n }\n"])));
17
+ export var GoIcon = styled(ArrowIcon)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin: 0 8px;\n font-size: 12px;\n & > svg {\n width: 10px;\n }\n"], ["\n margin: 0 8px;\n font-size: 12px;\n & > svg {\n width: 10px;\n }\n"])));
18
18
  export var DotsWrapper = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: gray1;\n"], ["\n color: gray1;\n"])));
19
19
  export var PageBtn = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n height: 18px;\n min-width: 18px;\n display: flex;\n border-radius: 50%;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin: 0 4px;\n color: ", ";\n font-size: 14px;\n font-weight: ", ";\n font-family: ", ";\n line-height: 1em;\n\n &:hover {\n color: blue2;\n }\n"], ["\n height: 18px;\n min-width: 18px;\n display: flex;\n border-radius: 50%;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin: 0 4px;\n color: ", ";\n font-size: 14px;\n font-weight: ", ";\n font-family: ", ";\n line-height: 1em;\n\n &:hover {\n color: blue2;\n }\n"])), function (_a) {
20
20
  var isCurrent = _a.isCurrent;
21
21
  return (isCurrent ? th.color('red1') : th.color('gray1'));
22
22
  }, function (_a) {
23
23
  var isCurrent = _a.isCurrent;
24
- return (isCurrent ? th.fontWeight('semiBold') : th.fontWeight('medium'));
24
+ return (isCurrent ? th.fontWeight('semiBold') : th.fontWeight('normal'));
25
25
  }, th('fonts.primary'));
26
26
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -0,0 +1,3 @@
1
+ import { SelectProps } from './types';
2
+ declare const Select: ({ label, name, value, options, defaultOptions, loadOptions, onChange, onBlur, error, isInvalid, isLoading, isDarkPlaceholderText, spaceAround, disabled, onInputChange, isSearchable, isMulti, className, useSimplifiedOptions, showSelectAllButton, showResetGridButton, style, optionVariant, multiLabelVariant, containerVariant, placeholder, placeholderIcon, innerRef, maxMenuHeight, getOptionValue, resetGrid, ...passTroughProps }: SelectProps) => JSX.Element;
3
+ export default Select;
@@ -0,0 +1,69 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { useCallback, useMemo } from 'react';
25
+ import { Wrapper, StyledReactSelect, StyledAsyncSelect } from './styles';
26
+ import { useStylesAndComponents } from './themes';
27
+ import { useTheme } from '@xstyled/styled-components';
28
+ import { t } from '@lingui/macro';
29
+ import SpaceAroundWrap from '../SpaceAround';
30
+ import { FieldLabel } from '../Label';
31
+ import { ErrorMessage } from '../ErrorMessage';
32
+ var emptyOptions = [];
33
+ var noOptionsMessage = function () { return t({ id: 'select.noOptions', message: 'no options' }); };
34
+ var loadingMessage = function () { return t({ id: 'components.dropdown.loading', message: 'Loading...' }); };
35
+ var Select = function (_a) {
36
+ var label = _a.label, name = _a.name, _b = _a.value, value = _b === void 0 ? '' : _b, _c = _a.options, options = _c === void 0 ? emptyOptions : _c, defaultOptions = _a.defaultOptions, loadOptions = _a.loadOptions, onChange = _a.onChange, onBlur = _a.onBlur, error = _a.error, isInvalid = _a.isInvalid, isLoading = _a.isLoading, isDarkPlaceholderText = _a.isDarkPlaceholderText, _d = _a.spaceAround, spaceAround = _d === void 0 ? false : _d, disabled = _a.disabled, onInputChange = _a.onInputChange, isSearchable = _a.isSearchable, isMulti = _a.isMulti, className = _a.className, _e = _a.useSimplifiedOptions, useSimplifiedOptions = _e === void 0 ? false : _e, _f = _a.showSelectAllButton, showSelectAllButton = _f === void 0 ? false : _f, _g = _a.showResetGridButton, showResetGridButton = _g === void 0 ? false : _g, style = _a.style, optionVariant = _a.optionVariant, multiLabelVariant = _a.multiLabelVariant, containerVariant = _a.containerVariant, placeholder = _a.placeholder, placeholderIcon = _a.placeholderIcon, innerRef = _a.innerRef, maxMenuHeight = _a.maxMenuHeight, getOptionValue = _a.getOptionValue, resetGrid = _a.resetGrid, passTroughProps = __rest(_a, ["label", "name", "value", "options", "defaultOptions", "loadOptions", "onChange", "onBlur", "error", "isInvalid", "isLoading", "isDarkPlaceholderText", "spaceAround", "disabled", "onInputChange", "isSearchable", "isMulti", "className", "useSimplifiedOptions", "showSelectAllButton", "showResetGridButton", "style", "optionVariant", "multiLabelVariant", "containerVariant", "placeholder", "placeholderIcon", "innerRef", "maxMenuHeight", "getOptionValue", "resetGrid"]);
37
+ var isAsync = !!loadOptions;
38
+ if (showSelectAllButton && (loadOptions || !isMulti)) {
39
+ console.error('CheckboxSelect incompatible props');
40
+ }
41
+ var setAllOptions = useCallback(function () {
42
+ onChange === null || onChange === void 0 ? void 0 : onChange((options || []));
43
+ }, [onChange, options]);
44
+ var unsetAllOptions = useCallback(function () {
45
+ if (typeof onChange === 'function') {
46
+ onChange === null || onChange === void 0 ? void 0 : onChange(emptyOptions);
47
+ }
48
+ }, [onChange]);
49
+ var icon = containerVariant === 'search' ? 'search' : placeholderIcon ? placeholderIcon : undefined;
50
+ var modifiedMaxMenuHeight = showResetGridButton && showSelectAllButton && maxMenuHeight ? maxMenuHeight - 30 : maxMenuHeight;
51
+ var _h = useStylesAndComponents(style, optionVariant, multiLabelVariant, containerVariant, useSimplifiedOptions, showSelectAllButton, showResetGridButton), customComponents = _h[0], customTheme = _h[1], customStyles = _h[2];
52
+ var RenderComponent = isAsync ? StyledAsyncSelect : StyledReactSelect;
53
+ var selectedOption;
54
+ var localGetOptionValue = useMemo(function () { return getOptionValue || (function (option) { return option === null || option === void 0 ? void 0 : option.value; }); }, [getOptionValue]);
55
+ if (Array.isArray(value)) {
56
+ selectedOption = (defaultOptions || options).filter(function (option) { return value.includes(localGetOptionValue(option)); });
57
+ selectedOption = (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.length) ? selectedOption : null;
58
+ }
59
+ else if (value !== undefined) {
60
+ selectedOption = (defaultOptions || options).find(function (option) { return localGetOptionValue(option) === value; }) || null;
61
+ }
62
+ var theme = useTheme();
63
+ // strip extra params
64
+ var handleLoadOptions = useMemo(function () {
65
+ return loadOptions ? function (fulltext) { return loadOptions(fulltext); } : undefined;
66
+ }, [loadOptions]);
67
+ return (_jsxs(SpaceAroundWrap, { spaceAround: spaceAround, className: className, children: [_jsxs(Wrapper, { children: [label && _jsx(FieldLabel, { htmlFor: name, children: label }), _jsx(RenderComponent, __assign({ id: name, name: name, options: options, loadOptions: handleLoadOptions, defaultOptions: defaultOptions, value: selectedOption, onChange: onChange, onBlur: onBlur, isDisabled: disabled || isLoading, isLoading: isLoading, isInvalid: isInvalid !== undefined ? isInvalid : !!error, isDarkPlaceholderText: isDarkPlaceholderText, placeholder: placeholder || t({ id: 'components.dropdown.placeholder', message: 'Select...' }), styles: customStyles, theme: customTheme, icon: icon, hideSelectedOptions: !!(isMulti && multiLabelVariant != 'count'), onInputChange: onInputChange, isSearchable: isAsync || isSearchable, isMulti: isMulti, classNamePrefix: "react-select", components: customComponents, closeMenuOnSelect: isMulti ? false : undefined }, passTroughProps, { ref: innerRef, tabIndex: null, systemTheme: theme, resetGrid: resetGrid, onCustomSelectAll: setAllOptions, onCustomDeselectAll: unsetAllOptions, selectAllButton: showSelectAllButton, resetGridButton: showResetGridButton, maxMenuHeight: modifiedMaxMenuHeight, getOptionValue: getOptionValue, noOptionsMessage: noOptionsMessage, loadingMessage: loadingMessage }))] }), error && _jsx(ErrorMessage, { children: error })] }));
68
+ };
69
+ export default Select;
@@ -0,0 +1,2 @@
1
+ import Select from './Select';
2
+ export default Select;
@@ -0,0 +1,2 @@
1
+ import Select from './Select';
2
+ export default Select;
@@ -0,0 +1,5 @@
1
+ import ReactSelect from 'react-select';
2
+ import AsyncSelect from 'react-select/async';
3
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
4
+ export declare const StyledReactSelect: import("styled-components").StyledComponent<ReactSelect, import("@xstyled/system").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, never>;
5
+ export declare const StyledAsyncSelect: import("styled-components").StyledComponent<AsyncSelect, import("@xstyled/system").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, never>;
@@ -0,0 +1,12 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import styled from '@xstyled/styled-components';
6
+ import ReactSelect from 'react-select';
7
+ import AsyncSelect from 'react-select/async';
8
+ import { system } from '@xstyled/system';
9
+ export var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
10
+ export var StyledReactSelect = styled(ReactSelect)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n font-size: 14px;\n"], ["\n ", ";\n font-size: 14px;\n"])), system);
11
+ export var StyledAsyncSelect = styled(AsyncSelect)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", ";\n font-size: 14px;\n"], ["\n ", ";\n font-size: 14px;\n"])), system);
12
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare const SimplifiedOption: React.MemoExoticComponent<(props: any) => any>;
3
+ export declare const IconValueContainer: (props: any) => any;
4
+ export declare const CountMultiValue: (props: any) => any;
5
+ export declare const ChevronOption: (props: any) => any;
6
+ export declare const HighlightOption: (props: any) => any;
7
+ export declare const ConnectedMenu: (props: any) => any;
8
+ export declare const CustomInput: (props: any) => any;
9
+ export declare const DropdownIndicator: (props: any) => any;