@voxel51/voodo 2.4.0-app-revamp.2 → 2.4.0-app-revamp.3
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/components/Tooltip/Tooltip.d.ts +12 -5
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2295 -2319
- package/dist/index.js.map +1 -1
- package/dist/voodo.css +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,8 @@ import { Anchor, Shadow } from '../../types';
|
|
|
3
3
|
export type TooltipAnchor = `${Extract<Anchor, Anchor.Top | Anchor.Right | Anchor.Bottom | Anchor.Left>}`;
|
|
4
4
|
export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, "content"> {
|
|
5
5
|
anchor?: TooltipAnchor;
|
|
6
|
+
avoidCollisions?: boolean;
|
|
7
|
+
collisionPadding?: number;
|
|
6
8
|
content: ReactNode;
|
|
7
9
|
interactive?: boolean;
|
|
8
10
|
portal?: boolean;
|
|
@@ -10,7 +12,10 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, "cont
|
|
|
10
12
|
wrapperClassName?: string;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
|
-
* A tooltip which appears when hovering over the wrapped content.
|
|
15
|
+
* A tooltip which appears when hovering over the wrapped content. It stays
|
|
16
|
+
* inside the viewport: it flips to the opposite side when its own side has no
|
|
17
|
+
* room, slides along that side near an edge with its arrow still on the
|
|
18
|
+
* content, and follows the content on scroll and resize.
|
|
14
19
|
*
|
|
15
20
|
* @example
|
|
16
21
|
* ```tsx
|
|
@@ -19,15 +24,17 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, "cont
|
|
|
19
24
|
* </Tooltip>
|
|
20
25
|
* ```
|
|
21
26
|
*
|
|
22
|
-
* @param anchor
|
|
27
|
+
* @param anchor Preferred position of the tooltip relative to its content: `"top"`, `"right"`, `"bottom"` or `"left"`. Defaults to `"top"`. See {@link TooltipAnchor}.
|
|
28
|
+
* @param avoidCollisions If `true` (the default), the tooltip flips and shifts to stay inside the viewport.
|
|
29
|
+
* @param collisionPadding Minimum distance, in pixels, kept between the tooltip and the viewport edge. Defaults to `8`.
|
|
23
30
|
* @param content The content of the tooltip.
|
|
24
31
|
* @param children The content which this component wraps; this acts as the element anchor and the hover trigger.
|
|
25
32
|
* @param className `class` overrides to apply to the tooltip panel.
|
|
26
33
|
* @param interactive If `true`, the tooltip stays open while the pointer moves from the content
|
|
27
34
|
* into the panel, so the panel can hold links or buttons.
|
|
28
|
-
* @param portal If `true
|
|
29
|
-
* above-modal z-index, so
|
|
30
|
-
*
|
|
35
|
+
* @param portal If `true` (the default), renders the tooltip via a React portal into `document.body`
|
|
36
|
+
* with an above-modal z-index, so no ancestor's overflow, transform or stacking context can clip
|
|
37
|
+
* or bury it. With `false` the panel renders in place with fixed positioning.
|
|
31
38
|
* @param shadow The shadow to apply to the tooltip. See {@link Shadow}.
|
|
32
39
|
* @param wrapperClassName Additional classes to apply to the outer wrapper element.
|
|
33
40
|
* @param props Additional HTML properties to apply to the component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAMf,OAAO,EACL,MAAM,EAIN,MAAM,EAMP,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,aAAa,GAAG,GAAG,OAAO,CACpC,MAAM,EACN,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CACxD,EAAE,CAAC;AAEJ,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,cAAc,CAAC,cAAc,CAAC,EAC9B,SAAS,CACV;IACC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CA4GpC,CAAC"}
|