intelicoreact 1.2.47 → 1.2.49

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.
Files changed (73) hide show
  1. package/dist/Atomic/FormElements/Dropdown/Dropdown.js +134 -23
  2. package/dist/Atomic/FormElements/Dropdown/Dropdown.scss +169 -14
  3. package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +5 -14
  4. package/dist/Atomic/FormElements/InputMask3/InputMask3.js +22 -23
  5. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +199 -29
  6. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.scss +209 -7
  7. package/dist/Atomic/FormElements/UserContacts/UserContacts.js +4 -4
  8. package/dist/Atomic/UI/Hint/Hint.js +5 -23
  9. package/dist/Atomic/UI/Modal/Modal.js +1 -1
  10. package/dist/Atomic/UI/Modal/partials/useMobileModal.js +0 -3
  11. package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +42 -0
  12. package/dist/Molecular/CustomIcons/components/AlertCircle.js +42 -0
  13. package/dist/Molecular/CustomIcons/components/AppStore.js +46 -0
  14. package/dist/Molecular/CustomIcons/components/Arrow.js +52 -0
  15. package/dist/Molecular/CustomIcons/components/ArrowDown.js +34 -0
  16. package/dist/Molecular/CustomIcons/components/ArrowLeft.js +37 -0
  17. package/dist/Molecular/CustomIcons/components/ArrowRight.js +37 -0
  18. package/dist/Molecular/CustomIcons/components/ArrowUp.js +34 -0
  19. package/dist/Molecular/CustomIcons/components/Bell.js +32 -0
  20. package/dist/Molecular/CustomIcons/components/Button.js +32 -0
  21. package/dist/Molecular/CustomIcons/components/Campaigns.js +33 -0
  22. package/dist/Molecular/CustomIcons/components/Check.js +33 -0
  23. package/dist/Molecular/CustomIcons/components/Check2.js +32 -0
  24. package/dist/Molecular/CustomIcons/components/ChevronDown.js +32 -0
  25. package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +32 -0
  26. package/dist/Molecular/CustomIcons/components/ChevronLeft.js +32 -0
  27. package/dist/Molecular/CustomIcons/components/ChevronRight.js +32 -0
  28. package/dist/Molecular/CustomIcons/components/ChevronUp.js +32 -0
  29. package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +47 -0
  30. package/dist/Molecular/CustomIcons/components/Close.js +34 -0
  31. package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +59 -0
  32. package/dist/Molecular/CustomIcons/components/Delete.js +33 -0
  33. package/dist/Molecular/CustomIcons/components/Edit.js +32 -0
  34. package/dist/Molecular/CustomIcons/components/Email.js +50 -0
  35. package/dist/Molecular/CustomIcons/components/FinturfLogo.js +40 -0
  36. package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +48 -0
  37. package/dist/Molecular/CustomIcons/components/Flows.js +32 -0
  38. package/dist/Molecular/CustomIcons/components/Gift.js +37 -0
  39. package/dist/Molecular/CustomIcons/components/GoogleAuth.js +46 -0
  40. package/dist/Molecular/CustomIcons/components/GooglePlay.js +46 -0
  41. package/dist/Molecular/CustomIcons/components/HelpCircle.js +35 -0
  42. package/dist/Molecular/CustomIcons/components/HelpCircle2.js +36 -0
  43. package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +35 -0
  44. package/dist/Molecular/CustomIcons/components/Home.js +35 -0
  45. package/dist/Molecular/CustomIcons/components/Home2.js +38 -0
  46. package/dist/Molecular/CustomIcons/components/Key.js +40 -0
  47. package/dist/Molecular/CustomIcons/components/Landers.js +36 -0
  48. package/dist/Molecular/CustomIcons/components/Lock.js +32 -0
  49. package/dist/Molecular/CustomIcons/components/Mail.js +40 -0
  50. package/dist/Molecular/CustomIcons/components/Mastercard.js +82 -0
  51. package/dist/Molecular/CustomIcons/components/Minus.js +45 -0
  52. package/dist/Molecular/CustomIcons/components/Offers.js +33 -0
  53. package/dist/Molecular/CustomIcons/components/Pause.js +45 -0
  54. package/dist/Molecular/CustomIcons/components/PayPal.js +59 -0
  55. package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +46 -0
  56. package/dist/Molecular/CustomIcons/components/Phone.js +47 -0
  57. package/dist/Molecular/CustomIcons/components/Play.js +45 -0
  58. package/dist/Molecular/CustomIcons/components/Plus.js +45 -0
  59. package/dist/Molecular/CustomIcons/components/Profile.js +37 -0
  60. package/dist/Molecular/CustomIcons/components/QRCode.js +47 -0
  61. package/dist/Molecular/CustomIcons/components/Rectangle.js +32 -0
  62. package/dist/Molecular/CustomIcons/components/Revert.js +35 -0
  63. package/dist/Molecular/CustomIcons/components/Star.js +31 -0
  64. package/dist/Molecular/CustomIcons/components/Star2.js +33 -0
  65. package/dist/Molecular/CustomIcons/components/TrafficSources.js +35 -0
  66. package/dist/Molecular/CustomIcons/components/Trash.js +32 -0
  67. package/dist/Molecular/CustomIcons/components/TrashRed.js +32 -0
  68. package/dist/Molecular/CustomIcons/components/Triggers.js +32 -0
  69. package/dist/Molecular/CustomIcons/components/User.js +37 -0
  70. package/dist/Molecular/CustomIcons/components/Visa.js +48 -0
  71. package/dist/Molecular/CustomIcons/components/X.js +32 -0
  72. package/dist/Molecular/CustomIcons/index.js +798 -0
  73. package/package.json +1 -1
@@ -27,14 +27,22 @@ var _classnames = _interopRequireDefault(require("classnames"));
27
27
 
28
28
  var _reactFeather = require("react-feather");
29
29
 
30
- var _DropdownLoader = _interopRequireDefault(require("./components/DropdownLoader"));
31
-
32
- require("./Dropdown.scss");
33
-
34
30
  var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
35
31
 
36
32
  var _utils = require("../../../Functions/utils");
37
33
 
34
+ var _useIsMobile2 = _interopRequireDefault(require("../../../Functions/useIsMobile"));
35
+
36
+ var _Input = _interopRequireDefault(require("../../../Atomic/FormElements/Input/Input"));
37
+
38
+ var _RadioInput = _interopRequireDefault(require("../../../Atomic/FormElements/RadioInput/RadioInput"));
39
+
40
+ var _CustomIcons = require("../../../Molecular/CustomIcons");
41
+
42
+ var _DropdownLoader = _interopRequireDefault(require("./components/DropdownLoader"));
43
+
44
+ require("./Dropdown.scss");
45
+
38
46
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
39
47
 
40
48
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -46,9 +54,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
46
54
  var RC = 'dropdown';
47
55
 
48
56
  var Dropdown = function Dropdown(_ref) {
49
- var _options$find, _filteredOptions$find;
57
+ var _options$find, _dropdownListWrapperR4, _dropdownListWrapperR5, _dropdownListRef$curr5, _dropdownListRef$curr6, _filteredOptions$find;
50
58
 
51
- var _ref$options = _ref.options,
59
+ var label = _ref.label,
60
+ _ref$options = _ref.options,
52
61
  options = _ref$options === void 0 ? [] : _ref$options,
53
62
  value = _ref.value,
54
63
  error = _ref.error,
@@ -71,6 +80,10 @@ var Dropdown = function Dropdown(_ref) {
71
80
  noOptionsText = _ref$noOptionsText === void 0 ? 'No options available' : _ref$noOptionsText,
72
81
  _ref$attributesOfNati = _ref.attributesOfNativeInput,
73
82
  attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati;
83
+
84
+ var _useIsMobile = (0, _useIsMobile2.default)(),
85
+ isMobile = _useIsMobile.isMobile;
86
+
74
87
  var dropdownId = fieldKey || id;
75
88
 
76
89
  var _useState = (0, _react.useState)(false),
@@ -85,6 +98,7 @@ var Dropdown = function Dropdown(_ref) {
85
98
 
86
99
  var dropdownRef = (0, _react.useRef)(null);
87
100
  var dropdownListRef = (0, _react.useRef)(null);
101
+ var dropdownListWrapperRef = (0, _react.useRef)(null);
88
102
  var searchInputRef = (0, _react.useRef)(null);
89
103
 
90
104
  var _useState5 = (0, _react.useState)(null),
@@ -107,6 +121,16 @@ var Dropdown = function Dropdown(_ref) {
107
121
  isSearchInputFocused = _useState12[0],
108
122
  setIsSearchInputFocused = _useState12[1];
109
123
 
124
+ var _useState13 = (0, _react.useState)(null),
125
+ _useState14 = (0, _slicedToArray2.default)(_useState13, 2),
126
+ isScrollableList = _useState14[0],
127
+ setIsScrollableList = _useState14[1];
128
+
129
+ var _useState15 = (0, _react.useState)(false),
130
+ _useState16 = (0, _slicedToArray2.default)(_useState15, 2),
131
+ isFixedMaxHeight = _useState16[0],
132
+ setIsFixedMaxHeight = _useState16[1];
133
+
110
134
  if (!options) return null;
111
135
 
112
136
  var moveOtherToEnd = function moveOtherToEnd(options) {
@@ -200,7 +224,7 @@ var Dropdown = function Dropdown(_ref) {
200
224
  setSearchValue(inputValue);
201
225
  };
202
226
 
203
- var hightlightedText = function hightlightedText(text, postfix) {
227
+ var hightlightedText = function hightlightedText(text, postfix, description) {
204
228
  var _text;
205
229
 
206
230
  var prepare = function prepare(text) {
@@ -219,7 +243,8 @@ var Dropdown = function Dropdown(_ref) {
219
243
  return "<span class=\"bg--yellow\">".concat(match, "</span>");
220
244
  }) : text;
221
245
  var postfixPart = postfix ? "<span class=\"dropdown__list-item-postfix\">".concat(postfix, "</span>") : '';
222
- return main + postfixPart;
246
+ var descriptionPart = description ? "<span class=\"dropdown__list-item-description\">".concat(description, "</span>") : '';
247
+ return main + postfixPart + descriptionPart;
223
248
  };
224
249
 
225
250
  var depend = getDepends(modalBtnTrigger);
@@ -234,13 +259,16 @@ var Dropdown = function Dropdown(_ref) {
234
259
  return depend.onChange(item);
235
260
  },
236
261
  className: (0, _classnames.default)("".concat(RC, "__list-item"), (_cn = {}, (0, _defineProperty2.default)(_cn, "".concat(RC, "__list-item_active"), item.value === value), (0, _defineProperty2.default)(_cn, "".concat(RC, "__list-item_disabled"), item.disabled), _cn), item.className)
237
- }, /*#__PURE__*/_react.default.createElement("span", {
262
+ }, !isMobile && /*#__PURE__*/_react.default.createElement("span", {
238
263
  className: (0, _classnames.default)("".concat(RC, "__active-icon"), (0, _defineProperty2.default)({}, "".concat(RC, "__active-icon_active"), item.value === value))
239
264
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.Check, null)), /*#__PURE__*/_react.default.createElement("div", {
240
- className: item.labelClassName || '',
265
+ className: (0, _classnames.default)("".concat(RC, "__list-item-label"), item.labelClassName || ''),
241
266
  dangerouslySetInnerHTML: {
242
- __html: hightlightedText(item.label, item.postfix)
267
+ __html: hightlightedText(item.label, item.postfix, item.description)
243
268
  }
269
+ }), isMobile && /*#__PURE__*/_react.default.createElement(_RadioInput.default, {
270
+ value: item.value,
271
+ checked: value
244
272
  }));
245
273
  };
246
274
 
@@ -296,7 +324,7 @@ var Dropdown = function Dropdown(_ref) {
296
324
  };
297
325
 
298
326
  var setListContainerStyles = function setListContainerStyles() {
299
- var _dropdownRef$current$, _getComputedStyle$mar, _getComputedStyle, _getComputedStyle$mar2, _getComputedStyle$max, _getComputedStyle2, _getComputedStyle2$ma, _sw$getBoundingClient;
327
+ var _dropdownRef$current$, _dropdownListWrapperR, _getComputedStyle$mar, _getComputedStyle, _getComputedStyle$mar2, _getComputedStyle$max, _getComputedStyle2, _getComputedStyle2$ma, _sw$getBoundingClient, _dropdownListWrapperR2, _dropdownListWrapperR3, _lh$getBoundingClient;
300
328
 
301
329
  var lc = getListContainer();
302
330
  if (!lc || !isOpen) return false;
@@ -309,13 +337,14 @@ var Dropdown = function Dropdown(_ref) {
309
337
  top = _ref3.top;
310
338
 
311
339
  var sw = lc.getElementsByClassName('dropdown__list')[0];
340
+ var lh = dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : (_dropdownListWrapperR = dropdownListWrapperRef.current) === null || _dropdownListWrapperR === void 0 ? void 0 : _dropdownListWrapperR.getElementsByClassName('dropdown__list-header')[0];
312
341
  var margin = parseInt((_getComputedStyle$mar = (_getComputedStyle = getComputedStyle(sw)) === null || _getComputedStyle === void 0 ? void 0 : (_getComputedStyle$mar2 = _getComputedStyle.marginTop) === null || _getComputedStyle$mar2 === void 0 ? void 0 : _getComputedStyle$mar2.replace('px', '')) !== null && _getComputedStyle$mar !== void 0 ? _getComputedStyle$mar : 0);
313
342
  var maxHeight = initListHeight !== null && initListHeight !== void 0 ? initListHeight : parseInt((_getComputedStyle$max = (_getComputedStyle2 = getComputedStyle(sw)) === null || _getComputedStyle2 === void 0 ? void 0 : (_getComputedStyle2$ma = _getComputedStyle2.maxHeight) === null || _getComputedStyle2$ma === void 0 ? void 0 : _getComputedStyle2$ma.replace('px', '')) !== null && _getComputedStyle$max !== void 0 ? _getComputedStyle$max : 0);
314
343
  if (initListHeight === null) setInitListHeight(maxHeight);
315
344
  var toTop = top - margin;
316
345
  var toBottom = windowHeight - top - height - margin * 2;
317
346
  var swHeight = sw === null || sw === void 0 ? void 0 : (_sw$getBoundingClient = sw.getBoundingClientRect()) === null || _sw$getBoundingClient === void 0 ? void 0 : _sw$getBoundingClient.height;
318
- var maxSwHeight = toTop >= maxHeight || toBottom >= maxHeight ? maxHeight - 3 * margin : toTop > toBottom ? toTop - 3 * margin : toBottom - 4 * margin;
347
+ var maxSwHeight = isMobile ? (dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : (_dropdownListWrapperR2 = dropdownListWrapperRef.current) === null || _dropdownListWrapperR2 === void 0 ? void 0 : (_dropdownListWrapperR3 = _dropdownListWrapperR2.getBoundingClientRect()) === null || _dropdownListWrapperR3 === void 0 ? void 0 : _dropdownListWrapperR3.height) - (lh === null || lh === void 0 ? void 0 : (_lh$getBoundingClient = lh.getBoundingClientRect()) === null || _lh$getBoundingClient === void 0 ? void 0 : _lh$getBoundingClient.height) : toTop >= maxHeight || toBottom >= maxHeight ? maxHeight - 3 * margin : toTop > toBottom ? toTop - 3 * margin : toBottom - 4 * margin;
319
348
  var listPos = toTop < toBottom || toBottom >= swHeight ? 'bottom' : 'top';
320
349
  lc.style.minWidth = "".concat(width, "px");
321
350
  lc.style.left = "".concat(left, "px");
@@ -360,6 +389,47 @@ var Dropdown = function Dropdown(_ref) {
360
389
  var _getSortedOptions;
361
390
 
362
391
  return /*#__PURE__*/_react.default.createElement("div", {
392
+ className: (0, _classnames.default)("".concat(RC, "__list-wrapper"), (0, _defineProperty2.default)({}, "".concat(RC, "__list-wrapper--fixed-height"), isFixedMaxHeight)),
393
+ ref: dropdownListWrapperRef
394
+ }, /*#__PURE__*/_react.default.createElement("div", {
395
+ className: (0, _classnames.default)("".concat(RC, "__list-header"), (0, _defineProperty2.default)({}, "".concat(RC, "__list-header-with-shadow"), isScrollableList))
396
+ }, /*#__PURE__*/_react.default.createElement("div", {
397
+ className: (0, _classnames.default)("".concat(RC, "__list-header-row"))
398
+ }, /*#__PURE__*/_react.default.createElement("div", {
399
+ className: (0, _classnames.default)("".concat(RC, "__list-label"))
400
+ }, label), /*#__PURE__*/_react.default.createElement("div", {
401
+ className: (0, _classnames.default)("".concat(RC, "__list-close-icon")),
402
+ onClick: function onClick() {
403
+ return setIsOpen(false);
404
+ }
405
+ }, /*#__PURE__*/_react.default.createElement(_reactFeather.X, {
406
+ onClick: function onClick() {
407
+ return setIsOpen(false);
408
+ }
409
+ }))), isSearchable && /*#__PURE__*/_react.default.createElement("div", {
410
+ className: (0, _classnames.default)("".concat(RC, "__list-header-row"))
411
+ }, /*#__PURE__*/_react.default.createElement(_Input.default, {
412
+ ref: searchInputRef,
413
+ className: "".concat(RC, "__input"),
414
+ value: searchValue !== null && searchValue !== void 0 ? searchValue : selectedLabel,
415
+ onChange: function onChange(v) {
416
+ return onSearchHandler(v);
417
+ },
418
+ placeholder: placeholder || 'Search',
419
+ withDelete: true,
420
+ onFocus: function onFocus() {
421
+ return setIsSearchInputFocused(true);
422
+ },
423
+ onBlur: function onBlur() {
424
+ return setIsSearchInputFocused(false);
425
+ },
426
+ onMouseDown: function onMouseDown() {
427
+ if (!isOpen) {
428
+ setIsSearchInputFocused(true);
429
+ setIsOpen(true);
430
+ }
431
+ }
432
+ }))), /*#__PURE__*/_react.default.createElement("div", {
363
433
  className: (0, _classnames.default)("".concat(RC, "__list"), (0, _defineProperty2.default)({}, "".concat(RC, "__list-top"), isListTop)),
364
434
  ref: dropdownListRef
365
435
  }, (_getSortedOptions = getSortedOptions(depend.options)) === null || _getSortedOptions === void 0 ? void 0 : _getSortedOptions.map(function (option) {
@@ -390,7 +460,7 @@ var Dropdown = function Dropdown(_ref) {
390
460
  }
391
461
  }), !filteredItems.length && !filteredGroups.length && /*#__PURE__*/_react.default.createElement("div", {
392
462
  className: "".concat(RC, "__list-item ").concat(RC, "__list-item--no-options")
393
- }, noOptionsText), disabled && isOpen && /*#__PURE__*/_react.default.createElement(_DropdownLoader.default, null));
463
+ }, noOptionsText), disabled && isOpen && /*#__PURE__*/_react.default.createElement(_DropdownLoader.default, null)));
394
464
  };
395
465
 
396
466
  var toggleList = function toggleList(e) {
@@ -405,20 +475,34 @@ var Dropdown = function Dropdown(_ref) {
405
475
  initListContainer();
406
476
  }, []);
407
477
  (0, _react.useLayoutEffect)(function () {
408
- window.addEventListener('resize', setListContainerStyles);
409
- window.addEventListener('mousewheel', closeList);
410
- window.addEventListener('scroll', closeList);
411
- window.addEventListener('touchmove', closeList);
478
+ var _getListContainer2;
479
+
480
+ if (!isMobile) {
481
+ window.addEventListener('resize', setListContainerStyles);
482
+ window.addEventListener('mousewheel', closeList);
483
+ window.addEventListener('scroll', closeList);
484
+ window.addEventListener('touchmove', closeList);
485
+ } else {
486
+ window.removeEventListener('resize', setListContainerStyles);
487
+ window.removeEventListener('mousewheel', closeList);
488
+ window.removeEventListener('scroll', closeList);
489
+ window.removeEventListener('touchmove', closeList);
490
+ }
491
+
492
+ (_getListContainer2 = getListContainer()) === null || _getListContainer2 === void 0 ? void 0 : _getListContainer2.addEventListener('click', closeList);
412
493
  return function () {
494
+ var _getListContainer3;
495
+
413
496
  window.removeEventListener('resize', setListContainerStyles);
414
497
  window.removeEventListener('mousewheel', closeList);
415
498
  window.removeEventListener('scroll', closeList);
416
499
  window.removeEventListener('touchmove', closeList);
500
+ (_getListContainer3 = getListContainer()) === null || _getListContainer3 === void 0 ? void 0 : _getListContainer3.removeEventListener('click', closeList);
417
501
  };
418
502
  }, [getListContainer]);
419
- (0, _react.useEffect)(function () {
503
+ (0, _react.useLayoutEffect)(function () {
420
504
  setListContainerStyles();
421
- }, [isOpen, searchValue]);
505
+ }, [isOpen, searchValue, isMobile, options, dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : (_dropdownListWrapperR4 = dropdownListWrapperRef.current) === null || _dropdownListWrapperR4 === void 0 ? void 0 : (_dropdownListWrapperR5 = _dropdownListWrapperR4.getBoundingClientRect()) === null || _dropdownListWrapperR5 === void 0 ? void 0 : _dropdownListWrapperR5.height]);
422
506
  (0, _react.useEffect)(function () {
423
507
  document.addEventListener('click', handleClickOutside, true);
424
508
  return function () {
@@ -465,8 +549,35 @@ var Dropdown = function Dropdown(_ref) {
465
549
  (0, _react.useEffect)(function () {
466
550
  var _searchInputRef$curre;
467
551
 
468
- if (isOpen && !isSearchInputFocused && searchInputRef !== null && searchInputRef !== void 0 && searchInputRef.current) searchInputRef === null || searchInputRef === void 0 ? void 0 : (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.focus();
552
+ if (isOpen && !isSearchInputFocused && searchInputRef !== null && searchInputRef !== void 0 && searchInputRef.current && !isMobile) searchInputRef === null || searchInputRef === void 0 ? void 0 : (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.focus();
553
+
554
+ if (isOpen) {
555
+ var _getListContainer4;
556
+
557
+ (_getListContainer4 = getListContainer()) === null || _getListContainer4 === void 0 ? void 0 : _getListContainer4.classList.add('dropdown__container--opened');
558
+ } else {
559
+ var _getListContainer5;
560
+
561
+ (_getListContainer5 = getListContainer()) === null || _getListContainer5 === void 0 ? void 0 : _getListContainer5.classList.remove('dropdown__container--opened');
562
+ }
563
+
564
+ if (!isOpen && isMobile) {
565
+ setSearchValue(null);
566
+ }
469
567
  }, [isOpen]);
568
+ (0, _react.useEffect)(function () {
569
+ if (isOpen && isMobile) {
570
+ var _dropdownListRef$curr, _dropdownListRef$curr2;
571
+
572
+ setIsScrollableList((dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr = dropdownListRef.current) === null || _dropdownListRef$curr === void 0 ? void 0 : _dropdownListRef$curr.scrollHeight) > (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr2 = dropdownListRef.current) === null || _dropdownListRef$curr2 === void 0 ? void 0 : _dropdownListRef$curr2.clientHeight));
573
+
574
+ if (isScrollableList === null) {
575
+ var _dropdownListRef$curr3, _dropdownListRef$curr4;
576
+
577
+ setIsFixedMaxHeight((dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr3 = dropdownListRef.current) === null || _dropdownListRef$curr3 === void 0 ? void 0 : _dropdownListRef$curr3.scrollHeight) > (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr4 = dropdownListRef.current) === null || _dropdownListRef$curr4 === void 0 ? void 0 : _dropdownListRef$curr4.clientHeight));
578
+ }
579
+ }
580
+ }, [isOpen, isMobile, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr5 = dropdownListRef.current) === null || _dropdownListRef$curr5 === void 0 ? void 0 : _dropdownListRef$curr5.scrollHeight, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr6 = dropdownListRef.current) === null || _dropdownListRef$curr6 === void 0 ? void 0 : _dropdownListRef$curr6.clientHeight]);
470
581
  var postfixText = selectedLabel && ((_filteredOptions$find = filteredOptions.find(function (option) {
471
582
  return option.value === value;
472
583
  })) === null || _filteredOptions$find === void 0 ? void 0 : _filteredOptions$find.postfix) || null;
@@ -483,7 +594,7 @@ var Dropdown = function Dropdown(_ref) {
483
594
  onClick: toggleList,
484
595
  onKeyDown: onKeyDown,
485
596
  onKeyUp: onKeyUp
486
- }, isSearchable ? /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
597
+ }, isSearchable && !isMobile ? /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
487
598
  ref: searchInputRef,
488
599
  className: "".concat(RC, "__input"),
489
600
  value: isOpen ? searchValue !== null && searchValue !== void 0 ? searchValue : '' : selectedLabel || '',
@@ -510,7 +621,7 @@ var Dropdown = function Dropdown(_ref) {
510
621
  }, postfixText)), /*#__PURE__*/_react.default.createElement("span", {
511
622
  className: (0, _classnames.default)("".concat(RC, "__arrow"), (0, _defineProperty2.default)({}, "".concat(RC, "__arrow_active"), isOpen)),
512
623
  onClick: toggleList
513
- }, isOpen ? /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronUp, null) : /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, null))), isOpen && renderListContainer());
624
+ }, isMobile ? /*#__PURE__*/_react.default.createElement(_CustomIcons.ChevronUpDown, null) : isOpen ? /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronUp, null) : /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, null))), isOpen && renderListContainer());
514
625
  };
515
626
 
516
627
  var _default = Dropdown;
@@ -8,7 +8,7 @@
8
8
 
9
9
  width: 100%;
10
10
 
11
- border-radius: 7px;
11
+ border-radius: $radii-s;
12
12
 
13
13
  &__container {
14
14
  position: fixed;
@@ -32,9 +32,9 @@
32
32
  cursor: pointer;
33
33
  text-align: left;
34
34
 
35
- border: 1px solid #E2E5EC;
36
- border-radius: 3px;
37
- background: #FFF;
35
+ border: 1px solid $color--gray--light;
36
+ border-radius: $radii-xs;
37
+ background: $color--light;
38
38
 
39
39
  font-weight: 400;
40
40
 
@@ -42,7 +42,7 @@
42
42
  overflow: hidden;
43
43
 
44
44
  max-width: calc(100% - 5px);
45
- padding: 0 16px 0 8px;
45
+ padding: 0 $spacing-m 0 $spacing-s;
46
46
 
47
47
  white-space: nowrap;
48
48
  text-overflow: ellipsis;
@@ -60,7 +60,7 @@
60
60
  &__input {
61
61
  width: 100%;
62
62
  height: 16px;
63
- padding: 0 16px 0 8px;
63
+ padding: 0 $spacing-m 0 $spacing-s;
64
64
 
65
65
  text-overflow: ellipsis;
66
66
 
@@ -80,12 +80,24 @@
80
80
  box-sizing: border-box;
81
81
  min-width: 100%;
82
82
  max-height: 320px;
83
- margin-top: 4px;
84
- padding: 5px 0;
83
+ padding: $spacing-xs 0;
85
84
 
86
- border: 1px solid #E2E5EC;
87
- background: #FFF;
88
- box-shadow: 0 5px 20px rgb(0 0 0 / 15%);
85
+ &-wrapper {
86
+ position: relative;
87
+ z-index: 6;
88
+ top: 100%;
89
+
90
+ box-sizing: border-box;
91
+ margin-top: $spacing-xs;
92
+
93
+ border: 1px solid $color--gray--light;
94
+ background: $color--light;
95
+ box-shadow: 0 5px 20px rgb(0 0 0 / 15%);
96
+ }
97
+
98
+ &-header {
99
+ display: none;
100
+ }
89
101
 
90
102
  &::-webkit-scrollbar {
91
103
  width: 4px;
@@ -129,6 +141,16 @@
129
141
  font-weight: 400;
130
142
  line-height: 24px;
131
143
 
144
+ &-label {
145
+ white-space: wrap;
146
+ text-align: left;
147
+ }
148
+
149
+ &-description {
150
+ margin-left: $spacing-xs;
151
+ color: #757F8C;
152
+ }
153
+
132
154
  &--modal {
133
155
  position: relative;
134
156
 
@@ -172,7 +194,7 @@
172
194
  }
173
195
 
174
196
  &-postfix {
175
- margin-left: 5px;
197
+ margin-left: $spacing-xs;
176
198
  }
177
199
  }
178
200
 
@@ -184,7 +206,7 @@
184
206
  &__arrow {
185
207
  position: absolute;
186
208
  top: 50%;
187
- right: 4px;
209
+ right: $spacing-xs;
188
210
 
189
211
  display: flex;
190
212
  align-items: center;
@@ -237,7 +259,7 @@
237
259
  }
238
260
 
239
261
  &-label {
240
- margin-bottom: 5px;
262
+ margin-bottom: $spacing-xs;
241
263
  }
242
264
 
243
265
  &__error {
@@ -258,3 +280,136 @@
258
280
  opacity: 0.5;
259
281
  }
260
282
  }
283
+
284
+ @media (max-width: 767px) {
285
+ .dropdown {
286
+ &__container {
287
+ overflow: hidden!important;
288
+
289
+ &--opened {
290
+ width: 100dvw;
291
+ height: 100dvh;
292
+ max-height: 100dvh;
293
+ position: fixed;
294
+ left: 0!important;
295
+ top: 0!important;
296
+ background: rgba(23, 29, 51, 0.50);
297
+ padding: $spacing-s;
298
+ }
299
+ }
300
+
301
+ &__container &__list {
302
+ top: 0;
303
+ padding:$spacing-m!important;
304
+ padding-top: 0!important;
305
+
306
+ &-wrapper {
307
+ box-sizing: border-box;
308
+ position: sticky;
309
+ bottom: 0;
310
+ max-height: 500px;
311
+ border-radius: $spacing-l!important;
312
+ overflow: hidden;
313
+
314
+ &--fixed-height {
315
+ height: 500px!important;
316
+ }
317
+ }
318
+
319
+ &-header {
320
+ position: relative;
321
+ display: flex;
322
+ flex-direction: column;
323
+ justify-content: space-between;
324
+ padding: $spacing-m;
325
+ color: #3B414B;
326
+ font-size: 16px;
327
+ font-weight: 600;
328
+ line-height: 24px;
329
+ letter-spacing: 0.1px;
330
+ gap: $spacing-m;
331
+
332
+ &-row {
333
+ display: flex;
334
+ flex-direction: row;
335
+ align-items: center;
336
+ min-height: 24px;
337
+
338
+ .input__wrap {
339
+ width: 100%;
340
+ display: flex;
341
+ align-items: center;
342
+ padding-right: $spacing-s;
343
+ border-radius: 6px;
344
+ border: 1px solid var(--form-input-border, #E1E8F1);
345
+ background: var(--black-bg-color, #F8FBFF)!important;
346
+
347
+ input {
348
+ background: unset!important;
349
+ }
350
+ }
351
+ }
352
+
353
+ &-with-shadow {
354
+ &::after {
355
+ content: "";
356
+ position: absolute;
357
+ left: 0;
358
+ bottom: -15px;
359
+ width: 100%;
360
+ height: 15px;
361
+ background: linear-gradient(180deg, rgba(212, 218, 230, 0.50) 0%, rgba(212, 218, 230, 0.30) 21.35%, rgba(247, 248, 250, 0.00) 100%);
362
+ }
363
+ }
364
+ }
365
+
366
+ &-close-icon {
367
+ display: flex;
368
+ align-items: center;
369
+ position: absolute;
370
+ top: 0;
371
+ right: 0;
372
+ height: 100%;
373
+ padding: $spacing-m;
374
+ width: 16px;
375
+ height: 24px;
376
+
377
+ svg {
378
+ width: 16px;
379
+ height: 16px;
380
+ color: #A0A4B0;
381
+ }
382
+ }
383
+ }
384
+
385
+ &-group {
386
+ margin: 0;
387
+ margin-bottom: $spacing-xs;
388
+
389
+ &:last-child {
390
+ margin-bottom: $spacing-m;
391
+ }
392
+
393
+ &__name {
394
+ margin: 0;
395
+ margin-bottom: $spacing-s;
396
+ font-size: 11px;
397
+ padding: 10px 0px 6px 0px;
398
+ border-bottom: 1px solid rgba(58, 72, 122, 0.15);
399
+ }
400
+ }
401
+
402
+ &__list-item {
403
+ display: flex;
404
+ justify-content: space-between;
405
+ height: auto!important;
406
+ padding: 10px $spacing-s!important;
407
+ line-height: 24px;
408
+
409
+ &_active {
410
+ border-radius: 6px;
411
+ background: var(--bg-gray-box, #F0F1F4)!important;
412
+ }
413
+ }
414
+ }
415
+ }
@@ -11,6 +11,8 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
+ var _CustomIcons = require("../../../../Molecular/CustomIcons");
15
+
14
16
  var SelectItem = function SelectItem(_ref) {
15
17
  var item = _ref.item,
16
18
  label = _ref.label,
@@ -28,20 +30,9 @@ var SelectItem = function SelectItem(_ref) {
28
30
  onMouseEnter: onMouseEnter,
29
31
  "data-item": item,
30
32
  "data-testid": "selectItem--key-".concat(testId, "--label-").concat(label)
31
- }, isActive && /*#__PURE__*/_react.default.createElement("svg", {
32
- className: (0, _classnames.default)('opened-part__intervals-item-icon-active'),
33
- width: "16",
34
- height: "16",
35
- viewBox: "0 0 16 16",
36
- fill: "none",
37
- xmlns: "http://www.w3.org/2000/svg"
38
- }, /*#__PURE__*/_react.default.createElement("path", {
39
- d: "M13.3333 4L5.99999 11.3333L2.66666 8",
40
- stroke: "black",
41
- strokeWidth: "1.33333",
42
- strokeLinecap: "round",
43
- strokeLinejoin: "round"
44
- })), label);
33
+ }, isActive && /*#__PURE__*/_react.default.createElement(_CustomIcons.Check2, {
34
+ className: (0, _classnames.default)('opened-part__intervals-item-icon-active')
35
+ }), label);
45
36
  };
46
37
 
47
38
  var _default = SelectItem;
@@ -48,8 +48,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
48
48
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
49
49
 
50
50
  function InputMask3() {
51
- var _getClearInnerValueAs;
52
-
53
51
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
54
52
  _ref$autocomplete = _ref.autocomplete,
55
53
  autocomplete = _ref$autocomplete === void 0 ? 'off' : _ref$autocomplete,
@@ -337,6 +335,8 @@ function InputMask3() {
337
335
  };
338
336
 
339
337
  var getInputValue = function getInputValue() {
338
+ var _getClearInnerValueAs;
339
+
340
340
  var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
341
341
  noLastTyppedCharIndexCheck = _ref4.noLastTyppedCharIndexCheck,
342
342
  _ref4$noHide = _ref4.noHide,
@@ -364,11 +364,12 @@ function InputMask3() {
364
364
 
365
365
  return result;
366
366
  }, '');
367
+ if (((_getClearInnerValueAs = getClearInnerValueAsString(value)) === null || _getClearInnerValueAs === void 0 ? void 0 : _getClearInnerValueAs.length) === 0) return '';
367
368
  return value;
368
369
  };
369
370
 
370
- var getClearInnerValueAsString = function getClearInnerValueAsString() {
371
- var _getInputValue, _getInputValue$split;
371
+ var getClearInnerValueAsString = function getClearInnerValueAsString(valueProp) {
372
+ var _ref8, _ref8$split;
372
373
 
373
374
  var symbolsInfo = innerValue === null || innerValue === void 0 ? void 0 : innerValue.map(function (_ref7) {
374
375
  var isSpecialSymbol = _ref7.isSpecialSymbol,
@@ -378,26 +379,24 @@ function InputMask3() {
378
379
  isCharSymbol: isCharSymbol
379
380
  };
380
381
  });
381
- var clearValue = (_getInputValue = getInputValue({
382
+ var clearValue = (_ref8 = valueProp !== null && valueProp !== void 0 ? valueProp : getInputValue({
382
383
  noLastTyppedCharIndexCheck: true,
383
384
  noHide: true
384
- })) === null || _getInputValue === void 0 ? void 0 : (_getInputValue$split = _getInputValue.split('')) === null || _getInputValue$split === void 0 ? void 0 : _getInputValue$split.reduce(function (resultStr, symbol, i) {
385
+ })) === null || _ref8 === void 0 ? void 0 : (_ref8$split = _ref8.split('')) === null || _ref8$split === void 0 ? void 0 : _ref8$split.reduce(function (resultStr, symbol, i) {
385
386
  if (!symbolsInfo[i].isSpecialSymbol || symbolsInfo[i].isCharSymbol) resultStr += symbol;
386
387
  return resultStr;
387
388
  }, '');
388
389
  return clearValue;
389
390
  };
390
391
 
391
- var inputValue = (0, _react.useMemo)(((_getClearInnerValueAs = getClearInnerValueAsString()) === null || _getClearInnerValueAs === void 0 ? void 0 : _getClearInnerValueAs.length) !== 0 ? getInputValue : function () {
392
- return '';
393
- }, [innerValue, isValueHidden]); // GETTERS | END //
392
+ var inputValue = (0, _react.useMemo)(getInputValue, [innerValue, isValueHidden]); // GETTERS | END //
394
393
  // CHECKERS | START //
395
394
 
396
- var isValidChar = function isValidChar(_ref8) {
397
- var key = _ref8.char,
398
- i = _ref8.i,
399
- _ref8$disableErrors = _ref8.disableErrors,
400
- disableErrors = _ref8$disableErrors === void 0 ? false : _ref8$disableErrors;
395
+ var isValidChar = function isValidChar(_ref9) {
396
+ var key = _ref9.char,
397
+ i = _ref9.i,
398
+ _ref9$disableErrors = _ref9.disableErrors,
399
+ disableErrors = _ref9$disableErrors === void 0 ? false : _ref9$disableErrors;
401
400
  var maskChar = getMaskCharByIndex(i);
402
401
 
403
402
  switch (maskChar) {
@@ -449,13 +448,13 @@ function InputMask3() {
449
448
  return true;
450
449
  };
451
450
 
452
- var isSpecialSymbolMaskChar = function isSpecialSymbolMaskChar(_ref9) {
453
- var char = _ref9.char;
451
+ var isSpecialSymbolMaskChar = function isSpecialSymbolMaskChar(_ref10) {
452
+ var char = _ref10.char;
454
453
  return !(0, _functions.isDigitMaskChar)(char) && !(0, _functions.isLetterMaskChar)(char);
455
454
  };
456
455
 
457
- var isSpecialSymbolChar = function isSpecialSymbolChar(_ref10) {
458
- var char = _ref10.char;
456
+ var isSpecialSymbolChar = function isSpecialSymbolChar(_ref11) {
457
+ var char = _ref11.char;
459
458
  return !(0, _functions.isDigit)(char) && !(0, _functions.isLetter)(char);
460
459
  };
461
460
 
@@ -627,13 +626,13 @@ function InputMask3() {
627
626
  };
628
627
 
629
628
  var onSelect = function onSelect(e) {
630
- var _e$target2, _ref12;
629
+ var _e$target2, _ref13;
631
630
 
632
- var _ref11 = (_e$target2 = e.target) !== null && _e$target2 !== void 0 ? _e$target2 : {},
633
- selectionStart = _ref11.selectionStart,
634
- selectionEnd = _ref11.selectionEnd;
631
+ var _ref12 = (_e$target2 = e.target) !== null && _e$target2 !== void 0 ? _e$target2 : {},
632
+ selectionStart = _ref12.selectionStart,
633
+ selectionEnd = _ref12.selectionEnd;
635
634
 
636
- setSelectedLength((_ref12 = selectionEnd - selectionStart) !== null && _ref12 !== void 0 ? _ref12 : 0);
635
+ setSelectedLength((_ref13 = selectionEnd - selectionStart) !== null && _ref13 !== void 0 ? _ref13 : 0);
637
636
  if (selectionStart >= maxEditableIndex) setCaret(maxEditableIndex);
638
637
  }; // GENERAL EVENT HANDLERS | END //
639
638
  /// --- OBSERVERS ---///