@react-types/button 3.9.7-nightly.5014 → 3.9.7-nightly.5022

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 +3 -3
  2. package/src/index.d.ts +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/button",
3
- "version": "3.9.7-nightly.5014+8f3c0ea09",
3
+ "version": "3.9.7-nightly.5022+b4093dfef",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/shared": "3.0.0-nightly.3086+8f3c0ea09"
12
+ "@react-types/shared": "3.0.0-nightly.3094+b4093dfef"
13
13
  },
14
14
  "peerDependencies": {
15
15
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
@@ -17,5 +17,5 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
- "gitHead": "8f3c0ea0931107eceba0127fb524b79b46eb838b"
20
+ "gitHead": "b4093dfef3eff0e5fe60d00c53fe2478b96e662f"
21
21
  }
package/src/index.d.ts CHANGED
@@ -59,7 +59,14 @@ interface AriaBaseButtonProps extends FocusableDOMProps, AriaLabelingProps {
59
59
  * The behavior of the button when used in an HTML form.
60
60
  * @default 'button'
61
61
  */
62
- type?: 'button' | 'submit' | 'reset'
62
+ type?: 'button' | 'submit' | 'reset',
63
+ /**
64
+ * Whether to prevent focus from moving to the button when pressing it.
65
+ *
66
+ * Caution, this can make the button inaccessible and should only be used when alternative keyboard interaction is provided,
67
+ * such as ComboBox's MenuTrigger or a NumberField's increment/decrement control.
68
+ */
69
+ preventFocusOnPress?: boolean
63
70
  }
64
71
 
65
72
  export interface AriaButtonProps<T extends ElementType = 'button'> extends ButtonProps, LinkButtonProps<T>, AriaBaseButtonProps {}