@radix-ui/react-tooltip 1.0.8-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 +42 -30
- package/dist/index.d.ts +42 -30
- package/dist/index.js +457 -545
- package/dist/index.js.map +7 -1
- package/dist/index.mjs +470 -555
- package/dist/index.mjs.map +7 -1
- package/package.json +13 -14
- package/dist/index.d.ts.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { DismissableLayer } from
|
|
3
|
-
import * as PopperPrimitive from
|
|
4
|
-
import { Portal as
|
|
5
|
-
import * as Radix from
|
|
6
|
-
import { Primitive } from
|
|
7
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
|
3
|
+
import * as PopperPrimitive from '@radix-ui/react-popper';
|
|
4
|
+
import { Portal as Portal$1 } from '@radix-ui/react-portal';
|
|
5
|
+
import * as Radix from '@radix-ui/react-primitive';
|
|
6
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
7
|
+
|
|
8
|
+
declare type Scope<C = any> = {
|
|
9
|
+
[scopeName: string]: React.Context<C>[];
|
|
10
|
+
} | undefined;
|
|
11
|
+
declare type ScopeHook = (scope: Scope) => {
|
|
12
|
+
[__scopeProp: string]: Scope;
|
|
13
|
+
};
|
|
14
|
+
interface CreateScope {
|
|
15
|
+
scopeName: string;
|
|
16
|
+
(): ScopeHook;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const createTooltipScope: CreateScope;
|
|
8
20
|
interface TooltipProviderProps {
|
|
9
21
|
children: React.ReactNode;
|
|
10
22
|
/**
|
|
@@ -23,8 +35,8 @@ interface TooltipProviderProps {
|
|
|
23
35
|
*/
|
|
24
36
|
disableHoverableContent?: boolean;
|
|
25
37
|
}
|
|
26
|
-
|
|
27
|
-
|
|
38
|
+
declare const TooltipProvider: React.FC<TooltipProviderProps>;
|
|
39
|
+
interface TooltipProps {
|
|
28
40
|
children?: React.ReactNode;
|
|
29
41
|
open?: boolean;
|
|
30
42
|
defaultOpen?: boolean;
|
|
@@ -41,13 +53,13 @@ export interface TooltipProps {
|
|
|
41
53
|
*/
|
|
42
54
|
disableHoverableContent?: boolean;
|
|
43
55
|
}
|
|
44
|
-
|
|
45
|
-
type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
46
|
-
|
|
56
|
+
declare const Tooltip: React.FC<TooltipProps>;
|
|
57
|
+
declare type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
58
|
+
interface TooltipTriggerProps extends PrimitiveButtonProps {
|
|
47
59
|
}
|
|
48
|
-
|
|
49
|
-
type PortalProps = React.ComponentPropsWithoutRef<typeof
|
|
50
|
-
|
|
60
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
61
|
+
declare type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
|
|
62
|
+
interface TooltipPortalProps {
|
|
51
63
|
children?: React.ReactNode;
|
|
52
64
|
/**
|
|
53
65
|
* Specify a container element to portal the content into.
|
|
@@ -59,17 +71,17 @@ export interface TooltipPortalProps {
|
|
|
59
71
|
*/
|
|
60
72
|
forceMount?: true;
|
|
61
73
|
}
|
|
62
|
-
|
|
63
|
-
|
|
74
|
+
declare const TooltipPortal: React.FC<TooltipPortalProps>;
|
|
75
|
+
interface TooltipContentProps extends TooltipContentImplProps {
|
|
64
76
|
/**
|
|
65
77
|
* Used to force mounting when more control is needed. Useful when
|
|
66
78
|
* controlling animation with React animation libraries.
|
|
67
79
|
*/
|
|
68
80
|
forceMount?: true;
|
|
69
81
|
}
|
|
70
|
-
|
|
71
|
-
type DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
72
|
-
type PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
|
|
82
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
83
|
+
declare type DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
84
|
+
declare type PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
|
|
73
85
|
interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
|
|
74
86
|
/**
|
|
75
87
|
* A more descriptive label for accessibility purpose
|
|
@@ -86,15 +98,15 @@ interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
|
|
|
86
98
|
*/
|
|
87
99
|
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
|
|
88
100
|
}
|
|
89
|
-
type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
|
|
90
|
-
|
|
101
|
+
declare type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
|
|
102
|
+
interface TooltipArrowProps extends PopperArrowProps {
|
|
91
103
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
104
|
+
declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
105
|
+
declare const Provider: React.FC<TooltipProviderProps>;
|
|
106
|
+
declare const Root: React.FC<TooltipProps>;
|
|
107
|
+
declare const Trigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
108
|
+
declare const Portal: React.FC<TooltipPortalProps>;
|
|
109
|
+
declare const Content: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
110
|
+
declare const Arrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
99
111
|
|
|
100
|
-
|
|
112
|
+
export { Arrow, Content, Portal, Provider, Root, Tooltip, TooltipArrow, type TooltipArrowProps, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipPortalProps, type TooltipProps, TooltipProvider, TooltipTrigger, type TooltipTriggerProps, Trigger, createTooltipScope };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { DismissableLayer } from
|
|
3
|
-
import * as PopperPrimitive from
|
|
4
|
-
import { Portal as
|
|
5
|
-
import * as Radix from
|
|
6
|
-
import { Primitive } from
|
|
7
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
|
3
|
+
import * as PopperPrimitive from '@radix-ui/react-popper';
|
|
4
|
+
import { Portal as Portal$1 } from '@radix-ui/react-portal';
|
|
5
|
+
import * as Radix from '@radix-ui/react-primitive';
|
|
6
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
7
|
+
|
|
8
|
+
declare type Scope<C = any> = {
|
|
9
|
+
[scopeName: string]: React.Context<C>[];
|
|
10
|
+
} | undefined;
|
|
11
|
+
declare type ScopeHook = (scope: Scope) => {
|
|
12
|
+
[__scopeProp: string]: Scope;
|
|
13
|
+
};
|
|
14
|
+
interface CreateScope {
|
|
15
|
+
scopeName: string;
|
|
16
|
+
(): ScopeHook;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const createTooltipScope: CreateScope;
|
|
8
20
|
interface TooltipProviderProps {
|
|
9
21
|
children: React.ReactNode;
|
|
10
22
|
/**
|
|
@@ -23,8 +35,8 @@ interface TooltipProviderProps {
|
|
|
23
35
|
*/
|
|
24
36
|
disableHoverableContent?: boolean;
|
|
25
37
|
}
|
|
26
|
-
|
|
27
|
-
|
|
38
|
+
declare const TooltipProvider: React.FC<TooltipProviderProps>;
|
|
39
|
+
interface TooltipProps {
|
|
28
40
|
children?: React.ReactNode;
|
|
29
41
|
open?: boolean;
|
|
30
42
|
defaultOpen?: boolean;
|
|
@@ -41,13 +53,13 @@ export interface TooltipProps {
|
|
|
41
53
|
*/
|
|
42
54
|
disableHoverableContent?: boolean;
|
|
43
55
|
}
|
|
44
|
-
|
|
45
|
-
type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
46
|
-
|
|
56
|
+
declare const Tooltip: React.FC<TooltipProps>;
|
|
57
|
+
declare type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
58
|
+
interface TooltipTriggerProps extends PrimitiveButtonProps {
|
|
47
59
|
}
|
|
48
|
-
|
|
49
|
-
type PortalProps = React.ComponentPropsWithoutRef<typeof
|
|
50
|
-
|
|
60
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
61
|
+
declare type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
|
|
62
|
+
interface TooltipPortalProps {
|
|
51
63
|
children?: React.ReactNode;
|
|
52
64
|
/**
|
|
53
65
|
* Specify a container element to portal the content into.
|
|
@@ -59,17 +71,17 @@ export interface TooltipPortalProps {
|
|
|
59
71
|
*/
|
|
60
72
|
forceMount?: true;
|
|
61
73
|
}
|
|
62
|
-
|
|
63
|
-
|
|
74
|
+
declare const TooltipPortal: React.FC<TooltipPortalProps>;
|
|
75
|
+
interface TooltipContentProps extends TooltipContentImplProps {
|
|
64
76
|
/**
|
|
65
77
|
* Used to force mounting when more control is needed. Useful when
|
|
66
78
|
* controlling animation with React animation libraries.
|
|
67
79
|
*/
|
|
68
80
|
forceMount?: true;
|
|
69
81
|
}
|
|
70
|
-
|
|
71
|
-
type DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
72
|
-
type PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
|
|
82
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
83
|
+
declare type DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
84
|
+
declare type PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
|
|
73
85
|
interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
|
|
74
86
|
/**
|
|
75
87
|
* A more descriptive label for accessibility purpose
|
|
@@ -86,15 +98,15 @@ interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
|
|
|
86
98
|
*/
|
|
87
99
|
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
|
|
88
100
|
}
|
|
89
|
-
type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
|
|
90
|
-
|
|
101
|
+
declare type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
|
|
102
|
+
interface TooltipArrowProps extends PopperArrowProps {
|
|
91
103
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
104
|
+
declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
105
|
+
declare const Provider: React.FC<TooltipProviderProps>;
|
|
106
|
+
declare const Root: React.FC<TooltipProps>;
|
|
107
|
+
declare const Trigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
108
|
+
declare const Portal: React.FC<TooltipPortalProps>;
|
|
109
|
+
declare const Content: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
110
|
+
declare const Arrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
99
111
|
|
|
100
|
-
|
|
112
|
+
export { Arrow, Content, Portal, Provider, Root, Tooltip, TooltipArrow, type TooltipArrowProps, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipPortalProps, type TooltipProps, TooltipProvider, TooltipTrigger, type TooltipTriggerProps, Trigger, createTooltipScope };
|