@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
@@ -1109,6 +1109,79 @@ function requireReactJsxRuntime_development() {
1109
1109
  const Fragment = jsxRuntime.exports.Fragment;
1110
1110
  const jsx = jsxRuntime.exports.jsx;
1111
1111
  const jsxs = jsxRuntime.exports.jsxs;
1112
+ var rgba = hexToRgba;
1113
+ function _array_like_to_array$q(arr, len) {
1114
+ if (len == null || len > arr.length)
1115
+ len = arr.length;
1116
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
1117
+ arr2[i] = arr[i];
1118
+ return arr2;
1119
+ }
1120
+ function _array_with_holes$o(arr) {
1121
+ if (Array.isArray(arr))
1122
+ return arr;
1123
+ }
1124
+ function _array_without_holes$6(arr) {
1125
+ if (Array.isArray(arr))
1126
+ return _array_like_to_array$q(arr);
1127
+ }
1128
+ function _iterable_to_array$6(iter) {
1129
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
1130
+ return Array.from(iter);
1131
+ }
1132
+ function _iterable_to_array_limit$o(arr, i) {
1133
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1134
+ if (_i == null)
1135
+ return;
1136
+ var _arr = [];
1137
+ var _n = true;
1138
+ var _d = false;
1139
+ var _s, _e;
1140
+ try {
1141
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
1142
+ _arr.push(_s.value);
1143
+ if (i && _arr.length === i)
1144
+ break;
1145
+ }
1146
+ } catch (err) {
1147
+ _d = true;
1148
+ _e = err;
1149
+ } finally {
1150
+ try {
1151
+ if (!_n && _i["return"] != null)
1152
+ _i["return"]();
1153
+ } finally {
1154
+ if (_d)
1155
+ throw _e;
1156
+ }
1157
+ }
1158
+ return _arr;
1159
+ }
1160
+ function _non_iterable_rest$o() {
1161
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1162
+ }
1163
+ function _non_iterable_spread$6() {
1164
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1165
+ }
1166
+ function _sliced_to_array$o(arr, i) {
1167
+ return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$q(arr, i) || _non_iterable_rest$o();
1168
+ }
1169
+ function _to_consumable_array$6(arr) {
1170
+ return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$6();
1171
+ }
1172
+ function _unsupported_iterable_to_array$q(o, minLen) {
1173
+ if (!o)
1174
+ return;
1175
+ if (typeof o === "string")
1176
+ return _array_like_to_array$q(o, minLen);
1177
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1178
+ if (n === "Object" && o.constructor)
1179
+ n = o.constructor.name;
1180
+ if (n === "Map" || n === "Set")
1181
+ return Array.from(n);
1182
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
1183
+ return _array_like_to_array$q(o, minLen);
1184
+ }
1112
1185
  var transformToKebab = function(string) {
1113
1186
  var result = "";
1114
1187
  string.split("").forEach(function(char) {
@@ -1232,84 +1305,6 @@ var isNotEmpty = function(val) {
1232
1305
  var trimStringToMaxLength = function(val, maxLength) {
1233
1306
  return val.length > maxLength ? val.slice(0, maxLength) : val;
1234
1307
  };
1235
- var getTestId = function(testId, postfix) {
1236
- if (!isNotEmpty(testId)) {
1237
- return void 0;
1238
- }
1239
- return isNotEmpty(postfix) ? "".concat(testId, "-").concat(postfix) : testId;
1240
- };
1241
- function _array_like_to_array$q(arr, len) {
1242
- if (len == null || len > arr.length)
1243
- len = arr.length;
1244
- for (var i = 0, arr2 = new Array(len); i < len; i++)
1245
- arr2[i] = arr[i];
1246
- return arr2;
1247
- }
1248
- function _array_with_holes$o(arr) {
1249
- if (Array.isArray(arr))
1250
- return arr;
1251
- }
1252
- function _array_without_holes$6(arr) {
1253
- if (Array.isArray(arr))
1254
- return _array_like_to_array$q(arr);
1255
- }
1256
- function _iterable_to_array$6(iter) {
1257
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
1258
- return Array.from(iter);
1259
- }
1260
- function _iterable_to_array_limit$o(arr, i) {
1261
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1262
- if (_i == null)
1263
- return;
1264
- var _arr = [];
1265
- var _n = true;
1266
- var _d = false;
1267
- var _s, _e;
1268
- try {
1269
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
1270
- _arr.push(_s.value);
1271
- if (i && _arr.length === i)
1272
- break;
1273
- }
1274
- } catch (err) {
1275
- _d = true;
1276
- _e = err;
1277
- } finally {
1278
- try {
1279
- if (!_n && _i["return"] != null)
1280
- _i["return"]();
1281
- } finally {
1282
- if (_d)
1283
- throw _e;
1284
- }
1285
- }
1286
- return _arr;
1287
- }
1288
- function _non_iterable_rest$o() {
1289
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1290
- }
1291
- function _non_iterable_spread$6() {
1292
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1293
- }
1294
- function _sliced_to_array$o(arr, i) {
1295
- return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$q(arr, i) || _non_iterable_rest$o();
1296
- }
1297
- function _to_consumable_array$6(arr) {
1298
- return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$6();
1299
- }
1300
- function _unsupported_iterable_to_array$q(o, minLen) {
1301
- if (!o)
1302
- return;
1303
- if (typeof o === "string")
1304
- return _array_like_to_array$q(o, minLen);
1305
- var n = Object.prototype.toString.call(o).slice(8, -1);
1306
- if (n === "Object" && o.constructor)
1307
- n = o.constructor.name;
1308
- if (n === "Map" || n === "Set")
1309
- return Array.from(n);
1310
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
1311
- return _array_like_to_array$q(o, minLen);
1312
- }
1313
1308
  var addDataAttributes = function() {
1314
1309
  var data = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1315
1310
  return Object.fromEntries(Object.entries(data).map(function(param) {
@@ -1329,7 +1324,29 @@ var addDataTestId = function() {
1329
1324
  "data-testid": testId
1330
1325
  } : void 0;
1331
1326
  };
1332
- var rgba = hexToRgba;
1327
+ var getTestId = function(testId, postfix) {
1328
+ if (!isNotEmpty(testId)) {
1329
+ return void 0;
1330
+ }
1331
+ return isNotEmpty(postfix) ? "".concat(testId, "-").concat(postfix) : testId;
1332
+ };
1333
+ var getSelectKeyHandler = function(cb) {
1334
+ return function(e) {
1335
+ if (e.code === "Enter" || e.code === "NumpadEnter") {
1336
+ cb(e);
1337
+ }
1338
+ };
1339
+ };
1340
+ var addClickHandler = function(cb) {
1341
+ var hasAction = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
1342
+ return hasAction && isNotEmpty(cb) ? {
1343
+ tabIndex: 0,
1344
+ onClick: cb,
1345
+ onKeyDown: getSelectKeyHandler(cb)
1346
+ } : {
1347
+ tabIndex: -1
1348
+ };
1349
+ };
1333
1350
  var minWidthModifier = {
1334
1351
  name: "minWidth",
1335
1352
  enabled: true,
@@ -4193,63 +4210,63 @@ var IconBoilerplate = function(param) {
4193
4210
  ]
4194
4211
  });
4195
4212
  };
4196
- const avatarGreen = ` <svg
4197
- width="100%"
4198
- height="100%"
4199
- viewBox="0 0 32 32"
4200
- fill="none"
4201
- xmlns="http://www.w3.org/2000/svg"
4202
- >
4203
- <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />
4204
- <mask
4205
- id="mask0_0_12744"
4206
- style="mask-type: 'alpha';"
4207
- maskUnits="userSpaceOnUse"
4208
- x="0"
4209
- y="0"
4210
- width="32"
4211
- height="32"
4212
- >
4213
- <circle cx="16" cy="16" r="16" fill="white" />
4214
- </mask>
4215
- <g mask="url(#mask0_0_12744)">
4216
- <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />
4217
- <mask
4218
- id="mask1_0_12744"
4219
- style="mask-type: 'alpha';"
4220
- maskUnits="userSpaceOnUse"
4221
- x="3"
4222
- y="16"
4223
- width="26"
4224
- height="26"
4225
- >
4226
- <circle cx="16" cy="29" r="13" fill="white" />
4227
- </mask>
4228
- <g mask="url(#mask1_0_12744)">
4229
- <ellipse
4230
- cx="16"
4231
- cy="17.5"
4232
- rx="6"
4233
- ry="7.5"
4234
- fill="#505F79"
4235
- fill-opacity="0.204983"
4236
- />
4237
- </g>
4238
- </g>
4239
- <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />
4240
- <defs>
4241
- <linearGradient
4242
- id="paint0_linear_0_12744"
4243
- x1="13.347"
4244
- y1="46.279"
4245
- x2="33.5318"
4246
- y2="30.8088"
4247
- gradientUnits="userSpaceOnUse"
4248
- >
4249
- <stop stop-color="#ABD229" />
4250
- <stop offset="1" stop-color="#9CD03F" />
4251
- </linearGradient>
4252
- </defs>
4213
+ const avatarGreen = ` <svg\r
4214
+ width="100%"\r
4215
+ height="100%"\r
4216
+ viewBox="0 0 32 32"\r
4217
+ fill="none"\r
4218
+ xmlns="http://www.w3.org/2000/svg"\r
4219
+ >\r
4220
+ <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />\r
4221
+ <mask\r
4222
+ id="mask0_0_12744"\r
4223
+ style="mask-type: 'alpha';"\r
4224
+ maskUnits="userSpaceOnUse"\r
4225
+ x="0"\r
4226
+ y="0"\r
4227
+ width="32"\r
4228
+ height="32"\r
4229
+ >\r
4230
+ <circle cx="16" cy="16" r="16" fill="white" />\r
4231
+ </mask>\r
4232
+ <g mask="url(#mask0_0_12744)">\r
4233
+ <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />\r
4234
+ <mask\r
4235
+ id="mask1_0_12744"\r
4236
+ style="mask-type: 'alpha';"\r
4237
+ maskUnits="userSpaceOnUse"\r
4238
+ x="3"\r
4239
+ y="16"\r
4240
+ width="26"\r
4241
+ height="26"\r
4242
+ >\r
4243
+ <circle cx="16" cy="29" r="13" fill="white" />\r
4244
+ </mask>\r
4245
+ <g mask="url(#mask1_0_12744)">\r
4246
+ <ellipse\r
4247
+ cx="16"\r
4248
+ cy="17.5"\r
4249
+ rx="6"\r
4250
+ ry="7.5"\r
4251
+ fill="#505F79"\r
4252
+ fill-opacity="0.204983"\r
4253
+ />\r
4254
+ </g>\r
4255
+ </g>\r
4256
+ <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />\r
4257
+ <defs>\r
4258
+ <linearGradient\r
4259
+ id="paint0_linear_0_12744"\r
4260
+ x1="13.347"\r
4261
+ y1="46.279"\r
4262
+ x2="33.5318"\r
4263
+ y2="30.8088"\r
4264
+ gradientUnits="userSpaceOnUse"\r
4265
+ >\r
4266
+ <stop stop-color="#ABD229" />\r
4267
+ <stop offset="1" stop-color="#9CD03F" />\r
4268
+ </linearGradient>\r
4269
+ </defs>\r
4253
4270
  </svg>`;
4254
4271
  var complexIcons = {
4255
4272
  avatar: avatarGreen
@@ -5393,7 +5410,10 @@ var styles$C = {
5393
5410
  pointerEvents: "none"
5394
5411
  },
5395
5412
  input: {
5396
- display: "none"
5413
+ width: 1,
5414
+ height: 1,
5415
+ position: "absolute",
5416
+ opacity: 0
5397
5417
  },
5398
5418
  children: {
5399
5419
  maxWidth: "calc(100% - 32px)",
@@ -5543,19 +5563,21 @@ function _unsupported_iterable_to_array$m(o, minLen) {
5543
5563
  return _array_like_to_array$m(o, minLen);
5544
5564
  }
5545
5565
  function Checkbox(param) {
5546
- 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;
5566
+ 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;
5547
5567
  var classes = useTheme("Checkbox", styles$C, tweakStyles, {
5548
5568
  size,
5549
5569
  alignItems,
5550
5570
  textMargin
5551
5571
  }).classes;
5552
5572
  var _useState = _sliced_to_array$m(useState(false), 2), isSelected = _useState[0], setIsSelected = _useState[1];
5553
- var onChange = function(isBeingSelected) {
5573
+ var hasAction = !isDisabled && !isReadonly;
5574
+ var onToggle = function() {
5575
+ var newValue = !isSelected;
5554
5576
  onSelect({
5555
5577
  value,
5556
- isSelected: isBeingSelected
5578
+ isSelected: newValue
5557
5579
  });
5558
- setIsSelected(isBeingSelected);
5580
+ setIsSelected(newValue);
5559
5581
  };
5560
5582
  useEffect(function() {
5561
5583
  setIsSelected(isChecked);
@@ -5567,15 +5589,16 @@ function Checkbox(param) {
5567
5589
  className: clsx(classes.root, (_obj = {}, _define_property$E(_obj, classes.disabled, isDisabled), _define_property$E(_obj, classes.labelPositionLeft, labelPosition === "left"), _obj))
5568
5590
  }, addDataTestId(testId), addDataAttributes(data)), {
5569
5591
  children: [
5570
- /* @__PURE__ */ jsx("input", {
5592
+ /* @__PURE__ */ jsx("input", _object_spread$D({
5593
+ type: "checkbox",
5571
5594
  className: classes.input,
5572
5595
  checked: isSelected,
5573
- onChange: isDisabled ? void 0 : function() {
5574
- return onChange(!isSelected);
5575
- },
5576
5596
  disabled: isDisabled,
5577
- type: "checkbox"
5578
- }),
5597
+ readOnly: isReadonly
5598
+ }, hasAction && {
5599
+ onChange: onToggle,
5600
+ onKeyDown: getSelectKeyHandler(onToggle)
5601
+ })),
5579
5602
  /* @__PURE__ */ jsx("div", {
5580
5603
  className: clsx(classes.check, isSelected && classes.checked),
5581
5604
  children: /* @__PURE__ */ jsx(Icon, {
@@ -7672,7 +7695,7 @@ function Select(_param) {
7672
7695
  if (optionsMode !== "search") {
7673
7696
  return options;
7674
7697
  }
7675
- if (optionsFilter) {
7698
+ if (isNotEmpty(optionsFilter)) {
7676
7699
  return optionsFilter(options, searchValue);
7677
7700
  }
7678
7701
  var lowerCaseValue = searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase();
@@ -7694,12 +7717,14 @@ function Select(_param) {
7694
7717
  value,
7695
7718
  convertValueToString
7696
7719
  ]);
7697
- var handleListClose = function(event) {
7720
+ var handleListClose = useCallback(function(event) {
7698
7721
  setIsListOpen(false);
7699
7722
  setSearchValue("");
7700
7723
  setShouldShowDefaultOption(true);
7701
7724
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
7702
- };
7725
+ }, [
7726
+ onBlur
7727
+ ]);
7703
7728
  var handleListOpen = function() {
7704
7729
  if (!isListOpen) {
7705
7730
  setIsListOpen(true);
@@ -7717,11 +7742,11 @@ function Select(_param) {
7717
7742
  handleListClose(event);
7718
7743
  return;
7719
7744
  }
7720
- if (!isNotEmpty(event.relatedTarget) || !isNotEmpty(list.current)) {
7745
+ if (!isNotEmpty(event.relatedTarget) || !isNotEmpty(list.current) || !isNotEmpty(inputWrapper.current)) {
7721
7746
  return;
7722
7747
  }
7723
- var isActionInsideList = hasExactParent(event.relatedTarget, list.current);
7724
- if (!isActionInsideList) {
7748
+ var isActionInsideSelect = hasExactParent(event.relatedTarget, list.current) || hasExactParent(event.relatedTarget, inputWrapper.current);
7749
+ if (!isActionInsideSelect) {
7725
7750
  handleListClose(event);
7726
7751
  }
7727
7752
  };
@@ -7733,6 +7758,7 @@ function Select(_param) {
7733
7758
  onChange(newValue);
7734
7759
  }, [
7735
7760
  value,
7761
+ compareValuesOnChange,
7736
7762
  onChange
7737
7763
  ]);
7738
7764
  var handleOptionSelect = useCallback(function(index, event) {
@@ -7742,6 +7768,7 @@ function Select(_param) {
7742
7768
  (_input_current = input.current) === null || _input_current === void 0 ? void 0 : _input_current.blur();
7743
7769
  }, [
7744
7770
  handleOnChange,
7771
+ handleListClose,
7745
7772
  filteredOptions
7746
7773
  ]);
7747
7774
  var handleOnType = useCallback(function() {
@@ -27127,6 +27154,7 @@ export {
27127
27154
  ThemedPreloader,
27128
27155
  Toaster,
27129
27156
  Tooltip,
27157
+ addClickHandler,
27130
27158
  addDataAttributes,
27131
27159
  addDataTestId,
27132
27160
  checkElementParentsClassNames,
@@ -27147,6 +27175,7 @@ export {
27147
27175
  getPhoneMask,
27148
27176
  getPhoneObjFromString,
27149
27177
  getScrollParent$1 as getScrollParent,
27178
+ getSelectKeyHandler,
27150
27179
  getStyleComputedProperty,
27151
27180
  getTestId,
27152
27181
  hasExactParent,