intelicoreact 1.2.45 → 1.2.46
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.
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +4 -2
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +7 -3
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +7 -3
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +5 -2
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +7 -3
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +7 -3
- package/dist/Atomic/FormElements/Input/Input.js +4 -2
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +7 -3
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +5 -3
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +5 -3
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +4 -2
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +7 -3
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +7 -3
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +57 -0
- package/package.json +1 -1
|
@@ -31,7 +31,9 @@ var CheckboxInput = function CheckboxInput(_ref) {
|
|
|
31
31
|
className = _ref.className,
|
|
32
32
|
isStark = _ref.isStark,
|
|
33
33
|
_ref$testId = _ref.testId,
|
|
34
|
-
testId = _ref$testId === void 0 ? '' : _ref$testId
|
|
34
|
+
testId = _ref$testId === void 0 ? '' : _ref$testId,
|
|
35
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
36
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
35
37
|
return /*#__PURE__*/_react.default.createElement("label", {
|
|
36
38
|
"data-testid": "checkbox--label-".concat((0, _utils.getCorrectTestId)({
|
|
37
39
|
testId: testId || id || fieldKey
|
|
@@ -56,7 +58,7 @@ var CheckboxInput = function CheckboxInput(_ref) {
|
|
|
56
58
|
"data-testid": "checkbox--input--".concat((0, _utils.getCorrectTestId)({
|
|
57
59
|
testId: testId || id || fieldKey
|
|
58
60
|
}))
|
|
59
|
-
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
61
|
+
}, attributesOfNativeInput)), /*#__PURE__*/_react.default.createElement("span", {
|
|
60
62
|
className: "checkbox-input__mark"
|
|
61
63
|
})), label && /*#__PURE__*/_react.default.createElement("div", {
|
|
62
64
|
className: "checkbox-input__label"
|
|
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.default = void 0;
|
|
11
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
12
14
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
15
|
|
|
14
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -66,7 +68,9 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
66
68
|
fieldKey = _ref.fieldKey,
|
|
67
69
|
id = _ref.id,
|
|
68
70
|
_ref$noOptionsText = _ref.noOptionsText,
|
|
69
|
-
noOptionsText = _ref$noOptionsText === void 0 ? 'No options available' : _ref$noOptionsText
|
|
71
|
+
noOptionsText = _ref$noOptionsText === void 0 ? 'No options available' : _ref$noOptionsText,
|
|
72
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
73
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
70
74
|
var dropdownId = fieldKey || id;
|
|
71
75
|
|
|
72
76
|
var _useState = (0, _react.useState)(false),
|
|
@@ -479,7 +483,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
479
483
|
onClick: toggleList,
|
|
480
484
|
onKeyDown: onKeyDown,
|
|
481
485
|
onKeyUp: onKeyUp
|
|
482
|
-
}, isSearchable ? /*#__PURE__*/_react.default.createElement("input", {
|
|
486
|
+
}, isSearchable ? /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
483
487
|
ref: searchInputRef,
|
|
484
488
|
className: "".concat(RC, "__input"),
|
|
485
489
|
value: isOpen ? searchValue !== null && searchValue !== void 0 ? searchValue : '' : selectedLabel || '',
|
|
@@ -499,7 +503,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
499
503
|
setIsOpen(true);
|
|
500
504
|
}
|
|
501
505
|
}
|
|
502
|
-
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
506
|
+
}, attributesOfNativeInput)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
503
507
|
className: "text"
|
|
504
508
|
}, selectedLabel || placeholder), postfixText && /*#__PURE__*/_react.default.createElement("span", {
|
|
505
509
|
className: "dropdown__list-item-postfix"
|
|
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.default = void 0;
|
|
11
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
12
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
15
|
|
|
14
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -51,7 +53,9 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
|
|
|
51
53
|
_ref$isNotValidateASC = _ref.isNotValidateASCII,
|
|
52
54
|
isNotValidateASCII = _ref$isNotValidateASC === void 0 ? false : _ref$isNotValidateASC,
|
|
53
55
|
_ref$noOptionsText = _ref.noOptionsText,
|
|
54
|
-
noOptionsText = _ref$noOptionsText === void 0 ? 'No options available' : _ref$noOptionsText
|
|
56
|
+
noOptionsText = _ref$noOptionsText === void 0 ? 'No options available' : _ref$noOptionsText,
|
|
57
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
58
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
55
59
|
var dropdownId = fieldKey || id;
|
|
56
60
|
|
|
57
61
|
var _useState = (0, _react.useState)(false),
|
|
@@ -276,7 +280,7 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
|
|
|
276
280
|
onFocus: function onFocus() {
|
|
277
281
|
return !isFocusedByClick ? setIsOpen(true) : null;
|
|
278
282
|
}
|
|
279
|
-
}, isSearchable ? /*#__PURE__*/_react.default.createElement("input", {
|
|
283
|
+
}, isSearchable ? /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
280
284
|
ref: searchInputRef,
|
|
281
285
|
className: "".concat(RC, "__input"),
|
|
282
286
|
value: isOpen ? searchValue : labelByValue,
|
|
@@ -284,7 +288,7 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
|
|
|
284
288
|
placeholder: placeholder,
|
|
285
289
|
onFocus: searchableInputFocus,
|
|
286
290
|
onClick: handle.onInputClick
|
|
287
|
-
}) : /*#__PURE__*/_react.default.createElement("span", {
|
|
291
|
+
}, attributesOfNativeInput)) : /*#__PURE__*/_react.default.createElement("span", {
|
|
288
292
|
className: "text"
|
|
289
293
|
}, labelByValue || placeholder), /*#__PURE__*/_react.default.createElement("span", {
|
|
290
294
|
className: (0, _classnames.default)("".concat(RC, "__arrow"), (0, _defineProperty2.default)({}, "".concat(RC, "__arrow_active"), isOpen)),
|
|
@@ -53,7 +53,9 @@ var FileLoader = function FileLoader(props) {
|
|
|
53
53
|
_props$isLinkTypeDown = props.isLinkTypeDownload,
|
|
54
54
|
isLinkTypeDownload = _props$isLinkTypeDown === void 0 ? false : _props$isLinkTypeDown,
|
|
55
55
|
_props$isUseLinkTitle = props.isUseLinkTitle,
|
|
56
|
-
isUseLinkTitle = _props$isUseLinkTitle === void 0 ? false : _props$isUseLinkTitle
|
|
56
|
+
isUseLinkTitle = _props$isUseLinkTitle === void 0 ? false : _props$isUseLinkTitle,
|
|
57
|
+
_props$attributesOfNa = props.attributesOfNativeInput,
|
|
58
|
+
attributesOfNativeInput = _props$attributesOfNa === void 0 ? {} : _props$attributesOfNa;
|
|
57
59
|
|
|
58
60
|
var _useState = (0, _react.useState)(false),
|
|
59
61
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -90,7 +92,8 @@ var FileLoader = function FileLoader(props) {
|
|
|
90
92
|
placeholder: placeholder,
|
|
91
93
|
filterFiles: filterFiles,
|
|
92
94
|
processErrors: processErrors,
|
|
93
|
-
isBlockNullValues: isBlockNullValues
|
|
95
|
+
isBlockNullValues: isBlockNullValues,
|
|
96
|
+
attributesOfNativeInput: attributesOfNativeInput
|
|
94
97
|
}));
|
|
95
98
|
};
|
|
96
99
|
|
|
@@ -11,6 +11,8 @@ exports.default = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
13
|
|
|
14
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
+
|
|
14
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
17
|
|
|
16
18
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -44,7 +46,9 @@ var LoadZone = function LoadZone(_ref) {
|
|
|
44
46
|
_ref$filterFiles = _ref.filterFiles,
|
|
45
47
|
filterFiles = _ref$filterFiles === void 0 ? FILTER_FILES_DEFAULT : _ref$filterFiles,
|
|
46
48
|
processErrors = _ref.processErrors,
|
|
47
|
-
isBlockNullValues = _ref.isBlockNullValues
|
|
49
|
+
isBlockNullValues = _ref.isBlockNullValues,
|
|
50
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
51
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
48
52
|
var dropZoneId = "dropZone-".concat(fieldKey);
|
|
49
53
|
var handle = {
|
|
50
54
|
change: function () {
|
|
@@ -163,12 +167,12 @@ var LoadZone = function LoadZone(_ref) {
|
|
|
163
167
|
id: dropZoneId,
|
|
164
168
|
className: (0, _classnames.default)("".concat(RC, "__input-label"), (0, _defineProperty2.default)({}, "".concat(RC, "__input-label_no-icon"), !icon)),
|
|
165
169
|
htmlFor: fieldKey
|
|
166
|
-
}, placeholder, /*#__PURE__*/_react.default.createElement("input", {
|
|
170
|
+
}, placeholder, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
167
171
|
id: fieldKey,
|
|
168
172
|
className: (0, _classnames.default)("".concat(RC, "__input")),
|
|
169
173
|
type: "file",
|
|
170
174
|
onChange: handle.change
|
|
171
|
-
})));
|
|
175
|
+
}, attributesOfNativeInput))));
|
|
172
176
|
};
|
|
173
177
|
|
|
174
178
|
var _default = LoadZone;
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
10
12
|
var _react = _interopRequireDefault(require("react"));
|
|
11
13
|
|
|
12
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -31,7 +33,9 @@ var FileLoaderLocal = function FileLoaderLocal(_ref) {
|
|
|
31
33
|
value = _ref.value,
|
|
32
34
|
isNoTrashIcon = _ref.isNoTrashIcon,
|
|
33
35
|
maxItemSizeBytes = _ref.maxItemSizeBytes,
|
|
34
|
-
testId = _ref.testId
|
|
36
|
+
testId = _ref.testId,
|
|
37
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
38
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
35
39
|
|
|
36
40
|
var getFileName = function getFileName(value) {
|
|
37
41
|
var result = value.match(/[^\\]+$/);
|
|
@@ -103,7 +107,7 @@ var FileLoaderLocal = function FileLoaderLocal(_ref) {
|
|
|
103
107
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
104
108
|
"data-testid": "input--file-loader-local--key-".concat(testId),
|
|
105
109
|
className: (0, _classnames.default)('file-loader-local', className)
|
|
106
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
107
111
|
onChange: handle.change,
|
|
108
112
|
className: "file-loader-local__file-input",
|
|
109
113
|
id: "file-input-".concat(id).concat(groupId ? "-".concat(groupId) : ''),
|
|
@@ -111,7 +115,7 @@ var FileLoaderLocal = function FileLoaderLocal(_ref) {
|
|
|
111
115
|
name: "file",
|
|
112
116
|
required: isRequired,
|
|
113
117
|
accept: accept
|
|
114
|
-
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
118
|
+
}, attributesOfNativeInput)), /*#__PURE__*/_react.default.createElement("label", {
|
|
115
119
|
className: "file-loader-local__label-box",
|
|
116
120
|
htmlFor: "file-input-".concat(id).concat(groupId ? "-".concat(groupId) : '')
|
|
117
121
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -131,7 +131,9 @@ var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
131
131
|
name = _ref.name,
|
|
132
132
|
fieldKey = _ref.fieldKey,
|
|
133
133
|
id = _ref.id,
|
|
134
|
-
key = _ref.key
|
|
134
|
+
key = _ref.key,
|
|
135
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
136
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
135
137
|
|
|
136
138
|
var _ref2 = blurTrim || {},
|
|
137
139
|
trimStart = _ref2.trimStart,
|
|
@@ -441,7 +443,7 @@ var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
441
443
|
if (isUseAutoSelect) inputRef.current.select();
|
|
442
444
|
if (uniProps.onFocus) uniProps.onFocus.apply(uniProps, arguments);
|
|
443
445
|
}
|
|
444
|
-
})), DynamicIconComponent !== null && DynamicIconComponent !== void 0 ? DynamicIconComponent : icon, action, withDelete && onInputHover && /*#__PURE__*/_react.default.createElement("span", {
|
|
446
|
+
}, attributesOfNativeInput)), DynamicIconComponent !== null && DynamicIconComponent !== void 0 ? DynamicIconComponent : icon, action, withDelete && onInputHover && /*#__PURE__*/_react.default.createElement("span", {
|
|
445
447
|
"data-testid": "icon-close",
|
|
446
448
|
className: (0, _classnames.default)("input__close", {
|
|
447
449
|
hidden: !(0, _fieldValueFormatters.getSafelyValue)(value)
|
|
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.default = void 0;
|
|
11
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
12
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
15
|
|
|
14
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -26,7 +28,9 @@ var InputCurrency = function InputCurrency(_ref) {
|
|
|
26
28
|
onChange = _ref.onChange,
|
|
27
29
|
className = _ref.className,
|
|
28
30
|
value = _ref.value,
|
|
29
|
-
disabled = _ref.disabled
|
|
31
|
+
disabled = _ref.disabled,
|
|
32
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
33
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
30
34
|
|
|
31
35
|
var _useState = (0, _react.useState)(value || currencySymbol || '$'),
|
|
32
36
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -69,7 +73,7 @@ var InputCurrency = function InputCurrency(_ref) {
|
|
|
69
73
|
className: (0, _classnames.default)('input-currency-box', className, {
|
|
70
74
|
disabled: disabled
|
|
71
75
|
})
|
|
72
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
73
77
|
className: "input-currency",
|
|
74
78
|
type: "text",
|
|
75
79
|
ref: inputRef,
|
|
@@ -77,7 +81,7 @@ var InputCurrency = function InputCurrency(_ref) {
|
|
|
77
81
|
onChange: formatCurrencyInput,
|
|
78
82
|
onClick: onInputClick,
|
|
79
83
|
onKeyDown: onKeyDown
|
|
80
|
-
}));
|
|
84
|
+
}, attributesOfNativeInput)));
|
|
81
85
|
};
|
|
82
86
|
|
|
83
87
|
var _default = InputCurrency;
|
|
@@ -118,7 +118,9 @@ function InputMask2() {
|
|
|
118
118
|
fieldKey = _ref.fieldKey,
|
|
119
119
|
id = _ref.id,
|
|
120
120
|
disabled = _ref.disabled,
|
|
121
|
-
testId = _ref.testId
|
|
121
|
+
testId = _ref.testId,
|
|
122
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
123
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
122
124
|
|
|
123
125
|
var errors = _objectSpread(_objectSpread({}, _config.DEFAULT_ERRORS), customErrors);
|
|
124
126
|
|
|
@@ -684,7 +686,7 @@ function InputMask2() {
|
|
|
684
686
|
};
|
|
685
687
|
|
|
686
688
|
var renderInput = function renderInput() {
|
|
687
|
-
return /*#__PURE__*/_react.default.createElement("input", {
|
|
689
|
+
return /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
688
690
|
name: name || fieldKey || id || testId || '',
|
|
689
691
|
"data-testid": testId,
|
|
690
692
|
className: "input-mask_input ".concat(className),
|
|
@@ -709,7 +711,7 @@ function InputMask2() {
|
|
|
709
711
|
e.preventDefault();
|
|
710
712
|
},
|
|
711
713
|
onSelect: onSelect
|
|
712
|
-
});
|
|
714
|
+
}, attributesOfNativeInput));
|
|
713
715
|
};
|
|
714
716
|
|
|
715
717
|
var render = function render() {
|
|
@@ -128,7 +128,9 @@ function InputMask3() {
|
|
|
128
128
|
fieldKey = _ref.fieldKey,
|
|
129
129
|
id = _ref.id,
|
|
130
130
|
disabled = _ref.disabled,
|
|
131
|
-
testId = _ref.testId
|
|
131
|
+
testId = _ref.testId,
|
|
132
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
133
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
132
134
|
|
|
133
135
|
var errors = _objectSpread(_objectSpread({}, _config.DEFAULT_ERRORS), customErrors);
|
|
134
136
|
|
|
@@ -752,7 +754,7 @@ function InputMask3() {
|
|
|
752
754
|
};
|
|
753
755
|
|
|
754
756
|
var renderInput = function renderInput() {
|
|
755
|
-
return /*#__PURE__*/_react.default.createElement("input", {
|
|
757
|
+
return /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
756
758
|
name: name || fieldKey || id || testId || '',
|
|
757
759
|
"data-testid": testId,
|
|
758
760
|
className: "input-mask_input ".concat(className),
|
|
@@ -777,7 +779,7 @@ function InputMask3() {
|
|
|
777
779
|
e.preventDefault();
|
|
778
780
|
},
|
|
779
781
|
onSelect: onSelect
|
|
780
|
-
});
|
|
782
|
+
}, attributesOfNativeInput));
|
|
781
783
|
};
|
|
782
784
|
|
|
783
785
|
var renderHideToggler = function renderHideToggler() {
|
|
@@ -84,7 +84,9 @@ var NumericInput = function NumericInput(_ref) {
|
|
|
84
84
|
_ref$onlyNumbers = _ref.onlyNumbers,
|
|
85
85
|
onlyNumbers = _ref$onlyNumbers === void 0 ? {
|
|
86
86
|
type: 'int'
|
|
87
|
-
} : _ref$onlyNumbers
|
|
87
|
+
} : _ref$onlyNumbers,
|
|
88
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
89
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
88
90
|
var DEFAULT_BLINK_TIME = 200; //REFS
|
|
89
91
|
|
|
90
92
|
var inputRef = (0, _react.useRef)(null);
|
|
@@ -303,7 +305,7 @@ var NumericInput = function NumericInput(_ref) {
|
|
|
303
305
|
if (isUseAutoSelect) inputRef.current.select();
|
|
304
306
|
if (uniProps.onFocus) uniProps.onFocus.apply(uniProps, arguments);
|
|
305
307
|
}
|
|
306
|
-
})), !isNotRenderButtons ? /*#__PURE__*/_react.default.createElement("div", {
|
|
308
|
+
}, attributesOfNativeInput)), !isNotRenderButtons ? /*#__PURE__*/_react.default.createElement("div", {
|
|
307
309
|
className: "input__nums"
|
|
308
310
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
309
311
|
"data-testid": "input--button--".concat(testId, "--minus"),
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
10
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
13
|
|
|
12
14
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -28,14 +30,16 @@ var RadioInput = function RadioInput(_ref) {
|
|
|
28
30
|
_ref$testId = _ref.testId,
|
|
29
31
|
testId = _ref$testId === void 0 ? '' : _ref$testId,
|
|
30
32
|
_ref$onChange = _ref.onChange,
|
|
31
|
-
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange
|
|
33
|
+
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
34
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
35
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
32
36
|
|
|
33
37
|
return /*#__PURE__*/_react.default.createElement("label", {
|
|
34
38
|
className: (0, _classnames.default)(RC, className, (0, _defineProperty2.default)({}, "".concat(RC, "_disabled"), disabled)),
|
|
35
39
|
htmlFor: id
|
|
36
40
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
37
41
|
className: (0, _classnames.default)("".concat(RC, "__input"), (0, _defineProperty2.default)({}, "".concat(RC, "__input--checked"), checked === value))
|
|
38
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
39
43
|
id: id,
|
|
40
44
|
"data-testid": "radio--input--".concat(testId || id),
|
|
41
45
|
type: "radio",
|
|
@@ -46,7 +50,7 @@ var RadioInput = function RadioInput(_ref) {
|
|
|
46
50
|
},
|
|
47
51
|
name: name,
|
|
48
52
|
disabled: disabled
|
|
49
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
53
|
+
}, attributesOfNativeInput)), /*#__PURE__*/_react.default.createElement("div", {
|
|
50
54
|
className: "".concat(RC, "__mark")
|
|
51
55
|
})), label && /*#__PURE__*/_react.default.createElement("div", {
|
|
52
56
|
className: "".concat(RC, "__label")
|
|
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.default = void 0;
|
|
11
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
12
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
15
|
|
|
14
16
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
@@ -73,7 +75,9 @@ var TagsDropdown = function TagsDropdown(_ref) {
|
|
|
73
75
|
fieldKey = _ref.fieldKey,
|
|
74
76
|
id = _ref.id,
|
|
75
77
|
_ref$noOptionsText = _ref.noOptionsText,
|
|
76
|
-
noOptionsText = _ref$noOptionsText === void 0 ? 'No options available' : _ref$noOptionsText
|
|
78
|
+
noOptionsText = _ref$noOptionsText === void 0 ? 'No options available' : _ref$noOptionsText,
|
|
79
|
+
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
80
|
+
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
|
|
77
81
|
var dropdownId = fieldKey || id;
|
|
78
82
|
|
|
79
83
|
var _useState = (0, _react.useState)(false),
|
|
@@ -368,7 +372,7 @@ var TagsDropdown = function TagsDropdown(_ref) {
|
|
|
368
372
|
},
|
|
369
373
|
isNoDismiss: false
|
|
370
374
|
});
|
|
371
|
-
}), chosenOptions.length === 0 || !noTagsWrap ? /*#__PURE__*/_react.default.createElement("input", {
|
|
375
|
+
}), chosenOptions.length === 0 || !noTagsWrap ? /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
372
376
|
ref: inputRef,
|
|
373
377
|
className: "".concat(RC, "__input"),
|
|
374
378
|
value: searchValue,
|
|
@@ -379,7 +383,7 @@ var TagsDropdown = function TagsDropdown(_ref) {
|
|
|
379
383
|
onKeyDown: function onKeyDown(e) {
|
|
380
384
|
return onKeyPress(e, searchValue);
|
|
381
385
|
}
|
|
382
|
-
}) : '', isOpen && renderListContainer(), /*#__PURE__*/_react.default.createElement("span", {
|
|
386
|
+
}, attributesOfNativeInput)) : '', isOpen && renderListContainer(), /*#__PURE__*/_react.default.createElement("span", {
|
|
383
387
|
className: (0, _classnames.default)("".concat(RC, "__arrow"), (0, _defineProperty2.default)({}, "".concat(RC, "__arrow_active"), isOpen))
|
|
384
388
|
}, /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, {
|
|
385
389
|
className: "color--text"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EMAIL_KEYBOARD = exports.NUMERIC_KEYBOARD = exports.ALL_KEYBOARD_TYPES = void 0;
|
|
7
|
+
//? Удобно использовать для расширения объекта атрибутов
|
|
8
|
+
var ALL_KEYBOARD_TYPES = {
|
|
9
|
+
numeric: {
|
|
10
|
+
inputMode: 'numeric'
|
|
11
|
+
},
|
|
12
|
+
email: {
|
|
13
|
+
inputMode: 'email'
|
|
14
|
+
}
|
|
15
|
+
}; //? Например:
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
const constructor = [
|
|
19
|
+
...
|
|
20
|
+
{
|
|
21
|
+
key: 'someField',
|
|
22
|
+
...
|
|
23
|
+
attributesOfNativeInput: {
|
|
24
|
+
'data-testId': `someFieldTestId-${someId}`,
|
|
25
|
+
...ALL_KEYBOARD_TYPES.numeric
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
...
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
*/
|
|
32
|
+
// *****************************
|
|
33
|
+
//? Удобно использовать для расширения объекта филда, если в филде более не добавляются другие атрибуты
|
|
34
|
+
//? Например:
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
const constructor = [
|
|
38
|
+
...
|
|
39
|
+
{
|
|
40
|
+
key: 'someField',
|
|
41
|
+
...NUMERIC_KEYBOARD
|
|
42
|
+
...
|
|
43
|
+
}
|
|
44
|
+
...
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
exports.ALL_KEYBOARD_TYPES = ALL_KEYBOARD_TYPES;
|
|
50
|
+
var NUMERIC_KEYBOARD = {
|
|
51
|
+
attributesOfNativeInput: ALL_KEYBOARD_TYPES.numeric
|
|
52
|
+
};
|
|
53
|
+
exports.NUMERIC_KEYBOARD = NUMERIC_KEYBOARD;
|
|
54
|
+
var EMAIL_KEYBOARD = {
|
|
55
|
+
attributesOfNativeInput: ALL_KEYBOARD_TYPES.email
|
|
56
|
+
};
|
|
57
|
+
exports.EMAIL_KEYBOARD = EMAIL_KEYBOARD;
|