venice-ui 1.0.39 → 1.0.40
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 +17 -0
- package/dist/cjs/components/Dropdown/DropdownElements.js +3 -3
- package/dist/cjs/components/Input/Input.js +11 -9
- package/dist/cjs/components/Input/Input.styles.js +22 -6
- package/dist/cjs/components/Modal/Modal.js +10 -8
- package/dist/cjs/components/Modal/Modal.styles.js +1 -1
- package/dist/cjs/components/common/inputStyles.js +2 -2
- package/dist/esm/Theme/Theme.js +17 -0
- package/dist/esm/components/Dropdown/DropdownElements.js +4 -4
- package/dist/esm/components/Input/Input.js +12 -10
- package/dist/esm/components/Input/Input.styles.js +23 -7
- package/dist/esm/components/Modal/Modal.js +11 -9
- package/dist/esm/components/Modal/Modal.styles.js +1 -1
- package/dist/esm/components/common/inputStyles.js +1 -1
- package/dist/types/Theme/Theme.d.ts +14 -0
- package/dist/types/components/Input/Input.d.ts +1 -0
- package/dist/types/components/Input/Input.styles.d.ts +1 -0
- package/dist/types/components/Modal/Modal.d.ts +2 -0
- package/dist/types/components/Modal/Modal.styles.d.ts +1 -0
- package/dist/types/components/common/inputStyles.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/Theme/Theme.js
CHANGED
|
@@ -60,4 +60,21 @@ exports.mainTheme = {
|
|
|
60
60
|
buttonInverseHover: (0, polished_1.lighten)(0.3, exports.Theme.colors.primary),
|
|
61
61
|
disabledBackground: exports.Theme.colors.disableBackground,
|
|
62
62
|
disabledText: exports.Theme.colors.disableText,
|
|
63
|
+
//text
|
|
64
|
+
textColor: exports.Theme.colors.text,
|
|
65
|
+
// input
|
|
66
|
+
inputDefaultBackground: exports.Theme.colors.white,
|
|
67
|
+
inputDefaultBorder: exports.Theme.colors.gray_1,
|
|
68
|
+
inputDefaultTextColor: exports.Theme.colors.text,
|
|
69
|
+
inputFocusBackground: (0, polished_1.lighten)(0.4, exports.Theme.colors.primary),
|
|
70
|
+
inputFocusBorder: exports.Theme.colors.primary,
|
|
71
|
+
inputFocusTextColor: exports.Theme.colors.text,
|
|
72
|
+
inputDisabledBackground: exports.Theme.colors.disableBackground,
|
|
73
|
+
inputDisabledBorder: exports.Theme.colors.disableText,
|
|
74
|
+
inputDisabledTextColor: exports.Theme.colors.disableText,
|
|
75
|
+
inputErrorBackground: (0, polished_1.lighten)(0.5, exports.Theme.colors.red),
|
|
76
|
+
inputErrorBorder: exports.Theme.colors.red,
|
|
77
|
+
inputErrorTextColor: exports.Theme.colors.red,
|
|
78
|
+
// global
|
|
79
|
+
contentBackground: exports.Theme.colors.white
|
|
63
80
|
};
|
|
@@ -18,15 +18,15 @@ exports.Field = styled_components_1.default.div `
|
|
|
18
18
|
height: ${(p) => (0, common_1.setFieldHeight)(p.inputSize)};
|
|
19
19
|
${(p) => p.error &&
|
|
20
20
|
`
|
|
21
|
-
${common_1.
|
|
21
|
+
${common_1.inputColorSchema.error}
|
|
22
22
|
`}
|
|
23
23
|
${(p) => p.active &&
|
|
24
24
|
`
|
|
25
|
-
${common_1.
|
|
25
|
+
${common_1.inputColorSchema.default}
|
|
26
26
|
`}
|
|
27
27
|
${(p) => p.disabled &&
|
|
28
28
|
`
|
|
29
|
-
${common_1.
|
|
29
|
+
${common_1.inputColorSchema.disabled}
|
|
30
30
|
cursor: not-allowed;
|
|
31
31
|
`}
|
|
32
32
|
`;
|
|
@@ -24,12 +24,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Input = void 0;
|
|
27
|
-
const Aligment_1 = require("../Aligment");
|
|
28
27
|
const react_1 = __importStar(require("react"));
|
|
28
|
+
const styled_components_1 = require("styled-components");
|
|
29
|
+
const Aligment_1 = require("../Aligment");
|
|
29
30
|
const Input_styles_1 = require("./Input.styles");
|
|
30
31
|
const Icons_1 = require("../Icons");
|
|
31
32
|
const Theme_1 = require("../../Theme");
|
|
32
|
-
const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disabled = false, size = 'medium', handleChange, width, error, placeholder, min, max, step, }) => {
|
|
33
|
+
const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disabled = false, size = 'medium', handleChange, width, error, placeholder, min, max, step, theme = Theme_1.mainTheme, }) => {
|
|
33
34
|
const onChange = (e) => {
|
|
34
35
|
handleChange(name, e.target.value);
|
|
35
36
|
};
|
|
@@ -38,12 +39,13 @@ const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disab
|
|
|
38
39
|
const tooglePassword = () => {
|
|
39
40
|
setShowPassword(!showPassword);
|
|
40
41
|
};
|
|
41
|
-
return (react_1.default.createElement(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
react_1.default.createElement(Input_styles_1.
|
|
45
|
-
|
|
46
|
-
react_1.default.createElement(
|
|
47
|
-
|
|
42
|
+
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
|
|
43
|
+
react_1.default.createElement(Aligment_1.Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', direction: labelPosition === 'top' ? 'column' : 'row', wrap: 'nowrap' },
|
|
44
|
+
label && (react_1.default.createElement(Input_styles_1.InputLabelElement, { size: size, labelPosition: labelPosition }, label)),
|
|
45
|
+
react_1.default.createElement(Input_styles_1.InputWrapper, { width: width },
|
|
46
|
+
react_1.default.createElement(Input_styles_1.InputTextElement, { inputSize: size, type: showPassword ? 'text' : inputType, disabled: disabled, name: name, value: value, onChange: onChange, error: error, placeholder: placeholder, min: min, max: max, step: step }),
|
|
47
|
+
inputType === 'password' && (react_1.default.createElement(Input_styles_1.EyeIconWrapper, { size: size },
|
|
48
|
+
react_1.default.createElement(Icons_1.Icon, { name: showPassword ? 'visability_off' : 'visibility', size: 24, onClick: tooglePassword, color: theme.inputDefaultTextColor, noHover: true }))),
|
|
49
|
+
error && react_1.default.createElement(Input_styles_1.InputErrorMsg, null, error)))));
|
|
48
50
|
};
|
|
49
51
|
exports.Input = Input;
|
|
@@ -10,20 +10,36 @@ const Theme_1 = require("../../Theme");
|
|
|
10
10
|
const Typography_1 = require("../Typography");
|
|
11
11
|
exports.InputTextElement = styled_components_1.default.input `
|
|
12
12
|
position:relative;
|
|
13
|
-
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
background-color: ${p => p.theme.inputDefaultBackground};
|
|
15
|
+
border: 1px solid ${p => p.theme.inputDefaultBorder};
|
|
16
|
+
border-radius: ${Theme_1.Theme.borderRadius.m};
|
|
17
|
+
width: 100%;
|
|
18
|
+
font-family: "Lato", sans-serif;
|
|
19
|
+
outline: 0;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
text-overflow: ellipsis;
|
|
23
|
+
|
|
14
24
|
${(p) => (0, common_1.setSize)(p.inputSize)}
|
|
15
|
-
color: ${
|
|
25
|
+
color: ${p => p.theme.inputDefaultTextColor};
|
|
16
26
|
width: ${p => p.width ? p.width : '100%'};
|
|
17
27
|
${p => p.type === 'password' && `padding-right:32px;`}
|
|
18
28
|
:focus {
|
|
19
|
-
${
|
|
29
|
+
border-color: ${p => p.theme.inputFocusBorder};
|
|
30
|
+
background-color: ${p => p.theme.inputFocusBackground};
|
|
31
|
+
color:${p => p.theme.inputFocusTextColor};
|
|
20
32
|
}
|
|
21
33
|
:disabled{
|
|
22
|
-
${
|
|
34
|
+
background-color: ${p => p.theme.inputDisabledBackground};
|
|
35
|
+
border-color: ${p => p.theme.inputDisabledBorder};
|
|
36
|
+
color:${p => p.theme.inputDisabledTextColor};
|
|
23
37
|
cursor: not-allowed;
|
|
24
38
|
}
|
|
25
39
|
${p => p.error && `
|
|
26
|
-
|
|
40
|
+
background-color: ${p.theme.inputErrorBackground};
|
|
41
|
+
border-color: ${p.theme.inputErrorBorder};
|
|
42
|
+
color:${p.theme.inputErrorTextColor};
|
|
27
43
|
`}
|
|
28
44
|
`;
|
|
29
45
|
exports.InputLabelElement = (0, styled_components_1.default)(Typography_1.TextLabel) `
|
|
@@ -36,7 +52,7 @@ exports.InputWrapper = styled_components_1.default.div `
|
|
|
36
52
|
width: ${p => p.width ? p.width : '100%'};
|
|
37
53
|
`;
|
|
38
54
|
exports.InputErrorMsg = styled_components_1.default.div `
|
|
39
|
-
color: ${
|
|
55
|
+
color: ${p => p.theme.inputErrorTextColor};
|
|
40
56
|
font-size: ${Theme_1.Theme.fontSize.s};
|
|
41
57
|
position: absolute;
|
|
42
58
|
bottom: -20px;
|
|
@@ -11,16 +11,18 @@ const Aligment_1 = require("../Aligment");
|
|
|
11
11
|
const Button_1 = require("../Button");
|
|
12
12
|
const common_1 = require("../common");
|
|
13
13
|
const Modal_styles_1 = require("./Modal.styles");
|
|
14
|
-
const
|
|
14
|
+
const styled_components_1 = require("styled-components");
|
|
15
|
+
const Modal = ({ theme = Theme_1.mainTheme, children, title, handleConfirm, handleClose, labelConfirm, labelClose, submitDisabled, size = 'small', }) => {
|
|
15
16
|
const isMultiButtons = () => {
|
|
16
17
|
return handleConfirm !== undefined && labelConfirm !== undefined;
|
|
17
18
|
};
|
|
18
|
-
return (react_1.default.createElement(
|
|
19
|
-
react_1.default.createElement(Modal_styles_1.
|
|
20
|
-
react_1.default.createElement(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
react_1.default.createElement(
|
|
24
|
-
|
|
19
|
+
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
|
|
20
|
+
react_1.default.createElement(Modal_styles_1.ModalOverlayer, null,
|
|
21
|
+
react_1.default.createElement(Modal_styles_1.ModalElement, { size: size },
|
|
22
|
+
react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, handleClose: handleClose }),
|
|
23
|
+
react_1.default.createElement(common_1.ScrollCotainer, null, children),
|
|
24
|
+
react_1.default.createElement(Aligment_1.Aligment, { justify: 'flex-end', vPadding: Theme_1.Theme.padding.l, hPadding: Theme_1.Theme.padding.l },
|
|
25
|
+
react_1.default.createElement(Button_1.Button, { mode: isMultiButtons() ? 'secondary' : 'primary', onClick: () => handleClose(), text: labelClose, left: isMultiButtons() }),
|
|
26
|
+
handleConfirm && labelConfirm && (react_1.default.createElement(Button_1.Button, { onClick: handleConfirm, text: labelConfirm, disabled: submitDisabled })))))));
|
|
25
27
|
};
|
|
26
28
|
exports.Modal = Modal;
|
|
@@ -24,7 +24,7 @@ exports.ModalElement = styled_components_1.default.div `
|
|
|
24
24
|
box-sizing: border-box;
|
|
25
25
|
display: flex;
|
|
26
26
|
width: 100%;
|
|
27
|
-
background-color: ${
|
|
27
|
+
background-color: ${p => p.theme.contentBackground};
|
|
28
28
|
border-radius: ${Theme_1.Theme.borderRadius.m};
|
|
29
29
|
max-height: 100%;
|
|
30
30
|
overflow: hidden;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setAnimationParams = exports.animationParams = exports.setFieldHeight = exports.fieldHeight = exports.setPanelPosition = exports.panelPosition = exports.setPanelTop = exports.panelTop = exports.setIconSize = exports.iconSize = exports.setLabelFontSize = exports.lableFontSize = exports.
|
|
3
|
+
exports.setAnimationParams = exports.animationParams = exports.setFieldHeight = exports.fieldHeight = exports.setPanelPosition = exports.panelPosition = exports.setPanelTop = exports.panelTop = exports.setIconSize = exports.iconSize = exports.setLabelFontSize = exports.lableFontSize = exports.inputColorSchema = exports.setEyeTopPosition = exports.setButtonSize = exports.setSize = exports.eyeTopPosition = exports.buttonPadding = exports.inputPadding = exports.sizes = exports.defaultStyles = void 0;
|
|
4
4
|
const polished_1 = require("polished");
|
|
5
5
|
const Theme_1 = require("../../Theme");
|
|
6
6
|
exports.defaultStyles = `
|
|
@@ -69,7 +69,7 @@ const setEyeTopPosition = (size) => {
|
|
|
69
69
|
return exports.eyeTopPosition[size];
|
|
70
70
|
};
|
|
71
71
|
exports.setEyeTopPosition = setEyeTopPosition;
|
|
72
|
-
exports.
|
|
72
|
+
exports.inputColorSchema = {
|
|
73
73
|
default: `
|
|
74
74
|
border-color: ${Theme_1.Theme.colors.primary};
|
|
75
75
|
background-color: ${(0, polished_1.lighten)(0.4, Theme_1.Theme.colors.primary)};
|
package/dist/esm/Theme/Theme.js
CHANGED
|
@@ -57,4 +57,21 @@ export const mainTheme = {
|
|
|
57
57
|
buttonInverseHover: lighten(0.3, Theme.colors.primary),
|
|
58
58
|
disabledBackground: Theme.colors.disableBackground,
|
|
59
59
|
disabledText: Theme.colors.disableText,
|
|
60
|
+
//text
|
|
61
|
+
textColor: Theme.colors.text,
|
|
62
|
+
// input
|
|
63
|
+
inputDefaultBackground: Theme.colors.white,
|
|
64
|
+
inputDefaultBorder: Theme.colors.gray_1,
|
|
65
|
+
inputDefaultTextColor: Theme.colors.text,
|
|
66
|
+
inputFocusBackground: lighten(0.4, Theme.colors.primary),
|
|
67
|
+
inputFocusBorder: Theme.colors.primary,
|
|
68
|
+
inputFocusTextColor: Theme.colors.text,
|
|
69
|
+
inputDisabledBackground: Theme.colors.disableBackground,
|
|
70
|
+
inputDisabledBorder: Theme.colors.disableText,
|
|
71
|
+
inputDisabledTextColor: Theme.colors.disableText,
|
|
72
|
+
inputErrorBackground: lighten(0.5, Theme.colors.red),
|
|
73
|
+
inputErrorBorder: Theme.colors.red,
|
|
74
|
+
inputErrorTextColor: Theme.colors.red,
|
|
75
|
+
// global
|
|
76
|
+
contentBackground: Theme.colors.white
|
|
60
77
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { defaultStyles, setSize,
|
|
2
|
+
import { defaultStyles, setSize, inputColorSchema, setFieldHeight } from "../common";
|
|
3
3
|
import { Theme } from "../../Theme";
|
|
4
4
|
export const Field = styled.div `
|
|
5
5
|
position: relative;
|
|
@@ -12,15 +12,15 @@ export const Field = styled.div `
|
|
|
12
12
|
height: ${(p) => setFieldHeight(p.inputSize)};
|
|
13
13
|
${(p) => p.error &&
|
|
14
14
|
`
|
|
15
|
-
${
|
|
15
|
+
${inputColorSchema.error}
|
|
16
16
|
`}
|
|
17
17
|
${(p) => p.active &&
|
|
18
18
|
`
|
|
19
|
-
${
|
|
19
|
+
${inputColorSchema.default}
|
|
20
20
|
`}
|
|
21
21
|
${(p) => p.disabled &&
|
|
22
22
|
`
|
|
23
|
-
${
|
|
23
|
+
${inputColorSchema.disabled}
|
|
24
24
|
cursor: not-allowed;
|
|
25
25
|
`}
|
|
26
26
|
`;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Aligment } from '../Aligment';
|
|
2
1
|
import React, { useState } from 'react';
|
|
2
|
+
import { ThemeProvider } from 'styled-components';
|
|
3
|
+
import { Aligment } from '../Aligment';
|
|
3
4
|
import { InputTextElement, InputLabelElement, InputErrorMsg, InputWrapper, EyeIconWrapper, } from './Input.styles';
|
|
4
5
|
import { Icon } from '../Icons';
|
|
5
|
-
import {
|
|
6
|
-
export const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disabled = false, size = 'medium', handleChange, width, error, placeholder, min, max, step, }) => {
|
|
6
|
+
import { mainTheme } from '../../Theme';
|
|
7
|
+
export const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disabled = false, size = 'medium', handleChange, width, error, placeholder, min, max, step, theme = mainTheme, }) => {
|
|
7
8
|
const onChange = (e) => {
|
|
8
9
|
handleChange(name, e.target.value);
|
|
9
10
|
};
|
|
@@ -12,11 +13,12 @@ export const Input = ({ label, labelPosition = 'top', value, type = 'text', name
|
|
|
12
13
|
const tooglePassword = () => {
|
|
13
14
|
setShowPassword(!showPassword);
|
|
14
15
|
};
|
|
15
|
-
return (React.createElement(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
React.createElement(
|
|
19
|
-
|
|
20
|
-
React.createElement(
|
|
21
|
-
|
|
16
|
+
return (React.createElement(ThemeProvider, { theme: theme },
|
|
17
|
+
React.createElement(Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', direction: labelPosition === 'top' ? 'column' : 'row', wrap: 'nowrap' },
|
|
18
|
+
label && (React.createElement(InputLabelElement, { size: size, labelPosition: labelPosition }, label)),
|
|
19
|
+
React.createElement(InputWrapper, { width: width },
|
|
20
|
+
React.createElement(InputTextElement, { inputSize: size, type: showPassword ? 'text' : inputType, disabled: disabled, name: name, value: value, onChange: onChange, error: error, placeholder: placeholder, min: min, max: max, step: step }),
|
|
21
|
+
inputType === 'password' && (React.createElement(EyeIconWrapper, { size: size },
|
|
22
|
+
React.createElement(Icon, { name: showPassword ? 'visability_off' : 'visibility', size: 24, onClick: tooglePassword, color: theme.inputDefaultTextColor, noHover: true }))),
|
|
23
|
+
error && React.createElement(InputErrorMsg, null, error)))));
|
|
22
24
|
};
|
|
@@ -1,23 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { setSize, setEyeTopPosition } from "../common";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { Theme } from "../../Theme";
|
|
4
4
|
import { TextLabel } from "../Typography";
|
|
5
5
|
export const InputTextElement = styled.input `
|
|
6
6
|
position:relative;
|
|
7
|
-
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
background-color: ${p => p.theme.inputDefaultBackground};
|
|
9
|
+
border: 1px solid ${p => p.theme.inputDefaultBorder};
|
|
10
|
+
border-radius: ${Theme.borderRadius.m};
|
|
11
|
+
width: 100%;
|
|
12
|
+
font-family: "Lato", sans-serif;
|
|
13
|
+
outline: 0;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
|
|
8
18
|
${(p) => setSize(p.inputSize)}
|
|
9
|
-
color: ${
|
|
19
|
+
color: ${p => p.theme.inputDefaultTextColor};
|
|
10
20
|
width: ${p => p.width ? p.width : '100%'};
|
|
11
21
|
${p => p.type === 'password' && `padding-right:32px;`}
|
|
12
22
|
:focus {
|
|
13
|
-
${
|
|
23
|
+
border-color: ${p => p.theme.inputFocusBorder};
|
|
24
|
+
background-color: ${p => p.theme.inputFocusBackground};
|
|
25
|
+
color:${p => p.theme.inputFocusTextColor};
|
|
14
26
|
}
|
|
15
27
|
:disabled{
|
|
16
|
-
${
|
|
28
|
+
background-color: ${p => p.theme.inputDisabledBackground};
|
|
29
|
+
border-color: ${p => p.theme.inputDisabledBorder};
|
|
30
|
+
color:${p => p.theme.inputDisabledTextColor};
|
|
17
31
|
cursor: not-allowed;
|
|
18
32
|
}
|
|
19
33
|
${p => p.error && `
|
|
20
|
-
|
|
34
|
+
background-color: ${p.theme.inputErrorBackground};
|
|
35
|
+
border-color: ${p.theme.inputErrorBorder};
|
|
36
|
+
color:${p.theme.inputErrorTextColor};
|
|
21
37
|
`}
|
|
22
38
|
`;
|
|
23
39
|
export const InputLabelElement = styled(TextLabel) `
|
|
@@ -30,7 +46,7 @@ export const InputWrapper = styled.div `
|
|
|
30
46
|
width: ${p => p.width ? p.width : '100%'};
|
|
31
47
|
`;
|
|
32
48
|
export const InputErrorMsg = styled.div `
|
|
33
|
-
color: ${
|
|
49
|
+
color: ${p => p.theme.inputErrorTextColor};
|
|
34
50
|
font-size: ${Theme.fontSize.s};
|
|
35
51
|
position: absolute;
|
|
36
52
|
bottom: -20px;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { ElementHeader } from '../ElementHeader';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Theme } from '../../Theme/Theme';
|
|
3
|
+
import { Theme, mainTheme } from '../../Theme/Theme';
|
|
4
4
|
import { Aligment } from '../Aligment';
|
|
5
5
|
import { Button } from '../Button';
|
|
6
6
|
import { ScrollCotainer } from '../common';
|
|
7
7
|
import { ModalElement, ModalOverlayer } from './Modal.styles';
|
|
8
|
-
|
|
8
|
+
import { ThemeProvider } from 'styled-components';
|
|
9
|
+
export const Modal = ({ theme = mainTheme, children, title, handleConfirm, handleClose, labelConfirm, labelClose, submitDisabled, size = 'small', }) => {
|
|
9
10
|
const isMultiButtons = () => {
|
|
10
11
|
return handleConfirm !== undefined && labelConfirm !== undefined;
|
|
11
12
|
};
|
|
12
|
-
return (React.createElement(
|
|
13
|
-
React.createElement(
|
|
14
|
-
React.createElement(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
React.createElement(
|
|
18
|
-
|
|
13
|
+
return (React.createElement(ThemeProvider, { theme: theme },
|
|
14
|
+
React.createElement(ModalOverlayer, null,
|
|
15
|
+
React.createElement(ModalElement, { size: size },
|
|
16
|
+
React.createElement(ElementHeader, { title: title, handleClose: handleClose }),
|
|
17
|
+
React.createElement(ScrollCotainer, null, children),
|
|
18
|
+
React.createElement(Aligment, { justify: 'flex-end', vPadding: Theme.padding.l, hPadding: Theme.padding.l },
|
|
19
|
+
React.createElement(Button, { mode: isMultiButtons() ? 'secondary' : 'primary', onClick: () => handleClose(), text: labelClose, left: isMultiButtons() }),
|
|
20
|
+
handleConfirm && labelConfirm && (React.createElement(Button, { onClick: handleConfirm, text: labelConfirm, disabled: submitDisabled })))))));
|
|
19
21
|
};
|
|
@@ -18,7 +18,7 @@ export const ModalElement = styled.div `
|
|
|
18
18
|
box-sizing: border-box;
|
|
19
19
|
display: flex;
|
|
20
20
|
width: 100%;
|
|
21
|
-
background-color: ${
|
|
21
|
+
background-color: ${p => p.theme.contentBackground};
|
|
22
22
|
border-radius: ${Theme.borderRadius.m};
|
|
23
23
|
max-height: 100%;
|
|
24
24
|
overflow: hidden;
|
|
@@ -63,7 +63,7 @@ export const setButtonSize = (size) => {
|
|
|
63
63
|
export const setEyeTopPosition = (size) => {
|
|
64
64
|
return eyeTopPosition[size];
|
|
65
65
|
};
|
|
66
|
-
export const
|
|
66
|
+
export const inputColorSchema = {
|
|
67
67
|
default: `
|
|
68
68
|
border-color: ${Theme.colors.primary};
|
|
69
69
|
background-color: ${lighten(0.4, Theme.colors.primary)};
|
|
@@ -55,4 +55,18 @@ export declare const mainTheme: {
|
|
|
55
55
|
buttonInverseHover: string;
|
|
56
56
|
disabledBackground: string;
|
|
57
57
|
disabledText: string;
|
|
58
|
+
textColor: string;
|
|
59
|
+
inputDefaultBackground: string;
|
|
60
|
+
inputDefaultBorder: string;
|
|
61
|
+
inputDefaultTextColor: string;
|
|
62
|
+
inputFocusBackground: string;
|
|
63
|
+
inputFocusBorder: string;
|
|
64
|
+
inputFocusTextColor: string;
|
|
65
|
+
inputDisabledBackground: string;
|
|
66
|
+
inputDisabledBorder: string;
|
|
67
|
+
inputDisabledTextColor: string;
|
|
68
|
+
inputErrorBackground: string;
|
|
69
|
+
inputErrorBorder: string;
|
|
70
|
+
inputErrorTextColor: string;
|
|
71
|
+
contentBackground: string;
|
|
58
72
|
};
|
|
@@ -6,6 +6,7 @@ interface IInputTextElementProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
6
6
|
error?: string;
|
|
7
7
|
width?: string;
|
|
8
8
|
type: InputType;
|
|
9
|
+
theme: any;
|
|
9
10
|
}
|
|
10
11
|
export declare const InputTextElement: import("styled-components").StyledComponent<"input", any, IInputTextElementProps, never>;
|
|
11
12
|
export declare const InputLabelElement: import("styled-components").StyledComponent<"div", any, import("../Typography").ITextLabelProps, never>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
export interface IModalProps {
|
|
3
|
+
theme?: any;
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
title?: string;
|
|
5
6
|
handleConfirm?: () => void;
|
|
@@ -7,5 +8,6 @@ export interface IModalProps {
|
|
|
7
8
|
labelConfirm?: string;
|
|
8
9
|
labelClose: string;
|
|
9
10
|
size?: string;
|
|
11
|
+
submitDisabled?: boolean;
|
|
10
12
|
}
|
|
11
13
|
export declare const Modal: FC<IModalProps>;
|
|
@@ -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
|
+
theme: any;
|
|
4
5
|
}
|
|
5
6
|
export declare const ModalElement: import("styled-components").StyledComponent<"div", any, IModalElementProp, never>;
|
|
6
7
|
export {};
|
|
@@ -23,7 +23,7 @@ export declare const eyeTopPosition: {
|
|
|
23
23
|
export declare const setSize: (size: InputSize) => string;
|
|
24
24
|
export declare const setButtonSize: (size: InputSize) => string;
|
|
25
25
|
export declare const setEyeTopPosition: (size: InputSize) => string;
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const inputColorSchema: {
|
|
27
27
|
default: string;
|
|
28
28
|
disabled: string;
|
|
29
29
|
error: string;
|