@desynova-digital/components 8.14.0 → 8.14.1
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.
|
@@ -8,7 +8,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
8
8
|
|
|
9
9
|
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
|
10
10
|
|
|
11
|
-
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: #999999;\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 > input:focus ~ label {\n top: -10px;\n left: 0px;\n font-size: 10px;\n color: #999999;\n text-transform: capitalize;\n }\n
|
|
11
|
+
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: #999999;\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 > input:focus ~ label {\n top: -10px;\n left: 0px;\n font-size: 10px;\n color: #999999;\n text-transform: capitalize;\n }\n > input ~ label.floaton {\n top: -5px;\n left: 0px;\n font-size: 10px;\n color: #999999;\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: #999999;\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 > input:focus ~ label {\n top: -10px;\n left: 0px;\n font-size: 10px;\n color: #999999;\n text-transform: capitalize;\n }\n > input ~ label.floaton {\n top: -5px;\n left: 0px;\n font-size: 10px;\n color: #999999;\n text-transform: capitalize;\n }\n']),
|
|
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']),
|
|
@@ -38,9 +38,7 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
|
|
|
38
38
|
|
|
39
39
|
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
40
40
|
|
|
41
|
-
var InputTextDiv = _styledComponents2.default.div(_templateObject
|
|
42
|
-
return props.capitalizeFirstLetter ? 'capitalize' : '';
|
|
43
|
-
});
|
|
41
|
+
var InputTextDiv = _styledComponents2.default.div(_templateObject);
|
|
44
42
|
|
|
45
43
|
var InputError = _styledComponents2.default.span(_templateObject2, function (props) {
|
|
46
44
|
return _tokens.colors[props.theme].inputError.color;
|
|
@@ -55,8 +53,7 @@ var InputText = function InputText(_ref) {
|
|
|
55
53
|
defaultValue = _ref.defaultValue,
|
|
56
54
|
type = _ref.type,
|
|
57
55
|
showLengthCount = _ref.showLengthCount,
|
|
58
|
-
|
|
59
|
-
props = _objectWithoutProperties(_ref, ['maxLength', 'defaultValue', 'type', 'showLengthCount', 'capitalizeFirstLetter']);
|
|
56
|
+
props = _objectWithoutProperties(_ref, ['maxLength', 'defaultValue', 'type', 'showLengthCount']);
|
|
60
57
|
|
|
61
58
|
var _useState = (0, _react.useState)(true),
|
|
62
59
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -88,7 +85,7 @@ var InputText = function InputText(_ref) {
|
|
|
88
85
|
|
|
89
86
|
return _react2.default.createElement(
|
|
90
87
|
InputTextDiv,
|
|
91
|
-
{ theme: props.theme
|
|
88
|
+
{ theme: props.theme },
|
|
92
89
|
_react2.default.createElement(InputText.Element, _extends({ type: hidden ? type : 'text', value: props.value, defaultValue: defaultValue }, props, { maxLength: maxLength || '' })),
|
|
93
90
|
props.label ? _react2.default.createElement(
|
|
94
91
|
'label',
|
|
@@ -198,7 +195,6 @@ InputText.propTypes = {
|
|
|
198
195
|
/** The (HTML) maxLength for the input. */
|
|
199
196
|
maxLength: _propTypes2.default.number,
|
|
200
197
|
showLengthCount: _propTypes2.default.bool,
|
|
201
|
-
capitalizeFirstLetter: _propTypes2.default.bool,
|
|
202
198
|
theme: _propTypes2.default.oneOf(['light', 'dark'])
|
|
203
199
|
|
|
204
200
|
/** deprecate error string prop */
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desynova-digital/components",
|
|
3
|
-
"version": "8.14.
|
|
3
|
+
"version": "8.14.1",
|
|
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.14.
|
|
10
|
+
"@desynova-digital/tokens": "8.14.1",
|
|
11
11
|
"prop-types": "^15.7.2",
|
|
12
12
|
"styled-components": "^4.3.2"
|
|
13
13
|
},
|