@campxdev/react-blueprint 1.1.5 → 1.1.7
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/.prettierrc +8 -0
- package/package.json +4 -1
- package/src/App.tsx +26 -10
- package/src/components/Assets/Icons/IconComponents/AcademicIcon.tsx +41 -0
- package/src/components/Assets/Icons/IconComponents/AccordionArrow.tsx +23 -0
- package/src/components/Assets/Icons/IconComponents/DeleteIcon.tsx +58 -0
- package/src/components/Assets/Icons/IconComponents/EditIcon.tsx +43 -0
- package/src/components/Assets/Icons/IconComponents/NoteIcon.tsx +41 -0
- package/src/components/Assets/Icons/IconComponents/RedirectIcon.tsx +36 -0
- package/src/components/Assets/Icons/IconComponents/ViewIcon.tsx +34 -0
- package/src/components/Assets/Icons/Icons.tsx +68 -55
- package/src/components/Charts/BarChart/BarChart.tsx +33 -9
- package/src/components/Charts/LineChart/LineChart.tsx +10 -4
- package/src/components/Charts/PieChart/PieChart.tsx +3 -2
- package/src/components/Charts/TreeMap/TreeMap.tsx +1 -0
- package/src/components/Charts/export.ts +4 -0
- package/src/components/Charts/types/types.ts +12 -2
- package/src/components/DataDisplay/Accordion/Accordion.tsx +42 -46
- package/src/components/DataDisplay/AccordionGroup/AccordionGroup.tsx +30 -0
- package/src/components/DataDisplay/Avatar/Avatar.tsx +18 -29
- package/src/components/DataDisplay/Card/Card.tsx +29 -8
- package/src/components/DataDisplay/Chips/Chips.tsx +91 -0
- package/src/components/DataDisplay/DataTable/DataTable.tsx +14 -6
- package/src/components/DataDisplay/export.ts +6 -5
- package/src/components/DataDisplay/styles.tsx +2 -3
- package/src/components/Feedback/Snackbar/Snackbar.tsx +6 -5
- package/src/components/Input/DatePicker/DatePicker.tsx +58 -0
- package/src/components/Input/FormActions/FormActions.tsx +49 -0
- package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +70 -0
- package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +10 -0
- package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +10 -0
- package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +10 -0
- package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +10 -0
- package/src/components/Input/IconButtons/IconButtons.tsx +11 -0
- package/src/components/Input/LabelWrapper/LabelWrapper.tsx +1 -1
- package/src/components/Input/SingleSelect/SingleSelect.tsx +43 -54
- package/src/components/Input/{Chips/Chips.tsx → Tags/Tags.tsx} +14 -14
- package/src/components/Input/TimePicker/TimePicker.tsx +39 -0
- package/src/components/Input/export.ts +13 -8
- package/src/components/Layout/PageContent/PageContent.tsx +16 -0
- package/src/components/Layout/PageHeader/PageHeader.tsx +46 -0
- package/src/components/Navigation/DropDownMenu/DropDownButton.tsx +5 -5
- package/src/components/Navigation/Sidebar/Components.tsx +97 -0
- package/src/components/Navigation/Sidebar/MenuItem.tsx +76 -104
- package/src/components/Navigation/Sidebar/Sidebar.tsx +150 -55
- package/src/components/Navigation/Sidebar/SubMenuItem.tsx +34 -0
- package/src/components/Navigation/Sidebar/interfaces.ts +35 -12
- package/src/components/Navigation/Sidebar/styles.tsx +2 -2
- package/src/components/Navigation/exports.ts +2 -0
- package/src/components/export.ts +1 -1
- package/src/stories/DataDisplay/AccordionGroup.stories.tsx +131 -0
- package/src/stories/DataDisplay/Chips.stories.tsx +77 -0
- package/src/stories/Input/DatePicker.stories.tsx +138 -0
- package/src/stories/Input/IconButtons.stories.tsx +30 -0
- package/src/stories/Input/{Chips.stories.tsx → Tags.stories.tsx} +17 -17
- package/src/stories/Input/TimePicker.stories.tsx +123 -0
- package/src/themes/commonTheme.ts +171 -155
- package/src/components/DataDisplay/Accordion/utils/StandardImageList.tsx +0 -70
- package/src/components/Navigation/Sidebar/DropdownItem.tsx +0 -34
- package/src/stories/DataDisplay/Accordion.stories.tsx +0 -62
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import ImageList from "@mui/material/ImageList";
|
|
2
|
-
import ImageListItem from "@mui/material/ImageListItem";
|
|
3
|
-
|
|
4
|
-
export default function StandardImageList() {
|
|
5
|
-
return (
|
|
6
|
-
<ImageList sx={{ width: 500, height: 450 }} cols={3} rowHeight={164}>
|
|
7
|
-
{itemData.map((item) => (
|
|
8
|
-
<ImageListItem key={item.img}>
|
|
9
|
-
<img
|
|
10
|
-
srcSet={`${item.img}?w=164&h=164&fit=crop&auto=format&dpr=2 2x`}
|
|
11
|
-
src={`${item.img}?w=164&h=164&fit=crop&auto=format`}
|
|
12
|
-
alt={item.title}
|
|
13
|
-
loading="lazy"
|
|
14
|
-
/>
|
|
15
|
-
</ImageListItem>
|
|
16
|
-
))}
|
|
17
|
-
</ImageList>
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const itemData = [
|
|
22
|
-
{
|
|
23
|
-
img: "https://images.unsplash.com/photo-1551963831-b3b1ca40c98e",
|
|
24
|
-
title: "Breakfast",
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
img: "https://images.unsplash.com/photo-1551782450-a2132b4ba21d",
|
|
28
|
-
title: "Burger",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
img: "https://images.unsplash.com/photo-1522770179533-24471fcdba45",
|
|
32
|
-
title: "Camera",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
img: "https://images.unsplash.com/photo-1444418776041-9c7e33cc5a9c",
|
|
36
|
-
title: "Coffee",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
img: "https://images.unsplash.com/photo-1533827432537-70133748f5c8",
|
|
40
|
-
title: "Hats",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
img: "https://images.unsplash.com/photo-1558642452-9d2a7deb7f62",
|
|
44
|
-
title: "Honey",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
img: "https://images.unsplash.com/photo-1516802273409-68526ee1bdd6",
|
|
48
|
-
title: "Basketball",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
img: "https://images.unsplash.com/photo-1518756131217-31eb79b20e8f",
|
|
52
|
-
title: "Fern",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
img: "https://images.unsplash.com/photo-1597645587822-e99fa5d45d25",
|
|
56
|
-
title: "Mushrooms",
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
img: "https://images.unsplash.com/photo-1567306301408-9b74779a11af",
|
|
60
|
-
title: "Tomato basil",
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
img: "https://images.unsplash.com/photo-1471357674240-e1a485acb3e1",
|
|
64
|
-
title: "Sea star",
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
img: "https://images.unsplash.com/photo-1589118949245-7d38baf380d6",
|
|
68
|
-
title: "Bike",
|
|
69
|
-
},
|
|
70
|
-
];
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { useMatch, useResolvedPath } from "react-router-dom";
|
|
2
|
-
import { Typography } from "../../export";
|
|
3
|
-
import { DropdownMenuItem } from "./interfaces";
|
|
4
|
-
import { createSidebarStyles } from "./styles";
|
|
5
|
-
|
|
6
|
-
export const SidebarDropdownItem = ({
|
|
7
|
-
dropdownItem,
|
|
8
|
-
collapsed,
|
|
9
|
-
index,
|
|
10
|
-
}: {
|
|
11
|
-
dropdownItem: DropdownMenuItem;
|
|
12
|
-
collapsed: boolean;
|
|
13
|
-
index: number;
|
|
14
|
-
}) => {
|
|
15
|
-
const { name, path, permissionKey } = dropdownItem;
|
|
16
|
-
|
|
17
|
-
let resolved = useResolvedPath(path);
|
|
18
|
-
let match = useMatch({ path: resolved.pathname, end: false });
|
|
19
|
-
|
|
20
|
-
const { StyledListItem, StyledLinkButton, StyledListItemButton } =
|
|
21
|
-
createSidebarStyles(collapsed);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<StyledListItem key={index} disablePadding className="listItem">
|
|
25
|
-
<StyledLinkButton to={path} match={match}>
|
|
26
|
-
{!collapsed && (
|
|
27
|
-
<StyledListItemButton collapsed={collapsed}>
|
|
28
|
-
<Typography variant="button1">{name}</Typography>
|
|
29
|
-
</StyledListItemButton>
|
|
30
|
-
)}
|
|
31
|
-
</StyledLinkButton>
|
|
32
|
-
</StyledListItem>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react/*";
|
|
2
|
-
import { Accordion } from "../../components/DataDisplay/Accordion/Accordion";
|
|
3
|
-
import StandardImageList from "../../components/DataDisplay/Accordion/utils/StandardImageList";
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof Accordion> = {
|
|
6
|
-
title: "DataDisplay/Accordion",
|
|
7
|
-
component: Accordion,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export default meta;
|
|
11
|
-
|
|
12
|
-
type Story = StoryObj<typeof Accordion>;
|
|
13
|
-
|
|
14
|
-
const primaryData = [
|
|
15
|
-
{
|
|
16
|
-
title: "Accordion 1",
|
|
17
|
-
content:
|
|
18
|
-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
title: "Accordion 2",
|
|
22
|
-
content:
|
|
23
|
-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.",
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
title: "Accordion 3",
|
|
27
|
-
content:
|
|
28
|
-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
title: "Accordion 4",
|
|
32
|
-
content:
|
|
33
|
-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.",
|
|
34
|
-
},
|
|
35
|
-
];
|
|
36
|
-
|
|
37
|
-
const SecondaryData = [
|
|
38
|
-
{
|
|
39
|
-
title: "Accordion 1",
|
|
40
|
-
content: <StandardImageList />,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
title: "Accordion 2",
|
|
44
|
-
content: <StandardImageList />,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
title: "Accordion 3",
|
|
48
|
-
content: <StandardImageList />,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
title: "Accordion 4",
|
|
52
|
-
content: <StandardImageList />,
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
|
|
56
|
-
export const Primary: Story = {
|
|
57
|
-
args: { data: primaryData },
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export const Secondary: Story = {
|
|
61
|
-
args: { data: SecondaryData },
|
|
62
|
-
};
|