@desynova-digital/components 8.19.35 → 8.19.36
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.
|
@@ -9,7 +9,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
9
9
|
var _templateObject = _taggedTemplateLiteral(["\n background: transparent;\n font-family: \"SFUIText-Medium\";\n position: relative;\n width: 100%;\n display: block;\n\n > label {\n color: ", ";\n font-size: 14px;\n\n font-family: inherit;\n position: absolute;\n pointer-events: none;\n left: 0px;\n top: 5px;\n transition: 0.2s ease all;\n -moz-transition: 0.2s ease all;\n -webkit-transition: 0.2s ease all;\n }\n > textarea:focus ~ label {\n top: -10px;\n left: 0px;\n font-size: 10px;\n color: ", ";\n text-transform: capitalize;\n }\n\n > textarea ~ label.floaton {\n top: -10px;\n left: 0px;\n font-size: 10px;\n color: ", ";\n text-transform: capitalize;\n }\n"], ["\n background: transparent;\n font-family: \"SFUIText-Medium\";\n position: relative;\n width: 100%;\n display: block;\n\n > label {\n color: ", ";\n font-size: 14px;\n\n font-family: inherit;\n position: absolute;\n pointer-events: none;\n left: 0px;\n top: 5px;\n transition: 0.2s ease all;\n -moz-transition: 0.2s ease all;\n -webkit-transition: 0.2s ease all;\n }\n > textarea:focus ~ label {\n top: -10px;\n left: 0px;\n font-size: 10px;\n color: ", ";\n text-transform: capitalize;\n }\n\n > textarea ~ label.floaton {\n top: -10px;\n left: 0px;\n font-size: 10px;\n color: ", ";\n text-transform: capitalize;\n }\n"]),
|
|
10
10
|
_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n padding-top: 5px;\n display: inline-block;\n font-size: 12px;\n font-family: inherit;\n width: 100%;\n text-align: left;\n"], ["\n color: ", ";\n padding-top: 5px;\n display: inline-block;\n font-size: 12px;\n font-family: inherit;\n width: 100%;\n text-align: left;\n"]),
|
|
11
11
|
_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0px;\n top: 0px;\n background-color: #303f51;\n border-radius: 12px;\n font-size: 12px;\n padding: 5px 10px;\n color: #ffffff;\n"], ["\n position: absolute;\n right: 0px;\n top: 0px;\n background-color: #303f51;\n border-radius: 12px;\n font-size: 12px;\n padding: 5px 10px;\n color: #ffffff;\n"]),
|
|
12
|
-
_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n box-sizing: border-box;\n\n background: ", ";\n\n border: none;\n border-radius: 0px;\n -webkit-appearance: none;\n border-bottom: 1px solid\n ", ";\n\n font-family: \"SFUIText-Medium\";\n color: ", ";\n\n cursor: ", ";\n\n font-size: 14px;\n padding: 7px
|
|
12
|
+
_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n box-sizing: border-box;\n\n background: ", ";\n\n border: none;\n border-radius: 0px;\n -webkit-appearance: none;\n border-bottom: 1px solid\n ", ";\n\n font-family: \"SFUIText-Medium\";\n color: ", ";\n\n cursor: ", ";\n\n font-size: 14px;\n padding: 7px 85px 2px;\n margin-top: 15px;\n display: block;\n\n &:hover {\n border-color: ", ";\n }\n &:disabled:hover {\n border-color: ", ";\n }\n &:disabled {\n border-color: ", ";\n color: ", ";\n }\n &:focus {\n outline: none;\n }\n &::placeholder {\n color: ", ";\n\n opacity: ", ";\n transition: 0.2s ease all;\n }\n\n &:focus::placeholder {\n color: ", ";\n\n opacity: ", ";\n }\n"], ["\n width: 100%;\n box-sizing: border-box;\n\n background: ", ";\n\n border: none;\n border-radius: 0px;\n -webkit-appearance: none;\n border-bottom: 1px solid\n ", ";\n\n font-family: \"SFUIText-Medium\";\n color: ", ";\n\n cursor: ", ";\n\n font-size: 14px;\n padding: 7px 85px 2px;\n margin-top: 15px;\n display: block;\n\n &:hover {\n border-color: ", ";\n }\n &:disabled:hover {\n border-color: ", ";\n }\n &:disabled {\n border-color: ", ";\n color: ", ";\n }\n &:focus {\n outline: none;\n }\n &::placeholder {\n color: ", ";\n\n opacity: ", ";\n transition: 0.2s ease all;\n }\n\n &:focus::placeholder {\n color: ", ";\n\n opacity: ", ";\n }\n"]);
|
|
13
13
|
|
|
14
14
|
var _react = require("react");
|
|
15
15
|
|
|
@@ -47,10 +47,10 @@ var CountWrappper = _styledComponents2.default.div(_templateObject3);
|
|
|
47
47
|
|
|
48
48
|
var Textarea = function Textarea(_ref) {
|
|
49
49
|
var defaultValue = _ref.defaultValue,
|
|
50
|
-
|
|
50
|
+
maxLength = _ref.maxLength,
|
|
51
51
|
showLengthCount = _ref.showLengthCount,
|
|
52
52
|
type = _ref.type,
|
|
53
|
-
props = _objectWithoutProperties(_ref, ["defaultValue", "
|
|
53
|
+
props = _objectWithoutProperties(_ref, ["defaultValue", "maxLength", "showLengthCount", "type"]);
|
|
54
54
|
|
|
55
55
|
if (props.masked) {
|
|
56
56
|
var length = defaultValue ? defaultValue.length : 8;
|
|
@@ -91,12 +91,12 @@ var Textarea = function Textarea(_ref) {
|
|
|
91
91
|
{ value: props.value, theme: props.theme, error: props.error },
|
|
92
92
|
errorMesssage
|
|
93
93
|
) : "",
|
|
94
|
-
|
|
94
|
+
maxLength && showLengthCount && _react2.default.createElement(
|
|
95
95
|
CountWrappper,
|
|
96
96
|
null,
|
|
97
97
|
props.value.length,
|
|
98
98
|
"/",
|
|
99
|
-
|
|
99
|
+
maxLength
|
|
100
100
|
)
|
|
101
101
|
);
|
|
102
102
|
};
|
|
@@ -161,8 +161,8 @@ Textarea.propTypes = {
|
|
|
161
161
|
/** The (HTML) type for the textarea. */
|
|
162
162
|
type: _propTypes2.default.string,
|
|
163
163
|
value: _propTypes2.default.string,
|
|
164
|
-
/** The (HTML)
|
|
165
|
-
|
|
164
|
+
/** The (HTML) maxLength for the textarea. */
|
|
165
|
+
maxLength: _propTypes2.default.number,
|
|
166
166
|
|
|
167
167
|
theme: _propTypes2.default.oneOf(["light", "dark"]),
|
|
168
168
|
|
|
@@ -179,7 +179,7 @@ Textarea.defaultProps = {
|
|
|
179
179
|
error: null,
|
|
180
180
|
onChange: null,
|
|
181
181
|
type: "text",
|
|
182
|
-
|
|
182
|
+
maxLength: 50,
|
|
183
183
|
theme: "light",
|
|
184
184
|
value: "",
|
|
185
185
|
rows: 3,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desynova-digital/components",
|
|
3
|
-
"version": "8.19.
|
|
3
|
+
"version": "8.19.36",
|
|
4
4
|
"description": "Components for Desynova Digital",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "desynova-digital",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": "desynova-digital",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@desynova-digital/tokens": "8.19.
|
|
10
|
+
"@desynova-digital/tokens": "8.19.36",
|
|
11
11
|
"prop-types": "^15.7.2",
|
|
12
12
|
"styled-components": "^4.3.2"
|
|
13
13
|
},
|