@campxdev/react-blueprint 0.1.37 → 0.1.39

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": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "main": "./export.ts",
5
5
  "private": false,
6
6
  "dependencies": {
@@ -13,6 +13,7 @@ export const StyledHeader = styled("header")(
13
13
  justifyContent: "space-between",
14
14
  padding: "0 32px",
15
15
  borderRadius: "8px",
16
+ marginTop: "12px",
16
17
  })
17
18
  );
18
19
 
@@ -16,7 +16,7 @@ export interface MenuItemProps {
16
16
  iconType?: string;
17
17
  }
18
18
 
19
- export const FloatingSidebar = ({
19
+ export const Sidebar = ({
20
20
  menu,
21
21
  collapsed,
22
22
  setCollapsed,
@@ -85,4 +85,4 @@ export const FloatingSidebar = ({
85
85
  );
86
86
  };
87
87
 
88
- export default FloatingSidebar;
88
+ export default Sidebar;
@@ -12,6 +12,8 @@ export const createSidebarStyles = (collapsed: boolean) => {
12
12
  const StyledSidebarContainer = styled(Stack)(({ theme }) => {
13
13
  return {
14
14
  height: "100vh",
15
+ marginLeft: "12px",
16
+ marginTop: "12px",
15
17
  width: collapsed ? "60px" : "240px",
16
18
  backgroundColor: theme.palette.surface.defaultBackground,
17
19
  };
@@ -78,8 +80,6 @@ export const createSidebarStyles = (collapsed: boolean) => {
78
80
 
79
81
  const StyledListItemIcon = styled(ListItemIcon)(
80
82
  ({ collapsed }: { collapsed: boolean }) => ({
81
- minWidth: "auto",
82
- paddingRight: collapsed ? "0px" : "8px",
83
83
  display: "flex",
84
84
  justifyContent: "center",
85
85
  })
@@ -1,17 +1,17 @@
1
1
  import { CustomDialog } from "./DialogButton/DialogButton";
2
2
  import { DropDownButton } from "./DropDownMenu/DropDownButton";
3
- import { DropdownMenu } from "./DropDownMenu/DropDownMenu";
4
3
  import { DropDownIcon } from "./DropDownMenu/DropDownIcon";
4
+ import { DropdownMenu } from "./DropDownMenu/DropDownMenu";
5
5
  import { DropdownMenuItem } from "./DropDownMenu/DropdownMenuItem";
6
+ import { Sidebar } from "./Sidebar/Sidebar";
6
7
  import { TabsContainer } from "./TabsContainer/TabsContainer";
7
- import { FloatingSidebar } from "./FloatingSidebar/FloatingSidebar";
8
8
 
9
9
  export {
10
10
  CustomDialog,
11
11
  DropDownButton,
12
- DropdownMenu,
13
12
  DropDownIcon,
13
+ DropdownMenu,
14
14
  DropdownMenuItem,
15
+ Sidebar,
15
16
  TabsContainer,
16
- FloatingSidebar,
17
17
  };
@@ -1,11 +1,11 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
1
  import { Box } from "@mui/material";
3
- import { FloatingSidebar, Icons } from "../../components/export";
2
+ import { Meta, StoryObj } from "@storybook/react";
3
+ import { Icons, Sidebar } from "../../components/export";
4
4
 
5
- // Define the default export with Meta type including the component type
6
- const meta: Meta<typeof FloatingSidebar> = {
5
+ // Define the default export Sidebar Meta type including the component type
6
+ const meta: Meta<typeof Sidebar> = {
7
7
  title: "Navigation/FloatingSidebar",
8
- component: FloatingSidebar,
8
+ component: Sidebar,
9
9
  decorators: [
10
10
  (Story) => (
11
11
  <Box
@@ -28,11 +28,11 @@ const meta: Meta<typeof FloatingSidebar> = {
28
28
  };
29
29
 
30
30
  export default meta;
31
- type Story = StoryObj<typeof FloatingSidebar>;
31
+ type Story = StoryObj<typeof Sidebar>;
32
32
 
33
33
  // Primary story
34
34
  export const Primary: Story = {
35
- render: (args) => <FloatingSidebar {...args} />,
35
+ render: (args) => <Sidebar {...args} />,
36
36
  args: {
37
37
  menu: [
38
38
  { name: "Home", path: "/home", icon: Icons.DashBoardIcon },
@@ -1,42 +0,0 @@
1
- import { Grid, Stack, useTheme } from "@mui/material";
2
- import { useState } from "react";
3
- import { FloatingSidebar, Icons } from "../../export";
4
- import { AppHeader } from "../AppHeader/AppHeader";
5
-
6
- export const AppLayout = () => {
7
- const theme = useTheme();
8
- const [collapsed, setCollapsed] = useState(false);
9
- const menu = [
10
- { name: "Home", path: "/home", icon: Icons.DashBoardIcon },
11
- { name: "Self Service Portal", path: "/item2" },
12
- { name: "hrms", path: "/hrms" },
13
- ];
14
- return (
15
- <Grid
16
- container
17
- spacing={3}
18
- sx={{
19
- backgroundColor: theme.palette.surface.defaultBackground,
20
- minHeight: "80vh",
21
- }}
22
- >
23
- <Grid item xs={collapsed ? 1 : 3}>
24
- <FloatingSidebar
25
- menu={menu}
26
- collapsed={collapsed}
27
- setCollapsed={setCollapsed}
28
- />
29
- </Grid>
30
- <Grid item xs={collapsed ? 11 : 9}>
31
- <Stack>
32
- <AppHeader
33
- clientName="Anurag University"
34
- userFullName="Srikanth Yellapragada"
35
- actions={[]}
36
- collapsed={true}
37
- />
38
- </Stack>
39
- </Grid>
40
- </Grid>
41
- );
42
- };
@@ -1,31 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { AppLayout } from "../../components/Layout/AppLayout/AppLayout";
3
-
4
-
5
- // Define the default export with Meta type including the component type
6
- const meta: Meta<typeof AppLayout> = {
7
- title: "Layout/AppLayout",
8
- component: AppLayout,
9
- tags: ["autodocs"],
10
- argTypes: {
11
- actions: {
12
- control: "object",
13
- description: "Custom actions to be displayed.",
14
- },
15
- },
16
- };
17
-
18
- export default meta;
19
- type Story = StoryObj<typeof AppLayout>;
20
-
21
- // Primary story
22
- export const Primary: Story = {
23
- render: (args: any) => (
24
-
25
- <AppLayout {...args} />
26
-
27
- ),
28
- args: {
29
-
30
- },
31
- };