@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.
Files changed (83) hide show
  1. package/dist/ActionBar/styles.d.ts +1 -1
  2. package/dist/Alert/Alert.d.ts +2 -1
  3. package/dist/Button/Button.d.ts +1 -3
  4. package/dist/Pagination/Pagination.d.ts +2 -2
  5. package/dist/Savebar/styles.d.ts +1 -1
  6. package/dist/cjs/index.js +2 -2
  7. package/dist/cjs/index.js.map +3 -3
  8. package/dist/esm/index.js +2 -2
  9. package/dist/esm/index.js.map +3 -3
  10. package/dist/icons/Logo.d.ts +1 -1
  11. package/dist/icons/LogoLight.d.ts +2 -2
  12. package/dist/icons/index.d.ts +1 -4
  13. package/dist/index.d.ts +0 -3
  14. package/dist/index.js +1 -4
  15. package/dist/index.js.map +3 -3
  16. package/dist/mjs/index.js +5 -0
  17. package/dist/mjs/index.js.map +7 -0
  18. package/dist/theme/createSaleorTheme/overrides/buttons.d.ts +2 -2
  19. package/dist/theme/createSaleorTheme/overrides/index.d.ts +2 -2
  20. package/dist/theme/createSaleorTheme/overrides/inputs.d.ts +2 -2
  21. package/dist/theme/createSaleorTheme/overrides/tables.d.ts +2 -2
  22. package/dist/theme/createSaleorTheme/shadows.d.ts +2 -2
  23. package/dist/theme/createSaleorTheme/types.d.ts +4 -8
  24. package/dist/types/CircleIndicator/CircleIndicator.d.ts +7 -0
  25. package/dist/types/CircleIndicator/CircleIndicator.stories.d.ts +4 -0
  26. package/dist/types/CircleIndicator/index.d.ts +1 -0
  27. package/dist/types/CircleIndicator/styles.d.ts +2 -0
  28. package/dist/types/ConfirmButton/ConfirmButton.d.ts +1 -1
  29. package/dist/types/Pill/Pill.d.ts +1 -1
  30. package/dist/types/StatusChip/styles.d.ts +3 -0
  31. package/dist/types/icons/CircleIndicatorIcon.d.ts +1 -0
  32. package/dist/types/icons/SuccessCircleIndicatorIcon.d.ts +1 -0
  33. package/dist/types/icons/index.d.ts +2 -0
  34. package/dist/types/index.d.ts +1 -0
  35. package/package.json +3 -1
  36. package/src/ActionBar/styles.ts +1 -1
  37. package/src/Alert/Alert.tsx +2 -2
  38. package/src/Backlink/Backlink.stories.tsx +0 -1
  39. package/src/Backlink/Backlink.tsx +1 -1
  40. package/src/BaseList/BaseList.tsx +1 -0
  41. package/src/BaseList/context.ts +1 -0
  42. package/src/BaseList/styles.ts +1 -0
  43. package/src/CircleIndicator/CircleIndicator.stories.tsx +48 -0
  44. package/src/CircleIndicator/CircleIndicator.tsx +34 -0
  45. package/src/CircleIndicator/index.ts +1 -0
  46. package/src/CircleIndicator/styles.ts +31 -0
  47. package/src/ConfirmButton/ConfirmButton.tsx +1 -1
  48. package/src/Filter/Filter.tsx +1 -3
  49. package/src/Filter/FilterBar.tsx +0 -1
  50. package/src/LayoutButton/LayoutButton.tsx +1 -2
  51. package/src/List/List.stories.tsx +4 -2
  52. package/src/List/List.tsx +1 -0
  53. package/src/List/styles.ts +1 -0
  54. package/src/NavigationCard/NavigationCard.stories.tsx +2 -2
  55. package/src/NavigationCard/NavigationCard.tsx +1 -1
  56. package/src/Notification/Notification.tsx +3 -3
  57. package/src/OffsettedList/OffsettedList.stories.tsx +2 -2
  58. package/src/OffsettedList/OffsettedList.tsx +1 -0
  59. package/src/Pill/Pill.stories.tsx +3 -3
  60. package/src/Pill/Pill.tsx +3 -2
  61. package/src/PillLink/PillLink.tsx +1 -0
  62. package/src/Savebar/Savebar.tsx +1 -1
  63. package/src/Sidebar/ExpandButton.tsx +1 -1
  64. package/src/StatusChip/StatusChip.tsx +1 -1
  65. package/src/UserChipMenu/UserChipMenu.tsx +1 -1
  66. package/src/consts.ts +1 -0
  67. package/src/icons/CircleIndicatorIcon.tsx +10 -0
  68. package/src/icons/SuccessCircleIndicatorIcon.tsx +16 -0
  69. package/src/icons/index.ts +2 -0
  70. package/src/index.tsx +1 -0
  71. package/src/theme/ThemeProvider.tsx +0 -1
  72. package/src/theme/createSaleorTheme/createSaleorTheme.tsx +2 -2
  73. package/src/theme/createSaleorTheme/overrides/inputs.ts +1 -1
  74. package/src/theme/utils.test.ts +4 -4
  75. package/src/theme/utils.ts +1 -1
  76. package/src/tools/useLocalStorage.ts +16 -9
  77. package/dist/macaw-ui.cjs.development.js +0 -2626
  78. package/dist/macaw-ui.cjs.development.js.map +0 -1
  79. package/dist/macaw-ui.cjs.production.min.js +0 -2
  80. package/dist/macaw-ui.cjs.production.min.js.map +0 -1
  81. package/dist/macaw-ui.esm.js +0 -2578
  82. package/dist/macaw-ui.esm.js.map +0 -1
  83. package/dist/types/Button/Button.stories.d.ts +0 -5
@@ -1,3 +1,3 @@
1
- import type { Overrides } from "@material-ui/core/styles/overrides";
1
+ import type { ThemeOptions } from "@material-ui/core/styles";
2
2
  import { SaleorThemeColors } from "../types";
3
- export declare const buttonOverrides: (colors: SaleorThemeColors) => Overrides;
3
+ export declare const buttonOverrides: (colors: SaleorThemeColors) => ThemeOptions["overrides"];
@@ -1,3 +1,3 @@
1
- import type { Overrides } from "@material-ui/core/styles/overrides";
1
+ import type { ThemeOptions } from "@material-ui/core/styles";
2
2
  import { SaleorThemeColors } from "../types";
3
- export declare const overrides: (colors: SaleorThemeColors, fontFamily: string) => Overrides;
3
+ export declare const overrides: (colors: SaleorThemeColors, fontFamily: string) => ThemeOptions["overrides"];
@@ -1,3 +1,3 @@
1
- import type { Overrides } from "@material-ui/core/styles/overrides";
1
+ import { ThemeOptions } from "@material-ui/core/styles";
2
2
  import { SaleorThemeColors } from "../types";
3
- export declare const inputOverrides: (colors: SaleorThemeColors) => Overrides;
3
+ export declare const inputOverrides: (colors: SaleorThemeColors) => ThemeOptions["overrides"];
@@ -1,3 +1,3 @@
1
- import type { Overrides } from "@material-ui/core/styles/overrides";
1
+ import { ThemeOptions } from "@material-ui/core/styles";
2
2
  import { SaleorThemeColors } from "../types";
3
- export declare const tableOverrides: (colors: SaleorThemeColors, fontFamily: string) => Overrides;
3
+ export declare const tableOverrides: (colors: SaleorThemeColors, fontFamily: string) => ThemeOptions["overrides"];
@@ -1,2 +1,2 @@
1
- import type { Shadows } from "@material-ui/core/styles/shadows";
2
- export declare const shadows: 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 | 5, string>;
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 interface SaleorPalette extends Palette, ExtraPalette {
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,4 @@
1
+ import { Meta, Story } from "@storybook/react";
2
+ export declare const Default: Story;
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
@@ -0,0 +1 @@
1
+ export * from './CircleIndicator';
@@ -0,0 +1,2 @@
1
+ declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"dark" | "error" | "success" | "warning" | "info">;
2
+ export default useStyles;
@@ -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,3 @@
1
+ import { StatusChipProps } from "./types";
2
+ declare const useStyles: (props: StatusChipProps) => import("@material-ui/styles").ClassNameMap<"label" | "root">;
3
+ export default useStyles;
@@ -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";
@@ -32,3 +32,4 @@ export * from "./OffsettedList";
32
32
  export * from "./List";
33
33
  export * from "./NavigationCard";
34
34
  export * from "./Pill";
35
+ export * from "./CircleIndicator";
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.1",
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",
@@ -22,7 +22,7 @@ const useStyles = makeStyles(
22
22
  height: 72,
23
23
  },
24
24
  shadow: {
25
- boxShadow: `0 -24px 20px -20px rgba(0, 0, 0, 0.15)`,
25
+ boxShadow: "0 -24px 20px -20px rgba(0, 0, 0, 0.15)",
26
26
  },
27
27
  }),
28
28
  { name: "Savebar" }
@@ -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";
@@ -21,7 +21,6 @@ const Wrapper: React.FC = ({ children }) => {
21
21
  }, 50) as any;
22
22
 
23
23
  return () => clearInterval(timer.current);
24
- // eslint-disable-next-line react-hooks/exhaustive-deps
25
24
  }, []);
26
25
 
27
26
  return (
@@ -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;
@@ -1,5 +1,6 @@
1
1
  import clsx from "clsx";
2
2
  import React from "react";
3
+
3
4
  import {
4
5
  ListContext,
5
6
  ListGridContext,
@@ -1,4 +1,5 @@
1
1
  import { createContext, useContext, useMemo } from "react";
2
+
2
3
  import { ListGridTemplate, useGridTemplateStyles } from "./styles";
3
4
 
4
5
  export const ListContext = createContext<"body" | "head" | "foot">("body");
@@ -1,4 +1,5 @@
1
1
  import { merge } from "lodash";
2
+
2
3
  import { makeStyles } from "..";
3
4
 
4
5
  export type ListGridTemplate = string[] | Record<string, string[]>;
@@ -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;
@@ -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;
@@ -63,7 +63,6 @@ export const FilterBar: React.FC<FilterBarProps> = React.forwardRef(
63
63
 
64
64
  React.useEffect(
65
65
  () => changeCb(utils.getActiveFilters(filterData)),
66
- // eslint-disable-next-line react-hooks/exhaustive-deps
67
66
  [filterData]
68
67
  );
69
68
 
@@ -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 { Card, CardHeader, Checkbox } from "@material-ui/core";
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
@@ -1,4 +1,5 @@
1
1
  import React, { useState } from "react";
2
+
2
3
  import { useTheme } from "..";
3
4
  import {
4
5
  BaseList,
@@ -1,4 +1,5 @@
1
1
  import { CSSProperties } from "react";
2
+
2
3
  import { makeStyles } from "..";
3
4
 
4
5
  export const useStyles = makeStyles(
@@ -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 { Checkbox } from "@material-ui/core";
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,4 +1,5 @@
1
1
  import React from "react";
2
+
2
3
  import { useTheme } from "..";
3
4
  import {
4
5
  BaseList,
@@ -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
 
@@ -4,6 +4,7 @@ import {
4
4
  } from "@material-ui/core/OverridableComponent";
5
5
  import clsx from "clsx";
6
6
  import React from "react";
7
+
7
8
  import { UserInteraction } from "../../types/utils";
8
9
  import useStyles from "./styles";
9
10
 
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { Button } from "..";
3
2
 
3
+ import { Button } from "..";
4
4
  import { useActionBar } from "../ActionBar";
5
5
  import { ActionBar } from "../ActionBar/ActionBar";
6
6
  import {
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { Pill, PillColor } from "../Pill/Pill";
3
2
 
3
+ import { Pill, PillColor } from "../Pill/Pill";
4
4
  import { StatusChipProps } from "./types";
5
5
 
6
6
  const colors: Record<StatusChipProps["variant"], PillColor> = {
@@ -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
+ );
@@ -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
@@ -32,3 +32,4 @@ export * from "./OffsettedList";
32
32
  export * from "./List";
33
33
  export * from "./NavigationCard";
34
34
  export * from "./Pill";
35
+ export * from "./CircleIndicator"