@radix-ui/react-tooltip 1.1.0-rc.2 → 1.1.0-rc.4
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 +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +494 -478
- package/dist/index.js.map +4 -4
- package/dist/index.mjs.map +2 -2
- package/package.json +15 -15
package/dist/index.d.mts
CHANGED
|
@@ -2,13 +2,12 @@ import * as React from 'react';
|
|
|
2
2
|
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
|
3
3
|
import * as PopperPrimitive from '@radix-ui/react-popper';
|
|
4
4
|
import { Portal as Portal$1 } from '@radix-ui/react-portal';
|
|
5
|
-
import * as Radix from '@radix-ui/react-primitive';
|
|
6
5
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
type Scope<C = any> = {
|
|
9
8
|
[scopeName: string]: React.Context<C>[];
|
|
10
9
|
} | undefined;
|
|
11
|
-
|
|
10
|
+
type ScopeHook = (scope: Scope) => {
|
|
12
11
|
[__scopeProp: string]: Scope;
|
|
13
12
|
};
|
|
14
13
|
interface CreateScope {
|
|
@@ -54,11 +53,11 @@ interface TooltipProps {
|
|
|
54
53
|
disableHoverableContent?: boolean;
|
|
55
54
|
}
|
|
56
55
|
declare const Tooltip: React.FC<TooltipProps>;
|
|
57
|
-
|
|
56
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
58
57
|
interface TooltipTriggerProps extends PrimitiveButtonProps {
|
|
59
58
|
}
|
|
60
59
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
61
|
-
|
|
60
|
+
type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
|
|
62
61
|
interface TooltipPortalProps {
|
|
63
62
|
children?: React.ReactNode;
|
|
64
63
|
/**
|
|
@@ -80,8 +79,8 @@ interface TooltipContentProps extends TooltipContentImplProps {
|
|
|
80
79
|
forceMount?: true;
|
|
81
80
|
}
|
|
82
81
|
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
83
|
+
type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
|
|
85
84
|
interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
|
|
86
85
|
/**
|
|
87
86
|
* A more descriptive label for accessibility purpose
|
|
@@ -98,7 +97,7 @@ interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
|
|
|
98
97
|
*/
|
|
99
98
|
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
|
|
100
99
|
}
|
|
101
|
-
|
|
100
|
+
type PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
|
|
102
101
|
interface TooltipArrowProps extends PopperArrowProps {
|
|
103
102
|
}
|
|
104
103
|
declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,12 @@ import * as React from 'react';
|
|
|
2
2
|
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
|
3
3
|
import * as PopperPrimitive from '@radix-ui/react-popper';
|
|
4
4
|
import { Portal as Portal$1 } from '@radix-ui/react-portal';
|
|
5
|
-
import * as Radix from '@radix-ui/react-primitive';
|
|
6
5
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
type Scope<C = any> = {
|
|
9
8
|
[scopeName: string]: React.Context<C>[];
|
|
10
9
|
} | undefined;
|
|
11
|
-
|
|
10
|
+
type ScopeHook = (scope: Scope) => {
|
|
12
11
|
[__scopeProp: string]: Scope;
|
|
13
12
|
};
|
|
14
13
|
interface CreateScope {
|
|
@@ -54,11 +53,11 @@ interface TooltipProps {
|
|
|
54
53
|
disableHoverableContent?: boolean;
|
|
55
54
|
}
|
|
56
55
|
declare const Tooltip: React.FC<TooltipProps>;
|
|
57
|
-
|
|
56
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
58
57
|
interface TooltipTriggerProps extends PrimitiveButtonProps {
|
|
59
58
|
}
|
|
60
59
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
61
|
-
|
|
60
|
+
type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
|
|
62
61
|
interface TooltipPortalProps {
|
|
63
62
|
children?: React.ReactNode;
|
|
64
63
|
/**
|
|
@@ -80,8 +79,8 @@ interface TooltipContentProps extends TooltipContentImplProps {
|
|
|
80
79
|
forceMount?: true;
|
|
81
80
|
}
|
|
82
81
|
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
83
|
+
type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
|
|
85
84
|
interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
|
|
86
85
|
/**
|
|
87
86
|
* A more descriptive label for accessibility purpose
|
|
@@ -98,7 +97,7 @@ interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
|
|
|
98
97
|
*/
|
|
99
98
|
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
|
|
100
99
|
}
|
|
101
|
-
|
|
100
|
+
type PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
|
|
102
101
|
interface TooltipArrowProps extends PopperArrowProps {
|
|
103
102
|
}
|
|
104
103
|
declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|