@elliemae/ds-menu 2.3.0-alpha.9 → 2.3.0-next.3

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 (141) hide show
  1. package/cjs/Menu.js +195 -0
  2. package/cjs/MenuCombobox.js +56 -0
  3. package/cjs/MenuContext.js +11 -0
  4. package/cjs/MenuItems/CheckboxGroup.js +45 -0
  5. package/cjs/MenuItems/MenuItem.js +203 -0
  6. package/cjs/MenuItems/MenuItemCheckable.js +119 -0
  7. package/cjs/MenuItems/MenuItemCheckbox.js +42 -0
  8. package/cjs/MenuItems/MenuItemRadio.js +41 -0
  9. package/cjs/MenuItems/RadioGroup.js +42 -0
  10. package/cjs/MenuItems/SearchableGroup.js +101 -0
  11. package/cjs/MenuItems/SearchableList.js +117 -0
  12. package/cjs/MenuItems/SelectionGroup.js +107 -0
  13. package/cjs/MenuItems/Separator.js +44 -0
  14. package/cjs/MenuItems/SubMenu.js +203 -0
  15. package/cjs/MenuItems/menuItemFactory.js +73 -0
  16. package/cjs/VirtualMenuList.js +48 -0
  17. package/cjs/index.js +36 -0
  18. package/cjs/utils/useHeightByAmountOfItems.js +20 -0
  19. package/esm/Menu.js +180 -0
  20. package/esm/MenuCombobox.js +48 -0
  21. package/esm/MenuContext.js +5 -0
  22. package/esm/MenuItems/CheckboxGroup.js +35 -0
  23. package/esm/MenuItems/MenuItem.js +191 -0
  24. package/esm/MenuItems/MenuItemCheckable.js +108 -0
  25. package/esm/MenuItems/MenuItemCheckbox.js +34 -0
  26. package/esm/MenuItems/MenuItemRadio.js +32 -0
  27. package/esm/MenuItems/RadioGroup.js +32 -0
  28. package/esm/MenuItems/SearchableGroup.js +91 -0
  29. package/esm/MenuItems/SearchableList.js +108 -0
  30. package/esm/MenuItems/SelectionGroup.js +97 -0
  31. package/esm/MenuItems/Separator.js +33 -0
  32. package/esm/MenuItems/SubMenu.js +190 -0
  33. package/esm/MenuItems/menuItemFactory.js +64 -0
  34. package/esm/VirtualMenuList.js +42 -0
  35. package/esm/index.js +13 -0
  36. package/{dist/esm → esm}/utils/useHeightByAmountOfItems.js +11 -13
  37. package/package.json +62 -72
  38. package/{dist/types → types}/Menu.d.ts +2 -4
  39. package/{dist/types → types}/MenuCombobox.d.ts +0 -0
  40. package/types/MenuContext.d.ts +3 -0
  41. package/{dist/types → types}/MenuItems/CheckboxGroup.d.ts +5 -5
  42. package/{dist/types → types}/MenuItems/MenuItem.d.ts +5 -5
  43. package/{dist/types → types}/MenuItems/MenuItemCheckable.d.ts +14 -15
  44. package/{dist/types → types}/MenuItems/MenuItemCheckbox.d.ts +2 -3
  45. package/{dist/types → types}/MenuItems/MenuItemRadio.d.ts +5 -5
  46. package/{dist/types → types}/MenuItems/RadioGroup.d.ts +5 -5
  47. package/{dist/types → types}/MenuItems/SearchableGroup.d.ts +3 -3
  48. package/{dist/types → types}/MenuItems/SearchableList.d.ts +16 -16
  49. package/{dist/types → types}/MenuItems/SelectionGroup.d.ts +16 -16
  50. package/{dist/types → types}/MenuItems/Separator.d.ts +1 -2
  51. package/{dist/types → types}/MenuItems/SubMenu.d.ts +18 -18
  52. package/types/MenuItems/menuItemFactory.d.ts +3 -0
  53. package/{dist/types → types}/VirtualMenuList.d.ts +1 -3
  54. package/{dist/types → types}/index.d.ts +2 -3
  55. package/{dist/types → types}/tests/Menu.test.d.ts +0 -0
  56. package/{dist/types → types}/tests/MenuItem.test.d.ts +0 -0
  57. package/types/utils/useHeightByAmountOfItems.d.ts +5 -0
  58. package/dist/cjs/Menu.js +0 -151
  59. package/dist/cjs/Menu.js.map +0 -7
  60. package/dist/cjs/MenuCombobox.js +0 -70
  61. package/dist/cjs/MenuCombobox.js.map +0 -7
  62. package/dist/cjs/MenuContext.js +0 -38
  63. package/dist/cjs/MenuContext.js.map +0 -7
  64. package/dist/cjs/MenuExports.js +0 -36
  65. package/dist/cjs/MenuExports.js.map +0 -7
  66. package/dist/cjs/MenuItems/CheckboxGroup.js +0 -52
  67. package/dist/cjs/MenuItems/CheckboxGroup.js.map +0 -7
  68. package/dist/cjs/MenuItems/MenuItem.js +0 -157
  69. package/dist/cjs/MenuItems/MenuItem.js.map +0 -7
  70. package/dist/cjs/MenuItems/MenuItemCheckable.js +0 -88
  71. package/dist/cjs/MenuItems/MenuItemCheckable.js.map +0 -7
  72. package/dist/cjs/MenuItems/MenuItemCheckbox.js +0 -48
  73. package/dist/cjs/MenuItems/MenuItemCheckbox.js.map +0 -7
  74. package/dist/cjs/MenuItems/MenuItemRadio.js +0 -53
  75. package/dist/cjs/MenuItems/MenuItemRadio.js.map +0 -7
  76. package/dist/cjs/MenuItems/RadioGroup.js +0 -51
  77. package/dist/cjs/MenuItems/RadioGroup.js.map +0 -7
  78. package/dist/cjs/MenuItems/SearchableGroup.js +0 -97
  79. package/dist/cjs/MenuItems/SearchableGroup.js.map +0 -7
  80. package/dist/cjs/MenuItems/SearchableList.js +0 -114
  81. package/dist/cjs/MenuItems/SearchableList.js.map +0 -7
  82. package/dist/cjs/MenuItems/SelectionGroup.js +0 -102
  83. package/dist/cjs/MenuItems/SelectionGroup.js.map +0 -7
  84. package/dist/cjs/MenuItems/Separator.js +0 -59
  85. package/dist/cjs/MenuItems/Separator.js.map +0 -7
  86. package/dist/cjs/MenuItems/SubMenu.js +0 -187
  87. package/dist/cjs/MenuItems/SubMenu.js.map +0 -7
  88. package/dist/cjs/MenuItems/menuItemFactory.js +0 -41
  89. package/dist/cjs/MenuItems/menuItemFactory.js.map +0 -7
  90. package/dist/cjs/MenuItems/renderMenuItems.js +0 -54
  91. package/dist/cjs/MenuItems/renderMenuItems.js.map +0 -7
  92. package/dist/cjs/VirtualMenuList.js +0 -78
  93. package/dist/cjs/VirtualMenuList.js.map +0 -7
  94. package/dist/cjs/index.js +0 -63
  95. package/dist/cjs/index.js.map +0 -7
  96. package/dist/cjs/utils/useHeightByAmountOfItems.js +0 -49
  97. package/dist/cjs/utils/useHeightByAmountOfItems.js.map +0 -7
  98. package/dist/esm/Menu.js +0 -122
  99. package/dist/esm/Menu.js.map +0 -7
  100. package/dist/esm/MenuCombobox.js +0 -41
  101. package/dist/esm/MenuCombobox.js.map +0 -7
  102. package/dist/esm/MenuContext.js +0 -9
  103. package/dist/esm/MenuContext.js.map +0 -7
  104. package/dist/esm/MenuExports.js +0 -7
  105. package/dist/esm/MenuExports.js.map +0 -7
  106. package/dist/esm/MenuItems/CheckboxGroup.js +0 -23
  107. package/dist/esm/MenuItems/CheckboxGroup.js.map +0 -7
  108. package/dist/esm/MenuItems/MenuItem.js +0 -128
  109. package/dist/esm/MenuItems/MenuItem.js.map +0 -7
  110. package/dist/esm/MenuItems/MenuItemCheckable.js +0 -59
  111. package/dist/esm/MenuItems/MenuItemCheckable.js.map +0 -7
  112. package/dist/esm/MenuItems/MenuItemCheckbox.js +0 -19
  113. package/dist/esm/MenuItems/MenuItemCheckbox.js.map +0 -7
  114. package/dist/esm/MenuItems/MenuItemRadio.js +0 -24
  115. package/dist/esm/MenuItems/MenuItemRadio.js.map +0 -7
  116. package/dist/esm/MenuItems/RadioGroup.js +0 -22
  117. package/dist/esm/MenuItems/RadioGroup.js.map +0 -7
  118. package/dist/esm/MenuItems/SearchableGroup.js +0 -68
  119. package/dist/esm/MenuItems/SearchableGroup.js.map +0 -7
  120. package/dist/esm/MenuItems/SearchableList.js +0 -85
  121. package/dist/esm/MenuItems/SearchableList.js.map +0 -7
  122. package/dist/esm/MenuItems/SelectionGroup.js +0 -73
  123. package/dist/esm/MenuItems/SelectionGroup.js.map +0 -7
  124. package/dist/esm/MenuItems/Separator.js +0 -30
  125. package/dist/esm/MenuItems/Separator.js.map +0 -7
  126. package/dist/esm/MenuItems/SubMenu.js +0 -158
  127. package/dist/esm/MenuItems/SubMenu.js.map +0 -7
  128. package/dist/esm/MenuItems/menuItemFactory.js +0 -12
  129. package/dist/esm/MenuItems/menuItemFactory.js.map +0 -7
  130. package/dist/esm/MenuItems/renderMenuItems.js +0 -25
  131. package/dist/esm/MenuItems/renderMenuItems.js.map +0 -7
  132. package/dist/esm/VirtualMenuList.js +0 -49
  133. package/dist/esm/VirtualMenuList.js.map +0 -7
  134. package/dist/esm/index.js +0 -34
  135. package/dist/esm/index.js.map +0 -7
  136. package/dist/esm/utils/useHeightByAmountOfItems.js.map +0 -7
  137. package/dist/types/MenuContext.d.ts +0 -4
  138. package/dist/types/MenuExports.d.ts +0 -1
  139. package/dist/types/MenuItems/menuItemFactory.d.ts +0 -2
  140. package/dist/types/MenuItems/renderMenuItems.d.ts +0 -1
  141. package/dist/types/utils/useHeightByAmountOfItems.d.ts +0 -7
@@ -1,30 +0,0 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { describe, PropTypes } from "react-desc";
4
- import { aggregatedClasses } from "@elliemae/ds-classnames";
5
- import { DSSeparator } from "@elliemae/ds-separator";
6
- import styled from "styled-components";
7
- import { registerMenuItem } from "./menuItemFactory";
8
- const blockName = "menu-separator";
9
- const Li = styled.li`
10
- display: flex;
11
- align-items: flex-start;
12
- flex-direction: column;
13
- `;
14
- const Title = aggregatedClasses("h5")(blockName, "title");
15
- const MenuSeparator = ({ title, showSeparator = true }) => /* @__PURE__ */ React2.createElement(Li, null, showSeparator && /* @__PURE__ */ React2.createElement(DSSeparator, null), title && /* @__PURE__ */ React2.createElement(Title, null, title));
16
- const props = {
17
- title: PropTypes.string.description("menu separator h5 title"),
18
- showSeparator: PropTypes.bool.description("toggle separator on and off")
19
- };
20
- MenuSeparator.propTypes = props;
21
- registerMenuItem("separator", MenuSeparator);
22
- const DSMenuSeparatorWithSchema = describe(MenuSeparator);
23
- DSMenuSeparatorWithSchema.propTypes = props;
24
- var Separator_default = MenuSeparator;
25
- export {
26
- DSMenuSeparatorWithSchema,
27
- MenuSeparator,
28
- Separator_default as default
29
- };
30
- //# sourceMappingURL=Separator.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MenuItems/Separator.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSSeparator } from '@elliemae/ds-separator';\nimport styled from 'styled-components';\nimport { registerMenuItem } from './menuItemFactory';\n\nconst blockName = 'menu-separator';\nconst Li = styled.li`\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n`;\n\nconst Title = aggregatedClasses('h5')(blockName, 'title');\nconst MenuSeparator = ({ title, showSeparator = true }) => (\n <Li>\n {showSeparator && <DSSeparator />}\n {title && <Title>{title}</Title>}\n </Li>\n);\n\nconst props = {\n /** menu separator h5 title */\n title: PropTypes.string.description('menu separator h5 title'),\n /** toggle separator on and off */\n showSeparator: PropTypes.bool.description('toggle separator on and off'),\n};\n\nMenuSeparator.propTypes = props;\nregisterMenuItem('separator', MenuSeparator);\n\nconst DSMenuSeparatorWithSchema = describe(MenuSeparator);\nDSMenuSeparatorWithSchema.propTypes = props;\n\nexport { DSMenuSeparatorWithSchema, MenuSeparator };\nexport default MenuSeparator;\n"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY;AAClB,MAAM,KAAK,OAAO;AAAA;AAAA;AAAA;AAAA;AAMlB,MAAM,QAAQ,kBAAkB,MAAM,WAAW;AACjD,MAAM,gBAAgB,CAAC,EAAE,OAAO,gBAAgB,WAC9C,qCAAC,IAAD,MACG,iBAAiB,qCAAC,aAAD,OACjB,SAAS,qCAAC,OAAD,MAAQ;AAItB,MAAM,QAAQ;AAAA,EAEZ,OAAO,UAAU,OAAO,YAAY;AAAA,EAEpC,eAAe,UAAU,KAAK,YAAY;AAAA;AAG5C,cAAc,YAAY;AAC1B,iBAAiB,aAAa;AAE9B,MAAM,4BAA4B,SAAS;AAC3C,0BAA0B,YAAY;AAGtC,IAAO,oBAAQ;",
6
- "names": []
7
- }
@@ -1,158 +0,0 @@
1
- import * as React from "react";
2
- import React2, { useCallback, useRef, useState } from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- import styled from "styled-components";
5
- import { ChevronSmallRight, MoreOptionsVert } from "@elliemae/ds-icons";
6
- import { useFocusGroupItem } from "@elliemae/ds-shared/FocusGroup";
7
- import { useHiddenController } from "@elliemae/ds-hidden";
8
- import { DSButton, BUTTON_VARIANT } from "@elliemae/ds-button";
9
- import { DSPopper, interactions } from "@elliemae/ds-popper";
10
- import { Menu, setSubMenu } from "../Menu";
11
- import { MenuItem } from "./MenuItem";
12
- import { registerMenuItem } from "./menuItemFactory";
13
- const ChevronRightComp = styled.div`
14
- display: flex;
15
- justify-content: center;
16
- align-items: center;
17
- width: 28px; // same width as the ellipsis button
18
- `;
19
- const SubMenu = ({
20
- noAddon,
21
- leftAddon = void 0,
22
- label = void 0,
23
- interactionType = "hover",
24
- children: subitems,
25
- rightAddonType,
26
- disabledAddonInactive,
27
- checkableProps = {},
28
- customRenderer,
29
- onClick,
30
- closeMenu,
31
- id
32
- }) => {
33
- const itemRef = useRef(null);
34
- const focusOnOpen = useRef(false);
35
- const [isAddonHovered, setIsAddonHovered] = useState(false);
36
- const {
37
- visible = false,
38
- onShow,
39
- onHide
40
- } = useHiddenController(void 0, {
41
- interaction: "click"
42
- });
43
- const interaction = rightAddonType === "elipsis" ? "click" : "hover";
44
- const { focusItemByNode } = useFocusGroupItem();
45
- const handleShowSubItemsWithMouse = (e) => {
46
- e.stopPropagation();
47
- onShow();
48
- focusOnOpen.current = true;
49
- };
50
- const handleShowWithMouse = (e) => {
51
- if (onClick)
52
- onClick(e);
53
- };
54
- const handleShowWithMouseHover = () => {
55
- setIsAddonHovered(true);
56
- onShow();
57
- focusOnOpen.current = false;
58
- };
59
- const handleShowWithKeyboard = () => {
60
- onShow();
61
- focusOnOpen.current = true;
62
- };
63
- const handleOnMouseEnter = useCallback(() => {
64
- setIsAddonHovered(true);
65
- }, []);
66
- const handleOnMouseLeave = useCallback(() => {
67
- setIsAddonHovered(false);
68
- }, []);
69
- const hoverHandlers = interaction === "hover" ? {
70
- onMouseEnter: handleShowWithMouseHover,
71
- onMouseLeave: () => {
72
- onHide();
73
- setIsAddonHovered(false);
74
- }
75
- } : { onClick: handleShowWithMouse };
76
- const rightAddon = rightAddonType === "elipsis" ? /* @__PURE__ */ React2.createElement(DSButton, {
77
- "aria-label": "vertical-elipsis",
78
- "data-testid": "vertical-elipsis",
79
- buttonType: "text",
80
- leftIcon: /* @__PURE__ */ React2.createElement(MoreOptionsVert, {
81
- className: "submenu-arrow",
82
- color: visible || isAddonHovered ? ["brand-primary", 800] : ["neutral", 500],
83
- size: "s"
84
- }),
85
- onClick: (e) => handleShowSubItemsWithMouse(e),
86
- size: "m",
87
- variant: BUTTON_VARIANT.DEFAULT
88
- }) : /* @__PURE__ */ React2.createElement(ChevronRightComp, null, /* @__PURE__ */ React2.createElement(ChevronSmallRight, {
89
- "data-testid": "chevron-right",
90
- className: "submenu-arrow",
91
- color: visible || isAddonHovered ? ["brand-primary", 800] : ["neutral", 500],
92
- size: "sm"
93
- }));
94
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(DSPopper, {
95
- contentComponent: /* @__PURE__ */ React2.createElement(Menu, {
96
- focusKeyBindings: {
97
- ArrowLeft: [() => focusItemByNode(itemRef.current), "exit"]
98
- },
99
- focusOnOpen: focusOnOpen.current,
100
- onExitFocusGroup: onHide,
101
- ...hoverHandlers,
102
- closeMenu,
103
- visible
104
- }, subitems),
105
- interactionType,
106
- isOpen: visible,
107
- onOpen: (opening) => opening ? onShow() : onHide(),
108
- placement: "right-start",
109
- showArrow: false,
110
- triggerComponent: /* @__PURE__ */ React2.createElement(MenuItem, {
111
- customRenderer,
112
- disabledAddonInactive,
113
- id,
114
- innerRef: itemRef,
115
- label,
116
- leftAddon,
117
- noAddon,
118
- onFocus: handleOnMouseEnter,
119
- onBlur: handleOnMouseLeave,
120
- onMouseEnter: handleOnMouseEnter,
121
- onMouseLeave: handleOnMouseLeave,
122
- ...hoverHandlers,
123
- onKeyDown: (e) => {
124
- if (e.key === "ArrowRight" || e.key === "Enter" || e.keyCode === 32) {
125
- handleShowWithKeyboard();
126
- }
127
- },
128
- rightAddon,
129
- ...checkableProps
130
- })
131
- }));
132
- };
133
- const props = {
134
- noAddon: PropTypes.bool.description("dont show addon for submenu"),
135
- leftAddon: PropTypes.node.description("left addon"),
136
- label: PropTypes.string.description("submenu label"),
137
- interactionType: PropTypes.oneOf(interactions).description("A type indicating how to open/close the tooltip"),
138
- children: PropTypes.oneOfType([PropTypes.array, PropTypes.node]).description("sub menu items"),
139
- rightAddonType: PropTypes.oneOf(["ellipsis"]).description("right addon, ellipsis or undefined"),
140
- disabledAddonInactive: PropTypes.bool.description(""),
141
- checkableProps: PropTypes.object.description("props passed to MenuItem component"),
142
- customRenderer: PropTypes.func.description("custom renderer for menu item"),
143
- onClick: PropTypes.func.description("on click handler"),
144
- closeMenu: PropTypes.any.description(""),
145
- id: PropTypes.string.description("component id")
146
- };
147
- SubMenu.propTypes = props;
148
- registerMenuItem("submenu", SubMenu);
149
- setSubMenu(SubMenu);
150
- const DSSubMenuWithSchema = describe(SubMenu);
151
- DSSubMenuWithSchema.propTypes = props;
152
- var SubMenu_default = SubMenu;
153
- export {
154
- DSSubMenuWithSchema,
155
- SubMenu,
156
- SubMenu_default as default
157
- };
158
- //# sourceMappingURL=SubMenu.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MenuItems/SubMenu.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable max-lines */\nimport React, { useCallback, useRef, useState } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport { ChevronSmallRight, MoreOptionsVert } from '@elliemae/ds-icons';\nimport { useFocusGroupItem } from '@elliemae/ds-shared/FocusGroup';\nimport { useHiddenController } from '@elliemae/ds-hidden';\nimport { DSButton, BUTTON_VARIANT } from '@elliemae/ds-button';\nimport { DSPopper, interactions } from '@elliemae/ds-popper';\nimport { Menu, setSubMenu } from '../Menu';\nimport { MenuItem } from './MenuItem';\nimport { registerMenuItem } from './menuItemFactory';\n\nconst ChevronRightComp = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 28px; // same width as the ellipsis button\n`;\n\nconst SubMenu = ({\n noAddon,\n leftAddon = undefined,\n label = undefined,\n interactionType = 'hover',\n children: subitems,\n rightAddonType,\n disabledAddonInactive,\n checkableProps = {},\n customRenderer,\n onClick,\n closeMenu,\n id,\n}) => {\n const itemRef = useRef(null);\n const focusOnOpen = useRef(false);\n const [isAddonHovered, setIsAddonHovered] = useState<boolean>(false);\n const {\n visible = false,\n onShow,\n onHide,\n } = useHiddenController(undefined, {\n interaction: 'click',\n });\n\n const interaction = rightAddonType === 'elipsis' ? 'click' : 'hover';\n\n const { focusItemByNode } = useFocusGroupItem();\n // todo: create a menu state to handle all related menu things\n const handleShowSubItemsWithMouse = (e) => {\n e.stopPropagation();\n onShow();\n focusOnOpen.current = true;\n };\n const handleShowWithMouse = (e) => {\n if (onClick) onClick(e);\n };\n const handleShowWithMouseHover = () => {\n setIsAddonHovered(true);\n onShow();\n focusOnOpen.current = false;\n };\n\n const handleShowWithKeyboard = () => {\n onShow();\n focusOnOpen.current = true;\n };\n\n const handleOnMouseEnter = useCallback(() => {\n setIsAddonHovered(true);\n }, []);\n\n const handleOnMouseLeave = useCallback(() => {\n setIsAddonHovered(false);\n }, []);\n\n const hoverHandlers =\n interaction === 'hover'\n ? {\n onMouseEnter: handleShowWithMouseHover,\n onMouseLeave: () => {\n onHide();\n setIsAddonHovered(false);\n },\n }\n : { onClick: handleShowWithMouse };\n\n const rightAddon =\n rightAddonType === 'elipsis' ? (\n <DSButton\n aria-label=\"vertical-elipsis\"\n data-testid=\"vertical-elipsis\"\n buttonType=\"text\"\n leftIcon={\n <MoreOptionsVert\n className=\"submenu-arrow\"\n color={visible || isAddonHovered ? ['brand-primary', 800] : ['neutral', 500]}\n size=\"s\"\n />\n }\n onClick={(e) => handleShowSubItemsWithMouse(e)}\n size=\"m\"\n variant={BUTTON_VARIANT.DEFAULT}\n />\n ) : (\n <ChevronRightComp>\n <ChevronSmallRight\n data-testid=\"chevron-right\"\n className=\"submenu-arrow\"\n color={visible || isAddonHovered ? ['brand-primary', 800] : ['neutral', 500]}\n size=\"sm\"\n />\n </ChevronRightComp>\n );\n\n return (\n <>\n <DSPopper\n contentComponent={\n <Menu\n focusKeyBindings={{\n ArrowLeft: [() => focusItemByNode(itemRef.current), 'exit'],\n }}\n focusOnOpen={focusOnOpen.current}\n onExitFocusGroup={onHide}\n {...hoverHandlers}\n closeMenu={closeMenu}\n visible={visible}\n >\n {subitems}\n </Menu>\n }\n interactionType={interactionType}\n isOpen={visible}\n onOpen={(opening) => (opening ? onShow() : onHide())}\n placement=\"right-start\"\n showArrow={false}\n triggerComponent={\n <MenuItem\n customRenderer={customRenderer}\n disabledAddonInactive={disabledAddonInactive}\n id={id}\n innerRef={itemRef}\n label={label}\n leftAddon={leftAddon}\n noAddon={noAddon}\n onFocus={handleOnMouseEnter}\n onBlur={handleOnMouseLeave}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n {...hoverHandlers}\n onKeyDown={(e) => {\n if (e.key === 'ArrowRight' || e.key === 'Enter' || e.keyCode === 32) {\n handleShowWithKeyboard();\n }\n }}\n rightAddon={rightAddon}\n {...checkableProps}\n />\n }\n />\n </>\n );\n};\n\nconst props = {\n /** dont show addon for submenu */\n noAddon: PropTypes.bool.description('dont show addon for submenu'),\n /** left addon */\n leftAddon: PropTypes.node.description('left addon'),\n /** submenu label */\n label: PropTypes.string.description('submenu label'),\n /** A type indicating how to open/close the tooltip */\n interactionType: PropTypes.oneOf(interactions).description('A type indicating how to open/close the tooltip'),\n /** sub menu items */\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.node]).description('sub menu items'),\n /** right addon, ellipsis or undefined */\n rightAddonType: PropTypes.oneOf(['ellipsis']).description('right addon, ellipsis or undefined'),\n disabledAddonInactive: PropTypes.bool.description(''),\n /** props passed to MenuItem component */\n checkableProps: PropTypes.object.description('props passed to MenuItem component'),\n /** custom renderer for menu item */\n customRenderer: PropTypes.func.description('custom renderer for menu item'),\n /** on click handler */\n onClick: PropTypes.func.description('on click handler'),\n closeMenu: PropTypes.any.description(''),\n /** component id */\n id: PropTypes.string.description('component id'),\n};\n\nSubMenu.propTypes = props;\nregisterMenuItem('submenu', SubMenu);\nsetSubMenu(SubMenu);\nconst DSSubMenuWithSchema = describe(SubMenu);\n\nDSSubMenuWithSchema.propTypes = props;\n\nexport { DSSubMenuWithSchema, SubMenu };\nexport default SubMenu;\n"],
5
- "mappings": "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",
6
- "names": []
7
- }
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- const itemTypes = {};
3
- const menuItemFactory = (type = "", items, defaultItem = itemTypes.menuitem) => {
4
- const itemsObject = items || itemTypes;
5
- return itemsObject[type] || itemsObject[type.toLowerCase()] || defaultItem;
6
- };
7
- const registerMenuItem = (type, item) => itemTypes[type] = item;
8
- export {
9
- menuItemFactory,
10
- registerMenuItem
11
- };
12
- //# sourceMappingURL=menuItemFactory.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MenuItems/menuItemFactory.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\n\nconst itemTypes = {};\n\nexport const menuItemFactory = (type = '', items, defaultItem = itemTypes.menuitem) => {\n const itemsObject = items || itemTypes;\n return itemsObject[type] || itemsObject[type.toLowerCase()] || defaultItem;\n};\n\nexport const registerMenuItem = (type, item) => (itemTypes[type] = item);\n"],
5
- "mappings": "AAAA;ACEA,MAAM,YAAY;AAEX,MAAM,kBAAkB,CAAC,OAAO,IAAI,OAAO,cAAc,UAAU,aAAa;AACrF,QAAM,cAAc,SAAS;AAC7B,SAAO,YAAY,SAAS,YAAY,KAAK,kBAAkB;AAAA;AAG1D,MAAM,mBAAmB,CAAC,MAAM,SAAU,UAAU,QAAQ;",
6
- "names": []
7
- }
@@ -1,25 +0,0 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { isFunction } from "@elliemae/ds-utilities";
4
- import { menuItemFactory } from "./menuItemFactory";
5
- const renderMenuItems = (options, factory = menuItemFactory) => options.map((option, index) => {
6
- if (isFunction(option.renderer)) {
7
- return option.renderer({
8
- key: option.id,
9
- item: option
10
- });
11
- }
12
- const ItemComponent = factory(option.type);
13
- const children = option.subItems && renderMenuItems(option.subItems, factory);
14
- return /* @__PURE__ */ React2.createElement(ItemComponent, {
15
- ...option,
16
- key: option.id || index,
17
- item: option,
18
- onClick: null,
19
- onMouseDown: option.onClick
20
- }, children);
21
- });
22
- export {
23
- renderMenuItems
24
- };
25
- //# sourceMappingURL=renderMenuItems.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MenuItems/renderMenuItems.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-cycle */\nimport React from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { menuItemFactory } from './menuItemFactory';\n\nexport const renderMenuItems = (options, factory = menuItemFactory) =>\n options.map((option, index) => {\n if (isFunction(option.renderer)) {\n return option.renderer({\n key: option.id,\n item: option,\n });\n }\n const ItemComponent = factory(option.type);\n const children = option.subItems && renderMenuItems(option.subItems, factory);\n return (\n <ItemComponent\n {...option}\n key={option.id || index}\n item={option}\n onClick={null}\n onMouseDown={option.onClick}\n // onClick callback called in onMouseDown due to events order issue\n >\n {children}\n </ItemComponent>\n );\n });\n"],
5
- "mappings": "AAAA;ACCA;AACA;AACA;AAEO,MAAM,kBAAkB,CAAC,SAAS,UAAU,oBACjD,QAAQ,IAAI,CAAC,QAAQ,UAAU;AAC7B,MAAI,WAAW,OAAO,WAAW;AAC/B,WAAO,OAAO,SAAS;AAAA,MACrB,KAAK,OAAO;AAAA,MACZ,MAAM;AAAA;AAAA;AAGV,QAAM,gBAAgB,QAAQ,OAAO;AACrC,QAAM,WAAW,OAAO,YAAY,gBAAgB,OAAO,UAAU;AACrE,SACE,qCAAC,eAAD;AAAA,OACM;AAAA,IACJ,KAAK,OAAO,MAAM;AAAA,IAClB,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa,OAAO;AAAA,KAGnB;AAAA;",
6
- "names": []
7
- }
@@ -1,49 +0,0 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { FixedSizeList as List } from "react-window";
4
- import { useHeightByAmountOfItems } from "./utils/useHeightByAmountOfItems";
5
- const MenuItem = ({ data, index, style }) => /* @__PURE__ */ React2.createElement("div", {
6
- key: index,
7
- style
8
- }, data && data[index] ? data[index] : "");
9
- function resolveComputation(items, cb, timeout = 1e3) {
10
- return () => new Promise((resolve) => {
11
- const doResolve = (result2) => {
12
- cb(result2);
13
- resolve(result2);
14
- };
15
- let result = 0;
16
- const timer = setTimeout(() => doResolve(result), timeout);
17
- items.forEach((option) => {
18
- result = option.props.label.length > result ? option.props.label.length : result;
19
- });
20
- clearTimeout(timer);
21
- doResolve(result);
22
- });
23
- }
24
- function VirtualMenuList({
25
- items,
26
- itemHeight = 32,
27
- amountItemsInWindow = 5,
28
- width,
29
- height
30
- }) {
31
- const computedListHeight = useHeightByAmountOfItems({
32
- amountItems: amountItemsInWindow,
33
- itemHeight,
34
- items
35
- });
36
- return /* @__PURE__ */ React2.createElement(List, {
37
- height: height || computedListHeight,
38
- itemCount: items.length,
39
- itemData: items,
40
- itemSize: itemHeight,
41
- width
42
- }, MenuItem);
43
- }
44
- var VirtualMenuList_default = VirtualMenuList;
45
- export {
46
- VirtualMenuList,
47
- VirtualMenuList_default as default
48
- };
49
- //# sourceMappingURL=VirtualMenuList.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/VirtualMenuList.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { useHeightByAmountOfItems } from './utils/useHeightByAmountOfItems';\n\nconst MenuItem = ({ data, index, style }) => (\n <div key={index} style={style}>\n {data && data[index] ? data[index] : ''}\n </div>\n);\n\n// eslint-disable-next-line no-unused-vars\nfunction resolveComputation(items, cb, timeout = 1000) {\n return () =>\n new Promise(resolve => {\n const doResolve = result => {\n cb(result);\n resolve(result);\n };\n let result = 0;\n const timer = setTimeout(() => doResolve(result), timeout);\n items.forEach(option => {\n result =\n option.props.label.length > result\n ? option.props.label.length\n : result;\n });\n\n clearTimeout(timer);\n doResolve(result);\n });\n}\n\nfunction VirtualMenuList({\n items,\n itemHeight = 32,\n amountItemsInWindow = 5,\n width,\n height,\n}) {\n const computedListHeight = useHeightByAmountOfItems({\n amountItems: amountItemsInWindow,\n itemHeight,\n items,\n });\n\n return (\n <List\n height={height || computedListHeight}\n itemCount={items.length}\n itemData={items}\n itemSize={itemHeight}\n width={width}\n >\n {MenuItem}\n </List>\n );\n}\n\nexport { VirtualMenuList };\nexport default VirtualMenuList;"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AAEA,MAAM,WAAW,CAAC,EAAE,MAAM,OAAO,YAC/B,qCAAC,OAAD;AAAA,EAAK,KAAK;AAAA,EAAO;AAAA,GACd,QAAQ,KAAK,SAAS,KAAK,SAAS;AAKzC,4BAA4B,OAAO,IAAI,UAAU,KAAM;AACrD,SAAO,MACL,IAAI,QAAQ,aAAW;AACrB,UAAM,YAAY,aAAU;AAC1B,SAAG;AACH,cAAQ;AAAA;AAEV,QAAI,SAAS;AACb,UAAM,QAAQ,WAAW,MAAM,UAAU,SAAS;AAClD,UAAM,QAAQ,YAAU;AACtB,eACE,OAAO,MAAM,MAAM,SAAS,SACxB,OAAO,MAAM,MAAM,SACnB;AAAA;AAGR,iBAAa;AACb,cAAU;AAAA;AAAA;AAIhB,yBAAyB;AAAA,EACvB;AAAA,EACA,aAAa;AAAA,EACb,sBAAsB;AAAA,EACtB;AAAA,EACA;AAAA,GACC;AACD,QAAM,qBAAqB,yBAAyB;AAAA,IAClD,aAAa;AAAA,IACb;AAAA,IACA;AAAA;AAGF,SACE,qCAAC,MAAD;AAAA,IACE,QAAQ,UAAU;AAAA,IAClB,WAAW,MAAM;AAAA,IACjB,UAAU;AAAA,IACV,UAAU;AAAA,IACV;AAAA,KAEC;AAAA;AAMP,IAAO,0BAAQ;",
6
- "names": []
7
- }
package/dist/esm/index.js DELETED
@@ -1,34 +0,0 @@
1
- import * as React from "react";
2
- import { DSMenuItemWithSchema } from "./MenuItems/MenuItem";
3
- import { DSSubMenuWithSchema } from "./MenuItems/SubMenu";
4
- import { DSMenuCheckboxGroupWithSchema } from "./MenuItems/CheckboxGroup";
5
- import { DSMenuItemCheckeableWithSchema } from "./MenuItems/MenuItemCheckable";
6
- import { DSMenuItemRadioWithSchema } from "./MenuItems/MenuItemRadio";
7
- import { DSMenuRadioGroupWithSchema } from "./MenuItems/RadioGroup";
8
- import { DSMenuSearchableGroupWithSchema } from "./MenuItems/SearchableGroup";
9
- import { DSMenuSearchableListWithSchema } from "./MenuItems/SearchableList";
10
- import { DSMenuSeparatorWithSchema } from "./MenuItems/Separator";
11
- import { DSMenuSelectionGroupWithSchema } from "./MenuItems/SelectionGroup";
12
- import { default as default2 } from "./MenuCombobox";
13
- import { menuItemFactory } from "./MenuItems/menuItemFactory";
14
- import { renderMenuItems } from "./MenuItems/renderMenuItems";
15
- import { DSMenuWithSchema, Menu, Menu as Menu2 } from "./Menu";
16
- export {
17
- DSMenuCheckboxGroupWithSchema,
18
- DSMenuItemCheckeableWithSchema,
19
- DSMenuItemRadioWithSchema,
20
- DSMenuItemWithSchema,
21
- DSMenuRadioGroupWithSchema,
22
- DSMenuSearchableGroupWithSchema,
23
- DSMenuSearchableListWithSchema,
24
- DSMenuSelectionGroupWithSchema,
25
- DSMenuSeparatorWithSchema,
26
- DSMenuWithSchema,
27
- DSSubMenuWithSchema,
28
- Menu,
29
- default2 as MenuCombobox,
30
- Menu2 as default,
31
- menuItemFactory,
32
- renderMenuItems
33
- };
34
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSMenuItemWithSchema } from './MenuItems/MenuItem';\nexport { DSSubMenuWithSchema } from './MenuItems/SubMenu';\nexport { DSMenuCheckboxGroupWithSchema } from './MenuItems/CheckboxGroup';\nexport { DSMenuItemCheckeableWithSchema } from './MenuItems/MenuItemCheckable';\nexport { DSMenuItemRadioWithSchema } from './MenuItems/MenuItemRadio';\nexport { DSMenuRadioGroupWithSchema } from './MenuItems/RadioGroup';\nexport { DSMenuSearchableGroupWithSchema } from './MenuItems/SearchableGroup';\nexport { DSMenuSearchableListWithSchema } from './MenuItems/SearchableList';\nexport { DSMenuSeparatorWithSchema } from './MenuItems/Separator';\nexport { DSMenuSelectionGroupWithSchema } from './MenuItems/SelectionGroup';\n\nexport { default as MenuCombobox } from './MenuCombobox';\nexport { menuItemFactory } from './MenuItems/menuItemFactory';\nexport { renderMenuItems } from './MenuItems/renderMenuItems';\nexport { DSMenuWithSchema, Menu, Menu as default } from './Menu';\n"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/useHeightByAmountOfItems.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\n\nconst calculateHeight = (itemHeight, amountItemsInWindow, itemsLength) => {\n const realAmountItemsInWindow =\n itemsLength < amountItemsInWindow ? itemsLength : amountItemsInWindow;\n return itemHeight * realAmountItemsInWindow;\n};\n\nfunction useHeightByAmountOfItems({\n itemHeight,\n amountItems,\n items,\n}) {\n const calculatedHeight = useMemo(\n () => calculateHeight(itemHeight, amountItems, items.length),\n [amountItems, items],\n );\n\n return calculatedHeight;\n}\n\nexport { useHeightByAmountOfItems };\nexport default useHeightByAmountOfItems;\n"],
5
- "mappings": "AAAA;ACAA;AAEA,MAAM,kBAAkB,CAAC,YAAY,qBAAqB,gBAAgB;AACxE,QAAM,0BACJ,cAAc,sBAAsB,cAAc;AACpD,SAAO,aAAa;AAAA;AAGtB,kCAAkC;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,GACC;AACD,QAAM,mBAAmB,QACvB,MAAM,gBAAgB,YAAY,aAAa,MAAM,SACrD,CAAC,aAAa;AAGhB,SAAO;AAAA;AAIT,IAAO,mCAAQ;",
6
- "names": []
7
- }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- declare const MenuContext: React.Context<unknown>;
3
- export { MenuContext };
4
- export default MenuContext;
@@ -1 +0,0 @@
1
- export { DSMenuWithSchema, Menu } from './Menu';
@@ -1,2 +0,0 @@
1
- export declare const menuItemFactory: (type: string | undefined, items: any, defaultItem?: any) => any;
2
- export declare const registerMenuItem: (type: any, item: any) => any;
@@ -1 +0,0 @@
1
- export declare const renderMenuItems: (options: any, factory?: (type: string | undefined, items: any, defaultItem?: any) => any) => any;
@@ -1,7 +0,0 @@
1
- declare function useHeightByAmountOfItems({ itemHeight, amountItems, items, }: {
2
- itemHeight: any;
3
- amountItems: any;
4
- items: any;
5
- }): number;
6
- export { useHeightByAmountOfItems };
7
- export default useHeightByAmountOfItems;