@elliemae/ds-menu 2.3.0-alpha.8 → 2.3.0-alpha.9
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.
- package/dist/types/Menu.d.ts +13 -0
- package/dist/types/MenuCombobox.d.ts +28 -0
- package/dist/types/MenuContext.d.ts +4 -0
- package/dist/types/MenuExports.d.ts +1 -0
- package/dist/types/MenuItems/CheckboxGroup.d.ts +32 -0
- package/dist/types/MenuItems/MenuItem.d.ts +79 -0
- package/dist/types/MenuItems/MenuItemCheckable.d.ts +78 -0
- package/dist/types/MenuItems/MenuItemCheckbox.d.ts +7 -0
- package/dist/types/MenuItems/MenuItemRadio.d.ts +28 -0
- package/dist/types/MenuItems/RadioGroup.d.ts +26 -0
- package/dist/types/MenuItems/SearchableGroup.d.ts +10 -0
- package/dist/types/MenuItems/SearchableList.d.ts +95 -0
- package/dist/types/MenuItems/SelectionGroup.d.ts +87 -0
- package/dist/types/MenuItems/Separator.d.ts +32 -0
- package/dist/types/MenuItems/SubMenu.d.ts +109 -0
- package/dist/types/MenuItems/menuItemFactory.d.ts +2 -0
- package/dist/types/MenuItems/renderMenuItems.d.ts +1 -0
- package/dist/types/VirtualMenuList.d.ts +10 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/tests/Menu.test.d.ts +1 -0
- package/dist/types/tests/MenuItem.test.d.ts +1 -0
- package/dist/types/utils/useHeightByAmountOfItems.d.ts +7 -0
- package/package.json +11 -11
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { menuItemFactory } from './MenuItems/menuItemFactory';
|
|
4
|
+
import { renderMenuItems } from './MenuItems/renderMenuItems';
|
|
5
|
+
declare const Menu: any;
|
|
6
|
+
declare const DSMenuWithSchema: {
|
|
7
|
+
(props?: unknown): JSX.Element;
|
|
8
|
+
propTypes: unknown;
|
|
9
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
10
|
+
};
|
|
11
|
+
declare const setSubMenu: (SubMenu: any) => any;
|
|
12
|
+
export { menuItemFactory, renderMenuItems, DSMenuWithSchema, Menu, setSubMenu };
|
|
13
|
+
export default Menu;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
declare function MenuCombobox({ dropdownFilterOptions, options, onSelectMenuItem, innerRef, maxOptions, loading, ...rest }: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
dropdownFilterOptions?: {} | undefined;
|
|
6
|
+
options?: never[] | undefined;
|
|
7
|
+
onSelectMenuItem?: (() => null) | undefined;
|
|
8
|
+
innerRef: any;
|
|
9
|
+
maxOptions?: number | undefined;
|
|
10
|
+
loading?: boolean | undefined;
|
|
11
|
+
}): JSX.Element;
|
|
12
|
+
declare namespace MenuCombobox {
|
|
13
|
+
var propTypes: {
|
|
14
|
+
/** Options */
|
|
15
|
+
dropdownFilterOptions: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
16
|
+
/** The option or menu items to render */
|
|
17
|
+
options: PropTypes.Requireable<(object | null | undefined)[]>;
|
|
18
|
+
/** Handler when a menu item is selected */
|
|
19
|
+
onSelectMenuItem: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
/** Internal ref */
|
|
21
|
+
innerRef: PropTypes.Requireable<object>;
|
|
22
|
+
/** Max options to display in the list */
|
|
23
|
+
maxOptions: PropTypes.Requireable<number>;
|
|
24
|
+
/** Is loading */
|
|
25
|
+
loading: PropTypes.Requireable<boolean>;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export default MenuCombobox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DSMenuWithSchema, Menu } from './Menu';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const CheckboxGroup: {
|
|
4
|
+
(props: any): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
active: {
|
|
7
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
8
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
9
|
+
};
|
|
10
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
11
|
+
};
|
|
12
|
+
multi: {
|
|
13
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
14
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
15
|
+
};
|
|
16
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
17
|
+
};
|
|
18
|
+
onCheck: {
|
|
19
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
20
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
21
|
+
};
|
|
22
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
declare const DSMenuCheckboxGroupWithSchema: {
|
|
27
|
+
(props?: unknown): JSX.Element;
|
|
28
|
+
propTypes: unknown;
|
|
29
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
30
|
+
};
|
|
31
|
+
export { DSMenuCheckboxGroupWithSchema, CheckboxGroup };
|
|
32
|
+
export default CheckboxGroup;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const MenuItem: {
|
|
4
|
+
(props: any): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
/** Renders the MenuItem with a specific html element */
|
|
7
|
+
as: {
|
|
8
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
9
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
10
|
+
};
|
|
11
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* reference to the component
|
|
15
|
+
*/
|
|
16
|
+
innerRef: {
|
|
17
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
18
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
19
|
+
};
|
|
20
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
21
|
+
};
|
|
22
|
+
/** Renders the passed element to the left */
|
|
23
|
+
leftAddon: {
|
|
24
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
25
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
26
|
+
};
|
|
27
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
28
|
+
};
|
|
29
|
+
/** Renders the passed element to the right */
|
|
30
|
+
rightAddon: {
|
|
31
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
32
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
33
|
+
};
|
|
34
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
35
|
+
};
|
|
36
|
+
/** Label for the menu item */
|
|
37
|
+
label: {
|
|
38
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
39
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
40
|
+
};
|
|
41
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
42
|
+
};
|
|
43
|
+
/** style object for menu item wrapper */
|
|
44
|
+
style: {
|
|
45
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
46
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
47
|
+
};
|
|
48
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
49
|
+
};
|
|
50
|
+
/** disable menu item */
|
|
51
|
+
disabled: {
|
|
52
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
53
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
54
|
+
};
|
|
55
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
56
|
+
};
|
|
57
|
+
/** HTML tabindex to manage focus order */
|
|
58
|
+
tabindex: {
|
|
59
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
60
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
61
|
+
};
|
|
62
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
63
|
+
};
|
|
64
|
+
/** a11y role */
|
|
65
|
+
role: {
|
|
66
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
67
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
68
|
+
};
|
|
69
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
declare const DSMenuItemWithSchema: {
|
|
74
|
+
(props?: unknown): JSX.Element;
|
|
75
|
+
propTypes: unknown;
|
|
76
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
77
|
+
};
|
|
78
|
+
export { DSMenuItemWithSchema, MenuItem };
|
|
79
|
+
export default MenuItem;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
/**
|
|
4
|
+
* Reuses the same props as the MenuItem
|
|
5
|
+
*
|
|
6
|
+
* @param root0
|
|
7
|
+
* @param root0.role
|
|
8
|
+
* @param root0.checked
|
|
9
|
+
* @param root0.name
|
|
10
|
+
* @param root0.checkIcon
|
|
11
|
+
* @param root0.children
|
|
12
|
+
* @param root0.leftAddon
|
|
13
|
+
* @param root0.item
|
|
14
|
+
*/
|
|
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
|
+
/** Whether the item is checked or not */
|
|
28
|
+
checked: {
|
|
29
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
30
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
31
|
+
};
|
|
32
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
33
|
+
};
|
|
34
|
+
/** A custom item when the item is checked */
|
|
35
|
+
checkIcon: {
|
|
36
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
37
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
38
|
+
};
|
|
39
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
40
|
+
};
|
|
41
|
+
/** form field name */
|
|
42
|
+
name: {
|
|
43
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
44
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
45
|
+
};
|
|
46
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
47
|
+
};
|
|
48
|
+
/** menu item object props */
|
|
49
|
+
item: {
|
|
50
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
51
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
52
|
+
};
|
|
53
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
54
|
+
};
|
|
55
|
+
/** a11y role */
|
|
56
|
+
role: {
|
|
57
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
58
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
59
|
+
};
|
|
60
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
61
|
+
};
|
|
62
|
+
/** left addon component */
|
|
63
|
+
leftAddon: {
|
|
64
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
65
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
66
|
+
};
|
|
67
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
declare const DSMenuItemCheckeableWithSchema: {
|
|
72
|
+
(props?: unknown): JSX.Element;
|
|
73
|
+
/** a11y role */
|
|
74
|
+
propTypes: unknown;
|
|
75
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
76
|
+
};
|
|
77
|
+
export { DSMenuItemCheckeableWithSchema, MenuItemCheckable };
|
|
78
|
+
export default MenuItemCheckable;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const MenuItemRadio: {
|
|
4
|
+
(props: any): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
/** Whether the item is checked or not */
|
|
7
|
+
checked: {
|
|
8
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
9
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
10
|
+
};
|
|
11
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
12
|
+
};
|
|
13
|
+
/** A custom item when the item is checked */
|
|
14
|
+
checkIcon: {
|
|
15
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
16
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
17
|
+
};
|
|
18
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
declare const DSMenuItemRadioWithSchema: {
|
|
23
|
+
(props?: unknown): JSX.Element;
|
|
24
|
+
propTypes: unknown;
|
|
25
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
26
|
+
};
|
|
27
|
+
export { DSMenuItemRadioWithSchema, MenuItemRadio };
|
|
28
|
+
export default MenuItemRadio;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const RadioGroup: {
|
|
4
|
+
(props: any): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
active: {
|
|
7
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
8
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
9
|
+
};
|
|
10
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
11
|
+
};
|
|
12
|
+
onCheck: {
|
|
13
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
14
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
15
|
+
};
|
|
16
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
declare const DSMenuRadioGroupWithSchema: {
|
|
21
|
+
(props?: unknown): JSX.Element;
|
|
22
|
+
propTypes: unknown;
|
|
23
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
24
|
+
};
|
|
25
|
+
export { DSMenuRadioGroupWithSchema, RadioGroup };
|
|
26
|
+
export default RadioGroup;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const DSMenuSearchableGroupWithSchema: {
|
|
4
|
+
(props?: unknown): JSX.Element;
|
|
5
|
+
propTypes: unknown;
|
|
6
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
7
|
+
};
|
|
8
|
+
declare const SearchableGroupHOC: any;
|
|
9
|
+
export { DSMenuSearchableGroupWithSchema, SearchableGroupHOC as SearchableGroup };
|
|
10
|
+
export default SearchableGroupHOC;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
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
|
+
/** callback after item gets selected */
|
|
18
|
+
onSelectMenuItem: {
|
|
19
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
20
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
21
|
+
};
|
|
22
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
23
|
+
};
|
|
24
|
+
/** Object with custom components for react-select */
|
|
25
|
+
components: {
|
|
26
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
27
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
29
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
30
|
+
};
|
|
31
|
+
/** search term to filter for */
|
|
32
|
+
searchTerm: {
|
|
33
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
34
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
35
|
+
};
|
|
36
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
37
|
+
};
|
|
38
|
+
/** item options */
|
|
39
|
+
items: {
|
|
40
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
41
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
42
|
+
};
|
|
43
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
44
|
+
};
|
|
45
|
+
/** options */
|
|
46
|
+
dropdownFilterOptions: {
|
|
47
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
48
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
49
|
+
};
|
|
50
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
51
|
+
};
|
|
52
|
+
/** Whether the combo box is has value to return or not */
|
|
53
|
+
returnValue: {
|
|
54
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
55
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
56
|
+
};
|
|
57
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
58
|
+
};
|
|
59
|
+
/** extra props to pass down to combo */
|
|
60
|
+
extraListProps: {
|
|
61
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
62
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
63
|
+
};
|
|
64
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
65
|
+
};
|
|
66
|
+
/** append search term as item on the list */
|
|
67
|
+
appendTermInList: {
|
|
68
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
69
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
70
|
+
};
|
|
71
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
72
|
+
};
|
|
73
|
+
/** maxoptions for combobox */
|
|
74
|
+
maxOptions: {
|
|
75
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
76
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
77
|
+
};
|
|
78
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
79
|
+
};
|
|
80
|
+
/** loading flag */
|
|
81
|
+
loading: {
|
|
82
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
83
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
84
|
+
};
|
|
85
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
declare const DSMenuSearchableListWithSchema: {
|
|
90
|
+
(props?: unknown): JSX.Element;
|
|
91
|
+
propTypes: unknown;
|
|
92
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
93
|
+
};
|
|
94
|
+
export { DSMenuSearchableListWithSchema, SearchableList };
|
|
95
|
+
export default SearchableList;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
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
|
+
/** toggle on multi select */
|
|
18
|
+
multi: {
|
|
19
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
20
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
21
|
+
};
|
|
22
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
23
|
+
};
|
|
24
|
+
/** toggle on searchable behavior */
|
|
25
|
+
searchable: {
|
|
26
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
27
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
29
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
30
|
+
};
|
|
31
|
+
/** toggle to focus component on open */
|
|
32
|
+
focusOnOpen: {
|
|
33
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
34
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
35
|
+
};
|
|
36
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
37
|
+
};
|
|
38
|
+
/** callback that triggers when select happens */
|
|
39
|
+
onSelect: {
|
|
40
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
41
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
42
|
+
};
|
|
43
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
44
|
+
};
|
|
45
|
+
children: {
|
|
46
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
47
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
48
|
+
};
|
|
49
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
50
|
+
};
|
|
51
|
+
/** selection group items */
|
|
52
|
+
items: {
|
|
53
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
54
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
55
|
+
};
|
|
56
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
57
|
+
};
|
|
58
|
+
/** array of values for multi and string for single selection */
|
|
59
|
+
active: {
|
|
60
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
61
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
62
|
+
};
|
|
63
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
64
|
+
};
|
|
65
|
+
/** selection group width */
|
|
66
|
+
width: {
|
|
67
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
68
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
69
|
+
};
|
|
70
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
71
|
+
};
|
|
72
|
+
/** selection group height */
|
|
73
|
+
height: {
|
|
74
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
75
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
76
|
+
};
|
|
77
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
declare const DSMenuSelectionGroupWithSchema: {
|
|
82
|
+
(props?: unknown): JSX.Element;
|
|
83
|
+
propTypes: unknown;
|
|
84
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
85
|
+
};
|
|
86
|
+
export { DSMenuSelectionGroupWithSchema, SelectionGroup };
|
|
87
|
+
export default SelectionGroup;
|
|
@@ -0,0 +1,32 @@
|
|
|
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(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
12
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
13
|
+
};
|
|
14
|
+
/** toggle separator on and off */
|
|
15
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
16
|
+
};
|
|
17
|
+
/** toggle separator on and off */
|
|
18
|
+
showSeparator: {
|
|
19
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
20
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
21
|
+
};
|
|
22
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
declare const DSMenuSeparatorWithSchema: {
|
|
27
|
+
(props?: unknown): JSX.Element;
|
|
28
|
+
propTypes: unknown;
|
|
29
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
30
|
+
};
|
|
31
|
+
export { DSMenuSeparatorWithSchema, MenuSeparator };
|
|
32
|
+
export default MenuSeparator;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
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
|
+
/** dont show addon for submenu */
|
|
20
|
+
noAddon: {
|
|
21
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
22
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
|
+
};
|
|
24
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
25
|
+
};
|
|
26
|
+
/** left addon */
|
|
27
|
+
leftAddon: {
|
|
28
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
29
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
30
|
+
};
|
|
31
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
32
|
+
};
|
|
33
|
+
/** submenu label */
|
|
34
|
+
label: {
|
|
35
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
36
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
37
|
+
};
|
|
38
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
39
|
+
};
|
|
40
|
+
/** A type indicating how to open/close the tooltip */
|
|
41
|
+
interactionType: {
|
|
42
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
43
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
44
|
+
};
|
|
45
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
46
|
+
};
|
|
47
|
+
/** sub menu items */
|
|
48
|
+
children: {
|
|
49
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
50
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
51
|
+
};
|
|
52
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
53
|
+
};
|
|
54
|
+
/** right addon, ellipsis or undefined */
|
|
55
|
+
rightAddonType: {
|
|
56
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
57
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
58
|
+
};
|
|
59
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
60
|
+
};
|
|
61
|
+
disabledAddonInactive: {
|
|
62
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
63
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
64
|
+
};
|
|
65
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
66
|
+
};
|
|
67
|
+
/** props passed to MenuItem component */
|
|
68
|
+
checkableProps: {
|
|
69
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
70
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
71
|
+
};
|
|
72
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
73
|
+
};
|
|
74
|
+
/** custom renderer for menu item */
|
|
75
|
+
customRenderer: {
|
|
76
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
77
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
78
|
+
};
|
|
79
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
80
|
+
};
|
|
81
|
+
/** on click handler */
|
|
82
|
+
onClick: {
|
|
83
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
84
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
85
|
+
};
|
|
86
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
87
|
+
};
|
|
88
|
+
closeMenu: {
|
|
89
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
90
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
91
|
+
};
|
|
92
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
93
|
+
};
|
|
94
|
+
/** component id */
|
|
95
|
+
id: {
|
|
96
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
97
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
98
|
+
};
|
|
99
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
declare const DSSubMenuWithSchema: {
|
|
104
|
+
(props?: unknown): JSX.Element;
|
|
105
|
+
propTypes: unknown;
|
|
106
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
107
|
+
};
|
|
108
|
+
export { DSSubMenuWithSchema, SubMenu };
|
|
109
|
+
export default SubMenu;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const renderMenuItems: (options: any, factory?: (type: string | undefined, items: any, defaultItem?: any) => any) => any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare 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;
|
|
9
|
+
export { VirtualMenuList };
|
|
10
|
+
export default VirtualMenuList;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { DSMenuItemWithSchema } from './MenuItems/MenuItem';
|
|
2
|
+
export { DSSubMenuWithSchema } from './MenuItems/SubMenu';
|
|
3
|
+
export { DSMenuCheckboxGroupWithSchema } from './MenuItems/CheckboxGroup';
|
|
4
|
+
export { DSMenuItemCheckeableWithSchema } from './MenuItems/MenuItemCheckable';
|
|
5
|
+
export { DSMenuItemRadioWithSchema } from './MenuItems/MenuItemRadio';
|
|
6
|
+
export { DSMenuRadioGroupWithSchema } from './MenuItems/RadioGroup';
|
|
7
|
+
export { DSMenuSearchableGroupWithSchema } from './MenuItems/SearchableGroup';
|
|
8
|
+
export { DSMenuSearchableListWithSchema } from './MenuItems/SearchableList';
|
|
9
|
+
export { DSMenuSeparatorWithSchema } from './MenuItems/Separator';
|
|
10
|
+
export { DSMenuSelectionGroupWithSchema } from './MenuItems/SelectionGroup';
|
|
11
|
+
export { default as MenuCombobox } from './MenuCombobox';
|
|
12
|
+
export { menuItemFactory } from './MenuItems/menuItemFactory';
|
|
13
|
+
export { renderMenuItems } from './MenuItems/renderMenuItems';
|
|
14
|
+
export { DSMenuWithSchema, Menu, Menu as default } from './Menu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-menu",
|
|
3
|
-
"version": "2.3.0-alpha.
|
|
3
|
+
"version": "2.3.0-alpha.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Menu",
|
|
6
6
|
"files": [
|
|
@@ -105,16 +105,16 @@
|
|
|
105
105
|
},
|
|
106
106
|
"author": "ICE MT",
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"@elliemae/ds-button": "2.3.0-alpha.
|
|
109
|
-
"@elliemae/ds-classnames": "2.3.0-alpha.
|
|
110
|
-
"@elliemae/ds-form": "2.3.0-alpha.
|
|
111
|
-
"@elliemae/ds-hidden": "2.3.0-alpha.
|
|
112
|
-
"@elliemae/ds-icons": "2.3.0-alpha.
|
|
113
|
-
"@elliemae/ds-popper": "2.3.0-alpha.
|
|
114
|
-
"@elliemae/ds-separator": "2.3.0-alpha.
|
|
115
|
-
"@elliemae/ds-shared": "2.3.0-alpha.
|
|
116
|
-
"@elliemae/ds-truncated-tooltip-text": "2.3.0-alpha.
|
|
117
|
-
"@elliemae/ds-utilities": "2.3.0-alpha.
|
|
108
|
+
"@elliemae/ds-button": "2.3.0-alpha.9",
|
|
109
|
+
"@elliemae/ds-classnames": "2.3.0-alpha.9",
|
|
110
|
+
"@elliemae/ds-form": "2.3.0-alpha.9",
|
|
111
|
+
"@elliemae/ds-hidden": "2.3.0-alpha.9",
|
|
112
|
+
"@elliemae/ds-icons": "2.3.0-alpha.9",
|
|
113
|
+
"@elliemae/ds-popper": "2.3.0-alpha.9",
|
|
114
|
+
"@elliemae/ds-separator": "2.3.0-alpha.9",
|
|
115
|
+
"@elliemae/ds-shared": "2.3.0-alpha.9",
|
|
116
|
+
"@elliemae/ds-truncated-tooltip-text": "2.3.0-alpha.9",
|
|
117
|
+
"@elliemae/ds-utilities": "2.3.0-alpha.9",
|
|
118
118
|
"prop-types": "~15.7.2",
|
|
119
119
|
"react-desc": "~4.1.3",
|
|
120
120
|
"react-spring": "~8.0.27",
|