@true-engineering/true-react-common-ui-kit 1.0.2 → 1.1.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/dist/components/AccountInfo/AccountInfo.d.ts +4 -4
- package/dist/components/AccountInfo/AccountInfo.styles.d.ts +60 -56
- package/dist/components/AddButton/AddButton.d.ts +6 -6
- package/dist/components/AddButton/AddButton.styles.d.ts +23 -23
- package/dist/components/Button/Button.d.ts +19 -33
- package/dist/components/Button/Button.styles.d.ts +144 -144
- package/dist/components/Checkbox/Checkbox.d.ts +16 -27
- package/dist/components/Checkbox/Checkbox.styles.d.ts +39 -42
- package/dist/components/CloseButton/CloseButton.d.ts +4 -4
- package/dist/components/CloseButton/CloseButton.styles.d.ts +22 -22
- package/dist/components/Colors/Colors.styles.d.ts +28 -28
- package/dist/components/CssBaseline/CssBaseline.d.ts +1 -1
- package/dist/components/CssBaseline/CssBaseline.styles.d.ts +7 -7
- package/dist/components/DateInput/DateInput.d.ts +8 -9
- package/dist/components/DateInput/DateInput.styles.d.ts +7 -7
- package/dist/components/DatePicker/DatePicker.d.ts +29 -36
- package/dist/components/DatePicker/DatePicker.styles.d.ts +38 -34
- package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.d.ts +9 -9
- package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.styles.d.ts +59 -59
- package/dist/components/DatePicker/DatePickerInput/DatePickerInput.d.ts +7 -9
- package/dist/components/DatePicker/DatePickerInput/DatePickerInput.styles.d.ts +16 -16
- package/dist/components/Description/Description.d.ts +6 -6
- package/dist/components/Description/Description.styles.d.ts +18 -18
- package/dist/components/FiltersPane/FilterInterval/FilterInterval.d.ts +19 -19
- package/dist/components/FiltersPane/FilterInterval/FilterInterval.styles.d.ts +44 -44
- package/dist/components/FiltersPane/FilterMultiSelect/FilterMultiSelect.d.ts +2 -8
- package/dist/components/FiltersPane/FilterSelect/FilterSelect.d.ts +17 -35
- package/dist/components/FiltersPane/FilterSelect/FilterSelect.styles.d.ts +111 -111
- package/dist/components/FiltersPane/FilterSelect/locales.d.ts +6 -10
- package/dist/components/FiltersPane/FilterValueView/FilterValueView.d.ts +1 -9
- package/dist/components/FiltersPane/FilterValueView/FilterValueView.styles.d.ts +8 -8
- package/dist/components/FiltersPane/FilterWithDates/FilterWithDates.d.ts +13 -21
- package/dist/components/FiltersPane/FilterWithDates/FilterWithDates.styles.d.ts +41 -41
- package/dist/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.d.ts +8 -8
- package/dist/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.styles.d.ts +7 -7
- package/dist/components/FiltersPane/FilterWrapper/FilterWrapper.d.ts +18 -41
- package/dist/components/FiltersPane/FilterWrapper/FilterWrapper.styles.d.ts +92 -92
- package/dist/components/FiltersPane/FiltersPane.d.ts +15 -34
- package/dist/components/FiltersPane/FiltersPane.styles.d.ts +50 -50
- package/dist/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.d.ts +18 -37
- package/dist/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.styles.d.ts +82 -82
- package/dist/components/FiltersPane/locales.d.ts +22 -28
- package/dist/components/FiltersPane/types.d.ts +38 -65
- package/dist/components/Flag/Flag.d.ts +2 -2
- package/dist/components/Flag/Flag.styles.d.ts +8 -8
- package/dist/components/FlexibleTable/FlexibleTable.d.ts +20 -45
- package/dist/components/FlexibleTable/FlexibleTable.styles.d.ts +93 -93
- package/dist/components/FlexibleTable/TableRow.d.ts +21 -38
- package/dist/components/FlexibleTable/TableValue.d.ts +16 -28
- package/dist/components/FlexibleTable/types.d.ts +31 -37
- package/dist/components/Icon/ComplexIconBoilerplate.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Icon/Icon.styles.d.ts +4 -4
- package/dist/components/Icon/IconBoilerplate.d.ts +1 -1
- package/dist/components/Icon/complexIcons/icons.d.ts +1 -1
- package/dist/components/Icon/icons/icons.d.ts +5 -97
- package/dist/components/IncrementInput/ChangeButton.d.ts +5 -5
- package/dist/components/IncrementInput/IncrementInput.d.ts +3 -4
- package/dist/components/IncrementInput/IncrementInput.styles.d.ts +52 -52
- package/dist/components/Input/Input.d.ts +37 -48
- package/dist/components/Input/Input.styles.d.ts +242 -242
- package/dist/components/List/List.d.ts +12 -12
- package/dist/components/List/List.styles.d.ts +35 -35
- package/dist/components/Modal/Modal.d.ts +19 -19
- package/dist/components/Modal/Modal.styles.d.ts +235 -235
- package/dist/components/MoreMenu/MoreMenu.d.ts +7 -7
- package/dist/components/MoreMenu/MoreMenu.styles.d.ts +45 -45
- package/dist/components/MultiSelect/MultiSelect.d.ts +13 -28
- package/dist/components/MultiSelect/MultiSelect.styles.d.ts +38 -38
- package/dist/components/MultiSelect/MultiSelectInput/MultiSelectInput.d.ts +6 -12
- package/dist/components/MultiSelect/MultiSelectInput/MultiSelectInput.styles.d.ts +58 -58
- package/dist/components/MultiSelectList/MultiSelectList.d.ts +20 -43
- package/dist/components/MultiSelectList/MultiSelectList.styles.d.ts +90 -90
- package/dist/components/MultiSelectList/locales.d.ts +6 -10
- package/dist/components/Notification/Notification.d.ts +9 -14
- package/dist/components/Notification/Notification.styles.d.ts +30 -33
- package/dist/components/NumberInput/NumberInput.d.ts +10 -16
- package/dist/components/NumberInput/helpers.d.ts +2 -10
- package/dist/components/PhoneInput/PhoneInput.d.ts +7 -14
- package/dist/components/PhoneInput/PhoneInput.styles.d.ts +60 -60
- package/dist/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.d.ts +7 -7
- package/dist/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.styles.d.ts +74 -78
- package/dist/components/PhoneInput/types.d.ts +11 -11
- package/dist/components/RadioButton/RadioButton.d.ts +8 -18
- package/dist/components/RadioButton/RadioButton.styles.d.ts +25 -25
- package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +374 -634
- package/dist/components/SearchInput/SearchInput.d.ts +2 -12
- package/dist/components/SearchInput/SearchInput.styles.d.ts +32 -32
- package/dist/components/Select/Select.d.ts +22 -50
- package/dist/components/Select/Select.styles.d.ts +53 -53
- package/dist/components/Select/SelectList/SelectList.d.ts +15 -30
- package/dist/components/Select/SelectList/SelectList.styles.d.ts +35 -37
- package/dist/components/Select/helpers.d.ts +2 -9
- package/dist/components/SmartInput/SmartInput.d.ts +16 -28
- package/dist/components/SmartInput/helpers.d.ts +4 -8
- package/dist/components/Switch/Switch.d.ts +13 -26
- package/dist/components/Switch/Switch.styles.d.ts +58 -58
- package/dist/components/TextArea/TextArea.d.ts +23 -26
- package/dist/components/TextArea/TextArea.styles.d.ts +124 -124
- package/dist/components/TextWithInfo/TextWithInfo.d.ts +9 -9
- package/dist/components/TextWithInfo/TextWithInfo.styles.d.ts +40 -40
- package/dist/components/TextWithTooltip/TextWithTooltip.d.ts +12 -12
- package/dist/components/TextWithTooltip/TextWithTooltip.styles.d.ts +10 -10
- package/dist/components/ThemedPreloader/ThemedPreloader.d.ts +4 -4
- package/dist/components/ThemedPreloader/ThemedPreloader.styles.d.ts +10 -10
- package/dist/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.d.ts +1 -1
- package/dist/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.d.ts +35 -35
- package/dist/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.d.ts +2 -2
- package/dist/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.d.ts +5 -5
- package/dist/components/Toaster/Toaster.d.ts +11 -16
- package/dist/components/Toaster/Toaster.styles.d.ts +41 -41
- package/dist/components/Tooltip/Tooltip.d.ts +4 -4
- package/dist/components/Tooltip/Tooltip.styles.d.ts +27 -25
- package/dist/helpers/data-attributes.d.ts +4 -11
- package/dist/helpers/phone.d.ts +8 -28
- package/dist/helpers/utils.d.ts +7 -28
- package/dist/hooks/use-did-mount-effect.d.ts +1 -4
- package/dist/hooks/use-dropdown.d.ts +7 -14
- package/dist/hooks/use-is-mounted.d.ts +1 -1
- package/dist/hooks/use-on-click-outside.d.ts +4 -25
- package/dist/hooks/use-theme.d.ts +5 -10
- package/dist/hooks/use-tweak-styles.d.ts +1 -5
- package/dist/style.css +90 -205
- package/dist/theme.d.ts +55 -51
- package/dist/true-react-common-ui-kit.js +16713 -24318
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +18 -16
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/types.d.ts +23 -77
- package/package.json +1 -1
- package/src/components/Select/Select.tsx +21 -13
- package/src/components/Select/SelectList/SelectList.tsx +8 -6
- package/src/components/Select/helpers.ts +9 -6
- package/src/components/SmartInput/SmartInput.tsx +130 -127
|
@@ -6961,7 +6961,7 @@
|
|
|
6961
6961
|
function SelectList(param) {
|
|
6962
6962
|
var options = param.options, onOptionClick = param.onOptionClick, focusedIndex = param.focusedIndex, activeValue = param.activeValue, defaultOptionLabel = param.defaultOptionLabel, _param_noMatchesLabel = param.noMatchesLabel, noMatchesLabel = _param_noMatchesLabel === void 0 ? "Совпадений не найдено" : _param_noMatchesLabel, isLoading = param.isLoading, _param_loadingLabel = param.loadingLabel, loadingLabel = _param_loadingLabel === void 0 ? "Загрузка..." : _param_loadingLabel, convertValueToString = param.convertValueToString, convertValueToReactNode = param.convertValueToReactNode, _param_convertValueToId = param.convertValueToId, convertValueToId = _param_convertValueToId === void 0 ? convertValueToString : _param_convertValueToId, tweakStyles = param.tweakStyles, testId = param.testId, _param_shouldScrollToList = param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList;
|
|
6963
6963
|
var classes = useTheme("SelectList", styles$v, tweakStyles).classes;
|
|
6964
|
-
var activeValueId = convertValueToId(activeValue);
|
|
6964
|
+
var activeValueId = isNotEmpty(activeValue) ? convertValueToId(activeValue) : void 0;
|
|
6965
6965
|
var convertedToStringOptions = React.useMemo(function() {
|
|
6966
6966
|
return options.map(convertValueToString);
|
|
6967
6967
|
}, [
|
|
@@ -7026,6 +7026,17 @@
|
|
|
7026
7026
|
})
|
|
7027
7027
|
});
|
|
7028
7028
|
}
|
|
7029
|
+
var defaultConvertFunction$2 = function(v) {
|
|
7030
|
+
return v === void 0 ? void 0 : String(v);
|
|
7031
|
+
};
|
|
7032
|
+
var defaultCompareFunction = function(v1, v2) {
|
|
7033
|
+
return v1 === v2;
|
|
7034
|
+
};
|
|
7035
|
+
var getActiveValueIndex = function(options, value, convertFunc) {
|
|
7036
|
+
return isNotEmpty(value) ? options.findIndex(function(o) {
|
|
7037
|
+
return convertFunc(o) === convertFunc(value);
|
|
7038
|
+
}) : -1;
|
|
7039
|
+
};
|
|
7029
7040
|
var styles$u = {
|
|
7030
7041
|
root: {
|
|
7031
7042
|
width: "100%",
|
|
@@ -7085,17 +7096,6 @@
|
|
|
7085
7096
|
},
|
|
7086
7097
|
tweakSelectList: {}
|
|
7087
7098
|
};
|
|
7088
|
-
var defaultConvertFunction$2 = function(v) {
|
|
7089
|
-
return v === void 0 ? void 0 : String(v);
|
|
7090
|
-
};
|
|
7091
|
-
var defaultCompareFunction = function(v1, v2) {
|
|
7092
|
-
return v1 === v2;
|
|
7093
|
-
};
|
|
7094
|
-
var getActiveValueIndex = function(options, value, convertFunc) {
|
|
7095
|
-
return options.findIndex(function(o) {
|
|
7096
|
-
return convertFunc(o) === convertFunc(value);
|
|
7097
|
-
});
|
|
7098
|
-
};
|
|
7099
7099
|
function _array_like_to_array$j(arr, len) {
|
|
7100
7100
|
if (len == null || len > arr.length)
|
|
7101
7101
|
len = arr.length;
|
|
@@ -7370,7 +7370,7 @@
|
|
|
7370
7370
|
}
|
|
7371
7371
|
};
|
|
7372
7372
|
function Select(_param) {
|
|
7373
|
-
var options = _param.options, value = _param.value, onChange = _param.onChange, _param_compareValuesOnChange = _param.compareValuesOnChange, compareValuesOnChange = _param_compareValuesOnChange === void 0 ? defaultCompareFunction : _param_compareValuesOnChange, _param_convertValueToString = _param.convertValueToString, convertValueToString = _param_convertValueToString === void 0 ? defaultConvertFunction$2 : _param_convertValueToString, convertValueToId = _param.convertValueToId, convertValueToReactNode = _param.convertValueToReactNode, defaultOptionLabel = _param.defaultOptionLabel, onFocus = _param.onFocus, onBlur = _param.onBlur, onType = _param.onType, onOpen = _param.onOpen, _param_debounceTime = _param.debounceTime, debounceTime = _param_debounceTime === void 0 ? 400 : _param_debounceTime, _param_optionsMode = _param.optionsMode, optionsMode = _param_optionsMode === void 0 ? "normal" : _param_optionsMode, optionsFilter = _param.optionsFilter, noMatchesLabel = _param.noMatchesLabel, loadingLabel = _param.loadingLabel, tweakStyles = _param.tweakStyles, testId = _param.testId, isDisabled = _param.isDisabled, dropdownOptions = _param.dropdownOptions, _param_minSymbolsCountToOpenList = _param.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _param_minSymbolsCountToOpenList === void 0 ? 0 : _param_minSymbolsCountToOpenList, _param_dropdownIcon = _param.dropdownIcon, dropdownIcon = _param_dropdownIcon === void 0 ? "chevron-down" : _param_dropdownIcon, inputProps = _object_without_properties$6(_param, [
|
|
7373
|
+
var options = _param.options, value = _param.value, onChange = _param.onChange, _param_compareValuesOnChange = _param.compareValuesOnChange, compareValuesOnChange = _param_compareValuesOnChange === void 0 ? defaultCompareFunction : _param_compareValuesOnChange, _param_convertValueToString = _param.convertValueToString, convertValueToString = _param_convertValueToString === void 0 ? defaultConvertFunction$2 : _param_convertValueToString, convertValueToId = _param.convertValueToId, convertValueToReactNode = _param.convertValueToReactNode, defaultOptionLabel = _param.defaultOptionLabel, onFocus = _param.onFocus, onBlur = _param.onBlur, onType = _param.onType, onOpen = _param.onOpen, _param_debounceTime = _param.debounceTime, debounceTime = _param_debounceTime === void 0 ? 400 : _param_debounceTime, _param_optionsMode = _param.optionsMode, optionsMode = _param_optionsMode === void 0 ? "normal" : _param_optionsMode, optionsFilter = _param.optionsFilter, noMatchesLabel = _param.noMatchesLabel, loadingLabel = _param.loadingLabel, tweakStyles = _param.tweakStyles, testId = _param.testId, isDisabled = _param.isDisabled, dropdownOptions = _param.dropdownOptions, _param_minSymbolsCountToOpenList = _param.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _param_minSymbolsCountToOpenList === void 0 ? 0 : _param_minSymbolsCountToOpenList, _param_dropdownIcon = _param.dropdownIcon, dropdownIcon = _param_dropdownIcon === void 0 ? "chevron-down" : _param_dropdownIcon, _param_shouldScrollToList = _param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, inputProps = _object_without_properties$6(_param, [
|
|
7374
7374
|
"options",
|
|
7375
7375
|
"value",
|
|
7376
7376
|
"onChange",
|
|
@@ -7393,7 +7393,8 @@
|
|
|
7393
7393
|
"isDisabled",
|
|
7394
7394
|
"dropdownOptions",
|
|
7395
7395
|
"minSymbolsCountToOpenList",
|
|
7396
|
-
"dropdownIcon"
|
|
7396
|
+
"dropdownIcon",
|
|
7397
|
+
"shouldScrollToList"
|
|
7397
7398
|
]);
|
|
7398
7399
|
var _useTheme = useTheme("Select", styles$u, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
7399
7400
|
var isMounted = useIsMounted();
|
|
@@ -7406,6 +7407,7 @@
|
|
|
7406
7407
|
var inputWrapper = React.useRef(null);
|
|
7407
7408
|
var list = React.useRef(null);
|
|
7408
7409
|
var input = React.useRef(null);
|
|
7410
|
+
var stringValue = isNotEmpty(value) ? convertValueToString(value) : void 0;
|
|
7409
7411
|
var filteredOptions = React.useMemo(function() {
|
|
7410
7412
|
if (optionsMode !== "search") {
|
|
7411
7413
|
return options;
|
|
@@ -7649,7 +7651,7 @@
|
|
|
7649
7651
|
ref: inputWrapper,
|
|
7650
7652
|
children: [
|
|
7651
7653
|
/* @__PURE__ */ jsx(Input, _object_spread$v({
|
|
7652
|
-
value: searchValue !== "" ? searchValue :
|
|
7654
|
+
value: searchValue !== "" ? searchValue : stringValue,
|
|
7653
7655
|
onChange: handleInputChange,
|
|
7654
7656
|
isActive: isListOpen,
|
|
7655
7657
|
isReadonly: optionsMode === "normal",
|
|
@@ -7698,7 +7700,7 @@
|
|
|
7698
7700
|
loadingLabel,
|
|
7699
7701
|
tweakStyles: tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakSelectList,
|
|
7700
7702
|
testId: testId !== void 0 ? "".concat(testId, "-list") : void 0,
|
|
7701
|
-
shouldScrollToList: !shouldUsePopper && !shouldHideOnScroll
|
|
7703
|
+
shouldScrollToList: shouldScrollToList && !shouldUsePopper && !shouldHideOnScroll
|
|
7702
7704
|
})
|
|
7703
7705
|
}))
|
|
7704
7706
|
})
|