@cypress-design/react-tooltip 0.3.2 → 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/CHANGELOG.md +6 -0
- package/Tooltip.tsx +8 -6
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/index.es.mjs +5 -10
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +5 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
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
|
|
@@ -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
|
|
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 : -
|
|
30442
|
-
_b[arrowYRule] = (arrowY
|
|
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" })),
|