@mmb-digital/ds-lilly 0.10.37 → 0.10.38
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/dist/ds-lilly.js +11 -0
- package/package.json +1 -1
package/dist/ds-lilly.js
CHANGED
|
@@ -98729,6 +98729,9 @@ var Dropdown2 = function (_a) {
|
|
|
98729
98729
|
var arrayNodes = toArray(nodes);
|
|
98730
98730
|
return arrayNodes.reduce(function (acc, current) {
|
|
98731
98731
|
var _a, _b;
|
|
98732
|
+
if (Array.isArray(current)) {
|
|
98733
|
+
getMenuItems(current).forEach(function (child) { return acc.push(child); });
|
|
98734
|
+
}
|
|
98732
98735
|
if (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.isValidElement(current)) {
|
|
98733
98736
|
if (current.type === Dropdown2Item || current.type === Dropdown2Divider) {
|
|
98734
98737
|
acc.push(current);
|
|
@@ -98835,6 +98838,13 @@ var Dropdown2 = function (_a) {
|
|
|
98835
98838
|
event.preventDefault();
|
|
98836
98839
|
setFocusedItemIndex(menuItems.length - 1);
|
|
98837
98840
|
break;
|
|
98841
|
+
case KEYS.Enter:
|
|
98842
|
+
case KEYS.Space:
|
|
98843
|
+
event.preventDefault();
|
|
98844
|
+
var menuItem = menuItems[focusedItemIndex];
|
|
98845
|
+
if (menuItem && menuItem.props.onKeyDown) {
|
|
98846
|
+
menuItem.props.onKeyDown(event);
|
|
98847
|
+
}
|
|
98838
98848
|
}
|
|
98839
98849
|
}, [
|
|
98840
98850
|
visible,
|
|
@@ -98887,6 +98897,7 @@ var Dropdown2 = function (_a) {
|
|
|
98887
98897
|
key: "menuItem-" + index,
|
|
98888
98898
|
id: forceDropdownId + "-menuItem-" + index,
|
|
98889
98899
|
isFocused: focusedItemIndex === index,
|
|
98900
|
+
onKeyDown: handleKeyDown,
|
|
98890
98901
|
onMouseOver: function () { return setFocusedItemIndex(index); }
|
|
98891
98902
|
});
|
|
98892
98903
|
}))),
|