@elliemae/ds-menu 2.2.2-rc.1 → 2.3.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/cjs/Menu.js +151 -0
  2. package/dist/cjs/Menu.js.map +7 -0
  3. package/dist/cjs/MenuCombobox.js +70 -0
  4. package/dist/cjs/MenuCombobox.js.map +7 -0
  5. package/dist/cjs/MenuContext.js +38 -0
  6. package/dist/cjs/MenuContext.js.map +7 -0
  7. package/dist/cjs/MenuExports.js +36 -0
  8. package/dist/cjs/MenuExports.js.map +7 -0
  9. package/dist/cjs/MenuItems/CheckboxGroup.js +52 -0
  10. package/dist/cjs/MenuItems/CheckboxGroup.js.map +7 -0
  11. package/dist/cjs/MenuItems/MenuItem.js +157 -0
  12. package/dist/cjs/MenuItems/MenuItem.js.map +7 -0
  13. package/dist/cjs/MenuItems/MenuItemCheckable.js +88 -0
  14. package/dist/cjs/MenuItems/MenuItemCheckable.js.map +7 -0
  15. package/dist/cjs/MenuItems/MenuItemCheckbox.js +48 -0
  16. package/dist/cjs/MenuItems/MenuItemCheckbox.js.map +7 -0
  17. package/dist/cjs/MenuItems/MenuItemRadio.js +53 -0
  18. package/dist/cjs/MenuItems/MenuItemRadio.js.map +7 -0
  19. package/dist/cjs/MenuItems/RadioGroup.js +51 -0
  20. package/dist/cjs/MenuItems/RadioGroup.js.map +7 -0
  21. package/dist/cjs/MenuItems/SearchableGroup.js +97 -0
  22. package/dist/cjs/MenuItems/SearchableGroup.js.map +7 -0
  23. package/dist/cjs/MenuItems/SearchableList.js +114 -0
  24. package/dist/cjs/MenuItems/SearchableList.js.map +7 -0
  25. package/dist/cjs/MenuItems/SelectionGroup.js +102 -0
  26. package/dist/cjs/MenuItems/SelectionGroup.js.map +7 -0
  27. package/dist/cjs/MenuItems/Separator.js +59 -0
  28. package/dist/cjs/MenuItems/Separator.js.map +7 -0
  29. package/dist/cjs/MenuItems/SubMenu.js +187 -0
  30. package/dist/cjs/MenuItems/SubMenu.js.map +7 -0
  31. package/dist/cjs/MenuItems/menuItemFactory.js +41 -0
  32. package/dist/cjs/MenuItems/menuItemFactory.js.map +7 -0
  33. package/dist/cjs/MenuItems/renderMenuItems.js +54 -0
  34. package/dist/cjs/MenuItems/renderMenuItems.js.map +7 -0
  35. package/dist/cjs/VirtualMenuList.js +78 -0
  36. package/dist/cjs/VirtualMenuList.js.map +7 -0
  37. package/dist/cjs/index.js +63 -0
  38. package/dist/cjs/index.js.map +7 -0
  39. package/dist/cjs/utils/useHeightByAmountOfItems.js +49 -0
  40. package/dist/cjs/utils/useHeightByAmountOfItems.js.map +7 -0
  41. package/dist/esm/Menu.js +122 -0
  42. package/dist/esm/Menu.js.map +7 -0
  43. package/dist/esm/MenuCombobox.js +41 -0
  44. package/dist/esm/MenuCombobox.js.map +7 -0
  45. package/dist/esm/MenuContext.js +9 -0
  46. package/dist/esm/MenuContext.js.map +7 -0
  47. package/dist/esm/MenuExports.js +7 -0
  48. package/dist/esm/MenuExports.js.map +7 -0
  49. package/dist/esm/MenuItems/CheckboxGroup.js +23 -0
  50. package/dist/esm/MenuItems/CheckboxGroup.js.map +7 -0
  51. package/dist/esm/MenuItems/MenuItem.js +128 -0
  52. package/dist/esm/MenuItems/MenuItem.js.map +7 -0
  53. package/dist/esm/MenuItems/MenuItemCheckable.js +59 -0
  54. package/dist/esm/MenuItems/MenuItemCheckable.js.map +7 -0
  55. package/dist/esm/MenuItems/MenuItemCheckbox.js +19 -0
  56. package/dist/esm/MenuItems/MenuItemCheckbox.js.map +7 -0
  57. package/dist/esm/MenuItems/MenuItemRadio.js +24 -0
  58. package/dist/esm/MenuItems/MenuItemRadio.js.map +7 -0
  59. package/dist/esm/MenuItems/RadioGroup.js +22 -0
  60. package/dist/esm/MenuItems/RadioGroup.js.map +7 -0
  61. package/dist/esm/MenuItems/SearchableGroup.js +68 -0
  62. package/dist/esm/MenuItems/SearchableGroup.js.map +7 -0
  63. package/dist/esm/MenuItems/SearchableList.js +85 -0
  64. package/dist/esm/MenuItems/SearchableList.js.map +7 -0
  65. package/dist/esm/MenuItems/SelectionGroup.js +73 -0
  66. package/dist/esm/MenuItems/SelectionGroup.js.map +7 -0
  67. package/dist/esm/MenuItems/Separator.js +30 -0
  68. package/dist/esm/MenuItems/Separator.js.map +7 -0
  69. package/dist/esm/MenuItems/SubMenu.js +158 -0
  70. package/dist/esm/MenuItems/SubMenu.js.map +7 -0
  71. package/dist/esm/MenuItems/menuItemFactory.js +12 -0
  72. package/dist/esm/MenuItems/menuItemFactory.js.map +7 -0
  73. package/dist/esm/MenuItems/renderMenuItems.js +25 -0
  74. package/dist/esm/MenuItems/renderMenuItems.js.map +7 -0
  75. package/dist/esm/VirtualMenuList.js +49 -0
  76. package/dist/esm/VirtualMenuList.js.map +7 -0
  77. package/dist/esm/index.js +34 -0
  78. package/dist/esm/index.js.map +7 -0
  79. package/{esm → dist/esm}/utils/useHeightByAmountOfItems.js +13 -11
  80. package/dist/esm/utils/useHeightByAmountOfItems.js.map +7 -0
  81. package/{types → dist/types}/Menu.d.ts +4 -2
  82. package/{types → dist/types}/MenuCombobox.d.ts +0 -0
  83. package/dist/types/MenuContext.d.ts +4 -0
  84. package/dist/types/MenuExports.d.ts +1 -0
  85. package/{types → dist/types}/MenuItems/CheckboxGroup.d.ts +5 -5
  86. package/{types → dist/types}/MenuItems/MenuItem.d.ts +5 -5
  87. package/{types → dist/types}/MenuItems/MenuItemCheckable.d.ts +15 -14
  88. package/{types → dist/types}/MenuItems/MenuItemCheckbox.d.ts +3 -2
  89. package/{types → dist/types}/MenuItems/MenuItemRadio.d.ts +5 -5
  90. package/{types → dist/types}/MenuItems/RadioGroup.d.ts +5 -5
  91. package/{types → dist/types}/MenuItems/SearchableGroup.d.ts +3 -3
  92. package/{types → dist/types}/MenuItems/SearchableList.d.ts +16 -16
  93. package/{types → dist/types}/MenuItems/SelectionGroup.d.ts +16 -16
  94. package/{types → dist/types}/MenuItems/Separator.d.ts +2 -1
  95. package/{types → dist/types}/MenuItems/SubMenu.d.ts +18 -18
  96. package/dist/types/MenuItems/menuItemFactory.d.ts +2 -0
  97. package/dist/types/MenuItems/renderMenuItems.d.ts +1 -0
  98. package/{types → dist/types}/VirtualMenuList.d.ts +3 -1
  99. package/{types → dist/types}/index.d.ts +3 -2
  100. package/{types → dist/types}/tests/Menu.test.d.ts +0 -0
  101. package/{types → dist/types}/tests/MenuItem.test.d.ts +0 -0
  102. package/dist/types/utils/useHeightByAmountOfItems.d.ts +7 -0
  103. package/package.json +72 -62
  104. package/cjs/Menu.js +0 -195
  105. package/cjs/MenuCombobox.js +0 -56
  106. package/cjs/MenuContext.js +0 -11
  107. package/cjs/MenuItems/CheckboxGroup.js +0 -45
  108. package/cjs/MenuItems/MenuItem.js +0 -203
  109. package/cjs/MenuItems/MenuItemCheckable.js +0 -119
  110. package/cjs/MenuItems/MenuItemCheckbox.js +0 -42
  111. package/cjs/MenuItems/MenuItemRadio.js +0 -41
  112. package/cjs/MenuItems/RadioGroup.js +0 -42
  113. package/cjs/MenuItems/SearchableGroup.js +0 -101
  114. package/cjs/MenuItems/SearchableList.js +0 -117
  115. package/cjs/MenuItems/SelectionGroup.js +0 -107
  116. package/cjs/MenuItems/Separator.js +0 -44
  117. package/cjs/MenuItems/SubMenu.js +0 -203
  118. package/cjs/MenuItems/menuItemFactory.js +0 -73
  119. package/cjs/VirtualMenuList.js +0 -48
  120. package/cjs/index.js +0 -36
  121. package/cjs/utils/useHeightByAmountOfItems.js +0 -20
  122. package/esm/Menu.js +0 -180
  123. package/esm/MenuCombobox.js +0 -48
  124. package/esm/MenuContext.js +0 -5
  125. package/esm/MenuItems/CheckboxGroup.js +0 -35
  126. package/esm/MenuItems/MenuItem.js +0 -191
  127. package/esm/MenuItems/MenuItemCheckable.js +0 -108
  128. package/esm/MenuItems/MenuItemCheckbox.js +0 -34
  129. package/esm/MenuItems/MenuItemRadio.js +0 -32
  130. package/esm/MenuItems/RadioGroup.js +0 -32
  131. package/esm/MenuItems/SearchableGroup.js +0 -91
  132. package/esm/MenuItems/SearchableList.js +0 -108
  133. package/esm/MenuItems/SelectionGroup.js +0 -97
  134. package/esm/MenuItems/Separator.js +0 -33
  135. package/esm/MenuItems/SubMenu.js +0 -190
  136. package/esm/MenuItems/menuItemFactory.js +0 -64
  137. package/esm/VirtualMenuList.js +0 -42
  138. package/esm/index.js +0 -13
  139. package/types/MenuContext.d.ts +0 -3
  140. package/types/MenuItems/menuItemFactory.d.ts +0 -3
  141. package/types/utils/useHeightByAmountOfItems.d.ts +0 -5
@@ -0,0 +1,34 @@
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
@@ -0,0 +1,7 @@
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,18 +1,20 @@
1
- import { useMemo } from 'react';
2
-
1
+ import * as React from "react";
2
+ import { useMemo } from "react";
3
3
  const calculateHeight = (itemHeight, amountItemsInWindow, itemsLength) => {
4
4
  const realAmountItemsInWindow = itemsLength < amountItemsInWindow ? itemsLength : amountItemsInWindow;
5
5
  return itemHeight * realAmountItemsInWindow;
6
6
  };
7
-
8
- function useHeightByAmountOfItems(_ref) {
9
- let {
10
- itemHeight,
11
- amountItems,
12
- items
13
- } = _ref;
7
+ function useHeightByAmountOfItems({
8
+ itemHeight,
9
+ amountItems,
10
+ items
11
+ }) {
14
12
  const calculatedHeight = useMemo(() => calculateHeight(itemHeight, amountItems, items.length), [amountItems, items]);
15
13
  return calculatedHeight;
16
14
  }
17
-
18
- export { useHeightByAmountOfItems as default };
15
+ var useHeightByAmountOfItems_default = useHeightByAmountOfItems;
16
+ export {
17
+ useHeightByAmountOfItems_default as default,
18
+ useHeightByAmountOfItems
19
+ };
20
+ //# sourceMappingURL=useHeightByAmountOfItems.js.map
@@ -0,0 +1,7 @@
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,11 +1,13 @@
1
1
  /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
2
  /// <reference types="react" />
3
- import { renderMenuItems, menuItemFactory } from './MenuItems/menuItemFactory';
3
+ import { menuItemFactory } from './MenuItems/menuItemFactory';
4
+ import { renderMenuItems } from './MenuItems/renderMenuItems';
4
5
  declare const Menu: any;
5
6
  declare const DSMenuWithSchema: {
6
7
  (props?: unknown): JSX.Element;
7
8
  propTypes: unknown;
8
9
  toTypescript: () => import("react-desc").TypescriptSchema;
9
10
  };
10
- export { Menu, menuItemFactory, renderMenuItems, DSMenuWithSchema };
11
+ declare const setSubMenu: (SubMenu: any) => any;
12
+ export { menuItemFactory, renderMenuItems, DSMenuWithSchema, Menu, setSubMenu };
11
13
  export default Menu;
File without changes
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ declare const MenuContext: React.Context<unknown>;
3
+ export { MenuContext };
4
+ export default MenuContext;
@@ -0,0 +1 @@
1
+ export { DSMenuWithSchema, Menu } from './Menu';
@@ -1,8 +1,8 @@
1
1
  /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
2
  /// <reference types="react" />
3
- declare function CheckboxGroup(props: any): JSX.Element;
4
- declare namespace CheckboxGroup {
5
- var propTypes: {
3
+ declare const CheckboxGroup: {
4
+ (props: any): JSX.Element;
5
+ propTypes: {
6
6
  active: {
7
7
  defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
8
8
  deprecated: import("react-desc").PropTypesDescValidator;
@@ -22,11 +22,11 @@ declare namespace CheckboxGroup {
22
22
  isRequired: import("react-desc").PropTypesDescValue;
23
23
  };
24
24
  };
25
- }
25
+ };
26
26
  declare const DSMenuCheckboxGroupWithSchema: {
27
27
  (props?: unknown): JSX.Element;
28
28
  propTypes: unknown;
29
29
  toTypescript: () => import("react-desc").TypescriptSchema;
30
30
  };
31
+ export { DSMenuCheckboxGroupWithSchema, CheckboxGroup };
31
32
  export default CheckboxGroup;
32
- export { DSMenuCheckboxGroupWithSchema };
@@ -1,8 +1,8 @@
1
1
  /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
2
  /// <reference types="react" />
3
- declare function MenuItem(props: any): JSX.Element;
4
- declare namespace MenuItem {
5
- var propTypes: {
3
+ declare const MenuItem: {
4
+ (props: any): JSX.Element;
5
+ propTypes: {
6
6
  /** Renders the MenuItem with a specific html element */
7
7
  as: {
8
8
  defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
@@ -69,11 +69,11 @@ declare namespace MenuItem {
69
69
  isRequired: import("react-desc").PropTypesDescValue;
70
70
  };
71
71
  };
72
- }
72
+ };
73
73
  declare const DSMenuItemWithSchema: {
74
74
  (props?: unknown): JSX.Element;
75
75
  propTypes: unknown;
76
76
  toTypescript: () => import("react-desc").TypescriptSchema;
77
77
  };
78
+ export { DSMenuItemWithSchema, MenuItem };
78
79
  export default MenuItem;
79
- export { DSMenuItemWithSchema };
@@ -12,18 +12,18 @@
12
12
  * @param root0.leftAddon
13
13
  * @param root0.item
14
14
  */
15
- declare function MenuItemCheckable({ role, checked, name, checkIcon, children, leftAddon, item, ...otherProps }: {
16
- [x: string]: any;
17
- role?: string | undefined;
18
- checked?: boolean | undefined;
19
- name?: string | undefined;
20
- checkIcon?: JSX.Element | undefined;
21
- children: any;
22
- leftAddon: any;
23
- item?: undefined;
24
- }): JSX.Element;
25
- declare namespace MenuItemCheckable {
26
- var propTypes: {
15
+ declare const MenuItemCheckable: {
16
+ ({ role, checked, name, checkIcon, children, leftAddon, item, ...otherProps }: {
17
+ [x: string]: any;
18
+ role?: string | undefined;
19
+ checked?: boolean | undefined;
20
+ name?: string | undefined;
21
+ checkIcon?: JSX.Element | undefined;
22
+ children: any;
23
+ leftAddon: any;
24
+ item?: undefined;
25
+ }): JSX.Element;
26
+ propTypes: {
27
27
  /** Whether the item is checked or not */
28
28
  checked: {
29
29
  defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
@@ -67,11 +67,12 @@ declare namespace MenuItemCheckable {
67
67
  isRequired: import("react-desc").PropTypesDescValue;
68
68
  };
69
69
  };
70
- }
70
+ };
71
71
  declare const DSMenuItemCheckeableWithSchema: {
72
72
  (props?: unknown): JSX.Element;
73
+ /** a11y role */
73
74
  propTypes: unknown;
74
75
  toTypescript: () => import("react-desc").TypescriptSchema;
75
76
  };
77
+ export { DSMenuItemCheckeableWithSchema, MenuItemCheckable };
76
78
  export default MenuItemCheckable;
77
- export { DSMenuItemCheckeableWithSchema };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
- declare function MenuItemCheckbox({ checked, ...rest }: {
2
+ declare const MenuItemCheckbox: ({ checked, ...rest }: {
3
3
  [x: string]: any;
4
4
  checked: any;
5
- }): JSX.Element;
5
+ }) => JSX.Element;
6
+ export { MenuItemCheckbox };
6
7
  export default MenuItemCheckbox;
@@ -1,8 +1,8 @@
1
1
  /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
2
  /// <reference types="react" />
3
- declare function MenuItemRadio(props: any): JSX.Element;
4
- declare namespace MenuItemRadio {
5
- var propTypes: {
3
+ declare const MenuItemRadio: {
4
+ (props: any): JSX.Element;
5
+ propTypes: {
6
6
  /** Whether the item is checked or not */
7
7
  checked: {
8
8
  defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
@@ -18,11 +18,11 @@ declare namespace MenuItemRadio {
18
18
  isRequired: import("react-desc").PropTypesDescValue;
19
19
  };
20
20
  };
21
- }
21
+ };
22
22
  declare const DSMenuItemRadioWithSchema: {
23
23
  (props?: unknown): JSX.Element;
24
24
  propTypes: unknown;
25
25
  toTypescript: () => import("react-desc").TypescriptSchema;
26
26
  };
27
+ export { DSMenuItemRadioWithSchema, MenuItemRadio };
27
28
  export default MenuItemRadio;
28
- export { DSMenuItemRadioWithSchema };
@@ -1,8 +1,8 @@
1
1
  /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
2
  /// <reference types="react" />
3
- declare function RadioGroup(props: any): JSX.Element;
4
- declare namespace RadioGroup {
5
- var propTypes: {
3
+ declare const RadioGroup: {
4
+ (props: any): JSX.Element;
5
+ propTypes: {
6
6
  active: {
7
7
  defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
8
8
  deprecated: import("react-desc").PropTypesDescValidator;
@@ -16,11 +16,11 @@ declare namespace RadioGroup {
16
16
  isRequired: import("react-desc").PropTypesDescValue;
17
17
  };
18
18
  };
19
- }
19
+ };
20
20
  declare const DSMenuRadioGroupWithSchema: {
21
21
  (props?: unknown): JSX.Element;
22
22
  propTypes: unknown;
23
23
  toTypescript: () => import("react-desc").TypescriptSchema;
24
24
  };
25
+ export { DSMenuRadioGroupWithSchema, RadioGroup };
25
26
  export default RadioGroup;
26
- export { DSMenuRadioGroupWithSchema };
@@ -5,6 +5,6 @@ declare const DSMenuSearchableGroupWithSchema: {
5
5
  propTypes: unknown;
6
6
  toTypescript: () => import("react-desc").TypescriptSchema;
7
7
  };
8
- declare const _default: any;
9
- export default _default;
10
- export { DSMenuSearchableGroupWithSchema };
8
+ declare const SearchableGroupHOC: any;
9
+ export { DSMenuSearchableGroupWithSchema, SearchableGroupHOC as SearchableGroup };
10
+ export default SearchableGroupHOC;
@@ -1,19 +1,19 @@
1
1
  /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
2
  /// <reference types="react" />
3
- declare function SearchableList({ onSelectMenuItem, components, searchTerm: searchTermProp, items, dropdownFilterOptions, returnValue, extraListProps, appendTermInList, maxOptions, loading, }: {
4
- onSelectMenuItem?: (() => void) | undefined;
5
- components?: {} | undefined;
6
- searchTerm?: string | undefined;
7
- items?: never[] | undefined;
8
- dropdownFilterOptions?: {} | undefined;
9
- returnValue: any;
10
- extraListProps?: {} | undefined;
11
- appendTermInList?: boolean | undefined;
12
- maxOptions?: number | undefined;
13
- loading?: boolean | undefined;
14
- }): JSX.Element;
15
- declare namespace SearchableList {
16
- var propTypes: {
3
+ declare const SearchableList: {
4
+ ({ onSelectMenuItem, components, searchTerm: searchTermProp, items, dropdownFilterOptions, returnValue, extraListProps, appendTermInList, maxOptions, loading, }: {
5
+ onSelectMenuItem?: (() => void) | undefined;
6
+ components?: {} | undefined;
7
+ searchTerm?: string | undefined;
8
+ items?: never[] | undefined;
9
+ dropdownFilterOptions?: {} | undefined;
10
+ returnValue: any;
11
+ extraListProps?: {} | undefined;
12
+ appendTermInList?: boolean | undefined;
13
+ maxOptions?: number | undefined;
14
+ loading?: boolean | undefined;
15
+ }): JSX.Element;
16
+ propTypes: {
17
17
  /** callback after item gets selected */
18
18
  onSelectMenuItem: {
19
19
  defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
@@ -85,11 +85,11 @@ declare namespace SearchableList {
85
85
  isRequired: import("react-desc").PropTypesDescValue;
86
86
  };
87
87
  };
88
- }
88
+ };
89
89
  declare const DSMenuSearchableListWithSchema: {
90
90
  (props?: unknown): JSX.Element;
91
91
  propTypes: unknown;
92
92
  toTypescript: () => import("react-desc").TypescriptSchema;
93
93
  };
94
+ export { DSMenuSearchableListWithSchema, SearchableList };
94
95
  export default SearchableList;
95
- export { DSMenuSearchableListWithSchema };
@@ -1,19 +1,19 @@
1
1
  /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
2
  /// <reference types="react" />
3
- declare function SelectionGroup({ multi, searchable, focusOnOpen, onSelect, children, items, active, width, height, maxOptions, }: {
4
- multi?: boolean | undefined;
5
- searchable?: boolean | undefined;
6
- focusOnOpen?: boolean | undefined;
7
- onSelect?: (() => null) | undefined;
8
- children: any;
9
- items?: undefined;
10
- active?: string | never[] | undefined;
11
- width: any;
12
- height: any;
13
- maxOptions?: number | undefined;
14
- }): JSX.Element;
15
- declare namespace SelectionGroup {
16
- var propTypes: {
3
+ declare const SelectionGroup: {
4
+ ({ multi, searchable, focusOnOpen, onSelect, children, items, active, width, height, maxOptions, }: {
5
+ multi?: boolean | undefined;
6
+ searchable?: boolean | undefined;
7
+ focusOnOpen?: boolean | undefined;
8
+ onSelect?: (() => null) | undefined;
9
+ children: any;
10
+ items?: undefined;
11
+ active?: string | never[] | undefined;
12
+ width: any;
13
+ height: any;
14
+ maxOptions?: number | undefined;
15
+ }): JSX.Element;
16
+ propTypes: {
17
17
  /** toggle on multi select */
18
18
  multi: {
19
19
  defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
@@ -77,11 +77,11 @@ declare namespace SelectionGroup {
77
77
  isRequired: import("react-desc").PropTypesDescValue;
78
78
  };
79
79
  };
80
- }
80
+ };
81
81
  declare const DSMenuSelectionGroupWithSchema: {
82
82
  (props?: unknown): JSX.Element;
83
83
  propTypes: unknown;
84
84
  toTypescript: () => import("react-desc").TypescriptSchema;
85
85
  };
86
+ export { DSMenuSelectionGroupWithSchema, SelectionGroup };
86
87
  export default SelectionGroup;
87
- export { DSMenuSelectionGroupWithSchema };
@@ -11,6 +11,7 @@ declare const MenuSeparator: {
11
11
  defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
12
12
  deprecated: import("react-desc").PropTypesDescValidator;
13
13
  };
14
+ /** toggle separator on and off */
14
15
  isRequired: import("react-desc").PropTypesDescValue;
15
16
  };
16
17
  /** toggle separator on and off */
@@ -27,5 +28,5 @@ declare const DSMenuSeparatorWithSchema: {
27
28
  propTypes: unknown;
28
29
  toTypescript: () => import("react-desc").TypescriptSchema;
29
30
  };
31
+ export { DSMenuSeparatorWithSchema, MenuSeparator };
30
32
  export default MenuSeparator;
31
- export { DSMenuSeparatorWithSchema };
@@ -1,21 +1,21 @@
1
1
  /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
2
  /// <reference types="react" />
3
- declare function SubMenu({ noAddon, leftAddon, label, interactionType, children: subitems, rightAddonType, disabledAddonInactive, checkableProps, customRenderer, onClick, closeMenu, id, }: {
4
- noAddon: any;
5
- leftAddon?: undefined;
6
- label?: undefined;
7
- interactionType?: string | undefined;
8
- children: any;
9
- rightAddonType: any;
10
- disabledAddonInactive: any;
11
- checkableProps?: {} | undefined;
12
- customRenderer: any;
13
- onClick: any;
14
- closeMenu: any;
15
- id: any;
16
- }): JSX.Element;
17
- declare namespace SubMenu {
18
- var propTypes: {
3
+ declare const SubMenu: {
4
+ ({ noAddon, leftAddon, label, interactionType, children: subitems, rightAddonType, disabledAddonInactive, checkableProps, customRenderer, onClick, closeMenu, id, }: {
5
+ noAddon: any;
6
+ leftAddon?: undefined;
7
+ label?: undefined;
8
+ interactionType?: string | undefined;
9
+ children: any;
10
+ rightAddonType: any;
11
+ disabledAddonInactive: any;
12
+ checkableProps?: {} | undefined;
13
+ customRenderer: any;
14
+ onClick: any;
15
+ closeMenu: any;
16
+ id: any;
17
+ }): JSX.Element;
18
+ propTypes: {
19
19
  /** dont show addon for submenu */
20
20
  noAddon: {
21
21
  defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
@@ -99,11 +99,11 @@ declare namespace SubMenu {
99
99
  isRequired: import("react-desc").PropTypesDescValue;
100
100
  };
101
101
  };
102
- }
102
+ };
103
103
  declare const DSSubMenuWithSchema: {
104
104
  (props?: unknown): JSX.Element;
105
105
  propTypes: unknown;
106
106
  toTypescript: () => import("react-desc").TypescriptSchema;
107
107
  };
108
+ export { DSSubMenuWithSchema, SubMenu };
108
109
  export default SubMenu;
109
- export { DSSubMenuWithSchema };
@@ -0,0 +1,2 @@
1
+ export declare const menuItemFactory: (type: string | undefined, items: any, defaultItem?: any) => any;
2
+ export declare const registerMenuItem: (type: any, item: any) => any;
@@ -0,0 +1 @@
1
+ export declare const renderMenuItems: (options: any, factory?: (type: string | undefined, items: any, defaultItem?: any) => any) => any;
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
- export default function VirtualMenuList({ items, itemHeight, amountItemsInWindow, width, height, }: {
2
+ declare function VirtualMenuList({ items, itemHeight, amountItemsInWindow, width, height, }: {
3
3
  items: any;
4
4
  itemHeight?: number | undefined;
5
5
  amountItemsInWindow?: number | undefined;
6
6
  width: any;
7
7
  height: any;
8
8
  }): JSX.Element;
9
+ export { VirtualMenuList };
10
+ export default VirtualMenuList;
@@ -1,4 +1,3 @@
1
- export * from './Menu';
2
1
  export { DSMenuItemWithSchema } from './MenuItems/MenuItem';
3
2
  export { DSSubMenuWithSchema } from './MenuItems/SubMenu';
4
3
  export { DSMenuCheckboxGroupWithSchema } from './MenuItems/CheckboxGroup';
@@ -10,4 +9,6 @@ export { DSMenuSearchableListWithSchema } from './MenuItems/SearchableList';
10
9
  export { DSMenuSeparatorWithSchema } from './MenuItems/Separator';
11
10
  export { DSMenuSelectionGroupWithSchema } from './MenuItems/SelectionGroup';
12
11
  export { default as MenuCombobox } from './MenuCombobox';
13
- export { default } from './Menu';
12
+ export { menuItemFactory } from './MenuItems/menuItemFactory';
13
+ export { renderMenuItems } from './MenuItems/renderMenuItems';
14
+ export { DSMenuWithSchema, Menu, Menu as default } from './Menu';
File without changes
File without changes
@@ -0,0 +1,7 @@
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;