@rescui/dropdown-menu 0.3.4 → 0.4.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/lib/dropdown-menu.d.ts +14 -0
- package/lib/dropdown-menu.js +2 -4
- package/lib/index.css +4 -4
- package/lib/index.p.module.css.js +4 -4
- package/package.json +7 -7
package/lib/dropdown-menu.d.ts
CHANGED
|
@@ -10,6 +10,20 @@ interface DropdownMenuProps extends Omit<DropdownProps, 'maxWidth' | 'minWidth'
|
|
|
10
10
|
size?: DropdownMenuSize;
|
|
11
11
|
wrapItemsWithLi?: boolean;
|
|
12
12
|
activateFirstItemOnOpen?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* See [MDN spec](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width).
|
|
15
|
+
* `trigger` is a special value that substitutes with trigger's width calculated on every dropdown position update
|
|
16
|
+
* @type 'trigger' | MinWidthProperty<string | number>;
|
|
17
|
+
* @default 316px
|
|
18
|
+
* */
|
|
19
|
+
minWidth?: DropdownProps['minWidth'];
|
|
20
|
+
/**
|
|
21
|
+
* See [MDN spec](https://developer.mozilla.org/en-US/docs/Web/CSS/min-width).
|
|
22
|
+
* `trigger` is a special value that substitutes with trigger's width calculated on every dropdown position update
|
|
23
|
+
* @type 'trigger' | MaxWidthProperty<string | number>;
|
|
24
|
+
* @default "389px"(s); "494px"(m,l)
|
|
25
|
+
* */
|
|
26
|
+
maxWidth?: DropdownProps['maxWidth'];
|
|
13
27
|
}
|
|
14
28
|
export declare const DropdownMenu: React.FC<DropdownMenuProps>;
|
|
15
29
|
export default DropdownMenu;
|
package/lib/dropdown-menu.js
CHANGED
|
@@ -8,7 +8,7 @@ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-st
|
|
|
8
8
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
9
9
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
10
10
|
var _excluded = ["maxVisibleItems", "size", "children", "iconPlacement", "itemTag", "tag", "theme", "mode", "activateFirstItemOnOpen", "wrapItemsWithLi"],
|
|
11
|
-
_excluded2 = ["
|
|
11
|
+
_excluded2 = ["maxHeight", "leastMaxHeight"];
|
|
12
12
|
|
|
13
13
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
14
|
|
|
@@ -51,9 +51,7 @@ var DropdownMenu = function DropdownMenu(_ref) {
|
|
|
51
51
|
|
|
52
52
|
var maxHeight = (Math.ceil(maxVisibleItems) + 0.5) * itemHeight;
|
|
53
53
|
|
|
54
|
-
var
|
|
55
|
-
maxWidth = restProps.maxWidth,
|
|
56
|
-
cleanMaxHeight = restProps.maxHeight,
|
|
54
|
+
var cleanMaxHeight = restProps.maxHeight,
|
|
57
55
|
leastMaxHeight = restProps.leastMaxHeight,
|
|
58
56
|
cleanedRestProps = _objectWithoutProperties(restProps, _excluded2); // cast to make runtime omit
|
|
59
57
|
|
package/lib/index.css
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
.
|
|
1
|
+
._sizeS_adnxnl_8{
|
|
2
2
|
min-width:316px;
|
|
3
3
|
max-width:389px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
7
|
-
.
|
|
6
|
+
._sizeL_adnxnl_13,
|
|
7
|
+
._sizeM_adnxnl_14{
|
|
8
8
|
min-width:316px;
|
|
9
9
|
max-width:494px;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.
|
|
12
|
+
._menu_adnxnl_19{
|
|
13
13
|
margin:0;
|
|
14
14
|
padding:0;
|
|
15
15
|
list-style:none;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"sizeS": "
|
|
3
|
-
"sizeL": "
|
|
4
|
-
"sizeM": "
|
|
5
|
-
"menu": "
|
|
2
|
+
"sizeS": "_sizeS_adnxnl_8",
|
|
3
|
+
"sizeL": "_sizeL_adnxnl_13",
|
|
4
|
+
"sizeM": "_sizeM_adnxnl_14",
|
|
5
|
+
"menu": "_menu_adnxnl_19"
|
|
6
6
|
};
|
|
7
7
|
export { styles as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/dropdown-menu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime-corejs3": "^7.11.0",
|
|
19
|
-
"@rescui/dropdown": "^0.3.
|
|
20
|
-
"@rescui/menu": "^0.7.
|
|
19
|
+
"@rescui/dropdown": "^0.3.6",
|
|
20
|
+
"@rescui/menu": "^0.7.1",
|
|
21
21
|
"classnames": "^2.2.6",
|
|
22
22
|
"core-js": "^3.9.1"
|
|
23
23
|
},
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"react": ">=16.8.0 <18"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@rescui/colors": "^0.1.
|
|
30
|
+
"@rescui/colors": "^0.1.4",
|
|
31
31
|
"@rescui/scripts": "^0.1.7",
|
|
32
|
-
"@rescui/typography": "^0.8.
|
|
33
|
-
"@rescui/visual-regression": "^0.0.
|
|
32
|
+
"@rescui/typography": "^0.8.1",
|
|
33
|
+
"@rescui/visual-regression": "^0.0.3"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "rescui-scripts build"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "aa6b3b338448baec01555e65c3f6499d37d66307"
|
|
39
39
|
}
|