@fibery/ui-kit 1.25.1 → 1.26.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"src/antd/styles.ts",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"screenfull": "6.0.1",
|
|
70
70
|
"ua-parser-js": "0.7.24",
|
|
71
71
|
"@fibery/emoji-data": "2.3.0",
|
|
72
|
-
"@fibery/
|
|
73
|
-
"@fibery/
|
|
72
|
+
"@fibery/helpers": "1.2.0",
|
|
73
|
+
"@fibery/react": "1.3.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"react": "^18.2.0",
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
"svgo": "2.8.0",
|
|
104
104
|
"typescript": "5.1.6",
|
|
105
105
|
"unist-util-reduce": "0.2.2",
|
|
106
|
-
"@fibery/
|
|
107
|
-
"@fibery/
|
|
106
|
+
"@fibery/babel-preset": "7.3.0",
|
|
107
|
+
"@fibery/eslint-config": "8.5.0"
|
|
108
108
|
},
|
|
109
109
|
"jest": {
|
|
110
110
|
"testEnvironment": "jsdom",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {GroupHeadingProps, GroupProps, MenuListProps} from "react-select";
|
|
2
2
|
import {ItemContent, Virtuoso, VirtuosoHandle} from "react-virtuoso";
|
|
3
|
-
import {Children, ComponentType, ReactNode, useContext, useEffect, useRef, useState} from "react";
|
|
3
|
+
import {Children, ComponentType, CSSProperties, ReactNode, useContext, useEffect, useRef, useState} from "react";
|
|
4
4
|
import {GroupBase, ReactSelectRefContext} from "../util";
|
|
5
5
|
import {layout} from "../../../src/design-system";
|
|
6
6
|
import _, {isFunction, isObject} from "lodash";
|
|
@@ -54,17 +54,10 @@ export function MenuListVirtualized<
|
|
|
54
54
|
Option,
|
|
55
55
|
IsMulti extends boolean = boolean,
|
|
56
56
|
Group extends GroupBase<Option> = GroupBase<Option>
|
|
57
|
-
>({
|
|
58
|
-
children,
|
|
59
|
-
focusedOption,
|
|
60
|
-
innerRef,
|
|
61
|
-
maxHeight,
|
|
62
|
-
theme,
|
|
63
|
-
getStyles,
|
|
64
|
-
cx,
|
|
65
|
-
selectProps,
|
|
66
|
-
}: MenuListProps<Option, IsMulti, Group>) {
|
|
57
|
+
>(props: MenuListProps<Option, IsMulti, Group>) {
|
|
58
|
+
const {children, focusedOption, innerRef, maxHeight, theme, getStyles, cx, selectProps} = props;
|
|
67
59
|
const virtuoso = useRef<VirtuosoHandle>(null);
|
|
60
|
+
|
|
68
61
|
// options props come non-filtered and we have insufficient info (props) to render groups and options from here.
|
|
69
62
|
// Also you never know what contents also possible as list content.
|
|
70
63
|
// that's why it is better working with children and find options and groups among them (hope internal API does not change)
|
|
@@ -178,7 +171,7 @@ export function MenuListVirtualized<
|
|
|
178
171
|
}, [focusedOption, flattenChildren, menuHeight, initialFocusedOption, virtuoso]);
|
|
179
172
|
return (
|
|
180
173
|
// Needed for correct display inside portals and etc.
|
|
181
|
-
<div>
|
|
174
|
+
<div style={getStyles("menuList", props) as CSSProperties}>
|
|
182
175
|
<Virtuoso
|
|
183
176
|
ref={virtuoso}
|
|
184
177
|
// in reality only HTMLDiveElement | null will appear here. We do not use Virtuoso's useWindowScroll prop
|