@neo4j-ndl/react 4.5.9 → 4.5.11

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 (159) 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 +2 -2
  12. package/lib/cjs/data-grid/Components.js.map +1 -1
  13. package/lib/cjs/dropdown-button/stories/dropdown-button-with-menu.story.js +1 -3
  14. package/lib/cjs/dropdown-button/stories/dropdown-button-with-menu.story.js.map +1 -1
  15. package/lib/cjs/menu/Menu.js +42 -6
  16. package/lib/cjs/menu/Menu.js.map +1 -1
  17. package/lib/cjs/menu/menu-types.js.map +1 -1
  18. package/lib/cjs/menu/stories/index.js +9 -1
  19. package/lib/cjs/menu/stories/index.js.map +1 -1
  20. package/lib/cjs/menu/stories/menu-custom-items.story.js +2 -2
  21. package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
  22. package/lib/cjs/menu/stories/menu-default.story.js +14 -14
  23. package/lib/cjs/menu/stories/menu-default.story.js.map +1 -1
  24. package/lib/cjs/menu/stories/menu-in-dialog.story.js +2 -2
  25. package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
  26. package/lib/cjs/menu/stories/menu-in-popover.story.js +2 -2
  27. package/lib/cjs/menu/stories/menu-in-popover.story.js.map +1 -1
  28. package/lib/cjs/menu/stories/menu-nested.story.js +2 -2
  29. package/lib/cjs/menu/stories/menu-nested.story.js.map +1 -1
  30. package/lib/cjs/menu/stories/menu-placements.story.js +14 -14
  31. package/lib/cjs/menu/stories/menu-placements.story.js.map +1 -1
  32. package/lib/cjs/menu/stories/menu-radio-and-normal.story.js +44 -0
  33. package/lib/cjs/menu/stories/menu-radio-and-normal.story.js.map +1 -0
  34. package/lib/cjs/menu/stories/menu-radio-items.story.js +45 -0
  35. package/lib/cjs/menu/stories/menu-radio-items.story.js.map +1 -0
  36. package/lib/cjs/menu/stories/menu-with-category.story.js +2 -2
  37. package/lib/cjs/menu/stories/menu-with-category.story.js.map +1 -1
  38. package/lib/cjs/menu/stories/menu-with-disabled-item.story.js +2 -2
  39. package/lib/cjs/menu/stories/menu-with-disabled-item.story.js.map +1 -1
  40. package/lib/cjs/menu/stories/menu-with-divider.story.js +2 -2
  41. package/lib/cjs/menu/stories/menu-with-divider.story.js.map +1 -1
  42. package/lib/cjs/menu/stories/menu-with-icon.story.js +2 -2
  43. package/lib/cjs/menu/stories/menu-with-icon.story.js.map +1 -1
  44. package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js +2 -2
  45. package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
  46. package/lib/cjs/menu/stories/menu.stories.js +29 -1
  47. package/lib/cjs/menu/stories/menu.stories.js.map +1 -1
  48. package/lib/cjs/select-icon-button/stories/select-icon-button-with-menu.story.js +1 -3
  49. package/lib/cjs/select-icon-button/stories/select-icon-button-with-menu.story.js.map +1 -1
  50. package/lib/cjs/text-link/TextLink.js +3 -2
  51. package/lib/cjs/text-link/TextLink.js.map +1 -1
  52. package/lib/cjs/text-link/stories/index.js +5 -1
  53. package/lib/cjs/text-link/stories/index.js.map +1 -1
  54. package/lib/cjs/text-link/stories/text-link-external-underline.story.js +30 -0
  55. package/lib/cjs/text-link/stories/text-link-external-underline.story.js.map +1 -0
  56. package/lib/cjs/text-link/stories/text-link-internal-underline.story.js +1 -1
  57. package/lib/cjs/text-link/stories/text-link-internal-underline.story.js.map +1 -1
  58. package/lib/cjs/text-link/stories/text-link.stories.js +14 -1
  59. package/lib/cjs/text-link/stories/text-link.stories.js.map +1 -1
  60. package/lib/esm/ai/more-files/stories/more-files.story.js +1 -1
  61. package/lib/esm/ai/more-files/stories/more-files.story.js.map +1 -1
  62. package/lib/esm/ai/prompt/Prompt.js +2 -2
  63. package/lib/esm/ai/prompt/Prompt.js.map +1 -1
  64. package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js +1 -1
  65. package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -1
  66. package/lib/esm/breadcrumbs/stories/breadcrumbs-ellipses.story.js +1 -1
  67. package/lib/esm/breadcrumbs/stories/breadcrumbs-ellipses.story.js.map +1 -1
  68. package/lib/esm/breadcrumbs/stories/breadcrumbs-header.story.js +2 -2
  69. package/lib/esm/breadcrumbs/stories/breadcrumbs-header.story.js.map +1 -1
  70. package/lib/esm/data-grid/Components.js +2 -2
  71. package/lib/esm/data-grid/Components.js.map +1 -1
  72. package/lib/esm/dropdown-button/stories/dropdown-button-with-menu.story.js +1 -3
  73. package/lib/esm/dropdown-button/stories/dropdown-button-with-menu.story.js.map +1 -1
  74. package/lib/esm/menu/Menu.js +43 -7
  75. package/lib/esm/menu/Menu.js.map +1 -1
  76. package/lib/esm/menu/menu-types.js.map +1 -1
  77. package/lib/esm/menu/stories/index.js +6 -0
  78. package/lib/esm/menu/stories/index.js.map +1 -1
  79. package/lib/esm/menu/stories/menu-custom-items.story.js +2 -2
  80. package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
  81. package/lib/esm/menu/stories/menu-default.story.js +14 -14
  82. package/lib/esm/menu/stories/menu-default.story.js.map +1 -1
  83. package/lib/esm/menu/stories/menu-in-dialog.story.js +2 -2
  84. package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
  85. package/lib/esm/menu/stories/menu-in-popover.story.js +2 -2
  86. package/lib/esm/menu/stories/menu-in-popover.story.js.map +1 -1
  87. package/lib/esm/menu/stories/menu-nested.story.js +2 -2
  88. package/lib/esm/menu/stories/menu-nested.story.js.map +1 -1
  89. package/lib/esm/menu/stories/menu-placements.story.js +14 -14
  90. package/lib/esm/menu/stories/menu-placements.story.js.map +1 -1
  91. package/lib/esm/menu/stories/menu-radio-and-normal.story.js +42 -0
  92. package/lib/esm/menu/stories/menu-radio-and-normal.story.js.map +1 -0
  93. package/lib/esm/menu/stories/menu-radio-items.story.js +43 -0
  94. package/lib/esm/menu/stories/menu-radio-items.story.js.map +1 -0
  95. package/lib/esm/menu/stories/menu-with-category.story.js +2 -2
  96. package/lib/esm/menu/stories/menu-with-category.story.js.map +1 -1
  97. package/lib/esm/menu/stories/menu-with-disabled-item.story.js +2 -2
  98. package/lib/esm/menu/stories/menu-with-disabled-item.story.js.map +1 -1
  99. package/lib/esm/menu/stories/menu-with-divider.story.js +2 -2
  100. package/lib/esm/menu/stories/menu-with-divider.story.js.map +1 -1
  101. package/lib/esm/menu/stories/menu-with-icon.story.js +2 -2
  102. package/lib/esm/menu/stories/menu-with-icon.story.js.map +1 -1
  103. package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js +2 -2
  104. package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
  105. package/lib/esm/menu/stories/menu.stories.js +29 -1
  106. package/lib/esm/menu/stories/menu.stories.js.map +1 -1
  107. package/lib/esm/select-icon-button/stories/select-icon-button-with-menu.story.js +1 -3
  108. package/lib/esm/select-icon-button/stories/select-icon-button-with-menu.story.js.map +1 -1
  109. package/lib/esm/text-link/TextLink.js +3 -2
  110. package/lib/esm/text-link/TextLink.js.map +1 -1
  111. package/lib/esm/text-link/stories/index.js +3 -0
  112. package/lib/esm/text-link/stories/index.js.map +1 -1
  113. package/lib/esm/text-link/stories/text-link-external-underline.story.js +28 -0
  114. package/lib/esm/text-link/stories/text-link-external-underline.story.js.map +1 -0
  115. package/lib/esm/text-link/stories/text-link-internal-underline.story.js +3 -3
  116. package/lib/esm/text-link/stories/text-link-internal-underline.story.js.map +1 -1
  117. package/lib/esm/text-link/stories/text-link.stories.js +14 -1
  118. package/lib/esm/text-link/stories/text-link.stories.js.map +1 -1
  119. package/lib/types/ai/more-files/stories/more-files.story.d.ts.map +1 -1
  120. package/lib/types/ai/prompt/Prompt.d.ts.map +1 -1
  121. package/lib/types/ai/user-bubble/stories/user-bubble-and-files.story.d.ts.map +1 -1
  122. package/lib/types/breadcrumbs/stories/breadcrumbs-ellipses.story.d.ts.map +1 -1
  123. package/lib/types/breadcrumbs/stories/breadcrumbs-header.story.d.ts.map +1 -1
  124. package/lib/types/data-grid/Components.d.ts.map +1 -1
  125. package/lib/types/dropdown-button/stories/dropdown-button-with-menu.story.d.ts.map +1 -1
  126. package/lib/types/menu/Menu.d.ts +8 -3
  127. package/lib/types/menu/Menu.d.ts.map +1 -1
  128. package/lib/types/menu/menu-types.d.ts +9 -0
  129. package/lib/types/menu/menu-types.d.ts.map +1 -1
  130. package/lib/types/menu/stories/index.d.ts +4 -0
  131. package/lib/types/menu/stories/index.d.ts.map +1 -1
  132. package/lib/types/menu/stories/menu-custom-items.story.d.ts.map +1 -1
  133. package/lib/types/menu/stories/menu-default.story.d.ts.map +1 -1
  134. package/lib/types/menu/stories/menu-in-dialog.story.d.ts.map +1 -1
  135. package/lib/types/menu/stories/menu-in-popover.story.d.ts.map +1 -1
  136. package/lib/types/menu/stories/menu-nested.story.d.ts.map +1 -1
  137. package/lib/types/menu/stories/menu-placements.story.d.ts.map +1 -1
  138. package/lib/types/menu/stories/menu-radio-and-normal.story.d.ts +24 -0
  139. package/lib/types/menu/stories/menu-radio-and-normal.story.d.ts.map +1 -0
  140. package/lib/types/menu/stories/menu-radio-items.story.d.ts +24 -0
  141. package/lib/types/menu/stories/menu-radio-items.story.d.ts.map +1 -0
  142. package/lib/types/menu/stories/menu-with-category.story.d.ts.map +1 -1
  143. package/lib/types/menu/stories/menu-with-disabled-item.story.d.ts.map +1 -1
  144. package/lib/types/menu/stories/menu-with-divider.story.d.ts.map +1 -1
  145. package/lib/types/menu/stories/menu-with-icon.story.d.ts.map +1 -1
  146. package/lib/types/menu/stories/menu-with-keyboard-shortcuts.story.d.ts.map +1 -1
  147. package/lib/types/menu/stories/menu.stories.d.ts +2 -0
  148. package/lib/types/menu/stories/menu.stories.d.ts.map +1 -1
  149. package/lib/types/select-icon-button/stories/select-icon-button-with-menu.story.d.ts.map +1 -1
  150. package/lib/types/text-link/TextLink.d.ts +6 -5
  151. package/lib/types/text-link/TextLink.d.ts.map +1 -1
  152. package/lib/types/text-link/stories/index.d.ts +2 -0
  153. package/lib/types/text-link/stories/index.d.ts.map +1 -1
  154. package/lib/types/text-link/stories/text-link-external-underline.story.d.ts +24 -0
  155. package/lib/types/text-link/stories/text-link-external-underline.story.d.ts.map +1 -0
  156. package/lib/types/text-link/stories/text-link-internal-underline.story.d.ts.map +1 -1
  157. package/lib/types/text-link/stories/text-link.stories.d.ts +1 -0
  158. package/lib/types/text-link/stories/text-link.stories.d.ts.map +1 -1
  159. package/package.json +2 -2
@@ -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;;;;;;;;;;;;;;;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C,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;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,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,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,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE;gCACZ,KAAK,CAAC,SAAS,CAAC,CAAC;gCACjB,SAAS,CAAC,KAAK,CAAC,CAAC;4BACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE;gCACZ,KAAK,CAAC,SAAS,CAAC,CAAC;gCACjB,SAAS,CAAC,KAAK,CAAC,CAAC;4BACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,EAChB,OAAO,EAAE,GAAG,EAAE;gCACZ,KAAK,CAAC,SAAS,CAAC,CAAC;gCACjB,SAAS,CAAC,KAAK,CAAC,CAAC;4BACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE;gCACZ,KAAK,CAAC,SAAS,CAAC,CAAC;gCACjB,SAAS,CAAC,KAAK,CAAC,CAAC;4BACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,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;AAC9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B,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,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,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,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,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,MA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Aa,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.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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AC,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
@@ -1 +1 @@
1
- {"version":3,"file":"menu-nested.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-nested.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,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,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,IAAC,KAAK,EAAC,MAAM,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,GAAI,EACxD,uBAAC,YAAI,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,EACP,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 { 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 onClose={(_event, _data) => {\n setIsOpen(false);\n }}\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 <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-nested.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-nested.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,kDAAiE;AACjE,iCAA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K,EAAC,OAAO,GAAG,IACtB,EACP,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,EACP,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 { 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 onClose={(_event, _data) => {\n setIsOpen(false);\n }}\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>\n <Menu title=\"Share\">\n <Menu.Item title=\"Mail\" />\n <Menu.Item title=\"Instagram\" />\n </Menu>\n </Menu>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\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, placement: "middle-end-middle-start", 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, placement: "middle-end-middle-start", 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.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" })] }));
45
45
  };
46
46
  exports.default = Component;
47
47
  //# sourceMappingURL=menu-placements.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-placements.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-placements.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,uBAAC,YAAI,IACH,MA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ACJ,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 placement=\"middle-end-middle-start\"\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-placements.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-placements.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,SAAS,EAAC,yBAAyB,EACnC,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,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,kCAAkC,GAC9C,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 placement=\"middle-end-middle-start\"\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.Item\n id=\"action_5\"\n title=\"Action 5\"\n description=\"Action 5 does not close the menu\"\n />\n </Menu>\n\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const react_2 = require("react");
27
+ const Component = () => {
28
+ const anchorEl = (0, react_2.useRef)(null);
29
+ const [isOpen, setIsOpen] = (0, react_2.useState)(false);
30
+ const [selectedOption, setSelectedOption] = (0, react_2.useState)('option-1');
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
+ setIsOpen(false);
33
+ }, children: [(0, jsx_runtime_1.jsxs)(react_1.Menu.Group, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 1", isChecked: selectedOption === 'option-1', onClick: () => {
34
+ setSelectedOption('option-1');
35
+ } }), (0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 2", isChecked: selectedOption === 'option-2', onClick: () => {
36
+ setSelectedOption('option-2');
37
+ } })] }), (0, jsx_runtime_1.jsx)(react_1.Menu.Divider, {}), (0, jsx_runtime_1.jsxs)(react_1.Menu.Group, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", onClick: () => {
38
+ alert('Action 1');
39
+ } }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => {
40
+ alert('Action 2');
41
+ } })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-4 n-items-center", children: [(0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["Selected option: ", (0, jsx_runtime_1.jsx)("strong", { children: selectedOption })] }), (0, jsx_runtime_1.jsx)(react_1.DropdownButton, { isOpen: isOpen, onClick: () => setIsOpen(true), ref: anchorEl, children: "Open menu" })] })] }));
42
+ };
43
+ exports.default = Component;
44
+ //# sourceMappingURL=menu-radio-and-normal.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-radio-and-normal.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-radio-and-normal.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAoE;AACpE,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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AAE,QAAQ,0BAGE,IACb,IACL,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 { DropdownButton, Menu, Typography } 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 [selectedOption, setSelectedOption] = useState<string | null>(\n 'option-1',\n );\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.Group>\n <Menu.RadioItem\n title=\"Option 1\"\n isChecked={selectedOption === 'option-1'}\n onClick={() => {\n setSelectedOption('option-1');\n }}\n />\n <Menu.RadioItem\n title=\"Option 2\"\n isChecked={selectedOption === 'option-2'}\n onClick={() => {\n setSelectedOption('option-2');\n }}\n />\n </Menu.Group>\n <Menu.Divider />\n <Menu.Group>\n <Menu.Item\n title=\"Action 1\"\n onClick={() => {\n alert('Action 1');\n }}\n />\n <Menu.Item\n title=\"Action 2\"\n onClick={() => {\n alert('Action 2');\n }}\n />\n </Menu.Group>\n </Menu>\n <div className=\"n-flex n-flex-col n-gap-token-4 n-items-center\">\n <Typography variant=\"body-medium\">\n Selected option: <strong>{selectedOption}</strong>\n </Typography>\n <DropdownButton\n isOpen={isOpen}\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n >\n Open menu\n </DropdownButton>\n </div>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const icons_1 = require("@neo4j-ndl/react/icons");
27
+ const react_2 = require("react");
28
+ const Component = () => {
29
+ const anchorEl = (0, react_2.useRef)(null);
30
+ const [isOpen, setIsOpen] = (0, react_2.useState)(false);
31
+ const [selectedOption, setSelectedOption] = (0, react_2.useState)('option-1');
32
+ 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) => {
33
+ setIsOpen(false);
34
+ }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 1", leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.SunIconOutline, {}), isChecked: selectedOption === 'option-1', onClick: () => {
35
+ setSelectedOption('option-1');
36
+ } }), (0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 2", leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.MoonIconOutline, {}), isChecked: selectedOption === 'option-2', onClick: () => {
37
+ setSelectedOption('option-2');
38
+ } }), (0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 3", description: "Option 3 has a description", isChecked: selectedOption === 'option-3', onClick: () => {
39
+ setSelectedOption('option-3');
40
+ } }), (0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 4", trailingContent: (0, jsx_runtime_1.jsx)(react_1.Kbd, { keys: ['A'] }), isChecked: selectedOption === 'option-4', onClick: () => {
41
+ setSelectedOption('option-4');
42
+ } })] }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-4 n-items-center", children: [(0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["Selected option: ", (0, jsx_runtime_1.jsx)("strong", { children: selectedOption })] }), (0, jsx_runtime_1.jsx)(react_1.DropdownButton, { isOpen: isOpen, onClick: () => setIsOpen(true), ref: anchorEl, children: "Open menu" })] })] }));
43
+ };
44
+ exports.default = Component;
45
+ //# sourceMappingURL=menu-radio-items.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-radio-items.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-radio-items.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAyE;AACzE,kDAAyE;AACzE,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,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAClD,UAAU,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,MAAM,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,0BAGE,IACb,IACL,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 { DropdownButton, Kbd, Menu, Typography } from '@neo4j-ndl/react';\nimport { MoonIconOutline, SunIconOutline } 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 [selectedOption, setSelectedOption] = useState<string | null>(\n 'option-1',\n );\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n >\n <Menu.RadioItem\n title=\"Option 1\"\n leadingVisual={<SunIconOutline />}\n isChecked={selectedOption === 'option-1'}\n onClick={() => {\n setSelectedOption('option-1');\n }}\n />\n <Menu.RadioItem\n title=\"Option 2\"\n leadingVisual={<MoonIconOutline />}\n isChecked={selectedOption === 'option-2'}\n onClick={() => {\n setSelectedOption('option-2');\n }}\n />\n <Menu.RadioItem\n title=\"Option 3\"\n description=\"Option 3 has a description\"\n isChecked={selectedOption === 'option-3'}\n onClick={() => {\n setSelectedOption('option-3');\n }}\n />\n <Menu.RadioItem\n title=\"Option 4\"\n trailingContent={<Kbd keys={['A']} />}\n isChecked={selectedOption === 'option-4'}\n onClick={() => {\n setSelectedOption('option-4');\n }}\n />\n </Menu>\n <div className=\"n-flex n-flex-col n-gap-token-4 n-items-center\">\n <Typography variant=\"body-medium\">\n Selected option: <strong>{selectedOption}</strong>\n </Typography>\n <DropdownButton\n isOpen={isOpen}\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n >\n Open menu\n </DropdownButton>\n </div>\n </>\n );\n};\n\nexport default Component;\n"]}
@@ -27,9 +27,9 @@ 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.CategoryItem, { children: "Category 1" }), (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.Divider, {}), (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.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
32
+ }, children: [(0, jsx_runtime_1.jsxs)(react_1.Menu.Group, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.CategoryItem, { children: "Category 1" }), (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.Divider, {}), (0, jsx_runtime_1.jsxs)(react_1.Menu.Group, { children: [(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.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
33
33
  };
34
34
  exports.default = Component;
35
35
  //# sourceMappingURL=menu-with-category.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-with-category.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-category.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,uBAAC,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,YAED,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,YAAY,6BAA+B,EACjD,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,OAAO,KAAG,EAChB,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,IACS,GACR,EACP,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.CategoryItem>Category 1</Menu.CategoryItem>\n <Menu.Item title=\"Action 1\" onClick={() => alert('Action1')} />\n <Menu.Item title=\"Action 2\" onClick={() => alert('Action2')} />\n <Menu.Divider />\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 <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"menu-with-category.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-category.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,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,YAAY,6BAA+B,EACjD,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,IACpD,EACb,uBAAC,YAAI,CAAC,OAAO,KAAG,EAChB,wBAAC,YAAI,CAAC,KAAK,eACT,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,IACS,IACR,EACP,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.Group>\n <Menu.CategoryItem>Category 1</Menu.CategoryItem>\n <Menu.Item title=\"Action 1\" onClick={() => alert('Action1')} />\n <Menu.Item title=\"Action 2\" onClick={() => alert('Action2')} />\n </Menu.Group>\n <Menu.Divider />\n <Menu.Group>\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.Group>\n </Menu>\n <FilledButton onClick={() => setIsOpen(true)} ref={anchorEl}>\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}