pixelize-design-library 1.1.44 → 1.1.47
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/Components/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/Components/AlertDialog/AlertDialog.js +3 -3
- package/dist/Components/AlertDialog/AlertDialogProps.d.ts +2 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.d.ts +1 -1
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.js +2 -2
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChartProps.d.ts +2 -2
- package/dist/Components/ProfileCard/ProfileCard.d.ts +1 -1
- package/dist/Components/ProfileCard/ProfileCard.js +2 -2
- package/dist/Components/ProfileCard/ProfileCardProps.d.ts +1 -0
- package/dist/Components/Switch/Switch.js +3 -3
- package/dist/Pages/chart.js +4 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AlertDialogsProps } from "./AlertDialogProps";
|
|
3
|
-
declare const AlertDialog: ({ isOpen, onClose, leastDestructiveRef, content, title, confirmButtonText, cancelButtonText, isConfirmLoading, onConfirm, headerStyle, bodyStyle, footerStyle, closeButtonStyle, button1Style, button2Style, isCentered, key }: AlertDialogsProps) => React.JSX.Element;
|
|
3
|
+
declare const AlertDialog: ({ isOpen, onClose, leastDestructiveRef, content, title, confirmButtonText, cancelButtonText, isConfirmLoading, onConfirm, headerStyle, bodyStyle, footerStyle, closeButtonStyle, button1Style, button2Style, isCentered, confirmButtonColor, key, }: AlertDialogsProps) => React.JSX.Element;
|
|
4
4
|
export default AlertDialog;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
var react_1 = require("@chakra-ui/react");
|
|
7
7
|
var react_2 = __importDefault(require("react"));
|
|
8
8
|
var AlertDialog = function (_a) {
|
|
9
|
-
var isOpen = _a.isOpen, onClose = _a.onClose, leastDestructiveRef = _a.leastDestructiveRef, content = _a.content, title = _a.title, _b = _a.confirmButtonText, confirmButtonText = _b === void 0 ? "Yes" : _b, _c = _a.cancelButtonText, cancelButtonText = _c === void 0 ? "No" : _c, isConfirmLoading = _a.isConfirmLoading, onConfirm = _a.onConfirm, headerStyle = _a.headerStyle, bodyStyle = _a.bodyStyle, footerStyle = _a.footerStyle, closeButtonStyle = _a.closeButtonStyle, button1Style = _a.button1Style, button2Style = _a.button2Style, isCentered = _a.isCentered, key = _a.key;
|
|
9
|
+
var isOpen = _a.isOpen, onClose = _a.onClose, leastDestructiveRef = _a.leastDestructiveRef, content = _a.content, title = _a.title, _b = _a.confirmButtonText, confirmButtonText = _b === void 0 ? "Yes" : _b, _c = _a.cancelButtonText, cancelButtonText = _c === void 0 ? "No" : _c, isConfirmLoading = _a.isConfirmLoading, onConfirm = _a.onConfirm, headerStyle = _a.headerStyle, bodyStyle = _a.bodyStyle, footerStyle = _a.footerStyle, closeButtonStyle = _a.closeButtonStyle, button1Style = _a.button1Style, button2Style = _a.button2Style, isCentered = _a.isCentered, _d = _a.confirmButtonColor, confirmButtonColor = _d === void 0 ? "red" : _d, key = _a.key;
|
|
10
10
|
return (react_2.default.createElement(react_1.AlertDialog, { motionPreset: "slideInBottom", leastDestructiveRef: leastDestructiveRef, onClose: onClose, isOpen: isOpen, isCentered: isCentered, key: key },
|
|
11
11
|
react_2.default.createElement(react_1.AlertDialogOverlay, null),
|
|
12
12
|
react_2.default.createElement(react_1.AlertDialogContent, null,
|
|
@@ -14,7 +14,7 @@ var AlertDialog = function (_a) {
|
|
|
14
14
|
react_2.default.createElement(react_1.AlertDialogCloseButton, { sx: closeButtonStyle }),
|
|
15
15
|
react_2.default.createElement(react_1.AlertDialogBody, { sx: bodyStyle }, content),
|
|
16
16
|
react_2.default.createElement(react_1.AlertDialogFooter, { sx: footerStyle },
|
|
17
|
-
react_2.default.createElement(react_1.Button, { ref: null, onClick: onClose, sx: button1Style }, cancelButtonText),
|
|
18
|
-
react_2.default.createElement(react_1.Button, { colorScheme:
|
|
17
|
+
react_2.default.createElement(react_1.Button, { ref: null, onClick: onClose, size: "sm", sx: button1Style }, cancelButtonText),
|
|
18
|
+
react_2.default.createElement(react_1.Button, { colorScheme: confirmButtonColor, onClick: onConfirm, isLoading: isConfirmLoading, ml: 3, size: "sm", sx: button2Style }, confirmButtonText)))));
|
|
19
19
|
};
|
|
20
20
|
exports.default = AlertDialog;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AlertDialogProps, AlertProps } from "@chakra-ui/react";
|
|
3
|
+
import { ButtonProps } from "../Button/ButtonProps";
|
|
3
4
|
export type AlertDialogsProps = Pick<AlertDialogProps, "isOpen" | "onClose" | "leastDestructiveRef"> & Pick<AlertProps, "addRole" | "colorScheme" | "size" | "status" | "variant"> & {
|
|
4
5
|
title: string;
|
|
5
6
|
content: string;
|
|
@@ -15,4 +16,5 @@ export type AlertDialogsProps = Pick<AlertDialogProps, "isOpen" | "onClose" | "l
|
|
|
15
16
|
button1Style?: React.CSSProperties;
|
|
16
17
|
button2Style?: React.CSSProperties;
|
|
17
18
|
key?: string | number;
|
|
19
|
+
confirmButtonColor?: ButtonProps["color"];
|
|
18
20
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ApexBarChartProps } from "./ApexBarChartProps";
|
|
3
|
-
export default function ApexBarChart({ data,
|
|
3
|
+
export default function ApexBarChart({ data, labels, title, titlePosition, height, width, barColor, xAxisStyle, yAxisStyle, titleStyle, }: ApexBarChartProps): React.JSX.Element;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
var react_1 = __importDefault(require("react"));
|
|
7
7
|
var react_apexcharts_1 = __importDefault(require("react-apexcharts"));
|
|
8
8
|
function ApexBarChart(_a) {
|
|
9
|
-
var data = _a.data,
|
|
9
|
+
var data = _a.data, labels = _a.labels, title = _a.title, titlePosition = _a.titlePosition, _b = _a.height, height = _b === void 0 ? 400 : _b, _c = _a.width, width = _c === void 0 ? 500 : _c, _d = _a.barColor, barColor = _d === void 0 ? ["#3182ce"] : _d, _e = _a.xAxisStyle, xAxisStyle = _e === void 0 ? {
|
|
10
10
|
color: "#ffffff",
|
|
11
11
|
} : _e, _f = _a.yAxisStyle, yAxisStyle = _f === void 0 ? {
|
|
12
12
|
color: "#ffffff",
|
|
@@ -35,7 +35,7 @@ function ApexBarChart(_a) {
|
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
37
|
xaxis: {
|
|
38
|
-
categories:
|
|
38
|
+
categories: labels,
|
|
39
39
|
labels: {
|
|
40
40
|
style: xAxisStyle,
|
|
41
41
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type ApexBarChartProps = {
|
|
2
2
|
data: number[];
|
|
3
|
-
|
|
3
|
+
labels: string[];
|
|
4
4
|
title?: string;
|
|
5
|
-
titlePosition?:
|
|
5
|
+
titlePosition?: "left" | "center" | "right";
|
|
6
6
|
height?: number;
|
|
7
7
|
width?: number;
|
|
8
8
|
barColor?: string[];
|
|
@@ -9,4 +9,4 @@ export declare const ProfileCardBody: React.FC<{
|
|
|
9
9
|
export declare const ProfileCardFooter: React.FC<{
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
}>;
|
|
12
|
-
export default function ProfileCard({ maxW, align, variant, direction, justify, children, size, color, overflow, dividercolor, dividersize, dividervariant, CardStyle, CardHeaderStyle, borderTopColor, borderLeftColor, }: ProfileCardProps): React.JSX.Element;
|
|
12
|
+
export default function ProfileCard({ maxW, align, variant, direction, justify, children, size, color, overflow, dividercolor, dividersize, dividervariant, CardStyle, CardHeaderStyle, CardBodyStyle, borderTopColor, borderLeftColor, }: ProfileCardProps): React.JSX.Element;
|
|
@@ -33,7 +33,7 @@ var ProfileCardFooter = function (_a) {
|
|
|
33
33
|
};
|
|
34
34
|
exports.ProfileCardFooter = ProfileCardFooter;
|
|
35
35
|
function ProfileCard(_a) {
|
|
36
|
-
var 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, _b = _a.dividercolor, dividercolor = _b === void 0 ? "#d5cfcf" : _b, _c = _a.dividersize, dividersize = _c === void 0 ? "0.5px" : _c, _d = _a.dividervariant, dividervariant = _d === void 0 ? "solid" : _d, CardStyle = _a.CardStyle, CardHeaderStyle = _a.CardHeaderStyle, borderTopColor = _a.borderTopColor, borderLeftColor = _a.borderLeftColor;
|
|
36
|
+
var 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, _b = _a.dividercolor, dividercolor = _b === void 0 ? "#d5cfcf" : _b, _c = _a.dividersize, dividersize = _c === void 0 ? "0.5px" : _c, _d = _a.dividervariant, dividervariant = _d === void 0 ? "solid" : _d, CardStyle = _a.CardStyle, CardHeaderStyle = _a.CardHeaderStyle, CardBodyStyle = _a.CardBodyStyle, borderTopColor = _a.borderTopColor, borderLeftColor = _a.borderLeftColor;
|
|
37
37
|
var isReactElement = function (child) {
|
|
38
38
|
return child !== null && typeof child === "object" && "type" in child;
|
|
39
39
|
};
|
|
@@ -51,7 +51,7 @@ function ProfileCard(_a) {
|
|
|
51
51
|
borderWidth: dividersize,
|
|
52
52
|
borderStyle: dividervariant,
|
|
53
53
|
} }))),
|
|
54
|
-
react_1.default.createElement(react_2.CardBody,
|
|
54
|
+
react_1.default.createElement(react_2.CardBody, { sx: CardBodyStyle }, body),
|
|
55
55
|
footer && react_1.default.createElement(react_2.CardFooter, null, footer)));
|
|
56
56
|
}
|
|
57
57
|
exports.default = ProfileCard;
|
|
@@ -10,6 +10,7 @@ export type ProfileCardProps = Pick<CardProps, "direction" | "maxW" | "align" |
|
|
|
10
10
|
dividervariant?: "solid" | "dashed" | "dotted" | "double" | "groove" | "ridge" | "inset" | "outset";
|
|
11
11
|
CardStyle?: React.CSSProperties;
|
|
12
12
|
CardHeaderStyle?: React.CSSProperties;
|
|
13
|
+
CardBodyStyle?: React.CSSProperties;
|
|
13
14
|
borderTopColor?: boolean;
|
|
14
15
|
borderLeftColor?: boolean;
|
|
15
16
|
};
|
|
@@ -17,11 +17,11 @@ var Highlight = styled_1.default.div(templateObject_2 || (templateObject_2 = __m
|
|
|
17
17
|
});
|
|
18
18
|
// background-color: ${({ backgroundColor }) => backgroundColor};
|
|
19
19
|
var SwitchList = styled_1.default.ul(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n list-style-type: none;\n margin: 0;\n padding: 1px;\n height: 100%;\n z-index: 1;\n"], ["\n display: flex;\n list-style-type: none;\n margin: 0;\n padding: 1px;\n height: 100%;\n z-index: 1;\n"])));
|
|
20
|
-
var SwitchOption = styled_1.default.li(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: 110px;\n height: 100%;\n color: black;\n transition: color 0.3s ease;\n font-weight: 400;\n padding: 2px;\n ", "\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: 110px;\n height: 100%;\n color: black;\n transition: color 0.3s ease;\n font-weight: 400;\n padding: 2px;\n ", "\n"])), function (_a) {
|
|
20
|
+
var SwitchOption = styled_1.default.li(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: 110px;\n height: 100%;\n color: black;\n transition: color 0.3s ease;\n font-weight: 400;\n padding: 2px;\n font-size: 14px;\n ", "\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: 110px;\n height: 100%;\n color: black;\n transition: color 0.3s ease;\n font-weight: 400;\n padding: 2px;\n font-size: 14px;\n ", "\n"])), function (_a) {
|
|
21
21
|
var isActive = _a.isActive;
|
|
22
|
-
return isActive && (0, react_2.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-weight:
|
|
22
|
+
return isActive && (0, react_2.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-weight: 600;\n background-color: transparent;\n z-index: 1;\n "], ["\n font-weight: 600;\n background-color: transparent;\n z-index: 1;\n "])));
|
|
23
23
|
});
|
|
24
|
-
var SwitchContainerHeader = styled_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: white;\n height: auto;\n padding:
|
|
24
|
+
var SwitchContainerHeader = styled_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: white;\n height: auto;\n padding: 1px;\n width: 200px;\n border-radius: 20px;\n border: 1px solid #e2e7ee;\n"], ["\n background-color: white;\n height: auto;\n padding: 1px;\n width: 200px;\n border-radius: 20px;\n border: 1px solid #e2e7ee;\n"])));
|
|
25
25
|
function Switch(_a) {
|
|
26
26
|
var leftText = _a.leftText, rightText = _a.rightText, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, onSwitchToggle = _a.onSwitchToggle, switchActive = _a.switchActive;
|
|
27
27
|
return (react_1.default.createElement(SwitchContainerHeader, null,
|
package/dist/Pages/chart.js
CHANGED
|
@@ -7,14 +7,16 @@ var react_1 = __importDefault(require("react"));
|
|
|
7
7
|
var ApexBarChart_1 = __importDefault(require("../Components/Apexcharts/ApexBarChart/ApexBarChart"));
|
|
8
8
|
var ApexPieChart_1 = __importDefault(require("../Components/Apexcharts/ApexPieChart/ApexPieChart"));
|
|
9
9
|
var ChartPage = function () {
|
|
10
|
-
var data = Array.from({ length: 10 }, function () {
|
|
10
|
+
var data = Array.from({ length: 10 }, function () {
|
|
11
|
+
return Math.floor(Math.random() * 100);
|
|
12
|
+
});
|
|
11
13
|
var categories = data.map(function (_, index) { return "Category ".concat(index + 1); });
|
|
12
14
|
var data1 = Array.from({ length: 10 }, function () {
|
|
13
15
|
return Math.floor(Math.random() * 100);
|
|
14
16
|
});
|
|
15
17
|
var categories1 = data.map(function (_, index) { return "Category ".concat(index + 1); });
|
|
16
18
|
return (react_1.default.createElement("div", null,
|
|
17
|
-
react_1.default.createElement(ApexBarChart_1.default, { data: data,
|
|
19
|
+
react_1.default.createElement(ApexBarChart_1.default, { data: data, labels: categories, title: "Bar Chart", titlePosition: "left",
|
|
18
20
|
// barColor={["#00E396"]}
|
|
19
21
|
// xAxisStyle={{ colors: "#00E396", fontSize: "12px" }}
|
|
20
22
|
// yAxisStyle={{ colors: "#00E396", fontSize: "12px" }}
|