pixelize-design-library 1.0.13 → 1.0.15

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.
Files changed (88) hide show
  1. package/dist/index.d.ts +3 -2
  2. package/dist/index.js +4 -5
  3. package/package.json +1 -1
  4. package/tsconfig.json +0 -4
  5. package/public/favicon.ico +0 -0
  6. package/public/index.html +0 -43
  7. package/public/logo192.png +0 -0
  8. package/public/logo512.png +0 -0
  9. package/public/manifest.json +0 -25
  10. package/public/robots.txt +0 -3
  11. package/src/App.tsx +0 -10
  12. package/src/Components/Apexcharts/ApexBarChart/ApexBarChart.stories.tsx +0 -39
  13. package/src/Components/Apexcharts/ApexBarChart/ApexBarChart.tsx +0 -80
  14. package/src/Components/Apexcharts/ApexBarChart/ApexBarChartProps.tsx +0 -20
  15. package/src/Components/Apexcharts/ApexPieChart/ApexPieChart.stories.tsx +0 -33
  16. package/src/Components/Apexcharts/ApexPieChart/ApexPieChart.tsx +0 -43
  17. package/src/Components/Apexcharts/ApexPieChart/ApexPieChartProps.tsx +0 -17
  18. package/src/Components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -26
  19. package/src/Components/Breadcrumbs/Breadcrumbs.tsx +0 -26
  20. package/src/Components/Breadcrumbs/BreadcrumbsProps.tsx +0 -12
  21. package/src/Components/Button/Button.stories.tsx +0 -32
  22. package/src/Components/Button/Button.tsx +0 -26
  23. package/src/Components/Button/ButtonProps.tsx +0 -10
  24. package/src/Components/ButtonGroupIcon/ButtonGoupIconProps.tsx +0 -14
  25. package/src/Components/ButtonGroupIcon/ButtonGroupIcon.stories.tsx +0 -37
  26. package/src/Components/ButtonGroupIcon/ButtonGroupIcon.tsx +0 -26
  27. package/src/Components/Checkbox/Checkbox.stories.tsx +0 -45
  28. package/src/Components/Checkbox/Checkbox.tsx +0 -29
  29. package/src/Components/Checkbox/CheckboxProps.tsx +0 -9
  30. package/src/Components/Input/TextInput.stories.tsx +0 -45
  31. package/src/Components/Input/TextInput.tsx +0 -70
  32. package/src/Components/Input/TextInputProps.tsx +0 -27
  33. package/src/Components/InputTextArea/InputTextArea.stories.tsx +0 -49
  34. package/src/Components/InputTextArea/InputTextArea.tsx +0 -36
  35. package/src/Components/InputTextArea/InputTextAreaProps.tsx +0 -11
  36. package/src/Components/Loading/Loading.stories.tsx +0 -25
  37. package/src/Components/Loading/Loading.tsx +0 -38
  38. package/src/Components/Loading/LoadingProps.tsx +0 -1
  39. package/src/Components/Modal/Modal.stories.tsx +0 -106
  40. package/src/Components/Modal/Modal.tsx +0 -45
  41. package/src/Components/Modal/ModalProps.tsx +0 -12
  42. package/src/Components/NavigationBar/NavBar.stories.tsx +0 -26
  43. package/src/Components/NavigationBar/NavigationBar.tsx +0 -56
  44. package/src/Components/NavigationBar/NavigationBarProps.tsx +0 -13
  45. package/src/Components/NumberInput/NumberInput.stories.tsx +0 -31
  46. package/src/Components/NumberInput/NumberInput.tsx +0 -56
  47. package/src/Components/NumberInput/NumberInputProps.tsx +0 -28
  48. package/src/Components/PinInput/PinInput.stories.tsx +0 -40
  49. package/src/Components/PinInput/PinInput.tsx +0 -49
  50. package/src/Components/PinInput/PinInputProps.tsx +0 -33
  51. package/src/Components/ProfileCard/ProfileCard.stories.tsx +0 -30
  52. package/src/Components/ProfileCard/ProfileCard.tsx +0 -59
  53. package/src/Components/ProfileCard/ProfileCardProps.tsx +0 -41
  54. package/src/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.tsx +0 -25
  55. package/src/Components/ProfilePhotoViewer/ProfilePhotoViewer.tsx +0 -69
  56. package/src/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.tsx +0 -14
  57. package/src/Components/ProgressBar/ProgressBar.stories.tsx +0 -46
  58. package/src/Components/ProgressBar/ProgressBar.tsx +0 -33
  59. package/src/Components/ProgressBar/ProgressBarProps.tsx +0 -7
  60. package/src/Components/RadioButton/RadioButton.stories.tsx +0 -46
  61. package/src/Components/RadioButton/RadioButton.tsx +0 -63
  62. package/src/Components/RadioButton/RadioButtonProps.tsx +0 -10
  63. package/src/Components/Select/Select.stories.tsx +0 -57
  64. package/src/Components/Select/Select.tsx +0 -46
  65. package/src/Components/Select/SelectProps.tsx +0 -15
  66. package/src/Components/SideBar/SideBar.tsx +0 -143
  67. package/src/Components/SideBar/SideBarProps.tsx +0 -18
  68. package/src/Components/SideBar/Sidebar.stories.tsx +0 -80
  69. package/src/Components/Skeletons/Skeleton.stories.tsx +0 -63
  70. package/src/Components/Skeletons/SkeletonProps.tsx +0 -23
  71. package/src/Components/Skeletons/Skeletons.tsx +0 -52
  72. package/src/Components/Table/Table.stories.tsx +0 -47
  73. package/src/Components/Table/Table.tsx +0 -517
  74. package/src/Components/Table/TableProps.tsx +0 -36
  75. package/src/Components/Toaster/Toaster.stories.tsx +0 -58
  76. package/src/Components/Toaster/Toaster.tsx +0 -34
  77. package/src/Components/Toaster/ToasterProps.tsx +0 -15
  78. package/src/Components/ToolTip/ToolTip.stories.tsx +0 -39
  79. package/src/Components/ToolTip/ToolTip.tsx +0 -62
  80. package/src/Components/ToolTip/ToolTipProps.tsx +0 -45
  81. package/src/Layout.tsx +0 -499
  82. package/src/Theme/Dark/theme.ts +0 -278
  83. package/src/Theme/Default/theme.ts +0 -301
  84. package/src/Theme/index.ts +0 -4
  85. package/src/bootstrap.tsx +0 -13
  86. package/src/index.ts +0 -29
  87. package/src/index.tsx +0 -22
  88. package/src/types/pixelize-design-library.d.ts +0 -7
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export { default as Loading } from "./Components/Loading/Loading";
2
- export { default as ToolTip } from "./Components/ToolTip/ToolTip";
1
+ import Loading from "./Components/Loading/Loading";
2
+ import ToolTip from "./Components/ToolTip/ToolTip";
3
+ export { Loading, ToolTip };
package/dist/index.js CHANGED
@@ -28,8 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.ToolTip = exports.Loading = void 0;
31
- // import Loading from "./Components/Loading/Loading";
32
- var Loading_1 = require("./Components/Loading/Loading");
33
- Object.defineProperty(exports, "Loading", { enumerable: true, get: function () { return __importDefault(Loading_1).default; } });
34
- var ToolTip_1 = require("./Components/ToolTip/ToolTip");
35
- Object.defineProperty(exports, "ToolTip", { enumerable: true, get: function () { return __importDefault(ToolTip_1).default; } });
31
+ var Loading_1 = __importDefault(require("./Components/Loading/Loading"));
32
+ exports.Loading = Loading_1.default;
33
+ var ToolTip_1 = __importDefault(require("./Components/ToolTip/ToolTip"));
34
+ exports.ToolTip = ToolTip_1.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "private": false,
5
5
  "main": "dist/index.ts",
6
6
  "module": "dist/index.js",
package/tsconfig.json CHANGED
@@ -20,10 +20,6 @@
20
20
  "noEmit": false,
21
21
  "jsx": "react",
22
22
  "outDir": "./dist",
23
- "typeRoots": [
24
- "./node_modules/@types",
25
- "./src/types"
26
- ],
27
23
  "declaration": true,
28
24
  },
29
25
  "include": [
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>
Binary file
Binary file
@@ -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
@@ -1,3 +0,0 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow:
package/src/App.tsx DELETED
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Layout from './Layout';
3
- function App() {
4
- return (
5
- <div className="App">
6
- <Layout />
7
- </div >
8
- );
9
- }
10
- export default App;
@@ -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
- };
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import { Button, ButtonGroup, ChakraProvider, IconButton } from "@chakra-ui/react";
3
- import { ButtonGroupIconProps } from "./ButtonGoupIconProps";
4
-
5
- export default function ButtonGroupIcon({
6
- leftIcon,
7
- rightIcon,
8
- onLeftIconClick,
9
- onRightIconClick,
10
- buttonText,
11
- onButtonClick,
12
- onButtongroupClick,
13
- size,
14
- variant,
15
- color
16
- }: ButtonGroupIconProps) {
17
- return (
18
- <ChakraProvider>
19
- <ButtonGroup size={size} isAttached variant={variant} onClick={onButtongroupClick} colorScheme={color}>
20
- {leftIcon && <IconButton aria-label='Left icon button' icon={leftIcon} onClick={onLeftIconClick} />}
21
- <Button onClick={onButtonClick}>{buttonText}</Button>
22
- {rightIcon && <IconButton aria-label='Right icon button' icon={rightIcon} onClick={onRightIconClick} />}
23
- </ButtonGroup>
24
- </ChakraProvider>
25
- )
26
- }
@@ -1,45 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { Meta, StoryObj } from '@storybook/react';
3
- import CheckBox from './Checkbox';
4
- import { fn } from '@storybook/test';
5
- import { CheckboxProps } from './CheckboxProps';
6
-
7
- const meta: Meta<typeof CheckBox> = {
8
- title: 'Components/CheckBox/CheckBox',
9
- component: CheckBox,
10
-
11
- parameters: {
12
- layout: 'centered',
13
- },
14
- tags: ['autodocs']
15
- };
16
-
17
- export default meta;
18
- type Story = StoryObj<typeof meta>;
19
-
20
- const CheckBoxTemplate = (args: CheckboxProps) => {
21
- const [check, setCheck] = useState(true);
22
- const handleCheck = (e: any) => {
23
- setCheck(!check);
24
- }
25
- return <CheckBox {...args} onChange={handleCheck} isChecked={check} />
26
- }
27
-
28
- export const Check_box: Story = {
29
- args: {
30
- label: 'Checkbox',
31
- spacing: 6,
32
- isInvalid: false,
33
- color: 'blue',
34
- iconColor: 'white',
35
- iconSize: '1em',
36
- isChecked: true,
37
- isIndeterminate: false,
38
- isDisabled: false,
39
- size: 'md',
40
- value: 'checkbox',
41
- defaultChecked: false,
42
- onChange: fn()
43
- },
44
- render: (args) => CheckBoxTemplate(args)
45
- };
@@ -1,29 +0,0 @@
1
- import React, { FC } from 'react';
2
- import { Checkbox as ChakraCheckbox, ChakraProvider, } from '@chakra-ui/react';
3
- import { CheckboxProps } from './CheckboxProps';
4
-
5
- const CheckBox: FC<CheckboxProps> = ({
6
- label,
7
- spacing,
8
- isInvalid,
9
- color,
10
- iconColor,
11
- iconSize,
12
- isChecked,
13
- isIndeterminate,
14
- onChange,
15
- isDisabled,
16
- size,
17
- value,
18
- defaultChecked
19
- }) => {
20
- return (
21
- <ChakraProvider>
22
- <ChakraCheckbox spacing={spacing} isInvalid={isInvalid} colorScheme={color} iconColor={iconColor} iconSize={iconSize} isChecked={isChecked} isIndeterminate={isIndeterminate} onChange={onChange} isDisabled={isDisabled} size={size} value={value} defaultChecked={defaultChecked}>
23
- {label}
24
- </ChakraCheckbox>
25
- </ChakraProvider>
26
- );
27
- }
28
-
29
- export default CheckBox;