venice-ui 2.1.17 → 2.1.18
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/Button/Button.styles.js +5 -4
- package/dist/cjs/components/Card/Card.js +2 -2
- package/dist/cjs/components/ElementHeader/ElementHeader.js +2 -2
- package/dist/esm/components/Button/Button.styles.js +5 -4
- package/dist/esm/components/Card/Card.js +2 -2
- package/dist/esm/components/ElementHeader/ElementHeader.js +2 -2
- package/dist/types/components/Card/Card.d.ts +1 -0
- package/dist/types/components/ElementHeader/ElementHeader.d.ts +1 -0
- package/package.json +1 -1
|
@@ -38,13 +38,14 @@ exports.ButtonElement = styled_components_1.default.button `
|
|
|
38
38
|
`background-color: transparent;
|
|
39
39
|
border: none;
|
|
40
40
|
color: ${p.theme.action};
|
|
41
|
-
${p.errorVariant &&
|
|
42
|
-
`color:${p.theme.errorBackgroundColor};
|
|
43
|
-
border:none;`}
|
|
44
41
|
&:disabled{
|
|
45
42
|
color: ${p.theme.disabledText};
|
|
46
|
-
border: 1px solid ${p.theme.disabledText};
|
|
47
43
|
}
|
|
44
|
+
${p.errorVariant &&
|
|
45
|
+
`color:${p.theme.errorBackgroundColor};
|
|
46
|
+
border:none;`}
|
|
47
|
+
|
|
48
|
+
|
|
48
49
|
`}
|
|
49
50
|
|
|
50
51
|
&:hover {
|
|
@@ -8,9 +8,9 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const Card_styles_1 = require("./Card.styles");
|
|
9
9
|
const ElementHeader_1 = require("../ElementHeader");
|
|
10
10
|
const Theme_1 = require("../../Theme");
|
|
11
|
-
const Card = ({ children, title, actionLabel, theme = Theme_1.mainTheme, iconColor = theme.textColor, iconHoverColor = theme.action, handleClick, handleBack, height, options, shadow = true, headerDivader = false }) => {
|
|
11
|
+
const Card = ({ children, title, actionLabel, theme = Theme_1.mainTheme, iconColor = theme.textColor, iconHoverColor = theme.action, handleClick, handleBack, height, options, shadow = true, headerDivader = false, actionDisabled = false, }) => {
|
|
12
12
|
return (react_1.default.createElement(Card_styles_1.CardElement, { height: height, shadow: shadow },
|
|
13
|
-
(title || actionLabel) && (react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, iconColor: iconColor, iconHoverColor: iconHoverColor, bottomDivader: headerDivader })),
|
|
13
|
+
(title || actionLabel) && (react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, iconColor: iconColor, iconHoverColor: iconHoverColor, bottomDivader: headerDivader, actionDisabled: actionDisabled })),
|
|
14
14
|
react_1.default.createElement(Card_styles_1.CardContent, { soloMode: !title && !actionLabel }, children)));
|
|
15
15
|
};
|
|
16
16
|
exports.Card = Card;
|
|
@@ -12,7 +12,7 @@ const Theme_1 = require("../../Theme");
|
|
|
12
12
|
const Button_1 = require("../Button");
|
|
13
13
|
const DropdownMenu_1 = require("../DropdownMenu");
|
|
14
14
|
const ElementHeader_styles_1 = require("./ElementHeader.styles");
|
|
15
|
-
const ElementHeader = ({ title, actionLabel = '', handleClose, handleClick, handleBack, children, theme = Theme_1.mainTheme, backgroundColor = theme.contentBackground, iconColor = theme.textColor, iconHoverColor = theme.action, options, bottomDivader = false, }) => {
|
|
15
|
+
const ElementHeader = ({ title, actionLabel = '', handleClose, handleClick, handleBack, children, theme = Theme_1.mainTheme, backgroundColor = theme.contentBackground, iconColor = theme.textColor, iconHoverColor = theme.action, options, bottomDivader = false, actionDisabled = false, }) => {
|
|
16
16
|
const leftSide = () => {
|
|
17
17
|
if (title) {
|
|
18
18
|
return (react_1.default.createElement(ElementHeader_styles_1.TitleWrapper, null,
|
|
@@ -30,7 +30,7 @@ const ElementHeader = ({ title, actionLabel = '', handleClose, handleClick, hand
|
|
|
30
30
|
}
|
|
31
31
|
else if (!handleClose && handleClick && actionLabel) {
|
|
32
32
|
return (react_1.default.createElement(Aligment_1.Aligment, { align: "center", width: "auto" },
|
|
33
|
-
react_1.default.createElement(Button_1.Button, { mode: "secondary", text: actionLabel, onClick: () => handleClick() }),
|
|
33
|
+
react_1.default.createElement(Button_1.Button, { mode: "secondary", text: actionLabel, onClick: () => handleClick(), disabled: actionDisabled }),
|
|
34
34
|
options && (react_1.default.createElement(DropdownMenu_1.DropdownMenu, { options: options, right: true, iconColor: iconColor, position: 'right' }))));
|
|
35
35
|
}
|
|
36
36
|
};
|
|
@@ -32,13 +32,14 @@ export const ButtonElement = styled.button `
|
|
|
32
32
|
`background-color: transparent;
|
|
33
33
|
border: none;
|
|
34
34
|
color: ${p.theme.action};
|
|
35
|
-
${p.errorVariant &&
|
|
36
|
-
`color:${p.theme.errorBackgroundColor};
|
|
37
|
-
border:none;`}
|
|
38
35
|
&:disabled{
|
|
39
36
|
color: ${p.theme.disabledText};
|
|
40
|
-
border: 1px solid ${p.theme.disabledText};
|
|
41
37
|
}
|
|
38
|
+
${p.errorVariant &&
|
|
39
|
+
`color:${p.theme.errorBackgroundColor};
|
|
40
|
+
border:none;`}
|
|
41
|
+
|
|
42
|
+
|
|
42
43
|
`}
|
|
43
44
|
|
|
44
45
|
&:hover {
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { CardContent, CardElement } from './Card.styles';
|
|
3
3
|
import { ElementHeader } from '../ElementHeader';
|
|
4
4
|
import { mainTheme } from '../../Theme';
|
|
5
|
-
export const Card = ({ children, title, actionLabel, theme = mainTheme, iconColor = theme.textColor, iconHoverColor = theme.action, handleClick, handleBack, height, options, shadow = true, headerDivader = false }) => {
|
|
5
|
+
export const Card = ({ children, title, actionLabel, theme = mainTheme, iconColor = theme.textColor, iconHoverColor = theme.action, handleClick, handleBack, height, options, shadow = true, headerDivader = false, actionDisabled = false, }) => {
|
|
6
6
|
return (React.createElement(CardElement, { height: height, shadow: shadow },
|
|
7
|
-
(title || actionLabel) && (React.createElement(ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, iconColor: iconColor, iconHoverColor: iconHoverColor, bottomDivader: headerDivader })),
|
|
7
|
+
(title || actionLabel) && (React.createElement(ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, iconColor: iconColor, iconHoverColor: iconHoverColor, bottomDivader: headerDivader, actionDisabled: actionDisabled })),
|
|
8
8
|
React.createElement(CardContent, { soloMode: !title && !actionLabel }, children)));
|
|
9
9
|
};
|
|
@@ -6,7 +6,7 @@ import { Theme, mainTheme } from '../../Theme';
|
|
|
6
6
|
import { Button } from '../Button';
|
|
7
7
|
import { DropdownMenu } from '../DropdownMenu';
|
|
8
8
|
import { ElementHeaderWrapper, TitleWrapper } from './ElementHeader.styles';
|
|
9
|
-
export const ElementHeader = ({ title, actionLabel = '', handleClose, handleClick, handleBack, children, theme = mainTheme, backgroundColor = theme.contentBackground, iconColor = theme.textColor, iconHoverColor = theme.action, options, bottomDivader = false, }) => {
|
|
9
|
+
export const ElementHeader = ({ title, actionLabel = '', handleClose, handleClick, handleBack, children, theme = mainTheme, backgroundColor = theme.contentBackground, iconColor = theme.textColor, iconHoverColor = theme.action, options, bottomDivader = false, actionDisabled = false, }) => {
|
|
10
10
|
const leftSide = () => {
|
|
11
11
|
if (title) {
|
|
12
12
|
return (React.createElement(TitleWrapper, null,
|
|
@@ -24,7 +24,7 @@ export const ElementHeader = ({ title, actionLabel = '', handleClose, handleClic
|
|
|
24
24
|
}
|
|
25
25
|
else if (!handleClose && handleClick && actionLabel) {
|
|
26
26
|
return (React.createElement(Aligment, { align: "center", width: "auto" },
|
|
27
|
-
React.createElement(Button, { mode: "secondary", text: actionLabel, onClick: () => handleClick() }),
|
|
27
|
+
React.createElement(Button, { mode: "secondary", text: actionLabel, onClick: () => handleClick(), disabled: actionDisabled }),
|
|
28
28
|
options && (React.createElement(DropdownMenu, { options: options, right: true, iconColor: iconColor, position: 'right' }))));
|
|
29
29
|
}
|
|
30
30
|
};
|