@elementor/editor-components 4.0.0-552 → 4.0.0-573

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.mjs CHANGED
@@ -1613,7 +1613,7 @@ function OverridablePropForm({ onSubmit, groups, currentValue, existingLabels =
1613
1613
  }
1614
1614
  onSubmit({ label: propLabel ?? "", group });
1615
1615
  };
1616
- return /* @__PURE__ */ React3.createElement(Form, { onSubmit: handleSubmit }, /* @__PURE__ */ React3.createElement(Stack3, { alignItems: "start", sx: { width: "268px", ...sx } }, /* @__PURE__ */ React3.createElement(
1616
+ return /* @__PURE__ */ React3.createElement(Form, { onSubmit: handleSubmit, "data-testid": "overridable-prop-form" }, /* @__PURE__ */ React3.createElement(Stack3, { alignItems: "start", sx: { width: "268px", ...sx } }, /* @__PURE__ */ React3.createElement(
1617
1617
  Stack3,
1618
1618
  {
1619
1619
  direction: "row",
@@ -2311,7 +2311,7 @@ var ComponentPanelHeader = () => {
2311
2311
  properties_count: overridablePropsCount
2312
2312
  });
2313
2313
  };
2314
- return /* @__PURE__ */ React10.createElement(Box7, null, /* @__PURE__ */ React10.createElement(PanelHeader2, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React10.createElement(Tooltip4, { title: __13("Back", "elementor") }, /* @__PURE__ */ React10.createElement(IconButton4, { size: "tiny", onClick: onBack, "aria-label": __13("Back", "elementor") }, /* @__PURE__ */ React10.createElement(ArrowLeftIcon, { fontSize: "tiny" }))), /* @__PURE__ */ React10.createElement(ComponentsFilledIcon, { fontSize: "tiny", stroke: "currentColor" }), /* @__PURE__ */ React10.createElement(
2314
+ return /* @__PURE__ */ React10.createElement(Box7, { "data-testid": "component-panel-header" }, /* @__PURE__ */ React10.createElement(PanelHeader2, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React10.createElement(Tooltip4, { title: __13("Back", "elementor") }, /* @__PURE__ */ React10.createElement(IconButton4, { size: "tiny", onClick: onBack, "aria-label": __13("Back", "elementor") }, /* @__PURE__ */ React10.createElement(ArrowLeftIcon, { fontSize: "tiny" }))), /* @__PURE__ */ React10.createElement(ComponentsFilledIcon, { fontSize: "tiny", stroke: "currentColor" }), /* @__PURE__ */ React10.createElement(
2315
2315
  EllipsisWithTooltip2,
2316
2316
  {
2317
2317
  title: componentName,
@@ -3498,7 +3498,8 @@ function CreateComponentForm() {
3498
3498
  open: element !== null,
3499
3499
  onClose: cancelSave,
3500
3500
  anchorReference: "anchorPosition",
3501
- anchorPosition
3501
+ anchorPosition,
3502
+ "data-testid": "create-component-form"
3502
3503
  },
3503
3504
  element !== null && /* @__PURE__ */ React19.createElement(
3504
3505
  Form2,
@@ -3935,7 +3936,7 @@ import { useSelectedElement as useSelectedElement2 } from "@elementor/editor-ele
3935
3936
  import { PanelBody as PanelBody2, PanelHeader as PanelHeader3, PanelHeaderTitle as PanelHeaderTitle2 } from "@elementor/editor-panels";
3936
3937
  import { EllipsisWithTooltip as EllipsisWithTooltip4 } from "@elementor/editor-ui";
3937
3938
  import { ComponentsIcon as ComponentsIcon4, PencilIcon as PencilIcon2 } from "@elementor/icons";
3938
- import { Divider as Divider4, IconButton as IconButton6, Stack as Stack16, Tooltip as Tooltip5 } from "@elementor/ui";
3939
+ import { Box as Box15, Divider as Divider4, IconButton as IconButton6, Stack as Stack16, Tooltip as Tooltip5 } from "@elementor/ui";
3939
3940
  import { __ as __27 } from "@wordpress/i18n";
3940
3941
 
3941
3942
  // src/hooks/use-component-instance-settings.ts
@@ -4481,7 +4482,7 @@ function InstanceEditingPanel() {
4481
4482
  const isNonEmptyGroup = (group) => group !== null && group.props.length > 0;
4482
4483
  const groups = overridableProps.groups.order.map((groupId) => overridableProps.groups.items[groupId] ?? null).filter(isNonEmptyGroup);
4483
4484
  const isEmpty = groups.length === 0 || Object.keys(overridableProps.props).length === 0;
4484
- return /* @__PURE__ */ React29.createElement(
4485
+ return /* @__PURE__ */ React29.createElement(Box15, { "data-testid": "instance-editing-panel" }, /* @__PURE__ */ React29.createElement(
4485
4486
  ComponentInstanceProvider,
4486
4487
  {
4487
4488
  componentId,
@@ -4490,7 +4491,7 @@ function InstanceEditingPanel() {
4490
4491
  },
4491
4492
  /* @__PURE__ */ React29.createElement(PanelHeader3, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React29.createElement(Stack16, { direction: "row", alignItems: "center", flexGrow: 1, gap: 1, maxWidth: "100%" }, /* @__PURE__ */ React29.createElement(ComponentsIcon4, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React29.createElement(EllipsisWithTooltip4, { title: component.name, as: PanelHeaderTitle2, sx: { flexGrow: 1 } }), canEdit && /* @__PURE__ */ React29.createElement(Tooltip5, { title: panelTitle }, /* @__PURE__ */ React29.createElement(IconButton6, { size: "tiny", onClick: handleEditComponent, "aria-label": panelTitle }, /* @__PURE__ */ React29.createElement(PencilIcon2, { fontSize: "tiny" }))))),
4492
4493
  /* @__PURE__ */ React29.createElement(PanelBody2, null, /* @__PURE__ */ React29.createElement(ControlAdornmentsProvider, { items: getFieldIndicators("settings") }, isEmpty ? /* @__PURE__ */ React29.createElement(EmptyState2, { onEditComponent: handleEditComponent }) : /* @__PURE__ */ React29.createElement(Stack16, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React29.createElement(React29.Fragment, { key: group.id + componentInstanceId }, /* @__PURE__ */ React29.createElement(OverridePropsGroup, { group }), /* @__PURE__ */ React29.createElement(Divider4, null))))))
4493
- );
4494
+ ));
4494
4495
  }
4495
4496
 
4496
4497
  // src/components/overridable-props/overridable-prop-control.tsx
@@ -4662,10 +4663,10 @@ function setOverridableProp({
4662
4663
  import * as React31 from "react";
4663
4664
  import { forwardRef as forwardRef2 } from "react";
4664
4665
  import { CheckIcon, PlusIcon } from "@elementor/icons";
4665
- import { Box as Box15, styled as styled4 } from "@elementor/ui";
4666
+ import { Box as Box16, styled as styled4 } from "@elementor/ui";
4666
4667
  import { __ as __28 } from "@wordpress/i18n";
4667
4668
  var SIZE2 = "tiny";
4668
- var IconContainer = styled4(Box15)`
4669
+ var IconContainer = styled4(Box16)`
4669
4670
  pointer-events: none;
4670
4671
  opacity: 0;
4671
4672
  transition: opacity 0.2s ease-in-out;
@@ -4682,7 +4683,7 @@ var IconContainer = styled4(Box15)`
4682
4683
  stroke-width: 2px;
4683
4684
  }
4684
4685
  `;
4685
- var Content = styled4(Box15)`
4686
+ var Content = styled4(Box16)`
4686
4687
  position: relative;
4687
4688
  display: flex;
4688
4689
  align-items: center;
@@ -4719,14 +4720,17 @@ var Content = styled4(Box15)`
4719
4720
  }
4720
4721
  }
4721
4722
  `;
4722
- var Indicator2 = forwardRef2(({ isOpen, isOverridable, ...props }, ref) => /* @__PURE__ */ React31.createElement(Content, { ref, ...props, className: isOpen || isOverridable ? "enlarged" : "" }, /* @__PURE__ */ React31.createElement(
4723
- IconContainer,
4723
+ var Indicator2 = forwardRef2(({ isOpen, isOverridable, ...props }, ref) => /* @__PURE__ */ React31.createElement(
4724
+ Content,
4724
4725
  {
4725
- className: "icon",
4726
+ role: "button",
4727
+ ref,
4728
+ ...props,
4729
+ className: isOpen || isOverridable ? "enlarged" : "",
4726
4730
  "aria-label": isOverridable ? __28("Overridable property", "elementor") : __28("Make prop overridable", "elementor")
4727
4731
  },
4728
- isOverridable ? /* @__PURE__ */ React31.createElement(CheckIcon, { fontSize: SIZE2 }) : /* @__PURE__ */ React31.createElement(PlusIcon, { fontSize: SIZE2 })
4729
- )));
4732
+ /* @__PURE__ */ React31.createElement(IconContainer, { className: "icon" }, isOverridable ? /* @__PURE__ */ React31.createElement(CheckIcon, { fontSize: SIZE2 }) : /* @__PURE__ */ React31.createElement(PlusIcon, { fontSize: SIZE2 }))
4733
+ ));
4730
4734
 
4731
4735
  // src/components/overridable-props/overridable-prop-indicator.tsx
4732
4736
  function OverridablePropIndicator() {