@trops/dash-core 0.1.43 → 0.1.44

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/dist/index.esm.js CHANGED
@@ -14003,6 +14003,37 @@ var LayoutGridContainer = /*#__PURE__*/memo(function (_ref3) {
14003
14003
  return cells;
14004
14004
  }
14005
14005
 
14006
+ // Hover-based popout overlay — avoids Tailwind named groups (requires v3.4+)
14007
+ function PopoutOverlay(_ref6) {
14008
+ var children = _ref6.children,
14009
+ onPopout = _ref6.onPopout;
14010
+ var _React$useState = React__default.useState(false),
14011
+ _React$useState2 = _slicedToArray(_React$useState, 2),
14012
+ hovered = _React$useState2[0],
14013
+ setHovered = _React$useState2[1];
14014
+ return /*#__PURE__*/jsxs("div", {
14015
+ className: "relative w-full h-full",
14016
+ onMouseEnter: function onMouseEnter() {
14017
+ return setHovered(true);
14018
+ },
14019
+ onMouseLeave: function onMouseLeave() {
14020
+ return setHovered(false);
14021
+ },
14022
+ children: [children, /*#__PURE__*/jsx("button", {
14023
+ className: "absolute top-1 right-1 p-1 rounded transition-opacity bg-black/60 hover:bg-black/80 text-gray-300 hover:text-white z-10 ".concat(hovered ? "opacity-100" : "opacity-0 pointer-events-none"),
14024
+ onClick: function onClick(e) {
14025
+ e.stopPropagation();
14026
+ onPopout();
14027
+ },
14028
+ title: "Pop out widget",
14029
+ children: /*#__PURE__*/jsx(FontAwesomeIcon, {
14030
+ icon: "arrow-up-right-from-square",
14031
+ className: "h-3 w-3"
14032
+ })
14033
+ })]
14034
+ });
14035
+ }
14036
+
14006
14037
  // Render component inside a grid cell (preview mode only)
14007
14038
  function renderCellComponent(componentId, cellNumber, selectableSet) {
14008
14039
  if (!layout || !workspace) {
@@ -14016,20 +14047,11 @@ var LayoutGridContainer = /*#__PURE__*/memo(function (_ref3) {
14016
14047
  }
14017
14048
  var rendered = renderComponent(cellComponent.component, cellComponent.id, cellComponent, null);
14018
14049
  if (onWidgetPopout && cellComponent.component) {
14019
- return /*#__PURE__*/jsxs("div", {
14020
- className: "relative w-full h-full group/popout",
14021
- children: [rendered, /*#__PURE__*/jsx("button", {
14022
- className: "absolute top-1 right-1 p-1 rounded opacity-0 group-hover/popout:opacity-100 transition-opacity bg-black/60 hover:bg-black/80 text-gray-300 hover:text-white z-10",
14023
- onClick: function onClick(e) {
14024
- e.stopPropagation();
14025
- onWidgetPopout(cellComponent.id);
14026
- },
14027
- title: "Pop out widget",
14028
- children: /*#__PURE__*/jsx(FontAwesomeIcon, {
14029
- icon: "arrow-up-right-from-square",
14030
- className: "h-3 w-3"
14031
- })
14032
- })]
14050
+ return /*#__PURE__*/jsx(PopoutOverlay, {
14051
+ onPopout: function onPopout() {
14052
+ return onWidgetPopout(cellComponent.id);
14053
+ },
14054
+ children: rendered
14033
14055
  });
14034
14056
  }
14035
14057
  return rendered;