Add missing style names
This commit is contained in:
parent
9a1ef2ba40
commit
96176924f9
155 changed files with 3818 additions and 3359 deletions
|
@ -20,7 +20,8 @@ export interface AttributeListProps extends ListProps, ListActions {
|
||||||
attributes: AttributeList_attributes_edges_node[];
|
attributes: AttributeList_attributes_edges_node[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
[theme.breakpoints.up("lg")]: {
|
[theme.breakpoints.up("lg")]: {
|
||||||
colFaceted: {
|
colFaceted: {
|
||||||
width: 150
|
width: 150
|
||||||
|
@ -54,7 +55,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
link: {
|
link: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "AttributeList" }
|
||||||
|
);
|
||||||
|
|
||||||
const numberOfColumns = 6;
|
const numberOfColumns = 6;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,8 @@ export interface AttributeValuesProps {
|
||||||
onValueUpdate: (id: string) => void;
|
onValueUpdate: (id: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
columnAdmin: {
|
columnAdmin: {
|
||||||
width: "50%"
|
width: "50%"
|
||||||
},
|
},
|
||||||
|
@ -51,7 +52,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
link: {
|
link: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "AttributeValues" }
|
||||||
|
);
|
||||||
|
|
||||||
const AttributeValues: React.FC<AttributeValuesProps> = ({
|
const AttributeValues: React.FC<AttributeValuesProps> = ({
|
||||||
disabled,
|
disabled,
|
||||||
|
|
|
@ -15,7 +15,8 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
import { CategoryDetails_category_backgroundImage } from "../../types/CategoryDetails";
|
import { CategoryDetails_category_backgroundImage } from "../../types/CategoryDetails";
|
||||||
import { FormData } from "../CategoryUpdatePage";
|
import { FormData } from "../CategoryUpdatePage";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
fileField: {
|
fileField: {
|
||||||
display: "none"
|
display: "none"
|
||||||
},
|
},
|
||||||
|
@ -36,7 +37,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
position: "relative",
|
position: "relative",
|
||||||
width: 148
|
width: 148
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CategoryBackground" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface CategoryBackgroundProps {
|
export interface CategoryBackgroundProps {
|
||||||
data: FormData;
|
data: FormData;
|
||||||
|
|
|
@ -11,13 +11,16 @@ import SingleAutocompleteSelectField, {
|
||||||
SingleAutocompleteChoiceType
|
SingleAutocompleteChoiceType
|
||||||
} from "../SingleAutocompleteSelectField";
|
} from "../SingleAutocompleteSelectField";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
root: {
|
root: {
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridColumnGap: theme.spacing(2),
|
gridColumnGap: theme.spacing(2),
|
||||||
gridTemplateColumns: "1fr 1fr"
|
gridTemplateColumns: "1fr 1fr"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "AddressEdit" }
|
||||||
|
);
|
||||||
|
|
||||||
interface AddressEditProps {
|
interface AddressEditProps {
|
||||||
countries: SingleAutocompleteChoiceType[];
|
countries: SingleAutocompleteChoiceType[];
|
||||||
|
|
|
@ -11,7 +11,8 @@ export interface AppHeaderProps {
|
||||||
onBack();
|
onBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
backArrow: {
|
backArrow: {
|
||||||
fontSize: 30
|
fontSize: 30
|
||||||
},
|
},
|
||||||
|
@ -48,7 +49,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
display: "none"
|
display: "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "AppHeader" }
|
||||||
|
);
|
||||||
|
|
||||||
const AppHeader: React.FC<AppHeaderProps> = props => {
|
const AppHeader: React.FC<AppHeaderProps> = props => {
|
||||||
const { children, onBack } = props;
|
const { children, onBack } = props;
|
||||||
|
|
|
@ -19,7 +19,8 @@ import { orderDraftListUrl, orderListUrl } from "../../orders/urls";
|
||||||
import MenuNested from "./MenuNested";
|
import MenuNested from "./MenuNested";
|
||||||
import { IMenuItem } from "./menuStructure";
|
import { IMenuItem } from "./menuStructure";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
menuIcon: {
|
menuIcon: {
|
||||||
"& svg": {
|
"& svg": {
|
||||||
height: 32,
|
height: 32,
|
||||||
|
@ -153,7 +154,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
subMenuDrawerOpen: {
|
subMenuDrawerOpen: {
|
||||||
width: `100vw`
|
width: `100vw`
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "MenuList" }
|
||||||
|
);
|
||||||
|
|
||||||
interface MenuListProps {
|
interface MenuListProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -12,7 +12,8 @@ import { drawerNestedMenuWidth, drawerWidthExpandedMobile } from "./consts";
|
||||||
import { IActiveSubMenu } from "./MenuList";
|
import { IActiveSubMenu } from "./MenuList";
|
||||||
import { IMenuItem } from "./menuStructure";
|
import { IMenuItem } from "./menuStructure";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
menuListNested: {
|
menuListNested: {
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
height: "100vh",
|
height: "100vh",
|
||||||
|
@ -94,7 +95,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
display: "inline",
|
display: "inline",
|
||||||
paddingLeft: 10
|
paddingLeft: 10
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "MenuNested" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface MenuNestedProps {
|
export interface MenuNestedProps {
|
||||||
activeItem: IActiveSubMenu;
|
activeItem: IActiveSubMenu;
|
||||||
|
|
|
@ -27,7 +27,8 @@ export interface FormData {
|
||||||
query: string;
|
query: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
avatar: {
|
avatar: {
|
||||||
"&:first-child": {
|
"&:first-child": {
|
||||||
paddingLeft: 0
|
paddingLeft: 0
|
||||||
|
@ -42,7 +43,9 @@ const useStyles = makeStyles({
|
||||||
wideCell: {
|
wideCell: {
|
||||||
width: "100%"
|
width: "100%"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "AssignCategoryDialog" }
|
||||||
|
);
|
||||||
|
|
||||||
interface AssignCategoriesDialogProps {
|
interface AssignCategoriesDialogProps {
|
||||||
categories: SearchCategories_search_edges_node[];
|
categories: SearchCategories_search_edges_node[];
|
||||||
|
|
|
@ -27,7 +27,8 @@ export interface FormData {
|
||||||
query: string;
|
query: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
avatar: {
|
avatar: {
|
||||||
"&:first-child": {
|
"&:first-child": {
|
||||||
paddingLeft: 0
|
paddingLeft: 0
|
||||||
|
@ -42,7 +43,9 @@ const useStyles = makeStyles({
|
||||||
wideCell: {
|
wideCell: {
|
||||||
width: "100%"
|
width: "100%"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "AssignCollectionDialog" }
|
||||||
|
);
|
||||||
|
|
||||||
interface AssignCollectionDialogProps {
|
interface AssignCollectionDialogProps {
|
||||||
collections: SearchCollections_search_edges_node[];
|
collections: SearchCollections_search_edges_node[];
|
||||||
|
|
|
@ -29,7 +29,8 @@ export interface FormData {
|
||||||
query: string;
|
query: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
avatar: {
|
avatar: {
|
||||||
"&:first-child": {
|
"&:first-child": {
|
||||||
paddingLeft: 0
|
paddingLeft: 0
|
||||||
|
@ -48,7 +49,9 @@ const useStyles = makeStyles({
|
||||||
paddingLeft: 0,
|
paddingLeft: 0,
|
||||||
width: "100%"
|
width: "100%"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "AssignProductDialog" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface AssignProductDialogProps {
|
export interface AssignProductDialogProps {
|
||||||
confirmButtonState: ConfirmButtonTransitionState;
|
confirmButtonState: ConfirmButtonTransitionState;
|
||||||
|
|
|
@ -38,7 +38,8 @@ const DebounceAutocomplete: React.ComponentType<
|
||||||
DebounceProps<string>
|
DebounceProps<string>
|
||||||
> = Debounce;
|
> = Debounce;
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
container: {
|
container: {
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
position: "relative"
|
position: "relative"
|
||||||
|
@ -56,7 +57,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
zIndex: 2
|
zIndex: 2
|
||||||
},
|
},
|
||||||
root: {}
|
root: {}
|
||||||
}));
|
}),
|
||||||
|
{ name: "AutocompleteSelectMenu" }
|
||||||
|
);
|
||||||
const AutocompleteSelectMenu: React.FC<AutocompleteSelectMenuProps> = props => {
|
const AutocompleteSelectMenu: React.FC<AutocompleteSelectMenuProps> = props => {
|
||||||
const {
|
const {
|
||||||
disabled,
|
disabled,
|
||||||
|
|
|
@ -18,7 +18,8 @@ export interface CardMenuProps {
|
||||||
menuItems: CardMenuItem[];
|
menuItems: CardMenuItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
iconButton: {
|
iconButton: {
|
||||||
background: theme.palette.background.paper,
|
background: theme.palette.background.paper,
|
||||||
borderRadius: "100%",
|
borderRadius: "100%",
|
||||||
|
@ -26,7 +27,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
padding: 0,
|
padding: 0,
|
||||||
width: 32
|
width: 32
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CardMenu" }
|
||||||
|
);
|
||||||
|
|
||||||
const CardMenu: React.FC<CardMenuProps> = props => {
|
const CardMenu: React.FC<CardMenuProps> = props => {
|
||||||
const { className, disabled, menuItems } = props;
|
const { className, disabled, menuItems } = props;
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
spacer: {
|
spacer: {
|
||||||
[theme.breakpoints.down("sm")]: {
|
[theme.breakpoints.down("sm")]: {
|
||||||
marginTop: theme.spacing(1)
|
marginTop: theme.spacing(1)
|
||||||
},
|
},
|
||||||
marginTop: theme.spacing(3)
|
marginTop: theme.spacing(3)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CardSpacer" }
|
||||||
|
);
|
||||||
|
|
||||||
interface CardSpacerProps {
|
interface CardSpacerProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
|
|
@ -3,7 +3,8 @@ import Typography from "@material-ui/core/Typography";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
children: theme.mixins.gutters({}),
|
children: theme.mixins.gutters({}),
|
||||||
constantHeight: {
|
constantHeight: {
|
||||||
height: 56
|
height: 56
|
||||||
|
@ -29,7 +30,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
toolbar: {
|
toolbar: {
|
||||||
marginRight: -theme.spacing(1)
|
marginRight: -theme.spacing(1)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CardTitle" }
|
||||||
|
);
|
||||||
|
|
||||||
interface CardTitleProps {
|
interface CardTitleProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
|
|
@ -19,7 +19,8 @@ export type CheckboxProps = Omit<
|
||||||
onChange?: (event: React.ChangeEvent<any>) => void;
|
onChange?: (event: React.ChangeEvent<any>) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
box: {
|
box: {
|
||||||
"&$checked": {
|
"&$checked": {
|
||||||
"&:before": {
|
"&:before": {
|
||||||
|
@ -79,7 +80,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
margin: "5px 9px",
|
margin: "5px 9px",
|
||||||
width: 30
|
width: 30
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "Checkbox" }
|
||||||
|
);
|
||||||
const Checkbox: React.FC<CheckboxProps> = props => {
|
const Checkbox: React.FC<CheckboxProps> = props => {
|
||||||
const {
|
const {
|
||||||
checked,
|
checked,
|
||||||
|
|
|
@ -11,7 +11,8 @@ export interface ChipProps {
|
||||||
onClose?: () => void;
|
onClose?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
closeIcon: {
|
closeIcon: {
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
@ -28,7 +29,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
marginRight: theme.spacing(2),
|
marginRight: theme.spacing(2),
|
||||||
padding: "6px 12px"
|
padding: "6px 12px"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "Chip" }
|
||||||
|
);
|
||||||
const Chip: React.FC<ChipProps> = props => {
|
const Chip: React.FC<ChipProps> = props => {
|
||||||
const { className, label, onClose } = props;
|
const { className, label, onClose } = props;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,8 @@ export interface ColumnPickerContentProps extends Partial<FetchMoreProps> {
|
||||||
onSave: () => void;
|
onSave: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
actionBar: {
|
actionBar: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "space-between"
|
justifyContent: "space-between"
|
||||||
|
@ -73,7 +74,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
titleContainer: {
|
titleContainer: {
|
||||||
padding: theme.spacing(1.5, 3.5)
|
padding: theme.spacing(1.5, 3.5)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "ColumnPickerContent" }
|
||||||
|
);
|
||||||
|
|
||||||
const ColumnPickerContent: React.FC<ColumnPickerContentProps> = props => {
|
const ColumnPickerContent: React.FC<ColumnPickerContentProps> = props => {
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -67,7 +67,7 @@ interface ConfirmButtonState {
|
||||||
displayCompletedActionState: boolean;
|
displayCompletedActionState: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ConfirmButton = withStyles(styles)(
|
const ConfirmButton = withStyles(styles, { name: "ConfirmButton" })(
|
||||||
class ConfirmButtonComponent extends React.Component<
|
class ConfirmButtonComponent extends React.Component<
|
||||||
ConfirmButtonProps &
|
ConfirmButtonProps &
|
||||||
WithStyles<
|
WithStyles<
|
||||||
|
|
|
@ -3,14 +3,17 @@ import FormControlLabel from "@material-ui/core/FormControlLabel";
|
||||||
import Switch from "@material-ui/core/Switch";
|
import Switch from "@material-ui/core/Switch";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
label: {
|
label: {
|
||||||
marginLeft: theme.spacing(3.5)
|
marginLeft: theme.spacing(3.5)
|
||||||
},
|
},
|
||||||
labelText: {
|
labelText: {
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "ControlledSwitch" }
|
||||||
|
);
|
||||||
|
|
||||||
interface ControlledSwitchProps {
|
interface ControlledSwitchProps {
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
|
|
|
@ -27,7 +27,8 @@ export interface CountryListProps {
|
||||||
onCountryUnassign: (country: string) => void;
|
onCountryUnassign: (country: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
iconCell: {
|
iconCell: {
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
paddingRight: 0
|
paddingRight: 0
|
||||||
|
@ -70,7 +71,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
wideColumn: {
|
wideColumn: {
|
||||||
width: "100%"
|
width: "100%"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CountryList" }
|
||||||
|
);
|
||||||
|
|
||||||
const CountryList: React.FC<CountryListProps> = props => {
|
const CountryList: React.FC<CountryListProps> = props => {
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -9,7 +9,8 @@ import React from "react";
|
||||||
|
|
||||||
import useForm from "@saleor/hooks/useForm";
|
import useForm from "@saleor/hooks/useForm";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
card: {
|
card: {
|
||||||
border: `1px solid ${theme.palette.divider}`
|
border: `1px solid ${theme.palette.divider}`
|
||||||
},
|
},
|
||||||
|
@ -37,7 +38,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
fontSize: "0.8125rem"
|
fontSize: "0.8125rem"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "EditableTableCell" }
|
||||||
|
);
|
||||||
|
|
||||||
interface EditableTableCellProps {
|
interface EditableTableCellProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -11,7 +11,8 @@ export interface ErrorPageProps {
|
||||||
onBack: () => void;
|
onBack: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
bottomHeader: {
|
bottomHeader: {
|
||||||
fontWeight: 600 as 600,
|
fontWeight: 600 as 600,
|
||||||
textTransform: "uppercase"
|
textTransform: "uppercase"
|
||||||
|
@ -53,7 +54,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
upperHeader: {
|
upperHeader: {
|
||||||
fontWeight: 600 as 600
|
fontWeight: 600 as 600
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "ErrorPage" }
|
||||||
|
);
|
||||||
|
|
||||||
const ErrorPage: React.FC<ErrorPageProps> = props => {
|
const ErrorPage: React.FC<ErrorPageProps> = props => {
|
||||||
const { onBack } = props;
|
const { onBack } = props;
|
||||||
|
|
|
@ -2,11 +2,14 @@ import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Typography, { TypographyProps } from "@material-ui/core/Typography";
|
import Typography, { TypographyProps } from "@material-ui/core/Typography";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
link: {
|
link: {
|
||||||
textDecoration: "none"
|
textDecoration: "none"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "ExternalLink" }
|
||||||
|
);
|
||||||
|
|
||||||
interface ExternalLinkProps extends React.HTMLProps<HTMLAnchorElement> {
|
interface ExternalLinkProps extends React.HTMLProps<HTMLAnchorElement> {
|
||||||
href: string;
|
href: string;
|
||||||
|
|
|
@ -4,7 +4,8 @@ import TextField from "@material-ui/core/TextField";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
fileUploadField: {
|
fileUploadField: {
|
||||||
display: "none"
|
display: "none"
|
||||||
},
|
},
|
||||||
|
@ -14,7 +15,9 @@ const useStyles = makeStyles({
|
||||||
textField: {
|
textField: {
|
||||||
flex: 1
|
flex: 1
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "FileUpload" }
|
||||||
|
);
|
||||||
|
|
||||||
interface FileUploadProps {
|
interface FileUploadProps {
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
|
|
@ -21,7 +21,8 @@ export interface FilterProps<TFilterKeys = string> {
|
||||||
onFilterAdd: (filter: FilterContentSubmitData) => void;
|
onFilterAdd: (filter: FilterContentSubmitData) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
addFilterButton: {
|
addFilterButton: {
|
||||||
"&$filterButton": {
|
"&$filterButton": {
|
||||||
"&:hover, &:focus": {
|
"&:hover, &:focus": {
|
||||||
|
@ -77,7 +78,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
rotate: {
|
rotate: {
|
||||||
transform: "rotate(180deg)"
|
transform: "rotate(180deg)"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "Filter" }
|
||||||
|
);
|
||||||
const Filter: React.FC<FilterProps> = props => {
|
const Filter: React.FC<FilterProps> = props => {
|
||||||
const { currencySymbol, filterLabel, menu, onFilterAdd } = props;
|
const { currencySymbol, filterLabel, menu, onFilterAdd } = props;
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
|
@ -6,14 +6,17 @@ import React from "react";
|
||||||
import { FilterContentSubmitData, IFilter } from "../Filter";
|
import { FilterContentSubmitData, IFilter } from "../Filter";
|
||||||
import Filter from "./Filter";
|
import Filter from "./Filter";
|
||||||
|
|
||||||
const useInputStyles = makeStyles({
|
const useInputStyles = makeStyles(
|
||||||
|
{
|
||||||
input: {
|
input: {
|
||||||
padding: "10.5px 12px"
|
padding: "10.5px 12px"
|
||||||
},
|
},
|
||||||
root: {
|
root: {
|
||||||
flex: 1
|
flex: 1
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "FilterActions" }
|
||||||
|
);
|
||||||
|
|
||||||
const Search: React.FC<TextFieldProps> = props => {
|
const Search: React.FC<TextFieldProps> = props => {
|
||||||
const classes = useInputStyles({});
|
const classes = useInputStyles({});
|
||||||
|
|
|
@ -34,11 +34,14 @@ function getFilterChoices(items: IFilter<string>) {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
input: {
|
input: {
|
||||||
padding: "20px 12px 17px"
|
padding: "20px 12px 17px"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "FilterContent" }
|
||||||
|
);
|
||||||
|
|
||||||
const FilterContent: React.FC<FilterContentProps> = ({
|
const FilterContent: React.FC<FilterContentProps> = ({
|
||||||
currencySymbol,
|
currencySymbol,
|
||||||
|
|
|
@ -17,14 +17,17 @@ export interface FilterElementProps<TFilterKeys = string> {
|
||||||
onChange: (value: string | string[]) => void;
|
onChange: (value: string | string[]) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
calendar: {
|
calendar: {
|
||||||
margin: 8
|
margin: 8
|
||||||
},
|
},
|
||||||
input: {
|
input: {
|
||||||
padding: "20px 12px 17px"
|
padding: "20px 12px 17px"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "FilterElement" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface FilterElementProps<TFilterKeys = string> {
|
export interface FilterElementProps<TFilterKeys = string> {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
spacer: {
|
spacer: {
|
||||||
marginTop: theme.spacing(3)
|
marginTop: theme.spacing(3)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "FormSpacer" }
|
||||||
|
);
|
||||||
|
|
||||||
interface FormSpacerProps {
|
interface FormSpacerProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
|
|
@ -9,7 +9,8 @@ export interface GridProps {
|
||||||
variant?: GridVariant;
|
variant?: GridVariant;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
default: {
|
default: {
|
||||||
gridTemplateColumns: "9fr 4fr"
|
gridTemplateColumns: "9fr 4fr"
|
||||||
},
|
},
|
||||||
|
@ -28,7 +29,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
uniform: {
|
uniform: {
|
||||||
gridTemplateColumns: "1fr 1fr"
|
gridTemplateColumns: "1fr 1fr"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "Grid" }
|
||||||
|
);
|
||||||
|
|
||||||
export const Grid: React.FC<GridProps> = props => {
|
export const Grid: React.FC<GridProps> = props => {
|
||||||
const { className, children, variant } = props;
|
const { className, children, variant } = props;
|
||||||
|
|
|
@ -6,7 +6,8 @@ interface HrProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
root: {
|
root: {
|
||||||
backgroundColor: theme.palette.divider,
|
backgroundColor: theme.palette.divider,
|
||||||
border: "none",
|
border: "none",
|
||||||
|
@ -15,7 +16,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
margin: 0,
|
margin: 0,
|
||||||
width: "100%"
|
width: "100%"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "Hr" }
|
||||||
|
);
|
||||||
|
|
||||||
export const Hr: React.FC<HrProps> = props => {
|
export const Hr: React.FC<HrProps> = props => {
|
||||||
const { className } = props;
|
const { className } = props;
|
||||||
|
|
|
@ -12,7 +12,8 @@ export interface IconButtonTableCellProps {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
root: {
|
root: {
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
paddingRight: 0
|
paddingRight: 0
|
||||||
|
@ -20,7 +21,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
paddingRight: 0,
|
paddingRight: 0,
|
||||||
width: ICONBUTTON_SIZE + theme.spacing(0.5)
|
width: ICONBUTTON_SIZE + theme.spacing(0.5)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "IconButtonTableCell" }
|
||||||
|
);
|
||||||
const IconButtonTableCell: React.FC<IconButtonTableCellProps> = props => {
|
const IconButtonTableCell: React.FC<IconButtonTableCellProps> = props => {
|
||||||
const {
|
const {
|
||||||
children,
|
children,
|
||||||
|
|
|
@ -6,7 +6,8 @@ import EditIcon from "@material-ui/icons/Edit";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
image: {
|
image: {
|
||||||
height: "100%",
|
height: "100%",
|
||||||
objectFit: "contain",
|
objectFit: "contain",
|
||||||
|
@ -49,7 +50,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "flex-end"
|
justifyContent: "flex-end"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "ImageTile" }
|
||||||
|
);
|
||||||
|
|
||||||
interface ImageTileProps {
|
interface ImageTileProps {
|
||||||
image: {
|
image: {
|
||||||
|
|
|
@ -17,7 +17,8 @@ interface ImageUploadProps {
|
||||||
onImageUpload: (file: FileList) => void;
|
onImageUpload: (file: FileList) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
backdrop: {
|
backdrop: {
|
||||||
background: fade(theme.palette.primary.main, 0.1),
|
background: fade(theme.palette.primary.main, 0.1),
|
||||||
color: theme.palette.primary.main
|
color: theme.palette.primary.main
|
||||||
|
@ -52,7 +53,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
textTransform: "uppercase"
|
textTransform: "uppercase"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "ImageUpload" }
|
||||||
|
);
|
||||||
|
|
||||||
export const ImageUpload: React.FC<ImageUploadProps> = props => {
|
export const ImageUpload: React.FC<ImageUploadProps> = props => {
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -21,7 +21,8 @@ export interface LanguageSwitchProps {
|
||||||
onLanguageChange: (lang: LanguageCodeEnum) => void;
|
onLanguageChange: (lang: LanguageCodeEnum) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
arrow: {
|
arrow: {
|
||||||
color: theme.palette.primary.main,
|
color: theme.palette.primary.main,
|
||||||
transition: theme.transitions.duration.standard + "ms"
|
transition: theme.transitions.duration.standard + "ms"
|
||||||
|
@ -50,7 +51,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
rotate: {
|
rotate: {
|
||||||
transform: "rotate(180deg)"
|
transform: "rotate(180deg)"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "LanguageSwitch" }
|
||||||
|
);
|
||||||
const LanguageSwitch: React.FC<LanguageSwitchProps> = props => {
|
const LanguageSwitch: React.FC<LanguageSwitchProps> = props => {
|
||||||
const { currentLanguage, languages, onLanguageChange } = props;
|
const { currentLanguage, languages, onLanguageChange } = props;
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
|
@ -3,7 +3,8 @@ import Typography, { TypographyProps } from "@material-ui/core/Typography";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
primary: {
|
primary: {
|
||||||
color: theme.palette.primary.main
|
color: theme.palette.primary.main
|
||||||
},
|
},
|
||||||
|
@ -17,7 +18,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
underline: {
|
underline: {
|
||||||
textDecoration: "underline"
|
textDecoration: "underline"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "Link" }
|
||||||
|
);
|
||||||
|
|
||||||
interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
||||||
color?: "primary" | "secondary";
|
color?: "primary" | "secondary";
|
||||||
|
|
|
@ -36,7 +36,7 @@ interface ListFieldProps
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ListField = withStyles(styles)(
|
const ListField = withStyles(styles, { name: "ListField" })(
|
||||||
class ListFieldComponent extends React.Component<
|
class ListFieldComponent extends React.Component<
|
||||||
ListFieldProps,
|
ListFieldProps,
|
||||||
ListFieldState
|
ListFieldState
|
||||||
|
|
|
@ -15,7 +15,8 @@ import MultiAutocompleteSelectFieldContent, {
|
||||||
MultiAutocompleteChoiceType
|
MultiAutocompleteChoiceType
|
||||||
} from "./MultiAutocompleteSelectFieldContent";
|
} from "./MultiAutocompleteSelectFieldContent";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
chip: {
|
chip: {
|
||||||
width: "100%"
|
width: "100%"
|
||||||
},
|
},
|
||||||
|
@ -50,7 +51,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
position: "relative"
|
position: "relative"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "MultiAutocompleteSelectField" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface MultiAutocompleteSelectFieldProps
|
export interface MultiAutocompleteSelectFieldProps
|
||||||
extends Partial<FetchMoreProps> {
|
extends Partial<FetchMoreProps> {
|
||||||
|
|
|
@ -10,7 +10,8 @@ import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import Checkbox from "../Checkbox";
|
import Checkbox from "../Checkbox";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
checkbox: {
|
checkbox: {
|
||||||
marginRight: -theme.spacing(2)
|
marginRight: -theme.spacing(2)
|
||||||
},
|
},
|
||||||
|
@ -23,7 +24,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
width: "100%"
|
width: "100%"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "MultiSelectField" }
|
||||||
|
);
|
||||||
|
|
||||||
interface MultiSelectFieldProps {
|
interface MultiSelectFieldProps {
|
||||||
choices: Array<{
|
choices: Array<{
|
||||||
|
|
|
@ -7,7 +7,8 @@ import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import notFoundImage from "@assets/images/not-found-404.svg";
|
import notFoundImage from "@assets/images/not-found-404.svg";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
button: {
|
button: {
|
||||||
marginTop: theme.spacing(2),
|
marginTop: theme.spacing(2),
|
||||||
padding: 20
|
padding: 20
|
||||||
|
@ -45,7 +46,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
height: "calc(100vh - 180px)"
|
height: "calc(100vh - 180px)"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "NotFoundPage" }
|
||||||
|
);
|
||||||
|
|
||||||
interface NotFoundPageProps {
|
interface NotFoundPageProps {
|
||||||
onBack: () => void;
|
onBack: () => void;
|
||||||
|
|
|
@ -5,7 +5,8 @@ import React from "react";
|
||||||
import ExtendedPageHeader from "../ExtendedPageHeader";
|
import ExtendedPageHeader from "../ExtendedPageHeader";
|
||||||
import Skeleton from "../Skeleton";
|
import Skeleton from "../Skeleton";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
root: {
|
root: {
|
||||||
display: "flex"
|
display: "flex"
|
||||||
},
|
},
|
||||||
|
@ -19,7 +20,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
flex: 1,
|
flex: 1,
|
||||||
fontSize: 24
|
fontSize: 24
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "PageHeader" }
|
||||||
|
);
|
||||||
|
|
||||||
interface PageHeaderProps {
|
interface PageHeaderProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
|
|
@ -4,13 +4,16 @@ import React from "react";
|
||||||
|
|
||||||
import SingleSelectField from "@saleor/components/SingleSelectField";
|
import SingleSelectField from "@saleor/components/SingleSelectField";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
root: {
|
root: {
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridColumnGap: theme.spacing(2),
|
gridColumnGap: theme.spacing(2),
|
||||||
gridTemplateColumns: "5rem 1fr"
|
gridTemplateColumns: "5rem 1fr"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "PhoneField" }
|
||||||
|
);
|
||||||
|
|
||||||
interface PhoneFieldProps {
|
interface PhoneFieldProps {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -4,7 +4,8 @@ import { makeStyles } from "@material-ui/core/styles";
|
||||||
import TextField from "@material-ui/core/TextField";
|
import TextField from "@material-ui/core/TextField";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
currencySymbol: {
|
currencySymbol: {
|
||||||
fontSize: "0.875rem"
|
fontSize: "0.875rem"
|
||||||
},
|
},
|
||||||
|
@ -23,7 +24,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
widgetContainer: {
|
widgetContainer: {
|
||||||
marginTop: theme.spacing(2)
|
marginTop: theme.spacing(2)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "PriceField" }
|
||||||
|
);
|
||||||
|
|
||||||
interface PriceFieldProps {
|
interface PriceFieldProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -6,7 +6,8 @@ import { makeStyles } from "@material-ui/core/styles";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
formControl: {
|
formControl: {
|
||||||
padding: 0,
|
padding: 0,
|
||||||
width: "100%"
|
width: "100%"
|
||||||
|
@ -24,7 +25,9 @@ const useStyles = makeStyles({
|
||||||
display: "block",
|
display: "block",
|
||||||
fontSize: "12px"
|
fontSize: "12px"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "RadioSwitchField" }
|
||||||
|
);
|
||||||
|
|
||||||
interface RadioSwitchFieldProps {
|
interface RadioSwitchFieldProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -18,7 +18,8 @@ interface ImageEntityProps {
|
||||||
onRemove: (entityKey: string) => void;
|
onRemove: (entityKey: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
anchor: {
|
anchor: {
|
||||||
display: "inline-block"
|
display: "inline-block"
|
||||||
},
|
},
|
||||||
|
@ -36,7 +37,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
minHeight: 72,
|
minHeight: 72,
|
||||||
padding: theme.spacing(1.5)
|
padding: theme.spacing(1.5)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "ImageEntity" }
|
||||||
|
);
|
||||||
|
|
||||||
const ImageEntity: React.FC<ImageEntityProps> = props => {
|
const ImageEntity: React.FC<ImageEntityProps> = props => {
|
||||||
const { contentState, entityKey, onEdit, onRemove } = props;
|
const { contentState, entityKey, onEdit, onRemove } = props;
|
||||||
|
|
|
@ -22,7 +22,8 @@ interface LinkEntityProps {
|
||||||
onRemove: (entityKey: string) => void;
|
onRemove: (entityKey: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
anchor: {
|
anchor: {
|
||||||
display: "inline-block"
|
display: "inline-block"
|
||||||
},
|
},
|
||||||
|
@ -50,7 +51,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
marginRight: theme.spacing(),
|
marginRight: theme.spacing(),
|
||||||
width: 1
|
width: 1
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "LinkEntity" }
|
||||||
|
);
|
||||||
|
|
||||||
const LinkEntity: React.FC<LinkEntityProps> = props => {
|
const LinkEntity: React.FC<LinkEntityProps> = props => {
|
||||||
const { children, contentState, entityKey, onEdit, onRemove } = props;
|
const { children, contentState, entityKey, onEdit, onRemove } = props;
|
||||||
|
|
|
@ -37,7 +37,8 @@ export interface RichTextEditorProps {
|
||||||
onChange: (event: React.ChangeEvent<any>) => void;
|
onChange: (event: React.ChangeEvent<any>) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
error: {
|
error: {
|
||||||
color: theme.palette.error.main
|
color: theme.palette.error.main
|
||||||
},
|
},
|
||||||
|
@ -188,7 +189,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
smallIcon: {
|
smallIcon: {
|
||||||
marginLeft: 10
|
marginLeft: 10
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "RichTextEditor" }
|
||||||
|
);
|
||||||
|
|
||||||
function handleSave(
|
function handleSave(
|
||||||
value: any,
|
value: any,
|
||||||
|
|
|
@ -14,7 +14,8 @@ import ConfirmButton, {
|
||||||
} from "../ConfirmButton/ConfirmButton";
|
} from "../ConfirmButton/ConfirmButton";
|
||||||
import Container from "../Container";
|
import Container from "../Container";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
button: {
|
button: {
|
||||||
marginRight: theme.spacing(1)
|
marginRight: theme.spacing(1)
|
||||||
},
|
},
|
||||||
|
@ -52,7 +53,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
boxShadow: `0 0 0 0 ${theme.palette.divider}`
|
boxShadow: `0 0 0 0 ${theme.palette.divider}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "SaveButtonBar" }
|
||||||
|
);
|
||||||
|
|
||||||
interface SaveButtonBarProps {
|
interface SaveButtonBarProps {
|
||||||
disabled: boolean;
|
disabled: boolean;
|
||||||
|
|
|
@ -11,7 +11,8 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
import CardTitle from "../CardTitle";
|
import CardTitle from "../CardTitle";
|
||||||
import FormSpacer from "../FormSpacer";
|
import FormSpacer from "../FormSpacer";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
addressBar: {
|
addressBar: {
|
||||||
color: "#006621",
|
color: "#006621",
|
||||||
fontSize: "13px",
|
fontSize: "13px",
|
||||||
|
@ -56,7 +57,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
wordWrap: "break-word"
|
wordWrap: "break-word"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "SeoForm" }
|
||||||
|
);
|
||||||
|
|
||||||
interface SeoFormProps {
|
interface SeoFormProps {
|
||||||
description?: string;
|
description?: string;
|
||||||
|
|
|
@ -13,12 +13,15 @@ import SingleAutocompleteSelectFieldContent, {
|
||||||
SingleAutocompleteChoiceType
|
SingleAutocompleteChoiceType
|
||||||
} from "./SingleAutocompleteSelectFieldContent";
|
} from "./SingleAutocompleteSelectFieldContent";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
container: {
|
container: {
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
position: "relative"
|
position: "relative"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "SingleAutocompleteSelectField" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface SingleAutocompleteSelectFieldProps
|
export interface SingleAutocompleteSelectFieldProps
|
||||||
extends Partial<FetchMoreProps> {
|
extends Partial<FetchMoreProps> {
|
||||||
|
|
|
@ -9,7 +9,8 @@ import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
formControl: {
|
formControl: {
|
||||||
"& label": {
|
"& label": {
|
||||||
top: "-3px"
|
top: "-3px"
|
||||||
|
@ -19,7 +20,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
noLabel: {
|
noLabel: {
|
||||||
padding: theme.spacing(2, 1.5)
|
padding: theme.spacing(2, 1.5)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "SingleSelectField" }
|
||||||
|
);
|
||||||
|
|
||||||
interface SingleSelectFieldProps {
|
interface SingleSelectFieldProps {
|
||||||
choices: Array<{
|
choices: Array<{
|
||||||
|
|
|
@ -2,7 +2,8 @@ import { makeStyles } from "@material-ui/core/styles";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
"@keyframes skeleton-animation": {
|
"@keyframes skeleton-animation": {
|
||||||
"0%": {
|
"0%": {
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
@ -24,7 +25,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
height: "0.8em",
|
height: "0.8em",
|
||||||
margin: "0.2em 0"
|
margin: "0.2em 0"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "Skeleton" }
|
||||||
|
);
|
||||||
|
|
||||||
interface SkeletonProps {
|
interface SkeletonProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -5,7 +5,8 @@ import { SortableHandle as SortableHandleHoc } from "react-sortable-hoc";
|
||||||
|
|
||||||
import Draggable from "@saleor/icons/Draggable";
|
import Draggable from "@saleor/icons/Draggable";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
columnDrag: {
|
columnDrag: {
|
||||||
"&:first-child": {
|
"&:first-child": {
|
||||||
paddingRight: theme.spacing(2)
|
paddingRight: theme.spacing(2)
|
||||||
|
@ -13,7 +14,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
cursor: "grab",
|
cursor: "grab",
|
||||||
width: 48 + theme.spacing(1.5)
|
width: 48 + theme.spacing(1.5)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "SortableHandle" }
|
||||||
|
);
|
||||||
|
|
||||||
const SortableHandle = SortableHandleHoc(() => {
|
const SortableHandle = SortableHandleHoc(() => {
|
||||||
const classes = useStyles({});
|
const classes = useStyles({});
|
||||||
|
|
|
@ -13,7 +13,8 @@ export interface SortableTableBodyProps {
|
||||||
onSortEnd: ReorderAction;
|
onSortEnd: ReorderAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
ghost: {
|
ghost: {
|
||||||
"& td": {
|
"& td": {
|
||||||
borderBottom: "none"
|
borderBottom: "none"
|
||||||
|
@ -24,7 +25,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
// fontSize: theme.overrides.MuiTableCell.root.fontSize,
|
// fontSize: theme.overrides.MuiTableCell.root.fontSize,
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "SortableTableBody" }
|
||||||
|
);
|
||||||
|
|
||||||
const SortableTableBody: React.FC<
|
const SortableTableBody: React.FC<
|
||||||
Omit<TableBodyProps & SortableTableBodyProps, "ref">
|
Omit<TableBodyProps & SortableTableBodyProps, "ref">
|
||||||
|
|
|
@ -4,7 +4,8 @@ import Typography, { TypographyProps } from "@material-ui/core/Typography";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => {
|
const useStyles = makeStyles(
|
||||||
|
theme => {
|
||||||
const dot = {
|
const dot = {
|
||||||
borderRadius: "100%",
|
borderRadius: "100%",
|
||||||
content: "''",
|
content: "''",
|
||||||
|
@ -35,7 +36,9 @@ const useStyles = makeStyles(theme => {
|
||||||
"&:before": { backgroundColor: theme.palette.primary.main, ...dot }
|
"&:before": { backgroundColor: theme.palette.primary.main, ...dot }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
},
|
||||||
|
{ name: "StatusLabel" }
|
||||||
|
);
|
||||||
|
|
||||||
interface StatusLabelProps {
|
interface StatusLabelProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -5,11 +5,14 @@ export interface TabContainerProps {
|
||||||
children: React.ReactNode | React.ReactNodeArray;
|
children: React.ReactNode | React.ReactNodeArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
root: {
|
root: {
|
||||||
borderBottom: `1px solid ${theme.palette.divider}`
|
borderBottom: `1px solid ${theme.palette.divider}`
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "TabContainer" }
|
||||||
|
);
|
||||||
|
|
||||||
const TabContainer: React.FC<TabContainerProps> = props => {
|
const TabContainer: React.FC<TabContainerProps> = props => {
|
||||||
const { children } = props;
|
const { children } = props;
|
||||||
|
|
|
@ -9,7 +9,8 @@ import Image from "../../icons/Image";
|
||||||
|
|
||||||
export const AVATAR_MARGIN = 32;
|
export const AVATAR_MARGIN = 32;
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
avatar: {
|
avatar: {
|
||||||
background: "none",
|
background: "none",
|
||||||
border: `1px solid ${theme.palette.divider}`,
|
border: `1px solid ${theme.palette.divider}`,
|
||||||
|
@ -34,7 +35,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
paddingRight: theme.spacing(3),
|
paddingRight: theme.spacing(3),
|
||||||
width: "1%"
|
width: "1%"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "TableCellAvatar" }
|
||||||
|
);
|
||||||
|
|
||||||
interface TableCellAvatarProps {
|
interface TableCellAvatarProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -5,7 +5,8 @@ import React from "react";
|
||||||
|
|
||||||
import ArrowSort from "../../icons/ArrowSort";
|
import ArrowSort from "../../icons/ArrowSort";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
arrow: {
|
arrow: {
|
||||||
transition: theme.transitions.duration.short + "ms"
|
transition: theme.transitions.duration.short + "ms"
|
||||||
},
|
},
|
||||||
|
@ -38,7 +39,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
root: {
|
root: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "TableCellHeader" }
|
||||||
|
);
|
||||||
|
|
||||||
export type TableCellHeaderArrowDirection = "asc" | "desc";
|
export type TableCellHeaderArrowDirection = "asc" | "desc";
|
||||||
export type TableCellHeaderArrowPosition = "left" | "right";
|
export type TableCellHeaderArrowPosition = "left" | "right";
|
||||||
|
|
|
@ -3,7 +3,8 @@ import Tab from "@material-ui/core/Tab";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
selectedTabLabel: {
|
selectedTabLabel: {
|
||||||
"&$tabLabel": {
|
"&$tabLabel": {
|
||||||
color: theme.typography.body1.color
|
color: theme.typography.body1.color
|
||||||
|
@ -23,7 +24,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
paddingTop: theme.spacing(1),
|
paddingTop: theme.spacing(1),
|
||||||
textTransform: "initial" as "initial"
|
textTransform: "initial" as "initial"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "FilterTab" }
|
||||||
|
);
|
||||||
|
|
||||||
interface FilterTabProps {
|
interface FilterTabProps {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
|
|
@ -2,12 +2,15 @@ import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Tabs from "@material-ui/core/Tabs";
|
import Tabs from "@material-ui/core/Tabs";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
tabsRoot: {
|
tabsRoot: {
|
||||||
borderBottom: `1px solid ${theme.palette.divider}`,
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
||||||
paddingLeft: theme.spacing(3)
|
paddingLeft: theme.spacing(3)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "FilterTabs" }
|
||||||
|
);
|
||||||
|
|
||||||
interface FilterTabsProps {
|
interface FilterTabsProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
|
|
@ -24,7 +24,8 @@ export interface TableHeadProps extends MuiTableHeadProps {
|
||||||
toggleAll?: (items: Node[], selected: number) => void;
|
toggleAll?: (items: Node[], selected: number) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
cell: {
|
cell: {
|
||||||
padding: 0
|
padding: 0
|
||||||
},
|
},
|
||||||
|
@ -76,7 +77,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
marginLeft: theme.spacing(1)
|
marginLeft: theme.spacing(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "TableHead" }
|
||||||
|
);
|
||||||
|
|
||||||
const TableHead: React.FC<TableHeadProps> = props => {
|
const TableHead: React.FC<TableHeadProps> = props => {
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -9,7 +9,8 @@ import { maybe } from "@saleor/misc";
|
||||||
import { ListSettings } from "../../types";
|
import { ListSettings } from "../../types";
|
||||||
import TablePaginationActions from "./TablePaginationActions";
|
import TablePaginationActions from "./TablePaginationActions";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
actions: {
|
actions: {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
|
@ -48,7 +49,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
paddingLeft: 2,
|
paddingLeft: 2,
|
||||||
paddingRight: 2
|
paddingRight: 2
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "TablePagination" }
|
||||||
|
);
|
||||||
|
|
||||||
interface TablePaginationProps {
|
interface TablePaginationProps {
|
||||||
backIconButtonProps?: Partial<IconButtonProps>;
|
backIconButtonProps?: Partial<IconButtonProps>;
|
||||||
|
|
|
@ -7,7 +7,8 @@ import useTheme from "@saleor/hooks/useTheme";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
dark: {
|
dark: {
|
||||||
"& svg": {
|
"& svg": {
|
||||||
color: theme.palette.primary.main
|
color: theme.palette.primary.main
|
||||||
|
@ -47,7 +48,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
margin: theme.spacing(0, 2.5)
|
margin: theme.spacing(0, 2.5)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "TablePaginationActions" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface TablePaginationActionsProps {
|
export interface TablePaginationActionsProps {
|
||||||
backIconButtonProps?: any;
|
backIconButtonProps?: any;
|
||||||
|
|
|
@ -23,7 +23,8 @@ export type TextFieldWithChoiceProps<TValue = string> = TextFieldProps & {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
adornment: {
|
adornment: {
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
|
@ -32,7 +33,9 @@ const useStyles = makeStyles({
|
||||||
menu: {
|
menu: {
|
||||||
zIndex: 10
|
zIndex: 10
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "TextFieldWithChoice" }
|
||||||
|
);
|
||||||
|
|
||||||
const TextFieldWithChoice: React.FC<TextFieldWithChoiceProps> = props => {
|
const TextFieldWithChoice: React.FC<TextFieldWithChoiceProps> = props => {
|
||||||
const { ChoiceProps, InputProps, onChange, ...rest } = props;
|
const { ChoiceProps, InputProps, onChange, ...rest } = props;
|
||||||
|
|
|
@ -8,7 +8,8 @@ import React from "react";
|
||||||
|
|
||||||
import { DateTime } from "../Date";
|
import { DateTime } from "../Date";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
date: {
|
date: {
|
||||||
color: theme.typography.caption.color
|
color: theme.typography.caption.color
|
||||||
},
|
},
|
||||||
|
@ -57,7 +58,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
position: "relative",
|
position: "relative",
|
||||||
width: "100%"
|
width: "100%"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "TimelineEvent" }
|
||||||
|
);
|
||||||
|
|
||||||
interface TimelineEventProps {
|
interface TimelineEventProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
|
|
@ -29,7 +29,8 @@ const palette = [
|
||||||
colors.yellow
|
colors.yellow
|
||||||
].map(color => color[500]);
|
].map(color => color[500]);
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
avatar: {
|
avatar: {
|
||||||
left: -45,
|
left: -45,
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
|
@ -59,7 +60,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
marginBottom: theme.spacing(),
|
marginBottom: theme.spacing(),
|
||||||
paddingLeft: theme.spacing(3)
|
paddingLeft: theme.spacing(3)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "TimelineNote" }
|
||||||
|
);
|
||||||
|
|
||||||
interface TimelineNoteProps {
|
interface TimelineNoteProps {
|
||||||
date: string;
|
date: string;
|
||||||
|
|
|
@ -10,7 +10,8 @@ import CardTitle from "@saleor/components/CardTitle";
|
||||||
import RadioSwitchField from "@saleor/components/RadioSwitchField";
|
import RadioSwitchField from "@saleor/components/RadioSwitchField";
|
||||||
import { DateContext } from "../Date/DateContext";
|
import { DateContext } from "../Date/DateContext";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
children: {
|
children: {
|
||||||
"& button": {
|
"& button": {
|
||||||
margin: "0 9px"
|
margin: "0 9px"
|
||||||
|
@ -39,7 +40,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
paddingTop: "15px",
|
paddingTop: "15px",
|
||||||
textDecoration: "underline"
|
textDecoration: "underline"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "VisibilityCard" }
|
||||||
|
);
|
||||||
|
|
||||||
interface VisibilityCardProps {
|
interface VisibilityCardProps {
|
||||||
children?: React.ReactNode | React.ReactNodeArray;
|
children?: React.ReactNode | React.ReactNodeArray;
|
||||||
|
|
|
@ -26,7 +26,8 @@ export interface MenuSection {
|
||||||
menuItems: MenuItem[];
|
menuItems: MenuItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
card: {
|
card: {
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
boxShadow: "0px 5px 15px rgba(0, 0, 0, 0.15);"
|
boxShadow: "0px 5px 15px rgba(0, 0, 0, 0.15);"
|
||||||
|
@ -83,7 +84,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: 600 as 600
|
fontWeight: 600 as 600
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "ConfigurationPage" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface ConfigurationPageProps {
|
export interface ConfigurationPageProps {
|
||||||
menu: MenuSection[];
|
menu: MenuSection[];
|
||||||
|
|
|
@ -25,7 +25,8 @@ export interface CustomerAddressProps {
|
||||||
onSetAsDefault: (type: AddressTypeEnum) => void;
|
onSetAsDefault: (type: AddressTypeEnum) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
actions: {
|
actions: {
|
||||||
flexDirection: "row"
|
flexDirection: "row"
|
||||||
},
|
},
|
||||||
|
@ -39,7 +40,9 @@ const useStyles = makeStyles({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column"
|
flexDirection: "column"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "CustomerAddress" }
|
||||||
|
);
|
||||||
const CustomerAddress: React.FC<CustomerAddressProps> = props => {
|
const CustomerAddress: React.FC<CustomerAddressProps> = props => {
|
||||||
const {
|
const {
|
||||||
address,
|
address,
|
||||||
|
|
|
@ -23,7 +23,8 @@ export interface CustomerAddressListPageProps {
|
||||||
onSetAsDefault: (id: string, type: AddressTypeEnum) => void;
|
onSetAsDefault: (id: string, type: AddressTypeEnum) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
addButton: {
|
addButton: {
|
||||||
marginTop: theme.spacing(2)
|
marginTop: theme.spacing(2)
|
||||||
},
|
},
|
||||||
|
@ -41,7 +42,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
gridTemplateColumns: "repeat(3, 1fr)",
|
gridTemplateColumns: "repeat(3, 1fr)",
|
||||||
rowGap: theme.spacing(3)
|
rowGap: theme.spacing(3)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CustomerAddressListPage" }
|
||||||
|
);
|
||||||
|
|
||||||
const CustomerAddressListPage: React.FC<
|
const CustomerAddressListPage: React.FC<
|
||||||
CustomerAddressListPageProps
|
CustomerAddressListPageProps
|
||||||
|
|
|
@ -13,12 +13,15 @@ import { buttonMessages } from "@saleor/intl";
|
||||||
import { maybe } from "../../../misc";
|
import { maybe } from "../../../misc";
|
||||||
import { CustomerDetails_user } from "../../types/CustomerDetails";
|
import { CustomerDetails_user } from "../../types/CustomerDetails";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
label: {
|
label: {
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
marginBottom: theme.spacing(1)
|
marginBottom: theme.spacing(1)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CustomerAddresses" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface CustomerAddressesProps {
|
export interface CustomerAddressesProps {
|
||||||
customer: CustomerDetails_user;
|
customer: CustomerDetails_user;
|
||||||
|
|
|
@ -12,11 +12,14 @@ import { SingleAutocompleteChoiceType } from "@saleor/components/SingleAutocompl
|
||||||
import { FormErrors } from "../../../types";
|
import { FormErrors } from "../../../types";
|
||||||
import { AddressTypeInput } from "../../types";
|
import { AddressTypeInput } from "../../types";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
overflow: {
|
overflow: {
|
||||||
overflow: "visible"
|
overflow: "visible"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "CustomerCreateAddress" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface CustomerCreateAddressProps {
|
export interface CustomerCreateAddressProps {
|
||||||
countries: SingleAutocompleteChoiceType[];
|
countries: SingleAutocompleteChoiceType[];
|
||||||
|
|
|
@ -10,14 +10,17 @@ import { commonMessages } from "@saleor/intl";
|
||||||
import { FormErrors } from "../../../types";
|
import { FormErrors } from "../../../types";
|
||||||
import { CustomerCreatePageFormData } from "../CustomerCreatePage";
|
import { CustomerCreatePageFormData } from "../CustomerCreatePage";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
root: {
|
root: {
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridColumnGap: theme.spacing(2),
|
gridColumnGap: theme.spacing(2),
|
||||||
gridRowGap: theme.spacing(3),
|
gridRowGap: theme.spacing(3),
|
||||||
gridTemplateColumns: "1fr 1fr"
|
gridTemplateColumns: "1fr 1fr"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CustomerCreateDetails" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface CustomerCreateDetailsProps {
|
export interface CustomerCreateDetailsProps {
|
||||||
data: CustomerCreatePageFormData;
|
data: CustomerCreatePageFormData;
|
||||||
|
|
|
@ -14,7 +14,8 @@ import { maybe } from "@saleor/misc";
|
||||||
import { FormErrors } from "@saleor/types";
|
import { FormErrors } from "@saleor/types";
|
||||||
import { CustomerDetails_user } from "../../types/CustomerDetails";
|
import { CustomerDetails_user } from "../../types/CustomerDetails";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
cardTitle: {
|
cardTitle: {
|
||||||
height: 72
|
height: 72
|
||||||
},
|
},
|
||||||
|
@ -27,7 +28,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
subtitle: {
|
subtitle: {
|
||||||
marginTop: theme.spacing()
|
marginTop: theme.spacing()
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CustomerDetails" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface CustomerDetailsProps {
|
export interface CustomerDetailsProps {
|
||||||
customer: CustomerDetails_user;
|
customer: CustomerDetails_user;
|
||||||
|
|
|
@ -11,7 +11,8 @@ import Grid from "@saleor/components/Grid";
|
||||||
import Hr from "@saleor/components/Hr";
|
import Hr from "@saleor/components/Hr";
|
||||||
import { commonMessages } from "@saleor/intl";
|
import { commonMessages } from "@saleor/intl";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
content: {
|
content: {
|
||||||
paddingTop: theme.spacing(2)
|
paddingTop: theme.spacing(2)
|
||||||
},
|
},
|
||||||
|
@ -21,7 +22,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
sectionHeader: {
|
sectionHeader: {
|
||||||
marginBottom: theme.spacing()
|
marginBottom: theme.spacing()
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CustomerInfo" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface CustomerInfoProps {
|
export interface CustomerInfoProps {
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -15,7 +15,8 @@ import { getUserName, maybe, renderCollection } from "@saleor/misc";
|
||||||
import { ListActions, ListProps } from "@saleor/types";
|
import { ListActions, ListProps } from "@saleor/types";
|
||||||
import { ListCustomers_customers_edges_node } from "../../types/ListCustomers";
|
import { ListCustomers_customers_edges_node } from "../../types/ListCustomers";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
[theme.breakpoints.up("lg")]: {
|
[theme.breakpoints.up("lg")]: {
|
||||||
colEmail: {},
|
colEmail: {},
|
||||||
colName: {},
|
colName: {},
|
||||||
|
@ -33,7 +34,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
tableRow: {
|
tableRow: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CustomerList" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface CustomerListProps extends ListProps, ListActions {
|
export interface CustomerListProps extends ListProps, ListActions {
|
||||||
customers: ListCustomers_customers_edges_node[];
|
customers: ListCustomers_customers_edges_node[];
|
||||||
|
|
|
@ -17,14 +17,17 @@ import StatusLabel from "@saleor/components/StatusLabel";
|
||||||
import { maybe, renderCollection, transformPaymentStatus } from "../../../misc";
|
import { maybe, renderCollection, transformPaymentStatus } from "../../../misc";
|
||||||
import { CustomerDetails_user_orders_edges_node } from "../../types/CustomerDetails";
|
import { CustomerDetails_user_orders_edges_node } from "../../types/CustomerDetails";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
link: {
|
link: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
},
|
},
|
||||||
textRight: {
|
textRight: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "CustomerOrders" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface CustomerOrdersProps {
|
export interface CustomerOrdersProps {
|
||||||
orders: CustomerDetails_user_orders_edges_node[];
|
orders: CustomerDetails_user_orders_edges_node[];
|
||||||
|
|
|
@ -12,14 +12,17 @@ import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { maybe } from "../../../misc";
|
import { maybe } from "../../../misc";
|
||||||
import { CustomerDetails_user } from "../../types/CustomerDetails";
|
import { CustomerDetails_user } from "../../types/CustomerDetails";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
label: {
|
label: {
|
||||||
marginBottom: theme.spacing(1)
|
marginBottom: theme.spacing(1)
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
fontSize: 24
|
fontSize: 24
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "CustomerStats" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface CustomerStatsProps {
|
export interface CustomerStatsProps {
|
||||||
customer: CustomerDetails_user;
|
customer: CustomerDetails_user;
|
||||||
|
|
|
@ -27,7 +27,8 @@ export interface DiscountCategoriesProps extends ListProps, ListActions {
|
||||||
onCategoryUnassign: (id: string) => void;
|
onCategoryUnassign: (id: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
iconCell: {
|
iconCell: {
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
paddingRight: 0
|
paddingRight: 0
|
||||||
|
@ -43,7 +44,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
wideColumn: {
|
wideColumn: {
|
||||||
width: "60%"
|
width: "60%"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "DiscountCategories" }
|
||||||
|
);
|
||||||
|
|
||||||
const numberOfColumns = 4;
|
const numberOfColumns = 4;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,8 @@ export interface DiscountCollectionsProps extends ListProps, ListActions {
|
||||||
onCollectionUnassign: (id: string) => void;
|
onCollectionUnassign: (id: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
iconCell: {
|
iconCell: {
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
paddingRight: 0
|
paddingRight: 0
|
||||||
|
@ -43,7 +44,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
wideColumn: {
|
wideColumn: {
|
||||||
width: "60%"
|
width: "60%"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "DiscountCollections" }
|
||||||
|
);
|
||||||
|
|
||||||
const numberOfColumns = 4;
|
const numberOfColumns = 4;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,8 @@ export interface DiscountCountrySelectDialogProps {
|
||||||
onConfirm: (data: FormData) => void;
|
onConfirm: (data: FormData) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
checkboxCell: {
|
checkboxCell: {
|
||||||
paddingLeft: 0
|
paddingLeft: 0
|
||||||
},
|
},
|
||||||
|
@ -54,7 +55,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
wideCell: {
|
wideCell: {
|
||||||
width: "100%"
|
width: "100%"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "DiscountCountrySelectDialog" }
|
||||||
|
);
|
||||||
const DiscountCountrySelectDialog: React.FC<
|
const DiscountCountrySelectDialog: React.FC<
|
||||||
DiscountCountrySelectDialogProps
|
DiscountCountrySelectDialogProps
|
||||||
> = props => {
|
> = props => {
|
||||||
|
|
|
@ -31,7 +31,8 @@ export interface SaleProductsProps extends ListProps, ListActions {
|
||||||
onProductUnassign: (id: string) => void;
|
onProductUnassign: (id: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
colActions: {
|
colActions: {
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
paddingRight: 0
|
paddingRight: 0
|
||||||
|
@ -57,7 +58,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
tableRow: {
|
tableRow: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "DiscountProducts" }
|
||||||
|
);
|
||||||
|
|
||||||
const numberOfColumns = 5;
|
const numberOfColumns = 5;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,8 @@ export interface SaleListProps extends ListProps, ListActions {
|
||||||
sales: SaleList_sales_edges_node[];
|
sales: SaleList_sales_edges_node[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
[theme.breakpoints.up("lg")]: {
|
[theme.breakpoints.up("lg")]: {
|
||||||
colEnd: {
|
colEnd: {
|
||||||
width: 250
|
width: 250
|
||||||
|
@ -52,7 +53,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
tableRow: {
|
tableRow: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "SaleList" }
|
||||||
|
);
|
||||||
|
|
||||||
const numberOfColumns = 5;
|
const numberOfColumns = 5;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,8 @@ export interface VoucherListProps extends ListProps, ListActions {
|
||||||
vouchers: VoucherList_vouchers_edges_node[];
|
vouchers: VoucherList_vouchers_edges_node[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
[theme.breakpoints.up("lg")]: {
|
[theme.breakpoints.up("lg")]: {
|
||||||
colEnd: {
|
colEnd: {
|
||||||
width: 180
|
width: 180
|
||||||
|
@ -67,7 +68,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
textRight: {
|
textRight: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "VoucherList" }
|
||||||
|
);
|
||||||
|
|
||||||
const numberOfColumns = 7;
|
const numberOfColumns = 7;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@ import { renderCollection } from "../../../misc";
|
||||||
import { Home_activities_edges_node } from "../../types/Home";
|
import { Home_activities_edges_node } from "../../types/Home";
|
||||||
import { getActivityMessage } from "./activityMessages";
|
import { getActivityMessage } from "./activityMessages";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
loadingProducts: {
|
loadingProducts: {
|
||||||
paddingBottom: "10px",
|
paddingBottom: "10px",
|
||||||
paddingTop: "10px"
|
paddingTop: "10px"
|
||||||
|
@ -23,7 +24,9 @@ const useStyles = makeStyles({
|
||||||
paddingBottom: "16px",
|
paddingBottom: "16px",
|
||||||
paddingTop: "16px"
|
paddingTop: "16px"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "HomeActivityCard" }
|
||||||
|
);
|
||||||
|
|
||||||
interface HomeActivityCardProps {
|
interface HomeActivityCardProps {
|
||||||
activities: Home_activities_edges_node[];
|
activities: Home_activities_edges_node[];
|
||||||
|
|
|
@ -6,7 +6,8 @@ import Typography from "@material-ui/core/Typography";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
cardContent: {
|
cardContent: {
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
padding: theme.spacing(2, 3)
|
padding: theme.spacing(2, 3)
|
||||||
|
@ -47,7 +48,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
value: {
|
value: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "HomeAnalyticsCard" }
|
||||||
|
);
|
||||||
|
|
||||||
interface HomeAnalyticsCardProps {
|
interface HomeAnalyticsCardProps {
|
||||||
icon: React.ReactElement<IconProps>;
|
icon: React.ReactElement<IconProps>;
|
||||||
|
|
|
@ -5,7 +5,8 @@ import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
headerContainer: {
|
headerContainer: {
|
||||||
marginBottom: theme.spacing(3)
|
marginBottom: theme.spacing(3)
|
||||||
},
|
},
|
||||||
|
@ -15,7 +16,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
subtitle: {
|
subtitle: {
|
||||||
color: theme.typography.caption.color
|
color: theme.typography.caption.color
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "HomeHeader" }
|
||||||
|
);
|
||||||
|
|
||||||
interface HomeOrdersCardProps {
|
interface HomeOrdersCardProps {
|
||||||
userName: string;
|
userName: string;
|
||||||
|
|
|
@ -14,14 +14,17 @@ import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { UserPermissionProps } from "@saleor/types";
|
import { UserPermissionProps } from "@saleor/types";
|
||||||
import { PermissionEnum } from "@saleor/types/globalTypes";
|
import { PermissionEnum } from "@saleor/types/globalTypes";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
arrowIcon: {
|
arrowIcon: {
|
||||||
width: theme.spacing(4)
|
width: theme.spacing(4)
|
||||||
},
|
},
|
||||||
tableRow: {
|
tableRow: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "HomeNotificationTable" }
|
||||||
|
);
|
||||||
|
|
||||||
interface HomeNotificationTableProps extends UserPermissionProps {
|
interface HomeNotificationTableProps extends UserPermissionProps {
|
||||||
ordersToCapture: number;
|
ordersToCapture: number;
|
||||||
|
|
|
@ -22,7 +22,8 @@ import HomeHeader from "../HomeHeader";
|
||||||
import HomeNotificationTable from "../HomeNotificationTable/HomeNotificationTable";
|
import HomeNotificationTable from "../HomeNotificationTable/HomeNotificationTable";
|
||||||
import HomeProductListCard from "../HomeProductListCard";
|
import HomeProductListCard from "../HomeProductListCard";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
cardContainer: {
|
cardContainer: {
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridColumnGap: theme.spacing(3),
|
gridColumnGap: theme.spacing(3),
|
||||||
|
@ -34,7 +35,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
gridTemplateColumns: "1fr"
|
gridTemplateColumns: "1fr"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "HomePage" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface HomePageProps extends UserPermissionProps {
|
export interface HomePageProps extends UserPermissionProps {
|
||||||
activities: Home_activities_edges_node[];
|
activities: Home_activities_edges_node[];
|
||||||
|
|
|
@ -16,7 +16,8 @@ import TableCellAvatar from "@saleor/components/TableCellAvatar";
|
||||||
import { maybe, renderCollection } from "../../../misc";
|
import { maybe, renderCollection } from "../../../misc";
|
||||||
import { Home_productTopToday_edges_node } from "../../types/Home";
|
import { Home_productTopToday_edges_node } from "../../types/Home";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
avatarProps: {
|
avatarProps: {
|
||||||
height: 64,
|
height: 64,
|
||||||
width: 64
|
width: 64
|
||||||
|
@ -36,7 +37,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
tableRow: {
|
tableRow: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "HomeProductListCard" }
|
||||||
|
);
|
||||||
|
|
||||||
interface HomeProductListProps {
|
interface HomeProductListProps {
|
||||||
topProducts: Home_productTopToday_edges_node[];
|
topProducts: Home_productTopToday_edges_node[];
|
||||||
|
|
|
@ -34,7 +34,8 @@ export interface MenuItemsProps {
|
||||||
onUndo: () => void;
|
onUndo: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
actions: {
|
actions: {
|
||||||
flexDirection: "row"
|
flexDirection: "row"
|
||||||
},
|
},
|
||||||
|
@ -109,7 +110,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
spacer: {
|
spacer: {
|
||||||
flex: 1
|
flex: 1
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "MenuItems" }
|
||||||
|
);
|
||||||
|
|
||||||
const Placeholder: React.FC = props => {
|
const Placeholder: React.FC = props => {
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
|
@ -23,7 +23,8 @@ export interface MenuListProps extends ListProps, ListActions {
|
||||||
onDelete: (id: string) => void;
|
onDelete: (id: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
[theme.breakpoints.up("lg")]: {
|
[theme.breakpoints.up("lg")]: {
|
||||||
colItems: {
|
colItems: {
|
||||||
width: 200
|
width: 200
|
||||||
|
@ -39,7 +40,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
row: {
|
row: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "MenuList" }
|
||||||
|
);
|
||||||
|
|
||||||
const numberOfColumns = 4;
|
const numberOfColumns = 4;
|
||||||
|
|
||||||
|
|
|
@ -22,11 +22,14 @@ import { UserError } from "@saleor/types";
|
||||||
import { AddressInput } from "@saleor/types/globalTypes";
|
import { AddressInput } from "@saleor/types/globalTypes";
|
||||||
import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler";
|
import createSingleAutocompleteSelectHandler from "@saleor/utils/handlers/singleAutocompleteSelectChangeHandler";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles(
|
||||||
|
{
|
||||||
overflow: {
|
overflow: {
|
||||||
overflowY: "visible"
|
overflowY: "visible"
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{ name: "OrderAddressEditDialog" }
|
||||||
|
);
|
||||||
|
|
||||||
interface OrderAddressEditDialogProps {
|
interface OrderAddressEditDialogProps {
|
||||||
confirmButtonState: ConfirmButtonTransitionState;
|
confirmButtonState: ConfirmButtonTransitionState;
|
||||||
|
|
|
@ -19,7 +19,8 @@ export interface FormData {
|
||||||
restock: boolean;
|
restock: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
deleteButton: {
|
deleteButton: {
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: theme.palette.error.main
|
backgroundColor: theme.palette.error.main
|
||||||
|
@ -27,7 +28,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
backgroundColor: theme.palette.error.main,
|
backgroundColor: theme.palette.error.main,
|
||||||
color: theme.palette.error.contrastText
|
color: theme.palette.error.contrastText
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "OrderCancelDialog" }
|
||||||
|
);
|
||||||
|
|
||||||
interface OrderCancelDialogProps {
|
interface OrderCancelDialogProps {
|
||||||
confirmButtonState: ConfirmButtonTransitionState;
|
confirmButtonState: ConfirmButtonTransitionState;
|
||||||
|
|
|
@ -24,7 +24,8 @@ import { customerUrl } from "../../../customers/urls";
|
||||||
import { createHref, maybe } from "../../../misc";
|
import { createHref, maybe } from "../../../misc";
|
||||||
import { OrderDetails_order } from "../../types/OrderDetails";
|
import { OrderDetails_order } from "../../types/OrderDetails";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
sectionHeader: {
|
sectionHeader: {
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
@ -43,7 +44,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
fontWeight: 600 as 600,
|
fontWeight: 600 as 600,
|
||||||
marginBottom: theme.spacing(1)
|
marginBottom: theme.spacing(1)
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "OrderCustomer" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface OrderCustomerProps
|
export interface OrderCustomerProps
|
||||||
extends Partial<FetchMoreProps>,
|
extends Partial<FetchMoreProps>,
|
||||||
|
|
|
@ -25,7 +25,8 @@ export interface FormData {
|
||||||
quantity: number;
|
quantity: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
colAction: {
|
colAction: {
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
paddingRight: 0
|
paddingRight: 0
|
||||||
|
@ -60,7 +61,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
table: {
|
table: {
|
||||||
tableLayout: "fixed"
|
tableLayout: "fixed"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "OrderDraftDetailsProducts" }
|
||||||
|
);
|
||||||
|
|
||||||
interface OrderDraftDetailsProductsProps {
|
interface OrderDraftDetailsProductsProps {
|
||||||
lines: OrderDetails_order_lines[];
|
lines: OrderDetails_order_lines[];
|
||||||
|
|
|
@ -8,7 +8,8 @@ import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { maybe } from "../../../misc";
|
import { maybe } from "../../../misc";
|
||||||
import { OrderDetails_order } from "../../types/OrderDetails";
|
import { OrderDetails_order } from "../../types/OrderDetails";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
root: {
|
root: {
|
||||||
...theme.typography.body1,
|
...theme.typography.body1,
|
||||||
lineHeight: 1.9,
|
lineHeight: 1.9,
|
||||||
|
@ -17,7 +18,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
textRight: {
|
textRight: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "OrderDraftDetailsSummary" }
|
||||||
|
);
|
||||||
|
|
||||||
interface OrderDraftDetailsSummaryProps {
|
interface OrderDraftDetailsSummaryProps {
|
||||||
order: OrderDetails_order;
|
order: OrderDetails_order;
|
||||||
|
|
|
@ -22,7 +22,8 @@ import {
|
||||||
import { ListActions, ListProps } from "@saleor/types";
|
import { ListActions, ListProps } from "@saleor/types";
|
||||||
import { OrderDraftList_draftOrders_edges_node } from "../../types/OrderDraftList";
|
import { OrderDraftList_draftOrders_edges_node } from "../../types/OrderDraftList";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
[theme.breakpoints.up("lg")]: {
|
[theme.breakpoints.up("lg")]: {
|
||||||
colCustomer: {
|
colCustomer: {
|
||||||
width: 300
|
width: 300
|
||||||
|
@ -46,7 +47,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
link: {
|
link: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "OrderDraftList" }
|
||||||
|
);
|
||||||
|
|
||||||
interface OrderDraftListProps extends ListProps, ListActions {
|
interface OrderDraftListProps extends ListProps, ListActions {
|
||||||
orders: OrderDraftList_draftOrders_edges_node[];
|
orders: OrderDraftList_draftOrders_edges_node[];
|
||||||
|
|
|
@ -23,7 +23,8 @@ import OrderDraftDetails from "../OrderDraftDetails/OrderDraftDetails";
|
||||||
import { FormData as OrderDraftDetailsProductsFormData } from "../OrderDraftDetailsProducts";
|
import { FormData as OrderDraftDetailsProductsFormData } from "../OrderDraftDetailsProducts";
|
||||||
import OrderHistory, { FormData as HistoryFormData } from "../OrderHistory";
|
import OrderHistory, { FormData as HistoryFormData } from "../OrderHistory";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
date: {
|
date: {
|
||||||
marginBottom: theme.spacing(3)
|
marginBottom: theme.spacing(3)
|
||||||
},
|
},
|
||||||
|
@ -31,7 +32,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
display: "flex",
|
display: "flex",
|
||||||
marginBottom: 0
|
marginBottom: 0
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "OrderDraftPage" }
|
||||||
|
);
|
||||||
|
|
||||||
export interface OrderDraftPageProps
|
export interface OrderDraftPageProps
|
||||||
extends FetchMoreProps,
|
extends FetchMoreProps,
|
||||||
|
|
|
@ -23,7 +23,8 @@ import { maybe, renderCollection } from "../../../misc";
|
||||||
import { FulfillmentStatus } from "../../../types/globalTypes";
|
import { FulfillmentStatus } from "../../../types/globalTypes";
|
||||||
import { OrderDetails_order_fulfillments } from "../../types/OrderDetails";
|
import { OrderDetails_order_fulfillments } from "../../types/OrderDetails";
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(
|
||||||
|
theme => ({
|
||||||
clickableRow: {
|
clickableRow: {
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
},
|
},
|
||||||
|
@ -56,7 +57,9 @@ const useStyles = makeStyles(theme => ({
|
||||||
table: {
|
table: {
|
||||||
tableLayout: "fixed"
|
tableLayout: "fixed"
|
||||||
}
|
}
|
||||||
}));
|
}),
|
||||||
|
{ name: "OrderFulfillment" }
|
||||||
|
);
|
||||||
|
|
||||||
interface OrderFulfillmentProps {
|
interface OrderFulfillmentProps {
|
||||||
fulfillment: OrderDetails_order_fulfillments;
|
fulfillment: OrderDetails_order_fulfillments;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue