@elementor/editor-components 3.35.0-381 → 3.35.0-382

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
@@ -379,23 +379,23 @@ function useNavigateBack() {
379
379
  }
380
380
 
381
381
  // src/components/component-properties-panel/component-properties-panel.tsx
382
- var React7 = __toESM(require("react"));
382
+ var React8 = __toESM(require("react"));
383
383
  var import_editor_editing_panel = require("@elementor/editor-editing-panel");
384
384
  var import_editor_elements3 = require("@elementor/editor-elements");
385
385
  var import_editor_panels2 = require("@elementor/editor-panels");
386
- var import_editor_ui4 = require("@elementor/editor-ui");
387
- var import_ui7 = require("@elementor/ui");
388
- var import_i18n8 = require("@wordpress/i18n");
386
+ var import_editor_ui5 = require("@elementor/editor-ui");
387
+ var import_ui8 = require("@elementor/ui");
388
+ var import_i18n9 = require("@wordpress/i18n");
389
389
 
390
390
  // src/components/component-properties-panel/component-properties-panel-content.tsx
391
- var React6 = __toESM(require("react"));
392
- var import_react4 = require("react");
391
+ var React7 = __toESM(require("react"));
392
+ var import_react5 = require("react");
393
393
  var import_editor_documents4 = require("@elementor/editor-documents");
394
394
  var import_editor_panels = require("@elementor/editor-panels");
395
395
  var import_icons5 = require("@elementor/icons");
396
- var import_ui6 = require("@elementor/ui");
396
+ var import_ui7 = require("@elementor/ui");
397
397
  var import_utils2 = require("@elementor/utils");
398
- var import_i18n7 = require("@wordpress/i18n");
398
+ var import_i18n8 = require("@wordpress/i18n");
399
399
 
400
400
  // src/store/actions/add-overridable-group.ts
401
401
  var import_store7 = require("@elementor/store");
@@ -744,14 +744,63 @@ function useOverridableProps(componentId) {
744
744
  }
745
745
 
746
746
  // src/components/component-properties-panel/properties-empty-state.tsx
747
- var React = __toESM(require("react"));
747
+ var React2 = __toESM(require("react"));
748
+ var import_react2 = require("react");
748
749
  var import_icons = require("@elementor/icons");
750
+ var import_ui2 = require("@elementor/ui");
751
+ var import_i18n3 = require("@wordpress/i18n");
752
+
753
+ // src/components/components-tab/component-introduction.tsx
754
+ var React = __toESM(require("react"));
755
+ var import_editor_controls = require("@elementor/editor-controls");
756
+ var import_editor_ui = require("@elementor/editor-ui");
749
757
  var import_ui = require("@elementor/ui");
750
758
  var import_i18n2 = require("@wordpress/i18n");
751
- var LEARN_MORE_URL = "https://go.elementor.com/tbd/";
752
- function PropertiesEmptyState() {
759
+ var ComponentIntroduction = ({
760
+ anchorRef,
761
+ shouldShowIntroduction,
762
+ onClose
763
+ }) => {
764
+ if (!anchorRef.current || !shouldShowIntroduction) {
765
+ return null;
766
+ }
753
767
  return /* @__PURE__ */ React.createElement(
754
- import_ui.Stack,
768
+ import_ui.Popover,
769
+ {
770
+ anchorEl: anchorRef.current,
771
+ open: shouldShowIntroduction,
772
+ anchorOrigin: {
773
+ vertical: "top",
774
+ horizontal: "right"
775
+ },
776
+ transformOrigin: {
777
+ vertical: "top",
778
+ horizontal: -30
779
+ },
780
+ onClose
781
+ },
782
+ /* @__PURE__ */ React.createElement(import_ui.Box, { sx: { width: "296px" } }, /* @__PURE__ */ React.createElement(import_editor_ui.PopoverHeader, { title: (0, import_i18n2.__)("Add your first property", "elementor"), onClose }), /* @__PURE__ */ React.createElement(
783
+ import_ui.Image,
784
+ {
785
+ sx: { width: "296px", height: "160px" },
786
+ src: "https://assets.elementor.com/packages/v1/images/components-properties-intro.png",
787
+ alt: ""
788
+ }
789
+ ), /* @__PURE__ */ React.createElement(import_editor_controls.PopoverContent, null, /* @__PURE__ */ React.createElement(import_ui.Stack, { gap: 1, sx: { p: 2 } }, /* @__PURE__ */ React.createElement(import_ui.Typography, { variant: "body2" }, (0, import_i18n2.__)("Properties make instances flexible.", "elementor")), /* @__PURE__ */ React.createElement(import_ui.Typography, { variant: "body2" }, (0, import_i18n2.__)(
790
+ "Click next to any setting you want users to customize - like text, images, or links.",
791
+ "elementor"
792
+ )), /* @__PURE__ */ React.createElement(import_ui.Typography, { variant: "body2" }, (0, import_i18n2.__)(
793
+ "Your properties will appear in the Properties panel, where you can organize and manage them anytime.",
794
+ "elementor"
795
+ )), /* @__PURE__ */ React.createElement(import_ui.Stack, { direction: "row", alignItems: "center", justifyContent: "flex-end" }, /* @__PURE__ */ React.createElement(import_ui.Button, { size: "medium", variant: "contained", onClick: onClose }, (0, import_i18n2.__)("Got it", "elementor"))))))
796
+ );
797
+ };
798
+
799
+ // src/components/component-properties-panel/properties-empty-state.tsx
800
+ function PropertiesEmptyState({ introductionRef }) {
801
+ const [isOpen, setIsOpen] = (0, import_react2.useState)(false);
802
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
803
+ import_ui2.Stack,
755
804
  {
756
805
  alignItems: "center",
757
806
  justifyContent: "flex-start",
@@ -760,56 +809,61 @@ function PropertiesEmptyState() {
760
809
  sx: { px: 2.5, pt: 10, pb: 5.5 },
761
810
  gap: 1
762
811
  },
763
- /* @__PURE__ */ React.createElement(import_icons.ComponentPropListIcon, { fontSize: "large" }),
764
- /* @__PURE__ */ React.createElement(import_ui.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n2.__)("Add your first property", "elementor")),
765
- /* @__PURE__ */ React.createElement(import_ui.Typography, { align: "center", variant: "caption" }, (0, import_i18n2.__)("Make instances flexible while keeping design synced.", "elementor")),
766
- /* @__PURE__ */ React.createElement(import_ui.Typography, { align: "center", variant: "caption" }, (0, import_i18n2.__)("Select any element, then click + next to a setting to expose it.", "elementor")),
767
- /* @__PURE__ */ React.createElement(
768
- import_ui.Link,
812
+ /* @__PURE__ */ React2.createElement(import_icons.ComponentPropListIcon, { fontSize: "large" }),
813
+ /* @__PURE__ */ React2.createElement(import_ui2.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n3.__)("Add your first property", "elementor")),
814
+ /* @__PURE__ */ React2.createElement(import_ui2.Typography, { align: "center", variant: "caption" }, (0, import_i18n3.__)("Make instances flexible while keeping design synced.", "elementor")),
815
+ /* @__PURE__ */ React2.createElement(import_ui2.Typography, { align: "center", variant: "caption" }, (0, import_i18n3.__)("Select any element, then click + next to a setting to expose it.", "elementor")),
816
+ /* @__PURE__ */ React2.createElement(
817
+ import_ui2.Link,
769
818
  {
770
819
  variant: "caption",
771
820
  color: "secondary",
772
- href: LEARN_MORE_URL,
773
- target: "_blank",
774
- rel: "noopener noreferrer",
775
- sx: { textDecorationLine: "underline" }
821
+ sx: { textDecorationLine: "underline" },
822
+ onClick: () => setIsOpen(true)
776
823
  },
777
- (0, import_i18n2.__)("Learn more", "elementor")
824
+ (0, import_i18n3.__)("Learn more", "elementor")
778
825
  )
779
- );
826
+ ), /* @__PURE__ */ React2.createElement(
827
+ ComponentIntroduction,
828
+ {
829
+ anchorRef: introductionRef,
830
+ shouldShowIntroduction: isOpen,
831
+ onClose: () => setIsOpen(false)
832
+ }
833
+ ));
780
834
  }
781
835
 
782
836
  // src/components/component-properties-panel/properties-group.tsx
783
- var React5 = __toESM(require("react"));
784
- var import_editor_ui2 = require("@elementor/editor-ui");
837
+ var React6 = __toESM(require("react"));
838
+ var import_editor_ui3 = require("@elementor/editor-ui");
785
839
  var import_icons4 = require("@elementor/icons");
786
- var import_ui5 = require("@elementor/ui");
787
- var import_i18n4 = require("@wordpress/i18n");
840
+ var import_ui6 = require("@elementor/ui");
841
+ var import_i18n5 = require("@wordpress/i18n");
788
842
 
789
843
  // src/components/component-properties-panel/property-item.tsx
790
- var React4 = __toESM(require("react"));
844
+ var React5 = __toESM(require("react"));
791
845
  var import_editor_elements2 = require("@elementor/editor-elements");
792
846
  var import_icons3 = require("@elementor/icons");
793
- var import_ui4 = require("@elementor/ui");
847
+ var import_ui5 = require("@elementor/ui");
794
848
 
795
849
  // src/components/overridable-props/overridable-prop-form.tsx
796
- var React2 = __toESM(require("react"));
797
- var import_react2 = require("react");
798
- var import_editor_ui = require("@elementor/editor-ui");
799
- var import_ui2 = require("@elementor/ui");
800
- var import_i18n3 = require("@wordpress/i18n");
850
+ var React3 = __toESM(require("react"));
851
+ var import_react3 = require("react");
852
+ var import_editor_ui2 = require("@elementor/editor-ui");
853
+ var import_ui3 = require("@elementor/ui");
854
+ var import_i18n4 = require("@wordpress/i18n");
801
855
  var SIZE = "tiny";
802
- var DEFAULT_GROUP = { value: null, label: (0, import_i18n3.__)("Default", "elementor") };
856
+ var DEFAULT_GROUP = { value: null, label: (0, import_i18n4.__)("Default", "elementor") };
803
857
  function OverridablePropForm({ onSubmit, groups, currentValue, sx }) {
804
- const [propLabel, setPropLabel] = (0, import_react2.useState)(currentValue?.label ?? null);
805
- const [group, setGroup] = (0, import_react2.useState)(currentValue?.groupId ?? groups?.[0]?.value ?? null);
806
- const name = (0, import_i18n3.__)("Name", "elementor");
807
- const groupName = (0, import_i18n3.__)("Group Name", "elementor");
858
+ const [propLabel, setPropLabel] = (0, import_react3.useState)(currentValue?.label ?? null);
859
+ const [group, setGroup] = (0, import_react3.useState)(currentValue?.groupId ?? groups?.[0]?.value ?? null);
860
+ const name = (0, import_i18n4.__)("Name", "elementor");
861
+ const groupName = (0, import_i18n4.__)("Group Name", "elementor");
808
862
  const isCreate = currentValue === void 0;
809
- const title = isCreate ? (0, import_i18n3.__)("Create new property", "elementor") : (0, import_i18n3.__)("Update property", "elementor");
810
- const ctaLabel = isCreate ? (0, import_i18n3.__)("Create", "elementor") : (0, import_i18n3.__)("Update", "elementor");
811
- return /* @__PURE__ */ React2.createElement(import_editor_ui.Form, { onSubmit: () => onSubmit({ label: propLabel ?? "", group }) }, /* @__PURE__ */ React2.createElement(import_ui2.Stack, { alignItems: "start", sx: { width: "268px", ...sx } }, /* @__PURE__ */ React2.createElement(
812
- import_ui2.Stack,
863
+ const title = isCreate ? (0, import_i18n4.__)("Create new property", "elementor") : (0, import_i18n4.__)("Update property", "elementor");
864
+ const ctaLabel = isCreate ? (0, import_i18n4.__)("Create", "elementor") : (0, import_i18n4.__)("Update", "elementor");
865
+ return /* @__PURE__ */ React3.createElement(import_editor_ui2.Form, { onSubmit: () => onSubmit({ label: propLabel ?? "", group }) }, /* @__PURE__ */ React3.createElement(import_ui3.Stack, { alignItems: "start", sx: { width: "268px", ...sx } }, /* @__PURE__ */ React3.createElement(
866
+ import_ui3.Stack,
813
867
  {
814
868
  direction: "row",
815
869
  alignItems: "center",
@@ -817,19 +871,19 @@ function OverridablePropForm({ onSubmit, groups, currentValue, sx }) {
817
871
  px: 1.5,
818
872
  sx: { columnGap: 0.5, borderBottom: "1px solid", borderColor: "divider", width: "100%", mb: 1.5 }
819
873
  },
820
- /* @__PURE__ */ React2.createElement(import_ui2.Typography, { variant: "caption", sx: { color: "text.primary", fontWeight: "500", lineHeight: 1 } }, title)
821
- ), /* @__PURE__ */ React2.createElement(import_ui2.Grid, { container: true, gap: 0.75, alignItems: "start", px: 1.5, mb: 1.5 }, /* @__PURE__ */ React2.createElement(import_ui2.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React2.createElement(import_ui2.FormLabel, { size: "tiny" }, name)), /* @__PURE__ */ React2.createElement(import_ui2.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React2.createElement(
822
- import_ui2.TextField,
874
+ /* @__PURE__ */ React3.createElement(import_ui3.Typography, { variant: "caption", sx: { color: "text.primary", fontWeight: "500", lineHeight: 1 } }, title)
875
+ ), /* @__PURE__ */ React3.createElement(import_ui3.Grid, { container: true, gap: 0.75, alignItems: "start", px: 1.5, mb: 1.5 }, /* @__PURE__ */ React3.createElement(import_ui3.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React3.createElement(import_ui3.FormLabel, { size: "tiny" }, name)), /* @__PURE__ */ React3.createElement(import_ui3.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React3.createElement(
876
+ import_ui3.TextField,
823
877
  {
824
878
  name,
825
879
  size: SIZE,
826
880
  fullWidth: true,
827
- placeholder: (0, import_i18n3.__)("Enter value", "elementor"),
881
+ placeholder: (0, import_i18n4.__)("Enter value", "elementor"),
828
882
  value: propLabel ?? "",
829
883
  onChange: (e) => setPropLabel(e.target.value)
830
884
  }
831
- ))), /* @__PURE__ */ React2.createElement(import_ui2.Grid, { container: true, gap: 0.75, alignItems: "start", px: 1.5, mb: 1.5 }, /* @__PURE__ */ React2.createElement(import_ui2.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React2.createElement(import_ui2.FormLabel, { size: "tiny" }, groupName)), /* @__PURE__ */ React2.createElement(import_ui2.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React2.createElement(
832
- import_ui2.Select,
885
+ ))), /* @__PURE__ */ React3.createElement(import_ui3.Grid, { container: true, gap: 0.75, alignItems: "start", px: 1.5, mb: 1.5 }, /* @__PURE__ */ React3.createElement(import_ui3.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React3.createElement(import_ui3.FormLabel, { size: "tiny" }, groupName)), /* @__PURE__ */ React3.createElement(import_ui3.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React3.createElement(
886
+ import_ui3.Select,
833
887
  {
834
888
  name: groupName,
835
889
  size: SIZE,
@@ -845,16 +899,16 @@ function OverridablePropForm({ onSubmit, groups, currentValue, sx }) {
845
899
  return groups?.find(({ value }) => value === selectedValue)?.label ?? selectedValue;
846
900
  }
847
901
  },
848
- (groups ?? [DEFAULT_GROUP]).map(({ label: groupLabel, ...props }) => /* @__PURE__ */ React2.createElement(import_editor_ui.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, groupLabel))
849
- ))), /* @__PURE__ */ React2.createElement(import_ui2.Stack, { direction: "row", justifyContent: "flex-end", alignSelf: "end", mt: 1.5, py: 1, px: 1.5 }, /* @__PURE__ */ React2.createElement(import_ui2.Button, { type: "submit", disabled: !propLabel, variant: "contained", color: "primary", size: "small" }, ctaLabel))));
902
+ (groups ?? [DEFAULT_GROUP]).map(({ label: groupLabel, ...props }) => /* @__PURE__ */ React3.createElement(import_editor_ui2.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, groupLabel))
903
+ ))), /* @__PURE__ */ React3.createElement(import_ui3.Stack, { direction: "row", justifyContent: "flex-end", alignSelf: "end", mt: 1.5, py: 1, px: 1.5 }, /* @__PURE__ */ React3.createElement(import_ui3.Button, { type: "submit", disabled: !propLabel, variant: "contained", color: "primary", size: "small" }, ctaLabel))));
850
904
  }
851
905
 
852
906
  // src/components/component-properties-panel/sortable.tsx
853
- var React3 = __toESM(require("react"));
907
+ var React4 = __toESM(require("react"));
854
908
  var import_icons2 = require("@elementor/icons");
855
- var import_ui3 = require("@elementor/ui");
856
- var SortableProvider = (props) => /* @__PURE__ */ React3.createElement(import_ui3.UnstableSortableProvider, { restrictAxis: true, variant: "static", dragPlaceholderStyle: { opacity: "1" }, ...props });
857
- var SortableTrigger = ({ triggerClassName, ...props }) => /* @__PURE__ */ React3.createElement(
909
+ var import_ui4 = require("@elementor/ui");
910
+ var SortableProvider = (props) => /* @__PURE__ */ React4.createElement(import_ui4.UnstableSortableProvider, { restrictAxis: true, variant: "static", dragPlaceholderStyle: { opacity: "1" }, ...props });
911
+ var SortableTrigger = ({ triggerClassName, ...props }) => /* @__PURE__ */ React4.createElement(
858
912
  StyledSortableTrigger,
859
913
  {
860
914
  ...props,
@@ -862,10 +916,10 @@ var SortableTrigger = ({ triggerClassName, ...props }) => /* @__PURE__ */ React3
862
916
  className: `sortable-trigger ${triggerClassName ?? ""}`.trim(),
863
917
  "aria-label": "sort"
864
918
  },
865
- /* @__PURE__ */ React3.createElement(import_icons2.GripVerticalIcon, { fontSize: "tiny" })
919
+ /* @__PURE__ */ React4.createElement(import_icons2.GripVerticalIcon, { fontSize: "tiny" })
866
920
  );
867
- var SortableItem = ({ children, id: id2 }) => /* @__PURE__ */ React3.createElement(
868
- import_ui3.UnstableSortableItem,
921
+ var SortableItem = ({ children, id: id2 }) => /* @__PURE__ */ React4.createElement(
922
+ import_ui4.UnstableSortableItem,
869
923
  {
870
924
  id: id2,
871
925
  render: ({
@@ -878,8 +932,8 @@ var SortableItem = ({ children, id: id2 }) => /* @__PURE__ */ React3.createEleme
878
932
  showDropIndication,
879
933
  isDragOverlay,
880
934
  isDragPlaceholder
881
- }) => /* @__PURE__ */ React3.createElement(
882
- import_ui3.Box,
935
+ }) => /* @__PURE__ */ React4.createElement(
936
+ import_ui4.Box,
883
937
  {
884
938
  ...itemProps,
885
939
  style: itemStyle,
@@ -895,19 +949,19 @@ var SortableItem = ({ children, id: id2 }) => /* @__PURE__ */ React3.createEleme
895
949
  triggerProps,
896
950
  triggerStyle
897
951
  }),
898
- showDropIndication && /* @__PURE__ */ React3.createElement(SortableItemIndicator, { style: dropIndicationStyle })
952
+ showDropIndication && /* @__PURE__ */ React4.createElement(SortableItemIndicator, { style: dropIndicationStyle })
899
953
  )
900
954
  }
901
955
  );
902
- var StyledSortableTrigger = (0, import_ui3.styled)("div")(({ theme }) => ({
956
+ var StyledSortableTrigger = (0, import_ui4.styled)("div")(({ theme }) => ({
903
957
  position: "absolute",
904
- left: 0,
958
+ left: "-2px",
905
959
  top: "50%",
906
960
  transform: `translate( -${theme.spacing(1.5)}, -50% )`,
907
961
  color: theme.palette.action.active,
908
962
  cursor: "grab"
909
963
  }));
910
- var SortableItemIndicator = (0, import_ui3.styled)(import_ui3.Box)`
964
+ var SortableItemIndicator = (0, import_ui4.styled)(import_ui4.Box)`
911
965
  width: 100%;
912
966
  height: 1px;
913
967
  background-color: ${({ theme }) => theme.palette.text.primary};
@@ -922,11 +976,11 @@ function PropertyItem({
922
976
  onDelete,
923
977
  onUpdate
924
978
  }) {
925
- const popoverState = (0, import_ui4.usePopupState)({
979
+ const popoverState = (0, import_ui5.usePopupState)({
926
980
  variant: "popover"
927
981
  });
928
982
  const icon = getElementIcon(prop);
929
- const popoverProps = (0, import_ui4.bindPopover)(popoverState);
983
+ const popoverProps = (0, import_ui5.bindPopover)(popoverState);
930
984
  const handleSubmit = (data) => {
931
985
  onUpdate(data);
932
986
  popoverState.close();
@@ -935,10 +989,10 @@ function PropertyItem({
935
989
  event.stopPropagation();
936
990
  onDelete(prop.overrideKey);
937
991
  };
938
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
939
- import_ui4.Box,
992
+ return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
993
+ import_ui5.Box,
940
994
  {
941
- ...(0, import_ui4.bindTrigger)(popoverState),
995
+ ...(0, import_ui5.bindTrigger)(popoverState),
942
996
  sx: {
943
997
  position: "relative",
944
998
  pl: 0.5,
@@ -970,25 +1024,25 @@ function PropertyItem({
970
1024
  }
971
1025
  }
972
1026
  },
973
- /* @__PURE__ */ React4.createElement(SortableTrigger, { ...sortableTriggerProps }),
974
- /* @__PURE__ */ React4.createElement(
975
- import_ui4.Box,
1027
+ /* @__PURE__ */ React5.createElement(SortableTrigger, { ...sortableTriggerProps }),
1028
+ /* @__PURE__ */ React5.createElement(
1029
+ import_ui5.Box,
976
1030
  {
977
1031
  sx: { display: "flex", alignItems: "center", color: "text.primary", fontSize: 12, padding: 0.25 }
978
1032
  },
979
- /* @__PURE__ */ React4.createElement("i", { className: icon })
1033
+ /* @__PURE__ */ React5.createElement("i", { className: icon })
980
1034
  ),
981
- /* @__PURE__ */ React4.createElement(import_ui4.Typography, { variant: "caption", sx: { color: "text.primary", flexGrow: 1, fontSize: 10 } }, prop.label),
982
- /* @__PURE__ */ React4.createElement(import_ui4.IconButton, { size: "tiny", onClick: handleDelete, "aria-label": "Delete property", sx: { p: 0.25 } }, /* @__PURE__ */ React4.createElement(import_icons3.XIcon, { fontSize: "tiny" }))
983
- ), /* @__PURE__ */ React4.createElement(
984
- import_ui4.Popover,
1035
+ /* @__PURE__ */ React5.createElement(import_ui5.Typography, { variant: "caption", sx: { color: "text.primary", flexGrow: 1, fontSize: 10 } }, prop.label),
1036
+ /* @__PURE__ */ React5.createElement(import_ui5.IconButton, { size: "tiny", onClick: handleDelete, "aria-label": "Delete property", sx: { p: 0.25 } }, /* @__PURE__ */ React5.createElement(import_icons3.XIcon, { fontSize: "tiny" }))
1037
+ ), /* @__PURE__ */ React5.createElement(
1038
+ import_ui5.Popover,
985
1039
  {
986
1040
  ...popoverProps,
987
1041
  anchorOrigin: { vertical: "bottom", horizontal: "left" },
988
1042
  transformOrigin: { vertical: "top", horizontal: "left" },
989
1043
  PaperProps: { sx: { width: popoverState.anchorEl?.getBoundingClientRect().width } }
990
1044
  },
991
- /* @__PURE__ */ React4.createElement(
1045
+ /* @__PURE__ */ React5.createElement(
992
1046
  OverridablePropForm,
993
1047
  {
994
1048
  onSubmit: handleSubmit,
@@ -1023,7 +1077,7 @@ function PropertiesGroup({
1023
1077
  editableLabelProps
1024
1078
  }) {
1025
1079
  const groupProps = group.props.map((propId) => props[propId]).filter((prop) => Boolean(prop));
1026
- const popupState = (0, import_ui5.usePopupState)({
1080
+ const popupState = (0, import_ui6.usePopupState)({
1027
1081
  variant: "popover",
1028
1082
  disableAutoFocus: true
1029
1083
  });
@@ -1038,15 +1092,15 @@ function PropertiesGroup({
1038
1092
  popupState.close();
1039
1093
  onGroupDelete(group.id);
1040
1094
  };
1041
- return /* @__PURE__ */ React5.createElement(
1042
- import_ui5.Box,
1095
+ return /* @__PURE__ */ React6.createElement(
1096
+ import_ui6.Box,
1043
1097
  {
1044
1098
  sx: {
1045
1099
  opacity: isDragPlaceholder ? 0.5 : 1
1046
1100
  }
1047
1101
  },
1048
- /* @__PURE__ */ React5.createElement(import_ui5.Stack, { gap: 1 }, /* @__PURE__ */ React5.createElement(
1049
- import_ui5.Box,
1102
+ /* @__PURE__ */ React6.createElement(import_ui6.Stack, { gap: 1 }, /* @__PURE__ */ React6.createElement(
1103
+ import_ui6.Box,
1050
1104
  {
1051
1105
  className: "group-header",
1052
1106
  sx: {
@@ -1065,9 +1119,9 @@ function PropertiesGroup({
1065
1119
  }
1066
1120
  }
1067
1121
  },
1068
- /* @__PURE__ */ React5.createElement(SortableTrigger, { triggerClassName: "group-sortable-trigger", ...sortableTriggerProps }),
1069
- /* @__PURE__ */ React5.createElement(import_ui5.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, isThisGroupEditing ? /* @__PURE__ */ React5.createElement(
1070
- import_ui5.Box,
1122
+ /* @__PURE__ */ React6.createElement(SortableTrigger, { triggerClassName: "group-sortable-trigger", ...sortableTriggerProps }),
1123
+ /* @__PURE__ */ React6.createElement(import_ui6.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, isThisGroupEditing ? /* @__PURE__ */ React6.createElement(
1124
+ import_ui6.Box,
1071
1125
  {
1072
1126
  sx: {
1073
1127
  flex: 1,
@@ -1080,36 +1134,36 @@ function PropertiesGroup({
1080
1134
  pl: 0.5
1081
1135
  }
1082
1136
  },
1083
- /* @__PURE__ */ React5.createElement(
1084
- import_editor_ui2.EditableField,
1137
+ /* @__PURE__ */ React6.createElement(
1138
+ import_editor_ui3.EditableField,
1085
1139
  {
1086
1140
  ref: editableRef,
1087
- as: import_ui5.Typography,
1141
+ as: import_ui6.Typography,
1088
1142
  variant: "caption",
1089
1143
  error: error ?? void 0,
1090
1144
  sx: { color: "text.primary", fontWeight: 400, lineHeight: 1.66 },
1091
1145
  ...getEditableProps()
1092
1146
  }
1093
1147
  )
1094
- ) : /* @__PURE__ */ React5.createElement(
1095
- import_ui5.Typography,
1148
+ ) : /* @__PURE__ */ React6.createElement(
1149
+ import_ui6.Typography,
1096
1150
  {
1097
1151
  variant: "caption",
1098
1152
  sx: { color: "text.primary", fontWeight: 400, lineHeight: 1.66 }
1099
1153
  },
1100
1154
  group.label
1101
- ), /* @__PURE__ */ React5.createElement(
1102
- import_ui5.IconButton,
1155
+ ), /* @__PURE__ */ React6.createElement(
1156
+ import_ui6.IconButton,
1103
1157
  {
1104
1158
  className: "group-menu",
1105
1159
  size: "tiny",
1106
1160
  sx: { p: 0.25, visibility: isThisGroupEditing ? "visible" : void 0 },
1107
- "aria-label": (0, import_i18n4.__)("Group actions", "elementor"),
1108
- ...(0, import_ui5.bindTrigger)(popupState)
1161
+ "aria-label": (0, import_i18n5.__)("Group actions", "elementor"),
1162
+ ...(0, import_ui6.bindTrigger)(popupState)
1109
1163
  },
1110
- /* @__PURE__ */ React5.createElement(import_icons4.DotsVerticalIcon, { fontSize: "tiny" })
1164
+ /* @__PURE__ */ React6.createElement(import_icons4.DotsVerticalIcon, { fontSize: "tiny" })
1111
1165
  ))
1112
- ), /* @__PURE__ */ React5.createElement(import_ui5.List, { sx: { p: 0, display: "flex", flexDirection: "column", gap: 1 } }, /* @__PURE__ */ React5.createElement(SortableProvider, { value: group.props, onChange: onPropsReorder }, groupProps.map((prop) => /* @__PURE__ */ React5.createElement(SortableItem, { key: prop.overrideKey, id: prop.overrideKey }, ({ triggerProps, triggerStyle, isDragPlaceholder: isItemDragPlaceholder }) => /* @__PURE__ */ React5.createElement(
1166
+ ), /* @__PURE__ */ React6.createElement(import_ui6.List, { sx: { p: 0, display: "flex", flexDirection: "column", gap: 1 } }, /* @__PURE__ */ React6.createElement(SortableProvider, { value: group.props, onChange: onPropsReorder }, groupProps.map((prop) => /* @__PURE__ */ React6.createElement(SortableItem, { key: prop.overrideKey, id: prop.overrideKey }, ({ triggerProps, triggerStyle, isDragPlaceholder: isItemDragPlaceholder }) => /* @__PURE__ */ React6.createElement(
1113
1167
  PropertyItem,
1114
1168
  {
1115
1169
  prop,
@@ -1120,27 +1174,27 @@ function PropertiesGroup({
1120
1174
  onUpdate: (data) => onPropertyUpdate(prop.overrideKey, data)
1121
1175
  }
1122
1176
  )))))),
1123
- /* @__PURE__ */ React5.createElement(
1124
- import_ui5.Menu,
1177
+ /* @__PURE__ */ React6.createElement(
1178
+ import_ui6.Menu,
1125
1179
  {
1126
- ...(0, import_ui5.bindMenu)(popupState),
1180
+ ...(0, import_ui6.bindMenu)(popupState),
1127
1181
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
1128
1182
  transformOrigin: { vertical: "top", horizontal: "right" }
1129
1183
  },
1130
- /* @__PURE__ */ React5.createElement(import_editor_ui2.MenuListItem, { sx: { minWidth: "160px" }, onClick: handleRenameClick }, /* @__PURE__ */ React5.createElement(import_ui5.Typography, { variant: "caption", sx: { color: "text.primary" } }, (0, import_i18n4.__)("Rename", "elementor"))),
1131
- /* @__PURE__ */ React5.createElement(
1132
- import_ui5.Tooltip,
1184
+ /* @__PURE__ */ React6.createElement(import_editor_ui3.MenuListItem, { sx: { minWidth: "160px" }, onClick: handleRenameClick }, /* @__PURE__ */ React6.createElement(import_ui6.Typography, { variant: "caption", sx: { color: "text.primary" } }, (0, import_i18n5.__)("Rename", "elementor"))),
1185
+ /* @__PURE__ */ React6.createElement(
1186
+ import_ui6.Tooltip,
1133
1187
  {
1134
- title: hasProperties ? (0, import_i18n4.__)("To delete the group, first remove all the properties", "elementor") : "",
1188
+ title: hasProperties ? (0, import_i18n5.__)("To delete the group, first remove all the properties", "elementor") : "",
1135
1189
  placement: "right"
1136
1190
  },
1137
- /* @__PURE__ */ React5.createElement("span", null, /* @__PURE__ */ React5.createElement(import_editor_ui2.MenuListItem, { onClick: handleDeleteClick, disabled: hasProperties }, /* @__PURE__ */ React5.createElement(
1138
- import_ui5.Typography,
1191
+ /* @__PURE__ */ React6.createElement("span", null, /* @__PURE__ */ React6.createElement(import_editor_ui3.MenuListItem, { onClick: handleDeleteClick, disabled: hasProperties }, /* @__PURE__ */ React6.createElement(
1192
+ import_ui6.Typography,
1139
1193
  {
1140
1194
  variant: "caption",
1141
1195
  sx: { color: hasProperties ? "text.disabled" : "error.light" }
1142
1196
  },
1143
- (0, import_i18n4.__)("Delete", "elementor")
1197
+ (0, import_i18n5.__)("Delete", "elementor")
1144
1198
  )))
1145
1199
  )
1146
1200
  )
@@ -1148,10 +1202,10 @@ function PropertiesGroup({
1148
1202
  }
1149
1203
 
1150
1204
  // src/components/component-properties-panel/use-current-editable-item.ts
1151
- var import_react3 = require("react");
1205
+ var import_react4 = require("react");
1152
1206
  var import_editor_documents3 = require("@elementor/editor-documents");
1153
- var import_editor_ui3 = require("@elementor/editor-ui");
1154
- var import_i18n6 = require("@wordpress/i18n");
1207
+ var import_editor_ui4 = require("@elementor/editor-ui");
1208
+ var import_i18n7 = require("@wordpress/i18n");
1155
1209
 
1156
1210
  // src/store/actions/rename-overridable-group.ts
1157
1211
  var import_store21 = require("@elementor/store");
@@ -1178,10 +1232,10 @@ function renameOverridableGroup({ componentId, groupId, label }) {
1178
1232
  }
1179
1233
 
1180
1234
  // src/components/component-properties-panel/utils/validate-group-label.ts
1181
- var import_i18n5 = require("@wordpress/i18n");
1235
+ var import_i18n6 = require("@wordpress/i18n");
1182
1236
  var ERROR_MESSAGES = {
1183
- EMPTY_NAME: (0, import_i18n5.__)("Group name is required", "elementor"),
1184
- DUPLICATE_NAME: (0, import_i18n5.__)("Group name already exists", "elementor")
1237
+ EMPTY_NAME: (0, import_i18n6.__)("Group name is required", "elementor"),
1238
+ DUPLICATE_NAME: (0, import_i18n6.__)("Group name already exists", "elementor")
1185
1239
  };
1186
1240
  function validateGroupLabel(label, existingGroups) {
1187
1241
  const trimmedLabel = label.trim();
@@ -1197,7 +1251,7 @@ function validateGroupLabel(label, existingGroups) {
1197
1251
 
1198
1252
  // src/components/component-properties-panel/use-current-editable-item.ts
1199
1253
  function useCurrentEditableItem() {
1200
- const [editingGroupId, setEditingGroupId] = (0, import_react3.useState)(null);
1254
+ const [editingGroupId, setEditingGroupId] = (0, import_react4.useState)(null);
1201
1255
  const currentComponentId = useCurrentComponentId();
1202
1256
  const overridableProps = useOverridableProps(currentComponentId);
1203
1257
  const allGroupsRecord = overridableProps?.groups?.items ?? {};
@@ -1210,7 +1264,7 @@ function useCurrentEditableItem() {
1210
1264
  };
1211
1265
  const handleSubmit = (newLabel) => {
1212
1266
  if (!editingGroupId || !currentComponentId) {
1213
- throw new Error((0, import_i18n6.__)("Group ID or component ID is missing", "elementor"));
1267
+ throw new Error((0, import_i18n7.__)("Group ID or component ID is missing", "elementor"));
1214
1268
  }
1215
1269
  renameOverridableGroup({
1216
1270
  componentId: currentComponentId,
@@ -1225,7 +1279,7 @@ function useCurrentEditableItem() {
1225
1279
  isEditing,
1226
1280
  error,
1227
1281
  getProps: getEditableProps
1228
- } = (0, import_editor_ui3.useEditable)({
1282
+ } = (0, import_editor_ui4.useEditable)({
1229
1283
  value: currentGroup?.label ?? "",
1230
1284
  onSubmit: handleSubmit,
1231
1285
  validation: validateLabel
@@ -1263,15 +1317,16 @@ function generateUniqueLabel(groups) {
1263
1317
  function ComponentPropertiesPanelContent({ onClose }) {
1264
1318
  const currentComponentId = useCurrentComponentId();
1265
1319
  const overridableProps = useOverridableProps(currentComponentId);
1266
- const [isAddingGroup, setIsAddingGroup] = (0, import_react4.useState)(false);
1320
+ const [isAddingGroup, setIsAddingGroup] = (0, import_react5.useState)(false);
1321
+ const introductionRef = (0, import_react5.useRef)(null);
1267
1322
  const groupLabelEditable = useCurrentEditableItem();
1268
- const groups = (0, import_react4.useMemo)(() => {
1323
+ const groups = (0, import_react5.useMemo)(() => {
1269
1324
  if (!overridableProps) {
1270
1325
  return [];
1271
1326
  }
1272
1327
  return overridableProps.groups.order.map((groupId) => overridableProps.groups.items[groupId] ?? null).filter(Boolean);
1273
1328
  }, [overridableProps]);
1274
- const allGroupsForSelect = (0, import_react4.useMemo)(
1329
+ const allGroupsForSelect = (0, import_react5.useMemo)(
1275
1330
  () => groups.map((group) => ({ value: group.id, label: group.label })),
1276
1331
  [groups]
1277
1332
  );
@@ -1317,15 +1372,24 @@ function ComponentPropertiesPanelContent({ onClose }) {
1317
1372
  deleteOverridableGroup({ componentId: currentComponentId, groupId });
1318
1373
  (0, import_editor_documents4.setDocumentModifiedStatus)(true);
1319
1374
  };
1320
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(import_editor_panels.PanelHeader, { sx: { justifyContent: "start", pl: 1.5, pr: 1, py: 1 } }, /* @__PURE__ */ React6.createElement(import_ui6.Stack, { direction: "row", alignItems: "center", gap: 0.5, flexGrow: 1 }, /* @__PURE__ */ React6.createElement(import_icons5.ComponentPropListIcon, { fontSize: "tiny" }), /* @__PURE__ */ React6.createElement(import_editor_panels.PanelHeaderTitle, { variant: "subtitle2" }, (0, import_i18n7.__)("Component properties", "elementor"))), !showEmptyState && /* @__PURE__ */ React6.createElement(import_ui6.Tooltip, { title: (0, import_i18n7.__)("Add new group", "elementor") }, /* @__PURE__ */ React6.createElement(
1321
- import_ui6.IconButton,
1375
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(import_editor_panels.PanelHeader, { sx: { justifyContent: "start", pl: 1.5, pr: 1, py: 1 } }, /* @__PURE__ */ React7.createElement(import_ui7.Stack, { direction: "row", alignItems: "center", gap: 0.5, flexGrow: 1 }, /* @__PURE__ */ React7.createElement(import_icons5.ComponentPropListIcon, { fontSize: "tiny" }), /* @__PURE__ */ React7.createElement(import_editor_panels.PanelHeaderTitle, { variant: "subtitle2" }, (0, import_i18n8.__)("Component properties", "elementor"))), !showEmptyState && /* @__PURE__ */ React7.createElement(import_ui7.Tooltip, { title: (0, import_i18n8.__)("Add new group", "elementor") }, /* @__PURE__ */ React7.createElement(
1376
+ import_ui7.IconButton,
1322
1377
  {
1323
1378
  size: "tiny",
1324
- "aria-label": (0, import_i18n7.__)("Add new group", "elementor"),
1379
+ "aria-label": (0, import_i18n8.__)("Add new group", "elementor"),
1325
1380
  onClick: handleAddGroupClick
1326
1381
  },
1327
- /* @__PURE__ */ React6.createElement(import_icons5.FolderPlusIcon, { fontSize: "tiny" })
1328
- )), /* @__PURE__ */ React6.createElement(import_ui6.Tooltip, { title: (0, import_i18n7.__)("Close panel", "elementor") }, /* @__PURE__ */ React6.createElement(import_ui6.IconButton, { size: "tiny", "aria-label": (0, import_i18n7.__)("Close panel", "elementor"), onClick: onClose }, /* @__PURE__ */ React6.createElement(import_icons5.XIcon, { fontSize: "tiny" })))), /* @__PURE__ */ React6.createElement(import_ui6.Divider, null), /* @__PURE__ */ React6.createElement(import_editor_panels.PanelBody, null, showEmptyState ? /* @__PURE__ */ React6.createElement(PropertiesEmptyState, null) : /* @__PURE__ */ React6.createElement(import_ui6.List, { sx: { p: 2, display: "flex", flexDirection: "column", gap: 2 } }, /* @__PURE__ */ React6.createElement(SortableProvider, { value: groupIds, onChange: handleGroupsReorder }, groups.map((group) => /* @__PURE__ */ React6.createElement(SortableItem, { key: group.id, id: group.id }, ({ triggerProps, triggerStyle, isDragPlaceholder }) => /* @__PURE__ */ React6.createElement(
1382
+ /* @__PURE__ */ React7.createElement(import_icons5.FolderPlusIcon, { fontSize: "tiny" })
1383
+ )), /* @__PURE__ */ React7.createElement(import_ui7.Tooltip, { title: (0, import_i18n8.__)("Close panel", "elementor") }, /* @__PURE__ */ React7.createElement(
1384
+ import_ui7.IconButton,
1385
+ {
1386
+ ref: introductionRef,
1387
+ size: "tiny",
1388
+ "aria-label": (0, import_i18n8.__)("Close panel", "elementor"),
1389
+ onClick: onClose
1390
+ },
1391
+ /* @__PURE__ */ React7.createElement(import_icons5.XIcon, { fontSize: "tiny" })
1392
+ ))), /* @__PURE__ */ React7.createElement(import_ui7.Divider, null), /* @__PURE__ */ React7.createElement(import_editor_panels.PanelBody, null, showEmptyState ? /* @__PURE__ */ React7.createElement(PropertiesEmptyState, { introductionRef }) : /* @__PURE__ */ React7.createElement(import_ui7.List, { sx: { p: 2, display: "flex", flexDirection: "column", gap: 2 } }, /* @__PURE__ */ React7.createElement(SortableProvider, { value: groupIds, onChange: handleGroupsReorder }, groups.map((group) => /* @__PURE__ */ React7.createElement(SortableItem, { key: group.id, id: group.id }, ({ triggerProps, triggerStyle, isDragPlaceholder }) => /* @__PURE__ */ React7.createElement(
1329
1393
  PropertiesGroup,
1330
1394
  {
1331
1395
  group,
@@ -1357,7 +1421,7 @@ function ComponentPropertiesPanel() {
1357
1421
  if (!element || !elementType) {
1358
1422
  return null;
1359
1423
  }
1360
- return /* @__PURE__ */ React7.createElement(import_editor_ui4.ThemeProvider, null, /* @__PURE__ */ React7.createElement(import_ui7.ErrorBoundary, { fallback: /* @__PURE__ */ React7.createElement(ErrorBoundaryFallback, null) }, /* @__PURE__ */ React7.createElement(import_editor_editing_panel.ElementProvider, { element, elementType }, /* @__PURE__ */ React7.createElement(import_editor_panels2.Panel, null, /* @__PURE__ */ React7.createElement(
1424
+ return /* @__PURE__ */ React8.createElement(import_editor_ui5.ThemeProvider, null, /* @__PURE__ */ React8.createElement(import_ui8.ErrorBoundary, { fallback: /* @__PURE__ */ React8.createElement(ErrorBoundaryFallback, null) }, /* @__PURE__ */ React8.createElement(import_editor_editing_panel.ElementProvider, { element, elementType }, /* @__PURE__ */ React8.createElement(import_editor_panels2.Panel, null, /* @__PURE__ */ React8.createElement(
1361
1425
  ComponentPropertiesPanelContent,
1362
1426
  {
1363
1427
  onClose: () => {
@@ -1367,57 +1431,11 @@ function ComponentPropertiesPanel() {
1367
1431
  }
1368
1432
  )))));
1369
1433
  }
1370
- var ErrorBoundaryFallback = () => /* @__PURE__ */ React7.createElement(import_ui7.Box, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React7.createElement(import_ui7.Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React7.createElement("strong", null, (0, import_i18n8.__)("Something went wrong", "elementor"))));
1371
-
1372
- // src/components/components-tab/component-introduction.tsx
1373
- var React8 = __toESM(require("react"));
1374
- var import_editor_controls = require("@elementor/editor-controls");
1375
- var import_editor_ui5 = require("@elementor/editor-ui");
1376
- var import_ui8 = require("@elementor/ui");
1377
- var import_i18n9 = require("@wordpress/i18n");
1378
- var ComponentIntroduction = ({
1379
- anchorRef,
1380
- shouldShowIntroduction,
1381
- onClose
1382
- }) => {
1383
- if (!anchorRef.current || !shouldShowIntroduction) {
1384
- return null;
1385
- }
1386
- return /* @__PURE__ */ React8.createElement(
1387
- import_ui8.Popover,
1388
- {
1389
- anchorEl: anchorRef.current,
1390
- open: shouldShowIntroduction,
1391
- anchorOrigin: {
1392
- vertical: "top",
1393
- horizontal: "right"
1394
- },
1395
- transformOrigin: {
1396
- vertical: "top",
1397
- horizontal: -30
1398
- },
1399
- onClose
1400
- },
1401
- /* @__PURE__ */ React8.createElement(import_ui8.Box, { sx: { width: "296px" } }, /* @__PURE__ */ React8.createElement(import_editor_ui5.PopoverHeader, { title: (0, import_i18n9.__)("Add your first property", "elementor"), onClose }), /* @__PURE__ */ React8.createElement(
1402
- import_ui8.Image,
1403
- {
1404
- sx: { width: "296px", height: "160px" },
1405
- src: "https://assets.elementor.com/packages/v1/images/components-properties-intro.png",
1406
- alt: ""
1407
- }
1408
- ), /* @__PURE__ */ React8.createElement(import_editor_controls.PopoverContent, null, /* @__PURE__ */ React8.createElement(import_ui8.Stack, { gap: 1, sx: { p: 2 } }, /* @__PURE__ */ React8.createElement(import_ui8.Typography, { variant: "body2" }, (0, import_i18n9.__)("Properties make instances flexible.", "elementor")), /* @__PURE__ */ React8.createElement(import_ui8.Typography, { variant: "body2" }, (0, import_i18n9.__)(
1409
- "Click next to any setting you want users to customize - like text, images, or links.",
1410
- "elementor"
1411
- )), /* @__PURE__ */ React8.createElement(import_ui8.Typography, { variant: "body2" }, (0, import_i18n9.__)(
1412
- "Your properties will appear in the Properties panel, where you can organize and manage them anytime.",
1413
- "elementor"
1414
- )), /* @__PURE__ */ React8.createElement(import_ui8.Stack, { direction: "row", alignItems: "center", justifyContent: "flex-end" }, /* @__PURE__ */ React8.createElement(import_ui8.Button, { size: "medium", variant: "contained", onClick: onClose }, (0, import_i18n9.__)("Got it", "elementor"))))))
1415
- );
1416
- };
1434
+ var ErrorBoundaryFallback = () => /* @__PURE__ */ React8.createElement(import_ui8.Box, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React8.createElement(import_ui8.Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React8.createElement("strong", null, (0, import_i18n9.__)("Something went wrong", "elementor"))));
1417
1435
 
1418
1436
  // src/components/component-panel-header/component-badge.tsx
1419
1437
  var React9 = __toESM(require("react"));
1420
- var import_react5 = require("react");
1438
+ var import_react6 = require("react");
1421
1439
  var import_icons6 = require("@elementor/icons");
1422
1440
  var import_ui9 = require("@elementor/ui");
1423
1441
  var import_i18n10 = require("@wordpress/i18n");
@@ -1462,8 +1480,8 @@ var StyledBadge = (0, import_ui9.styled)(import_ui9.Badge, { shouldForwardProp:
1462
1480
  })
1463
1481
  );
1464
1482
  function usePrevious(value) {
1465
- const ref = (0, import_react5.useRef)(value);
1466
- (0, import_react5.useEffect)(() => {
1483
+ const ref = (0, import_react6.useRef)(value);
1484
+ (0, import_react6.useEffect)(() => {
1467
1485
  ref.current = value;
1468
1486
  }, [value]);
1469
1487
  return ref.current;
@@ -1534,9 +1552,9 @@ var import_i18n12 = require("@wordpress/i18n");
1534
1552
 
1535
1553
  // src/components/components-tab/search-provider.tsx
1536
1554
  var React11 = __toESM(require("react"));
1537
- var import_react6 = require("react");
1555
+ var import_react7 = require("react");
1538
1556
  var import_utils3 = require("@elementor/utils");
1539
- var SearchContext = (0, import_react6.createContext)(void 0);
1557
+ var SearchContext = (0, import_react7.createContext)(void 0);
1540
1558
  var SearchProvider = ({
1541
1559
  children,
1542
1560
  localStorageKey
@@ -1548,7 +1566,7 @@ var SearchProvider = ({
1548
1566
  return /* @__PURE__ */ React11.createElement(SearchContext.Provider, { value: { handleChange, clearSearch, searchValue: debouncedValue, inputValue } }, children);
1549
1567
  };
1550
1568
  var useSearch = () => {
1551
- const context = (0, import_react6.useContext)(SearchContext);
1569
+ const context = (0, import_react7.useContext)(SearchContext);
1552
1570
  if (!context) {
1553
1571
  throw new Error("useSearch must be used within a SearchProvider");
1554
1572
  }
@@ -2225,7 +2243,7 @@ var COMPONENT_DOCUMENT_TYPE = "elementor_component";
2225
2243
 
2226
2244
  // src/components/create-component-form/create-component-form.tsx
2227
2245
  var React17 = __toESM(require("react"));
2228
- var import_react8 = require("react");
2246
+ var import_react9 = require("react");
2229
2247
  var import_editor_elements7 = require("@elementor/editor-elements");
2230
2248
  var import_editor_ui8 = require("@elementor/editor-ui");
2231
2249
  var import_icons11 = require("@elementor/icons");
@@ -2258,11 +2276,11 @@ function createUnpublishedComponent(name, element, eventData, overridableProps,
2258
2276
  }
2259
2277
 
2260
2278
  // src/components/create-component-form/hooks/use-form.ts
2261
- var import_react7 = require("react");
2279
+ var import_react8 = require("react");
2262
2280
  var useForm = (initialValues) => {
2263
- const [values, setValues] = (0, import_react7.useState)(initialValues);
2264
- const [errors, setErrors] = (0, import_react7.useState)({});
2265
- const isValid = (0, import_react7.useMemo)(() => {
2281
+ const [values, setValues] = (0, import_react8.useState)(initialValues);
2282
+ const [errors, setErrors] = (0, import_react8.useState)({});
2283
+ const isValid = (0, import_react8.useMemo)(() => {
2266
2284
  return !Object.values(errors).some((error) => error);
2267
2285
  }, [errors]);
2268
2286
  const handleChange = (e, field, validationSchema) => {
@@ -2363,11 +2381,11 @@ function countNestedElements(container) {
2363
2381
 
2364
2382
  // src/components/create-component-form/create-component-form.tsx
2365
2383
  function CreateComponentForm() {
2366
- const [element, setElement] = (0, import_react8.useState)(null);
2367
- const [anchorPosition, setAnchorPosition] = (0, import_react8.useState)();
2368
- const [resultNotification, setResultNotification] = (0, import_react8.useState)(null);
2369
- const eventData = (0, import_react8.useRef)(null);
2370
- (0, import_react8.useEffect)(() => {
2384
+ const [element, setElement] = (0, import_react9.useState)(null);
2385
+ const [anchorPosition, setAnchorPosition] = (0, import_react9.useState)();
2386
+ const [resultNotification, setResultNotification] = (0, import_react9.useState)(null);
2387
+ const eventData = (0, import_react9.useRef)(null);
2388
+ (0, import_react9.useEffect)(() => {
2371
2389
  const OPEN_SAVE_AS_COMPONENT_FORM_EVENT = "elementor/editor/open-save-as-component-form";
2372
2390
  const openPopup = (event) => {
2373
2391
  setElement({ element: event.detail.element, elementLabel: (0, import_editor_elements7.getElementLabel)(event.detail.element.id) });
@@ -2450,14 +2468,14 @@ var Form2 = ({
2450
2468
  }) => {
2451
2469
  const { values, errors, isValid, handleChange, validateForm: validateForm2 } = useForm(initialValues);
2452
2470
  const { components } = useComponents();
2453
- const existingComponentNames = (0, import_react8.useMemo)(() => {
2471
+ const existingComponentNames = (0, import_react9.useMemo)(() => {
2454
2472
  return components?.map((component) => component.name) ?? [];
2455
2473
  }, [components]);
2456
- const changeValidationSchema = (0, import_react8.useMemo)(
2474
+ const changeValidationSchema = (0, import_react9.useMemo)(
2457
2475
  () => createBaseComponentSchema(existingComponentNames),
2458
2476
  [existingComponentNames]
2459
2477
  );
2460
- const submitValidationSchema = (0, import_react8.useMemo)(
2478
+ const submitValidationSchema = (0, import_react9.useMemo)(
2461
2479
  () => createSubmitComponentSchema(existingComponentNames),
2462
2480
  [existingComponentNames]
2463
2481
  );
@@ -2502,7 +2520,7 @@ var Form2 = ({
2502
2520
 
2503
2521
  // src/components/edit-component/edit-component.tsx
2504
2522
  var React19 = __toESM(require("react"));
2505
- var import_react11 = require("react");
2523
+ var import_react12 = require("react");
2506
2524
  var import_editor_documents10 = require("@elementor/editor-documents");
2507
2525
  var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
2508
2526
  var import_store40 = require("@elementor/store");
@@ -2525,7 +2543,7 @@ function updateCurrentComponent({
2525
2543
 
2526
2544
  // src/components/edit-component/component-modal.tsx
2527
2545
  var React18 = __toESM(require("react"));
2528
- var import_react10 = require("react");
2546
+ var import_react11 = require("react");
2529
2547
  var import_react_dom = require("react-dom");
2530
2548
  var import_i18n18 = require("@wordpress/i18n");
2531
2549
 
@@ -2537,10 +2555,10 @@ function useCanvasDocument() {
2537
2555
  }
2538
2556
 
2539
2557
  // src/hooks/use-element-rect.ts
2540
- var import_react9 = require("react");
2558
+ var import_react10 = require("react");
2541
2559
  var import_utils5 = require("@elementor/utils");
2542
2560
  function useElementRect(element) {
2543
- const [rect, setRect] = (0, import_react9.useState)(new DOMRect(0, 0, 0, 0));
2561
+ const [rect, setRect] = (0, import_react10.useState)(new DOMRect(0, 0, 0, 0));
2544
2562
  const onChange = (0, import_utils5.throttle)(
2545
2563
  () => {
2546
2564
  setRect(element?.getBoundingClientRect() ?? new DOMRect(0, 0, 0, 0));
@@ -2551,7 +2569,7 @@ function useElementRect(element) {
2551
2569
  useScrollListener({ element, onChange });
2552
2570
  useResizeListener({ element, onChange });
2553
2571
  useMutationsListener({ element, onChange });
2554
- (0, import_react9.useEffect)(
2572
+ (0, import_react10.useEffect)(
2555
2573
  () => () => {
2556
2574
  onChange.cancel();
2557
2575
  },
@@ -2560,7 +2578,7 @@ function useElementRect(element) {
2560
2578
  return rect;
2561
2579
  }
2562
2580
  function useScrollListener({ element, onChange }) {
2563
- (0, import_react9.useEffect)(() => {
2581
+ (0, import_react10.useEffect)(() => {
2564
2582
  if (!element) {
2565
2583
  return;
2566
2584
  }
@@ -2572,7 +2590,7 @@ function useScrollListener({ element, onChange }) {
2572
2590
  }, [element, onChange]);
2573
2591
  }
2574
2592
  function useResizeListener({ element, onChange }) {
2575
- (0, import_react9.useEffect)(() => {
2593
+ (0, import_react10.useEffect)(() => {
2576
2594
  if (!element) {
2577
2595
  return;
2578
2596
  }
@@ -2587,7 +2605,7 @@ function useResizeListener({ element, onChange }) {
2587
2605
  }, [element, onChange]);
2588
2606
  }
2589
2607
  function useMutationsListener({ element, onChange }) {
2590
- (0, import_react9.useEffect)(() => {
2608
+ (0, import_react10.useEffect)(() => {
2591
2609
  if (!element) {
2592
2610
  return;
2593
2611
  }
@@ -2602,7 +2620,7 @@ function useMutationsListener({ element, onChange }) {
2602
2620
  // src/components/edit-component/component-modal.tsx
2603
2621
  function ComponentModal({ element, onClose }) {
2604
2622
  const canvasDocument = useCanvasDocument();
2605
- (0, import_react10.useEffect)(() => {
2623
+ (0, import_react11.useEffect)(() => {
2606
2624
  const handleEsc = (event) => {
2607
2625
  if (event.key === "Escape") {
2608
2626
  onClose();
@@ -2718,7 +2736,7 @@ function useHandleDocumentSwitches() {
2718
2736
  const documentsManager = (0, import_editor_documents10.getV1DocumentsManager)();
2719
2737
  const currentComponentId = useCurrentComponentId();
2720
2738
  const path = (0, import_store40.__useSelector)(selectPath);
2721
- (0, import_react11.useEffect)(() => {
2739
+ (0, import_react12.useEffect)(() => {
2722
2740
  return (0, import_editor_v1_adapters5.__privateListenTo)((0, import_editor_v1_adapters5.commandEndEvent)("editor/documents/open"), () => {
2723
2741
  const nextDocument = documentsManager.getCurrent();
2724
2742
  if (nextDocument.id === currentComponentId) {
@@ -2859,7 +2877,7 @@ var EmptyState2 = ({ onEditComponent }) => {
2859
2877
 
2860
2878
  // src/components/instance-editing-panel/override-props-group.tsx
2861
2879
  var React22 = __toESM(require("react"));
2862
- var import_react12 = require("react");
2880
+ var import_react13 = require("react");
2863
2881
  var import_editor_editing_panel2 = require("@elementor/editor-editing-panel");
2864
2882
  var import_editor_ui10 = require("@elementor/editor-ui");
2865
2883
  var import_ui18 = require("@elementor/ui");
@@ -2868,7 +2886,7 @@ function OverridePropsGroup({ group, props }) {
2868
2886
  const handleClick = () => {
2869
2887
  setIsOpen(!isOpen);
2870
2888
  };
2871
- const id2 = (0, import_react12.useId)();
2889
+ const id2 = (0, import_react13.useId)();
2872
2890
  const labelId = `label-${id2}`;
2873
2891
  const contentId = `content-${id2}`;
2874
2892
  const title = group.label;
@@ -2938,12 +2956,12 @@ var componentOverridablePropTypeUtil = (0, import_editor_props4.createPropUtils)
2938
2956
 
2939
2957
  // src/provider/overridable-prop-context.tsx
2940
2958
  var React24 = __toESM(require("react"));
2941
- var import_react13 = require("react");
2942
- var OverridablePropContext = (0, import_react13.createContext)(null);
2959
+ var import_react14 = require("react");
2960
+ var OverridablePropContext = (0, import_react14.createContext)(null);
2943
2961
  function OverridablePropProvider({ children, ...props }) {
2944
2962
  return /* @__PURE__ */ React24.createElement(OverridablePropContext.Provider, { value: props }, children);
2945
2963
  }
2946
- var useOverridablePropValue = () => (0, import_react13.useContext)(OverridablePropContext)?.value;
2964
+ var useOverridablePropValue = () => (0, import_react14.useContext)(OverridablePropContext)?.value;
2947
2965
 
2948
2966
  // src/store/actions/update-overridable-prop-origin-value.ts
2949
2967
  var import_store44 = require("@elementor/store");
@@ -3088,7 +3106,7 @@ function setOverridableProp({
3088
3106
 
3089
3107
  // src/components/overridable-props/indicator.tsx
3090
3108
  var React26 = __toESM(require("react"));
3091
- var import_react14 = require("react");
3109
+ var import_react15 = require("react");
3092
3110
  var import_icons15 = require("@elementor/icons");
3093
3111
  var import_ui20 = require("@elementor/ui");
3094
3112
  var import_i18n22 = require("@wordpress/i18n");
@@ -3147,7 +3165,7 @@ var Content = (0, import_ui20.styled)(import_ui20.Box)`
3147
3165
  }
3148
3166
  }
3149
3167
  `;
3150
- var Indicator = (0, import_react14.forwardRef)(({ isOpen, isOverridable, ...props }, ref) => /* @__PURE__ */ React26.createElement(Content, { ref, ...props, className: isOpen || isOverridable ? "enlarged" : "" }, /* @__PURE__ */ React26.createElement(
3168
+ var Indicator = (0, import_react15.forwardRef)(({ isOpen, isOverridable, ...props }, ref) => /* @__PURE__ */ React26.createElement(Content, { ref, ...props, className: isOpen || isOverridable ? "enlarged" : "" }, /* @__PURE__ */ React26.createElement(
3151
3169
  IconContainer,
3152
3170
  {
3153
3171
  className: "icon",
@@ -3586,10 +3604,10 @@ function initMcp() {
3586
3604
  }
3587
3605
 
3588
3606
  // src/populate-store.ts
3589
- var import_react15 = require("react");
3607
+ var import_react16 = require("react");
3590
3608
  var import_store53 = require("@elementor/store");
3591
3609
  function PopulateStore() {
3592
- (0, import_react15.useEffect)(() => {
3610
+ (0, import_react16.useEffect)(() => {
3593
3611
  (0, import_store53.__dispatch)(loadComponents());
3594
3612
  }, []);
3595
3613
  return null;