@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/CHANGELOG.md +12 -0
- package/Tooltip.rootstory.tsx +3 -3
- package/Tooltip.tsx +13 -11
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/index.es.mjs +11 -16
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +11 -16
- 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
|
|
@@ -30401,14 +30401,14 @@ var Tooltip = function (_a) {
|
|
|
30401
30401
|
switch (color) {
|
|
30402
30402
|
case 'light':
|
|
30403
30403
|
return {
|
|
30404
|
-
svg: 'stroke-
|
|
30405
|
-
block: 'text-gray-900
|
|
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-
|
|
30411
|
-
block: 'text-white shadow-gray-800 border-
|
|
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
|
|
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" })),
|
|
@@ -30448,5 +30443,5 @@ var Tooltip = function (_a) {
|
|
|
30448
30443
|
|
|
30449
30444
|
module.exports = Tooltip;
|
|
30450
30445
|
|
|
30451
|
-
/* <windicss-keep class="container stroke-
|
|
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
|