publ-echo-test 0.0.177 → 0.0.178
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.
@@ -40,40 +40,47 @@ var OutsideClickHandler = function (_a) {
|
|
40
40
|
var width = parseFloat(childDimensions.width) || 0;
|
41
41
|
var height = parseFloat(childDimensions.height) || 0;
|
42
42
|
var borderThickness = 3; // 3px border thickness
|
43
|
+
var shadowOffset = 3; // Match the child's shadow (0 0 0 3px #027aff)
|
43
44
|
return (_jsxs(_Fragment, { children: [_jsx("div", { ref: wrapperRef, className: 'outside-click-wrapper', children: children }), width > 0 && height > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { className: "border-top", style: {
|
44
45
|
position: 'absolute',
|
45
46
|
transform: childDimensions.transform,
|
46
|
-
width: "".concat(width, "px"),
|
47
|
+
width: "".concat(width + (shadowOffset * 2), "px"),
|
47
48
|
height: "".concat(borderThickness, "px"),
|
48
|
-
backgroundColor: '
|
49
|
+
backgroundColor: '#027aff',
|
50
|
+
marginLeft: "-".concat(shadowOffset, "px"),
|
51
|
+
marginTop: "-".concat(shadowOffset, "px"),
|
49
52
|
pointerEvents: 'none',
|
50
53
|
zIndex: 999
|
51
54
|
} }), _jsx("div", { className: "border-right", style: {
|
52
55
|
position: 'absolute',
|
53
56
|
transform: childDimensions.transform,
|
54
57
|
width: "".concat(borderThickness, "px"),
|
55
|
-
height: "".concat(height, "px"),
|
56
|
-
backgroundColor: '
|
57
|
-
marginLeft: "".concat(width - borderThickness, "px"),
|
58
|
+
height: "".concat(height + (shadowOffset * 2), "px"),
|
59
|
+
backgroundColor: '#027aff',
|
60
|
+
marginLeft: "".concat(width + shadowOffset - borderThickness, "px"),
|
61
|
+
marginTop: "-".concat(shadowOffset, "px"),
|
58
62
|
pointerEvents: 'none',
|
59
63
|
zIndex: 999
|
60
64
|
} }), _jsx("div", { className: "border-bottom", style: {
|
61
65
|
position: 'absolute',
|
62
66
|
transform: childDimensions.transform,
|
63
|
-
width: "".concat(width, "px"),
|
67
|
+
width: "".concat(width + (shadowOffset * 2), "px"),
|
64
68
|
height: "".concat(borderThickness, "px"),
|
65
|
-
backgroundColor: '
|
66
|
-
|
69
|
+
backgroundColor: '#027aff',
|
70
|
+
marginLeft: "-".concat(shadowOffset, "px"),
|
71
|
+
marginTop: "".concat(height + shadowOffset - borderThickness, "px"),
|
67
72
|
pointerEvents: 'none',
|
68
|
-
zIndex:
|
73
|
+
zIndex: 99999
|
69
74
|
} }), _jsx("div", { className: "border-left", style: {
|
70
75
|
position: 'absolute',
|
71
76
|
transform: childDimensions.transform,
|
72
77
|
width: "".concat(borderThickness, "px"),
|
73
|
-
height: "".concat(height, "px"),
|
74
|
-
backgroundColor: '
|
78
|
+
height: "".concat(height + (shadowOffset * 2), "px"),
|
79
|
+
backgroundColor: '#027aff',
|
80
|
+
marginLeft: "-".concat(shadowOffset, "px"),
|
81
|
+
marginTop: "-".concat(shadowOffset, "px"),
|
75
82
|
pointerEvents: 'none',
|
76
|
-
zIndex:
|
83
|
+
zIndex: 99999
|
77
84
|
} })] }))] }));
|
78
85
|
};
|
79
86
|
export default OutsideClickHandler;
|