@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.
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +3 -3
- package/dist/types/CircleIndicator/CircleIndicator.d.ts +2 -0
- package/dist/types/Indicator/Circle.d.ts +5 -0
- package/dist/types/Indicator/CircleFilled.d.ts +8 -0
- package/dist/types/Indicator/CircleOutline.d.ts +8 -0
- package/dist/types/Indicator/Indicator.d.ts +14 -0
- package/dist/types/Indicator/Indicator.stories.d.ts +11 -0
- package/dist/types/Indicator/IndicatorCircle.d.ts +7 -0
- package/dist/types/Indicator/IndicatorCircle.stories.d.ts +7 -0
- package/dist/types/Indicator/IndicatorOutlined.d.ts +9 -0
- package/dist/types/Indicator/IndicatorOutlined.stories.d.ts +18 -0
- package/dist/types/Indicator/index.d.ts +3 -0
- package/dist/types/Indicator/styles.d.ts +5 -0
- package/dist/types/Pagination/Pagination.d.ts +5 -2
- package/dist/types/Pagination/PaginationActions.d.ts +16 -5
- package/dist/types/Tooltip/Arrow.d.ts +11 -0
- package/dist/types/Tooltip/Tooltip.d.ts +17 -3
- package/dist/types/Tooltip/Tooltip.stories.d.ts +7 -5
- package/dist/types/Tooltip/TooltipMountWrapper.d.ts +8 -0
- package/dist/types/Tooltip/index.d.ts +1 -0
- package/dist/types/Tooltip/styles.d.ts +10 -1
- package/dist/types/icons/20x20/BackSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/BookmarksSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/CheckboxSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/ChevronSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/CloseSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/DragSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/FilterSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/MinusSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/MoreSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/NextSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/PlusSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/SearchSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/SortBigSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/SortSmallSmallIcon.d.ts +10 -0
- package/dist/types/icons/20x20/index.d.ts +14 -0
- package/dist/types/icons/24x24/AddEnvironmentIcon.d.ts +10 -0
- package/dist/types/icons/24x24/AppsIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ArrowRightIcon.d.ts +10 -0
- package/dist/types/icons/24x24/BackspaceIcon.d.ts +10 -0
- package/dist/types/icons/24x24/BagIcon.d.ts +10 -0
- package/dist/types/icons/24x24/BillingIcon.d.ts +10 -0
- package/dist/types/icons/24x24/BookmarkIcon.d.ts +10 -0
- package/dist/types/icons/24x24/CalendarIcon.d.ts +10 -0
- package/dist/types/icons/24x24/CheckIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ChevronIcon.d.ts +10 -0
- package/dist/types/icons/24x24/Close2Icon.d.ts +10 -0
- package/dist/types/icons/24x24/CloseIcon.d.ts +10 -0
- package/dist/types/icons/24x24/CodeIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ColumnsIcon.d.ts +10 -0
- package/dist/types/icons/24x24/CopyIcon.d.ts +10 -0
- package/dist/types/icons/24x24/CustomersIcon.d.ts +10 -0
- package/dist/types/icons/24x24/DashboardIcon.d.ts +10 -0
- package/dist/types/icons/24x24/DeleteIcon.d.ts +10 -0
- package/dist/types/icons/24x24/DeveloperIcon.d.ts +10 -0
- package/dist/types/icons/24x24/DiscountsIcon.d.ts +10 -0
- package/dist/types/icons/24x24/DownloadIcon.d.ts +10 -0
- package/dist/types/icons/24x24/DragIcon.d.ts +10 -0
- package/dist/types/icons/24x24/EditIcon.d.ts +10 -0
- package/dist/types/icons/24x24/EnvironmentIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ExpandIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ExpendableIcon.d.ts +10 -0
- package/dist/types/icons/24x24/EyeClosedIcon.d.ts +10 -0
- package/dist/types/icons/24x24/EyeIcon.d.ts +10 -0
- package/dist/types/icons/24x24/FilteringIcon.d.ts +10 -0
- package/dist/types/icons/24x24/GenerateIcon.d.ts +10 -0
- package/dist/types/icons/24x24/GithubIcon.d.ts +10 -0
- package/dist/types/icons/24x24/GridIcon.d.ts +10 -0
- package/dist/types/icons/24x24/HelpIcon.d.ts +10 -0
- package/dist/types/icons/24x24/HowToIcon.d.ts +10 -0
- package/dist/types/icons/24x24/LinkIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ListIcon.d.ts +10 -0
- package/dist/types/icons/24x24/MailIcon.d.ts +10 -0
- package/dist/types/icons/24x24/MigrateIcon.d.ts +10 -0
- package/dist/types/icons/24x24/MinusIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ModelsIcon.d.ts +10 -0
- package/dist/types/icons/24x24/MoreHorizontalIcon.d.ts +10 -0
- package/dist/types/icons/24x24/NavigationIcon.d.ts +10 -0
- package/dist/types/icons/24x24/NavigatorIcon.d.ts +10 -0
- package/dist/types/icons/24x24/NextIcon.d.ts +10 -0
- package/dist/types/icons/24x24/NoConnectionIcon.d.ts +10 -0
- package/dist/types/icons/24x24/NotificationsIcon.d.ts +10 -0
- package/dist/types/icons/24x24/OrdersIcon.d.ts +10 -0
- package/dist/types/icons/24x24/PagesIcon.d.ts +10 -0
- package/dist/types/icons/24x24/PermissionsIcon.d.ts +10 -0
- package/dist/types/icons/24x24/PhotoIcon.d.ts +10 -0
- package/dist/types/icons/24x24/PlayIcon.d.ts +10 -0
- package/dist/types/icons/24x24/PlusIcon.d.ts +10 -0
- package/dist/types/icons/24x24/PresetIcon.d.ts +10 -0
- package/dist/types/icons/24x24/PreviousIcon.d.ts +10 -0
- package/dist/types/icons/24x24/PrinterIcon.d.ts +10 -0
- package/dist/types/icons/24x24/PrivacyIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ProcessIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ProductIcon.d.ts +10 -0
- package/dist/types/icons/24x24/RefreshIcon.d.ts +10 -0
- package/dist/types/icons/24x24/RemoveMemberIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ReplyIcon.d.ts +10 -0
- package/dist/types/icons/24x24/SearchIcon.d.ts +10 -0
- package/dist/types/icons/24x24/SettingsIcon.d.ts +10 -0
- package/dist/types/icons/24x24/SnapshotsIcon.d.ts +10 -0
- package/dist/types/icons/24x24/SortDownIcon.d.ts +10 -0
- package/dist/types/icons/24x24/SortUpIcon.d.ts +10 -0
- package/dist/types/icons/24x24/TasksIcon.d.ts +10 -0
- package/dist/types/icons/24x24/TimeIcon.d.ts +10 -0
- package/dist/types/icons/24x24/ToIcon.d.ts +10 -0
- package/dist/types/icons/24x24/TransferIcon.d.ts +10 -0
- package/dist/types/icons/24x24/TranslateIcon.d.ts +10 -0
- package/dist/types/icons/24x24/TranslationIcon.d.ts +10 -0
- package/dist/types/icons/24x24/WebsiteIcon.d.ts +10 -0
- package/dist/types/icons/24x24/WifiIcon.d.ts +10 -0
- package/dist/types/icons/24x24/index.d.ts +74 -0
- package/dist/types/icons/32x32/AttributesLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/CustomerLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/DigitalLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/DiscountLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/FilteringLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/GiftCardLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/NavigationLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/NotesLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/OmnichannelLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/PermissionLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/ProductLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/SearchLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/ShippingLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/SiteSettingsLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/StaffMembersLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/TaxesLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/TokenLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/WarehouseLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/WifiLargeIcon.d.ts +10 -0
- package/dist/types/icons/32x32/index.d.ts +19 -0
- package/dist/types/icons/index.d.ts +9 -67
- package/dist/types/icons/indicator/index.d.ts +2 -0
- package/dist/types/icons/indicator/regular/ErrorIndicatorIcon.d.ts +2 -0
- package/dist/types/icons/indicator/regular/FailIndicatorIcon.d.ts +2 -0
- package/dist/types/icons/indicator/regular/FailOutlineIndicatorIcon.d.ts +2 -0
- package/dist/types/icons/indicator/regular/HelpIndicatorIcon.d.ts +2 -0
- package/dist/types/icons/indicator/regular/SuccessIndicatorIcon.d.ts +2 -0
- package/dist/types/icons/indicator/regular/WarningIndicatorIcon.d.ts +2 -0
- package/dist/types/icons/indicator/regular/index.d.ts +6 -0
- package/dist/types/icons/indicator/small/ErrorSmallIndicatorIcon.d.ts +2 -0
- package/dist/types/icons/indicator/small/SuccessSmallIndicatorIcon.d.ts +2 -0
- package/dist/types/icons/indicator/small/WarningSmallIndicatorIcon.d.ts +2 -0
- package/dist/types/icons/indicator/small/index.d.ts +3 -0
- package/dist/types/icons/styles.d.ts +1 -0
- package/dist/types/icons/types.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/mergeRefs.d.ts +1 -1
- package/package.json +21 -8
- package/src/CircleIndicator/CircleIndicator.tsx +2 -0
- package/src/Filter/FilterField/MultipleValueAutocompleteFilterField.tsx +42 -41
- package/src/Indicator/Circle.tsx +17 -0
- package/src/Indicator/CircleFilled.tsx +16 -0
- package/src/Indicator/CircleOutline.tsx +34 -0
- package/src/Indicator/Indicator.stories.tsx +49 -0
- package/src/Indicator/Indicator.tsx +65 -0
- package/src/Indicator/IndicatorCircle.stories.tsx +28 -0
- package/src/Indicator/IndicatorCircle.tsx +45 -0
- package/src/Indicator/IndicatorOutlined.stories.tsx +86 -0
- package/src/Indicator/IndicatorOutlined.tsx +63 -0
- package/src/Indicator/index.ts +3 -0
- package/src/Indicator/styles.ts +61 -0
- package/src/MultipleValueAutocomplete/MultipleValueAutocomplete.tsx +134 -133
- package/src/Pagination/Pagination.tsx +6 -4
- package/src/Pagination/PaginationActions.tsx +16 -9
- package/src/Pagination/PaginationRowNumberSelect.tsx +35 -34
- package/src/Tooltip/Arrow.tsx +54 -0
- package/src/Tooltip/Tooltip.stories.tsx +71 -8
- package/src/Tooltip/Tooltip.tsx +156 -15
- package/src/Tooltip/TooltipMountWrapper.tsx +25 -0
- package/src/Tooltip/index.ts +1 -0
- package/src/Tooltip/styles.ts +133 -9
- package/src/assets/icons/20x20/back_small_icon.svg +1 -0
- package/src/assets/icons/20x20/bookmarks_small_icon.svg +1 -0
- package/src/assets/icons/20x20/checkbox_small_icon.svg +1 -0
- package/src/assets/icons/20x20/chevron_small_icon.svg +1 -0
- package/src/assets/icons/20x20/close_small_icon.svg +1 -0
- package/src/assets/icons/20x20/drag_small_icon.svg +1 -0
- package/src/assets/icons/20x20/filter_small_icon.svg +1 -0
- package/src/assets/icons/20x20/minus_small_icon.svg +1 -0
- package/src/assets/icons/20x20/more_small_icon.svg +1 -0
- package/src/assets/icons/20x20/next_small_icon.svg +1 -0
- package/src/assets/icons/20x20/plus_small_icon.svg +1 -0
- package/src/assets/icons/20x20/search_small_icon.svg +1 -0
- package/src/assets/icons/20x20/sort_big_small_icon.svg +1 -0
- package/src/assets/icons/20x20/sort_small_small_icon.svg +1 -0
- package/src/assets/icons/24x24/add_environment_icon.svg +1 -0
- package/src/assets/icons/24x24/apps_icon.svg +1 -0
- package/src/assets/icons/24x24/arrow_right_icon.svg +1 -0
- package/src/assets/icons/24x24/backspace_icon.svg +1 -0
- package/src/assets/icons/24x24/bag_icon.svg +1 -0
- package/src/assets/icons/24x24/billing_icon.svg +1 -0
- package/src/assets/icons/24x24/bookmark_icon.svg +1 -0
- package/src/assets/icons/24x24/calendar_icon.svg +1 -0
- package/src/assets/icons/24x24/check_icon.svg +1 -0
- package/src/assets/icons/24x24/chevron_icon.svg +1 -0
- package/src/assets/icons/24x24/close_2_icon.svg +1 -0
- package/src/assets/icons/24x24/close_icon.svg +1 -0
- package/src/assets/icons/24x24/code_icon.svg +1 -0
- package/src/assets/icons/24x24/columns_icon.svg +1 -0
- package/src/assets/icons/24x24/copy_icon.svg +1 -0
- package/src/assets/icons/24x24/customers_icon.svg +1 -0
- package/src/assets/icons/24x24/dashboard_icon.svg +1 -0
- package/src/assets/icons/24x24/delete_icon.svg +1 -0
- package/src/assets/icons/24x24/developer_icon.svg +1 -0
- package/src/assets/icons/24x24/discounts_icon.svg +1 -0
- package/src/assets/icons/24x24/download_icon.svg +1 -0
- package/src/assets/icons/24x24/drag_icon.svg +1 -0
- package/src/assets/icons/24x24/edit_icon.svg +1 -0
- package/src/assets/icons/24x24/environment_icon.svg +1 -0
- package/src/assets/icons/24x24/expand_icon.svg +1 -0
- package/src/assets/icons/24x24/expendable_icon.svg +1 -0
- package/src/assets/icons/24x24/eye_closed_icon.svg +1 -0
- package/src/assets/icons/24x24/eye_icon.svg +1 -0
- package/src/assets/icons/24x24/filtering_icon.svg +1 -0
- package/src/assets/icons/24x24/generate_icon.svg +1 -0
- package/src/assets/icons/24x24/github_icon.svg +1 -0
- package/src/assets/icons/24x24/grid_icon.svg +1 -0
- package/src/assets/icons/24x24/help_icon.svg +1 -0
- package/src/assets/icons/24x24/how to_icon.svg +1 -0
- package/src/assets/icons/24x24/link_icon.svg +1 -0
- package/src/assets/icons/24x24/list_icon.svg +1 -0
- package/src/assets/icons/24x24/mail_icon.svg +1 -0
- package/src/assets/icons/24x24/migrate_icon.svg +1 -0
- package/src/assets/icons/24x24/minus_icon.svg +1 -0
- package/src/assets/icons/24x24/models_icon.svg +1 -0
- package/src/assets/icons/24x24/more_horizontal_icon.svg +1 -0
- package/src/assets/icons/24x24/navigation_icon.svg +1 -0
- package/src/assets/icons/24x24/navigator_icon.svg +1 -0
- package/src/assets/icons/24x24/next_icon.svg +1 -0
- package/src/assets/icons/24x24/no_connection_icon.svg +1 -0
- package/src/assets/icons/24x24/notifications_icon.svg +1 -0
- package/src/assets/icons/24x24/orders_icon.svg +1 -0
- package/src/assets/icons/24x24/pages_icon.svg +1 -0
- package/src/assets/icons/24x24/permissions_icon.svg +1 -0
- package/src/assets/icons/24x24/photo_icon.svg +1 -0
- package/src/assets/icons/24x24/play_icon.svg +1 -0
- package/src/assets/icons/24x24/plus_icon.svg +1 -0
- package/src/assets/icons/24x24/preset_icon.svg +1 -0
- package/src/assets/icons/24x24/previous_icon.svg +1 -0
- package/src/assets/icons/24x24/printer_icon.svg +1 -0
- package/src/assets/icons/24x24/privacy_icon.svg +1 -0
- package/src/assets/icons/24x24/process_icon.svg +1 -0
- package/src/assets/icons/24x24/product_icon.svg +1 -0
- package/src/assets/icons/24x24/refresh_icon.svg +1 -0
- package/src/assets/icons/24x24/remove_member_icon.svg +1 -0
- package/src/assets/icons/24x24/reply_icon.svg +1 -0
- package/src/assets/icons/24x24/search_icon.svg +1 -0
- package/src/assets/icons/24x24/settings_icon.svg +1 -0
- package/src/assets/icons/24x24/snapshots_icon.svg +1 -0
- package/src/assets/icons/24x24/sort_down_icon.svg +1 -0
- package/src/assets/icons/24x24/sort_up_icon.svg +1 -0
- package/src/assets/icons/24x24/tasks_icon.svg +1 -0
- package/src/assets/icons/24x24/time_icon.svg +1 -0
- package/src/assets/icons/24x24/to_icon.svg +1 -0
- package/src/assets/icons/24x24/transfer_icon.svg +1 -0
- package/src/assets/icons/24x24/translate_icon.svg +1 -0
- package/src/assets/icons/24x24/translation_icon.svg +1 -0
- package/src/assets/icons/24x24/website_icon.svg +1 -0
- package/src/assets/icons/24x24/wifi_icon.svg +1 -0
- package/src/assets/icons/32x32/attributes_large_icon.svg +1 -0
- package/src/assets/icons/32x32/customer_large_icon.svg +1 -0
- package/src/assets/icons/32x32/digital_large_icon.svg +1 -0
- package/src/assets/icons/32x32/discount_large_icon.svg +1 -0
- package/src/assets/icons/32x32/filtering_large_icon.svg +1 -0
- package/src/assets/icons/32x32/gift card_large_icon.svg +1 -0
- package/src/assets/icons/32x32/navigation_large_icon.svg +1 -0
- package/src/assets/icons/32x32/notes_large_icon.svg +1 -0
- package/src/assets/icons/32x32/omnichannel_large_icon.svg +1 -0
- package/src/assets/icons/32x32/permission_large_icon.svg +1 -0
- package/src/assets/icons/32x32/product_large_icon.svg +1 -0
- package/src/assets/icons/32x32/search_large_icon.svg +1 -0
- package/src/assets/icons/32x32/shipping_large_icon.svg +1 -0
- package/src/assets/icons/32x32/site settings_large_icon.svg +1 -0
- package/src/assets/icons/32x32/staff members_large_icon.svg +1 -0
- package/src/assets/icons/32x32/taxes_large_icon.svg +1 -0
- package/src/assets/icons/32x32/token_large_icon.svg +1 -0
- package/src/assets/icons/32x32/warehouse_large_icon.svg +1 -0
- package/src/assets/icons/32x32/wifi_large_icon.svg +1 -0
- package/src/assets/icons/indicator/regular/error_indicator_icon.svg +1 -0
- package/src/assets/icons/indicator/regular/fail_indicator_icon.svg +1 -0
- package/src/assets/icons/indicator/regular/fail_outline_indicator_icon.svg +1 -0
- package/src/assets/icons/indicator/regular/help_indicator_icon.svg +1 -0
- package/src/assets/icons/indicator/regular/success_indicator_icon.svg +1 -0
- package/src/assets/icons/indicator/regular/warning_indicator_icon.svg +1 -0
- package/src/assets/icons/indicator/small/error_small_indicator_icon.svg +1 -0
- package/src/assets/icons/indicator/small/success_small_indicator_icon.svg +1 -0
- package/src/assets/icons/indicator/small/warning_small_indicator_icon.svg +1 -0
- package/src/icons/20x20/BackSmallIcon.tsx +32 -0
- package/src/icons/20x20/BookmarksSmallIcon.tsx +29 -0
- package/src/icons/20x20/CheckboxSmallIcon.tsx +32 -0
- package/src/icons/20x20/ChevronSmallIcon.tsx +32 -0
- package/src/icons/20x20/CloseSmallIcon.tsx +31 -0
- package/src/icons/20x20/DragSmallIcon.tsx +31 -0
- package/src/icons/20x20/FilterSmallIcon.tsx +31 -0
- package/src/icons/20x20/MinusSmallIcon.tsx +32 -0
- package/src/icons/20x20/MoreSmallIcon.tsx +31 -0
- package/src/icons/20x20/NextSmallIcon.tsx +32 -0
- package/src/icons/20x20/PlusSmallIcon.tsx +32 -0
- package/src/icons/20x20/SearchSmallIcon.tsx +31 -0
- package/src/icons/20x20/SortBigSmallIcon.tsx +31 -0
- package/src/icons/20x20/SortSmallSmallIcon.tsx +31 -0
- package/src/icons/20x20/index.ts +14 -0
- package/src/icons/24x24/AddEnvironmentIcon.tsx +32 -0
- package/src/icons/24x24/AppsIcon.tsx +31 -0
- package/src/icons/24x24/ArrowRightIcon.tsx +32 -0
- package/src/icons/24x24/BackspaceIcon.tsx +32 -0
- package/src/icons/24x24/BagIcon.tsx +29 -0
- package/src/icons/24x24/BillingIcon.tsx +32 -0
- package/src/icons/24x24/BookmarkIcon.tsx +29 -0
- package/src/icons/24x24/CalendarIcon.tsx +32 -0
- package/src/icons/24x24/CheckIcon.tsx +32 -0
- package/src/icons/24x24/ChevronIcon.tsx +32 -0
- package/src/icons/24x24/Close2Icon.tsx +39 -0
- package/src/icons/24x24/CloseIcon.tsx +31 -0
- package/src/icons/24x24/CodeIcon.tsx +38 -0
- package/src/icons/24x24/ColumnsIcon.tsx +30 -0
- package/src/icons/24x24/CopyIcon.tsx +39 -0
- package/src/icons/24x24/CustomersIcon.tsx +33 -0
- package/src/icons/24x24/DashboardIcon.tsx +30 -0
- package/src/icons/24x24/DeleteIcon.tsx +32 -0
- package/src/icons/24x24/DeveloperIcon.tsx +44 -0
- package/src/icons/24x24/DiscountsIcon.tsx +31 -0
- package/src/icons/24x24/DownloadIcon.tsx +32 -0
- package/src/icons/24x24/DragIcon.tsx +31 -0
- package/src/icons/24x24/EditIcon.tsx +36 -0
- package/src/icons/24x24/EnvironmentIcon.tsx +36 -0
- package/src/icons/24x24/ExpandIcon.tsx +39 -0
- package/src/icons/24x24/ExpendableIcon.tsx +34 -0
- package/src/icons/24x24/EyeClosedIcon.tsx +30 -0
- package/src/icons/24x24/EyeIcon.tsx +31 -0
- package/src/icons/24x24/FilteringIcon.tsx +32 -0
- package/src/icons/24x24/GenerateIcon.tsx +32 -0
- package/src/icons/24x24/GithubIcon.tsx +40 -0
- package/src/icons/24x24/GridIcon.tsx +61 -0
- package/src/icons/24x24/HelpIcon.tsx +35 -0
- package/src/icons/24x24/HowToIcon.tsx +39 -0
- package/src/icons/24x24/LinkIcon.tsx +32 -0
- package/src/icons/24x24/ListIcon.tsx +34 -0
- package/src/icons/24x24/MailIcon.tsx +31 -0
- package/src/icons/24x24/MigrateIcon.tsx +36 -0
- package/src/icons/24x24/MinusIcon.tsx +32 -0
- package/src/icons/24x24/ModelsIcon.tsx +38 -0
- package/src/icons/24x24/MoreHorizontalIcon.tsx +31 -0
- package/src/icons/24x24/NavigationIcon.tsx +31 -0
- package/src/icons/24x24/NavigatorIcon.tsx +32 -0
- package/src/icons/24x24/NextIcon.tsx +32 -0
- package/src/icons/24x24/NoConnectionIcon.tsx +36 -0
- package/src/icons/24x24/NotificationsIcon.tsx +32 -0
- package/src/icons/24x24/OrdersIcon.tsx +36 -0
- package/src/icons/24x24/PagesIcon.tsx +32 -0
- package/src/icons/24x24/PermissionsIcon.tsx +32 -0
- package/src/icons/24x24/PhotoIcon.tsx +32 -0
- package/src/icons/24x24/PlayIcon.tsx +31 -0
- package/src/icons/24x24/PlusIcon.tsx +32 -0
- package/src/icons/24x24/PresetIcon.tsx +35 -0
- package/src/icons/24x24/PreviousIcon.tsx +32 -0
- package/src/icons/24x24/PrinterIcon.tsx +32 -0
- package/src/icons/24x24/PrivacyIcon.tsx +39 -0
- package/src/icons/24x24/ProcessIcon.tsx +73 -0
- package/src/icons/24x24/ProductIcon.tsx +32 -0
- package/src/icons/24x24/RefreshIcon.tsx +32 -0
- package/src/icons/24x24/RemoveMemberIcon.tsx +34 -0
- package/src/icons/24x24/ReplyIcon.tsx +32 -0
- package/src/icons/24x24/SearchIcon.tsx +39 -0
- package/src/icons/24x24/SettingsIcon.tsx +34 -0
- package/src/icons/24x24/SnapshotsIcon.tsx +39 -0
- package/src/icons/24x24/SortDownIcon.tsx +31 -0
- package/src/icons/24x24/SortUpIcon.tsx +31 -0
- package/src/icons/24x24/TasksIcon.tsx +32 -0
- package/src/icons/24x24/TimeIcon.tsx +39 -0
- package/src/icons/24x24/ToIcon.tsx +32 -0
- package/src/icons/24x24/TransferIcon.tsx +32 -0
- package/src/icons/24x24/TranslateIcon.tsx +32 -0
- package/src/icons/24x24/TranslationIcon.tsx +33 -0
- package/src/icons/24x24/WebsiteIcon.tsx +53 -0
- package/src/icons/24x24/WifiIcon.tsx +32 -0
- package/src/icons/24x24/index.ts +74 -0
- package/src/icons/32x32/AttributesLargeIcon.tsx +36 -0
- package/src/icons/32x32/CustomerLargeIcon.tsx +38 -0
- package/src/icons/32x32/DigitalLargeIcon.tsx +31 -0
- package/src/icons/32x32/DiscountLargeIcon.tsx +35 -0
- package/src/icons/32x32/FilteringLargeIcon.tsx +32 -0
- package/src/icons/32x32/GiftCardLargeIcon.tsx +44 -0
- package/src/icons/32x32/NavigationLargeIcon.tsx +39 -0
- package/src/icons/32x32/NotesLargeIcon.tsx +53 -0
- package/src/icons/32x32/OmnichannelLargeIcon.tsx +64 -0
- package/src/icons/32x32/PermissionLargeIcon.tsx +39 -0
- package/src/icons/32x32/ProductLargeIcon.tsx +31 -0
- package/src/icons/32x32/SearchLargeIcon.tsx +39 -0
- package/src/icons/32x32/ShippingLargeIcon.tsx +32 -0
- package/src/icons/32x32/SiteSettingsLargeIcon.tsx +32 -0
- package/src/icons/32x32/StaffMembersLargeIcon.tsx +40 -0
- package/src/icons/32x32/TaxesLargeIcon.tsx +55 -0
- package/src/icons/32x32/TokenLargeIcon.tsx +38 -0
- package/src/icons/32x32/WarehouseLargeIcon.tsx +32 -0
- package/src/icons/32x32/WifiLargeIcon.tsx +32 -0
- package/src/icons/32x32/index.ts +19 -0
- package/src/icons/index.ts +12 -67
- package/src/icons/indicator/index.ts +2 -0
- package/src/icons/indicator/regular/ErrorIndicatorIcon.tsx +24 -0
- package/src/icons/indicator/regular/FailIndicatorIcon.tsx +31 -0
- package/src/icons/indicator/regular/FailOutlineIndicatorIcon.tsx +31 -0
- package/src/icons/indicator/regular/HelpIndicatorIcon.tsx +30 -0
- package/src/icons/indicator/regular/SuccessIndicatorIcon.tsx +24 -0
- package/src/icons/indicator/regular/WarningIndicatorIcon.tsx +23 -0
- package/src/icons/indicator/regular/index.ts +6 -0
- package/src/icons/indicator/small/ErrorSmallIndicatorIcon.tsx +24 -0
- package/src/icons/indicator/small/SuccessSmallIndicatorIcon.tsx +24 -0
- package/src/icons/indicator/small/WarningSmallIndicatorIcon.tsx +23 -0
- package/src/icons/indicator/small/index.ts +3 -0
- package/src/icons/styles.ts +10 -0
- package/src/icons/types.ts +3 -0
- package/src/index.tsx +1 -0
- package/src/utils/Decorator.tsx +1 -0
- package/src/utils/mergeRefs.ts +4 -4
- package/src/icons/AddEnvironmentIcon.tsx +0 -12
- package/src/icons/AppsIcon.tsx +0 -12
- package/src/icons/ArrowRightIcon.tsx +0 -12
- package/src/icons/AttributesLargeIcon.tsx +0 -15
- package/src/icons/BackspaceIcon.tsx +0 -12
- package/src/icons/BillingIcon.tsx +0 -12
- package/src/icons/CalendarIcon.tsx +0 -12
- package/src/icons/ChevronIcon.tsx +0 -14
- package/src/icons/Close2Icon.tsx +0 -12
- package/src/icons/CloseIcon.tsx +0 -12
- package/src/icons/ColumnsIcon.tsx +0 -12
- package/src/icons/CopyIcon.tsx +0 -12
- package/src/icons/CustomersIcon.tsx +0 -12
- package/src/icons/DashboardIcon.tsx +0 -12
- package/src/icons/DeleteIcon.tsx +0 -12
- package/src/icons/DeveloperIcon.tsx +0 -38
- package/src/icons/DigitalLargeIcon.tsx +0 -15
- package/src/icons/DiscountsIcon.tsx +0 -20
- package/src/icons/DiscountsLargeIcon.tsx +0 -26
- package/src/icons/DownloadIcon.tsx +0 -12
- package/src/icons/DragIcon.tsx +0 -12
- package/src/icons/EditIcon.tsx +0 -12
- package/src/icons/EnvironmentIcon.tsx +0 -12
- package/src/icons/ExpandIcon.tsx +0 -22
- package/src/icons/EyeIcon.tsx +0 -12
- package/src/icons/FilteringIcon.tsx +0 -12
- package/src/icons/FilteringLargeIcon.tsx +0 -15
- package/src/icons/HelpIcon.tsx +0 -12
- package/src/icons/LinkIcon.tsx +0 -12
- package/src/icons/MailIcon.tsx +0 -16
- package/src/icons/MinusIcon.tsx +0 -12
- package/src/icons/MoreHorizontalIcon.tsx +0 -12
- package/src/icons/NavigationIcon.tsx +0 -26
- package/src/icons/NavigationLargeIcon.tsx +0 -15
- package/src/icons/NavigatorIcon.tsx +0 -14
- package/src/icons/NextIcon.tsx +0 -14
- package/src/icons/NoConnectionIcon.tsx +0 -25
- package/src/icons/NotesLargeIcon.tsx +0 -38
- package/src/icons/NotificationsIcon.tsx +0 -12
- package/src/icons/OmnichannelLargeIcon.tsx +0 -15
- package/src/icons/OrdersIcon.tsx +0 -12
- package/src/icons/PagesIcon.tsx +0 -12
- package/src/icons/PermissionLargeIcon.tsx +0 -15
- package/src/icons/PhotoIcon.tsx +0 -12
- package/src/icons/PlusIcon.tsx +0 -12
- package/src/icons/PreviousIcon.tsx +0 -14
- package/src/icons/PrinterIcon.tsx +0 -15
- package/src/icons/PrivacyIcon.tsx +0 -15
- package/src/icons/ProductIcon.tsx +0 -12
- package/src/icons/ProductLargeIcon.tsx +0 -16
- package/src/icons/RefreshIcon.tsx +0 -14
- package/src/icons/ReplyIcon.tsx +0 -12
- package/src/icons/SearchIcon.tsx +0 -12
- package/src/icons/SettingsIcon.tsx +0 -15
- package/src/icons/ShippingLargeIcon.tsx +0 -15
- package/src/icons/SnapshotsIcon.tsx +0 -12
- package/src/icons/TaxesLargeIcon.tsx +0 -15
- package/src/icons/TimeIcon.tsx +0 -12
- package/src/icons/TokenLargeIcon.tsx +0 -17
- package/src/icons/TransferIcon.tsx +0 -22
- package/src/icons/TranslationIcon.tsx +0 -12
- package/src/icons/WarehouseLargeIcon.tsx +0 -15
- package/src/icons/WebsiteIcon.tsx +0 -22
- package/src/icons/WifiIcon.tsx +0 -23
- 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<
|
|
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
|
-
|
|
57
|
-
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
|
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
|
-
|
|
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?:
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
nextIconButtonProps?: BaseButtonProps<BProps>;
|
|
20
|
+
prevIconButtonProps?: BaseButtonProps<BProps>;
|
|
21
|
+
onNextPage?: () => void;
|
|
22
|
+
onPreviousPage?: () => void;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
|
-
export const PaginationActions
|
|
25
|
+
export const PaginationActions = <BProps,>({
|
|
21
26
|
className,
|
|
22
27
|
disabled,
|
|
23
28
|
hasNextPage,
|
|
24
29
|
hasPreviousPage,
|
|
25
30
|
nextIconButtonProps,
|
|
26
|
-
|
|
27
|
-
|
|
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<
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
export const PaginationRowNumberSelect: React.FC<
|
|
19
|
+
PaginationRowNumberSelectProps
|
|
20
|
+
> = ({ className, choices, disabled, labels, rowNumber, onChange }) => {
|
|
21
|
+
const classes = useStyles({});
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
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>;
|