@desynova-digital/components 8.19.1 → 8.19.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.
|
@@ -12,7 +12,8 @@ var _templateObject = _taggedTemplateLiteral(['\n background: transparent;\n f
|
|
|
12
12
|
_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']),
|
|
13
13
|
_templateObject3 = _taggedTemplateLiteral(['\n background: none;\n border: none;\n cursor: pointer;\n position: absolute;\n right: 0;\n top: 5px;\n &:focus {\n outline: none;\n }\n'], ['\n background: none;\n border: none;\n cursor: pointer;\n position: absolute;\n right: 0;\n top: 5px;\n &:focus {\n outline: none;\n }\n']),
|
|
14
14
|
_templateObject4 = _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']),
|
|
15
|
-
_templateObject5 = _taggedTemplateLiteral(['
|
|
15
|
+
_templateObject5 = _taggedTemplateLiteral(['', ' '], ['', ' ']),
|
|
16
|
+
_templateObject6 = _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: ', ';\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: ', ';\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']);
|
|
16
17
|
|
|
17
18
|
var _react = require('react');
|
|
18
19
|
|
|
@@ -86,14 +87,14 @@ var InputText = function InputText(_ref) {
|
|
|
86
87
|
return _react2.default.createElement(
|
|
87
88
|
InputTextDiv,
|
|
88
89
|
{ theme: props.theme },
|
|
89
|
-
_react2.default.createElement(InputText.Element, _extends({ type: hidden ? type : 'text', value: props.value, defaultValue: defaultValue }, props, { maxLength: maxLength || '' })),
|
|
90
|
+
_react2.default.createElement(InputText.Element, _extends({ type: hidden ? type : 'text', value: props.value, defaultValue: defaultValue }, props, { maxLength: maxLength || '', showLengthCount: showLengthCount || false })),
|
|
90
91
|
props.label ? _react2.default.createElement(
|
|
91
92
|
'label',
|
|
92
93
|
{
|
|
93
94
|
htmlFor: props.id,
|
|
94
95
|
className: props.value && props.value.length > 0 ? 'floaton' : ''
|
|
95
96
|
},
|
|
96
|
-
|
|
97
|
+
props.isRequired && '*'(_templateObject5, props.label)
|
|
97
98
|
) : '',
|
|
98
99
|
errorMesssage ? _react2.default.createElement(
|
|
99
100
|
InputError,
|
|
@@ -132,7 +133,7 @@ var InputText = function InputText(_ref) {
|
|
|
132
133
|
);
|
|
133
134
|
};
|
|
134
135
|
|
|
135
|
-
InputText.Element = _styledComponents2.default.input(
|
|
136
|
+
InputText.Element = _styledComponents2.default.input(_templateObject6, function (props) {
|
|
136
137
|
return _tokens.colors[props.theme].inputCommon.background;
|
|
137
138
|
}, function (props) {
|
|
138
139
|
if (props.error) {
|
|
@@ -144,6 +145,8 @@ InputText.Element = _styledComponents2.default.input(_templateObject5, function
|
|
|
144
145
|
return _tokens.colors[props.theme].inputCommon.color;
|
|
145
146
|
}, function (props) {
|
|
146
147
|
return props.readOnly ? 'not-allowed' : 'text';
|
|
148
|
+
}, function (props) {
|
|
149
|
+
return props.showLengthCount && props.maxLength ? '7px 60px 2px 0px' : '7px 0px 2px 0px';
|
|
147
150
|
}, function (props) {
|
|
148
151
|
if (props.error) {
|
|
149
152
|
return _tokens.colors[props.theme].inputError.borderHover;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desynova-digital/components",
|
|
3
|
-
"version": "8.19.
|
|
3
|
+
"version": "8.19.2",
|
|
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.2",
|
|
11
11
|
"prop-types": "^15.7.2",
|
|
12
12
|
"styled-components": "^4.3.2"
|
|
13
13
|
},
|