pixelize-design-library 1.0.21 → 1.0.22
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 +1 -1
- package/src/App.tsx +0 -10
- package/src/Components/Apexcharts/ApexBarChart/ApexBarChart.stories.tsx +0 -39
- package/src/Components/Apexcharts/ApexBarChart/ApexBarChart.tsx +0 -80
- package/src/Components/Apexcharts/ApexBarChart/ApexBarChartProps.tsx +0 -20
- package/src/Components/Apexcharts/ApexPieChart/ApexPieChart.stories.tsx +0 -33
- package/src/Components/Apexcharts/ApexPieChart/ApexPieChart.tsx +0 -43
- package/src/Components/Apexcharts/ApexPieChart/ApexPieChartProps.tsx +0 -17
- package/src/Components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -26
- package/src/Components/Breadcrumbs/Breadcrumbs.tsx +0 -26
- package/src/Components/Breadcrumbs/BreadcrumbsProps.tsx +0 -12
- package/src/Components/Button/Button.stories.tsx +0 -32
- package/src/Components/Button/Button.tsx +0 -26
- package/src/Components/Button/ButtonProps.tsx +0 -10
- package/src/Components/ButtonGroupIcon/ButtonGoupIconProps.tsx +0 -14
- package/src/Components/ButtonGroupIcon/ButtonGroupIcon.stories.tsx +0 -37
- package/src/Components/ButtonGroupIcon/ButtonGroupIcon.tsx +0 -26
- package/src/Components/Checkbox/Checkbox.stories.tsx +0 -45
- package/src/Components/Checkbox/Checkbox.tsx +0 -29
- package/src/Components/Checkbox/CheckboxProps.tsx +0 -9
- package/src/Components/Input/TextInput.stories.tsx +0 -45
- package/src/Components/Input/TextInput.tsx +0 -70
- package/src/Components/Input/TextInputProps.tsx +0 -27
- package/src/Components/InputTextArea/InputTextArea.stories.tsx +0 -49
- package/src/Components/InputTextArea/InputTextArea.tsx +0 -36
- package/src/Components/InputTextArea/InputTextAreaProps.tsx +0 -11
- package/src/Components/Loading/Loading.stories.tsx +0 -25
- package/src/Components/Loading/Loading.tsx +0 -38
- package/src/Components/Loading/LoadingProps.tsx +0 -1
- package/src/Components/Modal/Modal.stories.tsx +0 -106
- package/src/Components/Modal/Modal.tsx +0 -45
- package/src/Components/Modal/ModalProps.tsx +0 -12
- package/src/Components/NavigationBar/NavBar.stories.tsx +0 -26
- package/src/Components/NavigationBar/NavigationBar.tsx +0 -56
- package/src/Components/NavigationBar/NavigationBarProps.tsx +0 -13
- package/src/Components/NumberInput/NumberInput.stories.tsx +0 -31
- package/src/Components/NumberInput/NumberInput.tsx +0 -56
- package/src/Components/NumberInput/NumberInputProps.tsx +0 -28
- package/src/Components/PinInput/PinInput.stories.tsx +0 -40
- package/src/Components/PinInput/PinInput.tsx +0 -49
- package/src/Components/PinInput/PinInputProps.tsx +0 -33
- package/src/Components/ProfileCard/ProfileCard.stories.tsx +0 -30
- package/src/Components/ProfileCard/ProfileCard.tsx +0 -59
- package/src/Components/ProfileCard/ProfileCardProps.tsx +0 -41
- package/src/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.tsx +0 -25
- package/src/Components/ProfilePhotoViewer/ProfilePhotoViewer.tsx +0 -69
- package/src/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.tsx +0 -14
- package/src/Components/ProgressBar/ProgressBar.stories.tsx +0 -46
- package/src/Components/ProgressBar/ProgressBar.tsx +0 -33
- package/src/Components/ProgressBar/ProgressBarProps.tsx +0 -7
- package/src/Components/RadioButton/RadioButton.stories.tsx +0 -46
- package/src/Components/RadioButton/RadioButton.tsx +0 -63
- package/src/Components/RadioButton/RadioButtonProps.tsx +0 -10
- package/src/Components/Select/Select.stories.tsx +0 -57
- package/src/Components/Select/Select.tsx +0 -46
- package/src/Components/Select/SelectProps.tsx +0 -15
- package/src/Components/SideBar/SideBar.tsx +0 -143
- package/src/Components/SideBar/SideBarProps.tsx +0 -18
- package/src/Components/SideBar/Sidebar.stories.tsx +0 -80
- package/src/Components/Skeletons/Skeleton.stories.tsx +0 -63
- package/src/Components/Skeletons/SkeletonProps.tsx +0 -23
- package/src/Components/Skeletons/Skeletons.tsx +0 -52
- package/src/Components/Table/Table.stories.tsx +0 -47
- package/src/Components/Table/Table.tsx +0 -517
- package/src/Components/Table/TableProps.tsx +0 -36
- package/src/Components/Toaster/Toaster.stories.tsx +0 -58
- package/src/Components/Toaster/Toaster.tsx +0 -34
- package/src/Components/Toaster/ToasterProps.tsx +0 -15
- package/src/Components/ToolTip/ToolTip.stories.tsx +0 -39
- package/src/Components/ToolTip/ToolTip.tsx +0 -62
- package/src/Components/ToolTip/ToolTipProps.tsx +0 -45
- package/src/Layout.tsx +0 -499
- package/src/Theme/Dark/theme.ts +0 -278
- package/src/Theme/Default/theme.ts +0 -301
- package/src/Theme/index.ts +0 -4
- package/src/bootstrap.tsx +0 -13
- package/src/index.ts +0 -29
- package/src/index.tsx +0 -22
- package/src/types/pixelize-design-library.d.ts +0 -4
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ToolTip from './ToolTip';
|
|
3
|
-
import { ToolTipProps } from "./ToolTipProps";
|
|
4
|
-
import { StoryFn, Meta } from '@storybook/react';
|
|
5
|
-
import { Box } from '@chakra-ui/react';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Components/ToolTip/ToolTip',
|
|
9
|
-
component: ToolTip,
|
|
10
|
-
} as Meta;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const Template: StoryFn<ToolTipProps> = (args) => (
|
|
14
|
-
<Box textAlign="center" fontSize="xl">
|
|
15
|
-
<ToolTip {...args}>
|
|
16
|
-
Hover me
|
|
17
|
-
</ToolTip>
|
|
18
|
-
</Box>
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export const Default = Template.bind({});
|
|
23
|
-
Default.args = {
|
|
24
|
-
label: 'Default Tooltip',
|
|
25
|
-
placement: 'top',
|
|
26
|
-
hasArrow: true,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const Customized = Template.bind({});
|
|
30
|
-
Customized.args = {
|
|
31
|
-
label: 'Customized Tooltip',
|
|
32
|
-
placement: 'bottom',
|
|
33
|
-
hasArrow: true,
|
|
34
|
-
fontSize: 'md',
|
|
35
|
-
bg: 'purple.500',
|
|
36
|
-
color: 'white',
|
|
37
|
-
openDelay: 500,
|
|
38
|
-
closeDelay: 200,
|
|
39
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChakraProvider, Tooltip as ChakraTooltip } from "@chakra-ui/react";
|
|
3
|
-
import { ToolTipProps } from "./ToolTipProps";
|
|
4
|
-
|
|
5
|
-
export default function ToolTip({
|
|
6
|
-
placement,
|
|
7
|
-
label,
|
|
8
|
-
children,
|
|
9
|
-
hasArrow,
|
|
10
|
-
fontSize,
|
|
11
|
-
bg,
|
|
12
|
-
color,
|
|
13
|
-
isDisabled,
|
|
14
|
-
isOpen,
|
|
15
|
-
defaultIsOpen,
|
|
16
|
-
openDelay,
|
|
17
|
-
closeDelay,
|
|
18
|
-
arrowSize,
|
|
19
|
-
closeOnClick,
|
|
20
|
-
size,
|
|
21
|
-
width,
|
|
22
|
-
height,
|
|
23
|
-
arrowPadding,
|
|
24
|
-
arrowShadowColor,
|
|
25
|
-
direction,
|
|
26
|
-
gutter,
|
|
27
|
-
onClose,
|
|
28
|
-
modifiers,
|
|
29
|
-
closeOnPointerDown
|
|
30
|
-
}: ToolTipProps) {
|
|
31
|
-
return (
|
|
32
|
-
<ChakraProvider>
|
|
33
|
-
<ChakraTooltip
|
|
34
|
-
label={label}
|
|
35
|
-
placement={placement}
|
|
36
|
-
hasArrow={hasArrow}
|
|
37
|
-
fontSize={fontSize}
|
|
38
|
-
bg={bg}
|
|
39
|
-
color={color}
|
|
40
|
-
isDisabled={isDisabled}
|
|
41
|
-
isOpen={isOpen}
|
|
42
|
-
defaultIsOpen={defaultIsOpen}
|
|
43
|
-
openDelay={openDelay}
|
|
44
|
-
closeDelay={closeDelay}
|
|
45
|
-
arrowSize={arrowSize}
|
|
46
|
-
closeOnClick={closeOnClick}
|
|
47
|
-
size={size}
|
|
48
|
-
width={width}
|
|
49
|
-
height={height}
|
|
50
|
-
arrowPadding={arrowPadding}
|
|
51
|
-
arrowShadowColor={arrowShadowColor}
|
|
52
|
-
direction={direction}
|
|
53
|
-
gutter={gutter}
|
|
54
|
-
onClose={onClose}
|
|
55
|
-
modifiers={modifiers}
|
|
56
|
-
closeOnPointerDown={closeOnPointerDown}
|
|
57
|
-
>
|
|
58
|
-
{children}
|
|
59
|
-
</ChakraTooltip>
|
|
60
|
-
</ChakraProvider>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { TooltipProps as ChakraTooltip } from "@chakra-ui/react";
|
|
2
|
-
export type ToolTipProps = Pick<
|
|
3
|
-
ChakraTooltip,
|
|
4
|
-
| "placement"
|
|
5
|
-
| "label"
|
|
6
|
-
| "hasArrow"
|
|
7
|
-
| "fontSize"
|
|
8
|
-
| "bg"
|
|
9
|
-
| "color"
|
|
10
|
-
| "isDisabled"
|
|
11
|
-
| "isOpen"
|
|
12
|
-
| "defaultIsOpen"
|
|
13
|
-
| "openDelay"
|
|
14
|
-
| "closeDelay"
|
|
15
|
-
| "arrowSize"
|
|
16
|
-
| "closeOnClick"
|
|
17
|
-
| "size"
|
|
18
|
-
| "width"
|
|
19
|
-
| "height"
|
|
20
|
-
| "arrowPadding"
|
|
21
|
-
| "arrowShadowColor"
|
|
22
|
-
| "direction"
|
|
23
|
-
| "gutter"
|
|
24
|
-
| "onClose"
|
|
25
|
-
| "modifiers"
|
|
26
|
-
| "closeOnPointerDown"
|
|
27
|
-
> & {
|
|
28
|
-
children: React.ReactNode;
|
|
29
|
-
placement:
|
|
30
|
-
| "auto"
|
|
31
|
-
| "auto-start"
|
|
32
|
-
| "auto-end"
|
|
33
|
-
| "top"
|
|
34
|
-
| "top-start"
|
|
35
|
-
| "top-end"
|
|
36
|
-
| "right"
|
|
37
|
-
| "right-start"
|
|
38
|
-
| "right-end"
|
|
39
|
-
| "bottom"
|
|
40
|
-
| "bottom-start"
|
|
41
|
-
| "bottom-end"
|
|
42
|
-
| "left"
|
|
43
|
-
| "left-start"
|
|
44
|
-
| "left-end";
|
|
45
|
-
};
|
package/src/Layout.tsx
DELETED
|
@@ -1,499 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Box,
|
|
3
|
-
Flex,
|
|
4
|
-
Heading,
|
|
5
|
-
Text,
|
|
6
|
-
Button as ChakraButton,
|
|
7
|
-
Stack,
|
|
8
|
-
Skeleton,
|
|
9
|
-
} from "@chakra-ui/react";
|
|
10
|
-
import React, { useEffect, useState } from "react";
|
|
11
|
-
import Button from "./Components/Button/Button";
|
|
12
|
-
import CheckBox from "./Components/Checkbox/Checkbox";
|
|
13
|
-
import TextInput from "./Components/Input/TextInput";
|
|
14
|
-
import { useToaster } from "./Components/Toaster/Toaster";
|
|
15
|
-
import Modal from "./Components/Modal/Modal";
|
|
16
|
-
import Select from "./Components/Select/Select";
|
|
17
|
-
import Sidebar from "./Components/SideBar/SideBar";
|
|
18
|
-
import {
|
|
19
|
-
FiBriefcase,
|
|
20
|
-
FiCalendar,
|
|
21
|
-
FiDollarSign,
|
|
22
|
-
FiHome,
|
|
23
|
-
FiSettings,
|
|
24
|
-
FiUser,
|
|
25
|
-
} from "react-icons/fi";
|
|
26
|
-
import NavBar from "./Components/NavigationBar/NavigationBar";
|
|
27
|
-
import Loading from "./Components/Loading/Loading";
|
|
28
|
-
import Skeletons from "./Components/Skeletons/Skeletons";
|
|
29
|
-
import {
|
|
30
|
-
RadioButton,
|
|
31
|
-
RadioButtonGroup,
|
|
32
|
-
} from "./Components/RadioButton/RadioButton";
|
|
33
|
-
import ButtonGroupIcon from "./Components/ButtonGroupIcon/ButtonGroupIcon";
|
|
34
|
-
import ProgressBar from "./Components/ProgressBar/ProgressBar";
|
|
35
|
-
import NumberInput from "./Components/NumberInput/NumberInput";
|
|
36
|
-
import PinInputs from "./Components/PinInput/PinInput";
|
|
37
|
-
import Card from "./Components/ProfileCard/ProfileCard";
|
|
38
|
-
import Breadcrumbs from "./Components/Breadcrumbs/Breadcrumbs";
|
|
39
|
-
import { ChevronRightIcon } from "@chakra-ui/icons";
|
|
40
|
-
import Table from "./Components/Table/Table";
|
|
41
|
-
import ToolTip from "./Components/ToolTip/ToolTip";
|
|
42
|
-
import ApexBarChart from "./Components/Apexcharts/ApexBarChart/ApexBarChart";
|
|
43
|
-
import ApexPieChart from "./Components/Apexcharts/ApexPieChart/ApexPieChart";
|
|
44
|
-
import ProfilePhotoViewer from "./Components/ProfilePhotoViewer/ProfilePhotoViewer";
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const Layout = () => {
|
|
48
|
-
const navmenus = [
|
|
49
|
-
{ title: "Account Settings", url: "myaccount" },
|
|
50
|
-
{ title: "Resetpassword", url: "resetpassword" },
|
|
51
|
-
];
|
|
52
|
-
|
|
53
|
-
const handleNavOnClick = (title: string) => {
|
|
54
|
-
// setActiveMenu(title)
|
|
55
|
-
console.log(title);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const handleLogout = () => {
|
|
59
|
-
console.log("Logout");
|
|
60
|
-
};
|
|
61
|
-
const { showToast } = useToaster();
|
|
62
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
63
|
-
const [selected, setSelected] = useState("");
|
|
64
|
-
|
|
65
|
-
const handleOnclick = () => {
|
|
66
|
-
showToast({
|
|
67
|
-
title: "Hello",
|
|
68
|
-
duration: 3000,
|
|
69
|
-
status: "success",
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
//setIsOpen(true);
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const handleOnclick2 = () => {
|
|
76
|
-
setIsOpen(true);
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const handleOnChange = (e: any) => {
|
|
80
|
-
const checked = e.target.value;
|
|
81
|
-
setSelected(checked);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const menu = [
|
|
85
|
-
{
|
|
86
|
-
title: "Dashboard",
|
|
87
|
-
icon: FiHome,
|
|
88
|
-
url: "dashboard",
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
title: "Calendar",
|
|
92
|
-
icon: FiCalendar,
|
|
93
|
-
url: "description",
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
title: "Clients",
|
|
97
|
-
icon: FiUser,
|
|
98
|
-
url: "description",
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
title: "Animals",
|
|
102
|
-
icon: FiCalendar,
|
|
103
|
-
url: "description",
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
title: "Stock's",
|
|
107
|
-
icon: FiDollarSign,
|
|
108
|
-
url: "description",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
title: "Reports",
|
|
112
|
-
icon: FiBriefcase,
|
|
113
|
-
url: "description",
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
title: "Settings",
|
|
117
|
-
icon: FiSettings,
|
|
118
|
-
url: "description",
|
|
119
|
-
subMenu: [
|
|
120
|
-
{
|
|
121
|
-
title: "Submenu Item 1",
|
|
122
|
-
url: "Submenu item 1 description",
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
title: "Submenu Item 2",
|
|
126
|
-
url: "Submenu item 2 description",
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
},
|
|
130
|
-
];
|
|
131
|
-
|
|
132
|
-
const [toggle, changeToggle] = useState(true);
|
|
133
|
-
const [activeMenu, setActiveMenu] = useState("");
|
|
134
|
-
|
|
135
|
-
const handleMenuClick = (title: string, url: string) => {
|
|
136
|
-
setActiveMenu(title);
|
|
137
|
-
console.log(title);
|
|
138
|
-
console.log(url);
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
const [selectedValue, setSelectedValue] = useState<string>("1");
|
|
142
|
-
|
|
143
|
-
const radioOptions = [
|
|
144
|
-
{ label: "Option 1", value: "1" },
|
|
145
|
-
{ label: "Option 2", value: "2" },
|
|
146
|
-
{ label: "Option 3", value: "3" },
|
|
147
|
-
];
|
|
148
|
-
|
|
149
|
-
const handleChange = (value: string) => {
|
|
150
|
-
setSelectedValue(value);
|
|
151
|
-
};
|
|
152
|
-
const [numbetInputValue, setNumbetInputValue] = useState("0");
|
|
153
|
-
const handleNumberinput = (value: string) => {
|
|
154
|
-
setNumbetInputValue(value);
|
|
155
|
-
};
|
|
156
|
-
const breadcrumbItems = [
|
|
157
|
-
{ path: "/home", label: "Home" },
|
|
158
|
-
{ path: "/about", label: "About" },
|
|
159
|
-
{ path: "/contact", label: "Contact" },
|
|
160
|
-
];
|
|
161
|
-
const handleClick = (path: string) => {
|
|
162
|
-
console.log(`Navigating to ${path}`);
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
const tableDataheader = [
|
|
166
|
-
{
|
|
167
|
-
label: "name",
|
|
168
|
-
accessor_key: "name",
|
|
169
|
-
sort: false,
|
|
170
|
-
search: false,
|
|
171
|
-
columnFreeze: true,
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
label: "email",
|
|
175
|
-
accessor_key: "email",
|
|
176
|
-
sort: true,
|
|
177
|
-
search: true,
|
|
178
|
-
columnFreeze: true,
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
label: "role",
|
|
182
|
-
accessor_key: "role",
|
|
183
|
-
sort: true,
|
|
184
|
-
search: true,
|
|
185
|
-
accessor_function: (value: any): JSX.Element => {
|
|
186
|
-
return <div onClick={() => console.log("hello")}>{value.toUpperCase()}</div>;
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
{ label: "age", accessor_key: "age", sort: true, search: true },
|
|
190
|
-
{ label: "age1", accessor_key: "age1", sort: true, search: true },
|
|
191
|
-
{ label: "age2", accessor_key: "age2", sort: true, search: true },
|
|
192
|
-
{ label: "age3", accessor_key: "age3", sort: true, search: true },
|
|
193
|
-
{ label: "age4", accessor_key: "age4", sort: true, search: true },
|
|
194
|
-
{ label: "age5", accessor_key: "age5", sort: true, search: true },
|
|
195
|
-
{ label: "age6", accessor_key: "age6", sort: true, search: true },
|
|
196
|
-
{ label: "age7", accessor_key: "age7", sort: true, search: true },
|
|
197
|
-
{ label: "age8", accessor_key: "age8", sort: true, search: true },
|
|
198
|
-
{ label: "age9", accessor_key: "age9", sort: true, search: true },
|
|
199
|
-
{ label: "age10", accessor_key: "age10", sort: true, search: true },
|
|
200
|
-
];
|
|
201
|
-
|
|
202
|
-
const tableData = Array.from({ length: 20 }, (_, i) => ({
|
|
203
|
-
id: i + 1,
|
|
204
|
-
name: `User ${i + 1}`,
|
|
205
|
-
email: `user${i + 1}@example.com`,
|
|
206
|
-
role: i % 2 === 0 ? "Developer" : "Manager",
|
|
207
|
-
age: Math.floor(Math.random() * 100),
|
|
208
|
-
age1: Math.floor(Math.random() * 100),
|
|
209
|
-
age2: Math.floor(Math.random() * 100),
|
|
210
|
-
age3: Math.floor(Math.random() * 100),
|
|
211
|
-
age4: Math.floor(Math.random() * 100),
|
|
212
|
-
age5: Math.floor(Math.random() * 100),
|
|
213
|
-
age6: Math.floor(Math.random() * 100),
|
|
214
|
-
age7: Math.floor(Math.random() * 100),
|
|
215
|
-
age8: Math.floor(Math.random() * 100),
|
|
216
|
-
age9: Math.floor(Math.random() * 100),
|
|
217
|
-
age10: Math.floor(Math.random() * 100),
|
|
218
|
-
}));
|
|
219
|
-
|
|
220
|
-
function useWindowSize() {
|
|
221
|
-
const [windowSize, setWindowSize] = useState({
|
|
222
|
-
width: 0,
|
|
223
|
-
height: 0,
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
useEffect(() => {
|
|
227
|
-
function handleResize() {
|
|
228
|
-
setWindowSize({
|
|
229
|
-
width: window.innerWidth,
|
|
230
|
-
height: window.innerHeight,
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
window.addEventListener("resize", handleResize);
|
|
234
|
-
handleResize();
|
|
235
|
-
|
|
236
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
237
|
-
}, []);
|
|
238
|
-
|
|
239
|
-
return windowSize;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
const { width, height } = useWindowSize();
|
|
243
|
-
|
|
244
|
-
// console.log(width, height);
|
|
245
|
-
|
|
246
|
-
const exportOptions = [
|
|
247
|
-
{ value: "PDF", label: "Export as PDF" },
|
|
248
|
-
{ value: "XLS", label: "Export as XLS" },
|
|
249
|
-
];
|
|
250
|
-
|
|
251
|
-
const data = Array.from({ length: 10 }, () =>
|
|
252
|
-
Math.floor(Math.random() * 100)
|
|
253
|
-
);
|
|
254
|
-
const categories = data.map((_, index) => `Category ${index + 1}`);
|
|
255
|
-
|
|
256
|
-
return (
|
|
257
|
-
<Box minH="100vh" bg="gray.100" overflow={"hidden"}>
|
|
258
|
-
<Loading text="Loading" isLoading={false} />
|
|
259
|
-
<Flex>
|
|
260
|
-
<Box>
|
|
261
|
-
<Sidebar
|
|
262
|
-
menus={menu}
|
|
263
|
-
activeMenu={activeMenu}
|
|
264
|
-
handleMenuClick={handleMenuClick}
|
|
265
|
-
toggle={toggle}
|
|
266
|
-
changeToggle={() => changeToggle(!toggle)}
|
|
267
|
-
logo={"https://bit.ly/dan-abramov"}
|
|
268
|
-
companyName="PIXELIZE"
|
|
269
|
-
/>
|
|
270
|
-
</Box>
|
|
271
|
-
<Box flex={"1"} maxWidth={width} overflow={"hidden"}>
|
|
272
|
-
<NavBar
|
|
273
|
-
userAvathar="https://bit.ly/dan-abramov"
|
|
274
|
-
userName="PIXELIZE"
|
|
275
|
-
navMenu={navmenus}
|
|
276
|
-
handleNavOnClick={handleNavOnClick}
|
|
277
|
-
handleLogout={handleLogout}
|
|
278
|
-
logoutText="Logout"
|
|
279
|
-
key={"navbar"}
|
|
280
|
-
/>
|
|
281
|
-
<br />
|
|
282
|
-
<Breadcrumbs
|
|
283
|
-
separator={<ChevronRightIcon color="gray.500" />}
|
|
284
|
-
items={breadcrumbItems}
|
|
285
|
-
handleClick={handleClick}
|
|
286
|
-
/>
|
|
287
|
-
<Box
|
|
288
|
-
p={"50px"}
|
|
289
|
-
height={height - 160}
|
|
290
|
-
overflowY="scroll"
|
|
291
|
-
width={width}
|
|
292
|
-
>
|
|
293
|
-
<TextInput
|
|
294
|
-
//label="hello"
|
|
295
|
-
id="hello"
|
|
296
|
-
name="hello"
|
|
297
|
-
//helperText="Hello"
|
|
298
|
-
//errorMessage="Required"
|
|
299
|
-
//error={true}
|
|
300
|
-
type="file"
|
|
301
|
-
// inputRightIcon={<FiUser color="gray.300" />}
|
|
302
|
-
// onRightIconclick={() => {
|
|
303
|
-
// console.log("icon click");
|
|
304
|
-
// }}
|
|
305
|
-
key={"input"}
|
|
306
|
-
// border={"0px solid"}
|
|
307
|
-
// padding={"0px"}
|
|
308
|
-
inputStyle={{ border: "0px solid", padding: "0px" }}
|
|
309
|
-
inputGroupStyle={{ border: "0px solid", padding: "0px" }}
|
|
310
|
-
onChange={(e) => {
|
|
311
|
-
console.log(e.target.files);
|
|
312
|
-
}}
|
|
313
|
-
/>
|
|
314
|
-
<br />
|
|
315
|
-
<Button
|
|
316
|
-
label="Tosterbutton"
|
|
317
|
-
onClick={handleOnclick}
|
|
318
|
-
width={250}
|
|
319
|
-
variant={"solid"}
|
|
320
|
-
color={"blue"}
|
|
321
|
-
/>
|
|
322
|
-
<br />
|
|
323
|
-
<br />
|
|
324
|
-
<CheckBox label="hello world" />
|
|
325
|
-
<br />
|
|
326
|
-
<br />
|
|
327
|
-
<Button
|
|
328
|
-
label="ModelButton"
|
|
329
|
-
onClick={handleOnclick2}
|
|
330
|
-
width={250}
|
|
331
|
-
variant={"solid"}
|
|
332
|
-
color={"blue"}
|
|
333
|
-
/>
|
|
334
|
-
<br />
|
|
335
|
-
<Modal
|
|
336
|
-
isOpen={isOpen}
|
|
337
|
-
onClose={() => setIsOpen(false)}
|
|
338
|
-
overlaybg={"blackAlpha.300"}
|
|
339
|
-
overlaybackdropFilter={"blur(10px) hue-rotate(90deg)"}
|
|
340
|
-
size={"sm"}
|
|
341
|
-
isCentered={true}
|
|
342
|
-
>
|
|
343
|
-
helldddddlo
|
|
344
|
-
</Modal>
|
|
345
|
-
<br />
|
|
346
|
-
<Select
|
|
347
|
-
options={[
|
|
348
|
-
{ id: 1, label: "mages" },
|
|
349
|
-
{ id: 2, label: "sjdfg" },
|
|
350
|
-
]}
|
|
351
|
-
onChange={handleOnChange}
|
|
352
|
-
value={selected}
|
|
353
|
-
width={200}
|
|
354
|
-
/>
|
|
355
|
-
<br />
|
|
356
|
-
{/* <TextArea label="hello" helperText='Hello' errorMessage='Required' error={true} rows={5} /> */}
|
|
357
|
-
<br />
|
|
358
|
-
<Box width={"150px"}>
|
|
359
|
-
<Skeletons type="skeleton" />
|
|
360
|
-
<br />
|
|
361
|
-
<Skeletons type="circle" />
|
|
362
|
-
<br />
|
|
363
|
-
<Skeletons type="text" mt={4} />
|
|
364
|
-
<br />
|
|
365
|
-
<br />
|
|
366
|
-
<Skeletons
|
|
367
|
-
height="10px"
|
|
368
|
-
isLoaded={false}
|
|
369
|
-
fadeDuration={4}
|
|
370
|
-
bg="blue.500"
|
|
371
|
-
color="white"
|
|
372
|
-
type="skeleton"
|
|
373
|
-
>
|
|
374
|
-
<Box>Hello ChakraUI!</Box>
|
|
375
|
-
</Skeletons>
|
|
376
|
-
</Box>
|
|
377
|
-
<br />
|
|
378
|
-
<br />
|
|
379
|
-
<RadioButton label="dinesh" />
|
|
380
|
-
<br />
|
|
381
|
-
<br />
|
|
382
|
-
<RadioButtonGroup
|
|
383
|
-
options={radioOptions}
|
|
384
|
-
value={selectedValue}
|
|
385
|
-
onChange={handleChange}
|
|
386
|
-
colorScheme="blue"
|
|
387
|
-
size="md"
|
|
388
|
-
/>
|
|
389
|
-
<br />
|
|
390
|
-
<br />
|
|
391
|
-
<ButtonGroupIcon
|
|
392
|
-
buttonText="hello"
|
|
393
|
-
rightIcon={<FiHome />}
|
|
394
|
-
size="md"
|
|
395
|
-
variant="solid"
|
|
396
|
-
color="red"
|
|
397
|
-
/>
|
|
398
|
-
<br /> <br />
|
|
399
|
-
<ProgressBar min={10} max={0} isIndeterminate={true} size="xs" />
|
|
400
|
-
<br />
|
|
401
|
-
<br />
|
|
402
|
-
<NumberInput
|
|
403
|
-
min={0}
|
|
404
|
-
max={20}
|
|
405
|
-
value={numbetInputValue}
|
|
406
|
-
onChange={handleNumberinput}
|
|
407
|
-
/>
|
|
408
|
-
<br />
|
|
409
|
-
<br />
|
|
410
|
-
<PinInputs pins={5} label="Enter pin" />
|
|
411
|
-
<br />
|
|
412
|
-
<br />
|
|
413
|
-
<Card
|
|
414
|
-
align={"center"}
|
|
415
|
-
header={<Heading size="md"> Customer dashboard</Heading>}
|
|
416
|
-
footer={<ChakraButton colorScheme="blue">View here</ChakraButton>}
|
|
417
|
-
>
|
|
418
|
-
<Text>
|
|
419
|
-
View a summary of all your customers over the last month.
|
|
420
|
-
</Text>
|
|
421
|
-
</Card>
|
|
422
|
-
<br />
|
|
423
|
-
<Table
|
|
424
|
-
data={tableData}
|
|
425
|
-
headers={tableDataheader}
|
|
426
|
-
// handleCellClick={(row, header) => {
|
|
427
|
-
// console.log("Cell clicked", row, header);
|
|
428
|
-
// }}
|
|
429
|
-
exportOptions={exportOptions}
|
|
430
|
-
handleExportChange={(value) => {
|
|
431
|
-
console.log("click label", value);
|
|
432
|
-
}}
|
|
433
|
-
isLoading={true}
|
|
434
|
-
loadingContaxt={<Stack spacing={4}>
|
|
435
|
-
<Stack direction="row" justifyContent="space-between" paddingX="4" paddingY="2">
|
|
436
|
-
<Skeleton height="20px" width="10%" />
|
|
437
|
-
<Skeleton height="20px" width="20%" />
|
|
438
|
-
<Skeleton height="20px" width="15%" />
|
|
439
|
-
<Skeleton height="20px" width="25%" />
|
|
440
|
-
<Skeleton height="20px" width="10%" />
|
|
441
|
-
<Skeleton height="20px" width="20%" />
|
|
442
|
-
</Stack>
|
|
443
|
-
{[...Array(5)].map((_, index) => (
|
|
444
|
-
<Stack key={index} direction="row" justifyContent="space-between" paddingX="4" paddingY="2" borderWidth="1px" borderRadius="md">
|
|
445
|
-
<Skeleton height="20px" width="10%" />
|
|
446
|
-
<Skeleton height="20px" width="20%" />
|
|
447
|
-
<Skeleton height="20px" width="15%" />
|
|
448
|
-
<Skeleton height="20px" width="25%" />
|
|
449
|
-
<Skeleton height="20px" width="10%" />
|
|
450
|
-
<Skeleton height="20px" width="20%" />
|
|
451
|
-
</Stack>
|
|
452
|
-
))}
|
|
453
|
-
</Stack>}
|
|
454
|
-
loadingBoxStyle={{ padding: "10px", width: "100%" }}
|
|
455
|
-
/>
|
|
456
|
-
<ToolTip
|
|
457
|
-
label="Hello"
|
|
458
|
-
placement="top"
|
|
459
|
-
hasArrow
|
|
460
|
-
size={"20"}
|
|
461
|
-
width={"300px"}
|
|
462
|
-
height={"100px"}
|
|
463
|
-
bg={"green"}
|
|
464
|
-
>
|
|
465
|
-
hai
|
|
466
|
-
</ToolTip>
|
|
467
|
-
<br />
|
|
468
|
-
<Box>
|
|
469
|
-
<div style={{ display: "flex", justifyContent: "space-around" }}>
|
|
470
|
-
<ApexBarChart
|
|
471
|
-
data={data}
|
|
472
|
-
Labels={categories}
|
|
473
|
-
title="Bar Chart"
|
|
474
|
-
titlePosition="left"
|
|
475
|
-
// barColor={["#00E396"]}
|
|
476
|
-
// xAxisStyle={{ colors: "#00E396", fontSize: "12px" }}
|
|
477
|
-
// yAxisStyle={{ colors: "#00E396", fontSize: "12px" }}
|
|
478
|
-
titleStyle={{ color: "#00E396" }}
|
|
479
|
-
/>
|
|
480
|
-
<ApexPieChart
|
|
481
|
-
data={data}
|
|
482
|
-
labels={categories}
|
|
483
|
-
title="Pie Chart"
|
|
484
|
-
titlePosition="left"
|
|
485
|
-
// chartColor={["#00E396", "#3182ce", "#ff4757", "#ff6348", "#e84393"]}
|
|
486
|
-
titleStyle={{ color: "#00E396" }}
|
|
487
|
-
/>
|
|
488
|
-
</div>
|
|
489
|
-
</Box>
|
|
490
|
-
<br />
|
|
491
|
-
<ProfilePhotoViewer photoUrl="https://bit.ly/dan-abramov" onPhotoChange={(file) => console.log(file)} />
|
|
492
|
-
</Box>
|
|
493
|
-
</Box>
|
|
494
|
-
</Flex>
|
|
495
|
-
</Box>
|
|
496
|
-
);
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
export default Layout;
|