intelicoreact 1.2.87 → 1.2.89

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.
@@ -53,7 +53,7 @@ var RC = 'dropdown';
53
53
  var MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH = 10;
54
54
 
55
55
  var Dropdown = function Dropdown(_ref) {
56
- var _options$find, _dropdownListWrapperR4, _dropdownListWrapperR5, _dropdownListRef$curr5, _dropdownListRef$curr6, _filteredOptions$find;
56
+ var _options$find, _dropdownListWrapperR4, _dropdownListWrapperR5, _dropdownListRef$curr5, _dropdownListRef$curr6, _filteredOptions$find, _tabIndex$toString;
57
57
 
58
58
  var label = _ref.label,
59
59
  _ref$options = _ref.options,
@@ -83,7 +83,8 @@ var Dropdown = function Dropdown(_ref) {
83
83
  withMobileLogic = _ref.withMobileLogic,
84
84
  _ref$minItemsForShowM = _ref.minItemsForShowMobileSearch,
85
85
  minItemsForShowMobileSearch = _ref$minItemsForShowM === void 0 ? MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH : _ref$minItemsForShowM,
86
- customTrigger = _ref.customTrigger;
86
+ customTrigger = _ref.customTrigger,
87
+ tabIndex = _ref.tabIndex;
87
88
 
88
89
  var _useIsMobile = (0, _useIsMobile2.default)(),
89
90
  isMobileProp = _useIsMobile.isMobile;
@@ -660,7 +661,8 @@ var Dropdown = function Dropdown(_ref) {
660
661
  className: "".concat(RC, "__trigger input__wrap ").concat(isOpen ? 'input__wrap--focus' : '', " ").concat(!value ? 'placeholder' : '', " ").concat(error ? 'error' : ''),
661
662
  onClick: toggleList,
662
663
  onKeyDown: onKeyDown,
663
- onKeyUp: onKeyUp
664
+ onKeyUp: onKeyUp,
665
+ tabIndex: tabIndex === null || tabIndex === void 0 ? void 0 : (_tabIndex$toString = tabIndex.toString) === null || _tabIndex$toString === void 0 ? void 0 : _tabIndex$toString.call(tabIndex)
664
666
  }, customTrigger || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isSearchable && !isMobile ? /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
665
667
  ref: searchInputRef,
666
668
  className: "".concat(RC, "__input"),
@@ -681,7 +683,9 @@ var Dropdown = function Dropdown(_ref) {
681
683
  setIsOpen(true);
682
684
  }
683
685
  }
684
- }, attributesOfNativeInput)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
686
+ }, attributesOfNativeInput, {
687
+ tabIndex: -1
688
+ })) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
685
689
  className: "text"
686
690
  }, selectedLabel || placeholder), postfixText && /*#__PURE__*/_react.default.createElement("span", {
687
691
  className: "dropdown__list-item-postfix"
@@ -36,6 +36,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
36
36
  var RC = 'dropdown-live-search';
37
37
 
38
38
  var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
39
+ var _tabIndex$toString;
40
+
39
41
  var value = _ref.value,
40
42
  error = _ref.error,
41
43
  disabled = _ref.disabled,
@@ -56,7 +58,8 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
56
58
  _ref$noOptionsText = _ref.noOptionsText,
57
59
  noOptionsText = _ref$noOptionsText === void 0 ? 'No options available' : _ref$noOptionsText,
58
60
  _ref$attributesOfNati = _ref.attributesOfNativeInput,
59
- attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
61
+ attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati,
62
+ tabIndex = _ref.tabIndex;
60
63
  var dropdownId = fieldKey || id;
61
64
 
62
65
  var _useState = (0, _react.useState)(false),
@@ -280,7 +283,8 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
280
283
  },
281
284
  onFocus: function onFocus() {
282
285
  return !isFocusedByClick ? setIsOpen(true) : null;
283
- }
286
+ },
287
+ tabIndex: tabIndex === null || tabIndex === void 0 ? void 0 : (_tabIndex$toString = tabIndex.toString) === null || _tabIndex$toString === void 0 ? void 0 : _tabIndex$toString.call(tabIndex)
284
288
  }, isSearchable ? /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
285
289
  ref: searchInputRef,
286
290
  className: "".concat(RC, "__input"),
@@ -288,7 +292,8 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
288
292
  onChange: handle.onInputChange,
289
293
  placeholder: placeholder,
290
294
  onFocus: searchableInputFocus,
291
- onClick: handle.onInputClick
295
+ onClick: handle.onInputClick,
296
+ tabIndex: -1
292
297
  }, attributesOfNativeInput)) : /*#__PURE__*/_react.default.createElement("span", {
293
298
  className: "text"
294
299
  }, labelByValue || placeholder), /*#__PURE__*/_react.default.createElement("span", {
@@ -18,7 +18,7 @@ require("./Button.scss");
18
18
  var RC = 'button';
19
19
 
20
20
  var Button = function Button(_ref) {
21
- var _cn;
21
+ var _tabIndex$toString, _cn;
22
22
 
23
23
  var label = _ref.label,
24
24
  onClick = _ref.onClick,
@@ -38,7 +38,7 @@ var Button = function Button(_ref) {
38
38
  var noRenderIcon = noIcon || variant === 'ellipse-apply' || variant === 'ellipse-cancel';
39
39
  return /*#__PURE__*/_react.default.createElement("button", {
40
40
  "data-testid": "button".concat(testId && "--".concat(testId), "--").concat((label === null || label === void 0 ? void 0 : label.replace(/\s/g, '-')) || variant),
41
- tabIndex: tabIndex,
41
+ tabIndex: tabIndex === null || tabIndex === void 0 ? void 0 : (_tabIndex$toString = tabIndex.toString) === null || _tabIndex$toString === void 0 ? void 0 : _tabIndex$toString.call(tabIndex),
42
42
  style: style,
43
43
  className: (0, _classnames.default)(RC, (_cn = {}, (0, _defineProperty2.default)(_cn, "".concat(RC, "_").concat(variant), variant), (0, _defineProperty2.default)(_cn, 'button_icon-left', icon && !isIconRight), (0, _defineProperty2.default)(_cn, 'button_icon-right', icon && isIconRight), _cn), className),
44
44
  onClick: onClick,
@@ -59,7 +59,8 @@ var InputAddress = function InputAddress(_ref) {
59
59
  noValidate = _ref$noValidate === void 0 ? false : _ref$noValidate,
60
60
  renderSelectedItem = _ref.renderSelectedItem,
61
61
  renderListItem = _ref.renderListItem,
62
- renderHintMessage = _ref.renderHintMessage;
62
+ renderHintMessage = _ref.renderHintMessage,
63
+ attributesOfNativeInput = _ref.attributesOfNativeInput;
63
64
  var inputRef = (0, _react.useRef)(null);
64
65
  var listRef = (0, _react.useRef)(null);
65
66
 
@@ -102,8 +103,10 @@ var InputAddress = function InputAddress(_ref) {
102
103
  var _query$street;
103
104
 
104
105
  if (noValidate) return false;
105
- if (query === '') return false;
106
- if (!(query !== null && query !== void 0 && query.hasOwnProperty('streetNumber')) || !(query !== null && query !== void 0 && query.streetNumber)) return true;
106
+ if (query === '') return false; // eslint-disable-next-line no-prototype-builtins
107
+
108
+ if (!(query !== null && query !== void 0 && query.hasOwnProperty('streetNumber')) || !(query !== null && query !== void 0 && query.streetNumber)) return true; // eslint-disable-next-line no-prototype-builtins
109
+
107
110
  if (!(query !== null && query !== void 0 && query.hasOwnProperty('street')) || !(query !== null && query !== void 0 && (_query$street = query.street) !== null && _query$street !== void 0 && _query$street.fullName)) return true;
108
111
  return false;
109
112
  }, [query]);
@@ -277,7 +280,8 @@ var InputAddress = function InputAddress(_ref) {
277
280
  onBlur: function onBlur() {
278
281
  return setIsFocused(false);
279
282
  },
280
- onKeyDown: onKeyDown
283
+ onKeyDown: onKeyDown,
284
+ attributesOfNativeInput: attributesOfNativeInput
281
285
  }), isWrongAddress && /*#__PURE__*/_react.default.createElement("div", {
282
286
  className: (0, _classnames.default)('input-address__alert', {
283
287
  'input-address__alert--visible': !isFocused
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.2.87",
3
+ "version": "1.2.89",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [