@mailstep/design-system 0.5.1-beta.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/package.json +40 -20
  2. package/ui/Blocks/CommonGrid/CommonGrid.d.ts +5 -2
  3. package/ui/Blocks/CommonGrid/CommonGrid.js +12 -22
  4. package/ui/Blocks/CommonGrid/CommonGridContainer.d.ts +3 -0
  5. package/ui/Blocks/CommonGrid/CommonGridContainer.js +66 -0
  6. package/ui/Blocks/CommonGrid/StandardButtons.d.ts +4 -0
  7. package/ui/Blocks/CommonGrid/StandardButtons.js +36 -0
  8. package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.d.ts +12 -0
  9. package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +50 -0
  10. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.d.ts +11 -0
  11. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +18 -0
  12. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.d.ts +12 -0
  13. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +45 -0
  14. package/ui/Blocks/CommonGrid/components/ActionHead/index.d.ts +2 -0
  15. package/ui/Blocks/CommonGrid/components/ActionHead/index.js +2 -0
  16. package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.d.ts +6 -0
  17. package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.js +37 -0
  18. package/ui/Blocks/CommonGrid/components/BooleanSelect/index.d.ts +2 -0
  19. package/ui/Blocks/CommonGrid/components/BooleanSelect/index.js +2 -0
  20. package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.d.ts +13 -0
  21. package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +32 -0
  22. package/ui/Blocks/CommonGrid/components/ButtonMore/index.d.ts +2 -0
  23. package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +2 -0
  24. package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +1 -1
  25. package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.d.ts +5 -0
  26. package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +58 -0
  27. package/ui/Blocks/CommonGrid/components/ColumnTitle/index.d.ts +2 -0
  28. package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +2 -0
  29. package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.d.ts +11 -0
  30. package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +20 -0
  31. package/ui/Blocks/CommonGrid/components/ControlButtons/index.d.ts +2 -0
  32. package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +2 -0
  33. package/ui/Blocks/CommonGrid/components/DataRow.js +4 -4
  34. package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.d.ts +12 -0
  35. package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.js +113 -0
  36. package/ui/Blocks/CommonGrid/components/DatePickerRange/index.d.ts +2 -0
  37. package/ui/Blocks/CommonGrid/components/DatePickerRange/index.js +2 -0
  38. package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.d.ts +1 -0
  39. package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.js +3 -0
  40. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.d.ts +8 -0
  41. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +43 -0
  42. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.d.ts +2 -0
  43. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +2 -0
  44. package/ui/Blocks/CommonGrid/components/FilterRow.js +2 -3
  45. package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.d.ts +7 -0
  46. package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +46 -0
  47. package/ui/Blocks/CommonGrid/components/FloatingButton/index.d.ts +2 -0
  48. package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +2 -0
  49. package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.d.ts +10 -0
  50. package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.js +19 -0
  51. package/ui/Blocks/CommonGrid/components/GridSelect/index.d.ts +2 -0
  52. package/ui/Blocks/CommonGrid/components/GridSelect/index.js +2 -0
  53. package/ui/Blocks/CommonGrid/components/HeadCell.js +1 -4
  54. package/ui/Blocks/CommonGrid/components/IconList/IconList.d.ts +18 -0
  55. package/ui/Blocks/CommonGrid/components/IconList/IconList.js +29 -0
  56. package/ui/Blocks/CommonGrid/components/IconList/index.d.ts +2 -0
  57. package/ui/Blocks/CommonGrid/components/IconList/index.js +2 -0
  58. package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.d.ts +11 -0
  59. package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +20 -0
  60. package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.d.ts +12 -0
  61. package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +47 -0
  62. package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.d.ts +2 -0
  63. package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +2 -0
  64. package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.d.ts +3 -0
  65. package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.js +76 -0
  66. package/ui/Blocks/CommonGrid/components/NumberRange/index.d.ts +2 -0
  67. package/ui/Blocks/CommonGrid/components/NumberRange/index.js +2 -0
  68. package/ui/Blocks/CommonGrid/components/NumberRange/types.d.ts +17 -0
  69. package/ui/Blocks/CommonGrid/components/NumberRange/types.js +1 -0
  70. package/ui/Blocks/CommonGrid/components/OversizedScroll.js +1 -4
  71. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.d.ts +6 -0
  72. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.js +26 -0
  73. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.d.ts +2 -0
  74. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.js +2 -0
  75. package/ui/Blocks/CommonGrid/components/Table.d.ts +0 -6
  76. package/ui/Blocks/CommonGrid/components/Table.js +0 -5
  77. package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.d.ts +8 -0
  78. package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +32 -0
  79. package/ui/Blocks/CommonGrid/components/TablePagination/index.d.ts +2 -0
  80. package/ui/Blocks/CommonGrid/components/TablePagination/index.js +2 -0
  81. package/ui/Blocks/CommonGrid/components/TextRange/TextRange.d.ts +4 -0
  82. package/ui/Blocks/CommonGrid/components/TextRange/TextRange.js +89 -0
  83. package/ui/Blocks/CommonGrid/components/TextRange/index.d.ts +2 -0
  84. package/ui/Blocks/CommonGrid/components/TextRange/index.js +2 -0
  85. package/ui/Blocks/CommonGrid/components/TextRange/types.d.ts +21 -0
  86. package/ui/Blocks/CommonGrid/components/TextRange/types.js +1 -0
  87. package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.d.ts +5 -0
  88. package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +22 -0
  89. package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.d.ts +4 -0
  90. package/ui/Blocks/CommonGrid/components/{icons/ArrowSimple.js → gridCells/ButtonInCell.js} +4 -2
  91. package/ui/Blocks/CommonGrid/components/gridCells/Date.d.ts +4 -0
  92. package/ui/Blocks/CommonGrid/components/gridCells/Date.js +8 -0
  93. package/ui/Blocks/CommonGrid/components/gridCells/DateTime.d.ts +4 -0
  94. package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +13 -0
  95. package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.d.ts +9 -0
  96. package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +33 -0
  97. package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.d.ts +4 -0
  98. package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +18 -0
  99. package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.d.ts +9 -0
  100. package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +15 -0
  101. package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.d.ts +6 -0
  102. package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +23 -0
  103. package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.d.ts +1 -0
  104. package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +8 -0
  105. package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.d.ts +5 -0
  106. package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +24 -0
  107. package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.d.ts +7 -0
  108. package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +30 -0
  109. package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.d.ts +4 -0
  110. package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +7 -0
  111. package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.d.ts +2 -0
  112. package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +16 -0
  113. package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.d.ts +7 -0
  114. package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.js +30 -0
  115. package/ui/Blocks/CommonGrid/components/gridCells/index.d.ts +14 -0
  116. package/ui/Blocks/CommonGrid/components/gridCells/index.js +14 -0
  117. package/ui/Blocks/CommonGrid/hooks/useAddFilter.d.ts +4 -0
  118. package/ui/Blocks/CommonGrid/hooks/useAddFilter.js +14 -0
  119. package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.d.ts +15 -0
  120. package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +70 -0
  121. package/ui/Blocks/CommonGrid/hooks/useFloatingButton.d.ts +3 -0
  122. package/ui/Blocks/CommonGrid/hooks/useFloatingButton.js +13 -0
  123. package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.d.ts +7 -0
  124. package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +33 -0
  125. package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.d.ts +8 -0
  126. package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.js +25 -0
  127. package/ui/Blocks/CommonGrid/hooks/useManageColumn.d.ts +19 -0
  128. package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +34 -0
  129. package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.d.ts +8 -0
  130. package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.js +15 -0
  131. package/ui/Blocks/CommonGrid/index.d.ts +8 -6
  132. package/ui/Blocks/CommonGrid/index.js +8 -8
  133. package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +4 -4
  134. package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +3 -2
  135. package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +3 -2
  136. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +3 -3
  137. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +3 -3
  138. package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +2 -2
  139. package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +3 -3
  140. package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +2 -1
  141. package/ui/Blocks/CommonGrid/storybook/utils/linguiContainer.d.ts +1 -0
  142. package/ui/Blocks/CommonGrid/storybook/utils/linguiContainer.js +8 -0
  143. package/ui/Blocks/CommonGrid/storybook/utils/utils.js +1 -1
  144. package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +1 -17
  145. package/ui/Blocks/CommonGrid/styles.d.ts +14 -0
  146. package/ui/Blocks/CommonGrid/styles.js +33 -0
  147. package/ui/Blocks/CommonGrid/translations.d.ts +1 -0
  148. package/ui/Blocks/CommonGrid/translations.js +6 -0
  149. package/ui/Blocks/CommonGrid/types.d.ts +29 -15
  150. package/ui/Blocks/CommonGrid/utils/index.d.ts +4 -1
  151. package/ui/Blocks/CommonGrid/utils/index.js +19 -0
  152. package/ui/Blocks/HidePrint/HidePrint.d.ts +6 -0
  153. package/ui/Blocks/HidePrint/HidePrint.js +13 -0
  154. package/ui/Blocks/Popover/index.d.ts +12 -0
  155. package/ui/Blocks/Popover/index.js +21 -0
  156. package/ui/Elements/DatePicker/DatePicker.d.ts +20 -0
  157. package/ui/Elements/DatePicker/DatePicker.js +65 -0
  158. package/ui/Elements/DatePicker/Datetime/DateTime.d.ts +95 -0
  159. package/ui/Elements/DatePicker/Datetime/DateTime.js +516 -0
  160. package/ui/Elements/DatePicker/Datetime/components/Timepicker.d.ts +8 -0
  161. package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +57 -0
  162. package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.d.ts +9 -0
  163. package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +16 -0
  164. package/ui/Elements/DatePicker/Datetime/types.d.ts +61 -0
  165. package/ui/Elements/DatePicker/Datetime/types.js +7 -0
  166. package/ui/Elements/DatePicker/Datetime/views/DaysView.d.ts +14 -0
  167. package/ui/Elements/DatePicker/Datetime/views/DaysView.js +145 -0
  168. package/ui/Elements/DatePicker/Datetime/views/MonthsView.d.ts +10 -0
  169. package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +111 -0
  170. package/ui/Elements/DatePicker/Datetime/views/YearsView.d.ts +15 -0
  171. package/ui/Elements/DatePicker/Datetime/views/YearsView.js +117 -0
  172. package/ui/Elements/DatePicker/index.d.ts +2 -0
  173. package/ui/Elements/DatePicker/index.js +2 -0
  174. package/ui/Elements/DatePicker/styles.d.ts +2 -0
  175. package/ui/Elements/DatePicker/styles.js +8 -0
  176. package/ui/Elements/DropdownMenu/DropdownMenu.d.ts +2 -0
  177. package/ui/Elements/DropdownMenu/DropdownMenu.js +36 -0
  178. package/ui/Elements/DropdownMenu/components/DefaultItem.d.ts +3 -0
  179. package/ui/Elements/DropdownMenu/components/DefaultItem.js +16 -0
  180. package/ui/Elements/DropdownMenu/components/MenuItem.d.ts +3 -0
  181. package/ui/Elements/DropdownMenu/components/MenuItem.js +51 -0
  182. package/ui/Elements/DropdownMenu/components/MenuList.d.ts +3 -0
  183. package/ui/Elements/DropdownMenu/components/MenuList.js +10 -0
  184. package/ui/Elements/DropdownMenu/index.d.ts +1 -0
  185. package/ui/Elements/DropdownMenu/index.js +1 -0
  186. package/ui/Elements/DropdownMenu/types.d.ts +41 -0
  187. package/ui/Elements/DropdownMenu/types.js +1 -0
  188. package/ui/Elements/DropdownSelect/DropdownSelect.d.ts +21 -0
  189. package/ui/Elements/DropdownSelect/DropdownSelect.js +47 -0
  190. package/ui/Elements/DropdownSelect/index.d.ts +4 -0
  191. package/ui/Elements/DropdownSelect/index.js +3 -0
  192. package/ui/Elements/HighlightBox/HighlightBox.d.ts +50 -0
  193. package/ui/Elements/HighlightBox/HighlightBox.js +65 -0
  194. package/ui/Elements/HighlightBox/index.d.ts +2 -0
  195. package/ui/Elements/HighlightBox/index.js +2 -0
  196. package/ui/Elements/Icon/icons/Company.d.ts +3 -0
  197. package/ui/Elements/Icon/icons/Company.js +13 -0
  198. package/ui/Elements/Icon/icons/Integrations.d.ts +3 -0
  199. package/ui/Elements/Icon/icons/Integrations.js +13 -0
  200. package/ui/Elements/Icon/icons/ShoppingBag.d.ts +3 -0
  201. package/ui/Elements/Icon/icons/ShoppingBag.js +13 -0
  202. package/ui/Elements/Icon/icons/Truck.d.ts +3 -0
  203. package/ui/Elements/Icon/icons/Truck.js +13 -0
  204. package/ui/Elements/Icon/icons/TwoUsers.d.ts +3 -0
  205. package/ui/Elements/Icon/icons/TwoUsers.js +13 -0
  206. package/ui/Elements/Icon/icons/index.d.ts +5 -0
  207. package/ui/Elements/Icon/icons/index.js +5 -0
  208. package/ui/Elements/MultiSelect/MultiSelect.d.ts +6 -0
  209. package/ui/Elements/MultiSelect/MultiSelect.js +29 -0
  210. package/ui/Elements/MultiSelect/index.d.ts +2 -0
  211. package/ui/Elements/MultiSelect/index.js +2 -0
  212. package/ui/Elements/Pagination/Pagination.d.ts +4 -3
  213. package/ui/Elements/Pagination/Pagination.js +11 -3
  214. package/ui/Elements/Pagination/stories/Pagination.stories.d.ts +1 -1
  215. package/ui/Elements/Pagination/styled.js +6 -6
  216. package/ui/Elements/Select/Select.d.ts +3 -0
  217. package/ui/Elements/Select/Select.js +69 -0
  218. package/ui/Elements/Select/index.d.ts +2 -0
  219. package/ui/Elements/Select/index.js +2 -0
  220. package/ui/Elements/Select/styles.d.ts +5 -0
  221. package/ui/Elements/Select/styles.js +12 -0
  222. package/ui/Elements/Select/themes/CustomComponents.d.ts +8 -0
  223. package/ui/Elements/Select/themes/CustomComponents.js +125 -0
  224. package/ui/Elements/Select/themes/baseStyles.d.ts +28 -0
  225. package/ui/Elements/Select/themes/baseStyles.js +87 -0
  226. package/ui/Elements/Select/themes/formStyles.d.ts +24 -0
  227. package/ui/Elements/Select/themes/formStyles.js +102 -0
  228. package/ui/Elements/Select/themes/index.d.ts +3 -0
  229. package/ui/Elements/Select/themes/index.js +43 -0
  230. package/ui/Elements/Select/types.d.ts +55 -0
  231. package/ui/Elements/Select/types.js +1 -0
  232. package/ui/Elements/SingleSelect/SingleSelect.d.ts +20 -0
  233. package/ui/Elements/SingleSelect/SingleSelect.js +197 -0
  234. package/ui/Elements/SingleSelect/index.d.ts +2 -0
  235. package/ui/Elements/SingleSelect/index.js +2 -0
  236. package/ui/Elements/Toggle/Toggle.d.ts +1 -1
  237. package/ui/Elements/Toggle/Toggle.js +2 -2
  238. package/ui/Elements/Toggle/stories/Toggle.stories.d.ts +1 -1
  239. package/ui/Elements/Toggle/types.d.ts +1 -0
  240. package/ui/Forms/Input/types.d.ts +2 -2
  241. package/ui/Forms/TextArea/TextArea.d.ts +20 -0
  242. package/ui/Forms/TextArea/TextArea.js +34 -0
  243. package/ui/Forms/TextArea/index.d.ts +2 -0
  244. package/ui/Forms/TextArea/index.js +2 -0
  245. package/ui/Forms/TextArea/styles.d.ts +12 -0
  246. package/ui/Forms/TextArea/styles.js +31 -0
  247. package/ui/ThemeProvider/ThemeProvider.d.ts +3 -1
  248. package/ui/ThemeProvider/ThemeProvider.js +4 -2
  249. package/ui/ThemeProvider/types.d.ts +1 -0
  250. package/ui/index.d.ts +17 -1
  251. package/ui/index.es.js +42462 -8524
  252. package/ui/index.js +17 -1
  253. package/ui/index.umd.js +1647 -270
  254. package/ui/Blocks/CommonGrid/CommonGridContext.d.ts +0 -12
  255. package/ui/Blocks/CommonGrid/CommonGridContext.js +0 -45
  256. package/ui/Blocks/CommonGrid/components/ActionColumnHead.d.ts +0 -4
  257. package/ui/Blocks/CommonGrid/components/ActionColumnHead.js +0 -16
  258. package/ui/Blocks/CommonGrid/components/ButtonStrip.d.ts +0 -7
  259. package/ui/Blocks/CommonGrid/components/ButtonStrip.js +0 -35
  260. package/ui/Blocks/CommonGrid/components/ConfigForm.d.ts +0 -9
  261. package/ui/Blocks/CommonGrid/components/ConfigForm.js +0 -58
  262. package/ui/Blocks/CommonGrid/components/DefaultPaginator.d.ts +0 -3
  263. package/ui/Blocks/CommonGrid/components/DefaultPaginator.js +0 -11
  264. package/ui/Blocks/CommonGrid/components/Dialog.d.ts +0 -11
  265. package/ui/Blocks/CommonGrid/components/Dialog.js +0 -19
  266. package/ui/Blocks/CommonGrid/components/DropdownMenu.d.ts +0 -21
  267. package/ui/Blocks/CommonGrid/components/DropdownMenu.js +0 -59
  268. package/ui/Blocks/CommonGrid/components/DropdownSelect.d.ts +0 -15
  269. package/ui/Blocks/CommonGrid/components/DropdownSelect.js +0 -35
  270. package/ui/Blocks/CommonGrid/components/FloatingButton.d.ts +0 -6
  271. package/ui/Blocks/CommonGrid/components/FloatingButton.js +0 -13
  272. package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.d.ts +0 -2
  273. package/ui/Blocks/CommonGrid/hooks/useControlButtons.d.ts +0 -10
  274. package/ui/Blocks/CommonGrid/hooks/useControlButtons.js +0 -64
  275. package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.d.ts +0 -13
  276. package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.js +0 -49
  277. package/ui/Blocks/CommonGrid/storybook/utils/filters.d.ts +0 -2
  278. package/ui/Blocks/CommonGrid/storybook/utils/filters.js +0 -23
  279. package/ui/Blocks/CommonGrid/utils/public.d.ts +0 -16
  280. package/ui/Blocks/CommonGrid/utils/public.js +0 -52
@@ -2,7 +2,7 @@
2
2
  import type { StoryObj } from '@storybook/react';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ onPageChange, itemPerPage, itemCount, page }: import("../Pagination").Props) => JSX.Element;
5
+ component: ({ onPageChange, itemPerPage, itemCount, page, customPaginationHandler }: import("../Pagination").Props) => JSX.Element;
6
6
  tags: string[];
7
7
  argTypes: {};
8
8
  };
@@ -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 SpaceAroundWrap from '../SpaceAround';
29
+ import { FieldLabel } from '../Label';
30
+ import { ErrorMessage } from '../ErrorMessage';
31
+ import { i18n } from '@lingui/core';
32
+ var emptyOptions = [];
33
+ var noOptionsMessage = function () { return i18n._({ id: 'select.noOptions', message: 'no options' }); };
34
+ var loadingMessage = function () { return i18n._({ 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 || i18n._({ 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,8 @@
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 ConnectedMenu: (props: any) => any;
7
+ export declare const CustomInput: (props: any) => any;
8
+ export declare const DropdownIndicator: (props: any) => any;
@@ -0,0 +1,125 @@
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
28
+ import { useCallback, useMemo, memo, useState, useEffect, useRef } from 'react';
29
+ import { components } from 'react-select';
30
+ import styled, { th } from '@xstyled/styled-components';
31
+ import { components as selectComponents } from 'react-select';
32
+ import { Trans } from '@lingui/react';
33
+ import Icon from '../../Icon/Icon';
34
+ import { Paragraph3 } from '../../Typography/Typography';
35
+ import Checkbox from '../../../Forms/Checkbox/Checkbox';
36
+ import Toggle from '../../Toggle/Toggle';
37
+ // Option for big lists
38
+ var SimplifiedOptionInner = function (props) {
39
+ var styles = props.getStyles('option', props);
40
+ var data = props.data, selectOption = props.selectOption, innerProps = props.innerProps;
41
+ var handleClick = useCallback(function () { return selectOption(data); }, [data, selectOption]);
42
+ return (_jsx("div", { style: styles, onClick: handleClick, onMouseOver: innerProps.onMouseOver, onMouseMove: innerProps.onMouseMove, children: props.label }));
43
+ };
44
+ export var SimplifiedOption = memo(SimplifiedOptionInner, function (prevProps, nextProps) { var _a, _b; return prevProps.isFocused === nextProps.isFocused && ((_a = prevProps.data) === null || _a === void 0 ? void 0 : _a.label) === ((_b = nextProps.data) === null || _b === void 0 ? void 0 : _b.label); });
45
+ // Value container with icon
46
+ var IconDiv = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-left: 12px;\n align-self: center;\n"], ["\n padding-left: 12px;\n align-self: center;\n"])));
47
+ export var IconValueContainer = function (props) {
48
+ var _a;
49
+ // eslint-disable-next-line react/prop-types
50
+ var children = props.children, rest = __rest(props, ["children"]);
51
+ var icon = (_a = rest.selectProps) === null || _a === void 0 ? void 0 : _a.icon;
52
+ return (_jsxs(_Fragment, { children: [icon && (_jsx(IconDiv, { className: "inputIcon", children: _jsx(Icon, { icon: icon }) })), _jsx(components.ValueContainer, __assign({}, rest, { children: children }))] }));
53
+ };
54
+ // MultiValue container replacement with count of selected options
55
+ export var CountMultiValue = function (props) {
56
+ var _a, _b;
57
+ var selectVal = props.selectProps.value;
58
+ var inputVal = props.selectProps.inputValue;
59
+ var transValues = useMemo(function () { return ({ count: selectVal.length }); }, [selectVal.length]);
60
+ if (!inputVal && ((_a = props.data) === null || _a === void 0 ? void 0 : _a.value) == ((_b = selectVal[0]) === null || _b === void 0 ? void 0 : _b.value)) {
61
+ return (_jsx(selectComponents.SingleValue, __assign({}, props, { children: selectVal.length > 1 ? (_jsx(Trans, { id: "datagrid.filterCell.optionsSelectedLabel", message: '{count} options', values: transValues })) : (props.children) })));
62
+ }
63
+ else {
64
+ return null;
65
+ }
66
+ };
67
+ // Option with chevron form new design
68
+ var ChevronDiv = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-self: center;\n display: flex;\n"], ["\n align-self: center;\n display: flex;\n"])));
69
+ var SelectedIndicator = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding-right: 12px;\n"], ["\n padding-right: 12px;\n"])));
70
+ export var ChevronOption = function (props) {
71
+ var theme = props.theme, isSelected = props.isSelected, selectOption = props.selectOption, children = props.children, data = props.data;
72
+ var showCheckbox = !!(theme.optionVariant == 'checkbox');
73
+ var showToggle = !!(theme.optionVariant == 'toggle');
74
+ return (_jsxs(selectComponents.Option, __assign({}, props, { children: [(showCheckbox || showToggle) && (_jsxs(SelectedIndicator, { children: [showCheckbox && _jsx(Checkbox, { checked: isSelected, size: 2, readOnly: true }), showToggle && _jsx(Toggle, { name: "", onChange: selectOption, checked: isSelected, spaceAround: false, variant: 'grid' })] })), _jsx("span", { className: "label", "data-cy": "dropdownModalOption".concat(data.index), children: children })] })));
75
+ };
76
+ // menu with check all and reset config button
77
+ var SelectAll = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n margin: 4px 18px -10px 8px;\n padding: ", ";\n font-weight: 400;\n background-color: ", ";\n color: blue2;\n border-radius: 6px;\n height: 36px;\n :hover {\n cursor: pointer;\n background-color: bgLightGray1;\n }\n"], ["\n display: flex;\n margin: 4px 18px -10px 8px;\n padding: ", ";\n font-weight: 400;\n background-color: ", ";\n color: blue2;\n border-radius: 6px;\n height: 36px;\n :hover {\n cursor: pointer;\n background-color: bgLightGray1;\n }\n"])), function (_a) {
78
+ var additionalPadding = _a.additionalPadding;
79
+ return (additionalPadding ? '8px 27px 8px 10px' : '8px 10px');
80
+ }, function (_a) {
81
+ var isSelected = _a.isSelected;
82
+ return (isSelected ? th.color('red20') : 'transparent');
83
+ });
84
+ var ConfigWrap = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n text-align: center;\n cursor: pointer;\n color: red1;\n text-decoration: underline;\n margin: 0 30px 0 20px;\n padding-bottom: 7px;\n :first-letter {\n text-transform: capitalize;\n }\n :hover {\n color: red3;\n }\n"], ["\n text-align: center;\n cursor: pointer;\n color: red1;\n text-decoration: underline;\n margin: 0 30px 0 20px;\n padding-bottom: 7px;\n :first-letter {\n text-transform: capitalize;\n }\n :hover {\n color: red3;\n }\n"])));
85
+ export var ConnectedMenu = function (props) {
86
+ var theme = props.theme;
87
+ var _a = props.selectProps, resetGrid = _a.resetGrid, onCustomSelectAll = _a.onCustomSelectAll, onCustomDeselectAll = _a.onCustomDeselectAll, value = _a.value, options = _a.options, resetGridButton = _a.resetGridButton, selectAllButton = _a.selectAllButton, maxMenuHeight = _a.maxMenuHeight;
88
+ var showCheckbox = !!(theme.optionVariant === 'checkbox');
89
+ var showToggle = !!(theme.optionVariant === 'toggle');
90
+ var _b = useState(false), isSelected = _b[0], setIsSelected = _b[1];
91
+ var _c = useState(false), additionalPadding = _c[0], setAdditionalPadding = _c[1];
92
+ var ref = useRef(null);
93
+ useEffect(function () {
94
+ var _a;
95
+ // if the height of all options is higher than maxMenuHeight and the slider is displayed => the indentation needs to be increased
96
+ ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) && setAdditionalPadding(ref.current.offsetHeight * options.length > maxMenuHeight);
97
+ if (value) {
98
+ options.length === value.length && setIsSelected(true);
99
+ options.length !== value.length && setIsSelected(false);
100
+ }
101
+ else
102
+ return;
103
+ }, [additionalPadding, maxMenuHeight, options.length, value]);
104
+ var selectAll = useCallback(function () {
105
+ if (!isSelected) {
106
+ setIsSelected(true);
107
+ onCustomSelectAll();
108
+ }
109
+ else if (isSelected) {
110
+ setIsSelected(false);
111
+ onCustomDeselectAll();
112
+ }
113
+ }, [isSelected, onCustomDeselectAll, onCustomSelectAll]);
114
+ return (_jsxs(selectComponents.Menu, __assign({}, props, { children: [selectAllButton && (_jsxs(SelectAll, { isSelected: isSelected, onClick: selectAll, ref: ref, additionalPadding: additionalPadding, children: [(showCheckbox || showToggle) && (_jsxs(SelectedIndicator, { children: [showCheckbox && _jsx(Checkbox, { checked: isSelected, size: 2, readOnly: true }), showToggle && _jsx(Toggle, { name: "", checked: isSelected, spaceAround: false, variant: 'grid' })] })), _jsx(Trans, { id: "datagrid.filterCell.selectAllLabel", message: 'select all' })] })), props.children, resetGridButton && (_jsx(ConfigWrap, { onClick: resetGrid, children: _jsx(Paragraph3, { variant: "semiBold", children: _jsx(Trans, { id: "dataGrid.buttonClearConfig", message: "Reset config" }) }) }))] })));
115
+ };
116
+ export var CustomInput = function (props) {
117
+ var name = props.selectProps.name;
118
+ var value = !!name ? "".concat(name, "Inp") : props.id;
119
+ return _jsx(selectComponents.Input, __assign({}, props, { "data-cy": value }));
120
+ };
121
+ export var DropdownIndicator = function (props) {
122
+ var _a = props.selectProps, menuIsOpen = _a.menuIsOpen, name = _a.name;
123
+ return (_jsx(selectComponents.DropdownIndicator, __assign({}, props, { children: _jsx(ChevronDiv, { className: "chevron", "data-cy": "".concat(name, "ChevronBtn"), children: _jsx(Icon, { icon: menuIsOpen ? 'goUp' : 'goDown', size: '100%' }) }) })));
124
+ };
125
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,28 @@
1
+ import { SelectProps } from '../types';
2
+ import { ControlProps, CSSObjectWithLabel } from 'react-select';
3
+ export type BaseStylesTheme = {
4
+ colors: {
5
+ primary: string;
6
+ primary50: string;
7
+ primary25: string;
8
+ optionTextColor: string;
9
+ inputDisabledColor: string;
10
+ inputBackgroundColor: string;
11
+ inputBorderColor: string;
12
+ menuBackgroundColor: string;
13
+ inputTextColor: string;
14
+ placeholderTextColor: string;
15
+ };
16
+ height: string | number;
17
+ focusBoxShadow?: string;
18
+ };
19
+ export type BaseState<ThemeType = BaseStylesTheme> = {
20
+ theme: ThemeType;
21
+ isSelected: boolean;
22
+ isFocused: boolean;
23
+ isDisabled: boolean;
24
+ isMulti: boolean;
25
+ selectProps: SelectProps;
26
+ } & ControlProps;
27
+ export type StylesConfig<T = BaseState> = Record<string, (styles: CSSObjectWithLabel, state: T) => CSSObjectWithLabel>;
28
+ export declare const baseStylesConfig: StylesConfig;
@@ -0,0 +1,87 @@
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
+ import createRgba from '../../../utils/CreateRgba/createRgba';
13
+ // style object https://react-select.com/styles
14
+ export var baseStylesConfig = {
15
+ control: function (styles, _a) {
16
+ var _b;
17
+ var selectProps = _a.selectProps, theme = _a.theme, isFocused = _a.isFocused, isDisabled = _a.isDisabled;
18
+ var colors = theme.colors;
19
+ return __assign(__assign({}, styles), { borderColor: selectProps.isInvalid || isFocused ? colors.primary : colors.inputBorderColor, backgroundColor: isDisabled ? colors.inputDisabledColor : colors.inputBackgroundColor, boxShadow: isFocused ? theme.focusBoxShadow : undefined, '&:hover': __assign(__assign({}, ((_b = styles['&:hover']) !== null && _b !== void 0 ? _b : {})), { borderColor: undefined }), minHeight: theme.height, minWidth: selectProps.isMulti ? 'min-content' : 'max-content' });
20
+ },
21
+ option: function (styles, _a) {
22
+ var isSelected = _a.isSelected, theme = _a.theme, isFocused = _a.isFocused;
23
+ return __assign(__assign({}, styles), { color: isSelected ? 'white' : theme.colors.optionTextColor, backgroundColor: isSelected ? theme.colors.primary : isFocused ? theme.colors.primary25 : 'transparent', ':active': __assign(__assign({}, styles[':active']), { backgroundColor: isSelected ? undefined : theme.colors.primary50 }) });
24
+ },
25
+ menu: function (styles, _a) {
26
+ var theme = _a.theme;
27
+ return __assign(__assign({}, styles), { minWidth: 'max-content', backgroundColor: theme.colors.menuBackgroundColor });
28
+ },
29
+ dropdownIndicator: function (styles, _a) {
30
+ var theme = _a.theme;
31
+ return (__assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: '0 4px', color: createRgba(theme.colors.inputTextColor, 0.25) }));
32
+ },
33
+ clearIndicator: function (styles, _a) {
34
+ var theme = _a.theme;
35
+ return (__assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: '0 4px', color: createRgba(theme.colors.inputTextColor, 0.25) }));
36
+ },
37
+ loadingIndicator: function (styles, _a) {
38
+ var theme = _a.theme;
39
+ return (__assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: '0 4px', color: createRgba(theme.colors.inputTextColor, 0.25) }));
40
+ },
41
+ indicatorSeparator: function (styles, _a) {
42
+ var theme = _a.theme;
43
+ return (__assign(__assign({}, styles), { backgroundColor: createRgba(theme.colors.inputTextColor, 0.25) }));
44
+ },
45
+ input: function (styles, _a) {
46
+ var theme = _a.theme;
47
+ return (__assign(__assign({}, styles), { color: theme.colors.inputTextColor }));
48
+ },
49
+ singleValue: function (styles, _a) {
50
+ var selectProps = _a.selectProps, theme = _a.theme;
51
+ return (__assign(__assign({}, styles), { color: selectProps.isInvalid ? theme.colors.primary : theme.colors.inputTextColor }));
52
+ },
53
+ multiValue: function (styles, _a) {
54
+ var theme = _a.theme;
55
+ return (__assign(__assign({}, styles), { color: theme.colors.inputTextColor, backgroundColor: theme.colors.menuBackgroundColor }));
56
+ },
57
+ multiValueLabel: function (styles) { return (__assign(__assign({}, styles), { fontSize: 'unset', padding: '5px' })); },
58
+ placeholder: function (styles, _a) {
59
+ var selectProps = _a.selectProps, theme = _a.theme;
60
+ return (__assign(__assign({}, styles), { textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', maxWidth: 'calc(100% - 8px)', color: selectProps.isDarkPlaceholderText ? theme.colors.inputTextColor : theme.colors.placeholderTextColor }));
61
+ },
62
+ loadingMessage: function (styles, _a) {
63
+ var theme = _a.theme;
64
+ return (__assign(__assign({}, styles), { color: theme.colors.optionTextColor }));
65
+ },
66
+ noOptionsMessage: function (styles, _a) {
67
+ var theme = _a.theme;
68
+ return (__assign(__assign({}, styles), { color: theme.colors.optionTextColor }));
69
+ },
70
+ menuList: function (styles, _a) {
71
+ var theme = _a.theme;
72
+ return __assign(__assign({}, styles), { margin: '8px 4px 8px 8px', '::-webkit-scrollbar-thumb': {
73
+ border: 'none',
74
+ borderRadius: '4px',
75
+ height: '47px',
76
+ backgroundColor: theme.colors.scrollbarThumbColor,
77
+ '&:hover': {
78
+ backgroundColor: theme.colors.dropdownIndicatorColor,
79
+ },
80
+ }, '::-webkit-scrollbar': {
81
+ width: '10px',
82
+ }, '::-webkit-scrollbar-track': {
83
+ backgroundColor: theme.colors.scrollbarTrackColor,
84
+ borderRadius: '6px',
85
+ } });
86
+ },
87
+ };
@@ -0,0 +1,24 @@
1
+ import { SelectProps } from '../types';
2
+ import { BaseStylesTheme, BaseState, StylesConfig } from './baseStyles';
3
+ type CustomTheme = Omit<BaseStylesTheme, 'colors'> & {
4
+ colors: Omit<BaseStylesTheme['colors'], 'primary50' | 'primary25'> & {
5
+ activeOptionBackground: string;
6
+ valueTextColor: string;
7
+ inputTextColor: string;
8
+ inputBorderHoverColor: string;
9
+ menuHoverBackgroundColor: string;
10
+ dropdownIndicatorColor: string;
11
+ };
12
+ textWeightRegular: string;
13
+ textWeightSemiBold: string;
14
+ textWeightBold: string;
15
+ optionVariant: Required<SelectProps>['optionVariant'];
16
+ borderRadius: string;
17
+ font: string;
18
+ narrowIndicators: boolean;
19
+ };
20
+ type State = BaseState<CustomTheme>;
21
+ export declare const CustomStyles: StylesConfig<State>;
22
+ type ThemeGetter = (theme: any) => CustomTheme;
23
+ export declare const getCustomTheme: (theme: any, optionVariant: Required<SelectProps>['optionVariant'], useFilterSubvariant: boolean) => ThemeGetter;
24
+ export {};
@@ -0,0 +1,102 @@
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
+ import { baseStylesConfig } from './baseStyles';
13
+ import { th } from '@xstyled/system';
14
+ // style object https://react-select.com/styles
15
+ export var CustomStyles = __assign(__assign({}, baseStylesConfig), { control: function (styles, _a) {
16
+ var _b;
17
+ var selectProps = _a.selectProps, theme = _a.theme, isFocused = _a.isFocused, isDisabled = _a.isDisabled;
18
+ var colors = theme.colors;
19
+ return __assign(__assign({}, styles), { borderColor: selectProps.isInvalid ? colors.primary : isFocused ? colors.inputTextColor : colors.inputBorderColor, backgroundColor: isDisabled ? colors.inputDisabledColor : colors.inputBackgroundColor, boxShadow: isFocused ? theme.focusBoxShadow : undefined, borderRadius: theme.borderRadius, '& input': {
20
+ fontWeight: theme.textWeightBold,
21
+ fontFamily: theme.font,
22
+ }, '&:hover': __assign(__assign({}, ((_b = styles['&:hover']) !== null && _b !== void 0 ? _b : {})), { borderColor: colors.inputBorderHoverColor }), fontSize: '14px', minHeight: theme.height, minWidth: selectProps.isMulti ? 'min-content' : 'max-content', '.inputIcon': {
23
+ color: isDisabled ? colors.valueTextColor : !!selectProps.value ? colors.inputTextColor : colors.valueTextColor,
24
+ } });
25
+ }, singleValue: function (styles, _a) {
26
+ var selectProps = _a.selectProps, theme = _a.theme, isDisabled = _a.isDisabled;
27
+ return (__assign(__assign({}, styles), { color: selectProps.isInvalid ? theme.colors.primary : isDisabled ? theme.colors.valueTextColor : theme.colors.inputTextColor, fontSize: '14px', fontWeight: selectProps.isDarkPlaceholderText ? '400' : theme.textWeightSemiBold }));
28
+ }, multiValue: function (styles, state) {
29
+ var _a;
30
+ var theme = state.theme;
31
+ var base = (_a = baseStylesConfig.multiValue) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
32
+ return __assign(__assign({}, base), { fontSize: '9px', fontWeight: theme.textWeightSemiBold });
33
+ }, multiValueRemove: function (styles, _a) {
34
+ var _b;
35
+ var theme = _a.theme;
36
+ return (__assign(__assign({}, styles), { color: theme.colors.inputBorderColor, '&:hover': __assign(__assign({}, ((_b = styles['&:hover']) !== null && _b !== void 0 ? _b : {})), { backgroundColor: theme.colors.inputTextColor }) }));
37
+ }, placeholder: function (styles, state) {
38
+ var _a;
39
+ var theme = state.theme;
40
+ var base = (_a = baseStylesConfig.placeholder) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
41
+ return __assign(__assign({}, base), { fontSize: '14px', fontWeight: theme.textWeightSemiBold });
42
+ }, option: function (styles, _a) {
43
+ var isSelected = _a.isSelected, theme = _a.theme, isDisabled = _a.isDisabled, selectProps = _a.selectProps;
44
+ var defaultColor = theme.colors.optionTextColor;
45
+ var disabledColor = theme.colors.placeholderTextColor;
46
+ return {
47
+ color: isSelected ? theme.colors.primary : defaultColor,
48
+ backgroundColor: isSelected ? theme.colors.activeOptionBackground : undefined,
49
+ fontWeight: 400,
50
+ fontSize: '14px',
51
+ cursor: !isDisabled ? 'pointer' : 'default',
52
+ display: 'flex',
53
+ flexDirection: 'row',
54
+ alignItems: 'center',
55
+ padding: '7px 10px',
56
+ height: '36px',
57
+ marginRight: '4px',
58
+ marginBottom: '2px',
59
+ lineHeight: '22px',
60
+ borderRadius: th.radius('ml')({ theme: selectProps === null || selectProps === void 0 ? void 0 : selectProps.systemTheme }),
61
+ '&:hover': { backgroundColor: !isDisabled ? theme.colors.menuHoverBackgroundColor : undefined },
62
+ };
63
+ }, menu: function (styles, state) {
64
+ var _a;
65
+ var base = (_a = baseStylesConfig.menu) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
66
+ return __assign(__assign({}, base), { boxShadow: '0 2px 20px 0 rgba(0, 0, 0, 0.10);', marginTop: '-0', paddingTop: '0', borderRadius: '10px', zIndex: 3 });
67
+ }, dropdownIndicator: function (styles, state) {
68
+ var _a;
69
+ var base = (_a = baseStylesConfig.dropdownIndicator) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
70
+ var theme = state.theme, isFocused = state.isFocused;
71
+ return __assign(__assign({}, base), { color: isFocused ? theme.colors.inputTextColor : theme.colors.dropdownIndicatorColor, padding: '0px 5px 0px 0px', '@media (min-width: 1024px)': {
72
+ padding: '0px 5px 0px 1px',
73
+ } });
74
+ }, clearIndicator: function (styles, state) {
75
+ var _a;
76
+ var base = (_a = baseStylesConfig.clearIndicator) === null || _a === void 0 ? void 0 : _a.call(baseStylesConfig, styles, state);
77
+ var theme = state.theme;
78
+ return __assign(__assign({}, base), { padding: theme.narrowIndicators ? '0px 0px 0px 2px' : '0px 4px' });
79
+ },
80
+ // invisible indicator separator
81
+ indicatorSeparator: function () { return ({ display: 'none' }); } });
82
+ export var getCustomTheme = function (theme, optionVariant, useFilterSubvariant) {
83
+ var inputTextColor = th.color('blue2')({ theme: theme });
84
+ var customColors = {
85
+ primary: th.color('red1')({ theme: theme }),
86
+ inputTextColor: inputTextColor,
87
+ valueTextColor: th.color('gray')({ theme: theme }),
88
+ placeholderTextColor: th.color('lightGray3')({ theme: theme }),
89
+ optionTextColor: th.color('blue2')({ theme: theme }),
90
+ inputDisabledColor: th.color('lightGray1')({ theme: theme }),
91
+ inputBackgroundColor: "white",
92
+ inputBorderColor: th.color('lightGray3')({ theme: theme }),
93
+ inputBorderHoverColor: th.color('gray5')({ theme: theme }),
94
+ activeOptionBackground: th.color('red20')({ theme: theme }),
95
+ menuBackgroundColor: th.color('white')({ theme: theme }),
96
+ menuHoverBackgroundColor: th.color('bgLightGray1')({ theme: theme }),
97
+ dropdownIndicatorColor: th.color('gray1')({ theme: theme }),
98
+ };
99
+ return function (reactSelectTheme) {
100
+ return __assign(__assign({}, reactSelectTheme), { colors: customColors, focusBoxShadow: null, height: useFilterSubvariant ? '32px' : '38px', textWeightRegular: th.fontWeight('regular')({ theme: theme }), textWeightSemiBold: th.fontWeight('semiBold')({ theme: theme }), textWeightBold: th.fontWeight('bold')({ theme: theme }), optionVariant: optionVariant, borderRadius: th.radius('lg')({ theme: theme }), font: th.font('primary')({ theme: theme }), narrowIndicators: !!useFilterSubvariant });
101
+ };
102
+ };
@@ -0,0 +1,3 @@
1
+ import { StylesConfig, SelectComponentsConfig } from 'react-select';
2
+ import { SelectProps } from '../types';
3
+ export declare const useStylesAndComponents: (style: SelectProps['style'], optionVariant: SelectProps['optionVariant'], multiLabelVariant: SelectProps['multiLabelVariant'], containerVariant: SelectProps['containerVariant'], useSimplifiedOptions: SelectProps['useSimplifiedOptions'], showSelectAllButton: SelectProps['showSelectAllButton'], showResetGridButton: SelectProps['showResetGridButton']) => [SelectComponentsConfig<unknown, boolean, any>, any, StylesConfig];
@@ -0,0 +1,43 @@
1
+ import { SimplifiedOption, IconValueContainer, CountMultiValue, ChevronOption, DropdownIndicator, CustomInput, ConnectedMenu, } from './CustomComponents';
2
+ import { getCustomTheme as getFormCustomTheme, CustomStyles as FormCustomStyles } from './formStyles';
3
+ import { useTheme } from '@xstyled/styled-components';
4
+ import { useMemo } from 'react';
5
+ export var useStylesAndComponents = function (style, optionVariant, multiLabelVariant, containerVariant, useSimplifiedOptions, showSelectAllButton, showResetGridButton) {
6
+ if (style === void 0) { style = 'form'; }
7
+ if (optionVariant === void 0) { optionVariant = 'default'; }
8
+ if (multiLabelVariant === void 0) { multiLabelVariant = 'default'; }
9
+ if (containerVariant === void 0) { containerVariant = 'default'; }
10
+ var systemTheme = useTheme();
11
+ return useMemo(function () {
12
+ var components = {
13
+ ValueContainer: IconValueContainer,
14
+ };
15
+ if (multiLabelVariant === 'count') {
16
+ components.MultiValue = CountMultiValue;
17
+ }
18
+ if (containerVariant === 'search') {
19
+ components.DropdownIndicator = null;
20
+ }
21
+ if (showResetGridButton || showSelectAllButton) {
22
+ components.Menu = ConnectedMenu;
23
+ }
24
+ components.Input = CustomInput;
25
+ var themes = getFormCustomTheme(systemTheme, optionVariant, style == 'gridFilter');
26
+ var styles = FormCustomStyles;
27
+ components.Option = ChevronOption;
28
+ components.DropdownIndicator = DropdownIndicator;
29
+ // performance reasons
30
+ if (useSimplifiedOptions)
31
+ components.Option = SimplifiedOption;
32
+ return [components, themes, styles];
33
+ }, [
34
+ multiLabelVariant,
35
+ containerVariant,
36
+ showResetGridButton,
37
+ showSelectAllButton,
38
+ style,
39
+ useSimplifiedOptions,
40
+ systemTheme,
41
+ optionVariant,
42
+ ]);
43
+ };