@react-types/menu 3.8.1-nightly.3731 → 3.8.1-nightly.3737
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/package.json +4 -4
- package/src/index.d.ts +13 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/menu",
|
|
3
|
-
"version": "3.8.1-nightly.
|
|
3
|
+
"version": "3.8.1-nightly.3737+b64e64f28",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@react-types/overlays": "3.7.1-nightly.
|
|
13
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
12
|
+
"@react-types/overlays": "3.7.1-nightly.3737+b64e64f28",
|
|
13
|
+
"@react-types/shared": "3.0.0-nightly.2037+b64e64f28"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "b64e64f28b3d06a69ad2c5ae0dd994c3a07d4099"
|
|
22
22
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -21,7 +21,14 @@ export interface MenuTriggerProps extends OverlayTriggerProps {
|
|
|
21
21
|
* How the menu is triggered.
|
|
22
22
|
* @default 'press'
|
|
23
23
|
*/
|
|
24
|
-
trigger?: MenuTriggerType
|
|
24
|
+
trigger?: MenuTriggerType
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface SpectrumMenuTriggerProps extends MenuTriggerProps {
|
|
28
|
+
/**
|
|
29
|
+
* The contents of the MenuTrigger - a trigger and a Menu.
|
|
30
|
+
*/
|
|
31
|
+
children: ReactElement[],
|
|
25
32
|
/**
|
|
26
33
|
* Alignment of the menu relative to the trigger.
|
|
27
34
|
* @default 'start'
|
|
@@ -32,23 +39,16 @@ export interface MenuTriggerProps extends OverlayTriggerProps {
|
|
|
32
39
|
* @default 'bottom'
|
|
33
40
|
*/
|
|
34
41
|
direction?: 'bottom' | 'top' | 'left' | 'right' | 'start' | 'end',
|
|
35
|
-
/**
|
|
36
|
-
* Whether the Menu closes when a selection is made.
|
|
37
|
-
* @default true
|
|
38
|
-
*/
|
|
39
|
-
closeOnSelect?: boolean,
|
|
40
42
|
/**
|
|
41
43
|
* Whether the menu should automatically flip direction when space is limited.
|
|
42
44
|
* @default true
|
|
43
45
|
*/
|
|
44
|
-
shouldFlip?: boolean
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface SpectrumMenuTriggerProps extends MenuTriggerProps {
|
|
46
|
+
shouldFlip?: boolean,
|
|
48
47
|
/**
|
|
49
|
-
*
|
|
48
|
+
* Whether the Menu closes when a selection is made.
|
|
49
|
+
* @default true
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
closeOnSelect?: boolean
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export interface MenuProps<T> extends CollectionBase<T>, MultipleSelection {
|
|
@@ -65,22 +65,7 @@ export interface MenuProps<T> extends CollectionBase<T>, MultipleSelection {
|
|
|
65
65
|
export interface AriaMenuProps<T> extends MenuProps<T>, DOMProps, AriaLabelingProps {}
|
|
66
66
|
export interface SpectrumMenuProps<T> extends AriaMenuProps<T>, StyleProps {}
|
|
67
67
|
|
|
68
|
-
export interface SpectrumActionMenuProps<T> extends CollectionBase<T>,
|
|
69
|
-
/**
|
|
70
|
-
* Alignment of the menu relative to the trigger.
|
|
71
|
-
* @default 'start'
|
|
72
|
-
*/
|
|
73
|
-
align?: Alignment, // from shared types
|
|
74
|
-
/**
|
|
75
|
-
* Where the Menu opens relative to its trigger.
|
|
76
|
-
* @default 'bottom'
|
|
77
|
-
*/
|
|
78
|
-
direction?: 'bottom' | 'top' | 'left' | 'right' | 'start' | 'end',
|
|
79
|
-
/**
|
|
80
|
-
* Whether the menu should automatically flip direction when space is limited.
|
|
81
|
-
* @default true
|
|
82
|
-
*/
|
|
83
|
-
shouldFlip?: boolean,
|
|
68
|
+
export interface SpectrumActionMenuProps<T> extends CollectionBase<T>, Omit<SpectrumMenuTriggerProps, 'children'>, StyleProps, DOMProps, AriaLabelingProps {
|
|
84
69
|
/** Whether the button is disabled. */
|
|
85
70
|
isDisabled?: boolean,
|
|
86
71
|
/** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */
|