@capillarytech/cap-ui-utils 1.4.6-alpha6.0 → 1.4.6-alpha7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capillarytech/cap-ui-utils",
3
- "version": "1.4.6-alpha6.0",
3
+ "version": "1.4.6-alpha7.0",
4
4
  "description": "Utility functions shared accross all the modules",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -37,25 +37,14 @@ const ResizablePIP = ({
37
37
  };
38
38
 
39
39
  const handleOpenDoc = () => window.open(footerContent.supportDoc, "_blank");
40
- console.log("NIKHIL hover: ", isHovering);
41
- const draggableStyle = {
42
- position: "relative",
43
- left: 24,
44
- // bottom: "-88vh",
45
- margin: 2,
46
- border: '1px solid black',
47
- };
48
40
  return (
49
- <Draggable
50
- style={draggableStyle}
51
- >
41
+ <Draggable>
52
42
  <div
53
43
  style={{
54
44
  zIndex: "100000",
55
- position: "fixed",
56
- fontSize: "14px",
57
- fontWeight: "200",
58
- lineHeight: "1.5",
45
+ position: "absolute",
46
+ left: showMaximised ? 168 : 24,
47
+ top: showMaximised ? 60 : 450,
59
48
  boxSizing: "content-box",
60
49
  boxShadow:
61
50
  "1px 3px 3px 0 rgb(0 0 0 / 20%), 1px 3px 15px 2px rgb(0 0 0 / 20%)",
@@ -83,24 +72,34 @@ const ResizablePIP = ({
83
72
  onMouseEnter={handleMouseEnter}
84
73
  onMouseLeave={handleMouseLeave}
85
74
  >
75
+ {isHovering && (
76
+ <CapIcon
77
+ onClick={closePIPContainer}
78
+ size="m"
79
+ type="close"
80
+ style={{
81
+ position: "fixed",
82
+ top: showMaximised ? "-10px" : "10px",
83
+ left: showMaximised ? "1093px" : "365px",
84
+ backgroundColor: showMaximised ? "#dfe2e7" : "unset",
85
+ borderRadius: 48,
86
+ }}
87
+ />
88
+ )}
86
89
  {children}
87
90
  {isHovering && (
88
91
  <>
89
- <div
92
+ <CapIcon
93
+ onClick={handleMaximiseView}
94
+ size="m"
95
+ type="open-in-new"
90
96
  style={{
91
97
  float: "right",
92
98
  position: "fixed",
93
- top: 224,
94
- right: 16,
99
+ top: showMaximised ? 635 : 224,
100
+ right: 12,
95
101
  }}
96
- >
97
- <CapIcon
98
- onClick={handleMaximiseView}
99
- size="m"
100
- type="open-in-new"
101
- style={{opacity: '1 !important'}}
102
- />
103
- </div>
102
+ />
104
103
  </>
105
104
  )}
106
105
  </div>