@true-engineering/true-react-common-ui-kit 3.8.1 → 3.9.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/README.md +10 -0
- package/dist/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/NewMoreMenu/NewMoreMenu.styles.d.ts +3 -1
- package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +4 -4
- package/dist/components/Select/components/SelectList/SelectList.d.ts +5 -6
- package/dist/components/Select/components/SelectListItem/SelectListItem.d.ts +2 -2
- package/dist/components/WithPopup/WithPopup.styles.d.ts +1 -1
- package/dist/true-react-common-ui-kit.js +111 -86
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +111 -86
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/AccountInfo/AccountInfo.stories.tsx +32 -32
- package/src/components/AccountInfo/AccountInfo.tsx +80 -80
- package/src/components/AddButton/AddButton.stories.tsx +21 -21
- package/src/components/AddButton/AddButton.tsx +52 -52
- package/src/components/Button/Button.stories.tsx +56 -56
- package/src/components/Button/Button.tsx +129 -129
- package/src/components/Checkbox/Checkbox.stories.tsx +28 -28
- package/src/components/Checkbox/Checkbox.tsx +7 -4
- package/src/components/CloseButton/CloseButton.tsx +34 -34
- package/src/components/Colors/Colors.stories.tsx +7 -7
- package/src/components/DateInput/DateInput.tsx +90 -90
- package/src/components/DateInput/constants.ts +2 -2
- package/src/components/DatePicker/DatePicker.tsx +308 -308
- package/src/components/Description/Description.stories.tsx +27 -27
- package/src/components/Description/Description.tsx +61 -61
- package/src/components/FiltersPane/FiltersPane.tsx +158 -158
- package/src/components/FiltersPane/components/Filter/Filter.tsx +203 -203
- package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +166 -166
- package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.tsx +210 -210
- package/src/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.tsx +177 -177
- package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.tsx +167 -167
- package/src/components/Flag/Flag.stories.tsx +29 -29
- package/src/components/Flag/Flag.tsx +26 -26
- package/src/components/Flag/augment.d.ts +1 -1
- package/src/components/FlexibleTable/FlexibleTable.stories.tsx +267 -267
- package/src/components/FlexibleTable/FlexibleTable.styles.ts +110 -110
- package/src/components/FlexibleTable/FlexibleTable.tsx +271 -271
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.ts +38 -38
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.tsx +83 -83
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.styles.ts +25 -25
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +196 -196
- package/src/components/FlexibleTable/helpers.ts +13 -13
- package/src/components/FlexibleTable/types.ts +52 -52
- package/src/components/Icon/Icon.stories.tsx +86 -86
- package/src/components/Icon/complexIcons/augment.d.ts +1 -1
- package/src/components/Icon/complexIcons/avatarGreen.svg +57 -57
- package/src/components/Icon/complexIcons/index.ts +1 -1
- package/src/components/IncrementInput/IncrementInput.tsx +105 -105
- package/src/components/Input/Input.tsx +297 -297
- package/src/components/Input/types.ts +32 -32
- package/src/components/List/List.stories.tsx +70 -70
- package/src/components/List/List.tsx +33 -33
- package/src/components/List/components/ListItem/ListItem.tsx +57 -57
- package/src/components/Modal/Modal.stories.tsx +105 -105
- package/src/components/Modal/Modal.tsx +196 -196
- package/src/components/MoreMenu/MoreMenu.styles.ts +68 -68
- package/src/components/MultiSelect/MultiSelect.stories.tsx +46 -46
- package/src/components/MultiSelect/MultiSelect.tsx +106 -106
- package/src/components/MultiSelect/components/MultiSelectInput/MultiSelectInput.tsx +53 -53
- package/src/components/MultiSelectList/MultiSelectList.tsx +461 -461
- package/src/components/NewMoreMenu/NewMoreMenu.styles.ts +5 -5
- package/src/components/NewMoreMenu/NewMoreMenu.tsx +15 -1
- package/src/components/Notification/Notification.stories.tsx +46 -46
- package/src/components/Notification/Notification.tsx +69 -69
- package/src/components/NumberInput/NumberInput.tsx +137 -137
- package/src/components/NumberInput/index.ts +1 -1
- package/src/components/PhoneInput/PhoneInput.tsx +214 -214
- package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.tsx +155 -155
- package/src/components/PhoneInput/types.ts +16 -16
- package/src/components/RadioButton/RadioButton.stories.tsx +46 -46
- package/src/components/RadioButton/RadioButton.tsx +57 -57
- package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
- package/src/components/Select/CustomSelect.stories.tsx +217 -217
- package/src/components/Select/MultiSelect.stories.tsx +240 -240
- package/src/components/Select/Select.stories.tsx +235 -235
- package/src/components/Select/Select.tsx +57 -28
- package/src/components/Select/components/SelectList/SelectList.tsx +8 -9
- package/src/components/Select/components/SelectListItem/SelectListItem.tsx +7 -3
- package/src/components/Select/constants.ts +2 -2
- package/src/components/Select/types.ts +1 -1
- package/src/components/Selector/Selector.stories.tsx +62 -62
- package/src/components/Selector/Selector.styles.ts +164 -164
- package/src/components/Selector/Selector.tsx +115 -115
- package/src/components/Selector/index.ts +2 -2
- package/src/components/Selector/types.ts +12 -12
- package/src/components/Skeleton/Skeleton.stories.tsx +19 -19
- package/src/components/SmartInput/SmartInput.tsx +134 -134
- package/src/components/Status/Status.stories.tsx +73 -73
- package/src/components/Status/Status.styles.ts +143 -143
- package/src/components/Status/Status.tsx +49 -49
- package/src/components/Status/constants.ts +11 -11
- package/src/components/Status/index.ts +3 -3
- package/src/components/Status/types.ts +5 -5
- package/src/components/Switch/Switch.stories.tsx +40 -40
- package/src/components/Switch/Switch.tsx +75 -75
- package/src/components/TextArea/TextArea.tsx +180 -180
- package/src/components/TextButton/TextButton.stories.tsx +46 -46
- package/src/components/TextButton/TextButton.styles.ts +129 -129
- package/src/components/TextButton/TextButton.tsx +103 -103
- package/src/components/TextButton/index.ts +4 -4
- package/src/components/TextWithInfo/TextWithInfo.stories.tsx +53 -53
- package/src/components/TextWithInfo/TextWithInfo.tsx +62 -62
- package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +58 -58
- package/src/components/ThemedPreloader/ThemedPreloader.stories.tsx +41 -41
- package/src/components/ThemedPreloader/ThemedPreloader.tsx +54 -54
- package/src/components/ThemedPreloader/components/DefaultPreloader/index.ts +1 -1
- package/src/components/Toaster/Toaster.stories.tsx +30 -30
- package/src/components/Toaster/Toaster.tsx +108 -108
- package/src/components/Tooltip/Tooltip.stories.tsx +19 -19
- package/src/components/Tooltip/Tooltip.tsx +35 -35
- package/src/components/Tooltip/types.ts +1 -1
- package/src/components/WithPopup/WithPopup.styles.ts +4 -0
- package/src/components/WithPopup/WithPopup.tsx +6 -1
- package/src/helpers/popper-helpers.ts +17 -17
- package/src/hooks/use-dropdown.ts +84 -84
- package/src/hooks/use-is-mounted.ts +15 -15
- package/src/theme/helpers.ts +76 -76
- package/src/vite-env.d.ts +1 -1
|
@@ -6718,63 +6718,63 @@
|
|
|
6718
6718
|
return trueReactPlatformHelpers.mergeRefs(refs);
|
|
6719
6719
|
}, refs);
|
|
6720
6720
|
};
|
|
6721
|
-
const avatarGreen = ` <svg
|
|
6722
|
-
width="100%"
|
|
6723
|
-
height="100%"
|
|
6724
|
-
viewBox="0 0 32 32"
|
|
6725
|
-
fill="none"
|
|
6726
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
6727
|
-
|
|
6728
|
-
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED"
|
|
6729
|
-
<mask
|
|
6730
|
-
id="mask0_0_12744"
|
|
6731
|
-
style="mask-type: 'alpha';"
|
|
6732
|
-
maskUnits="userSpaceOnUse"
|
|
6733
|
-
x="0"
|
|
6734
|
-
y="0"
|
|
6735
|
-
width="32"
|
|
6736
|
-
height="32"
|
|
6737
|
-
|
|
6738
|
-
<circle cx="16" cy="16" r="16" fill="white"
|
|
6739
|
-
</mask
|
|
6740
|
-
<g mask="url(#mask0_0_12744)"
|
|
6741
|
-
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)"
|
|
6742
|
-
<mask
|
|
6743
|
-
id="mask1_0_12744"
|
|
6744
|
-
style="mask-type: 'alpha';"
|
|
6745
|
-
maskUnits="userSpaceOnUse"
|
|
6746
|
-
x="3"
|
|
6747
|
-
y="16"
|
|
6748
|
-
width="26"
|
|
6749
|
-
height="26"
|
|
6750
|
-
|
|
6751
|
-
<circle cx="16" cy="29" r="13" fill="white"
|
|
6752
|
-
</mask
|
|
6753
|
-
<g mask="url(#mask1_0_12744)"
|
|
6754
|
-
<ellipse
|
|
6755
|
-
cx="16"
|
|
6756
|
-
cy="17.5"
|
|
6757
|
-
rx="6"
|
|
6758
|
-
ry="7.5"
|
|
6759
|
-
fill="#505F79"
|
|
6760
|
-
fill-opacity="0.204983"
|
|
6761
|
-
|
|
6762
|
-
</g
|
|
6763
|
-
</g
|
|
6764
|
-
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white"
|
|
6765
|
-
<defs
|
|
6766
|
-
<linearGradient
|
|
6767
|
-
id="paint0_linear_0_12744"
|
|
6768
|
-
x1="13.347"
|
|
6769
|
-
y1="46.279"
|
|
6770
|
-
x2="33.5318"
|
|
6771
|
-
y2="30.8088"
|
|
6772
|
-
gradientUnits="userSpaceOnUse"
|
|
6773
|
-
|
|
6774
|
-
<stop stop-color="#ABD229"
|
|
6775
|
-
<stop offset="1" stop-color="#9CD03F"
|
|
6776
|
-
</linearGradient
|
|
6777
|
-
</defs
|
|
6721
|
+
const avatarGreen = ` <svg
|
|
6722
|
+
width="100%"
|
|
6723
|
+
height="100%"
|
|
6724
|
+
viewBox="0 0 32 32"
|
|
6725
|
+
fill="none"
|
|
6726
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6727
|
+
>
|
|
6728
|
+
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />
|
|
6729
|
+
<mask
|
|
6730
|
+
id="mask0_0_12744"
|
|
6731
|
+
style="mask-type: 'alpha';"
|
|
6732
|
+
maskUnits="userSpaceOnUse"
|
|
6733
|
+
x="0"
|
|
6734
|
+
y="0"
|
|
6735
|
+
width="32"
|
|
6736
|
+
height="32"
|
|
6737
|
+
>
|
|
6738
|
+
<circle cx="16" cy="16" r="16" fill="white" />
|
|
6739
|
+
</mask>
|
|
6740
|
+
<g mask="url(#mask0_0_12744)">
|
|
6741
|
+
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />
|
|
6742
|
+
<mask
|
|
6743
|
+
id="mask1_0_12744"
|
|
6744
|
+
style="mask-type: 'alpha';"
|
|
6745
|
+
maskUnits="userSpaceOnUse"
|
|
6746
|
+
x="3"
|
|
6747
|
+
y="16"
|
|
6748
|
+
width="26"
|
|
6749
|
+
height="26"
|
|
6750
|
+
>
|
|
6751
|
+
<circle cx="16" cy="29" r="13" fill="white" />
|
|
6752
|
+
</mask>
|
|
6753
|
+
<g mask="url(#mask1_0_12744)">
|
|
6754
|
+
<ellipse
|
|
6755
|
+
cx="16"
|
|
6756
|
+
cy="17.5"
|
|
6757
|
+
rx="6"
|
|
6758
|
+
ry="7.5"
|
|
6759
|
+
fill="#505F79"
|
|
6760
|
+
fill-opacity="0.204983"
|
|
6761
|
+
/>
|
|
6762
|
+
</g>
|
|
6763
|
+
</g>
|
|
6764
|
+
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />
|
|
6765
|
+
<defs>
|
|
6766
|
+
<linearGradient
|
|
6767
|
+
id="paint0_linear_0_12744"
|
|
6768
|
+
x1="13.347"
|
|
6769
|
+
y1="46.279"
|
|
6770
|
+
x2="33.5318"
|
|
6771
|
+
y2="30.8088"
|
|
6772
|
+
gradientUnits="userSpaceOnUse"
|
|
6773
|
+
>
|
|
6774
|
+
<stop stop-color="#ABD229" />
|
|
6775
|
+
<stop offset="1" stop-color="#9CD03F" />
|
|
6776
|
+
</linearGradient>
|
|
6777
|
+
</defs>
|
|
6778
6778
|
</svg>`;
|
|
6779
6779
|
var complexIcons = {
|
|
6780
6780
|
avatar: avatarGreen
|
|
@@ -9099,12 +9099,12 @@
|
|
|
9099
9099
|
});
|
|
9100
9100
|
var _useState = _sliced_to_array$o(React.useState(false), 2), isSelected = _useState[0], setIsSelected = _useState[1];
|
|
9101
9101
|
var hasAction = !isDisabled && !isReadonly;
|
|
9102
|
-
var onToggle = function() {
|
|
9102
|
+
var onToggle = function(event) {
|
|
9103
9103
|
var isSelectedNext = !isSelected;
|
|
9104
9104
|
onSelect({
|
|
9105
9105
|
value,
|
|
9106
9106
|
isSelected: isSelectedNext
|
|
9107
|
-
});
|
|
9107
|
+
}, event);
|
|
9108
9108
|
setIsSelected(isSelectedNext);
|
|
9109
9109
|
};
|
|
9110
9110
|
React.useEffect(function() {
|
|
@@ -10840,8 +10840,8 @@
|
|
|
10840
10840
|
isSemiChecked,
|
|
10841
10841
|
isDisabled,
|
|
10842
10842
|
tweakStyles: checkboxStyles$1,
|
|
10843
|
-
onSelect: function(v) {
|
|
10844
|
-
return onToggleCheckbox(index, v.isSelected);
|
|
10843
|
+
onSelect: function(v, event) {
|
|
10844
|
+
return onToggleCheckbox(index, v.isSelected, event);
|
|
10845
10845
|
},
|
|
10846
10846
|
children
|
|
10847
10847
|
}) : children
|
|
@@ -10963,7 +10963,7 @@
|
|
|
10963
10963
|
},
|
|
10964
10964
|
children: defaultOptionLabel
|
|
10965
10965
|
}),
|
|
10966
|
-
trueReactPlatformHelpers.
|
|
10966
|
+
trueReactPlatformHelpers.isReactNodeNotEmpty(allOptionsLabel) && /* @__PURE__ */ jsx(SelectListItem, {
|
|
10967
10967
|
classes,
|
|
10968
10968
|
index: ALL_OPTION_INDEX,
|
|
10969
10969
|
isSemiChecked: selectedOptionsCount > 0 && !areAllOptionsSelected,
|
|
@@ -11444,7 +11444,9 @@
|
|
|
11444
11444
|
var classes = useStyles$B({
|
|
11445
11445
|
theme: tweakStyles
|
|
11446
11446
|
});
|
|
11447
|
-
var
|
|
11447
|
+
var _ref = searchInput !== null && searchInput !== void 0 ? searchInput : {}, tmp = _ref.shouldRenderInList, shouldRenderSearchInputInList = tmp === void 0 ? false : tmp, searchInputProps = _object_without_properties$9(_ref, [
|
|
11448
|
+
"shouldRenderInList"
|
|
11449
|
+
]);
|
|
11448
11450
|
var hasSearchInputInList = optionsMode !== "normal" && shouldRenderSearchInputInList;
|
|
11449
11451
|
var isMultiSelect = isMultiSelectValue(props);
|
|
11450
11452
|
var hasReadonlyInput = isReadonly || optionsMode === "normal" || shouldRenderSearchInputInList;
|
|
@@ -11523,7 +11525,11 @@
|
|
|
11523
11525
|
return acc;
|
|
11524
11526
|
}, []));
|
|
11525
11527
|
}, [
|
|
11526
|
-
filteredOptions
|
|
11528
|
+
filteredOptions,
|
|
11529
|
+
hasDefaultOption,
|
|
11530
|
+
isOptionDisabled,
|
|
11531
|
+
shouldShowAllOption,
|
|
11532
|
+
shouldShowDefaultOption
|
|
11527
11533
|
]);
|
|
11528
11534
|
var stringValue = trueReactPlatformHelpers.isNotEmpty(strValue) ? convertValueToString(strValue) : void 0;
|
|
11529
11535
|
var showedStringValue = areAllOptionsSelected && trueReactPlatformHelpers.isNotEmpty(allOptionsLabel) ? allOptionsLabel : stringValue;
|
|
@@ -11566,9 +11572,9 @@
|
|
|
11566
11572
|
handleListClose(event);
|
|
11567
11573
|
}
|
|
11568
11574
|
};
|
|
11569
|
-
var handleOnChange = React.useCallback(function(newValue) {
|
|
11575
|
+
var handleOnChange = React.useCallback(function(newValue, event) {
|
|
11570
11576
|
if (!compareValuesOnChange(value, newValue)) {
|
|
11571
|
-
onChange(newValue);
|
|
11577
|
+
onChange(newValue, event);
|
|
11572
11578
|
}
|
|
11573
11579
|
}, [
|
|
11574
11580
|
value,
|
|
@@ -11577,7 +11583,7 @@
|
|
|
11577
11583
|
]);
|
|
11578
11584
|
var handleOptionSelect = React.useCallback(function(index, event) {
|
|
11579
11585
|
var _input_current;
|
|
11580
|
-
handleOnChange(index === DEFAULT_OPTION_INDEX ? void 0 : filteredOptions[index]);
|
|
11586
|
+
handleOnChange(index === DEFAULT_OPTION_INDEX ? void 0 : filteredOptions[index], event);
|
|
11581
11587
|
handleListClose(event);
|
|
11582
11588
|
(_input_current = input.current) === null || _input_current === void 0 ? void 0 : _input_current.blur();
|
|
11583
11589
|
}, [
|
|
@@ -11585,16 +11591,16 @@
|
|
|
11585
11591
|
handleListClose,
|
|
11586
11592
|
filteredOptions
|
|
11587
11593
|
]);
|
|
11588
|
-
var handleToggleOptionCheckbox = React.useCallback(function(index, isSelected) {
|
|
11594
|
+
var handleToggleOptionCheckbox = React.useCallback(function(index, isSelected, event) {
|
|
11589
11595
|
if (!isMultiSelect) {
|
|
11590
11596
|
return;
|
|
11591
11597
|
}
|
|
11592
11598
|
if (index === DEFAULT_OPTION_INDEX || index === ALL_OPTION_INDEX && !isSelected) {
|
|
11593
|
-
handleOnChange(void 0);
|
|
11599
|
+
handleOnChange(void 0, event);
|
|
11594
11600
|
return;
|
|
11595
11601
|
}
|
|
11596
11602
|
if (index === ALL_OPTION_INDEX && isSelected) {
|
|
11597
|
-
handleOnChange(availableOptions);
|
|
11603
|
+
handleOnChange(availableOptions, event);
|
|
11598
11604
|
return;
|
|
11599
11605
|
}
|
|
11600
11606
|
var option = filteredOptions[index];
|
|
@@ -11608,12 +11614,14 @@
|
|
|
11608
11614
|
value === null || value === void 0 ? void 0 : value.filter(function(o) {
|
|
11609
11615
|
return convertToId(o) !== convertToId(option);
|
|
11610
11616
|
})
|
|
11611
|
-
));
|
|
11617
|
+
), event);
|
|
11612
11618
|
}, [
|
|
11613
|
-
handleOnChange,
|
|
11614
|
-
filteredOptions,
|
|
11615
11619
|
isMultiSelect,
|
|
11616
|
-
|
|
11620
|
+
filteredOptions,
|
|
11621
|
+
handleOnChange,
|
|
11622
|
+
value,
|
|
11623
|
+
availableOptions,
|
|
11624
|
+
convertToId
|
|
11617
11625
|
]);
|
|
11618
11626
|
var handleOnType = React.useCallback(function() {
|
|
11619
11627
|
var _ref2 = _async_to_generator$4(function(v) {
|
|
@@ -11650,14 +11658,17 @@
|
|
|
11650
11658
|
return _ref2.apply(this, arguments);
|
|
11651
11659
|
};
|
|
11652
11660
|
}(), [
|
|
11661
|
+
isMounted,
|
|
11653
11662
|
onType,
|
|
11654
11663
|
optionsMode
|
|
11655
11664
|
]);
|
|
11656
|
-
var debounceHandleOnType = React.
|
|
11665
|
+
var debounceHandleOnType = React.useMemo(function() {
|
|
11666
|
+
return tsDebounce.debounce(handleOnType, debounceTime);
|
|
11667
|
+
}, [
|
|
11657
11668
|
handleOnType,
|
|
11658
11669
|
debounceTime
|
|
11659
11670
|
]);
|
|
11660
|
-
var handleInputChange = function(v) {
|
|
11671
|
+
var handleInputChange = function(v, event) {
|
|
11661
11672
|
if (onType !== void 0) {
|
|
11662
11673
|
debounceHandleOnType(v);
|
|
11663
11674
|
}
|
|
@@ -11665,7 +11676,7 @@
|
|
|
11665
11676
|
setShouldShowDefaultOption(v === "");
|
|
11666
11677
|
}
|
|
11667
11678
|
if (v === "" && !hasSearchInputInList) {
|
|
11668
|
-
handleOnChange(void 0);
|
|
11679
|
+
handleOnChange(void 0, event);
|
|
11669
11680
|
}
|
|
11670
11681
|
setSearchValue(v);
|
|
11671
11682
|
};
|
|
@@ -11695,7 +11706,7 @@
|
|
|
11695
11706
|
return convertToId(opt) === valueIdToSelect;
|
|
11696
11707
|
})) !== null && _value_some !== void 0 ? _value_some : false;
|
|
11697
11708
|
}
|
|
11698
|
-
handleToggleOptionCheckbox(indexToSelect, !isThisValueAlreadySelected);
|
|
11709
|
+
handleToggleOptionCheckbox(indexToSelect, !isThisValueAlreadySelected, event);
|
|
11699
11710
|
} else {
|
|
11700
11711
|
handleOptionSelect(indexToSelect, event);
|
|
11701
11712
|
}
|
|
@@ -11737,7 +11748,7 @@
|
|
|
11737
11748
|
hasSearchInputInList) && // Последняя проверка на случай, если мы че то ищем в опциях
|
|
11738
11749
|
(optionsMode === "normal" || hasEnoughSymbolsToSearch)
|
|
11739
11750
|
);
|
|
11740
|
-
var
|
|
11751
|
+
var _ref1 = dropdownOptions !== null && dropdownOptions !== void 0 ? dropdownOptions : {}, _ref_shouldUsePopper = _ref1.shouldUsePopper, shouldUsePopper = _ref_shouldUsePopper === void 0 ? false : _ref_shouldUsePopper, _ref_shouldRenderInBody = _ref1.shouldRenderInBody, shouldRenderInBody = _ref_shouldRenderInBody === void 0 ? false : _ref_shouldRenderInBody, _ref_shouldHideOnScroll = _ref1.shouldHideOnScroll, shouldHideOnScroll = _ref_shouldHideOnScroll === void 0 ? false : _ref_shouldHideOnScroll;
|
|
11741
11752
|
var popperData = useDropdown({
|
|
11742
11753
|
isOpen,
|
|
11743
11754
|
onDropdownClose: handleListClose,
|
|
@@ -11776,15 +11787,15 @@
|
|
|
11776
11787
|
}, popperData === null || popperData === void 0 ? void 0 : popperData.attributes.popper), {
|
|
11777
11788
|
children: isOpen && /* @__PURE__ */ jsx(SelectList, {
|
|
11778
11789
|
options: filteredOptions,
|
|
11779
|
-
defaultOptionLabel: hasDefaultOption && shouldShowDefaultOption
|
|
11780
|
-
allOptionsLabel: shouldShowAllOption
|
|
11790
|
+
defaultOptionLabel: hasDefaultOption && shouldShowDefaultOption && defaultOptionLabel,
|
|
11791
|
+
allOptionsLabel: shouldShowAllOption && allOptionsLabel,
|
|
11781
11792
|
areAllOptionsSelected,
|
|
11782
|
-
customListHeader: hasSearchInputInList
|
|
11793
|
+
customListHeader: hasSearchInputInList && /* @__PURE__ */ jsx(SearchInput, _object_spread$D({
|
|
11783
11794
|
value: searchValue,
|
|
11784
11795
|
onChange: handleInputChange,
|
|
11785
11796
|
tweakStyles: tweakSearchInputStyles,
|
|
11786
11797
|
placeholder: "Поиск"
|
|
11787
|
-
},
|
|
11798
|
+
}, searchInputProps)),
|
|
11788
11799
|
noMatchesLabel,
|
|
11789
11800
|
focusedIndex: focusedListCellIndex,
|
|
11790
11801
|
activeValue: value,
|
|
@@ -30075,6 +30086,9 @@
|
|
|
30075
30086
|
},
|
|
30076
30087
|
trigger: {
|
|
30077
30088
|
cursor: "pointer"
|
|
30089
|
+
},
|
|
30090
|
+
popup: {
|
|
30091
|
+
zIndex: 5
|
|
30078
30092
|
}
|
|
30079
30093
|
});
|
|
30080
30094
|
function _array_like_to_array(arr, len) {
|
|
@@ -30266,6 +30280,7 @@
|
|
|
30266
30280
|
root: !shouldRenderInBody ? refs.reference.current : void 0,
|
|
30267
30281
|
children: /* @__PURE__ */ jsx("div", _object_spread_props$1(_object_spread$1({
|
|
30268
30282
|
style: floatingStyles,
|
|
30283
|
+
className: classes.popup,
|
|
30269
30284
|
ref: refs.setFloating
|
|
30270
30285
|
}, getFloatingProps()), {
|
|
30271
30286
|
children: trueReactPlatformHelpers.isFunction(Popup) ? /* @__PURE__ */ jsx(Popup, {
|
|
@@ -30277,7 +30292,6 @@
|
|
|
30277
30292
|
}));
|
|
30278
30293
|
};
|
|
30279
30294
|
var useStyles = createThemedStyles("NewMoreMenu", {
|
|
30280
|
-
root: {},
|
|
30281
30295
|
hasCircle: {},
|
|
30282
30296
|
button: {
|
|
30283
30297
|
display: "flex",
|
|
@@ -30300,8 +30314,7 @@
|
|
|
30300
30314
|
active: {},
|
|
30301
30315
|
disabled: {
|
|
30302
30316
|
cursor: "default"
|
|
30303
|
-
}
|
|
30304
|
-
menu: {}
|
|
30317
|
+
}
|
|
30305
30318
|
});
|
|
30306
30319
|
function _define_property(obj, key, value) {
|
|
30307
30320
|
if (key in obj) {
|
|
@@ -30360,6 +30373,16 @@
|
|
|
30360
30373
|
var classes = useStyles({
|
|
30361
30374
|
theme: tweakStyles
|
|
30362
30375
|
});
|
|
30376
|
+
var tweakWithPopupStyles = useTweakStyles({
|
|
30377
|
+
tweakStyles,
|
|
30378
|
+
className: "tweakWithPopup",
|
|
30379
|
+
currentComponentName: "NewMoreMenu"
|
|
30380
|
+
});
|
|
30381
|
+
var tweakListStyles = useTweakStyles({
|
|
30382
|
+
tweakStyles,
|
|
30383
|
+
className: "tweakList",
|
|
30384
|
+
currentComponentName: "NewMoreMenu"
|
|
30385
|
+
});
|
|
30363
30386
|
var isButtonDisabled = isDisabled || !trueReactPlatformHelpers.isArrayNotEmpty(items);
|
|
30364
30387
|
return /* @__PURE__ */ jsx(WithPopup, {
|
|
30365
30388
|
placement,
|
|
@@ -30367,6 +30390,7 @@
|
|
|
30367
30390
|
shouldHideOnScroll,
|
|
30368
30391
|
shouldRenderInBody,
|
|
30369
30392
|
isDisabled: isButtonDisabled,
|
|
30393
|
+
tweakStyles: tweakWithPopupStyles,
|
|
30370
30394
|
trigger: function(param2) {
|
|
30371
30395
|
var isActive = param2.isActive;
|
|
30372
30396
|
var _obj;
|
|
@@ -30386,6 +30410,7 @@
|
|
|
30386
30410
|
var onClose = param2.onClose;
|
|
30387
30411
|
return /* @__PURE__ */ jsx(List, {
|
|
30388
30412
|
items,
|
|
30413
|
+
tweakStyles: tweakListStyles,
|
|
30389
30414
|
onClick: onClose
|
|
30390
30415
|
});
|
|
30391
30416
|
}
|