intelicoreact 1.3.22 → 1.3.24

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 (283) hide show
  1. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +5 -8
  2. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.scss +9 -9
  3. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +6 -9
  4. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.scss +8 -10
  5. package/dist/Atomic/FormElements/Calendar/Calendar.js +31 -33
  6. package/dist/Atomic/FormElements/Calendar/Calendar.scss +23 -27
  7. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +4 -4
  8. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.scss +16 -19
  9. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +1 -1
  10. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.scss +2 -2
  11. package/dist/Atomic/FormElements/Datepicker/Datepicker.js +53 -53
  12. package/dist/Atomic/FormElements/Datepicker/Datepicker.scss +0 -8
  13. package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +20 -20
  14. package/dist/Atomic/FormElements/Dropdown/Dropdown.js +81 -83
  15. package/dist/Atomic/FormElements/Dropdown/Dropdown.scss +141 -95
  16. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +1 -1
  17. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.scss +3 -3
  18. package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +30 -28
  19. package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.scss +54 -18
  20. package/dist/Atomic/FormElements/FileLoader/FileLoader.js +4 -4
  21. package/dist/Atomic/FormElements/FileLoader/FileLoader.scss +31 -30
  22. package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +12 -12
  23. package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +3 -3
  24. package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +8 -8
  25. package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.scss +44 -29
  26. package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +17 -15
  27. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +15 -15
  28. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.scss +24 -21
  29. package/dist/Atomic/FormElements/Input/Input.js +43 -45
  30. package/dist/Atomic/FormElements/Input/Input.scss +18 -18
  31. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +19 -19
  32. package/dist/Atomic/FormElements/InputColor/InputColor.js +7 -9
  33. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +12 -12
  34. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.scss +9 -6
  35. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +42 -42
  36. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.scss +95 -95
  37. package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +10 -10
  38. package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +81 -81
  39. package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +14 -14
  40. package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +4 -4
  41. package/dist/Atomic/FormElements/InputDateRange/dependencies.js +54 -54
  42. package/dist/Atomic/FormElements/InputLink/InputLink.js +11 -13
  43. package/dist/Atomic/FormElements/InputLink/InputLink.scss +5 -5
  44. package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +2 -2
  45. package/dist/Atomic/FormElements/InputMask/InputMask.js +66 -67
  46. package/dist/Atomic/FormElements/InputMask/InputMask.scss +10 -10
  47. package/dist/Atomic/FormElements/InputMask/config.js +9 -9
  48. package/dist/Atomic/FormElements/InputMask/functions.js +8 -7
  49. package/dist/Atomic/FormElements/InputMask2/InputMask2.js +42 -42
  50. package/dist/Atomic/FormElements/InputMask2/InputMask2.scss +13 -12
  51. package/dist/Atomic/FormElements/InputMask2/config.js +9 -9
  52. package/dist/Atomic/FormElements/InputMask2/functions.js +8 -7
  53. package/dist/Atomic/FormElements/InputMask3/InputMask3.js +50 -50
  54. package/dist/Atomic/FormElements/InputMask3/InputMask3.scss +13 -12
  55. package/dist/Atomic/FormElements/InputMask3/config.js +9 -9
  56. package/dist/Atomic/FormElements/InputMask3/functions.js +8 -7
  57. package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +7 -9
  58. package/dist/Atomic/FormElements/InputWithAction/InputWithAction.scss +34 -31
  59. package/dist/Atomic/FormElements/InputsRow/InputsRow.js +23 -23
  60. package/dist/Atomic/FormElements/InputsRow/InputsRow.scss +4 -5
  61. package/dist/Atomic/FormElements/Label/Label.js +2 -2
  62. package/dist/Atomic/FormElements/Label/Label.scss +2 -2
  63. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +69 -69
  64. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.scss +8 -9
  65. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +2 -2
  66. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.scss +2 -2
  67. package/dist/Atomic/FormElements/NumericInput/NumericInput.js +27 -27
  68. package/dist/Atomic/FormElements/NumericInput/NumericInput.scss +18 -18
  69. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +3 -3
  70. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.scss +1 -0
  71. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +6 -6
  72. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.scss +1 -0
  73. package/dist/Atomic/FormElements/RadioInput/RadioInput.js +2 -2
  74. package/dist/Atomic/FormElements/RadioInput/RadioInput.scss +4 -8
  75. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +7 -7
  76. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.scss +26 -25
  77. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +24 -24
  78. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.scss +17 -19
  79. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +30 -30
  80. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.scss +5 -5
  81. package/dist/Atomic/FormElements/RangeList/RangeList.js +27 -27
  82. package/dist/Atomic/FormElements/RangeList/RangeList.scss +23 -23
  83. package/dist/Atomic/FormElements/RangeList/partial/AnyOuterClass.scss +5 -4
  84. package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +1 -1
  85. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +31 -31
  86. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.scss +19 -24
  87. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.stories.scss +7 -7
  88. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider.stories.scss +8 -8
  89. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +22 -22
  90. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.scss +165 -91
  91. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +1 -1
  92. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.scss +2 -2
  93. package/dist/Atomic/FormElements/Switcher/Switcher.js +1 -1
  94. package/dist/Atomic/FormElements/Switcher/Switcher.scss +10 -12
  95. package/dist/Atomic/FormElements/Switcher/partial/AnyOuterClass.scss +2 -2
  96. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +4 -6
  97. package/dist/Atomic/FormElements/SwitcherCheckbox/partial/AnyOuterClass.scss +2 -2
  98. package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +2 -2
  99. package/dist/Atomic/FormElements/SwitcherHide/partial/AnyOuterClass.scss +2 -2
  100. package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +4 -4
  101. package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.scss +1 -1
  102. package/dist/Atomic/FormElements/SwitcherRadio/partial/AnyOuterClass.scss +2 -2
  103. package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +5 -5
  104. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +2 -2
  105. package/dist/Atomic/FormElements/SwitcherRangeList/partial/AnyOuterClass.scss +6 -6
  106. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +9 -9
  107. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.scss +2 -3
  108. package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/AnyOuterClass.scss +2 -2
  109. package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +100 -100
  110. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +5 -5
  111. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.scss +2 -3
  112. package/dist/Atomic/FormElements/SwitcherTextarea/partial/AnyOuterClass.scss +4 -4
  113. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +67 -68
  114. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.scss +103 -64
  115. package/dist/Atomic/FormElements/Text/Text.js +13 -13
  116. package/dist/Atomic/FormElements/Text/Text.scss +0 -1
  117. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +4 -4
  118. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.scss +15 -15
  119. package/dist/Atomic/FormElements/Textarea/Textarea.js +2 -2
  120. package/dist/Atomic/FormElements/Textarea/Textarea.scss +7 -8
  121. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +3 -3
  122. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.scss +5 -6
  123. package/dist/Atomic/FormElements/TimeRange/TimeRange.js +9 -9
  124. package/dist/Atomic/FormElements/TimeRange/TimeRange.scss +1 -1
  125. package/dist/Atomic/FormElements/UserContacts/UserContacts.js +36 -37
  126. package/dist/Atomic/FormElements/UserContacts/partial/AnyOuterClass.scss +5 -6
  127. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +3 -3
  128. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.scss +77 -59
  129. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +3 -3
  130. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.scss +9 -10
  131. package/dist/Atomic/FormElements/WidgetPseudoTable/partial/AnyOuterClass.scss +16 -14
  132. package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +18 -18
  133. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +6 -6
  134. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.scss +9 -10
  135. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/AnyOuterClass.scss +16 -14
  136. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +14 -14
  137. package/dist/Atomic/Layout/Header/Header.js +11 -11
  138. package/dist/Atomic/Layout/Header/Header.scss +9 -10
  139. package/dist/Atomic/Layout/MainMenu/MainMenu.js +17 -18
  140. package/dist/Atomic/Layout/MainMenu/MainMenu.scss +14 -17
  141. package/dist/Atomic/Layout/Spinner/Spinner.js +4 -4
  142. package/dist/Atomic/Layout/Spinner/Spinner.scss +3 -3
  143. package/dist/Atomic/UI/Accordion/Accordion.js +7 -7
  144. package/dist/Atomic/UI/Accordion/Accordion.scss +11 -11
  145. package/dist/Atomic/UI/Accordion/AccordionItem.js +12 -12
  146. package/dist/Atomic/UI/AccordionTable/AccordionTable.js +22 -23
  147. package/dist/Atomic/UI/AccordionTable/AccordionTable.scss +33 -38
  148. package/dist/Atomic/UI/AccordionText/AccordionText.js +3 -3
  149. package/dist/Atomic/UI/AccordionText/AccordionText.scss +18 -10
  150. package/dist/Atomic/UI/AdvancedTag/AdvTag.js +31 -32
  151. package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +5 -5
  152. package/dist/Atomic/UI/AdvancedTag/AdvancedTags.scss +19 -18
  153. package/dist/Atomic/UI/Alert/Alert.js +5 -5
  154. package/dist/Atomic/UI/Alert/Alert.scss +21 -21
  155. package/dist/Atomic/UI/Arrow/Arrow.js +5 -5
  156. package/dist/Atomic/UI/Box/Box.js +10 -10
  157. package/dist/Atomic/UI/Box/Box.scss +2 -4
  158. package/dist/Atomic/UI/Button/Button.js +9 -9
  159. package/dist/Atomic/UI/Button/Button.scss +34 -34
  160. package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +4 -4
  161. package/dist/Atomic/UI/ButtonsBar/ButtonsBar.scss +1 -1
  162. package/dist/Atomic/UI/Chart/Chart.js +16 -16
  163. package/dist/Atomic/UI/Chart/Chart.scss +4 -4
  164. package/dist/Atomic/UI/Chart/partial/AnyOuterClass.scss +10 -14
  165. package/dist/Atomic/UI/Chart/partial/Chart.constants.js +30 -30
  166. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +3 -3
  167. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.scss +1 -1
  168. package/dist/Atomic/UI/Chart/partial/datasetSetters.js +15 -15
  169. package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +28 -28
  170. package/dist/Atomic/UI/Chart/partial/optionsSetters.js +2 -2
  171. package/dist/Atomic/UI/Chart/partial/utils.js +4 -4
  172. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +9 -9
  173. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.scss +7 -9
  174. package/dist/Atomic/UI/DateTime/DateTime.js +6 -6
  175. package/dist/Atomic/UI/DateTime/DateTime.scss +1 -1
  176. package/dist/Atomic/UI/DateTime/partial/AnyOuterClass.scss +2 -2
  177. package/dist/Atomic/UI/DebugContainer/DebugContainer.js +4 -4
  178. package/dist/Atomic/UI/DebugContainer/DebugContainer.scss +15 -9
  179. package/dist/Atomic/UI/DoubleString/DoubleString.js +6 -6
  180. package/dist/Atomic/UI/DoubleString/DoubleString.scss +11 -5
  181. package/dist/Atomic/UI/DoubleString/partial/AnyOuterClass.scss +4 -4
  182. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +1 -1
  183. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +48 -48
  184. package/dist/Atomic/UI/ExampleChartIntegration/partial/AnyOuterClass.scss +10 -15
  185. package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +18 -18
  186. package/dist/Atomic/UI/Hint/Hint.js +40 -41
  187. package/dist/Atomic/UI/Hint/Hint.scss +12 -11
  188. package/dist/Atomic/UI/Modal/Modal.js +28 -36
  189. package/dist/Atomic/UI/Modal/Modal.scss +42 -43
  190. package/dist/Atomic/UI/Modal/ModalHOC.js +2 -5
  191. package/dist/Atomic/UI/Modal/ModalMobile.scss +18 -11
  192. package/dist/Atomic/UI/Modal/partials/ModalFooter.js +2 -2
  193. package/dist/Atomic/UI/Modal/partials/ModalTitle.js +6 -6
  194. package/dist/Atomic/UI/Modal/partials/useMobileModal.js +8 -8
  195. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +1 -1
  196. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.scss +5 -5
  197. package/dist/Atomic/UI/MonoAccordion/partial/AnyOuterClass.scss +4 -5
  198. package/dist/Atomic/UI/NavLine/NavLine.js +26 -26
  199. package/dist/Atomic/UI/NavLine/NavLine.scss +34 -36
  200. package/dist/Atomic/UI/NavLine/Tabs.js +38 -38
  201. package/dist/Atomic/UI/PageTitle/PageTitle.js +1 -1
  202. package/dist/Atomic/UI/PageTitle/PageTitle.scss +7 -7
  203. package/dist/Atomic/UI/PieChart/PieChart.js +4 -4
  204. package/dist/Atomic/UI/PieChart/PieChart.scss +21 -10
  205. package/dist/Atomic/UI/Price/Price.js +2 -2
  206. package/dist/Atomic/UI/PriceRange/PriceRange.js +2 -2
  207. package/dist/Atomic/UI/ProgressLine/ProgressLine.js +10 -10
  208. package/dist/Atomic/UI/ProgressLine/ProgressLine.scss +36 -40
  209. package/dist/Atomic/UI/Status/Status.js +6 -6
  210. package/dist/Atomic/UI/Status/Status.scss +19 -19
  211. package/dist/Atomic/UI/Table/Partials/TdCell.js +11 -11
  212. package/dist/Atomic/UI/Table/Partials/TdHeader.js +3 -3
  213. package/dist/Atomic/UI/Table/Partials/TdRow.js +6 -6
  214. package/dist/Atomic/UI/Table/Partials/TdTitle.js +1 -1
  215. package/dist/Atomic/UI/Table/Table.js +3 -3
  216. package/dist/Atomic/UI/Table/Table.scss +11 -13
  217. package/dist/Atomic/UI/Table/TdTypes/TdActions.js +8 -8
  218. package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +2 -2
  219. package/dist/Atomic/UI/Table/TdTypes/TdRange.js +1 -3
  220. package/dist/Atomic/UI/Table/TdTypes/TdTypes.scss +9 -8
  221. package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +10 -13
  222. package/dist/Atomic/UI/Tag/Tag.js +6 -6
  223. package/dist/Atomic/UI/Tag/Tag.scss +12 -11
  224. package/dist/Atomic/UI/TagList/TagList.js +8 -8
  225. package/dist/Atomic/UI/TagList/TagList.scss +1 -1
  226. package/dist/Atomic/UI/UserBox/UserBox.js +5 -5
  227. package/dist/Atomic/UI/UserBox/UserBox.scss +9 -9
  228. package/dist/Classes/AbortableFetch.js +35 -35
  229. package/dist/Classes/AnimatedHandler.js +3 -3
  230. package/dist/Classes/RESTAPI/index.js +9 -9
  231. package/dist/Classes/RESTAPI/partials/AbortableFetch.js +37 -37
  232. package/dist/Classes/RESTAPI/partials/ApiBase.js +7 -7
  233. package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +4 -4
  234. package/dist/Classes/RESTAPI/partials/ApiUtils.js +4 -4
  235. package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +31 -31
  236. package/dist/Classes/RESTAPI/partials/Utils.js +15 -15
  237. package/dist/Classes/RESTAPI/partials/_utils.js +14 -14
  238. package/dist/Constants/index.constants.js +10 -10
  239. package/dist/Functions/Portal.js +1 -1
  240. package/dist/Functions/customEventListener.js +5 -5
  241. package/dist/Functions/fieldValueFormatters.js +66 -82
  242. package/dist/Functions/hooks/useFormFieldsChangesManager.js +4 -4
  243. package/dist/Functions/locale/createTranslator.js +4 -15
  244. package/dist/Functions/operations.js +14 -14
  245. package/dist/Functions/presets/inputMaskPresets.js +34 -34
  246. package/dist/Functions/presets/inputPresets.js +3 -3
  247. package/dist/Functions/presets/mobileKeyboardTypesPresets.js +2 -2
  248. package/dist/Functions/schemas.js +8 -8
  249. package/dist/Functions/useBodyScrollLock.js +20 -0
  250. package/dist/Functions/useClickOutside.js +2 -2
  251. package/dist/Functions/useFieldFocus.js +3 -7
  252. package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +1 -1
  253. package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +11 -11
  254. package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +1 -1
  255. package/dist/Functions/useFormTools/functions/General.js +9 -9
  256. package/dist/Functions/useFormTools/functions/RenderFields.js +6 -6
  257. package/dist/Functions/useFormTools/index.js +18 -20
  258. package/dist/Functions/useInputHighlightError.js +5 -5
  259. package/dist/Functions/useKeyPress/useHandleKeyPress.js +44 -0
  260. package/dist/Functions/useKeyPress/useKeyPress.js +38 -0
  261. package/dist/Functions/useLocalStorage.js +2 -13
  262. package/dist/Functions/useLocationParams.js +2 -2
  263. package/dist/Functions/useMetaInfo.js +7 -7
  264. package/dist/Functions/useMouseUpOutside.js +2 -2
  265. package/dist/Functions/useOnlineStatus.js +5 -14
  266. package/dist/Functions/usePasswordChecker.js +26 -26
  267. package/dist/Functions/usePrevious.js +0 -12
  268. package/dist/Functions/useResize.js +6 -24
  269. package/dist/Functions/useScrollTo.js +1 -1
  270. package/dist/Functions/useToggle.js +1 -1
  271. package/dist/Functions/utils.js +64 -143
  272. package/dist/Molecular/FormElement/FormElement.js +1 -1
  273. package/dist/Molecular/FormElement/FormElement.scss +4 -3
  274. package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +14 -14
  275. package/dist/Molecular/FormWithDependOn/partials/_utils.js +2 -2
  276. package/dist/Molecular/InputAddress/InputAddress.js +47 -46
  277. package/dist/Molecular/InputAddress/InputAddress.scss +176 -112
  278. package/dist/Molecular/InputPassword/InputPassword.js +11 -15
  279. package/dist/Molecular/InputPassword/InputPassword.scss +8 -7
  280. package/dist/scss/_fonts.scss +60 -36
  281. package/dist/scss/_vars.scss +18 -18
  282. package/dist/scss/main.scss +4 -4
  283. package/package.json +1 -1
@@ -7,19 +7,20 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireWildcard(require("react"));
10
- var _reactDom = require("react-dom");
11
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _reactDom = require("react-dom");
12
12
  var _reactFeather = require("react-feather");
13
- var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
14
- var _utils = require("../../../Functions/utils");
15
- var _useIsMobile = _interopRequireDefault(require("../../../Functions/useIsMobile"));
16
13
  var _Input = _interopRequireDefault(require("../../../Atomic/FormElements/Input/Input"));
17
14
  var _RadioInput = _interopRequireDefault(require("../../../Atomic/FormElements/RadioInput/RadioInput"));
15
+ var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
16
+ var _useBodyScrollLock = _interopRequireDefault(require("../../../Functions/useBodyScrollLock"));
17
+ var _useIsMobile = _interopRequireDefault(require("../../../Functions/useIsMobile"));
18
+ var _utils = require("../../../Functions/utils");
18
19
  var _DropdownLoader = _interopRequireDefault(require("./components/DropdownLoader"));
19
20
  require("./Dropdown.scss");
20
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
21
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
- const RC = 'dropdown';
23
+ const RC = "dropdown";
23
24
  const MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH = 10;
24
25
  const Dropdown = _ref => {
25
26
  var _options$find, _dropdownListWrapperR3, _dropdownListRef$curr5, _dropdownListRef$curr6, _filteredOptions$find, _tabIndex$toString;
@@ -41,7 +42,7 @@ const Dropdown = _ref => {
41
42
  sortAlphabetical = true,
42
43
  fieldKey,
43
44
  id,
44
- noOptionsText = 'No options available',
45
+ noOptionsText = "No options available",
45
46
  attributesOfNativeInput = {},
46
47
  isDoNotPullOutListOfMainContainer,
47
48
  withMobileLogic,
@@ -68,6 +69,7 @@ const Dropdown = _ref => {
68
69
  const [isFixedMaxHeight, setIsFixedMaxHeight] = (0, _react.useState)(false);
69
70
  const [scrollTop, setScrollTop] = (0, _react.useState)(0);
70
71
  const [scrollHeight, setScrollHeight] = (0, _react.useState)(1);
72
+ (0, _useBodyScrollLock.default)(isOpen);
71
73
  if (!options) return null;
72
74
  const getTotalOptions = (0, _react.useCallback)(() => {
73
75
  return options === null || options === void 0 ? void 0 : options.reduce((result, item) => {
@@ -82,7 +84,7 @@ const Dropdown = _ref => {
82
84
  }, [options]);
83
85
  if (isMobile) isSearchable = getTotalOptions() > (minItemsForShowMobileSearch || MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH);
84
86
  const moveOtherToEnd = options => {
85
- const otherIndex = options === null || options === void 0 ? void 0 : options.findIndex(option => (option === null || option === void 0 ? void 0 : option.value) === 'other');
87
+ const otherIndex = options === null || options === void 0 ? void 0 : options.findIndex(option => (option === null || option === void 0 ? void 0 : option.value) === "other");
86
88
  if (otherIndex > -1) {
87
89
  const other = options === null || options === void 0 ? void 0 : options.splice(otherIndex, 1);
88
90
  options.push(...other);
@@ -101,7 +103,7 @@ const Dropdown = _ref => {
101
103
  ...item,
102
104
  items: !isSearchable || !isSearchChanged ? item === null || item === void 0 ? void 0 : item.items : (_item$items2 = item.items) === null || _item$items2 === void 0 ? void 0 : _item$items2.slice().filter(el => {
103
105
  var _el$label;
104
- return (el === null || el === void 0 || (_el$label = el.label) === null || _el$label === void 0 ? void 0 : _el$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || '')) || !(el !== null && el !== void 0 && el.value) || (el === null || el === void 0 ? void 0 : el.value) === '';
106
+ return (el === null || el === void 0 || (_el$label = el.label) === null || _el$label === void 0 ? void 0 : _el$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || "")) || !(el !== null && el !== void 0 && el.value) || (el === null || el === void 0 ? void 0 : el.value) === "";
105
107
  })
106
108
  };
107
109
  }).filter(item => {
@@ -114,10 +116,10 @@ const Dropdown = _ref => {
114
116
  }).filter(item => {
115
117
  var _item$label;
116
118
  if (!isSearchable || !isSearchChanged) return true;
117
- return (item === null || item === void 0 || (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || '')) || !(item !== null && item !== void 0 && item.value) || (item === null || item === void 0 ? void 0 : item.value) === '';
119
+ return (item === null || item === void 0 || (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || "")) || !(item !== null && item !== void 0 && item.value) || (item === null || item === void 0 ? void 0 : item.value) === "";
118
120
  });
119
121
  const filteredOptions = [...filteredItems, ...filteredGroups];
120
- const modalBtnTrigger = entity && entity !== '' && typeof entity === 'string';
122
+ const modalBtnTrigger = entity && entity !== "" && typeof entity === "string";
121
123
  const onChangeHandler = item => {
122
124
  setIsOpen(false);
123
125
  onChange(item.value);
@@ -133,8 +135,8 @@ const Dropdown = _ref => {
133
135
  // decorator
134
136
  const getDepends = getDependsTrigger => {
135
137
  const newOnChange = e => {
136
- if (e.value === 'open_modal') {
137
- onChange('open_modal');
138
+ if (e.value === "open_modal") {
139
+ onChange("open_modal");
138
140
  } else {
139
141
  onChangeHandler(e);
140
142
  }
@@ -143,8 +145,8 @@ const Dropdown = _ref => {
143
145
  // add pseudo option
144
146
  const newOptions = [{
145
147
  label: "New ".concat(entity),
146
- value: 'open_modal',
147
- className: 'dropdown__list-item--modal'
148
+ value: "open_modal",
149
+ className: "dropdown__list-item--modal"
148
150
  }, ...filteredOptions];
149
151
  return {
150
152
  onChange: changeItem => {
@@ -174,26 +176,26 @@ const Dropdown = _ref => {
174
176
  };
175
177
  const hightlightedText = (text, postfix, description) => {
176
178
  var _text;
177
- const prepare = text => text === null || text === void 0 ? void 0 : text.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
179
+ const prepare = text => text === null || text === void 0 ? void 0 : text.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
178
180
  text = text.replace(/["&<>]/g, function (a) {
179
181
  return {
180
- '"': '&quot;',
181
- '&': '&amp;',
182
- '<': '&lt;',
183
- '>': '&gt;'
182
+ '"': "&quot;",
183
+ "&": "&amp;",
184
+ "<": "&lt;",
185
+ ">": "&gt;"
184
186
  }[a];
185
187
  });
186
- const main = isSearchable && searchValue ? (_text = text) === null || _text === void 0 ? void 0 : _text.replace(new RegExp(prepare(searchValue), 'i'), match => "<span class=\"bg--yellow\">".concat(match, "</span>")) : text;
187
- const postfixPart = postfix ? "<span class=\"dropdown__list-item-postfix\">".concat(postfix, "</span>") : '';
188
- const descriptionPart = description ? "<span class=\"dropdown__list-item-description\">".concat(description, "</span>") : '';
188
+ const main = isSearchable && searchValue ? (_text = text) === null || _text === void 0 ? void 0 : _text.replace(new RegExp(prepare(searchValue), "i"), match => "<span class=\"bg--yellow\">".concat(match, "</span>")) : text;
189
+ const postfixPart = postfix ? "<span class=\"dropdown__list-item-postfix\">".concat(postfix, "</span>") : "";
190
+ const descriptionPart = description ? "<span class=\"dropdown__list-item-description\">".concat(description, "</span>") : "";
189
191
  return main + postfixPart + descriptionPart;
190
192
  };
191
193
  const depend = getDepends(modalBtnTrigger);
192
194
  const getMarkupForElement = (item, index, optTestId) => {
193
195
  var _item$value, _item$value2, _item$customMobileIco;
194
196
  return /*#__PURE__*/_react.default.createElement("button", {
195
- "data-testid": "dropdown--button--key-".concat(optTestId || (item === null || item === void 0 || (_item$value = item.value) === null || _item$value === void 0 || (_item$value = _item$value.toString()) === null || _item$value === void 0 ? void 0 : _item$value.replace(/\s/, '-')) || (item === null || item === void 0 ? void 0 : item.key) || 'item', "--option"),
196
- key: (_item$value2 = item.value) === null || _item$value2 === void 0 || (_item$value2 = _item$value2.toString()) === null || _item$value2 === void 0 ? void 0 : _item$value2.replace(/ /g, '_'),
197
+ "data-testid": "dropdown--button--key-".concat(optTestId || (item === null || item === void 0 || (_item$value = item.value) === null || _item$value === void 0 || (_item$value = _item$value.toString()) === null || _item$value === void 0 ? void 0 : _item$value.replace(/\s/, "-")) || (item === null || item === void 0 ? void 0 : item.key) || "item", "--option"),
198
+ key: (_item$value2 = item.value) === null || _item$value2 === void 0 || (_item$value2 = _item$value2.toString()) === null || _item$value2 === void 0 ? void 0 : _item$value2.replace(/ /g, "_"),
197
199
  onMouseDown: () => depend.onChange(item),
198
200
  className: (0, _classnames.default)("".concat(RC, "__list-item"), {
199
201
  ["".concat(RC, "__list-item_active")]: item.value === value,
@@ -204,19 +206,19 @@ const Dropdown = _ref => {
204
206
  ["".concat(RC, "__active-icon_active")]: item.value === value
205
207
  })
206
208
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.Check, null)), /*#__PURE__*/_react.default.createElement("div", {
207
- className: (0, _classnames.default)("".concat(RC, "__list-item-label"), item.labelClassName || ''),
209
+ className: (0, _classnames.default)("".concat(RC, "__list-item-label"), item.labelClassName || ""),
208
210
  dangerouslySetInnerHTML: {
209
211
  __html: hightlightedText(item.label, item.postfix, item.description)
210
212
  }
211
- }), (item === null || item === void 0 ? void 0 : item.icon) || '', isMobile ? (_item$customMobileIco = item === null || item === void 0 ? void 0 : item.customMobileIcon) !== null && _item$customMobileIco !== void 0 ? _item$customMobileIco : /*#__PURE__*/_react.default.createElement(_RadioInput.default, {
213
+ }), (item === null || item === void 0 ? void 0 : item.icon) || "", isMobile ? (_item$customMobileIco = item === null || item === void 0 ? void 0 : item.customMobileIcon) !== null && _item$customMobileIco !== void 0 ? _item$customMobileIco : /*#__PURE__*/_react.default.createElement(_RadioInput.default, {
212
214
  value: item.value,
213
215
  checked: value
214
- }) : '');
216
+ }) : "");
215
217
  };
216
218
  const filteredOptionList = filteredOption => {
217
219
  var _filteredOption$items, _filteredOption$label;
218
220
  return ((_filteredOption$items = filteredOption.items) === null || _filteredOption$items === void 0 ? void 0 : _filteredOption$items.length) > 0 ? /*#__PURE__*/_react.default.createElement("div", {
219
- key: (_filteredOption$label = filteredOption.label) === null || _filteredOption$label === void 0 || (_filteredOption$label = _filteredOption$label.toString()) === null || _filteredOption$label === void 0 ? void 0 : _filteredOption$label.replace(/ /g, '_').concat(Date.now()),
221
+ key: (_filteredOption$label = filteredOption.label) === null || _filteredOption$label === void 0 || (_filteredOption$label = _filteredOption$label.toString()) === null || _filteredOption$label === void 0 ? void 0 : _filteredOption$label.replace(/ /g, "_").concat(Date.now()),
220
222
  className: (0, _classnames.default)("".concat(RC, "-group"), filteredOption.className)
221
223
  }, /*#__PURE__*/_react.default.createElement("div", {
222
224
  className: "".concat(RC, "-group__name")
@@ -232,21 +234,21 @@ const Dropdown = _ref => {
232
234
  isWithAnyScrolling,
233
235
  scrollingInaccuracy = 0
234
236
  } = scrollReactionObj || {};
235
- if (callback && typeof callback === 'function') {
237
+ if (callback && typeof callback === "function") {
236
238
  if (isWithAnyScrolling) callback(e);else if (Math.round(e.target.clientHeight + e.target.scrollTop + scrollingInaccuracy) >= e.target.scrollHeight) callback(e);
237
239
  }
238
240
  }, [filteredOptions]);
239
241
  const getParentNode = () => {
240
242
  var _document$querySelect;
241
243
  if (isDoNotPullOutListOfMainContainer) return dropdownRef.current;
242
- return (_document$querySelect = document.querySelector('div#root')) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector('div#app');
244
+ return (_document$querySelect = document.querySelector("div#root")) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector("div#app");
243
245
  };
244
246
  const initListContainer = () => {
245
- const dropdownList = document.createElement('div');
246
- dropdownList.setAttribute('id', dropdownId);
247
- dropdownList.classList.add('dropdown__container');
247
+ const dropdownList = document.createElement("div");
248
+ dropdownList.setAttribute("id", dropdownId);
249
+ dropdownList.classList.add("dropdown__container");
248
250
  if (isMobile) {
249
- dropdownList.addEventListener('click', e => {
251
+ dropdownList.addEventListener("click", e => {
250
252
  if (e.target.id === dropdownId) setIsOpen(false);
251
253
  });
252
254
  }
@@ -259,10 +261,9 @@ const Dropdown = _ref => {
259
261
  var _document$getElementB;
260
262
  (_document$getElementB = document.getElementById("mlw-".concat(dropdownId))) === null || _document$getElementB === void 0 || _document$getElementB.remove();
261
263
  } catch (e) {}
262
- ;
263
- const dropdownMobileListWrapper = document.createElement('div');
264
- dropdownMobileListWrapper.classList.add('dropdown-mobile');
265
- dropdownMobileListWrapper.setAttribute('id', "mlw-".concat(dropdownId));
264
+ const dropdownMobileListWrapper = document.createElement("div");
265
+ dropdownMobileListWrapper.classList.add("dropdown-mobile");
266
+ dropdownMobileListWrapper.setAttribute("id", "mlw-".concat(dropdownId));
266
267
  dropdownMobileListWrapper.append(dropdownList);
267
268
  getParentNode().append(dropdownMobileListWrapper);
268
269
  } else {
@@ -287,19 +288,19 @@ const Dropdown = _ref => {
287
288
  left,
288
289
  top
289
290
  } = (_dropdownRef$current$ = dropdownRef === null || dropdownRef === void 0 ? void 0 : dropdownRef.current.getBoundingClientRect()) !== null && _dropdownRef$current$ !== void 0 ? _dropdownRef$current$ : {};
290
- const sw = lc.getElementsByClassName('dropdown__list')[0];
291
- const lh = dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 || (_dropdownListWrapperR = dropdownListWrapperRef.current) === null || _dropdownListWrapperR === void 0 ? void 0 : _dropdownListWrapperR.getElementsByClassName('dropdown__list-header')[0];
292
- const margin = parseInt((_getComputedStyle$mar = (_getComputedStyle = getComputedStyle(sw)) === null || _getComputedStyle === void 0 || (_getComputedStyle = _getComputedStyle.marginTop) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.replace('px', '')) !== null && _getComputedStyle$mar !== void 0 ? _getComputedStyle$mar : 0);
293
- const maxHeight = initListHeight !== null && initListHeight !== void 0 ? initListHeight : parseInt((_getComputedStyle$max = (_getComputedStyle2 = getComputedStyle(sw)) === null || _getComputedStyle2 === void 0 || (_getComputedStyle2 = _getComputedStyle2.maxHeight) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.replace('px', '')) !== null && _getComputedStyle$max !== void 0 ? _getComputedStyle$max : 0);
291
+ const sw = lc.getElementsByClassName("dropdown__list")[0];
292
+ const lh = dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 || (_dropdownListWrapperR = dropdownListWrapperRef.current) === null || _dropdownListWrapperR === void 0 ? void 0 : _dropdownListWrapperR.getElementsByClassName("dropdown__list-header")[0];
293
+ const margin = parseInt((_getComputedStyle$mar = (_getComputedStyle = getComputedStyle(sw)) === null || _getComputedStyle === void 0 || (_getComputedStyle = _getComputedStyle.marginTop) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.replace("px", "")) !== null && _getComputedStyle$mar !== void 0 ? _getComputedStyle$mar : 0, 10);
294
+ const maxHeight = initListHeight !== null && initListHeight !== void 0 ? initListHeight : parseInt((_getComputedStyle$max = (_getComputedStyle2 = getComputedStyle(sw)) === null || _getComputedStyle2 === void 0 || (_getComputedStyle2 = _getComputedStyle2.maxHeight) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.replace("px", "")) !== null && _getComputedStyle$max !== void 0 ? _getComputedStyle$max : 0, 10);
294
295
  if (initListHeight === null) setInitListHeight(maxHeight);
295
296
  const toTop = top - margin;
296
297
  const toBottom = windowHeight - top - height - margin * 2;
297
298
  const swHeight = sw === null || sw === void 0 || (_sw$getBoundingClient = sw.getBoundingClientRect()) === null || _sw$getBoundingClient === void 0 ? void 0 : _sw$getBoundingClient.height;
298
299
  const maxSwHeight = isMobile ? (dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 || (_dropdownListWrapperR2 = dropdownListWrapperRef.current) === null || _dropdownListWrapperR2 === void 0 || (_dropdownListWrapperR2 = _dropdownListWrapperR2.getBoundingClientRect()) === null || _dropdownListWrapperR2 === void 0 ? void 0 : _dropdownListWrapperR2.height) - (lh === null || lh === 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;
299
- const listPos = toTop < toBottom || toBottom >= swHeight ? 'bottom' : 'top';
300
+ const listPos = toTop < toBottom || toBottom >= swHeight ? "bottom" : "top";
300
301
  lc.style.minWidth = "".concat(width, "px");
301
302
  lc.style.left = "".concat(left, "px");
302
- lc.style.top = "".concat(listPos === 'bottom' ? top + height : top - swHeight - 3 * margin, "px");
303
+ lc.style.top = "".concat(listPos === "bottom" ? top + height : top - swHeight - 3 * margin, "px");
303
304
  sw.style.maxHeight = "".concat(maxSwHeight, "px");
304
305
  };
305
306
  const renderListContainer = () => {
@@ -314,19 +315,19 @@ const Dropdown = _ref => {
314
315
  let {
315
316
  value
316
317
  } = _ref2;
317
- return value === 'open_modal';
318
+ return value === "open_modal";
318
319
  });
319
320
  const emptyOption = newData.filter(_ref3 => {
320
321
  let {
321
322
  value
322
323
  } = _ref3;
323
- return value === '';
324
+ return value === "";
324
325
  });
325
326
  const restOfOptions = newData.filter(_ref4 => {
326
327
  let {
327
328
  value
328
329
  } = _ref4;
329
- return value !== 'open_modal' && value !== '';
330
+ return value !== "open_modal" && value !== "";
330
331
  }).sort(_utils.compareAlphabetical);
331
332
  newData = [...openModalOption, ...emptyOption, ...restOfOptions].map(item => {
332
333
  if (item !== null && item !== void 0 && item.items) {
@@ -371,7 +372,7 @@ const Dropdown = _ref => {
371
372
  className: "".concat(RC, "__input"),
372
373
  value: searchValue !== null && searchValue !== void 0 ? searchValue : selectedLabel,
373
374
  onChange: v => onSearchHandler(v),
374
- placeholder: placeholder || 'Search',
375
+ placeholder: placeholder || "Search",
375
376
  withDelete: true,
376
377
  onFocus: () => setIsSearchInputFocused(true),
377
378
  onBlur: () => setIsSearchInputFocused(false),
@@ -387,7 +388,7 @@ const Dropdown = _ref => {
387
388
  }),
388
389
  ref: dropdownListRef
389
390
  }, (_getSortedOptions = getSortedOptions(depend.options)) === null || _getSortedOptions === void 0 ? void 0 : _getSortedOptions.map(option => {
390
- var _option$items;
391
+ var _option$items, _option$label;
391
392
  if (option !== null && option !== void 0 && (_option$items = option.items) !== null && _option$items !== void 0 && _option$items.length) {
392
393
  if (!isSearchable || !isSearchChanged) {
393
394
  return filteredOptionList(option);
@@ -395,7 +396,7 @@ const Dropdown = _ref => {
395
396
  var _option$items2;
396
397
  const items = (_option$items2 = option.items) === null || _option$items2 === void 0 ? void 0 : _option$items2.slice().filter(el => {
397
398
  var _el$label2;
398
- return (el === null || el === void 0 || (_el$label2 = el.label) === null || _el$label2 === void 0 ? void 0 : _el$label2.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || '')) || !(el !== null && el !== void 0 && el.value) || (el === null || el === void 0 ? void 0 : el.value) === '';
399
+ return (el === null || el === void 0 || (_el$label2 = el.label) === null || _el$label2 === void 0 ? void 0 : _el$label2.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || "")) || !(el !== null && el !== void 0 && el.value) || (el === null || el === void 0 ? void 0 : el.value) === "";
399
400
  });
400
401
  if (items !== null && items !== void 0 && items.length) return filteredOptionList({
401
402
  ...option,
@@ -403,11 +404,8 @@ const Dropdown = _ref => {
403
404
  });
404
405
  return null;
405
406
  }
406
- } else {
407
- var _option$label;
408
- if (!isSearchable || !isSearchChanged || option !== null && option !== void 0 && (_option$label = option.label) !== null && _option$label !== void 0 && _option$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || '') || !(option !== null && option !== void 0 && option.value) || (option === null || option === void 0 ? void 0 : option.value) === '') {
409
- return getMarkupForElement(option);
410
- }
407
+ } else if (!isSearchable || !isSearchChanged || option !== null && option !== void 0 && (_option$label = option.label) !== null && _option$label !== void 0 && _option$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || "") || !(option !== null && option !== void 0 && option.value) || (option === null || option === void 0 ? void 0 : option.value) === "") {
408
+ return getMarkupForElement(option);
411
409
  }
412
410
  }), !filteredItems.length && !filteredGroups.length && /*#__PURE__*/_react.default.createElement("div", {
413
411
  className: "".concat(RC, "__list-item ").concat(RC, "__list-item--no-options")
@@ -426,42 +424,42 @@ const Dropdown = _ref => {
426
424
  (0, _react.useLayoutEffect)(() => {
427
425
  var _getListContainer3;
428
426
  if (!isMobile) {
429
- window.addEventListener('resize', setListContainerStyles);
430
- window.addEventListener('mousewheel', closeList);
431
- window.addEventListener('scroll', closeList);
432
- window.addEventListener('touchmove', closeList);
427
+ window.addEventListener("resize", setListContainerStyles);
428
+ window.addEventListener("mousewheel", closeList);
429
+ window.addEventListener("scroll", closeList);
430
+ window.addEventListener("touchmove", closeList);
433
431
  } else {
434
- window.removeEventListener('resize', setListContainerStyles);
435
- window.removeEventListener('mousewheel', closeList);
436
- window.removeEventListener('scroll', closeList);
437
- window.removeEventListener('touchmove', closeList);
432
+ window.removeEventListener("resize", setListContainerStyles);
433
+ window.removeEventListener("mousewheel", closeList);
434
+ window.removeEventListener("scroll", closeList);
435
+ window.removeEventListener("touchmove", closeList);
438
436
  }
439
- (_getListContainer3 = getListContainer()) === null || _getListContainer3 === void 0 || _getListContainer3.addEventListener('click', closeList);
437
+ (_getListContainer3 = getListContainer()) === null || _getListContainer3 === void 0 || _getListContainer3.addEventListener("click", closeList);
440
438
  return () => {
441
439
  var _getListContainer4;
442
- window.removeEventListener('resize', setListContainerStyles);
443
- window.removeEventListener('mousewheel', closeList);
444
- window.removeEventListener('scroll', closeList);
445
- window.removeEventListener('touchmove', closeList);
446
- (_getListContainer4 = getListContainer()) === null || _getListContainer4 === void 0 || _getListContainer4.removeEventListener('click', closeList);
440
+ window.removeEventListener("resize", setListContainerStyles);
441
+ window.removeEventListener("mousewheel", closeList);
442
+ window.removeEventListener("scroll", closeList);
443
+ window.removeEventListener("touchmove", closeList);
444
+ (_getListContainer4 = getListContainer()) === null || _getListContainer4 === void 0 || _getListContainer4.removeEventListener("click", closeList);
447
445
  };
448
446
  }, [getListContainer]);
449
447
  (0, _react.useLayoutEffect)(() => {
450
448
  setListContainerStyles();
451
449
  }, [isOpen, searchValue, isMobile, options, dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 || (_dropdownListWrapperR3 = dropdownListWrapperRef.current) === null || _dropdownListWrapperR3 === void 0 || (_dropdownListWrapperR3 = _dropdownListWrapperR3.getBoundingClientRect()) === null || _dropdownListWrapperR3 === void 0 ? void 0 : _dropdownListWrapperR3.height]);
452
450
  (0, _react.useEffect)(() => {
453
- document.addEventListener('click', handleClickOutside, true);
454
- return () => document.removeEventListener('click', handleClickOutside, true);
451
+ document.addEventListener("click", handleClickOutside, true);
452
+ return () => document.removeEventListener("click", handleClickOutside, true);
455
453
  }, [value]);
456
454
  (0, _react.useEffect)(() => {
457
455
  if (!isOpen) {
458
456
  setIsSearchChanged(false);
459
457
  }
460
- if (scrollReactionObj && typeof scrollReactionObj === 'object' && isOpen && dropdownListRef && dropdownListRef.current) {
461
- dropdownListRef.current.addEventListener('scroll', doScrollCallback);
458
+ if (scrollReactionObj && typeof scrollReactionObj === "object" && isOpen && dropdownListRef && dropdownListRef.current) {
459
+ dropdownListRef.current.addEventListener("scroll", doScrollCallback);
462
460
  }
463
461
  return () => {
464
- if (scrollReactionObj && typeof scrollReactionObj === 'object') removeEventListener('scroll', doScrollCallback);
462
+ if (scrollReactionObj && typeof scrollReactionObj === "object") removeEventListener("scroll", doScrollCallback);
465
463
  };
466
464
  }, [isOpen, dropdownListRef]);
467
465
  (0, _react.useEffect)(() => {
@@ -478,10 +476,10 @@ const Dropdown = _ref => {
478
476
  if (isOpen && !isSearchInputFocused && searchInputRef !== null && searchInputRef !== void 0 && searchInputRef.current && !isMobile) searchInputRef === null || searchInputRef === void 0 || (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 || _searchInputRef$curre.focus();
479
477
  if (isOpen) {
480
478
  var _getListContainer5;
481
- (_getListContainer5 = getListContainer()) === null || _getListContainer5 === void 0 || _getListContainer5.classList.add('dropdown__container--opened');
479
+ (_getListContainer5 = getListContainer()) === null || _getListContainer5 === void 0 || _getListContainer5.classList.add("dropdown__container--opened");
482
480
  } else {
483
481
  var _getListContainer6;
484
- (_getListContainer6 = getListContainer()) === null || _getListContainer6 === void 0 || _getListContainer6.classList.remove('dropdown__container--opened');
482
+ (_getListContainer6 = getListContainer()) === null || _getListContainer6 === void 0 || _getListContainer6.classList.remove("dropdown__container--opened");
485
483
  }
486
484
  if (!isOpen && isMobile) {
487
485
  setSearchValue(null);
@@ -496,21 +494,21 @@ const Dropdown = _ref => {
496
494
  }, [isOpen, isMobile, isScrollableList, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current, dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr5 = dropdownListRef.current) === null || _dropdownListRef$curr5 === void 0 ? void 0 : _dropdownListRef$curr5.scrollHeight, dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr6 = dropdownListRef.current) === null || _dropdownListRef$curr6 === void 0 ? void 0 : _dropdownListRef$curr6.clientHeight]);
497
495
  (0, _react.useEffect)(() => {
498
496
  const setScrollTopValue = e => {
499
- setScrollTop(parseInt(e.target.scrollTop));
497
+ setScrollTop(parseInt(e.target.scrollTop, 10));
500
498
  };
501
499
  if (isOpen && isMobile && dropdownListRef !== null && dropdownListRef !== void 0 && dropdownListRef.current) {
502
500
  var _dropdownListRef$curr7;
503
- dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr7 = dropdownListRef.current) === null || _dropdownListRef$curr7 === void 0 || _dropdownListRef$curr7.addEventListener('scroll', setScrollTopValue);
501
+ dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr7 = dropdownListRef.current) === null || _dropdownListRef$curr7 === void 0 || _dropdownListRef$curr7.addEventListener("scroll", setScrollTopValue);
504
502
  }
505
503
  return () => {
506
504
  var _dropdownListRef$curr8;
507
- dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr8 = dropdownListRef.current) === null || _dropdownListRef$curr8 === void 0 || _dropdownListRef$curr8.removeEventListener('scroll', setScrollTopValue);
505
+ dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr8 = dropdownListRef.current) === null || _dropdownListRef$curr8 === void 0 || _dropdownListRef$curr8.removeEventListener("scroll", setScrollTopValue);
508
506
  };
509
507
  }, [isOpen, isMobile, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
510
508
  (0, _react.useEffect)(() => {
511
509
  if (dropdownListRef !== null && dropdownListRef !== void 0 && dropdownListRef.current) {
512
510
  var _dropdownListRef$curr9, _dropdownListRef$curr10;
513
- setScrollHeight(parseInt((dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr9 = dropdownListRef.current) === null || _dropdownListRef$curr9 === void 0 ? void 0 : _dropdownListRef$curr9.scrollHeight) - (dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr10 = dropdownListRef.current) === null || _dropdownListRef$curr10 === void 0 ? void 0 : _dropdownListRef$curr10.clientHeight)));
511
+ setScrollHeight(parseInt((dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr9 = dropdownListRef.current) === null || _dropdownListRef$curr9 === void 0 ? void 0 : _dropdownListRef$curr9.scrollHeight) - (dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr10 = dropdownListRef.current) === null || _dropdownListRef$curr10 === void 0 ? void 0 : _dropdownListRef$curr10.clientHeight), 10));
514
512
  }
515
513
  }, [scrollTop, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
516
514
  (0, _react.useEffect)(() => {
@@ -530,8 +528,8 @@ const Dropdown = _ref => {
530
528
  onKeyDown: onKeyDown,
531
529
  onKeyUp: onKeyUp
532
530
  }, /*#__PURE__*/_react.default.createElement("button", {
533
- "data-testid": "dropdown--".concat(testId || '', "--container"),
534
- className: "".concat(RC, "__trigger input__wrap ").concat(isOpen ? 'input__wrap--focus' : '', " ").concat(!value ? 'placeholder' : '', " ").concat(error ? 'error' : ''),
531
+ "data-testid": "dropdown--".concat(testId || "", "--container"),
532
+ className: "".concat(RC, "__trigger input__wrap ").concat(isOpen ? "input__wrap--focus" : "", " ").concat(!value ? "placeholder" : "", " ").concat(error ? "error" : ""),
535
533
  onClick: toggleList,
536
534
  onKeyDown: onKeyDown,
537
535
  onKeyUp: onKeyUp,
@@ -539,7 +537,7 @@ const Dropdown = _ref => {
539
537
  }, customTrigger || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isSearchable && !isMobile ? /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
540
538
  ref: searchInputRef,
541
539
  className: "".concat(RC, "__input"),
542
- value: isOpen ? searchValue !== null && searchValue !== void 0 ? searchValue : '' : selectedLabel || '',
540
+ value: isOpen ? searchValue !== null && searchValue !== void 0 ? searchValue : "" : selectedLabel || "",
543
541
  onChange: e => onSearchHandler(e.target.value),
544
542
  placeholder: placeholder,
545
543
  onFocus: () => setIsSearchInputFocused(true),