@elementor/editor-editing-panel 1.29.2 → 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,
@@ -549,12 +549,12 @@ var EMPTY_OPTION = {
549
549
  };
550
550
  var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = createLocation();
551
551
  function CssClassSelector() {
552
- const options13 = useOptions();
552
+ const options12 = useOptions();
553
553
  const { value: appliedIds, setValue: setAppliedIds, pushValue: pushAppliedId } = useAppliedClassesIds();
554
554
  const { id: activeId, setId: setActiveId } = useStyle();
555
555
  const actions = useCreateActions({ pushAppliedId, setActiveId });
556
556
  const handleApply = useHandleApply(appliedIds, setAppliedIds);
557
- const applied = useAppliedOptions(options13, appliedIds);
557
+ const applied = useAppliedOptions(options12, appliedIds);
558
558
  const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
559
559
  const showPlaceholder = applied.every(({ fixed }) => fixed);
560
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(
@@ -563,7 +563,7 @@ function CssClassSelector() {
563
563
  id: ID,
564
564
  size: "tiny",
565
565
  placeholder: showPlaceholder ? __3("Type class name", "elementor") : void 0,
566
- options: options13,
566
+ options: options12,
567
567
  selected: applied,
568
568
  onSelect: handleApply,
569
569
  limitTags: TAGS_LIMIT,
@@ -655,8 +655,8 @@ function useCreateActions({
655
655
  function hasReachedLimit(provider) {
656
656
  return provider.actions.all().length >= provider.limit;
657
657
  }
658
- function useAppliedOptions(options13, appliedIds) {
659
- 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));
660
660
  const hasElementsProviderStyleApplied = applied.some(
661
661
  (option) => option.provider && isElementsStylesProvider2(option.provider)
662
662
  );
@@ -713,7 +713,7 @@ import { __createPanel as createPanel } from "@elementor/editor-panels";
713
713
 
714
714
  // src/components/editing-panel.tsx
715
715
  import * as React67 from "react";
716
- import { ControlActionsProvider, ControlReplacementProvider } from "@elementor/editor-controls";
716
+ import { ControlActionsProvider, ControlReplacementsProvider } from "@elementor/editor-controls";
717
717
  import { useSelectedElement } from "@elementor/editor-elements";
718
718
  import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
719
719
  import { ThemeProvider as ThemeProvider9 } from "@elementor/editor-ui";
@@ -1861,41 +1861,78 @@ import {
1861
1861
  } from "@elementor/icons";
1862
1862
  import { DirectionProvider as DirectionProvider3, Grid as Grid4, ThemeProvider as ThemeProvider3, withDirection as withDirection5 } from "@elementor/ui";
1863
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
+ };
1864
1870
  var StartIcon3 = withDirection5(LayoutAlignLeftIcon2);
1865
1871
  var EndIcon3 = withDirection5(LayoutAlignRightIcon2);
1866
1872
  var iconProps3 = {
1867
- isClockwise: false,
1868
- offset: 90
1873
+ isClockwise: false
1869
1874
  };
1870
- var options3 = [
1875
+ var getOptions = (parentStyleDirection) => [
1871
1876
  {
1872
1877
  value: "start",
1873
1878
  label: __13("Start", "elementor"),
1874
- 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
+ ),
1875
1888
  showTooltip: true
1876
1889
  },
1877
1890
  {
1878
1891
  value: "center",
1879
1892
  label: __13("Center", "elementor"),
1880
- 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
+ ),
1881
1902
  showTooltip: true
1882
1903
  },
1883
1904
  {
1884
1905
  value: "end",
1885
1906
  label: __13("End", "elementor"),
1886
- 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
+ ),
1887
1916
  showTooltip: true
1888
1917
  },
1889
1918
  {
1890
1919
  value: "stretch",
1891
1920
  label: __13("Stretch", "elementor"),
1892
- 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
+ ),
1893
1930
  showTooltip: true
1894
1931
  }
1895
1932
  ];
1896
- var AlignSelfChild = () => {
1933
+ var AlignSelfChild = ({ parentStyleDirection }) => {
1897
1934
  const { isSiteRtl } = useDirection();
1898
- 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) }))))));
1899
1936
  };
1900
1937
 
1901
1938
  // src/components/style-sections/layout-section/display-field.tsx
@@ -1941,7 +1978,7 @@ import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
1941
1978
  import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
1942
1979
  import { DirectionProvider as DirectionProvider4, Grid as Grid5, ThemeProvider as ThemeProvider4, withDirection as withDirection6 } from "@elementor/ui";
1943
1980
  import { __ as __15 } from "@wordpress/i18n";
1944
- var options4 = [
1981
+ var options3 = [
1945
1982
  {
1946
1983
  value: "row",
1947
1984
  label: __15("Row", "elementor"),
@@ -1975,7 +2012,7 @@ var options4 = [
1975
2012
  ];
1976
2013
  var FlexDirectionField = () => {
1977
2014
  const { isSiteRtl } = useDirection();
1978
- 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 }))))));
1979
2016
  };
1980
2017
 
1981
2018
  // src/components/style-sections/layout-section/flex-order-field.tsx
@@ -2175,7 +2212,7 @@ var iconProps4 = {
2175
2212
  isClockwise: true,
2176
2213
  offset: -90
2177
2214
  };
2178
- var options5 = [
2215
+ var options4 = [
2179
2216
  {
2180
2217
  value: "flex-start",
2181
2218
  label: __19("Start", "elementor"),
@@ -2215,7 +2252,7 @@ var options5 = [
2215
2252
  ];
2216
2253
  var JustifyContentField = () => {
2217
2254
  const { isSiteRtl } = useDirection();
2218
- 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 })))));
2219
2256
  };
2220
2257
 
2221
2258
  // src/components/style-sections/layout-section/wrap-field.tsx
@@ -2224,7 +2261,7 @@ import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
2224
2261
  import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
2225
2262
  import { DirectionProvider as DirectionProvider8, Grid as Grid8, ThemeProvider as ThemeProvider8 } from "@elementor/ui";
2226
2263
  import { __ as __20 } from "@wordpress/i18n";
2227
- var options6 = [
2264
+ var options5 = [
2228
2265
  {
2229
2266
  value: "nowrap",
2230
2267
  label: __20("No wrap", "elementor"),
@@ -2246,7 +2283,7 @@ var options6 = [
2246
2283
  ];
2247
2284
  var WrapField = () => {
2248
2285
  const { isSiteRtl } = useDirection();
2249
- 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 }))))));
2250
2287
  };
2251
2288
 
2252
2289
  // src/components/style-sections/layout-section/layout-section.tsx
@@ -2257,13 +2294,14 @@ var LayoutSection = () => {
2257
2294
  const { element } = useElement();
2258
2295
  const parent = useParentElement(element.id);
2259
2296
  const parentStyle = useComputedStyle(parent?.id || null);
2260
- 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 }));
2261
2299
  };
2262
2300
  var FlexFields = () => {
2263
2301
  const [flexWrap] = useStylesField("flex-wrap");
2264
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));
2265
2303
  };
2266
- 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));
2267
2305
  var shouldDisplayFlexFields = (display, local) => {
2268
2306
  const value = display?.value ?? local?.value;
2269
2307
  if (!value) {
@@ -2375,7 +2413,7 @@ import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
2375
2413
  import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
2376
2414
  import { Grid as Grid12 } from "@elementor/ui";
2377
2415
  import { __ as __25 } from "@wordpress/i18n";
2378
- var options7 = [
2416
+ var options6 = [
2379
2417
  {
2380
2418
  value: "visible",
2381
2419
  label: __25("Visible", "elementor"),
@@ -2396,7 +2434,7 @@ var options7 = [
2396
2434
  }
2397
2435
  ];
2398
2436
  var OverflowField = () => {
2399
- 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 }))));
2400
2438
  };
2401
2439
 
2402
2440
  // src/components/style-sections/size-section/size-section.tsx
@@ -2489,11 +2527,11 @@ var supportedCategories = {
2489
2527
  };
2490
2528
  var getFontFamilies = () => {
2491
2529
  const { controls } = getElementorConfig();
2492
- const options13 = controls?.font?.options;
2493
- if (!options13) {
2530
+ const options12 = controls?.font?.options;
2531
+ if (!options12) {
2494
2532
  return null;
2495
2533
  }
2496
- return options13;
2534
+ return options12;
2497
2535
  };
2498
2536
  var useFontFamilies = () => {
2499
2537
  const fontFamilies = getFontFamilies();
@@ -2540,7 +2578,7 @@ import { ControlFormLabel as ControlFormLabel4, ToggleControl as ToggleControl9
2540
2578
  import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
2541
2579
  import { Grid as Grid16 } from "@elementor/ui";
2542
2580
  import { __ as __32 } from "@wordpress/i18n";
2543
- var options8 = [
2581
+ var options7 = [
2544
2582
  {
2545
2583
  value: "normal",
2546
2584
  label: __32("Normal", "elementor"),
@@ -2554,7 +2592,7 @@ var options8 = [
2554
2592
  showTooltip: true
2555
2593
  }
2556
2594
  ];
2557
- 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 }))));
2558
2596
 
2559
2597
  // src/components/style-sections/typography-section/font-weight-field.tsx
2560
2598
  import * as React54 from "react";
@@ -2602,7 +2640,7 @@ import { Grid as Grid20, withDirection as withDirection9 } from "@elementor/ui";
2602
2640
  import { __ as __36 } from "@wordpress/i18n";
2603
2641
  var AlignStartIcon = withDirection9(AlignLeftIcon);
2604
2642
  var AlignEndIcon = withDirection9(AlignRightIcon);
2605
- var options9 = [
2643
+ var options8 = [
2606
2644
  {
2607
2645
  value: "start",
2608
2646
  label: __36("Start", "elementor"),
@@ -2629,7 +2667,7 @@ var options9 = [
2629
2667
  }
2630
2668
  ];
2631
2669
  var TextAlignmentField = () => {
2632
- 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 }))));
2633
2671
  };
2634
2672
 
2635
2673
  // src/components/style-sections/typography-section/text-color-field.tsx
@@ -2647,7 +2685,7 @@ import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
2647
2685
  import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
2648
2686
  import { Grid as Grid22 } from "@elementor/ui";
2649
2687
  import { __ as __38 } from "@wordpress/i18n";
2650
- var options10 = [
2688
+ var options9 = [
2651
2689
  {
2652
2690
  value: "none",
2653
2691
  label: __38("None", "elementor"),
@@ -2674,7 +2712,7 @@ var options10 = [
2674
2712
  showTooltip: true
2675
2713
  }
2676
2714
  ];
2677
- 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 }))));
2678
2716
 
2679
2717
  // src/components/style-sections/typography-section/text-direction-field.tsx
2680
2718
  import * as React60 from "react";
@@ -2682,7 +2720,7 @@ import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
2682
2720
  import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
2683
2721
  import { Grid as Grid23 } from "@elementor/ui";
2684
2722
  import { __ as __39 } from "@wordpress/i18n";
2685
- var options11 = [
2723
+ var options10 = [
2686
2724
  {
2687
2725
  value: "ltr",
2688
2726
  label: __39("Left to right", "elementor"),
@@ -2697,7 +2735,7 @@ var options11 = [
2697
2735
  }
2698
2736
  ];
2699
2737
  var TextDirectionField = () => {
2700
- 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 }))));
2701
2739
  };
2702
2740
 
2703
2741
  // src/components/style-sections/typography-section/text-stroke-field.tsx
@@ -2747,7 +2785,7 @@ import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
2747
2785
  import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
2748
2786
  import { Grid as Grid24 } from "@elementor/ui";
2749
2787
  import { __ as __41 } from "@wordpress/i18n";
2750
- var options12 = [
2788
+ var options11 = [
2751
2789
  {
2752
2790
  value: "none",
2753
2791
  label: __41("None", "elementor"),
@@ -2773,7 +2811,7 @@ var options12 = [
2773
2811
  showTooltip: true
2774
2812
  }
2775
2813
  ];
2776
- 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 }))));
2777
2815
 
2778
2816
  // src/components/style-sections/typography-section/word-spacing-field.tsx
2779
2817
  import * as React63 from "react";
@@ -2835,13 +2873,13 @@ var EditingPanelTabs = () => {
2835
2873
  var { useMenuItems } = controlActionsMenu;
2836
2874
  var EditingPanel = () => {
2837
2875
  const { element, elementType } = useSelectedElement();
2838
- const controlReplacement = getControlReplacement();
2876
+ const controlReplacements = getControlReplacements();
2839
2877
  const menuItems = useMenuItems().default;
2840
2878
  if (!element || !elementType) {
2841
2879
  return null;
2842
2880
  }
2843
2881
  const panelTitle = __45("Edit %s", "elementor").replace("%s", elementType.title);
2844
- 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)))))))));
2845
2883
  };
2846
2884
 
2847
2885
  // src/panel.ts
@@ -2894,7 +2932,6 @@ import { settingsTransformersRegistry, styleTransformersRegistry } from "@elemen
2894
2932
 
2895
2933
  // src/dynamics/components/dynamic-selection-control.tsx
2896
2934
  import * as React71 from "react";
2897
- import { useId as useId3 } from "react";
2898
2935
  import { ControlFormLabel as ControlFormLabel5, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
2899
2936
  import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
2900
2937
  import {
@@ -3062,8 +3099,8 @@ var DynamicSelection = ({ onSelect }) => {
3062
3099
  const { bind, value: dynamicValue, setValue } = useBoundProp4(dynamicPropTypeUtil);
3063
3100
  const [, updatePropValueHistory] = usePersistDynamicValue(bind);
3064
3101
  const isCurrentValueDynamic = !!dynamicValue;
3065
- const options13 = useFilteredOptions(searchValue);
3066
- const hasNoDynamicTags = !options13.length && !searchValue.trim();
3102
+ const options12 = useFilteredOptions(searchValue);
3103
+ const hasNoDynamicTags = !options12.length && !searchValue.trim();
3067
3104
  const handleSearch = (event) => {
3068
3105
  setSearchValue(event.target.value);
3069
3106
  };
@@ -3086,7 +3123,7 @@ var DynamicSelection = ({ onSelect }) => {
3086
3123
  startAdornment: /* @__PURE__ */ React70.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React70.createElement(SearchIcon, { fontSize: SIZE3 }))
3087
3124
  }
3088
3125
  }
3089
- )), /* @__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(
3090
3127
  MenuSubheader2,
3091
3128
  {
3092
3129
  sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
@@ -3139,7 +3176,7 @@ var NoDynamicTags = () => /* @__PURE__ */ React70.createElement(Box3, { sx: { ov
3139
3176
  ));
3140
3177
  var useFilteredOptions = (searchValue) => {
3141
3178
  const dynamicTags = usePropDynamicTags();
3142
- const options13 = dynamicTags.reduce((categories, { name, label, group }) => {
3179
+ const options12 = dynamicTags.reduce((categories, { name, label, group }) => {
3143
3180
  const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
3144
3181
  if (!isVisible) {
3145
3182
  return categories;
@@ -3150,7 +3187,7 @@ var useFilteredOptions = (searchValue) => {
3150
3187
  categories.get(group)?.push({ label, value: name });
3151
3188
  return categories;
3152
3189
  }, /* @__PURE__ */ new Map());
3153
- return [...options13];
3190
+ return [...options12];
3154
3191
  };
3155
3192
 
3156
3193
  // src/dynamics/components/dynamic-selection-control.tsx
@@ -3159,9 +3196,8 @@ var DynamicSelectionControl = () => {
3159
3196
  const { setValue: setAnyValue } = useBoundProp5();
3160
3197
  const { bind, value } = useBoundProp5(dynamicPropTypeUtil);
3161
3198
  const [propValueFromHistory] = usePersistDynamicValue(bind);
3199
+ const selectionPopoverState = usePopupState3({ variant: "popover" });
3162
3200
  const { name: tagName = "" } = value;
3163
- const selectionPopoverId = useId3();
3164
- const selectionPopoverState = usePopupState3({ variant: "popover", popupId: selectionPopoverId });
3165
3201
  const dynamicTag = useDynamicTag(tagName);
3166
3202
  const removeDynamicTag = () => {
3167
3203
  setAnyValue(propValueFromHistory ?? null);
@@ -3199,28 +3235,20 @@ var DynamicSelectionControl = () => {
3199
3235
  ));
3200
3236
  };
3201
3237
  var DynamicSettingsPopover = ({ dynamicTag }) => {
3202
- const popupId = useId3();
3203
- const settingsPopupState = usePopupState3({ variant: "popover", popupId });
3238
+ const popupState = usePopupState3({ variant: "popover" });
3204
3239
  const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
3205
3240
  if (!hasDynamicSettings) {
3206
3241
  return null;
3207
3242
  }
3208
- return /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(
3209
- IconButton3,
3210
- {
3211
- size: SIZE4,
3212
- ...bindTrigger2(settingsPopupState),
3213
- "aria-label": __47("Settings", "elementor")
3214
- },
3215
- /* @__PURE__ */ React71.createElement(SettingsIcon, { fontSize: SIZE4 })
3216
- ), /* @__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(
3217
3244
  Popover2,
3218
3245
  {
3246
+ disablePortal: true,
3219
3247
  disableScrollLock: true,
3220
3248
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
3221
- ...bindPopover2(settingsPopupState)
3249
+ ...bindPopover2(popupState)
3222
3250
  },
3223
- /* @__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 }))
3224
3252
  ));
3225
3253
  };
3226
3254
  var DynamicSettings = ({ controls }) => {
@@ -3313,7 +3341,7 @@ var usePropDynamicAction = () => {
3313
3341
  // src/dynamics/init.ts
3314
3342
  var { registerPopoverAction } = controlActionsMenu;
3315
3343
  var init = () => {
3316
- replaceControl({
3344
+ registerControlReplacement({
3317
3345
  component: DynamicSelectionControl,
3318
3346
  condition: ({ value }) => isDynamicPropValue(value)
3319
3347
  });
@@ -3346,9 +3374,10 @@ var blockV1Panel = () => {
3346
3374
  });
3347
3375
  };
3348
3376
  export {
3377
+ controlActionsMenu,
3349
3378
  init2 as init,
3350
3379
  injectIntoClassSelectorActions,
3351
- replaceControl,
3380
+ registerControlReplacement,
3352
3381
  useBoundProp7 as useBoundProp,
3353
3382
  usePanelActions,
3354
3383
  usePanelStatus