@elliemae/ds-menu 1.60.0 → 2.0.0-alpha.12

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 (114) hide show
  1. package/cjs/Menu.js +191 -39
  2. package/cjs/MenuCombobox.js +38 -80
  3. package/cjs/MenuContext.js +1 -2
  4. package/cjs/MenuItems/CheckboxGroup.js +17 -10
  5. package/cjs/MenuItems/MenuItem.js +199 -36
  6. package/cjs/MenuItems/MenuItemCheckable.js +114 -35
  7. package/cjs/MenuItems/MenuItemCheckbox.js +39 -34
  8. package/cjs/MenuItems/MenuItemRadio.js +36 -35
  9. package/cjs/MenuItems/RadioGroup.js +17 -10
  10. package/cjs/MenuItems/SearchableGroup.js +49 -57
  11. package/cjs/MenuItems/SearchableList.js +35 -51
  12. package/cjs/MenuItems/SelectionGroup.js +103 -36
  13. package/cjs/MenuItems/Separator.js +17 -16
  14. package/cjs/MenuItems/SubMenu.js +199 -36
  15. package/cjs/MenuItems/menuItemFactory.js +67 -36
  16. package/cjs/VirtualMenuList.js +27 -23
  17. package/cjs/index.js +27 -48
  18. package/cjs/utils/useHeightByAmountOfItems.js +8 -9
  19. package/esm/Menu.js +180 -31
  20. package/esm/MenuCombobox.js +33 -74
  21. package/esm/MenuContext.js +0 -1
  22. package/esm/MenuItems/CheckboxGroup.js +15 -7
  23. package/esm/MenuItems/MenuItem.js +191 -31
  24. package/esm/MenuItems/MenuItemCheckable.js +107 -30
  25. package/esm/MenuItems/MenuItemCheckbox.js +33 -30
  26. package/esm/MenuItems/MenuItemRadio.js +31 -30
  27. package/esm/MenuItems/RadioGroup.js +15 -7
  28. package/esm/MenuItems/SearchableGroup.js +48 -55
  29. package/esm/MenuItems/SearchableList.js +34 -47
  30. package/esm/MenuItems/SelectionGroup.js +97 -31
  31. package/esm/MenuItems/Separator.js +14 -13
  32. package/esm/MenuItems/SubMenu.js +190 -31
  33. package/esm/MenuItems/menuItemFactory.js +62 -31
  34. package/esm/VirtualMenuList.js +25 -21
  35. package/esm/index.js +7 -28
  36. package/esm/utils/useHeightByAmountOfItems.js +8 -9
  37. package/package.json +109 -21
  38. package/types/Menu.d.ts +28 -0
  39. package/types/MenuCombobox.d.ts +28 -0
  40. package/types/MenuContext.d.ts +3 -0
  41. package/types/MenuItems/CheckboxGroup.d.ts +32 -0
  42. package/types/MenuItems/MenuItem.d.ts +79 -0
  43. package/types/MenuItems/MenuItemCheckable.d.ts +86 -0
  44. package/types/MenuItems/MenuItemCheckbox.d.ts +6 -0
  45. package/types/MenuItems/MenuItemRadio.d.ts +37 -0
  46. package/types/MenuItems/RadioGroup.d.ts +26 -0
  47. package/types/MenuItems/SearchableGroup.d.ts +18 -0
  48. package/types/MenuItems/SearchableList.d.ts +106 -0
  49. package/types/MenuItems/SelectionGroup.d.ts +98 -0
  50. package/types/MenuItems/Separator.d.ts +34 -0
  51. package/types/MenuItems/SubMenu.d.ts +122 -0
  52. package/types/MenuItems/menuItemFactory.d.ts +3 -0
  53. package/types/VirtualMenuList.d.ts +8 -0
  54. package/types/index.d.ts +13 -0
  55. package/types/tests/Menu.test.d.ts +1 -0
  56. package/types/tests/MenuItem.test.d.ts +1 -0
  57. package/types/utils/useHeightByAmountOfItems.d.ts +5 -0
  58. package/Menu/package.json +0 -10
  59. package/MenuCombobox/package.json +0 -10
  60. package/MenuContext/package.json +0 -10
  61. package/MenuItems/CheckboxGroup/package.json +0 -10
  62. package/MenuItems/MenuItem/package.json +0 -10
  63. package/MenuItems/MenuItemCheckable/package.json +0 -10
  64. package/MenuItems/MenuItemCheckbox/package.json +0 -10
  65. package/MenuItems/MenuItemRadio/package.json +0 -10
  66. package/MenuItems/RadioGroup/package.json +0 -10
  67. package/MenuItems/SearchableGroup/package.json +0 -10
  68. package/MenuItems/SearchableList/package.json +0 -10
  69. package/MenuItems/SelectionGroup/package.json +0 -10
  70. package/MenuItems/Separator/package.json +0 -10
  71. package/MenuItems/SubMenu/package.json +0 -10
  72. package/MenuItems/menuItemFactory/package.json +0 -10
  73. package/VirtualMenuList/package.json +0 -10
  74. package/cjs/Menu.js.map +0 -1
  75. package/cjs/MenuCombobox.js.map +0 -1
  76. package/cjs/MenuContext.js.map +0 -1
  77. package/cjs/MenuItems/CheckboxGroup.js.map +0 -1
  78. package/cjs/MenuItems/MenuItem.js.map +0 -1
  79. package/cjs/MenuItems/MenuItemCheckable.js.map +0 -1
  80. package/cjs/MenuItems/MenuItemCheckbox.js.map +0 -1
  81. package/cjs/MenuItems/MenuItemRadio.js.map +0 -1
  82. package/cjs/MenuItems/RadioGroup.js.map +0 -1
  83. package/cjs/MenuItems/SearchableGroup.js.map +0 -1
  84. package/cjs/MenuItems/SearchableList.js.map +0 -1
  85. package/cjs/MenuItems/SelectionGroup.js.map +0 -1
  86. package/cjs/MenuItems/Separator.js.map +0 -1
  87. package/cjs/MenuItems/SubMenu.js.map +0 -1
  88. package/cjs/MenuItems/menuItemFactory.js.map +0 -1
  89. package/cjs/SubMenu-22be0a18.js +0 -806
  90. package/cjs/SubMenu-22be0a18.js.map +0 -1
  91. package/cjs/VirtualMenuList.js.map +0 -1
  92. package/cjs/index.js.map +0 -1
  93. package/cjs/utils/useHeightByAmountOfItems.js.map +0 -1
  94. package/esm/Menu.js.map +0 -1
  95. package/esm/MenuCombobox.js.map +0 -1
  96. package/esm/MenuContext.js.map +0 -1
  97. package/esm/MenuItems/CheckboxGroup.js.map +0 -1
  98. package/esm/MenuItems/MenuItem.js.map +0 -1
  99. package/esm/MenuItems/MenuItemCheckable.js.map +0 -1
  100. package/esm/MenuItems/MenuItemCheckbox.js.map +0 -1
  101. package/esm/MenuItems/MenuItemRadio.js.map +0 -1
  102. package/esm/MenuItems/RadioGroup.js.map +0 -1
  103. package/esm/MenuItems/SearchableGroup.js.map +0 -1
  104. package/esm/MenuItems/SearchableList.js.map +0 -1
  105. package/esm/MenuItems/SelectionGroup.js.map +0 -1
  106. package/esm/MenuItems/Separator.js.map +0 -1
  107. package/esm/MenuItems/SubMenu.js.map +0 -1
  108. package/esm/MenuItems/menuItemFactory.js.map +0 -1
  109. package/esm/SubMenu-a25e69ec.js +0 -778
  110. package/esm/SubMenu-a25e69ec.js.map +0 -1
  111. package/esm/VirtualMenuList.js.map +0 -1
  112. package/esm/index.js.map +0 -1
  113. package/esm/utils/useHeightByAmountOfItems.js.map +0 -1
  114. package/utils/useHeightByAmountOfItems/package.json +0 -10
@@ -0,0 +1,98 @@
1
+ /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
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: {
17
+ /** toggle on multi select */
18
+ multi: {
19
+ defaultValue<T = unknown>(arg: T): {
20
+ deprecated: import("react-desc").PropTypesDescValidator;
21
+ };
22
+ isRequired: import("react-desc").PropTypesDescValidator;
23
+ };
24
+ /** toggle on searchable behavior */
25
+ searchable: {
26
+ defaultValue<T = unknown>(arg: T): {
27
+ deprecated: import("react-desc").PropTypesDescValidator;
28
+ };
29
+ isRequired: import("react-desc").PropTypesDescValidator;
30
+ };
31
+ /** toggle to focus component on open */
32
+ focusOnOpen: {
33
+ defaultValue<T = unknown>(arg: T): {
34
+ deprecated: import("react-desc").PropTypesDescValidator;
35
+ };
36
+ isRequired: import("react-desc").PropTypesDescValidator;
37
+ };
38
+ /** callback that triggers when select happens */
39
+ onSelect: {
40
+ defaultValue<T = unknown>(arg: T): {
41
+ deprecated: import("react-desc").PropTypesDescValidator;
42
+ };
43
+ isRequired: import("react-desc").PropTypesDescValidator;
44
+ };
45
+ children: {
46
+ defaultValue<T = unknown>(arg: T): {
47
+ deprecated: import("react-desc").PropTypesDescValidator;
48
+ };
49
+ isRequired: import("react-desc").PropTypesDescValidator;
50
+ };
51
+ /** selection group items */
52
+ items: {
53
+ defaultValue<T = unknown>(arg: T): {
54
+ deprecated: import("react-desc").PropTypesDescValidator;
55
+ };
56
+ isRequired: import("react-desc").PropTypesDescValidator;
57
+ };
58
+ /** array of values for multi and string for single selection */
59
+ active: {
60
+ defaultValue<T = unknown>(arg: T): {
61
+ deprecated: import("react-desc").PropTypesDescValidator;
62
+ };
63
+ isRequired: import("react-desc").PropTypesDescValidator;
64
+ };
65
+ /** selection group width */
66
+ width: {
67
+ defaultValue<T = unknown>(arg: T): {
68
+ deprecated: import("react-desc").PropTypesDescValidator;
69
+ };
70
+ isRequired: import("react-desc").PropTypesDescValidator;
71
+ };
72
+ /** selection group height */
73
+ height: {
74
+ defaultValue<T = unknown>(arg: T): {
75
+ deprecated: import("react-desc").PropTypesDescValidator;
76
+ };
77
+ isRequired: import("react-desc").PropTypesDescValidator;
78
+ };
79
+ };
80
+ }
81
+ declare const DSMenuSelectionGroupWithSchema: {
82
+ (props?: {
83
+ multi?: boolean | undefined;
84
+ searchable?: boolean | undefined;
85
+ focusOnOpen?: boolean | undefined;
86
+ onSelect?: (() => null) | undefined;
87
+ children: any;
88
+ items?: undefined;
89
+ active?: string | never[] | undefined;
90
+ width: any;
91
+ height: any;
92
+ maxOptions?: number | undefined;
93
+ } | undefined): JSX.Element;
94
+ propTypes: unknown;
95
+ toTypescript: () => import("react-desc").TypescriptSchema;
96
+ };
97
+ export default SelectionGroup;
98
+ export { DSMenuSelectionGroupWithSchema };
@@ -0,0 +1,34 @@
1
+ /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
+ /// <reference types="react" />
3
+ declare const MenuSeparator: {
4
+ ({ title, showSeparator }: {
5
+ title: any;
6
+ showSeparator?: boolean | undefined;
7
+ }): JSX.Element;
8
+ propTypes: {
9
+ /** menu separator h5 title */
10
+ title: {
11
+ defaultValue<T = unknown>(arg: T): {
12
+ deprecated: import("react-desc").PropTypesDescValidator;
13
+ };
14
+ isRequired: import("react-desc").PropTypesDescValidator;
15
+ };
16
+ /** toggle separator on and off */
17
+ showSeparator: {
18
+ defaultValue<T = unknown>(arg: T): {
19
+ deprecated: import("react-desc").PropTypesDescValidator;
20
+ };
21
+ isRequired: import("react-desc").PropTypesDescValidator;
22
+ };
23
+ };
24
+ };
25
+ declare const DSMenuSeparatorWithSchema: {
26
+ (props?: {
27
+ title: any;
28
+ showSeparator?: boolean | undefined;
29
+ } | undefined): JSX.Element;
30
+ propTypes: unknown;
31
+ toTypescript: () => import("react-desc").TypescriptSchema;
32
+ };
33
+ export default MenuSeparator;
34
+ export { DSMenuSeparatorWithSchema };
@@ -0,0 +1,122 @@
1
+ /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
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: {
19
+ /** dont show addon for submenu */
20
+ noAddon: {
21
+ defaultValue<T = unknown>(arg: T): {
22
+ deprecated: import("react-desc").PropTypesDescValidator;
23
+ };
24
+ isRequired: import("react-desc").PropTypesDescValidator;
25
+ };
26
+ /** left addon */
27
+ leftAddon: {
28
+ defaultValue<T = unknown>(arg: T): {
29
+ deprecated: import("react-desc").PropTypesDescValidator;
30
+ };
31
+ isRequired: import("react-desc").PropTypesDescValidator;
32
+ };
33
+ /** submenu label */
34
+ label: {
35
+ defaultValue<T = unknown>(arg: T): {
36
+ deprecated: import("react-desc").PropTypesDescValidator;
37
+ };
38
+ isRequired: import("react-desc").PropTypesDescValidator;
39
+ };
40
+ /** A type indicating how to open/close the tooltip */
41
+ interactionType: {
42
+ defaultValue<T = unknown>(arg: T): {
43
+ deprecated: import("react-desc").PropTypesDescValidator;
44
+ };
45
+ isRequired: import("react-desc").PropTypesDescValidator;
46
+ };
47
+ /** sub menu items */
48
+ children: {
49
+ defaultValue<T = unknown>(arg: T): {
50
+ deprecated: import("react-desc").PropTypesDescValidator;
51
+ };
52
+ isRequired: import("react-desc").PropTypesDescValidator;
53
+ };
54
+ /** right addon, ellipsis or undefined */
55
+ rightAddonType: {
56
+ defaultValue<T = unknown>(arg: T): {
57
+ deprecated: import("react-desc").PropTypesDescValidator;
58
+ };
59
+ isRequired: import("react-desc").PropTypesDescValidator;
60
+ };
61
+ disabledAddonInactive: {
62
+ defaultValue<T = unknown>(arg: T): {
63
+ deprecated: import("react-desc").PropTypesDescValidator;
64
+ };
65
+ isRequired: import("react-desc").PropTypesDescValidator;
66
+ };
67
+ /** props passed to MenuItem component */
68
+ checkableProps: {
69
+ defaultValue<T = unknown>(arg: T): {
70
+ deprecated: import("react-desc").PropTypesDescValidator;
71
+ };
72
+ isRequired: import("react-desc").PropTypesDescValidator;
73
+ };
74
+ /** custom renderer for menu item */
75
+ customRenderer: {
76
+ defaultValue<T = unknown>(arg: T): {
77
+ deprecated: import("react-desc").PropTypesDescValidator;
78
+ };
79
+ isRequired: import("react-desc").PropTypesDescValidator;
80
+ };
81
+ /** on click handler */
82
+ onClick: {
83
+ defaultValue<T = unknown>(arg: T): {
84
+ deprecated: import("react-desc").PropTypesDescValidator;
85
+ };
86
+ isRequired: import("react-desc").PropTypesDescValidator;
87
+ };
88
+ closeMenu: {
89
+ defaultValue<T = unknown>(arg: T): {
90
+ deprecated: import("react-desc").PropTypesDescValidator;
91
+ };
92
+ isRequired: import("react-desc").PropTypesDescValidator;
93
+ };
94
+ /** component id */
95
+ id: {
96
+ defaultValue<T = unknown>(arg: T): {
97
+ deprecated: import("react-desc").PropTypesDescValidator;
98
+ };
99
+ isRequired: import("react-desc").PropTypesDescValidator;
100
+ };
101
+ };
102
+ }
103
+ declare const DSSubMenuWithSchema: {
104
+ (props?: {
105
+ noAddon: any;
106
+ leftAddon?: undefined;
107
+ label?: undefined;
108
+ interactionType?: string | undefined;
109
+ children: any;
110
+ rightAddonType: any;
111
+ disabledAddonInactive: any;
112
+ checkableProps?: {} | undefined;
113
+ customRenderer: any;
114
+ onClick: any;
115
+ closeMenu: any;
116
+ id: any;
117
+ } | undefined): JSX.Element;
118
+ propTypes: unknown;
119
+ toTypescript: () => import("react-desc").TypescriptSchema;
120
+ };
121
+ export default SubMenu;
122
+ export { DSSubMenuWithSchema };
@@ -0,0 +1,3 @@
1
+ import MenuItem from './MenuItem';
2
+ export declare function menuItemFactory(type: string | undefined, items: any, defaultItem?: typeof MenuItem): any;
3
+ export declare function renderMenuItems(options: any, factory?: typeof menuItemFactory): any;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export default function VirtualMenuList({ items, itemHeight, amountItemsInWindow, width, height, }: {
3
+ items: any;
4
+ itemHeight?: number | undefined;
5
+ amountItemsInWindow?: number | undefined;
6
+ width: any;
7
+ height: any;
8
+ }): JSX.Element;
@@ -0,0 +1,13 @@
1
+ export * from './Menu';
2
+ export { DSMenuItemWithSchema } from './MenuItems/MenuItem';
3
+ export { DSSubMenuWithSchema } from './MenuItems/SubMenu';
4
+ export { DSMenuCheckboxGroupWithSchema } from './MenuItems/CheckboxGroup';
5
+ export { DSMenuItemCheckeableWithSchema } from './MenuItems/MenuItemCheckable';
6
+ export { DSMenuItemRadioWithSchema } from './MenuItems/MenuItemRadio';
7
+ export { DSMenuRadioGroupWithSchema } from './MenuItems/RadioGroup';
8
+ export { DSMenuSearchableGroupWithSchema } from './MenuItems/SearchableGroup';
9
+ export { DSMenuSearchableListWithSchema } from './MenuItems/SearchableList';
10
+ export { DSMenuSeparatorWithSchema } from './MenuItems/Separator';
11
+ export { DSMenuSelectionGroupWithSchema } from './MenuItems/SelectionGroup';
12
+ export { default as MenuCombobox } from './MenuCombobox';
13
+ export { default } from './Menu';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export default function useHeightByAmountOfItems({ itemHeight, amountItems, items, }: {
2
+ itemHeight: any;
3
+ amountItems: any;
4
+ items: any;
5
+ }): number;
package/Menu/package.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/Menu",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/Menu.js",
9
- "module": "../esm/Menu.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuCombobox",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/MenuCombobox.js",
9
- "module": "../esm/MenuCombobox.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuContext",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/MenuContext.js",
9
- "module": "../esm/MenuContext.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/CheckboxGroup",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/CheckboxGroup.js",
9
- "module": "../../esm/MenuItems/CheckboxGroup.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/MenuItem",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/MenuItem.js",
9
- "module": "../../esm/MenuItems/MenuItem.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/MenuItemCheckable",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/MenuItemCheckable.js",
9
- "module": "../../esm/MenuItems/MenuItemCheckable.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/MenuItemCheckbox",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/MenuItemCheckbox.js",
9
- "module": "../../esm/MenuItems/MenuItemCheckbox.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/MenuItemRadio",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/MenuItemRadio.js",
9
- "module": "../../esm/MenuItems/MenuItemRadio.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/RadioGroup",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/RadioGroup.js",
9
- "module": "../../esm/MenuItems/RadioGroup.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/SearchableGroup",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/SearchableGroup.js",
9
- "module": "../../esm/MenuItems/SearchableGroup.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/SearchableList",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/SearchableList.js",
9
- "module": "../../esm/MenuItems/SearchableList.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/SelectionGroup",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/SelectionGroup.js",
9
- "module": "../../esm/MenuItems/SelectionGroup.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/Separator",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/Separator.js",
9
- "module": "../../esm/MenuItems/Separator.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/SubMenu",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/SubMenu.js",
9
- "module": "../../esm/MenuItems/SubMenu.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/MenuItems/menuItemFactory",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/MenuItems/menuItemFactory.js",
9
- "module": "../../esm/MenuItems/menuItemFactory.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-menu/VirtualMenuList",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/VirtualMenuList.js",
9
- "module": "../esm/VirtualMenuList.js"
10
- }
package/cjs/Menu.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Menu.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuCombobox.js","sources":["../../src/MenuCombobox.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport SearchableList from './MenuItems/SearchableList';\nimport Menu from './Menu';\n\nfunction MenuCombobox({\n dropdownFilterOptions = {},\n options = [],\n onSelectMenuItem = () => null,\n innerRef,\n maxOptions = 10,\n loading = false,\n ...rest\n}) {\n return (\n <Menu\n {...rest}\n classProps={{ menuComboBox: true }}\n innerRef={innerRef}\n visible\n >\n <SearchableList\n appendTermInList\n extraListProps={dropdownFilterOptions}\n items={options}\n onSelectMenuItem={onSelectMenuItem}\n maxOptions={maxOptions}\n loading={loading}\n />\n </Menu>\n );\n}\n\nMenuCombobox.propTypes = {\n /** Options */\n dropdownFilterOptions: PropTypes.shape({}),\n /** The option or menu items to render */\n options: PropTypes.arrayOf(PropTypes.object),\n /** Handler when a menu item is selected */\n onSelectMenuItem: PropTypes.func,\n /** Internal ref */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n /** Max options to display in the list */\n maxOptions: PropTypes.number,\n /** Is loading */\n loading: PropTypes.bool,\n};\n\nexport default MenuCombobox;\n"],"names":["MenuCombobox","dropdownFilterOptions","options","onSelectMenuItem","innerRef","maxOptions","loading","rest","React","Menu","menuComboBox","SearchableList","propTypes","PropTypes","shape","arrayOf","object","func","oneOfType","number","bool"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,SAASA,YAAT,OAQG;AAAA,mCAPDC,qBAOC;AAAA,MAPDA,qBAOC,sCAPuB,EAOvB;AAAA,0BANDC,OAMC;AAAA,MANDA,OAMC,6BANS,EAMT;AAAA,mCALDC,gBAKC;AAAA,MALDA,gBAKC,sCALkB;AAAA,WAAM,IAAN;AAAA,GAKlB;AAAA,MAJDC,QAIC,QAJDA,QAIC;AAAA,6BAHDC,UAGC;AAAA,MAHDA,UAGC,gCAHY,EAGZ;AAAA,0BAFDC,OAEC;AAAA,MAFDA,OAEC,6BAFS,KAET;AAAA,MADEC,IACF;;AACD,sBACEC,wCAACC,6BAAD,mCACMF,IADN;AAEE,IAAA,UAAU,EAAE;AAAEG,MAAAA,YAAY,EAAE;AAAhB,KAFd;AAGE,IAAA,QAAQ,EAAEN,QAHZ;AAIE,IAAA,OAAO;AAJT,mBAMEI,wCAACG,mCAAD;AACE,IAAA,gBAAgB,MADlB;AAEE,IAAA,cAAc,EAAEV,qBAFlB;AAGE,IAAA,KAAK,EAAEC,OAHT;AAIE,IAAA,gBAAgB,EAAEC,gBAJpB;AAKE,IAAA,UAAU,EAAEE,UALd;AAME,IAAA,OAAO,EAAEC;AANX,IANF,CADF;AAiBD;;AAEDN,YAAY,CAACY,SAAb,GAAyB;AACvB;AACAX,EAAAA,qBAAqB,EAAEY,6BAAS,CAACC,KAAV,CAAgB,EAAhB,CAFA;;AAGvB;AACAZ,EAAAA,OAAO,EAAEW,6BAAS,CAACE,OAAV,CAAkBF,6BAAS,CAACG,MAA5B,CAJc;;AAKvB;AACAb,EAAAA,gBAAgB,EAAEU,6BAAS,CAACI,IANL;;AAOvB;AACAb,EAAAA,QAAQ,EAAES,6BAAS,CAACK,SAAV,CAAoB,CAACL,6BAAS,CAACI,IAAX,EAAiBJ,6BAAS,CAACG,MAA3B,CAApB,CARa;;AASvB;AACAX,EAAAA,UAAU,EAAEQ,6BAAS,CAACM,MAVC;;AAWvB;AACAb,EAAAA,OAAO,EAAEO,6BAAS,CAACO;AAZI,CAAzB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuContext.js","sources":["../../src/MenuContext.tsx"],"sourcesContent":["import React from 'react';\n\nexport default React.createContext();\n"],"names":["React","createContext"],"mappings":";;;;;;;;AAEA,+BAAeA,yBAAK,CAACC,aAAN,EAAf;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckboxGroup.js","sources":["../../../src/MenuItems/CheckboxGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport CheckableGroup from '@elliemae/ds-shared/CheckableGroup';\n\nfunction CheckboxGroup(props) {\n return <CheckableGroup {...props} multi />;\n}\n\nconst props = {\n /* The item (if multi false) or items (if multi true) selected */\n active: PropTypes.arrayOf(PropTypes.string).description(\n 'The item (if multi false) or items (if multi true) selected',\n ),\n /* Whether is multi select or not */\n multi: PropTypes.bool.description('Whether is multi select or not'),\n /* Handler when a user checks an item */\n onCheck: PropTypes.func.description('Handler when a user checks an item'),\n};\n\nCheckboxGroup.propTypes = props;\n\nconst DSMenuCheckboxGroupWithSchema = describe(CheckboxGroup);\nDSMenuCheckboxGroupWithSchema.propTypes = props;\n\nexport default CheckboxGroup;\n\nexport { DSMenuCheckboxGroupWithSchema };\n"],"names":["CheckboxGroup","props","React","CheckableGroup","active","PropTypes","arrayOf","string","description","multi","bool","onCheck","func","propTypes","DSMenuCheckboxGroupWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;AAIA,SAASA,aAAT,CAAuBC,KAAvB,EAA8B;AAC5B,sBAAOC,wCAACC,kCAAD,mCAAoBF,KAApB;AAA2B,IAAA,KAAK;AAAhC,KAAP;AACD;;AAED,IAAMA,KAAK,GAAG;AACZ;AACAG,EAAAA,MAAM,EAAEC,mBAAS,CAACC,OAAV,CAAkBD,mBAAS,CAACE,MAA5B,EAAoCC,WAApC,CACN,6DADM,CAFI;;AAKZ;AACAC,EAAAA,KAAK,EAAEJ,mBAAS,CAACK,IAAV,CAAeF,WAAf,CAA2B,gCAA3B,CANK;;AAOZ;AACAG,EAAAA,OAAO,EAAEN,mBAAS,CAACO,IAAV,CAAeJ,WAAf,CAA2B,oCAA3B;AARG,CAAd;AAWAR,aAAa,CAACa,SAAd,GAA0BZ,KAA1B;IAEMa,6BAA6B,GAAGC,kBAAQ,CAACf,aAAD;AAC9Cc,6BAA6B,CAACD,SAA9B,GAA0CZ,KAA1C;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuItemCheckable.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuItemCheckbox.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuItemRadio.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioGroup.js","sources":["../../../src/MenuItems/RadioGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport CheckableGroup from '@elliemae/ds-shared/CheckableGroup';\n\nfunction RadioGroup(props) {\n return <CheckableGroup {...props} multi={false} />;\n}\n\nconst props = {\n /* The item selected */\n active: PropTypes.arrayOf(PropTypes.string).description('the item selected'),\n /* Handler when a user checks an item */\n onCheck: PropTypes.func.description('Handler when a user checks an item'),\n};\n\nRadioGroup.propTypes = props;\n\nconst DSMenuRadioGroupWithSchema = describe(RadioGroup);\n\nDSMenuRadioGroupWithSchema.propTypes = props;\n\nexport default RadioGroup;\n\nexport { DSMenuRadioGroupWithSchema };\n"],"names":["RadioGroup","props","React","CheckableGroup","active","PropTypes","arrayOf","string","description","onCheck","func","propTypes","DSMenuRadioGroupWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;AAIA,SAASA,UAAT,CAAoBC,KAApB,EAA2B;AACzB,sBAAOC,wCAACC,kCAAD,mCAAoBF,KAApB;AAA2B,IAAA,KAAK,EAAE;AAAlC,KAAP;AACD;;AAED,IAAMA,KAAK,GAAG;AACZ;AACAG,EAAAA,MAAM,EAAEC,mBAAS,CAACC,OAAV,CAAkBD,mBAAS,CAACE,MAA5B,EAAoCC,WAApC,CAAgD,mBAAhD,CAFI;;AAGZ;AACAC,EAAAA,OAAO,EAAEJ,mBAAS,CAACK,IAAV,CAAeF,WAAf,CAA2B,oCAA3B;AAJG,CAAd;AAOAR,UAAU,CAACW,SAAX,GAAuBV,KAAvB;IAEMW,0BAA0B,GAAGC,kBAAQ,CAACb,UAAD;AAE3CY,0BAA0B,CAACD,SAA3B,GAAuCV,KAAvC;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchableGroup.js","sources":["../../../src/MenuItems/SearchableGroup.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useState, useRef, useContext } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { focusGroupManagerHoc } from '@elliemae/ds-shared/FocusGroup';\nimport DSSearchBox from '@elliemae/ds-form/SearchBox';\nimport { PropTypes, describe } from 'react-desc';\nimport VirtualMenuList from '../VirtualMenuList';\nimport MenuContext from '../MenuContext';\n\nconst SearchBoxWrapper = aggregatedClasses('div')(\n 'menu-search-group',\n 'search-wrapper',\n);\nconst NoOptionsWrapper = aggregatedClasses('div')(\n 'menu-search-group',\n 'no-options',\n);\n\nfunction SearchableGroup({\n children,\n amountItemsInWindow = 5,\n searchTerm: searchTermProp = '',\n noOptionsText = 'No options',\n height,\n width,\n focusOnOpen = false,\n}) {\n const searchRef = useRef(null);\n const [searchTerm, setSearchTerm] = useState(searchTermProp);\n\n useEffect(() => {\n if (searchRef.current) searchRef.current.focus();\n }, []);\n\n const { visible } = useContext(MenuContext) || {};\n\n useEffect(() => {\n if (focusOnOpen && visible) {\n setTimeout(() => {\n if (searchRef.current) searchRef.current.focus();\n }, 0);\n }\n }, [focusOnOpen, visible]);\n\n const filteredChildren = useMemo(\n () =>\n children.filter(\n (child) =>\n !searchTerm ||\n child.props.label.toLowerCase().startsWith(searchTerm.toLowerCase()),\n ),\n [children, searchTerm],\n );\n\n return (\n <>\n <SearchBoxWrapper>\n <DSSearchBox\n innerRef={searchRef}\n onSearch={({ value }) => setSearchTerm(value)}\n searchOnEnter={false}\n showIcon={false}\n value={searchTerm}\n />\n </SearchBoxWrapper>\n {!filteredChildren.length && (\n <NoOptionsWrapper>{noOptionsText}</NoOptionsWrapper>\n )}\n <VirtualMenuList\n amountItemsInWindow={amountItemsInWindow}\n height={height}\n items={filteredChildren}\n width={width}\n />\n </>\n );\n}\n\nconst props = {\n /** The amount of items that are going to be rendered in the group */\n amountItemsInWindow: PropTypes.number.description(\n 'The amount of items that are going to be rendered in the group',\n ),\n /** A search term */\n searchTerm: PropTypes.string.description('A search term'),\n /** Text to show when there's no options to show */\n noOptionsText: PropTypes.string.description(\n \"Text to show when there's no options to show\",\n ),\n /** array of children for search list */\n children: PropTypes.array.description('array of children for search list'),\n /** height for virtual list wrapper */\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'height for virtual list wrapper',\n ),\n /** width for virtual list wrapper */\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'width for virtual list wrapper',\n ),\n /** weather to focus on searchable group on open */\n focusOnOpen: PropTypes.bool.description(\n 'weather to focus on searchable group on open',\n ),\n};\n\nSearchableGroup.propTypes = props;\n\nconst DSMenuSearchableGroupWithSchema = describe(SearchableGroup);\nDSMenuSearchableGroupWithSchema.propTypes = props;\n\nexport default focusGroupManagerHoc(SearchableGroup);\n\nexport { DSMenuSearchableGroupWithSchema };\n"],"names":["SearchBoxWrapper","aggregatedClasses","NoOptionsWrapper","SearchableGroup","children","amountItemsInWindow","searchTerm","searchTermProp","noOptionsText","height","width","focusOnOpen","searchRef","useRef","useState","setSearchTerm","useEffect","current","focus","useContext","MenuContext","visible","setTimeout","filteredChildren","useMemo","filter","child","props","label","toLowerCase","startsWith","React","DSSearchBox","value","length","PropTypes","number","description","string","array","oneOfType","bool","propTypes","DSMenuSearchableGroupWithSchema","describe","focusGroupManagerHoc"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,gBAAgB,GAAGC,8BAAiB,CAAC,KAAD,CAAjB,CACvB,mBADuB,EAEvB,gBAFuB,CAAzB;AAIA,IAAMC,gBAAgB,GAAGD,8BAAiB,CAAC,KAAD,CAAjB,CACvB,mBADuB,EAEvB,YAFuB,CAAzB;;AA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mBH,mBAAS,CAACC,MAA7B,CAApB,EAA0DC,WAA1D,CACL,gCADK,CAlBK;;AAqBZ;AACA1B,EAAAA,WAAW,EAAEwB,mBAAS,CAACM,IAAV,CAAeJ,WAAf,CACX,8CADW;AAtBD,CAAd;AA2BAlC,eAAe,CAACuC,SAAhB,GAA4Bf,KAA5B;IAEMgB,+BAA+B,GAAGC,kBAAQ,CAACzC,eAAD;AAChDwC,+BAA+B,CAACD,SAAhC,GAA4Cf,KAA5C;AAEA,wBAAekB,+BAAoB,CAAC1C,eAAD,CAAnC;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchableList.js","sources":["../../../src/MenuItems/SearchableList.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { uniqBy } from '@elliemae/ds-utilities';\nimport { DSComboBox } from '@elliemae/ds-form';\n\nconst noop = () => {};\n\nfunction SearchableList({\n onSelectMenuItem = noop,\n components = {},\n searchTerm: searchTermProp = '',\n items = [],\n dropdownFilterOptions = {},\n returnValue,\n extraListProps = {},\n appendTermInList = false,\n maxOptions = 10,\n loading = false,\n}) {\n const [searchTerm, setInputValue] = useState(searchTermProp);\n\n const handleInputChange = useCallback(\n (value, args) => {\n const action = args ? args.action : null;\n if (action === 'input-blur' || action === 'menu-close') return;\n setInputValue(value);\n },\n [searchTerm],\n );\n\n const handleFilterByText = useCallback(() => {\n if (searchTerm) onSelectMenuItem(searchTerm);\n }, [searchTerm]);\n\n const handleKeyDown = useCallback(\n (e) => {\n if (e.key === 'ArrowRight') {\n handleFilterByText();\n }\n },\n [searchTerm],\n );\n\n const options = useMemo(\n () =>\n searchTerm && appendTermInList\n ? uniqBy(\n [\n {\n id: searchTerm,\n label: searchTerm,\n },\n ].concat(items),\n (item) => item.label,\n )\n : items,\n [searchTerm, appendTermInList],\n );\n\n return (\n <DSComboBox\n autoFocus\n components={{ DropdownIndicator: null, ...components }}\n customMenuItemOptions={{\n useTruncatedText: true,\n }}\n inlineMenu\n inputValue={searchTerm}\n menuIsOpen\n onChange={onSelectMenuItem}\n onFilterByInputText={handleFilterByText}\n onInputChange={handleInputChange}\n onKeyDown={handleKeyDown}\n options={options}\n returnValue={returnValue}\n valueProperty=\"id\"\n maxOptions={maxOptions}\n loading={loading}\n {...extraListProps}\n {...dropdownFilterOptions}\n />\n );\n}\n\nconst props = {\n /** callback after item gets selected */\n onSelectMenuItem: PropTypes.func.description('callback after item gets selected'),\n /** Object with custom components for react-select */\n components: PropTypes.shape({}).description('Object with custom components for react-select'),\n /** search term to filter for */\n searchTerm: PropTypes.string.description('search term to filter for'),\n /** item options */\n items: PropTypes.array.description('item options'),\n /** options */\n dropdownFilterOptions: PropTypes.shape({}).description('options'),\n /** Whether the combo box is has value to return or not */\n returnValue: PropTypes.bool.description('Whether the combo box is has value to return or not'),\n /** extra props to pass down to combo */\n extraListProps: PropTypes.shape({}).description('extra props to pass down to combo'),\n /** append search term as item on the list */\n appendTermInList: PropTypes.bool.description('append search term as item on the list'),\n /** maxoptions for combobox */\n maxOptions: PropTypes.number.description('maxoptions for combobox'),\n /** loading flag */\n loading: PropTypes.bool.description('loading flag'),\n};\n\nSearchableList.propTypes = props;\n\nconst DSMenuSearchableListWithSchema = describe(SearchableList);\n\nDSMenuSearchableListWithSchema.propTypes = props;\n\nexport default SearchableList;\nexport { DSMenuSearchableListWithSchema };\n"],"names":["noop","SearchableList","onSelectMenuItem","components","searchTerm","searchTermProp","items","dropdownFilterOptions","returnValue","extraListProps","appendTermInList","maxOptions","loading","useState","setInputValue","handleInputChange","useCallback","value","args","action","handleFilterByText","handleKeyDown","e","key","options","useMemo","uniqBy","id","label","concat","item","React","DSComboBox","DropdownIndicator","useTruncatedText","props","PropTypes","func","description","shape","string","array","bool","number","propTypes","DSMenuSearchableListWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,IAAI,GAAG,SAAPA,IAAO,GAAM,EAAnB;;AAEA,SAASC,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C,mBAAS,CAACI,MAAV,CAAiBF,WAAjB,CAA6B,2BAA7B,CANA;;AAOZ;AACAhC,EAAAA,KAAK,EAAE8B,mBAAS,CAACK,KAAV,CAAgBH,WAAhB,CAA4B,cAA5B,CARK;;AASZ;AACA/B,EAAAA,qBAAqB,EAAE6B,mBAAS,CAACG,KAAV,CAAgB,EAAhB,EAAoBD,WAApB,CAAgC,SAAhC,CAVX;;AAWZ;AACA9B,EAAAA,WAAW,EAAE4B,mBAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,qDAA3B,CAZD;;AAaZ;AACA7B,EAAAA,cAAc,EAAE2B,mBAAS,CAACG,KAAV,CAAgB,EAAhB,EAAoBD,WAApB,CAAgC,mCAAhC,CAdJ;;AAeZ;AACA5B,EAAAA,gBAAgB,EAAE0B,mBAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,wCAA3B,CAhBN;;AAiBZ;AACA3B,EAAAA,UAAU,EAAEyB,mBAAS,CAACO,MAAV,CAAiBL,WAAjB,CAA6B,yBAA7B,CAlBA;;AAmBZ;AACA1B,EAAAA,OAAO,EAAEwB,mBAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,cAA3B;AApBG,CAAd;AAuBArC,cAAc,CAAC2C,SAAf,GAA2BT,KAA3B;IAEMU,8BAA8B,GAAGC,kBAAQ,CAAC7C,cAAD;AAE/C4C,8BAA8B,CAACD,SAA/B,GAA2CT,KAA3C;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectionGroup.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Separator.js","sources":["../../../src/MenuItems/Separator.tsx"],"sourcesContent":["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';\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;\n\nconst DSMenuSeparatorWithSchema = describe(MenuSeparator);\nDSMenuSeparatorWithSchema.propTypes = props;\n\nexport default MenuSeparator;\n\nexport { DSMenuSeparatorWithSchema };\n"],"names":["blockName","Li","styled","li","Title","aggregatedClasses","MenuSeparator","title","showSeparator","React","DSSeparator","props","PropTypes","string","description","bool","propTypes","DSMenuSeparatorWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;AAMA,IAAMA,SAAS,GAAG,gBAAlB;AACA,IAAMC,EAAE,gBAAGC,0BAAM,CAACC,EAAV;AAAA;AAAA,kEAAR;AAMA,IAAMC,KAAK,GAAGC,8BAAiB,CAAC,IAAD,CAAjB,CAAwBL,SAAxB,EAAmC,OAAnC,CAAd;;IACMM,aAAa,GAAG,SAAhBA,aAAgB;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,gCAAUC,aAAV;AAAA,MAAUA,aAAV,mCAA0B,IAA1B;AAAA,sBACpBC,wCAAC,EAAD,QACGD,aAAa,iBAAIC,wCAACC,+BAAD,OADpB,EAEGH,KAAK,iBAAIE,wCAAC,KAAD,QAAQF,KAAR,CAFZ,CADoB;AAAA;;AAOtB,IAAMI,KAAK,GAAG;AACZ;AACAJ,EAAAA,KAAK,EAAEK,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,yBAA7B,CAFK;;AAGZ;AACAN,EAAAA,aAAa,EAAEI,mBAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,6BAA3B;AAJH,CAAd;AAOAR,aAAa,CAACU,SAAd,GAA0BL,KAA1B;IAEMM,yBAAyB,GAAGC,kBAAQ,CAACZ,aAAD;AAC1CW,yBAAyB,CAACD,SAA1B,GAAsCL,KAAtC;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SubMenu.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"menuItemFactory.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}