@true-engineering/true-react-common-ui-kit 1.5.3 → 1.6.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 (243) hide show
  1. package/LICENSE +201 -201
  2. package/dist/components/Checkbox/Checkbox.d.ts +2 -1
  3. package/dist/components/Checkbox/Checkbox.styles.d.ts +4 -1
  4. package/dist/components/Flag/augment.d.ts +1 -1
  5. package/dist/components/Icon/complexIcons/augment.d.ts +1 -1
  6. package/dist/helpers/index.d.ts +0 -1
  7. package/dist/helpers/utils.d.ts +8 -0
  8. package/dist/true-react-common-ui-kit.js +182 -153
  9. package/dist/true-react-common-ui-kit.js.map +1 -1
  10. package/dist/true-react-common-ui-kit.umd.cjs +182 -153
  11. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  12. package/dist/vite-env.d.ts +1 -1
  13. package/package.json +91 -91
  14. package/src/components/AccountInfo/AccountInfo.stories.tsx +35 -35
  15. package/src/components/AccountInfo/AccountInfo.styles.ts +55 -55
  16. package/src/components/AccountInfo/AccountInfo.tsx +106 -106
  17. package/src/components/AccountInfo/index.ts +2 -2
  18. package/src/components/AddButton/AddButton.stories.tsx +21 -21
  19. package/src/components/AddButton/AddButton.styles.ts +34 -34
  20. package/src/components/AddButton/AddButton.tsx +49 -49
  21. package/src/components/AddButton/index.ts +2 -2
  22. package/src/components/Button/Button.stories.tsx +61 -61
  23. package/src/components/Button/Button.styles.ts +196 -196
  24. package/src/components/Button/Button.tsx +195 -195
  25. package/src/components/Button/index.ts +2 -2
  26. package/src/components/Checkbox/Checkbox.stories.tsx +35 -35
  27. package/src/components/Checkbox/Checkbox.styles.ts +62 -59
  28. package/src/components/Checkbox/Checkbox.tsx +106 -93
  29. package/src/components/Checkbox/index.ts +2 -2
  30. package/src/components/CloseButton/CloseButton.styles.ts +34 -34
  31. package/src/components/CloseButton/CloseButton.tsx +37 -37
  32. package/src/components/CloseButton/index.ts +2 -2
  33. package/src/components/Colors/Colors.stories.tsx +7 -7
  34. package/src/components/Colors/Colors.styles.ts +38 -38
  35. package/src/components/Colors/Colors.tsx +34 -34
  36. package/src/components/Colors/index.ts +2 -2
  37. package/src/components/CssBaseline/CssBaseline.styles.ts +15 -15
  38. package/src/components/CssBaseline/CssBaseline.tsx +17 -17
  39. package/src/components/CssBaseline/index.ts +2 -2
  40. package/src/components/DateInput/DateInput.stories.tsx +63 -63
  41. package/src/components/DateInput/DateInput.styles.ts +14 -14
  42. package/src/components/DateInput/DateInput.tsx +60 -60
  43. package/src/components/DateInput/index.ts +2 -2
  44. package/src/components/DatePicker/DatePicker.stories.tsx +96 -96
  45. package/src/components/DatePicker/DatePicker.styles.ts +54 -54
  46. package/src/components/DatePicker/DatePicker.tsx +358 -358
  47. package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.styles.ts +84 -84
  48. package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.tsx +94 -94
  49. package/src/components/DatePicker/DatePickerHeader/index.ts +1 -1
  50. package/src/components/DatePicker/DatePickerInput/DatePickerInput.styles.ts +25 -25
  51. package/src/components/DatePicker/DatePickerInput/DatePickerInput.tsx +31 -31
  52. package/src/components/DatePicker/DatePickerInput/index.ts +1 -1
  53. package/src/components/DatePicker/index.ts +4 -4
  54. package/src/components/Description/Description.stories.tsx +29 -29
  55. package/src/components/Description/Description.styles.ts +31 -31
  56. package/src/components/Description/Description.tsx +69 -69
  57. package/src/components/Description/index.ts +2 -2
  58. package/src/components/FiltersPane/FilterInterval/FilterInterval.styles.ts +64 -64
  59. package/src/components/FiltersPane/FilterInterval/FilterInterval.tsx +162 -162
  60. package/src/components/FiltersPane/FilterInterval/index.ts +1 -1
  61. package/src/components/FiltersPane/FilterMultiSelect/FilterMultiSelect.tsx +14 -14
  62. package/src/components/FiltersPane/FilterMultiSelect/index.ts +1 -1
  63. package/src/components/FiltersPane/FilterSelect/FilterSelect.styles.ts +144 -144
  64. package/src/components/FiltersPane/FilterSelect/FilterSelect.tsx +397 -397
  65. package/src/components/FiltersPane/FilterSelect/index.ts +1 -1
  66. package/src/components/FiltersPane/FilterSelect/locales.ts +37 -37
  67. package/src/components/FiltersPane/FilterValueView/FilterValueView.styles.tsx +15 -15
  68. package/src/components/FiltersPane/FilterValueView/FilterValueView.tsx +186 -186
  69. package/src/components/FiltersPane/FilterValueView/index.tsx +1 -1
  70. package/src/components/FiltersPane/FilterWithDates/FilterWithDates.styles.ts +60 -60
  71. package/src/components/FiltersPane/FilterWithDates/FilterWithDates.tsx +222 -222
  72. package/src/components/FiltersPane/FilterWithDates/index.ts +1 -1
  73. package/src/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.styles.ts +17 -17
  74. package/src/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.tsx +231 -231
  75. package/src/components/FiltersPane/FilterWithPeriod/index.ts +1 -1
  76. package/src/components/FiltersPane/FilterWrapper/FilterWrapper.styles.ts +110 -110
  77. package/src/components/FiltersPane/FilterWrapper/FilterWrapper.tsx +360 -360
  78. package/src/components/FiltersPane/FilterWrapper/index.ts +1 -1
  79. package/src/components/FiltersPane/FiltersPane.stories.tsx +308 -308
  80. package/src/components/FiltersPane/FiltersPane.styles.ts +71 -71
  81. package/src/components/FiltersPane/FiltersPane.tsx +193 -193
  82. package/src/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.styles.ts +109 -109
  83. package/src/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.tsx +175 -175
  84. package/src/components/FiltersPane/FiltersPaneSearch/index.ts +1 -1
  85. package/src/components/FiltersPane/index.ts +20 -20
  86. package/src/components/FiltersPane/locales.ts +107 -107
  87. package/src/components/FiltersPane/types.ts +126 -126
  88. package/src/components/Flag/Flag.stories.tsx +29 -29
  89. package/src/components/Flag/Flag.styles.ts +18 -18
  90. package/src/components/Flag/Flag.tsx +28 -28
  91. package/src/components/Flag/augment.d.ts +1 -1
  92. package/src/components/Flag/index.ts +2 -2
  93. package/src/components/FlexibleTable/FlexibleTable.stories.tsx +80 -80
  94. package/src/components/FlexibleTable/FlexibleTable.styles.ts +131 -131
  95. package/src/components/FlexibleTable/FlexibleTable.tsx +243 -243
  96. package/src/components/FlexibleTable/TableRow.tsx +171 -171
  97. package/src/components/FlexibleTable/TableValue.tsx +83 -83
  98. package/src/components/FlexibleTable/fixture-test.ts +254 -254
  99. package/src/components/FlexibleTable/index.ts +3 -3
  100. package/src/components/FlexibleTable/types.ts +58 -58
  101. package/src/components/Icon/ComplexIconBoilerplate.tsx +17 -17
  102. package/src/components/Icon/Icon.stories.tsx +88 -88
  103. package/src/components/Icon/Icon.styles.ts +10 -10
  104. package/src/components/Icon/Icon.tsx +34 -34
  105. package/src/components/Icon/IconBoilerplate.tsx +42 -42
  106. package/src/components/Icon/complexIcons/augment.d.ts +1 -1
  107. package/src/components/Icon/complexIcons/avatarGreen.svg +57 -57
  108. package/src/components/Icon/complexIcons/icons.ts +7 -7
  109. package/src/components/Icon/complexIcons/index.ts +1 -1
  110. package/src/components/Icon/icons/icons.ts +838 -838
  111. package/src/components/Icon/icons/index.ts +1 -1
  112. package/src/components/Icon/index.ts +4 -4
  113. package/src/components/IncrementInput/ChangeButton.tsx +34 -34
  114. package/src/components/IncrementInput/IncrementInput.stories.tsx +34 -34
  115. package/src/components/IncrementInput/IncrementInput.styles.ts +77 -77
  116. package/src/components/IncrementInput/IncrementInput.tsx +95 -95
  117. package/src/components/IncrementInput/index.ts +2 -2
  118. package/src/components/Input/Input.stories.tsx +92 -92
  119. package/src/components/Input/Input.styles.ts +305 -305
  120. package/src/components/Input/Input.tsx +318 -318
  121. package/src/components/Input/index.ts +2 -2
  122. package/src/components/List/List.stories.tsx +62 -62
  123. package/src/components/List/List.styles.ts +52 -52
  124. package/src/components/List/List.tsx +82 -82
  125. package/src/components/List/index.ts +2 -2
  126. package/src/components/Modal/Modal.stories.tsx +113 -113
  127. package/src/components/Modal/Modal.styles.ts +308 -308
  128. package/src/components/Modal/Modal.tsx +210 -210
  129. package/src/components/Modal/index.ts +2 -2
  130. package/src/components/MoreMenu/MoreMenu.stories.tsx +46 -46
  131. package/src/components/MoreMenu/MoreMenu.styles.ts +70 -70
  132. package/src/components/MoreMenu/MoreMenu.tsx +102 -102
  133. package/src/components/MoreMenu/index.ts +2 -2
  134. package/src/components/MultiSelect/MultiSelect.stories.tsx +46 -46
  135. package/src/components/MultiSelect/MultiSelect.styles.ts +55 -55
  136. package/src/components/MultiSelect/MultiSelect.tsx +98 -98
  137. package/src/components/MultiSelect/MultiSelectInput/MultiSelectInput.styles.ts +73 -73
  138. package/src/components/MultiSelect/MultiSelectInput/MultiSelectInput.tsx +62 -62
  139. package/src/components/MultiSelect/MultiSelectInput/index.ts +1 -1
  140. package/src/components/MultiSelect/index.ts +3 -3
  141. package/src/components/MultiSelectList/MultiSelectList.styles.ts +125 -125
  142. package/src/components/MultiSelectList/MultiSelectList.tsx +519 -519
  143. package/src/components/MultiSelectList/index.ts +2 -2
  144. package/src/components/MultiSelectList/locales.ts +37 -37
  145. package/src/components/Notification/Notification.stories.tsx +51 -51
  146. package/src/components/Notification/Notification.styles.ts +50 -50
  147. package/src/components/Notification/Notification.tsx +84 -84
  148. package/src/components/Notification/index.ts +2 -2
  149. package/src/components/NumberInput/NumberInput.stories.tsx +36 -36
  150. package/src/components/NumberInput/NumberInput.tsx +154 -154
  151. package/src/components/NumberInput/helpers.ts +87 -87
  152. package/src/components/NumberInput/index.ts +1 -1
  153. package/src/components/PhoneInput/PhoneInput.stories.tsx +71 -71
  154. package/src/components/PhoneInput/PhoneInput.styles.ts +84 -84
  155. package/src/components/PhoneInput/PhoneInput.tsx +223 -223
  156. package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.stories.tsx +21 -21
  157. package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.styles.ts +100 -100
  158. package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.tsx +171 -171
  159. package/src/components/PhoneInput/PhoneInputCountryList/index.ts +2 -2
  160. package/src/components/PhoneInput/index.ts +6 -6
  161. package/src/components/PhoneInput/phone-info.ts +2167 -2167
  162. package/src/components/PhoneInput/types.ts +16 -16
  163. package/src/components/RadioButton/RadioButton.stories.tsx +46 -46
  164. package/src/components/RadioButton/RadioButton.styles.ts +37 -37
  165. package/src/components/RadioButton/RadioButton.tsx +56 -56
  166. package/src/components/RadioButton/index.ts +2 -2
  167. package/src/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.ts +66 -66
  168. package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
  169. package/src/components/SearchInput/SearchInput.stories.tsx +24 -24
  170. package/src/components/SearchInput/SearchInput.styles.ts +50 -50
  171. package/src/components/SearchInput/SearchInput.tsx +63 -63
  172. package/src/components/SearchInput/index.ts +2 -2
  173. package/src/components/Select/Select.stories.tsx +258 -258
  174. package/src/components/Select/Select.styles.ts +85 -85
  175. package/src/components/Select/Select.tsx +514 -508
  176. package/src/components/Select/SelectList/SelectList.styles.ts +68 -68
  177. package/src/components/Select/SelectList/SelectList.tsx +139 -139
  178. package/src/components/Select/SelectList/index.ts +1 -1
  179. package/src/components/Select/helpers.ts +21 -21
  180. package/src/components/Select/index.ts +3 -3
  181. package/src/components/SmartInput/SmartInput.stories.tsx +63 -63
  182. package/src/components/SmartInput/SmartInput.tsx +180 -180
  183. package/src/components/SmartInput/helpers.ts +85 -85
  184. package/src/components/SmartInput/index.ts +1 -1
  185. package/src/components/Switch/Switch.stories.tsx +40 -40
  186. package/src/components/Switch/Switch.styles.ts +75 -75
  187. package/src/components/Switch/Switch.tsx +89 -89
  188. package/src/components/Switch/index.ts +2 -2
  189. package/src/components/TextArea/TextArea.stories.tsx +35 -35
  190. package/src/components/TextArea/TextArea.styles.ts +153 -153
  191. package/src/components/TextArea/TextArea.tsx +178 -178
  192. package/src/components/TextArea/index.ts +2 -2
  193. package/src/components/TextWithInfo/TextWithInfo.stories.tsx +53 -53
  194. package/src/components/TextWithInfo/TextWithInfo.styles.ts +60 -60
  195. package/src/components/TextWithInfo/TextWithInfo.tsx +67 -67
  196. package/src/components/TextWithInfo/index.ts +2 -2
  197. package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +58 -58
  198. package/src/components/TextWithTooltip/TextWithTooltip.styles.ts +19 -19
  199. package/src/components/TextWithTooltip/TextWithTooltip.tsx +163 -163
  200. package/src/components/TextWithTooltip/index.ts +2 -2
  201. package/src/components/ThemedPreloader/ThemedPreloader.stories.tsx +41 -41
  202. package/src/components/ThemedPreloader/ThemedPreloader.styles.ts +21 -21
  203. package/src/components/ThemedPreloader/ThemedPreloader.tsx +56 -56
  204. package/src/components/ThemedPreloader/components/DefaultPreloader/DefaultPreloader.tsx +34 -34
  205. package/src/components/ThemedPreloader/components/DefaultPreloader/index.ts +1 -1
  206. package/src/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.ts +54 -54
  207. package/src/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.tsx +18 -18
  208. package/src/components/ThemedPreloader/components/DotsPreloader/index.ts +2 -2
  209. package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.ts +11 -11
  210. package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.tsx +32 -32
  211. package/src/components/ThemedPreloader/components/SvgPreloader/index.ts +2 -2
  212. package/src/components/ThemedPreloader/components/index.ts +2 -2
  213. package/src/components/ThemedPreloader/index.ts +2 -2
  214. package/src/components/Toaster/Toaster.stories.tsx +34 -34
  215. package/src/components/Toaster/Toaster.styles.ts +59 -59
  216. package/src/components/Toaster/Toaster.tsx +113 -113
  217. package/src/components/Toaster/index.ts +2 -2
  218. package/src/components/Tooltip/Tooltip.stories.tsx +21 -21
  219. package/src/components/Tooltip/Tooltip.styles.ts +45 -45
  220. package/src/components/Tooltip/Tooltip.tsx +40 -40
  221. package/src/components/Tooltip/index.ts +3 -3
  222. package/src/components/Tooltip/types.ts +1 -1
  223. package/src/components/index.ts +36 -36
  224. package/src/helpers/colors.ts +2 -2
  225. package/src/helpers/dateHelpers/date-helpers.ts +9 -9
  226. package/src/helpers/index.ts +4 -5
  227. package/src/helpers/phone.ts +106 -106
  228. package/src/helpers/popper-helpers.ts +17 -17
  229. package/src/helpers/snippets.tsx +5 -5
  230. package/src/helpers/utils.ts +219 -178
  231. package/src/hooks/index.ts +6 -6
  232. package/src/hooks/use-did-mount-effect.ts +21 -21
  233. package/src/hooks/use-dropdown.ts +85 -85
  234. package/src/hooks/use-is-mounted.ts +15 -15
  235. package/src/hooks/use-on-click-outside.ts +92 -92
  236. package/src/hooks/use-theme.ts +36 -36
  237. package/src/hooks/use-tweak-styles.ts +14 -14
  238. package/src/index.ts +6 -6
  239. package/src/theme.ts +155 -155
  240. package/src/types.ts +106 -106
  241. package/src/vite-env.d.ts +1 -1
  242. package/dist/helpers/data-attributes.d.ts +0 -5
  243. package/src/helpers/data-attributes.ts +0 -18
@@ -1099,6 +1099,79 @@
1099
1099
  const Fragment = jsxRuntime.exports.Fragment;
1100
1100
  const jsx = jsxRuntime.exports.jsx;
1101
1101
  const jsxs = jsxRuntime.exports.jsxs;
1102
+ var rgba = hexToRgba;
1103
+ function _array_like_to_array$q(arr, len) {
1104
+ if (len == null || len > arr.length)
1105
+ len = arr.length;
1106
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
1107
+ arr2[i] = arr[i];
1108
+ return arr2;
1109
+ }
1110
+ function _array_with_holes$o(arr) {
1111
+ if (Array.isArray(arr))
1112
+ return arr;
1113
+ }
1114
+ function _array_without_holes$6(arr) {
1115
+ if (Array.isArray(arr))
1116
+ return _array_like_to_array$q(arr);
1117
+ }
1118
+ function _iterable_to_array$6(iter) {
1119
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
1120
+ return Array.from(iter);
1121
+ }
1122
+ function _iterable_to_array_limit$o(arr, i) {
1123
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1124
+ if (_i == null)
1125
+ return;
1126
+ var _arr = [];
1127
+ var _n = true;
1128
+ var _d = false;
1129
+ var _s, _e;
1130
+ try {
1131
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
1132
+ _arr.push(_s.value);
1133
+ if (i && _arr.length === i)
1134
+ break;
1135
+ }
1136
+ } catch (err) {
1137
+ _d = true;
1138
+ _e = err;
1139
+ } finally {
1140
+ try {
1141
+ if (!_n && _i["return"] != null)
1142
+ _i["return"]();
1143
+ } finally {
1144
+ if (_d)
1145
+ throw _e;
1146
+ }
1147
+ }
1148
+ return _arr;
1149
+ }
1150
+ function _non_iterable_rest$o() {
1151
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1152
+ }
1153
+ function _non_iterable_spread$6() {
1154
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1155
+ }
1156
+ function _sliced_to_array$o(arr, i) {
1157
+ return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$q(arr, i) || _non_iterable_rest$o();
1158
+ }
1159
+ function _to_consumable_array$6(arr) {
1160
+ return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$6();
1161
+ }
1162
+ function _unsupported_iterable_to_array$q(o, minLen) {
1163
+ if (!o)
1164
+ return;
1165
+ if (typeof o === "string")
1166
+ return _array_like_to_array$q(o, minLen);
1167
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1168
+ if (n === "Object" && o.constructor)
1169
+ n = o.constructor.name;
1170
+ if (n === "Map" || n === "Set")
1171
+ return Array.from(n);
1172
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
1173
+ return _array_like_to_array$q(o, minLen);
1174
+ }
1102
1175
  var transformToKebab = function(string) {
1103
1176
  var result = "";
1104
1177
  string.split("").forEach(function(char) {
@@ -1222,84 +1295,6 @@
1222
1295
  var trimStringToMaxLength = function(val, maxLength) {
1223
1296
  return val.length > maxLength ? val.slice(0, maxLength) : val;
1224
1297
  };
1225
- var getTestId = function(testId, postfix) {
1226
- if (!isNotEmpty(testId)) {
1227
- return void 0;
1228
- }
1229
- return isNotEmpty(postfix) ? "".concat(testId, "-").concat(postfix) : testId;
1230
- };
1231
- function _array_like_to_array$q(arr, len) {
1232
- if (len == null || len > arr.length)
1233
- len = arr.length;
1234
- for (var i = 0, arr2 = new Array(len); i < len; i++)
1235
- arr2[i] = arr[i];
1236
- return arr2;
1237
- }
1238
- function _array_with_holes$o(arr) {
1239
- if (Array.isArray(arr))
1240
- return arr;
1241
- }
1242
- function _array_without_holes$6(arr) {
1243
- if (Array.isArray(arr))
1244
- return _array_like_to_array$q(arr);
1245
- }
1246
- function _iterable_to_array$6(iter) {
1247
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
1248
- return Array.from(iter);
1249
- }
1250
- function _iterable_to_array_limit$o(arr, i) {
1251
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1252
- if (_i == null)
1253
- return;
1254
- var _arr = [];
1255
- var _n = true;
1256
- var _d = false;
1257
- var _s, _e;
1258
- try {
1259
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
1260
- _arr.push(_s.value);
1261
- if (i && _arr.length === i)
1262
- break;
1263
- }
1264
- } catch (err) {
1265
- _d = true;
1266
- _e = err;
1267
- } finally {
1268
- try {
1269
- if (!_n && _i["return"] != null)
1270
- _i["return"]();
1271
- } finally {
1272
- if (_d)
1273
- throw _e;
1274
- }
1275
- }
1276
- return _arr;
1277
- }
1278
- function _non_iterable_rest$o() {
1279
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1280
- }
1281
- function _non_iterable_spread$6() {
1282
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1283
- }
1284
- function _sliced_to_array$o(arr, i) {
1285
- return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$q(arr, i) || _non_iterable_rest$o();
1286
- }
1287
- function _to_consumable_array$6(arr) {
1288
- return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$6();
1289
- }
1290
- function _unsupported_iterable_to_array$q(o, minLen) {
1291
- if (!o)
1292
- return;
1293
- if (typeof o === "string")
1294
- return _array_like_to_array$q(o, minLen);
1295
- var n = Object.prototype.toString.call(o).slice(8, -1);
1296
- if (n === "Object" && o.constructor)
1297
- n = o.constructor.name;
1298
- if (n === "Map" || n === "Set")
1299
- return Array.from(n);
1300
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
1301
- return _array_like_to_array$q(o, minLen);
1302
- }
1303
1298
  var addDataAttributes = function() {
1304
1299
  var data = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1305
1300
  return Object.fromEntries(Object.entries(data).map(function(param) {
@@ -1319,7 +1314,29 @@
1319
1314
  "data-testid": testId
1320
1315
  } : void 0;
1321
1316
  };
1322
- var rgba = hexToRgba;
1317
+ var getTestId = function(testId, postfix) {
1318
+ if (!isNotEmpty(testId)) {
1319
+ return void 0;
1320
+ }
1321
+ return isNotEmpty(postfix) ? "".concat(testId, "-").concat(postfix) : testId;
1322
+ };
1323
+ var getSelectKeyHandler = function(cb) {
1324
+ return function(e) {
1325
+ if (e.code === "Enter" || e.code === "NumpadEnter") {
1326
+ cb(e);
1327
+ }
1328
+ };
1329
+ };
1330
+ var addClickHandler = function(cb) {
1331
+ var hasAction = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
1332
+ return hasAction && isNotEmpty(cb) ? {
1333
+ tabIndex: 0,
1334
+ onClick: cb,
1335
+ onKeyDown: getSelectKeyHandler(cb)
1336
+ } : {
1337
+ tabIndex: -1
1338
+ };
1339
+ };
1323
1340
  var minWidthModifier = {
1324
1341
  name: "minWidth",
1325
1342
  enabled: true,
@@ -4183,63 +4200,63 @@
4183
4200
  ]
4184
4201
  });
4185
4202
  };
4186
- const avatarGreen = ` <svg
4187
- width="100%"
4188
- height="100%"
4189
- viewBox="0 0 32 32"
4190
- fill="none"
4191
- xmlns="http://www.w3.org/2000/svg"
4192
- >
4193
- <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />
4194
- <mask
4195
- id="mask0_0_12744"
4196
- style="mask-type: 'alpha';"
4197
- maskUnits="userSpaceOnUse"
4198
- x="0"
4199
- y="0"
4200
- width="32"
4201
- height="32"
4202
- >
4203
- <circle cx="16" cy="16" r="16" fill="white" />
4204
- </mask>
4205
- <g mask="url(#mask0_0_12744)">
4206
- <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />
4207
- <mask
4208
- id="mask1_0_12744"
4209
- style="mask-type: 'alpha';"
4210
- maskUnits="userSpaceOnUse"
4211
- x="3"
4212
- y="16"
4213
- width="26"
4214
- height="26"
4215
- >
4216
- <circle cx="16" cy="29" r="13" fill="white" />
4217
- </mask>
4218
- <g mask="url(#mask1_0_12744)">
4219
- <ellipse
4220
- cx="16"
4221
- cy="17.5"
4222
- rx="6"
4223
- ry="7.5"
4224
- fill="#505F79"
4225
- fill-opacity="0.204983"
4226
- />
4227
- </g>
4228
- </g>
4229
- <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />
4230
- <defs>
4231
- <linearGradient
4232
- id="paint0_linear_0_12744"
4233
- x1="13.347"
4234
- y1="46.279"
4235
- x2="33.5318"
4236
- y2="30.8088"
4237
- gradientUnits="userSpaceOnUse"
4238
- >
4239
- <stop stop-color="#ABD229" />
4240
- <stop offset="1" stop-color="#9CD03F" />
4241
- </linearGradient>
4242
- </defs>
4203
+ const avatarGreen = ` <svg\r
4204
+ width="100%"\r
4205
+ height="100%"\r
4206
+ viewBox="0 0 32 32"\r
4207
+ fill="none"\r
4208
+ xmlns="http://www.w3.org/2000/svg"\r
4209
+ >\r
4210
+ <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />\r
4211
+ <mask\r
4212
+ id="mask0_0_12744"\r
4213
+ style="mask-type: 'alpha';"\r
4214
+ maskUnits="userSpaceOnUse"\r
4215
+ x="0"\r
4216
+ y="0"\r
4217
+ width="32"\r
4218
+ height="32"\r
4219
+ >\r
4220
+ <circle cx="16" cy="16" r="16" fill="white" />\r
4221
+ </mask>\r
4222
+ <g mask="url(#mask0_0_12744)">\r
4223
+ <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />\r
4224
+ <mask\r
4225
+ id="mask1_0_12744"\r
4226
+ style="mask-type: 'alpha';"\r
4227
+ maskUnits="userSpaceOnUse"\r
4228
+ x="3"\r
4229
+ y="16"\r
4230
+ width="26"\r
4231
+ height="26"\r
4232
+ >\r
4233
+ <circle cx="16" cy="29" r="13" fill="white" />\r
4234
+ </mask>\r
4235
+ <g mask="url(#mask1_0_12744)">\r
4236
+ <ellipse\r
4237
+ cx="16"\r
4238
+ cy="17.5"\r
4239
+ rx="6"\r
4240
+ ry="7.5"\r
4241
+ fill="#505F79"\r
4242
+ fill-opacity="0.204983"\r
4243
+ />\r
4244
+ </g>\r
4245
+ </g>\r
4246
+ <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />\r
4247
+ <defs>\r
4248
+ <linearGradient\r
4249
+ id="paint0_linear_0_12744"\r
4250
+ x1="13.347"\r
4251
+ y1="46.279"\r
4252
+ x2="33.5318"\r
4253
+ y2="30.8088"\r
4254
+ gradientUnits="userSpaceOnUse"\r
4255
+ >\r
4256
+ <stop stop-color="#ABD229" />\r
4257
+ <stop offset="1" stop-color="#9CD03F" />\r
4258
+ </linearGradient>\r
4259
+ </defs>\r
4243
4260
  </svg>`;
4244
4261
  var complexIcons = {
4245
4262
  avatar: avatarGreen
@@ -5383,7 +5400,10 @@
5383
5400
  pointerEvents: "none"
5384
5401
  },
5385
5402
  input: {
5386
- display: "none"
5403
+ width: 1,
5404
+ height: 1,
5405
+ position: "absolute",
5406
+ opacity: 0
5387
5407
  },
5388
5408
  children: {
5389
5409
  maxWidth: "calc(100% - 32px)",
@@ -5533,19 +5553,21 @@
5533
5553
  return _array_like_to_array$m(o, minLen);
5534
5554
  }
5535
5555
  function Checkbox(param) {
5536
- var children = param.children, isDisabled = param.isDisabled, _param_isChecked = param.isChecked, isChecked = _param_isChecked === void 0 ? false : _param_isChecked, value = param.value, _param_size = param.size, size = _param_size === void 0 ? 18 : _param_size, _param_alignItems = param.alignItems, alignItems = _param_alignItems === void 0 ? "center" : _param_alignItems, textMargin = param.textMargin, data = param.data, testId = param.testId, isSemiChecked = param.isSemiChecked, _param_labelPosition = param.labelPosition, labelPosition = _param_labelPosition === void 0 ? "right" : _param_labelPosition, tweakStyles = param.tweakStyles, onSelect = param.onSelect;
5556
+ var children = param.children, isDisabled = param.isDisabled, isReadonly = param.isReadonly, _param_isChecked = param.isChecked, isChecked = _param_isChecked === void 0 ? false : _param_isChecked, value = param.value, _param_size = param.size, size = _param_size === void 0 ? 18 : _param_size, _param_alignItems = param.alignItems, alignItems = _param_alignItems === void 0 ? "center" : _param_alignItems, textMargin = param.textMargin, data = param.data, testId = param.testId, isSemiChecked = param.isSemiChecked, _param_labelPosition = param.labelPosition, labelPosition = _param_labelPosition === void 0 ? "right" : _param_labelPosition, tweakStyles = param.tweakStyles, onSelect = param.onSelect;
5537
5557
  var classes = useTheme("Checkbox", styles$C, tweakStyles, {
5538
5558
  size,
5539
5559
  alignItems,
5540
5560
  textMargin
5541
5561
  }).classes;
5542
5562
  var _useState = _sliced_to_array$m(React.useState(false), 2), isSelected = _useState[0], setIsSelected = _useState[1];
5543
- var onChange = function(isBeingSelected) {
5563
+ var hasAction = !isDisabled && !isReadonly;
5564
+ var onToggle = function() {
5565
+ var newValue = !isSelected;
5544
5566
  onSelect({
5545
5567
  value,
5546
- isSelected: isBeingSelected
5568
+ isSelected: newValue
5547
5569
  });
5548
- setIsSelected(isBeingSelected);
5570
+ setIsSelected(newValue);
5549
5571
  };
5550
5572
  React.useEffect(function() {
5551
5573
  setIsSelected(isChecked);
@@ -5557,15 +5579,16 @@
5557
5579
  className: clsx(classes.root, (_obj = {}, _define_property$E(_obj, classes.disabled, isDisabled), _define_property$E(_obj, classes.labelPositionLeft, labelPosition === "left"), _obj))
5558
5580
  }, addDataTestId(testId), addDataAttributes(data)), {
5559
5581
  children: [
5560
- /* @__PURE__ */ jsx("input", {
5582
+ /* @__PURE__ */ jsx("input", _object_spread$D({
5583
+ type: "checkbox",
5561
5584
  className: classes.input,
5562
5585
  checked: isSelected,
5563
- onChange: isDisabled ? void 0 : function() {
5564
- return onChange(!isSelected);
5565
- },
5566
5586
  disabled: isDisabled,
5567
- type: "checkbox"
5568
- }),
5587
+ readOnly: isReadonly
5588
+ }, hasAction && {
5589
+ onChange: onToggle,
5590
+ onKeyDown: getSelectKeyHandler(onToggle)
5591
+ })),
5569
5592
  /* @__PURE__ */ jsx("div", {
5570
5593
  className: clsx(classes.check, isSelected && classes.checked),
5571
5594
  children: /* @__PURE__ */ jsx(Icon, {
@@ -7662,7 +7685,7 @@
7662
7685
  if (optionsMode !== "search") {
7663
7686
  return options;
7664
7687
  }
7665
- if (optionsFilter) {
7688
+ if (isNotEmpty(optionsFilter)) {
7666
7689
  return optionsFilter(options, searchValue);
7667
7690
  }
7668
7691
  var lowerCaseValue = searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase();
@@ -7684,12 +7707,14 @@
7684
7707
  value,
7685
7708
  convertValueToString
7686
7709
  ]);
7687
- var handleListClose = function(event) {
7710
+ var handleListClose = React.useCallback(function(event) {
7688
7711
  setIsListOpen(false);
7689
7712
  setSearchValue("");
7690
7713
  setShouldShowDefaultOption(true);
7691
7714
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
7692
- };
7715
+ }, [
7716
+ onBlur
7717
+ ]);
7693
7718
  var handleListOpen = function() {
7694
7719
  if (!isListOpen) {
7695
7720
  setIsListOpen(true);
@@ -7707,11 +7732,11 @@
7707
7732
  handleListClose(event);
7708
7733
  return;
7709
7734
  }
7710
- if (!isNotEmpty(event.relatedTarget) || !isNotEmpty(list.current)) {
7735
+ if (!isNotEmpty(event.relatedTarget) || !isNotEmpty(list.current) || !isNotEmpty(inputWrapper.current)) {
7711
7736
  return;
7712
7737
  }
7713
- var isActionInsideList = hasExactParent(event.relatedTarget, list.current);
7714
- if (!isActionInsideList) {
7738
+ var isActionInsideSelect = hasExactParent(event.relatedTarget, list.current) || hasExactParent(event.relatedTarget, inputWrapper.current);
7739
+ if (!isActionInsideSelect) {
7715
7740
  handleListClose(event);
7716
7741
  }
7717
7742
  };
@@ -7723,6 +7748,7 @@
7723
7748
  onChange(newValue);
7724
7749
  }, [
7725
7750
  value,
7751
+ compareValuesOnChange,
7726
7752
  onChange
7727
7753
  ]);
7728
7754
  var handleOptionSelect = React.useCallback(function(index, event) {
@@ -7732,6 +7758,7 @@
7732
7758
  (_input_current = input.current) === null || _input_current === void 0 ? void 0 : _input_current.blur();
7733
7759
  }, [
7734
7760
  handleOnChange,
7761
+ handleListClose,
7735
7762
  filteredOptions
7736
7763
  ]);
7737
7764
  var handleOnType = React.useCallback(function() {
@@ -27116,6 +27143,7 @@
27116
27143
  exports2.ThemedPreloader = ThemedPreloader;
27117
27144
  exports2.Toaster = Toaster;
27118
27145
  exports2.Tooltip = Tooltip;
27146
+ exports2.addClickHandler = addClickHandler;
27119
27147
  exports2.addDataAttributes = addDataAttributes;
27120
27148
  exports2.addDataTestId = addDataTestId;
27121
27149
  exports2.checkElementParentsClassNames = checkElementParentsClassNames;
@@ -27136,6 +27164,7 @@
27136
27164
  exports2.getPhoneMask = getPhoneMask;
27137
27165
  exports2.getPhoneObjFromString = getPhoneObjFromString;
27138
27166
  exports2.getScrollParent = getScrollParent$1;
27167
+ exports2.getSelectKeyHandler = getSelectKeyHandler;
27139
27168
  exports2.getStyleComputedProperty = getStyleComputedProperty;
27140
27169
  exports2.getTestId = getTestId;
27141
27170
  exports2.hasExactParent = hasExactParent;