@canonical/react-components 0.40.0 → 0.40.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.
@@ -279,17 +279,10 @@ var Tooltip = function Tooltip(_ref) {
279
279
  return child && /*#__PURE__*/_react.default.isValidElement(child) ? /*#__PURE__*/_react.default.cloneElement(child, {
280
280
  "aria-describedby": tooltipId
281
281
  }) : child;
282
- })), /*#__PURE__*/_react.default.createElement(Portal, null, /*#__PURE__*/_react.default.createElement("span", {
283
- className: (0, _classnames.default)("p-tooltip--".concat(adjustedPosition), "is-detached", {
284
- "u-off-screen": !isOpen
285
- }, tooltipClassName),
282
+ })), isOpen ? /*#__PURE__*/_react.default.createElement(Portal, null, /*#__PURE__*/_react.default.createElement("span", {
283
+ className: (0, _classnames.default)("p-tooltip--".concat(adjustedPosition), "is-detached", tooltipClassName),
286
284
  "data-testid": "tooltip-portal",
287
- style: positionStyle // style={
288
- // isOpen
289
- // ? (positionStyle as React.CSSProperties)
290
- // : { left: -9999 }
291
- // }
292
-
285
+ style: positionStyle
293
286
  }, /*#__PURE__*/_react.default.createElement("span", {
294
287
  role: "tooltip",
295
288
  className: "p-tooltip__message",
@@ -298,7 +291,7 @@ var Tooltip = function Tooltip(_ref) {
298
291
  style: {
299
292
  zIndex: zIndex
300
293
  }
301
- }, message)))) : /*#__PURE__*/_react.default.createElement("span", {
294
+ }, message))) : null) : /*#__PURE__*/_react.default.createElement("span", {
302
295
  className: className
303
296
  }, children));
304
297
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-components",
3
- "version": "0.40.0",
3
+ "version": "0.40.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "Huw Wilkins <huw.wilkins@canonical.com>",
@@ -79,9 +79,9 @@
79
79
  "ts-jest": "27.1.5",
80
80
  "tsc-alias": "1.8.2",
81
81
  "typescript": "4.9.5",
82
- "vanilla-framework": "3.12.1",
82
+ "vanilla-framework": "3.13.0",
83
83
  "wait-on": "5.3.0",
84
- "webpack": "5.75.0"
84
+ "webpack": "5.76.0"
85
85
  },
86
86
  "dependencies": {
87
87
  "@types/jest": "27.5.2",
@@ -103,7 +103,7 @@
103
103
  "peerDependencies": {
104
104
  "react": "^17.0.2 || ^18.0.0",
105
105
  "react-dom": "^17.0.2 || ^18.0.0",
106
- "vanilla-framework": "3.12.1"
106
+ "vanilla-framework": "3.13.0"
107
107
  },
108
108
  "scripts": {
109
109
  "build": "rm -rf dist && yarn build-local; yarn build-declaration",
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- // A fake module to use in place of required scss files.
4
- module.exports = {};