@elementor/editor-editing-panel 1.28.0 → 1.29.1

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
@@ -100,14 +100,8 @@ function getProviderByStyleId(styleId) {
100
100
 
101
101
  // src/components/multi-combobox.tsx
102
102
  import * as React4 from "react";
103
- import { useId, useState } from "react";
104
- import {
105
- Autocomplete,
106
- Box,
107
- createFilterOptions,
108
- styled,
109
- TextField
110
- } from "@elementor/ui";
103
+ import { useState } from "react";
104
+ import { Autocomplete, createFilterOptions, TextField } from "@elementor/ui";
111
105
  function MultiCombobox({
112
106
  actions = [],
113
107
  selected,
@@ -131,7 +125,6 @@ function MultiCombobox({
131
125
  disabled: loading,
132
126
  value: selected,
133
127
  options: options13,
134
- renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
135
128
  renderInput: (params) => /* @__PURE__ */ React4.createElement(
136
129
  TextField,
137
130
  {
@@ -179,28 +172,10 @@ function MultiCombobox({
179
172
  ];
180
173
  },
181
174
  groupBy: (option) => option.group ?? "",
182
- renderOption: (optionProps, { label }) => /* @__PURE__ */ React4.createElement("li", { ...optionProps, style: { display: "block", textOverflow: "ellipsis" } }, label)
175
+ renderOption: (optionProps, { label, group }) => /* @__PURE__ */ React4.createElement("li", { ...optionProps, style: { display: "block", textOverflow: "ellipsis" }, "data-group": group }, label)
183
176
  }
184
177
  );
185
178
  }
186
- var Group = (params) => {
187
- const id = `combobox-group-${useId().replace(/:/g, "_")}`;
188
- return /* @__PURE__ */ React4.createElement(StyledGroup, { role: "group", "aria-labelledby": id }, /* @__PURE__ */ React4.createElement(StyledGroupHeader, { id }, " ", params.group), /* @__PURE__ */ React4.createElement(StyledGroupItems, { role: "listbox" }, params.children));
189
- };
190
- var StyledGroup = styled("li")`
191
- &:not( :last-of-type ) {
192
- border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
193
- }
194
- `;
195
- var StyledGroupHeader = styled(Box)(({ theme }) => ({
196
- position: "sticky",
197
- top: "-8px",
198
- padding: theme.spacing(1, 2),
199
- color: theme.palette.text.tertiary
200
- }));
201
- var StyledGroupItems = styled("ul")`
202
- padding: 0;
203
- `;
204
179
  function useFilterOptions() {
205
180
  return useState(() => createFilterOptions())[0];
206
181
  }
@@ -276,8 +251,8 @@ var useUnapplyClass = (classId) => {
276
251
  };
277
252
 
278
253
  // src/components/style-indicator.tsx
279
- import { styled as styled2 } from "@elementor/ui";
280
- var StyleIndicator = styled2("div", {
254
+ import { styled } from "@elementor/ui";
255
+ var StyleIndicator = styled("div", {
281
256
  shouldForwardProp: (prop) => prop !== "variant"
282
257
  })`
283
258
  width: 5px;
@@ -586,7 +561,7 @@ function CssClassSelector() {
586
561
  {
587
562
  id: ID,
588
563
  size: "tiny",
589
- placeholder: showPlaceholder ? __3("Type to search/add global classes", "elementor") : void 0,
564
+ placeholder: showPlaceholder ? __3("Type class name", "elementor") : void 0,
590
565
  options: options13,
591
566
  selected: applied,
592
567
  onSelect: handleApply,
@@ -751,7 +726,7 @@ import { createMenu } from "@elementor/menus";
751
726
 
752
727
  // src/popover-action.tsx
753
728
  import * as React8 from "react";
754
- import { useId as useId2 } from "react";
729
+ import { useId } from "react";
755
730
  import { XIcon } from "@elementor/icons";
756
731
  import { bindPopover, bindToggle, IconButton, Popover, Stack as Stack4, Tooltip, Typography as Typography2, usePopupState as usePopupState2 } from "@elementor/ui";
757
732
  var SIZE = "tiny";
@@ -761,7 +736,7 @@ function PopoverAction({
761
736
  icon: Icon,
762
737
  popoverContent: PopoverContent2
763
738
  }) {
764
- const id = useId2();
739
+ const id = useId();
765
740
  const popupState = usePopupState2({
766
741
  variant: "popover",
767
742
  popupId: `elementor-popover-action-${id}`
@@ -794,9 +769,9 @@ var controlActionsMenu = createMenu({
794
769
 
795
770
  // src/components/editing-panel-error-fallback.tsx
796
771
  import * as React9 from "react";
797
- import { Alert, Box as Box2 } from "@elementor/ui";
772
+ import { Alert, Box } from "@elementor/ui";
798
773
  function EditorPanelErrorFallback() {
799
- return /* @__PURE__ */ React9.createElement(Box2, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React9.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React9.createElement("strong", null, "Something went wrong")));
774
+ return /* @__PURE__ */ React9.createElement(Box, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React9.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React9.createElement("strong", null, "Something went wrong")));
800
775
  }
801
776
 
802
777
  // src/components/editing-panel-tabs.tsx
@@ -851,7 +826,7 @@ var Control = ({ props, type }) => {
851
826
 
852
827
  // src/controls-registry/control-type-container.tsx
853
828
  import * as React11 from "react";
854
- import { Box as Box3, styled as styled3 } from "@elementor/ui";
829
+ import { Box as Box2, styled as styled2 } from "@elementor/ui";
855
830
  var ControlTypeContainer = ({
856
831
  controlType,
857
832
  children
@@ -859,7 +834,7 @@ var ControlTypeContainer = ({
859
834
  const layout = getLayoutByType(controlType);
860
835
  return /* @__PURE__ */ React11.createElement(StyledContainer, { layout }, children);
861
836
  };
862
- var StyledContainer = styled3(Box3, {
837
+ var StyledContainer = styled2(Box2, {
863
838
  shouldForwardProp: (prop) => !["layout"].includes(prop)
864
839
  })(({ layout, theme }) => ({
865
840
  display: "grid",
@@ -909,13 +884,13 @@ var SettingsField = ({ bind, children }) => {
909
884
 
910
885
  // src/components/section.tsx
911
886
  import * as React13 from "react";
912
- import { useId as useId3, useState as useState3 } from "react";
887
+ import { useId as useId2, useState as useState3 } from "react";
913
888
  import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as Stack5 } from "@elementor/ui";
914
889
 
915
890
  // src/components/collapse-icon.tsx
916
891
  import { ChevronDownIcon } from "@elementor/icons";
917
- import { styled as styled4 } from "@elementor/ui";
918
- var CollapseIcon = styled4(ChevronDownIcon, {
892
+ import { styled as styled3 } from "@elementor/ui";
893
+ var CollapseIcon = styled3(ChevronDownIcon, {
919
894
  shouldForwardProp: (prop) => prop !== "open"
920
895
  })(({ theme, open }) => ({
921
896
  transform: open ? "rotate(180deg)" : "rotate(0deg)",
@@ -927,7 +902,7 @@ var CollapseIcon = styled4(ChevronDownIcon, {
927
902
  // src/components/section.tsx
928
903
  function Section({ title, children, defaultExpanded = false }) {
929
904
  const [isOpen, setIsOpen] = useState3(!!defaultExpanded);
930
- const id = useId3();
905
+ const id = useId2();
931
906
  const labelId = `label-${id}`;
932
907
  const contentId = `content-${id}`;
933
908
  return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
@@ -1494,7 +1469,8 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
1494
1469
  direction: "row",
1495
1470
  sx: {
1496
1471
  justifyContent: "space-between",
1497
- alignItems: "center"
1472
+ alignItems: "center",
1473
+ marginInlineEnd: -0.75
1498
1474
  }
1499
1475
  },
1500
1476
  /* @__PURE__ */ React23.createElement(ControlLabel, null, label),
@@ -2917,13 +2893,13 @@ import { settingsTransformersRegistry, styleTransformersRegistry } from "@elemen
2917
2893
 
2918
2894
  // src/dynamics/components/dynamic-selection-control.tsx
2919
2895
  import * as React71 from "react";
2920
- import { useId as useId4 } from "react";
2896
+ import { useId as useId3 } from "react";
2921
2897
  import { ControlFormLabel as ControlFormLabel5, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
2922
2898
  import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
2923
2899
  import {
2924
2900
  bindPopover as bindPopover2,
2925
2901
  bindTrigger as bindTrigger2,
2926
- Box as Box5,
2902
+ Box as Box4,
2927
2903
  Divider as Divider7,
2928
2904
  Grid as Grid26,
2929
2905
  IconButton as IconButton3,
@@ -3065,7 +3041,7 @@ import { Fragment as Fragment9, useState as useState9 } from "react";
3065
3041
  import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
3066
3042
  import { DatabaseIcon, SearchIcon } from "@elementor/icons";
3067
3043
  import {
3068
- Box as Box4,
3044
+ Box as Box3,
3069
3045
  Divider as Divider6,
3070
3046
  InputAdornment,
3071
3047
  Link,
@@ -3097,7 +3073,7 @@ var DynamicSelection = ({ onSelect }) => {
3097
3073
  setValue({ name: value, settings: { label } });
3098
3074
  onSelect?.();
3099
3075
  };
3100
- return /* @__PURE__ */ React70.createElement(Stack18, null, hasNoDynamicTags ? /* @__PURE__ */ React70.createElement(NoDynamicTags, null) : /* @__PURE__ */ React70.createElement(Fragment9, null, /* @__PURE__ */ React70.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React70.createElement(
3076
+ return /* @__PURE__ */ React70.createElement(Stack18, null, hasNoDynamicTags ? /* @__PURE__ */ React70.createElement(NoDynamicTags, null) : /* @__PURE__ */ React70.createElement(Fragment9, null, /* @__PURE__ */ React70.createElement(Box3, { px: 1.5, pb: 1 }, /* @__PURE__ */ React70.createElement(
3101
3077
  TextField2,
3102
3078
  {
3103
3079
  fullWidth: true,
@@ -3109,7 +3085,7 @@ var DynamicSelection = ({ onSelect }) => {
3109
3085
  startAdornment: /* @__PURE__ */ React70.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React70.createElement(SearchIcon, { fontSize: SIZE3 }))
3110
3086
  }
3111
3087
  }
3112
- )), /* @__PURE__ */ React70.createElement(Divider6, null), /* @__PURE__ */ React70.createElement(Box4, { sx: { overflowY: "auto", height: 260, width: 220 } }, options13.length > 0 ? /* @__PURE__ */ React70.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options13.map(([category, items3], index) => /* @__PURE__ */ React70.createElement(Fragment9, { key: index }, /* @__PURE__ */ React70.createElement(
3088
+ )), /* @__PURE__ */ React70.createElement(Divider6, null), /* @__PURE__ */ React70.createElement(Box3, { sx: { overflowY: "auto", height: 260, width: 220 } }, options13.length > 0 ? /* @__PURE__ */ React70.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options13.map(([category, items3], index) => /* @__PURE__ */ React70.createElement(Fragment9, { key: index }, /* @__PURE__ */ React70.createElement(
3113
3089
  MenuSubheader2,
3114
3090
  {
3115
3091
  sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
@@ -3145,7 +3121,7 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React70.createElem
3145
3121
  /* @__PURE__ */ React70.createElement(Typography3, { align: "center", variant: "subtitle2" }, __46("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React70.createElement("br", null), "\u201C", searchValue, "\u201D."),
3146
3122
  /* @__PURE__ */ React70.createElement(Typography3, { align: "center", variant: "caption" }, __46("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React70.createElement(Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __46("Clear & try again", "elementor")))
3147
3123
  );
3148
- var NoDynamicTags = () => /* @__PURE__ */ React70.createElement(Box4, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React70.createElement(Divider6, null), /* @__PURE__ */ React70.createElement(
3124
+ var NoDynamicTags = () => /* @__PURE__ */ React70.createElement(Box3, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React70.createElement(Divider6, null), /* @__PURE__ */ React70.createElement(
3149
3125
  Stack18,
3150
3126
  {
3151
3127
  gap: 1,
@@ -3183,7 +3159,7 @@ var DynamicSelectionControl = () => {
3183
3159
  const { bind, value } = useBoundProp5(dynamicPropTypeUtil);
3184
3160
  const [propValueFromHistory] = usePersistDynamicValue(bind);
3185
3161
  const { name: tagName = "" } = value;
3186
- const selectionPopoverId = useId4();
3162
+ const selectionPopoverId = useId3();
3187
3163
  const selectionPopoverState = usePopupState3({ variant: "popover", popupId: selectionPopoverId });
3188
3164
  const dynamicTag = useDynamicTag(tagName);
3189
3165
  const removeDynamicTag = () => {
@@ -3192,7 +3168,7 @@ var DynamicSelectionControl = () => {
3192
3168
  if (!dynamicTag) {
3193
3169
  throw new Error(`Dynamic tag ${tagName} not found`);
3194
3170
  }
3195
- return /* @__PURE__ */ React71.createElement(Box5, null, /* @__PURE__ */ React71.createElement(
3171
+ return /* @__PURE__ */ React71.createElement(Box4, null, /* @__PURE__ */ React71.createElement(
3196
3172
  Tag,
3197
3173
  {
3198
3174
  fullWidth: true,
@@ -3222,7 +3198,7 @@ var DynamicSelectionControl = () => {
3222
3198
  ));
3223
3199
  };
3224
3200
  var DynamicSettingsPopover = ({ dynamicTag }) => {
3225
- const popupId = useId4();
3201
+ const popupId = useId3();
3226
3202
  const settingsPopupState = usePopupState3({ variant: "popover", popupId });
3227
3203
  const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
3228
3204
  if (!hasDynamicSettings) {