venice-ui 1.6.6 → 2.0.2
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/Theme/Theme.js +7 -3
- package/dist/cjs/components/Button/Button.js +3 -3
- package/dist/cjs/components/Button/Button.styles.js +19 -19
- package/dist/cjs/components/ButtonsFooter/ButtonsFooter.js +1 -1
- package/dist/cjs/components/Card/Card.js +4 -4
- package/dist/cjs/components/Card/Card.styles.js +6 -7
- package/dist/cjs/components/DropdownMenu/DropdownMenu.styles.js +1 -1
- package/dist/cjs/components/ElementHeader/ElementHeader.js +3 -2
- package/dist/cjs/components/ElementHeader/ElementHeader.styles.js +17 -0
- package/dist/cjs/components/File/File.js +1 -1
- package/dist/cjs/components/Form/Form.js +3 -3
- package/dist/cjs/components/Input/Input.styles.js +1 -1
- package/dist/cjs/components/Modal/Modal.js +2 -2
- package/dist/cjs/components/Section/Section.js +1 -1
- package/dist/cjs/components/Table/Table.js +1 -1
- package/dist/cjs/components/Table/Table.styles.js +6 -6
- package/dist/cjs/components/Tile/Tile.js +2 -2
- package/dist/cjs/components/Toogle/Toogle.js +3 -3
- package/dist/cjs/components/Toogle/Toogle.styles.js +8 -8
- package/dist/cjs/components/common/inputStyles.js +6 -6
- package/dist/esm/Theme/Theme.js +7 -3
- package/dist/esm/components/Button/Button.js +3 -3
- package/dist/esm/components/Button/Button.styles.js +19 -19
- package/dist/esm/components/ButtonsFooter/ButtonsFooter.js +1 -1
- package/dist/esm/components/Card/Card.js +4 -4
- package/dist/esm/components/Card/Card.styles.js +8 -9
- package/dist/esm/components/DropdownMenu/DropdownMenu.styles.js +1 -1
- package/dist/esm/components/ElementHeader/ElementHeader.js +3 -2
- package/dist/esm/components/ElementHeader/ElementHeader.styles.js +11 -0
- package/dist/esm/components/File/File.js +1 -1
- package/dist/esm/components/Form/Form.js +3 -3
- package/dist/esm/components/Input/Input.styles.js +1 -1
- package/dist/esm/components/Modal/Modal.js +2 -2
- package/dist/esm/components/Section/Section.js +1 -1
- package/dist/esm/components/Table/Table.js +1 -1
- package/dist/esm/components/Table/Table.styles.js +6 -6
- package/dist/esm/components/Tile/Tile.js +2 -2
- package/dist/esm/components/Toogle/Toogle.js +3 -3
- package/dist/esm/components/Toogle/Toogle.styles.js +8 -8
- package/dist/esm/components/common/inputStyles.js +7 -7
- package/dist/types/Theme/Theme.d.ts +4 -0
- package/dist/types/components/Button/Button.d.ts +1 -0
- package/dist/types/components/Button/Button.styles.d.ts +1 -0
- package/dist/types/components/Card/Card.d.ts +2 -0
- package/dist/types/components/Card/Card.styles.d.ts +2 -4
- package/dist/types/components/ElementHeader/ElementHeader.d.ts +1 -0
- package/dist/types/components/ElementHeader/ElementHeader.styles.d.ts +6 -0
- package/dist/types/components/Form/formTypes.d.ts +2 -0
- package/dist/types/components/Modal/Modal.d.ts +1 -0
- package/dist/types/components/Tile/Tile.d.ts +1 -0
- package/dist/types/types/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/Theme/Theme.js
CHANGED
|
@@ -70,6 +70,9 @@ exports.mainTheme = {
|
|
|
70
70
|
buttonInverseHover: (0, polished_1.lighten)(0.3, exports.Theme.colors.primary),
|
|
71
71
|
disabledBackground: exports.Theme.colors.gray_4,
|
|
72
72
|
disabledText: exports.Theme.colors.gray_1,
|
|
73
|
+
errorBackgroundColor: exports.Theme.colors.red,
|
|
74
|
+
errorBackgroundColorHover: (0, polished_1.lighten)(0.3, exports.Theme.colors.red),
|
|
75
|
+
errorBackgroundColorHoverLight: (0, polished_1.lighten)(0.5, exports.Theme.colors.red),
|
|
73
76
|
//icon
|
|
74
77
|
iconColor: exports.Theme.colors.text,
|
|
75
78
|
iconHoverColor: exports.Theme.colors.primary,
|
|
@@ -82,8 +85,8 @@ exports.mainTheme = {
|
|
|
82
85
|
inputDefaultBackground: exports.Theme.colors.white,
|
|
83
86
|
inputDefaultBorder: exports.Theme.colors.gray_2,
|
|
84
87
|
inputDefaultTextColor: exports.Theme.colors.text,
|
|
85
|
-
inputFocusBackground: exports.Theme.colors.
|
|
86
|
-
inputFocusBorder: exports.Theme.colors.
|
|
88
|
+
inputFocusBackground: (0, polished_1.lighten)(0.45, exports.Theme.colors.primary),
|
|
89
|
+
inputFocusBorder: exports.Theme.colors.primary,
|
|
87
90
|
inputFocusTextColor: exports.Theme.colors.text,
|
|
88
91
|
inputDisabledBackground: exports.Theme.colors.gray_4,
|
|
89
92
|
inputDisabledBorder: exports.Theme.colors.gray_1,
|
|
@@ -105,7 +108,8 @@ exports.mainTheme = {
|
|
|
105
108
|
tableCellHoverBackground: (0, polished_1.lighten)(0.3, exports.Theme.colors.primary),
|
|
106
109
|
tableCellActiveBackground: (0, polished_1.lighten)(0.3, exports.Theme.colors.primary),
|
|
107
110
|
tableCellSortIcon: exports.Theme.colors.primary,
|
|
108
|
-
tableMoreIconColor: exports.Theme.colors.
|
|
111
|
+
tableMoreIconColor: exports.Theme.colors.text,
|
|
112
|
+
tableHoverMoreIconColor: exports.Theme.colors.primary,
|
|
109
113
|
// chips
|
|
110
114
|
chipsNeutralBackground: exports.Theme.colors.primary,
|
|
111
115
|
chipsNeutralTextColor: exports.Theme.colors.white,
|
|
@@ -9,12 +9,12 @@ const styled_components_1 = require("styled-components");
|
|
|
9
9
|
const Theme_1 = require("../../Theme");
|
|
10
10
|
const Button_styles_1 = require("./Button.styles");
|
|
11
11
|
const Loader_1 = require("../Loader");
|
|
12
|
-
const Button = ({ text = 'Click me', mode = 'primary', size = 'medium', right = false, left = false, theme = Theme_1.mainTheme, disabled = false, onClick, loader = false, }) => {
|
|
12
|
+
const Button = ({ text = 'Click me', mode = 'primary', size = 'medium', right = false, left = false, theme = Theme_1.mainTheme, disabled = false, onClick, loader = false, errorVariant = false, }) => {
|
|
13
13
|
const handleClick = () => {
|
|
14
|
-
|
|
14
|
+
!disabled && !loader && onClick();
|
|
15
15
|
};
|
|
16
16
|
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
|
|
17
|
-
react_1.default.createElement(Button_styles_1.ButtonElement, { mode: mode, size: size, right: right, left: left, disabled: disabled, onClick: handleClick, loader: loader }, loader ? (react_1.default.createElement(Button_styles_1.ButtonLoader, { size: size },
|
|
17
|
+
react_1.default.createElement(Button_styles_1.ButtonElement, { mode: mode, size: size, right: right, left: left, disabled: disabled, onClick: handleClick, loader: loader, errorVariant: errorVariant }, loader ? (react_1.default.createElement(Button_styles_1.ButtonLoader, { size: size },
|
|
18
18
|
react_1.default.createElement(Loader_1.Loader, { size: "small", color: mode === 'primary' ? theme.buttonText : theme.action }))) : (text))));
|
|
19
19
|
};
|
|
20
20
|
exports.Button = Button;
|
|
@@ -9,7 +9,7 @@ const styled_components_1 = __importDefault(require("styled-components"));
|
|
|
9
9
|
const Theme_1 = require("../../Theme/Theme");
|
|
10
10
|
exports.ButtonElement = styled_components_1.default.button `
|
|
11
11
|
align-items: center;
|
|
12
|
-
border-radius: ${Theme_1.Theme.borderRadius.
|
|
12
|
+
border-radius: ${Theme_1.Theme.borderRadius.m};
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
cursor: pointer;
|
|
15
15
|
display: flex;
|
|
@@ -20,53 +20,53 @@ exports.ButtonElement = styled_components_1.default.button `
|
|
|
20
20
|
overflow: hidden;
|
|
21
21
|
transition: 300ms;
|
|
22
22
|
white-space: nowrap;
|
|
23
|
-
|
|
24
23
|
${(p) => p.mode === 'primary' &&
|
|
25
24
|
`background-color: ${p.theme.action};
|
|
26
|
-
border:
|
|
25
|
+
border: none;
|
|
27
26
|
color: ${p.theme.buttonText};
|
|
27
|
+
${p.errorVariant &&
|
|
28
|
+
`background-color:${p.theme.errorBackgroundColor};
|
|
29
|
+
border:none;`}
|
|
30
|
+
|
|
28
31
|
&:disabled{
|
|
29
32
|
color: ${p.theme.disabledText};
|
|
30
33
|
background-color: ${p.theme.disabledBackground};
|
|
31
34
|
}
|
|
32
35
|
`}
|
|
36
|
+
|
|
33
37
|
${(p) => p.mode === 'secondary' &&
|
|
34
38
|
`background-color: transparent;
|
|
35
|
-
border:
|
|
39
|
+
border: none;
|
|
36
40
|
color: ${p.theme.action};
|
|
41
|
+
${p.errorVariant &&
|
|
42
|
+
`color:${p.theme.errorBackgroundColor};
|
|
43
|
+
border:none;`}
|
|
37
44
|
&:disabled{
|
|
38
45
|
color: ${p.theme.disabledText};
|
|
39
46
|
border: 1px solid ${p.theme.disabledText};
|
|
40
47
|
}
|
|
41
48
|
`}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
&:disabled{
|
|
47
|
-
color: ${p.theme.disabledText};
|
|
48
|
-
}
|
|
49
|
-
`}
|
|
50
|
-
${(p) => (0, common_1.setButtonSize)(p.size, p.loader)}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
${(p) => (0, common_1.setButtonSize)(p.size, p.loader)}
|
|
51
53
|
&:hover {
|
|
52
54
|
transition: 300ms;
|
|
53
55
|
${(p) => p.mode === 'primary' &&
|
|
54
56
|
`background-color: ${p.theme.buttonPrimaryHover};
|
|
57
|
+
${p.errorVariant &&
|
|
58
|
+
`background-color:${p.theme.errorBackgroundColorHover};`}
|
|
55
59
|
&:disabled {
|
|
56
60
|
background-color: ${p.theme.disabledBackground};
|
|
57
61
|
}`}
|
|
58
62
|
|
|
59
63
|
${(p) => p.mode === 'secondary' &&
|
|
60
64
|
`background-color: ${p.theme.buttonSecondaryHover};
|
|
65
|
+
${p.errorVariant &&
|
|
66
|
+
`background-color:${p.theme.errorBackgroundColorHoverLight};`}
|
|
61
67
|
&:disabled {
|
|
62
68
|
background-color: transparent;
|
|
63
69
|
}`};
|
|
64
|
-
|
|
65
|
-
${(p) => p.mode === 'inverse' &&
|
|
66
|
-
`background-color: ${p.theme.buttonInverseHover};
|
|
67
|
-
&:disabled{
|
|
68
|
-
background-color: transparent;
|
|
69
|
-
}`}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&:disabled {
|
|
@@ -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, { mode: '
|
|
32
|
+
additionalType === 'button' && (react_1.default.createElement(Button_1.Button, { errorVariant: true, mode: 'secondary', onClick: additionAction, text: labelAdditional, left: isMultiButtons() })),
|
|
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() })),
|
|
@@ -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, }) => {
|
|
12
|
-
return (react_1.default.createElement(Card_styles_1.CardElement, { height: height },
|
|
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 })),
|
|
14
|
-
react_1.default.createElement(Card_styles_1.CardContent,
|
|
11
|
+
const Card = ({ children, title, actionLabel, theme = Theme_1.mainTheme, iconColor = theme.textColor, iconHoverColor = theme.action, handleClick, handleBack, height, options, shadow = true, headerDivader = false }) => {
|
|
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 })),
|
|
14
|
+
react_1.default.createElement(Card_styles_1.CardContent, null, children)));
|
|
15
15
|
};
|
|
16
16
|
exports.Card = Card;
|
|
@@ -13,15 +13,14 @@ exports.CardElement = styled_components_1.default.div `
|
|
|
13
13
|
width: 100%;
|
|
14
14
|
background-color: ${Theme_1.Theme.colors.white};
|
|
15
15
|
border-radius: ${Theme_1.Theme.borderRadius.m};
|
|
16
|
-
height: ${p => p.height ? p.height : '100%'};
|
|
17
|
-
box-shadow: ${Theme_1.Theme.shadow.s}
|
|
16
|
+
height: ${(p) => (p.height ? p.height : '100%')};
|
|
17
|
+
${(p) => p.shadow && `box-shadow: ${Theme_1.Theme.shadow.s};`}
|
|
18
18
|
`;
|
|
19
19
|
exports.CardContent = styled_components_1.default.div `
|
|
20
|
-
box-sizing: border-box;
|
|
20
|
+
box-sizing: border-box;
|
|
21
21
|
display: flex;
|
|
22
|
-
padding:
|
|
22
|
+
padding: ${Theme_1.Theme.padding.l};
|
|
23
23
|
width: 100%;
|
|
24
24
|
flex-direction: row;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`;
|
|
25
|
+
|
|
26
|
+
`;
|
|
@@ -30,7 +30,7 @@ exports.DropdownMenuContent = styled_components_1.default.div `
|
|
|
30
30
|
width:100%;
|
|
31
31
|
`;
|
|
32
32
|
exports.DropdownMenuOption = styled_components_1.default.div `
|
|
33
|
-
padding: ${Theme_1.Theme.padding.s} ${Theme_1.Theme.padding.
|
|
33
|
+
padding: ${Theme_1.Theme.padding.s} ${Theme_1.Theme.padding.m};
|
|
34
34
|
text-align:left;
|
|
35
35
|
min-width:80px;
|
|
36
36
|
cursor: pointer;
|
|
@@ -11,7 +11,8 @@ const Typography_1 = require("../Typography");
|
|
|
11
11
|
const Theme_1 = require("../../Theme");
|
|
12
12
|
const Button_1 = require("../Button");
|
|
13
13
|
const DropdownMenu_1 = require("../DropdownMenu");
|
|
14
|
-
const
|
|
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
16
|
const leftSide = () => {
|
|
16
17
|
if (title) {
|
|
17
18
|
return (react_1.default.createElement(Aligment_1.Aligment, { align: "center", direction: "row", width: "auto" },
|
|
@@ -32,7 +33,7 @@ const ElementHeader = ({ title, actionLabel = '', handleClose, handleClick, hand
|
|
|
32
33
|
options && (react_1.default.createElement(DropdownMenu_1.DropdownMenu, { options: options, right: true, iconColor: iconColor }))));
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
|
-
return (react_1.default.createElement(
|
|
36
|
+
return (react_1.default.createElement(ElementHeader_styles_1.ElementHeaderWrapper, { justify: !title && !children ? 'flex-end' : 'space-between', vPadding: Theme_1.Theme.padding.m, hPadding: Theme_1.Theme.padding.l, backgroundColor: backgroundColor, bottomDivader: bottomDivader },
|
|
36
37
|
react_1.default.createElement(react_1.default.Fragment, null,
|
|
37
38
|
leftSide(),
|
|
38
39
|
rightSide())));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ElementHeaderWrapper = void 0;
|
|
7
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
+
const Aligment_1 = require("../Aligment");
|
|
9
|
+
exports.ElementHeaderWrapper = (0, styled_components_1.default)(Aligment_1.Aligment) `
|
|
10
|
+
width: 100%;
|
|
11
|
+
${(p) => p.bottomDivader &&
|
|
12
|
+
`
|
|
13
|
+
border-bottom: 2px solid rgba(0, 0, 0, 0.14);
|
|
14
|
+
overflow-x:hidden;
|
|
15
|
+
`}
|
|
16
|
+
`;
|
|
17
|
+
// box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
|
@@ -43,7 +43,7 @@ const File = ({ label, labelPosition = 'top', name, disabled = false, multiple =
|
|
|
43
43
|
react_1.default.createElement(Input_1.InputWrapper, { width: width },
|
|
44
44
|
react_1.default.createElement(Aligment_1.Aligment, { gap: 10, wrap: "nowrap" },
|
|
45
45
|
react_1.default.createElement(Dropdown_1.Field, { inputSize: size, disabled: disabled, width: width, active: false, error: error, onClick: openFileSelector }, fileValue ? fileValue.name : placeholder),
|
|
46
|
-
react_1.default.createElement(Button_1.Button, { size: size, mode: "
|
|
46
|
+
react_1.default.createElement(Button_1.Button, { size: size, mode: "secondary", onClick: openFileSelector, text: "Wybierz plik" })),
|
|
47
47
|
react_1.default.createElement(File_styles_1.HiddenField, { type: "file", name: name, onChange: (e) => handleSelect(e), ref: fileRef, accept: accept, multiple: multiple }),
|
|
48
48
|
error && react_1.default.createElement(Input_1.InputErrorMsg, null, error))));
|
|
49
49
|
};
|
|
@@ -38,11 +38,11 @@ const Form = ({ formData, size = 'medium', read }) => {
|
|
|
38
38
|
const selectType = (item) => {
|
|
39
39
|
switch (item.type) {
|
|
40
40
|
case 'text':
|
|
41
|
-
return (react_1.default.createElement(Input_1.Input, { label: item.label, value: item.value, name: item.name, type: "text", size: size, handleChange: onChangeHandler, readOnly: read }));
|
|
41
|
+
return (react_1.default.createElement(Input_1.Input, { label: item.label, value: item.value, name: item.name, type: "text", size: size, handleChange: onChangeHandler, readOnly: read, autoFocus: item.autofocus, handleSubmit: item.submit }));
|
|
42
42
|
case 'number':
|
|
43
|
-
return (react_1.default.createElement(Input_1.Input, { label: item.label, value: item.value, name: item.name, type: "number", size: size, min: item.min, max: item.max, step: item.step, handleChange: onIntChangeHandler, readOnly: read }));
|
|
43
|
+
return (react_1.default.createElement(Input_1.Input, { label: item.label, value: item.value, name: item.name, type: "number", size: size, min: item.min, max: item.max, step: item.step, handleChange: onIntChangeHandler, readOnly: read, autoFocus: item.autofocus, handleSubmit: item.submit }));
|
|
44
44
|
case 'increase':
|
|
45
|
-
return (react_1.default.createElement(Input_1.Input, { type: "increase", label: item.label, value: item.value, name: item.name, size: size, handleChange: onIntChangeHandler, min: item.min, max: item.max, step: item.step, readOnly: read }));
|
|
45
|
+
return (react_1.default.createElement(Input_1.Input, { type: "increase", label: item.label, value: item.value, name: item.name, size: size, handleChange: onIntChangeHandler, min: item.min, max: item.max, step: item.step, readOnly: read, autoFocus: item.autofocus, handleSubmit: item.submit }));
|
|
46
46
|
case 'file':
|
|
47
47
|
return (react_1.default.createElement(File_1.File, { label: item.label, fileValue: item.value, name: item.name, size: size, handleChange: onFileHandler, readOnly: read }));
|
|
48
48
|
}
|
|
@@ -68,7 +68,7 @@ exports.InputReadOnlyElement = styled_components_1.default.div `
|
|
|
68
68
|
`;
|
|
69
69
|
exports.InputLabelElement = (0, styled_components_1.default)(Typography_1.TextLabel) `
|
|
70
70
|
${(p) => p.labelPosition === 'top' && `margin-bottom: ${Theme_1.Theme.padding.s};`}
|
|
71
|
-
${(p) => p.labelPosition === 'left' && `margin-
|
|
71
|
+
${(p) => p.labelPosition === 'left' && `margin-left: ${Theme_1.Theme.padding.s};`}
|
|
72
72
|
`;
|
|
73
73
|
exports.InputWrapper = styled_components_1.default.div `
|
|
74
74
|
display: flex;
|
|
@@ -11,11 +11,11 @@ const common_1 = require("../common");
|
|
|
11
11
|
const Modal_styles_1 = require("./Modal.styles");
|
|
12
12
|
const styled_components_1 = require("styled-components");
|
|
13
13
|
const ButtonsFooter_1 = require("../ButtonsFooter");
|
|
14
|
-
const Modal = ({ theme = Theme_1.mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm = 'Save', labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, }) => {
|
|
14
|
+
const Modal = ({ theme = Theme_1.mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm = 'Save', labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, headerDivader = false }) => {
|
|
15
15
|
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
|
|
16
16
|
react_1.default.createElement(Modal_styles_1.ModalOverlayer, null,
|
|
17
17
|
react_1.default.createElement(Modal_styles_1.ModalElement, { size: size },
|
|
18
|
-
react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, handleClose: handleClose }),
|
|
18
|
+
react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, handleClose: handleClose, bottomDivader: headerDivader }),
|
|
19
19
|
react_1.default.createElement(common_1.ScrollCotainer, null, children),
|
|
20
20
|
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 })))));
|
|
21
21
|
};
|
|
@@ -13,7 +13,7 @@ const Section = ({ title, children, titlePosition = 'left', noPadding = false, t
|
|
|
13
13
|
return (react_1.default.createElement(Section_styles_1.SectionElement, { backgroundColor: backgroundColor },
|
|
14
14
|
title && (react_1.default.createElement(Section_styles_1.SectionTitle, { titlePosition: titlePosition, noPadding: noPadding, withAction: titlePosition === 'left' && !!action },
|
|
15
15
|
react_1.default.createElement(Typography_1.TextSubHeader, null, title),
|
|
16
|
-
titlePosition === 'left' && !!action && (react_1.default.createElement(Button_1.Button, { text: actionLabel, onClick: action, size: "small", mode: "
|
|
16
|
+
titlePosition === 'left' && !!action && (react_1.default.createElement(Button_1.Button, { text: actionLabel, onClick: action, size: "small", mode: "secondary" })))),
|
|
17
17
|
react_1.default.createElement(Section_styles_1.SectionContent, { noPadding: noPadding }, children)));
|
|
18
18
|
};
|
|
19
19
|
exports.Section = Section;
|
|
@@ -104,7 +104,7 @@ hover = true, selectable = true, sortable = true, sort = {
|
|
|
104
104
|
: 'arrow_drop_up', iconColor: theme.tableCellSortIcon, size: 20 })))))))))),
|
|
105
105
|
react_1.default.createElement("tbody", null, tableProps.elements.map((item) => (react_1.default.createElement(Table_styles_1.TableRow, { key: item.id, hover: hover, active: selectedRow === item.id, selectable: selectable, onClick: () => handleRowClick(item.id) }, tableProps.headers.map((header) => (react_1.default.createElement(react_1.default.Fragment, null, header.action ? (react_1.default.createElement(Table_styles_1.OptionTableCell, { key: `${item.id}-${header.name}-action` },
|
|
106
106
|
react_1.default.createElement(Table_styles_1.OptionTableCellWrapper, { onClick: (e) => e.stopPropagation() },
|
|
107
|
-
react_1.default.createElement(DropdownMenu_1.DropdownMenu, { options: moreActions, targetID: item.id, iconName: "more_vert", iconColor: theme.tableMoreIconColor })))) : (react_1.default.createElement(Table_styles_1.TableCell, { key: `${item.id}-${header.name}` }, header.date
|
|
107
|
+
react_1.default.createElement(DropdownMenu_1.DropdownMenu, { options: moreActions, targetID: item.id, iconName: "more_vert", iconColor: theme.tableMoreIconColor, iconHoverColor: theme.tableHoverMoreIconColor, iconBgHoverColor: 'transparent' })))) : (react_1.default.createElement(Table_styles_1.TableCell, { key: `${item.id}-${header.name}` }, header.date
|
|
108
108
|
? (0, date_fns_1.format)(item[header.valueSource], 'dd-MM-yyyy')
|
|
109
109
|
: item[header.valueSource]))))))))))));
|
|
110
110
|
};
|
|
@@ -12,10 +12,11 @@ exports.TableHead = styled_components_1.default.thead `
|
|
|
12
12
|
tr:first-child {
|
|
13
13
|
position: sticky;
|
|
14
14
|
top: 0;
|
|
15
|
+
z-index:10;
|
|
15
16
|
}
|
|
16
17
|
`;
|
|
17
18
|
exports.TableHeaderCell = styled_components_1.default.th `
|
|
18
|
-
font-weight:
|
|
19
|
+
font-weight: normal;
|
|
19
20
|
text-align: left;
|
|
20
21
|
padding: 8px;
|
|
21
22
|
transition: 300ms;
|
|
@@ -23,7 +24,7 @@ exports.TableHeaderCell = styled_components_1.default.th `
|
|
|
23
24
|
background-color: ${(p) => p.isSorted
|
|
24
25
|
? p.theme.tableHeaderActiveBackground
|
|
25
26
|
: p.theme.tableHeaderBackground};
|
|
26
|
-
border-bottom:
|
|
27
|
+
border-bottom: 2px solid rgba(0, 0, 0, 0.14);
|
|
27
28
|
|
|
28
29
|
:hover {
|
|
29
30
|
background-color: ${(p) => p.isSorted
|
|
@@ -44,7 +45,7 @@ exports.OptionTableHeaderCell = styled_components_1.default.th `
|
|
|
44
45
|
transition: 300ms;
|
|
45
46
|
font-size: 14px;
|
|
46
47
|
background-color: ${(p) => p.theme.tableHeaderBackground};
|
|
47
|
-
border-bottom:
|
|
48
|
+
border-bottom: 2px solid rgba(0, 0, 0, 0.14);
|
|
48
49
|
`;
|
|
49
50
|
exports.TableHeaderSortIcon = styled_components_1.default.div `
|
|
50
51
|
width: 20px;
|
|
@@ -58,7 +59,7 @@ exports.TableRow = styled_components_1.default.tr `
|
|
|
58
59
|
background-color: ${(p) => p.active
|
|
59
60
|
? p.theme.tableCellActiveBackground
|
|
60
61
|
: p.theme.tableCellEvenBackground};
|
|
61
|
-
:nth-child(
|
|
62
|
+
:nth-child(odd) {
|
|
62
63
|
background-color: ${(p) => p.active
|
|
63
64
|
? p.theme.tableCellActiveBackground
|
|
64
65
|
: p.theme.tableCellBackground};
|
|
@@ -77,10 +78,9 @@ exports.TableRow = styled_components_1.default.tr `
|
|
|
77
78
|
`;
|
|
78
79
|
exports.TableCell = styled_components_1.default.td `
|
|
79
80
|
padding: 8px;
|
|
80
|
-
|
|
81
|
+
|
|
81
82
|
`;
|
|
82
83
|
exports.OptionTableCell = styled_components_1.default.td `
|
|
83
|
-
border-bottom: 1px solid ${(p) => p.theme.tableBorderColor};
|
|
84
84
|
text-align: center;
|
|
85
85
|
`;
|
|
86
86
|
exports.OptionTableCellWrapper = styled_components_1.default.div `
|
|
@@ -8,9 +8,9 @@ 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', }) => {
|
|
11
|
+
const Tile = ({ size = 'small', shadow = true, title, children, theme = Theme_1.mainTheme, backgroundColor = theme.contentBackground, height = 'auto', headerDivader = false }) => {
|
|
12
12
|
return (react_1.default.createElement(Tile_styles_1.TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height },
|
|
13
|
-
title && (react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, backgroundColor: backgroundColor })),
|
|
13
|
+
title && (react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, backgroundColor: backgroundColor, bottomDivader: headerDivader })),
|
|
14
14
|
children));
|
|
15
15
|
};
|
|
16
16
|
exports.Tile = Tile;
|
|
@@ -12,11 +12,11 @@ const Input_1 = require("../Input");
|
|
|
12
12
|
const Toogle_styles_1 = require("./Toogle.styles");
|
|
13
13
|
const Toogle = ({ theme = Theme_1.mainTheme, label, labelPosition = 'top', value = false, readOnly = false, name, size = 'medium', width = 'auto', handleClick, }) => {
|
|
14
14
|
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
|
|
15
|
-
react_1.default.createElement(Aligment_1.Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', justify: labelPosition === 'top' ? 'center' : 'flex-start', direction: labelPosition === 'top' ? 'column' : 'row', wrap: 'nowrap', width: width },
|
|
16
|
-
label && (react_1.default.createElement(Input_1.InputLabelElement, { size: size, labelPosition: labelPosition }, label)),
|
|
15
|
+
react_1.default.createElement(Aligment_1.Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', justify: labelPosition === 'top' ? 'center' : 'flex-start', direction: labelPosition === 'top' ? 'column-reverse' : 'row', wrap: 'nowrap', width: width },
|
|
17
16
|
react_1.default.createElement(Input_1.InputWrapper, { width: width },
|
|
18
17
|
react_1.default.createElement(Toogle_styles_1.ToogleElementWrapper, { size: size },
|
|
19
18
|
react_1.default.createElement(Toogle_styles_1.ToogleElement, { size: size, active: value, onClick: () => handleClick(!value) },
|
|
20
|
-
react_1.default.createElement(Toogle_styles_1.ToogleElementPoint, { size: size, active: value }))))
|
|
19
|
+
react_1.default.createElement(Toogle_styles_1.ToogleElementPoint, { size: size, active: value })))),
|
|
20
|
+
label && (react_1.default.createElement(Input_1.InputLabelElement, { size: size, labelPosition: labelPosition }, label)))));
|
|
21
21
|
};
|
|
22
22
|
exports.Toogle = Toogle;
|
|
@@ -11,17 +11,16 @@ exports.ToogleElementWrapper = styled_components_1.default.div `
|
|
|
11
11
|
`;
|
|
12
12
|
exports.ToogleElementPoint = styled_components_1.default.div `
|
|
13
13
|
background-color: ${(p) => p.theme.inputDefaultBackground};
|
|
14
|
-
width: 20px;
|
|
15
|
-
height: 20px;
|
|
16
14
|
border-radius: 50%;
|
|
17
15
|
top: 0px;
|
|
18
|
-
height: 22px;
|
|
19
|
-
width: 22px;
|
|
16
|
+
height: ${(p) => (p.size === 'small' ? '18px' : '22px')};
|
|
17
|
+
width: ${(p) => (p.size === 'small' ? '18px' : '22px')};
|
|
20
18
|
transition: 300ms;
|
|
21
19
|
position: absolute;
|
|
22
20
|
${(p) => p.active && `left:0px;`}
|
|
23
21
|
${(p) => !p.active && `right:0px;`}
|
|
24
|
-
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
|
22
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
|
23
|
+
|
|
25
24
|
`;
|
|
26
25
|
exports.ToogleElement = styled_components_1.default.div `
|
|
27
26
|
position: relative;
|
|
@@ -36,7 +35,8 @@ exports.ToogleElement = styled_components_1.default.div `
|
|
|
36
35
|
cursor: pointer;
|
|
37
36
|
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12),
|
|
38
37
|
inset 0 1px 2px rgba(0, 0, 0, 0.24);
|
|
39
|
-
height: 24px;
|
|
40
|
-
width: 40px;
|
|
41
|
-
border-radius: 12px;
|
|
38
|
+
height: ${(p) => (p.size === 'small' ? '20px' : '24px')};
|
|
39
|
+
width: ${(p) => (p.size === 'small' ? '30px' : '40px')};
|
|
40
|
+
border-radius: ${(p) => (p.size === 'small' ? '10px' : '12px')};
|
|
41
|
+
${(p) => p.size === 'small' && `margin:2px 0;`}
|
|
42
42
|
`;
|
|
@@ -67,13 +67,13 @@ exports.inputPadding = {
|
|
|
67
67
|
//TODO refactor this
|
|
68
68
|
exports.buttonPadding = {
|
|
69
69
|
small: `
|
|
70
|
-
padding: ${Theme_1.Theme.padding.s} ${Theme_1.Theme.padding.m};
|
|
70
|
+
padding: calc(${Theme_1.Theme.padding.s} + 1px ) ${Theme_1.Theme.padding.m};
|
|
71
71
|
`,
|
|
72
72
|
medium: `
|
|
73
|
-
padding: ${Theme_1.Theme.padding.m} ${Theme_1.Theme.padding.l};
|
|
73
|
+
padding: calc(${Theme_1.Theme.padding.m} + 1px ) ${Theme_1.Theme.padding.l};
|
|
74
74
|
`,
|
|
75
75
|
large: `
|
|
76
|
-
padding: ${Theme_1.Theme.padding.m} ${Theme_1.Theme.padding.l};
|
|
76
|
+
padding: calc(${Theme_1.Theme.padding.m} + 1px ) ${Theme_1.Theme.padding.l};
|
|
77
77
|
`,
|
|
78
78
|
};
|
|
79
79
|
//TODO refactor this
|
|
@@ -124,8 +124,8 @@ const setEyeTopPosition = (size) => {
|
|
|
124
124
|
exports.setEyeTopPosition = setEyeTopPosition;
|
|
125
125
|
exports.inputColorSchema = {
|
|
126
126
|
default: `
|
|
127
|
-
border-color: ${Theme_1.
|
|
128
|
-
background-color: ${
|
|
127
|
+
border-color: ${Theme_1.mainTheme.action};
|
|
128
|
+
background-color: ${Theme_1.mainTheme.inputFocusBackground};
|
|
129
129
|
`,
|
|
130
130
|
disabled: `
|
|
131
131
|
border-color: ${Theme_1.Theme.colors.gray_1};
|
|
@@ -134,7 +134,7 @@ exports.inputColorSchema = {
|
|
|
134
134
|
`,
|
|
135
135
|
error: `
|
|
136
136
|
border-color: ${Theme_1.Theme.colors.red};
|
|
137
|
-
background-color: ${
|
|
137
|
+
background-color: ${Theme_1.mainTheme.errorBackgroundColorHoverLight};
|
|
138
138
|
`,
|
|
139
139
|
};
|
|
140
140
|
exports.lableFontSize = {
|
package/dist/esm/Theme/Theme.js
CHANGED
|
@@ -67,6 +67,9 @@ export const mainTheme = {
|
|
|
67
67
|
buttonInverseHover: lighten(0.3, Theme.colors.primary),
|
|
68
68
|
disabledBackground: Theme.colors.gray_4,
|
|
69
69
|
disabledText: Theme.colors.gray_1,
|
|
70
|
+
errorBackgroundColor: Theme.colors.red,
|
|
71
|
+
errorBackgroundColorHover: lighten(0.3, Theme.colors.red),
|
|
72
|
+
errorBackgroundColorHoverLight: lighten(0.5, Theme.colors.red),
|
|
70
73
|
//icon
|
|
71
74
|
iconColor: Theme.colors.text,
|
|
72
75
|
iconHoverColor: Theme.colors.primary,
|
|
@@ -79,8 +82,8 @@ export const mainTheme = {
|
|
|
79
82
|
inputDefaultBackground: Theme.colors.white,
|
|
80
83
|
inputDefaultBorder: Theme.colors.gray_2,
|
|
81
84
|
inputDefaultTextColor: Theme.colors.text,
|
|
82
|
-
inputFocusBackground: Theme.colors.
|
|
83
|
-
inputFocusBorder: Theme.colors.
|
|
85
|
+
inputFocusBackground: lighten(0.45, Theme.colors.primary),
|
|
86
|
+
inputFocusBorder: Theme.colors.primary,
|
|
84
87
|
inputFocusTextColor: Theme.colors.text,
|
|
85
88
|
inputDisabledBackground: Theme.colors.gray_4,
|
|
86
89
|
inputDisabledBorder: Theme.colors.gray_1,
|
|
@@ -102,7 +105,8 @@ export const mainTheme = {
|
|
|
102
105
|
tableCellHoverBackground: lighten(0.3, Theme.colors.primary),
|
|
103
106
|
tableCellActiveBackground: lighten(0.3, Theme.colors.primary),
|
|
104
107
|
tableCellSortIcon: Theme.colors.primary,
|
|
105
|
-
tableMoreIconColor: Theme.colors.
|
|
108
|
+
tableMoreIconColor: Theme.colors.text,
|
|
109
|
+
tableHoverMoreIconColor: Theme.colors.primary,
|
|
106
110
|
// chips
|
|
107
111
|
chipsNeutralBackground: Theme.colors.primary,
|
|
108
112
|
chipsNeutralTextColor: Theme.colors.white,
|
|
@@ -3,11 +3,11 @@ import { ThemeProvider } from 'styled-components';
|
|
|
3
3
|
import { mainTheme } from '../../Theme';
|
|
4
4
|
import { ButtonElement, ButtonLoader } from './Button.styles';
|
|
5
5
|
import { Loader } from '../Loader';
|
|
6
|
-
export const Button = ({ text = 'Click me', mode = 'primary', size = 'medium', right = false, left = false, theme = mainTheme, disabled = false, onClick, loader = false, }) => {
|
|
6
|
+
export const Button = ({ text = 'Click me', mode = 'primary', size = 'medium', right = false, left = false, theme = mainTheme, disabled = false, onClick, loader = false, errorVariant = false, }) => {
|
|
7
7
|
const handleClick = () => {
|
|
8
|
-
|
|
8
|
+
!disabled && !loader && onClick();
|
|
9
9
|
};
|
|
10
10
|
return (React.createElement(ThemeProvider, { theme: theme },
|
|
11
|
-
React.createElement(ButtonElement, { mode: mode, size: size, right: right, left: left, disabled: disabled, onClick: handleClick, loader: loader }, loader ? (React.createElement(ButtonLoader, { size: size },
|
|
11
|
+
React.createElement(ButtonElement, { mode: mode, size: size, right: right, left: left, disabled: disabled, onClick: handleClick, loader: loader, errorVariant: errorVariant }, loader ? (React.createElement(ButtonLoader, { size: size },
|
|
12
12
|
React.createElement(Loader, { size: "small", color: mode === 'primary' ? theme.buttonText : theme.action }))) : (text))));
|
|
13
13
|
};
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { Theme } from '../../Theme/Theme';
|
|
4
4
|
export const ButtonElement = styled.button `
|
|
5
5
|
align-items: center;
|
|
6
|
-
border-radius: ${Theme.borderRadius.
|
|
6
|
+
border-radius: ${Theme.borderRadius.m};
|
|
7
7
|
box-sizing: border-box;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
display: flex;
|
|
@@ -14,53 +14,53 @@ export const ButtonElement = styled.button `
|
|
|
14
14
|
overflow: hidden;
|
|
15
15
|
transition: 300ms;
|
|
16
16
|
white-space: nowrap;
|
|
17
|
-
|
|
18
17
|
${(p) => p.mode === 'primary' &&
|
|
19
18
|
`background-color: ${p.theme.action};
|
|
20
|
-
border:
|
|
19
|
+
border: none;
|
|
21
20
|
color: ${p.theme.buttonText};
|
|
21
|
+
${p.errorVariant &&
|
|
22
|
+
`background-color:${p.theme.errorBackgroundColor};
|
|
23
|
+
border:none;`}
|
|
24
|
+
|
|
22
25
|
&:disabled{
|
|
23
26
|
color: ${p.theme.disabledText};
|
|
24
27
|
background-color: ${p.theme.disabledBackground};
|
|
25
28
|
}
|
|
26
29
|
`}
|
|
30
|
+
|
|
27
31
|
${(p) => p.mode === 'secondary' &&
|
|
28
32
|
`background-color: transparent;
|
|
29
|
-
border:
|
|
33
|
+
border: none;
|
|
30
34
|
color: ${p.theme.action};
|
|
35
|
+
${p.errorVariant &&
|
|
36
|
+
`color:${p.theme.errorBackgroundColor};
|
|
37
|
+
border:none;`}
|
|
31
38
|
&:disabled{
|
|
32
39
|
color: ${p.theme.disabledText};
|
|
33
40
|
border: 1px solid ${p.theme.disabledText};
|
|
34
41
|
}
|
|
35
42
|
`}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
&:disabled{
|
|
41
|
-
color: ${p.theme.disabledText};
|
|
42
|
-
}
|
|
43
|
-
`}
|
|
44
|
-
${(p) => setButtonSize(p.size, p.loader)}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
${(p) => setButtonSize(p.size, p.loader)}
|
|
45
47
|
&:hover {
|
|
46
48
|
transition: 300ms;
|
|
47
49
|
${(p) => p.mode === 'primary' &&
|
|
48
50
|
`background-color: ${p.theme.buttonPrimaryHover};
|
|
51
|
+
${p.errorVariant &&
|
|
52
|
+
`background-color:${p.theme.errorBackgroundColorHover};`}
|
|
49
53
|
&:disabled {
|
|
50
54
|
background-color: ${p.theme.disabledBackground};
|
|
51
55
|
}`}
|
|
52
56
|
|
|
53
57
|
${(p) => p.mode === 'secondary' &&
|
|
54
58
|
`background-color: ${p.theme.buttonSecondaryHover};
|
|
59
|
+
${p.errorVariant &&
|
|
60
|
+
`background-color:${p.theme.errorBackgroundColorHoverLight};`}
|
|
55
61
|
&:disabled {
|
|
56
62
|
background-color: transparent;
|
|
57
63
|
}`};
|
|
58
|
-
|
|
59
|
-
${(p) => p.mode === 'inverse' &&
|
|
60
|
-
`background-color: ${p.theme.buttonInverseHover};
|
|
61
|
-
&:disabled{
|
|
62
|
-
background-color: transparent;
|
|
63
|
-
}`}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
&:disabled {
|
|
@@ -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, { mode: '
|
|
26
|
+
additionalType === 'button' && (React.createElement(Button, { errorVariant: true, mode: 'secondary', onClick: additionAction, text: labelAdditional, left: isMultiButtons() })),
|
|
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() })),
|
|
@@ -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, }) => {
|
|
6
|
-
return (React.createElement(CardElement, { height: height },
|
|
7
|
-
(title || actionLabel) && (React.createElement(ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, iconColor: iconColor, iconHoverColor: iconHoverColor })),
|
|
8
|
-
React.createElement(CardContent,
|
|
5
|
+
export const Card = ({ children, title, actionLabel, theme = mainTheme, iconColor = theme.textColor, iconHoverColor = theme.action, handleClick, handleBack, height, options, shadow = true, headerDivader = false }) => {
|
|
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 })),
|
|
8
|
+
React.createElement(CardContent, null, children)));
|
|
9
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import { Theme } from
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Theme } from '../../Theme/Theme';
|
|
3
3
|
export const CardElement = styled.div `
|
|
4
4
|
box-sizing: border-box;
|
|
5
5
|
display: flex;
|
|
@@ -7,15 +7,14 @@ export const CardElement = styled.div `
|
|
|
7
7
|
width: 100%;
|
|
8
8
|
background-color: ${Theme.colors.white};
|
|
9
9
|
border-radius: ${Theme.borderRadius.m};
|
|
10
|
-
height: ${p => p.height ? p.height : '100%'};
|
|
11
|
-
box-shadow: ${Theme.shadow.s}
|
|
10
|
+
height: ${(p) => (p.height ? p.height : '100%')};
|
|
11
|
+
${(p) => p.shadow && `box-shadow: ${Theme.shadow.s};`}
|
|
12
12
|
`;
|
|
13
13
|
export const CardContent = styled.div `
|
|
14
|
-
box-sizing: border-box;
|
|
14
|
+
box-sizing: border-box;
|
|
15
15
|
display: flex;
|
|
16
|
-
padding:
|
|
16
|
+
padding: ${Theme.padding.l};
|
|
17
17
|
width: 100%;
|
|
18
18
|
flex-direction: row;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
`;
|
|
19
|
+
|
|
20
|
+
`;
|
|
@@ -24,7 +24,7 @@ export const DropdownMenuContent = styled.div `
|
|
|
24
24
|
width:100%;
|
|
25
25
|
`;
|
|
26
26
|
export const DropdownMenuOption = styled.div `
|
|
27
|
-
padding: ${Theme.padding.s} ${Theme.padding.
|
|
27
|
+
padding: ${Theme.padding.s} ${Theme.padding.m};
|
|
28
28
|
text-align:left;
|
|
29
29
|
min-width:80px;
|
|
30
30
|
cursor: pointer;
|
|
@@ -5,7 +5,8 @@ import { TextHeader } from '../Typography';
|
|
|
5
5
|
import { Theme, mainTheme } from '../../Theme';
|
|
6
6
|
import { Button } from '../Button';
|
|
7
7
|
import { DropdownMenu } from '../DropdownMenu';
|
|
8
|
-
|
|
8
|
+
import { ElementHeaderWrapper } 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
10
|
const leftSide = () => {
|
|
10
11
|
if (title) {
|
|
11
12
|
return (React.createElement(Aligment, { align: "center", direction: "row", width: "auto" },
|
|
@@ -26,7 +27,7 @@ export const ElementHeader = ({ title, actionLabel = '', handleClose, handleClic
|
|
|
26
27
|
options && (React.createElement(DropdownMenu, { options: options, right: true, iconColor: iconColor }))));
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
|
-
return (React.createElement(
|
|
30
|
+
return (React.createElement(ElementHeaderWrapper, { justify: !title && !children ? 'flex-end' : 'space-between', vPadding: Theme.padding.m, hPadding: Theme.padding.l, backgroundColor: backgroundColor, bottomDivader: bottomDivader },
|
|
30
31
|
React.createElement(React.Fragment, null,
|
|
31
32
|
leftSide(),
|
|
32
33
|
rightSide())));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Aligment } from '../Aligment';
|
|
3
|
+
export const ElementHeaderWrapper = styled(Aligment) `
|
|
4
|
+
width: 100%;
|
|
5
|
+
${(p) => p.bottomDivader &&
|
|
6
|
+
`
|
|
7
|
+
border-bottom: 2px solid rgba(0, 0, 0, 0.14);
|
|
8
|
+
overflow-x:hidden;
|
|
9
|
+
`}
|
|
10
|
+
`;
|
|
11
|
+
// box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
|
@@ -17,7 +17,7 @@ export const File = ({ label, labelPosition = 'top', name, disabled = false, mul
|
|
|
17
17
|
React.createElement(InputWrapper, { width: width },
|
|
18
18
|
React.createElement(Aligment, { gap: 10, wrap: "nowrap" },
|
|
19
19
|
React.createElement(Field, { inputSize: size, disabled: disabled, width: width, active: false, error: error, onClick: openFileSelector }, fileValue ? fileValue.name : placeholder),
|
|
20
|
-
React.createElement(Button, { size: size, mode: "
|
|
20
|
+
React.createElement(Button, { size: size, mode: "secondary", onClick: openFileSelector, text: "Wybierz plik" })),
|
|
21
21
|
React.createElement(HiddenField, { type: "file", name: name, onChange: (e) => handleSelect(e), ref: fileRef, accept: accept, multiple: multiple }),
|
|
22
22
|
error && React.createElement(InputErrorMsg, null, error))));
|
|
23
23
|
};
|
|
@@ -32,11 +32,11 @@ export const Form = ({ formData, size = 'medium', read }) => {
|
|
|
32
32
|
const selectType = (item) => {
|
|
33
33
|
switch (item.type) {
|
|
34
34
|
case 'text':
|
|
35
|
-
return (React.createElement(Input, { label: item.label, value: item.value, name: item.name, type: "text", size: size, handleChange: onChangeHandler, readOnly: read }));
|
|
35
|
+
return (React.createElement(Input, { label: item.label, value: item.value, name: item.name, type: "text", size: size, handleChange: onChangeHandler, readOnly: read, autoFocus: item.autofocus, handleSubmit: item.submit }));
|
|
36
36
|
case 'number':
|
|
37
|
-
return (React.createElement(Input, { label: item.label, value: item.value, name: item.name, type: "number", size: size, min: item.min, max: item.max, step: item.step, handleChange: onIntChangeHandler, readOnly: read }));
|
|
37
|
+
return (React.createElement(Input, { label: item.label, value: item.value, name: item.name, type: "number", size: size, min: item.min, max: item.max, step: item.step, handleChange: onIntChangeHandler, readOnly: read, autoFocus: item.autofocus, handleSubmit: item.submit }));
|
|
38
38
|
case 'increase':
|
|
39
|
-
return (React.createElement(Input, { type: "increase", label: item.label, value: item.value, name: item.name, size: size, handleChange: onIntChangeHandler, min: item.min, max: item.max, step: item.step, readOnly: read }));
|
|
39
|
+
return (React.createElement(Input, { type: "increase", label: item.label, value: item.value, name: item.name, size: size, handleChange: onIntChangeHandler, min: item.min, max: item.max, step: item.step, readOnly: read, autoFocus: item.autofocus, handleSubmit: item.submit }));
|
|
40
40
|
case 'file':
|
|
41
41
|
return (React.createElement(File, { label: item.label, fileValue: item.value, name: item.name, size: size, handleChange: onFileHandler, readOnly: read }));
|
|
42
42
|
}
|
|
@@ -62,7 +62,7 @@ export const InputReadOnlyElement = styled.div `
|
|
|
62
62
|
`;
|
|
63
63
|
export const InputLabelElement = styled(TextLabel) `
|
|
64
64
|
${(p) => p.labelPosition === 'top' && `margin-bottom: ${Theme.padding.s};`}
|
|
65
|
-
${(p) => p.labelPosition === 'left' && `margin-
|
|
65
|
+
${(p) => p.labelPosition === 'left' && `margin-left: ${Theme.padding.s};`}
|
|
66
66
|
`;
|
|
67
67
|
export const InputWrapper = styled.div `
|
|
68
68
|
display: flex;
|
|
@@ -5,11 +5,11 @@ 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 = ({ theme = mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm = 'Save', labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, }) => {
|
|
8
|
+
export const Modal = ({ theme = mainTheme, children, title, handleConfirm, handleClose, handleAdditional, labelConfirm = 'Save', labelClose = 'Cancel', labelAdditional, submitDisabled, size = 'small', submitLoader = false, additionalType = 'button', additionalValue = false, headerDivader = false }) => {
|
|
9
9
|
return (React.createElement(ThemeProvider, { theme: theme },
|
|
10
10
|
React.createElement(ModalOverlayer, null,
|
|
11
11
|
React.createElement(ModalElement, { size: size },
|
|
12
|
-
React.createElement(ElementHeader, { title: title, handleClose: handleClose }),
|
|
12
|
+
React.createElement(ElementHeader, { title: title, handleClose: handleClose, bottomDivader: headerDivader }),
|
|
13
13
|
React.createElement(ScrollCotainer, null, children),
|
|
14
14
|
React.createElement(ButtonsFooter, { handleConfirm: handleConfirm, handleClose: handleClose, handleAdditional: handleAdditional, labelConfirm: labelConfirm, labelClose: labelClose, labelAdditional: labelAdditional, submitDisabled: submitDisabled, submitLoader: submitLoader, additionalType: additionalType, additionalValue: additionalValue })))));
|
|
15
15
|
};
|
|
@@ -7,6 +7,6 @@ export const Section = ({ title, children, titlePosition = 'left', noPadding = f
|
|
|
7
7
|
return (React.createElement(SectionElement, { backgroundColor: backgroundColor },
|
|
8
8
|
title && (React.createElement(SectionTitle, { titlePosition: titlePosition, noPadding: noPadding, withAction: titlePosition === 'left' && !!action },
|
|
9
9
|
React.createElement(TextSubHeader, null, title),
|
|
10
|
-
titlePosition === 'left' && !!action && (React.createElement(Button, { text: actionLabel, onClick: action, size: "small", mode: "
|
|
10
|
+
titlePosition === 'left' && !!action && (React.createElement(Button, { text: actionLabel, onClick: action, size: "small", mode: "secondary" })))),
|
|
11
11
|
React.createElement(SectionContent, { noPadding: noPadding }, children)));
|
|
12
12
|
};
|
|
@@ -78,7 +78,7 @@ hover = true, selectable = true, sortable = true, sort = {
|
|
|
78
78
|
: 'arrow_drop_up', iconColor: theme.tableCellSortIcon, size: 20 })))))))))),
|
|
79
79
|
React.createElement("tbody", null, tableProps.elements.map((item) => (React.createElement(TableRow, { key: item.id, hover: hover, active: selectedRow === item.id, selectable: selectable, onClick: () => handleRowClick(item.id) }, tableProps.headers.map((header) => (React.createElement(React.Fragment, null, header.action ? (React.createElement(OptionTableCell, { key: `${item.id}-${header.name}-action` },
|
|
80
80
|
React.createElement(OptionTableCellWrapper, { onClick: (e) => e.stopPropagation() },
|
|
81
|
-
React.createElement(DropdownMenu, { options: moreActions, targetID: item.id, iconName: "more_vert", iconColor: theme.tableMoreIconColor })))) : (React.createElement(TableCell, { key: `${item.id}-${header.name}` }, header.date
|
|
81
|
+
React.createElement(DropdownMenu, { options: moreActions, targetID: item.id, iconName: "more_vert", iconColor: theme.tableMoreIconColor, iconHoverColor: theme.tableHoverMoreIconColor, iconBgHoverColor: 'transparent' })))) : (React.createElement(TableCell, { key: `${item.id}-${header.name}` }, header.date
|
|
82
82
|
? format(item[header.valueSource], 'dd-MM-yyyy')
|
|
83
83
|
: item[header.valueSource]))))))))))));
|
|
84
84
|
};
|
|
@@ -6,10 +6,11 @@ export const TableHead = styled.thead `
|
|
|
6
6
|
tr:first-child {
|
|
7
7
|
position: sticky;
|
|
8
8
|
top: 0;
|
|
9
|
+
z-index:10;
|
|
9
10
|
}
|
|
10
11
|
`;
|
|
11
12
|
export const TableHeaderCell = styled.th `
|
|
12
|
-
font-weight:
|
|
13
|
+
font-weight: normal;
|
|
13
14
|
text-align: left;
|
|
14
15
|
padding: 8px;
|
|
15
16
|
transition: 300ms;
|
|
@@ -17,7 +18,7 @@ export const TableHeaderCell = styled.th `
|
|
|
17
18
|
background-color: ${(p) => p.isSorted
|
|
18
19
|
? p.theme.tableHeaderActiveBackground
|
|
19
20
|
: p.theme.tableHeaderBackground};
|
|
20
|
-
border-bottom:
|
|
21
|
+
border-bottom: 2px solid rgba(0, 0, 0, 0.14);
|
|
21
22
|
|
|
22
23
|
:hover {
|
|
23
24
|
background-color: ${(p) => p.isSorted
|
|
@@ -38,7 +39,7 @@ export const OptionTableHeaderCell = styled.th `
|
|
|
38
39
|
transition: 300ms;
|
|
39
40
|
font-size: 14px;
|
|
40
41
|
background-color: ${(p) => p.theme.tableHeaderBackground};
|
|
41
|
-
border-bottom:
|
|
42
|
+
border-bottom: 2px solid rgba(0, 0, 0, 0.14);
|
|
42
43
|
`;
|
|
43
44
|
export const TableHeaderSortIcon = styled.div `
|
|
44
45
|
width: 20px;
|
|
@@ -52,7 +53,7 @@ export const TableRow = styled.tr `
|
|
|
52
53
|
background-color: ${(p) => p.active
|
|
53
54
|
? p.theme.tableCellActiveBackground
|
|
54
55
|
: p.theme.tableCellEvenBackground};
|
|
55
|
-
:nth-child(
|
|
56
|
+
:nth-child(odd) {
|
|
56
57
|
background-color: ${(p) => p.active
|
|
57
58
|
? p.theme.tableCellActiveBackground
|
|
58
59
|
: p.theme.tableCellBackground};
|
|
@@ -71,10 +72,9 @@ export const TableRow = styled.tr `
|
|
|
71
72
|
`;
|
|
72
73
|
export const TableCell = styled.td `
|
|
73
74
|
padding: 8px;
|
|
74
|
-
|
|
75
|
+
|
|
75
76
|
`;
|
|
76
77
|
export const OptionTableCell = styled.td `
|
|
77
|
-
border-bottom: 1px solid ${(p) => p.theme.tableBorderColor};
|
|
78
78
|
text-align: center;
|
|
79
79
|
`;
|
|
80
80
|
export const OptionTableCellWrapper = styled.div `
|
|
@@ -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', }) => {
|
|
5
|
+
export const Tile = ({ size = 'small', shadow = true, title, children, theme = mainTheme, backgroundColor = theme.contentBackground, height = 'auto', headerDivader = false }) => {
|
|
6
6
|
return (React.createElement(TileElement, { size: size, shadow: shadow, backgroundColor: backgroundColor, height: height },
|
|
7
|
-
title && (React.createElement(ElementHeader, { title: title, backgroundColor: backgroundColor })),
|
|
7
|
+
title && (React.createElement(ElementHeader, { title: title, backgroundColor: backgroundColor, bottomDivader: headerDivader })),
|
|
8
8
|
children));
|
|
9
9
|
};
|
|
@@ -6,10 +6,10 @@ import { InputLabelElement, InputWrapper } from '../Input';
|
|
|
6
6
|
import { ToogleElement, ToogleElementPoint, ToogleElementWrapper, } from './Toogle.styles';
|
|
7
7
|
export const Toogle = ({ theme = mainTheme, label, labelPosition = 'top', value = false, readOnly = false, name, size = 'medium', width = 'auto', handleClick, }) => {
|
|
8
8
|
return (React.createElement(ThemeProvider, { theme: theme },
|
|
9
|
-
React.createElement(Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', justify: labelPosition === 'top' ? 'center' : 'flex-start', direction: labelPosition === 'top' ? 'column' : 'row', wrap: 'nowrap', width: width },
|
|
10
|
-
label && (React.createElement(InputLabelElement, { size: size, labelPosition: labelPosition }, label)),
|
|
9
|
+
React.createElement(Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', justify: labelPosition === 'top' ? 'center' : 'flex-start', direction: labelPosition === 'top' ? 'column-reverse' : 'row', wrap: 'nowrap', width: width },
|
|
11
10
|
React.createElement(InputWrapper, { width: width },
|
|
12
11
|
React.createElement(ToogleElementWrapper, { size: size },
|
|
13
12
|
React.createElement(ToogleElement, { size: size, active: value, onClick: () => handleClick(!value) },
|
|
14
|
-
React.createElement(ToogleElementPoint, { size: size, active: value }))))
|
|
13
|
+
React.createElement(ToogleElementPoint, { size: size, active: value })))),
|
|
14
|
+
label && (React.createElement(InputLabelElement, { size: size, labelPosition: labelPosition }, label)))));
|
|
15
15
|
};
|
|
@@ -5,17 +5,16 @@ export const ToogleElementWrapper = styled.div `
|
|
|
5
5
|
`;
|
|
6
6
|
export const ToogleElementPoint = styled.div `
|
|
7
7
|
background-color: ${(p) => p.theme.inputDefaultBackground};
|
|
8
|
-
width: 20px;
|
|
9
|
-
height: 20px;
|
|
10
8
|
border-radius: 50%;
|
|
11
9
|
top: 0px;
|
|
12
|
-
height: 22px;
|
|
13
|
-
width: 22px;
|
|
10
|
+
height: ${(p) => (p.size === 'small' ? '18px' : '22px')};
|
|
11
|
+
width: ${(p) => (p.size === 'small' ? '18px' : '22px')};
|
|
14
12
|
transition: 300ms;
|
|
15
13
|
position: absolute;
|
|
16
14
|
${(p) => p.active && `left:0px;`}
|
|
17
15
|
${(p) => !p.active && `right:0px;`}
|
|
18
|
-
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
|
16
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
|
17
|
+
|
|
19
18
|
`;
|
|
20
19
|
export const ToogleElement = styled.div `
|
|
21
20
|
position: relative;
|
|
@@ -30,7 +29,8 @@ export const ToogleElement = styled.div `
|
|
|
30
29
|
cursor: pointer;
|
|
31
30
|
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12),
|
|
32
31
|
inset 0 1px 2px rgba(0, 0, 0, 0.24);
|
|
33
|
-
height: 24px;
|
|
34
|
-
width: 40px;
|
|
35
|
-
border-radius: 12px;
|
|
32
|
+
height: ${(p) => (p.size === 'small' ? '20px' : '24px')};
|
|
33
|
+
width: ${(p) => (p.size === 'small' ? '30px' : '40px')};
|
|
34
|
+
border-radius: ${(p) => (p.size === 'small' ? '10px' : '12px')};
|
|
35
|
+
${(p) => p.size === 'small' && `margin:2px 0;`}
|
|
36
36
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { lighten } from 'polished';
|
|
2
|
-
import { Theme } from '../../Theme';
|
|
2
|
+
import { Theme, mainTheme } from '../../Theme';
|
|
3
3
|
export const defaultStyles = `
|
|
4
4
|
box-sizing: border-box;
|
|
5
5
|
background-color: ${Theme.colors.white};
|
|
@@ -64,13 +64,13 @@ export const inputPadding = {
|
|
|
64
64
|
//TODO refactor this
|
|
65
65
|
export const buttonPadding = {
|
|
66
66
|
small: `
|
|
67
|
-
padding: ${Theme.padding.s} ${Theme.padding.m};
|
|
67
|
+
padding: calc(${Theme.padding.s} + 1px ) ${Theme.padding.m};
|
|
68
68
|
`,
|
|
69
69
|
medium: `
|
|
70
|
-
padding: ${Theme.padding.m} ${Theme.padding.l};
|
|
70
|
+
padding: calc(${Theme.padding.m} + 1px ) ${Theme.padding.l};
|
|
71
71
|
`,
|
|
72
72
|
large: `
|
|
73
|
-
padding: ${Theme.padding.m} ${Theme.padding.l};
|
|
73
|
+
padding: calc(${Theme.padding.m} + 1px ) ${Theme.padding.l};
|
|
74
74
|
`,
|
|
75
75
|
};
|
|
76
76
|
//TODO refactor this
|
|
@@ -115,8 +115,8 @@ export const setEyeTopPosition = (size) => {
|
|
|
115
115
|
};
|
|
116
116
|
export const inputColorSchema = {
|
|
117
117
|
default: `
|
|
118
|
-
border-color: ${
|
|
119
|
-
background-color: ${
|
|
118
|
+
border-color: ${mainTheme.action};
|
|
119
|
+
background-color: ${mainTheme.inputFocusBackground};
|
|
120
120
|
`,
|
|
121
121
|
disabled: `
|
|
122
122
|
border-color: ${Theme.colors.gray_1};
|
|
@@ -125,7 +125,7 @@ export const inputColorSchema = {
|
|
|
125
125
|
`,
|
|
126
126
|
error: `
|
|
127
127
|
border-color: ${Theme.colors.red};
|
|
128
|
-
background-color: ${
|
|
128
|
+
background-color: ${mainTheme.errorBackgroundColorHoverLight};
|
|
129
129
|
`,
|
|
130
130
|
};
|
|
131
131
|
export const lableFontSize = {
|
|
@@ -65,6 +65,9 @@ export declare const mainTheme: {
|
|
|
65
65
|
buttonInverseHover: string;
|
|
66
66
|
disabledBackground: string;
|
|
67
67
|
disabledText: string;
|
|
68
|
+
errorBackgroundColor: string;
|
|
69
|
+
errorBackgroundColorHover: string;
|
|
70
|
+
errorBackgroundColorHoverLight: string;
|
|
68
71
|
iconColor: string;
|
|
69
72
|
iconHoverColor: string;
|
|
70
73
|
iconBgColor: string;
|
|
@@ -95,6 +98,7 @@ export declare const mainTheme: {
|
|
|
95
98
|
tableCellActiveBackground: string;
|
|
96
99
|
tableCellSortIcon: string;
|
|
97
100
|
tableMoreIconColor: string;
|
|
101
|
+
tableHoverMoreIconColor: string;
|
|
98
102
|
chipsNeutralBackground: string;
|
|
99
103
|
chipsNeutralTextColor: string;
|
|
100
104
|
chipsNeutralHoverBackground: string;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
interface ICardElementProps {
|
|
2
|
+
shadow: boolean;
|
|
2
3
|
height?: string;
|
|
3
4
|
}
|
|
4
5
|
export declare const CardElement: import("styled-components").StyledComponent<"div", any, ICardElementProps, never>;
|
|
5
|
-
|
|
6
|
-
soloMode: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const CardContent: import("styled-components").StyledComponent<"div", any, ICardContentStyles, never>;
|
|
6
|
+
export declare const CardContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
7
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IAligmentProps } from '../Aligment/Aligment.styles';
|
|
2
|
+
interface IElementHeaderWrapperProps extends IAligmentProps {
|
|
3
|
+
bottomDivader: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const ElementHeaderWrapper: import("styled-components").StyledComponent<"div", any, IAligmentProps & IElementHeaderWrapperProps, never>;
|
|
6
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ButtonMode = 'primary' | 'secondary'
|
|
1
|
+
export type ButtonMode = 'primary' | 'secondary';
|
|
2
2
|
export type InputSize = 'large' | 'medium' | 'small';
|
|
3
3
|
export type InputType = "text" | "password" | "email" | "number" | "increase";
|
|
4
4
|
export type LabelPosition = "top" | "left";
|