@homebound/beam 2.414.0 → 2.414.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 +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -4
- package/dist/index.d.ts +0 -4
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4429,9 +4429,10 @@ function pluralize(count, noun, pluralNoun) {
|
|
|
4429
4429
|
|
|
4430
4430
|
// src/components/Tooltip.tsx
|
|
4431
4431
|
var import_jsx_runtime2 = require("@emotion/react/jsx-runtime");
|
|
4432
|
+
var gapCrossingDelay = 100;
|
|
4432
4433
|
function Tooltip(props) {
|
|
4433
|
-
const { placement, children, title, disabled, delay = 0,
|
|
4434
|
-
const state = (0, import_react_stately.useTooltipTriggerState)({ delay, closeDelay, isDisabled: disabled });
|
|
4434
|
+
const { placement, children, title, disabled, delay = 0, bgColor, xss } = props;
|
|
4435
|
+
const state = (0, import_react_stately.useTooltipTriggerState)({ delay, closeDelay: gapCrossingDelay, isDisabled: disabled });
|
|
4435
4436
|
const triggerRef = (0, import_react3.useRef)(null);
|
|
4436
4437
|
const { triggerProps, tooltipProps: _tooltipProps } = (0, import_react_aria.useTooltipTrigger)({ isDisabled: disabled }, state, triggerRef);
|
|
4437
4438
|
const { tooltipProps } = (0, import_react_aria.useTooltip)(_tooltipProps, state);
|
|
@@ -4458,12 +4459,15 @@ function Tooltip(props) {
|
|
|
4458
4459
|
content: title,
|
|
4459
4460
|
placement,
|
|
4460
4461
|
bgColor,
|
|
4461
|
-
xss
|
|
4462
|
+
xss,
|
|
4463
|
+
onMouseEnter: () => state.open(true),
|
|
4464
|
+
onMouseLeave: () => state.close()
|
|
4462
4465
|
}
|
|
4463
4466
|
)
|
|
4464
4467
|
] });
|
|
4465
4468
|
}
|
|
4466
|
-
function Popper(
|
|
4469
|
+
function Popper(props) {
|
|
4470
|
+
const { triggerRef, content, placement = "auto", xss, bgColor = "rgba(36, 36, 36, 1)" /* Gray900 */, onMouseEnter, onMouseLeave } = props;
|
|
4467
4471
|
const popperRef = (0, import_react3.useRef)(null);
|
|
4468
4472
|
const [arrowRef, setArrowRef] = (0, import_react3.useState)(null);
|
|
4469
4473
|
const targetElement = triggerRef.current ? triggerRef.current.children[0] ?? triggerRef.current.parentElement : null;
|
|
@@ -4481,6 +4485,8 @@ function Popper({ triggerRef, content, placement = "auto", xss, bgColor = "rgba(
|
|
|
4481
4485
|
ref: popperRef,
|
|
4482
4486
|
style: styles.popper,
|
|
4483
4487
|
...attributes.popper,
|
|
4488
|
+
onMouseEnter,
|
|
4489
|
+
onMouseLeave,
|
|
4484
4490
|
css: {
|
|
4485
4491
|
...Css.maxw("320px").bgColor(bgColor).bshBasic.white.px1.py("4px").br4.xs.z(999999).$,
|
|
4486
4492
|
...xss
|