@desynova-digital/components 9.0.4 → 9.0.5
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,7 @@ var _templateObject = _taggedTemplateLiteral(['\n background: transparent;\n f
|
|
|
12
12
|
_templateObject2 = _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']),
|
|
13
13
|
_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']),
|
|
14
14
|
_templateObject4 = _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']),
|
|
15
|
-
_templateObject5 = _taggedTemplateLiteral(['\nwhite-space: nowrap;\n width:100%\n box-sizing: border-box;\n border-bottom: 1px solid ', ';\n \n\n font-family: "SFUIText-Medium";\n font-size: 14px;\n color: ', ';\n\n display: inline-block;\n position: relative;\n padding: ', ';\n &:hover {\n border-color: ', ';\n }\n\n &:focus-within {\n border-color: ', ';\n }\n\n &::placeholder {\n color: ', ';\n opacity: ', ';\n transition: 0.2s ease all;\n }\n\n &:focus-within::placeholder {\n color: ', ';\n opacity: ', ';\n }\n\n
|
|
15
|
+
_templateObject5 = _taggedTemplateLiteral(['\nwhite-space: nowrap;\n width:100%\n box-sizing: border-box;\n border-bottom: 1px solid ', ';\n \n\n font-family: "SFUIText-Medium";\n font-size: 14px;\n color: ', ';\n\n display: inline-block;\n position: relative;\n padding: ', ';\n &:hover {\n border-color: ', ';\n }\n\n &:focus-within {\n border-color: ', ';\n }\n\n &::placeholder {\n color: ', ';\n opacity: ', ';\n transition: 0.2s ease all;\n }\n\n &:focus-within::placeholder {\n color: ', ';\n opacity: ', ';\n }\n\n'], ['\nwhite-space: nowrap;\n width:100%\n box-sizing: border-box;\n border-bottom: 1px solid ', ';\n \n\n font-family: "SFUIText-Medium";\n font-size: 14px;\n color: ', ';\n\n display: inline-block;\n position: relative;\n padding: ', ';\n &:hover {\n border-color: ', ';\n }\n\n &:focus-within {\n border-color: ', ';\n }\n\n &::placeholder {\n color: ', ';\n opacity: ', ';\n transition: 0.2s ease all;\n }\n\n &:focus-within::placeholder {\n color: ', ';\n opacity: ', ';\n }\n\n']);
|
|
16
16
|
|
|
17
17
|
var _react = require('react');
|
|
18
18
|
|
|
@@ -36,10 +36,6 @@ var _icon = require('../icon');
|
|
|
36
36
|
|
|
37
37
|
var _icon2 = _interopRequireDefault(_icon);
|
|
38
38
|
|
|
39
|
-
var _immutable = require('immutable');
|
|
40
|
-
|
|
41
|
-
var _immutable2 = _interopRequireDefault(_immutable);
|
|
42
|
-
|
|
43
39
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
44
40
|
|
|
45
41
|
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
@@ -63,7 +59,8 @@ var DraftInputText = function DraftInputText(_ref) {
|
|
|
63
59
|
showLengthCount = _ref.showLengthCount,
|
|
64
60
|
label = _ref.label,
|
|
65
61
|
value = _ref.value,
|
|
66
|
-
|
|
62
|
+
showLocal = _ref.showLocal,
|
|
63
|
+
props = _objectWithoutProperties(_ref, ['maxLength', 'defaultValue', 'type', 'showLengthCount', 'label', 'value', 'showLocal']);
|
|
67
64
|
|
|
68
65
|
var _useState = (0, _react.useState)(true),
|
|
69
66
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -87,6 +84,11 @@ var DraftInputText = function DraftInputText(_ref) {
|
|
|
87
84
|
editorState = _useState8[0],
|
|
88
85
|
setEditorState = _useState8[1];
|
|
89
86
|
|
|
87
|
+
var _useState9 = (0, _react.useState)(null),
|
|
88
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
89
|
+
convertedContent = _useState10[0],
|
|
90
|
+
setConvertedContent = _useState10[1];
|
|
91
|
+
|
|
90
92
|
var contentLength = editorState.getCurrentContent().getPlainText('').length;
|
|
91
93
|
if (props.error && props.error.length > 0) {
|
|
92
94
|
var errorMesssage = props.error;
|
|
@@ -100,21 +102,26 @@ var DraftInputText = function DraftInputText(_ref) {
|
|
|
100
102
|
var passwordButton = props.passwordButton;
|
|
101
103
|
}
|
|
102
104
|
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @param {string} command string representing the keyboard command being invoked
|
|
108
|
+
* @param {object} editorState represents the current state of the editor, including the content, selection, and various editor properties.
|
|
109
|
+
* @returns new Editor State with applied styling
|
|
110
|
+
*/
|
|
103
111
|
var handleKeyCommand = function handleKeyCommand(command, editorState) {
|
|
104
|
-
|
|
105
|
-
props.onKeyDownFn();
|
|
106
|
-
return 'Entered Pressed';
|
|
107
|
-
} else {
|
|
108
|
-
var newState = _draftJs.RichUtils.handleKeyCommand(editorState, command);
|
|
112
|
+
var newState = _draftJs.RichUtils.handleKeyCommand(editorState, command);
|
|
109
113
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
return 'not-handled';
|
|
114
|
+
if (newState) {
|
|
115
|
+
setEditorState(newState);
|
|
116
|
+
return 'handled';
|
|
115
117
|
}
|
|
118
|
+
return 'not-handled';
|
|
116
119
|
};
|
|
117
120
|
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* @returns Return the length of text in editor in a synchronous way
|
|
124
|
+
*/
|
|
118
125
|
var _getLengthOfSelectedText = function _getLengthOfSelectedText() {
|
|
119
126
|
var currentSelection = editorState.getSelection();
|
|
120
127
|
if (currentSelection.isCollapsed()) return 0;
|
|
@@ -129,24 +136,52 @@ var DraftInputText = function DraftInputText(_ref) {
|
|
|
129
136
|
}, 0);
|
|
130
137
|
};
|
|
131
138
|
|
|
132
|
-
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* @param {string} text The text that is pasted in the editor
|
|
142
|
+
* @param {string} position tells whether we have to check for inserted text or pasted text
|
|
143
|
+
* @returns whether pasting or inserting text is feasible
|
|
144
|
+
*/
|
|
145
|
+
var _handleInput = function _handleInput(text, position) {
|
|
133
146
|
var currentContent = editorState.getCurrentContent();
|
|
134
147
|
var currentContentLength = currentContent.getPlainText('').length;
|
|
135
148
|
var selectedTextLength = _getLengthOfSelectedText();
|
|
136
149
|
|
|
137
|
-
if (
|
|
138
|
-
if (currentContentLength - selectedTextLength +
|
|
150
|
+
if (position === 'before') {
|
|
151
|
+
if (currentContentLength - selectedTextLength + text.length > maxLength - 1) {
|
|
139
152
|
console.log('You can type a maximum of ten characters');
|
|
140
153
|
return 'handled';
|
|
141
154
|
}
|
|
142
|
-
} else {
|
|
143
|
-
if (currentContentLength +
|
|
155
|
+
} else if (position === 'after') {
|
|
156
|
+
if (currentContentLength + text.length - selectedTextLength > maxLength) {
|
|
144
157
|
console.log('You can type a maximum of ten characters');
|
|
145
158
|
return 'handled';
|
|
146
159
|
}
|
|
147
160
|
}
|
|
148
161
|
};
|
|
149
162
|
|
|
163
|
+
/**
|
|
164
|
+
*
|
|
165
|
+
* @returns calls the function to check before typing the text does not exceed maximum length
|
|
166
|
+
*/
|
|
167
|
+
var _handleBeforeInput = function _handleBeforeInput() {
|
|
168
|
+
return _handleInput('', 'before');
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
*
|
|
173
|
+
* @param {string} pastedText the text that is copy pasted in our editor
|
|
174
|
+
* @returns calls the function to check copying the text does not exceed maximum length
|
|
175
|
+
*/
|
|
176
|
+
var _handlePastedText = function _handlePastedText(pastedText) {
|
|
177
|
+
return _handleInput(pastedText, 'after');
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
*
|
|
182
|
+
* @param {object} newEditorState the newstate of editor when we type any text in our editor
|
|
183
|
+
* @returns the new state of editor
|
|
184
|
+
*/
|
|
150
185
|
var _handleChange = function _handleChange(newEditorState) {
|
|
151
186
|
var contentState = newEditorState.getCurrentContent();
|
|
152
187
|
var text = contentState.getPlainText();
|
|
@@ -158,6 +193,11 @@ var DraftInputText = function DraftInputText(_ref) {
|
|
|
158
193
|
}
|
|
159
194
|
};
|
|
160
195
|
|
|
196
|
+
/**
|
|
197
|
+
*
|
|
198
|
+
* @param {string} htmlString the string that is passed to the parent
|
|
199
|
+
* @returns removes the default <p> tag of draftjs
|
|
200
|
+
*/
|
|
161
201
|
var removeOuterPTag = function removeOuterPTag(htmlString) {
|
|
162
202
|
var regex = /^<p>(.*?)<\/p>$/;
|
|
163
203
|
var match = htmlString.match(regex);
|
|
@@ -167,6 +207,7 @@ var DraftInputText = function DraftInputText(_ref) {
|
|
|
167
207
|
(0, _react.useEffect)(function () {
|
|
168
208
|
var html = (0, _draftConvert.convertToHTML)(editorState.getCurrentContent());
|
|
169
209
|
html = removeOuterPTag(html);
|
|
210
|
+
setConvertedContent(html);
|
|
170
211
|
var obj = {
|
|
171
212
|
size: contentLength,
|
|
172
213
|
html: html
|
|
@@ -187,10 +228,8 @@ var DraftInputText = function DraftInputText(_ref) {
|
|
|
187
228
|
});
|
|
188
229
|
}
|
|
189
230
|
}, [value]);
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
var scrollObject = JSON.parse(localStorage.getItem('scrollObject'));
|
|
193
|
-
if (scrollObject && scrollObject.tableListScrollTop) {
|
|
231
|
+
if (!showLocal) {
|
|
232
|
+
(0, _react.useEffect)(function () {
|
|
194
233
|
if (!props.simpleEdit) {
|
|
195
234
|
setDiff(true);
|
|
196
235
|
value = undefined;
|
|
@@ -198,8 +237,8 @@ var DraftInputText = function DraftInputText(_ref) {
|
|
|
198
237
|
return _draftJs.EditorState.createEmpty();
|
|
199
238
|
});
|
|
200
239
|
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
240
|
+
}, [JSON.parse(localStorage.getItem('scrollObject')).tableListScrollTop]);
|
|
241
|
+
}
|
|
203
242
|
|
|
204
243
|
return _react2.default.createElement(
|
|
205
244
|
DraftInputTextDiv,
|
|
@@ -217,8 +256,8 @@ var DraftInputText = function DraftInputText(_ref) {
|
|
|
217
256
|
_react2.default.createElement(_draftJs.Editor, {
|
|
218
257
|
editorState: editorState,
|
|
219
258
|
onChange: _handleChange,
|
|
220
|
-
handleBeforeInput:
|
|
221
|
-
handlePastedText:
|
|
259
|
+
handleBeforeInput: _handleBeforeInput,
|
|
260
|
+
handlePastedText: _handlePastedText,
|
|
222
261
|
handleKeyCommand: handleKeyCommand,
|
|
223
262
|
onFocus: function onFocus() {
|
|
224
263
|
return setFocus(true);
|
|
@@ -310,8 +349,6 @@ var RichTextEditorContainer = _styledComponents2.default.div(_templateObject5, f
|
|
|
310
349
|
return props.theme === 'light' ? _tokens.colors.light.inputCommon.placeholder : _tokens.colors.dark.inputCommon.placeholder;
|
|
311
350
|
}, function (props) {
|
|
312
351
|
return props.label ? '1' : '1';
|
|
313
|
-
}, function (props) {
|
|
314
|
-
return props.fieldType === 'inputField' && '\n .public-DraftStyleDefault-block.public-DraftStyleDefault-ltr {\n display: inline-block;\n overflow: hidden;\n white-space: nowrap;\n width: 100%;\n }\n ';
|
|
315
352
|
});
|
|
316
353
|
|
|
317
354
|
DraftInputText.propTypes = {
|
|
@@ -340,11 +377,13 @@ DraftInputText.propTypes = {
|
|
|
340
377
|
showLengthCount: _propTypes2.default.bool,
|
|
341
378
|
simpleEdit: _propTypes2.default.bool,
|
|
342
379
|
theme: _propTypes2.default.oneOf(['light', 'dark', 'nexc']),
|
|
343
|
-
fieldType: _propTypes2.default.oneOf(['inputField', 'textArea'])
|
|
380
|
+
fieldType: _propTypes2.default.oneOf(['inputField', 'textArea']),
|
|
381
|
+
showLocal: _propTypes2.default.bool
|
|
344
382
|
};
|
|
345
383
|
|
|
346
384
|
DraftInputText.defaultProps = {
|
|
347
|
-
|
|
385
|
+
showLocal: false,
|
|
386
|
+
fieldType: 'textArea',
|
|
348
387
|
readOnly: false,
|
|
349
388
|
code: false,
|
|
350
389
|
error: null,
|
|
@@ -20,8 +20,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20
20
|
_storyHelpers.Stack,
|
|
21
21
|
null,
|
|
22
22
|
_react2.default.createElement(_components.DraftInputText, {
|
|
23
|
+
showLocal: true,
|
|
23
24
|
inputWidth: 300,
|
|
24
|
-
fieldType: '
|
|
25
|
+
fieldType: 'inputField',
|
|
25
26
|
showLengthCount: true,
|
|
26
27
|
type: 'text',
|
|
27
28
|
label: 'First Name',
|
|
@@ -37,6 +38,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
37
38
|
required: true
|
|
38
39
|
}),
|
|
39
40
|
_react2.default.createElement(_components.DraftInputText, {
|
|
41
|
+
showLocal: true,
|
|
40
42
|
type: 'password',
|
|
41
43
|
label: 'Middle Name',
|
|
42
44
|
minLength: 3,
|
|
@@ -44,13 +46,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
44
46
|
placeholder: 'Show as password',
|
|
45
47
|
required: true
|
|
46
48
|
}),
|
|
47
|
-
_react2.default.createElement(_components.DraftInputText, {
|
|
49
|
+
_react2.default.createElement(_components.DraftInputText, {
|
|
50
|
+
showLocal: true,
|
|
51
|
+
type: 'text',
|
|
52
|
+
value: 'hello',
|
|
53
|
+
label: 'Label and default value',
|
|
54
|
+
required: true
|
|
55
|
+
})
|
|
48
56
|
),
|
|
49
57
|
_react2.default.createElement(
|
|
50
58
|
_storyHelpers.Stack,
|
|
51
59
|
null,
|
|
52
|
-
_react2.default.createElement(_components.DraftInputText, { type: 'number', placeholder: 'number field & no Label', required: true, maxLength: 10 }),
|
|
53
60
|
_react2.default.createElement(_components.DraftInputText, {
|
|
61
|
+
showLocal: true,
|
|
62
|
+
type: 'number',
|
|
63
|
+
placeholder: 'number field & no Label',
|
|
64
|
+
required: true,
|
|
65
|
+
maxLength: 10
|
|
66
|
+
}),
|
|
67
|
+
_react2.default.createElement(_components.DraftInputText, {
|
|
68
|
+
showLocal: true,
|
|
54
69
|
type: 'number',
|
|
55
70
|
id: 'input-text-1',
|
|
56
71
|
label: 'Label \'For\'-\'id\' prop',
|
|
@@ -59,6 +74,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
59
74
|
maxLength: 10
|
|
60
75
|
}),
|
|
61
76
|
_react2.default.createElement(_components.DraftInputText, {
|
|
77
|
+
showLocal: true,
|
|
62
78
|
type: 'text',
|
|
63
79
|
value: 'No Label and default value',
|
|
64
80
|
onChange: function onChange(e) {
|
|
@@ -72,6 +88,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
72
88
|
_storyHelpers.Stack,
|
|
73
89
|
null,
|
|
74
90
|
_react2.default.createElement(_components.DraftInputText, {
|
|
91
|
+
showLocal: true,
|
|
75
92
|
type: 'number',
|
|
76
93
|
label: 'number & max 5',
|
|
77
94
|
placeholder: 'max length 5',
|
|
@@ -79,8 +96,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
79
96
|
minLength: 3,
|
|
80
97
|
maxLength: 5
|
|
81
98
|
}),
|
|
82
|
-
_react2.default.createElement(_components.DraftInputText, { type: 'text', error: 'Invalid text', placeholder: 'Display error', required: true }),
|
|
83
99
|
_react2.default.createElement(_components.DraftInputText, {
|
|
100
|
+
showLocal: true,
|
|
101
|
+
type: 'text',
|
|
102
|
+
error: 'Invalid text',
|
|
103
|
+
placeholder: 'Display error',
|
|
104
|
+
required: true
|
|
105
|
+
}),
|
|
106
|
+
_react2.default.createElement(_components.DraftInputText, {
|
|
107
|
+
showLocal: true,
|
|
84
108
|
readOnly: true,
|
|
85
109
|
type: 'text',
|
|
86
110
|
value: 'hello',
|
|
@@ -95,12 +119,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
95
119
|
_storyHelpers.Stack,
|
|
96
120
|
null,
|
|
97
121
|
_react2.default.createElement(_components.DraftInputText, {
|
|
122
|
+
showLocal: true,
|
|
98
123
|
type: 'password',
|
|
99
124
|
value: 'this@is$passw0rd',
|
|
100
125
|
placeholder: 'This is password toggle',
|
|
101
126
|
passwordButton: true
|
|
102
127
|
}),
|
|
103
128
|
_react2.default.createElement(_components.DraftInputText, {
|
|
129
|
+
showLocal: true,
|
|
104
130
|
label: 'Label \'For\'-\'id\' prop',
|
|
105
131
|
type: 'password',
|
|
106
132
|
value: 'this@is$passw0rd',
|
|
@@ -108,6 +134,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
108
134
|
passwordButton: true
|
|
109
135
|
}),
|
|
110
136
|
_react2.default.createElement(_components.DraftInputText, {
|
|
137
|
+
showLocal: true,
|
|
111
138
|
label: 'Label \'For\'-\'id\' ',
|
|
112
139
|
error: ' this is error',
|
|
113
140
|
type: 'password',
|
|
@@ -127,13 +154,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
127
154
|
_storyHelpers.Stack,
|
|
128
155
|
null,
|
|
129
156
|
_react2.default.createElement(_components.DraftInputText, {
|
|
157
|
+
showLocal: true,
|
|
130
158
|
inputWidth: 300,
|
|
131
159
|
theme: 'dark',
|
|
132
160
|
type: 'text',
|
|
133
161
|
label: 'First Name',
|
|
134
162
|
showLengthCount: true,
|
|
135
163
|
value: 'Lorem ',
|
|
136
|
-
maxLength:
|
|
164
|
+
maxLength: 200,
|
|
137
165
|
onChange: function onChange(e) {
|
|
138
166
|
return console.log(e.html, e.size);
|
|
139
167
|
},
|
|
@@ -141,6 +169,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
141
169
|
required: true
|
|
142
170
|
}),
|
|
143
171
|
_react2.default.createElement(_components.DraftInputText, {
|
|
172
|
+
showLocal: true,
|
|
144
173
|
theme: 'dark',
|
|
145
174
|
type: 'password',
|
|
146
175
|
label: 'Middle Name',
|
|
@@ -150,6 +179,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
150
179
|
required: true
|
|
151
180
|
}),
|
|
152
181
|
_react2.default.createElement(_components.DraftInputText, {
|
|
182
|
+
showLocal: true,
|
|
153
183
|
theme: 'dark',
|
|
154
184
|
type: 'text',
|
|
155
185
|
value: 'hello there i am using',
|
|
@@ -161,6 +191,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
161
191
|
_storyHelpers.Stack,
|
|
162
192
|
null,
|
|
163
193
|
_react2.default.createElement(_components.DraftInputText, {
|
|
194
|
+
showLocal: true,
|
|
164
195
|
theme: 'dark',
|
|
165
196
|
type: 'number',
|
|
166
197
|
placeholder: 'number field & no Label',
|
|
@@ -168,6 +199,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
168
199
|
maxLength: 10
|
|
169
200
|
}),
|
|
170
201
|
_react2.default.createElement(_components.DraftInputText, {
|
|
202
|
+
showLocal: true,
|
|
171
203
|
theme: 'dark',
|
|
172
204
|
type: 'number',
|
|
173
205
|
id: 'input-text-1',
|
|
@@ -177,6 +209,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
177
209
|
maxLength: 10
|
|
178
210
|
}),
|
|
179
211
|
_react2.default.createElement(_components.DraftInputText, {
|
|
212
|
+
showLocal: true,
|
|
180
213
|
theme: 'dark',
|
|
181
214
|
capitalizeFirstLetter: true,
|
|
182
215
|
type: 'text',
|
|
@@ -192,6 +225,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
192
225
|
_storyHelpers.Stack,
|
|
193
226
|
null,
|
|
194
227
|
_react2.default.createElement(_components.DraftInputText, {
|
|
228
|
+
showLocal: true,
|
|
195
229
|
theme: 'dark',
|
|
196
230
|
type: 'number',
|
|
197
231
|
label: 'number & max 5',
|
|
@@ -201,6 +235,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
201
235
|
maxLength: 5
|
|
202
236
|
}),
|
|
203
237
|
_react2.default.createElement(_components.DraftInputText, {
|
|
238
|
+
showLocal: true,
|
|
204
239
|
theme: 'dark',
|
|
205
240
|
type: 'text',
|
|
206
241
|
error: 'Invalid text',
|
|
@@ -208,6 +243,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
208
243
|
required: true
|
|
209
244
|
}),
|
|
210
245
|
_react2.default.createElement(_components.DraftInputText, {
|
|
246
|
+
showLocal: true,
|
|
211
247
|
theme: 'dark',
|
|
212
248
|
readOnly: true,
|
|
213
249
|
type: 'text',
|
|
@@ -223,6 +259,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
223
259
|
_storyHelpers.Stack,
|
|
224
260
|
null,
|
|
225
261
|
_react2.default.createElement(_components.DraftInputText, {
|
|
262
|
+
showLocal: true,
|
|
226
263
|
theme: 'dark',
|
|
227
264
|
type: 'password',
|
|
228
265
|
value: 'this@is$passw0rd',
|
|
@@ -230,6 +267,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
230
267
|
passwordButton: true
|
|
231
268
|
}),
|
|
232
269
|
_react2.default.createElement(_components.DraftInputText, {
|
|
270
|
+
showLocal: true,
|
|
233
271
|
theme: 'dark',
|
|
234
272
|
label: 'Label \'For\'-\'id\' prop',
|
|
235
273
|
type: 'password',
|
|
@@ -238,6 +276,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
238
276
|
passwordButton: true
|
|
239
277
|
}),
|
|
240
278
|
_react2.default.createElement(_components.DraftInputText, {
|
|
279
|
+
showLocal: true,
|
|
241
280
|
theme: 'dark',
|
|
242
281
|
label: 'Label \'For\'-\'id\' ',
|
|
243
282
|
error: ' this is error',
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desynova-digital/components",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.5",
|
|
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": "9.0.
|
|
10
|
+
"@desynova-digital/tokens": "9.0.5",
|
|
11
11
|
"prop-types": "^15.7.2",
|
|
12
12
|
"styled-components": "^4.3.2"
|
|
13
13
|
},
|