@instructure/ui-menu 8.8.0 → 8.8.1-snapshot.63
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/LICENSE.md +27 -0
- package/es/Menu/MenuItem/index.js +14 -60
- package/es/Menu/MenuItem/props.js +67 -0
- package/es/Menu/MenuItemGroup/index.js +10 -57
- package/es/Menu/MenuItemGroup/props.js +71 -0
- package/es/Menu/MenuItemSeparator/index.js +5 -8
- package/{src/Menu/MenuItemSeparator/types.ts → es/Menu/MenuItemSeparator/props.js} +5 -5
- package/es/Menu/index.js +5 -151
- package/es/Menu/props.js +167 -0
- package/lib/Menu/MenuItem/index.js +15 -62
- package/lib/Menu/MenuItem/props.js +79 -0
- package/lib/Menu/MenuItemGroup/index.js +11 -62
- package/lib/Menu/MenuItemGroup/props.js +87 -0
- package/lib/Menu/MenuItemSeparator/index.js +6 -9
- package/{src/Menu/MenuItemGroup/types.ts → lib/Menu/MenuItemSeparator/props.js} +13 -16
- package/lib/Menu/index.js +6 -156
- package/lib/Menu/props.js +182 -0
- package/package.json +22 -21
- package/src/Menu/MenuItem/index.tsx +14 -56
- package/src/Menu/MenuItem/props.ts +109 -0
- package/src/Menu/MenuItem/styles.ts +1 -1
- package/src/Menu/MenuItem/theme.ts +1 -1
- package/src/Menu/MenuItemGroup/index.tsx +9 -56
- package/src/Menu/MenuItemGroup/props.ts +110 -0
- package/src/Menu/MenuItemGroup/theme.ts +1 -1
- package/src/Menu/MenuItemSeparator/index.tsx +6 -9
- package/src/Menu/{MenuItem/types.ts → MenuItemSeparator/props.ts} +19 -19
- package/src/Menu/MenuItemSeparator/theme.ts +1 -1
- package/src/Menu/index.tsx +6 -139
- package/src/Menu/props.ts +235 -0
- package/src/Menu/theme.ts +1 -1
- package/src/index.ts +4 -4
- package/types/Menu/MenuItem/index.d.ts +37 -45
- package/types/Menu/MenuItem/index.d.ts.map +1 -1
- package/types/Menu/MenuItem/props.d.ts +27 -0
- package/types/Menu/MenuItem/props.d.ts.map +1 -0
- package/types/Menu/MenuItem/styles.d.ts +1 -1
- package/types/Menu/MenuItem/theme.d.ts +1 -1
- package/types/Menu/MenuItem/theme.d.ts.map +1 -1
- package/types/Menu/MenuItemGroup/index.d.ts +29 -46
- package/types/Menu/MenuItemGroup/index.d.ts.map +1 -1
- package/types/Menu/MenuItemGroup/props.d.ts +25 -0
- package/types/Menu/MenuItemGroup/props.d.ts.map +1 -0
- package/types/Menu/MenuItemGroup/theme.d.ts +1 -1
- package/types/Menu/MenuItemGroup/theme.d.ts.map +1 -1
- package/types/Menu/MenuItemSeparator/index.d.ts +3 -6
- package/types/Menu/MenuItemSeparator/index.d.ts.map +1 -1
- package/types/Menu/MenuItemSeparator/props.d.ts +11 -0
- package/types/Menu/MenuItemSeparator/props.d.ts.map +1 -0
- package/types/Menu/MenuItemSeparator/theme.d.ts +1 -1
- package/types/Menu/MenuItemSeparator/theme.d.ts.map +1 -1
- package/types/Menu/index.d.ts +60 -122
- package/types/Menu/index.d.ts.map +1 -1
- package/types/Menu/{types.d.ts → props.d.ts} +13 -5
- package/types/Menu/props.d.ts.map +1 -0
- package/types/Menu/theme.d.ts +1 -1
- package/types/Menu/theme.d.ts.map +1 -1
- package/types/index.d.ts +4 -4
- package/es/Menu/MenuItem/types.js +0 -1
- package/es/Menu/MenuItemGroup/types.js +0 -1
- package/es/Menu/MenuItemSeparator/types.js +0 -1
- package/es/Menu/types.js +0 -1
- package/lib/Menu/MenuItem/types.js +0 -1
- package/lib/Menu/MenuItemGroup/types.js +0 -1
- package/lib/Menu/MenuItemSeparator/types.js +0 -1
- package/lib/Menu/types.js +0 -1
- package/src/Menu/types.ts +0 -63
- package/types/Menu/MenuItem/types.d.ts +0 -19
- package/types/Menu/MenuItem/types.d.ts.map +0 -1
- package/types/Menu/MenuItemGroup/types.d.ts +0 -17
- package/types/Menu/MenuItemGroup/types.d.ts.map +0 -1
- package/types/Menu/MenuItemSeparator/types.d.ts +0 -5
- package/types/Menu/MenuItemSeparator/types.d.ts.map +0 -1
- package/types/Menu/types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemGroup/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAgB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemGroup/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAgB,MAAM,OAAO,CAAA;AAEzD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAgBrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;GAKG;AACH,cAEM,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,SAAS;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;MAUlB;gBAGW,KAAK,KAAA;IAcjB,iBAAiB;IAKjB,kBAAkB;IAMlB,YAAY,yDAsBX;IAGD,cAAc,sEAmBb;IAGD,oBAAoB,CAAC,KAAK,KAAA;IAwB1B,IAAI,QAAQ,UAaX;IAED,WAAW;IAUX,cAAc;IAyCd,MAAM;CAsBP;AAED,eAAe,aAAa,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { PropValidators } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps } from '@instructure/emotion';
|
|
4
|
+
declare type MenuGroupOwnProps = {
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
allowMultiple?: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
selected?: any;
|
|
9
|
+
defaultSelected?: any[];
|
|
10
|
+
onSelect?: (...args: any[]) => any;
|
|
11
|
+
onMouseOver?: (...args: any[]) => any;
|
|
12
|
+
onKeyDown?: (...args: any[]) => any;
|
|
13
|
+
controls?: string;
|
|
14
|
+
itemRef?: (...args: any[]) => any;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
isTabbable?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare type PropKeys = keyof MenuGroupOwnProps;
|
|
19
|
+
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
20
|
+
declare type MenuGroupProps = MenuGroupOwnProps & WithStyleProps;
|
|
21
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
22
|
+
declare const allowedProps: AllowedPropKeys;
|
|
23
|
+
export type { MenuGroupProps };
|
|
24
|
+
export { propTypes, allowedProps };
|
|
25
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemGroup/props.ts"],"names":[],"mappings":";AAiCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,aAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,eAAe,CAAC,EAAE,GAAG,EAAE,CAAA;IACvB,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAClC,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACrC,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,iBAAiB,CAAA;AAEvC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,cAAc,GAAG,iBAAiB,GAAG,cAAc,CAAA;AAExD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAkCvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAanB,CAAA;AAED,YAAY,EAAE,cAAc,EAAE,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemGroup/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,KAAK,EAAsB,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemGroup/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAsB,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,UAAW,KAAK,KAAG,cAqB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Component } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import { jsx } from '@instructure/emotion';
|
|
5
|
-
import { MenuSeparatorProps } from './
|
|
4
|
+
import type { MenuSeparatorProps } from './props';
|
|
6
5
|
/**
|
|
7
6
|
---
|
|
8
7
|
parent: Menu
|
|
@@ -12,10 +11,8 @@ id: Menu.Separator
|
|
|
12
11
|
**/
|
|
13
12
|
declare class MenuItemSeparator extends Component<MenuSeparatorProps> {
|
|
14
13
|
static readonly componentId = "Menu.Separator";
|
|
15
|
-
static propTypes:
|
|
16
|
-
|
|
17
|
-
styles: PropTypes.Requireable<object>;
|
|
18
|
-
};
|
|
14
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<never>;
|
|
15
|
+
static allowedProps: readonly never[];
|
|
19
16
|
componentDidMount(): void;
|
|
20
17
|
componentDidUpdate(): void;
|
|
21
18
|
render(): jsx.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemSeparator/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemSeparator/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAQrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEjD;;;;;;GAMG;AACH,cAEM,iBAAkB,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,WAAW,oBAAmB;IAE9C,MAAM,CAAC,SAAS,+EAAY;IAC5B,MAAM,CAAC,YAAY,mBAAe;IAElC,iBAAiB;IAKjB,kBAAkB;IAKlB,MAAM;CAUP;AAED,eAAe,iBAAiB,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WithStyleProps } from '@instructure/emotion';
|
|
2
|
+
import type { PropValidators } from '@instructure/shared-types';
|
|
3
|
+
declare type MenuSeparatorOwnProps = {};
|
|
4
|
+
declare type PropKeys = keyof MenuSeparatorOwnProps;
|
|
5
|
+
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
6
|
+
declare type MenuSeparatorProps = MenuSeparatorOwnProps & WithStyleProps;
|
|
7
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
8
|
+
declare const allowedProps: AllowedPropKeys;
|
|
9
|
+
export type { MenuSeparatorProps };
|
|
10
|
+
export { propTypes, allowedProps };
|
|
11
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemSeparator/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAI/D,aAAK,qBAAqB,GAAG,EAAE,CAAA;AAE/B,aAAK,QAAQ,GAAG,MAAM,qBAAqB,CAAA;AAE3C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,kBAAkB,GAAG,qBAAqB,GAAG,cAAc,CAAA;AAEhE,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAAM,CAAA;AAE9C,QAAA,MAAM,YAAY,EAAE,eAAoB,CAAA;AAExC,YAAY,EAAE,kBAAkB,EAAE,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Theme } from '@instructure/ui-themes';
|
|
1
|
+
import type { Theme } from '@instructure/ui-themes';
|
|
2
2
|
import { MenuSeparatorTheme } from '@instructure/shared-types';
|
|
3
3
|
/**
|
|
4
4
|
* Generates the theme object for the component from the theme and provided additional information
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemSeparator/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/Menu/MenuItemSeparator/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,UAAW,KAAK,KAAG,kBAY9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
package/types/Menu/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { Component } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
2
|
+
import { Component, ReactElement } from 'react';
|
|
4
3
|
import { MenuItem } from './MenuItem';
|
|
5
4
|
import { MenuItemGroup } from './MenuItemGroup';
|
|
6
5
|
import { MenuItemSeparator } from './MenuItemSeparator';
|
|
7
6
|
import { jsx } from '@instructure/emotion';
|
|
8
|
-
import { MenuProps } from './
|
|
7
|
+
import type { MenuProps } from './props';
|
|
9
8
|
/**
|
|
10
9
|
---
|
|
11
10
|
category: components
|
|
@@ -13,122 +12,64 @@ category: components
|
|
|
13
12
|
**/
|
|
14
13
|
declare class Menu extends Component<MenuProps> {
|
|
15
14
|
static readonly componentId = "Menu";
|
|
16
|
-
static propTypes: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
|
|
75
|
-
/**
|
|
76
|
-
* Callback fired on the onKeyDown of the `<Menu />`
|
|
77
|
-
*/
|
|
78
|
-
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
79
|
-
/**
|
|
80
|
-
* Callback fired on the onKeyUp of the `<Menu />`
|
|
81
|
-
*/
|
|
82
|
-
onKeyUp: PropTypes.Requireable<(...args: any[]) => any>;
|
|
83
|
-
menuRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
|
-
/**
|
|
85
|
-
* A function that returns a reference to the `<Popover />`
|
|
86
|
-
*/
|
|
87
|
-
popoverRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
88
|
-
/**
|
|
89
|
-
* If a trigger is supplied, an element or a function returning an element to use as the mount node
|
|
90
|
-
* for the `<Menu />` (defaults to `document.body`)
|
|
91
|
-
*/
|
|
92
|
-
mountNode: PropTypes.Requireable<PropTypes.ReactElementLike | Element | ((...args: any[]) => any)>;
|
|
93
|
-
/**
|
|
94
|
-
* The parent in which to constrain the menu.
|
|
95
|
-
* One of: 'window', 'scroll-parent', 'parent', 'none', an element,
|
|
96
|
-
* or a function returning an element
|
|
97
|
-
*/
|
|
98
|
-
constrain: PropTypes.Requireable<string | PropTypes.ReactElementLike | Element | ((...args: any[]) => any)>;
|
|
99
|
-
/**
|
|
100
|
-
* If a trigger is supplied, an element, function returning an element, or array of elements that will not
|
|
101
|
-
* be hidden from the screen reader when the `<Menu />` is open
|
|
102
|
-
*/
|
|
103
|
-
liveRegion: PropTypes.Requireable<((...args: any[]) => any) | PropTypes.ReactElementLike | (PropTypes.ReactElementLike | null | undefined)[]>;
|
|
104
|
-
/**
|
|
105
|
-
* If a trigger is supplied, should the `<Menu />` hide when an item is selected
|
|
106
|
-
*/
|
|
107
|
-
shouldHideOnSelect: PropTypes.Requireable<boolean>;
|
|
108
|
-
/**
|
|
109
|
-
* If a trigger is supplied, should the `<Menu />` focus the trigger on after closing
|
|
110
|
-
*/
|
|
111
|
-
shouldFocusTriggerOnClose: PropTypes.Requireable<boolean>;
|
|
112
|
-
/**
|
|
113
|
-
* The type of `<Menu />`
|
|
114
|
-
*/
|
|
115
|
-
type: PropTypes.Requireable<string>;
|
|
116
|
-
id: PropTypes.Requireable<string>;
|
|
117
|
-
/**
|
|
118
|
-
* Whether or not an arrow pointing to the trigger should be rendered
|
|
119
|
-
*/
|
|
120
|
-
withArrow: PropTypes.Requireable<boolean>;
|
|
121
|
-
/**
|
|
122
|
-
* The horizontal offset for the positioned content.
|
|
123
|
-
* Works only if `trigger` is provided.
|
|
124
|
-
*/
|
|
125
|
-
offsetX: PropTypes.Requireable<string | number>;
|
|
126
|
-
/**
|
|
127
|
-
* The vertical offset for the positioned content.
|
|
128
|
-
* Works only if `trigger` is provided.
|
|
129
|
-
*/
|
|
130
|
-
offsetY: PropTypes.Requireable<string | number>;
|
|
131
|
-
};
|
|
15
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
16
|
+
children?: import("react").ReactNode;
|
|
17
|
+
label?: string | undefined;
|
|
18
|
+
disabled?: boolean | undefined;
|
|
19
|
+
trigger?: import("react").ReactNode;
|
|
20
|
+
placement?: import("@instructure/ui-position").PlacementPropValues | undefined;
|
|
21
|
+
defaultShow?: boolean | undefined;
|
|
22
|
+
show?: any;
|
|
23
|
+
onToggle?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
25
|
+
onDismiss?: ((...args: any[]) => any) | undefined;
|
|
26
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
27
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
onMouseOver?: ((...args: any[]) => any) | undefined;
|
|
29
|
+
onKeyDown?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
onKeyUp?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
menuRef?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
popoverRef?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
mountNode?: import("@instructure/ui-position").PositionMountNode | undefined;
|
|
34
|
+
constrain?: import("@instructure/ui-position").PositionConstraint | undefined;
|
|
35
|
+
liveRegion?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | ((...args: any[]) => any) | undefined;
|
|
36
|
+
shouldHideOnSelect?: boolean | undefined;
|
|
37
|
+
shouldFocusTriggerOnClose?: boolean | undefined;
|
|
38
|
+
type?: "flyout" | undefined;
|
|
39
|
+
id?: string | undefined;
|
|
40
|
+
withArrow?: boolean | undefined;
|
|
41
|
+
offsetX?: string | number | undefined;
|
|
42
|
+
offsetY?: string | number | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
static allowedProps: readonly (keyof {
|
|
45
|
+
children?: import("react").ReactNode;
|
|
46
|
+
label?: string | undefined;
|
|
47
|
+
disabled?: boolean | undefined;
|
|
48
|
+
trigger?: import("react").ReactNode;
|
|
49
|
+
placement?: import("@instructure/ui-position").PlacementPropValues | undefined;
|
|
50
|
+
defaultShow?: boolean | undefined;
|
|
51
|
+
show?: any;
|
|
52
|
+
onToggle?: ((...args: any[]) => any) | undefined;
|
|
53
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
54
|
+
onDismiss?: ((...args: any[]) => any) | undefined;
|
|
55
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
56
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
onMouseOver?: ((...args: any[]) => any) | undefined;
|
|
58
|
+
onKeyDown?: ((...args: any[]) => any) | undefined;
|
|
59
|
+
onKeyUp?: ((...args: any[]) => any) | undefined;
|
|
60
|
+
menuRef?: ((...args: any[]) => any) | undefined;
|
|
61
|
+
popoverRef?: ((...args: any[]) => any) | undefined;
|
|
62
|
+
mountNode?: import("@instructure/ui-position").PositionMountNode | undefined;
|
|
63
|
+
constrain?: import("@instructure/ui-position").PositionConstraint | undefined;
|
|
64
|
+
liveRegion?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | ((...args: any[]) => any) | undefined;
|
|
65
|
+
shouldHideOnSelect?: boolean | undefined;
|
|
66
|
+
shouldFocusTriggerOnClose?: boolean | undefined;
|
|
67
|
+
type?: "flyout" | undefined;
|
|
68
|
+
id?: string | undefined;
|
|
69
|
+
withArrow?: boolean | undefined;
|
|
70
|
+
offsetX?: string | number | undefined;
|
|
71
|
+
offsetY?: string | number | undefined;
|
|
72
|
+
})[];
|
|
132
73
|
static defaultProps: {
|
|
133
74
|
children: null;
|
|
134
75
|
label: null;
|
|
@@ -151,9 +92,6 @@ declare class Menu extends Component<MenuProps> {
|
|
|
151
92
|
liveRegion: null;
|
|
152
93
|
shouldHideOnSelect: boolean;
|
|
153
94
|
shouldFocusTriggerOnClose: boolean;
|
|
154
|
-
show: undefined;
|
|
155
|
-
id: undefined;
|
|
156
|
-
type: undefined;
|
|
157
95
|
withArrow: boolean;
|
|
158
96
|
offsetX: number;
|
|
159
97
|
offsetY: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Menu/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAY,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Menu/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAczD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;GAIG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,QAAQ,CAAC,WAAW,UAAS;IAEpC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;MAmClB;IAED,MAAM,CAAC,IAAI,kBAAW;IACtB,MAAM,CAAC,KAAK,uBAAgB;IAC5B,MAAM,CAAC,SAAS,2BAAoB;IAEpC,KAAK;;MAAsB;IAC3B,SAAS,OAAO;IAChB,UAAU,UAAK;IACf,QAAQ,OAAO;IACf,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,QAAQ,SAAqB;IAC7B,cAAc,OAAO;gBAGT,KAAK,KAAA;IAMjB,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA;IAK5B,MAAM,CAAC,WAAW;;;OAAc;IAGhC,gBAAgB,sBAGf;IAGD,cAAc,sBAMb;IAED,IAAI,SAAS,YAEZ;IAGD,gBAAgB,wBAEf;IAGD,oBAAoB,uBAMnB;IAED,sBAAsB,aAKrB;IAGD,YAAY,uBAIX;IAGD,iBAAiB,uBAuBhB;IAGD,oBAAoB,6DAQnB;IAED,mBAAmB,aAElB;IAED,kBAAkB,aAEjB;IAGD,uBAAuB,sCAKtB;IAGD,iBAAiB,uBAMhB;IAGD,mBAAmB,qCAIlB;IAGD,oBAAoB,2CAInB;IAGD,IAAI,uBAKH;IAGD,IAAI,uBAKH;IAED,KAAK;IAiBL,OAAO;IAQP,IAAI,YAAY,WAKf;IAGD,SAAS,CAAC,IAAI,KAAA;IAkBd,IAAI,KAAK,QAGR;IAED,cAAc;IA4Gd,UAAU;IAsDV,MAAM;CAiEP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import type { PropValidators } from '@instructure/shared-types';
|
|
3
|
+
import type { WithStyleProps } from '@instructure/emotion';
|
|
4
|
+
import type { PlacementPropValues, PositionConstraint, PositionMountNode } from '@instructure/ui-position';
|
|
5
|
+
declare type MenuOwnProps = {
|
|
6
|
+
children?: React.ReactNode;
|
|
6
7
|
label?: string;
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
trigger?: React.ReactNode;
|
|
@@ -30,4 +31,11 @@ export declare type MenuProps = {
|
|
|
30
31
|
offsetX?: string | number;
|
|
31
32
|
offsetY?: string | number;
|
|
32
33
|
};
|
|
33
|
-
|
|
34
|
+
declare type PropKeys = keyof MenuOwnProps;
|
|
35
|
+
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
36
|
+
declare type MenuProps = MenuOwnProps & WithStyleProps;
|
|
37
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
38
|
+
declare const allowedProps: AllowedPropKeys;
|
|
39
|
+
export type { MenuProps };
|
|
40
|
+
export { propTypes, allowedProps };
|
|
41
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Menu/props.ts"],"names":[],"mappings":";AAgCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,0BAA0B,CAAA;AAEjC,aAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,mBAAmB,CAAA;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAClC,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAClC,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACnC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAChC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACrC,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACnC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,UAAU,CAAC,EACP,KAAK,CAAC,YAAY,EAAE,GACpB,KAAK,CAAC,YAAY,GAClB,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAA;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,yBAAyB,CAAC,EAAE,OAAO,CAAA;IACnC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,YAAY,CAAA;AAElC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,SAAS,GAAG,YAAY,GAAG,cAAc,CAAA;AAE9C,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA0HvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eA4BnB,CAAA;AAED,YAAY,EAAE,SAAS,EAAE,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
package/types/Menu/theme.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/Menu/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/Menu/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,UAAW,KAAK,KAAG,SAgB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Menu, MenuItem, MenuItemGroup, MenuItemSeparator } from './Menu';
|
|
2
|
-
export type { MenuProps } from './Menu/
|
|
3
|
-
export type { MenuItemProps } from './Menu/MenuItem/
|
|
4
|
-
export type { MenuGroupProps } from './Menu/MenuItemGroup/
|
|
5
|
-
export type { MenuSeparatorProps } from './Menu/MenuItemSeparator/
|
|
2
|
+
export type { MenuProps } from './Menu/props';
|
|
3
|
+
export type { MenuItemProps } from './Menu/MenuItem/props';
|
|
4
|
+
export type { MenuGroupProps } from './Menu/MenuItemGroup/props';
|
|
5
|
+
export type { MenuSeparatorProps } from './Menu/MenuItemSeparator/props';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/Menu/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/lib/Menu/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/src/Menu/types.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* The MIT License (MIT)
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
* copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
* SOFTWARE.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
import {
|
|
26
|
-
PlacementPropValues,
|
|
27
|
-
PositionConstraint,
|
|
28
|
-
PositionMountNode
|
|
29
|
-
} from '@instructure/ui-position'
|
|
30
|
-
|
|
31
|
-
export type MenuProps = {
|
|
32
|
-
makeStyles?: (...args: any[]) => any
|
|
33
|
-
styles?: any
|
|
34
|
-
label?: string
|
|
35
|
-
disabled?: boolean
|
|
36
|
-
trigger?: React.ReactNode
|
|
37
|
-
placement?: PlacementPropValues
|
|
38
|
-
defaultShow?: boolean
|
|
39
|
-
show?: any // TODO: controllable(PropTypes.bool, 'onToggle', 'defaultShow')
|
|
40
|
-
onToggle?: (...args: any[]) => any
|
|
41
|
-
onSelect?: (...args: any[]) => any
|
|
42
|
-
onDismiss?: (...args: any[]) => any
|
|
43
|
-
onBlur?: (...args: any[]) => any
|
|
44
|
-
onFocus?: (...args: any[]) => any
|
|
45
|
-
onMouseOver?: (...args: any[]) => any
|
|
46
|
-
onKeyDown?: (...args: any[]) => any
|
|
47
|
-
onKeyUp?: (...args: any[]) => any
|
|
48
|
-
menuRef?: (...args: any[]) => any
|
|
49
|
-
popoverRef?: (...args: any[]) => any
|
|
50
|
-
mountNode?: PositionMountNode
|
|
51
|
-
constrain?: PositionConstraint
|
|
52
|
-
liveRegion?:
|
|
53
|
-
| React.ReactElement[]
|
|
54
|
-
| React.ReactElement
|
|
55
|
-
| ((...args: any[]) => any)
|
|
56
|
-
shouldHideOnSelect?: boolean
|
|
57
|
-
shouldFocusTriggerOnClose?: boolean
|
|
58
|
-
type?: 'flyout'
|
|
59
|
-
id?: string
|
|
60
|
-
withArrow?: boolean
|
|
61
|
-
offsetX?: string | number
|
|
62
|
-
offsetY?: string | number
|
|
63
|
-
}
|