@homebound/beam 2.399.0 → 2.399.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.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -8312,12 +8312,23 @@ interface UseToastProps {
|
|
|
8312
8312
|
declare function useToast(): UseToastProps;
|
|
8313
8313
|
|
|
8314
8314
|
type TooltipXss = Xss<Padding | "borderRadius">;
|
|
8315
|
+
/** Note: Only 1 tooltip is ever on screen at a time */
|
|
8315
8316
|
interface TooltipProps {
|
|
8316
8317
|
/** The content that shows up when hovered */
|
|
8317
8318
|
title: ReactNode;
|
|
8318
8319
|
children: ReactNode;
|
|
8319
8320
|
placement?: Placement;
|
|
8321
|
+
/**
|
|
8322
|
+
* The delay for the tooltip to appear.
|
|
8323
|
+
*
|
|
8324
|
+
* Note: If tooltip `A` is still showing when tooltip `B` is triggered, tooltip `B`'s `delay` property will be ignored and it will render immediately.
|
|
8325
|
+
* @default 0
|
|
8326
|
+
*/
|
|
8320
8327
|
delay?: number;
|
|
8328
|
+
/** The delay time for the tooltip to disappear.
|
|
8329
|
+
* @default 500
|
|
8330
|
+
*/
|
|
8331
|
+
closeDelay?: number;
|
|
8321
8332
|
disabled?: boolean;
|
|
8322
8333
|
bgColor?: Palette;
|
|
8323
8334
|
xss?: TooltipXss;
|
package/dist/index.d.ts
CHANGED
|
@@ -8312,12 +8312,23 @@ interface UseToastProps {
|
|
|
8312
8312
|
declare function useToast(): UseToastProps;
|
|
8313
8313
|
|
|
8314
8314
|
type TooltipXss = Xss<Padding | "borderRadius">;
|
|
8315
|
+
/** Note: Only 1 tooltip is ever on screen at a time */
|
|
8315
8316
|
interface TooltipProps {
|
|
8316
8317
|
/** The content that shows up when hovered */
|
|
8317
8318
|
title: ReactNode;
|
|
8318
8319
|
children: ReactNode;
|
|
8319
8320
|
placement?: Placement;
|
|
8321
|
+
/**
|
|
8322
|
+
* The delay for the tooltip to appear.
|
|
8323
|
+
*
|
|
8324
|
+
* Note: If tooltip `A` is still showing when tooltip `B` is triggered, tooltip `B`'s `delay` property will be ignored and it will render immediately.
|
|
8325
|
+
* @default 0
|
|
8326
|
+
*/
|
|
8320
8327
|
delay?: number;
|
|
8328
|
+
/** The delay time for the tooltip to disappear.
|
|
8329
|
+
* @default 500
|
|
8330
|
+
*/
|
|
8331
|
+
closeDelay?: number;
|
|
8321
8332
|
disabled?: boolean;
|
|
8322
8333
|
bgColor?: Palette;
|
|
8323
8334
|
xss?: TooltipXss;
|
package/dist/index.js
CHANGED
|
@@ -4169,8 +4169,8 @@ import { usePopper } from "react-popper";
|
|
|
4169
4169
|
import { useTooltipTriggerState } from "react-stately";
|
|
4170
4170
|
import { Fragment, jsx as jsx2, jsxs } from "@emotion/react/jsx-runtime";
|
|
4171
4171
|
function Tooltip(props) {
|
|
4172
|
-
const { placement, children, title, disabled, delay = 0, bgColor, xss } = props;
|
|
4173
|
-
const state = useTooltipTriggerState({ delay, isDisabled: disabled });
|
|
4172
|
+
const { placement, children, title, disabled, delay = 0, closeDelay = 500, bgColor, xss } = props;
|
|
4173
|
+
const state = useTooltipTriggerState({ delay, closeDelay, isDisabled: disabled });
|
|
4174
4174
|
const triggerRef = useRef2(null);
|
|
4175
4175
|
const { triggerProps, tooltipProps: _tooltipProps } = useTooltipTrigger({ isDisabled: disabled }, state, triggerRef);
|
|
4176
4176
|
const { tooltipProps } = useTooltip(_tooltipProps, state);
|
|
@@ -4183,7 +4183,7 @@ function Tooltip(props) {
|
|
|
4183
4183
|
...triggerProps,
|
|
4184
4184
|
...!state.isOpen && typeof title === "string" ? { title } : {},
|
|
4185
4185
|
...tid,
|
|
4186
|
-
css: Css.display("contents").addIn(":active", Css.add("pointerEvents", "none").$).$,
|
|
4186
|
+
css: Css.display("contents").addIn(":active:not(:has(a))", Css.add("pointerEvents", "none").$).$,
|
|
4187
4187
|
draggable: true,
|
|
4188
4188
|
onDragStart: (e) => e.preventDefault(),
|
|
4189
4189
|
children
|