@radix-ui/react-radio-group 1.1.4-rc.8 → 1.2.0-rc.1

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/dist/index.d.mts CHANGED
@@ -1,34 +1,47 @@
1
- import * as React from "react";
2
- import * as Radix from "@radix-ui/react-primitive";
3
- import { Primitive } from "@radix-ui/react-primitive";
4
- import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
5
- type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
6
- interface RadioProps extends PrimitiveButtonProps {
1
+ import * as React from 'react';
2
+ import * as Radix from '@radix-ui/react-primitive';
3
+ import { Primitive } from '@radix-ui/react-primitive';
4
+ import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
5
+
6
+ declare type Scope<C = any> = {
7
+ [scopeName: string]: React.Context<C>[];
8
+ } | undefined;
9
+ declare type ScopeHook = (scope: Scope) => {
10
+ [__scopeProp: string]: Scope;
11
+ };
12
+ interface CreateScope {
13
+ scopeName: string;
14
+ (): ScopeHook;
15
+ }
16
+
17
+ declare type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
18
+ interface RadioProps$1 extends PrimitiveButtonProps {
7
19
  checked?: boolean;
8
20
  required?: boolean;
9
21
  onCheck?(): void;
10
22
  }
11
- declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLButtonElement>>;
12
- type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
13
- interface RadioIndicatorProps extends PrimitiveSpanProps {
23
+ declare const Radio: React.ForwardRefExoticComponent<RadioProps$1 & React.RefAttributes<HTMLButtonElement>>;
24
+ declare type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
25
+ interface RadioIndicatorProps$1 extends PrimitiveSpanProps {
14
26
  /**
15
27
  * Used to force mounting when more control is needed. Useful when
16
28
  * controlling animation with React animation libraries.
17
29
  */
18
30
  forceMount?: true;
19
31
  }
20
- declare const RadioIndicator: React.ForwardRefExoticComponent<RadioIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
21
- export const createRadioGroupScope: import("@radix-ui/react-context").CreateScope;
22
- type RadioGroupContextValue = {
32
+ declare const RadioIndicator: React.ForwardRefExoticComponent<RadioIndicatorProps$1 & React.RefAttributes<HTMLSpanElement>>;
33
+
34
+ declare const createRadioGroupScope: CreateScope;
35
+ declare type RadioGroupContextValue = {
23
36
  name?: string;
24
37
  required: boolean;
25
38
  disabled: boolean;
26
39
  value?: string;
27
40
  onValueChange(value: string): void;
28
41
  };
29
- type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
30
- type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
31
- export interface RadioGroupProps extends PrimitiveDivProps {
42
+ declare type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
43
+ declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
44
+ interface RadioGroupProps extends PrimitiveDivProps {
32
45
  name?: RadioGroupContextValue['name'];
33
46
  required?: Radix.ComponentPropsWithoutRef<typeof Radio>['required'];
34
47
  disabled?: Radix.ComponentPropsWithoutRef<typeof Radio>['disabled'];
@@ -39,18 +52,18 @@ export interface RadioGroupProps extends PrimitiveDivProps {
39
52
  value?: RadioGroupContextValue['value'];
40
53
  onValueChange?: RadioGroupContextValue['onValueChange'];
41
54
  }
42
- export const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
43
- type _RadioProps1 = Radix.ComponentPropsWithoutRef<typeof Radio>;
44
- export interface RadioGroupItemProps extends Omit<_RadioProps1, 'onCheck' | 'name'> {
55
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
56
+ declare type RadioProps = Radix.ComponentPropsWithoutRef<typeof Radio>;
57
+ interface RadioGroupItemProps extends Omit<RadioProps, 'onCheck' | 'name'> {
45
58
  value: string;
46
59
  }
47
- export const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
48
- type _RadioIndicatorProps1 = Radix.ComponentPropsWithoutRef<typeof RadioIndicator>;
49
- export interface RadioGroupIndicatorProps extends _RadioIndicatorProps1 {
60
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
61
+ declare type RadioIndicatorProps = Radix.ComponentPropsWithoutRef<typeof RadioIndicator>;
62
+ interface RadioGroupIndicatorProps extends RadioIndicatorProps {
50
63
  }
51
- export const RadioGroupIndicator: React.ForwardRefExoticComponent<RadioGroupIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
52
- export const Root: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
53
- export const Item: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
54
- export const Indicator: React.ForwardRefExoticComponent<RadioGroupIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
64
+ declare const RadioGroupIndicator: React.ForwardRefExoticComponent<RadioGroupIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
65
+ declare const Root: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
66
+ declare const Item: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
67
+ declare const Indicator: React.ForwardRefExoticComponent<RadioGroupIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
55
68
 
56
- //# sourceMappingURL=index.d.ts.map
69
+ export { Indicator, Item, RadioGroup, RadioGroupIndicator, type RadioGroupIndicatorProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Root, createRadioGroupScope };
package/dist/index.d.ts CHANGED
@@ -1,34 +1,47 @@
1
- import * as React from "react";
2
- import * as Radix from "@radix-ui/react-primitive";
3
- import { Primitive } from "@radix-ui/react-primitive";
4
- import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
5
- type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
6
- interface RadioProps extends PrimitiveButtonProps {
1
+ import * as React from 'react';
2
+ import * as Radix from '@radix-ui/react-primitive';
3
+ import { Primitive } from '@radix-ui/react-primitive';
4
+ import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
5
+
6
+ declare type Scope<C = any> = {
7
+ [scopeName: string]: React.Context<C>[];
8
+ } | undefined;
9
+ declare type ScopeHook = (scope: Scope) => {
10
+ [__scopeProp: string]: Scope;
11
+ };
12
+ interface CreateScope {
13
+ scopeName: string;
14
+ (): ScopeHook;
15
+ }
16
+
17
+ declare type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
18
+ interface RadioProps$1 extends PrimitiveButtonProps {
7
19
  checked?: boolean;
8
20
  required?: boolean;
9
21
  onCheck?(): void;
10
22
  }
11
- declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLButtonElement>>;
12
- type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
13
- interface RadioIndicatorProps extends PrimitiveSpanProps {
23
+ declare const Radio: React.ForwardRefExoticComponent<RadioProps$1 & React.RefAttributes<HTMLButtonElement>>;
24
+ declare type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
25
+ interface RadioIndicatorProps$1 extends PrimitiveSpanProps {
14
26
  /**
15
27
  * Used to force mounting when more control is needed. Useful when
16
28
  * controlling animation with React animation libraries.
17
29
  */
18
30
  forceMount?: true;
19
31
  }
20
- declare const RadioIndicator: React.ForwardRefExoticComponent<RadioIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
21
- export const createRadioGroupScope: import("@radix-ui/react-context").CreateScope;
22
- type RadioGroupContextValue = {
32
+ declare const RadioIndicator: React.ForwardRefExoticComponent<RadioIndicatorProps$1 & React.RefAttributes<HTMLSpanElement>>;
33
+
34
+ declare const createRadioGroupScope: CreateScope;
35
+ declare type RadioGroupContextValue = {
23
36
  name?: string;
24
37
  required: boolean;
25
38
  disabled: boolean;
26
39
  value?: string;
27
40
  onValueChange(value: string): void;
28
41
  };
29
- type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
30
- type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
31
- export interface RadioGroupProps extends PrimitiveDivProps {
42
+ declare type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
43
+ declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
44
+ interface RadioGroupProps extends PrimitiveDivProps {
32
45
  name?: RadioGroupContextValue['name'];
33
46
  required?: Radix.ComponentPropsWithoutRef<typeof Radio>['required'];
34
47
  disabled?: Radix.ComponentPropsWithoutRef<typeof Radio>['disabled'];
@@ -39,18 +52,18 @@ export interface RadioGroupProps extends PrimitiveDivProps {
39
52
  value?: RadioGroupContextValue['value'];
40
53
  onValueChange?: RadioGroupContextValue['onValueChange'];
41
54
  }
42
- export const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
43
- type _RadioProps1 = Radix.ComponentPropsWithoutRef<typeof Radio>;
44
- export interface RadioGroupItemProps extends Omit<_RadioProps1, 'onCheck' | 'name'> {
55
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
56
+ declare type RadioProps = Radix.ComponentPropsWithoutRef<typeof Radio>;
57
+ interface RadioGroupItemProps extends Omit<RadioProps, 'onCheck' | 'name'> {
45
58
  value: string;
46
59
  }
47
- export const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
48
- type _RadioIndicatorProps1 = Radix.ComponentPropsWithoutRef<typeof RadioIndicator>;
49
- export interface RadioGroupIndicatorProps extends _RadioIndicatorProps1 {
60
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
61
+ declare type RadioIndicatorProps = Radix.ComponentPropsWithoutRef<typeof RadioIndicator>;
62
+ interface RadioGroupIndicatorProps extends RadioIndicatorProps {
50
63
  }
51
- export const RadioGroupIndicator: React.ForwardRefExoticComponent<RadioGroupIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
52
- export const Root: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
53
- export const Item: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
54
- export const Indicator: React.ForwardRefExoticComponent<RadioGroupIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
64
+ declare const RadioGroupIndicator: React.ForwardRefExoticComponent<RadioGroupIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
65
+ declare const Root: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
66
+ declare const Item: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
67
+ declare const Indicator: React.ForwardRefExoticComponent<RadioGroupIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
55
68
 
56
- //# sourceMappingURL=index.d.ts.map
69
+ export { Indicator, Item, RadioGroup, RadioGroupIndicator, type RadioGroupIndicatorProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Root, createRadioGroupScope };