@react-types/menu 3.9.14 → 3.10.0

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 (2) hide show
  1. package/package.json +4 -4
  2. package/src/index.d.ts +11 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/menu",
3
- "version": "3.9.14",
3
+ "version": "3.10.0",
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.8.12",
13
- "@react-types/shared": "^3.27.0"
12
+ "@react-types/overlays": "^3.8.14",
13
+ "@react-types/shared": "^3.29.0"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
@@ -18,5 +18,5 @@
18
18
  "publishConfig": {
19
19
  "access": "public"
20
20
  },
21
- "gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
21
+ "gitHead": "9b66d270572f482948afee95622a85cdf68ed408"
22
22
  }
package/src/index.d.ts CHANGED
@@ -62,7 +62,17 @@ export interface MenuProps<T> extends CollectionBase<T>, MultipleSelection {
62
62
  onClose?: () => void
63
63
  }
64
64
 
65
- export interface AriaMenuProps<T> extends MenuProps<T>, DOMProps, AriaLabelingProps {}
65
+ export interface AriaMenuProps<T> extends MenuProps<T>, DOMProps, AriaLabelingProps {
66
+ /**
67
+ * Whether pressing the escape key should clear selection in the menu or not.
68
+ *
69
+ * Most experiences should not modify this option as it eliminates a keyboard user's ability to
70
+ * easily clear selection. Only use if the escape key is being handled externally or should not
71
+ * trigger selection clearing contextually.
72
+ * @default 'clearSelection'
73
+ */
74
+ escapeKeyBehavior?: 'clearSelection' | 'none'
75
+ }
66
76
  export interface SpectrumMenuProps<T> extends AriaMenuProps<T>, StyleProps {}
67
77
 
68
78
  export interface SpectrumActionMenuProps<T> extends CollectionBase<T>, Omit<SpectrumMenuTriggerProps, 'children'>, StyleProps, DOMProps, AriaLabelingProps {