@true-engineering/true-react-common-ui-kit 1.5.3 → 1.7.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.
- package/LICENSE +201 -201
- package/dist/components/Checkbox/Checkbox.d.ts +2 -1
- package/dist/components/Checkbox/Checkbox.styles.d.ts +4 -1
- package/dist/components/Flag/augment.d.ts +1 -1
- package/dist/components/FlexibleTable/types.d.ts +2 -2
- package/dist/components/Icon/complexIcons/augment.d.ts +1 -1
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/utils.d.ts +8 -0
- package/dist/true-react-common-ui-kit.js +183 -154
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +183 -154
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/vite-env.d.ts +1 -1
- package/package.json +91 -91
- package/src/components/AccountInfo/AccountInfo.stories.tsx +35 -35
- package/src/components/AccountInfo/AccountInfo.styles.ts +55 -55
- package/src/components/AccountInfo/AccountInfo.tsx +106 -106
- package/src/components/AccountInfo/index.ts +2 -2
- package/src/components/AddButton/AddButton.stories.tsx +21 -21
- package/src/components/AddButton/AddButton.styles.ts +34 -34
- package/src/components/AddButton/AddButton.tsx +49 -49
- package/src/components/AddButton/index.ts +2 -2
- package/src/components/Button/Button.stories.tsx +61 -61
- package/src/components/Button/Button.styles.ts +196 -196
- package/src/components/Button/Button.tsx +195 -195
- package/src/components/Button/index.ts +2 -2
- package/src/components/Checkbox/Checkbox.stories.tsx +35 -35
- package/src/components/Checkbox/Checkbox.styles.ts +62 -59
- package/src/components/Checkbox/Checkbox.tsx +106 -93
- package/src/components/Checkbox/index.ts +2 -2
- package/src/components/CloseButton/CloseButton.styles.ts +34 -34
- package/src/components/CloseButton/CloseButton.tsx +37 -37
- package/src/components/CloseButton/index.ts +2 -2
- package/src/components/Colors/Colors.stories.tsx +7 -7
- package/src/components/Colors/Colors.styles.ts +38 -38
- package/src/components/Colors/Colors.tsx +34 -34
- package/src/components/Colors/index.ts +2 -2
- package/src/components/CssBaseline/CssBaseline.styles.ts +15 -15
- package/src/components/CssBaseline/CssBaseline.tsx +17 -17
- package/src/components/CssBaseline/index.ts +2 -2
- package/src/components/DateInput/DateInput.stories.tsx +63 -63
- package/src/components/DateInput/DateInput.styles.ts +14 -14
- package/src/components/DateInput/DateInput.tsx +60 -60
- package/src/components/DateInput/index.ts +2 -2
- package/src/components/DatePicker/DatePicker.stories.tsx +96 -96
- package/src/components/DatePicker/DatePicker.styles.ts +54 -54
- package/src/components/DatePicker/DatePicker.tsx +358 -358
- package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.styles.ts +84 -84
- package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.tsx +94 -94
- package/src/components/DatePicker/DatePickerHeader/index.ts +1 -1
- package/src/components/DatePicker/DatePickerInput/DatePickerInput.styles.ts +25 -25
- package/src/components/DatePicker/DatePickerInput/DatePickerInput.tsx +31 -31
- package/src/components/DatePicker/DatePickerInput/index.ts +1 -1
- package/src/components/DatePicker/index.ts +4 -4
- package/src/components/Description/Description.stories.tsx +29 -29
- package/src/components/Description/Description.styles.ts +31 -31
- package/src/components/Description/Description.tsx +69 -69
- package/src/components/Description/index.ts +2 -2
- package/src/components/FiltersPane/FilterInterval/FilterInterval.styles.ts +64 -64
- package/src/components/FiltersPane/FilterInterval/FilterInterval.tsx +162 -162
- package/src/components/FiltersPane/FilterInterval/index.ts +1 -1
- package/src/components/FiltersPane/FilterMultiSelect/FilterMultiSelect.tsx +14 -14
- package/src/components/FiltersPane/FilterMultiSelect/index.ts +1 -1
- package/src/components/FiltersPane/FilterSelect/FilterSelect.styles.ts +144 -144
- package/src/components/FiltersPane/FilterSelect/FilterSelect.tsx +397 -397
- package/src/components/FiltersPane/FilterSelect/index.ts +1 -1
- package/src/components/FiltersPane/FilterSelect/locales.ts +37 -37
- package/src/components/FiltersPane/FilterValueView/FilterValueView.styles.tsx +15 -15
- package/src/components/FiltersPane/FilterValueView/FilterValueView.tsx +186 -186
- package/src/components/FiltersPane/FilterValueView/index.tsx +1 -1
- package/src/components/FiltersPane/FilterWithDates/FilterWithDates.styles.ts +60 -60
- package/src/components/FiltersPane/FilterWithDates/FilterWithDates.tsx +222 -222
- package/src/components/FiltersPane/FilterWithDates/index.ts +1 -1
- package/src/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.styles.ts +17 -17
- package/src/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.tsx +231 -231
- package/src/components/FiltersPane/FilterWithPeriod/index.ts +1 -1
- package/src/components/FiltersPane/FilterWrapper/FilterWrapper.styles.ts +110 -110
- package/src/components/FiltersPane/FilterWrapper/FilterWrapper.tsx +360 -360
- package/src/components/FiltersPane/FilterWrapper/index.ts +1 -1
- package/src/components/FiltersPane/FiltersPane.stories.tsx +308 -308
- package/src/components/FiltersPane/FiltersPane.styles.ts +71 -71
- package/src/components/FiltersPane/FiltersPane.tsx +193 -193
- package/src/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.styles.ts +109 -109
- package/src/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.tsx +175 -175
- package/src/components/FiltersPane/FiltersPaneSearch/index.ts +1 -1
- package/src/components/FiltersPane/index.ts +20 -20
- package/src/components/FiltersPane/locales.ts +107 -107
- package/src/components/FiltersPane/types.ts +126 -126
- package/src/components/Flag/Flag.stories.tsx +29 -29
- package/src/components/Flag/Flag.styles.ts +18 -18
- package/src/components/Flag/Flag.tsx +28 -28
- package/src/components/Flag/augment.d.ts +1 -1
- package/src/components/Flag/index.ts +2 -2
- package/src/components/FlexibleTable/FlexibleTable.stories.tsx +86 -80
- package/src/components/FlexibleTable/FlexibleTable.styles.ts +131 -131
- package/src/components/FlexibleTable/FlexibleTable.tsx +243 -243
- package/src/components/FlexibleTable/TableRow.tsx +171 -171
- package/src/components/FlexibleTable/TableValue.tsx +83 -83
- package/src/components/FlexibleTable/fixture-test.ts +254 -254
- package/src/components/FlexibleTable/index.ts +3 -3
- package/src/components/FlexibleTable/types.ts +58 -58
- package/src/components/Icon/ComplexIconBoilerplate.tsx +17 -17
- package/src/components/Icon/Icon.stories.tsx +88 -88
- package/src/components/Icon/Icon.styles.ts +10 -10
- package/src/components/Icon/Icon.tsx +34 -34
- package/src/components/Icon/IconBoilerplate.tsx +42 -42
- package/src/components/Icon/complexIcons/augment.d.ts +1 -1
- package/src/components/Icon/complexIcons/avatarGreen.svg +57 -57
- package/src/components/Icon/complexIcons/icons.ts +7 -7
- package/src/components/Icon/complexIcons/index.ts +1 -1
- package/src/components/Icon/icons/icons.ts +838 -838
- package/src/components/Icon/icons/index.ts +1 -1
- package/src/components/Icon/index.ts +4 -4
- package/src/components/IncrementInput/ChangeButton.tsx +34 -34
- package/src/components/IncrementInput/IncrementInput.stories.tsx +34 -34
- package/src/components/IncrementInput/IncrementInput.styles.ts +77 -77
- package/src/components/IncrementInput/IncrementInput.tsx +95 -95
- package/src/components/IncrementInput/index.ts +2 -2
- package/src/components/Input/Input.stories.tsx +92 -92
- package/src/components/Input/Input.styles.ts +305 -305
- package/src/components/Input/Input.tsx +318 -318
- package/src/components/Input/index.ts +2 -2
- package/src/components/List/List.stories.tsx +62 -62
- package/src/components/List/List.styles.ts +52 -52
- package/src/components/List/List.tsx +82 -82
- package/src/components/List/index.ts +2 -2
- package/src/components/Modal/Modal.stories.tsx +113 -113
- package/src/components/Modal/Modal.styles.ts +308 -308
- package/src/components/Modal/Modal.tsx +210 -210
- package/src/components/Modal/index.ts +2 -2
- package/src/components/MoreMenu/MoreMenu.stories.tsx +46 -46
- package/src/components/MoreMenu/MoreMenu.styles.ts +70 -70
- package/src/components/MoreMenu/MoreMenu.tsx +102 -102
- package/src/components/MoreMenu/index.ts +2 -2
- package/src/components/MultiSelect/MultiSelect.stories.tsx +46 -46
- package/src/components/MultiSelect/MultiSelect.styles.ts +55 -55
- package/src/components/MultiSelect/MultiSelect.tsx +98 -98
- package/src/components/MultiSelect/MultiSelectInput/MultiSelectInput.styles.ts +73 -73
- package/src/components/MultiSelect/MultiSelectInput/MultiSelectInput.tsx +62 -62
- package/src/components/MultiSelect/MultiSelectInput/index.ts +1 -1
- package/src/components/MultiSelect/index.ts +3 -3
- package/src/components/MultiSelectList/MultiSelectList.styles.ts +125 -125
- package/src/components/MultiSelectList/MultiSelectList.tsx +519 -519
- package/src/components/MultiSelectList/index.ts +2 -2
- package/src/components/MultiSelectList/locales.ts +37 -37
- package/src/components/Notification/Notification.stories.tsx +51 -51
- package/src/components/Notification/Notification.styles.ts +50 -50
- package/src/components/Notification/Notification.tsx +84 -84
- package/src/components/Notification/index.ts +2 -2
- package/src/components/NumberInput/NumberInput.stories.tsx +36 -36
- package/src/components/NumberInput/NumberInput.tsx +154 -154
- package/src/components/NumberInput/helpers.ts +87 -87
- package/src/components/NumberInput/index.ts +1 -1
- package/src/components/PhoneInput/PhoneInput.stories.tsx +71 -71
- package/src/components/PhoneInput/PhoneInput.styles.ts +84 -84
- package/src/components/PhoneInput/PhoneInput.tsx +223 -223
- package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.stories.tsx +21 -21
- package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.styles.ts +100 -100
- package/src/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.tsx +171 -171
- package/src/components/PhoneInput/PhoneInputCountryList/index.ts +2 -2
- package/src/components/PhoneInput/index.ts +6 -6
- package/src/components/PhoneInput/phone-info.ts +2167 -2167
- package/src/components/PhoneInput/types.ts +16 -16
- package/src/components/RadioButton/RadioButton.stories.tsx +46 -46
- package/src/components/RadioButton/RadioButton.styles.ts +37 -37
- package/src/components/RadioButton/RadioButton.tsx +56 -56
- package/src/components/RadioButton/index.ts +2 -2
- package/src/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.ts +66 -66
- package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
- package/src/components/SearchInput/SearchInput.stories.tsx +24 -24
- package/src/components/SearchInput/SearchInput.styles.ts +50 -50
- package/src/components/SearchInput/SearchInput.tsx +63 -63
- package/src/components/SearchInput/index.ts +2 -2
- package/src/components/Select/Select.stories.tsx +258 -258
- package/src/components/Select/Select.styles.ts +85 -85
- package/src/components/Select/Select.tsx +517 -508
- package/src/components/Select/SelectList/SelectList.styles.ts +68 -68
- package/src/components/Select/SelectList/SelectList.tsx +139 -139
- package/src/components/Select/SelectList/index.ts +1 -1
- package/src/components/Select/helpers.ts +21 -21
- package/src/components/Select/index.ts +3 -3
- package/src/components/SmartInput/SmartInput.stories.tsx +63 -63
- package/src/components/SmartInput/SmartInput.tsx +180 -180
- package/src/components/SmartInput/helpers.ts +85 -85
- package/src/components/SmartInput/index.ts +1 -1
- package/src/components/Switch/Switch.stories.tsx +40 -40
- package/src/components/Switch/Switch.styles.ts +75 -75
- package/src/components/Switch/Switch.tsx +89 -89
- package/src/components/Switch/index.ts +2 -2
- package/src/components/TextArea/TextArea.stories.tsx +35 -35
- package/src/components/TextArea/TextArea.styles.ts +153 -153
- package/src/components/TextArea/TextArea.tsx +178 -178
- package/src/components/TextArea/index.ts +2 -2
- package/src/components/TextWithInfo/TextWithInfo.stories.tsx +53 -53
- package/src/components/TextWithInfo/TextWithInfo.styles.ts +60 -60
- package/src/components/TextWithInfo/TextWithInfo.tsx +67 -67
- package/src/components/TextWithInfo/index.ts +2 -2
- package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +58 -58
- package/src/components/TextWithTooltip/TextWithTooltip.styles.ts +19 -19
- package/src/components/TextWithTooltip/TextWithTooltip.tsx +163 -163
- package/src/components/TextWithTooltip/index.ts +2 -2
- package/src/components/ThemedPreloader/ThemedPreloader.stories.tsx +41 -41
- package/src/components/ThemedPreloader/ThemedPreloader.styles.ts +21 -21
- package/src/components/ThemedPreloader/ThemedPreloader.tsx +56 -56
- package/src/components/ThemedPreloader/components/DefaultPreloader/DefaultPreloader.tsx +34 -34
- package/src/components/ThemedPreloader/components/DefaultPreloader/index.ts +1 -1
- package/src/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.ts +54 -54
- package/src/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.tsx +18 -18
- package/src/components/ThemedPreloader/components/DotsPreloader/index.ts +2 -2
- package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.ts +11 -11
- package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.tsx +32 -32
- package/src/components/ThemedPreloader/components/SvgPreloader/index.ts +2 -2
- package/src/components/ThemedPreloader/components/index.ts +2 -2
- package/src/components/ThemedPreloader/index.ts +2 -2
- package/src/components/Toaster/Toaster.stories.tsx +34 -34
- package/src/components/Toaster/Toaster.styles.ts +59 -59
- package/src/components/Toaster/Toaster.tsx +113 -113
- package/src/components/Toaster/index.ts +2 -2
- package/src/components/Tooltip/Tooltip.stories.tsx +21 -21
- package/src/components/Tooltip/Tooltip.styles.ts +45 -45
- package/src/components/Tooltip/Tooltip.tsx +40 -40
- package/src/components/Tooltip/index.ts +3 -3
- package/src/components/Tooltip/types.ts +1 -1
- package/src/components/index.ts +36 -36
- package/src/helpers/colors.ts +2 -2
- package/src/helpers/dateHelpers/date-helpers.ts +9 -9
- package/src/helpers/index.ts +4 -5
- package/src/helpers/phone.ts +106 -106
- package/src/helpers/popper-helpers.ts +17 -17
- package/src/helpers/snippets.tsx +5 -5
- package/src/helpers/utils.ts +219 -178
- package/src/hooks/index.ts +6 -6
- package/src/hooks/use-did-mount-effect.ts +21 -21
- package/src/hooks/use-dropdown.ts +85 -85
- package/src/hooks/use-is-mounted.ts +15 -15
- package/src/hooks/use-on-click-outside.ts +92 -92
- package/src/hooks/use-theme.ts +36 -36
- package/src/hooks/use-tweak-styles.ts +14 -14
- package/src/index.ts +6 -6
- package/src/theme.ts +155 -155
- package/src/types.ts +106 -106
- package/src/vite-env.d.ts +1 -1
- package/dist/helpers/data-attributes.d.ts +0 -5
- 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
|
|
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
|
-
|
|
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
|
|
5573
|
+
var hasAction = !isDisabled && !isReadonly;
|
|
5574
|
+
var onToggle = function() {
|
|
5575
|
+
var newValue = !isSelected;
|
|
5554
5576
|
onSelect({
|
|
5555
5577
|
value,
|
|
5556
|
-
isSelected:
|
|
5578
|
+
isSelected: newValue
|
|
5557
5579
|
});
|
|
5558
|
-
setIsSelected(
|
|
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
|
-
|
|
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
|
|
7724
|
-
if (!
|
|
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() {
|
|
@@ -7947,7 +7974,7 @@ function Select(_param) {
|
|
|
7947
7974
|
value: searchValue !== "" && !shouldRenderSearchInputInList ? searchValue : stringValue,
|
|
7948
7975
|
onChange: handleInputChange,
|
|
7949
7976
|
isActive: isListOpen,
|
|
7950
|
-
isReadonly: optionsMode === "normal" || shouldRenderSearchInputInList,
|
|
7977
|
+
isReadonly: isReadonly !== null && isReadonly !== void 0 ? isReadonly : optionsMode === "normal" || shouldRenderSearchInputInList,
|
|
7951
7978
|
onFocus: handleFocus,
|
|
7952
7979
|
onBlur: handleBlur,
|
|
7953
7980
|
isDisabled,
|
|
@@ -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,
|