pixelize-design-library 1.0.21 → 1.0.23
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/dist/index.d.ts +22 -1
- package/dist/index.js +44 -25
- package/package.json +1 -1
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- 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
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
import ApexBarChart from "./Components/Apexcharts/ApexBarChart/ApexBarChart";
|
|
2
|
+
import ApexPieChart from "./Components/Apexcharts/ApexPieChart/ApexPieChart";
|
|
3
|
+
import Breadcrumbs from "./Components/Breadcrumbs/Breadcrumbs";
|
|
4
|
+
import Button from "./Components/Button/Button";
|
|
5
|
+
import Checkbox from "./Components/Checkbox/Checkbox";
|
|
6
|
+
import ButtonGroupIcon from "./Components/ButtonGroupIcon/ButtonGroupIcon";
|
|
7
|
+
import TextInput from "./Components/Input/TextInput";
|
|
8
|
+
import InputTextArea from "./Components/InputTextArea/InputTextArea";
|
|
1
9
|
import Loading from "./Components/Loading/Loading";
|
|
10
|
+
import Modal from "./Components/Modal/Modal";
|
|
11
|
+
import NavigationBar from "./Components/NavigationBar/NavigationBar";
|
|
12
|
+
import NumberInput from "./Components/NumberInput/NumberInput";
|
|
13
|
+
import PinInput from "./Components/PinInput/PinInput";
|
|
14
|
+
import ProfileCard from "./Components/ProfileCard/ProfileCard";
|
|
15
|
+
import ProfilePhotoViewer from "./Components/ProfilePhotoViewer/ProfilePhotoViewer";
|
|
16
|
+
import ProgressBar from "./Components/ProgressBar/ProgressBar";
|
|
17
|
+
import { RadioButton, RadioButtonGroup } from "./Components/RadioButton/RadioButton";
|
|
18
|
+
import Select from "./Components/Select/Select";
|
|
19
|
+
import SideBar from "./Components/SideBar/SideBar";
|
|
20
|
+
import Skeletons from "./Components/Skeletons/Skeletons";
|
|
21
|
+
import Table from "./Components/Table/Table";
|
|
22
|
+
import Toaster from "./Components/Toaster/Toaster";
|
|
2
23
|
import ToolTip from "./Components/ToolTip/ToolTip";
|
|
3
|
-
export { Loading, ToolTip };
|
|
24
|
+
export { ApexBarChart, ApexPieChart, Breadcrumbs, Button, Checkbox, ButtonGroupIcon, TextInput, InputTextArea, Loading, Modal, NavigationBar, NumberInput, PinInput, ProfileCard, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Select, SideBar, Skeletons, Table, Toaster, ToolTip };
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// export * from "./Components/Apexcharts/ApexBarChart/ApexBarChart";
|
|
3
|
-
// export * from "./Components/Apexcharts/ApexPieChart/ApexPieChart";
|
|
4
|
-
// export * from "./Components/Breadcrumbs/Breadcrumbs";
|
|
5
|
-
// export * from "./Components/Button/Button";
|
|
6
|
-
// export * from "./Components/Checkbox/Checkbox";
|
|
7
|
-
// export * from "./Components/ButtonGroupIcon/ButtonGroupIcon";
|
|
8
|
-
// export * from "./Components/Input/TextInput";
|
|
9
|
-
// export * from "./Components/InputTextArea/InputTextArea";
|
|
10
|
-
// export * from "./Components/Loading/Loading";
|
|
11
|
-
// export * from "./Components/Modal/Modal";
|
|
12
|
-
// export * from "./Components/NavigationBar/NavigationBar";
|
|
13
|
-
// export * from "./Components/NumberInput/NumberInput";
|
|
14
|
-
// export * from "./Components/PinInput/PinInput";
|
|
15
|
-
// export * from "./Components/ProfileCard/ProfileCard";
|
|
16
|
-
// export * from "./Components/ProfilePhotoViewer/ProfilePhotoViewer";
|
|
17
|
-
// export * from "./Components/ProgressBar/ProgressBar";
|
|
18
|
-
// export * from "./Components/RadioButton/RadioButton";
|
|
19
|
-
// export * from "./Components/Select/Select";
|
|
20
|
-
// export * from "./Components/SideBar/SideBar";
|
|
21
|
-
// export * from "./Components/Skeletons/Skeletons";
|
|
22
|
-
// export * from "./Components/Table/Table";
|
|
23
|
-
// export * from "./Components/Toaster/Toaster";
|
|
24
|
-
// // export * from "./Components/ToolTip/ToolTip";
|
|
25
|
-
// export * from "./Theme/index";
|
|
26
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
4
|
};
|
|
29
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.ToolTip = exports.Loading = void 0;
|
|
6
|
+
exports.ToolTip = exports.Toaster = exports.Table = exports.Skeletons = exports.SideBar = exports.Select = exports.RadioButtonGroup = exports.RadioButton = exports.ProgressBar = exports.ProfilePhotoViewer = exports.ProfileCard = exports.PinInput = exports.NumberInput = exports.NavigationBar = exports.Modal = exports.Loading = exports.InputTextArea = exports.TextInput = exports.ButtonGroupIcon = exports.Checkbox = exports.Button = exports.Breadcrumbs = exports.ApexPieChart = exports.ApexBarChart = void 0;
|
|
7
|
+
var ApexBarChart_1 = __importDefault(require("./Components/Apexcharts/ApexBarChart/ApexBarChart"));
|
|
8
|
+
exports.ApexBarChart = ApexBarChart_1.default;
|
|
9
|
+
var ApexPieChart_1 = __importDefault(require("./Components/Apexcharts/ApexPieChart/ApexPieChart"));
|
|
10
|
+
exports.ApexPieChart = ApexPieChart_1.default;
|
|
11
|
+
var Breadcrumbs_1 = __importDefault(require("./Components/Breadcrumbs/Breadcrumbs"));
|
|
12
|
+
exports.Breadcrumbs = Breadcrumbs_1.default;
|
|
13
|
+
var Button_1 = __importDefault(require("./Components/Button/Button"));
|
|
14
|
+
exports.Button = Button_1.default;
|
|
15
|
+
var Checkbox_1 = __importDefault(require("./Components/Checkbox/Checkbox"));
|
|
16
|
+
exports.Checkbox = Checkbox_1.default;
|
|
17
|
+
var ButtonGroupIcon_1 = __importDefault(require("./Components/ButtonGroupIcon/ButtonGroupIcon"));
|
|
18
|
+
exports.ButtonGroupIcon = ButtonGroupIcon_1.default;
|
|
19
|
+
var TextInput_1 = __importDefault(require("./Components/Input/TextInput"));
|
|
20
|
+
exports.TextInput = TextInput_1.default;
|
|
21
|
+
var InputTextArea_1 = __importDefault(require("./Components/InputTextArea/InputTextArea"));
|
|
22
|
+
exports.InputTextArea = InputTextArea_1.default;
|
|
31
23
|
var Loading_1 = __importDefault(require("./Components/Loading/Loading"));
|
|
32
24
|
exports.Loading = Loading_1.default;
|
|
25
|
+
var Modal_1 = __importDefault(require("./Components/Modal/Modal"));
|
|
26
|
+
exports.Modal = Modal_1.default;
|
|
27
|
+
var NavigationBar_1 = __importDefault(require("./Components/NavigationBar/NavigationBar"));
|
|
28
|
+
exports.NavigationBar = NavigationBar_1.default;
|
|
29
|
+
var NumberInput_1 = __importDefault(require("./Components/NumberInput/NumberInput"));
|
|
30
|
+
exports.NumberInput = NumberInput_1.default;
|
|
31
|
+
var PinInput_1 = __importDefault(require("./Components/PinInput/PinInput"));
|
|
32
|
+
exports.PinInput = PinInput_1.default;
|
|
33
|
+
var ProfileCard_1 = __importDefault(require("./Components/ProfileCard/ProfileCard"));
|
|
34
|
+
exports.ProfileCard = ProfileCard_1.default;
|
|
35
|
+
var ProfilePhotoViewer_1 = __importDefault(require("./Components/ProfilePhotoViewer/ProfilePhotoViewer"));
|
|
36
|
+
exports.ProfilePhotoViewer = ProfilePhotoViewer_1.default;
|
|
37
|
+
var ProgressBar_1 = __importDefault(require("./Components/ProgressBar/ProgressBar"));
|
|
38
|
+
exports.ProgressBar = ProgressBar_1.default;
|
|
39
|
+
var RadioButton_1 = require("./Components/RadioButton/RadioButton");
|
|
40
|
+
Object.defineProperty(exports, "RadioButton", { enumerable: true, get: function () { return RadioButton_1.RadioButton; } });
|
|
41
|
+
Object.defineProperty(exports, "RadioButtonGroup", { enumerable: true, get: function () { return RadioButton_1.RadioButtonGroup; } });
|
|
42
|
+
var Select_1 = __importDefault(require("./Components/Select/Select"));
|
|
43
|
+
exports.Select = Select_1.default;
|
|
44
|
+
var SideBar_1 = __importDefault(require("./Components/SideBar/SideBar"));
|
|
45
|
+
exports.SideBar = SideBar_1.default;
|
|
46
|
+
var Skeletons_1 = __importDefault(require("./Components/Skeletons/Skeletons"));
|
|
47
|
+
exports.Skeletons = Skeletons_1.default;
|
|
48
|
+
var Table_1 = __importDefault(require("./Components/Table/Table"));
|
|
49
|
+
exports.Table = Table_1.default;
|
|
50
|
+
var Toaster_1 = __importDefault(require("./Components/Toaster/Toaster"));
|
|
51
|
+
exports.Toaster = Toaster_1.default;
|
|
33
52
|
var ToolTip_1 = __importDefault(require("./Components/ToolTip/ToolTip"));
|
|
34
53
|
exports.ToolTip = ToolTip_1.default;
|
package/package.json
CHANGED
package/public/favicon.ico
DELETED
|
Binary file
|
package/public/index.html
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
-
<meta name="theme-color" content="#000000" />
|
|
9
|
-
<meta name="description" content="Web site created using create-react-app" />
|
|
10
|
-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
11
|
-
<!--
|
|
12
|
-
manifest.json provides metadata used when your web app is installed on a
|
|
13
|
-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
14
|
-
-->
|
|
15
|
-
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
|
|
16
|
-
<!--
|
|
17
|
-
Notice the use of %PUBLIC_URL% in the tags above.
|
|
18
|
-
It will be replaced with the URL of the `public` folder during the build.
|
|
19
|
-
Only files inside the `public` folder can be referenced from the HTML.
|
|
20
|
-
|
|
21
|
-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
22
|
-
work correctly both with client-side routing and a non-root public URL.
|
|
23
|
-
Learn how to configure a non-root public URL by running `npm run build`.
|
|
24
|
-
-->
|
|
25
|
-
<title>React App</title>
|
|
26
|
-
</head>
|
|
27
|
-
|
|
28
|
-
<body>
|
|
29
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
30
|
-
<div id="root"></div>
|
|
31
|
-
<!--
|
|
32
|
-
This HTML file is a template.
|
|
33
|
-
If you open it directly in the browser, you will see an empty page.
|
|
34
|
-
|
|
35
|
-
You can add webfonts, meta tags, or analytics to this file.
|
|
36
|
-
The build step will place the bundled scripts into the <body> tag.
|
|
37
|
-
|
|
38
|
-
To begin the development, run `npm start` or `yarn start`.
|
|
39
|
-
To create a production bundle, use `npm run build` or `yarn build`.
|
|
40
|
-
-->
|
|
41
|
-
</body>
|
|
42
|
-
|
|
43
|
-
</html>
|
package/public/logo192.png
DELETED
|
Binary file
|
package/public/logo512.png
DELETED
|
Binary file
|
package/public/manifest.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "React App",
|
|
3
|
-
"name": "Create React App Sample",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.ico",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "logo192.png",
|
|
12
|
-
"type": "image/png",
|
|
13
|
-
"sizes": "192x192"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"src": "logo512.png",
|
|
17
|
-
"type": "image/png",
|
|
18
|
-
"sizes": "512x512"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"start_url": ".",
|
|
22
|
-
"display": "standalone",
|
|
23
|
-
"theme_color": "#000000",
|
|
24
|
-
"background_color": "#ffffff"
|
|
25
|
-
}
|
package/public/robots.txt
DELETED
package/src/App.tsx
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StoryFn, Meta } from '@storybook/react';
|
|
3
|
-
import ApexBarChart from './ApexBarChart';
|
|
4
|
-
import { ApexBarChartProps } from './ApexBarChartProps';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Components/ApexCharts/ApexBarChart',
|
|
8
|
-
component: ApexBarChart,
|
|
9
|
-
argTypes: {
|
|
10
|
-
backgroundColor: { control: 'color' },
|
|
11
|
-
},
|
|
12
|
-
} as Meta;
|
|
13
|
-
|
|
14
|
-
const Template: StoryFn<ApexBarChartProps> = (args) => <ApexBarChart {...args} />;
|
|
15
|
-
|
|
16
|
-
export const Primary = Template.bind({});
|
|
17
|
-
Primary.args = {
|
|
18
|
-
data: [44, 55, 41, 64, 22, 43, 21],
|
|
19
|
-
Labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
20
|
-
title: 'Weekly Sales',
|
|
21
|
-
titlePosition: 'left',
|
|
22
|
-
height: 400,
|
|
23
|
-
width: 500,
|
|
24
|
-
barColor: ['#3182ce'],
|
|
25
|
-
xAxisStyle: {
|
|
26
|
-
color: '#ffffff',
|
|
27
|
-
},
|
|
28
|
-
yAxisStyle: {
|
|
29
|
-
color: '#ffffff',
|
|
30
|
-
},
|
|
31
|
-
titleStyle: {
|
|
32
|
-
color: '#3182ce',
|
|
33
|
-
fontSize: '16px',
|
|
34
|
-
fontWeight: 600,
|
|
35
|
-
fontFamily: 'Arial',
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// You can add more variations of the component by adding more exports like the Primary example.
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import ReactApexChart from "react-apexcharts";
|
|
3
|
-
import { ApexOptions } from "apexcharts";
|
|
4
|
-
import { ApexBarChartProps } from "./ApexBarChartProps";
|
|
5
|
-
|
|
6
|
-
export default function ApexBarChart({
|
|
7
|
-
data,
|
|
8
|
-
Labels,
|
|
9
|
-
title,
|
|
10
|
-
titlePosition,
|
|
11
|
-
height = 400,
|
|
12
|
-
width = 500,
|
|
13
|
-
barColor = ["#3182ce"],
|
|
14
|
-
xAxisStyle = {
|
|
15
|
-
color: "#ffffff",
|
|
16
|
-
},
|
|
17
|
-
yAxisStyle = {
|
|
18
|
-
color: "#ffffff",
|
|
19
|
-
},
|
|
20
|
-
titleStyle = {
|
|
21
|
-
color: "#3182ce",
|
|
22
|
-
fontSize: "16px",
|
|
23
|
-
fontWeight: 600,
|
|
24
|
-
fontFamily: "Arial",
|
|
25
|
-
},
|
|
26
|
-
}: ApexBarChartProps) {
|
|
27
|
-
const options: ApexOptions = {
|
|
28
|
-
chart: {
|
|
29
|
-
type: "bar",
|
|
30
|
-
height: 350,
|
|
31
|
-
},
|
|
32
|
-
plotOptions: {
|
|
33
|
-
bar: {
|
|
34
|
-
borderRadius: 4,
|
|
35
|
-
horizontal: false,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
dataLabels: {
|
|
39
|
-
enabled: false,
|
|
40
|
-
style: {
|
|
41
|
-
fontSize: "12px",
|
|
42
|
-
colors: ["#00E396"], //data label color
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
xaxis: {
|
|
46
|
-
categories: Labels,
|
|
47
|
-
labels: {
|
|
48
|
-
style: xAxisStyle,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
yaxis: {
|
|
52
|
-
labels: {
|
|
53
|
-
style: yAxisStyle,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
title: {
|
|
57
|
-
text: title,
|
|
58
|
-
align: titlePosition,
|
|
59
|
-
style: titleStyle,
|
|
60
|
-
},
|
|
61
|
-
colors: barColor, //bar color
|
|
62
|
-
};
|
|
63
|
-
const series = [
|
|
64
|
-
{
|
|
65
|
-
name: "Data",
|
|
66
|
-
data: data,
|
|
67
|
-
},
|
|
68
|
-
];
|
|
69
|
-
return (
|
|
70
|
-
<div>
|
|
71
|
-
<ReactApexChart
|
|
72
|
-
options={options}
|
|
73
|
-
series={series}
|
|
74
|
-
type="bar"
|
|
75
|
-
height={height}
|
|
76
|
-
width={width}
|
|
77
|
-
/>
|
|
78
|
-
</div>
|
|
79
|
-
);
|
|
80
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ApexOptions } from "apexcharts";
|
|
2
|
-
export type ApexBarChartProps = {
|
|
3
|
-
data: number[];
|
|
4
|
-
Labels: string[];
|
|
5
|
-
title?: string;
|
|
6
|
-
titlePosition?: 'left' | 'center' | 'right';
|
|
7
|
-
height?: number;
|
|
8
|
-
width?: number;
|
|
9
|
-
barColor?: string[];
|
|
10
|
-
xAxisStyle?: StyleProps;
|
|
11
|
-
yAxisStyle?: StyleProps;
|
|
12
|
-
titleStyle?: StyleProps;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
type StyleProps = {
|
|
16
|
-
fontSize?: string
|
|
17
|
-
fontFamily?: string
|
|
18
|
-
fontWeight?: string | number
|
|
19
|
-
color?: string
|
|
20
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StoryFn, Meta } from '@storybook/react';
|
|
3
|
-
import ApexPieChart from './ApexPieChart';
|
|
4
|
-
import { ApexPieChartProps } from './ApexPieChartProps';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Components/ApexCharts/ApexPieChart',
|
|
8
|
-
component: ApexPieChart,
|
|
9
|
-
argTypes: {
|
|
10
|
-
backgroundColor: { control: 'color' },
|
|
11
|
-
},
|
|
12
|
-
} as Meta;
|
|
13
|
-
|
|
14
|
-
const Template: StoryFn<ApexPieChartProps> = (args) => <ApexPieChart {...args} />;
|
|
15
|
-
|
|
16
|
-
export const Primary = Template.bind({});
|
|
17
|
-
Primary.args = {
|
|
18
|
-
data: [44, 55, 41, 64, 22, 43, 21],
|
|
19
|
-
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
20
|
-
title: 'Weekly Sales',
|
|
21
|
-
titlePosition: 'left',
|
|
22
|
-
height: 400,
|
|
23
|
-
width: 500,
|
|
24
|
-
chartColor: ['#3182ce', '#ff6384', '#36a2eb', '#cc65fe', '#ffce56', '#ff6384', '#36a2eb'],
|
|
25
|
-
titleStyle: {
|
|
26
|
-
color: '#3182ce',
|
|
27
|
-
fontSize: '16px',
|
|
28
|
-
fontWeight: 600,
|
|
29
|
-
fontFamily: 'Arial',
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// You can add more variations of the component by adding more exports like the Primary example.
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ApexOptions } from "apexcharts";
|
|
3
|
-
import ReactApexChart from "react-apexcharts";
|
|
4
|
-
import { ApexPieChartProps } from "./ApexPieChartProps";
|
|
5
|
-
|
|
6
|
-
export default function ApexPieChart({
|
|
7
|
-
data,
|
|
8
|
-
labels,
|
|
9
|
-
title,
|
|
10
|
-
titlePosition,
|
|
11
|
-
height = 400,
|
|
12
|
-
width = 500,
|
|
13
|
-
chartColor,
|
|
14
|
-
titleStyle = {
|
|
15
|
-
color: "#3182ce",
|
|
16
|
-
},
|
|
17
|
-
}: ApexPieChartProps) {
|
|
18
|
-
const options: ApexOptions = {
|
|
19
|
-
chart: {
|
|
20
|
-
type: "pie",
|
|
21
|
-
height: 350,
|
|
22
|
-
},
|
|
23
|
-
labels: labels,
|
|
24
|
-
title: {
|
|
25
|
-
text: title,
|
|
26
|
-
align: titlePosition,
|
|
27
|
-
style: titleStyle,
|
|
28
|
-
},
|
|
29
|
-
colors: chartColor,
|
|
30
|
-
};
|
|
31
|
-
const series = data;
|
|
32
|
-
return (
|
|
33
|
-
<div>
|
|
34
|
-
<ReactApexChart
|
|
35
|
-
options={options}
|
|
36
|
-
series={series}
|
|
37
|
-
type="pie"
|
|
38
|
-
height={height}
|
|
39
|
-
width={width}
|
|
40
|
-
/>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export type ApexPieChartProps = {
|
|
2
|
-
data: number[];
|
|
3
|
-
labels: string[];
|
|
4
|
-
title?: string;
|
|
5
|
-
titlePosition?: 'left' | 'center' | 'right';
|
|
6
|
-
height?: number;
|
|
7
|
-
width?: number;
|
|
8
|
-
chartColor?: string[];
|
|
9
|
-
titleStyle?: StyleProps;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type StyleProps = {
|
|
13
|
-
fontSize?: string
|
|
14
|
-
fontFamily?: string
|
|
15
|
-
fontWeight?: string | number
|
|
16
|
-
color?: string
|
|
17
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StoryFn, Meta } from '@storybook/react/types-6-0';
|
|
3
|
-
import Breadcrumbs from './Breadcrumbs';
|
|
4
|
-
import { BreadcrumbsProps } from './BreadcrumbsProps';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Components/Breadcrumbs/Breadcrumb',
|
|
8
|
-
component: Breadcrumbs,
|
|
9
|
-
} as Meta;
|
|
10
|
-
|
|
11
|
-
const Template: StoryFn<BreadcrumbsProps> = (args) => <Breadcrumbs {...args} />;
|
|
12
|
-
|
|
13
|
-
export const Default = Template.bind({});
|
|
14
|
-
Default.args = {
|
|
15
|
-
spacing: "8px",
|
|
16
|
-
separator: "/",
|
|
17
|
-
fontWeight: "normal",
|
|
18
|
-
fontSize: "1rem",
|
|
19
|
-
isCurrentPage: true,
|
|
20
|
-
handleClick: (path) => console.log(`Clicked: ${path}`),
|
|
21
|
-
items: [
|
|
22
|
-
{ path: '/home', label: 'Home' },
|
|
23
|
-
{ path: '/about', label: 'About' },
|
|
24
|
-
{ path: '/contact', label: 'Contact' },
|
|
25
|
-
],
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, ChakraProvider } from "@chakra-ui/react";
|
|
3
|
-
import { BreadcrumbsProps } from "./BreadcrumbsProps";
|
|
4
|
-
|
|
5
|
-
export default function Breadcrumbs({ spacing, separator, fontWeight, fontSize, isCurrentPage, handleClick, items }: BreadcrumbsProps) {
|
|
6
|
-
return (
|
|
7
|
-
<ChakraProvider>
|
|
8
|
-
<Breadcrumb spacing={spacing} separator={separator} fontWeight={fontWeight} fontSize={fontSize}>
|
|
9
|
-
{items.map((item, index) => (
|
|
10
|
-
<BreadcrumbItem key={index} isCurrentPage={isCurrentPage && index === items.length - 1}>
|
|
11
|
-
<BreadcrumbLink
|
|
12
|
-
href={item.path}
|
|
13
|
-
sx={{ '&:hover, &:active': { textDecoration: 'none' } }}
|
|
14
|
-
onClick={(event) => {
|
|
15
|
-
event.preventDefault();
|
|
16
|
-
handleClick(item.path);
|
|
17
|
-
}}
|
|
18
|
-
>
|
|
19
|
-
{item.label}
|
|
20
|
-
</BreadcrumbLink>
|
|
21
|
-
</BreadcrumbItem>
|
|
22
|
-
))}
|
|
23
|
-
</Breadcrumb>
|
|
24
|
-
</ChakraProvider>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BreadcrumbProps } from "@chakra-ui/react";
|
|
2
|
-
|
|
3
|
-
export type BreadcrumbsProps = Pick<BreadcrumbProps, "spacing" | "separator" | "fontWeight" | "fontSize"> & {
|
|
4
|
-
isCurrentPage?: boolean;
|
|
5
|
-
isLastChild?: boolean;
|
|
6
|
-
handleClick: (path: string) => void;
|
|
7
|
-
items: BreadcrumbItem[];
|
|
8
|
-
};
|
|
9
|
-
export type BreadcrumbItem = {
|
|
10
|
-
path: string;
|
|
11
|
-
label: string;
|
|
12
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import Button from './Button';
|
|
4
|
-
import { fn } from '@storybook/test';
|
|
5
|
-
|
|
6
|
-
const meta: Meta<typeof Button> = {
|
|
7
|
-
title: 'Components/Button/Button',
|
|
8
|
-
component: Button,
|
|
9
|
-
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: 'centered',
|
|
12
|
-
},
|
|
13
|
-
tags: ['autodocs']
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default meta;
|
|
17
|
-
type Story = StoryObj<typeof meta>;
|
|
18
|
-
|
|
19
|
-
export const Primary: Story = {
|
|
20
|
-
args: {
|
|
21
|
-
label: 'Button',
|
|
22
|
-
width: '',
|
|
23
|
-
color: 'blue',
|
|
24
|
-
variant: 'solid',
|
|
25
|
-
size: 'md',
|
|
26
|
-
isDisabled: false,
|
|
27
|
-
isLoading: false,
|
|
28
|
-
loadingText: 'Loading',
|
|
29
|
-
type: 'button',
|
|
30
|
-
onClick: fn()
|
|
31
|
-
},
|
|
32
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button as ChakraButton, ChakraProvider, } from '@chakra-ui/react';
|
|
3
|
-
import { ButtonProps } from './ButtonProps';
|
|
4
|
-
|
|
5
|
-
export default function Button({
|
|
6
|
-
label,
|
|
7
|
-
width = "120px",
|
|
8
|
-
onClick,
|
|
9
|
-
color,
|
|
10
|
-
variant,
|
|
11
|
-
leftIcon,
|
|
12
|
-
rightIcon,
|
|
13
|
-
size,
|
|
14
|
-
isDisabled = false,
|
|
15
|
-
isLoading = false,
|
|
16
|
-
loadingText = "Loading",
|
|
17
|
-
type
|
|
18
|
-
}: ButtonProps) {
|
|
19
|
-
return (
|
|
20
|
-
<ChakraProvider>
|
|
21
|
-
<ChakraButton type={type} onClick={onClick} width={width} colorScheme={color} variant={variant} size={size} isLoading={isLoading} isDisabled={isDisabled} loadingText={loadingText} leftIcon={leftIcon} rightIcon={rightIcon} >
|
|
22
|
-
{label}
|
|
23
|
-
</ChakraButton>
|
|
24
|
-
</ChakraProvider>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ButtonProps as ChakraButtonProps } from "@chakra-ui/react";
|
|
2
|
-
|
|
3
|
-
export type ButtonProps = Pick<ChakraButtonProps, "onClick" | "leftIcon" | "rightIcon" | "isDisabled" | "isLoading" | "loadingText" | "colorScheme" | "spinner"> & {
|
|
4
|
-
label?: string,
|
|
5
|
-
width?: string | number,
|
|
6
|
-
size?: "lg" | "md" | "sm" | "xs",
|
|
7
|
-
variant?: "solid" | "outline" | "ghost" | "link" | "unstyled",
|
|
8
|
-
color?: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "whiteAlpha" | "blackAlpha",
|
|
9
|
-
type?: "button" | "submit" | "reset",
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
|
|
3
|
-
export type ButtonGroupIconProps = {
|
|
4
|
-
leftIcon?: ReactElement,
|
|
5
|
-
rightIcon?: ReactElement,
|
|
6
|
-
onLeftIconClick?: () => void;
|
|
7
|
-
onRightIconClick?: () => void;
|
|
8
|
-
buttonText: string,
|
|
9
|
-
onButtonClick?: () => void,
|
|
10
|
-
onButtongroupClick?: () => void,
|
|
11
|
-
size?: "lg" | "md" | "sm" | "xs",
|
|
12
|
-
variant?: "solid" | "outline" | "ghost" | "link" | "unstyled",
|
|
13
|
-
color?: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "whiteAlpha" | "blackAlpha",
|
|
14
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Meta, StoryFn } from '@storybook/react';
|
|
3
|
-
import ButtonGroupIcon from './ButtonGroupIcon'; // Adjust the import path and component type if needed
|
|
4
|
-
import {ButtonGroupIconProps} from './ButtonGoupIconProps';
|
|
5
|
-
import { FiHome } from 'react-icons/fi';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Components/ButtonGroupIcon/ButtonGroupIcon',
|
|
9
|
-
component: ButtonGroupIcon,
|
|
10
|
-
argTypes: {
|
|
11
|
-
size: { control: { type: 'select', options: ['sm', 'md', 'lg'] } },
|
|
12
|
-
variant: {
|
|
13
|
-
control: { type: 'select', options: ["solid","outline","ghost","link"] },
|
|
14
|
-
defaultValue: 'solid'
|
|
15
|
-
},
|
|
16
|
-
color: {
|
|
17
|
-
control: { type: 'select', options: ["gray" ,"red" ,"orange" ,"yellow" ,"green" ,"teal" ,"blue" ,"cyan" ,"purple" ,"pink" ,"whiteAlpha" ,"blackAlpha"] },
|
|
18
|
-
defaultValue: 'blue'
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
} as Meta;
|
|
22
|
-
|
|
23
|
-
const Template: StoryFn<ButtonGroupIconProps> = (args) => <ButtonGroupIcon {...args} />;
|
|
24
|
-
|
|
25
|
-
export const Default = Template.bind({});
|
|
26
|
-
Default.args = {
|
|
27
|
-
leftIcon: <FiHome/>,
|
|
28
|
-
rightIcon: <FiHome />,
|
|
29
|
-
onLeftIconClick: () => console.log('Left icon clicked'),
|
|
30
|
-
onRightIconClick: () => console.log('Right icon clicked'),
|
|
31
|
-
buttonText: 'Button Text',
|
|
32
|
-
onButtonClick: () => console.log('Button clicked'),
|
|
33
|
-
onButtongroupClick: () => console.log('Button group clicked'),
|
|
34
|
-
size: 'md',
|
|
35
|
-
variant: 'solid',
|
|
36
|
-
color: 'blue',
|
|
37
|
-
};
|