@itwin/itwinui-react 2.12.7 → 2.12.8
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 +9 -0
- package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +1 -0
- package/cjs/core/ComboBox/ComboBoxDropdown.js +1 -0
- package/cjs/core/DropdownMenu/DropdownMenu.js +5 -1
- package/cjs/core/Menu/MenuItem.js +2 -2
- package/cjs/styles.js +15 -10
- package/esm/core/ComboBox/ComboBoxDropdown.d.ts +1 -0
- package/esm/core/ComboBox/ComboBoxDropdown.js +1 -0
- package/esm/core/DropdownMenu/DropdownMenu.js +2 -1
- package/esm/core/Menu/MenuItem.js +2 -2
- package/esm/styles.js +15 -10
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.12.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1576](https://github.com/iTwin/iTwinUI/pull/1576): Dropdown menus will now automatically become scrollable if there are too many menu items. Also added delay to submenu.
|
|
8
|
+
- [#1578](https://github.com/iTwin/iTwinUI/pull/1578): Fixed missing animation in ComboBox.
|
|
9
|
+
- [#1572](https://github.com/iTwin/iTwinUI/pull/1572): Adjusted borders and shadow values to be more prominent in dark theme.
|
|
10
|
+
- [#1575](https://github.com/iTwin/iTwinUI/pull/1575): ProgressRadial now stays inside container when using size="x-small".
|
|
11
|
+
|
|
3
12
|
## 2.12.7
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -31,6 +31,7 @@ exports.ComboBoxDropdown = void 0;
|
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const index_js_1 = require("../utils/index.js");
|
|
33
33
|
const helpers_js_1 = require("./helpers.js");
|
|
34
|
+
require("tippy.js/animations/shift-away.css");
|
|
34
35
|
exports.ComboBoxDropdown = React.forwardRef((props, forwardedRef) => {
|
|
35
36
|
const { children, ...rest } = props;
|
|
36
37
|
const { isOpen } = (0, index_js_1.useSafeContext)(helpers_js_1.ComboBoxStateContext);
|
|
@@ -22,6 +22,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
exports.DropdownMenu = void 0;
|
|
27
30
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -29,6 +32,7 @@ exports.DropdownMenu = void 0;
|
|
|
29
32
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
30
33
|
*--------------------------------------------------------------------------------------------*/
|
|
31
34
|
const React = __importStar(require("react"));
|
|
35
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
32
36
|
const index_js_1 = require("../utils/index.js");
|
|
33
37
|
const index_js_2 = require("../Menu/index.js");
|
|
34
38
|
/**
|
|
@@ -70,7 +74,7 @@ const DropdownMenu = (props) => {
|
|
|
70
74
|
onHide === null || onHide === void 0 ? void 0 : onHide(instance);
|
|
71
75
|
}, [onHide]);
|
|
72
76
|
(0, index_js_1.useTheme)();
|
|
73
|
-
return (React.createElement(index_js_1.Popover, { content: React.createElement(index_js_2.Menu, { className: className, style: style, role: role, id: id }, React.useMemo(() => menuItems(close), [menuItems, close])), visible: trigger === undefined ? isVisible : undefined, onClickOutside: close, placement: placement, onShow: onShowHandler, onHide: onHideHandler, trigger: visible === undefined ? trigger : undefined, ...rest }, React.cloneElement(children, {
|
|
77
|
+
return (React.createElement(index_js_1.Popover, { content: React.createElement(index_js_2.Menu, { className: (0, classnames_1.default)('iui-scroll', className), style: style, role: role, id: id }, React.useMemo(() => menuItems(close), [menuItems, close])), visible: trigger === undefined ? isVisible : undefined, onClickOutside: close, placement: placement, onShow: onShowHandler, onHide: onHideHandler, trigger: visible === undefined ? trigger : undefined, ...rest }, React.cloneElement(children, {
|
|
74
78
|
ref: (0, index_js_1.mergeRefs)(targetRef, props.children.ref),
|
|
75
79
|
onClick: (args) => {
|
|
76
80
|
var _a, _b;
|
|
@@ -105,13 +105,13 @@ exports.MenuItem = React.forwardRef((props, ref) => {
|
|
|
105
105
|
className: (0, classnames_1.default)(badge.props.className, 'iui-icon'),
|
|
106
106
|
})));
|
|
107
107
|
return subMenuItems.length === 0 ? (listItem) : (React.createElement(MenuItemContext.Provider, { value: { ref: menuItemRef } },
|
|
108
|
-
React.createElement(index_js_1.Popover, { placement: 'right-start', visible: isSubmenuVisible, appendTo: 'parent', content: React.createElement("div", { onMouseLeave: () => setIsSubmenuVisible(false), onBlur: (e) => {
|
|
108
|
+
React.createElement(index_js_1.Popover, { placement: 'right-start', visible: isSubmenuVisible, appendTo: 'parent', delay: 100, content: React.createElement("div", { onMouseLeave: () => setIsSubmenuVisible(false), onBlur: (e) => {
|
|
109
109
|
var _a, _b;
|
|
110
110
|
!!(e.relatedTarget instanceof Node) &&
|
|
111
111
|
!((_a = subMenuRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.relatedTarget)) &&
|
|
112
112
|
!((_b = subMenuRef.current) === null || _b === void 0 ? void 0 : _b.isEqualNode(e.relatedTarget)) &&
|
|
113
113
|
setIsSubmenuVisible(false);
|
|
114
114
|
} },
|
|
115
|
-
React.createElement(Menu_js_1.Menu, { ref: subMenuRef }, subMenuItems)) }, listItem)));
|
|
115
|
+
React.createElement(Menu_js_1.Menu, { ref: subMenuRef, className: 'iui-scroll' }, subMenuItems)) }, listItem)));
|
|
116
116
|
});
|
|
117
117
|
exports.default = exports.MenuItem;
|