@cypress-design/react-tooltip 0.3.1 → 0.3.3

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
@@ -30401,14 +30401,14 @@ var Tooltip = function (_a) {
30401
30401
  switch (color) {
30402
30402
  case 'light':
30403
30403
  return {
30404
- svg: 'stroke-gray-100 fill-white',
30405
- block: 'text-gray-900 border-gray-100 shadow-gray-100',
30404
+ svg: 'stroke-none fill-white',
30405
+ block: 'text-gray-900 shadow-gray-100 border-transparent ',
30406
30406
  background: 'bg-white'
30407
30407
  };
30408
30408
  case 'dark':
30409
30409
  return {
30410
- svg: 'stroke-gray-800 fill-gray-900',
30411
- block: 'text-white shadow-gray-800 border-gray-800',
30410
+ svg: 'stroke-none fill-gray-900',
30411
+ block: 'text-white shadow-gray-800 border-transparent',
30412
30412
  background: 'bg-gray-900'
30413
30413
  };
30414
30414
  default:
@@ -30420,26 +30420,21 @@ var Tooltip = function (_a) {
30420
30420
  React__namespace.createElement("div", __assign({}, getReferenceProps(), { ref: reference, className: className }, rest), children),
30421
30421
  React__namespace.createElement(FloatingPortal, null, open && !disabled && (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
- ? undefined
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" })),
@@ -30448,5 +30443,5 @@ var Tooltip = function (_a) {
30448
30443
 
30449
30444
  module.exports = Tooltip;
30450
30445
 
30451
- /* <windicss-keep class="container stroke-gray-100 fill-white text-gray-900 border-gray-100 shadow-gray-100 bg-white stroke-gray-800 fill-gray-900 text-white shadow-gray-800 border-gray-800 bg-gray-900 rounded shadow border invisible absolute z-10 text-16px leading-24px min-w-160px text-center p-8px relative z-20"> */
30446
+ /* <windicss-keep class="container stroke-none fill-white text-gray-900 shadow-gray-100 border-transparent bg-white fill-gray-900 text-white shadow-gray-800 bg-gray-900 rounded shadow border invisible absolute z-10 text-16px leading-24px min-w-160px text-center p-8px relative z-20"> */
30452
30447
  //# sourceMappingURL=index.umd.js.map