@doist/reactist 12.0.1 → 12.0.2
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 +9 -12
- 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/components/tooltip/tooltip.js +9 -12
- package/es/components/tooltip/tooltip.js.map +1 -1
- package/lib/components/tooltip/tooltip.js +1 -1
- package/lib/components/tooltip/tooltip.js.map +1 -1
- package/package.json +1 -1
|
@@ -491,6 +491,8 @@ function Tooltip(_ref) {
|
|
|
491
491
|
|
|
492
492
|
|
|
493
493
|
function handleFocus(event) {
|
|
494
|
+
var _child$props;
|
|
495
|
+
|
|
494
496
|
// If focus is not followed by a key up event, does it mean that it's not
|
|
495
497
|
// an intentional keyboard focus? Not sure but it seems to work.
|
|
496
498
|
// This may be resolved soon in an upcoming version of reakit:
|
|
@@ -508,21 +510,16 @@ function Tooltip(_ref) {
|
|
|
508
510
|
}); // Prevent tooltip.show from being called by TooltipReference
|
|
509
511
|
|
|
510
512
|
event.preventDefault();
|
|
511
|
-
child.props.onFocus == null ? void 0 :
|
|
513
|
+
child == null ? void 0 : (_child$props = child.props) == null ? void 0 : _child$props.onFocus == null ? void 0 : _child$props.onFocus(event);
|
|
512
514
|
}
|
|
513
515
|
|
|
514
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(tooltip.TooltipAnchor, {
|
|
515
|
-
state: state
|
|
516
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(tooltip.TooltipAnchor, _objectSpread2(_objectSpread2({
|
|
517
|
+
state: state
|
|
518
|
+
}, child.props), {}, {
|
|
519
|
+
ref: child.ref,
|
|
516
520
|
onFocus: handleFocus
|
|
517
|
-
}, anchorProps => {
|
|
518
|
-
|
|
519
|
-
onFocus,
|
|
520
|
-
onBlur
|
|
521
|
-
} = anchorProps;
|
|
522
|
-
return /*#__PURE__*/React__default.cloneElement(child, _objectSpread2(_objectSpread2(_objectSpread2({}, anchorProps), child.props), {}, {
|
|
523
|
-
onFocus,
|
|
524
|
-
onBlur
|
|
525
|
-
}));
|
|
521
|
+
}), anchorProps => {
|
|
522
|
+
return /*#__PURE__*/React__default.cloneElement(child, anchorProps);
|
|
526
523
|
}), state.visible ? /*#__PURE__*/React__default.createElement(tooltip.Tooltip, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
527
524
|
state: state,
|
|
528
525
|
className: classNames('reactist_tooltip', className)
|