@elliemae/ds-menu 2.0.0-alpha.11 → 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.
- package/cjs/Menu.js +25 -10
- package/cjs/MenuCombobox.js +5 -0
- package/cjs/MenuItems/CheckboxGroup.js +5 -0
- package/cjs/MenuItems/MenuItem.js +42 -29
- package/cjs/MenuItems/MenuItemCheckable.js +16 -11
- package/cjs/MenuItems/MenuItemCheckbox.js +7 -3
- package/cjs/MenuItems/MenuItemRadio.js +5 -0
- package/cjs/MenuItems/RadioGroup.js +5 -0
- package/cjs/MenuItems/SearchableGroup.js +19 -12
- package/cjs/MenuItems/SearchableList.js +22 -17
- package/cjs/MenuItems/SelectionGroup.js +22 -12
- package/cjs/MenuItems/Separator.js +7 -4
- package/cjs/MenuItems/SubMenu.js +24 -22
- package/cjs/MenuItems/menuItemFactory.js +15 -4
- package/cjs/VirtualMenuList.js +21 -14
- package/cjs/utils/useHeightByAmountOfItems.js +6 -5
- package/esm/Menu.js +25 -10
- package/esm/MenuCombobox.js +5 -0
- package/esm/MenuItems/CheckboxGroup.js +5 -0
- package/esm/MenuItems/MenuItem.js +40 -27
- package/esm/MenuItems/MenuItemCheckable.js +14 -8
- package/esm/MenuItems/MenuItemCheckbox.js +6 -1
- package/esm/MenuItems/MenuItemRadio.js +5 -0
- package/esm/MenuItems/RadioGroup.js +5 -0
- package/esm/MenuItems/SearchableGroup.js +19 -12
- package/esm/MenuItems/SearchableList.js +20 -14
- package/esm/MenuItems/SelectionGroup.js +22 -12
- package/esm/MenuItems/Separator.js +7 -4
- package/esm/MenuItems/SubMenu.js +24 -20
- package/esm/MenuItems/menuItemFactory.js +14 -3
- package/esm/VirtualMenuList.js +21 -14
- package/esm/utils/useHeightByAmountOfItems.js +6 -5
- package/package.json +16 -13
- package/types/Menu.d.ts +24 -1
- package/types/MenuItems/CheckboxGroup.d.ts +24 -4
- package/types/MenuItems/MenuItem.d.ts +60 -10
- package/types/MenuItems/MenuItemCheckable.d.ts +51 -7
- package/types/MenuItems/MenuItemRadio.d.ts +27 -3
- package/types/MenuItems/RadioGroup.d.ts +18 -3
- package/types/MenuItems/SearchableGroup.d.ts +15 -1
- package/types/MenuItems/SearchableList.d.ts +77 -11
- package/types/MenuItems/SelectionGroup.d.ts +73 -11
- package/types/MenuItems/Separator.d.ts +21 -3
- package/types/MenuItems/SubMenu.d.ts +91 -13
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
7
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
2
9
|
import { createElement } from 'react';
|
|
3
|
-
import { isFunction } from '@elliemae/ds-utilities
|
|
10
|
+
import { isFunction } from '@elliemae/ds-utilities';
|
|
4
11
|
import MenuSeparator from './Separator.js';
|
|
5
12
|
import MenuItem from './MenuItem.js';
|
|
6
13
|
import SubMenu from './SubMenu.js';
|
|
@@ -22,12 +29,16 @@ const itemTypes = {
|
|
|
22
29
|
const fallback = {
|
|
23
30
|
SelectionGroup: 'selection-group'
|
|
24
31
|
};
|
|
25
|
-
function menuItemFactory(
|
|
32
|
+
function menuItemFactory() {
|
|
33
|
+
let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
34
|
+
let items = arguments.length > 1 ? arguments[1] : undefined;
|
|
35
|
+
let defaultItem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : itemTypes.menuitem;
|
|
26
36
|
const itemsObject = items || itemTypes;
|
|
27
37
|
const parsedType = fallback[type] || type.toLowerCase();
|
|
28
38
|
return itemsObject[parsedType] || defaultItem;
|
|
29
39
|
}
|
|
30
|
-
function renderMenuItems(options
|
|
40
|
+
function renderMenuItems(options) {
|
|
41
|
+
let factory = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : menuItemFactory;
|
|
31
42
|
return options.map((option, index) => {
|
|
32
43
|
if (isFunction(option.renderer)) {
|
|
33
44
|
return option.renderer({
|
package/esm/VirtualMenuList.js
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
2
5
|
import 'react';
|
|
3
6
|
import { FixedSizeList } from 'react-window';
|
|
4
7
|
import useHeightByAmountOfItems from './utils/useHeightByAmountOfItems.js';
|
|
5
8
|
|
|
6
|
-
const MenuItem =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const MenuItem = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
data,
|
|
12
|
+
index,
|
|
13
|
+
style
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/_jsx("div", {
|
|
16
|
+
style: style
|
|
17
|
+
}, index, data && data[index] ? data[index] : '');
|
|
18
|
+
}; // eslint-disable-next-line no-unused-vars
|
|
13
19
|
|
|
14
|
-
function VirtualMenuList({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
function VirtualMenuList(_ref2) {
|
|
21
|
+
let {
|
|
22
|
+
items,
|
|
23
|
+
itemHeight = 32,
|
|
24
|
+
amountItemsInWindow = 5,
|
|
25
|
+
width,
|
|
26
|
+
height
|
|
27
|
+
} = _ref2;
|
|
21
28
|
const computedListHeight = useHeightByAmountOfItems({
|
|
22
29
|
amountItems: amountItemsInWindow,
|
|
23
30
|
itemHeight,
|
|
@@ -5,11 +5,12 @@ const calculateHeight = (itemHeight, amountItemsInWindow, itemsLength) => {
|
|
|
5
5
|
return itemHeight * realAmountItemsInWindow;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
-
function useHeightByAmountOfItems({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
function useHeightByAmountOfItems(_ref) {
|
|
9
|
+
let {
|
|
10
|
+
itemHeight,
|
|
11
|
+
amountItems,
|
|
12
|
+
items
|
|
13
|
+
} = _ref;
|
|
13
14
|
const calculatedHeight = useMemo(() => calculateHeight(itemHeight, amountItems, items.length), [amountItems, items]);
|
|
14
15
|
return calculatedHeight;
|
|
15
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-menu",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Menu",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -100,29 +100,32 @@
|
|
|
100
100
|
"build": "node ../../scripts/build/build.js"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@elliemae/ds-button": "2.0.0-alpha.
|
|
104
|
-
"@elliemae/ds-classnames": "2.0.0-alpha.
|
|
105
|
-
"@elliemae/ds-form": "2.0.0-alpha.
|
|
106
|
-
"@elliemae/ds-hidden": "2.0.0-alpha.
|
|
107
|
-
"@elliemae/ds-icons": "2.0.0-alpha.
|
|
108
|
-
"@elliemae/ds-popper": "2.0.0-alpha.
|
|
109
|
-
"@elliemae/ds-separator": "2.0.0-alpha.
|
|
110
|
-
"@elliemae/ds-shared": "2.0.0-alpha.
|
|
111
|
-
"@elliemae/ds-truncated-tooltip-text": "2.0.0-alpha.
|
|
112
|
-
"@elliemae/ds-utilities": "2.0.0-alpha.
|
|
103
|
+
"@elliemae/ds-button": "2.0.0-alpha.12",
|
|
104
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.12",
|
|
105
|
+
"@elliemae/ds-form": "2.0.0-alpha.12",
|
|
106
|
+
"@elliemae/ds-hidden": "2.0.0-alpha.12",
|
|
107
|
+
"@elliemae/ds-icons": "2.0.0-alpha.12",
|
|
108
|
+
"@elliemae/ds-popper": "2.0.0-alpha.12",
|
|
109
|
+
"@elliemae/ds-separator": "2.0.0-alpha.12",
|
|
110
|
+
"@elliemae/ds-shared": "2.0.0-alpha.12",
|
|
111
|
+
"@elliemae/ds-truncated-tooltip-text": "2.0.0-alpha.12",
|
|
112
|
+
"@elliemae/ds-utilities": "2.0.0-alpha.12",
|
|
113
113
|
"prop-types": "~15.7.2",
|
|
114
114
|
"react-desc": "~4.1.3",
|
|
115
115
|
"react-spring": "~8.0.27",
|
|
116
116
|
"react-window": "~1.8.6"
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
|
-
"
|
|
119
|
+
"@testing-library/jest-dom": "~5.15.0",
|
|
120
|
+
"@testing-library/react": "~12.1.2",
|
|
121
|
+
"jest-styled-components": "~7.0.6",
|
|
122
|
+
"styled-components": "~5.3.3"
|
|
120
123
|
},
|
|
121
124
|
"peerDependencies": {
|
|
122
125
|
"lodash": "^4.17.21",
|
|
123
126
|
"react": "^17.0.2",
|
|
124
127
|
"react-dom": "^17.0.2",
|
|
125
|
-
"styled-components": "^5.3.
|
|
128
|
+
"styled-components": "^5.3.3"
|
|
126
129
|
},
|
|
127
130
|
"publishConfig": {
|
|
128
131
|
"access": "public",
|
package/types/Menu.d.ts
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
import React from 'react';
|
|
1
3
|
import { renderMenuItems, menuItemFactory } from './MenuItems/menuItemFactory';
|
|
2
4
|
declare const Menu: any;
|
|
3
|
-
declare const DSMenuWithSchema:
|
|
5
|
+
declare const DSMenuWithSchema: {
|
|
6
|
+
(props?: {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
containerProps?: {} | undefined;
|
|
9
|
+
innerRef: any;
|
|
10
|
+
as?: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "key" | keyof React.HTMLAttributes<HTMLUListElement>> & {
|
|
11
|
+
ref?: ((instance: HTMLUListElement | null) => void) | React.RefObject<HTMLUListElement> | null | undefined;
|
|
12
|
+
}> | undefined;
|
|
13
|
+
children?: undefined;
|
|
14
|
+
onClickOutside?: (() => void) | undefined;
|
|
15
|
+
visible?: undefined;
|
|
16
|
+
focusOnOpen?: boolean | undefined;
|
|
17
|
+
maxOption?: number | undefined;
|
|
18
|
+
style?: {} | undefined;
|
|
19
|
+
minWidth?: undefined;
|
|
20
|
+
maxWidth?: undefined;
|
|
21
|
+
closeMenu: any;
|
|
22
|
+
responsiveHeight?: boolean | undefined;
|
|
23
|
+
} | undefined): JSX.Element;
|
|
24
|
+
propTypes: unknown;
|
|
25
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
26
|
+
};
|
|
4
27
|
export { Menu, menuItemFactory, renderMenuItems, DSMenuWithSchema };
|
|
5
28
|
export default Menu;
|
|
@@ -1,12 +1,32 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
declare function CheckboxGroup(props: any): JSX.Element;
|
|
3
4
|
declare namespace CheckboxGroup {
|
|
4
5
|
var propTypes: {
|
|
5
|
-
active:
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
active: {
|
|
7
|
+
defaultValue<T = unknown>(arg: T): {
|
|
8
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
9
|
+
};
|
|
10
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
11
|
+
};
|
|
12
|
+
multi: {
|
|
13
|
+
defaultValue<T = unknown>(arg: T): {
|
|
14
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
15
|
+
};
|
|
16
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
17
|
+
};
|
|
18
|
+
onCheck: {
|
|
19
|
+
defaultValue<T = unknown>(arg: T): {
|
|
20
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
21
|
+
};
|
|
22
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
23
|
+
};
|
|
8
24
|
};
|
|
9
25
|
}
|
|
10
|
-
declare const DSMenuCheckboxGroupWithSchema:
|
|
26
|
+
declare const DSMenuCheckboxGroupWithSchema: {
|
|
27
|
+
(props?: any): JSX.Element;
|
|
28
|
+
propTypes: unknown;
|
|
29
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
30
|
+
};
|
|
11
31
|
export default CheckboxGroup;
|
|
12
32
|
export { DSMenuCheckboxGroupWithSchema };
|
|
@@ -1,29 +1,79 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
declare function MenuItem(props: any): JSX.Element;
|
|
3
4
|
declare namespace MenuItem {
|
|
4
5
|
var propTypes: {
|
|
5
6
|
/** Renders the MenuItem with a specific html element */
|
|
6
|
-
as:
|
|
7
|
+
as: {
|
|
8
|
+
defaultValue<T = unknown>(arg: T): {
|
|
9
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
10
|
+
};
|
|
11
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
12
|
+
};
|
|
7
13
|
/**
|
|
8
14
|
* reference to the component
|
|
9
15
|
*/
|
|
10
|
-
innerRef:
|
|
16
|
+
innerRef: {
|
|
17
|
+
defaultValue<T = unknown>(arg: T): {
|
|
18
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
19
|
+
};
|
|
20
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
21
|
+
};
|
|
11
22
|
/** Renders the passed element to the left */
|
|
12
|
-
leftAddon:
|
|
23
|
+
leftAddon: {
|
|
24
|
+
defaultValue<T = unknown>(arg: T): {
|
|
25
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
26
|
+
};
|
|
27
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
13
29
|
/** Renders the passed element to the right */
|
|
14
|
-
rightAddon:
|
|
30
|
+
rightAddon: {
|
|
31
|
+
defaultValue<T = unknown>(arg: T): {
|
|
32
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
33
|
+
};
|
|
34
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
35
|
+
};
|
|
15
36
|
/** Label for the menu item */
|
|
16
|
-
label:
|
|
37
|
+
label: {
|
|
38
|
+
defaultValue<T = unknown>(arg: T): {
|
|
39
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
40
|
+
};
|
|
41
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
42
|
+
};
|
|
17
43
|
/** style object for menu item wrapper */
|
|
18
|
-
style:
|
|
44
|
+
style: {
|
|
45
|
+
defaultValue<T = unknown>(arg: T): {
|
|
46
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
47
|
+
};
|
|
48
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
49
|
+
};
|
|
19
50
|
/** disable menu item */
|
|
20
|
-
disabled:
|
|
51
|
+
disabled: {
|
|
52
|
+
defaultValue<T = unknown>(arg: T): {
|
|
53
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
54
|
+
};
|
|
55
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
56
|
+
};
|
|
21
57
|
/** HTML tabindex to manage focus order */
|
|
22
|
-
tabindex:
|
|
58
|
+
tabindex: {
|
|
59
|
+
defaultValue<T = unknown>(arg: T): {
|
|
60
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
61
|
+
};
|
|
62
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
63
|
+
};
|
|
23
64
|
/** a11y role */
|
|
24
|
-
role:
|
|
65
|
+
role: {
|
|
66
|
+
defaultValue<T = unknown>(arg: T): {
|
|
67
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
68
|
+
};
|
|
69
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
70
|
+
};
|
|
25
71
|
};
|
|
26
72
|
}
|
|
27
|
-
declare const DSMenuItemWithSchema:
|
|
73
|
+
declare const DSMenuItemWithSchema: {
|
|
74
|
+
(props?: any): JSX.Element;
|
|
75
|
+
propTypes: unknown;
|
|
76
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
77
|
+
};
|
|
28
78
|
export default MenuItem;
|
|
29
79
|
export { DSMenuItemWithSchema };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
/**
|
|
3
4
|
* Reuses the same props as the MenuItem
|
|
@@ -24,19 +25,62 @@ declare function MenuItemCheckable({ role, checked, name, checkIcon, children, l
|
|
|
24
25
|
declare namespace MenuItemCheckable {
|
|
25
26
|
var propTypes: {
|
|
26
27
|
/** Whether the item is checked or not */
|
|
27
|
-
checked:
|
|
28
|
+
checked: {
|
|
29
|
+
defaultValue<T = unknown>(arg: T): {
|
|
30
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
31
|
+
};
|
|
32
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
33
|
+
};
|
|
28
34
|
/** A custom item when the item is checked */
|
|
29
|
-
checkIcon:
|
|
35
|
+
checkIcon: {
|
|
36
|
+
defaultValue<T = unknown>(arg: T): {
|
|
37
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
38
|
+
};
|
|
39
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
40
|
+
};
|
|
30
41
|
/** form field name */
|
|
31
|
-
name:
|
|
42
|
+
name: {
|
|
43
|
+
defaultValue<T = unknown>(arg: T): {
|
|
44
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
45
|
+
};
|
|
46
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
47
|
+
};
|
|
32
48
|
/** menu item object props */
|
|
33
|
-
item:
|
|
49
|
+
item: {
|
|
50
|
+
defaultValue<T = unknown>(arg: T): {
|
|
51
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
52
|
+
};
|
|
53
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
54
|
+
};
|
|
34
55
|
/** a11y role */
|
|
35
|
-
role:
|
|
56
|
+
role: {
|
|
57
|
+
defaultValue<T = unknown>(arg: T): {
|
|
58
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
59
|
+
};
|
|
60
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
61
|
+
};
|
|
36
62
|
/** left addon component */
|
|
37
|
-
leftAddon:
|
|
63
|
+
leftAddon: {
|
|
64
|
+
defaultValue<T = unknown>(arg: T): {
|
|
65
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
66
|
+
};
|
|
67
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
68
|
+
};
|
|
38
69
|
};
|
|
39
70
|
}
|
|
40
|
-
declare const DSMenuItemCheckeableWithSchema:
|
|
71
|
+
declare const DSMenuItemCheckeableWithSchema: {
|
|
72
|
+
(props?: {
|
|
73
|
+
[x: string]: any;
|
|
74
|
+
role?: string | undefined;
|
|
75
|
+
checked?: boolean | undefined;
|
|
76
|
+
name?: string | undefined;
|
|
77
|
+
checkIcon?: JSX.Element | undefined;
|
|
78
|
+
children: any;
|
|
79
|
+
leftAddon: any;
|
|
80
|
+
item?: undefined;
|
|
81
|
+
} | undefined): JSX.Element;
|
|
82
|
+
propTypes: unknown;
|
|
83
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
84
|
+
};
|
|
41
85
|
export default MenuItemCheckable;
|
|
42
86
|
export { DSMenuItemCheckeableWithSchema };
|
|
@@ -1,13 +1,37 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
declare function MenuItemRadio(props: any): JSX.Element;
|
|
3
4
|
declare namespace MenuItemRadio {
|
|
4
5
|
var propTypes: {
|
|
5
6
|
/** Whether the item is checked or not */
|
|
6
|
-
checked:
|
|
7
|
+
checked: {
|
|
8
|
+
defaultValue<T = unknown>(arg: T): {
|
|
9
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
10
|
+
};
|
|
11
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
12
|
+
};
|
|
7
13
|
/** A custom item when the item is checked */
|
|
8
|
-
checkIcon:
|
|
14
|
+
checkIcon: {
|
|
15
|
+
defaultValue<T = unknown>(arg: T): {
|
|
16
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
17
|
+
};
|
|
18
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
19
|
+
};
|
|
9
20
|
};
|
|
10
21
|
}
|
|
11
|
-
declare const DSMenuItemRadioWithSchema:
|
|
22
|
+
declare const DSMenuItemRadioWithSchema: {
|
|
23
|
+
(props?: {
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
role?: string | undefined;
|
|
26
|
+
checked?: boolean | undefined;
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
checkIcon?: JSX.Element | undefined;
|
|
29
|
+
children: any;
|
|
30
|
+
leftAddon: any;
|
|
31
|
+
item?: undefined;
|
|
32
|
+
} | undefined): JSX.Element;
|
|
33
|
+
propTypes: unknown;
|
|
34
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
35
|
+
};
|
|
12
36
|
export default MenuItemRadio;
|
|
13
37
|
export { DSMenuItemRadioWithSchema };
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
declare function RadioGroup(props: any): JSX.Element;
|
|
3
4
|
declare namespace RadioGroup {
|
|
4
5
|
var propTypes: {
|
|
5
|
-
active:
|
|
6
|
-
|
|
6
|
+
active: {
|
|
7
|
+
defaultValue<T = unknown>(arg: T): {
|
|
8
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
9
|
+
};
|
|
10
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
11
|
+
};
|
|
12
|
+
onCheck: {
|
|
13
|
+
defaultValue<T = unknown>(arg: T): {
|
|
14
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
15
|
+
};
|
|
16
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
17
|
+
};
|
|
7
18
|
};
|
|
8
19
|
}
|
|
9
|
-
declare const DSMenuRadioGroupWithSchema:
|
|
20
|
+
declare const DSMenuRadioGroupWithSchema: {
|
|
21
|
+
(props?: any): JSX.Element;
|
|
22
|
+
propTypes: unknown;
|
|
23
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
24
|
+
};
|
|
10
25
|
export default RadioGroup;
|
|
11
26
|
export { DSMenuRadioGroupWithSchema };
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const DSMenuSearchableGroupWithSchema: {
|
|
4
|
+
(props?: {
|
|
5
|
+
children: any;
|
|
6
|
+
amountItemsInWindow?: number | undefined;
|
|
7
|
+
searchTerm?: string | undefined;
|
|
8
|
+
noOptionsText?: string | undefined;
|
|
9
|
+
height: any;
|
|
10
|
+
width: any;
|
|
11
|
+
focusOnOpen?: boolean | undefined;
|
|
12
|
+
} | undefined): JSX.Element;
|
|
13
|
+
propTypes: unknown;
|
|
14
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
15
|
+
};
|
|
2
16
|
declare const _default: any;
|
|
3
17
|
export default _default;
|
|
4
18
|
export { DSMenuSearchableGroupWithSchema };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
declare function SearchableList({ onSelectMenuItem, components, searchTerm: searchTermProp, items, dropdownFilterOptions, returnValue, extraListProps, appendTermInList, maxOptions, loading, }: {
|
|
3
4
|
onSelectMenuItem?: (() => void) | undefined;
|
|
@@ -14,27 +15,92 @@ declare function SearchableList({ onSelectMenuItem, components, searchTerm: sear
|
|
|
14
15
|
declare namespace SearchableList {
|
|
15
16
|
var propTypes: {
|
|
16
17
|
/** callback after item gets selected */
|
|
17
|
-
onSelectMenuItem:
|
|
18
|
+
onSelectMenuItem: {
|
|
19
|
+
defaultValue<T = unknown>(arg: T): {
|
|
20
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
21
|
+
};
|
|
22
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
23
|
+
};
|
|
18
24
|
/** Object with custom components for react-select */
|
|
19
|
-
components:
|
|
25
|
+
components: {
|
|
26
|
+
defaultValue<T = unknown>(arg: T): {
|
|
27
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
29
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
30
|
+
};
|
|
20
31
|
/** search term to filter for */
|
|
21
|
-
searchTerm:
|
|
32
|
+
searchTerm: {
|
|
33
|
+
defaultValue<T = unknown>(arg: T): {
|
|
34
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
35
|
+
};
|
|
36
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
37
|
+
};
|
|
22
38
|
/** item options */
|
|
23
|
-
items:
|
|
39
|
+
items: {
|
|
40
|
+
defaultValue<T = unknown>(arg: T): {
|
|
41
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
42
|
+
};
|
|
43
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
44
|
+
};
|
|
24
45
|
/** options */
|
|
25
|
-
dropdownFilterOptions:
|
|
46
|
+
dropdownFilterOptions: {
|
|
47
|
+
defaultValue<T = unknown>(arg: T): {
|
|
48
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
49
|
+
};
|
|
50
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
51
|
+
};
|
|
26
52
|
/** Whether the combo box is has value to return or not */
|
|
27
|
-
returnValue:
|
|
53
|
+
returnValue: {
|
|
54
|
+
defaultValue<T = unknown>(arg: T): {
|
|
55
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
56
|
+
};
|
|
57
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
58
|
+
};
|
|
28
59
|
/** extra props to pass down to combo */
|
|
29
|
-
extraListProps:
|
|
60
|
+
extraListProps: {
|
|
61
|
+
defaultValue<T = unknown>(arg: T): {
|
|
62
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
63
|
+
};
|
|
64
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
65
|
+
};
|
|
30
66
|
/** append search term as item on the list */
|
|
31
|
-
appendTermInList:
|
|
67
|
+
appendTermInList: {
|
|
68
|
+
defaultValue<T = unknown>(arg: T): {
|
|
69
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
70
|
+
};
|
|
71
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
72
|
+
};
|
|
32
73
|
/** maxoptions for combobox */
|
|
33
|
-
maxOptions:
|
|
74
|
+
maxOptions: {
|
|
75
|
+
defaultValue<T = unknown>(arg: T): {
|
|
76
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
77
|
+
};
|
|
78
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
79
|
+
};
|
|
34
80
|
/** loading flag */
|
|
35
|
-
loading:
|
|
81
|
+
loading: {
|
|
82
|
+
defaultValue<T = unknown>(arg: T): {
|
|
83
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
84
|
+
};
|
|
85
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
86
|
+
};
|
|
36
87
|
};
|
|
37
88
|
}
|
|
38
|
-
declare const DSMenuSearchableListWithSchema:
|
|
89
|
+
declare const DSMenuSearchableListWithSchema: {
|
|
90
|
+
(props?: {
|
|
91
|
+
onSelectMenuItem?: (() => void) | undefined;
|
|
92
|
+
components?: {} | undefined;
|
|
93
|
+
searchTerm?: string | undefined;
|
|
94
|
+
items?: never[] | undefined;
|
|
95
|
+
dropdownFilterOptions?: {} | undefined;
|
|
96
|
+
returnValue: any;
|
|
97
|
+
extraListProps?: {} | undefined;
|
|
98
|
+
appendTermInList?: boolean | undefined;
|
|
99
|
+
maxOptions?: number | undefined;
|
|
100
|
+
loading?: boolean | undefined;
|
|
101
|
+
} | undefined): JSX.Element;
|
|
102
|
+
propTypes: unknown;
|
|
103
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
104
|
+
};
|
|
39
105
|
export default SearchableList;
|
|
40
106
|
export { DSMenuSearchableListWithSchema };
|