From 2ec7399f8797474033fa3726509101f131524b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20=C5=BBegle=C5=84?= Date: Mon, 6 Dec 2021 13:03:41 +0100 Subject: [PATCH] Random fixes part 5 (#1669) --- package-lock.json | 5 +- .../AppDetailsPage/AppDetailsPage.tsx | 14 +-- .../TokenCreateDialog/TokenCreateDialog.tsx | 5 +- src/apps/styles.ts | 1 + .../AttributeValueEditDialog.tsx | 7 +- .../CategoryDeleteDialog.tsx | 5 +- src/components/ActionDialog/DialogButtons.tsx | 16 +--- src/components/AppLayout/AppChannelSelect.tsx | 6 ++ .../AssignAttributeDialog.tsx | 12 +-- .../AssignContainerDialog.tsx | 8 +- .../AssignProductDialog.tsx | 8 +- .../AssignVariantDialog.tsx | 8 +- src/components/Attributes/Attributes.tsx | 1 - src/components/BackButton.tsx | 13 +++ src/components/CardTitle/CardTitle.tsx | 2 +- .../ColumnPicker/ColumnPickerContent.tsx | 14 ++- .../DeletableItem/DeletableItem.tsx | 2 +- .../FilterContent/FilterContentHeader.tsx | 7 +- src/components/Grid/Grid.tsx | 3 + src/components/ImageUpload/ImageUpload.tsx | 7 +- src/components/Metadata/MetadataCard.tsx | 89 ++++++++----------- src/components/Metadata/styles.ts | 26 ++++-- .../MultiAutocompleteSelectField.tsx | 1 + src/components/Navigator/Navigator.tsx | 11 ++- src/components/Navigator/NavigatorInput.tsx | 32 +++++-- src/components/Navigator/NavigatorSection.tsx | 7 +- .../NavigatorButton/NavigatorButton.tsx | 2 +- src/components/PageHeader/PageHeader.tsx | 8 +- .../SaveFilterTabDialog.tsx | 7 +- .../SortableChip/SortableHandle.tsx | 5 +- .../SortableTable/SortableHandle.tsx | 4 +- src/components/TableCellAvatar/Avatar.tsx | 13 +-- src/components/TableHead/TableHead.tsx | 22 ++--- src/configuration/ConfigurationPage.tsx | 73 +++++---------- src/configuration/index.tsx | 25 +++--- .../CustomerAddressDialog.tsx | 11 +-- .../DiscountCountrySelectDialog.tsx | 8 +- .../SaleDetailsPage/SaleDetailsPage.tsx | 4 +- .../components/SaleSummary/SaleSummary.tsx | 7 +- .../components/SaleSummary/styles.ts | 14 +-- .../components/SaleValue/SaleValue.tsx | 8 +- src/discounts/components/SaleValue/styles.ts | 3 + .../VoucherDetailsPage/VoucherDetailsPage.tsx | 7 +- .../VoucherSummary/VoucherSummary.tsx | 4 +- .../components/VoucherSummary/styles.ts | 14 +-- src/icons/Attributes.tsx | 17 ++-- src/icons/Channels.tsx | 19 ++-- src/icons/Navigation.tsx | 17 ++-- src/icons/PageTypes.tsx | 17 ++-- src/icons/PermissionGroups.tsx | 17 ++-- src/icons/Plugins.tsx | 2 +- src/icons/ProductTypes.tsx | 5 +- src/icons/ShippingMethods.tsx | 17 ++-- src/icons/SiteSettings.tsx | 13 ++- src/icons/StaffMembers.tsx | 17 ++-- src/icons/Taxes.tsx | 17 ++-- src/icons/Warehouses.tsx | 17 ++-- .../MenuCreateDialog/MenuCreateDialog.tsx | 7 +- .../MenuItemDialog/MenuItemDialog.tsx | 7 +- .../components/MenuItems/MenuItems.tsx | 3 +- .../OrderAddressEditDialog.tsx | 11 +-- .../OrderCancelDialog/OrderCancelDialog.tsx | 7 +- .../OrderFulfillmentCancelDialog.tsx | 11 +-- .../OrderFulfillmentDialog.tsx | 11 +-- .../OrderFulfillmentTrackingDialog.tsx | 7 +- .../OrderInvoiceEmailSendDialog.tsx | 7 +- .../OrderPaymentDialog/OrderPaymentDialog.tsx | 7 +- .../OrderPaymentVoidDialog.tsx | 7 +- .../OrderProductAddDialog.tsx | 11 +-- .../OrderShippingMethodEditDialog.tsx | 11 +-- .../AssignMembersDialog.tsx | 11 +-- .../PluginSecretFieldDialog.tsx | 7 +- .../ProductExportDialog.tsx | 14 ++- .../ProductExternalMediaDialog.tsx | 6 +- .../ProductStocks/CardAddItemsFooter.tsx | 1 - .../ProductVariantDeleteDialog.tsx | 12 +-- .../ProductVariantMediaSelectDialog.tsx | 8 +- .../ShippingMethodProductsAddDialog.tsx | 11 +-- .../ShippingZoneAddWarehouseDialog.tsx | 11 +-- .../ShippingZoneCountriesAssignDialog.tsx | 8 +- .../ShippingZonePostalCodeRangeDialog.tsx | 13 +-- .../ShippingZonesList/ShippingZonesList.tsx | 16 ++-- .../StaffAddMemberDialog.tsx | 13 +-- .../StaffPasswordResetDialog.tsx | 7 +- .../configuration/ConfigurationPage.tsx | 1 - 85 files changed, 455 insertions(+), 515 deletions(-) create mode 100644 src/components/BackButton.tsx diff --git a/package-lock.json b/package-lock.json index 6c50426e70a..1e7a3b85388 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4319,9 +4319,8 @@ } }, "@saleor/macaw-ui": { - "version": "0.3.0-a.6", - "resolved": "https://registry.npmjs.org/@saleor/macaw-ui/-/macaw-ui-0.3.0-a.6.tgz", - "integrity": "sha512-LnGsocG5Lk6I8puqhIHIChrBG3gLn76by0OPQXfkOS5AEIjHQpdj0qA4cBO2jfxu0MRYlVZoNJoKH/ykXiC7eg==", + "version": "github:saleor/macaw-ui#d6942921dadcccd7d1514ee8330db07cae211360", + "from": "github:saleor/macaw-ui#d694292", "requires": { "clsx": "^1.1.1", "lodash": "^4.17.21", diff --git a/src/apps/components/AppDetailsPage/AppDetailsPage.tsx b/src/apps/components/AppDetailsPage/AppDetailsPage.tsx index bfba5bc611f..1b46ea55b3a 100644 --- a/src/apps/components/AppDetailsPage/AppDetailsPage.tsx +++ b/src/apps/components/AppDetailsPage/AppDetailsPage.tsx @@ -1,4 +1,4 @@ -import { Card, CardContent, Typography } from "@material-ui/core"; +import { ButtonBase, Card, CardContent, Typography } from "@material-ui/core"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import Container from "@saleor/components/Container"; @@ -75,8 +75,9 @@ export const AppDetailsPage: React.FC = ({ description="link" /> - - + ) : ( diff --git a/src/apps/components/TokenCreateDialog/TokenCreateDialog.tsx b/src/apps/components/TokenCreateDialog/TokenCreateDialog.tsx index 715103f2267..765d3ddd9f5 100644 --- a/src/apps/components/TokenCreateDialog/TokenCreateDialog.tsx +++ b/src/apps/components/TokenCreateDialog/TokenCreateDialog.tsx @@ -7,6 +7,7 @@ import { TextField, Typography } from "@material-ui/core"; +import BackButton from "@saleor/components/BackButton"; import CardSpacer from "@saleor/components/CardSpacer"; import ConfirmButton from "@saleor/components/ConfirmButton"; import Form from "@saleor/components/Form"; @@ -106,9 +107,7 @@ const TokenCreateDialog: React.FC = props => { {step === "form" ? ( <> - + = ({ /> - + = props => { - + - )} + {showBackButton && } {variant !== "info" && ( ({ + input: { + height: 40 + }, root: { "&& fieldset": { borderColor: theme.palette.divider @@ -36,6 +39,9 @@ const AppChannelSelect: React.FC = ({ return (
= ({ [classes.dropShadow]: !isScrolledToBottom(anchor, position) })} > - + = props => { - + = props => { - + = props => { - + = ({
= props => ( + +); + +BackButton.displayName = "BackButton"; +export default BackButton; diff --git a/src/components/CardTitle/CardTitle.tsx b/src/components/CardTitle/CardTitle.tsx index 3d91cad8d25..ae0a8bde104 100644 --- a/src/components/CardTitle/CardTitle.tsx +++ b/src/components/CardTitle/CardTitle.tsx @@ -19,7 +19,7 @@ const CardTitle: React.FC = ({ onClick, ...rest }) => ( - + {children} ); diff --git a/src/components/ColumnPicker/ColumnPickerContent.tsx b/src/components/ColumnPicker/ColumnPickerContent.tsx index dfa5326e56b..1891e349a95 100644 --- a/src/components/ColumnPicker/ColumnPickerContent.tsx +++ b/src/components/ColumnPicker/ColumnPickerContent.tsx @@ -56,7 +56,7 @@ const useStyles = makeStyles( }, display: "grid", gridColumnGap: theme.spacing(3), - gridTemplateColumns: "repeat(3, 1fr)", + gridTemplateColumns: "repeat(3, 210px)", padding: theme.spacing(2, 3) }, contentContainer: { @@ -68,6 +68,14 @@ const useStyles = makeStyles( dropShadow: { boxShadow: `0px -5px 10px 0px ${theme.palette.divider}` }, + label: { + "& span": { + overflow: "hidden", + whiteSpace: "nowrap", + textOverflow: "ellipsis" + }, + marginRight: 0 + }, loadMoreLoaderContainer: { alignItems: "center", display: "flex", @@ -141,6 +149,7 @@ const ColumnPickerContent: React.FC = props => {
{columns.map(column => ( = props => { })} >
-