@neo4j-ndl/react 4.5.8 → 4.5.10

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.
Files changed (140) hide show
  1. package/lib/cjs/ai/more-files/stories/more-files.story.js +1 -1
  2. package/lib/cjs/ai/more-files/stories/more-files.story.js.map +1 -1
  3. package/lib/cjs/ai/prompt/Prompt.js +1 -1
  4. package/lib/cjs/ai/prompt/Prompt.js.map +1 -1
  5. package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js +1 -1
  6. package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -1
  7. package/lib/cjs/breadcrumbs/stories/breadcrumbs-ellipses.story.js +1 -1
  8. package/lib/cjs/breadcrumbs/stories/breadcrumbs-ellipses.story.js.map +1 -1
  9. package/lib/cjs/breadcrumbs/stories/breadcrumbs-header.story.js +1 -1
  10. package/lib/cjs/breadcrumbs/stories/breadcrumbs-header.story.js.map +1 -1
  11. package/lib/cjs/data-grid/Components.js +9 -6
  12. package/lib/cjs/data-grid/Components.js.map +1 -1
  13. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +1 -4
  14. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  15. package/lib/cjs/dropdown-button/stories/dropdown-button-with-menu.story.js +1 -3
  16. package/lib/cjs/dropdown-button/stories/dropdown-button-with-menu.story.js.map +1 -1
  17. package/lib/cjs/icon-button-array/IconButtonArray.js +5 -17
  18. package/lib/cjs/icon-button-array/IconButtonArray.js.map +1 -1
  19. package/lib/cjs/menu/Menu.js +42 -6
  20. package/lib/cjs/menu/Menu.js.map +1 -1
  21. package/lib/cjs/menu/menu-types.js.map +1 -1
  22. package/lib/cjs/menu/stories/index.js +9 -1
  23. package/lib/cjs/menu/stories/index.js.map +1 -1
  24. package/lib/cjs/menu/stories/menu-custom-items.story.js +2 -2
  25. package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
  26. package/lib/cjs/menu/stories/menu-default.story.js +14 -14
  27. package/lib/cjs/menu/stories/menu-default.story.js.map +1 -1
  28. package/lib/cjs/menu/stories/menu-in-dialog.story.js +2 -2
  29. package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
  30. package/lib/cjs/menu/stories/menu-in-popover.story.js +2 -2
  31. package/lib/cjs/menu/stories/menu-in-popover.story.js.map +1 -1
  32. package/lib/cjs/menu/stories/menu-nested.story.js +2 -2
  33. package/lib/cjs/menu/stories/menu-nested.story.js.map +1 -1
  34. package/lib/cjs/menu/stories/menu-placements.story.js +14 -14
  35. package/lib/cjs/menu/stories/menu-placements.story.js.map +1 -1
  36. package/lib/cjs/menu/stories/menu-radio-and-normal.story.js +44 -0
  37. package/lib/cjs/menu/stories/menu-radio-and-normal.story.js.map +1 -0
  38. package/lib/cjs/menu/stories/menu-radio-items.story.js +45 -0
  39. package/lib/cjs/menu/stories/menu-radio-items.story.js.map +1 -0
  40. package/lib/cjs/menu/stories/menu-with-category.story.js +2 -2
  41. package/lib/cjs/menu/stories/menu-with-category.story.js.map +1 -1
  42. package/lib/cjs/menu/stories/menu-with-disabled-item.story.js +2 -2
  43. package/lib/cjs/menu/stories/menu-with-disabled-item.story.js.map +1 -1
  44. package/lib/cjs/menu/stories/menu-with-divider.story.js +2 -2
  45. package/lib/cjs/menu/stories/menu-with-divider.story.js.map +1 -1
  46. package/lib/cjs/menu/stories/menu-with-icon.story.js +2 -2
  47. package/lib/cjs/menu/stories/menu-with-icon.story.js.map +1 -1
  48. package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js +2 -2
  49. package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
  50. package/lib/cjs/menu/stories/menu.stories.js +29 -1
  51. package/lib/cjs/menu/stories/menu.stories.js.map +1 -1
  52. package/lib/cjs/select-icon-button/stories/select-icon-button-with-menu.story.js +1 -3
  53. package/lib/cjs/select-icon-button/stories/select-icon-button-with-menu.story.js.map +1 -1
  54. package/lib/esm/ai/more-files/stories/more-files.story.js +1 -1
  55. package/lib/esm/ai/more-files/stories/more-files.story.js.map +1 -1
  56. package/lib/esm/ai/prompt/Prompt.js +2 -2
  57. package/lib/esm/ai/prompt/Prompt.js.map +1 -1
  58. package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js +1 -1
  59. package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -1
  60. package/lib/esm/breadcrumbs/stories/breadcrumbs-ellipses.story.js +1 -1
  61. package/lib/esm/breadcrumbs/stories/breadcrumbs-ellipses.story.js.map +1 -1
  62. package/lib/esm/breadcrumbs/stories/breadcrumbs-header.story.js +2 -2
  63. package/lib/esm/breadcrumbs/stories/breadcrumbs-header.story.js.map +1 -1
  64. package/lib/esm/data-grid/Components.js +9 -6
  65. package/lib/esm/data-grid/Components.js.map +1 -1
  66. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +3 -6
  67. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  68. package/lib/esm/dropdown-button/stories/dropdown-button-with-menu.story.js +1 -3
  69. package/lib/esm/dropdown-button/stories/dropdown-button-with-menu.story.js.map +1 -1
  70. package/lib/esm/icon-button-array/IconButtonArray.js +5 -17
  71. package/lib/esm/icon-button-array/IconButtonArray.js.map +1 -1
  72. package/lib/esm/menu/Menu.js +43 -7
  73. package/lib/esm/menu/Menu.js.map +1 -1
  74. package/lib/esm/menu/menu-types.js.map +1 -1
  75. package/lib/esm/menu/stories/index.js +6 -0
  76. package/lib/esm/menu/stories/index.js.map +1 -1
  77. package/lib/esm/menu/stories/menu-custom-items.story.js +2 -2
  78. package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
  79. package/lib/esm/menu/stories/menu-default.story.js +14 -14
  80. package/lib/esm/menu/stories/menu-default.story.js.map +1 -1
  81. package/lib/esm/menu/stories/menu-in-dialog.story.js +2 -2
  82. package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
  83. package/lib/esm/menu/stories/menu-in-popover.story.js +2 -2
  84. package/lib/esm/menu/stories/menu-in-popover.story.js.map +1 -1
  85. package/lib/esm/menu/stories/menu-nested.story.js +2 -2
  86. package/lib/esm/menu/stories/menu-nested.story.js.map +1 -1
  87. package/lib/esm/menu/stories/menu-placements.story.js +14 -14
  88. package/lib/esm/menu/stories/menu-placements.story.js.map +1 -1
  89. package/lib/esm/menu/stories/menu-radio-and-normal.story.js +42 -0
  90. package/lib/esm/menu/stories/menu-radio-and-normal.story.js.map +1 -0
  91. package/lib/esm/menu/stories/menu-radio-items.story.js +43 -0
  92. package/lib/esm/menu/stories/menu-radio-items.story.js.map +1 -0
  93. package/lib/esm/menu/stories/menu-with-category.story.js +2 -2
  94. package/lib/esm/menu/stories/menu-with-category.story.js.map +1 -1
  95. package/lib/esm/menu/stories/menu-with-disabled-item.story.js +2 -2
  96. package/lib/esm/menu/stories/menu-with-disabled-item.story.js.map +1 -1
  97. package/lib/esm/menu/stories/menu-with-divider.story.js +2 -2
  98. package/lib/esm/menu/stories/menu-with-divider.story.js.map +1 -1
  99. package/lib/esm/menu/stories/menu-with-icon.story.js +2 -2
  100. package/lib/esm/menu/stories/menu-with-icon.story.js.map +1 -1
  101. package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js +2 -2
  102. package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
  103. package/lib/esm/menu/stories/menu.stories.js +29 -1
  104. package/lib/esm/menu/stories/menu.stories.js.map +1 -1
  105. package/lib/esm/select-icon-button/stories/select-icon-button-with-menu.story.js +1 -3
  106. package/lib/esm/select-icon-button/stories/select-icon-button-with-menu.story.js.map +1 -1
  107. package/lib/types/ai/more-files/stories/more-files.story.d.ts.map +1 -1
  108. package/lib/types/ai/prompt/Prompt.d.ts.map +1 -1
  109. package/lib/types/ai/user-bubble/stories/user-bubble-and-files.story.d.ts.map +1 -1
  110. package/lib/types/breadcrumbs/stories/breadcrumbs-ellipses.story.d.ts.map +1 -1
  111. package/lib/types/breadcrumbs/stories/breadcrumbs-header.story.d.ts.map +1 -1
  112. package/lib/types/data-grid/Components.d.ts.map +1 -1
  113. package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts.map +1 -1
  114. package/lib/types/dropdown-button/stories/dropdown-button-with-menu.story.d.ts.map +1 -1
  115. package/lib/types/icon-button-array/IconButtonArray.d.ts.map +1 -1
  116. package/lib/types/menu/Menu.d.ts +8 -3
  117. package/lib/types/menu/Menu.d.ts.map +1 -1
  118. package/lib/types/menu/menu-types.d.ts +9 -0
  119. package/lib/types/menu/menu-types.d.ts.map +1 -1
  120. package/lib/types/menu/stories/index.d.ts +4 -0
  121. package/lib/types/menu/stories/index.d.ts.map +1 -1
  122. package/lib/types/menu/stories/menu-custom-items.story.d.ts.map +1 -1
  123. package/lib/types/menu/stories/menu-default.story.d.ts.map +1 -1
  124. package/lib/types/menu/stories/menu-in-dialog.story.d.ts.map +1 -1
  125. package/lib/types/menu/stories/menu-in-popover.story.d.ts.map +1 -1
  126. package/lib/types/menu/stories/menu-nested.story.d.ts.map +1 -1
  127. package/lib/types/menu/stories/menu-placements.story.d.ts.map +1 -1
  128. package/lib/types/menu/stories/menu-radio-and-normal.story.d.ts +24 -0
  129. package/lib/types/menu/stories/menu-radio-and-normal.story.d.ts.map +1 -0
  130. package/lib/types/menu/stories/menu-radio-items.story.d.ts +24 -0
  131. package/lib/types/menu/stories/menu-radio-items.story.d.ts.map +1 -0
  132. package/lib/types/menu/stories/menu-with-category.story.d.ts.map +1 -1
  133. package/lib/types/menu/stories/menu-with-disabled-item.story.d.ts.map +1 -1
  134. package/lib/types/menu/stories/menu-with-divider.story.d.ts.map +1 -1
  135. package/lib/types/menu/stories/menu-with-icon.story.d.ts.map +1 -1
  136. package/lib/types/menu/stories/menu-with-keyboard-shortcuts.story.d.ts.map +1 -1
  137. package/lib/types/menu/stories/menu.stories.d.ts +2 -0
  138. package/lib/types/menu/stories/menu.stories.d.ts.map +1 -1
  139. package/lib/types/select-icon-button/stories/select-icon-button-with-menu.story.d.ts.map +1 -1
  140. package/package.json +2 -2
@@ -199,22 +199,26 @@ const MenuComponent = ({ children, isOpen: controlledOpen, onClose, isRoot, anch
199
199
  setHasFocusInside,
200
200
  }, children: (0, jsx_runtime_1.jsx)(react_1.FloatingList, { elementsRef: elementsRef, labelsRef: labelsRef, children: isOpen && ((0, jsx_runtime_1.jsx)(conditional_wrap_1.ConditionalWrap, { shouldWrap: isPortaled, wrap: (wrapChildren) => ((0, jsx_runtime_1.jsx)(react_1.FloatingPortal, { root: portalTarget, children: wrapChildren })), children: (0, jsx_runtime_1.jsx)(react_1.FloatingFocusManager, { context: context, modal: false, initialFocus: 0, returnFocus: !isNested, closeOnFocusOut: true, guards: true, children: (0, jsx_runtime_1.jsx)(Component, Object.assign({ ref: refs.setFloating, className: menuClasses, style: Object.assign({ minWidth: minWidth !== undefined ? `${minWidth}px` : undefined }, floatingStyles) }, getFloatingProps(), { children: children })) }) })) }) })] }));
201
201
  };
202
+ /**
203
+ * @internal This is used to build the menu item components. Do not export this component.
204
+ */
202
205
  const MenuItemComponent = (_a) => {
203
- var { title, leadingContent, trailingContent, description, isDisabled, as, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["title", "leadingContent", "trailingContent", "description", "isDisabled", "as", "className", "style", "htmlAttributes", "ref"]);
206
+ var { title, leadingContent, trailingContent, preLeadingContent, description, isDisabled, as, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["title", "leadingContent", "trailingContent", "preLeadingContent", "description", "isDisabled", "as", "className", "style", "htmlAttributes", "ref"]);
204
207
  const classes = (0, classnames_1.default)(`ndl-menu-item`, className, {
205
208
  'ndl-disabled': isDisabled,
206
209
  });
207
210
  const Component = as !== null && as !== void 0 ? as : 'button';
208
- return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, ref: ref, type: "button", role: "menuitem", disabled: isDisabled, style: style }, restProps, htmlAttributes, { children: (0, jsx_runtime_1.jsxs)("div", { className: "ndl-menu-item-inner", children: [Boolean(leadingContent) && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-menu-item-leading-content", children: leadingContent })), (0, jsx_runtime_1.jsxs)("div", { className: "ndl-menu-item-title-wrapper", children: [(0, jsx_runtime_1.jsx)("div", { className: "ndl-menu-item-title", children: title }), Boolean(description) && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-menu-item-description", children: description }))] }), Boolean(trailingContent) && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-menu-item-trailing-content", children: trailingContent }))] }) })));
211
+ return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, ref: ref, type: "button", role: "menuitem", disabled: isDisabled, style: style }, restProps, htmlAttributes, { children: (0, jsx_runtime_1.jsxs)("div", { className: "ndl-menu-item-inner", children: [Boolean(preLeadingContent) && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-menu-item-pre-leading-content", children: preLeadingContent })), Boolean(leadingContent) && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-menu-item-leading-content", children: leadingContent })), (0, jsx_runtime_1.jsxs)("div", { className: "ndl-menu-item-title-wrapper", children: [(0, jsx_runtime_1.jsx)("div", { className: "ndl-menu-item-title", children: title }), Boolean(description) && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-menu-item-description", children: description }))] }), Boolean(trailingContent) && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-menu-item-trailing-content", children: trailingContent }))] }) })));
209
212
  };
210
- const MenuItem = ({ title, className, style, leadingVisual, trailingContent, description, isDisabled, as, onClick, onFocus, htmlAttributes, id, ref, }) => {
213
+ const MenuItem = (_a) => {
214
+ var { title, className, style, leadingVisual, trailingContent, description, isDisabled, as, onClick, onFocus, htmlAttributes, id, ref } = _a, restProps = __rest(_a, ["title", "className", "style", "leadingVisual", "trailingContent", "description", "isDisabled", "as", "onClick", "onFocus", "htmlAttributes", "id", "ref"]);
211
215
  const menu = (0, react_2.useContext)(MenuContext);
212
216
  const itemLabel = typeof title === 'string' ? title : undefined;
213
217
  const item = (0, react_1.useListItem)({ label: isDisabled === true ? null : itemLabel });
214
218
  const tree = (0, react_1.useFloatingTree)();
215
219
  const isActive = item.index === menu.activeIndex;
216
220
  const mergedRefs = (0, react_1.useMergeRefs)([item.ref, ref]);
217
- return ((0, jsx_runtime_1.jsx)(MenuItemComponent, { as: as !== null && as !== void 0 ? as : 'button', style: style, className: className, ref: mergedRefs, title: title, description: description, leadingContent: leadingVisual, trailingContent: trailingContent, isDisabled: isDisabled, htmlAttributes: Object.assign(Object.assign(Object.assign({}, htmlAttributes), { tabIndex: isActive ? 0 : -1 }), menu.getItemProps({
221
+ return ((0, jsx_runtime_1.jsx)(MenuItemComponent, Object.assign({ as: as !== null && as !== void 0 ? as : 'button', style: style, className: className, ref: mergedRefs, title: title, description: description, leadingContent: leadingVisual, trailingContent: trailingContent, isDisabled: isDisabled, htmlAttributes: Object.assign(Object.assign(Object.assign({}, htmlAttributes), { tabIndex: isActive ? 0 : -1 }), menu.getItemProps({
218
222
  id: id,
219
223
  onClick(event) {
220
224
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
@@ -224,8 +228,7 @@ const MenuItem = ({ title, className, style, leadingVisual, trailingContent, des
224
228
  onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
225
229
  menu.setHasFocusInside(true);
226
230
  },
227
- style: style,
228
- })) }));
231
+ })) }, restProps)));
229
232
  };
230
233
  const NestedMenuItem = ({ title, isDisabled, description, leadingVisual, as, onFocus, onClick, className, style, htmlAttributes, id, ref, }) => {
231
234
  const menu = (0, react_2.useContext)(MenuContext);
@@ -252,17 +255,50 @@ const CategoryItem = (_a) => {
252
255
  const Component = as !== null && as !== void 0 ? as : 'div';
253
256
  return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: children })));
254
257
  };
258
+ const RadioItem = (_a) => {
259
+ var { title, leadingVisual, trailingContent, description, isDisabled, isChecked = false, onClick, onFocus, className, style, as, id, htmlAttributes, ref } = _a, restProps = __rest(_a, ["title", "leadingVisual", "trailingContent", "description", "isDisabled", "isChecked", "onClick", "onFocus", "className", "style", "as", "id", "htmlAttributes", "ref"]);
260
+ const menu = (0, react_2.useContext)(MenuContext);
261
+ const itemLabel = typeof title === 'string' ? title : undefined;
262
+ const item = (0, react_1.useListItem)({ label: isDisabled === true ? null : itemLabel });
263
+ const tree = (0, react_1.useFloatingTree)();
264
+ const isActive = item.index === menu.activeIndex;
265
+ const mergedRefs = (0, react_1.useMergeRefs)([item.ref, ref]);
266
+ const classes = (0, classnames_1.default)('ndl-menu-radio-item', className, {
267
+ 'ndl-checked': isChecked,
268
+ });
269
+ return ((0, jsx_runtime_1.jsx)(MenuItemComponent, Object.assign({ as: as !== null && as !== void 0 ? as : 'button', style: style, className: classes, ref: mergedRefs, title: title, description: description, preLeadingContent: isChecked ? ((0, jsx_runtime_1.jsx)(icons_1.CheckIconOutline, { className: "n-size-5 n-shrink-0 n-self-center" })) : null, leadingContent: leadingVisual, trailingContent: trailingContent, isDisabled: isDisabled, htmlAttributes: Object.assign(Object.assign(Object.assign({}, htmlAttributes), { 'aria-checked': isChecked, role: 'menuitemradio', tabIndex: isActive ? 0 : -1 }), menu.getItemProps({
270
+ id: id,
271
+ onClick(event) {
272
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
273
+ tree === null || tree === void 0 ? void 0 : tree.events.emit('click', { id });
274
+ },
275
+ onFocus(event) {
276
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
277
+ menu.setHasFocusInside(true);
278
+ },
279
+ })) }, restProps)));
280
+ };
255
281
  const MenuItems = (_a) => {
256
282
  var { as, children, className, htmlAttributes, style, ref } = _a, restProps = __rest(_a, ["as", "children", "className", "htmlAttributes", "style", "ref"]);
257
283
  const classes = (0, classnames_1.default)('ndl-menu-items', className);
258
284
  const Component = as !== null && as !== void 0 ? as : 'div';
259
285
  return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: children })));
260
286
  };
287
+ const MenuGroup = (_a) => {
288
+ var { children, className, htmlAttributes, style, ref } = _a, restProps = __rest(_a, ["children", "className", "htmlAttributes", "style", "ref"]);
289
+ const classes = (0, classnames_1.default)('ndl-menu-group', className);
290
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes, style: style, ref: ref, role: "group" }, restProps, htmlAttributes, { children: children })));
291
+ };
261
292
  const Menu = Object.assign(MenuWrapper, {
262
293
  CategoryItem: CategoryItem,
263
294
  Divider: divider_1.Divider,
295
+ Group: MenuGroup,
264
296
  Item: MenuItem,
297
+ /**
298
+ * @deprecated Use Menu.Group instead if you want to group items together. If not, you can just omit this component in your implementation.
299
+ */
265
300
  Items: MenuItems,
301
+ RadioItem: RadioItem,
266
302
  });
267
303
  exports.Menu = Menu;
268
304
  //# sourceMappingURL=Menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/menu/Menu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,8CAwB4B;AAC5B,4DAAoC;AAEpC,iCAA+E;AAG/E,0DAAsD;AACtD,6DAA6D;AAC7D,wCAAqC;AACrC,oCAAmD;AACnD,wCAAkD;AAClD,oCAA0C;AAU1C,MAAM,WAAW,GAAG,IAAA,qBAAa,EAQ9B;IACD,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;IACxB,MAAM,EAAE,KAAK;IACb,gEAAgE;IAChE,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,gEAAgE;IAChE,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;CAC5B,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,CAAC,KAAiD,EAAE,EAAE;IACxE,MAAM,QAAQ,GAAG,IAAA,+BAAuB,GAAE,CAAC;IAE3C,IAA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AAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IACjD,OAAO,CACL,uBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAEjB,QAAQ,IACC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAsC,EAQZ,EAAE,EAAE;QARQ,EACtD,EAAE,EACF,QAAQ,EACR,SAAS,EACT,cAAc,EACd,KAAK,EACL,GAAG,OAEuC,EADvC,SAAS,cAP0C,iEAQvD,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACxD,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IACjD,OAAO,CACL,uBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAEjB,QAAQ,IACC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IACtC,YAAY,EAAE,YAAY;IAC1B,OAAO,EAAE,iBAAO;IAChB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AACM,oBAAI","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingList,\n FloatingNode,\n FloatingPortal,\n FloatingTree,\n offset,\n safePolygon,\n shift,\n useClick,\n useDismiss,\n useFloating,\n useFloatingNodeId,\n useFloatingParentNodeId,\n useFloatingTree,\n useHover,\n useInteractions,\n useListItem,\n useListNavigation,\n useMergeRefs,\n useRole,\n useTypeahead,\n} from '@floating-ui/react';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { createContext, useContext, useEffect, useRef, useState } from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { Divider } from '../divider';\nimport { ChevronRightIconOutline } from '../icons';\nimport { placementTranslation } from '../popover';\nimport { useNeedleTheme } from '../theme';\nimport type {\n CategoryItemProps,\n MenuItemComponentProps,\n MenuItemProps,\n MenuItemsProps,\n MenuProps,\n NestedMenuItemProps,\n} from './menu-types';\n\nconst MenuContext = createContext<{\n getItemProps: (\n userProps?: React.HTMLProps<HTMLElement>,\n ) => Record<string, unknown>;\n activeIndex: number | null;\n setActiveIndex: React.Dispatch<React.SetStateAction<number | null>>;\n setHasFocusInside: React.Dispatch<React.SetStateAction<boolean>>;\n isOpen: boolean;\n}>({\n activeIndex: null,\n getItemProps: () => ({}),\n isOpen: false,\n // oxlint-disable-next-line @typescript-eslint/no-empty-function\n setActiveIndex: () => {},\n // oxlint-disable-next-line @typescript-eslint/no-empty-function\n setHasFocusInside: () => {},\n});\n\nconst MenuWrapper = (props: React.ComponentProps<typeof MenuComponent>) => {\n const parentId = useFloatingParentNodeId();\n\n if (parentId === null) {\n return (\n <FloatingTree>\n <MenuComponent {...props} isRoot />\n </FloatingTree>\n );\n }\n\n return <MenuComponent {...props} />;\n};\n\nconst MenuComponent = <T extends React.ElementType = 'div'>({\n children,\n isOpen: controlledOpen,\n onClose,\n isRoot,\n anchorRef,\n as,\n className,\n placement,\n minWidth,\n title,\n isDisabled,\n description,\n icon,\n isPortaled = true,\n portalTarget,\n htmlAttributes,\n strategy,\n ref: forwardedRef,\n}: PolymorphicCommonProps<T, MenuProps>) => {\n const [isOpen, setIsOpen] = useState(false);\n const [hasFocusInside, setHasFocusInside] = useState(false);\n const [activeIndex, setActiveIndex] = useState<number | null>(null);\n\n const elementsRef = useRef<Array<HTMLButtonElement | null>>([]);\n const labelsRef = useRef<Array<string | null>>([]);\n const parent = useContext(MenuContext);\n\n const isInsideDialog = useIsInsideDialog();\n const tree = useFloatingTree();\n const nodeId = useFloatingNodeId();\n const parentId = useFloatingParentNodeId();\n const item = useListItem();\n const { themeClassName } = useNeedleTheme();\n useEffect(() => {\n if (controlledOpen === undefined) {\n return;\n }\n setIsOpen(controlledOpen);\n }, [controlledOpen]);\n\n useEffect(() => {\n if (isOpen) {\n setActiveIndex(0);\n }\n }, [isOpen]);\n\n const Component = as ?? 'div';\n\n const isNested = parentId !== null;\n\n const defaultPlacement = isNested ? 'right-start' : 'bottom-start';\n\n const { floatingStyles, refs, context } = useFloating<HTMLButtonElement>({\n elements: {\n reference: anchorRef?.current,\n },\n middleware: [\n offset({\n alignmentAxis: isNested ? -4 : 0,\n mainAxis: isNested ? 0 : 4,\n }),\n flip({\n fallbackPlacements: ['left-start', 'right-start'],\n }),\n shift(),\n ],\n nodeId,\n onOpenChange: (open, event) => {\n if (controlledOpen === undefined) {\n setIsOpen(open);\n }\n\n if (!open) {\n if (event instanceof PointerEvent) {\n onClose?.(event, { type: 'backdropClick' });\n } else if (event instanceof KeyboardEvent) {\n onClose?.(event, { type: 'escapeKeyDown' });\n }\n }\n },\n open: isOpen,\n placement: placement ? placementTranslation[placement] : defaultPlacement,\n strategy: strategy ?? (isInsideDialog ? 'fixed' : 'absolute'),\n whileElementsMounted: autoUpdate,\n });\n\n const hover = useHover(context, {\n delay: { open: 75 },\n enabled: isNested,\n handleClose: safePolygon({ blockPointerEvents: true }),\n });\n const click = useClick(context, {\n event: 'mousedown',\n ignoreMouse: isNested,\n toggle: !isNested,\n });\n const role = useRole(context, { role: 'menu' });\n const dismiss = useDismiss(context, { bubbles: true });\n const listNavigation = useListNavigation(context, {\n activeIndex,\n listRef: elementsRef,\n nested: isNested,\n onNavigate: setActiveIndex,\n });\n const typeahead = useTypeahead(context, {\n activeIndex,\n listRef: labelsRef,\n onMatch: isOpen ? setActiveIndex : undefined,\n });\n\n const { getReferenceProps, getFloatingProps, getItemProps } = useInteractions(\n [hover, click, role, dismiss, listNavigation, typeahead],\n );\n\n // Event emitter allows you to communicate across tree components.\n // This effect closes all menus when an item gets clicked anywhere\n // in the tree.\n useEffect(() => {\n if (!tree) {\n return;\n }\n\n function handleTreeClick(data: { id?: string }) {\n if (controlledOpen === undefined) {\n setIsOpen(false);\n }\n onClose?.(undefined, { id: data?.id, type: 'itemClick' });\n }\n\n function onSubMenuOpen(event: { nodeId: string; parentId: string }) {\n if (event.nodeId !== nodeId && event.parentId === parentId) {\n if (controlledOpen === undefined) {\n setIsOpen(false);\n }\n onClose?.(undefined, { type: 'itemClick' });\n }\n }\n\n tree.events.on('click', handleTreeClick);\n tree.events.on('menuopen', onSubMenuOpen);\n\n return () => {\n tree.events.off('click', handleTreeClick);\n tree.events.off('menuopen', onSubMenuOpen);\n };\n }, [tree, nodeId, parentId, onClose, controlledOpen]);\n\n useEffect(() => {\n if (isOpen && tree) {\n tree.events.emit('menuopen', { nodeId, parentId });\n }\n }, [tree, isOpen, nodeId, parentId]);\n\n const menuClasses = classNames('ndl-menu', themeClassName, className);\n const ref = useMergeRefs([refs.setReference, item.ref, forwardedRef]);\n\n return (\n <FloatingNode id={nodeId}>\n {isRoot !== true && (\n <NestedMenuItem\n ref={ref}\n className={isNested ? 'MenuItem' : 'RootMenu'}\n isDisabled={isDisabled}\n htmlAttributes={{\n 'data-focus-inside': hasFocusInside ? '' : undefined,\n 'data-nested': isNested ? '' : undefined,\n 'data-open': isOpen ? '' : undefined,\n role: isNested ? 'menuitem' : undefined,\n tabIndex: !isNested\n ? undefined\n : parent.activeIndex === item.index\n ? 0\n : -1,\n ...htmlAttributes,\n ...getReferenceProps(\n parent.getItemProps({\n onFocus(event: React.FocusEvent<HTMLButtonElement>) {\n htmlAttributes?.onFocus?.(event);\n setHasFocusInside(false);\n parent.setHasFocusInside(true);\n },\n }),\n ),\n }}\n title={title}\n description={description}\n leadingVisual={icon}\n />\n )}\n <MenuContext.Provider\n value={{\n activeIndex,\n getItemProps,\n isOpen: isDisabled === true ? false : isOpen,\n setActiveIndex,\n setHasFocusInside,\n }}\n >\n <FloatingList elementsRef={elementsRef} labelsRef={labelsRef}>\n {isOpen && (\n <ConditionalWrap\n shouldWrap={isPortaled}\n wrap={(wrapChildren) => (\n <FloatingPortal root={portalTarget}>\n {wrapChildren}\n </FloatingPortal>\n )}\n >\n <FloatingFocusManager\n context={context}\n modal={false}\n initialFocus={0}\n returnFocus={!isNested}\n closeOnFocusOut={true}\n guards={true}\n >\n <Component\n ref={refs.setFloating}\n className={menuClasses}\n style={{\n minWidth:\n minWidth !== undefined ? `${minWidth}px` : undefined,\n ...floatingStyles,\n }}\n {...getFloatingProps()}\n >\n {children}\n </Component>\n </FloatingFocusManager>\n </ConditionalWrap>\n )}\n </FloatingList>\n </MenuContext.Provider>\n </FloatingNode>\n );\n};\n\nconst MenuItemComponent = <T extends React.ElementType = 'button'>({\n title,\n leadingContent,\n trailingContent,\n description,\n isDisabled,\n as,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, MenuItemComponentProps>) => {\n const classes = classNames(`ndl-menu-item`, className, {\n 'ndl-disabled': isDisabled,\n });\n\n const Component = as ?? 'button';\n\n return (\n <Component\n className={classes}\n ref={ref}\n type=\"button\"\n role=\"menuitem\"\n disabled={isDisabled}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-menu-item-inner\">\n {Boolean(leadingContent) && (\n <div className=\"ndl-menu-item-leading-content\">{leadingContent}</div>\n )}\n\n <div className=\"ndl-menu-item-title-wrapper\">\n <div className=\"ndl-menu-item-title\">{title}</div>\n {Boolean(description) && (\n <div className=\"ndl-menu-item-description\">{description}</div>\n )}\n </div>\n\n {Boolean(trailingContent) && (\n <div className=\"ndl-menu-item-trailing-content\">\n {trailingContent}\n </div>\n )}\n </div>\n </Component>\n );\n};\n\nconst MenuItem = <T extends React.ElementType = 'button'>({\n title,\n className,\n style,\n leadingVisual,\n trailingContent,\n description,\n isDisabled,\n as,\n onClick,\n onFocus,\n htmlAttributes,\n id,\n ref,\n}: PolymorphicCommonProps<T, MenuItemProps>) => {\n const menu = useContext(MenuContext);\n const itemLabel = typeof title === 'string' ? title : undefined;\n const item = useListItem({ label: isDisabled === true ? null : itemLabel });\n const tree = useFloatingTree();\n const isActive = item.index === menu.activeIndex;\n\n const mergedRefs = useMergeRefs([item.ref, ref]);\n\n return (\n <MenuItemComponent\n as={as ?? 'button'}\n style={style}\n className={className}\n ref={mergedRefs}\n title={title}\n description={description}\n leadingContent={leadingVisual}\n trailingContent={trailingContent}\n isDisabled={isDisabled}\n htmlAttributes={{\n ...htmlAttributes,\n tabIndex: isActive ? 0 : -1,\n ...menu.getItemProps({\n id: id,\n onClick(event: React.MouseEvent<HTMLButtonElement>) {\n onClick?.(event);\n tree?.events.emit('click', { id });\n },\n onFocus(event: React.FocusEvent<HTMLButtonElement>) {\n onFocus?.(event);\n menu.setHasFocusInside(true);\n },\n style: style,\n }),\n }}\n />\n );\n};\n\nconst NestedMenuItem = <T extends React.ElementType = 'button'>({\n title,\n isDisabled,\n description,\n leadingVisual,\n as,\n onFocus,\n onClick,\n className,\n style,\n htmlAttributes,\n id,\n ref,\n}: PolymorphicCommonProps<T, NestedMenuItemProps>) => {\n const menu = useContext(MenuContext);\n const itemLabel = typeof title === 'string' ? title : undefined;\n const item = useListItem({ label: isDisabled === true ? null : itemLabel });\n const isActive = item.index === menu.activeIndex;\n const mergedRefs = useMergeRefs([item.ref, ref]);\n\n return (\n <MenuItemComponent\n as={as ?? 'button'}\n style={style}\n className={className}\n ref={mergedRefs}\n title={title}\n description={description}\n leadingContent={leadingVisual}\n trailingContent={\n <ChevronRightIconOutline className=\"ndl-menu-item-chevron\" />\n }\n isDisabled={isDisabled}\n htmlAttributes={{\n ...htmlAttributes,\n tabIndex: isActive ? 0 : -1,\n ...menu.getItemProps({\n onClick(event: React.MouseEvent<HTMLButtonElement>) {\n onClick?.(event);\n },\n onFocus(event: React.FocusEvent<HTMLButtonElement>) {\n onFocus?.(event);\n menu.setHasFocusInside(true);\n },\n onTouchStart() {\n menu.setHasFocusInside(true);\n },\n }),\n id: id,\n }}\n />\n );\n};\n\nconst CategoryItem = <T extends React.ElementType = 'button'>({\n children,\n className,\n style,\n as,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, CategoryItemProps>) => {\n const classes = classNames('ndl-menu-category-item', className);\n const Component: React.ElementType = as ?? 'div';\n return (\n <Component\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n );\n};\n\nconst MenuItems = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n htmlAttributes,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, MenuItemsProps>) => {\n const classes = classNames('ndl-menu-items', className);\n const Component: React.ElementType = as ?? 'div';\n return (\n <Component\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n );\n};\n\nconst Menu = Object.assign(MenuWrapper, {\n CategoryItem: CategoryItem,\n Divider: Divider,\n Item: MenuItem,\n Items: MenuItems,\n});\nexport { Menu };\n"]}
1
+ {"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/menu/Menu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,8CAwB4B;AAC5B,4DAAoC;AAEpC,iCAA+E;AAM/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,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IACtC,YAAY,EAAE,YAAY;IAC1B,OAAO,EAAE,iBAAO;IAChB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,QAAQ;IACd;;OAEG;IACH,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AACM,oBAAI","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingList,\n FloatingNode,\n FloatingPortal,\n FloatingTree,\n offset,\n safePolygon,\n shift,\n useClick,\n useDismiss,\n useFloating,\n useFloatingNodeId,\n useFloatingParentNodeId,\n useFloatingTree,\n useHover,\n useInteractions,\n useListItem,\n useListNavigation,\n useMergeRefs,\n useRole,\n useTypeahead,\n} from '@floating-ui/react';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { createContext, useContext, useEffect, useRef, useState } from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { Divider } from '../divider';\nimport { CheckIconOutline, ChevronRightIconOutline } from '../icons';\nimport { placementTranslation } from '../popover';\nimport { useNeedleTheme } from '../theme';\nimport type {\n CategoryItemProps,\n MenuGroupProps,\n MenuItemComponentProps,\n MenuItemProps,\n MenuItemsProps,\n MenuProps,\n NestedMenuItemProps,\n RadioItemProps,\n} from './menu-types';\n\nconst MenuContext = createContext<{\n getItemProps: (\n userProps?: React.HTMLProps<HTMLElement>,\n ) => Record<string, unknown>;\n activeIndex: number | null;\n setActiveIndex: React.Dispatch<React.SetStateAction<number | null>>;\n setHasFocusInside: React.Dispatch<React.SetStateAction<boolean>>;\n isOpen: boolean;\n}>({\n activeIndex: null,\n getItemProps: () => ({}),\n isOpen: false,\n // oxlint-disable-next-line @typescript-eslint/no-empty-function\n setActiveIndex: () => {},\n // oxlint-disable-next-line @typescript-eslint/no-empty-function\n setHasFocusInside: () => {},\n});\n\nconst MenuWrapper = (props: React.ComponentProps<typeof MenuComponent>) => {\n const parentId = useFloatingParentNodeId();\n\n if (parentId === null) {\n return (\n <FloatingTree>\n <MenuComponent {...props} isRoot />\n </FloatingTree>\n );\n }\n\n return <MenuComponent {...props} />;\n};\n\nconst MenuComponent = <T extends React.ElementType = 'div'>({\n children,\n isOpen: controlledOpen,\n onClose,\n isRoot,\n anchorRef,\n as,\n className,\n placement,\n minWidth,\n title,\n isDisabled,\n description,\n icon,\n isPortaled = true,\n portalTarget,\n htmlAttributes,\n strategy,\n ref: forwardedRef,\n}: PolymorphicCommonProps<T, MenuProps>) => {\n const [isOpen, setIsOpen] = useState(false);\n const [hasFocusInside, setHasFocusInside] = useState(false);\n const [activeIndex, setActiveIndex] = useState<number | null>(null);\n\n const elementsRef = useRef<Array<HTMLButtonElement | null>>([]);\n const labelsRef = useRef<Array<string | null>>([]);\n const parent = useContext(MenuContext);\n\n const isInsideDialog = useIsInsideDialog();\n const tree = useFloatingTree();\n const nodeId = useFloatingNodeId();\n const parentId = useFloatingParentNodeId();\n const item = useListItem();\n const { themeClassName } = useNeedleTheme();\n useEffect(() => {\n if (controlledOpen === undefined) {\n return;\n }\n setIsOpen(controlledOpen);\n }, [controlledOpen]);\n\n useEffect(() => {\n if (isOpen) {\n setActiveIndex(0);\n }\n }, [isOpen]);\n\n const Component = as ?? 'div';\n\n const isNested = parentId !== null;\n\n const defaultPlacement = isNested ? 'right-start' : 'bottom-start';\n\n const { floatingStyles, refs, context } = useFloating<HTMLButtonElement>({\n elements: {\n reference: anchorRef?.current,\n },\n middleware: [\n offset({\n alignmentAxis: isNested ? -4 : 0,\n mainAxis: isNested ? 0 : 4,\n }),\n flip({\n fallbackPlacements: ['left-start', 'right-start'],\n }),\n shift(),\n ],\n nodeId,\n onOpenChange: (open, event) => {\n if (controlledOpen === undefined) {\n setIsOpen(open);\n }\n\n if (!open) {\n if (event instanceof PointerEvent) {\n onClose?.(event, { type: 'backdropClick' });\n } else if (event instanceof KeyboardEvent) {\n onClose?.(event, { type: 'escapeKeyDown' });\n }\n }\n },\n open: isOpen,\n placement: placement ? placementTranslation[placement] : defaultPlacement,\n strategy: strategy ?? (isInsideDialog ? 'fixed' : 'absolute'),\n whileElementsMounted: autoUpdate,\n });\n\n const hover = useHover(context, {\n delay: { open: 75 },\n enabled: isNested,\n handleClose: safePolygon({ blockPointerEvents: true }),\n });\n const click = useClick(context, {\n event: 'mousedown',\n ignoreMouse: isNested,\n toggle: !isNested,\n });\n const role = useRole(context, { role: 'menu' });\n const dismiss = useDismiss(context, { bubbles: true });\n const listNavigation = useListNavigation(context, {\n activeIndex,\n listRef: elementsRef,\n nested: isNested,\n onNavigate: setActiveIndex,\n });\n const typeahead = useTypeahead(context, {\n activeIndex,\n listRef: labelsRef,\n onMatch: isOpen ? setActiveIndex : undefined,\n });\n\n const { getReferenceProps, getFloatingProps, getItemProps } = useInteractions(\n [hover, click, role, dismiss, listNavigation, typeahead],\n );\n\n // Event emitter allows you to communicate across tree components.\n // This effect closes all menus when an item gets clicked anywhere\n // in the tree.\n useEffect(() => {\n if (!tree) {\n return;\n }\n\n function handleTreeClick(data: { id?: string }) {\n if (controlledOpen === undefined) {\n setIsOpen(false);\n }\n onClose?.(undefined, { id: data?.id, type: 'itemClick' });\n }\n\n function onSubMenuOpen(event: { nodeId: string; parentId: string }) {\n if (event.nodeId !== nodeId && event.parentId === parentId) {\n if (controlledOpen === undefined) {\n setIsOpen(false);\n }\n onClose?.(undefined, { type: 'itemClick' });\n }\n }\n\n tree.events.on('click', handleTreeClick);\n tree.events.on('menuopen', onSubMenuOpen);\n\n return () => {\n tree.events.off('click', handleTreeClick);\n tree.events.off('menuopen', onSubMenuOpen);\n };\n }, [tree, nodeId, parentId, onClose, controlledOpen]);\n\n useEffect(() => {\n if (isOpen && tree) {\n tree.events.emit('menuopen', { nodeId, parentId });\n }\n }, [tree, isOpen, nodeId, parentId]);\n\n const menuClasses = classNames('ndl-menu', themeClassName, className);\n const ref = useMergeRefs([refs.setReference, item.ref, forwardedRef]);\n\n return (\n <FloatingNode id={nodeId}>\n {isRoot !== true && (\n <NestedMenuItem\n ref={ref}\n className={isNested ? 'MenuItem' : 'RootMenu'}\n isDisabled={isDisabled}\n htmlAttributes={{\n 'data-focus-inside': hasFocusInside ? '' : undefined,\n 'data-nested': isNested ? '' : undefined,\n 'data-open': isOpen ? '' : undefined,\n role: isNested ? 'menuitem' : undefined,\n tabIndex: !isNested\n ? undefined\n : parent.activeIndex === item.index\n ? 0\n : -1,\n ...htmlAttributes,\n ...getReferenceProps(\n parent.getItemProps({\n onFocus(event: React.FocusEvent<HTMLButtonElement>) {\n htmlAttributes?.onFocus?.(event);\n setHasFocusInside(false);\n parent.setHasFocusInside(true);\n },\n }),\n ),\n }}\n title={title}\n description={description}\n leadingVisual={icon}\n />\n )}\n <MenuContext.Provider\n value={{\n activeIndex,\n getItemProps,\n isOpen: isDisabled === true ? false : isOpen,\n setActiveIndex,\n setHasFocusInside,\n }}\n >\n <FloatingList elementsRef={elementsRef} labelsRef={labelsRef}>\n {isOpen && (\n <ConditionalWrap\n shouldWrap={isPortaled}\n wrap={(wrapChildren) => (\n <FloatingPortal root={portalTarget}>\n {wrapChildren}\n </FloatingPortal>\n )}\n >\n <FloatingFocusManager\n context={context}\n modal={false}\n initialFocus={0}\n returnFocus={!isNested}\n closeOnFocusOut={true}\n guards={true}\n >\n <Component\n ref={refs.setFloating}\n className={menuClasses}\n style={{\n minWidth:\n minWidth !== undefined ? `${minWidth}px` : undefined,\n ...floatingStyles,\n }}\n {...getFloatingProps()}\n >\n {children}\n </Component>\n </FloatingFocusManager>\n </ConditionalWrap>\n )}\n </FloatingList>\n </MenuContext.Provider>\n </FloatingNode>\n );\n};\n\n/**\n * @internal This is used to build the menu item components. Do not export this component.\n */\nconst MenuItemComponent = <T extends React.ElementType = 'button'>({\n title,\n leadingContent,\n trailingContent,\n preLeadingContent,\n description,\n isDisabled,\n as,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, MenuItemComponentProps>) => {\n const classes = classNames(`ndl-menu-item`, className, {\n 'ndl-disabled': isDisabled,\n });\n\n const Component = as ?? 'button';\n\n return (\n <Component\n className={classes}\n ref={ref}\n type=\"button\"\n role=\"menuitem\"\n disabled={isDisabled}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-menu-item-inner\">\n {Boolean(preLeadingContent) && (\n <div className=\"ndl-menu-item-pre-leading-content\">\n {preLeadingContent}\n </div>\n )}\n {Boolean(leadingContent) && (\n <div className=\"ndl-menu-item-leading-content\">{leadingContent}</div>\n )}\n\n <div className=\"ndl-menu-item-title-wrapper\">\n <div className=\"ndl-menu-item-title\">{title}</div>\n {Boolean(description) && (\n <div className=\"ndl-menu-item-description\">{description}</div>\n )}\n </div>\n\n {Boolean(trailingContent) && (\n <div className=\"ndl-menu-item-trailing-content\">\n {trailingContent}\n </div>\n )}\n </div>\n </Component>\n );\n};\n\nconst MenuItem = <T extends React.ElementType = 'button'>({\n title,\n className,\n style,\n leadingVisual,\n trailingContent,\n description,\n isDisabled,\n as,\n onClick,\n onFocus,\n htmlAttributes,\n id,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, MenuItemProps>) => {\n const menu = useContext(MenuContext);\n const itemLabel = typeof title === 'string' ? title : undefined;\n const item = useListItem({ label: isDisabled === true ? null : itemLabel });\n const tree = useFloatingTree();\n const isActive = item.index === menu.activeIndex;\n\n const mergedRefs = useMergeRefs([item.ref, ref]);\n\n return (\n <MenuItemComponent\n as={as ?? 'button'}\n style={style}\n className={className}\n ref={mergedRefs}\n title={title}\n description={description}\n leadingContent={leadingVisual}\n trailingContent={trailingContent}\n isDisabled={isDisabled}\n htmlAttributes={{\n ...htmlAttributes,\n tabIndex: isActive ? 0 : -1,\n ...menu.getItemProps({\n id: id,\n onClick(event: React.MouseEvent<HTMLButtonElement>) {\n onClick?.(event);\n tree?.events.emit('click', { id });\n },\n onFocus(event: React.FocusEvent<HTMLButtonElement>) {\n onFocus?.(event);\n menu.setHasFocusInside(true);\n },\n }),\n }}\n {...restProps}\n />\n );\n};\n\nconst NestedMenuItem = <T extends React.ElementType = 'button'>({\n title,\n isDisabled,\n description,\n leadingVisual,\n as,\n onFocus,\n onClick,\n className,\n style,\n htmlAttributes,\n id,\n ref,\n}: PolymorphicCommonProps<T, NestedMenuItemProps>) => {\n const menu = useContext(MenuContext);\n const itemLabel = typeof title === 'string' ? title : undefined;\n const item = useListItem({ label: isDisabled === true ? null : itemLabel });\n const isActive = item.index === menu.activeIndex;\n const mergedRefs = useMergeRefs([item.ref, ref]);\n\n return (\n <MenuItemComponent\n as={as ?? 'button'}\n style={style}\n className={className}\n ref={mergedRefs}\n title={title}\n description={description}\n leadingContent={leadingVisual}\n trailingContent={\n <ChevronRightIconOutline className=\"ndl-menu-item-chevron\" />\n }\n isDisabled={isDisabled}\n htmlAttributes={{\n ...htmlAttributes,\n tabIndex: isActive ? 0 : -1,\n ...menu.getItemProps({\n onClick(event: React.MouseEvent<HTMLButtonElement>) {\n onClick?.(event);\n },\n onFocus(event: React.FocusEvent<HTMLButtonElement>) {\n onFocus?.(event);\n menu.setHasFocusInside(true);\n },\n onTouchStart() {\n menu.setHasFocusInside(true);\n },\n }),\n id: id,\n }}\n />\n );\n};\n\nconst CategoryItem = <T extends React.ElementType = 'button'>({\n children,\n className,\n style,\n as,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, CategoryItemProps>) => {\n const classes = classNames('ndl-menu-category-item', className);\n const Component: React.ElementType = as ?? 'div';\n return (\n <Component\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n );\n};\n\nconst RadioItem = <T extends React.ElementType = 'button'>({\n title,\n leadingVisual,\n trailingContent,\n description,\n isDisabled,\n isChecked = false,\n onClick,\n onFocus,\n className,\n style,\n as,\n id,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, RadioItemProps>) => {\n const menu = useContext(MenuContext);\n const itemLabel = typeof title === 'string' ? title : undefined;\n const item = useListItem({ label: isDisabled === true ? null : itemLabel });\n const tree = useFloatingTree();\n const isActive = item.index === menu.activeIndex;\n\n const mergedRefs = useMergeRefs([item.ref, ref]);\n const classes = classNames('ndl-menu-radio-item', className, {\n 'ndl-checked': isChecked,\n });\n\n return (\n <MenuItemComponent\n as={as ?? 'button'}\n style={style}\n className={classes}\n ref={mergedRefs}\n title={title}\n description={description}\n preLeadingContent={\n isChecked ? (\n <CheckIconOutline className=\"n-size-5 n-shrink-0 n-self-center\" />\n ) : null\n }\n leadingContent={leadingVisual}\n trailingContent={trailingContent}\n isDisabled={isDisabled}\n htmlAttributes={{\n ...htmlAttributes,\n 'aria-checked': isChecked,\n role: 'menuitemradio',\n tabIndex: isActive ? 0 : -1,\n ...menu.getItemProps({\n id: id,\n onClick(event: React.MouseEvent<HTMLButtonElement>) {\n onClick?.(event);\n tree?.events.emit('click', { id });\n },\n onFocus(event: React.FocusEvent<HTMLButtonElement>) {\n onFocus?.(event);\n menu.setHasFocusInside(true);\n },\n }),\n }}\n {...restProps}\n />\n );\n};\n\nconst MenuItems = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n htmlAttributes,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, MenuItemsProps>) => {\n const classes = classNames('ndl-menu-items', className);\n const Component: React.ElementType = as ?? 'div';\n return (\n <Component\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </Component>\n );\n};\n\nconst MenuGroup = ({\n children,\n className,\n htmlAttributes,\n style,\n ref,\n ...restProps\n}: CommonProps<'div', MenuGroupProps>) => {\n const classes = classNames('ndl-menu-group', className);\n return (\n <div\n className={classes}\n style={style}\n ref={ref}\n role=\"group\"\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </div>\n );\n};\n\nconst Menu = Object.assign(MenuWrapper, {\n CategoryItem: CategoryItem,\n Divider: Divider,\n Group: MenuGroup,\n Item: MenuItem,\n /**\n * @deprecated Use Menu.Group instead if you want to group items together. If not, you can just omit this component in your implementation.\n */\n Items: MenuItems,\n RadioItem: RadioItem,\n});\nexport { Menu };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"menu-types.js","sourceRoot":"","sources":["../../../src/menu/menu-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type Popover } from '../popover';\n\nexport interface MenuProps {\n /** Whether the menu is open or closed (uncontrolled when omitted) */\n isOpen?: boolean;\n /** Callback function that is called when the menu closes */\n onClose?: (\n event: Event | undefined,\n closeReason: {\n type: 'backdropClick' | 'itemClick' | 'escapeKeyDown';\n id?: string;\n },\n ) => void;\n /** Anchor element ref for positioning */\n anchorRef?: React.RefObject<HTMLElement | null>;\n /** Content displayed inside the menu */\n children?: React.ReactNode;\n /** Whether the menu is a root menu instance. This is set internally by the component based on nesting */\n isRoot?: boolean;\n /** The placement of the floating element is determined by two sets of words. The first set of words specifies the point on the anchor element where the floating element will be attached. The second set of coordinates specifies the point on the floating element that will attach to the anchor element.*/\n placement?: React.ComponentProps<typeof Popover>['placement'];\n /** Minimum width in pixels for the menu component */\n minWidth?: number;\n /** Optional title for nested trigger rendering */\n title?: string;\n /** Whether the menu trigger is disabled */\n isDisabled?: boolean;\n /** Optional description for nested trigger rendering */\n description?: React.ReactNode;\n /** Optional icon for nested trigger rendering */\n icon?: React.ReactNode;\n /** Whether the menu should be wrapped in a floating portal */\n isPortaled?: boolean;\n /** Portal target element (defaults to `document.body`) */\n portalTarget?: HTMLElement | null;\n /** Positioning strategy used by Floating UI */\n strategy?: 'absolute' | 'fixed';\n}\n\nexport interface MenuItemProps {\n /** Title of the menu item component */\n title: React.ReactNode;\n /** Leading icon for the menu item component */\n leadingVisual?: React.ReactNode;\n trailingContent?: React.ReactNode;\n /** Supporting text below title */\n description?: React.ReactNode;\n /** Whether the menu item is disabled */\n isDisabled?: boolean;\n /** Callback function that is called when the menu item is clicked and it closes the menu tree */\n onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** Callback function that is called when the menu item is focused */\n onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;\n /** Unique identifier for the menu item */\n id?: string;\n /** Content displayed inside the menu item component */\n children?: React.ReactNode;\n}\n\nexport type NestedMenuItemProps = Omit<\n MenuItemProps,\n 'children' | 'trailingContent'\n>;\n\nexport interface MenuItemsProps {\n /** Content displayed inside the menu items component */\n children?: React.ReactNode;\n}\n\nexport interface CategoryItemProps {\n /** Content displayed inside the category item component */\n children?: React.ReactNode;\n}\n\nexport type MenuItemComponentProps = {\n title?: React.ReactNode;\n description?: React.ReactNode;\n className?: string;\n leadingContent?: React.ReactNode;\n trailingContent?: React.ReactNode;\n isDisabled?: boolean;\n};\n"]}
1
+ {"version":3,"file":"menu-types.js","sourceRoot":"","sources":["../../../src/menu/menu-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type Popover } from '../popover';\n\nexport interface MenuProps {\n /** Whether the menu is open or closed (uncontrolled when omitted) */\n isOpen?: boolean;\n /** Callback function that is called when the menu closes */\n onClose?: (\n event: Event | undefined,\n closeReason: {\n type: 'backdropClick' | 'itemClick' | 'escapeKeyDown';\n id?: string;\n },\n ) => void;\n /** Anchor element ref for positioning */\n anchorRef?: React.RefObject<HTMLElement | null>;\n /** Content displayed inside the menu */\n children?: React.ReactNode;\n /** Whether the menu is a root menu instance. This is set internally by the component based on nesting */\n isRoot?: boolean;\n /** The placement of the floating element is determined by two sets of words. The first set of words specifies the point on the anchor element where the floating element will be attached. The second set of coordinates specifies the point on the floating element that will attach to the anchor element.*/\n placement?: React.ComponentProps<typeof Popover>['placement'];\n /** Minimum width in pixels for the menu component */\n minWidth?: number;\n /** Optional title for nested trigger rendering */\n title?: string;\n /** Whether the menu trigger is disabled */\n isDisabled?: boolean;\n /** Optional description for nested trigger rendering */\n description?: React.ReactNode;\n /** Optional icon for nested trigger rendering */\n icon?: React.ReactNode;\n /** Whether the menu should be wrapped in a floating portal */\n isPortaled?: boolean;\n /** Portal target element (defaults to `document.body`) */\n portalTarget?: HTMLElement | null;\n /** Positioning strategy used by Floating UI */\n strategy?: 'absolute' | 'fixed';\n}\n\nexport interface MenuItemProps {\n /** Title of the menu item component */\n title: React.ReactNode;\n /** Leading icon for the menu item component */\n leadingVisual?: React.ReactNode;\n trailingContent?: React.ReactNode;\n /** Supporting text below title */\n description?: React.ReactNode;\n /** Whether the menu item is disabled */\n isDisabled?: boolean;\n /** Callback function that is called when the menu item is clicked and it closes the menu tree */\n onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** Callback function that is called when the menu item is focused */\n onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;\n /** Unique identifier for the menu item */\n id?: string;\n /** Content displayed inside the menu item component */\n children?: React.ReactNode;\n}\n\nexport type NestedMenuItemProps = Omit<\n MenuItemProps,\n 'children' | 'trailingContent'\n>;\n\nexport interface MenuItemsProps {\n /** Content displayed inside the menu items component */\n children?: React.ReactNode;\n}\n\nexport interface CategoryItemProps {\n /** Content displayed inside the category item component */\n children?: React.ReactNode;\n}\n\nexport type MenuItemComponentProps = {\n title?: React.ReactNode;\n description?: React.ReactNode;\n className?: string;\n leadingContent?: React.ReactNode;\n trailingContent?: React.ReactNode;\n isDisabled?: boolean;\n preLeadingContent?: React.ReactNode;\n};\n\nexport type RadioItemProps = MenuItemProps & {\n /** Whether the radio item is checked. Marks the item as aria-checked. */\n isChecked?: boolean;\n};\n\nexport type MenuGroupProps = {\n /** Content displayed inside the group. */\n children?: React.ReactNode;\n};\n"]}
@@ -23,7 +23,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.MenuWithKeyboardShortcutsSrc = exports.MenuPlacementsSrc = exports.MenuWithDisabledItemSrc = exports.MenuDividerSrc = exports.MenuInDialogSrc = exports.MenuInPopoverSrc = exports.MenuCustomItemsSrc = exports.MenuWithIconSrc = exports.MenuWithCategorySrc = exports.MenuNestedSrc = exports.MenuDefaultSrc = exports.MenuWithKeyboardShortcuts = exports.MenuPlacements = exports.MenuWithDisabledItem = exports.MenuDivider = exports.MenuInDialog = exports.MenuInPopover = exports.MenuCustomItems = exports.MenuWithIcon = exports.MenuWithCategory = exports.MenuNested = exports.MenuDefault = void 0;
26
+ exports.MenuRadioAndNormalSrc = exports.MenuRadioItemsSrc = exports.MenuWithKeyboardShortcutsSrc = exports.MenuPlacementsSrc = exports.MenuWithDisabledItemSrc = exports.MenuDividerSrc = exports.MenuInDialogSrc = exports.MenuInPopoverSrc = exports.MenuCustomItemsSrc = exports.MenuWithIconSrc = exports.MenuWithCategorySrc = exports.MenuNestedSrc = exports.MenuDefaultSrc = exports.MenuRadioAndNormal = exports.MenuRadioItems = exports.MenuWithKeyboardShortcuts = exports.MenuPlacements = exports.MenuWithDisabledItem = exports.MenuDivider = exports.MenuInDialog = exports.MenuInPopover = exports.MenuCustomItems = exports.MenuWithIcon = exports.MenuWithCategory = exports.MenuNested = exports.MenuDefault = void 0;
27
27
  var menu_default_story_1 = require("./menu-default.story");
28
28
  Object.defineProperty(exports, "MenuDefault", { enumerable: true, get: function () { return __importDefault(menu_default_story_1).default; } });
29
29
  var menu_nested_story_1 = require("./menu-nested.story");
@@ -46,6 +46,10 @@ var menu_placements_story_1 = require("./menu-placements.story");
46
46
  Object.defineProperty(exports, "MenuPlacements", { enumerable: true, get: function () { return __importDefault(menu_placements_story_1).default; } });
47
47
  var menu_with_keyboard_shortcuts_story_1 = require("./menu-with-keyboard-shortcuts.story");
48
48
  Object.defineProperty(exports, "MenuWithKeyboardShortcuts", { enumerable: true, get: function () { return __importDefault(menu_with_keyboard_shortcuts_story_1).default; } });
49
+ var menu_radio_items_story_1 = require("./menu-radio-items.story");
50
+ Object.defineProperty(exports, "MenuRadioItems", { enumerable: true, get: function () { return __importDefault(menu_radio_items_story_1).default; } });
51
+ var menu_radio_and_normal_story_1 = require("./menu-radio-and-normal.story");
52
+ Object.defineProperty(exports, "MenuRadioAndNormal", { enumerable: true, get: function () { return __importDefault(menu_radio_and_normal_story_1).default; } });
49
53
  const export_stories_utils_1 = require("../../_common/export-stories-utils");
50
54
  const menu_custom_items_story_raw_1 = __importDefault(require("./menu-custom-items.story?raw"));
51
55
  const menu_default_story_raw_1 = __importDefault(require("./menu-default.story?raw"));
@@ -53,6 +57,8 @@ const menu_in_dialog_story_raw_1 = __importDefault(require("./menu-in-dialog.sto
53
57
  const menu_in_popover_story_raw_1 = __importDefault(require("./menu-in-popover.story?raw"));
54
58
  const menu_nested_story_raw_1 = __importDefault(require("./menu-nested.story?raw"));
55
59
  const menu_placements_story_raw_1 = __importDefault(require("./menu-placements.story?raw"));
60
+ const menu_radio_and_normal_story_raw_1 = __importDefault(require("./menu-radio-and-normal.story?raw"));
61
+ const menu_radio_items_story_raw_1 = __importDefault(require("./menu-radio-items.story?raw"));
56
62
  const menu_with_category_story_raw_1 = __importDefault(require("./menu-with-category.story?raw"));
57
63
  const menu_with_disabled_item_story_raw_1 = __importDefault(require("./menu-with-disabled-item.story?raw"));
58
64
  const menu_with_divider_story_raw_1 = __importDefault(require("./menu-with-divider.story?raw"));
@@ -69,4 +75,6 @@ exports.MenuDividerSrc = (0, export_stories_utils_1.removeLicenseHeader)(menu_wi
69
75
  exports.MenuWithDisabledItemSrc = (0, export_stories_utils_1.removeLicenseHeader)(menu_with_disabled_item_story_raw_1.default);
70
76
  exports.MenuPlacementsSrc = (0, export_stories_utils_1.removeLicenseHeader)(menu_placements_story_raw_1.default);
71
77
  exports.MenuWithKeyboardShortcutsSrc = (0, export_stories_utils_1.removeLicenseHeader)(menu_with_keyboard_shortcuts_story_raw_1.default);
78
+ exports.MenuRadioItemsSrc = (0, export_stories_utils_1.removeLicenseHeader)(menu_radio_items_story_raw_1.default);
79
+ exports.MenuRadioAndNormalSrc = (0, export_stories_utils_1.removeLicenseHeader)(menu_radio_and_normal_story_raw_1.default);
72
80
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/menu/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,2DAA8D;AAArD,kIAAA,OAAO,OAAe;AAC/B,yDAA4D;AAAnD,gIAAA,OAAO,OAAc;AAC9B,uEAAyE;AAAhE,6IAAA,OAAO,OAAoB;AACpC,+DAAiE;AAAxD,qIAAA,OAAO,OAAgB;AAChC,qEAAuE;AAA9D,2IAAA,OAAO,OAAmB;AACnC,iEAAmE;AAA1D,uIAAA,OAAO,OAAiB;AACjC,+DAAiE;AAAxD,qIAAA,OAAO,OAAgB;AAChC,qEAAmE;AAA1D,uIAAA,OAAO,OAAe;AAC/B,iFAAkF;AAAzE,sJAAA,OAAO,OAAwB;AACxC,iEAAoE;AAA3D,wIAAA,OAAO,OAAkB;AAClC,2FAA4F;AAAnF,gKAAA,OAAO,OAA6B;AAE7C,6EAAyE;AACzE,gGAAkE;AAClE,sFAAyD;AACzD,0FAA4D;AAC5D,4FAA8D;AAC9D,oFAAuD;AACvD,4FAA+D;AAC/D,kGAAoE;AACpE,4GAA6E;AAC7E,gGAA8D;AAC9D,0FAA4D;AAC5D,sHAAuF;AAE1E,QAAA,cAAc,GAAG,IAAA,0CAAmB,EAAC,gCAAiB,CAAC,CAAC;AACxD,QAAA,aAAa,GAAG,IAAA,0CAAmB,EAAC,+BAAgB,CAAC,CAAC;AACtD,QAAA,mBAAmB,GAAG,IAAA,0CAAmB,EAAC,sCAAsB,CAAC,CAAC;AAClE,QAAA,eAAe,GAAG,IAAA,0CAAmB,EAAC,kCAAkB,CAAC,CAAC;AAC1D,QAAA,kBAAkB,GAAG,IAAA,0CAAmB,EAAC,qCAAqB,CAAC,CAAC;AAChE,QAAA,gBAAgB,GAAG,IAAA,0CAAmB,EAAC,mCAAmB,CAAC,CAAC;AAC5D,QAAA,eAAe,GAAG,IAAA,0CAAmB,EAAC,kCAAkB,CAAC,CAAC;AAC1D,QAAA,cAAc,GAAG,IAAA,0CAAmB,EAAC,qCAAiB,CAAC,CAAC;AACxD,QAAA,uBAAuB,GAAG,IAAA,0CAAmB,EACxD,2CAA0B,CAC3B,CAAC;AACW,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,mCAAoB,CAAC,CAAC;AAC9D,QAAA,4BAA4B,GAAG,IAAA,0CAAmB,EAC7D,gDAA+B,CAChC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as MenuDefault } from './menu-default.story';\nexport { default as MenuNested } from './menu-nested.story';\nexport { default as MenuWithCategory } from './menu-with-category.story';\nexport { default as MenuWithIcon } from './menu-with-icon.story';\nexport { default as MenuCustomItems } from './menu-custom-items.story';\nexport { default as MenuInPopover } from './menu-in-popover.story';\nexport { default as MenuInDialog } from './menu-in-dialog.story';\nexport { default as MenuDivider } from './menu-with-divider.story';\nexport { default as MenuWithDisabledItem } from './menu-with-disabled-item.story';\nexport { default as MenuPlacements } from './menu-placements.story';\nexport { default as MenuWithKeyboardShortcuts } from './menu-with-keyboard-shortcuts.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport MenuCustomItemsSrcRaw from './menu-custom-items.story?raw';\nimport MenuDefaultSrcRaw from './menu-default.story?raw';\nimport MenuInDialogSrcRaw from './menu-in-dialog.story?raw';\nimport MenuInPopoverSrcRaw from './menu-in-popover.story?raw';\nimport MenuNestedSrcRaw from './menu-nested.story?raw';\nimport MenuPlacementsSrcRaw from './menu-placements.story?raw';\nimport MenuWithCategorySrcRaw from './menu-with-category.story?raw';\nimport MenuWithDisabledItemSrcRaw from './menu-with-disabled-item.story?raw';\nimport MenuDividerSrcRaw from './menu-with-divider.story?raw';\nimport MenuWithIconSrcRaw from './menu-with-icon.story?raw';\nimport MenuWithKeyboardShortcutsSrcRaw from './menu-with-keyboard-shortcuts.story?raw';\n\nexport const MenuDefaultSrc = removeLicenseHeader(MenuDefaultSrcRaw);\nexport const MenuNestedSrc = removeLicenseHeader(MenuNestedSrcRaw);\nexport const MenuWithCategorySrc = removeLicenseHeader(MenuWithCategorySrcRaw);\nexport const MenuWithIconSrc = removeLicenseHeader(MenuWithIconSrcRaw);\nexport const MenuCustomItemsSrc = removeLicenseHeader(MenuCustomItemsSrcRaw);\nexport const MenuInPopoverSrc = removeLicenseHeader(MenuInPopoverSrcRaw);\nexport const MenuInDialogSrc = removeLicenseHeader(MenuInDialogSrcRaw);\nexport const MenuDividerSrc = removeLicenseHeader(MenuDividerSrcRaw);\nexport const MenuWithDisabledItemSrc = removeLicenseHeader(\n MenuWithDisabledItemSrcRaw,\n);\nexport const MenuPlacementsSrc = removeLicenseHeader(MenuPlacementsSrcRaw);\nexport const MenuWithKeyboardShortcutsSrc = removeLicenseHeader(\n MenuWithKeyboardShortcutsSrcRaw,\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/menu/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,2DAA8D;AAArD,kIAAA,OAAO,OAAe;AAC/B,yDAA4D;AAAnD,gIAAA,OAAO,OAAc;AAC9B,uEAAyE;AAAhE,6IAAA,OAAO,OAAoB;AACpC,+DAAiE;AAAxD,qIAAA,OAAO,OAAgB;AAChC,qEAAuE;AAA9D,2IAAA,OAAO,OAA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BAA4B,GAAG,IAAA,0CAAmB,EAC7D,gDAA+B,CAChC,CAAC;AACW,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,oCAAoB,CAAC,CAAC;AAC9D,QAAA,qBAAqB,GAAG,IAAA,0CAAmB,EACtD,yCAAwB,CACzB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as MenuDefault } from './menu-default.story';\nexport { default as MenuNested } from './menu-nested.story';\nexport { default as MenuWithCategory } from './menu-with-category.story';\nexport { default as MenuWithIcon } from './menu-with-icon.story';\nexport { default as MenuCustomItems } from './menu-custom-items.story';\nexport { default as MenuInPopover } from './menu-in-popover.story';\nexport { default as MenuInDialog } from './menu-in-dialog.story';\nexport { default as MenuDivider } from './menu-with-divider.story';\nexport { default as MenuWithDisabledItem } from './menu-with-disabled-item.story';\nexport { default as MenuPlacements } from './menu-placements.story';\nexport { default as MenuWithKeyboardShortcuts } from './menu-with-keyboard-shortcuts.story';\nexport { default as MenuRadioItems } from './menu-radio-items.story';\nexport { default as MenuRadioAndNormal } from './menu-radio-and-normal.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport MenuCustomItemsSrcRaw from './menu-custom-items.story?raw';\nimport MenuDefaultSrcRaw from './menu-default.story?raw';\nimport MenuInDialogSrcRaw from './menu-in-dialog.story?raw';\nimport MenuInPopoverSrcRaw from './menu-in-popover.story?raw';\nimport MenuNestedSrcRaw from './menu-nested.story?raw';\nimport MenuPlacementsSrcRaw from './menu-placements.story?raw';\nimport MenuRadioAndNormalSrcRaw from './menu-radio-and-normal.story?raw';\nimport MenuRadioItemsSrcRaw from './menu-radio-items.story?raw';\nimport MenuWithCategorySrcRaw from './menu-with-category.story?raw';\nimport MenuWithDisabledItemSrcRaw from './menu-with-disabled-item.story?raw';\nimport MenuDividerSrcRaw from './menu-with-divider.story?raw';\nimport MenuWithIconSrcRaw from './menu-with-icon.story?raw';\nimport MenuWithKeyboardShortcutsSrcRaw from './menu-with-keyboard-shortcuts.story?raw';\n\nexport const MenuDefaultSrc = removeLicenseHeader(MenuDefaultSrcRaw);\nexport const MenuNestedSrc = removeLicenseHeader(MenuNestedSrcRaw);\nexport const MenuWithCategorySrc = removeLicenseHeader(MenuWithCategorySrcRaw);\nexport const MenuWithIconSrc = removeLicenseHeader(MenuWithIconSrcRaw);\nexport const MenuCustomItemsSrc = removeLicenseHeader(MenuCustomItemsSrcRaw);\nexport const MenuInPopoverSrc = removeLicenseHeader(MenuInPopoverSrcRaw);\nexport const MenuInDialogSrc = removeLicenseHeader(MenuInDialogSrcRaw);\nexport const MenuDividerSrc = removeLicenseHeader(MenuDividerSrcRaw);\nexport const MenuWithDisabledItemSrc = removeLicenseHeader(\n MenuWithDisabledItemSrcRaw,\n);\nexport const MenuPlacementsSrc = removeLicenseHeader(MenuPlacementsSrcRaw);\nexport const MenuWithKeyboardShortcutsSrc = removeLicenseHeader(\n MenuWithKeyboardShortcutsSrcRaw,\n);\nexport const MenuRadioItemsSrc = removeLicenseHeader(MenuRadioItemsSrcRaw);\nexport const MenuRadioAndNormalSrc = removeLicenseHeader(\n MenuRadioAndNormalSrcRaw,\n);\n"]}
@@ -28,9 +28,9 @@ const react_2 = require("react");
28
28
  const Component = () => {
29
29
  const anchorEl = (0, react_2.useRef)(null);
30
30
  const [isOpen, setIsOpen] = (0, react_2.useState)(false);
31
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, placement: "top-start-bottom-start", onClose: (_event, _data) => {
31
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, placement: "bottom-start-top-start", onClose: (_event, _data) => {
32
32
  setIsOpen(false);
33
- }, children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "display", children: "This can be any element" }) }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Danger action 1", className: "n-text-danger-text" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Danger action 2", className: "n-text-danger-text", leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.Square2StackIconOutline, { className: "n-text-danger-icon" }) }), (0, jsx_runtime_1.jsx)(react_1.Menu, { title: "More actions", description: "Some additional actions", children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Danger action 3", className: "n-text-danger-text", isDisabled: true }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Danger action 4", className: "n-text-danger-text" })] }) })] }) }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu (set with custom placement)" })] }));
33
+ }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "display", children: "This can be any element" }) }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Danger action 1", className: "n-text-danger-text" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Danger action 2", className: "n-text-danger-text", leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.Square2StackIconOutline, { className: "n-text-danger-icon" }) }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "More actions", description: "Some additional actions", children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Danger action 3", className: "n-text-danger-text", isDisabled: true }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Danger action 4", className: "n-text-danger-text" })] })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu (set with custom placement)" })] }));
34
34
  };
35
35
  exports.default = Component;
36
36
  //# sourceMappingURL=menu-custom-items.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-custom-items.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-custom-items.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAkE;AAClE,kDAAiE;AACjE,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,uBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAC,wBAAwB,EAClC,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,YAED,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EACH,uBAAC,kBAAU,IAAC,OAAO,EAAC,SAAS,wCAAqC,GAEpE,EACF,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,iBAAiB,EAAC,SAAS,EAAC,oBAAoB,GAAG,EACpE,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,iBAAiB,EACvB,SAAS,EAAC,oBAAoB,EAC9B,aAAa,EACX,uBAAC,+BAAuB,IAAC,SAAS,EAAC,oBAAoB,GAAG,GAE5D,EACF,uBAAC,YAAI,IAAC,KAAK,EAAC,cAAc,EAAC,WAAW,EAAC,yBAAyB,YAC9D,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,iBAAiB,EACvB,SAAS,EAAC,oBAAoB,EAC9B,UAAU,EAAE,IAAI,GAChB,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,iBAAiB,EACvB,SAAS,EAAC,oBAAoB,GAC9B,IACS,GACR,IACI,GACR,EACP,uBAAC,oBAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,sDAE5C,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, Menu, Typography } from '@neo4j-ndl/react';\nimport { Square2StackIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n placement=\"top-start-bottom-start\"\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Items>\n <Menu.Item\n title={\n <Typography variant=\"display\">This can be any element</Typography>\n }\n />\n <Menu.Item title=\"Danger action 1\" className=\"n-text-danger-text\" />\n <Menu.Item\n title=\"Danger action 2\"\n className=\"n-text-danger-text\"\n leadingVisual={\n <Square2StackIconOutline className=\"n-text-danger-icon\" />\n }\n />\n <Menu title=\"More actions\" description=\"Some additional actions\">\n <Menu.Items>\n <Menu.Item\n title=\"Danger action 3\"\n className=\"n-text-danger-text\"\n isDisabled={true}\n />\n <Menu.Item\n title=\"Danger action 4\"\n className=\"n-text-danger-text\"\n />\n </Menu.Items>\n </Menu>\n </Menu.Items>\n </Menu>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu (set with custom placement)\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-custom-items.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-custom-items.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAkE;AAClE,kDAAiE;AACjE,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAC,wBAAwB,EAClC,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,aAED,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EACH,uBAAC,kBAAU,IAAC,OAAO,EAAC,SAAS,wCAAqC,GAEpE,EACF,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,iBAAiB,EAAC,SAAS,EAAC,oBAAoB,GAAG,EACpE,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,iBAAiB,EACvB,SAAS,EAAC,oBAAoB,EAC9B,aAAa,EACX,uBAAC,+BAAuB,IAAC,SAAS,EAAC,oBAAoB,GAAG,GAE5D,EACF,wBAAC,YAAI,IAAC,KAAK,EAAC,cAAc,EAAC,WAAW,EAAC,yBAAyB,aAC9D,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,iBAAiB,EACvB,SAAS,EAAC,oBAAoB,EAC9B,UAAU,EAAE,IAAI,GAChB,EACF,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,iBAAiB,EAAC,SAAS,EAAC,oBAAoB,GAAG,IAC/D,IACF,EACP,uBAAC,oBAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,sDAE5C,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, Menu, Typography } from '@neo4j-ndl/react';\nimport { Square2StackIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n placement=\"bottom-start-top-start\"\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Item\n title={\n <Typography variant=\"display\">This can be any element</Typography>\n }\n />\n <Menu.Item title=\"Danger action 1\" className=\"n-text-danger-text\" />\n <Menu.Item\n title=\"Danger action 2\"\n className=\"n-text-danger-text\"\n leadingVisual={\n <Square2StackIconOutline className=\"n-text-danger-icon\" />\n }\n />\n <Menu title=\"More actions\" description=\"Some additional actions\">\n <Menu.Item\n title=\"Danger action 3\"\n className=\"n-text-danger-text\"\n isDisabled={true}\n />\n <Menu.Item title=\"Danger action 4\" className=\"n-text-danger-text\" />\n </Menu>\n </Menu>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu (set with custom placement)\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -27,21 +27,21 @@ const react_2 = require("react");
27
27
  const Component = () => {
28
28
  const anchorEl = (0, react_2.useRef)(null);
29
29
  const [isOpen, setIsOpen] = (0, react_2.useState)(false);
30
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
30
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
31
31
  setIsOpen(false);
32
- }, children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", onClick: () => {
33
- alert('Action1');
34
- setIsOpen(false);
35
- } }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => {
36
- alert('Action2');
37
- setIsOpen(false);
38
- } }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => {
39
- alert('Action3');
40
- setIsOpen(false);
41
- } }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => {
42
- alert('Action4');
43
- setIsOpen(false);
44
- } }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { id: "action_5", title: "Action 5", description: "Action 5 does not close the menu" })] }) }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
32
+ }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", onClick: () => {
33
+ alert('Action1');
34
+ setIsOpen(false);
35
+ } }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => {
36
+ alert('Action2');
37
+ setIsOpen(false);
38
+ } }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => {
39
+ alert('Action3');
40
+ setIsOpen(false);
41
+ } }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => {
42
+ alert('Action4');
43
+ setIsOpen(false);
44
+ } })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
45
45
  };
46
46
  exports.default = Component;
47
47
  //# sourceMappingURL=menu-default.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-default.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-default.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,iCAAyC;AAEzC,MAAM,SAAS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AAC,UAAU,EAChB,WAAW,EAAC,kCAAkC,GAC9C,IACS,GACR,EAEP,uBAAC,oBAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,0BAE5C,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Items>\n <Menu.Item\n title=\"Action 1\"\n onClick={() => {\n alert('Action1');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n title=\"Action 2\"\n onClick={() => {\n alert('Action2');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => {\n alert('Action3');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => {\n alert('Action4');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n id=\"action_5\"\n title=\"Action 5\"\n description=\"Action 5 does not close the menu\"\n />\n </Menu.Items>\n </Menu>\n\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-default.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-default.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,aAED,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,SAAS,CAAC,CAAC;4BACjB,SAAS,CAAC,KAAK,CAAC,CAAC;wBACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,SAAS,CAAC,CAAC;4BACjB,SAAS,CAAC,KAAK,CAAC,CAAC;wBACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,EAChB,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,SAAS,CAAC,CAAC;4BACjB,SAAS,CAAC,KAAK,CAAC,CAAC;wBACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,SAAS,CAAC,CAAC;4BACjB,SAAS,CAAC,KAAK,CAAC,CAAC;wBACnB,CAAC,GACD,IACG,EAEP,uBAAC,oBAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,0BAE5C,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Item\n title=\"Action 1\"\n onClick={() => {\n alert('Action1');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n title=\"Action 2\"\n onClick={() => {\n alert('Action2');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => {\n alert('Action3');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => {\n alert('Action4');\n setIsOpen(false);\n }}\n />\n </Menu>\n\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -32,11 +32,11 @@ const Component = () => {
32
32
  const handleClick = () => setIsModalOpen((prev) => !prev);
33
33
  const handleClose = () => setIsModalOpen(false);
34
34
  const handleMenuClick = () => setIsOpen((prev) => !prev);
35
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "n-flex n-justify-center", children: (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: handleClick, children: "Open Dialog" }) }), (0, jsx_runtime_1.jsxs)(react_1.Dialog, { htmlAttributes: { id: 'modal-root' }, isOpen: isModalOpen, onClose: handleClose, children: [(0, jsx_runtime_1.jsx)("div", { className: "n-flex n-justify-center", children: (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: handleMenuClick, ref: anchorEl, children: "Open Menu" }) }), (0, jsx_runtime_1.jsx)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (event, _data) => {
35
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "n-flex n-justify-center", children: (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: handleClick, children: "Open Dialog" }) }), (0, jsx_runtime_1.jsxs)(react_1.Dialog, { htmlAttributes: { id: 'modal-root' }, isOpen: isModalOpen, onClose: handleClose, children: [(0, jsx_runtime_1.jsx)("div", { className: "n-flex n-justify-center", children: (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: handleMenuClick, ref: anchorEl, children: "Open Menu" }) }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (event, _data) => {
36
36
  setIsOpen(false);
37
37
  event === null || event === void 0 ? void 0 : event.preventDefault();
38
38
  event === null || event === void 0 ? void 0 : event.stopPropagation();
39
- }, portalTarget: document.getElementById('modal-root'), children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Undo", onClick: () => alert('Undo') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Redo", isDisabled: true }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Cut", description: "Copy and remove" }), (0, jsx_runtime_1.jsx)(react_1.Menu, { title: "Copy as", description: "Copying as something", icon: (0, jsx_runtime_1.jsx)(icons_1.Square2StackIconOutline, {}), children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Text" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Video" }), (0, jsx_runtime_1.jsx)(react_1.Menu, { title: "Image", children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".png" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".jpg" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".svg" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".gif" })] }) }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Audio" })] }) }), (0, jsx_runtime_1.jsx)(react_1.Menu, { title: "Share", children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Mail" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Instagram" })] }) })] }) })] })] }));
39
+ }, portalTarget: document.getElementById('modal-root'), children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Undo", onClick: () => alert('Undo') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Redo", isDisabled: true }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Cut", description: "Copy and remove" }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "Copy as", description: "Copying as something", icon: (0, jsx_runtime_1.jsx)(icons_1.Square2StackIconOutline, {}), children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Text" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Video" }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "Image", children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".png" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".jpg" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".svg" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".gif" })] }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Audio" }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "Share", children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Mail" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Instagram" })] })] })] })] })] }));
40
40
  };
41
41
  exports.default = Component;
42
42
  //# sourceMappingURL=menu-in-dialog.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-in-dialog.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-in-dialog.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA8D;AAC9D,kDAAiE;AACjE,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC5C,MAAM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CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,UAAU,SAAG,EACrC,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,WAAW,EAAC,iBAAiB,GAAG,EACvD,uBAAC,YAAI,IACH,KAAK,EAAC,SAAS,EACf,WAAW,EAAC,sBAAsB,EAClC,IAAI,EAAE,uBAAC,+BAAuB,KAAG,YAEjC,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,OAAO,GAAG,EAC3B,uBAAC,YAAI,IAAC,KAAK,EAAC,OAAO,YACjB,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,IACf,GACR,EACP,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,OAAO,GAAG,IAChB,GACR,EACP,uBAAC,YAAI,IAAC,KAAK,EAAC,OAAO,YACjB,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,WAAW,GAAG,IACpB,GACR,IACI,GACR,IACA,IACR,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Dialog, FilledButton, Menu } from '@neo4j-ndl/react';\nimport { Square2StackIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n const [isModalOpen, setIsModalOpen] = useState(false);\n\n const handleClick = () => setIsModalOpen((prev) => !prev);\n const handleClose = () => setIsModalOpen(false);\n const handleMenuClick = () => setIsOpen((prev) => !prev);\n\n return (\n <>\n <div className=\"n-flex n-justify-center\">\n <FilledButton onClick={handleClick}>Open Dialog</FilledButton>\n </div>\n <Dialog\n htmlAttributes={{ id: 'modal-root' }}\n isOpen={isModalOpen}\n onClose={handleClose}\n >\n <div className=\"n-flex n-justify-center\">\n <FilledButton onClick={handleMenuClick} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </div>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(event, _data) => {\n setIsOpen(false);\n event?.preventDefault();\n event?.stopPropagation();\n }}\n portalTarget={document.getElementById('modal-root')}\n >\n <Menu.Items>\n <Menu.Item title=\"Undo\" onClick={() => alert('Undo')} />\n <Menu.Item title=\"Redo\" isDisabled />\n <Menu.Item title=\"Cut\" description=\"Copy and remove\" />\n <Menu\n title=\"Copy as\"\n description=\"Copying as something\"\n icon={<Square2StackIconOutline />}\n >\n <Menu.Items>\n <Menu.Item title=\"Text\" />\n <Menu.Item title=\"Video\" />\n <Menu title=\"Image\">\n <Menu.Items>\n <Menu.Item title=\".png\" />\n <Menu.Item title=\".jpg\" />\n <Menu.Item title=\".svg\" />\n <Menu.Item title=\".gif\" />\n </Menu.Items>\n </Menu>\n <Menu.Item title=\"Audio\" />\n </Menu.Items>\n </Menu>\n <Menu title=\"Share\">\n <Menu.Items>\n <Menu.Item title=\"Mail\" />\n <Menu.Item title=\"Instagram\" />\n </Menu.Items>\n </Menu>\n </Menu.Items>\n </Menu>\n </Dialog>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-in-dialog.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-in-dialog.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA8D;AAC9D,kDAAiE;AACjE,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEtD,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAEzD,OAAO,CACL,6DACE,gCAAK,SAAS,EAAC,yBAAyB,YACtC,uBAAC,oBAAY,IAAC,OAAO,EAAE,WAAW,4BAA4B,GAC1D,EACN,wBAAC,cAAM,IACL,cAAc,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,EACpC,MAAM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K,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,IACrB,EACP,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,OAAO,GAAG,EAC3B,wBAAC,YAAI,IAAC,KAAK,EAAC,OAAO,aACjB,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,WAAW,GAAG,IAC1B,IACF,IACF,IACA,IACR,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Dialog, FilledButton, Menu } from '@neo4j-ndl/react';\nimport { Square2StackIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n const [isModalOpen, setIsModalOpen] = useState(false);\n\n const handleClick = () => setIsModalOpen((prev) => !prev);\n const handleClose = () => setIsModalOpen(false);\n const handleMenuClick = () => setIsOpen((prev) => !prev);\n\n return (\n <>\n <div className=\"n-flex n-justify-center\">\n <FilledButton onClick={handleClick}>Open Dialog</FilledButton>\n </div>\n <Dialog\n htmlAttributes={{ id: 'modal-root' }}\n isOpen={isModalOpen}\n onClose={handleClose}\n >\n <div className=\"n-flex n-justify-center\">\n <FilledButton onClick={handleMenuClick} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </div>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(event, _data) => {\n setIsOpen(false);\n event?.preventDefault();\n event?.stopPropagation();\n }}\n portalTarget={document.getElementById('modal-root')}\n >\n <Menu.Item title=\"Undo\" onClick={() => alert('Undo')} />\n <Menu.Item title=\"Redo\" isDisabled />\n <Menu.Item title=\"Cut\" description=\"Copy and remove\" />\n <Menu\n title=\"Copy as\"\n description=\"Copying as something\"\n icon={<Square2StackIconOutline />}\n >\n <Menu.Item title=\"Text\" />\n <Menu.Item title=\"Video\" />\n <Menu title=\"Image\">\n <Menu.Item title=\".png\" />\n <Menu.Item title=\".jpg\" />\n <Menu.Item title=\".svg\" />\n <Menu.Item title=\".gif\" />\n </Menu>\n <Menu.Item title=\"Audio\" />\n <Menu title=\"Share\">\n <Menu.Item title=\"Mail\" />\n <Menu.Item title=\"Instagram\" />\n </Menu>\n </Menu>\n </Menu>\n </Dialog>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -28,9 +28,9 @@ const Component = () => {
28
28
  const anchorEl = (0, react_2.useRef)(null);
29
29
  const [isOpen, setIsOpen] = (0, react_2.useState)(false);
30
30
  const [isPopoverOpen, setIsPopoverOpen] = (0, react_2.useState)(false);
31
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
31
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
32
32
  setIsOpen(false);
33
- }, children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", onClick: () => alert('Action1') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => alert('Action2') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] }) }), (0, jsx_runtime_1.jsxs)(react_1.Popover, { isOpen: isPopoverOpen, children: [(0, jsx_runtime_1.jsx)(react_1.Popover.Trigger, { children: (0, jsx_runtime_1.jsxs)(react_1.FilledButton, { onClick: () => setIsPopoverOpen(!isPopoverOpen), children: [isPopoverOpen ? 'Close' : 'Open', " Popover"] }) }), (0, jsx_runtime_1.jsx)(react_1.Popover.Content, { style: { height: 150, overflow: 'auto', width: 400 }, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", { children: "Scroll me to the bottom to open menu Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Context Menu" })] }) })] })] }));
33
+ }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", onClick: () => alert('Action1') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => alert('Action2') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] }), (0, jsx_runtime_1.jsxs)(react_1.Popover, { isOpen: isPopoverOpen, children: [(0, jsx_runtime_1.jsx)(react_1.Popover.Trigger, { children: (0, jsx_runtime_1.jsxs)(react_1.FilledButton, { onClick: () => setIsPopoverOpen(!isPopoverOpen), children: [isPopoverOpen ? 'Close' : 'Open', " Popover"] }) }), (0, jsx_runtime_1.jsx)(react_1.Popover.Content, { style: { height: 150, overflow: 'auto', width: 400 }, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", { children: "Scroll me to the bottom to open menu Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Context Menu" })] }) })] })] }));
34
34
  };
35
35
  exports.default = Component;
36
36
  //# sourceMappingURL=menu-in-popover.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-in-popover.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-in-popover.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA+D;AAC/D,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,G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,oBAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,kCAE5C,IACd,GACa,IACV,IACT,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, Menu, Popover } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n const [isPopoverOpen, setIsPopoverOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Items>\n <Menu.Item title=\"Action 1\" onClick={() => alert('Action1')} />\n <Menu.Item title=\"Action 2\" onClick={() => alert('Action2')} />\n <Menu.Item\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => alert('Action3')}\n />\n <Menu.Item\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => alert('Action4')}\n />\n </Menu.Items>\n </Menu>\n\n <Popover isOpen={isPopoverOpen}>\n <Popover.Trigger>\n <FilledButton onClick={() => setIsPopoverOpen(!isPopoverOpen)}>\n {isPopoverOpen ? 'Close' : 'Open'} Popover\n </FilledButton>\n </Popover.Trigger>\n <Popover.Content style={{ height: 150, overflow: 'auto', width: 400 }}>\n <>\n <p>\n Scroll me to the bottom to open menu Lorem ipsum dolor sit amet,\n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut\n labore et dolore magna aliqua. Ut enim ad minim veniam, quis\n nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate\n velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint\n occaecat cupidatat non proident, sunt in culpa qui officia\n deserunt mollit anim id est laborum.\n </p>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Context Menu\n </FilledButton>\n </>\n </Popover.Content>\n </Popover>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-in-popover.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-in-popover.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA+D;AAC/D,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE1D,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,aAED,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,EAC/D,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,EAC/D,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,IACG,EAEP,wBAAC,eAAO,IAAC,MAAM,EAAE,aAAa,aAC5B,uBAAC,eAAO,CAAC,OAAO,cACd,wBAAC,oBAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,CAAC,aAAa,CAAC,aAC1D,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,gBACpB,GACC,EAClB,uBAAC,eAAO,CAAC,OAAO,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,YACnE,6DACE,+gBASI,EACJ,uBAAC,oBAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,kCAE5C,IACd,GACa,IACV,IACT,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton, Menu, Popover } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n const [isPopoverOpen, setIsPopoverOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Item title=\"Action 1\" onClick={() => alert('Action1')} />\n <Menu.Item title=\"Action 2\" onClick={() => alert('Action2')} />\n <Menu.Item\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => alert('Action3')}\n />\n <Menu.Item\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => alert('Action4')}\n />\n </Menu>\n\n <Popover isOpen={isPopoverOpen}>\n <Popover.Trigger>\n <FilledButton onClick={() => setIsPopoverOpen(!isPopoverOpen)}>\n {isPopoverOpen ? 'Close' : 'Open'} Popover\n </FilledButton>\n </Popover.Trigger>\n <Popover.Content style={{ height: 150, overflow: 'auto', width: 400 }}>\n <>\n <p>\n Scroll me to the bottom to open menu Lorem ipsum dolor sit amet,\n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut\n labore et dolore magna aliqua. Ut enim ad minim veniam, quis\n nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate\n velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint\n occaecat cupidatat non proident, sunt in culpa qui officia\n deserunt mollit anim id est laborum.\n </p>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Context Menu\n </FilledButton>\n </>\n </Popover.Content>\n </Popover>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -28,9 +28,9 @@ const react_2 = require("react");
28
28
  const Component = () => {
29
29
  const anchorEl = (0, react_2.useRef)(null);
30
30
  const [isOpen, setIsOpen] = (0, react_2.useState)(false);
31
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
31
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
32
32
  setIsOpen(false);
33
- }, children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Undo", onClick: () => alert('Undo') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Redo", isDisabled: true }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Cut", description: "Copy and remove" }), (0, jsx_runtime_1.jsx)(react_1.Menu, { title: "Copy as", description: "Copying as something", icon: (0, jsx_runtime_1.jsx)(icons_1.Square2StackIconOutline, {}), children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Text" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Video" }), (0, jsx_runtime_1.jsx)(react_1.Menu, { title: "Image", children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".png" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".jpg" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".svg" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".gif" })] }) }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Audio" })] }) }), (0, jsx_runtime_1.jsx)(react_1.Menu, { title: "Share", children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Mail" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Instagram" })] }) })] }) }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
33
+ }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Undo", onClick: () => alert('Undo') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Redo", isDisabled: true }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Cut", description: "Copy and remove" }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "Copy as", description: "Copying as something", icon: (0, jsx_runtime_1.jsx)(icons_1.Square2StackIconOutline, {}), children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Text" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Video" }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "Image", children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".png" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".jpg" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".svg" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".gif" })] }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Audio" })] }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "Share", children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Mail" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Instagram" })] })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
34
34
  };
35
35
  exports.default = Component;
36
36
  //# sourceMappingURL=menu-nested.story.js.map