@react-types/checkbox 3.8.3 → 3.9.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 +4 -4
- package/src/index.d.ts +9 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/checkbox",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@react-types/shared": "^3.
|
|
12
|
+
"@react-types/shared": "^3.26.0"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
|
|
15
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
|
|
21
21
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -30,11 +30,7 @@ import {
|
|
|
30
30
|
} from '@react-types/shared';
|
|
31
31
|
import {ReactElement, ReactNode} from 'react';
|
|
32
32
|
|
|
33
|
-
export interface
|
|
34
|
-
/**
|
|
35
|
-
* The label for the element.
|
|
36
|
-
*/
|
|
37
|
-
children?: ReactNode,
|
|
33
|
+
export interface ToggleStateOptions extends InputBase {
|
|
38
34
|
/**
|
|
39
35
|
* Whether the element should be selected (uncontrolled).
|
|
40
36
|
*/
|
|
@@ -46,7 +42,14 @@ export interface ToggleProps extends InputBase, Validation<boolean>, FocusablePr
|
|
|
46
42
|
/**
|
|
47
43
|
* Handler that is called when the element's selection state changes.
|
|
48
44
|
*/
|
|
49
|
-
onChange?: (isSelected: boolean) => void
|
|
45
|
+
onChange?: (isSelected: boolean) => void
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ToggleProps extends ToggleStateOptions, Validation<boolean>, FocusableProps {
|
|
49
|
+
/**
|
|
50
|
+
* The label for the element.
|
|
51
|
+
*/
|
|
52
|
+
children?: ReactNode,
|
|
50
53
|
/**
|
|
51
54
|
* The value of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefvalue).
|
|
52
55
|
*/
|