@saleor/macaw-ui 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionBar/styles.d.ts +1 -1
- package/dist/Alert/Alert.d.ts +2 -1
- package/dist/Button/Button.d.ts +1 -3
- package/dist/Pagination/Pagination.d.ts +2 -2
- package/dist/Savebar/styles.d.ts +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +3 -3
- package/dist/icons/Logo.d.ts +1 -1
- package/dist/icons/LogoLight.d.ts +2 -2
- package/dist/icons/index.d.ts +1 -4
- package/dist/index.d.ts +0 -3
- package/dist/index.js +1 -4
- package/dist/index.js.map +3 -3
- package/dist/mjs/index.js +5 -0
- package/dist/mjs/index.js.map +7 -0
- package/dist/theme/createSaleorTheme/overrides/buttons.d.ts +2 -2
- package/dist/theme/createSaleorTheme/overrides/index.d.ts +2 -2
- package/dist/theme/createSaleorTheme/overrides/inputs.d.ts +2 -2
- package/dist/theme/createSaleorTheme/overrides/tables.d.ts +2 -2
- package/dist/theme/createSaleorTheme/shadows.d.ts +2 -2
- package/dist/theme/createSaleorTheme/types.d.ts +4 -8
- package/dist/types/CircleIndicator/CircleIndicator.d.ts +7 -0
- package/dist/types/CircleIndicator/CircleIndicator.stories.d.ts +4 -0
- package/dist/types/CircleIndicator/index.d.ts +1 -0
- package/dist/types/CircleIndicator/styles.d.ts +2 -0
- package/dist/types/ConfirmButton/ConfirmButton.d.ts +1 -1
- package/dist/types/Pill/Pill.d.ts +1 -1
- package/dist/types/StatusChip/styles.d.ts +3 -0
- package/dist/types/icons/CircleIndicatorIcon.d.ts +1 -0
- package/dist/types/icons/SuccessCircleIndicatorIcon.d.ts +1 -0
- package/dist/types/icons/index.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -1
- package/src/ActionBar/styles.ts +1 -1
- package/src/Alert/Alert.tsx +2 -2
- package/src/Backlink/Backlink.stories.tsx +0 -1
- package/src/Backlink/Backlink.tsx +1 -1
- package/src/BaseList/BaseList.tsx +1 -0
- package/src/BaseList/context.ts +1 -0
- package/src/BaseList/styles.ts +1 -0
- package/src/CircleIndicator/CircleIndicator.stories.tsx +48 -0
- package/src/CircleIndicator/CircleIndicator.tsx +34 -0
- package/src/CircleIndicator/index.ts +1 -0
- package/src/CircleIndicator/styles.ts +31 -0
- package/src/ConfirmButton/ConfirmButton.tsx +1 -1
- package/src/Filter/Filter.tsx +1 -3
- package/src/Filter/FilterBar.tsx +0 -1
- package/src/LayoutButton/LayoutButton.tsx +1 -2
- package/src/List/List.stories.tsx +4 -2
- package/src/List/List.tsx +1 -0
- package/src/List/styles.ts +1 -0
- package/src/NavigationCard/NavigationCard.stories.tsx +2 -2
- package/src/NavigationCard/NavigationCard.tsx +1 -1
- package/src/Notification/Notification.tsx +3 -3
- package/src/OffsettedList/OffsettedList.stories.tsx +2 -2
- package/src/OffsettedList/OffsettedList.tsx +1 -0
- package/src/Pill/Pill.stories.tsx +3 -3
- package/src/Pill/Pill.tsx +3 -2
- package/src/PillLink/PillLink.tsx +1 -0
- package/src/Savebar/Savebar.tsx +1 -1
- package/src/Sidebar/ExpandButton.tsx +1 -1
- package/src/StatusChip/StatusChip.tsx +1 -1
- package/src/UserChipMenu/UserChipMenu.tsx +1 -1
- package/src/consts.ts +1 -0
- package/src/icons/CircleIndicatorIcon.tsx +10 -0
- package/src/icons/SuccessCircleIndicatorIcon.tsx +16 -0
- package/src/icons/index.ts +2 -0
- package/src/index.tsx +1 -0
- package/src/theme/ThemeProvider.tsx +0 -1
- package/src/theme/createSaleorTheme/createSaleorTheme.tsx +2 -2
- package/src/theme/createSaleorTheme/overrides/inputs.ts +1 -1
- package/src/theme/utils.test.ts +4 -4
- package/src/theme/utils.ts +1 -1
- package/src/tools/useLocalStorage.ts +16 -9
- package/dist/macaw-ui.cjs.development.js +0 -2626
- package/dist/macaw-ui.cjs.development.js.map +0 -1
- package/dist/macaw-ui.cjs.production.min.js +0 -2
- package/dist/macaw-ui.cjs.production.min.js.map +0 -1
- package/dist/macaw-ui.esm.js +0 -2578
- package/dist/macaw-ui.esm.js.map +0 -1
- package/dist/types/Button/Button.stories.d.ts +0 -5
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThemeOptions } from "@material-ui/core/styles";
|
|
2
2
|
import { SaleorThemeColors } from "../types";
|
|
3
|
-
export declare const buttonOverrides: (colors: SaleorThemeColors) =>
|
|
3
|
+
export declare const buttonOverrides: (colors: SaleorThemeColors) => ThemeOptions["overrides"];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThemeOptions } from "@material-ui/core/styles";
|
|
2
2
|
import { SaleorThemeColors } from "../types";
|
|
3
|
-
export declare const overrides: (colors: SaleorThemeColors, fontFamily: string) =>
|
|
3
|
+
export declare const overrides: (colors: SaleorThemeColors, fontFamily: string) => ThemeOptions["overrides"];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ThemeOptions } from "@material-ui/core/styles";
|
|
2
2
|
import { SaleorThemeColors } from "../types";
|
|
3
|
-
export declare const inputOverrides: (colors: SaleorThemeColors) =>
|
|
3
|
+
export declare const inputOverrides: (colors: SaleorThemeColors) => ThemeOptions["overrides"];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ThemeOptions } from "@material-ui/core/styles";
|
|
2
2
|
import { SaleorThemeColors } from "../types";
|
|
3
|
-
export declare const tableOverrides: (colors: SaleorThemeColors, fontFamily: string) =>
|
|
3
|
+
export declare const tableOverrides: (colors: SaleorThemeColors, fontFamily: string) => ThemeOptions["overrides"];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const shadows:
|
|
1
|
+
import type { ThemeOptions } from "@material-ui/core/styles";
|
|
2
|
+
export declare const shadows: ThemeOptions["shadows"];
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { Theme } from "@material-ui/core/styles";
|
|
2
|
-
import type { ThemeOptions } from "@material-ui/core/styles/createMuiTheme";
|
|
3
|
-
import type { Palette, PaletteOptions } from "@material-ui/core/styles/createPalette";
|
|
1
|
+
import type { Theme, ThemeOptions } from "@material-ui/core/styles";
|
|
4
2
|
export declare type ThemeType = "light" | "dark";
|
|
5
3
|
export declare type SaleorThemeColors = Record<"primary" | "secondary" | "error" | "paperBorder" | "autofill" | "success" | "disabled", string> & {
|
|
6
4
|
highlightInactive: Record<"default", string>;
|
|
@@ -18,7 +16,7 @@ export declare type SaleorThemeColors = Record<"primary" | "secondary" | "error"
|
|
|
18
16
|
alert: AlertColors;
|
|
19
17
|
theme: ThemeType;
|
|
20
18
|
fail: Record<"dark" | "mid" | "light", string>;
|
|
21
|
-
main: Record<1 | 2 | 3 | 4
|
|
19
|
+
main: Record<1 | 2 | 3 | 4, string>;
|
|
22
20
|
active: Record<1 | 2 | 3 | 4 | 5, string>;
|
|
23
21
|
errorAction: Record<1 | 2 | 3 | 4 | 5, string>;
|
|
24
22
|
};
|
|
@@ -33,10 +31,8 @@ interface ExtraPalette {
|
|
|
33
31
|
};
|
|
34
32
|
}
|
|
35
33
|
declare type ExtraPaletteOptions = Partial<ExtraPalette>;
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
export interface SaleorPaletteOptions extends PaletteOptions, ExtraPaletteOptions {
|
|
39
|
-
}
|
|
34
|
+
export declare type SaleorPalette = Theme["palette"] & ExtraPalette;
|
|
35
|
+
export declare type SaleorPaletteOptions = ThemeOptions["palette"] & ExtraPaletteOptions;
|
|
40
36
|
export interface SaleorSpacing {
|
|
41
37
|
(): string;
|
|
42
38
|
(value: number): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { PillColor } from "../Pill";
|
|
3
|
+
export declare type CircleIndicatorColor = PillColor;
|
|
4
|
+
export interface CircleIndicatorProps {
|
|
5
|
+
color: CircleIndicatorColor;
|
|
6
|
+
}
|
|
7
|
+
export declare const CircleIndicator: React.FC<CircleIndicatorProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CircleIndicator';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ButtonProps } from "../Button";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import { ButtonProps } from "../Button";
|
|
3
3
|
export declare type ConfirmButtonTransitionState = "loading" | "success" | "error" | "default";
|
|
4
4
|
export declare type ConfirmButtonLabels = Record<"confirm" | "error", string>;
|
|
5
5
|
export interface ConfirmButtonProps extends Omit<ButtonProps, "classes"> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { ChipProps } from "@material-ui/core/Chip";
|
|
2
|
+
import React from "react";
|
|
3
3
|
export declare type PillColor = "error" | "warning" | "success" | "info";
|
|
4
4
|
export interface PillProps extends Omit<ChipProps, "onDelete" | "avatar" | "icon" | "disabled" | "deleteIcon" | "color" | "disabled" | "classes" | "clickable"> {
|
|
5
5
|
active?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CircleIndicatorIcon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SuccessCircleIndicatorIcon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
|
|
@@ -10,6 +10,7 @@ export * from "./CheckboxCheckedIcon";
|
|
|
10
10
|
export * from "./CheckboxIcon";
|
|
11
11
|
export * from "./CheckboxIndeterminateIcon";
|
|
12
12
|
export * from "./ChevronIcon";
|
|
13
|
+
export * from "./CircleIndicatorIcon";
|
|
13
14
|
export * from "./Close2Icon";
|
|
14
15
|
export * from "./CloseIcon";
|
|
15
16
|
export * from "./ColumnsIcon";
|
|
@@ -74,6 +75,7 @@ export * from "./SettingsIcon";
|
|
|
74
75
|
export * from "./SettingsLargeIcon";
|
|
75
76
|
export * from "./SnapshotsIcon";
|
|
76
77
|
export * from "./StaffMembersLargeIcon";
|
|
78
|
+
export * from "./SuccessCircleIndicatorIcon";
|
|
77
79
|
export * from "./TaxesLargeIcon";
|
|
78
80
|
export * from "./TimeIcon";
|
|
79
81
|
export * from "./TokenLargeIcon";
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
2
|
+
"version": "0.3.2",
|
|
3
3
|
"license": "CC-BY-4.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
"@types/react-dom": "^17.0.4",
|
|
105
105
|
"@types/react-helmet": "^6.1.1",
|
|
106
106
|
"@types/react-inlinesvg": "^1.0.0",
|
|
107
|
+
"@typescript-eslint/eslint-plugin": "^5.12.0",
|
|
108
|
+
"@typescript-eslint/parser": "^5.12.0",
|
|
107
109
|
"chromatic": "^6.0.4",
|
|
108
110
|
"concurrently": "^6.3.0",
|
|
109
111
|
"esbuild": "^0.13.4",
|
package/src/ActionBar/styles.ts
CHANGED
package/src/Alert/Alert.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Typography from "@material-ui/core/Typography";
|
|
2
|
-
import { CloseIcon } from "../icons";
|
|
3
2
|
import clsx from "clsx";
|
|
4
3
|
import React from "react";
|
|
5
|
-
import { IconButton } from "../IconButton";
|
|
6
4
|
|
|
5
|
+
import { IconButton } from "../IconButton";
|
|
6
|
+
import { CloseIcon } from "../icons";
|
|
7
7
|
import { CompleteIcon, InfoIcon, NotAllowedIcon, WarningIcon } from "../icons";
|
|
8
8
|
import { AlertBase, AlertBaseProps, AlertVariant } from "./AlertBase";
|
|
9
9
|
import useStyles from "./styles";
|
|
@@ -2,10 +2,10 @@ import Portal from "@material-ui/core/Portal";
|
|
|
2
2
|
import Skeleton from "@material-ui/lab/Skeleton";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
|
+
import { ArrowRightIcon } from "../icons";
|
|
5
6
|
import { LayoutButton, LayoutButtonProps } from "../LayoutButton";
|
|
6
7
|
import { useBacklink } from "./context";
|
|
7
8
|
import useStyles from "./styles";
|
|
8
|
-
import { ArrowRightIcon } from "../icons";
|
|
9
9
|
|
|
10
10
|
export interface AppHeaderProps extends LayoutButtonProps {
|
|
11
11
|
children: React.ReactNode;
|
package/src/BaseList/context.ts
CHANGED
package/src/BaseList/styles.ts
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Typography } from "@material-ui/core";
|
|
2
|
+
import { Meta, Story } from "@storybook/react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Decorator, GuideDecorator } from "../utils/Decorator";
|
|
6
|
+
import useGuideStyles from "../utils/guideStyles";
|
|
7
|
+
|
|
8
|
+
import { CircleIndicator } from "./CircleIndicator";
|
|
9
|
+
|
|
10
|
+
const StoryWrapper: React.FC = () => {
|
|
11
|
+
const guideClasses = useGuideStyles();
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div>
|
|
15
|
+
<Typography className={guideClasses.headline} variant="h1">
|
|
16
|
+
Circle Indicators
|
|
17
|
+
</Typography>
|
|
18
|
+
<Typography className={guideClasses.paragraph} component="p">
|
|
19
|
+
Circle Indicators represent status of a certain element.
|
|
20
|
+
</Typography>
|
|
21
|
+
<div style={{ display: "flex", gap: "24px" }}>
|
|
22
|
+
<div
|
|
23
|
+
className={clsx(guideClasses.border)}
|
|
24
|
+
style={{
|
|
25
|
+
display: "grid",
|
|
26
|
+
gridTemplateColumns: "repeat(2, 1fr)",
|
|
27
|
+
placeItems: "center",
|
|
28
|
+
gap: 24,
|
|
29
|
+
margin: "auto",
|
|
30
|
+
padding: 24,
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
Error <CircleIndicator color="error" />
|
|
34
|
+
Warning <CircleIndicator color="warning" />
|
|
35
|
+
Success <CircleIndicator color="success" />
|
|
36
|
+
Info <CircleIndicator color="info" />
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const Default: Story = () => <StoryWrapper />;
|
|
44
|
+
|
|
45
|
+
export default {
|
|
46
|
+
decorators: [Decorator, GuideDecorator],
|
|
47
|
+
title: "Circle Indicator",
|
|
48
|
+
} as Meta;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
import { CircleIndicatorIcon, SuccessCircleIndicatorIcon, useTheme } from "..";
|
|
5
|
+
import { PillColor } from "../Pill";
|
|
6
|
+
import useStyles from "./styles";
|
|
7
|
+
|
|
8
|
+
export type CircleIndicatorColor = PillColor;
|
|
9
|
+
|
|
10
|
+
export interface CircleIndicatorProps {
|
|
11
|
+
color: CircleIndicatorColor;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const CircleIndicator: React.FC<CircleIndicatorProps> = ({ color }) => {
|
|
15
|
+
const { themeType } = useTheme();
|
|
16
|
+
const classes = useStyles();
|
|
17
|
+
|
|
18
|
+
return color === "success" ? (
|
|
19
|
+
<SuccessCircleIndicatorIcon
|
|
20
|
+
className={clsx(classes.success, themeType === "dark" && classes.dark)}
|
|
21
|
+
/>
|
|
22
|
+
) : (
|
|
23
|
+
<CircleIndicatorIcon
|
|
24
|
+
className={clsx({
|
|
25
|
+
[classes.error]: color === "error",
|
|
26
|
+
[classes.warning]: color === "warning",
|
|
27
|
+
[classes.info]: color === "info",
|
|
28
|
+
[classes.dark]: themeType === "dark",
|
|
29
|
+
})}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
CircleIndicator.displayName = "CircleIndicator";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CircleIndicator';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { makeStyles } from "../theme";
|
|
2
|
+
|
|
3
|
+
const useStyles = makeStyles(
|
|
4
|
+
(theme) => ({
|
|
5
|
+
dark: {},
|
|
6
|
+
success: {
|
|
7
|
+
color: theme.palette.saleor.success.mid,
|
|
8
|
+
"&$dark": {
|
|
9
|
+
color: theme.palette.saleor.success.dark,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
error: {
|
|
13
|
+
color: theme.palette.saleor.fail.mid,
|
|
14
|
+
"&$dark": {
|
|
15
|
+
color: theme.palette.saleor.fail.dark,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
warning: {
|
|
19
|
+
color: theme.palette.saleor.warning.mid,
|
|
20
|
+
"&$dark": {
|
|
21
|
+
color: theme.palette.saleor.warning.dark,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
info: {
|
|
25
|
+
color: theme.palette.saleor.main[1],
|
|
26
|
+
},
|
|
27
|
+
}),
|
|
28
|
+
{ name: "CircleIndicator" }
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export default useStyles;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Button, ButtonProps } from "../Button";
|
|
2
1
|
import CircularProgress from "@material-ui/core/CircularProgress";
|
|
3
2
|
import CheckIcon from "@material-ui/icons/Check";
|
|
4
3
|
import clsx from "clsx";
|
|
5
4
|
import React from "react";
|
|
6
5
|
|
|
6
|
+
import { Button, ButtonProps } from "../Button";
|
|
7
7
|
import useStyles from "./styles";
|
|
8
8
|
|
|
9
9
|
const DEFAULT_NOTIFICATION_SHOW_TIME = 3000;
|
package/src/Filter/Filter.tsx
CHANGED
|
@@ -2,10 +2,10 @@ import IconButton from "@material-ui/core/IconButton";
|
|
|
2
2
|
import MenuItem from "@material-ui/core/MenuItem";
|
|
3
3
|
import Select from "@material-ui/core/Select";
|
|
4
4
|
import Typography from "@material-ui/core/Typography";
|
|
5
|
-
import { DeleteIcon } from "../icons";
|
|
6
5
|
import { difference } from "lodash";
|
|
7
6
|
import React from "react";
|
|
8
7
|
|
|
8
|
+
import { DeleteIcon } from "../icons";
|
|
9
9
|
import { useFilters } from "./context";
|
|
10
10
|
import { FilterContent } from "./FilterContent";
|
|
11
11
|
import useStyles from "./styles";
|
|
@@ -27,7 +27,6 @@ export const Filter: React.FC<FilterProps> = ({ name, label, ...options }) => {
|
|
|
27
27
|
registered.current = true;
|
|
28
28
|
|
|
29
29
|
return () => unregister(name);
|
|
30
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
30
|
}, []);
|
|
32
31
|
|
|
33
32
|
React.useEffect(() => {
|
|
@@ -43,7 +42,6 @@ export const Filter: React.FC<FilterProps> = ({ name, label, ...options }) => {
|
|
|
43
42
|
},
|
|
44
43
|
});
|
|
45
44
|
}
|
|
46
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
45
|
}, [options.choices]);
|
|
48
46
|
|
|
49
47
|
return null;
|
package/src/Filter/FilterBar.tsx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ButtonBaseProps } from "@material-ui/core/ButtonBase";
|
|
2
|
-
|
|
3
2
|
import ButtonBase from "@material-ui/core/ButtonBase";
|
|
4
3
|
import clsx from "clsx";
|
|
5
4
|
import React from "react";
|
|
6
|
-
import { UserInteraction } from "../../types/utils";
|
|
7
5
|
|
|
6
|
+
import { UserInteraction } from "../../types/utils";
|
|
8
7
|
import useStyles from "./styles";
|
|
9
8
|
|
|
10
9
|
export type LayoutButtonProps<T extends React.ElementType = "button"> =
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Card from "@material-ui/core/Card";
|
|
2
|
+
import CardHeader from "@material-ui/core/CardHeader";
|
|
3
|
+
import Checkbox from "@material-ui/core/Checkbox";
|
|
2
4
|
import { Meta, Story } from "@storybook/react";
|
|
3
5
|
import React from "react";
|
|
6
|
+
|
|
4
7
|
import { DeleteIcon, IconButton, Pagination } from "..";
|
|
5
8
|
import { useListStory } from "../utils/useListStory";
|
|
6
|
-
|
|
7
9
|
import {
|
|
8
10
|
List,
|
|
9
11
|
ListBody,
|
package/src/List/List.tsx
CHANGED
package/src/List/styles.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import Grid from "@material-ui/core/Grid";
|
|
1
2
|
import { Meta, Story } from "@storybook/react";
|
|
2
3
|
import React from "react";
|
|
3
|
-
import { Grid } from "@material-ui/core";
|
|
4
|
-
import { DeleteIcon } from "..";
|
|
5
4
|
|
|
5
|
+
import { DeleteIcon } from "..";
|
|
6
6
|
import { NavigationCard } from "./NavigationCard";
|
|
7
7
|
import { NavigationCardBase } from "./NavigationCardBase";
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Typography from "@material-ui/core/Typography";
|
|
2
2
|
import React from "react";
|
|
3
|
+
|
|
3
4
|
import {
|
|
4
5
|
NavigationCardBase,
|
|
5
6
|
NavigationCardBaseProps,
|
|
6
7
|
} from "./NavigationCardBase";
|
|
7
|
-
|
|
8
8
|
import useStyles from "./styles";
|
|
9
9
|
|
|
10
10
|
export interface NavigationCardProps extends NavigationCardBaseProps {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import SnackbarContent from "@material-ui/core/SnackbarContent";
|
|
2
2
|
import Typography from "@material-ui/core/Typography";
|
|
3
|
-
import { CloseIcon, ExpandIcon } from "../icons";
|
|
4
3
|
import clsx from "clsx";
|
|
5
4
|
import React, { useState } from "react";
|
|
6
5
|
|
|
6
|
+
import { Button } from "../Button";
|
|
7
|
+
import { IconButton } from "../IconButton";
|
|
8
|
+
import { CloseIcon, ExpandIcon } from "../icons";
|
|
7
9
|
import { CompleteIcon, InfoIcon, NotAllowedIcon, WarningIcon } from "../icons";
|
|
8
10
|
import useStyles from "./styles";
|
|
9
11
|
import type { NotificationProps, NotificationType } from "./types";
|
|
10
|
-
import { Button } from "../Button";
|
|
11
|
-
import { IconButton } from "../IconButton";
|
|
12
12
|
|
|
13
13
|
interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
14
14
|
type: NotificationType;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Checkbox from "@material-ui/core/Checkbox";
|
|
2
2
|
import { Meta, Story } from "@storybook/react";
|
|
3
3
|
import React from "react";
|
|
4
|
+
|
|
4
5
|
import {
|
|
5
6
|
DeleteIcon,
|
|
6
7
|
EditIcon,
|
|
@@ -9,7 +10,6 @@ import {
|
|
|
9
10
|
useOffsettedListWidths,
|
|
10
11
|
} from "..";
|
|
11
12
|
import { useListStory } from "../utils/useListStory";
|
|
12
|
-
|
|
13
13
|
import {
|
|
14
14
|
OffsettedList,
|
|
15
15
|
OffsettedListBody,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import Typography from "@material-ui/core/Typography";
|
|
1
2
|
import { Meta, Story } from "@storybook/react";
|
|
3
|
+
import clsx from "clsx";
|
|
2
4
|
import React from "react";
|
|
5
|
+
|
|
3
6
|
import { Decorator, GuideDecorator } from "../utils/Decorator";
|
|
4
7
|
import useGuideStyles from "../utils/guideStyles";
|
|
5
|
-
|
|
6
8
|
import { Pill, PillProps } from "./Pill";
|
|
7
|
-
import { Typography } from "@material-ui/core";
|
|
8
|
-
import clsx from "clsx";
|
|
9
9
|
|
|
10
10
|
const labels = {
|
|
11
11
|
error: "Error",
|
package/src/Pill/Pill.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import Chip, { ChipProps } from "@material-ui/core/Chip";
|
|
3
|
-
import useStyles from "./styles";
|
|
4
2
|
import clsx from "clsx";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
5
|
import { useTheme } from "..";
|
|
6
|
+
import useStyles from "./styles";
|
|
6
7
|
|
|
7
8
|
export type PillColor = "error" | "warning" | "success" | "info";
|
|
8
9
|
|
package/src/Savebar/Savebar.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ButtonProps } from "@material-ui/core/Button";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { ChevronIcon } from "../icons";
|
|
5
4
|
|
|
5
|
+
import { ChevronIcon } from "../icons";
|
|
6
6
|
import { SquareButton } from "../SquareButton";
|
|
7
7
|
import { makeStyles } from "../theme";
|
|
8
8
|
|
|
@@ -7,8 +7,8 @@ import Paper from "@material-ui/core/Paper";
|
|
|
7
7
|
import Popper from "@material-ui/core/Popper";
|
|
8
8
|
import Typography from "@material-ui/core/Typography";
|
|
9
9
|
import React from "react";
|
|
10
|
-
import { LayoutButton } from "..";
|
|
11
10
|
|
|
11
|
+
import { LayoutButton } from "..";
|
|
12
12
|
import { UserChipMenuContext } from "./context";
|
|
13
13
|
import useStyles from "./styles";
|
|
14
14
|
|
package/src/consts.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const isWindowDefined = typeof window !== "undefined";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createSvgIcon } from "@material-ui/core/utils";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
export const CircleIndicatorIcon = createSvgIcon(
|
|
5
|
+
<>
|
|
6
|
+
<circle cx="12" cy="12" r="12" fill="currentColor" />
|
|
7
|
+
<circle cx="12" cy="12" r="9" fill="var(--background-paper)" />
|
|
8
|
+
</>,
|
|
9
|
+
"CircleIndicatorIcon"
|
|
10
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createSvgIcon } from "@material-ui/core/utils";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
export const SuccessCircleIndicatorIcon = createSvgIcon(
|
|
5
|
+
<>
|
|
6
|
+
<circle cx="12" cy="12" r="12" fill="currentColor" />
|
|
7
|
+
<circle cx="12" cy="12" r="9" fill="var(--background-paper)" />
|
|
8
|
+
<path
|
|
9
|
+
fill-rule="evenodd"
|
|
10
|
+
clip-rule="evenodd"
|
|
11
|
+
d="M10.7071 13.5858L16 8.29291L17.4142 9.70712L10.7071 16.4142L7 12.7071L8.41421 11.2929L10.7071 13.5858Z"
|
|
12
|
+
fill="currentColor"
|
|
13
|
+
/>
|
|
14
|
+
</>,
|
|
15
|
+
"SuccessCircleIndicatorIcon"
|
|
16
|
+
);
|
package/src/icons/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./CheckboxCheckedIcon";
|
|
|
10
10
|
export * from "./CheckboxIcon";
|
|
11
11
|
export * from "./CheckboxIndeterminateIcon";
|
|
12
12
|
export * from "./ChevronIcon";
|
|
13
|
+
export * from "./CircleIndicatorIcon";
|
|
13
14
|
export * from "./Close2Icon";
|
|
14
15
|
export * from "./CloseIcon";
|
|
15
16
|
export * from "./ColumnsIcon";
|
|
@@ -74,6 +75,7 @@ export * from "./SettingsIcon";
|
|
|
74
75
|
export * from "./SettingsLargeIcon";
|
|
75
76
|
export * from "./SnapshotsIcon";
|
|
76
77
|
export * from "./StaffMembersLargeIcon";
|
|
78
|
+
export * from "./SuccessCircleIndicatorIcon";
|
|
77
79
|
export * from "./TaxesLargeIcon";
|
|
78
80
|
export * from "./TimeIcon";
|
|
79
81
|
export * from "./TokenLargeIcon";
|
package/src/index.tsx
CHANGED