venice-ui 2.4.4 → 2.4.5
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/Modal/Modal.js +2 -2
- package/dist/cjs/components/Modal/Modal.styles.js +4 -4
- package/dist/cjs/components/Tile/Tile.js +2 -2
- package/dist/cjs/components/Tile/Tile.styles.js +5 -4
- package/dist/esm/components/Modal/Modal.js +2 -2
- package/dist/esm/components/Modal/Modal.styles.js +4 -4
- package/dist/esm/components/Tile/Tile.js +2 -2
- package/dist/esm/components/Tile/Tile.styles.js +5 -4
- package/dist/types/components/Modal/Modal.d.ts +1 -0
- package/dist/types/components/Modal/Modal.styles.d.ts +1 -0
- package/dist/types/components/Tile/Tile.d.ts +1 -0
- package/dist/types/components/Tile/Tile.styles.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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, additionDisabled = 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, decorativeEdge = false, }) => {
|
|
35
35
|
(0, react_1.useEffect)(() => {
|
|
36
36
|
const handleKeyDown = (e) => {
|
|
37
37
|
if (e.key === 'Escape') {
|
|
@@ -47,7 +47,7 @@ const Modal = ({ isOpen, theme = Theme_1.mainTheme, children, title, handleConfi
|
|
|
47
47
|
}, [isOpen]);
|
|
48
48
|
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
|
|
49
49
|
react_1.default.createElement(Modal_styles_1.ModalOverlayer, null,
|
|
50
|
-
react_1.default.createElement(Modal_styles_1.ModalElement, { size: size },
|
|
50
|
+
react_1.default.createElement(Modal_styles_1.ModalElement, { size: size, decorativeEdge: decorativeEdge },
|
|
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
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 })))));
|
|
@@ -32,8 +32,8 @@ exports.ModalElement = styled_components_1.default.div `
|
|
|
32
32
|
position: relative;
|
|
33
33
|
max-width: 60rem;
|
|
34
34
|
box-shadow: ${Theme_1.Theme.shadow.m}
|
|
35
|
-
${p => p.size === 'small' && `max-width:500px
|
|
36
|
-
${p => p.size === 'medium' && `max-width:750px
|
|
37
|
-
${p => p.size === 'large' && `max-width:100
|
|
38
|
-
|
|
35
|
+
${p => p.size === 'small' && `max-width:500px;`}
|
|
36
|
+
${p => p.size === 'medium' && `max-width:750px;`}
|
|
37
|
+
${p => p.size === 'large' && `max-width:100%;`}
|
|
38
|
+
${p => p.decorativeEdge && `border-left: 4px solid ${Theme_1.Theme.colors.primary};`}
|
|
39
39
|
`;
|
|
@@ -8,8 +8,8 @@ const ElementHeader_1 = require("../ElementHeader");
|
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const Tile_styles_1 = require("./Tile.styles");
|
|
10
10
|
const Theme_1 = require("../../Theme");
|
|
11
|
-
const Tile = ({ size = 'small', shadow = true, title, children, theme = Theme_1.mainTheme, backgroundColor = theme.contentBackground, height = 'auto', headerDivader = false }) => {
|
|
12
|
-
return (react_1.default.createElement(Tile_styles_1.TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height },
|
|
11
|
+
const Tile = ({ size = 'small', shadow = true, title, children, theme = Theme_1.mainTheme, backgroundColor = theme.contentBackground, height = 'auto', headerDivader = false, decorativeEdge = false, }) => {
|
|
12
|
+
return (react_1.default.createElement(Tile_styles_1.TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height, decorativeEdge: decorativeEdge },
|
|
13
13
|
title && (react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, backgroundColor: backgroundColor, bottomDivader: headerDivader })),
|
|
14
14
|
children));
|
|
15
15
|
};
|
|
@@ -16,12 +16,13 @@ exports.TileElement = styled_components_1.default.div `
|
|
|
16
16
|
overflow: hidden;
|
|
17
17
|
flex-direction: column;
|
|
18
18
|
position: relative;
|
|
19
|
-
height
|
|
19
|
+
height: ${(p) => p.height};
|
|
20
20
|
${(p) => p.shadow &&
|
|
21
21
|
`
|
|
22
22
|
box-shadow: ${Theme_1.Theme.shadow.s}
|
|
23
23
|
`}
|
|
24
|
-
${(p) => p.size === 'small' && `max-width:500px
|
|
25
|
-
${(p) => p.size === 'medium' && `max-width:750px
|
|
26
|
-
${(p) => p.size === 'large' && `max-width:100
|
|
24
|
+
${(p) => p.size === 'small' && `max-width:500px;`}
|
|
25
|
+
${(p) => p.size === 'medium' && `max-width:750px;`}
|
|
26
|
+
${(p) => p.size === 'large' && `max-width:100%;`}
|
|
27
|
+
${(p) => p.decorativeEdge && `border-left: 4px solid ${Theme_1.Theme.colors.primary};`}
|
|
27
28
|
`;
|
|
@@ -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, additionDisabled = 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, decorativeEdge = false, }) => {
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
const handleKeyDown = (e) => {
|
|
11
11
|
if (e.key === 'Escape') {
|
|
@@ -21,7 +21,7 @@ export const Modal = ({ isOpen, theme = mainTheme, children, title, handleConfir
|
|
|
21
21
|
}, [isOpen]);
|
|
22
22
|
return (React.createElement(ThemeProvider, { theme: theme },
|
|
23
23
|
React.createElement(ModalOverlayer, null,
|
|
24
|
-
React.createElement(ModalElement, { size: size },
|
|
24
|
+
React.createElement(ModalElement, { size: size, decorativeEdge: decorativeEdge },
|
|
25
25
|
React.createElement(ElementHeader, { title: title, handleClose: handleClose, bottomDivader: headerDivader }),
|
|
26
26
|
React.createElement(ScrollCotainer, null, children),
|
|
27
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 })))));
|
|
@@ -26,8 +26,8 @@ export const ModalElement = styled.div `
|
|
|
26
26
|
position: relative;
|
|
27
27
|
max-width: 60rem;
|
|
28
28
|
box-shadow: ${Theme.shadow.m}
|
|
29
|
-
${p => p.size === 'small' && `max-width:500px
|
|
30
|
-
${p => p.size === 'medium' && `max-width:750px
|
|
31
|
-
${p => p.size === 'large' && `max-width:100
|
|
32
|
-
|
|
29
|
+
${p => p.size === 'small' && `max-width:500px;`}
|
|
30
|
+
${p => p.size === 'medium' && `max-width:750px;`}
|
|
31
|
+
${p => p.size === 'large' && `max-width:100%;`}
|
|
32
|
+
${p => p.decorativeEdge && `border-left: 4px solid ${Theme.colors.primary};`}
|
|
33
33
|
`;
|
|
@@ -2,8 +2,8 @@ import { ElementHeader } from '../ElementHeader';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TileElement } from './Tile.styles';
|
|
4
4
|
import { mainTheme } from '../../Theme';
|
|
5
|
-
export const Tile = ({ size = 'small', shadow = true, title, children, theme = mainTheme, backgroundColor = theme.contentBackground, height = 'auto', headerDivader = false }) => {
|
|
6
|
-
return (React.createElement(TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height },
|
|
5
|
+
export const Tile = ({ size = 'small', shadow = true, title, children, theme = mainTheme, backgroundColor = theme.contentBackground, height = 'auto', headerDivader = false, decorativeEdge = false, }) => {
|
|
6
|
+
return (React.createElement(TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height, decorativeEdge: decorativeEdge },
|
|
7
7
|
title && (React.createElement(ElementHeader, { title: title, backgroundColor: backgroundColor, bottomDivader: headerDivader })),
|
|
8
8
|
children));
|
|
9
9
|
};
|
|
@@ -10,12 +10,13 @@ export const TileElement = styled.div `
|
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
position: relative;
|
|
13
|
-
height
|
|
13
|
+
height: ${(p) => p.height};
|
|
14
14
|
${(p) => p.shadow &&
|
|
15
15
|
`
|
|
16
16
|
box-shadow: ${Theme.shadow.s}
|
|
17
17
|
`}
|
|
18
|
-
${(p) => p.size === 'small' && `max-width:500px
|
|
19
|
-
${(p) => p.size === 'medium' && `max-width:750px
|
|
20
|
-
${(p) => p.size === 'large' && `max-width:100
|
|
18
|
+
${(p) => p.size === 'small' && `max-width:500px;`}
|
|
19
|
+
${(p) => p.size === 'medium' && `max-width:750px;`}
|
|
20
|
+
${(p) => p.size === 'large' && `max-width:100%;`}
|
|
21
|
+
${(p) => p.decorativeEdge && `border-left: 4px solid ${Theme.colors.primary};`}
|
|
21
22
|
`;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const ModalOverlayer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
interface IModalElementProp {
|
|
3
3
|
size: string;
|
|
4
|
+
decorativeEdge: boolean;
|
|
4
5
|
theme: any;
|
|
5
6
|
}
|
|
6
7
|
export declare const ModalElement: import("styled-components").StyledComponent<"div", any, IModalElementProp, never>;
|