@semcore/dropdown-menu 16.2.2 → 17.0.0-prerelease.17
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/CHANGELOG.md +6 -0
- package/lib/cjs/DropdownMenu.js +394 -467
- package/lib/cjs/DropdownMenu.js.map +1 -1
- package/lib/cjs/components/Context.js +8 -8
- package/lib/cjs/components/Context.js.map +1 -1
- package/lib/cjs/components/VirtualList.js +98 -115
- package/lib/cjs/components/VirtualList.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +3 -3
- package/lib/cjs/style/dropdown-menu.shadow.css +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/DropdownMenu.js +378 -455
- package/lib/es6/DropdownMenu.js.map +1 -1
- package/lib/es6/components/Context.js +6 -7
- package/lib/es6/components/Context.js.map +1 -1
- package/lib/es6/components/VirtualList.js +95 -112
- package/lib/es6/components/VirtualList.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/style/dropdown-menu.shadow.css +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +15 -15
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/DropdownMenu.mjs +363 -374
- package/lib/esm/components/Context.mjs +6 -7
- package/lib/esm/components/VirtualList.mjs +97 -99
- package/lib/esm/style/dropdown-menu.shadow.css +1 -1
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/types/index.d.ts +3 -79
- package/package.json +11 -13
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { hideScrollBarsFromScreenReadersContext } from "@semcore/
|
|
1
|
+
import { hideScrollBarsFromScreenReadersContext } from "@semcore/base-components";
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
3
|
+
const ListBoxContextProvider = ({
|
|
4
|
+
children
|
|
5
|
+
}) => /* @__PURE__ */ React.createElement(hideScrollBarsFromScreenReadersContext.Provider, {
|
|
6
|
+
value: true
|
|
7
|
+
}, children);
|
|
9
8
|
export {
|
|
10
9
|
ListBoxContextProvider
|
|
11
10
|
};
|
|
@@ -1,135 +1,133 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import { createComponent, sstyled, assignProps
|
|
8
|
-
import { Box } from "@semcore/base-components";
|
|
9
|
-
import ScrollAreaComponent from "@semcore/scroll-area";
|
|
2
|
+
import { createComponent, Component, sstyled, assignProps } from "@semcore/core";
|
|
3
|
+
import { ScrollArea, Box } from "@semcore/base-components";
|
|
10
4
|
import React from "react";
|
|
11
5
|
import { ListBoxContextProvider } from "./Context.mjs";
|
|
12
6
|
/*!__reshadow-styles__:"../style/dropdown-menu.shadow.css"*/
|
|
13
|
-
|
|
7
|
+
const style = (
|
|
14
8
|
/*__reshadow_css_start__*/
|
|
15
9
|
(sstyled.insert(
|
|
16
10
|
/*__inner_css_start__*/
|
|
17
|
-
".
|
|
11
|
+
".___SDropdownMenuList_1r615_gg_{max-height:240px;padding:var(--intergalactic-spacing-1x, 4px)0;position:relative;min-height:26px;min-width:32px;box-sizing:content-box;z-index:0;color:var(--intergalactic-text-primary, #191b23)}.___SDropdownMenuList_1r615_gg_ .___SBar_1r615_gg_{z-index:3}.___SDropdownMenuList_1r615_gg_ .___SShadowHorizontal_1r615_gg_:after,.___SDropdownMenuList_1r615_gg_ .___SShadowHorizontal_1r615_gg_:before,.___SDropdownMenuList_1r615_gg_ .___SShadowVertical_1r615_gg_:after,.___SDropdownMenuList_1r615_gg_ .___SShadowVertical_1r615_gg_:before{border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuItemContainer_1r615_gg_ .___SItemContent_1r615_gg_:focus-visible{outline:0}.___SDropdownMenuItemContainer_1r615_gg_.__nesting-trigger_1r615_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1r615_gg_,.___SItemContentText_1r615_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_1r615_gg_:first-child,.___SItemContentText_1r615_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1r615_gg_:last-child,.___SItemContentText_1r615_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1r615_gg_,.___SDropdownMenuNesting_1r615_gg_._size_l_1r615_gg_,.___SDropdownMenuNesting_1r615_gg_._size_m_1r615_gg_{padding:0}.___SDropdownMenuNesting_1r615_gg_.__highlighted_1r615_gg_{z-index:1;outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SDropdownNestingItem_1r615_gg_._size_l_1r615_gg_,.___SDropdownNestingItem_1r615_gg_._size_m_1r615_gg_{padding-right:0}.___SDropdownNestingItem_1r615_gg_ .___SDropdownMenuItemContainer_1r615_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemHint_1r615_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}",
|
|
18
12
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
13
|
+
"1r615_gg_"
|
|
20
14
|
), /*__reshadow_css_end__*/
|
|
21
15
|
{
|
|
22
|
-
"__SDropdownMenuItemContainer": "
|
|
23
|
-
"_nesting-trigger": "__nesting-
|
|
24
|
-
"__SDropdownMenuNesting": "
|
|
25
|
-
"_size_l": "
|
|
26
|
-
"_size_m": "
|
|
27
|
-
"_highlighted": "
|
|
28
|
-
"__SDropdownNestingItem": "
|
|
29
|
-
"__SItemHint": "
|
|
30
|
-
"__SDropdownMenuList": "
|
|
31
|
-
"__SBar": "
|
|
32
|
-
"__SShadowHorizontal": "
|
|
33
|
-
"__SShadowVertical": "
|
|
34
|
-
"__SItemContent": "
|
|
35
|
-
"__SDropdownMenuItemAddon": "
|
|
36
|
-
"__SItemContentText": "
|
|
16
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1r615_gg_",
|
|
17
|
+
"_nesting-trigger": "__nesting-trigger_1r615_gg_",
|
|
18
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1r615_gg_",
|
|
19
|
+
"_size_l": "_size_l_1r615_gg_",
|
|
20
|
+
"_size_m": "_size_m_1r615_gg_",
|
|
21
|
+
"_highlighted": "__highlighted_1r615_gg_",
|
|
22
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1r615_gg_",
|
|
23
|
+
"__SItemHint": "___SItemHint_1r615_gg_",
|
|
24
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1r615_gg_",
|
|
25
|
+
"__SBar": "___SBar_1r615_gg_",
|
|
26
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1r615_gg_",
|
|
27
|
+
"__SShadowVertical": "___SShadowVertical_1r615_gg_",
|
|
28
|
+
"__SItemContent": "___SItemContent_1r615_gg_",
|
|
29
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1r615_gg_",
|
|
30
|
+
"__SItemContentText": "___SItemContentText_1r615_gg_"
|
|
37
31
|
})
|
|
38
32
|
);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
_this = _callSuper(this, VirtualListRoot2, [].concat(args));
|
|
47
|
-
_defineProperty(_this, "containerRef", /* @__PURE__ */ React.createRef());
|
|
48
|
-
_defineProperty(_this, "listRef", /* @__PURE__ */ React.createRef());
|
|
49
|
-
_defineProperty(_this, "state", {
|
|
33
|
+
class VirtualListRoot extends Component {
|
|
34
|
+
constructor(...args) {
|
|
35
|
+
super(...args);
|
|
36
|
+
_defineProperty(this, "containerRef", /* @__PURE__ */ React.createRef());
|
|
37
|
+
_defineProperty(this, "listRef", /* @__PURE__ */ React.createRef());
|
|
38
|
+
_defineProperty(this, "state", {
|
|
50
39
|
scrollTop: 0,
|
|
51
40
|
scrollDirection: "down"
|
|
52
41
|
});
|
|
53
|
-
_defineProperty(
|
|
42
|
+
_defineProperty(this, "handleScroll", (e) => {
|
|
54
43
|
if (e.target instanceof HTMLElement) {
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
const scrollDirection = e.target.scrollTop > this.state.scrollTop ? "down" : "up";
|
|
45
|
+
this.setState({
|
|
57
46
|
scrollDirection,
|
|
58
47
|
scrollTop: e.target.scrollTop
|
|
59
48
|
});
|
|
60
49
|
}
|
|
61
50
|
});
|
|
62
|
-
return _this;
|
|
63
51
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
52
|
+
componentDidMount() {
|
|
53
|
+
const {
|
|
54
|
+
index,
|
|
55
|
+
rowHeight,
|
|
56
|
+
rowsBuffer
|
|
57
|
+
} = this.asProps;
|
|
58
|
+
setTimeout(() => {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
const listHeight = (((_a = this.listRef.current) == null ? void 0 : _a.getBoundingClientRect().height) ?? 0) / 2;
|
|
61
|
+
(_b = this.containerRef.current) == null ? void 0 : _b.scrollTo({
|
|
62
|
+
top: index * rowHeight - listHeight + rowHeight / 2
|
|
63
|
+
});
|
|
64
|
+
if (index <= rowsBuffer) {
|
|
65
|
+
this.forceUpdate();
|
|
66
|
+
}
|
|
67
|
+
}, 10);
|
|
68
|
+
}
|
|
69
|
+
render() {
|
|
70
|
+
var _a;
|
|
71
|
+
var _ref = this.asProps, _ref2;
|
|
72
|
+
const SDropdownMenuList = ScrollArea;
|
|
73
|
+
const SBar = ScrollArea.Bar;
|
|
74
|
+
const {
|
|
75
|
+
scrollDirection,
|
|
76
|
+
scrollTop
|
|
77
|
+
} = this.state;
|
|
78
|
+
const {
|
|
79
|
+
rows,
|
|
80
|
+
rowHeight,
|
|
81
|
+
rowsBuffer,
|
|
82
|
+
styles,
|
|
83
|
+
renderRow: RenderRow,
|
|
84
|
+
customData
|
|
85
|
+
} = this.asProps;
|
|
86
|
+
const offsetHeight = ((_a = this.listRef.current) == null ? void 0 : _a.offsetHeight) ?? 0;
|
|
87
|
+
const prevPrepared = scrollDirection === "down" ? rowsBuffer / 2 : rowsBuffer;
|
|
88
|
+
const nextPrepared = scrollDirection === "up" ? rowsBuffer / 2 : rowsBuffer;
|
|
89
|
+
const startIndex = Math.max(Math.floor(scrollTop / rowHeight) - prevPrepared, 0);
|
|
90
|
+
const lastIndex = Math.min(Math.ceil((scrollTop + offsetHeight) / rowHeight) + nextPrepared, rows.length);
|
|
91
|
+
const rowsToRender = rows.slice(startIndex, lastIndex);
|
|
92
|
+
const rowMarginTop = rowHeight * startIndex;
|
|
93
|
+
const rowMarginBottom = rowHeight * (rows.length - lastIndex);
|
|
94
|
+
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(ListBoxContextProvider, _ref2.cn("ListBoxContextProvider", {}), /* @__PURE__ */ React.createElement(SDropdownMenuList, _ref2.cn("SDropdownMenuList", {
|
|
95
|
+
...assignProps({
|
|
98
96
|
"shadow": true,
|
|
99
97
|
"shadowSize": 16,
|
|
100
98
|
"shadowTheme": "light",
|
|
101
99
|
"onScroll": this.handleScroll,
|
|
102
100
|
"data-is-virtual": "true",
|
|
103
101
|
"ref": this.listRef
|
|
104
|
-
}, _ref)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
102
|
+
}, _ref)
|
|
103
|
+
}), /* @__PURE__ */ React.createElement(ScrollArea.Container, {
|
|
104
|
+
ref: this.containerRef,
|
|
105
|
+
tabIndex: void 0,
|
|
106
|
+
h: rows.length * rowHeight
|
|
107
|
+
}, /* @__PURE__ */ React.createElement(Box, _ref2.cn("Box", {
|
|
108
|
+
"h": rowMarginTop
|
|
109
|
+
})), rowsToRender.map((item, index) => {
|
|
110
|
+
return /* @__PURE__ */ React.createElement(RenderRow, {
|
|
111
|
+
key: startIndex + index,
|
|
112
|
+
row: item,
|
|
113
|
+
index: startIndex + index,
|
|
114
|
+
data: customData
|
|
115
|
+
});
|
|
116
|
+
}), /* @__PURE__ */ React.createElement(Box, _ref2.cn("Box", {
|
|
117
|
+
"h": rowMarginBottom
|
|
118
|
+
}))), /* @__PURE__ */ React.createElement(SBar, _ref2.cn("SBar", {
|
|
119
|
+
"orientation": "horizontal"
|
|
120
|
+
})), /* @__PURE__ */ React.createElement(SBar, _ref2.cn("SBar", {
|
|
121
|
+
"orientation": "vertical"
|
|
122
|
+
}))));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
127
125
|
_defineProperty(VirtualListRoot, "displayName", "VirtualList");
|
|
128
126
|
_defineProperty(VirtualListRoot, "style", style);
|
|
129
127
|
_defineProperty(VirtualListRoot, "defaultProps", {
|
|
130
128
|
rowsBuffer: 6
|
|
131
129
|
});
|
|
132
|
-
|
|
130
|
+
const VirtualList = createComponent(VirtualListRoot);
|
|
133
131
|
export {
|
|
134
132
|
VirtualList
|
|
135
133
|
};
|
|
@@ -41,7 +41,7 @@ SDropdownMenuItemContainer[nesting-trigger] {
|
|
|
41
41
|
|
|
42
42
|
SDropdownMenuItemAddon,
|
|
43
43
|
SItemContentText {
|
|
44
|
-
display: inline-flex;
|
|
44
|
+
display: inline-flex; /* todo: Brauer Ilia - why? should be changed to inline/inline-block for SItemContentText */
|
|
45
45
|
margin-left: var(--intergalactic-spacing-1x, 4px);
|
|
46
46
|
margin-right: var(--intergalactic-spacing-1x, 4px);
|
|
47
47
|
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Box, BoxProps, FlexProps, Flex, eventInteraction, ScrollAreaProps } from '@semcore/base-components';
|
|
2
|
+
import type { PropGetterFn, Intergalactic } from '@semcore/core';
|
|
2
3
|
import type {
|
|
3
4
|
DropdownContext,
|
|
4
5
|
DropdownProps,
|
|
@@ -7,17 +8,12 @@ import type {
|
|
|
7
8
|
DropdownPopperAriaProps,
|
|
8
9
|
} from '@semcore/dropdown';
|
|
9
10
|
import type Dropdown from '@semcore/dropdown';
|
|
10
|
-
import type { Box, BoxProps, FlexProps, Flex } from '@semcore/flex-box';
|
|
11
|
-
import type { eventInteraction } from '@semcore/popper';
|
|
12
|
-
import type { ScrollAreaProps } from '@semcore/scroll-area';
|
|
13
11
|
import type { Text } from '@semcore/typography';
|
|
14
12
|
|
|
15
13
|
import type { VirtualList, RenderRowProps } from './components/VirtualList';
|
|
16
14
|
|
|
17
15
|
export type DropdownMenuSize = 'm' | 'l';
|
|
18
16
|
|
|
19
|
-
/** @deprecated */
|
|
20
|
-
export interface IDropdownMenuProps extends DropdownMenuProps, UnknownProperties {}
|
|
21
17
|
export type DropdownMenuProps = DropdownProps & {
|
|
22
18
|
/**
|
|
23
19
|
* Set role `menuitemradio` (or `menuitemcheckbox` if `multiselect`) for Dropdown.Item
|
|
@@ -58,8 +54,6 @@ export type DropdownMenuProps = DropdownProps & {
|
|
|
58
54
|
itemsCount?: number;
|
|
59
55
|
};
|
|
60
56
|
|
|
61
|
-
/** @deprecated */
|
|
62
|
-
export interface IDropdownMenuListProps extends DropdownMenuListProps, UnknownProperties {}
|
|
63
57
|
export type DropdownMenuListProps = BoxProps &
|
|
64
58
|
ScrollAreaProps & {
|
|
65
59
|
/**
|
|
@@ -69,12 +63,8 @@ export type DropdownMenuListProps = BoxProps &
|
|
|
69
63
|
size?: DropdownMenuSize;
|
|
70
64
|
};
|
|
71
65
|
|
|
72
|
-
/** @deprecated */
|
|
73
|
-
export interface IDropdownMenuMenuProps extends DropdownMenuMenuProps, UnknownProperties {}
|
|
74
66
|
export type DropdownMenuMenuProps = DropdownMenuListProps & {};
|
|
75
67
|
|
|
76
|
-
/** @deprecated */
|
|
77
|
-
export interface IDropdownMenuItemProps extends DropdownMenuItemProps, UnknownProperties {}
|
|
78
68
|
export type DropdownMenuItemProps = FlexProps & {
|
|
79
69
|
/**
|
|
80
70
|
* Enables selected state. For selectable dropdowns only.
|
|
@@ -84,16 +74,6 @@ export type DropdownMenuItemProps = FlexProps & {
|
|
|
84
74
|
* Disables item
|
|
85
75
|
*/
|
|
86
76
|
disabled?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Adds focus styles around
|
|
89
|
-
* @deprecated set focus manually by `.focus()` method to the same behaviour
|
|
90
|
-
*/
|
|
91
|
-
highlighted?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Disables hover state
|
|
94
|
-
* @deprecated use `disabled` instead
|
|
95
|
-
*/
|
|
96
|
-
notInteractive?: boolean;
|
|
97
77
|
/**
|
|
98
78
|
* Size of the component
|
|
99
79
|
* @default m
|
|
@@ -105,30 +85,6 @@ export type DropdownMenuItemProps = FlexProps & {
|
|
|
105
85
|
index?: number;
|
|
106
86
|
};
|
|
107
87
|
|
|
108
|
-
/** @deprecated */
|
|
109
|
-
export interface IDropdownMenuItemHintProps extends DropdownMenuItemHintProps, UnknownProperties {}
|
|
110
|
-
export type DropdownMenuItemHintProps = FlexProps & {
|
|
111
|
-
/**
|
|
112
|
-
* Size of the component
|
|
113
|
-
* @default m
|
|
114
|
-
*/
|
|
115
|
-
size?: DropdownMenuSize;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
/** @deprecated */
|
|
119
|
-
export interface IDropdownMenuItemTitleProps
|
|
120
|
-
extends DropdownMenuItemTitleProps,
|
|
121
|
-
UnknownProperties {}
|
|
122
|
-
export type DropdownMenuItemTitleProps = FlexProps & {
|
|
123
|
-
/**
|
|
124
|
-
* Size of the component
|
|
125
|
-
* @default m
|
|
126
|
-
*/
|
|
127
|
-
size?: DropdownMenuSize;
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
/** @deprecated */
|
|
131
|
-
export interface IDropdownMenuContext extends DropdownMenuContext, UnknownProperties {}
|
|
132
88
|
export type DropdownMenuContext = DropdownContext & {
|
|
133
89
|
/**
|
|
134
90
|
* Tracks which menu item is currently highlighted/focused for keyboard navigation
|
|
@@ -152,8 +108,6 @@ export type DropdownMenuContext = DropdownContext & {
|
|
|
152
108
|
getItemTitleProps: PropGetterFn;
|
|
153
109
|
};
|
|
154
110
|
|
|
155
|
-
/** @deprecated */
|
|
156
|
-
export interface IDropdownMenuHandlers extends DropdownMenuHandlers, UnknownProperties {}
|
|
157
111
|
export type DropdownMenuHandlers = DropdownHandlers & {
|
|
158
112
|
highlightedIndex: (index: number) => void;
|
|
159
113
|
};
|
|
@@ -197,41 +151,11 @@ declare const DropdownMenu: Intergalactic.Component<
|
|
|
197
151
|
Text: typeof Text;
|
|
198
152
|
Hint: typeof Flex;
|
|
199
153
|
};
|
|
200
|
-
|
|
201
|
-
* @deprecated Use Group with title prop
|
|
202
|
-
*/
|
|
203
|
-
ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;
|
|
204
|
-
/**
|
|
205
|
-
* @deprecated Use prop subTitle on Group or Item component
|
|
206
|
-
*/
|
|
207
|
-
ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;
|
|
154
|
+
|
|
208
155
|
Group: typeof Dropdown.Group;
|
|
209
156
|
|
|
210
157
|
VirtualList: typeof VirtualList;
|
|
211
158
|
|
|
212
|
-
/**
|
|
213
|
-
* @deprecated Use Item instead of Nesting
|
|
214
|
-
*/
|
|
215
|
-
Nesting: Intergalactic.Component<
|
|
216
|
-
'div',
|
|
217
|
-
DropdownMenuItemProps,
|
|
218
|
-
DropdownMenuContext,
|
|
219
|
-
[handlers: DropdownMenuHandlers]
|
|
220
|
-
> & {
|
|
221
|
-
/**
|
|
222
|
-
* @deprecated Use Item instead of Nesting
|
|
223
|
-
*/
|
|
224
|
-
Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;
|
|
225
|
-
/**
|
|
226
|
-
* @deprecated Use Item instead of Nesting
|
|
227
|
-
*/
|
|
228
|
-
Item: Intergalactic.Component<'div', DropdownMenuItemProps>;
|
|
229
|
-
/**
|
|
230
|
-
* @deprecated Use Item instead of Nesting
|
|
231
|
-
*/
|
|
232
|
-
Addon: typeof Box;
|
|
233
|
-
};
|
|
234
|
-
|
|
235
159
|
selectedIndexContext: React.Context<number>;
|
|
236
160
|
nestedMenuInteraction: eventInteraction;
|
|
237
161
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/dropdown-menu",
|
|
3
3
|
"description": "Semrush DropdownMenu Component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "17.0.0-prerelease.17",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,17 +14,14 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "16.0.
|
|
18
|
-
"@semcore/dropdown": "
|
|
19
|
-
"@semcore/
|
|
20
|
-
"@semcore/typography": "16.3.2",
|
|
21
|
-
"@semcore/popper": "16.0.11",
|
|
22
|
-
"@semcore/flex-box": "16.0.11",
|
|
23
|
-
"@semcore/scroll-area": "16.0.11",
|
|
17
|
+
"@semcore/button": "^16.0.13-prerelease.17",
|
|
18
|
+
"@semcore/dropdown": "^17.0.0-prerelease.17",
|
|
19
|
+
"@semcore/typography": "^16.3.3-prerelease.17",
|
|
24
20
|
"classnames": "2.2.6"
|
|
25
21
|
},
|
|
26
22
|
"peerDependencies": {
|
|
27
|
-
"@semcore/base-components": "^
|
|
23
|
+
"@semcore/base-components": "^17.0.0-prerelease.17",
|
|
24
|
+
"@semcore/icon": "^16.7.2-prerelease.17"
|
|
28
25
|
},
|
|
29
26
|
"repository": {
|
|
30
27
|
"type": "git",
|
|
@@ -33,11 +30,12 @@
|
|
|
33
30
|
},
|
|
34
31
|
"devDependencies": {
|
|
35
32
|
"@types/classnames": "2.2.6",
|
|
36
|
-
"@semcore/core": "
|
|
33
|
+
"@semcore/core": "17.0.0-prerelease.17",
|
|
34
|
+
"@semcore/icon": "16.7.2-prerelease.17",
|
|
35
|
+
"@semcore/base-components": "17.0.0-prerelease.17",
|
|
37
36
|
"@semcore/testing-utils": "1.0.0",
|
|
38
|
-
"@semcore/
|
|
39
|
-
"@semcore/
|
|
40
|
-
"@semcore/icon": "16.7.3"
|
|
37
|
+
"@semcore/base-trigger": "16.4.6-prerelease.17",
|
|
38
|
+
"@semcore/button": "16.0.13-prerelease.17"
|
|
41
39
|
},
|
|
42
40
|
"scripts": {
|
|
43
41
|
"build": "pnpm semcore-builder --source=js,ts && pnpm vite build"
|