venice-ui 2.1.19 → 2.1.21
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/cjs/components/ButtonsFooter/ButtonsFooter.js +2 -2
- package/dist/cjs/components/Modal/Modal.js +2 -2
- package/dist/esm/components/ButtonsFooter/ButtonsFooter.js +2 -2
- package/dist/esm/components/Modal/Modal.js +2 -2
- package/dist/types/components/ButtonsFooter/ButtonsFooter.d.ts +1 -0
- package/dist/types/components/Modal/Modal.d.ts +1 -0
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ const Button_1 = require("../Button");
|
|
|
10
10
|
const Aligment_1 = require("../Aligment");
|
|
11
11
|
const ButtonsFooter_style_1 = require("./ButtonsFooter.style");
|
|
12
12
|
const Toogle_1 = require("../Toogle");
|
|
13
|
-
const ButtonsFooter = ({ handleConfirm, handleClose, handleAdditional, labelConfirm = 'Confirm', labelClose = 'Close', labelAdditional, submitDisabled, submitLoader, backgroundColor = 'transparent', additionalType = 'button', additionalValue = false, additionaNormalMode = false, }) => {
|
|
13
|
+
const ButtonsFooter = ({ handleConfirm, handleClose, handleAdditional, labelConfirm = 'Confirm', labelClose = 'Close', labelAdditional, submitDisabled, submitLoader, backgroundColor = 'transparent', additionalType = 'button', additionalValue = false, additionaNormalMode = false, additionDisabled = false, }) => {
|
|
14
14
|
const isAdditional = () => {
|
|
15
15
|
return labelAdditional !== undefined && handleAdditional !== undefined;
|
|
16
16
|
};
|
|
@@ -29,7 +29,7 @@ const ButtonsFooter = ({ handleConfirm, handleClose, handleAdditional, labelConf
|
|
|
29
29
|
};
|
|
30
30
|
return (react_1.default.createElement(Aligment_1.Aligment, { justify: isAdditional() ? 'space-between' : 'flex-end', vPadding: Theme_1.Theme.padding.l, hPadding: Theme_1.Theme.padding.l, backgroundColor: backgroundColor },
|
|
31
31
|
labelAdditional && handleAdditional && (react_1.default.createElement(ButtonsFooter_style_1.ButtonsFooterGroup, null, !submitLoader && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
32
|
-
additionalType === 'button' && (react_1.default.createElement(Button_1.Button, { errorVariant: !additionaNormalMode, mode:
|
|
32
|
+
additionalType === 'button' && (react_1.default.createElement(Button_1.Button, { errorVariant: !additionaNormalMode, mode: "secondary", onClick: additionAction, text: labelAdditional, left: isMultiButtons(), disabled: additionDisabled })),
|
|
33
33
|
additionalType === 'toogle' && (react_1.default.createElement(Toogle_1.Toogle, { label: labelAdditional, value: additionalValue, handleClick: additionAction, labelPosition: "left", size: "medium" })))))),
|
|
34
34
|
react_1.default.createElement(ButtonsFooter_style_1.ButtonsFooterGroup, null,
|
|
35
35
|
!submitLoader && (react_1.default.createElement(Button_1.Button, { mode: isMultiButtons() ? 'secondary' : 'primary', onClick: () => handleClose(), text: labelClose, left: isMultiButtons() })),
|
|
@@ -31,7 +31,7 @@ const common_1 = require("../common");
|
|
|
31
31
|
const Modal_styles_1 = require("./Modal.styles");
|
|
32
32
|
const styled_components_1 = require("styled-components");
|
|
33
33
|
const ButtonsFooter_1 = require("../ButtonsFooter");
|
|
34
|
-
const Modal = ({ isOpen, theme = Theme_1.mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm, labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, headerDivader = false, additionaNormalMode = false, exitOnEsc = false }) => {
|
|
34
|
+
const Modal = ({ isOpen, theme = Theme_1.mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm, labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, headerDivader = false, additionaNormalMode = false, exitOnEsc = false, additionDisabled = false, }) => {
|
|
35
35
|
(0, react_1.useEffect)(() => {
|
|
36
36
|
const handleKeyDown = (e) => {
|
|
37
37
|
if (e.key === 'Escape') {
|
|
@@ -50,6 +50,6 @@ const Modal = ({ isOpen, theme = Theme_1.mainTheme, children, title, handleConfi
|
|
|
50
50
|
react_1.default.createElement(Modal_styles_1.ModalElement, { size: size },
|
|
51
51
|
react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, handleClose: handleClose, bottomDivader: headerDivader }),
|
|
52
52
|
react_1.default.createElement(common_1.ScrollCotainer, null, children),
|
|
53
|
-
react_1.default.createElement(ButtonsFooter_1.ButtonsFooter, { handleConfirm: handleConfirm, handleClose: handleClose, handleAdditional: handleAdditional, labelConfirm: labelConfirm, labelClose: labelClose, labelAdditional: labelAdditional, submitDisabled: submitDisabled, submitLoader: submitLoader, additionalType: additionalType, additionalValue: additionalValue, additionaNormalMode: additionaNormalMode })))));
|
|
53
|
+
react_1.default.createElement(ButtonsFooter_1.ButtonsFooter, { handleConfirm: handleConfirm, handleClose: handleClose, handleAdditional: handleAdditional, labelConfirm: labelConfirm, labelClose: labelClose, labelAdditional: labelAdditional, submitDisabled: submitDisabled, submitLoader: submitLoader, additionalType: additionalType, additionalValue: additionalValue, additionaNormalMode: additionaNormalMode, additionDisabled: additionDisabled })))));
|
|
54
54
|
};
|
|
55
55
|
exports.Modal = Modal;
|
|
@@ -4,7 +4,7 @@ import { Button } from '../Button';
|
|
|
4
4
|
import { Aligment } from '../Aligment';
|
|
5
5
|
import { ButtonsFooterGroup } from './ButtonsFooter.style';
|
|
6
6
|
import { Toogle } from '../Toogle';
|
|
7
|
-
export const ButtonsFooter = ({ handleConfirm, handleClose, handleAdditional, labelConfirm = 'Confirm', labelClose = 'Close', labelAdditional, submitDisabled, submitLoader, backgroundColor = 'transparent', additionalType = 'button', additionalValue = false, additionaNormalMode = false, }) => {
|
|
7
|
+
export const ButtonsFooter = ({ handleConfirm, handleClose, handleAdditional, labelConfirm = 'Confirm', labelClose = 'Close', labelAdditional, submitDisabled, submitLoader, backgroundColor = 'transparent', additionalType = 'button', additionalValue = false, additionaNormalMode = false, additionDisabled = false, }) => {
|
|
8
8
|
const isAdditional = () => {
|
|
9
9
|
return labelAdditional !== undefined && handleAdditional !== undefined;
|
|
10
10
|
};
|
|
@@ -23,7 +23,7 @@ export const ButtonsFooter = ({ handleConfirm, handleClose, handleAdditional, la
|
|
|
23
23
|
};
|
|
24
24
|
return (React.createElement(Aligment, { justify: isAdditional() ? 'space-between' : 'flex-end', vPadding: Theme.padding.l, hPadding: Theme.padding.l, backgroundColor: backgroundColor },
|
|
25
25
|
labelAdditional && handleAdditional && (React.createElement(ButtonsFooterGroup, null, !submitLoader && (React.createElement(React.Fragment, null,
|
|
26
|
-
additionalType === 'button' && (React.createElement(Button, { errorVariant: !additionaNormalMode, mode:
|
|
26
|
+
additionalType === 'button' && (React.createElement(Button, { errorVariant: !additionaNormalMode, mode: "secondary", onClick: additionAction, text: labelAdditional, left: isMultiButtons(), disabled: additionDisabled })),
|
|
27
27
|
additionalType === 'toogle' && (React.createElement(Toogle, { label: labelAdditional, value: additionalValue, handleClick: additionAction, labelPosition: "left", size: "medium" })))))),
|
|
28
28
|
React.createElement(ButtonsFooterGroup, null,
|
|
29
29
|
!submitLoader && (React.createElement(Button, { mode: isMultiButtons() ? 'secondary' : 'primary', onClick: () => handleClose(), text: labelClose, left: isMultiButtons() })),
|
|
@@ -5,7 +5,7 @@ import { ScrollCotainer } from '../common';
|
|
|
5
5
|
import { ModalElement, ModalOverlayer } from './Modal.styles';
|
|
6
6
|
import { ThemeProvider } from 'styled-components';
|
|
7
7
|
import { ButtonsFooter } from '../ButtonsFooter';
|
|
8
|
-
export const Modal = ({ isOpen, theme = mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm, labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, headerDivader = false, additionaNormalMode = false, exitOnEsc = false }) => {
|
|
8
|
+
export const Modal = ({ isOpen, theme = mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm, labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, headerDivader = false, additionaNormalMode = false, exitOnEsc = false, additionDisabled = false, }) => {
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
const handleKeyDown = (e) => {
|
|
11
11
|
if (e.key === 'Escape') {
|
|
@@ -24,5 +24,5 @@ export const Modal = ({ isOpen, theme = mainTheme, children, title, handleConfir
|
|
|
24
24
|
React.createElement(ModalElement, { size: size },
|
|
25
25
|
React.createElement(ElementHeader, { title: title, handleClose: handleClose, bottomDivader: headerDivader }),
|
|
26
26
|
React.createElement(ScrollCotainer, null, children),
|
|
27
|
-
React.createElement(ButtonsFooter, { handleConfirm: handleConfirm, handleClose: handleClose, handleAdditional: handleAdditional, labelConfirm: labelConfirm, labelClose: labelClose, labelAdditional: labelAdditional, submitDisabled: submitDisabled, submitLoader: submitLoader, additionalType: additionalType, additionalValue: additionalValue, additionaNormalMode: additionaNormalMode })))));
|
|
27
|
+
React.createElement(ButtonsFooter, { handleConfirm: handleConfirm, handleClose: handleClose, handleAdditional: handleAdditional, labelConfirm: labelConfirm, labelClose: labelClose, labelAdditional: labelAdditional, submitDisabled: submitDisabled, submitLoader: submitLoader, additionalType: additionalType, additionalValue: additionalValue, additionaNormalMode: additionaNormalMode, additionDisabled: additionDisabled })))));
|
|
28
28
|
};
|