@react-types/checkbox 3.10.4 → 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 +10 -4
- package/src/index.d.ts +5 -101
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/checkbox",
|
|
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,13 +9,19 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@react-
|
|
12
|
+
"@react-aria/checkbox": "^3.17.0",
|
|
13
|
+
"@react-aria/toggle": "^3.13.0",
|
|
14
|
+
"@react-spectrum/checkbox": "^3.11.0",
|
|
15
|
+
"@react-stately/checkbox": "^3.8.0",
|
|
16
|
+
"@react-stately/toggle": "^3.10.0"
|
|
13
17
|
},
|
|
14
18
|
"peerDependencies": {
|
|
15
|
-
"react": "^
|
|
19
|
+
"@react-spectrum/provider": "^3.0.0",
|
|
20
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
21
|
+
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
16
22
|
},
|
|
17
23
|
"publishConfig": {
|
|
18
24
|
"access": "public"
|
|
19
25
|
},
|
|
20
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
21
27
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -10,104 +10,8 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
FocusableProps,
|
|
19
|
-
FocusEvents,
|
|
20
|
-
HelpTextProps,
|
|
21
|
-
InputBase,
|
|
22
|
-
InputDOMProps,
|
|
23
|
-
LabelableProps,
|
|
24
|
-
Orientation,
|
|
25
|
-
PressEvents,
|
|
26
|
-
SpectrumHelpTextProps,
|
|
27
|
-
SpectrumLabelableProps,
|
|
28
|
-
StyleProps,
|
|
29
|
-
Validation,
|
|
30
|
-
ValueBase
|
|
31
|
-
} from '@react-types/shared';
|
|
32
|
-
import {ReactElement, ReactNode} from 'react';
|
|
33
|
-
|
|
34
|
-
export interface ToggleStateOptions extends InputBase {
|
|
35
|
-
/**
|
|
36
|
-
* Whether the element should be selected (uncontrolled).
|
|
37
|
-
*/
|
|
38
|
-
defaultSelected?: boolean,
|
|
39
|
-
/**
|
|
40
|
-
* Whether the element should be selected (controlled).
|
|
41
|
-
*/
|
|
42
|
-
isSelected?: boolean,
|
|
43
|
-
/**
|
|
44
|
-
* Handler that is called when the element's selection state changes.
|
|
45
|
-
*/
|
|
46
|
-
onChange?: (isSelected: boolean) => void
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface ToggleProps extends ToggleStateOptions, Validation<boolean>, FocusableProps {
|
|
50
|
-
/**
|
|
51
|
-
* The label for the element.
|
|
52
|
-
*/
|
|
53
|
-
children?: ReactNode,
|
|
54
|
-
/**
|
|
55
|
-
* 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).
|
|
56
|
-
*/
|
|
57
|
-
value?: string
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface AriaToggleProps extends ToggleProps, FocusableDOMProps, AriaLabelingProps, AriaValidationProps, InputDOMProps, PressEvents {
|
|
61
|
-
/**
|
|
62
|
-
* Identifies the element (or elements) whose contents or presence are controlled by the current element.
|
|
63
|
-
*/
|
|
64
|
-
'aria-controls'?: string
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface CheckboxGroupProps extends ValueBase<string[]>, Pick<InputDOMProps, 'name'>, InputBase, LabelableProps, HelpTextProps, Validation<string[]> {}
|
|
68
|
-
|
|
69
|
-
export interface CheckboxProps extends ToggleProps {
|
|
70
|
-
/**
|
|
71
|
-
* Indeterminism is presentational only.
|
|
72
|
-
* The indeterminate visual representation remains regardless of user interaction.
|
|
73
|
-
*/
|
|
74
|
-
isIndeterminate?: boolean
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface AriaCheckboxProps extends CheckboxProps, InputDOMProps, AriaToggleProps {}
|
|
78
|
-
|
|
79
|
-
export interface AriaCheckboxGroupProps extends CheckboxGroupProps, InputDOMProps, DOMProps, AriaLabelingProps, AriaValidationProps, FocusEvents {}
|
|
80
|
-
|
|
81
|
-
export interface AriaCheckboxGroupItemProps extends Omit<AriaCheckboxProps, 'isSelected' | 'defaultSelected'> {
|
|
82
|
-
value: string
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface SpectrumCheckboxProps extends Omit<AriaCheckboxProps, 'onClick'>, StyleProps {
|
|
86
|
-
/**
|
|
87
|
-
* This prop sets the emphasized style which provides visual prominence.
|
|
88
|
-
*/
|
|
89
|
-
isEmphasized?: boolean,
|
|
90
|
-
/**
|
|
91
|
-
* A slot name for the component. Slots allow the component to receive props from a parent component.
|
|
92
|
-
* An explicit `null` value indicates that the local props completely override all props received from a parent.
|
|
93
|
-
* @private
|
|
94
|
-
*/
|
|
95
|
-
slot?: string | null
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface SpectrumCheckboxGroupProps extends AriaCheckboxGroupProps, SpectrumLabelableProps, Validation<string[]>, StyleProps, SpectrumHelpTextProps {
|
|
99
|
-
/**
|
|
100
|
-
* The Checkboxes contained within the CheckboxGroup.
|
|
101
|
-
*/
|
|
102
|
-
children: ReactElement<CheckboxProps> | ReactElement<CheckboxProps>[],
|
|
103
|
-
/**
|
|
104
|
-
* The axis the checkboxes should align with.
|
|
105
|
-
* @default 'vertical'
|
|
106
|
-
*/
|
|
107
|
-
orientation?: Orientation,
|
|
108
|
-
/**
|
|
109
|
-
* By default, checkboxes are not emphasized (gray).
|
|
110
|
-
* The emphasized (blue) version provides visual prominence.
|
|
111
|
-
*/
|
|
112
|
-
isEmphasized?: boolean
|
|
113
|
-
}
|
|
13
|
+
export {ToggleStateOptions, ToggleProps} from '@react-stately/toggle';
|
|
14
|
+
export {AriaToggleProps} from '@react-aria/toggle';
|
|
15
|
+
export {CheckboxGroupProps} from '@react-stately/checkbox';
|
|
16
|
+
export {CheckboxProps, AriaCheckboxProps, AriaCheckboxGroupProps, AriaCheckboxGroupItemProps} from '@react-aria/checkbox';
|
|
17
|
+
export {SpectrumCheckboxProps, SpectrumCheckboxGroupProps} from '@react-spectrum/checkbox';
|