@rescui/dropdown-menu 0.11.15 → 0.11.16
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/lib/dropdown-menu.d.ts +41 -40
- package/lib/dropdown-menu.p.module.css.js +5 -5
- package/lib/index.css +8 -8
- package/lib/index.d.ts +3 -3
- package/lib/menu-wrapper.d.ts +6 -6
- package/package.json +9 -9
package/lib/dropdown-menu.d.ts
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DropdownProps } from '@rescui/dropdown';
|
|
3
|
-
import { MenuItemIconPlacement } from '@rescui/menu';
|
|
4
|
-
|
|
5
|
-
export interface DropdownMenuProps extends Omit<DropdownProps, 'maxWidth' | 'minWidth' | 'maxHeight' | 'leastMaxHeight' | 'className'> {
|
|
6
|
-
/**
|
|
7
|
-
* Maximum number of visible items in the dropdown list.
|
|
8
|
-
* For large lists, n + 0.5 items will be visible at a time.
|
|
9
|
-
* If the maximum number of items in a list is exactly n + 1, all
|
|
10
|
-
* items will be shown still (to avoid creating a scroll for half an item only).
|
|
11
|
-
*/
|
|
12
|
-
maxVisibleItems?: number;
|
|
13
|
-
iconPlacement?: MenuItemIconPlacement;
|
|
14
|
-
itemTag?: React.ElementType;
|
|
15
|
-
tag?: React.ElementType;
|
|
16
|
-
size?: DropdownMenuSize;
|
|
17
|
-
wrapItemsWithLi?: boolean;
|
|
18
|
-
activateFirstItemOnOpen?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* See [MDN spec](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width).
|
|
21
|
-
* `trigger` is a special value that substitutes with trigger's width calculated on every dropdown position update
|
|
22
|
-
* @type 'trigger' | MinWidthProperty<string | number>;
|
|
23
|
-
* @default 316px
|
|
24
|
-
* */
|
|
25
|
-
minWidth?: DropdownProps['minWidth'];
|
|
26
|
-
/**
|
|
27
|
-
* See [MDN spec](https://developer.mozilla.org/en-US/docs/Web/CSS/min-width).
|
|
28
|
-
* `trigger` is a special value that substitutes with trigger's width calculated on every dropdown position update
|
|
29
|
-
* @type 'trigger' | MaxWidthProperty<string | number>;
|
|
30
|
-
* @default "389px"(s); "494px"(m,l)
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropdownProps } from '@rescui/dropdown';
|
|
3
|
+
import { MenuItemIconPlacement } from '@rescui/menu';
|
|
4
|
+
type DropdownMenuSize = 's' | 'm' | 'l';
|
|
5
|
+
export interface DropdownMenuProps extends Omit<DropdownProps, 'maxWidth' | 'minWidth' | 'maxHeight' | 'leastMaxHeight' | 'className'> {
|
|
6
|
+
/**
|
|
7
|
+
* Maximum number of visible items in the dropdown list.
|
|
8
|
+
* For large lists, n + 0.5 items will be visible at a time.
|
|
9
|
+
* If the maximum number of items in a list is exactly n + 1, all
|
|
10
|
+
* items will be shown still (to avoid creating a scroll for half an item only).
|
|
11
|
+
*/
|
|
12
|
+
maxVisibleItems?: number;
|
|
13
|
+
iconPlacement?: MenuItemIconPlacement;
|
|
14
|
+
itemTag?: React.ElementType;
|
|
15
|
+
tag?: React.ElementType;
|
|
16
|
+
size?: DropdownMenuSize;
|
|
17
|
+
wrapItemsWithLi?: boolean;
|
|
18
|
+
activateFirstItemOnOpen?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* See [MDN spec](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width).
|
|
21
|
+
* `trigger` is a special value that substitutes with trigger's width calculated on every dropdown position update
|
|
22
|
+
* @type 'trigger' | MinWidthProperty<string | number>;
|
|
23
|
+
* @default 316px
|
|
24
|
+
* */
|
|
25
|
+
minWidth?: DropdownProps['minWidth'];
|
|
26
|
+
/**
|
|
27
|
+
* See [MDN spec](https://developer.mozilla.org/en-US/docs/Web/CSS/min-width).
|
|
28
|
+
* `trigger` is a special value that substitutes with trigger's width calculated on every dropdown position update
|
|
29
|
+
* @type 'trigger' | MaxWidthProperty<string | number>;
|
|
30
|
+
* @default "389px"(s); "494px"(m,l)
|
|
31
|
+
* @rawDefaultValue
|
|
32
|
+
* */
|
|
33
|
+
maxWidth?: DropdownProps['maxWidth'];
|
|
34
|
+
/**
|
|
35
|
+
* Automatically resize icons according to the size of the menu item.
|
|
36
|
+
* */
|
|
37
|
+
resizeIcons?: boolean;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const DropdownMenu: React.FC<DropdownMenuProps>;
|
|
41
|
+
export default DropdownMenu;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"sizeS": "
|
|
3
|
-
"sizeM": "
|
|
4
|
-
"sizeL": "
|
|
5
|
-
"dropdownMenu": "
|
|
6
|
-
"menu": "
|
|
2
|
+
"sizeS": "_sizeS_xmd2pz_8",
|
|
3
|
+
"sizeM": "_sizeM_xmd2pz_11",
|
|
4
|
+
"sizeL": "_sizeL_xmd2pz_14",
|
|
5
|
+
"dropdownMenu": "_dropdownMenu_xmd2pz_18",
|
|
6
|
+
"menu": "_menu_xmd2pz_23"
|
|
7
7
|
};
|
|
8
8
|
export { styles as default };
|
package/lib/index.css
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
.
|
|
1
|
+
._sizeS_xmd2pz_8{
|
|
2
2
|
--_rs-dropdown-menu-min-width:316px;
|
|
3
3
|
--_rs-dropdown-menu-max-width:389px;
|
|
4
4
|
}
|
|
5
|
-
.
|
|
5
|
+
._sizeS_xmd2pz_8 [data-rs-internal='dropdown-menu__menu-wrapper']{
|
|
6
6
|
--_rs-dropdown-menu-item-height:32px;
|
|
7
7
|
}
|
|
8
|
-
.
|
|
8
|
+
._sizeM_xmd2pz_11{
|
|
9
9
|
--_rs-dropdown-menu-min-width:316px;
|
|
10
10
|
--_rs-dropdown-menu-max-width:494px;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
12
|
+
._sizeM_xmd2pz_11 [data-rs-internal='dropdown-menu__menu-wrapper']{
|
|
13
13
|
--_rs-dropdown-menu-item-height:40px;
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
._sizeL_xmd2pz_14{
|
|
16
16
|
--_rs-dropdown-menu-min-width:316px;
|
|
17
17
|
--_rs-dropdown-menu-max-width:494px;
|
|
18
18
|
}
|
|
19
|
-
.
|
|
19
|
+
._sizeL_xmd2pz_14 [data-rs-internal='dropdown-menu__menu-wrapper']{
|
|
20
20
|
--_rs-dropdown-menu-item-height:52px;
|
|
21
21
|
}
|
|
22
|
-
.
|
|
22
|
+
._dropdownMenu_xmd2pz_18{
|
|
23
23
|
min-width:var(--_rs-dropdown-menu-min-width);
|
|
24
24
|
max-width:var(--_rs-dropdown-menu-max-width);
|
|
25
25
|
}
|
|
26
|
-
.
|
|
26
|
+
._menu_xmd2pz_23{
|
|
27
27
|
margin:0;
|
|
28
28
|
padding:0;
|
|
29
29
|
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as DropdownMenu } from './dropdown-menu';
|
|
2
|
-
export type { DropdownMenuProps } from './dropdown-menu';
|
|
3
|
-
export { MenuItem } from '@rescui/menu';
|
|
1
|
+
export { default as DropdownMenu } from './dropdown-menu';
|
|
2
|
+
export type { DropdownMenuProps } from './dropdown-menu';
|
|
3
|
+
export { MenuItem } from '@rescui/menu';
|
package/lib/menu-wrapper.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
onHeightUpdate?: (newHeight: number) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare const MenuWrapper: React.ForwardRefExoticComponent<MenuWrapperProps & React.RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type MenuWrapperProps = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
onHeightUpdate?: (newHeight: number) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const MenuWrapper: React.ForwardRefExoticComponent<MenuWrapperProps & React.RefAttributes<HTMLDivElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/dropdown-menu",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime-corejs3": "^7.26.0",
|
|
19
|
-
"@rescui/dropdown": "^0.10.
|
|
20
|
-
"@rescui/menu": "^0.13.
|
|
21
|
-
"@rescui/use-resize-observer": "^0.3.
|
|
19
|
+
"@rescui/dropdown": "^0.10.2",
|
|
20
|
+
"@rescui/menu": "^0.13.6",
|
|
21
|
+
"@rescui/use-resize-observer": "^0.3.1",
|
|
22
22
|
"classnames": "^2.2.6"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"react": ">=16.8.0 <20"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@rescui/colors": "^0.3.
|
|
31
|
-
"@rescui/icons": "^1.8.
|
|
32
|
-
"@rescui/scripts": "^0.5.
|
|
33
|
-
"@rescui/typography": "^0.27.
|
|
30
|
+
"@rescui/colors": "^0.3.1",
|
|
31
|
+
"@rescui/icons": "^1.8.1",
|
|
32
|
+
"@rescui/scripts": "^0.5.2",
|
|
33
|
+
"@rescui/typography": "^0.27.1",
|
|
34
34
|
"@rescui/visual-regression": "^0.1.4"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
39
39
|
},
|
|
40
40
|
"nx": {},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "a04f6790abce8e72834eedce3512ee83513c5e78"
|
|
42
42
|
}
|