@true-engineering/true-react-common-ui-kit 1.3.0 → 1.4.0

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 (247) hide show
  1. package/LICENSE +201 -201
  2. package/dist/components/Flag/augment.d.ts +1 -1
  3. package/dist/components/Icon/complexIcons/augment.d.ts +1 -1
  4. package/dist/components/Input/Input.d.ts +3 -3
  5. package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +1 -1
  6. package/dist/components/Select/Select.d.ts +8 -3
  7. package/dist/components/Select/Select.styles.d.ts +10 -0
  8. package/dist/components/Select/SelectList/SelectList.d.ts +4 -3
  9. package/dist/components/Select/SelectList/SelectList.styles.d.ts +9 -0
  10. package/dist/helpers/snippets.d.ts +3 -0
  11. package/dist/helpers/utils.d.ts +1 -0
  12. package/dist/hooks/use-dropdown.d.ts +1 -1
  13. package/dist/true-react-common-ui-kit.js +400 -349
  14. package/dist/true-react-common-ui-kit.js.map +1 -1
  15. package/dist/true-react-common-ui-kit.umd.cjs +400 -349
  16. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  17. package/dist/vite-env.d.ts +1 -1
  18. package/package.json +91 -91
  19. package/src/components/AccountInfo/AccountInfo.stories.tsx +35 -35
  20. package/src/components/AccountInfo/AccountInfo.styles.ts +55 -55
  21. package/src/components/AccountInfo/AccountInfo.tsx +106 -106
  22. package/src/components/AccountInfo/index.ts +2 -2
  23. package/src/components/AddButton/AddButton.stories.tsx +21 -21
  24. package/src/components/AddButton/AddButton.styles.ts +34 -34
  25. package/src/components/AddButton/AddButton.tsx +49 -49
  26. package/src/components/AddButton/index.ts +2 -2
  27. package/src/components/Button/Button.stories.tsx +61 -61
  28. package/src/components/Button/Button.styles.ts +196 -196
  29. package/src/components/Button/Button.tsx +195 -195
  30. package/src/components/Button/index.ts +2 -2
  31. package/src/components/Checkbox/Checkbox.stories.tsx +35 -35
  32. package/src/components/Checkbox/Checkbox.styles.ts +59 -59
  33. package/src/components/Checkbox/Checkbox.tsx +93 -93
  34. package/src/components/Checkbox/index.ts +2 -2
  35. package/src/components/CloseButton/CloseButton.styles.ts +34 -34
  36. package/src/components/CloseButton/CloseButton.tsx +37 -37
  37. package/src/components/CloseButton/index.ts +2 -2
  38. package/src/components/Colors/Colors.stories.tsx +7 -7
  39. package/src/components/Colors/Colors.styles.ts +38 -38
  40. package/src/components/Colors/Colors.tsx +34 -34
  41. package/src/components/Colors/index.ts +2 -2
  42. package/src/components/CssBaseline/CssBaseline.styles.ts +15 -15
  43. package/src/components/CssBaseline/CssBaseline.tsx +17 -17
  44. package/src/components/CssBaseline/index.ts +2 -2
  45. package/src/components/DateInput/DateInput.stories.tsx +63 -63
  46. package/src/components/DateInput/DateInput.styles.ts +14 -14
  47. package/src/components/DateInput/DateInput.tsx +60 -60
  48. package/src/components/DateInput/index.ts +2 -2
  49. package/src/components/DatePicker/DatePicker.stories.tsx +96 -96
  50. package/src/components/DatePicker/DatePicker.styles.ts +54 -54
  51. package/src/components/DatePicker/DatePicker.tsx +358 -358
  52. package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.styles.ts +84 -84
  53. package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.tsx +94 -94
  54. package/src/components/DatePicker/DatePickerHeader/index.ts +1 -1
  55. package/src/components/DatePicker/DatePickerInput/DatePickerInput.styles.ts +25 -25
  56. package/src/components/DatePicker/DatePickerInput/DatePickerInput.tsx +31 -31
  57. package/src/components/DatePicker/DatePickerInput/index.ts +1 -1
  58. package/src/components/DatePicker/index.ts +4 -4
  59. package/src/components/Description/Description.stories.tsx +29 -29
  60. package/src/components/Description/Description.styles.ts +31 -31
  61. package/src/components/Description/Description.tsx +69 -69
  62. package/src/components/Description/index.ts +2 -2
  63. package/src/components/FiltersPane/FilterInterval/FilterInterval.styles.ts +64 -64
  64. package/src/components/FiltersPane/FilterInterval/FilterInterval.tsx +162 -162
  65. package/src/components/FiltersPane/FilterInterval/index.ts +1 -1
  66. package/src/components/FiltersPane/FilterMultiSelect/FilterMultiSelect.tsx +14 -14
  67. package/src/components/FiltersPane/FilterMultiSelect/index.ts +1 -1
  68. package/src/components/FiltersPane/FilterSelect/FilterSelect.styles.ts +144 -144
  69. package/src/components/FiltersPane/FilterSelect/FilterSelect.tsx +397 -397
  70. package/src/components/FiltersPane/FilterSelect/index.ts +1 -1
  71. package/src/components/FiltersPane/FilterSelect/locales.ts +37 -37
  72. package/src/components/FiltersPane/FilterValueView/FilterValueView.styles.tsx +15 -15
  73. package/src/components/FiltersPane/FilterValueView/FilterValueView.tsx +186 -186
  74. package/src/components/FiltersPane/FilterValueView/index.tsx +1 -1
  75. package/src/components/FiltersPane/FilterWithDates/FilterWithDates.styles.ts +60 -60
  76. package/src/components/FiltersPane/FilterWithDates/FilterWithDates.tsx +222 -222
  77. package/src/components/FiltersPane/FilterWithDates/index.ts +1 -1
  78. package/src/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.styles.ts +17 -17
  79. package/src/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.tsx +231 -231
  80. package/src/components/FiltersPane/FilterWithPeriod/index.ts +1 -1
  81. package/src/components/FiltersPane/FilterWrapper/FilterWrapper.styles.ts +110 -110
  82. package/src/components/FiltersPane/FilterWrapper/FilterWrapper.tsx +360 -360
  83. package/src/components/FiltersPane/FilterWrapper/index.ts +1 -1
  84. package/src/components/FiltersPane/FiltersPane.stories.tsx +308 -307
  85. package/src/components/FiltersPane/FiltersPane.styles.ts +71 -71
  86. package/src/components/FiltersPane/FiltersPane.tsx +193 -193
  87. package/src/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.styles.ts +109 -109
  88. package/src/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.tsx +175 -175
  89. package/src/components/FiltersPane/FiltersPaneSearch/index.ts +1 -1
  90. package/src/components/FiltersPane/index.ts +20 -20
  91. package/src/components/FiltersPane/locales.ts +107 -107
  92. package/src/components/FiltersPane/types.ts +126 -126
  93. package/src/components/Flag/Flag.stories.tsx +29 -29
  94. package/src/components/Flag/Flag.styles.ts +18 -18
  95. package/src/components/Flag/Flag.tsx +28 -28
  96. package/src/components/Flag/augment.d.ts +1 -1
  97. package/src/components/Flag/index.ts +2 -2
  98. package/src/components/FlexibleTable/FlexibleTable.stories.tsx +80 -80
  99. package/src/components/FlexibleTable/FlexibleTable.styles.ts +131 -131
  100. package/src/components/FlexibleTable/FlexibleTable.tsx +243 -243
  101. package/src/components/FlexibleTable/TableRow.tsx +171 -166
  102. package/src/components/FlexibleTable/TableValue.tsx +83 -83
  103. package/src/components/FlexibleTable/fixture-test.ts +254 -254
  104. package/src/components/FlexibleTable/index.ts +3 -3
  105. package/src/components/FlexibleTable/types.ts +58 -58
  106. package/src/components/Icon/ComplexIconBoilerplate.tsx +17 -17
  107. package/src/components/Icon/Icon.stories.tsx +88 -88
  108. package/src/components/Icon/Icon.styles.ts +10 -10
  109. package/src/components/Icon/Icon.tsx +34 -34
  110. package/src/components/Icon/IconBoilerplate.tsx +42 -42
  111. package/src/components/Icon/complexIcons/augment.d.ts +1 -1
  112. package/src/components/Icon/complexIcons/avatarGreen.svg +57 -57
  113. package/src/components/Icon/complexIcons/icons.ts +7 -7
  114. package/src/components/Icon/complexIcons/index.ts +1 -1
  115. package/src/components/Icon/icons/icons.ts +838 -838
  116. package/src/components/Icon/icons/index.ts +1 -1
  117. package/src/components/Icon/index.ts +4 -4
  118. package/src/components/IncrementInput/ChangeButton.tsx +34 -34
  119. package/src/components/IncrementInput/IncrementInput.stories.tsx +34 -34
  120. package/src/components/IncrementInput/IncrementInput.styles.ts +77 -77
  121. package/src/components/IncrementInput/IncrementInput.tsx +95 -95
  122. package/src/components/IncrementInput/index.ts +2 -2
  123. package/src/components/Input/Input.stories.tsx +92 -92
  124. package/src/components/Input/Input.styles.ts +305 -305
  125. package/src/components/Input/Input.tsx +310 -308
  126. package/src/components/Input/index.ts +2 -2
  127. package/src/components/List/List.stories.tsx +62 -62
  128. package/src/components/List/List.styles.ts +52 -52
  129. package/src/components/List/List.tsx +82 -82
  130. package/src/components/List/index.ts +2 -2
  131. package/src/components/Modal/Modal.stories.tsx +113 -113
  132. package/src/components/Modal/Modal.styles.ts +308 -308
  133. package/src/components/Modal/Modal.tsx +210 -210
  134. package/src/components/Modal/index.ts +2 -2
  135. package/src/components/MoreMenu/MoreMenu.stories.tsx +46 -46
  136. package/src/components/MoreMenu/MoreMenu.styles.ts +70 -70
  137. package/src/components/MoreMenu/MoreMenu.tsx +102 -102
  138. package/src/components/MoreMenu/index.ts +2 -2
  139. package/src/components/MultiSelect/MultiSelect.stories.tsx +46 -46
  140. package/src/components/MultiSelect/MultiSelect.styles.ts +55 -55
  141. package/src/components/MultiSelect/MultiSelect.tsx +98 -98
  142. package/src/components/MultiSelect/MultiSelectInput/MultiSelectInput.styles.ts +73 -73
  143. package/src/components/MultiSelect/MultiSelectInput/MultiSelectInput.tsx +62 -62
  144. package/src/components/MultiSelect/MultiSelectInput/index.ts +1 -1
  145. package/src/components/MultiSelect/index.ts +3 -3
  146. package/src/components/MultiSelectList/MultiSelectList.styles.ts +125 -125
  147. package/src/components/MultiSelectList/MultiSelectList.tsx +519 -519
  148. package/src/components/MultiSelectList/index.ts +2 -2
  149. package/src/components/MultiSelectList/locales.ts +37 -37
  150. package/src/components/Notification/Notification.stories.tsx +51 -51
  151. package/src/components/Notification/Notification.styles.ts +50 -50
  152. package/src/components/Notification/Notification.tsx +84 -84
  153. package/src/components/Notification/index.ts +2 -2
  154. package/src/components/NumberInput/NumberInput.stories.tsx +35 -35
  155. package/src/components/NumberInput/NumberInput.tsx +142 -142
  156. package/src/components/NumberInput/helpers.ts +68 -68
  157. package/src/components/NumberInput/index.ts +1 -1
  158. package/src/components/PhoneInput/PhoneInput.stories.tsx +71 -71
  159. package/src/components/PhoneInput/PhoneInput.styles.ts +84 -84
  160. package/src/components/PhoneInput/PhoneInput.tsx +223 -223
  161. package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.stories.tsx +21 -21
  162. package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.styles.ts +100 -100
  163. package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.tsx +171 -171
  164. package/src/components/PhoneInput/PhoneInputCountryList/index.ts +2 -2
  165. package/src/components/PhoneInput/index.ts +6 -6
  166. package/src/components/PhoneInput/phone-info.ts +2167 -2167
  167. package/src/components/PhoneInput/types.ts +16 -16
  168. package/src/components/RadioButton/RadioButton.stories.tsx +46 -46
  169. package/src/components/RadioButton/RadioButton.styles.ts +37 -37
  170. package/src/components/RadioButton/RadioButton.tsx +56 -56
  171. package/src/components/RadioButton/index.ts +2 -2
  172. package/src/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.ts +66 -66
  173. package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
  174. package/src/components/SearchInput/SearchInput.stories.tsx +24 -24
  175. package/src/components/SearchInput/SearchInput.styles.ts +50 -50
  176. package/src/components/SearchInput/SearchInput.tsx +63 -63
  177. package/src/components/SearchInput/index.ts +2 -2
  178. package/src/components/Select/Select.stories.tsx +258 -242
  179. package/src/components/Select/Select.styles.ts +85 -74
  180. package/src/components/Select/Select.tsx +501 -452
  181. package/src/components/Select/SelectList/SelectList.styles.ts +68 -57
  182. package/src/components/Select/SelectList/SelectList.tsx +139 -130
  183. package/src/components/Select/SelectList/index.ts +1 -1
  184. package/src/components/Select/helpers.ts +21 -21
  185. package/src/components/Select/index.ts +3 -3
  186. package/src/components/SmartInput/SmartInput.stories.tsx +63 -63
  187. package/src/components/SmartInput/SmartInput.tsx +180 -180
  188. package/src/components/SmartInput/helpers.ts +85 -85
  189. package/src/components/SmartInput/index.ts +1 -1
  190. package/src/components/Switch/Switch.stories.tsx +40 -40
  191. package/src/components/Switch/Switch.styles.ts +75 -75
  192. package/src/components/Switch/Switch.tsx +89 -89
  193. package/src/components/Switch/index.ts +2 -2
  194. package/src/components/TextArea/TextArea.stories.tsx +35 -35
  195. package/src/components/TextArea/TextArea.styles.ts +153 -153
  196. package/src/components/TextArea/TextArea.tsx +178 -178
  197. package/src/components/TextArea/index.ts +2 -2
  198. package/src/components/TextWithInfo/TextWithInfo.stories.tsx +53 -53
  199. package/src/components/TextWithInfo/TextWithInfo.styles.ts +60 -60
  200. package/src/components/TextWithInfo/TextWithInfo.tsx +67 -67
  201. package/src/components/TextWithInfo/index.ts +2 -2
  202. package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +58 -58
  203. package/src/components/TextWithTooltip/TextWithTooltip.styles.ts +19 -19
  204. package/src/components/TextWithTooltip/TextWithTooltip.tsx +163 -163
  205. package/src/components/TextWithTooltip/index.ts +2 -2
  206. package/src/components/ThemedPreloader/ThemedPreloader.stories.tsx +41 -41
  207. package/src/components/ThemedPreloader/ThemedPreloader.styles.ts +21 -21
  208. package/src/components/ThemedPreloader/ThemedPreloader.tsx +56 -56
  209. package/src/components/ThemedPreloader/components/DefaultPreloader/DefaultPreloader.tsx +34 -34
  210. package/src/components/ThemedPreloader/components/DefaultPreloader/index.ts +1 -1
  211. package/src/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.ts +54 -54
  212. package/src/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.tsx +18 -18
  213. package/src/components/ThemedPreloader/components/DotsPreloader/index.ts +2 -2
  214. package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.ts +11 -11
  215. package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.tsx +32 -32
  216. package/src/components/ThemedPreloader/components/SvgPreloader/index.ts +2 -2
  217. package/src/components/ThemedPreloader/components/index.ts +2 -2
  218. package/src/components/ThemedPreloader/index.ts +2 -2
  219. package/src/components/Toaster/Toaster.stories.tsx +34 -34
  220. package/src/components/Toaster/Toaster.styles.ts +59 -59
  221. package/src/components/Toaster/Toaster.tsx +113 -113
  222. package/src/components/Toaster/index.ts +2 -2
  223. package/src/components/Tooltip/Tooltip.stories.tsx +21 -21
  224. package/src/components/Tooltip/Tooltip.styles.ts +45 -45
  225. package/src/components/Tooltip/Tooltip.tsx +40 -40
  226. package/src/components/Tooltip/index.ts +3 -3
  227. package/src/components/Tooltip/types.ts +1 -1
  228. package/src/components/index.ts +36 -36
  229. package/src/helpers/colors.ts +2 -2
  230. package/src/helpers/data-attributes.ts +18 -18
  231. package/src/helpers/dateHelpers/date-helpers.ts +9 -9
  232. package/src/helpers/index.ts +5 -5
  233. package/src/helpers/phone.ts +106 -106
  234. package/src/helpers/popper-helpers.ts +17 -17
  235. package/src/helpers/snippets.tsx +5 -0
  236. package/src/helpers/utils.ts +178 -164
  237. package/src/hooks/index.ts +6 -6
  238. package/src/hooks/use-did-mount-effect.ts +21 -21
  239. package/src/hooks/use-dropdown.ts +85 -85
  240. package/src/hooks/use-is-mounted.ts +15 -15
  241. package/src/hooks/use-on-click-outside.ts +92 -92
  242. package/src/hooks/use-theme.ts +36 -36
  243. package/src/hooks/use-tweak-styles.ts +14 -14
  244. package/src/index.ts +5 -5
  245. package/src/theme.ts +155 -155
  246. package/src/types.ts +106 -106
  247. package/src/vite-env.d.ts +1 -1
@@ -1110,6 +1110,16 @@
1110
1110
  });
1111
1111
  return result;
1112
1112
  };
1113
+ var hasExactParent = function(element, parent) {
1114
+ if (element === parent) {
1115
+ return true;
1116
+ }
1117
+ var parentNode = getParentNode$1(element);
1118
+ if (parentNode === element) {
1119
+ return false;
1120
+ }
1121
+ return hasExactParent(parentNode, parent);
1122
+ };
1113
1123
  var _element_parentNode;
1114
1124
  var getParentNode$1 = function(element) {
1115
1125
  return element.nodeName === "HTML" ? element : (_element_parentNode = element.parentNode) !== null && _element_parentNode !== void 0 ? _element_parentNode : element.host;
@@ -4173,63 +4183,63 @@
4173
4183
  ]
4174
4184
  });
4175
4185
  };
4176
- const avatarGreen = ` <svg
4177
- width="100%"
4178
- height="100%"
4179
- viewBox="0 0 32 32"
4180
- fill="none"
4181
- xmlns="http://www.w3.org/2000/svg"
4182
- >
4183
- <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />
4184
- <mask
4185
- id="mask0_0_12744"
4186
- style="mask-type: 'alpha';"
4187
- maskUnits="userSpaceOnUse"
4188
- x="0"
4189
- y="0"
4190
- width="32"
4191
- height="32"
4192
- >
4193
- <circle cx="16" cy="16" r="16" fill="white" />
4194
- </mask>
4195
- <g mask="url(#mask0_0_12744)">
4196
- <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />
4197
- <mask
4198
- id="mask1_0_12744"
4199
- style="mask-type: 'alpha';"
4200
- maskUnits="userSpaceOnUse"
4201
- x="3"
4202
- y="16"
4203
- width="26"
4204
- height="26"
4205
- >
4206
- <circle cx="16" cy="29" r="13" fill="white" />
4207
- </mask>
4208
- <g mask="url(#mask1_0_12744)">
4209
- <ellipse
4210
- cx="16"
4211
- cy="17.5"
4212
- rx="6"
4213
- ry="7.5"
4214
- fill="#505F79"
4215
- fill-opacity="0.204983"
4216
- />
4217
- </g>
4218
- </g>
4219
- <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />
4220
- <defs>
4221
- <linearGradient
4222
- id="paint0_linear_0_12744"
4223
- x1="13.347"
4224
- y1="46.279"
4225
- x2="33.5318"
4226
- y2="30.8088"
4227
- gradientUnits="userSpaceOnUse"
4228
- >
4229
- <stop stop-color="#ABD229" />
4230
- <stop offset="1" stop-color="#9CD03F" />
4231
- </linearGradient>
4232
- </defs>
4186
+ const avatarGreen = ` <svg\r
4187
+ width="100%"\r
4188
+ height="100%"\r
4189
+ viewBox="0 0 32 32"\r
4190
+ fill="none"\r
4191
+ xmlns="http://www.w3.org/2000/svg"\r
4192
+ >\r
4193
+ <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />\r
4194
+ <mask\r
4195
+ id="mask0_0_12744"\r
4196
+ style="mask-type: 'alpha';"\r
4197
+ maskUnits="userSpaceOnUse"\r
4198
+ x="0"\r
4199
+ y="0"\r
4200
+ width="32"\r
4201
+ height="32"\r
4202
+ >\r
4203
+ <circle cx="16" cy="16" r="16" fill="white" />\r
4204
+ </mask>\r
4205
+ <g mask="url(#mask0_0_12744)">\r
4206
+ <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />\r
4207
+ <mask\r
4208
+ id="mask1_0_12744"\r
4209
+ style="mask-type: 'alpha';"\r
4210
+ maskUnits="userSpaceOnUse"\r
4211
+ x="3"\r
4212
+ y="16"\r
4213
+ width="26"\r
4214
+ height="26"\r
4215
+ >\r
4216
+ <circle cx="16" cy="29" r="13" fill="white" />\r
4217
+ </mask>\r
4218
+ <g mask="url(#mask1_0_12744)">\r
4219
+ <ellipse\r
4220
+ cx="16"\r
4221
+ cy="17.5"\r
4222
+ rx="6"\r
4223
+ ry="7.5"\r
4224
+ fill="#505F79"\r
4225
+ fill-opacity="0.204983"\r
4226
+ />\r
4227
+ </g>\r
4228
+ </g>\r
4229
+ <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />\r
4230
+ <defs>\r
4231
+ <linearGradient\r
4232
+ id="paint0_linear_0_12744"\r
4233
+ x1="13.347"\r
4234
+ y1="46.279"\r
4235
+ x2="33.5318"\r
4236
+ y2="30.8088"\r
4237
+ gradientUnits="userSpaceOnUse"\r
4238
+ >\r
4239
+ <stop stop-color="#ABD229" />\r
4240
+ <stop offset="1" stop-color="#9CD03F" />\r
4241
+ </linearGradient>\r
4242
+ </defs>\r
4233
4243
  </svg>`;
4234
4244
  var complexIcons = {
4235
4245
  avatar: avatarGreen
@@ -6102,6 +6112,11 @@
6102
6112
  loading: {},
6103
6113
  tweakPreloader: {}
6104
6114
  };
6115
+ var renderIcon = function(icon) {
6116
+ return typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, {
6117
+ type: icon
6118
+ }) : icon;
6119
+ };
6105
6120
  function _array_like_to_array$k(arr, len) {
6106
6121
  if (len == null || len > arr.length)
6107
6122
  len = arr.length;
@@ -6467,9 +6482,7 @@
6467
6482
  iconType !== void 0 && /* @__PURE__ */ jsx("div", {
6468
6483
  className: clsx(classes.inputIcon, _define_property$B({}, classes.activeIcon, !isDisabled && onIconClick !== void 0)),
6469
6484
  onClick: !isDisabled ? onIconClick : void 0,
6470
- children: /* @__PURE__ */ jsx(Icon, {
6471
- type: iconType
6472
- })
6485
+ children: renderIcon(iconType)
6473
6486
  })
6474
6487
  ]
6475
6488
  })
@@ -6908,7 +6921,20 @@
6908
6921
  CONTAINER_PADDING,
6909
6922
  0
6910
6923
  ],
6911
- fontSize: 16
6924
+ fontSize: 16,
6925
+ overflow: "hidden"
6926
+ },
6927
+ withListHeader: {
6928
+ paddingTop: 0
6929
+ },
6930
+ listHeader: {
6931
+ "& + $list": {
6932
+ borderTop: [
6933
+ 1,
6934
+ "solid",
6935
+ colors.BORDER_LIGHT
6936
+ ]
6937
+ }
6912
6938
  },
6913
6939
  list: _object_spread$x({
6914
6940
  height: "100%",
@@ -6994,7 +7020,7 @@
6994
7020
  }
6995
7021
  var DEFAULT_OPTION_INDEX = -1;
6996
7022
  function SelectList(param) {
6997
- var options = param.options, focusedIndex = param.focusedIndex, activeValue = param.activeValue, defaultOptionLabel = param.defaultOptionLabel, _param_noMatchesLabel = param.noMatchesLabel, noMatchesLabel = _param_noMatchesLabel === void 0 ? "Совпадений не найдено" : _param_noMatchesLabel, isLoading = param.isLoading, _param_loadingLabel = param.loadingLabel, loadingLabel = _param_loadingLabel === void 0 ? "Загрузка..." : _param_loadingLabel, tweakStyles = param.tweakStyles, testId = param.testId, _param_shouldScrollToList = param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, isOptionDisabled = param.isOptionDisabled, onOptionClick = param.onOptionClick, convertValueToString = param.convertValueToString, convertValueToReactNode = param.convertValueToReactNode, _param_convertValueToId = param.convertValueToId, convertValueToId = _param_convertValueToId === void 0 ? convertValueToString : _param_convertValueToId;
7023
+ var options = param.options, focusedIndex = param.focusedIndex, activeValue = param.activeValue, defaultOptionLabel = param.defaultOptionLabel, _param_noMatchesLabel = param.noMatchesLabel, noMatchesLabel = _param_noMatchesLabel === void 0 ? "Совпадений не найдено" : _param_noMatchesLabel, isLoading = param.isLoading, _param_loadingLabel = param.loadingLabel, loadingLabel = _param_loadingLabel === void 0 ? "Загрузка..." : _param_loadingLabel, tweakStyles = param.tweakStyles, testId = param.testId, _param_shouldScrollToList = param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, customListHeader = param.customListHeader, isOptionDisabled = param.isOptionDisabled, onOptionClick = param.onOptionClick, convertValueToString = param.convertValueToString, convertValueToReactNode = param.convertValueToReactNode, _param_convertValueToId = param.convertValueToId, convertValueToId = _param_convertValueToId === void 0 ? convertValueToString : _param_convertValueToId;
6998
7024
  var classes = useTheme("SelectList", styles$v, tweakStyles).classes;
6999
7025
  var activeValueId = isNotEmpty(activeValue) ? convertValueToId(activeValue) : void 0;
7000
7026
  var isActiveOption = function(item) {
@@ -7018,58 +7044,64 @@
7018
7044
  convertFunction,
7019
7045
  optionsDisableMap
7020
7046
  ]);
7021
- return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, {
7047
+ return /* @__PURE__ */ jsxs(ScrollIntoViewIfNeeded, {
7022
7048
  active: shouldScrollToList,
7023
- className: classes.root,
7024
- children: /* @__PURE__ */ jsx("div", {
7025
- className: classes.list,
7026
- "data-testid": testId,
7027
- children: isLoading ? /* @__PURE__ */ jsx("div", {
7028
- className: clsx(classes.cell, classes.loading),
7029
- children: loadingLabel
7030
- }) : /* @__PURE__ */ jsxs(Fragment, {
7031
- children: [
7032
- defaultOptionLabel !== void 0 && /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, {
7033
- active: focusedIndex === DEFAULT_OPTION_INDEX,
7034
- options: {
7035
- block: "nearest"
7036
- },
7037
- className: clsx(classes.cell, classes.defaultCell, focusedIndex === DEFAULT_OPTION_INDEX && classes.focused),
7038
- onClick: function() {
7039
- return onOptionClick(DEFAULT_OPTION_INDEX);
7040
- },
7041
- children: defaultOptionLabel
7042
- }),
7043
- listOptions.map(function(opt, i) {
7044
- var optionValue = options[i];
7045
- var isFocused = i === focusedIndex;
7046
- var isActive = isActiveOption(optionValue);
7047
- var isDisabled = optionsDisableMap[i];
7048
- var _obj;
7049
- return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, _object_spread_props$q(_object_spread$w({
7050
- active: isFocused,
7049
+ className: clsx(classes.root, _define_property$x({}, classes.withListHeader, isNotEmpty(customListHeader))),
7050
+ children: [
7051
+ isNotEmpty(customListHeader) && /* @__PURE__ */ jsx("div", {
7052
+ className: classes.listHeader,
7053
+ children: customListHeader
7054
+ }),
7055
+ /* @__PURE__ */ jsx("div", {
7056
+ className: classes.list,
7057
+ "data-testid": testId,
7058
+ children: isLoading ? /* @__PURE__ */ jsx("div", {
7059
+ className: clsx(classes.cell, classes.loading),
7060
+ children: loadingLabel
7061
+ }) : /* @__PURE__ */ jsxs(Fragment, {
7062
+ children: [
7063
+ defaultOptionLabel !== void 0 && /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, {
7064
+ active: focusedIndex === DEFAULT_OPTION_INDEX,
7051
7065
  options: {
7052
7066
  block: "nearest"
7053
7067
  },
7054
- className: clsx(classes.cell, (_obj = {}, _define_property$x(_obj, classes.focused, isFocused), _define_property$x(_obj, classes.active, isActive), _define_property$x(_obj, classes.disabled, isDisabled), _obj))
7055
- }, addDataAttributes({
7056
- disabled: isDisabled,
7057
- active: isActive,
7058
- focused: isFocused
7059
- })), {
7060
- onClick: !isDisabled ? function() {
7061
- return onOptionClick(i);
7062
- } : void 0,
7063
- children: opt
7064
- }), i);
7065
- }),
7066
- listOptions.length === 0 && /* @__PURE__ */ jsx("div", {
7067
- className: clsx(classes.cell, classes.noMatchesLabel),
7068
- children: noMatchesLabel
7069
- })
7070
- ]
7068
+ className: clsx(classes.cell, classes.defaultCell, focusedIndex === DEFAULT_OPTION_INDEX && classes.focused),
7069
+ onClick: function(event) {
7070
+ return onOptionClick(DEFAULT_OPTION_INDEX, event);
7071
+ },
7072
+ children: defaultOptionLabel
7073
+ }),
7074
+ listOptions.map(function(opt, i) {
7075
+ var optionValue = options[i];
7076
+ var isFocused = i === focusedIndex;
7077
+ var isActive = isActiveOption(optionValue);
7078
+ var isDisabled = optionsDisableMap[i];
7079
+ var _obj;
7080
+ return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, _object_spread_props$q(_object_spread$w({
7081
+ active: isFocused,
7082
+ options: {
7083
+ block: "nearest"
7084
+ },
7085
+ className: clsx(classes.cell, (_obj = {}, _define_property$x(_obj, classes.focused, isFocused), _define_property$x(_obj, classes.active, isActive), _define_property$x(_obj, classes.disabled, isDisabled), _obj))
7086
+ }, addDataAttributes({
7087
+ disabled: isDisabled,
7088
+ active: isActive,
7089
+ focused: isFocused
7090
+ })), {
7091
+ onClick: !isDisabled ? function(event) {
7092
+ return onOptionClick(i, event);
7093
+ } : void 0,
7094
+ children: opt
7095
+ }), i);
7096
+ }),
7097
+ listOptions.length === 0 && /* @__PURE__ */ jsx("div", {
7098
+ className: clsx(classes.cell, classes.noMatchesLabel),
7099
+ children: noMatchesLabel
7100
+ })
7101
+ ]
7102
+ })
7071
7103
  })
7072
- })
7104
+ ]
7073
7105
  });
7074
7106
  }
7075
7107
  var _option_isDisabled;
@@ -7144,7 +7176,169 @@
7144
7176
  paddingRight: 32
7145
7177
  }
7146
7178
  },
7147
- tweakSelectList: {}
7179
+ tweakSelectList: {},
7180
+ tweakSearchInput: {
7181
+ tweakInput: {
7182
+ inputWrapper: {
7183
+ height: 48,
7184
+ borderRadius: 0,
7185
+ border: "none",
7186
+ backgroundColor: "transparent"
7187
+ }
7188
+ }
7189
+ }
7190
+ };
7191
+ var LEFT_PADDING = 44;
7192
+ var styles$t = {
7193
+ root: {
7194
+ position: "relative"
7195
+ },
7196
+ icon: {
7197
+ display: "flex",
7198
+ alignItems: "center",
7199
+ position: "absolute",
7200
+ left: 12,
7201
+ height: "100%",
7202
+ width: 20,
7203
+ zIndex: 2,
7204
+ color: colors.GREY_ACTIVE
7205
+ },
7206
+ tweakInput: {
7207
+ inputWrapper: {
7208
+ height: 35,
7209
+ borderColor: "transparent",
7210
+ backgroundColor: rgba(colors.BORDER_MAIN, 0.3),
7211
+ borderRadius: 18,
7212
+ paddingLeft: LEFT_PADDING,
7213
+ transitionProperty: "background-color, border-color"
7214
+ },
7215
+ focused: {
7216
+ backgroundColor: colors.CLASSIC_WHITE,
7217
+ borderColor: colors.BORDER_MAIN
7218
+ },
7219
+ input: {
7220
+ fontSize: 14,
7221
+ paddingLeft: 0
7222
+ },
7223
+ label: {
7224
+ left: LEFT_PADDING,
7225
+ fontSize: 14
7226
+ }
7227
+ }
7228
+ };
7229
+ function _define_property$w(obj, key, value) {
7230
+ if (key in obj) {
7231
+ Object.defineProperty(obj, key, {
7232
+ value,
7233
+ enumerable: true,
7234
+ configurable: true,
7235
+ writable: true
7236
+ });
7237
+ } else {
7238
+ obj[key] = value;
7239
+ }
7240
+ return obj;
7241
+ }
7242
+ function _object_spread$v(target) {
7243
+ for (var i = 1; i < arguments.length; i++) {
7244
+ var source = arguments[i] != null ? arguments[i] : {};
7245
+ var ownKeys2 = Object.keys(source);
7246
+ if (typeof Object.getOwnPropertySymbols === "function") {
7247
+ ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
7248
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
7249
+ }));
7250
+ }
7251
+ ownKeys2.forEach(function(key) {
7252
+ _define_property$w(target, key, source[key]);
7253
+ });
7254
+ }
7255
+ return target;
7256
+ }
7257
+ function ownKeys$p(object, enumerableOnly) {
7258
+ var keys = Object.keys(object);
7259
+ if (Object.getOwnPropertySymbols) {
7260
+ var symbols = Object.getOwnPropertySymbols(object);
7261
+ if (enumerableOnly) {
7262
+ symbols = symbols.filter(function(sym) {
7263
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
7264
+ });
7265
+ }
7266
+ keys.push.apply(keys, symbols);
7267
+ }
7268
+ return keys;
7269
+ }
7270
+ function _object_spread_props$p(target, source) {
7271
+ source = source != null ? source : {};
7272
+ if (Object.getOwnPropertyDescriptors) {
7273
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
7274
+ } else {
7275
+ ownKeys$p(Object(source)).forEach(function(key) {
7276
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
7277
+ });
7278
+ }
7279
+ return target;
7280
+ }
7281
+ function _object_without_properties$6(source, excluded) {
7282
+ if (source == null)
7283
+ return {};
7284
+ var target = _object_without_properties_loose$6(source, excluded);
7285
+ var key, i;
7286
+ if (Object.getOwnPropertySymbols) {
7287
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
7288
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
7289
+ key = sourceSymbolKeys[i];
7290
+ if (excluded.indexOf(key) >= 0)
7291
+ continue;
7292
+ if (!Object.prototype.propertyIsEnumerable.call(source, key))
7293
+ continue;
7294
+ target[key] = source[key];
7295
+ }
7296
+ }
7297
+ return target;
7298
+ }
7299
+ function _object_without_properties_loose$6(source, excluded) {
7300
+ if (source == null)
7301
+ return {};
7302
+ var target = {};
7303
+ var sourceKeys = Object.keys(source);
7304
+ var key, i;
7305
+ for (i = 0; i < sourceKeys.length; i++) {
7306
+ key = sourceKeys[i];
7307
+ if (excluded.indexOf(key) >= 0)
7308
+ continue;
7309
+ target[key] = source[key];
7310
+ }
7311
+ return target;
7312
+ }
7313
+ var SearchInput = function(_param) {
7314
+ var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, tweakStyles = _param.tweakStyles, testId = _param.testId, data = _param.data, props = _object_without_properties$6(_param, [
7315
+ "isClearable",
7316
+ "tweakStyles",
7317
+ "testId",
7318
+ "data"
7319
+ ]);
7320
+ var _useTheme = useTheme("SearchInput", styles$t, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
7321
+ var tweakInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakInput");
7322
+ return /* @__PURE__ */ jsxs("div", _object_spread_props$p(_object_spread$v({
7323
+ className: classes.root
7324
+ }, addDataTestId(testId), addDataAttributes(data)), {
7325
+ children: [
7326
+ /* @__PURE__ */ jsx("div", {
7327
+ className: classes.icon,
7328
+ children: /* @__PURE__ */ jsx(Icon, {
7329
+ type: "search"
7330
+ })
7331
+ }),
7332
+ /* @__PURE__ */ jsx(Input, _object_spread$v({
7333
+ isClearable,
7334
+ isActive: props.value !== "" && props.value !== void 0,
7335
+ testId: getTestId(testId, "input"),
7336
+ tweakStyles: tweakInputStyles,
7337
+ hasFloatingLabel: false,
7338
+ label: props.placeholder
7339
+ }, props))
7340
+ ]
7341
+ }));
7148
7342
  };
7149
7343
  function _array_like_to_array$j(arr, len) {
7150
7344
  if (len == null || len > arr.length)
@@ -7186,7 +7380,7 @@
7186
7380
  });
7187
7381
  };
7188
7382
  }
7189
- function _define_property$w(obj, key, value) {
7383
+ function _define_property$v(obj, key, value) {
7190
7384
  if (key in obj) {
7191
7385
  Object.defineProperty(obj, key, {
7192
7386
  value,
@@ -7230,7 +7424,7 @@
7230
7424
  function _non_iterable_rest$j() {
7231
7425
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7232
7426
  }
7233
- function _object_spread$v(target) {
7427
+ function _object_spread$u(target) {
7234
7428
  for (var i = 1; i < arguments.length; i++) {
7235
7429
  var source = arguments[i] != null ? arguments[i] : {};
7236
7430
  var ownKeys2 = Object.keys(source);
@@ -7240,12 +7434,12 @@
7240
7434
  }));
7241
7435
  }
7242
7436
  ownKeys2.forEach(function(key) {
7243
- _define_property$w(target, key, source[key]);
7437
+ _define_property$v(target, key, source[key]);
7244
7438
  });
7245
7439
  }
7246
7440
  return target;
7247
7441
  }
7248
- function ownKeys$p(object, enumerableOnly) {
7442
+ function ownKeys$o(object, enumerableOnly) {
7249
7443
  var keys = Object.keys(object);
7250
7444
  if (Object.getOwnPropertySymbols) {
7251
7445
  var symbols = Object.getOwnPropertySymbols(object);
@@ -7258,21 +7452,21 @@
7258
7452
  }
7259
7453
  return keys;
7260
7454
  }
7261
- function _object_spread_props$p(target, source) {
7455
+ function _object_spread_props$o(target, source) {
7262
7456
  source = source != null ? source : {};
7263
7457
  if (Object.getOwnPropertyDescriptors) {
7264
7458
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
7265
7459
  } else {
7266
- ownKeys$p(Object(source)).forEach(function(key) {
7460
+ ownKeys$o(Object(source)).forEach(function(key) {
7267
7461
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
7268
7462
  });
7269
7463
  }
7270
7464
  return target;
7271
7465
  }
7272
- function _object_without_properties$6(source, excluded) {
7466
+ function _object_without_properties$5(source, excluded) {
7273
7467
  if (source == null)
7274
7468
  return {};
7275
- var target = _object_without_properties_loose$6(source, excluded);
7469
+ var target = _object_without_properties_loose$5(source, excluded);
7276
7470
  var key, i;
7277
7471
  if (Object.getOwnPropertySymbols) {
7278
7472
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -7287,7 +7481,7 @@
7287
7481
  }
7288
7482
  return target;
7289
7483
  }
7290
- function _object_without_properties_loose$6(source, excluded) {
7484
+ function _object_without_properties_loose$5(source, excluded) {
7291
7485
  if (source == null)
7292
7486
  return {};
7293
7487
  var target = {};
@@ -7420,7 +7614,7 @@
7420
7614
  }
7421
7615
  };
7422
7616
  function Select(_param) {
7423
- var options = _param.options, value = _param.value, defaultOptionLabel = _param.defaultOptionLabel, _param_debounceTime = _param.debounceTime, debounceTime = _param_debounceTime === void 0 ? 400 : _param_debounceTime, _param_optionsMode = _param.optionsMode, optionsMode = _param_optionsMode === void 0 ? "normal" : _param_optionsMode, noMatchesLabel = _param.noMatchesLabel, loadingLabel = _param.loadingLabel, tweakStyles = _param.tweakStyles, testId = _param.testId, isDisabled = _param.isDisabled, dropdownOptions = _param.dropdownOptions, _param_minSymbolsCountToOpenList = _param.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _param_minSymbolsCountToOpenList === void 0 ? 0 : _param_minSymbolsCountToOpenList, _param_dropdownIcon = _param.dropdownIcon, dropdownIcon = _param_dropdownIcon === void 0 ? "chevron-down" : _param_dropdownIcon, _param_shouldScrollToList = _param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, onChange = _param.onChange, onFocus = _param.onFocus, onBlur = _param.onBlur, onType = _param.onType, onOpen = _param.onOpen, _param_isOptionDisabled = _param.isOptionDisabled, isOptionDisabled = _param_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _param_isOptionDisabled, _param_compareValuesOnChange = _param.compareValuesOnChange, compareValuesOnChange = _param_compareValuesOnChange === void 0 ? defaultCompareFunction : _param_compareValuesOnChange, _param_convertValueToString = _param.convertValueToString, convertValueToString = _param_convertValueToString === void 0 ? defaultConvertFunction$2 : _param_convertValueToString, convertValueToId = _param.convertValueToId, convertValueToReactNode = _param.convertValueToReactNode, optionsFilter = _param.optionsFilter, inputProps = _object_without_properties$6(_param, [
7617
+ var options = _param.options, value = _param.value, defaultOptionLabel = _param.defaultOptionLabel, _param_debounceTime = _param.debounceTime, debounceTime = _param_debounceTime === void 0 ? 400 : _param_debounceTime, _param_optionsMode = _param.optionsMode, optionsMode = _param_optionsMode === void 0 ? "normal" : _param_optionsMode, noMatchesLabel = _param.noMatchesLabel, loadingLabel = _param.loadingLabel, tweakStyles = _param.tweakStyles, testId = _param.testId, isDisabled = _param.isDisabled, dropdownOptions = _param.dropdownOptions, _param_minSymbolsCountToOpenList = _param.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _param_minSymbolsCountToOpenList === void 0 ? 0 : _param_minSymbolsCountToOpenList, _param_dropdownIcon = _param.dropdownIcon, dropdownIcon = _param_dropdownIcon === void 0 ? "chevron-down" : _param_dropdownIcon, _param_shouldScrollToList = _param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, searchInput = _param.searchInput, onChange = _param.onChange, onFocus = _param.onFocus, onBlur = _param.onBlur, onType = _param.onType, onOpen = _param.onOpen, _param_isOptionDisabled = _param.isOptionDisabled, isOptionDisabled = _param_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _param_isOptionDisabled, _param_compareValuesOnChange = _param.compareValuesOnChange, compareValuesOnChange = _param_compareValuesOnChange === void 0 ? defaultCompareFunction : _param_compareValuesOnChange, _param_convertValueToString = _param.convertValueToString, convertValueToString = _param_convertValueToString === void 0 ? defaultConvertFunction$2 : _param_convertValueToString, convertValueToId = _param.convertValueToId, convertValueToReactNode = _param.convertValueToReactNode, optionsFilter = _param.optionsFilter, inputProps = _object_without_properties$5(_param, [
7424
7618
  "options",
7425
7619
  "value",
7426
7620
  "defaultOptionLabel",
@@ -7435,6 +7629,7 @@
7435
7629
  "minSymbolsCountToOpenList",
7436
7630
  "dropdownIcon",
7437
7631
  "shouldScrollToList",
7632
+ "searchInput",
7438
7633
  "onChange",
7439
7634
  "onFocus",
7440
7635
  "onBlur",
@@ -7458,6 +7653,8 @@
7458
7653
  var inputWrapper = React.useRef(null);
7459
7654
  var list = React.useRef(null);
7460
7655
  var input = React.useRef(null);
7656
+ var shouldRenderSearchInputInList = (searchInput === null || searchInput === void 0 ? void 0 : searchInput.shouldRenderInList) === true;
7657
+ var hasSearchInputInList = optionsMode !== "normal" && shouldRenderSearchInputInList;
7461
7658
  var stringValue = isNotEmpty(value) ? convertValueToString(value) : void 0;
7462
7659
  var filteredOptions = React.useMemo(function() {
7463
7660
  if (optionsMode !== "search") {
@@ -7485,43 +7682,32 @@
7485
7682
  value,
7486
7683
  convertValueToString
7487
7684
  ]);
7488
- var handleListClose = function() {
7685
+ var handleListClose = function(event) {
7489
7686
  setIsListOpen(false);
7490
7687
  setSearchValue("");
7491
7688
  setShouldShowDefaultOption(true);
7689
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
7492
7690
  };
7493
7691
  var handleListOpen = function() {
7494
- var _ref2 = _async_to_generator$4(function() {
7495
- return __generator$4(this, function(_state) {
7496
- if (isListOpen) {
7497
- return [
7498
- 2
7499
- ];
7500
- }
7501
- setIsListOpen(true);
7502
- return [
7503
- 2
7504
- ];
7505
- });
7506
- });
7507
- return function handleListOpen2() {
7508
- return _ref2.apply(this, arguments);
7509
- };
7510
- }();
7511
- var handleFocus = function(event) {
7512
- if (onFocus !== void 0) {
7513
- onFocus(event);
7692
+ if (!isListOpen) {
7693
+ setIsListOpen(true);
7514
7694
  }
7695
+ };
7696
+ var handleFocus = function(event) {
7697
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
7515
7698
  handleListOpen();
7516
7699
  };
7517
7700
  var handleOnClick = function() {
7518
7701
  handleListOpen();
7519
7702
  };
7520
7703
  var handleBlur = function(event) {
7521
- if (onBlur !== void 0) {
7522
- onBlur(event);
7704
+ if (!isNotEmpty(event.relatedTarget) || !isNotEmpty(list.current)) {
7705
+ return;
7706
+ }
7707
+ var isActionInsideList = hasExactParent(event.relatedTarget, list.current);
7708
+ if (!isActionInsideList) {
7709
+ handleListClose(event);
7523
7710
  }
7524
- handleListClose();
7525
7711
  };
7526
7712
  var handleOnChange = React.useCallback(function(newValue) {
7527
7713
  var areValuesEqual = compareValuesOnChange(value, newValue);
@@ -7533,10 +7719,10 @@
7533
7719
  value,
7534
7720
  onChange
7535
7721
  ]);
7536
- var handleOptionClick = React.useCallback(function(index) {
7722
+ var handleOptionSelect = React.useCallback(function(index, event) {
7537
7723
  var _input_current;
7538
7724
  handleOnChange(index === -1 ? void 0 : filteredOptions[index]);
7539
- handleListClose();
7725
+ handleListClose(event);
7540
7726
  (_input_current = input.current) === null || _input_current === void 0 ? void 0 : _input_current.blur();
7541
7727
  }, [
7542
7728
  handleOnChange,
@@ -7591,7 +7777,7 @@
7591
7777
  if (optionsMode !== "dynamic") {
7592
7778
  setShouldShowDefaultOption(v === "");
7593
7779
  }
7594
- if (v === "") {
7780
+ if (v === "" && !hasSearchInputInList) {
7595
7781
  handleOnChange(void 0);
7596
7782
  }
7597
7783
  setSearchValue(v);
@@ -7608,7 +7794,7 @@
7608
7794
  if (indexToClick === -1 && filteredOptions.length === 1) {
7609
7795
  indexToClick = 0;
7610
7796
  }
7611
- handleOptionClick(indexToClick);
7797
+ handleOptionSelect(indexToClick, event);
7612
7798
  break;
7613
7799
  }
7614
7800
  case "ArrowDown": {
@@ -7655,14 +7841,23 @@
7655
7841
  (_input_current1 = input.current) === null || _input_current1 === void 0 ? void 0 : _input_current1.focus();
7656
7842
  }
7657
7843
  };
7658
- useOnClickOutsideWithRef(list, function() {
7659
- handleListClose();
7660
- }, inputWrapper);
7661
- var isOpen = isListOpen && (inputProps.isLoading || filteredOptions.length > 0 || defaultOptionLabel !== void 0 && searchValue === "" || noMatchesLabel !== void 0) && searchValue.trim().length >= minSymbolsCountToOpenList;
7844
+ useOnClickOutsideWithRef(list, handleListClose, inputWrapper);
7845
+ var hasEnoughSymbolsToSearch = searchValue.trim().length >= minSymbolsCountToOpenList;
7846
+ var isOpen = (
7847
+ // Пользователь пытается открыть лист
7848
+ isListOpen && // Нам есть что показать:
7849
+ // Есть опции
7850
+ (filteredOptions.length > 0 || // Дефолтная опция
7851
+ defaultOptionLabel !== void 0 && !hasEnoughSymbolsToSearch || // Текст "Загрузка..."
7852
+ inputProps.isLoading || // Текст "Совпадений не найдено"
7853
+ noMatchesLabel !== void 0 || // У нас есть инпут с поиском внутри листа
7854
+ hasSearchInputInList) && // Последняя проверка на случай, если мы че то ищем в опциях
7855
+ (optionsMode === "normal" || hasEnoughSymbolsToSearch)
7856
+ );
7662
7857
  var _inputProps_isReadonly = inputProps.isReadonly, isReadonly = _inputProps_isReadonly === void 0 ? true : _inputProps_isReadonly;
7663
- var shouldUsePointerCursor = optionsMode === "normal" && isReadonly;
7858
+ var shouldUsePointerCursor = (optionsMode === "normal" || shouldRenderSearchInputInList) && isReadonly;
7664
7859
  var tweakInputStyles = React.useMemo(function() {
7665
- return lodash.merge({}, componentStyles.tweakInput, _object_spread$v({}, shouldUsePointerCursor ? {
7860
+ return lodash.merge({}, componentStyles.tweakInput, _object_spread$u({}, shouldUsePointerCursor ? {
7666
7861
  input: {
7667
7862
  cursor: "pointer"
7668
7863
  }
@@ -7671,6 +7866,7 @@
7671
7866
  tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakInput,
7672
7867
  shouldUsePointerCursor
7673
7868
  ]);
7869
+ var tweakSearchInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakSearchInput");
7674
7870
  var _ref = dropdownOptions !== null && dropdownOptions !== void 0 ? dropdownOptions : {}, _ref_shouldUsePopper = _ref.shouldUsePopper, shouldUsePopper = _ref_shouldUsePopper === void 0 ? false : _ref_shouldUsePopper, _ref_shouldRenderInBody = _ref.shouldRenderInBody, shouldRenderInBody = _ref_shouldRenderInBody === void 0 ? false : _ref_shouldRenderInBody, _ref_shouldHideOnScroll = _ref.shouldHideOnScroll, shouldHideOnScroll = _ref_shouldHideOnScroll === void 0 ? false : _ref_shouldHideOnScroll;
7675
7871
  var popperData = useDropdown({
7676
7872
  isOpen,
@@ -7692,30 +7888,34 @@
7692
7888
  onOpen
7693
7889
  ]);
7694
7890
  var _obj;
7695
- var listEl = /* @__PURE__ */ jsx("div", _object_spread_props$p(_object_spread$v({
7696
- className: clsx(classes.listWrapper, (_obj = {}, _define_property$w(_obj, classes.withoutPopper, !shouldUsePopper), _define_property$w(_obj, classes.listWrapperInBody, shouldRenderInBody), _obj)),
7891
+ var listEl = /* @__PURE__ */ jsx("div", _object_spread_props$o(_object_spread$u({
7892
+ className: clsx(classes.listWrapper, (_obj = {}, _define_property$v(_obj, classes.withoutPopper, !shouldUsePopper), _define_property$v(_obj, classes.listWrapperInBody, shouldRenderInBody), _obj)),
7697
7893
  ref: list,
7698
- onMouseDown: function(event) {
7699
- return event.preventDefault();
7700
- },
7701
- style: popperData === null || popperData === void 0 ? void 0 : popperData.styles.popper
7894
+ style: popperData === null || popperData === void 0 ? void 0 : popperData.styles.popper,
7895
+ onBlur: handleBlur
7702
7896
  }, popperData === null || popperData === void 0 ? void 0 : popperData.attributes.popper), {
7703
7897
  children: isOpen && /* @__PURE__ */ jsx(SelectList, {
7704
7898
  options: filteredOptions,
7705
7899
  defaultOptionLabel: hasDefaultOption && shouldShowDefaultOption ? defaultOptionLabel : void 0,
7900
+ customListHeader: hasSearchInputInList ? /* @__PURE__ */ jsx(SearchInput, _object_spread$u({
7901
+ value: searchValue,
7902
+ onChange: handleInputChange,
7903
+ tweakStyles: tweakSearchInputStyles,
7904
+ placeholder: "Поиск"
7905
+ }, searchInput)) : void 0,
7706
7906
  noMatchesLabel,
7707
7907
  focusedIndex: focusedListCellIndex,
7708
7908
  activeValue: value,
7709
7909
  isLoading: inputProps.isLoading,
7710
7910
  loadingLabel,
7711
7911
  tweakStyles: tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakSelectList,
7712
- testId: testId !== void 0 ? "".concat(testId, "-list") : void 0,
7912
+ testId: getTestId(testId, "list"),
7713
7913
  shouldScrollToList: shouldScrollToList && !shouldUsePopper && !shouldHideOnScroll,
7714
7914
  isOptionDisabled,
7715
7915
  convertValueToString,
7716
7916
  convertValueToReactNode,
7717
7917
  convertValueToId,
7718
- onOptionClick: handleOptionClick
7918
+ onOptionClick: handleOptionSelect
7719
7919
  })
7720
7920
  }));
7721
7921
  return /* @__PURE__ */ jsxs("div", {
@@ -7727,11 +7927,11 @@
7727
7927
  onClick: isDisabled ? void 0 : handleOnClick,
7728
7928
  ref: inputWrapper,
7729
7929
  children: [
7730
- /* @__PURE__ */ jsx(Input, _object_spread$v({
7731
- value: searchValue !== "" ? searchValue : stringValue,
7930
+ /* @__PURE__ */ jsx(Input, _object_spread$u({
7931
+ value: searchValue !== "" && !shouldRenderSearchInputInList ? searchValue : stringValue,
7732
7932
  onChange: handleInputChange,
7733
7933
  isActive: isListOpen,
7734
- isReadonly: optionsMode === "normal",
7934
+ isReadonly: optionsMode === "normal" || shouldRenderSearchInputInList,
7735
7935
  onFocus: handleFocus,
7736
7936
  onBlur: handleBlur,
7737
7937
  isDisabled,
@@ -7765,7 +7965,7 @@
7765
7965
  }
7766
7966
  var SELECT_PADDING_LEFT = 12;
7767
7967
  var SELECT_PADDING_RIGHT = 24;
7768
- var styles$t = {
7968
+ var styles$s = {
7769
7969
  btn: {
7770
7970
  width: 36,
7771
7971
  height: 36,
@@ -7834,7 +8034,7 @@
7834
8034
  };
7835
8035
  var DatePickerHeader = function(param) {
7836
8036
  var date = param.date, changeYear = param.changeYear, changeMonth = param.changeMonth, decreaseMonth = param.decreaseMonth, increaseMonth = param.increaseMonth, isPrevMonthButtonDisabled = param.isPrevMonthButtonDisabled, isNextMonthButtonDisabled = param.isNextMonthButtonDisabled, months = param.months;
7837
- var _useTheme = useTheme("DatePickerHeader", styles$t), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
8037
+ var _useTheme = useTheme("DatePickerHeader", styles$s), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
7838
8038
  var years = React.useMemo(function() {
7839
8039
  return Array.from(Array(41)).map(function(_, i) {
7840
8040
  return dateFns.getYear(new Date()) - 30 + i;
@@ -7918,7 +8118,7 @@
7918
8118
  ]
7919
8119
  });
7920
8120
  };
7921
- var styles$s = {
8121
+ var styles$r = {
7922
8122
  root: {
7923
8123
  width: "100%",
7924
8124
  height: "100%"
@@ -7980,7 +8180,7 @@
7980
8180
  if (Array.isArray(arr))
7981
8181
  return arr;
7982
8182
  }
7983
- function _define_property$v(obj, key, value) {
8183
+ function _define_property$u(obj, key, value) {
7984
8184
  if (key in obj) {
7985
8185
  Object.defineProperty(obj, key, {
7986
8186
  value,
@@ -8024,7 +8224,7 @@
8024
8224
  function _non_iterable_rest$i() {
8025
8225
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8026
8226
  }
8027
- function _object_spread$u(target) {
8227
+ function _object_spread$t(target) {
8028
8228
  for (var i = 1; i < arguments.length; i++) {
8029
8229
  var source = arguments[i] != null ? arguments[i] : {};
8030
8230
  var ownKeys2 = Object.keys(source);
@@ -8034,12 +8234,12 @@
8034
8234
  }));
8035
8235
  }
8036
8236
  ownKeys2.forEach(function(key) {
8037
- _define_property$v(target, key, source[key]);
8237
+ _define_property$u(target, key, source[key]);
8038
8238
  });
8039
8239
  }
8040
8240
  return target;
8041
8241
  }
8042
- function ownKeys$o(object, enumerableOnly) {
8242
+ function ownKeys$n(object, enumerableOnly) {
8043
8243
  var keys = Object.keys(object);
8044
8244
  if (Object.getOwnPropertySymbols) {
8045
8245
  var symbols = Object.getOwnPropertySymbols(object);
@@ -8052,21 +8252,21 @@
8052
8252
  }
8053
8253
  return keys;
8054
8254
  }
8055
- function _object_spread_props$o(target, source) {
8255
+ function _object_spread_props$n(target, source) {
8056
8256
  source = source != null ? source : {};
8057
8257
  if (Object.getOwnPropertyDescriptors) {
8058
8258
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8059
8259
  } else {
8060
- ownKeys$o(Object(source)).forEach(function(key) {
8260
+ ownKeys$n(Object(source)).forEach(function(key) {
8061
8261
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8062
8262
  });
8063
8263
  }
8064
8264
  return target;
8065
8265
  }
8066
- function _object_without_properties$5(source, excluded) {
8266
+ function _object_without_properties$4(source, excluded) {
8067
8267
  if (source == null)
8068
8268
  return {};
8069
- var target = _object_without_properties_loose$5(source, excluded);
8269
+ var target = _object_without_properties_loose$4(source, excluded);
8070
8270
  var key, i;
8071
8271
  if (Object.getOwnPropertySymbols) {
8072
8272
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -8081,7 +8281,7 @@
8081
8281
  }
8082
8282
  return target;
8083
8283
  }
8084
- function _object_without_properties_loose$5(source, excluded) {
8284
+ function _object_without_properties_loose$4(source, excluded) {
8085
8285
  if (source == null)
8086
8286
  return {};
8087
8287
  var target = {};
@@ -8122,7 +8322,7 @@
8122
8322
  };
8123
8323
  var DEFAULT_DATE_FORMAT$2 = "dd.MM.yyyy";
8124
8324
  var DatePicker = function(_param) {
8125
- var data = _param.data, tweakStyles = _param.tweakStyles, selectedDate = _param.selectedDate, minDate = _param.minDate, maxDate = _param.maxDate, endDate = _param.endDate, startDate = _param.startDate, size = _param.size, isRange = _param.isRange, locale2 = _param.locale, months = _param.months, _param_calendarStartDay = _param.calendarStartDay, calendarStartDay = _param_calendarStartDay === void 0 ? 1 : _param_calendarStartDay, _param_leftPosition = _param.leftPosition, leftPosition = _param_leftPosition === void 0 ? 0 : _param_leftPosition, _param_topPosition = _param.topPosition, topPosition = _param_topPosition === void 0 ? 0 : _param_topPosition, isInline = _param.isInline, isNeedClearSelectedDate = _param.isNeedClearSelectedDate, _param_dateFormat = _param.dateFormat, dateFormat = _param_dateFormat === void 0 ? DEFAULT_DATE_FORMAT$2 : _param_dateFormat, monthsShown = _param.monthsShown, _param_placeholder = _param.placeholder, placeholder = _param_placeholder === void 0 ? "__.__.____" : _param_placeholder, shouldGiveValueOnType = _param.shouldGiveValueOnType, disabledKeyboardNavigation = _param.disabledKeyboardNavigation, shouldRenderPopperInBody = _param.shouldRenderPopperInBody, popperModifiers = _param.popperModifiers, showPreviousMonths = _param.showPreviousMonths, popperPlacement = _param.popperPlacement, onChangeDate = _param.onChangeDate, onChangeRange = _param.onChangeRange, customHeader = _param.customHeader, filterDate = _param.filterDate, inputProps = _object_without_properties$5(_param, [
8325
+ var data = _param.data, tweakStyles = _param.tweakStyles, selectedDate = _param.selectedDate, minDate = _param.minDate, maxDate = _param.maxDate, endDate = _param.endDate, startDate = _param.startDate, size = _param.size, isRange = _param.isRange, locale2 = _param.locale, months = _param.months, _param_calendarStartDay = _param.calendarStartDay, calendarStartDay = _param_calendarStartDay === void 0 ? 1 : _param_calendarStartDay, _param_leftPosition = _param.leftPosition, leftPosition = _param_leftPosition === void 0 ? 0 : _param_leftPosition, _param_topPosition = _param.topPosition, topPosition = _param_topPosition === void 0 ? 0 : _param_topPosition, isInline = _param.isInline, isNeedClearSelectedDate = _param.isNeedClearSelectedDate, _param_dateFormat = _param.dateFormat, dateFormat = _param_dateFormat === void 0 ? DEFAULT_DATE_FORMAT$2 : _param_dateFormat, monthsShown = _param.monthsShown, _param_placeholder = _param.placeholder, placeholder = _param_placeholder === void 0 ? "__.__.____" : _param_placeholder, shouldGiveValueOnType = _param.shouldGiveValueOnType, disabledKeyboardNavigation = _param.disabledKeyboardNavigation, shouldRenderPopperInBody = _param.shouldRenderPopperInBody, popperModifiers = _param.popperModifiers, showPreviousMonths = _param.showPreviousMonths, popperPlacement = _param.popperPlacement, onChangeDate = _param.onChangeDate, onChangeRange = _param.onChangeRange, customHeader = _param.customHeader, filterDate = _param.filterDate, inputProps = _object_without_properties$4(_param, [
8126
8326
  "data",
8127
8327
  "tweakStyles",
8128
8328
  "selectedDate",
@@ -8153,7 +8353,7 @@
8153
8353
  "customHeader",
8154
8354
  "filterDate"
8155
8355
  ]);
8156
- var classes = useTheme("DatePicker", styles$s, tweakStyles, {
8356
+ var classes = useTheme("DatePicker", styles$r, tweakStyles, {
8157
8357
  leftPosition,
8158
8358
  topPosition
8159
8359
  }).classes;
@@ -8302,7 +8502,7 @@
8302
8502
  },
8303
8503
  filterDate
8304
8504
  };
8305
- var dateInputProps = _object_spread_props$o(_object_spread$u({}, inputProps), {
8505
+ var dateInputProps = _object_spread_props$n(_object_spread$t({}, inputProps), {
8306
8506
  tweakStyles,
8307
8507
  iconType: inputProps.isClearable && dateValue !== "" ? void 0 : "calendar",
8308
8508
  isRange,
@@ -8311,14 +8511,14 @@
8311
8511
  }
8312
8512
  });
8313
8513
  if (onChangeRange) {
8314
- datePickerProps = _object_spread_props$o(_object_spread$u({}, datePickerProps), {
8514
+ datePickerProps = _object_spread_props$n(_object_spread$t({}, datePickerProps), {
8315
8515
  startDate: start2,
8316
8516
  endDate: end2,
8317
8517
  selectsRange: true,
8318
8518
  selected: startDate,
8319
8519
  onChange: onChangeRange
8320
8520
  });
8321
- dateInputProps = _object_spread_props$o(_object_spread$u({}, dateInputProps), {
8521
+ dateInputProps = _object_spread_props$n(_object_spread$t({}, dateInputProps), {
8322
8522
  startDate: startDateValue,
8323
8523
  endDate: endDateValue,
8324
8524
  onBlur: handleRangeBlur,
@@ -8326,7 +8526,7 @@
8326
8526
  });
8327
8527
  }
8328
8528
  if (onChangeDate) {
8329
- datePickerProps = _object_spread_props$o(_object_spread$u({}, datePickerProps), {
8529
+ datePickerProps = _object_spread_props$n(_object_spread$t({}, datePickerProps), {
8330
8530
  selected: date,
8331
8531
  onChange: function(newDate) {
8332
8532
  return onChangeDate(newDate);
@@ -8340,20 +8540,20 @@
8340
8540
  minDate,
8341
8541
  maxDate
8342
8542
  });
8343
- dateInputProps = _object_spread_props$o(_object_spread$u({}, dateInputProps), {
8543
+ dateInputProps = _object_spread_props$n(_object_spread$t({}, dateInputProps), {
8344
8544
  date: dateValue,
8345
8545
  isActive: isOpen,
8346
8546
  onBlur: handleBlur,
8347
8547
  onChange: handleDateChange
8348
8548
  });
8349
8549
  }
8350
- return /* @__PURE__ */ jsx("div", _object_spread_props$o(_object_spread$u({
8550
+ return /* @__PURE__ */ jsx("div", _object_spread_props$n(_object_spread$t({
8351
8551
  className: classes.root
8352
8552
  }, addDataAttributes(data)), {
8353
- children: /* @__PURE__ */ jsx(Datepicker, _object_spread_props$o(_object_spread$u({}, datePickerProps), {
8553
+ children: /* @__PURE__ */ jsx(Datepicker, _object_spread_props$n(_object_spread$t({}, datePickerProps), {
8354
8554
  customInput: /* @__PURE__ */ jsx(DatePickerInput, {
8355
8555
  size,
8356
- children: /* @__PURE__ */ jsx(DateInput, _object_spread$u({}, dateInputProps))
8556
+ children: /* @__PURE__ */ jsx(DateInput, _object_spread$t({}, dateInputProps))
8357
8557
  }),
8358
8558
  renderCustomHeader: customHeader !== void 0 ? customHeader : function(param) {
8359
8559
  var renderDate = param.date, changeYear = param.changeYear, changeMonth = param.changeMonth, decreaseMonth = param.decreaseMonth, increaseMonth = param.increaseMonth, prevMonthButtonDisabled = param.prevMonthButtonDisabled, nextMonthButtonDisabled = param.nextMonthButtonDisabled;
@@ -8371,7 +8571,7 @@
8371
8571
  }))
8372
8572
  }));
8373
8573
  };
8374
- var styles$r = {
8574
+ var styles$q = {
8375
8575
  root: {},
8376
8576
  button: {
8377
8577
  cursor: "pointer",
@@ -8412,7 +8612,7 @@
8412
8612
  if (Array.isArray(arr))
8413
8613
  return arr;
8414
8614
  }
8415
- function _define_property$u(obj, key, value) {
8615
+ function _define_property$t(obj, key, value) {
8416
8616
  if (key in obj) {
8417
8617
  Object.defineProperty(obj, key, {
8418
8618
  value,
@@ -8456,7 +8656,7 @@
8456
8656
  function _non_iterable_rest$h() {
8457
8657
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8458
8658
  }
8459
- function _object_spread$t(target) {
8659
+ function _object_spread$s(target) {
8460
8660
  for (var i = 1; i < arguments.length; i++) {
8461
8661
  var source = arguments[i] != null ? arguments[i] : {};
8462
8662
  var ownKeys2 = Object.keys(source);
@@ -8466,12 +8666,12 @@
8466
8666
  }));
8467
8667
  }
8468
8668
  ownKeys2.forEach(function(key) {
8469
- _define_property$u(target, key, source[key]);
8669
+ _define_property$t(target, key, source[key]);
8470
8670
  });
8471
8671
  }
8472
8672
  return target;
8473
8673
  }
8474
- function ownKeys$n(object, enumerableOnly) {
8674
+ function ownKeys$m(object, enumerableOnly) {
8475
8675
  var keys = Object.keys(object);
8476
8676
  if (Object.getOwnPropertySymbols) {
8477
8677
  var symbols = Object.getOwnPropertySymbols(object);
@@ -8484,12 +8684,12 @@
8484
8684
  }
8485
8685
  return keys;
8486
8686
  }
8487
- function _object_spread_props$n(target, source) {
8687
+ function _object_spread_props$m(target, source) {
8488
8688
  source = source != null ? source : {};
8489
8689
  if (Object.getOwnPropertyDescriptors) {
8490
8690
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8491
8691
  } else {
8492
- ownKeys$n(Object(source)).forEach(function(key) {
8692
+ ownKeys$m(Object(source)).forEach(function(key) {
8493
8693
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8494
8694
  });
8495
8695
  }
@@ -8514,14 +8714,14 @@
8514
8714
  var LINK_REGEXP = /(http(s?):\/\/(.*))(\s?)/;
8515
8715
  var Description = function(param) {
8516
8716
  var text = param.text, moreTitle = param.moreTitle, lessTitle = param.lessTitle, _param_truncateIndex = param.truncateIndex, truncateIndex = _param_truncateIndex === void 0 ? 150 : _param_truncateIndex, _param_isAlwaysOpen = param.isAlwaysOpen, isAlwaysOpen = _param_isAlwaysOpen === void 0 ? true : _param_isAlwaysOpen, data = param.data, tweakStyles = param.tweakStyles;
8517
- var classes = useTheme("Description", styles$r, tweakStyles).classes;
8717
+ var classes = useTheme("Description", styles$q, tweakStyles).classes;
8518
8718
  var isTooShort = text.length < truncateIndex;
8519
8719
  var _useState = _sliced_to_array$h(React.useState(isAlwaysOpen), 2), isOpen = _useState[0], setIsOpen = _useState[1];
8520
8720
  var link = text.match(LINK_REGEXP);
8521
8721
  var linkText = link && link[0];
8522
8722
  var textWithNoLink = text.replace(LINK_REGEXP, "");
8523
8723
  var shortText = text.slice(0, text.slice(0, truncateIndex).lastIndexOf(" "));
8524
- return /* @__PURE__ */ jsxs("div", _object_spread_props$n(_object_spread$t({
8724
+ return /* @__PURE__ */ jsxs("div", _object_spread_props$m(_object_spread$s({
8525
8725
  className: classes.root
8526
8726
  }, addDataAttributes(data)), {
8527
8727
  children: [
@@ -8556,158 +8756,6 @@
8556
8756
  ]
8557
8757
  }));
8558
8758
  };
8559
- var LEFT_PADDING = 44;
8560
- var styles$q = {
8561
- root: {
8562
- position: "relative"
8563
- },
8564
- icon: {
8565
- display: "flex",
8566
- alignItems: "center",
8567
- position: "absolute",
8568
- left: 12,
8569
- height: "100%",
8570
- width: 20,
8571
- zIndex: 2,
8572
- color: colors.GREY_ACTIVE
8573
- },
8574
- tweakInput: {
8575
- inputWrapper: {
8576
- height: 35,
8577
- borderColor: "transparent",
8578
- backgroundColor: rgba(colors.BORDER_MAIN, 0.3),
8579
- borderRadius: 18,
8580
- paddingLeft: LEFT_PADDING,
8581
- transitionProperty: "background-color, border-color"
8582
- },
8583
- focused: {
8584
- backgroundColor: colors.CLASSIC_WHITE,
8585
- borderColor: colors.BORDER_MAIN
8586
- },
8587
- input: {
8588
- fontSize: 14,
8589
- paddingLeft: 0
8590
- },
8591
- label: {
8592
- left: LEFT_PADDING,
8593
- fontSize: 14
8594
- }
8595
- }
8596
- };
8597
- function _define_property$t(obj, key, value) {
8598
- if (key in obj) {
8599
- Object.defineProperty(obj, key, {
8600
- value,
8601
- enumerable: true,
8602
- configurable: true,
8603
- writable: true
8604
- });
8605
- } else {
8606
- obj[key] = value;
8607
- }
8608
- return obj;
8609
- }
8610
- function _object_spread$s(target) {
8611
- for (var i = 1; i < arguments.length; i++) {
8612
- var source = arguments[i] != null ? arguments[i] : {};
8613
- var ownKeys2 = Object.keys(source);
8614
- if (typeof Object.getOwnPropertySymbols === "function") {
8615
- ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
8616
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
8617
- }));
8618
- }
8619
- ownKeys2.forEach(function(key) {
8620
- _define_property$t(target, key, source[key]);
8621
- });
8622
- }
8623
- return target;
8624
- }
8625
- function ownKeys$m(object, enumerableOnly) {
8626
- var keys = Object.keys(object);
8627
- if (Object.getOwnPropertySymbols) {
8628
- var symbols = Object.getOwnPropertySymbols(object);
8629
- if (enumerableOnly) {
8630
- symbols = symbols.filter(function(sym) {
8631
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
8632
- });
8633
- }
8634
- keys.push.apply(keys, symbols);
8635
- }
8636
- return keys;
8637
- }
8638
- function _object_spread_props$m(target, source) {
8639
- source = source != null ? source : {};
8640
- if (Object.getOwnPropertyDescriptors) {
8641
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8642
- } else {
8643
- ownKeys$m(Object(source)).forEach(function(key) {
8644
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8645
- });
8646
- }
8647
- return target;
8648
- }
8649
- function _object_without_properties$4(source, excluded) {
8650
- if (source == null)
8651
- return {};
8652
- var target = _object_without_properties_loose$4(source, excluded);
8653
- var key, i;
8654
- if (Object.getOwnPropertySymbols) {
8655
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
8656
- for (i = 0; i < sourceSymbolKeys.length; i++) {
8657
- key = sourceSymbolKeys[i];
8658
- if (excluded.indexOf(key) >= 0)
8659
- continue;
8660
- if (!Object.prototype.propertyIsEnumerable.call(source, key))
8661
- continue;
8662
- target[key] = source[key];
8663
- }
8664
- }
8665
- return target;
8666
- }
8667
- function _object_without_properties_loose$4(source, excluded) {
8668
- if (source == null)
8669
- return {};
8670
- var target = {};
8671
- var sourceKeys = Object.keys(source);
8672
- var key, i;
8673
- for (i = 0; i < sourceKeys.length; i++) {
8674
- key = sourceKeys[i];
8675
- if (excluded.indexOf(key) >= 0)
8676
- continue;
8677
- target[key] = source[key];
8678
- }
8679
- return target;
8680
- }
8681
- var SearchInput = function(_param) {
8682
- var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, tweakStyles = _param.tweakStyles, testId = _param.testId, data = _param.data, props = _object_without_properties$4(_param, [
8683
- "isClearable",
8684
- "tweakStyles",
8685
- "testId",
8686
- "data"
8687
- ]);
8688
- var _useTheme = useTheme("SearchInput", styles$q, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
8689
- var tweakInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakInput");
8690
- return /* @__PURE__ */ jsxs("div", _object_spread_props$m(_object_spread$s({
8691
- className: classes.root
8692
- }, addDataTestId(testId), addDataAttributes(data)), {
8693
- children: [
8694
- /* @__PURE__ */ jsx("div", {
8695
- className: classes.icon,
8696
- children: /* @__PURE__ */ jsx(Icon, {
8697
- type: "search"
8698
- })
8699
- }),
8700
- /* @__PURE__ */ jsx(Input, _object_spread$s({
8701
- isClearable,
8702
- isActive: props.value !== "" && props.value !== void 0,
8703
- testId: getTestId(testId, "input"),
8704
- tweakStyles: tweakInputStyles,
8705
- hasFloatingLabel: false,
8706
- label: props.placeholder
8707
- }, props))
8708
- ]
8709
- }));
8710
- };
8711
8759
  var SelectLocales = {
8712
8760
  ru: {
8713
8761
  clear: "Очистить",
@@ -20364,7 +20412,9 @@
20364
20412
  },
20365
20413
  onMouseLeave: handleMouseLeave,
20366
20414
  onClick: handleRowClick
20367
- }, addDataAttributes(rowData)), {
20415
+ }, addDataAttributes(_object_spread_props$d(_object_spread$f({}, rowData), {
20416
+ isExpandableComponentActive: nestedComponent.isOpen ? true : void 0
20417
+ }))), {
20368
20418
  children: items.map(function(key, idx) {
20369
20419
  return /* @__PURE__ */ jsx(TableValue, {
20370
20420
  columnName: key,
@@ -27071,6 +27121,7 @@
27071
27121
  exports2.getScrollParent = getScrollParent$1;
27072
27122
  exports2.getStyleComputedProperty = getStyleComputedProperty;
27073
27123
  exports2.getTestId = getTestId;
27124
+ exports2.hasExactParent = hasExactParent;
27074
27125
  exports2.isElementOffScreen = isElementOffScreen;
27075
27126
  exports2.isElementOneOfParents = isElementOneOfParents;
27076
27127
  exports2.isInt = isInt;