@superdispatch/ui 0.17.1 → 0.18.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.
|
@@ -6,7 +6,6 @@ import { Button } from "../button/Button.js";
|
|
|
6
6
|
import { mergeRefs } from "../utils/mergeRefs.js";
|
|
7
7
|
import { useResizeObserver } from "../utils/ResizeObserver.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
10
|
var useStyles = /*#__PURE__*/makeStyles({
|
|
12
11
|
root: {
|
|
@@ -97,19 +96,17 @@ export var AdaptiveVerticalToolbar = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
97
96
|
onClose: () => {
|
|
98
97
|
setMenuButtonRef(undefined);
|
|
99
98
|
},
|
|
100
|
-
children: menuItems.
|
|
99
|
+
children: menuItems.flatMap((item, index, arr) => {
|
|
101
100
|
var next = arr[index + 1];
|
|
102
|
-
return /*#__PURE__*/
|
|
103
|
-
|
|
104
|
-
onClick
|
|
105
|
-
var _item$onClick;
|
|
101
|
+
return [/*#__PURE__*/_jsx(MenuItem, {
|
|
102
|
+
onClick: event => {
|
|
103
|
+
var _item$onClick;
|
|
106
104
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
});
|
|
105
|
+
(_item$onClick = item.onClick) === null || _item$onClick === void 0 ? void 0 : _item$onClick.call(item, event);
|
|
106
|
+
setMenuButtonRef(undefined);
|
|
107
|
+
},
|
|
108
|
+
children: renderMenuItem(item)
|
|
109
|
+
}, item.key), next && next.menuGroupKey !== item.menuGroupKey && /*#__PURE__*/_jsx(Divider, {}, "".concat(item.key, "-divider"))];
|
|
113
110
|
})
|
|
114
111
|
})]
|
|
115
112
|
})]
|
package/dist-web/index.js
CHANGED
|
@@ -413,19 +413,17 @@ var AdaptiveVerticalToolbar = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
413
413
|
onClose: () => {
|
|
414
414
|
setMenuButtonRef(undefined);
|
|
415
415
|
},
|
|
416
|
-
children: menuItems.
|
|
416
|
+
children: menuItems.flatMap((item, index, arr) => {
|
|
417
417
|
var next = arr[index + 1];
|
|
418
|
-
return /*#__PURE__*/
|
|
419
|
-
|
|
420
|
-
onClick
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
}, item.key), next && next.menuGroupKey !== item.menuGroupKey && /*#__PURE__*/jsx(Divider, {})]
|
|
428
|
-
});
|
|
418
|
+
return [/*#__PURE__*/jsx(MenuItem, {
|
|
419
|
+
onClick: event => {
|
|
420
|
+
var _item$onClick;
|
|
421
|
+
|
|
422
|
+
(_item$onClick = item.onClick) === null || _item$onClick === void 0 ? void 0 : _item$onClick.call(item, event);
|
|
423
|
+
setMenuButtonRef(undefined);
|
|
424
|
+
},
|
|
425
|
+
children: renderMenuItem(item)
|
|
426
|
+
}, item.key), next && next.menuGroupKey !== item.menuGroupKey && /*#__PURE__*/jsx(Divider, {}, "".concat(item.key, "-divider"))];
|
|
429
427
|
})
|
|
430
428
|
})]
|
|
431
429
|
})]
|