@elementor/editor-ui 4.3.0-1010 → 4.3.0-1012

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.js CHANGED
@@ -748,6 +748,7 @@ var PromotionAlert = ({ message, upgradeUrl, onCtaClick }) => /* @__PURE__ */ Re
748
748
  var React18 = __toESM(require("react"));
749
749
  var import_react15 = require("react");
750
750
  var import_ui18 = require("@elementor/ui");
751
+ var FLOATING_ACTIONS_PLACEMENT = "top-start";
751
752
  var FloatingBarContainer = (0, import_ui18.styled)("span")`
752
753
  display: contents;
753
754
 
@@ -762,7 +763,15 @@ var FloatingBarContainer = (0, import_ui18.styled)("span")`
762
763
  var FloatingActionsContext = (0, import_react15.createContext)(null);
763
764
  function FloatingActionsBar({ actions, children }) {
764
765
  const [open, setOpen] = (0, import_react15.useState)(false);
765
- return /* @__PURE__ */ React18.createElement(FloatingActionsContext.Provider, { value: { open, setOpen } }, /* @__PURE__ */ React18.createElement(FloatingBarContainer, null, /* @__PURE__ */ React18.createElement(import_ui18.UnstableFloatingActionBar, { actions, open: open || void 0 }, children)));
766
+ return /* @__PURE__ */ React18.createElement(FloatingActionsContext.Provider, { value: { open, setOpen } }, /* @__PURE__ */ React18.createElement(FloatingBarContainer, null, /* @__PURE__ */ React18.createElement(
767
+ import_ui18.UnstableFloatingActionBar,
768
+ {
769
+ actions,
770
+ open: open || void 0,
771
+ placement: FLOATING_ACTIONS_PLACEMENT
772
+ },
773
+ children
774
+ )));
766
775
  }
767
776
  function useFloatingActionsBar() {
768
777
  const context = (0, import_react15.useContext)(FloatingActionsContext);
package/dist/index.mjs CHANGED
@@ -708,6 +708,7 @@ var PromotionAlert = ({ message, upgradeUrl, onCtaClick }) => /* @__PURE__ */ Re
708
708
  import * as React18 from "react";
709
709
  import { createContext, useContext, useState as useState7 } from "react";
710
710
  import { styled as styled4, UnstableFloatingActionBar } from "@elementor/ui";
711
+ var FLOATING_ACTIONS_PLACEMENT = "top-start";
711
712
  var FloatingBarContainer = styled4("span")`
712
713
  display: contents;
713
714
 
@@ -722,7 +723,15 @@ var FloatingBarContainer = styled4("span")`
722
723
  var FloatingActionsContext = createContext(null);
723
724
  function FloatingActionsBar({ actions, children }) {
724
725
  const [open, setOpen] = useState7(false);
725
- return /* @__PURE__ */ React18.createElement(FloatingActionsContext.Provider, { value: { open, setOpen } }, /* @__PURE__ */ React18.createElement(FloatingBarContainer, null, /* @__PURE__ */ React18.createElement(UnstableFloatingActionBar, { actions, open: open || void 0 }, children)));
726
+ return /* @__PURE__ */ React18.createElement(FloatingActionsContext.Provider, { value: { open, setOpen } }, /* @__PURE__ */ React18.createElement(FloatingBarContainer, null, /* @__PURE__ */ React18.createElement(
727
+ UnstableFloatingActionBar,
728
+ {
729
+ actions,
730
+ open: open || void 0,
731
+ placement: FLOATING_ACTIONS_PLACEMENT
732
+ },
733
+ children
734
+ )));
726
735
  }
727
736
  function useFloatingActionsBar() {
728
737
  const context = useContext(FloatingActionsContext);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elementor/editor-ui",
3
3
  "description": "Elementor Editor UI",
4
- "version": "4.3.0-1010",
4
+ "version": "4.3.0-1012",
5
5
  "private": false,
6
6
  "author": "Elementor Team",
7
7
  "homepage": "https://elementor.com/",
@@ -37,7 +37,7 @@
37
37
  "react-dom": "^18.3.1"
38
38
  },
39
39
  "dependencies": {
40
- "@elementor/editor-v1-adapters": "4.3.0-1010",
40
+ "@elementor/editor-v1-adapters": "4.3.0-1012",
41
41
  "@elementor/icons": "~1.75.1",
42
42
  "@elementor/ui": "1.37.5",
43
43
  "@tanstack/react-virtual": "^3.13.3",
@@ -1,6 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { createContext, type PropsWithChildren, type ReactElement, useContext, useState } from 'react';
3
- import { styled, UnstableFloatingActionBar } from '@elementor/ui';
3
+ import { styled, UnstableFloatingActionBar, type UnstableFloatingActionBarProps } from '@elementor/ui';
4
+
5
+ const FLOATING_ACTIONS_PLACEMENT: NonNullable< UnstableFloatingActionBarProps[ 'placement' ] > = 'top-start';
4
6
 
5
7
  // CSS hack to hide empty floating bars.
6
8
  const FloatingBarContainer = styled( 'span' )`
@@ -26,7 +28,11 @@ export function FloatingActionsBar( { actions, children }: PropsWithChildren< {
26
28
  return (
27
29
  <FloatingActionsContext.Provider value={ { open, setOpen } }>
28
30
  <FloatingBarContainer>
29
- <UnstableFloatingActionBar actions={ actions } open={ open || undefined }>
31
+ <UnstableFloatingActionBar
32
+ actions={ actions }
33
+ open={ open || undefined }
34
+ placement={ FLOATING_ACTIONS_PLACEMENT }
35
+ >
30
36
  { children as ReactElement }
31
37
  </UnstableFloatingActionBar>
32
38
  </FloatingBarContainer>