@campxdev/react-blueprint 1.0.16 → 1.0.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/react-blueprint",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "main": "./export.ts",
5
5
  "private": false,
6
6
  "dependencies": {
@@ -10,8 +10,8 @@
10
10
  "@mui/icons-material": "^5.15.20",
11
11
  "@mui/material": "^5.15.20",
12
12
  "@mui/x-data-grid": "^7.5.1",
13
- "@storybook/addon-backgrounds": "^8.1.5",
14
- "@storybook/addon-designs": "^8.0.2",
13
+ "@storybook/addon-backgrounds": "^8.2.6",
14
+ "@storybook/addon-designs": "^8.0.3",
15
15
  "@testing-library/jest-dom": "^5.14.1",
16
16
  "@testing-library/react": "^13.0.0",
17
17
  "@testing-library/user-event": "^13.2.1",
@@ -68,21 +68,21 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
71
- "@chromatic-com/storybook": "^1.5.0",
72
- "@storybook/addon-essentials": "^8.1.5",
73
- "@storybook/addon-interactions": "^8.1.5",
74
- "@storybook/addon-links": "^8.1.5",
75
- "@storybook/addon-mdx-gfm": "^8.1.5",
76
- "@storybook/addon-onboarding": "^8.1.5",
77
- "@storybook/blocks": "^8.1.5",
78
- "@storybook/preset-create-react-app": "^8.1.5",
79
- "@storybook/react": "^8.1.5",
80
- "@storybook/react-webpack5": "^8.1.5",
81
- "@storybook/test": "^8.1.5",
71
+ "@chromatic-com/storybook": "^1.6.1",
72
+ "@storybook/addon-essentials": "^8.2.6",
73
+ "@storybook/addon-interactions": "^8.2.6",
74
+ "@storybook/addon-links": "^8.2.6",
75
+ "@storybook/addon-mdx-gfm": "^8.2.6",
76
+ "@storybook/addon-onboarding": "^8.2.6",
77
+ "@storybook/blocks": "^8.2.6",
78
+ "@storybook/preset-create-react-app": "^8.2.6",
79
+ "@storybook/react": "^8.2.6",
80
+ "@storybook/react-webpack5": "^8.2.6",
81
+ "@storybook/test": "^8.2.6",
82
82
  "@types/js-cookie": "^3.0.5",
83
83
  "eslint-plugin-storybook": "^0.8.0",
84
84
  "prop-types": "^15.8.1",
85
- "storybook": "^8.1.5",
85
+ "storybook": "^8.2.6",
86
86
  "webpack": "^5.91.0"
87
87
  }
88
88
  }
@@ -0,0 +1,28 @@
1
+ import { Alert as MuiAlert, AlertProps as MuiAlertProps } from "@mui/material";
2
+ import { Icons } from "../../export";
3
+
4
+ export type AlertProps = {
5
+ message: string;
6
+ severity: MuiAlertProps["severity"];
7
+ } & MuiAlertProps;
8
+
9
+ const getIcon = (severity: MuiAlertProps["severity"]) => {
10
+ switch (severity) {
11
+ case "success":
12
+ return <Icons.SuccessFilledIcon size={20} />;
13
+ case "error":
14
+ return <Icons.AlertFilledIcon size={20} />;
15
+ case "info":
16
+ return <Icons.InfoFilledIcon size={20} />;
17
+ case "warning":
18
+ return <Icons.WarningFilledIcon size={20} />;
19
+ }
20
+ };
21
+
22
+ export const Alert = ({ severity, message }: AlertProps) => {
23
+ return (
24
+ <MuiAlert severity={severity} icon={getIcon(severity)}>
25
+ {message}
26
+ </MuiAlert>
27
+ );
28
+ };
@@ -1,3 +1,4 @@
1
+ export * from "./Alert/Alert";
1
2
  export * from "./Snackbar/Snackbar";
2
3
  export * from "./Spinner/Spinner";
3
4
  export * from "./Tooltip/Tooltip";
@@ -1,21 +1,8 @@
1
- import { Breadcrumbs } from "./Breadcrumbs/Breadcrumbs";
2
- import { CustomDialog } from "./DialogButton/DialogButton";
3
- import { DropDownButton } from "./DropDownMenu/DropDownButton";
4
- import { DropDownIcon } from "./DropDownMenu/DropDownIcon";
5
- import { DropdownMenu } from "./DropDownMenu/DropDownMenu";
6
- import { DropdownMenuItem } from "./DropDownMenu/DropdownMenuItem";
7
- import { Sidebar } from "./Sidebar/Sidebar";
8
- import { Stepper } from "./Stepper/Stepper";
9
- import { TabsContainer } from "./TabsContainer/TabsContainer";
10
-
11
- export {
12
- Breadcrumbs,
13
- CustomDialog,
14
- DropDownButton,
15
- DropDownIcon,
16
- DropdownMenu,
17
- DropdownMenuItem,
18
- Sidebar,
19
- Stepper,
20
- TabsContainer,
21
- };
1
+ export * from "./DialogButton/DialogButton";
2
+ export * from "./DropDownMenu/DropDownButton";
3
+ export * from "./DropDownMenu/DropDownIcon";
4
+ export * from "./DropDownMenu/DropDownMenu";
5
+ export * from "./DropDownMenu/DropdownMenuItem";
6
+ export * from "./Sidebar/Sidebar";
7
+ export * from "./Stepper/Stepper";
8
+ export * from "./TabsContainer/TabsContainer";
@@ -1,6 +1,5 @@
1
1
  import { Meta, StoryObj } from "@storybook/react";
2
-
3
- import { Alert } from "../../components/Feedback/Alerts/Alerts";
2
+ import { Alert } from "../../components/export";
4
3
 
5
4
  export default {
6
5
  title: "Feedback/Alert",
@@ -1,6 +1,5 @@
1
1
  import { Meta, StoryObj } from "@storybook/react";
2
-
3
- import { Snackbar } from "../../components/Feedback/Snackbar/Snackbar";
2
+ import { Snackbar } from "../../components/export";
4
3
 
5
4
  export default {
6
5
  title: "Feedback/Snackbar",
@@ -1,6 +1,6 @@
1
1
  // Import React and other necessary elements
2
2
  import { Meta } from "@storybook/react";
3
- import { Spinner } from "../../components/Feedback/Spinner/Spinner";
3
+ import { Spinner } from "../../components/export";
4
4
 
5
5
  // Make sure your TextField import is correct
6
6
 
@@ -1,11 +1,10 @@
1
1
  import { Meta, StoryObj } from "@storybook/react";
2
-
3
- import { Icons } from "../../components/Assets/Icons/Icons";
4
2
  import {
5
- ToolTipContent,
3
+ Button,
4
+ Icons,
6
5
  Tooltip,
7
- } from "../../components/Feedback/Tooltip/Tooltip";
8
- import { Button } from "../../components/Input/Button/Button";
6
+ ToolTipContent,
7
+ } from "../../components/export";
9
8
 
10
9
  export default {
11
10
  title: "Feedback/Tooltip",
@@ -1,7 +1,5 @@
1
1
  import { Meta, StoryObj } from "@storybook/react";
2
- import { Tutorial } from "../../components/Feedback/Tutorial/Tutorial";
3
- import { Typography } from "../../components/DataDisplay/Typography/Typography";
4
- import { useTheme } from "@mui/material";
2
+ import { Tutorial, Typography } from "../../components/export";
5
3
 
6
4
  export default {
7
5
  title: "Feedback/Tutorial",
@@ -61,8 +61,21 @@ export const getCommonTheme = (mode: Theme) => {
61
61
  root: {
62
62
  maxWidth: "400px",
63
63
  fontFamily: "Poppins",
64
- fontWeight: 600,
65
- fontSize: "12px",
64
+ fontWeight: 500,
65
+ fontSize: "14px",
66
+ color: ColorTokens.text.primary,
67
+ },
68
+ standardSuccess: {
69
+ backgroundColor: ColorTokens.highlight.greenBackground,
70
+ },
71
+ standardInfo: {
72
+ backgroundColor: ColorTokens.highlight.blueBackground,
73
+ },
74
+ standardWarning: {
75
+ backgroundColor: ColorTokens.highlight.orangeBackground,
76
+ },
77
+ standardError: {
78
+ backgroundColor: ColorTokens.highlight.redBackground,
66
79
  },
67
80
  },
68
81
  },
@@ -1,34 +0,0 @@
1
- import {
2
- Alert as MuiAlert,
3
- AlertProps as MuiAlertProps,
4
- useTheme,
5
- } from "@mui/material";
6
- import { Icons } from "../../export";
7
-
8
- export type AlertProps = {
9
- message: string;
10
- severity: MuiAlertProps["severity"];
11
- } & MuiAlertProps;
12
-
13
- const getIcon = (severity: MuiAlertProps["severity"], theme: any) => {
14
- switch (severity) {
15
- case "success":
16
- return <Icons.SuccessFilledIcon />;
17
- case "error":
18
- return <Icons.AlertFilledIcon />;
19
- case "info":
20
- return <Icons.InfoFilledIcon />;
21
- case "warning":
22
- return <Icons.WarningFilledIcon />;
23
- }
24
- };
25
-
26
- export const Alert = ({ severity, message }: AlertProps) => {
27
- const theme = useTheme();
28
-
29
- return (
30
- <MuiAlert severity={severity} icon={getIcon(severity, theme)}>
31
- {message}
32
- </MuiAlert>
33
- );
34
- };