@react-types/button 3.12.1 → 3.13.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.
- package/package.json +3 -3
- package/src/index.d.ts +26 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/button",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
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.
|
|
12
|
+
"@react-types/shared": "^3.31.0"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "8b9348ff255e018b2dd9b27e2a45507cadfa1d35"
|
|
21
21
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -68,11 +68,34 @@ interface AriaBaseButtonProps extends FocusableDOMProps, AriaLabelingProps {
|
|
|
68
68
|
* Caution, this can make the button inaccessible and should only be used when alternative keyboard interaction is provided,
|
|
69
69
|
* such as ComboBox's MenuTrigger or a NumberField's increment/decrement control.
|
|
70
70
|
*/
|
|
71
|
-
preventFocusOnPress?: boolean
|
|
71
|
+
preventFocusOnPress?: boolean,
|
|
72
|
+
/**
|
|
73
|
+
* The `<form>` element to associate the button with.
|
|
74
|
+
* The value of this attribute must be the id of a `<form>` in the same document.
|
|
75
|
+
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#form).
|
|
76
|
+
*/
|
|
77
|
+
form?: string,
|
|
78
|
+
/**
|
|
79
|
+
* The URL that processes the information submitted by the button.
|
|
80
|
+
* Overrides the action attribute of the button's form owner.
|
|
81
|
+
*/
|
|
82
|
+
formAction?: string,
|
|
83
|
+
/** Indicates how to encode the form data that is submitted. */
|
|
84
|
+
formEncType?: string,
|
|
85
|
+
/** Indicates the HTTP method used to submit the form. */
|
|
86
|
+
formMethod?: string,
|
|
87
|
+
/** Indicates that the form is not to be validated when it is submitted. */
|
|
88
|
+
formNoValidate?: boolean,
|
|
89
|
+
/** Overrides the target attribute of the button's form owner. */
|
|
90
|
+
formTarget?: string,
|
|
91
|
+
/** Submitted as a pair with the button's value as part of the form data. */
|
|
92
|
+
name?: string,
|
|
93
|
+
/** The value associated with the button's name when it's submitted with the form data. */
|
|
94
|
+
value?: string
|
|
72
95
|
}
|
|
73
96
|
|
|
74
97
|
export interface AriaButtonProps<T extends ElementType = 'button'> extends ButtonProps, LinkButtonProps<T>, AriaBaseButtonProps {}
|
|
75
|
-
export interface AriaToggleButtonProps<T extends ElementType = 'button'> extends ToggleButtonProps, Omit<AriaBaseButtonProps, 'aria-current'>, AriaButtonElementTypeProps<T> {}
|
|
98
|
+
export interface AriaToggleButtonProps<T extends ElementType = 'button'> extends ToggleButtonProps, Omit<AriaBaseButtonProps, 'aria-current' | 'form' | 'formAction' | 'formEncType' | 'formMethod' | 'formNoValidate' | 'formTarget' | 'name' | 'value' | 'type'>, AriaButtonElementTypeProps<T> {}
|
|
76
99
|
export interface AriaToggleButtonGroupItemProps<E extends ElementType = 'button'> extends Omit<AriaToggleButtonProps<E>, 'id' | 'isSelected' | 'defaultSelected' | 'onChange'> {
|
|
77
100
|
/** An identifier for the item in the `selectedKeys` of a ToggleButtonGroup. */
|
|
78
101
|
id: Key
|
|
@@ -110,7 +133,7 @@ export interface SpectrumLogicButtonProps extends AriaBaseButtonProps, Omit<Butt
|
|
|
110
133
|
variant: 'and' | 'or'
|
|
111
134
|
}
|
|
112
135
|
|
|
113
|
-
export interface SpectrumToggleButtonProps extends Omit<ToggleButtonProps, 'onClick'>, Omit<SpectrumActionButtonProps, 'aria-current'> {
|
|
136
|
+
export interface SpectrumToggleButtonProps extends Omit<ToggleButtonProps, 'onClick'>, Omit<SpectrumActionButtonProps, 'aria-current' | 'type' | 'form' | 'formAction' | 'formEncType' | 'formMethod' | 'formNoValidate' | 'formTarget' | 'name' | 'value'> {
|
|
114
137
|
/** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */
|
|
115
138
|
isEmphasized?: boolean
|
|
116
139
|
}
|