@desynova-digital/components 8.13.5 → 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;
|
|
@@ -51,12 +49,11 @@ var PasswordToggleButton = _styledComponents2.default.div(_templateObject3);
|
|
|
51
49
|
var CountWrappper = _styledComponents2.default.div(_templateObject4);
|
|
52
50
|
|
|
53
51
|
var InputText = function InputText(_ref) {
|
|
54
|
-
var
|
|
52
|
+
var maxLength = _ref.maxLength,
|
|
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,8 +85,8 @@ var InputText = function InputText(_ref) {
|
|
|
88
85
|
|
|
89
86
|
return _react2.default.createElement(
|
|
90
87
|
InputTextDiv,
|
|
91
|
-
{ theme: props.theme
|
|
92
|
-
_react2.default.createElement(InputText.Element, _extends({ type: hidden ? type : 'text', value: props.value, defaultValue: defaultValue }, props, { maxLength:
|
|
88
|
+
{ theme: props.theme },
|
|
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',
|
|
95
92
|
{
|
|
@@ -103,12 +100,12 @@ var InputText = function InputText(_ref) {
|
|
|
103
100
|
{ value: props.value, theme: props.theme, error: props.error },
|
|
104
101
|
errorMesssage
|
|
105
102
|
) : '',
|
|
106
|
-
|
|
103
|
+
maxLength && showLengthCount && _react2.default.createElement(
|
|
107
104
|
CountWrappper,
|
|
108
105
|
null,
|
|
109
106
|
props.value.length,
|
|
110
107
|
'/',
|
|
111
|
-
|
|
108
|
+
maxLength
|
|
112
109
|
),
|
|
113
110
|
type == 'password' || passwordButton ? _react2.default.createElement(
|
|
114
111
|
PasswordToggleButton,
|
|
@@ -195,10 +192,9 @@ InputText.propTypes = {
|
|
|
195
192
|
/** The (HTML) type for the input. */
|
|
196
193
|
type: _propTypes2.default.string,
|
|
197
194
|
value: _propTypes2.default.string,
|
|
198
|
-
/** The (HTML)
|
|
199
|
-
|
|
195
|
+
/** The (HTML) maxLength for the input. */
|
|
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 */
|
|
@@ -211,7 +207,7 @@ InputText.defaultProps = {
|
|
|
211
207
|
error: null,
|
|
212
208
|
onChange: null,
|
|
213
209
|
type: 'text',
|
|
214
|
-
//
|
|
210
|
+
// maxLength: 50,
|
|
215
211
|
theme: 'light',
|
|
216
212
|
value: '',
|
|
217
213
|
showLengthCount: false
|
package/molecules/table/table.js
CHANGED
|
@@ -600,7 +600,7 @@ var Table = function (_Component) {
|
|
|
600
600
|
selectedRows: [],
|
|
601
601
|
showColumnArr: spiltColumns.showColumnArr ? spiltColumns.showColumnArr : [],
|
|
602
602
|
// isAllRowsSelected:false,
|
|
603
|
-
searchedText: ''
|
|
603
|
+
searchedText: props.searchValue || ''
|
|
604
604
|
};
|
|
605
605
|
|
|
606
606
|
return _this;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desynova-digital/components",
|
|
3
|
-
"version": "8.
|
|
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.
|
|
10
|
+
"@desynova-digital/tokens": "8.14.1",
|
|
11
11
|
"prop-types": "^15.7.2",
|
|
12
12
|
"styled-components": "^4.3.2"
|
|
13
13
|
},
|