@react-types/button 3.10.1 → 3.11.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 +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/button",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.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.28.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": "4d3c72c94eea2d72eb3a0e7d56000c6ef7e39726"
|
|
21
21
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -55,6 +55,8 @@ interface AriaBaseButtonProps extends FocusableDOMProps, AriaLabelingProps {
|
|
|
55
55
|
'aria-controls'?: string,
|
|
56
56
|
/** Indicates the current "pressed" state of toggle buttons. */
|
|
57
57
|
'aria-pressed'?: boolean | 'true' | 'false' | 'mixed',
|
|
58
|
+
/** Indicates whether this element represents the current item within a container or set of related elements. */
|
|
59
|
+
'aria-current'?: boolean | 'true' | 'false' | 'page' | 'step' | 'location' | 'date' | 'time',
|
|
58
60
|
/**
|
|
59
61
|
* The behavior of the button when used in an HTML form.
|
|
60
62
|
* @default 'button'
|
|
@@ -70,7 +72,7 @@ interface AriaBaseButtonProps extends FocusableDOMProps, AriaLabelingProps {
|
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
export interface AriaButtonProps<T extends ElementType = 'button'> extends ButtonProps, LinkButtonProps<T>, AriaBaseButtonProps {}
|
|
73
|
-
export interface AriaToggleButtonProps<T extends ElementType = 'button'> extends ToggleButtonProps, AriaBaseButtonProps, AriaButtonElementTypeProps<T> {}
|
|
75
|
+
export interface AriaToggleButtonProps<T extends ElementType = 'button'> extends ToggleButtonProps, Omit<AriaBaseButtonProps, 'aria-current'>, AriaButtonElementTypeProps<T> {}
|
|
74
76
|
export interface AriaToggleButtonGroupItemProps<E extends ElementType = 'button'> extends Omit<AriaToggleButtonProps<E>, 'id' | 'isSelected' | 'defaultSelected' | 'onChange'> {
|
|
75
77
|
/** An identifier for the item in the `selectedKeys` of a ToggleButtonGroup. */
|
|
76
78
|
id: Key
|
|
@@ -108,7 +110,7 @@ export interface SpectrumLogicButtonProps extends AriaBaseButtonProps, ButtonPro
|
|
|
108
110
|
variant: 'and' | 'or'
|
|
109
111
|
}
|
|
110
112
|
|
|
111
|
-
export interface SpectrumToggleButtonProps extends ToggleButtonProps, SpectrumActionButtonProps {
|
|
113
|
+
export interface SpectrumToggleButtonProps extends ToggleButtonProps, Omit<SpectrumActionButtonProps, 'aria-current'> {
|
|
112
114
|
/** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */
|
|
113
115
|
isEmphasized?: boolean
|
|
114
116
|
}
|