@cypress-design/react-tooltip 0.7.0 → 0.8.0
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +12 -0
- package/Tooltip.tsx +8 -6
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/index.es.mjs +13 -7
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +13 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -36,7 +36,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
36
36
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
37
37
|
PERFORMANCE OF THIS SOFTWARE.
|
|
38
38
|
***************************************************************************** */
|
|
39
|
-
/* global Reflect, Promise */
|
|
39
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var __assign = function() {
|
|
@@ -70,7 +70,12 @@ function __spreadArray(to, from, pack) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
73
|
-
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
76
|
+
var e = new Error(message);
|
|
77
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
78
|
+
};
|
|
74
79
|
|
|
75
80
|
function getSide(placement) {
|
|
76
81
|
return placement.split('-')[0];
|
|
@@ -33572,6 +33577,7 @@ var Tooltip = function (_a) {
|
|
|
33572
33577
|
],
|
|
33573
33578
|
whileElementsMounted: autoUpdate,
|
|
33574
33579
|
}), x = _f.x, y = _f.y, reference = _f.reference, floating = _f.floating, strategy = _f.strategy, calculatedPlacement = _f.placement, context = _f.context, _g = _f.middlewareData.arrow, _h = _g === void 0 ? {} : _g, arrowX = _h.x, arrowY = _h.y;
|
|
33580
|
+
var contextHook = useDismiss(context);
|
|
33575
33581
|
var _j = useInteractions(__spreadArray([
|
|
33576
33582
|
useHover(context, {
|
|
33577
33583
|
handleClose: interactive ? safePolygon() : undefined,
|
|
@@ -33581,7 +33587,7 @@ var Tooltip = function (_a) {
|
|
|
33581
33587
|
enabled: !disabled && !forceOpen,
|
|
33582
33588
|
}),
|
|
33583
33589
|
useRole(context, { role: 'tooltip' })
|
|
33584
|
-
], (!forceOpen ? [
|
|
33590
|
+
], (!forceOpen ? [contextHook] : []), true)), getReferenceProps = _j.getReferenceProps, getFloatingProps = _j.getFloatingProps;
|
|
33585
33591
|
var placementSide = calculatedPlacement.split('-')[0];
|
|
33586
33592
|
var arrowRotate = ROTATE_MAP[placementSide];
|
|
33587
33593
|
var arrowXRule = 'left', arrowYRule = 'top';
|
|
@@ -33602,13 +33608,13 @@ var Tooltip = function (_a) {
|
|
|
33602
33608
|
case 'light':
|
|
33603
33609
|
return {
|
|
33604
33610
|
svg: 'stroke-none fill-white',
|
|
33605
|
-
block: 'text-gray-900
|
|
33611
|
+
block: 'text-gray-900 border-transparent',
|
|
33606
33612
|
background: 'bg-white',
|
|
33607
33613
|
};
|
|
33608
33614
|
case 'dark':
|
|
33609
33615
|
return {
|
|
33610
33616
|
svg: 'stroke-none fill-gray-900',
|
|
33611
|
-
block: 'text-white
|
|
33617
|
+
block: 'text-white border-transparent',
|
|
33612
33618
|
background: 'bg-gray-900',
|
|
33613
33619
|
};
|
|
33614
33620
|
default:
|
|
@@ -33622,7 +33628,7 @@ var Tooltip = function (_a) {
|
|
|
33622
33628
|
ref: floating,
|
|
33623
33629
|
style: __assign({ position: strategy, top: y !== null && y !== void 0 ? y : '', left: x !== null && x !== void 0 ? x : '' }, (interactive ? { padding: '16px' } : {})),
|
|
33624
33630
|
})),
|
|
33625
|
-
React__namespace.createElement("div", { className: clsx('rounded shadow border', [
|
|
33631
|
+
React__namespace.createElement("div", { className: clsx('rounded shadow-tooltip border', [
|
|
33626
33632
|
colors.background,
|
|
33627
33633
|
colors.block,
|
|
33628
33634
|
(!x || !y) && 'invisible',
|
|
@@ -33644,4 +33650,4 @@ var Tooltip = function (_a) {
|
|
|
33644
33650
|
module.exports = Tooltip;
|
|
33645
33651
|
//# sourceMappingURL=index.umd.js.map
|
|
33646
33652
|
|
|
33647
|
-
/* <wind-keep class="stroke-none fill-white block text-gray-900
|
|
33653
|
+
/* <wind-keep class="stroke-none fill-white block text-gray-900 border-transparent bg-white fill-gray-900 text-white bg-gray-900 rounded shadow-tooltip border invisible absolute z-10 transform filter text-[16px] leading-[24px] min-w-[160px] text-center p-[8px] relative z-20 drop-shadow"> */
|