@ludo.ninja/components 2.3.85 → 2.3.86
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.
|
@@ -13,60 +13,51 @@ const colors_2 = require("../../../styles/colors");
|
|
|
13
13
|
const typography_1 = require("../../../styles/typography");
|
|
14
14
|
const ErrorLabel_1 = __importDefault(require("../ErrorLabel"));
|
|
15
15
|
const vars_1 = require("../../../fonts/vars");
|
|
16
|
-
// Styles
|
|
17
16
|
exports.StyledInput = styled_components_1.default.input `
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
font-family: ${vars_1.dmsansFontVarCss.css};
|
|
18
|
+
${typography_1.MainText};
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 46px;
|
|
21
|
+
border-radius: 6px;
|
|
22
|
+
border: 1px solid
|
|
24
23
|
${(props) => (props.status ? colors_2.ProgressColorMinimum : colors_2.BorderColorLight)};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
background: ${colors_2.WhiteColor};
|
|
25
|
+
color: ${colors_2.BlackColor};
|
|
26
|
+
outline: none;
|
|
27
|
+
padding: 12px;
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
::placeholder {
|
|
30
|
+
color: ${colors_2.TextGrayColor};
|
|
31
|
+
opacity: 1;
|
|
32
|
+
}
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
:-ms-input-placeholder {
|
|
35
|
+
color: ${colors_2.TextGrayColor};
|
|
36
|
+
}
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
::-ms-input-placeholder {
|
|
39
|
+
color: ${colors_2.TextGrayColor};
|
|
40
|
+
}
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
:disabled {
|
|
43
|
+
background: ${colors_1.DisabledLightGrayColor};
|
|
44
|
+
color: ${colors_1.DisabledGrayColor};
|
|
45
|
+
}
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// }
|
|
56
|
-
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
57
|
-
height: ${(0, _4k_1.adaptiveValueCalc)(46)};
|
|
58
|
-
border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
59
|
-
border: ${(0, _4k_1.adaptiveValueCalc)(1)} solid
|
|
60
|
-
${(props) => (props.status ? colors_2.ProgressColorMinimum : colors_2.BorderColorLight)};
|
|
61
|
-
padding: ${(0, _4k_1.adaptiveValueCalc)(12)};
|
|
62
|
-
}
|
|
47
|
+
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
48
|
+
height: ${(0, _4k_1.adaptiveValueCalc)(46)};
|
|
49
|
+
border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
50
|
+
border: ${(0, _4k_1.adaptiveValueCalc)(1)} solid
|
|
51
|
+
${(props) => (props.status ? colors_2.ProgressColorMinimum : colors_2.BorderColorLight)};
|
|
52
|
+
padding: ${(0, _4k_1.adaptiveValueCalc)(12)};
|
|
53
|
+
}
|
|
63
54
|
`;
|
|
64
|
-
const Input = ({ data, register, error }) => {
|
|
55
|
+
const Input = ({ data, register, error, disabled }) => {
|
|
65
56
|
const renderError = () => {
|
|
66
57
|
if (error.isNeedShowError) {
|
|
67
58
|
return (0, jsx_runtime_1.jsx)(ErrorLabel_1.default, { children: error.message });
|
|
68
59
|
}
|
|
69
60
|
};
|
|
70
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(exports.StyledInput, { ref: register.ref, onChange: register.onChange, onBlur: register.onBlur, name: register.name, id: data.name, autoComplete: "off", placeholder: data.placeHolder, status: error.isNeedShowError }), renderError()] }));
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(exports.StyledInput, { ref: register.ref, onChange: register.onChange, onBlur: register.onBlur, name: register.name, id: data.name, autoComplete: "off", placeholder: data.placeHolder, status: error.isNeedShowError, disabled: disabled }), renderError()] }));
|
|
71
62
|
};
|
|
72
63
|
exports.default = Input;
|