@radix-ui/react-popper 1.1.4-rc.9 → 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 +38 -26
- package/dist/index.d.ts +38 -26
- package/dist/index.js +280 -316
- package/dist/index.js.map +7 -1
- package/dist/index.mjs +283 -311
- 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,24 +1,36 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as ArrowPrimitive from
|
|
3
|
-
import * as Radix from
|
|
4
|
-
import { Primitive } from
|
|
5
|
-
import { Measurable } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ArrowPrimitive from '@radix-ui/react-arrow';
|
|
3
|
+
import * as Radix from '@radix-ui/react-primitive';
|
|
4
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
5
|
+
import { Measurable } from '@radix-ui/rect';
|
|
6
|
+
|
|
7
|
+
declare type Scope<C = any> = {
|
|
8
|
+
[scopeName: string]: React.Context<C>[];
|
|
9
|
+
} | undefined;
|
|
10
|
+
declare type ScopeHook = (scope: Scope) => {
|
|
11
|
+
[__scopeProp: string]: Scope;
|
|
12
|
+
};
|
|
13
|
+
interface CreateScope {
|
|
14
|
+
scopeName: string;
|
|
15
|
+
(): ScopeHook;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"];
|
|
19
|
+
declare const ALIGN_OPTIONS: readonly ["start", "center", "end"];
|
|
20
|
+
declare type Side = typeof SIDE_OPTIONS[number];
|
|
21
|
+
declare type Align = typeof ALIGN_OPTIONS[number];
|
|
22
|
+
declare const createPopperScope: CreateScope;
|
|
23
|
+
interface PopperProps {
|
|
12
24
|
children?: React.ReactNode;
|
|
13
25
|
}
|
|
14
|
-
|
|
15
|
-
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
16
|
-
|
|
26
|
+
declare const Popper: React.FC<PopperProps>;
|
|
27
|
+
declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
28
|
+
interface PopperAnchorProps extends PrimitiveDivProps {
|
|
17
29
|
virtualRef?: React.RefObject<Measurable>;
|
|
18
30
|
}
|
|
19
|
-
|
|
20
|
-
type Boundary = Element | null;
|
|
21
|
-
|
|
31
|
+
declare const PopperAnchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
declare type Boundary = Element | null;
|
|
33
|
+
interface PopperContentProps extends PrimitiveDivProps {
|
|
22
34
|
side?: Side;
|
|
23
35
|
sideOffset?: number;
|
|
24
36
|
align?: Align;
|
|
@@ -32,14 +44,14 @@ export interface PopperContentProps extends PrimitiveDivProps {
|
|
|
32
44
|
updatePositionStrategy?: 'optimized' | 'always';
|
|
33
45
|
onPlaced?: () => void;
|
|
34
46
|
}
|
|
35
|
-
|
|
36
|
-
type ArrowProps = Radix.ComponentPropsWithoutRef<typeof ArrowPrimitive.Root>;
|
|
37
|
-
|
|
47
|
+
declare const PopperContent: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
declare type ArrowProps = Radix.ComponentPropsWithoutRef<typeof ArrowPrimitive.Root>;
|
|
49
|
+
interface PopperArrowProps extends ArrowProps {
|
|
38
50
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
declare const PopperArrow: React.ForwardRefExoticComponent<PopperArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
52
|
+
declare const Root: React.FC<PopperProps>;
|
|
53
|
+
declare const Anchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
declare const Content: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
declare const Arrow: React.ForwardRefExoticComponent<PopperArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
44
56
|
|
|
45
|
-
|
|
57
|
+
export { ALIGN_OPTIONS, Anchor, Arrow, Content, Popper, PopperAnchor, type PopperAnchorProps, PopperArrow, type PopperArrowProps, PopperContent, type PopperContentProps, type PopperProps, Root, SIDE_OPTIONS, createPopperScope };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as ArrowPrimitive from
|
|
3
|
-
import * as Radix from
|
|
4
|
-
import { Primitive } from
|
|
5
|
-
import { Measurable } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ArrowPrimitive from '@radix-ui/react-arrow';
|
|
3
|
+
import * as Radix from '@radix-ui/react-primitive';
|
|
4
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
5
|
+
import { Measurable } from '@radix-ui/rect';
|
|
6
|
+
|
|
7
|
+
declare type Scope<C = any> = {
|
|
8
|
+
[scopeName: string]: React.Context<C>[];
|
|
9
|
+
} | undefined;
|
|
10
|
+
declare type ScopeHook = (scope: Scope) => {
|
|
11
|
+
[__scopeProp: string]: Scope;
|
|
12
|
+
};
|
|
13
|
+
interface CreateScope {
|
|
14
|
+
scopeName: string;
|
|
15
|
+
(): ScopeHook;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"];
|
|
19
|
+
declare const ALIGN_OPTIONS: readonly ["start", "center", "end"];
|
|
20
|
+
declare type Side = typeof SIDE_OPTIONS[number];
|
|
21
|
+
declare type Align = typeof ALIGN_OPTIONS[number];
|
|
22
|
+
declare const createPopperScope: CreateScope;
|
|
23
|
+
interface PopperProps {
|
|
12
24
|
children?: React.ReactNode;
|
|
13
25
|
}
|
|
14
|
-
|
|
15
|
-
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
16
|
-
|
|
26
|
+
declare const Popper: React.FC<PopperProps>;
|
|
27
|
+
declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
28
|
+
interface PopperAnchorProps extends PrimitiveDivProps {
|
|
17
29
|
virtualRef?: React.RefObject<Measurable>;
|
|
18
30
|
}
|
|
19
|
-
|
|
20
|
-
type Boundary = Element | null;
|
|
21
|
-
|
|
31
|
+
declare const PopperAnchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
declare type Boundary = Element | null;
|
|
33
|
+
interface PopperContentProps extends PrimitiveDivProps {
|
|
22
34
|
side?: Side;
|
|
23
35
|
sideOffset?: number;
|
|
24
36
|
align?: Align;
|
|
@@ -32,14 +44,14 @@ export interface PopperContentProps extends PrimitiveDivProps {
|
|
|
32
44
|
updatePositionStrategy?: 'optimized' | 'always';
|
|
33
45
|
onPlaced?: () => void;
|
|
34
46
|
}
|
|
35
|
-
|
|
36
|
-
type ArrowProps = Radix.ComponentPropsWithoutRef<typeof ArrowPrimitive.Root>;
|
|
37
|
-
|
|
47
|
+
declare const PopperContent: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
declare type ArrowProps = Radix.ComponentPropsWithoutRef<typeof ArrowPrimitive.Root>;
|
|
49
|
+
interface PopperArrowProps extends ArrowProps {
|
|
38
50
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
declare const PopperArrow: React.ForwardRefExoticComponent<PopperArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
52
|
+
declare const Root: React.FC<PopperProps>;
|
|
53
|
+
declare const Anchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
declare const Content: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
declare const Arrow: React.ForwardRefExoticComponent<PopperArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
44
56
|
|
|
45
|
-
|
|
57
|
+
export { ALIGN_OPTIONS, Anchor, Arrow, Content, Popper, PopperAnchor, type PopperAnchorProps, PopperArrow, type PopperArrowProps, PopperContent, type PopperContentProps, type PopperProps, Root, SIDE_OPTIONS, createPopperScope };
|