From ea3123acaf70d30db5757beaecd1d87aa3305506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20=C5=BBuraw?= <9116238+krzysztofzuraw@users.noreply.github.com> Date: Fri, 19 May 2023 12:54:05 +0200 Subject: [PATCH] feat: migrate macaw ui to new spacing scale --- package-lock.json | 14 ++++----- package.json | 2 +- src/apps/components/AllAppList/AllAppList.tsx | 2 +- src/apps/components/AppAvatar/AppAvatar.tsx | 6 ++-- .../AppDetailsPage/HeaderOptions.tsx | 4 +-- .../AppInstallPage/AppInstallPage.tsx | 4 +-- .../components/AppListPage/AppListPage.tsx | 14 ++++----- .../AppListRow/AppListCardActions.tsx | 4 +-- .../AppListRow/AppListCardDescription.tsx | 6 ++-- .../AppListRow/AppListCardIntegrations.tsx | 12 ++++---- .../AppListRow/AppListCardLinks.tsx | 6 ++-- src/apps/components/AppListRow/AppListRow.tsx | 4 +-- src/apps/components/AppListRow/AppLogo.tsx | 4 +-- src/apps/components/AppPage/AppPageNav.tsx | 6 ++-- .../InstalledAppListRow/AppManifestUrl.tsx | 2 +- .../InstalledAppListRow.tsx | 14 ++++----- .../NotInstalledAppListRow.tsx | 6 ++-- .../components/ChannelForm/ChannelForm.tsx | 2 +- src/components/AppLayout/AppLayout.tsx | 8 ++--- src/components/AppLayout/LimitsInfo.tsx | 2 +- .../AppLayout/ListFilters/ListFilters.tsx | 8 ++--- src/components/AppLayout/TopNav/Menu.tsx | 6 ++-- .../AppLayout/TopNav/TopNavLink.tsx | 2 +- .../AppLayout/TopNav/TopNavWrapper.tsx | 4 +-- src/components/Attributes/AttributeRow.tsx | 6 ++-- src/components/Attributes/Attributes.tsx | 2 +- .../Attributes/BasicAttributeRow.tsx | 8 ++--- .../Attributes/ExtendedAttributeRow.tsx | 2 +- .../ButtonWithDropdown/ButtonWithDropdown.tsx | 6 ++-- src/components/Card/Content.tsx | 2 +- src/components/Card/Root.tsx | 2 +- src/components/Card/Title.tsx | 2 +- .../ChannelAvailabilityItemContent.tsx | 18 +++++------ .../ChannelAvailabilityItemWrapper.tsx | 4 +-- .../ChannelsAvailabilityCardWrapper.tsx | 6 ++-- src/components/Datagrid/Datagrid.tsx | 5 ++-- src/components/Datagrid/styles.ts | 6 ++-- .../DateTimeField/DateTimeField.tsx | 2 +- .../FileUploadField/FileUploadField.tsx | 2 +- .../FilterPresetsSelect/FilterPresetItem.tsx | 10 +++---- .../FilterPresetsSelect.tsx | 20 ++++++------- src/components/LimitReachedAlert.tsx | 2 +- src/components/Metadata/Metadata.tsx | 2 +- src/components/Metadata/MetadataCard.tsx | 14 ++++----- .../PageSectionHeader/PageSectionHeader.tsx | 2 +- src/components/SeoForm/SeoForm.tsx | 6 ++-- src/components/Sidebar/MountingPoint.tsx | 8 ++++- src/components/Sidebar/menu/Divider.tsx | 2 +- src/components/Sidebar/menu/ItemGroup.tsx | 18 +++++------ src/components/Sidebar/menu/Menu.tsx | 4 +-- src/components/Sidebar/menu/SingleItem.tsx | 6 ++-- .../Sidebar/menu/useMenuStructure.tsx | 2 +- src/components/Sidebar/user/Controls.tsx | 10 +++---- src/components/Sidebar/user/Info.tsx | 8 ++--- src/components/StatusDot/StatusDot.tsx | 4 +-- .../TableCellHeader/TableCellHeader.tsx | 2 +- src/configuration/ConfigurationPage.tsx | 2 +- .../CustomAppListPage/CustomAppListPage.tsx | 4 +-- .../PermissionAlert/PermissionAlert.tsx | 2 +- .../WebhookDetailsPage/WebhookDetailsPage.tsx | 2 +- .../CustomerAddressListPage.tsx | 2 +- .../GiftCardSettings/GiftCardSettingsPage.tsx | 2 +- .../GiftCardUpdate/GiftCardHistory/styles.ts | 8 ++--- .../HomeAnalyticsCard/HomeAnalyticsCard.tsx | 4 +-- .../HomeNotificationTable.tsx | 4 +-- src/home/components/HomePage/HomePage.tsx | 6 ++-- .../HomeProductListCard.tsx | 4 +-- .../MenuDetailsPage/MenuDetailsPage.tsx | 2 +- .../OrderChangeWarehouseDialog.tsx | 2 +- .../OrderDraftPage/OrderDraftPage.tsx | 2 +- .../components/OrderDraftPage/styles.ts | 2 +- .../ExtraInfoLines.tsx | 2 +- src/orders/components/OrderHistory/styles.ts | 4 +-- .../OrderInvoiceList/OrderInvoiceList.tsx | 2 +- .../OrderListDatagrid/OrderListDatagrid.tsx | 2 +- .../OrderListPage/OrderListPage.tsx | 4 +-- src/orders/components/OrderPayment/styles.ts | 2 +- .../PageTypeDetailsPage.tsx | 2 +- .../PermissionGroupMemberList.tsx | 2 +- .../ProductTypeDetailsPage.tsx | 2 +- .../ProductDetailsForm/ProductDetailsForm.tsx | 2 +- .../ProductListDatagrid.tsx | 2 +- .../ProductListPage/ProductListPage.tsx | 6 ++-- .../ProductListTiles/ProductListTiles.tsx | 10 +++---- .../components/ProductMedia/ProductMedia.tsx | 14 ++++----- .../ProductOrganization.tsx | 4 +-- .../ProductStocks/ProductStocks.tsx | 30 +++++++++---------- .../components/ProductTile/ProductTile.tsx | 16 +++++----- .../ProductVariantPrice.tsx | 4 +-- .../ShippingWeightUnitForm.tsx | 2 +- .../SiteSettingsPage/SiteSettingsPage.tsx | 2 +- src/staff/components/StaffList/StaffList.tsx | 2 +- .../pages/TaxChannelsPage/TaxChannelsPage.tsx | 2 +- .../pages/TaxClassesPage/TaxClassesPage.tsx | 2 +- .../TaxCountriesPage/TaxCountriesPage.tsx | 2 +- src/themeOverrides.ts | 2 +- .../TranslationsLanguageList.tsx | 2 +- 97 files changed, 257 insertions(+), 252 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7a7283ca75b..aeacb87fa3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@material-ui/lab": "^4.0.0-alpha.61", "@material-ui/styles": "^4.11.4", "@reach/auto-id": "^0.16.0", - "@saleor/macaw-ui": "0.8.0-pre.81", + "@saleor/macaw-ui": "0.8.0-pre.86", "@saleor/sdk": "0.6.0", "@sentry/react": "^6.0.0", "@types/faker": "^5.1.6", @@ -7950,9 +7950,9 @@ } }, "node_modules/@saleor/macaw-ui": { - "version": "0.8.0-pre.81", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-0.8.0-pre.81.tgz", - "integrity": "sha512-6s15zUyn82492DwMDNm0yI6uAzik8t/OlI+LrH23L3EgzcyzprbA7DYzwcV4C7vlCEiMxywLnfS/0b1RYnhM1w==", + "version": "0.8.0-pre.86", + "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-0.8.0-pre.86.tgz", + "integrity": "sha512-5mUmvfFgrKS3z+uuDtjmcPPE90fTUaxjw9QFa6naGbdqzxH8FDv8nm+7ktkuPkkNQdV1ydrIpWaW/yHY0U07BA==", "dependencies": { "@dessert-box/react": "^0.4.0", "@floating-ui/react-dom-interactions": "^0.5.0", @@ -41317,9 +41317,9 @@ } }, "@saleor/macaw-ui": { - "version": "0.8.0-pre.81", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-0.8.0-pre.81.tgz", - "integrity": "sha512-6s15zUyn82492DwMDNm0yI6uAzik8t/OlI+LrH23L3EgzcyzprbA7DYzwcV4C7vlCEiMxywLnfS/0b1RYnhM1w==", + "version": "0.8.0-pre.86", + "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-0.8.0-pre.86.tgz", + "integrity": "sha512-5mUmvfFgrKS3z+uuDtjmcPPE90fTUaxjw9QFa6naGbdqzxH8FDv8nm+7ktkuPkkNQdV1ydrIpWaW/yHY0U07BA==", "requires": { "@dessert-box/react": "^0.4.0", "@floating-ui/react-dom-interactions": "^0.5.0", diff --git a/package.json b/package.json index f939fbc926b..4670eb42969 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@material-ui/lab": "^4.0.0-alpha.61", "@material-ui/styles": "^4.11.4", "@reach/auto-id": "^0.16.0", - "@saleor/macaw-ui": "0.8.0-pre.81", + "@saleor/macaw-ui": "0.8.0-pre.86", "@saleor/sdk": "0.6.0", "@sentry/react": "^6.0.0", "@types/faker": "^5.1.6", diff --git a/src/apps/components/AllAppList/AllAppList.tsx b/src/apps/components/AllAppList/AllAppList.tsx index cbf7fcaf6a3..21f4775fd2e 100644 --- a/src/apps/components/AllAppList/AllAppList.tsx +++ b/src/apps/components/AllAppList/AllAppList.tsx @@ -27,7 +27,7 @@ const AllAppList: React.FC = ({ } return ( - + {appsPairs.map(appPair => ( = ({ if (!data) { return ( - +
@@ -39,7 +39,7 @@ const HeaderOptions: React.FC = ({ } return ( - +
= ({ return ( - + = ({ - + diff --git a/src/apps/components/AppListPage/AppListPage.tsx b/src/apps/components/AppListPage/AppListPage.tsx index c810ba86538..6355153dcc2 100644 --- a/src/apps/components/AppListPage/AppListPage.tsx +++ b/src/apps/components/AppListPage/AppListPage.tsx @@ -80,15 +80,15 @@ export const AppListPage: React.FC = props => { display="flex" flexDirection="column" alignItems="center" - marginY={8} + marginY="s5" > - + {nothingInstalled && ( - + {intl.formatMessage(messages.installedApps)} - + {intl.formatMessage(messages.nothingInstalledPlaceholder)} @@ -97,7 +97,7 @@ export const AppListPage: React.FC = props => { )} {sectionsAvailability.installed && ( <> - + {intl.formatMessage(messages.installedApps)} @@ -113,7 +113,7 @@ export const AppListPage: React.FC = props => { )} {sectionsAvailability.all && !marketplaceError && ( - + = props => { )} {sectionsAvailability.comingSoon && !marketplaceError && ( - + = ({ {githubForkHandler && ( - - + + - + {permissions.map(permission => ( diff --git a/src/custom-apps/components/WebhookDetailsPage/WebhookDetailsPage.tsx b/src/custom-apps/components/WebhookDetailsPage/WebhookDetailsPage.tsx index 5e5825fd195..8b8dcef9c23 100644 --- a/src/custom-apps/components/WebhookDetailsPage/WebhookDetailsPage.tsx +++ b/src/custom-apps/components/WebhookDetailsPage/WebhookDetailsPage.tsx @@ -117,7 +117,7 @@ const WebhookDetailsPage: React.FC = ({ - + diff --git a/src/giftCards/GiftCardSettings/GiftCardSettingsPage.tsx b/src/giftCards/GiftCardSettings/GiftCardSettingsPage.tsx index ec48c153baf..2bd2da47ac3 100644 --- a/src/giftCards/GiftCardSettings/GiftCardSettingsPage.tsx +++ b/src/giftCards/GiftCardSettings/GiftCardSettingsPage.tsx @@ -68,7 +68,7 @@ const GiftCardSettingsPage: React.FC = () => {
{({ data: formData, submit, change }) => ( <> - +
diff --git a/src/giftCards/GiftCardUpdate/GiftCardHistory/styles.ts b/src/giftCards/GiftCardUpdate/GiftCardHistory/styles.ts index 2c0d7155c59..e523cf0a2c3 100644 --- a/src/giftCards/GiftCardUpdate/GiftCardHistory/styles.ts +++ b/src/giftCards/GiftCardUpdate/GiftCardHistory/styles.ts @@ -5,12 +5,12 @@ const useStyles = makeStyles( { header: { fontWeight: 500, - marginBottom: vars.space[1], + marginBottom: vars.space.spx, }, root: { - marginTop: vars.space[4], - paddingLeft: vars.space[9], - paddingRight: vars.space[9], + marginTop: vars.space["s1.5"], + paddingLeft: vars.space.s6, + paddingRight: vars.space.s6, }, }, { name: "GiftCardHistory" }, diff --git a/src/home/components/HomeAnalyticsCard/HomeAnalyticsCard.tsx b/src/home/components/HomeAnalyticsCard/HomeAnalyticsCard.tsx index d97a2436357..af5af5e7707 100644 --- a/src/home/components/HomeAnalyticsCard/HomeAnalyticsCard.tsx +++ b/src/home/components/HomeAnalyticsCard/HomeAnalyticsCard.tsx @@ -17,12 +17,12 @@ const HomeAnalyticsCard: React.FC = props => { borderStyle="solid" borderColor="neutralPlain" borderRadius={3} - padding={8} + padding="s5" display="flex" justifyContent="space-between" data-test-id={testId} > - + {title} diff --git a/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx b/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx index 29f8a12b72e..42d02adb3db 100644 --- a/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx +++ b/src/home/components/HomeNotificationTable/HomeNotificationTable.tsx @@ -35,8 +35,8 @@ const useStyles = makeStyles( cursor: "pointer", /* Table to be replaced with Box */ "& .MuiTableCell-root": { - paddingLeft: `${vars.space[8]} !important`, - paddingRight: `${vars.space[8]} !important`, + paddingLeft: `${vars.space.s5} !important`, + paddingRight: `${vars.space.s5} !important`, }, }, cardContent: { diff --git a/src/home/components/HomePage/HomePage.tsx b/src/home/components/HomePage/HomePage.tsx index db28c6f43aa..a353153ecdc 100644 --- a/src/home/components/HomePage/HomePage.tsx +++ b/src/home/components/HomePage/HomePage.tsx @@ -55,7 +55,7 @@ const HomePage: React.FC = props => { } /> - + = props => { = ({ {({ change, data, submit }) => ( - + {intl.formatMessage(sectionNames.navigation)} diff --git a/src/orders/components/OrderChangeWarehouseDialog/OrderChangeWarehouseDialog.tsx b/src/orders/components/OrderChangeWarehouseDialog/OrderChangeWarehouseDialog.tsx index 48f205533a3..ead32f31691 100644 --- a/src/orders/components/OrderChangeWarehouseDialog/OrderChangeWarehouseDialog.tsx +++ b/src/orders/components/OrderChangeWarehouseDialog/OrderChangeWarehouseDialog.tsx @@ -150,7 +150,7 @@ export const OrderChangeWarehouseDialog: React.FC< - + {filteredWarehouses ? ( = props => { + {order?.number ? "#" + order?.number : undefined}
{order && order.created ? ( diff --git a/src/orders/components/OrderDraftPage/styles.ts b/src/orders/components/OrderDraftPage/styles.ts index 4ec8840721c..13a3b6e4339 100644 --- a/src/orders/components/OrderDraftPage/styles.ts +++ b/src/orders/components/OrderDraftPage/styles.ts @@ -7,7 +7,7 @@ export const useAlertStyles = makeStyles( marginBottom: theme.spacing(3), "& .MuiCardContent-root": { backgroundColor: "unset", - paddingRight: vars.space[11], + paddingRight: vars.space.s8, }, }, }), diff --git a/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx b/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx index 662fcdf7307..9fc2877563c 100644 --- a/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx +++ b/src/orders/components/OrderFulfilledProductsCard/ExtraInfoLines.tsx @@ -25,7 +25,7 @@ const ExtraInfoLines: React.FC = ({ fulfillment }) => { return ( = props => { onInvoiceGenerate && (