pixelize-design-library 1.1.46 → 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.
|
@@ -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
|
};
|
|
@@ -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,
|