@saleor/macaw-ui 0.5.2 → 0.6.2

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 (484) hide show
  1. package/dist/cjs/index.js +2 -2
  2. package/dist/cjs/index.js.map +3 -3
  3. package/dist/esm/index.js +2 -2
  4. package/dist/esm/index.js.map +3 -3
  5. package/dist/types/CircleIndicator/CircleIndicator.d.ts +2 -0
  6. package/dist/types/Indicator/Circle.d.ts +5 -0
  7. package/dist/types/Indicator/CircleFilled.d.ts +8 -0
  8. package/dist/types/Indicator/CircleOutline.d.ts +8 -0
  9. package/dist/types/Indicator/Indicator.d.ts +14 -0
  10. package/dist/types/Indicator/Indicator.stories.d.ts +11 -0
  11. package/dist/types/Indicator/IndicatorCircle.d.ts +7 -0
  12. package/dist/types/Indicator/IndicatorCircle.stories.d.ts +7 -0
  13. package/dist/types/Indicator/IndicatorOutlined.d.ts +9 -0
  14. package/dist/types/Indicator/IndicatorOutlined.stories.d.ts +18 -0
  15. package/dist/types/Indicator/index.d.ts +3 -0
  16. package/dist/types/Indicator/styles.d.ts +5 -0
  17. package/dist/types/Pagination/Pagination.d.ts +5 -2
  18. package/dist/types/Pagination/PaginationActions.d.ts +16 -5
  19. package/dist/types/Tooltip/Arrow.d.ts +11 -0
  20. package/dist/types/Tooltip/Tooltip.d.ts +17 -3
  21. package/dist/types/Tooltip/Tooltip.stories.d.ts +7 -5
  22. package/dist/types/Tooltip/TooltipMountWrapper.d.ts +8 -0
  23. package/dist/types/Tooltip/index.d.ts +1 -0
  24. package/dist/types/Tooltip/styles.d.ts +10 -1
  25. package/dist/types/icons/20x20/BackSmallIcon.d.ts +10 -0
  26. package/dist/types/icons/20x20/BookmarksSmallIcon.d.ts +10 -0
  27. package/dist/types/icons/20x20/CheckboxSmallIcon.d.ts +10 -0
  28. package/dist/types/icons/20x20/ChevronSmallIcon.d.ts +10 -0
  29. package/dist/types/icons/20x20/CloseSmallIcon.d.ts +10 -0
  30. package/dist/types/icons/20x20/DragSmallIcon.d.ts +10 -0
  31. package/dist/types/icons/20x20/FilterSmallIcon.d.ts +10 -0
  32. package/dist/types/icons/20x20/MinusSmallIcon.d.ts +10 -0
  33. package/dist/types/icons/20x20/MoreSmallIcon.d.ts +10 -0
  34. package/dist/types/icons/20x20/NextSmallIcon.d.ts +10 -0
  35. package/dist/types/icons/20x20/PlusSmallIcon.d.ts +10 -0
  36. package/dist/types/icons/20x20/SearchSmallIcon.d.ts +10 -0
  37. package/dist/types/icons/20x20/SortBigSmallIcon.d.ts +10 -0
  38. package/dist/types/icons/20x20/SortSmallSmallIcon.d.ts +10 -0
  39. package/dist/types/icons/20x20/index.d.ts +14 -0
  40. package/dist/types/icons/24x24/AddEnvironmentIcon.d.ts +10 -0
  41. package/dist/types/icons/24x24/AppsIcon.d.ts +10 -0
  42. package/dist/types/icons/24x24/ArrowRightIcon.d.ts +10 -0
  43. package/dist/types/icons/24x24/BackspaceIcon.d.ts +10 -0
  44. package/dist/types/icons/24x24/BagIcon.d.ts +10 -0
  45. package/dist/types/icons/24x24/BillingIcon.d.ts +10 -0
  46. package/dist/types/icons/24x24/BookmarkIcon.d.ts +10 -0
  47. package/dist/types/icons/24x24/CalendarIcon.d.ts +10 -0
  48. package/dist/types/icons/24x24/CheckIcon.d.ts +10 -0
  49. package/dist/types/icons/24x24/ChevronIcon.d.ts +10 -0
  50. package/dist/types/icons/24x24/Close2Icon.d.ts +10 -0
  51. package/dist/types/icons/24x24/CloseIcon.d.ts +10 -0
  52. package/dist/types/icons/24x24/CodeIcon.d.ts +10 -0
  53. package/dist/types/icons/24x24/ColumnsIcon.d.ts +10 -0
  54. package/dist/types/icons/24x24/CopyIcon.d.ts +10 -0
  55. package/dist/types/icons/24x24/CustomersIcon.d.ts +10 -0
  56. package/dist/types/icons/24x24/DashboardIcon.d.ts +10 -0
  57. package/dist/types/icons/24x24/DeleteIcon.d.ts +10 -0
  58. package/dist/types/icons/24x24/DeveloperIcon.d.ts +10 -0
  59. package/dist/types/icons/24x24/DiscountsIcon.d.ts +10 -0
  60. package/dist/types/icons/24x24/DownloadIcon.d.ts +10 -0
  61. package/dist/types/icons/24x24/DragIcon.d.ts +10 -0
  62. package/dist/types/icons/24x24/EditIcon.d.ts +10 -0
  63. package/dist/types/icons/24x24/EnvironmentIcon.d.ts +10 -0
  64. package/dist/types/icons/24x24/ExpandIcon.d.ts +10 -0
  65. package/dist/types/icons/24x24/ExpendableIcon.d.ts +10 -0
  66. package/dist/types/icons/24x24/EyeClosedIcon.d.ts +10 -0
  67. package/dist/types/icons/24x24/EyeIcon.d.ts +10 -0
  68. package/dist/types/icons/24x24/FilteringIcon.d.ts +10 -0
  69. package/dist/types/icons/24x24/GenerateIcon.d.ts +10 -0
  70. package/dist/types/icons/24x24/GithubIcon.d.ts +10 -0
  71. package/dist/types/icons/24x24/GridIcon.d.ts +10 -0
  72. package/dist/types/icons/24x24/HelpIcon.d.ts +10 -0
  73. package/dist/types/icons/24x24/HowToIcon.d.ts +10 -0
  74. package/dist/types/icons/24x24/LinkIcon.d.ts +10 -0
  75. package/dist/types/icons/24x24/ListIcon.d.ts +10 -0
  76. package/dist/types/icons/24x24/MailIcon.d.ts +10 -0
  77. package/dist/types/icons/24x24/MigrateIcon.d.ts +10 -0
  78. package/dist/types/icons/24x24/MinusIcon.d.ts +10 -0
  79. package/dist/types/icons/24x24/ModelsIcon.d.ts +10 -0
  80. package/dist/types/icons/24x24/MoreHorizontalIcon.d.ts +10 -0
  81. package/dist/types/icons/24x24/NavigationIcon.d.ts +10 -0
  82. package/dist/types/icons/24x24/NavigatorIcon.d.ts +10 -0
  83. package/dist/types/icons/24x24/NextIcon.d.ts +10 -0
  84. package/dist/types/icons/24x24/NoConnectionIcon.d.ts +10 -0
  85. package/dist/types/icons/24x24/NotificationsIcon.d.ts +10 -0
  86. package/dist/types/icons/24x24/OrdersIcon.d.ts +10 -0
  87. package/dist/types/icons/24x24/PagesIcon.d.ts +10 -0
  88. package/dist/types/icons/24x24/PermissionsIcon.d.ts +10 -0
  89. package/dist/types/icons/24x24/PhotoIcon.d.ts +10 -0
  90. package/dist/types/icons/24x24/PlayIcon.d.ts +10 -0
  91. package/dist/types/icons/24x24/PlusIcon.d.ts +10 -0
  92. package/dist/types/icons/24x24/PresetIcon.d.ts +10 -0
  93. package/dist/types/icons/24x24/PreviousIcon.d.ts +10 -0
  94. package/dist/types/icons/24x24/PrinterIcon.d.ts +10 -0
  95. package/dist/types/icons/24x24/PrivacyIcon.d.ts +10 -0
  96. package/dist/types/icons/24x24/ProcessIcon.d.ts +10 -0
  97. package/dist/types/icons/24x24/ProductIcon.d.ts +10 -0
  98. package/dist/types/icons/24x24/RefreshIcon.d.ts +10 -0
  99. package/dist/types/icons/24x24/RemoveMemberIcon.d.ts +10 -0
  100. package/dist/types/icons/24x24/ReplyIcon.d.ts +10 -0
  101. package/dist/types/icons/24x24/SearchIcon.d.ts +10 -0
  102. package/dist/types/icons/24x24/SettingsIcon.d.ts +10 -0
  103. package/dist/types/icons/24x24/SnapshotsIcon.d.ts +10 -0
  104. package/dist/types/icons/24x24/SortDownIcon.d.ts +10 -0
  105. package/dist/types/icons/24x24/SortUpIcon.d.ts +10 -0
  106. package/dist/types/icons/24x24/TasksIcon.d.ts +10 -0
  107. package/dist/types/icons/24x24/TimeIcon.d.ts +10 -0
  108. package/dist/types/icons/24x24/ToIcon.d.ts +10 -0
  109. package/dist/types/icons/24x24/TransferIcon.d.ts +10 -0
  110. package/dist/types/icons/24x24/TranslateIcon.d.ts +10 -0
  111. package/dist/types/icons/24x24/TranslationIcon.d.ts +10 -0
  112. package/dist/types/icons/24x24/WebsiteIcon.d.ts +10 -0
  113. package/dist/types/icons/24x24/WifiIcon.d.ts +10 -0
  114. package/dist/types/icons/24x24/index.d.ts +74 -0
  115. package/dist/types/icons/32x32/AttributesLargeIcon.d.ts +10 -0
  116. package/dist/types/icons/32x32/CustomerLargeIcon.d.ts +10 -0
  117. package/dist/types/icons/32x32/DigitalLargeIcon.d.ts +10 -0
  118. package/dist/types/icons/32x32/DiscountLargeIcon.d.ts +10 -0
  119. package/dist/types/icons/32x32/FilteringLargeIcon.d.ts +10 -0
  120. package/dist/types/icons/32x32/GiftCardLargeIcon.d.ts +10 -0
  121. package/dist/types/icons/32x32/NavigationLargeIcon.d.ts +10 -0
  122. package/dist/types/icons/32x32/NotesLargeIcon.d.ts +10 -0
  123. package/dist/types/icons/32x32/OmnichannelLargeIcon.d.ts +10 -0
  124. package/dist/types/icons/32x32/PermissionLargeIcon.d.ts +10 -0
  125. package/dist/types/icons/32x32/ProductLargeIcon.d.ts +10 -0
  126. package/dist/types/icons/32x32/SearchLargeIcon.d.ts +10 -0
  127. package/dist/types/icons/32x32/ShippingLargeIcon.d.ts +10 -0
  128. package/dist/types/icons/32x32/SiteSettingsLargeIcon.d.ts +10 -0
  129. package/dist/types/icons/32x32/StaffMembersLargeIcon.d.ts +10 -0
  130. package/dist/types/icons/32x32/TaxesLargeIcon.d.ts +10 -0
  131. package/dist/types/icons/32x32/TokenLargeIcon.d.ts +10 -0
  132. package/dist/types/icons/32x32/WarehouseLargeIcon.d.ts +10 -0
  133. package/dist/types/icons/32x32/WifiLargeIcon.d.ts +10 -0
  134. package/dist/types/icons/32x32/index.d.ts +19 -0
  135. package/dist/types/icons/index.d.ts +9 -67
  136. package/dist/types/icons/indicator/index.d.ts +2 -0
  137. package/dist/types/icons/indicator/regular/ErrorIndicatorIcon.d.ts +2 -0
  138. package/dist/types/icons/indicator/regular/FailIndicatorIcon.d.ts +2 -0
  139. package/dist/types/icons/indicator/regular/FailOutlineIndicatorIcon.d.ts +2 -0
  140. package/dist/types/icons/indicator/regular/HelpIndicatorIcon.d.ts +2 -0
  141. package/dist/types/icons/indicator/regular/SuccessIndicatorIcon.d.ts +2 -0
  142. package/dist/types/icons/indicator/regular/WarningIndicatorIcon.d.ts +2 -0
  143. package/dist/types/icons/indicator/regular/index.d.ts +6 -0
  144. package/dist/types/icons/indicator/small/ErrorSmallIndicatorIcon.d.ts +2 -0
  145. package/dist/types/icons/indicator/small/SuccessSmallIndicatorIcon.d.ts +2 -0
  146. package/dist/types/icons/indicator/small/WarningSmallIndicatorIcon.d.ts +2 -0
  147. package/dist/types/icons/indicator/small/index.d.ts +3 -0
  148. package/dist/types/icons/styles.d.ts +1 -0
  149. package/dist/types/icons/types.d.ts +3 -0
  150. package/dist/types/index.d.ts +1 -0
  151. package/dist/types/utils/mergeRefs.d.ts +1 -1
  152. package/package.json +21 -8
  153. package/src/CircleIndicator/CircleIndicator.tsx +2 -0
  154. package/src/Filter/FilterField/MultipleValueAutocompleteFilterField.tsx +42 -41
  155. package/src/Indicator/Circle.tsx +17 -0
  156. package/src/Indicator/CircleFilled.tsx +16 -0
  157. package/src/Indicator/CircleOutline.tsx +34 -0
  158. package/src/Indicator/Indicator.stories.tsx +49 -0
  159. package/src/Indicator/Indicator.tsx +65 -0
  160. package/src/Indicator/IndicatorCircle.stories.tsx +28 -0
  161. package/src/Indicator/IndicatorCircle.tsx +45 -0
  162. package/src/Indicator/IndicatorOutlined.stories.tsx +86 -0
  163. package/src/Indicator/IndicatorOutlined.tsx +63 -0
  164. package/src/Indicator/index.ts +3 -0
  165. package/src/Indicator/styles.ts +61 -0
  166. package/src/MultipleValueAutocomplete/MultipleValueAutocomplete.tsx +134 -133
  167. package/src/Pagination/Pagination.tsx +6 -4
  168. package/src/Pagination/PaginationActions.tsx +16 -9
  169. package/src/Pagination/PaginationRowNumberSelect.tsx +35 -34
  170. package/src/Tooltip/Arrow.tsx +54 -0
  171. package/src/Tooltip/Tooltip.stories.tsx +71 -8
  172. package/src/Tooltip/Tooltip.tsx +156 -15
  173. package/src/Tooltip/TooltipMountWrapper.tsx +25 -0
  174. package/src/Tooltip/index.ts +1 -0
  175. package/src/Tooltip/styles.ts +133 -9
  176. package/src/assets/icons/20x20/back_small_icon.svg +1 -0
  177. package/src/assets/icons/20x20/bookmarks_small_icon.svg +1 -0
  178. package/src/assets/icons/20x20/checkbox_small_icon.svg +1 -0
  179. package/src/assets/icons/20x20/chevron_small_icon.svg +1 -0
  180. package/src/assets/icons/20x20/close_small_icon.svg +1 -0
  181. package/src/assets/icons/20x20/drag_small_icon.svg +1 -0
  182. package/src/assets/icons/20x20/filter_small_icon.svg +1 -0
  183. package/src/assets/icons/20x20/minus_small_icon.svg +1 -0
  184. package/src/assets/icons/20x20/more_small_icon.svg +1 -0
  185. package/src/assets/icons/20x20/next_small_icon.svg +1 -0
  186. package/src/assets/icons/20x20/plus_small_icon.svg +1 -0
  187. package/src/assets/icons/20x20/search_small_icon.svg +1 -0
  188. package/src/assets/icons/20x20/sort_big_small_icon.svg +1 -0
  189. package/src/assets/icons/20x20/sort_small_small_icon.svg +1 -0
  190. package/src/assets/icons/24x24/add_environment_icon.svg +1 -0
  191. package/src/assets/icons/24x24/apps_icon.svg +1 -0
  192. package/src/assets/icons/24x24/arrow_right_icon.svg +1 -0
  193. package/src/assets/icons/24x24/backspace_icon.svg +1 -0
  194. package/src/assets/icons/24x24/bag_icon.svg +1 -0
  195. package/src/assets/icons/24x24/billing_icon.svg +1 -0
  196. package/src/assets/icons/24x24/bookmark_icon.svg +1 -0
  197. package/src/assets/icons/24x24/calendar_icon.svg +1 -0
  198. package/src/assets/icons/24x24/check_icon.svg +1 -0
  199. package/src/assets/icons/24x24/chevron_icon.svg +1 -0
  200. package/src/assets/icons/24x24/close_2_icon.svg +1 -0
  201. package/src/assets/icons/24x24/close_icon.svg +1 -0
  202. package/src/assets/icons/24x24/code_icon.svg +1 -0
  203. package/src/assets/icons/24x24/columns_icon.svg +1 -0
  204. package/src/assets/icons/24x24/copy_icon.svg +1 -0
  205. package/src/assets/icons/24x24/customers_icon.svg +1 -0
  206. package/src/assets/icons/24x24/dashboard_icon.svg +1 -0
  207. package/src/assets/icons/24x24/delete_icon.svg +1 -0
  208. package/src/assets/icons/24x24/developer_icon.svg +1 -0
  209. package/src/assets/icons/24x24/discounts_icon.svg +1 -0
  210. package/src/assets/icons/24x24/download_icon.svg +1 -0
  211. package/src/assets/icons/24x24/drag_icon.svg +1 -0
  212. package/src/assets/icons/24x24/edit_icon.svg +1 -0
  213. package/src/assets/icons/24x24/environment_icon.svg +1 -0
  214. package/src/assets/icons/24x24/expand_icon.svg +1 -0
  215. package/src/assets/icons/24x24/expendable_icon.svg +1 -0
  216. package/src/assets/icons/24x24/eye_closed_icon.svg +1 -0
  217. package/src/assets/icons/24x24/eye_icon.svg +1 -0
  218. package/src/assets/icons/24x24/filtering_icon.svg +1 -0
  219. package/src/assets/icons/24x24/generate_icon.svg +1 -0
  220. package/src/assets/icons/24x24/github_icon.svg +1 -0
  221. package/src/assets/icons/24x24/grid_icon.svg +1 -0
  222. package/src/assets/icons/24x24/help_icon.svg +1 -0
  223. package/src/assets/icons/24x24/how to_icon.svg +1 -0
  224. package/src/assets/icons/24x24/link_icon.svg +1 -0
  225. package/src/assets/icons/24x24/list_icon.svg +1 -0
  226. package/src/assets/icons/24x24/mail_icon.svg +1 -0
  227. package/src/assets/icons/24x24/migrate_icon.svg +1 -0
  228. package/src/assets/icons/24x24/minus_icon.svg +1 -0
  229. package/src/assets/icons/24x24/models_icon.svg +1 -0
  230. package/src/assets/icons/24x24/more_horizontal_icon.svg +1 -0
  231. package/src/assets/icons/24x24/navigation_icon.svg +1 -0
  232. package/src/assets/icons/24x24/navigator_icon.svg +1 -0
  233. package/src/assets/icons/24x24/next_icon.svg +1 -0
  234. package/src/assets/icons/24x24/no_connection_icon.svg +1 -0
  235. package/src/assets/icons/24x24/notifications_icon.svg +1 -0
  236. package/src/assets/icons/24x24/orders_icon.svg +1 -0
  237. package/src/assets/icons/24x24/pages_icon.svg +1 -0
  238. package/src/assets/icons/24x24/permissions_icon.svg +1 -0
  239. package/src/assets/icons/24x24/photo_icon.svg +1 -0
  240. package/src/assets/icons/24x24/play_icon.svg +1 -0
  241. package/src/assets/icons/24x24/plus_icon.svg +1 -0
  242. package/src/assets/icons/24x24/preset_icon.svg +1 -0
  243. package/src/assets/icons/24x24/previous_icon.svg +1 -0
  244. package/src/assets/icons/24x24/printer_icon.svg +1 -0
  245. package/src/assets/icons/24x24/privacy_icon.svg +1 -0
  246. package/src/assets/icons/24x24/process_icon.svg +1 -0
  247. package/src/assets/icons/24x24/product_icon.svg +1 -0
  248. package/src/assets/icons/24x24/refresh_icon.svg +1 -0
  249. package/src/assets/icons/24x24/remove_member_icon.svg +1 -0
  250. package/src/assets/icons/24x24/reply_icon.svg +1 -0
  251. package/src/assets/icons/24x24/search_icon.svg +1 -0
  252. package/src/assets/icons/24x24/settings_icon.svg +1 -0
  253. package/src/assets/icons/24x24/snapshots_icon.svg +1 -0
  254. package/src/assets/icons/24x24/sort_down_icon.svg +1 -0
  255. package/src/assets/icons/24x24/sort_up_icon.svg +1 -0
  256. package/src/assets/icons/24x24/tasks_icon.svg +1 -0
  257. package/src/assets/icons/24x24/time_icon.svg +1 -0
  258. package/src/assets/icons/24x24/to_icon.svg +1 -0
  259. package/src/assets/icons/24x24/transfer_icon.svg +1 -0
  260. package/src/assets/icons/24x24/translate_icon.svg +1 -0
  261. package/src/assets/icons/24x24/translation_icon.svg +1 -0
  262. package/src/assets/icons/24x24/website_icon.svg +1 -0
  263. package/src/assets/icons/24x24/wifi_icon.svg +1 -0
  264. package/src/assets/icons/32x32/attributes_large_icon.svg +1 -0
  265. package/src/assets/icons/32x32/customer_large_icon.svg +1 -0
  266. package/src/assets/icons/32x32/digital_large_icon.svg +1 -0
  267. package/src/assets/icons/32x32/discount_large_icon.svg +1 -0
  268. package/src/assets/icons/32x32/filtering_large_icon.svg +1 -0
  269. package/src/assets/icons/32x32/gift card_large_icon.svg +1 -0
  270. package/src/assets/icons/32x32/navigation_large_icon.svg +1 -0
  271. package/src/assets/icons/32x32/notes_large_icon.svg +1 -0
  272. package/src/assets/icons/32x32/omnichannel_large_icon.svg +1 -0
  273. package/src/assets/icons/32x32/permission_large_icon.svg +1 -0
  274. package/src/assets/icons/32x32/product_large_icon.svg +1 -0
  275. package/src/assets/icons/32x32/search_large_icon.svg +1 -0
  276. package/src/assets/icons/32x32/shipping_large_icon.svg +1 -0
  277. package/src/assets/icons/32x32/site settings_large_icon.svg +1 -0
  278. package/src/assets/icons/32x32/staff members_large_icon.svg +1 -0
  279. package/src/assets/icons/32x32/taxes_large_icon.svg +1 -0
  280. package/src/assets/icons/32x32/token_large_icon.svg +1 -0
  281. package/src/assets/icons/32x32/warehouse_large_icon.svg +1 -0
  282. package/src/assets/icons/32x32/wifi_large_icon.svg +1 -0
  283. package/src/assets/icons/indicator/regular/error_indicator_icon.svg +1 -0
  284. package/src/assets/icons/indicator/regular/fail_indicator_icon.svg +1 -0
  285. package/src/assets/icons/indicator/regular/fail_outline_indicator_icon.svg +1 -0
  286. package/src/assets/icons/indicator/regular/help_indicator_icon.svg +1 -0
  287. package/src/assets/icons/indicator/regular/success_indicator_icon.svg +1 -0
  288. package/src/assets/icons/indicator/regular/warning_indicator_icon.svg +1 -0
  289. package/src/assets/icons/indicator/small/error_small_indicator_icon.svg +1 -0
  290. package/src/assets/icons/indicator/small/success_small_indicator_icon.svg +1 -0
  291. package/src/assets/icons/indicator/small/warning_small_indicator_icon.svg +1 -0
  292. package/src/icons/20x20/BackSmallIcon.tsx +32 -0
  293. package/src/icons/20x20/BookmarksSmallIcon.tsx +29 -0
  294. package/src/icons/20x20/CheckboxSmallIcon.tsx +32 -0
  295. package/src/icons/20x20/ChevronSmallIcon.tsx +32 -0
  296. package/src/icons/20x20/CloseSmallIcon.tsx +31 -0
  297. package/src/icons/20x20/DragSmallIcon.tsx +31 -0
  298. package/src/icons/20x20/FilterSmallIcon.tsx +31 -0
  299. package/src/icons/20x20/MinusSmallIcon.tsx +32 -0
  300. package/src/icons/20x20/MoreSmallIcon.tsx +31 -0
  301. package/src/icons/20x20/NextSmallIcon.tsx +32 -0
  302. package/src/icons/20x20/PlusSmallIcon.tsx +32 -0
  303. package/src/icons/20x20/SearchSmallIcon.tsx +31 -0
  304. package/src/icons/20x20/SortBigSmallIcon.tsx +31 -0
  305. package/src/icons/20x20/SortSmallSmallIcon.tsx +31 -0
  306. package/src/icons/20x20/index.ts +14 -0
  307. package/src/icons/24x24/AddEnvironmentIcon.tsx +32 -0
  308. package/src/icons/24x24/AppsIcon.tsx +31 -0
  309. package/src/icons/24x24/ArrowRightIcon.tsx +32 -0
  310. package/src/icons/24x24/BackspaceIcon.tsx +32 -0
  311. package/src/icons/24x24/BagIcon.tsx +29 -0
  312. package/src/icons/24x24/BillingIcon.tsx +32 -0
  313. package/src/icons/24x24/BookmarkIcon.tsx +29 -0
  314. package/src/icons/24x24/CalendarIcon.tsx +32 -0
  315. package/src/icons/24x24/CheckIcon.tsx +32 -0
  316. package/src/icons/24x24/ChevronIcon.tsx +32 -0
  317. package/src/icons/24x24/Close2Icon.tsx +39 -0
  318. package/src/icons/24x24/CloseIcon.tsx +31 -0
  319. package/src/icons/24x24/CodeIcon.tsx +38 -0
  320. package/src/icons/24x24/ColumnsIcon.tsx +30 -0
  321. package/src/icons/24x24/CopyIcon.tsx +39 -0
  322. package/src/icons/24x24/CustomersIcon.tsx +33 -0
  323. package/src/icons/24x24/DashboardIcon.tsx +30 -0
  324. package/src/icons/24x24/DeleteIcon.tsx +32 -0
  325. package/src/icons/24x24/DeveloperIcon.tsx +44 -0
  326. package/src/icons/24x24/DiscountsIcon.tsx +31 -0
  327. package/src/icons/24x24/DownloadIcon.tsx +32 -0
  328. package/src/icons/24x24/DragIcon.tsx +31 -0
  329. package/src/icons/24x24/EditIcon.tsx +36 -0
  330. package/src/icons/24x24/EnvironmentIcon.tsx +36 -0
  331. package/src/icons/24x24/ExpandIcon.tsx +39 -0
  332. package/src/icons/24x24/ExpendableIcon.tsx +34 -0
  333. package/src/icons/24x24/EyeClosedIcon.tsx +30 -0
  334. package/src/icons/24x24/EyeIcon.tsx +31 -0
  335. package/src/icons/24x24/FilteringIcon.tsx +32 -0
  336. package/src/icons/24x24/GenerateIcon.tsx +32 -0
  337. package/src/icons/24x24/GithubIcon.tsx +40 -0
  338. package/src/icons/24x24/GridIcon.tsx +61 -0
  339. package/src/icons/24x24/HelpIcon.tsx +35 -0
  340. package/src/icons/24x24/HowToIcon.tsx +39 -0
  341. package/src/icons/24x24/LinkIcon.tsx +32 -0
  342. package/src/icons/24x24/ListIcon.tsx +34 -0
  343. package/src/icons/24x24/MailIcon.tsx +31 -0
  344. package/src/icons/24x24/MigrateIcon.tsx +36 -0
  345. package/src/icons/24x24/MinusIcon.tsx +32 -0
  346. package/src/icons/24x24/ModelsIcon.tsx +38 -0
  347. package/src/icons/24x24/MoreHorizontalIcon.tsx +31 -0
  348. package/src/icons/24x24/NavigationIcon.tsx +31 -0
  349. package/src/icons/24x24/NavigatorIcon.tsx +32 -0
  350. package/src/icons/24x24/NextIcon.tsx +32 -0
  351. package/src/icons/24x24/NoConnectionIcon.tsx +36 -0
  352. package/src/icons/24x24/NotificationsIcon.tsx +32 -0
  353. package/src/icons/24x24/OrdersIcon.tsx +36 -0
  354. package/src/icons/24x24/PagesIcon.tsx +32 -0
  355. package/src/icons/24x24/PermissionsIcon.tsx +32 -0
  356. package/src/icons/24x24/PhotoIcon.tsx +32 -0
  357. package/src/icons/24x24/PlayIcon.tsx +31 -0
  358. package/src/icons/24x24/PlusIcon.tsx +32 -0
  359. package/src/icons/24x24/PresetIcon.tsx +35 -0
  360. package/src/icons/24x24/PreviousIcon.tsx +32 -0
  361. package/src/icons/24x24/PrinterIcon.tsx +32 -0
  362. package/src/icons/24x24/PrivacyIcon.tsx +39 -0
  363. package/src/icons/24x24/ProcessIcon.tsx +73 -0
  364. package/src/icons/24x24/ProductIcon.tsx +32 -0
  365. package/src/icons/24x24/RefreshIcon.tsx +32 -0
  366. package/src/icons/24x24/RemoveMemberIcon.tsx +34 -0
  367. package/src/icons/24x24/ReplyIcon.tsx +32 -0
  368. package/src/icons/24x24/SearchIcon.tsx +39 -0
  369. package/src/icons/24x24/SettingsIcon.tsx +34 -0
  370. package/src/icons/24x24/SnapshotsIcon.tsx +39 -0
  371. package/src/icons/24x24/SortDownIcon.tsx +31 -0
  372. package/src/icons/24x24/SortUpIcon.tsx +31 -0
  373. package/src/icons/24x24/TasksIcon.tsx +32 -0
  374. package/src/icons/24x24/TimeIcon.tsx +39 -0
  375. package/src/icons/24x24/ToIcon.tsx +32 -0
  376. package/src/icons/24x24/TransferIcon.tsx +32 -0
  377. package/src/icons/24x24/TranslateIcon.tsx +32 -0
  378. package/src/icons/24x24/TranslationIcon.tsx +33 -0
  379. package/src/icons/24x24/WebsiteIcon.tsx +53 -0
  380. package/src/icons/24x24/WifiIcon.tsx +32 -0
  381. package/src/icons/24x24/index.ts +74 -0
  382. package/src/icons/32x32/AttributesLargeIcon.tsx +36 -0
  383. package/src/icons/32x32/CustomerLargeIcon.tsx +38 -0
  384. package/src/icons/32x32/DigitalLargeIcon.tsx +31 -0
  385. package/src/icons/32x32/DiscountLargeIcon.tsx +35 -0
  386. package/src/icons/32x32/FilteringLargeIcon.tsx +32 -0
  387. package/src/icons/32x32/GiftCardLargeIcon.tsx +44 -0
  388. package/src/icons/32x32/NavigationLargeIcon.tsx +39 -0
  389. package/src/icons/32x32/NotesLargeIcon.tsx +53 -0
  390. package/src/icons/32x32/OmnichannelLargeIcon.tsx +64 -0
  391. package/src/icons/32x32/PermissionLargeIcon.tsx +39 -0
  392. package/src/icons/32x32/ProductLargeIcon.tsx +31 -0
  393. package/src/icons/32x32/SearchLargeIcon.tsx +39 -0
  394. package/src/icons/32x32/ShippingLargeIcon.tsx +32 -0
  395. package/src/icons/32x32/SiteSettingsLargeIcon.tsx +32 -0
  396. package/src/icons/32x32/StaffMembersLargeIcon.tsx +40 -0
  397. package/src/icons/32x32/TaxesLargeIcon.tsx +55 -0
  398. package/src/icons/32x32/TokenLargeIcon.tsx +38 -0
  399. package/src/icons/32x32/WarehouseLargeIcon.tsx +32 -0
  400. package/src/icons/32x32/WifiLargeIcon.tsx +32 -0
  401. package/src/icons/32x32/index.ts +19 -0
  402. package/src/icons/index.ts +12 -67
  403. package/src/icons/indicator/index.ts +2 -0
  404. package/src/icons/indicator/regular/ErrorIndicatorIcon.tsx +24 -0
  405. package/src/icons/indicator/regular/FailIndicatorIcon.tsx +31 -0
  406. package/src/icons/indicator/regular/FailOutlineIndicatorIcon.tsx +31 -0
  407. package/src/icons/indicator/regular/HelpIndicatorIcon.tsx +30 -0
  408. package/src/icons/indicator/regular/SuccessIndicatorIcon.tsx +24 -0
  409. package/src/icons/indicator/regular/WarningIndicatorIcon.tsx +23 -0
  410. package/src/icons/indicator/regular/index.ts +6 -0
  411. package/src/icons/indicator/small/ErrorSmallIndicatorIcon.tsx +24 -0
  412. package/src/icons/indicator/small/SuccessSmallIndicatorIcon.tsx +24 -0
  413. package/src/icons/indicator/small/WarningSmallIndicatorIcon.tsx +23 -0
  414. package/src/icons/indicator/small/index.ts +3 -0
  415. package/src/icons/styles.ts +10 -0
  416. package/src/icons/types.ts +3 -0
  417. package/src/index.tsx +1 -0
  418. package/src/utils/Decorator.tsx +1 -0
  419. package/src/utils/mergeRefs.ts +4 -4
  420. package/src/icons/AddEnvironmentIcon.tsx +0 -12
  421. package/src/icons/AppsIcon.tsx +0 -12
  422. package/src/icons/ArrowRightIcon.tsx +0 -12
  423. package/src/icons/AttributesLargeIcon.tsx +0 -15
  424. package/src/icons/BackspaceIcon.tsx +0 -12
  425. package/src/icons/BillingIcon.tsx +0 -12
  426. package/src/icons/CalendarIcon.tsx +0 -12
  427. package/src/icons/ChevronIcon.tsx +0 -14
  428. package/src/icons/Close2Icon.tsx +0 -12
  429. package/src/icons/CloseIcon.tsx +0 -12
  430. package/src/icons/ColumnsIcon.tsx +0 -12
  431. package/src/icons/CopyIcon.tsx +0 -12
  432. package/src/icons/CustomersIcon.tsx +0 -12
  433. package/src/icons/DashboardIcon.tsx +0 -12
  434. package/src/icons/DeleteIcon.tsx +0 -12
  435. package/src/icons/DeveloperIcon.tsx +0 -38
  436. package/src/icons/DigitalLargeIcon.tsx +0 -15
  437. package/src/icons/DiscountsIcon.tsx +0 -20
  438. package/src/icons/DiscountsLargeIcon.tsx +0 -26
  439. package/src/icons/DownloadIcon.tsx +0 -12
  440. package/src/icons/DragIcon.tsx +0 -12
  441. package/src/icons/EditIcon.tsx +0 -12
  442. package/src/icons/EnvironmentIcon.tsx +0 -12
  443. package/src/icons/ExpandIcon.tsx +0 -22
  444. package/src/icons/EyeIcon.tsx +0 -12
  445. package/src/icons/FilteringIcon.tsx +0 -12
  446. package/src/icons/FilteringLargeIcon.tsx +0 -15
  447. package/src/icons/HelpIcon.tsx +0 -12
  448. package/src/icons/LinkIcon.tsx +0 -12
  449. package/src/icons/MailIcon.tsx +0 -16
  450. package/src/icons/MinusIcon.tsx +0 -12
  451. package/src/icons/MoreHorizontalIcon.tsx +0 -12
  452. package/src/icons/NavigationIcon.tsx +0 -26
  453. package/src/icons/NavigationLargeIcon.tsx +0 -15
  454. package/src/icons/NavigatorIcon.tsx +0 -14
  455. package/src/icons/NextIcon.tsx +0 -14
  456. package/src/icons/NoConnectionIcon.tsx +0 -25
  457. package/src/icons/NotesLargeIcon.tsx +0 -38
  458. package/src/icons/NotificationsIcon.tsx +0 -12
  459. package/src/icons/OmnichannelLargeIcon.tsx +0 -15
  460. package/src/icons/OrdersIcon.tsx +0 -12
  461. package/src/icons/PagesIcon.tsx +0 -12
  462. package/src/icons/PermissionLargeIcon.tsx +0 -15
  463. package/src/icons/PhotoIcon.tsx +0 -12
  464. package/src/icons/PlusIcon.tsx +0 -12
  465. package/src/icons/PreviousIcon.tsx +0 -14
  466. package/src/icons/PrinterIcon.tsx +0 -15
  467. package/src/icons/PrivacyIcon.tsx +0 -15
  468. package/src/icons/ProductIcon.tsx +0 -12
  469. package/src/icons/ProductLargeIcon.tsx +0 -16
  470. package/src/icons/RefreshIcon.tsx +0 -14
  471. package/src/icons/ReplyIcon.tsx +0 -12
  472. package/src/icons/SearchIcon.tsx +0 -12
  473. package/src/icons/SettingsIcon.tsx +0 -15
  474. package/src/icons/ShippingLargeIcon.tsx +0 -15
  475. package/src/icons/SnapshotsIcon.tsx +0 -12
  476. package/src/icons/TaxesLargeIcon.tsx +0 -15
  477. package/src/icons/TimeIcon.tsx +0 -12
  478. package/src/icons/TokenLargeIcon.tsx +0 -17
  479. package/src/icons/TransferIcon.tsx +0 -22
  480. package/src/icons/TranslationIcon.tsx +0 -12
  481. package/src/icons/WarehouseLargeIcon.tsx +0 -15
  482. package/src/icons/WebsiteIcon.tsx +0 -22
  483. package/src/icons/WifiIcon.tsx +0 -23
  484. package/src/icons/WifiLargeIcon.tsx +0 -33
@@ -41,145 +41,146 @@ export interface MultipleValueAutocompleteProps
41
41
  onScrollToBottom?: () => void;
42
42
  }
43
43
 
44
- export const MultipleValueAutocomplete: React.FC<MultipleValueAutocompleteProps> =
45
- ({
44
+ export const MultipleValueAutocomplete: React.FC<
45
+ MultipleValueAutocompleteProps
46
+ > = ({
47
+ choices,
48
+ children,
49
+ enableReinitialize,
50
+ name,
51
+ InputProps,
52
+ initialValue = [],
53
+ loading,
54
+ popperPlacement = "bottom-start",
55
+ onChange,
56
+ onInputChange,
57
+ onScrollToBottom,
58
+ ...rest
59
+ }) => {
60
+ const classes = useStyles();
61
+ const {
62
+ anchor,
63
+ comboboxProps,
64
+ filteredChoices,
65
+ getItemProps,
66
+ getSelectedItemProps,
67
+ getToggleButtonProps,
68
+ highlightedIndex,
69
+ inputProps,
70
+ inputRef,
71
+ inputValue,
72
+ inputWidth,
73
+ isOpen,
74
+ labelProps,
75
+ menuProps,
76
+ ref,
77
+ removeSelectedItem,
78
+ selectedItems,
79
+ } = useMultipleValueAutocomplete({
46
80
  choices,
47
- children,
48
81
  enableReinitialize,
82
+ initialValue,
49
83
  name,
50
- InputProps,
51
- initialValue = [],
52
- loading,
53
- popperPlacement = "bottom-start",
54
84
  onChange,
55
85
  onInputChange,
56
- onScrollToBottom,
57
- ...rest
58
- }) => {
59
- const classes = useStyles();
60
- const {
61
- anchor,
62
- comboboxProps,
63
- filteredChoices,
64
- getItemProps,
65
- getSelectedItemProps,
66
- getToggleButtonProps,
67
- highlightedIndex,
68
- inputProps,
69
- inputRef,
70
- inputValue,
71
- inputWidth,
72
- isOpen,
73
- labelProps,
74
- menuProps,
75
- ref,
76
- removeSelectedItem,
77
- selectedItems,
78
- } = useMultipleValueAutocomplete({
79
- choices,
80
- enableReinitialize,
81
- initialValue,
82
- name,
83
- onChange,
84
- onInputChange,
85
- });
86
- const { anchor: dropdownRef, position, setAnchor } = useElementScroll();
86
+ });
87
+ const { anchor: dropdownRef, position, setAnchor } = useElementScroll();
87
88
 
88
- React.useEffect(() => {
89
- if (
90
- isOpen &&
91
- onScrollToBottom &&
92
- dropdownRef &&
93
- isScrolledToBottom(dropdownRef, position!, 5)
94
- ) {
95
- onScrollToBottom();
96
- }
97
- }, [position?.y, dropdownRef]);
89
+ React.useEffect(() => {
90
+ if (
91
+ isOpen &&
92
+ onScrollToBottom &&
93
+ dropdownRef &&
94
+ isScrolledToBottom(dropdownRef, position!, 5)
95
+ ) {
96
+ onScrollToBottom();
97
+ }
98
+ }, [position?.y, dropdownRef]);
98
99
 
99
- return (
100
- <>
101
- <TextField
102
- {...rest}
103
- {...comboboxProps}
104
- name={name}
105
- InputLabelProps={{
106
- shrink: isOpen || selectedItems.length || inputValue.length,
107
- ...labelProps,
108
- }}
109
- ref={ref}
110
- InputProps={{
111
- ...InputProps,
112
- ...inputProps,
113
- classes: {
114
- ...(InputProps?.classes ?? {}),
115
- root: clsx(classes.inputContainer, InputProps?.classes?.root, {
116
- [classes.inputContainerWithChips]: selectedItems.length > 0,
117
- }),
118
- input: clsx(classes.input, InputProps?.classes?.input),
119
- },
120
- startAdornment: selectedItems.map((item, index) => (
121
- <ChipRemovable
122
- key={`selected-item-${index}`}
123
- {...getSelectedItemProps({ selectedItem: item, index })}
124
- onRemove={() => removeSelectedItem(item)}
125
- >
126
- {item.label}
127
- </ChipRemovable>
128
- )),
129
- endAdornment: (
130
- <>
131
- {loading && (
132
- <div className={classes.loader}>
133
- <CircularProgress size={24} />
134
- </div>
135
- )}
136
- <IconButton
137
- {...getToggleButtonProps()}
138
- aria-label="toggle menu"
139
- className={classes.icon}
140
- hoverOutline={false}
141
- type="button"
142
- variant="secondary"
143
- >
144
- <PlusIcon />
145
- </IconButton>
146
- </>
147
- ),
148
- }}
149
- inputProps={{ ref: inputRef, style: { width: inputWidth } }}
150
- />
151
- <Popper
152
- className={clsx(classes.popper, menuProps.className)}
153
- open={isOpen}
154
- anchorEl={anchor.current}
155
- transition
156
- placement={popperPlacement}
157
- >
158
- {({ TransitionProps, placement }) => (
159
- <Grow
160
- {...TransitionProps}
161
- style={{
162
- transformOrigin:
163
- placement === "bottom" ? "left top" : "left bottom",
164
- }}
100
+ return (
101
+ <>
102
+ <TextField
103
+ {...rest}
104
+ {...comboboxProps}
105
+ name={name}
106
+ InputLabelProps={{
107
+ shrink: isOpen || selectedItems.length || inputValue.length,
108
+ ...labelProps,
109
+ }}
110
+ ref={ref}
111
+ InputProps={{
112
+ ...InputProps,
113
+ ...inputProps,
114
+ classes: {
115
+ ...(InputProps?.classes ?? {}),
116
+ root: clsx(classes.inputContainer, InputProps?.classes?.root, {
117
+ [classes.inputContainerWithChips]: selectedItems.length > 0,
118
+ }),
119
+ input: clsx(classes.input, InputProps?.classes?.input),
120
+ },
121
+ startAdornment: selectedItems.map((item, index) => (
122
+ <ChipRemovable
123
+ key={`selected-item-${index}`}
124
+ {...getSelectedItemProps({ selectedItem: item, index })}
125
+ onRemove={() => removeSelectedItem(item)}
165
126
  >
166
- <Paper
167
- className={classes.dropdown}
168
- elevation={8}
169
- style={{ width: anchor.current?.clientWidth }}
170
- {...menuProps}
171
- ref={mergeRefs(setAnchor, menuProps.ref)}
127
+ {item.label}
128
+ </ChipRemovable>
129
+ )),
130
+ endAdornment: (
131
+ <>
132
+ {loading && (
133
+ <div className={classes.loader}>
134
+ <CircularProgress size={24} />
135
+ </div>
136
+ )}
137
+ <IconButton
138
+ {...getToggleButtonProps()}
139
+ aria-label="toggle menu"
140
+ className={classes.icon}
141
+ hoverOutline={false}
142
+ type="button"
143
+ variant="secondary"
172
144
  >
173
- {children({
174
- choices: filteredChoices,
175
- highlightedIndex,
176
- getItemProps,
177
- inputValue,
178
- })}
179
- </Paper>
180
- </Grow>
181
- )}
182
- </Popper>
183
- </>
184
- );
185
- };
145
+ <PlusIcon />
146
+ </IconButton>
147
+ </>
148
+ ),
149
+ }}
150
+ inputProps={{ ref: inputRef, style: { width: inputWidth } }}
151
+ />
152
+ <Popper
153
+ className={clsx(classes.popper, menuProps.className)}
154
+ open={isOpen}
155
+ anchorEl={anchor.current}
156
+ transition
157
+ placement={popperPlacement}
158
+ >
159
+ {({ TransitionProps, placement }) => (
160
+ <Grow
161
+ {...TransitionProps}
162
+ style={{
163
+ transformOrigin:
164
+ placement === "bottom" ? "left top" : "left bottom",
165
+ }}
166
+ >
167
+ <Paper
168
+ className={classes.dropdown}
169
+ elevation={8}
170
+ style={{ width: anchor.current?.clientWidth }}
171
+ {...menuProps}
172
+ ref={mergeRefs(setAnchor, menuProps.ref)}
173
+ >
174
+ {children({
175
+ choices: filteredChoices,
176
+ highlightedIndex,
177
+ getItemProps,
178
+ inputValue,
179
+ })}
180
+ </Paper>
181
+ </Grow>
182
+ )}
183
+ </Popper>
184
+ </>
185
+ );
186
+ };
@@ -8,8 +8,8 @@ import {
8
8
  } from "./PaginationRowNumberSelect";
9
9
  import useStyles from "./styles";
10
10
 
11
- export interface PaginationProps
12
- extends PaginationActionsProps,
11
+ export interface PaginationProps<ActionProps = {}>
12
+ extends PaginationActionsProps<ActionProps>,
13
13
  Omit<
14
14
  PaginationRowNumberSelectProps,
15
15
  "className" | "choices" | "onChange" | "rowNumber"
@@ -20,19 +20,20 @@ export interface PaginationProps
20
20
  onRowNumberUpdate?: (rowNumber: number) => void;
21
21
  }
22
22
 
23
- export const Pagination: React.FC<PaginationProps> = ({
23
+ export const Pagination = <ActionProps,>({
24
24
  choices = [10, 20, 30, 50, 100],
25
25
  disabled,
26
26
  hasNextPage,
27
27
  hasPreviousPage,
28
28
  nextIconButtonProps,
29
+ prevIconButtonProps,
29
30
  labels,
30
31
  rowNumber,
31
32
  onNextPage,
32
33
  onPreviousPage,
33
34
  onRowNumberUpdate,
34
35
  ...other
35
- }) => {
36
+ }: PaginationProps<ActionProps>): React.ReactElement => {
36
37
  const classes = useStyles();
37
38
 
38
39
  return (
@@ -53,6 +54,7 @@ export const Pagination: React.FC<PaginationProps> = ({
53
54
  hasNextPage={hasNextPage}
54
55
  hasPreviousPage={hasPreviousPage}
55
56
  nextIconButtonProps={nextIconButtonProps}
57
+ prevIconButtonProps={prevIconButtonProps}
56
58
  onNextPage={onNextPage}
57
59
  onPreviousPage={onPreviousPage}
58
60
  />
@@ -1,4 +1,4 @@
1
- import ButtonBase from "@material-ui/core/ButtonBase";
1
+ import ButtonBase, { ButtonBaseTypeMap } from "@material-ui/core/ButtonBase";
2
2
  import ChevronLeft from "@material-ui/icons/ChevronLeft";
3
3
  import ChevronRight from "@material-ui/icons/ChevronRight";
4
4
  import clsx from "clsx";
@@ -7,26 +7,32 @@ import React from "react";
7
7
  import { useTheme } from "../theme";
8
8
  import useStyles from "./styles";
9
9
 
10
- export interface PaginationActionsProps {
10
+ type BaseButtonProps<M = unknown> = M extends Object
11
+ ? ButtonBaseTypeMap<M & { component: React.ElementType }>["props"]
12
+ : ButtonBaseTypeMap<{ href?: string }>["props"];
13
+
14
+ export interface PaginationActionsProps<BProps = unknown> {
11
15
  className?: string;
12
16
  disabled?: boolean;
13
17
  hasNextPage: boolean;
14
18
  hasPreviousPage: boolean;
15
- nextIconButtonProps?: any;
16
- onNextPage: () => void;
17
- onPreviousPage: () => void;
19
+ nextIconButtonProps?: BaseButtonProps<BProps>;
20
+ prevIconButtonProps?: BaseButtonProps<BProps>;
21
+ onNextPage?: () => void;
22
+ onPreviousPage?: () => void;
18
23
  }
19
24
 
20
- export const PaginationActions: React.FC<PaginationActionsProps> = ({
25
+ export const PaginationActions = <BProps,>({
21
26
  className,
22
27
  disabled,
23
28
  hasNextPage,
24
29
  hasPreviousPage,
25
30
  nextIconButtonProps,
26
- onNextPage,
27
- onPreviousPage,
31
+ prevIconButtonProps,
32
+ onNextPage = () => {},
33
+ onPreviousPage = () => {},
28
34
  ...other
29
- }) => {
35
+ }: PaginationActionsProps<BProps>) => {
30
36
  const classes = useStyles();
31
37
 
32
38
  const { direction, themeType } = useTheme();
@@ -47,6 +53,7 @@ export const PaginationActions: React.FC<PaginationActionsProps> = ({
47
53
  disabled={previousDisabled}
48
54
  data-test="button-pagination-back"
49
55
  aria-label="previous page"
56
+ {...prevIconButtonProps}
50
57
  >
51
58
  {direction === "rtl" ? <ChevronRight /> : <ChevronLeft />}
52
59
  </ButtonBase>
@@ -15,39 +15,40 @@ export interface PaginationRowNumberSelectProps {
15
15
  onChange?: (value: number) => void;
16
16
  }
17
17
 
18
- export const PaginationRowNumberSelect: React.FC<PaginationRowNumberSelectProps> =
19
- ({ className, choices, disabled, labels, rowNumber, onChange }) => {
20
- const classes = useStyles({});
18
+ export const PaginationRowNumberSelect: React.FC<
19
+ PaginationRowNumberSelectProps
20
+ > = ({ className, choices, disabled, labels, rowNumber, onChange }) => {
21
+ const classes = useStyles({});
21
22
 
22
- return (
23
- <div className={clsx(classes.rowNumber, className)}>
24
- <span className={classes.rowNumberLabel}>{labels.noOfRows}</span>
25
- {onChange ? (
26
- <Select
27
- data-test-id="PaginationRowNumberSelect"
28
- disabled={disabled}
29
- inputProps={{
30
- className: classes.rowNumberSelectLabel,
31
- }}
32
- className={classes.rowNumberSelect}
33
- value={rowNumber}
34
- onChange={(event) => onChange(event.target.value as number)}
35
- >
36
- {choices.length > 0 &&
37
- choices.map((choice) => (
38
- <MenuItem
39
- value={choice}
40
- key={choice}
41
- data-test-id="rowNumberOption"
42
- >
43
- {choice}
44
- </MenuItem>
45
- ))}
46
- </Select>
47
- ) : (
48
- ` ${rowNumber}`
49
- )}
50
- </div>
51
- );
52
- };
23
+ return (
24
+ <div className={clsx(classes.rowNumber, className)}>
25
+ <span className={classes.rowNumberLabel}>{labels.noOfRows}</span>
26
+ {onChange ? (
27
+ <Select
28
+ data-test-id="PaginationRowNumberSelect"
29
+ disabled={disabled}
30
+ inputProps={{
31
+ className: classes.rowNumberSelectLabel,
32
+ }}
33
+ className={classes.rowNumberSelect}
34
+ value={rowNumber}
35
+ onChange={(event) => onChange(event.target.value as number)}
36
+ >
37
+ {choices.length > 0 &&
38
+ choices.map((choice) => (
39
+ <MenuItem
40
+ value={choice}
41
+ key={choice}
42
+ data-test-id="rowNumberOption"
43
+ >
44
+ {choice}
45
+ </MenuItem>
46
+ ))}
47
+ </Select>
48
+ ) : (
49
+ ` ${rowNumber}`
50
+ )}
51
+ </div>
52
+ );
53
+ };
53
54
  PaginationRowNumberSelect.displayName = "PaginationRowNumberSelect";
@@ -0,0 +1,54 @@
1
+ import { Side } from "@floating-ui/react-dom-interactions";
2
+ import clsx from "clsx";
3
+ import React, { forwardRef } from "react";
4
+
5
+ import { useTheme } from "../theme";
6
+ import { useArrowStyles } from "./styles";
7
+ import { TooltipProps } from "./Tooltip";
8
+
9
+ interface ArrowProps {
10
+ x: number | undefined;
11
+ y: number | undefined;
12
+ side: Side;
13
+ variant: TooltipProps["variant"];
14
+ }
15
+
16
+ export const Arrow = forwardRef<HTMLDivElement, ArrowProps>(
17
+ ({ x, y, side, variant }, ref) => {
18
+ const { themeType } = useTheme();
19
+ const classes = useArrowStyles({ variant, side });
20
+
21
+ return (
22
+ <div
23
+ className={clsx(
24
+ classes.arrowContainer,
25
+ themeType === "dark" && classes.dark
26
+ )}
27
+ ref={ref}
28
+ style={{
29
+ top: y ?? "",
30
+ left: x ?? "",
31
+ }}
32
+ >
33
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 8" fill="none">
34
+ <path
35
+ className={classes.backgroundPath}
36
+ fillRule="evenodd"
37
+ d="M12.25 7 8.6 2.133a2 2 0 0 0-3.2 0L1.75 7h10.5Z"
38
+ clipRule="evenodd"
39
+ />
40
+ <path
41
+ className={classes.borderPath}
42
+ fillRule="evenodd"
43
+ d="M5.8 2.433c.6-.8 1.8-.8 2.4 0L11.25 6.5h1.25L9 1.833a2.5 2.5 0 0 0-4 0L1.5 6.5h1.25L5.8 2.433Z"
44
+ clipRule="evenodd"
45
+ />
46
+ <path
47
+ className={classes.backgroundPath}
48
+ d="M12.5 6.5h-11l-.75 1h12.5l-.75-1Z"
49
+ />
50
+ </svg>
51
+ </div>
52
+ );
53
+ }
54
+ );
@@ -1,19 +1,82 @@
1
1
  import { Meta, Story } from "@storybook/react";
2
+ import isChromatic from "chromatic/isChromatic";
2
3
  import React from "react";
3
4
 
4
5
  import { SquareButton } from "../SquareButton";
6
+ import { makeStyles } from "../theme";
7
+ import { Decorator } from "../utils/Decorator";
5
8
  import { Tooltip, TooltipProps } from "./Tooltip";
6
9
 
7
- const props: TooltipProps = {
8
- title: "Tooltip",
9
- children: <SquareButton>Hover</SquareButton>,
10
+ const Template: Story<TooltipProps> = (args) => {
11
+ return <Tooltip {...args} />;
12
+ };
13
+
14
+ export const Default = Template.bind({});
15
+ Default.args = {
16
+ variant: undefined,
17
+ };
18
+
19
+ export const WithHeader = Template.bind({});
20
+ WithHeader.args = {
21
+ variant: undefined,
22
+ header: "App Permissions",
23
+ };
24
+
25
+ export const Success = Template.bind({});
26
+ Success.args = {
27
+ variant: "success",
10
28
  };
11
29
 
12
- export const Info: Story = () => <Tooltip variant="info" {...props} />;
13
- export const Success: Story = () => <Tooltip variant="success" {...props} />;
14
- export const Error: Story = () => <Tooltip variant="error" {...props} />;
15
- export const Warning: Story = () => <Tooltip variant="warning" {...props} />;
30
+ export const Error = Template.bind({});
31
+ Error.args = {
32
+ variant: "error",
33
+ };
34
+
35
+ export const Warning = Template.bind({});
36
+ Warning.args = {
37
+ variant: "warning",
38
+ };
39
+
40
+ const useStyles = makeStyles({
41
+ pageWrapper: {
42
+ display: "flex",
43
+ width: "210vw",
44
+ height: "150vh",
45
+ },
46
+ storyWrapper: {
47
+ paddingTop: "10%",
48
+ paddingLeft: "90vw",
49
+ },
50
+ tip: {
51
+ position: "static",
52
+ left: "12px",
53
+ top: "12px",
54
+ },
55
+ });
56
+
57
+ const TooltipDecorator = (storyFn: any) => {
58
+ const classes = useStyles();
59
+
60
+ if (isChromatic()) {
61
+ return storyFn();
62
+ }
63
+
64
+ return (
65
+ <div className={classes.pageWrapper}>
66
+ <div className={classes.tip}>Scroll to right to test tooltip</div>
67
+ <div className={classes.storyWrapper}>{storyFn()}</div>
68
+ </div>
69
+ );
70
+ };
16
71
 
17
72
  export default {
18
73
  title: "Tooltip",
19
- } as Meta;
74
+ component: Tooltip,
75
+ args: {
76
+ title: "Tooltip",
77
+ children: <SquareButton>Hover</SquareButton>,
78
+ placement: "top-start",
79
+ open: isChromatic() ? true : undefined,
80
+ },
81
+ decorators: [TooltipDecorator, Decorator],
82
+ } as Meta<TooltipProps>;