@hi-ui/dropdown 5.0.0-canary.5 → 5.0.0-canary.7
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 +18 -0
- package/lib/cjs/Dropdown.js +3 -2
- package/lib/cjs/styles/index.scss.js +1 -1
- package/lib/esm/Dropdown.js +3 -2
- package/lib/esm/styles/index.scss.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @hi-ui/dropdown
|
|
2
2
|
|
|
3
|
+
## 5.0.0-canary.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1bb79f984: style(dropdown): 增加下拉菜单的最大高度和垂直溢出处理 (5.0)
|
|
8
|
+
|
|
9
|
+
## 5.0.0-canary.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- efce04a26: fix: 修改 UI 问题 (5.0)
|
|
14
|
+
- Updated dependencies [efce04a26]
|
|
15
|
+
- Updated dependencies [9106dca82]
|
|
16
|
+
- @hi-ui/popper@5.0.0-canary.6
|
|
17
|
+
- @hi-ui/core@5.0.0-canary.3
|
|
18
|
+
- @hi-ui/icons@5.0.0-canary.3
|
|
19
|
+
- @hi-ui/button@5.0.0-canary.8
|
|
20
|
+
|
|
3
21
|
## 5.0.0-canary.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/lib/cjs/Dropdown.js
CHANGED
|
@@ -71,7 +71,7 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
71
71
|
return treeData.map(function (item) {
|
|
72
72
|
var menu = typeAssertion.isArrayNonEmpty(item.children) ? ( /*#__PURE__*/React__default["default"].createElement(DropdownMenu, {
|
|
73
73
|
overlay: {
|
|
74
|
-
gutterGap:
|
|
74
|
+
gutterGap: 8
|
|
75
75
|
},
|
|
76
76
|
size: size
|
|
77
77
|
}, dig(item.children))) : null;
|
|
@@ -132,7 +132,8 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
132
132
|
}, rootProps), renderButton(), typeAssertion.isArrayNonEmpty(transformedData) ? ( /*#__PURE__*/React__default["default"].createElement(DropdownMenu, Object.assign({}, getMenuProps({
|
|
133
133
|
overlay: {
|
|
134
134
|
disabledPortal: false,
|
|
135
|
-
className: overlayClassName
|
|
135
|
+
className: overlayClassName,
|
|
136
|
+
gutterGap: 4
|
|
136
137
|
}
|
|
137
138
|
}), {
|
|
138
139
|
size: size
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
Object.defineProperty(exports, '__esModule', {
|
|
13
13
|
value: true
|
|
14
14
|
});
|
|
15
|
-
var css_248z = ".hi-v5-dropdown {display: inline-block;}.hi-v5-dropdown-menu {-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0;padding: 0;background-color: var(--hi-v5-color-static-white, #fff);border-radius: var(--hi-v5-border-radius-
|
|
15
|
+
var css_248z = ".hi-v5-dropdown {display: inline-block;}.hi-v5-dropdown-menu {-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0;padding: 0;background-color: var(--hi-v5-color-static-white, #fff);border-radius: var(--hi-v5-border-radius-xl, 8px);border: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-100, #edeff2);font-size: var(--hi-v5-text-size-md, 0.875rem);padding: var(--hi-v5-spacing-2, 4px);color: var(--hi-v5-color-gray-700, #1a1d26);max-height: 268px;overflow-y: auto;width: var(--hi-v5-dropdown-menu-width, 180px);}.hi-v5-dropdown-menu-item {-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0;padding: 0;list-style: none;margin: 2px 0 0 0;box-sizing: border-box;overflow: visible;}.hi-v5-dropdown-menu-item:first-child {margin-top: 0;}.hi-v5-dropdown-menu-item__link {color: var(--hi-v5-color-gray-700, #1a1d26);width: 100%;text-decoration: none;-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v5-dropdown-menu-item__arrow {-webkit-transform: rotate(-90deg);transform: rotate(-90deg);}.hi-v5-dropdown-menu-item__trigger {-webkit-box-sizing: border-box;box-sizing: border-box;width: 100%;height: 100%;cursor: pointer;border-radius: var(--hi-v5-border-radius-md, 4px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;}.hi-v5-dropdown-menu--size-lg .hi-v5-dropdown-menu-item__trigger {padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);}.hi-v5-dropdown-menu--size-md .hi-v5-dropdown-menu-item__trigger {padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);}.hi-v5-dropdown-menu--size-sm .hi-v5-dropdown-menu-item__trigger {padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);}.hi-v5-dropdown-menu-item:not(.hi-v5-dropdown-menu-item--disabled) > .hi-v5-dropdown-menu-item__trigger:hover {background-color: var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-dropdown-menu-item--active:not(.hi-v5-dropdown-menu-item--disabled) > .hi-v5-dropdown-menu-item__trigger {background-color: var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-dropdown-menu-item--disabled > .hi-v5-dropdown-menu-item__trigger {cursor: not-allowed;color: var(--hi-v5-color-gray-500, #91959e);}.hi-v5-dropdown-divider {-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0;padding: 0;list-style: none;background-color: var(--hi-v5-color-gray-200, #e6e8eb);width: 100%;height: 1px;margin: var(--hi-v5-spacing-4, 8px) 0;}";
|
|
16
16
|
var __styleInject__ = require('@hi-ui/style-inject')["default"];
|
|
17
17
|
__styleInject__(css_248z);
|
|
18
18
|
exports["default"] = css_248z;
|
package/lib/esm/Dropdown.js
CHANGED
|
@@ -58,7 +58,7 @@ var Dropdown = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
58
58
|
return treeData.map(function (item) {
|
|
59
59
|
var menu = isArrayNonEmpty(item.children) ? ( /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
60
60
|
overlay: {
|
|
61
|
-
gutterGap:
|
|
61
|
+
gutterGap: 8
|
|
62
62
|
},
|
|
63
63
|
size: size
|
|
64
64
|
}, dig(item.children))) : null;
|
|
@@ -119,7 +119,8 @@ var Dropdown = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
119
119
|
}, rootProps), renderButton(), isArrayNonEmpty(transformedData) ? ( /*#__PURE__*/React.createElement(DropdownMenu, Object.assign({}, getMenuProps({
|
|
120
120
|
overlay: {
|
|
121
121
|
disabledPortal: false,
|
|
122
|
-
className: overlayClassName
|
|
122
|
+
className: overlayClassName,
|
|
123
|
+
gutterGap: 4
|
|
123
124
|
}
|
|
124
125
|
}), {
|
|
125
126
|
size: size
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
10
|
import __styleInject__ from '@hi-ui/style-inject';
|
|
11
|
-
var css_248z = ".hi-v5-dropdown {display: inline-block;}.hi-v5-dropdown-menu {-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0;padding: 0;background-color: var(--hi-v5-color-static-white, #fff);border-radius: var(--hi-v5-border-radius-
|
|
11
|
+
var css_248z = ".hi-v5-dropdown {display: inline-block;}.hi-v5-dropdown-menu {-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0;padding: 0;background-color: var(--hi-v5-color-static-white, #fff);border-radius: var(--hi-v5-border-radius-xl, 8px);border: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-100, #edeff2);font-size: var(--hi-v5-text-size-md, 0.875rem);padding: var(--hi-v5-spacing-2, 4px);color: var(--hi-v5-color-gray-700, #1a1d26);max-height: 268px;overflow-y: auto;width: var(--hi-v5-dropdown-menu-width, 180px);}.hi-v5-dropdown-menu-item {-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0;padding: 0;list-style: none;margin: 2px 0 0 0;box-sizing: border-box;overflow: visible;}.hi-v5-dropdown-menu-item:first-child {margin-top: 0;}.hi-v5-dropdown-menu-item__link {color: var(--hi-v5-color-gray-700, #1a1d26);width: 100%;text-decoration: none;-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v5-dropdown-menu-item__arrow {-webkit-transform: rotate(-90deg);transform: rotate(-90deg);}.hi-v5-dropdown-menu-item__trigger {-webkit-box-sizing: border-box;box-sizing: border-box;width: 100%;height: 100%;cursor: pointer;border-radius: var(--hi-v5-border-radius-md, 4px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;}.hi-v5-dropdown-menu--size-lg .hi-v5-dropdown-menu-item__trigger {padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);}.hi-v5-dropdown-menu--size-md .hi-v5-dropdown-menu-item__trigger {padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);}.hi-v5-dropdown-menu--size-sm .hi-v5-dropdown-menu-item__trigger {padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);}.hi-v5-dropdown-menu-item:not(.hi-v5-dropdown-menu-item--disabled) > .hi-v5-dropdown-menu-item__trigger:hover {background-color: var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-dropdown-menu-item--active:not(.hi-v5-dropdown-menu-item--disabled) > .hi-v5-dropdown-menu-item__trigger {background-color: var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-dropdown-menu-item--disabled > .hi-v5-dropdown-menu-item__trigger {cursor: not-allowed;color: var(--hi-v5-color-gray-500, #91959e);}.hi-v5-dropdown-divider {-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0;padding: 0;list-style: none;background-color: var(--hi-v5-color-gray-200, #e6e8eb);width: 100%;height: 1px;margin: var(--hi-v5-spacing-4, 8px) 0;}";
|
|
12
12
|
__styleInject__(css_248z);
|
|
13
13
|
export { css_248z as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hi-ui/dropdown",
|
|
3
|
-
"version": "5.0.0-canary.
|
|
3
|
+
"version": "5.0.0-canary.7",
|
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "HiUI <mi-hiui@xiaomi.com>",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"url": "https://github.com/XiaoMi/hiui/issues"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@hi-ui/button": "^5.0.0-canary.
|
|
47
|
+
"@hi-ui/button": "^5.0.0-canary.8",
|
|
48
48
|
"@hi-ui/classname": "^5.0.0-canary.2",
|
|
49
49
|
"@hi-ui/dom-utils": "^5.0.0-canary.2",
|
|
50
50
|
"@hi-ui/env": "^5.0.0-canary.2",
|
|
51
|
-
"@hi-ui/icons": "^5.0.0-canary.
|
|
52
|
-
"@hi-ui/popper": "^5.0.0-canary.
|
|
51
|
+
"@hi-ui/icons": "^5.0.0-canary.3",
|
|
52
|
+
"@hi-ui/popper": "^5.0.0-canary.6",
|
|
53
53
|
"@hi-ui/react-utils": "^5.0.0-canary.2",
|
|
54
54
|
"@hi-ui/type-assertion": "^5.0.0-canary.2",
|
|
55
55
|
"@hi-ui/use-latest": "^5.0.0-canary.2",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"@hi-ui/use-unmount-effect": "^5.0.0-canary.2"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@hi-ui/core": ">=5.0.0-canary.
|
|
61
|
+
"@hi-ui/core": ">=5.0.0-canary.3",
|
|
62
62
|
"react": ">=16.8.6",
|
|
63
63
|
"react-dom": ">=16.8.6"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@hi-ui/core": "^5.0.0-canary.
|
|
66
|
+
"@hi-ui/core": "^5.0.0-canary.3",
|
|
67
67
|
"@hi-ui/core-css": "^5.0.0-canary.6",
|
|
68
68
|
"react": "^17.0.1",
|
|
69
69
|
"react-dom": "^17.0.1"
|