@cypress-design/react-tooltip 0.3.2 → 0.3.4

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.umd.js CHANGED
@@ -30366,7 +30366,7 @@ var Tooltip = function (_a) {
30366
30366
  fn: function (obj) { return obj; }
30367
30367
  }
30368
30368
  : flip(),
30369
- offset(0),
30369
+ offset(interactive ? 0 : 16),
30370
30370
  arrow({ element: arrowRef, padding: 24 }),
30371
30371
  ],
30372
30372
  whileElementsMounted: autoUpdate
@@ -30418,32 +30418,27 @@ var Tooltip = function (_a) {
30418
30418
  var colors = getColors();
30419
30419
  return (React__namespace.createElement(React__namespace.Fragment, null,
30420
30420
  React__namespace.createElement("div", __assign({}, getReferenceProps(), { ref: reference, className: className }, rest), children),
30421
- React__namespace.createElement(FloatingPortal, null, open && !disabled && (React__namespace.createElement("div", __assign({}, getFloatingProps({
30421
+ disabled ? null : (React__namespace.createElement(FloatingPortal, null, open && (React__namespace.createElement("div", __assign({}, getFloatingProps({
30422
30422
  ref: floating,
30423
- style: {
30424
- position: strategy,
30425
- top: y !== null && y !== void 0 ? y : '',
30426
- left: x !== null && x !== void 0 ? x : '',
30427
- padding: '16px'
30428
- }
30423
+ style: __assign({ position: strategy, top: y !== null && y !== void 0 ? y : '', left: x !== null && x !== void 0 ? x : '' }, (interactive ? { padding: '16px' } : {}))
30429
30424
  })),
30430
30425
  React__namespace.createElement("div", { className: clsx__default["default"]('rounded shadow border', [
30431
30426
  colors.background,
30432
30427
  colors.block,
30433
30428
  (!x || !y) && 'invisible',
30434
30429
  ]) },
30435
- React__namespace.createElement("svg", { ref: arrowRef, viewBox: "0 0 48 48", width: "24", height: "24", className: clsx__default["default"]('absolute z-10', colors.svg), style: (_b = {
30430
+ React__namespace.createElement("svg", { ref: arrowRef, viewBox: "0 0 48 24", width: "24", height: "12", className: clsx__default["default"]('absolute z-10', colors.svg), style: (_b = {
30436
30431
  transform: "rotate(" + arrowRotate + "deg)",
30437
30432
  filter: placementSide === 'bottom' || color === 'dark'
30438
30433
  ? 'drop-shadow(0 1px 1px rgba(225, 227, 237, .3))'
30439
30434
  : 'drop-shadow(0 1px 1px rgba(225, 227, 237, .8))'
30440
30435
  },
30441
- _b[arrowXRule] = (arrowX !== null && arrowX !== void 0 ? arrowX : -6) + "px",
30442
- _b[arrowYRule] = (arrowY !== null && arrowY !== void 0 ? arrowY : -6) + "px",
30436
+ _b[arrowXRule] = (arrowX !== null && arrowX !== void 0 ? arrowX : (interactive ? 0 : -16)) + "px",
30437
+ _b[arrowYRule] = (arrowY ? arrowY + 6 : interactive ? 6 : -10) + "px",
30443
30438
  _b), fill: "none" },
30444
30439
  React__namespace.createElement("rect", { x: "0", y: "0", width: "48", height: "4", strokeWidth: "0" }),
30445
30440
  React__namespace.createElement("path", { d: "M 0 3 C 12 3 18 18 24 18 C 30 18 36 3 48 3", strokeWidth: "2" })),
30446
- React__namespace.createElement("div", { className: clsx__default["default"]('rounded text-16px leading-24px min-w-160px text-center p-8px relative z-20', colors.background) }, popper)))))));
30441
+ React__namespace.createElement("div", { className: clsx__default["default"]('rounded text-16px leading-24px min-w-160px text-center p-8px relative z-20', colors.background) }, popper))))))));
30447
30442
  };
30448
30443
 
30449
30444
  module.exports = Tooltip;