@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 +27 -15
- package/dist/index.d.ts +27 -15
- package/dist/index.js +237 -256
- package/dist/index.js.map +7 -1
- package/dist/index.mjs +208 -240
- package/dist/index.mjs.map +7 -1
- package/package.json +10 -11
- package/dist/index.d.ts.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as Radix from
|
|
3
|
-
import { Primitive } from
|
|
4
|
-
|
|
5
|
-
type
|
|
6
|
-
|
|
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
|
-
|
|
35
|
+
interface RovingFocusGroupProps extends RovingFocusGroupImplProps {
|
|
24
36
|
}
|
|
25
|
-
|
|
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
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import * as Radix from
|
|
3
|
-
import { Primitive } from
|
|
4
|
-
|
|
5
|
-
type
|
|
6
|
-
|
|
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
|
-
|
|
35
|
+
interface RovingFocusGroupProps extends RovingFocusGroupImplProps {
|
|
24
36
|
}
|
|
25
|
-
|
|
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
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
56
|
+
export { Item, Root, RovingFocusGroup, RovingFocusGroupItem, type RovingFocusGroupProps, type RovingFocusItemProps, createRovingFocusGroupScope };
|