@ludo.ninja/components 2.3.56 → 2.3.57
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { inputType } from "../Input/type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { UseFormRegisterReturn } from "react-hook-form";
|
|
4
4
|
interface Props {
|
|
5
5
|
data: inputType;
|
|
6
6
|
register: UseFormRegisterReturn;
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const ErrorLabel_1 = __importDefault(require("../ErrorLabel"));
|
|
8
|
+
const vars_1 = require("../../../fonts/vars");
|
|
9
9
|
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
10
10
|
const colors_1 = require("../../../styles/colors");
|
|
11
11
|
const typography_1 = require("../../../styles/typography");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
12
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
13
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
14
14
|
// Styles
|
|
15
15
|
const StyledTextArea = styled_components_1.default.textarea `
|
|
16
16
|
font-family: ${vars_1.dmsansFontVarCss.css};
|
|
@@ -18,8 +18,7 @@ const StyledTextArea = styled_components_1.default.textarea `
|
|
|
18
18
|
width: 100%;
|
|
19
19
|
min-height: 92px;
|
|
20
20
|
border-radius: 6px;
|
|
21
|
-
border: 1px solid
|
|
22
|
-
${(props) => (props.status ? colors_1.ProgressColorMinimum : colors_1.BorderColorLight)};
|
|
21
|
+
border: 1px solid ${(props) => (props.status ? colors_1.ProgressColorMinimum : colors_1.BorderColorLight)};
|
|
23
22
|
background: ${colors_1.WhiteColor};
|
|
24
23
|
color: ${colors_1.BlackColor};
|
|
25
24
|
outline: none;
|
|
@@ -41,18 +40,17 @@ const StyledTextArea = styled_components_1.default.textarea `
|
|
|
41
40
|
|
|
42
41
|
// :focus {
|
|
43
42
|
// transition: border-color 0.3s ease-in-out;
|
|
44
|
-
// border: 2px solid ${(props) => (props.status ?
|
|
43
|
+
// border: 2px solid ${(props) => (props.status ? "#F4205F" : "#C1C8DE")};
|
|
45
44
|
// }
|
|
46
45
|
// :hover {
|
|
47
46
|
// transition: border-color 0.3s ease-in-out;
|
|
48
|
-
// border: 2px solid ${(props) => (props.status ?
|
|
47
|
+
// border: 2px solid ${(props) => (props.status ? "#F4205F" : "#C1C8DE")};
|
|
49
48
|
// }
|
|
50
49
|
|
|
51
50
|
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
52
51
|
min-height: ${(0, _4k_1.adaptiveValueCalc)(92)};
|
|
53
52
|
border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
|
|
54
|
-
border: ${(0, _4k_1.adaptiveValueCalc)(1)} solid
|
|
55
|
-
${(props) => (props.status ? colors_1.ProgressColorMinimum : colors_1.BorderColorLight)};
|
|
53
|
+
border: ${(0, _4k_1.adaptiveValueCalc)(1)} solid ${(props) => (props.status ? colors_1.ProgressColorMinimum : colors_1.BorderColorLight)};
|
|
56
54
|
padding: ${(0, _4k_1.adaptiveValueCalc)(12)};
|
|
57
55
|
}
|
|
58
56
|
`;
|
|
@@ -65,6 +63,6 @@ const BasicTextArea = ({ data, register, isNeedBiggerArea, error,
|
|
|
65
63
|
return (0, jsx_runtime_1.jsx)(ErrorLabel_1.default, { children: error.message });
|
|
66
64
|
}
|
|
67
65
|
};
|
|
68
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(StyledTextArea, {
|
|
66
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(StyledTextArea, { ref: register.ref, onChange: register.onChange, onBlur: register.onBlur, name: register.name, rows: isNeedBiggerArea ? 8 : 4, status: error.isNeedShowError, id: data.name, autoComplete: "off", placeholder: data.placeHolder }), renderError()] }));
|
|
69
67
|
};
|
|
70
68
|
exports.default = BasicTextArea;
|