@zendeskgarden/react-tooltips
Advanced tools
Comparing version 4.3.18 to 5.0.0
@@ -6,2 +6,23 @@ # Change Log | ||
# [5.0.0](https://github.com/zendeskgarden/react-components/compare/@zendeskgarden/react-tooltips@4.3.18...@zendeskgarden/react-tooltips@5.0.0) (2018-12-06) | ||
### Features | ||
* **tooltips:** remove wrapping div from TooltipContainer ([#62](https://github.com/zendeskgarden/react-components/issues/62)) ([da5d67f](https://github.com/zendeskgarden/react-components/commit/da5d67f)) | ||
* add matchExports testing utility ([#225](https://github.com/zendeskgarden/react-components/issues/225)) ([8666052](https://github.com/zendeskgarden/react-components/commit/8666052)) | ||
### BREAKING CHANGES | ||
* **tooltips:** The `TooltipContainer` component no longer wraps the provided `trigger` with an additional element. | ||
This change allows for more flexible implementations. The `Tooltip` component remains unchanged. | ||
The `trigger` render-prop within `TooltipContainer` now requires a `ref` callback to be placed on the trigger element. | ||
## [4.3.18](https://github.com/zendeskgarden/react-components/compare/@zendeskgarden/react-tooltips@4.3.17...@zendeskgarden/react-tooltips@4.3.18) (2018-12-05) | ||
@@ -8,0 +29,0 @@ |
@@ -117,3 +117,3 @@ /*! | ||
module.exports = require("@zendeskgarden/react-theming"); | ||
module.exports = require("styled-components"); | ||
@@ -124,3 +124,3 @@ /***/ }), | ||
module.exports = require("react"); | ||
module.exports = require("@zendeskgarden/react-theming"); | ||
@@ -131,3 +131,3 @@ /***/ }), | ||
module.exports = require("@zendeskgarden/react-selection"); | ||
module.exports = require("react"); | ||
@@ -138,3 +138,3 @@ /***/ }), | ||
module.exports = require("styled-components"); | ||
module.exports = require("@zendeskgarden/react-selection"); | ||
@@ -173,3 +173,3 @@ /***/ }), | ||
// EXTERNAL MODULE: external "react" | ||
var external_react_ = __webpack_require__(4); | ||
var external_react_ = __webpack_require__(5); | ||
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_); | ||
@@ -181,9 +181,9 @@ | ||
// EXTERNAL MODULE: external "@zendeskgarden/react-selection" | ||
var react_selection_ = __webpack_require__(5); | ||
// EXTERNAL MODULE: external "styled-components" | ||
var external_styled_components_ = __webpack_require__(6); | ||
var external_styled_components_ = __webpack_require__(3); | ||
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_); | ||
// EXTERNAL MODULE: external "@zendeskgarden/react-selection" | ||
var react_selection_ = __webpack_require__(6); | ||
// EXTERNAL MODULE: external "react-popper" | ||
@@ -200,3 +200,3 @@ var external_react_popper_ = __webpack_require__(8); | ||
// EXTERNAL MODULE: external "@zendeskgarden/react-theming" | ||
var react_theming_ = __webpack_require__(3); | ||
var react_theming_ = __webpack_require__(4); | ||
@@ -327,12 +327,3 @@ // CONCATENATED MODULE: ./src/utils/gardenPlacements.js | ||
}); | ||
/** | ||
* Due to Popper.JS needing a reference to a component we provide a simple wrapper | ||
* to ensure the correct reference is provided. | ||
*/ | ||
var TriggerWrapper = external_styled_components_default.a.div.withConfig({ | ||
displayName: "TooltipContainer__TriggerWrapper", | ||
componentId: "mr0hf4-1" | ||
})(["display:inline-block;"]); | ||
var TooltipContainer_TooltipContainer = | ||
@@ -469,10 +460,9 @@ /*#__PURE__*/ | ||
var targetProps = _ref3.targetProps; | ||
return external_react_default.a.createElement(TriggerWrapper, { | ||
innerRef: targetProps.ref | ||
}, trigger && trigger({ | ||
return trigger && trigger({ | ||
getTriggerProps: function getTriggerProps(props) { | ||
return _this2.getTriggerProps(TooltipContainer_objectSpread({}, props)); | ||
}, | ||
ref: targetProps.ref, | ||
isVisible: isVisible | ||
})); | ||
}); | ||
}), external_react_default.a.createElement(external_react_popper_["Popper"], { | ||
@@ -563,2 +553,3 @@ placement: this.convertGardenToPopperPlacement(), | ||
* @param {Function} renderProps.isVisible - Whether the Tooltip is currently visible | ||
* @param {Function} renderProps.ref - Callback to retrieve the trigger elements ref | ||
*/ | ||
@@ -656,3 +647,3 @@ trigger: external_prop_types_default.a.func, | ||
'data-garden-id': COMPONENT_ID, | ||
'data-garden-version': "4.3.18", | ||
'data-garden-version': "5.0.0", | ||
className: function className(props) { | ||
@@ -725,3 +716,3 @@ var _classNames; | ||
'data-garden-id': LightTooltip_COMPONENT_ID, | ||
'data-garden-version': "4.3.18", | ||
'data-garden-version': "5.0.0", | ||
className: external_classnames_default()(css_tooltips_dist_default.a['c-tooltip--light']) | ||
@@ -787,2 +778,3 @@ }).withConfig({ | ||
var Tooltip_SIZE = { | ||
@@ -798,3 +790,12 @@ SMALL: 'small', | ||
}; | ||
/** | ||
* Due to Popper.JS needing a reference to a component we provide a simple wrapper | ||
* to ensure the correct reference is provided. | ||
*/ | ||
var TriggerWrapper = external_styled_components_default.a.div.withConfig({ | ||
displayName: "Tooltip__TriggerWrapper", | ||
componentId: "lty2bj-0" | ||
})(["display:inline-block;"]); | ||
var Tooltip_Tooltip = | ||
@@ -854,4 +855,8 @@ /*#__PURE__*/ | ||
trigger: function trigger(_ref) { | ||
var getTriggerProps = _ref.getTriggerProps; | ||
return Object(external_react_["cloneElement"])(_trigger, getTriggerProps(_trigger.props)); | ||
var getTriggerProps = _ref.getTriggerProps, | ||
ref = _ref.ref; | ||
var triggerElement = Object(external_react_["cloneElement"])(_trigger, getTriggerProps(_trigger.props)); | ||
return external_react_default.a.createElement(TriggerWrapper, { | ||
innerRef: ref | ||
}, triggerElement); | ||
} | ||
@@ -932,3 +937,3 @@ }, function (_ref2) { | ||
'data-garden-id': Title_COMPONENT_ID, | ||
'data-garden-version': "4.3.18", | ||
'data-garden-version': "5.0.0", | ||
className: css_tooltips_dist_default.a['c-tooltip__title'] | ||
@@ -961,3 +966,3 @@ }).withConfig({ | ||
'data-garden-id': Paragraph_COMPONENT_ID, | ||
'data-garden-version': "4.3.18", | ||
'data-garden-version': "5.0.0", | ||
className: css_tooltips_dist_default.a['c-tooltip__paragraph'] | ||
@@ -964,0 +969,0 @@ }).withConfig({ |
@@ -11,3 +11,3 @@ { | ||
}, | ||
"version": "4.3.18", | ||
"version": "5.0.0", | ||
"main": "./dist/index.js", | ||
@@ -52,3 +52,3 @@ "files": [ | ||
"zendeskgarden:src": "src/index.js", | ||
"gitHead": "a74838be2feefe68ed27f587dcd50de286d5bae6" | ||
"gitHead": "8784db3df349ef584bd4910ee9fad1fe87d8dad6" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
495750
1190