@react-types/radio 3.0.0-nightly-641446f65-240905

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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @react-types/radio
2
+
3
+ This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@react-types/radio",
3
+ "version": "3.0.0-nightly-641446f65-240905",
4
+ "description": "Spectrum UI components in React",
5
+ "license": "Apache-2.0",
6
+ "types": "src/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/adobe/react-spectrum"
10
+ },
11
+ "dependencies": {
12
+ "@react-types/shared": "^3.0.0-nightly-641446f65-240905"
13
+ },
14
+ "peerDependencies": {
15
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "stableVersion": "3.8.3"
21
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,71 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import {
14
+ AriaLabelingProps,
15
+ AriaValidationProps,
16
+ DOMProps,
17
+ FocusableProps,
18
+ FocusEvents,
19
+ HelpTextProps,
20
+ InputBase,
21
+ InputDOMProps,
22
+ LabelableProps,
23
+ Orientation,
24
+ SpectrumHelpTextProps,
25
+ SpectrumLabelableProps,
26
+ StyleProps,
27
+ Validation,
28
+ ValueBase
29
+ } from '@react-types/shared';
30
+ import {ReactElement, ReactNode} from 'react';
31
+
32
+ export interface RadioGroupProps extends ValueBase<string|null, string>, InputBase, InputDOMProps, Validation<string | null>, LabelableProps, HelpTextProps, FocusEvents {
33
+ /**
34
+ * The axis the Radio Button(s) should align with.
35
+ * @default 'vertical'
36
+ */
37
+ orientation?: Orientation
38
+ }
39
+
40
+ export interface RadioProps extends FocusableProps {
41
+ /**
42
+ * The value of the radio button, used when submitting an HTML form.
43
+ * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#Value).
44
+ */
45
+ value: string,
46
+ /**
47
+ * The label for the Radio. Accepts any renderable node.
48
+ */
49
+ children?: ReactNode,
50
+ /**
51
+ * Whether the radio button is disabled or not.
52
+ * Shows that a selection exists, but is not available in that circumstance.
53
+ */
54
+ isDisabled?: boolean
55
+ }
56
+
57
+ export interface AriaRadioGroupProps extends RadioGroupProps, DOMProps, AriaLabelingProps, AriaValidationProps {}
58
+ export interface SpectrumRadioGroupProps extends AriaRadioGroupProps, SpectrumLabelableProps, StyleProps, SpectrumHelpTextProps {
59
+ /**
60
+ * The Radio(s) contained within the RadioGroup.
61
+ */
62
+ children: ReactElement<RadioProps> | ReactElement<RadioProps>[],
63
+ /**
64
+ * By default, radio buttons are not emphasized (gray).
65
+ * The emphasized (blue) version provides visual prominence.
66
+ */
67
+ isEmphasized?: boolean
68
+ }
69
+
70
+ export interface AriaRadioProps extends RadioProps, DOMProps, AriaLabelingProps {}
71
+ export interface SpectrumRadioProps extends AriaRadioProps, StyleProps {}