pixelize-design-library 1.0.30 → 1.0.32
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/README.md +5 -1
- package/dist/.dev-server.zip +0 -0
- package/dist/@mf-types.d.ts +3 -0
- package/dist/@mf-types.zip +0 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.stories.d.ts +1 -4
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.stories.js +4 -48
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.stories.d.ts +1 -4
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.stories.js +4 -42
- package/dist/Components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -4
- package/dist/Components/Breadcrumbs/Breadcrumbs.stories.js +4 -36
- package/dist/Components/Button/Button.stories.d.ts +1 -6
- package/dist/Components/Button/Button.stories.js +4 -29
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.stories.d.ts +1 -4
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.stories.js +5 -47
- package/dist/Components/Card/Card.d.ts +3 -0
- package/dist/Components/Card/Card.js +12 -0
- package/dist/Components/Card/CardProps.d.ts +14 -0
- package/dist/Components/Card/CardProps.js +2 -0
- package/dist/Components/Checkbox/Checkbox.stories.d.ts +1 -6
- package/dist/Components/Checkbox/Checkbox.stories.js +5 -75
- package/dist/Components/Dropdown/DropDown.d.ts +4 -0
- package/dist/Components/Dropdown/DropDown.js +73 -0
- package/dist/Components/Dropdown/DropdownProps.d.ts +12 -0
- package/dist/Components/Dropdown/DropdownProps.js +2 -0
- package/dist/Components/Input/TextInput.d.ts +1 -3
- package/dist/Components/Input/TextInput.js +2 -1
- package/dist/Components/Input/TextInput.stories.d.ts +1 -6
- package/dist/Components/Input/TextInput.stories.js +6 -53
- package/dist/Components/InputTextArea/InputTextArea.stories.d.ts +1 -6
- package/dist/Components/InputTextArea/InputTextArea.stories.js +5 -56
- package/dist/Components/Loading/Loading.stories.d.ts +1 -4
- package/dist/Components/Loading/Loading.stories.js +5 -55
- package/dist/Components/Modal/Modal.stories.d.ts +1 -8
- package/dist/Components/Modal/Modal.stories.js +5 -128
- package/dist/Components/NavigationBar/NavBar.stories.d.ts +1 -4
- package/dist/Components/NavigationBar/NavBar.stories.js +1 -35
- package/dist/Components/NoteTextArea/NoteTextArea.d.ts +3 -0
- package/dist/Components/NoteTextArea/NoteTextArea.js +189 -0
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +4 -0
- package/dist/Components/NoteTextArea/NoteTextAreaProps.js +2 -0
- package/dist/Components/NumberInput/NumberInput.stories.d.ts +1 -3
- package/dist/Components/NumberInput/NumberInput.stories.js +3 -42
- package/dist/Components/PinInput/PinInput.stories.d.ts +1 -6
- package/dist/Components/PinInput/PinInput.stories.js +4 -42
- package/dist/Components/ProfileCard/ProfileCard.stories.d.ts +1 -4
- package/dist/Components/ProfileCard/ProfileCard.stories.js +4 -40
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +1 -1
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +9 -4
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.d.ts +1 -4
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.js +4 -35
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.d.ts +1 -0
- package/dist/Components/ProgressBar/ProgressBar.stories.d.ts +1 -4
- package/dist/Components/ProgressBar/ProgressBar.stories.js +5 -53
- package/dist/Components/RadioButton/RadioButton.stories.d.ts +1 -14
- package/dist/Components/RadioButton/RadioButton.stories.js +5 -73
- package/dist/Components/Select/Select.stories.d.ts +1 -6
- package/dist/Components/Select/Select.stories.js +6 -61
- package/dist/Components/SideBar/Sidebar.stories.d.ts +1 -4
- package/dist/Components/SideBar/Sidebar.stories.js +6 -108
- package/dist/Components/Skeletons/Skeleton.stories.d.ts +1 -6
- package/dist/Components/Skeletons/Skeleton.stories.js +5 -68
- package/dist/Components/Switch/Switch.d.ts +3 -0
- package/dist/Components/Switch/Switch.js +37 -0
- package/dist/Components/Switch/SwitchProps.d.ts +9 -0
- package/dist/Components/Switch/SwitchProps.js +2 -0
- package/dist/Components/Table/Table.stories.d.ts +1 -4
- package/dist/Components/Table/Table.stories.js +7 -54
- package/dist/Components/Toaster/Toaster.d.ts +2 -2
- package/dist/Components/Toaster/Toaster.js +4 -3
- package/dist/Components/Toaster/Toaster.stories.d.ts +1 -8
- package/dist/Components/Toaster/Toaster.stories.js +6 -67
- package/dist/Components/ToolTip/ToolTip.stories.d.ts +1 -5
- package/dist/Components/ToolTip/ToolTip.stories.js +5 -41
- package/dist/Layout.js +63 -32
- package/dist/index.d.ts +5 -2
- package/dist/index.js +9 -3
- package/package.json +3 -25
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@ PixelizeDesign Library Components Are Below
|
|
|
29
29
|
- Breadcrumbs,
|
|
30
30
|
- Button,
|
|
31
31
|
- Checkbox,
|
|
32
|
+
- Card,
|
|
32
33
|
- ButtonGroupIcon,
|
|
33
34
|
- TextInput,
|
|
34
35
|
- InputTextArea,
|
|
@@ -47,5 +48,8 @@ PixelizeDesign Library Components Are Below
|
|
|
47
48
|
- Skeletons,
|
|
48
49
|
- Table,
|
|
49
50
|
- Toaster,
|
|
50
|
-
-
|
|
51
|
+
- useToaster,
|
|
51
52
|
- ToolTip,
|
|
53
|
+
- Switch,
|
|
54
|
+
- NoteTextArea,
|
|
55
|
+
- Dropdown,
|
|
Binary file
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
|
|
2
|
+
export type RemoteKeys = 'REMOTE_ALIAS_IDENTIFIER/Version' | 'REMOTE_ALIAS_IDENTIFIER/TextInput' | 'REMOTE_ALIAS_IDENTIFIER/InputTextArea' | 'REMOTE_ALIAS_IDENTIFIER/Select' | 'REMOTE_ALIAS_IDENTIFIER/Checkbox' | 'REMOTE_ALIAS_IDENTIFIER/Button' | 'REMOTE_ALIAS_IDENTIFIER/Toaster' | 'REMOTE_ALIAS_IDENTIFIER/Modal' | 'REMOTE_ALIAS_IDENTIFIER/theme' | 'REMOTE_ALIAS_IDENTIFIER/Sidebar' | 'REMOTE_ALIAS_IDENTIFIER/Navbar' | 'REMOTE_ALIAS_IDENTIFIER/Loading' | 'REMOTE_ALIAS_IDENTIFIER/Skeletons' | 'REMOTE_ALIAS_IDENTIFIER/RadioButton' | 'REMOTE_ALIAS_IDENTIFIER/ButtonGroupIcon' | 'REMOTE_ALIAS_IDENTIFIER/ProgressBar' | 'REMOTE_ALIAS_IDENTIFIER/NumberInput' | 'REMOTE_ALIAS_IDENTIFIER/PinInput' | 'REMOTE_ALIAS_IDENTIFIER/ProfileCard' | 'REMOTE_ALIAS_IDENTIFIER/Breadcrumb' | 'REMOTE_ALIAS_IDENTIFIER/TableComponent' | 'REMOTE_ALIAS_IDENTIFIER/Tooltip' | 'REMOTE_ALIAS_IDENTIFIER/ApexBarChart' | 'REMOTE_ALIAS_IDENTIFIER/ApexPieChart' | 'REMOTE_ALIAS_IDENTIFIER/ProfilePhotoViewer';
|
|
3
|
+
type PackageType<T> = T extends 'REMOTE_ALIAS_IDENTIFIER/ProfilePhotoViewer' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ProfilePhotoViewer') :T extends 'REMOTE_ALIAS_IDENTIFIER/ApexPieChart' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ApexPieChart') :T extends 'REMOTE_ALIAS_IDENTIFIER/ApexBarChart' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ApexBarChart') :T extends 'REMOTE_ALIAS_IDENTIFIER/Tooltip' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Tooltip') :T extends 'REMOTE_ALIAS_IDENTIFIER/TableComponent' ? typeof import('REMOTE_ALIAS_IDENTIFIER/TableComponent') :T extends 'REMOTE_ALIAS_IDENTIFIER/Breadcrumb' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Breadcrumb') :T extends 'REMOTE_ALIAS_IDENTIFIER/ProfileCard' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ProfileCard') :T extends 'REMOTE_ALIAS_IDENTIFIER/PinInput' ? typeof import('REMOTE_ALIAS_IDENTIFIER/PinInput') :T extends 'REMOTE_ALIAS_IDENTIFIER/NumberInput' ? typeof import('REMOTE_ALIAS_IDENTIFIER/NumberInput') :T extends 'REMOTE_ALIAS_IDENTIFIER/ProgressBar' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ProgressBar') :T extends 'REMOTE_ALIAS_IDENTIFIER/ButtonGroupIcon' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ButtonGroupIcon') :T extends 'REMOTE_ALIAS_IDENTIFIER/RadioButton' ? typeof import('REMOTE_ALIAS_IDENTIFIER/RadioButton') :T extends 'REMOTE_ALIAS_IDENTIFIER/Skeletons' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Skeletons') :T extends 'REMOTE_ALIAS_IDENTIFIER/Loading' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Loading') :T extends 'REMOTE_ALIAS_IDENTIFIER/Navbar' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Navbar') :T extends 'REMOTE_ALIAS_IDENTIFIER/Sidebar' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Sidebar') :T extends 'REMOTE_ALIAS_IDENTIFIER/theme' ? typeof import('REMOTE_ALIAS_IDENTIFIER/theme') :T extends 'REMOTE_ALIAS_IDENTIFIER/Modal' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Modal') :T extends 'REMOTE_ALIAS_IDENTIFIER/Toaster' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Toaster') :T extends 'REMOTE_ALIAS_IDENTIFIER/Button' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Button') :T extends 'REMOTE_ALIAS_IDENTIFIER/Checkbox' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Checkbox') :T extends 'REMOTE_ALIAS_IDENTIFIER/Select' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Select') :T extends 'REMOTE_ALIAS_IDENTIFIER/InputTextArea' ? typeof import('REMOTE_ALIAS_IDENTIFIER/InputTextArea') :T extends 'REMOTE_ALIAS_IDENTIFIER/TextInput' ? typeof import('REMOTE_ALIAS_IDENTIFIER/TextInput') :T extends 'REMOTE_ALIAS_IDENTIFIER/Version' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Version') :any;
|
|
Binary file
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/dist/types-a5624094").R, import("@storybook/csf").Args>;
|
|
3
|
-
export default _default;
|
|
4
|
-
export declare const Primary: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-a5624094").R, ApexBarChartProps>;
|
|
1
|
+
export {};
|
|
@@ -1,50 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
2
|
+
// import React from 'react';
|
|
3
|
+
// import { StoryFn, Meta } from '@storybook/react';
|
|
4
|
+
// import ApexBarChart from './ApexBarChart';
|
|
5
|
+
// import { ApexBarChartProps } from './ApexBarChartProps';
|
|
16
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Primary = void 0;
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var ApexBarChart_1 = __importDefault(require("./ApexBarChart"));
|
|
20
|
-
exports.default = {
|
|
21
|
-
title: 'Components/ApexCharts/ApexBarChart',
|
|
22
|
-
component: ApexBarChart_1.default,
|
|
23
|
-
argTypes: {
|
|
24
|
-
backgroundColor: { control: 'color' },
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
var Template = function (args) { return react_1.default.createElement(ApexBarChart_1.default, __assign({}, args)); };
|
|
28
|
-
exports.Primary = Template.bind({});
|
|
29
|
-
exports.Primary.args = {
|
|
30
|
-
data: [44, 55, 41, 64, 22, 43, 21],
|
|
31
|
-
Labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
32
|
-
title: 'Weekly Sales',
|
|
33
|
-
titlePosition: 'left',
|
|
34
|
-
height: 400,
|
|
35
|
-
width: 500,
|
|
36
|
-
barColor: ['#3182ce'],
|
|
37
|
-
xAxisStyle: {
|
|
38
|
-
color: '#ffffff',
|
|
39
|
-
},
|
|
40
|
-
yAxisStyle: {
|
|
41
|
-
color: '#ffffff',
|
|
42
|
-
},
|
|
43
|
-
titleStyle: {
|
|
44
|
-
color: '#3182ce',
|
|
45
|
-
fontSize: '16px',
|
|
46
|
-
fontWeight: 600,
|
|
47
|
-
fontFamily: 'Arial',
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
// You can add more variations of the component by adding more exports like the Primary example.
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/dist/types-a5624094").R, import("@storybook/csf").Args>;
|
|
3
|
-
export default _default;
|
|
4
|
-
export declare const Primary: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-a5624094").R, ApexPieChartProps>;
|
|
1
|
+
export {};
|
|
@@ -1,44 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
2
|
+
// import React from 'react';
|
|
3
|
+
// import { StoryFn, Meta } from '@storybook/react';
|
|
4
|
+
// import ApexPieChart from './ApexPieChart';
|
|
5
|
+
// import { ApexPieChartProps } from './ApexPieChartProps';
|
|
16
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Primary = void 0;
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var ApexPieChart_1 = __importDefault(require("./ApexPieChart"));
|
|
20
|
-
exports.default = {
|
|
21
|
-
title: 'Components/ApexCharts/ApexPieChart',
|
|
22
|
-
component: ApexPieChart_1.default,
|
|
23
|
-
argTypes: {
|
|
24
|
-
backgroundColor: { control: 'color' },
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
var Template = function (args) { return react_1.default.createElement(ApexPieChart_1.default, __assign({}, args)); };
|
|
28
|
-
exports.Primary = Template.bind({});
|
|
29
|
-
exports.Primary.args = {
|
|
30
|
-
data: [44, 55, 41, 64, 22, 43, 21],
|
|
31
|
-
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
32
|
-
title: 'Weekly Sales',
|
|
33
|
-
titlePosition: 'left',
|
|
34
|
-
height: 400,
|
|
35
|
-
width: 500,
|
|
36
|
-
chartColor: ['#3182ce', '#ff6384', '#36a2eb', '#cc65fe', '#ffce56', '#ff6384', '#36a2eb'],
|
|
37
|
-
titleStyle: {
|
|
38
|
-
color: '#3182ce',
|
|
39
|
-
fontSize: '16px',
|
|
40
|
-
fontWeight: 600,
|
|
41
|
-
fontFamily: 'Arial',
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
// You can add more variations of the component by adding more exports like the Primary example.
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/dist/types-a5624094").R, import("@storybook/csf").Args>;
|
|
3
|
-
export default _default;
|
|
4
|
-
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-a5624094").R, BreadcrumbsProps>;
|
|
1
|
+
export {};
|
|
@@ -1,38 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
2
|
+
// import React from 'react';
|
|
3
|
+
// import { StoryFn, Meta } from '@storybook/react/types-6-0';
|
|
4
|
+
// import Breadcrumbs from './Breadcrumbs';
|
|
5
|
+
// import { BreadcrumbsProps } from './BreadcrumbsProps';
|
|
16
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Default = void 0;
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var Breadcrumbs_1 = __importDefault(require("./Breadcrumbs"));
|
|
20
|
-
exports.default = {
|
|
21
|
-
title: 'Components/Breadcrumbs/Breadcrumb',
|
|
22
|
-
component: Breadcrumbs_1.default,
|
|
23
|
-
};
|
|
24
|
-
var Template = function (args) { return react_1.default.createElement(Breadcrumbs_1.default, __assign({}, args)); };
|
|
25
|
-
exports.Default = Template.bind({});
|
|
26
|
-
exports.Default.args = {
|
|
27
|
-
spacing: "8px",
|
|
28
|
-
separator: "/",
|
|
29
|
-
fontWeight: "normal",
|
|
30
|
-
fontSize: "1rem",
|
|
31
|
-
isCurrentPage: true,
|
|
32
|
-
handleClick: function (path) { return console.log("Clicked: ".concat(path)); },
|
|
33
|
-
items: [
|
|
34
|
-
{ path: '/home', label: 'Home' },
|
|
35
|
-
{ path: '/about', label: 'About' },
|
|
36
|
-
{ path: '/contact', label: 'Contact' },
|
|
37
|
-
],
|
|
38
|
-
};
|
|
@@ -1,31 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
// import React from 'react';
|
|
3
|
+
// import { Meta, StoryObj } from '@storybook/react';
|
|
4
|
+
// import Button from './Button';
|
|
5
|
+
// import { fn } from '@storybook/test';
|
|
5
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Primary = void 0;
|
|
7
|
-
var Button_1 = __importDefault(require("./Button"));
|
|
8
|
-
var test_1 = require("@storybook/test");
|
|
9
|
-
var meta = {
|
|
10
|
-
title: 'Components/Button/Button',
|
|
11
|
-
component: Button_1.default,
|
|
12
|
-
parameters: {
|
|
13
|
-
layout: 'centered',
|
|
14
|
-
},
|
|
15
|
-
tags: ['autodocs']
|
|
16
|
-
};
|
|
17
|
-
exports.default = meta;
|
|
18
|
-
exports.Primary = {
|
|
19
|
-
args: {
|
|
20
|
-
label: 'Button',
|
|
21
|
-
width: '',
|
|
22
|
-
color: 'blue',
|
|
23
|
-
variant: 'solid',
|
|
24
|
-
size: 'md',
|
|
25
|
-
isDisabled: false,
|
|
26
|
-
isLoading: false,
|
|
27
|
-
loadingText: 'Loading',
|
|
28
|
-
type: 'button',
|
|
29
|
-
onClick: (0, test_1.fn)()
|
|
30
|
-
},
|
|
31
|
-
};
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/dist/types-a5624094").R, import("@storybook/csf").Args>;
|
|
3
|
-
export default _default;
|
|
4
|
-
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-a5624094").R, ButtonGroupIconProps>;
|
|
1
|
+
export {};
|
|
@@ -1,49 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
2
|
+
// import React from 'react';
|
|
3
|
+
// import { Meta, StoryFn } from '@storybook/react';
|
|
4
|
+
// import ButtonGroupIcon from './ButtonGroupIcon'; // Adjust the import path and component type if needed
|
|
5
|
+
// import {ButtonGroupIconProps} from './ButtonGoupIconProps';
|
|
6
|
+
// import { FiHome } from 'react-icons/fi';
|
|
16
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Default = void 0;
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var ButtonGroupIcon_1 = __importDefault(require("./ButtonGroupIcon")); // Adjust the import path and component type if needed
|
|
20
|
-
var fi_1 = require("react-icons/fi");
|
|
21
|
-
exports.default = {
|
|
22
|
-
title: 'Components/ButtonGroupIcon/ButtonGroupIcon',
|
|
23
|
-
component: ButtonGroupIcon_1.default,
|
|
24
|
-
argTypes: {
|
|
25
|
-
size: { control: { type: 'select', options: ['sm', 'md', 'lg'] } },
|
|
26
|
-
variant: {
|
|
27
|
-
control: { type: 'select', options: ["solid", "outline", "ghost", "link"] },
|
|
28
|
-
defaultValue: 'solid'
|
|
29
|
-
},
|
|
30
|
-
color: {
|
|
31
|
-
control: { type: 'select', options: ["gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink", "whiteAlpha", "blackAlpha"] },
|
|
32
|
-
defaultValue: 'blue'
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
var Template = function (args) { return react_1.default.createElement(ButtonGroupIcon_1.default, __assign({}, args)); };
|
|
37
|
-
exports.Default = Template.bind({});
|
|
38
|
-
exports.Default.args = {
|
|
39
|
-
leftIcon: react_1.default.createElement(fi_1.FiHome, null),
|
|
40
|
-
rightIcon: react_1.default.createElement(fi_1.FiHome, null),
|
|
41
|
-
onLeftIconClick: function () { return console.log('Left icon clicked'); },
|
|
42
|
-
onRightIconClick: function () { return console.log('Right icon clicked'); },
|
|
43
|
-
buttonText: 'Button Text',
|
|
44
|
-
onButtonClick: function () { return console.log('Button clicked'); },
|
|
45
|
-
onButtongroupClick: function () { return console.log('Button group clicked'); },
|
|
46
|
-
size: 'md',
|
|
47
|
-
variant: 'solid',
|
|
48
|
-
color: 'blue',
|
|
49
|
-
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_2 = require("@chakra-ui/react");
|
|
8
|
+
function Card(_a) {
|
|
9
|
+
var key = _a.key, maxW = _a.maxW, align = _a.align, variant = _a.variant, direction = _a.direction, justify = _a.justify, children = _a.children, size = _a.size, color = _a.color, overflow = _a.overflow;
|
|
10
|
+
return (react_1.default.createElement(react_2.Card, { key: key, maxW: maxW, align: align, variant: variant, direction: direction, justify: justify, size: size, overflow: overflow, colorScheme: color, mr: 10 }, children));
|
|
11
|
+
}
|
|
12
|
+
exports.default = Card;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CardProps as ChakraCardProps } from "@chakra-ui/react";
|
|
3
|
+
export type CardProps = Pick<ChakraCardProps, "direction" | "maxW" | "align" | "justify" | "overflow"> & {
|
|
4
|
+
header?: React.ReactNode;
|
|
5
|
+
footer?: React.ReactNode;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
variant?: "elevated" | "outlein" | "filled" | "unstyled";
|
|
8
|
+
size?: "sm" | "md" | "lg";
|
|
9
|
+
color?: "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink";
|
|
10
|
+
key?: string;
|
|
11
|
+
dividercolor?: "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink";
|
|
12
|
+
dividersize?: string;
|
|
13
|
+
dividervariant?: "solid" | "dashed";
|
|
14
|
+
};
|
|
@@ -1,77 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
2
|
+
// import React, { useState } from 'react';
|
|
3
|
+
// import { Meta, StoryObj } from '@storybook/react';
|
|
4
|
+
// import CheckBox from './Checkbox';
|
|
5
|
+
// import { fn } from '@storybook/test';
|
|
6
|
+
// import { CheckboxProps } from './CheckboxProps';
|
|
39
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.Check_box = void 0;
|
|
41
|
-
var react_1 = __importStar(require("react"));
|
|
42
|
-
var Checkbox_1 = __importDefault(require("./Checkbox"));
|
|
43
|
-
var test_1 = require("@storybook/test");
|
|
44
|
-
var meta = {
|
|
45
|
-
title: 'Components/CheckBox/CheckBox',
|
|
46
|
-
component: Checkbox_1.default,
|
|
47
|
-
parameters: {
|
|
48
|
-
layout: 'centered',
|
|
49
|
-
},
|
|
50
|
-
tags: ['autodocs']
|
|
51
|
-
};
|
|
52
|
-
exports.default = meta;
|
|
53
|
-
var CheckBoxTemplate = function (args) {
|
|
54
|
-
var _a = (0, react_1.useState)(true), check = _a[0], setCheck = _a[1];
|
|
55
|
-
var handleCheck = function (e) {
|
|
56
|
-
setCheck(!check);
|
|
57
|
-
};
|
|
58
|
-
return react_1.default.createElement(Checkbox_1.default, __assign({}, args, { onChange: handleCheck, isChecked: check }));
|
|
59
|
-
};
|
|
60
|
-
exports.Check_box = {
|
|
61
|
-
args: {
|
|
62
|
-
label: 'Checkbox',
|
|
63
|
-
spacing: 6,
|
|
64
|
-
isInvalid: false,
|
|
65
|
-
color: 'blue',
|
|
66
|
-
iconColor: 'white',
|
|
67
|
-
iconSize: '1em',
|
|
68
|
-
isChecked: true,
|
|
69
|
-
isIndeterminate: false,
|
|
70
|
-
isDisabled: false,
|
|
71
|
-
size: 'md',
|
|
72
|
-
value: 'checkbox',
|
|
73
|
-
defaultChecked: false,
|
|
74
|
-
onChange: (0, test_1.fn)()
|
|
75
|
-
},
|
|
76
|
-
render: function (args) { return CheckBoxTemplate(args); }
|
|
77
|
-
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
var react_1 = __importStar(require("react"));
|
|
34
|
+
var react_2 = require("react");
|
|
35
|
+
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
36
|
+
var fi_1 = require("react-icons/fi");
|
|
37
|
+
var DropdownContainer = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: inline-block;\n"], ["\n position: relative;\n display: inline-block;\n"])));
|
|
38
|
+
var DropdownButton = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #d5eaff;\n color: #338cf0;\n padding: 0.3rem 1rem;\n border: none;\n cursor: pointer;\n border: 1px solid #56a4ee;\n width: 100%;\n &:hover {\n background-color: #c9dff8;\n }\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #d5eaff;\n color: #338cf0;\n padding: 0.3rem 1rem;\n border: none;\n cursor: pointer;\n border: 1px solid #56a4ee;\n width: 100%;\n &:hover {\n background-color: #c9dff8;\n }\n"])));
|
|
39
|
+
var DropdownContent = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: none;\n position: absolute;\n background-color: #f9f9f9;\n min-width: 160px;\n width: fit-content;\n box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);\n z-index: 1;\n &.show {\n display: block;\n }\n"], ["\n display: none;\n position: absolute;\n background-color: #f9f9f9;\n min-width: 160px;\n width: fit-content;\n box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);\n z-index: 1;\n &.show {\n display: block;\n }\n"])));
|
|
40
|
+
var ListItem = styled_1.default.li(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: black;\n padding: 5px 10px;\n text-decoration: none;\n display: block;\n display: flex;\n justify-content: center;\n cursor: pointer;\n align-items: center;\n &:hover {\n background-color: #f1f1f1;\n }\n"], ["\n color: black;\n padding: 5px 10px;\n text-decoration: none;\n display: block;\n display: flex;\n justify-content: center;\n cursor: pointer;\n align-items: center;\n &:hover {\n background-color: #f1f1f1;\n }\n"])));
|
|
41
|
+
var ImageContainer = styled_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: 0.5rem;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: 0.5rem;\n"])));
|
|
42
|
+
var Dropdown = function (_a) {
|
|
43
|
+
var ButtonText = _a.ButtonText, options = _a.options, handleOptionSelect = _a.handleOptionSelect;
|
|
44
|
+
var _b = (0, react_2.useState)(false), isVisible = _b[0], setIsVisible = _b[1];
|
|
45
|
+
var toggleDropdown = function () { return setIsVisible(!isVisible); };
|
|
46
|
+
var dropdownRef = (0, react_1.useRef)(null);
|
|
47
|
+
var handleListItemClick = function (optionId) {
|
|
48
|
+
setIsVisible(false);
|
|
49
|
+
handleOptionSelect(optionId);
|
|
50
|
+
};
|
|
51
|
+
(0, react_1.useEffect)(function () {
|
|
52
|
+
var handleClickOutside = function (event) {
|
|
53
|
+
if (dropdownRef.current &&
|
|
54
|
+
!dropdownRef.current.contains(event.target)) {
|
|
55
|
+
setIsVisible(false); // Step 4
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
59
|
+
return function () {
|
|
60
|
+
document.removeEventListener("mousedown", handleClickOutside); // Step 5
|
|
61
|
+
};
|
|
62
|
+
}, [dropdownRef]);
|
|
63
|
+
return (react_1.default.createElement(DropdownContainer, { ref: dropdownRef },
|
|
64
|
+
react_1.default.createElement(DropdownButton, { onClick: toggleDropdown },
|
|
65
|
+
ButtonText,
|
|
66
|
+
react_1.default.createElement(ImageContainer, null, isVisible ? react_1.default.createElement(fi_1.FiChevronUp, null) : react_1.default.createElement(fi_1.FiChevronDown, null))),
|
|
67
|
+
react_1.default.createElement(DropdownContent, { className: isVisible ? "show" : "" },
|
|
68
|
+
react_1.default.createElement("ul", null, options.map(function (option) { return (react_1.default.createElement(ListItem, { key: option.id, onClick: function () { return handleListItemClick(option.id); } },
|
|
69
|
+
option.image && (react_1.default.createElement(ImageContainer, { style: { marginRight: "4px", marginLeft: "0px" } }, option.image)),
|
|
70
|
+
option.label)); })))));
|
|
71
|
+
};
|
|
72
|
+
exports.default = Dropdown;
|
|
73
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type DropdownProps = {
|
|
3
|
+
ButtonText: string;
|
|
4
|
+
options: Option[];
|
|
5
|
+
handleOptionSelect: (id: string | number) => void;
|
|
6
|
+
};
|
|
7
|
+
type Option = {
|
|
8
|
+
id: string | number;
|
|
9
|
+
label: string;
|
|
10
|
+
image?: JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { TextInputProps } from "./TextInputProps";
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof TextInput>;
|
|
5
|
-
export default _default;
|
|
3
|
+
export default function TextInput({ label, type, id, name, onChange, onBlur, onFocus, isDisabled, isReadOnly, isRequired, value, placeholder, width, error, errorMessage, helperText, onRightIconclick, inputRightIcon, inputGroupStyle, inputStyle, }: TextInputProps): React.JSX.Element;
|
|
@@ -15,4 +15,5 @@ function TextInput(_a) {
|
|
|
15
15
|
error && react_2.default.createElement(react_1.FormErrorMessage, { pl: 4 }, errorMessage),
|
|
16
16
|
helperText && !error && (react_2.default.createElement(react_1.FormHelperText, { pl: 4 }, helperText))));
|
|
17
17
|
}
|
|
18
|
-
exports.default =
|
|
18
|
+
exports.default = TextInput;
|
|
19
|
+
// export default React.memo(TextInput);
|
|
@@ -1,55 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
2
|
+
// import React from "react";
|
|
3
|
+
// import type { Meta, StoryObj } from "@storybook/react";
|
|
4
|
+
// import { fn } from "@storybook/test";
|
|
5
|
+
// import { TextInputProps } from "./TextInputProps";
|
|
6
|
+
// import TextInput from "./TextInput";
|
|
7
|
+
// import { useState } from "react";
|
|
16
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Primary = void 0;
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var test_1 = require("@storybook/test");
|
|
20
|
-
var TextInput_1 = __importDefault(require("./TextInput"));
|
|
21
|
-
var react_2 = require("react");
|
|
22
|
-
var meta = {
|
|
23
|
-
title: "Components/Input/TextInput",
|
|
24
|
-
component: TextInput_1.default,
|
|
25
|
-
parameters: {
|
|
26
|
-
layout: "centered",
|
|
27
|
-
},
|
|
28
|
-
tags: ["autodocs"],
|
|
29
|
-
};
|
|
30
|
-
exports.default = meta;
|
|
31
|
-
var TextInputTemplate = function (args) {
|
|
32
|
-
var _a = (0, react_2.useState)(""), value = _a[0], setValue = _a[1];
|
|
33
|
-
var handleChange = function (e) {
|
|
34
|
-
setValue(e.target.value);
|
|
35
|
-
};
|
|
36
|
-
return react_1.default.createElement(TextInput_1.default, __assign({}, args, { onChange: handleChange, value: value }));
|
|
37
|
-
};
|
|
38
|
-
exports.Primary = {
|
|
39
|
-
args: {
|
|
40
|
-
label: "Button",
|
|
41
|
-
onChange: (0, test_1.fn)(),
|
|
42
|
-
onBlur: (0, test_1.fn)(),
|
|
43
|
-
onFocus: (0, test_1.fn)(),
|
|
44
|
-
isDisabled: false,
|
|
45
|
-
isReadOnly: false,
|
|
46
|
-
isRequired: false,
|
|
47
|
-
value: "",
|
|
48
|
-
placeholder: "Placeholder",
|
|
49
|
-
width: 500,
|
|
50
|
-
error: true,
|
|
51
|
-
errorMessage: "jhkjhkjh",
|
|
52
|
-
helperText: "",
|
|
53
|
-
},
|
|
54
|
-
render: function (args) { return TextInputTemplate(args); },
|
|
55
|
-
};
|