@radix-ui/react-roving-focus 1.0.5-rc.9 → 1.1.0-rc.2

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,9 +1,21 @@
1
- import * as React from "react";
2
- import * as Radix from "@radix-ui/react-primitive";
3
- import { Primitive } from "@radix-ui/react-primitive";
4
- export const createRovingFocusGroupScope: import("@radix-ui/react-context").CreateScope;
5
- type Orientation = React.AriaAttributes['aria-orientation'];
6
- type Direction = 'ltr' | 'rtl';
1
+ import * as React from 'react';
2
+ import * as Radix from '@radix-ui/react-primitive';
3
+ import { Primitive } from '@radix-ui/react-primitive';
4
+
5
+ declare type Scope<C = any> = {
6
+ [scopeName: string]: React.Context<C>[];
7
+ } | undefined;
8
+ declare type ScopeHook = (scope: Scope) => {
9
+ [__scopeProp: string]: Scope;
10
+ };
11
+ interface CreateScope {
12
+ scopeName: string;
13
+ (): ScopeHook;
14
+ }
15
+
16
+ declare const createRovingFocusGroupScope: CreateScope;
17
+ declare type Orientation = React.AriaAttributes['aria-orientation'];
18
+ declare type Direction = 'ltr' | 'rtl';
7
19
  interface RovingFocusGroupOptions {
8
20
  /**
9
21
  * The orientation of the group.
@@ -20,10 +32,10 @@ interface RovingFocusGroupOptions {
20
32
  */
21
33
  loop?: boolean;
22
34
  }
23
- export interface RovingFocusGroupProps extends RovingFocusGroupImplProps {
35
+ interface RovingFocusGroupProps extends RovingFocusGroupImplProps {
24
36
  }
25
- export const RovingFocusGroup: React.ForwardRefExoticComponent<RovingFocusGroupProps & React.RefAttributes<HTMLDivElement>>;
26
- type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
37
+ declare const RovingFocusGroup: React.ForwardRefExoticComponent<RovingFocusGroupProps & React.RefAttributes<HTMLDivElement>>;
38
+ declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
27
39
  interface RovingFocusGroupImplProps extends Omit<PrimitiveDivProps, 'dir'>, RovingFocusGroupOptions {
28
40
  currentTabStopId?: string | null;
29
41
  defaultCurrentTabStopId?: string;
@@ -31,14 +43,14 @@ interface RovingFocusGroupImplProps extends Omit<PrimitiveDivProps, 'dir'>, Rovi
31
43
  onEntryFocus?: (event: Event) => void;
32
44
  preventScrollOnEntryFocus?: boolean;
33
45
  }
34
- type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
35
- export interface RovingFocusItemProps extends PrimitiveSpanProps {
46
+ declare type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
47
+ interface RovingFocusItemProps extends PrimitiveSpanProps {
36
48
  tabStopId?: string;
37
49
  focusable?: boolean;
38
50
  active?: boolean;
39
51
  }
40
- export const RovingFocusGroupItem: React.ForwardRefExoticComponent<RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>>;
41
- export const Root: React.ForwardRefExoticComponent<RovingFocusGroupProps & React.RefAttributes<HTMLDivElement>>;
42
- export const Item: React.ForwardRefExoticComponent<RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>>;
52
+ declare const RovingFocusGroupItem: React.ForwardRefExoticComponent<RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>>;
53
+ declare const Root: React.ForwardRefExoticComponent<RovingFocusGroupProps & React.RefAttributes<HTMLDivElement>>;
54
+ declare const Item: React.ForwardRefExoticComponent<RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>>;
43
55
 
44
- //# sourceMappingURL=index.d.ts.map
56
+ export { Item, Root, RovingFocusGroup, RovingFocusGroupItem, type RovingFocusGroupProps, type RovingFocusItemProps, createRovingFocusGroupScope };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,21 @@
1
- import * as React from "react";
2
- import * as Radix from "@radix-ui/react-primitive";
3
- import { Primitive } from "@radix-ui/react-primitive";
4
- export const createRovingFocusGroupScope: import("@radix-ui/react-context").CreateScope;
5
- type Orientation = React.AriaAttributes['aria-orientation'];
6
- type Direction = 'ltr' | 'rtl';
1
+ import * as React from 'react';
2
+ import * as Radix from '@radix-ui/react-primitive';
3
+ import { Primitive } from '@radix-ui/react-primitive';
4
+
5
+ declare type Scope<C = any> = {
6
+ [scopeName: string]: React.Context<C>[];
7
+ } | undefined;
8
+ declare type ScopeHook = (scope: Scope) => {
9
+ [__scopeProp: string]: Scope;
10
+ };
11
+ interface CreateScope {
12
+ scopeName: string;
13
+ (): ScopeHook;
14
+ }
15
+
16
+ declare const createRovingFocusGroupScope: CreateScope;
17
+ declare type Orientation = React.AriaAttributes['aria-orientation'];
18
+ declare type Direction = 'ltr' | 'rtl';
7
19
  interface RovingFocusGroupOptions {
8
20
  /**
9
21
  * The orientation of the group.
@@ -20,10 +32,10 @@ interface RovingFocusGroupOptions {
20
32
  */
21
33
  loop?: boolean;
22
34
  }
23
- export interface RovingFocusGroupProps extends RovingFocusGroupImplProps {
35
+ interface RovingFocusGroupProps extends RovingFocusGroupImplProps {
24
36
  }
25
- export const RovingFocusGroup: React.ForwardRefExoticComponent<RovingFocusGroupProps & React.RefAttributes<HTMLDivElement>>;
26
- type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
37
+ declare const RovingFocusGroup: React.ForwardRefExoticComponent<RovingFocusGroupProps & React.RefAttributes<HTMLDivElement>>;
38
+ declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
27
39
  interface RovingFocusGroupImplProps extends Omit<PrimitiveDivProps, 'dir'>, RovingFocusGroupOptions {
28
40
  currentTabStopId?: string | null;
29
41
  defaultCurrentTabStopId?: string;
@@ -31,14 +43,14 @@ interface RovingFocusGroupImplProps extends Omit<PrimitiveDivProps, 'dir'>, Rovi
31
43
  onEntryFocus?: (event: Event) => void;
32
44
  preventScrollOnEntryFocus?: boolean;
33
45
  }
34
- type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
35
- export interface RovingFocusItemProps extends PrimitiveSpanProps {
46
+ declare type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
47
+ interface RovingFocusItemProps extends PrimitiveSpanProps {
36
48
  tabStopId?: string;
37
49
  focusable?: boolean;
38
50
  active?: boolean;
39
51
  }
40
- export const RovingFocusGroupItem: React.ForwardRefExoticComponent<RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>>;
41
- export const Root: React.ForwardRefExoticComponent<RovingFocusGroupProps & React.RefAttributes<HTMLDivElement>>;
42
- export const Item: React.ForwardRefExoticComponent<RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>>;
52
+ declare const RovingFocusGroupItem: React.ForwardRefExoticComponent<RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>>;
53
+ declare const Root: React.ForwardRefExoticComponent<RovingFocusGroupProps & React.RefAttributes<HTMLDivElement>>;
54
+ declare const Item: React.ForwardRefExoticComponent<RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>>;
43
55
 
44
- //# sourceMappingURL=index.d.ts.map
56
+ export { Item, Root, RovingFocusGroup, RovingFocusGroupItem, type RovingFocusGroupProps, type RovingFocusItemProps, createRovingFocusGroupScope };