@doist/reactist 26.1.0 → 26.2.0
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/reactist.cjs.development.js +13 -4
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/tooltip/tooltip.js +14 -5
- package/es/tooltip/tooltip.js.map +1 -1
- package/lib/tooltip/tooltip.d.ts +8 -1
- package/lib/tooltip/tooltip.js +1 -1
- package/lib/tooltip/tooltip.js.map +1 -1
- package/package.json +1 -1
|
@@ -575,20 +575,29 @@ function Spinner({
|
|
|
575
575
|
|
|
576
576
|
var modules_95f1407a = {"tooltip":"_487c82cd"};
|
|
577
577
|
|
|
578
|
+
const TooltipContext = /*#__PURE__*/React__namespace.createContext({
|
|
579
|
+
showTimeout: 500,
|
|
580
|
+
hideTimeout: 100
|
|
581
|
+
});
|
|
582
|
+
|
|
578
583
|
function Tooltip({
|
|
579
584
|
children,
|
|
580
585
|
content,
|
|
581
586
|
position = 'top',
|
|
582
587
|
gapSize = 3,
|
|
583
588
|
withArrow = false,
|
|
584
|
-
showTimeout
|
|
585
|
-
hideTimeout
|
|
589
|
+
showTimeout,
|
|
590
|
+
hideTimeout,
|
|
586
591
|
exceptionallySetClassName
|
|
587
592
|
}) {
|
|
593
|
+
const {
|
|
594
|
+
showTimeout: globalShowTimeout,
|
|
595
|
+
hideTimeout: globalHideTimeout
|
|
596
|
+
} = React__namespace.useContext(TooltipContext);
|
|
588
597
|
const tooltip = react.useTooltipStore({
|
|
589
598
|
placement: position,
|
|
590
|
-
showTimeout,
|
|
591
|
-
hideTimeout
|
|
599
|
+
showTimeout: showTimeout != null ? showTimeout : globalShowTimeout,
|
|
600
|
+
hideTimeout: hideTimeout != null ? hideTimeout : globalHideTimeout
|
|
592
601
|
});
|
|
593
602
|
const isOpen = tooltip.useState('open');
|
|
594
603
|
const child = React__namespace.Children.only(children);
|