@radix-ui/react-toggle-group 1.1.0 → 1.1.1-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,28 +1,17 @@
1
- import * as React from 'react';
2
- import React__default from 'react';
1
+ import * as _radix_ui_react_context from '@radix-ui/react-context';
2
+ import React from 'react';
3
3
  import { Primitive } from '@radix-ui/react-primitive';
4
4
  import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
5
5
  import { Toggle } from '@radix-ui/react-toggle';
6
6
 
7
- type Scope<C = any> = {
8
- [scopeName: string]: React.Context<C>[];
9
- } | undefined;
10
- type ScopeHook = (scope: Scope) => {
11
- [__scopeProp: string]: Scope;
12
- };
13
- interface CreateScope {
14
- scopeName: string;
15
- (): ScopeHook;
16
- }
17
-
18
- declare const createToggleGroupScope: CreateScope;
7
+ declare const createToggleGroupScope: _radix_ui_react_context.CreateScope;
19
8
  interface ToggleGroupSingleProps extends ToggleGroupImplSingleProps {
20
9
  type: 'single';
21
10
  }
22
11
  interface ToggleGroupMultipleProps extends ToggleGroupImplMultipleProps {
23
12
  type: 'multiple';
24
13
  }
25
- declare const ToggleGroup: React__default.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React__default.RefAttributes<HTMLDivElement>>;
14
+ declare const ToggleGroup: React.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
26
15
  interface ToggleGroupImplSingleProps extends ToggleGroupImplProps {
27
16
  /**
28
17
  * The controlled stateful value of the item that is pressed.
@@ -53,8 +42,8 @@ interface ToggleGroupImplMultipleProps extends ToggleGroupImplProps {
53
42
  */
54
43
  onValueChange?(value: string[]): void;
55
44
  }
56
- type RovingFocusGroupProps = React__default.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
57
- type PrimitiveDivProps = React__default.ComponentPropsWithoutRef<typeof Primitive.div>;
45
+ type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
46
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
58
47
  interface ToggleGroupImplProps extends PrimitiveDivProps {
59
48
  /**
60
49
  * Whether the group is disabled from user interaction.
@@ -72,15 +61,15 @@ interface ToggleGroupImplProps extends PrimitiveDivProps {
72
61
  }
73
62
  interface ToggleGroupItemProps extends Omit<ToggleGroupItemImplProps, 'pressed'> {
74
63
  }
75
- declare const ToggleGroupItem: React__default.ForwardRefExoticComponent<ToggleGroupItemProps & React__default.RefAttributes<HTMLButtonElement>>;
76
- type ToggleProps = React__default.ComponentPropsWithoutRef<typeof Toggle>;
64
+ declare const ToggleGroupItem: React.ForwardRefExoticComponent<ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
65
+ type ToggleProps = React.ComponentPropsWithoutRef<typeof Toggle>;
77
66
  interface ToggleGroupItemImplProps extends Omit<ToggleProps, 'defaultPressed' | 'onPressedChange'> {
78
67
  /**
79
68
  * A string value for the toggle group item. All items within a toggle group should use a unique value.
80
69
  */
81
70
  value: string;
82
71
  }
83
- declare const Root: React__default.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React__default.RefAttributes<HTMLDivElement>>;
84
- declare const Item: React__default.ForwardRefExoticComponent<ToggleGroupItemProps & React__default.RefAttributes<HTMLButtonElement>>;
72
+ declare const Root: React.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
73
+ declare const Item: React.ForwardRefExoticComponent<ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
85
74
 
86
75
  export { Item, Root, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupMultipleProps, type ToggleGroupSingleProps, createToggleGroupScope };
package/dist/index.d.ts CHANGED
@@ -1,28 +1,17 @@
1
- import * as React from 'react';
2
- import React__default from 'react';
1
+ import * as _radix_ui_react_context from '@radix-ui/react-context';
2
+ import React from 'react';
3
3
  import { Primitive } from '@radix-ui/react-primitive';
4
4
  import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
5
5
  import { Toggle } from '@radix-ui/react-toggle';
6
6
 
7
- type Scope<C = any> = {
8
- [scopeName: string]: React.Context<C>[];
9
- } | undefined;
10
- type ScopeHook = (scope: Scope) => {
11
- [__scopeProp: string]: Scope;
12
- };
13
- interface CreateScope {
14
- scopeName: string;
15
- (): ScopeHook;
16
- }
17
-
18
- declare const createToggleGroupScope: CreateScope;
7
+ declare const createToggleGroupScope: _radix_ui_react_context.CreateScope;
19
8
  interface ToggleGroupSingleProps extends ToggleGroupImplSingleProps {
20
9
  type: 'single';
21
10
  }
22
11
  interface ToggleGroupMultipleProps extends ToggleGroupImplMultipleProps {
23
12
  type: 'multiple';
24
13
  }
25
- declare const ToggleGroup: React__default.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React__default.RefAttributes<HTMLDivElement>>;
14
+ declare const ToggleGroup: React.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
26
15
  interface ToggleGroupImplSingleProps extends ToggleGroupImplProps {
27
16
  /**
28
17
  * The controlled stateful value of the item that is pressed.
@@ -53,8 +42,8 @@ interface ToggleGroupImplMultipleProps extends ToggleGroupImplProps {
53
42
  */
54
43
  onValueChange?(value: string[]): void;
55
44
  }
56
- type RovingFocusGroupProps = React__default.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
57
- type PrimitiveDivProps = React__default.ComponentPropsWithoutRef<typeof Primitive.div>;
45
+ type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
46
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
58
47
  interface ToggleGroupImplProps extends PrimitiveDivProps {
59
48
  /**
60
49
  * Whether the group is disabled from user interaction.
@@ -72,15 +61,15 @@ interface ToggleGroupImplProps extends PrimitiveDivProps {
72
61
  }
73
62
  interface ToggleGroupItemProps extends Omit<ToggleGroupItemImplProps, 'pressed'> {
74
63
  }
75
- declare const ToggleGroupItem: React__default.ForwardRefExoticComponent<ToggleGroupItemProps & React__default.RefAttributes<HTMLButtonElement>>;
76
- type ToggleProps = React__default.ComponentPropsWithoutRef<typeof Toggle>;
64
+ declare const ToggleGroupItem: React.ForwardRefExoticComponent<ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
65
+ type ToggleProps = React.ComponentPropsWithoutRef<typeof Toggle>;
77
66
  interface ToggleGroupItemImplProps extends Omit<ToggleProps, 'defaultPressed' | 'onPressedChange'> {
78
67
  /**
79
68
  * A string value for the toggle group item. All items within a toggle group should use a unique value.
80
69
  */
81
70
  value: string;
82
71
  }
83
- declare const Root: React__default.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React__default.RefAttributes<HTMLDivElement>>;
84
- declare const Item: React__default.ForwardRefExoticComponent<ToggleGroupItemProps & React__default.RefAttributes<HTMLButtonElement>>;
72
+ declare const Root: React.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
73
+ declare const Item: React.ForwardRefExoticComponent<ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
85
74
 
86
75
  export { Item, Root, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupMultipleProps, type ToggleGroupSingleProps, createToggleGroupScope };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-toggle-group",
3
- "version": "1.1.0",
3
+ "version": "1.1.1-rc.1",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
@@ -28,12 +28,12 @@
28
28
  "version": "yarn version"
29
29
  },
30
30
  "dependencies": {
31
- "@radix-ui/primitive": "1.1.0",
32
- "@radix-ui/react-context": "1.1.0",
31
+ "@radix-ui/primitive": "1.1.1-rc.1",
32
+ "@radix-ui/react-context": "1.1.1",
33
33
  "@radix-ui/react-direction": "1.1.0",
34
- "@radix-ui/react-primitive": "2.0.0",
35
- "@radix-ui/react-roving-focus": "1.1.0",
36
- "@radix-ui/react-toggle": "1.1.0",
34
+ "@radix-ui/react-primitive": "2.0.1-rc.1",
35
+ "@radix-ui/react-roving-focus": "1.1.1-rc.1",
36
+ "@radix-ui/react-toggle": "1.1.1-rc.1",
37
37
  "@radix-ui/react-use-controllable-state": "1.1.0"
38
38
  },
39
39
  "peerDependencies": {
@@ -57,5 +57,6 @@
57
57
  },
58
58
  "bugs": {
59
59
  "url": "https://github.com/radix-ui/primitives/issues"
60
- }
60
+ },
61
+ "stableVersion": "1.1.0"
61
62
  }