@elementor/editor-editing-panel 1.29.1 → 1.30.0

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
@@ -2,8 +2,8 @@
2
2
  import { useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
3
3
 
4
4
  // src/control-replacement.tsx
5
- import { createControlReplacement } from "@elementor/editor-controls";
6
- var { replaceControl, getControlReplacement } = createControlReplacement();
5
+ import { createControlReplacementsRegistry } from "@elementor/editor-controls";
6
+ var { registerControlReplacement, getControlReplacements } = createControlReplacementsRegistry();
7
7
 
8
8
  // src/components/css-classes/css-class-selector.tsx
9
9
  import * as React7 from "react";
@@ -105,7 +105,7 @@ import { Autocomplete, createFilterOptions, TextField } from "@elementor/ui";
105
105
  function MultiCombobox({
106
106
  actions = [],
107
107
  selected,
108
- options: options13,
108
+ options: options12,
109
109
  onSelect,
110
110
  placeholder,
111
111
  ...props
@@ -124,7 +124,7 @@ function MultiCombobox({
124
124
  handleHomeEndKeys: true,
125
125
  disabled: loading,
126
126
  value: selected,
127
- options: options13,
127
+ options: options12,
128
128
  renderInput: (params) => /* @__PURE__ */ React4.createElement(
129
129
  TextField,
130
130
  {
@@ -142,7 +142,7 @@ function MultiCombobox({
142
142
  const inputValue = selectedOrInputValue.find((option) => typeof option === "string");
143
143
  const optionsAndActions = selectedOrInputValue.filter((option) => typeof option !== "string");
144
144
  if (reason === "createOption") {
145
- const [firstAction] = filterActions(actions, { options: options13, inputValue: inputValue ?? "" });
145
+ const [firstAction] = filterActions(actions, { options: options12, inputValue: inputValue ?? "" });
146
146
  if (firstAction?.value) {
147
147
  return run(firstAction.apply, firstAction.value);
148
148
  }
@@ -151,7 +151,7 @@ function MultiCombobox({
151
151
  if (reason === "selectOption" && action?.value) {
152
152
  return run(action.apply, action.value);
153
153
  }
154
- const fixedValues = options13.filter((option) => !!option.fixed);
154
+ const fixedValues = options12.filter((option) => !!option.fixed);
155
155
  onSelect?.([.../* @__PURE__ */ new Set([...optionsAndActions, ...fixedValues])]);
156
156
  },
157
157
  getOptionLabel: (option) => typeof option === "string" ? option : option.label,
@@ -191,8 +191,8 @@ function useActionRunner() {
191
191
  };
192
192
  return { run, loading };
193
193
  }
194
- function filterActions(actions, { options: options13, inputValue }) {
195
- return actions.filter((action) => action.condition(options13, inputValue)).map((action, index) => ({
194
+ function filterActions(actions, { options: options12, inputValue }) {
195
+ return actions.filter((action) => action.condition(options12, inputValue)).map((action, index) => ({
196
196
  label: action.label(inputValue),
197
197
  value: inputValue,
198
198
  group: action.group,
@@ -489,6 +489,7 @@ function CssClassItem({
489
489
  },
490
490
  "aria-pressed": isActive,
491
491
  sx: (theme) => ({
492
+ lineHeight: 1,
492
493
  cursor: isActive && allowRename && !isShowingState ? "text" : "pointer",
493
494
  borderRadius: `${theme.shape.borderRadius * 0.75}px`,
494
495
  "&.Mui-focusVisible": {
@@ -548,12 +549,12 @@ var EMPTY_OPTION = {
548
549
  };
549
550
  var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = createLocation();
550
551
  function CssClassSelector() {
551
- const options13 = useOptions();
552
+ const options12 = useOptions();
552
553
  const { value: appliedIds, setValue: setAppliedIds, pushValue: pushAppliedId } = useAppliedClassesIds();
553
554
  const { id: activeId, setId: setActiveId } = useStyle();
554
555
  const actions = useCreateActions({ pushAppliedId, setActiveId });
555
556
  const handleApply = useHandleApply(appliedIds, setAppliedIds);
556
- const applied = useAppliedOptions(options13, appliedIds);
557
+ const applied = useAppliedOptions(options12, appliedIds);
557
558
  const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
558
559
  const showPlaceholder = applied.every(({ fixed }) => fixed);
559
560
  return /* @__PURE__ */ React7.createElement(Stack3, { p: 2 }, /* @__PURE__ */ React7.createElement(Stack3, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(FormLabel, { htmlFor: ID, size: "small" }, __3("Classes", "elementor")), /* @__PURE__ */ React7.createElement(Stack3, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
@@ -562,7 +563,7 @@ function CssClassSelector() {
562
563
  id: ID,
563
564
  size: "tiny",
564
565
  placeholder: showPlaceholder ? __3("Type class name", "elementor") : void 0,
565
- options: options13,
566
+ options: options12,
566
567
  selected: applied,
567
568
  onSelect: handleApply,
568
569
  limitTags: TAGS_LIMIT,
@@ -654,8 +655,8 @@ function useCreateActions({
654
655
  function hasReachedLimit(provider) {
655
656
  return provider.actions.all().length >= provider.limit;
656
657
  }
657
- function useAppliedOptions(options13, appliedIds) {
658
- const applied = options13.filter((option) => option.value && appliedIds.includes(option.value));
658
+ function useAppliedOptions(options12, appliedIds) {
659
+ const applied = options12.filter((option) => option.value && appliedIds.includes(option.value));
659
660
  const hasElementsProviderStyleApplied = applied.some(
660
661
  (option) => option.provider && isElementsStylesProvider2(option.provider)
661
662
  );
@@ -712,7 +713,7 @@ import { __createPanel as createPanel } from "@elementor/editor-panels";
712
713
 
713
714
  // src/components/editing-panel.tsx
714
715
  import * as React67 from "react";
715
- import { ControlActionsProvider, ControlReplacementProvider } from "@elementor/editor-controls";
716
+ import { ControlActionsProvider, ControlReplacementsProvider } from "@elementor/editor-controls";
716
717
  import { useSelectedElement } from "@elementor/editor-elements";
717
718
  import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
718
719
  import { ThemeProvider as ThemeProvider9 } from "@elementor/editor-ui";
@@ -1860,41 +1861,78 @@ import {
1860
1861
  } from "@elementor/icons";
1861
1862
  import { DirectionProvider as DirectionProvider3, Grid as Grid4, ThemeProvider as ThemeProvider3, withDirection as withDirection5 } from "@elementor/ui";
1862
1863
  import { __ as __13 } from "@wordpress/i18n";
1864
+ var ALIGN_SELF_CHILD_OFFSET_MAP = {
1865
+ row: 90,
1866
+ "row-reverse": 90,
1867
+ column: 0,
1868
+ "column-reverse": 0
1869
+ };
1863
1870
  var StartIcon3 = withDirection5(LayoutAlignLeftIcon2);
1864
1871
  var EndIcon3 = withDirection5(LayoutAlignRightIcon2);
1865
1872
  var iconProps3 = {
1866
- isClockwise: false,
1867
- offset: 90
1873
+ isClockwise: false
1868
1874
  };
1869
- var options3 = [
1875
+ var getOptions = (parentStyleDirection) => [
1870
1876
  {
1871
1877
  value: "start",
1872
1878
  label: __13("Start", "elementor"),
1873
- renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
1879
+ renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
1880
+ RotatedIcon,
1881
+ {
1882
+ icon: StartIcon3,
1883
+ size,
1884
+ offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
1885
+ ...iconProps3
1886
+ }
1887
+ ),
1874
1888
  showTooltip: true
1875
1889
  },
1876
1890
  {
1877
1891
  value: "center",
1878
1892
  label: __13("Center", "elementor"),
1879
- renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: CenterIcon3, size, ...iconProps3 }),
1893
+ renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
1894
+ RotatedIcon,
1895
+ {
1896
+ icon: CenterIcon3,
1897
+ size,
1898
+ offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
1899
+ ...iconProps3
1900
+ }
1901
+ ),
1880
1902
  showTooltip: true
1881
1903
  },
1882
1904
  {
1883
1905
  value: "end",
1884
1906
  label: __13("End", "elementor"),
1885
- renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
1907
+ renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
1908
+ RotatedIcon,
1909
+ {
1910
+ icon: EndIcon3,
1911
+ size,
1912
+ offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
1913
+ ...iconProps3
1914
+ }
1915
+ ),
1886
1916
  showTooltip: true
1887
1917
  },
1888
1918
  {
1889
1919
  value: "stretch",
1890
1920
  label: __13("Stretch", "elementor"),
1891
- renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: JustifyIcon2, size, ...iconProps3 }),
1921
+ renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
1922
+ RotatedIcon,
1923
+ {
1924
+ icon: JustifyIcon2,
1925
+ size,
1926
+ offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
1927
+ ...iconProps3
1928
+ }
1929
+ ),
1892
1930
  showTooltip: true
1893
1931
  }
1894
1932
  ];
1895
- var AlignSelfChild = () => {
1933
+ var AlignSelfChild = ({ parentStyleDirection }) => {
1896
1934
  const { isSiteRtl } = useDirection();
1897
- return /* @__PURE__ */ React34.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(ThemeProvider3, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React34.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, __13("Align self", "elementor"))), /* @__PURE__ */ React34.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React34.createElement(ToggleControl3, { options: options3 }))))));
1935
+ return /* @__PURE__ */ React34.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(ThemeProvider3, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React34.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, __13("Align self", "elementor"))), /* @__PURE__ */ React34.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React34.createElement(ToggleControl3, { options: getOptions(parentStyleDirection) }))))));
1898
1936
  };
1899
1937
 
1900
1938
  // src/components/style-sections/layout-section/display-field.tsx
@@ -1940,7 +1978,7 @@ import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
1940
1978
  import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
1941
1979
  import { DirectionProvider as DirectionProvider4, Grid as Grid5, ThemeProvider as ThemeProvider4, withDirection as withDirection6 } from "@elementor/ui";
1942
1980
  import { __ as __15 } from "@wordpress/i18n";
1943
- var options4 = [
1981
+ var options3 = [
1944
1982
  {
1945
1983
  value: "row",
1946
1984
  label: __15("Row", "elementor"),
@@ -1974,7 +2012,7 @@ var options4 = [
1974
2012
  ];
1975
2013
  var FlexDirectionField = () => {
1976
2014
  const { isSiteRtl } = useDirection();
1977
- return /* @__PURE__ */ React36.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(ThemeProvider4, null, /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React36.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, __15("Direction", "elementor"))), /* @__PURE__ */ React36.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(ToggleControl5, { options: options4 }))))));
2015
+ return /* @__PURE__ */ React36.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(ThemeProvider4, null, /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React36.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, __15("Direction", "elementor"))), /* @__PURE__ */ React36.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(ToggleControl5, { options: options3 }))))));
1978
2016
  };
1979
2017
 
1980
2018
  // src/components/style-sections/layout-section/flex-order-field.tsx
@@ -2174,7 +2212,7 @@ var iconProps4 = {
2174
2212
  isClockwise: true,
2175
2213
  offset: -90
2176
2214
  };
2177
- var options5 = [
2215
+ var options4 = [
2178
2216
  {
2179
2217
  value: "flex-start",
2180
2218
  label: __19("Start", "elementor"),
@@ -2214,7 +2252,7 @@ var options5 = [
2214
2252
  ];
2215
2253
  var JustifyContentField = () => {
2216
2254
  const { isSiteRtl } = useDirection();
2217
- return /* @__PURE__ */ React40.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React40.createElement(ThemeProvider7, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React40.createElement(Stack12, { gap: 0.75 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, __19("Justify content", "elementor")), /* @__PURE__ */ React40.createElement(ToggleControl6, { options: options5, fullWidth: true })))));
2255
+ return /* @__PURE__ */ React40.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React40.createElement(ThemeProvider7, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React40.createElement(Stack12, { gap: 0.75 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, __19("Justify content", "elementor")), /* @__PURE__ */ React40.createElement(ToggleControl6, { options: options4, fullWidth: true })))));
2218
2256
  };
2219
2257
 
2220
2258
  // src/components/style-sections/layout-section/wrap-field.tsx
@@ -2223,7 +2261,7 @@ import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
2223
2261
  import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
2224
2262
  import { DirectionProvider as DirectionProvider8, Grid as Grid8, ThemeProvider as ThemeProvider8 } from "@elementor/ui";
2225
2263
  import { __ as __20 } from "@wordpress/i18n";
2226
- var options6 = [
2264
+ var options5 = [
2227
2265
  {
2228
2266
  value: "nowrap",
2229
2267
  label: __20("No wrap", "elementor"),
@@ -2245,7 +2283,7 @@ var options6 = [
2245
2283
  ];
2246
2284
  var WrapField = () => {
2247
2285
  const { isSiteRtl } = useDirection();
2248
- return /* @__PURE__ */ React41.createElement(DirectionProvider8, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(ThemeProvider8, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React41.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, __20("Wrap", "elementor"))), /* @__PURE__ */ React41.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React41.createElement(ToggleControl7, { options: options6 }))))));
2286
+ return /* @__PURE__ */ React41.createElement(DirectionProvider8, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(ThemeProvider8, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React41.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, __20("Wrap", "elementor"))), /* @__PURE__ */ React41.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React41.createElement(ToggleControl7, { options: options5 }))))));
2249
2287
  };
2250
2288
 
2251
2289
  // src/components/style-sections/layout-section/layout-section.tsx
@@ -2256,13 +2294,14 @@ var LayoutSection = () => {
2256
2294
  const { element } = useElement();
2257
2295
  const parent = useParentElement(element.id);
2258
2296
  const parentStyle = useComputedStyle(parent?.id || null);
2259
- return /* @__PURE__ */ React42.createElement(SectionContent, null, /* @__PURE__ */ React42.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React42.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React42.createElement(FlexChildFields, null));
2297
+ const parentStyleDirection = parentStyle?.flexDirection ?? "row";
2298
+ return /* @__PURE__ */ React42.createElement(SectionContent, null, /* @__PURE__ */ React42.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React42.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React42.createElement(FlexChildFields, { parentStyleDirection }));
2260
2299
  };
2261
2300
  var FlexFields = () => {
2262
2301
  const [flexWrap] = useStylesField("flex-wrap");
2263
2302
  return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(FlexDirectionField, null), /* @__PURE__ */ React42.createElement(JustifyContentField, null), /* @__PURE__ */ React42.createElement(AlignItemsField, null), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(GapControlField, null), /* @__PURE__ */ React42.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React42.createElement(AlignContentField, null));
2264
2303
  };
2265
- var FlexChildFields = () => /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(ControlFormLabel3, null, __21("Flex child", "elementor")), /* @__PURE__ */ React42.createElement(AlignSelfChild, null), /* @__PURE__ */ React42.createElement(FlexOrderField, null), /* @__PURE__ */ React42.createElement(FlexSizeField, null));
2304
+ var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(ControlFormLabel3, null, __21("Flex child", "elementor")), /* @__PURE__ */ React42.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React42.createElement(FlexOrderField, null), /* @__PURE__ */ React42.createElement(FlexSizeField, null));
2266
2305
  var shouldDisplayFlexFields = (display, local) => {
2267
2306
  const value = display?.value ?? local?.value;
2268
2307
  if (!value) {
@@ -2374,7 +2413,7 @@ import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
2374
2413
  import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
2375
2414
  import { Grid as Grid12 } from "@elementor/ui";
2376
2415
  import { __ as __25 } from "@wordpress/i18n";
2377
- var options7 = [
2416
+ var options6 = [
2378
2417
  {
2379
2418
  value: "visible",
2380
2419
  label: __25("Visible", "elementor"),
@@ -2395,7 +2434,7 @@ var options7 = [
2395
2434
  }
2396
2435
  ];
2397
2436
  var OverflowField = () => {
2398
- return /* @__PURE__ */ React47.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React47.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, __25("Overflow", "elementor"))), /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React47.createElement(ToggleControl8, { options: options7 }))));
2437
+ return /* @__PURE__ */ React47.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React47.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, __25("Overflow", "elementor"))), /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React47.createElement(ToggleControl8, { options: options6 }))));
2399
2438
  };
2400
2439
 
2401
2440
  // src/components/style-sections/size-section/size-section.tsx
@@ -2488,11 +2527,11 @@ var supportedCategories = {
2488
2527
  };
2489
2528
  var getFontFamilies = () => {
2490
2529
  const { controls } = getElementorConfig();
2491
- const options13 = controls?.font?.options;
2492
- if (!options13) {
2530
+ const options12 = controls?.font?.options;
2531
+ if (!options12) {
2493
2532
  return null;
2494
2533
  }
2495
- return options13;
2534
+ return options12;
2496
2535
  };
2497
2536
  var useFontFamilies = () => {
2498
2537
  const fontFamilies = getFontFamilies();
@@ -2539,7 +2578,7 @@ import { ControlFormLabel as ControlFormLabel4, ToggleControl as ToggleControl9
2539
2578
  import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
2540
2579
  import { Grid as Grid16 } from "@elementor/ui";
2541
2580
  import { __ as __32 } from "@wordpress/i18n";
2542
- var options8 = [
2581
+ var options7 = [
2543
2582
  {
2544
2583
  value: "normal",
2545
2584
  label: __32("Normal", "elementor"),
@@ -2553,7 +2592,7 @@ var options8 = [
2553
2592
  showTooltip: true
2554
2593
  }
2555
2594
  ];
2556
- var FontStyleField = () => /* @__PURE__ */ React53.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React53.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlFormLabel4, null, __32("Font style", "elementor"))), /* @__PURE__ */ React53.createElement(Grid16, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React53.createElement(ToggleControl9, { options: options8 }))));
2595
+ var FontStyleField = () => /* @__PURE__ */ React53.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React53.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlFormLabel4, null, __32("Font style", "elementor"))), /* @__PURE__ */ React53.createElement(Grid16, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React53.createElement(ToggleControl9, { options: options7 }))));
2557
2596
 
2558
2597
  // src/components/style-sections/typography-section/font-weight-field.tsx
2559
2598
  import * as React54 from "react";
@@ -2601,7 +2640,7 @@ import { Grid as Grid20, withDirection as withDirection9 } from "@elementor/ui";
2601
2640
  import { __ as __36 } from "@wordpress/i18n";
2602
2641
  var AlignStartIcon = withDirection9(AlignLeftIcon);
2603
2642
  var AlignEndIcon = withDirection9(AlignRightIcon);
2604
- var options9 = [
2643
+ var options8 = [
2605
2644
  {
2606
2645
  value: "start",
2607
2646
  label: __36("Start", "elementor"),
@@ -2628,7 +2667,7 @@ var options9 = [
2628
2667
  }
2629
2668
  ];
2630
2669
  var TextAlignmentField = () => {
2631
- return /* @__PURE__ */ React57.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React57.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, __36("Text align", "elementor"))), /* @__PURE__ */ React57.createElement(Grid20, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React57.createElement(ToggleControl10, { options: options9 }))));
2670
+ return /* @__PURE__ */ React57.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React57.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, __36("Text align", "elementor"))), /* @__PURE__ */ React57.createElement(Grid20, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React57.createElement(ToggleControl10, { options: options8 }))));
2632
2671
  };
2633
2672
 
2634
2673
  // src/components/style-sections/typography-section/text-color-field.tsx
@@ -2646,7 +2685,7 @@ import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
2646
2685
  import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
2647
2686
  import { Grid as Grid22 } from "@elementor/ui";
2648
2687
  import { __ as __38 } from "@wordpress/i18n";
2649
- var options10 = [
2688
+ var options9 = [
2650
2689
  {
2651
2690
  value: "none",
2652
2691
  label: __38("None", "elementor"),
@@ -2673,7 +2712,7 @@ var options10 = [
2673
2712
  showTooltip: true
2674
2713
  }
2675
2714
  ];
2676
- var TextDecorationField = () => /* @__PURE__ */ React59.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React59.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, __38("Line decoration", "elementor"))), /* @__PURE__ */ React59.createElement(Grid22, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React59.createElement(ToggleControl11, { options: options10, exclusive: false }))));
2715
+ var TextDecorationField = () => /* @__PURE__ */ React59.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React59.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, __38("Line decoration", "elementor"))), /* @__PURE__ */ React59.createElement(Grid22, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React59.createElement(ToggleControl11, { options: options9, exclusive: false }))));
2677
2716
 
2678
2717
  // src/components/style-sections/typography-section/text-direction-field.tsx
2679
2718
  import * as React60 from "react";
@@ -2681,7 +2720,7 @@ import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
2681
2720
  import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
2682
2721
  import { Grid as Grid23 } from "@elementor/ui";
2683
2722
  import { __ as __39 } from "@wordpress/i18n";
2684
- var options11 = [
2723
+ var options10 = [
2685
2724
  {
2686
2725
  value: "ltr",
2687
2726
  label: __39("Left to right", "elementor"),
@@ -2696,7 +2735,7 @@ var options11 = [
2696
2735
  }
2697
2736
  ];
2698
2737
  var TextDirectionField = () => {
2699
- return /* @__PURE__ */ React60.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React60.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, __39("Direction", "elementor"))), /* @__PURE__ */ React60.createElement(Grid23, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React60.createElement(ToggleControl12, { options: options11 }))));
2738
+ return /* @__PURE__ */ React60.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React60.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, __39("Direction", "elementor"))), /* @__PURE__ */ React60.createElement(Grid23, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React60.createElement(ToggleControl12, { options: options10 }))));
2700
2739
  };
2701
2740
 
2702
2741
  // src/components/style-sections/typography-section/text-stroke-field.tsx
@@ -2746,7 +2785,7 @@ import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
2746
2785
  import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
2747
2786
  import { Grid as Grid24 } from "@elementor/ui";
2748
2787
  import { __ as __41 } from "@wordpress/i18n";
2749
- var options12 = [
2788
+ var options11 = [
2750
2789
  {
2751
2790
  value: "none",
2752
2791
  label: __41("None", "elementor"),
@@ -2772,7 +2811,7 @@ var options12 = [
2772
2811
  showTooltip: true
2773
2812
  }
2774
2813
  ];
2775
- var TransformField = () => /* @__PURE__ */ React62.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React62.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, __41("Text transform", "elementor"))), /* @__PURE__ */ React62.createElement(Grid24, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React62.createElement(ToggleControl13, { options: options12 }))));
2814
+ var TransformField = () => /* @__PURE__ */ React62.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React62.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, __41("Text transform", "elementor"))), /* @__PURE__ */ React62.createElement(Grid24, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React62.createElement(ToggleControl13, { options: options11 }))));
2776
2815
 
2777
2816
  // src/components/style-sections/typography-section/word-spacing-field.tsx
2778
2817
  import * as React63 from "react";
@@ -2834,13 +2873,13 @@ var EditingPanelTabs = () => {
2834
2873
  var { useMenuItems } = controlActionsMenu;
2835
2874
  var EditingPanel = () => {
2836
2875
  const { element, elementType } = useSelectedElement();
2837
- const controlReplacement = getControlReplacement();
2876
+ const controlReplacements = getControlReplacements();
2838
2877
  const menuItems = useMenuItems().default;
2839
2878
  if (!element || !elementType) {
2840
2879
  return null;
2841
2880
  }
2842
2881
  const panelTitle = __45("Edit %s", "elementor").replace("%s", elementType.title);
2843
- return /* @__PURE__ */ React67.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React67.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React67.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React67.createElement(ThemeProvider9, null, /* @__PURE__ */ React67.createElement(Panel, null, /* @__PURE__ */ React67.createElement(PanelHeader, null, /* @__PURE__ */ React67.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React67.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React67.createElement(PanelBody, null, /* @__PURE__ */ React67.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React67.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React67.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React67.createElement(EditingPanelTabs, null)))))))));
2882
+ return /* @__PURE__ */ React67.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React67.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React67.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React67.createElement(ThemeProvider9, null, /* @__PURE__ */ React67.createElement(Panel, null, /* @__PURE__ */ React67.createElement(PanelHeader, null, /* @__PURE__ */ React67.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React67.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React67.createElement(PanelBody, null, /* @__PURE__ */ React67.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React67.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React67.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React67.createElement(EditingPanelTabs, null)))))))));
2844
2883
  };
2845
2884
 
2846
2885
  // src/panel.ts
@@ -2893,7 +2932,6 @@ import { settingsTransformersRegistry, styleTransformersRegistry } from "@elemen
2893
2932
 
2894
2933
  // src/dynamics/components/dynamic-selection-control.tsx
2895
2934
  import * as React71 from "react";
2896
- import { useId as useId3 } from "react";
2897
2935
  import { ControlFormLabel as ControlFormLabel5, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
2898
2936
  import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
2899
2937
  import {
@@ -3061,8 +3099,8 @@ var DynamicSelection = ({ onSelect }) => {
3061
3099
  const { bind, value: dynamicValue, setValue } = useBoundProp4(dynamicPropTypeUtil);
3062
3100
  const [, updatePropValueHistory] = usePersistDynamicValue(bind);
3063
3101
  const isCurrentValueDynamic = !!dynamicValue;
3064
- const options13 = useFilteredOptions(searchValue);
3065
- const hasNoDynamicTags = !options13.length && !searchValue.trim();
3102
+ const options12 = useFilteredOptions(searchValue);
3103
+ const hasNoDynamicTags = !options12.length && !searchValue.trim();
3066
3104
  const handleSearch = (event) => {
3067
3105
  setSearchValue(event.target.value);
3068
3106
  };
@@ -3085,7 +3123,7 @@ var DynamicSelection = ({ onSelect }) => {
3085
3123
  startAdornment: /* @__PURE__ */ React70.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React70.createElement(SearchIcon, { fontSize: SIZE3 }))
3086
3124
  }
3087
3125
  }
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(
3126
+ )), /* @__PURE__ */ React70.createElement(Divider6, null), /* @__PURE__ */ React70.createElement(Box3, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React70.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React70.createElement(Fragment9, { key: index }, /* @__PURE__ */ React70.createElement(
3089
3127
  MenuSubheader2,
3090
3128
  {
3091
3129
  sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
@@ -3138,7 +3176,7 @@ var NoDynamicTags = () => /* @__PURE__ */ React70.createElement(Box3, { sx: { ov
3138
3176
  ));
3139
3177
  var useFilteredOptions = (searchValue) => {
3140
3178
  const dynamicTags = usePropDynamicTags();
3141
- const options13 = dynamicTags.reduce((categories, { name, label, group }) => {
3179
+ const options12 = dynamicTags.reduce((categories, { name, label, group }) => {
3142
3180
  const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
3143
3181
  if (!isVisible) {
3144
3182
  return categories;
@@ -3149,7 +3187,7 @@ var useFilteredOptions = (searchValue) => {
3149
3187
  categories.get(group)?.push({ label, value: name });
3150
3188
  return categories;
3151
3189
  }, /* @__PURE__ */ new Map());
3152
- return [...options13];
3190
+ return [...options12];
3153
3191
  };
3154
3192
 
3155
3193
  // src/dynamics/components/dynamic-selection-control.tsx
@@ -3158,9 +3196,8 @@ var DynamicSelectionControl = () => {
3158
3196
  const { setValue: setAnyValue } = useBoundProp5();
3159
3197
  const { bind, value } = useBoundProp5(dynamicPropTypeUtil);
3160
3198
  const [propValueFromHistory] = usePersistDynamicValue(bind);
3199
+ const selectionPopoverState = usePopupState3({ variant: "popover" });
3161
3200
  const { name: tagName = "" } = value;
3162
- const selectionPopoverId = useId3();
3163
- const selectionPopoverState = usePopupState3({ variant: "popover", popupId: selectionPopoverId });
3164
3201
  const dynamicTag = useDynamicTag(tagName);
3165
3202
  const removeDynamicTag = () => {
3166
3203
  setAnyValue(propValueFromHistory ?? null);
@@ -3198,28 +3235,20 @@ var DynamicSelectionControl = () => {
3198
3235
  ));
3199
3236
  };
3200
3237
  var DynamicSettingsPopover = ({ dynamicTag }) => {
3201
- const popupId = useId3();
3202
- const settingsPopupState = usePopupState3({ variant: "popover", popupId });
3238
+ const popupState = usePopupState3({ variant: "popover" });
3203
3239
  const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
3204
3240
  if (!hasDynamicSettings) {
3205
3241
  return null;
3206
3242
  }
3207
- return /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(
3208
- IconButton3,
3209
- {
3210
- size: SIZE4,
3211
- ...bindTrigger2(settingsPopupState),
3212
- "aria-label": __47("Settings", "elementor")
3213
- },
3214
- /* @__PURE__ */ React71.createElement(SettingsIcon, { fontSize: SIZE4 })
3215
- ), /* @__PURE__ */ React71.createElement(
3243
+ return /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(IconButton3, { size: SIZE4, ...bindTrigger2(popupState), "aria-label": __47("Settings", "elementor") }, /* @__PURE__ */ React71.createElement(SettingsIcon, { fontSize: SIZE4 })), /* @__PURE__ */ React71.createElement(
3216
3244
  Popover2,
3217
3245
  {
3246
+ disablePortal: true,
3218
3247
  disableScrollLock: true,
3219
3248
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
3220
- ...bindPopover2(settingsPopupState)
3249
+ ...bindPopover2(popupState)
3221
3250
  },
3222
- /* @__PURE__ */ React71.createElement(Paper, { component: Stack19, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React71.createElement(Stack19, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React71.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React71.createElement(Typography4, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React71.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React71.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React71.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
3251
+ /* @__PURE__ */ React71.createElement(Paper, { component: Stack19, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React71.createElement(Stack19, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React71.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React71.createElement(Typography4, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React71.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: popupState.close }, /* @__PURE__ */ React71.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React71.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
3223
3252
  ));
3224
3253
  };
3225
3254
  var DynamicSettings = ({ controls }) => {
@@ -3312,7 +3341,7 @@ var usePropDynamicAction = () => {
3312
3341
  // src/dynamics/init.ts
3313
3342
  var { registerPopoverAction } = controlActionsMenu;
3314
3343
  var init = () => {
3315
- replaceControl({
3344
+ registerControlReplacement({
3316
3345
  component: DynamicSelectionControl,
3317
3346
  condition: ({ value }) => isDynamicPropValue(value)
3318
3347
  });
@@ -3345,9 +3374,10 @@ var blockV1Panel = () => {
3345
3374
  });
3346
3375
  };
3347
3376
  export {
3377
+ controlActionsMenu,
3348
3378
  init2 as init,
3349
3379
  injectIntoClassSelectorActions,
3350
- replaceControl,
3380
+ registerControlReplacement,
3351
3381
  useBoundProp7 as useBoundProp,
3352
3382
  usePanelActions,
3353
3383
  usePanelStatus