@elementor/editor-controls 4.4.0-beta2 → 4.4.0-beta3

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
@@ -5773,7 +5773,7 @@ var AspectRatioControl = createControl(({ label }) => {
5773
5773
 
5774
5774
  // src/controls/svg-media-control.tsx
5775
5775
  import * as React94 from "react";
5776
- import { useEffect as useEffect18, useRef as useRef22, useState as useState24 } from "react";
5776
+ import { useEffect as useEffect18, useRef as useRef23, useState as useState24 } from "react";
5777
5777
  import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
5778
5778
  import { iconPropTypeUtil, svgSrcPropTypeUtil, urlPropTypeUtil as urlPropTypeUtil4 } from "@elementor/editor-props";
5779
5779
  import { Box as Box24, Card as Card2, CardOverlay as CardOverlay2, Popover as Popover6, Stack as Stack18, styled as styled12, usePopupState as usePopupState9 } from "@elementor/ui";
@@ -5857,7 +5857,7 @@ function measureIconLibraryAnchor(container, buttonGroup) {
5857
5857
 
5858
5858
  // src/controls/icon-library/icon-library-popover.tsx
5859
5859
  import * as React91 from "react";
5860
- import { useMemo as useMemo13, useState as useState23 } from "react";
5860
+ import { useMemo as useMemo13, useRef as useRef22, useState as useState23 } from "react";
5861
5861
  import {
5862
5862
  PopoverBody as PopoverBody2,
5863
5863
  PopoverHeader as PopoverHeader4,
@@ -6538,8 +6538,9 @@ function parseFilterEntry(value) {
6538
6538
  // src/controls/icon-library/icon-library-grid.tsx
6539
6539
  import * as React87 from "react";
6540
6540
  import { useLayoutEffect as useLayoutEffect3, useRef as useRef20, useState as useState21 } from "react";
6541
+ import { useRovingFocus } from "@elementor/editor-ui";
6541
6542
  import { Box as Box19, Tooltip as Tooltip9, useTheme as useTheme4 } from "@elementor/ui";
6542
- import { useVirtualizer } from "@tanstack/react-virtual";
6543
+ import { defaultRangeExtractor, useVirtualizer } from "@tanstack/react-virtual";
6543
6544
  import { __ as __36 } from "@wordpress/i18n";
6544
6545
  var ICON_LIBRARY_GRID_FALLBACK_COLUMN_COUNT = 4;
6545
6546
  var ICON_LIBRARY_GRID_MIN_CELL_SIZE = 52;
@@ -6577,8 +6578,6 @@ var IconLibraryGrid = ({
6577
6578
  }) => {
6578
6579
  const theme = useTheme4();
6579
6580
  const containerRef = useRef20(null);
6580
- const cellRefs = useRef20(/* @__PURE__ */ new Map());
6581
- const shouldRestoreFocusRef = useRef20(false);
6582
6581
  const selectedIndex = items2.findIndex((item) => item.id === selectedValue);
6583
6582
  const [focusedIndex, setFocusedIndex] = useState21(selectedIndex >= 0 ? selectedIndex : 0);
6584
6583
  const [{ columnCount, cellSize }, setGridMetrics] = useState21(() => getGridMetrics(0, 0, 0));
@@ -6592,7 +6591,15 @@ var IconLibraryGrid = ({
6592
6591
  gap: cellGap,
6593
6592
  paddingStart: verticalPadding,
6594
6593
  paddingEnd: verticalPadding,
6595
- overscan: GRID_OVERSCAN
6594
+ overscan: GRID_OVERSCAN,
6595
+ rangeExtractor: (range) => {
6596
+ const rowIndexes = defaultRangeExtractor(range);
6597
+ const focusedRow = Math.floor(focusedIndex / columnCount);
6598
+ if (items2.length === 0 || rowIndexes.includes(focusedRow)) {
6599
+ return rowIndexes;
6600
+ }
6601
+ return [...rowIndexes, focusedRow].sort((a, b) => a - b);
6602
+ }
6596
6603
  });
6597
6604
  const focusedItem = items2[focusedIndex];
6598
6605
  const visibleRowIndexes = virtualizer.getVirtualIndexes().join(",");
@@ -6611,17 +6618,10 @@ var IconLibraryGrid = ({
6611
6618
  virtualizer.scrollToIndex(Math.floor(selectedIndex / columnCount), { align: "center" });
6612
6619
  }
6613
6620
  }, [cellSize, columnCount, items2, selectedIndex, selectedValue]);
6614
- useLayoutEffect3(() => {
6615
- if (!shouldRestoreFocusRef.current || !focusedItem) {
6616
- return;
6617
- }
6618
- const cell = cellRefs.current.get(focusedItem.id);
6619
- if (!cell) {
6620
- return;
6621
- }
6622
- cell.focus();
6623
- shouldRestoreFocusRef.current = false;
6624
- }, [focusedItem, visibleRowIndexes]);
6621
+ const { registerRef, requestFocus } = useRovingFocus({
6622
+ tabbableKey: focusedItem?.id,
6623
+ mountedSignature: visibleRowIndexes
6624
+ });
6625
6625
  useLayoutEffect3(() => {
6626
6626
  const container = containerRef.current;
6627
6627
  if (!container) {
@@ -6647,7 +6647,7 @@ var IconLibraryGrid = ({
6647
6647
  if (nextIndex < 0 || nextIndex >= items2.length) {
6648
6648
  return;
6649
6649
  }
6650
- shouldRestoreFocusRef.current = true;
6650
+ requestFocus();
6651
6651
  setFocusedIndex(nextIndex);
6652
6652
  virtualizer.scrollToIndex(Math.floor(nextIndex / columnCount));
6653
6653
  };
@@ -6770,13 +6770,7 @@ var IconLibraryGrid = ({
6770
6770
  "aria-label": item.label,
6771
6771
  "aria-selected": isSelected,
6772
6772
  tabIndex,
6773
- ref: (node) => {
6774
- if (node) {
6775
- cellRefs.current.set(item.id, node);
6776
- } else {
6777
- cellRefs.current.delete(item.id);
6778
- }
6779
- },
6773
+ ref: registerRef(item.id),
6780
6774
  onClick: () => {
6781
6775
  onSelect(item.id);
6782
6776
  onClose();
@@ -7073,6 +7067,7 @@ var IconLibraryPopover = ({
7073
7067
  () => findFontAwesome7Icon(icons, selectedIconClass, selectedIconLibrary)?.id,
7074
7068
  [icons, selectedIconClass, selectedIconLibrary]
7075
7069
  );
7070
+ const contentRef = useRef22(null);
7076
7071
  const handleClose = () => {
7077
7072
  setSearchValue("");
7078
7073
  setActiveLibraries([]);
@@ -7088,6 +7083,16 @@ var IconLibraryPopover = ({
7088
7083
  library: icon.library
7089
7084
  });
7090
7085
  };
7086
+ const handleSearchKeyDown = (event) => {
7087
+ if (event.key !== "ArrowDown" || view !== "list") {
7088
+ return;
7089
+ }
7090
+ const option = contentRef.current?.querySelector('[role="option"][tabindex="0"]');
7091
+ if (option) {
7092
+ event.preventDefault();
7093
+ option.focus();
7094
+ }
7095
+ };
7091
7096
  const handleClearSearch = () => {
7092
7097
  setSearchValue("");
7093
7098
  };
@@ -7115,18 +7120,18 @@ var IconLibraryPopover = ({
7115
7120
  gap: 1,
7116
7121
  sx: { px: ICON_LIBRARY_INLINE_SPACING, pb: ICON_LIBRARY_SEARCH_PADDING_BOTTOM }
7117
7122
  },
7118
- /* @__PURE__ */ React91.createElement(
7123
+ /* @__PURE__ */ React91.createElement(Box21, { onKeyDown: handleSearchKeyDown, sx: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React91.createElement(
7119
7124
  SearchField2,
7120
7125
  {
7121
7126
  value: searchInputValue,
7122
7127
  onSearch: handleSearchChange,
7123
7128
  placeholder: __39("Search", "elementor"),
7124
7129
  id: "icon-library-search",
7125
- sx: { flex: 1, px: 0, pb: 0 }
7130
+ sx: { width: "100%", px: 0, pb: 0 }
7126
7131
  }
7127
- ),
7132
+ )),
7128
7133
  /* @__PURE__ */ React91.createElement(IconLibraryFilter, { value: activeLibraries, onChange: setActiveLibraries })
7129
- ), /* @__PURE__ */ React91.createElement(Divider5, null), /* @__PURE__ */ React91.createElement(Box21, { sx: { flex: 1, overflow: "hidden", minHeight: 0, minWidth: 0 } }, /* @__PURE__ */ React91.createElement(
7134
+ ), /* @__PURE__ */ React91.createElement(Divider5, null), /* @__PURE__ */ React91.createElement(Box21, { ref: contentRef, sx: { flex: 1, overflow: "hidden", minHeight: 0, minWidth: 0 } }, /* @__PURE__ */ React91.createElement(
7130
7135
  IconLibraryContent,
7131
7136
  {
7132
7137
  isLoading,
@@ -7185,6 +7190,7 @@ var IconLibraryContent = ({
7185
7190
  onClose,
7186
7191
  itemHeight: ICON_LIBRARY_ROW_HEIGHT,
7187
7192
  menuItemContentTemplate: IconLibraryRow,
7193
+ rovingFocus: true,
7188
7194
  noResultsComponent: emptyState,
7189
7195
  "data-testid": "icon-library-list"
7190
7196
  }
@@ -7446,8 +7452,8 @@ var SvgMediaControl = createControl(({ label }) => {
7446
7452
  const { data: allowSvgUpload } = useUnfilteredFilesUpload();
7447
7453
  const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState24(false);
7448
7454
  const iconLibraryPopoverState = usePopupState9({ variant: "popover" });
7449
- const controlContainerRef = useRef22(null);
7450
- const buttonGroupRef = useRef22(null);
7455
+ const controlContainerRef = useRef23(null);
7456
+ const buttonGroupRef = useRef23(null);
7451
7457
  const [iconLibraryAnchor, setIconLibraryAnchor] = useState24(null);
7452
7458
  const { isAdmin } = useCurrentUserCapabilities();
7453
7459
  const selectedIconClass = typeof previewIconValue?.value?.value === "string" ? previewIconValue.value.value : null;
@@ -7793,7 +7799,7 @@ var BackgroundImageOverlayAttachment = () => {
7793
7799
 
7794
7800
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
7795
7801
  import * as React98 from "react";
7796
- import { useRef as useRef23 } from "react";
7802
+ import { useRef as useRef24 } from "react";
7797
7803
  import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil17 } from "@elementor/editor-props";
7798
7804
  import { MenuListItem as MenuListItem6 } from "@elementor/editor-ui";
7799
7805
  import { LetterXIcon, LetterYIcon } from "@elementor/icons";
@@ -7815,7 +7821,7 @@ var BackgroundImageOverlayPosition = () => {
7815
7821
  const backgroundImageOffsetContext = useBoundProp(backgroundImagePositionOffsetPropTypeUtil);
7816
7822
  const stringPropContext = useBoundProp(stringPropTypeUtil17);
7817
7823
  const isCustom = !!backgroundImageOffsetContext.value;
7818
- const rowRef = useRef23(null);
7824
+ const rowRef = useRef24(null);
7819
7825
  const handlePositionChange = (event) => {
7820
7826
  const value = event.target.value || null;
7821
7827
  if (value === "custom") {
@@ -7888,7 +7894,7 @@ var BackgroundImageOverlayRepeat = () => {
7888
7894
 
7889
7895
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
7890
7896
  import * as React100 from "react";
7891
- import { useRef as useRef24 } from "react";
7897
+ import { useRef as useRef25 } from "react";
7892
7898
  import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil18 } from "@elementor/editor-props";
7893
7899
  import {
7894
7900
  ArrowBarBothIcon,
@@ -7930,7 +7936,7 @@ var BackgroundImageOverlaySize = () => {
7930
7936
  const backgroundImageScaleContext = useBoundProp(backgroundImageSizeScalePropTypeUtil);
7931
7937
  const stringPropContext = useBoundProp(stringPropTypeUtil18);
7932
7938
  const isCustom = !!backgroundImageScaleContext.value;
7933
- const rowRef = useRef24(null);
7939
+ const rowRef = useRef25(null);
7934
7940
  const handleSizeChange = (size) => {
7935
7941
  if (size === "custom") {
7936
7942
  backgroundImageScaleContext.setValue({ width: null, height: null });
@@ -7965,7 +7971,7 @@ var BackgroundImageOverlaySize = () => {
7965
7971
  };
7966
7972
 
7967
7973
  // src/controls/background-control/background-overlay/use-background-tabs-history.ts
7968
- import { useRef as useRef25 } from "react";
7974
+ import { useRef as useRef26 } from "react";
7969
7975
  import {
7970
7976
  backgroundColorOverlayPropTypeUtil,
7971
7977
  backgroundGradientOverlayPropTypeUtil as backgroundGradientOverlayPropTypeUtil2,
@@ -7990,7 +7996,7 @@ var useBackgroundTabsHistory = ({
7990
7996
  return "image";
7991
7997
  };
7992
7998
  const { getTabsProps, getTabProps, getTabPanelProps } = useTabs(getCurrentOverlayType());
7993
- const valuesHistory = useRef25({
7999
+ const valuesHistory = useRef26({
7994
8000
  image: initialBackgroundImageOverlay,
7995
8001
  color: initialBackgroundColorOverlay2,
7996
8002
  gradient: initialBackgroundGradientOverlay2
@@ -8573,7 +8579,7 @@ var PositionControl = () => {
8573
8579
 
8574
8580
  // src/controls/transform-control/transform-repeater-control.tsx
8575
8581
  import * as React118 from "react";
8576
- import { useRef as useRef33 } from "react";
8582
+ import { useRef as useRef34 } from "react";
8577
8583
  import { transformFunctionsPropTypeUtil, transformPropTypeUtil } from "@elementor/editor-props";
8578
8584
  import { AdjustmentsIcon as AdjustmentsIcon2, InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
8579
8585
  import { bindTrigger as bindTrigger5, Box as Box30, IconButton as IconButton10, Tooltip as Tooltip12, Typography as Typography12, usePopupState as usePopupState10 } from "@elementor/ui";
@@ -8637,7 +8643,7 @@ import { __ as __56 } from "@wordpress/i18n";
8637
8643
 
8638
8644
  // src/controls/transform-control/functions/move.tsx
8639
8645
  import * as React107 from "react";
8640
- import { useRef as useRef26 } from "react";
8646
+ import { useRef as useRef27 } from "react";
8641
8647
  import { moveTransformPropTypeUtil } from "@elementor/editor-props";
8642
8648
  import { ArrowDownLeftIcon, ArrowDownSmallIcon, ArrowRightIcon } from "@elementor/icons";
8643
8649
  import { Grid as Grid22 } from "@elementor/ui";
@@ -8684,7 +8690,7 @@ var moveAxisControls = [
8684
8690
  ];
8685
8691
  var Move = () => {
8686
8692
  const context = useBoundProp(moveTransformPropTypeUtil);
8687
- const rowRefs = [useRef26(null), useRef26(null), useRef26(null)];
8693
+ const rowRefs = [useRef27(null), useRef27(null), useRef27(null)];
8688
8694
  return /* @__PURE__ */ React107.createElement(Grid22, { container: true, spacing: 1.5 }, /* @__PURE__ */ React107.createElement(PropProvider, { ...context }, /* @__PURE__ */ React107.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React107.createElement(
8689
8695
  AxisRow,
8690
8696
  {
@@ -8699,7 +8705,7 @@ var Move = () => {
8699
8705
 
8700
8706
  // src/controls/transform-control/functions/rotate.tsx
8701
8707
  import * as React108 from "react";
8702
- import { useRef as useRef27 } from "react";
8708
+ import { useRef as useRef28 } from "react";
8703
8709
  import { rotateTransformPropTypeUtil as rotateTransformPropTypeUtil2 } from "@elementor/editor-props";
8704
8710
  import { Arrow360Icon, RotateClockwiseIcon } from "@elementor/icons";
8705
8711
  import { Grid as Grid23 } from "@elementor/ui";
@@ -8724,7 +8730,7 @@ var rotateAxisControls = [
8724
8730
  var rotateUnits = ["deg", "rad", "grad", "turn"];
8725
8731
  var Rotate = () => {
8726
8732
  const context = useBoundProp(rotateTransformPropTypeUtil2);
8727
- const rowRefs = [useRef27(null), useRef27(null), useRef27(null)];
8733
+ const rowRefs = [useRef28(null), useRef28(null), useRef28(null)];
8728
8734
  return /* @__PURE__ */ React108.createElement(Grid23, { container: true, spacing: 1.5 }, /* @__PURE__ */ React108.createElement(PropProvider, { ...context }, /* @__PURE__ */ React108.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React108.createElement(
8729
8735
  AxisRow,
8730
8736
  {
@@ -8738,7 +8744,7 @@ var Rotate = () => {
8738
8744
 
8739
8745
  // src/controls/transform-control/functions/scale.tsx
8740
8746
  import * as React110 from "react";
8741
- import { useRef as useRef28 } from "react";
8747
+ import { useRef as useRef29 } from "react";
8742
8748
  import { scaleTransformPropTypeUtil as scaleTransformPropTypeUtil2 } from "@elementor/editor-props";
8743
8749
  import { ArrowDownLeftIcon as ArrowDownLeftIcon2, ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
8744
8750
  import { Grid as Grid25 } from "@elementor/ui";
@@ -8771,13 +8777,13 @@ var scaleAxisControls = [
8771
8777
  ];
8772
8778
  var Scale = () => {
8773
8779
  const context = useBoundProp(scaleTransformPropTypeUtil2);
8774
- const rowRefs = [useRef28(null), useRef28(null), useRef28(null)];
8780
+ const rowRefs = [useRef29(null), useRef29(null), useRef29(null)];
8775
8781
  return /* @__PURE__ */ React110.createElement(Grid25, { container: true, spacing: 1.5 }, /* @__PURE__ */ React110.createElement(PropProvider, { ...context }, /* @__PURE__ */ React110.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React110.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
8776
8782
  };
8777
8783
 
8778
8784
  // src/controls/transform-control/functions/skew.tsx
8779
8785
  import * as React111 from "react";
8780
- import { useRef as useRef29 } from "react";
8786
+ import { useRef as useRef30 } from "react";
8781
8787
  import { skewTransformPropTypeUtil as skewTransformPropTypeUtil2 } from "@elementor/editor-props";
8782
8788
  import { ArrowLeftIcon, ArrowRightIcon as ArrowRightIcon3 } from "@elementor/icons";
8783
8789
  import { Grid as Grid26 } from "@elementor/ui";
@@ -8797,7 +8803,7 @@ var skewAxisControls = [
8797
8803
  var skewUnits = ["deg", "rad", "grad", "turn"];
8798
8804
  var Skew = () => {
8799
8805
  const context = useBoundProp(skewTransformPropTypeUtil2);
8800
- const rowRefs = [useRef29(null), useRef29(null), useRef29(null)];
8806
+ const rowRefs = [useRef30(null), useRef30(null), useRef30(null)];
8801
8807
  return /* @__PURE__ */ React111.createElement(Grid26, { container: true, spacing: 1.5 }, /* @__PURE__ */ React111.createElement(PropProvider, { ...context }, /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React111.createElement(
8802
8808
  AxisRow,
8803
8809
  {
@@ -8810,7 +8816,7 @@ var Skew = () => {
8810
8816
  };
8811
8817
 
8812
8818
  // src/controls/transform-control/use-transform-tabs-history.tsx
8813
- import { useRef as useRef30 } from "react";
8819
+ import { useRef as useRef31 } from "react";
8814
8820
  import {
8815
8821
  moveTransformPropTypeUtil as moveTransformPropTypeUtil2,
8816
8822
  rotateTransformPropTypeUtil as rotateTransformPropTypeUtil3,
@@ -8842,7 +8848,7 @@ var useTransformTabsHistory = ({
8842
8848
  }
8843
8849
  };
8844
8850
  const { getTabsProps, getTabProps, getTabPanelProps } = useTabs2(getCurrentTransformType());
8845
- const valuesHistory = useRef30({
8851
+ const valuesHistory = useRef31({
8846
8852
  move: initialMove,
8847
8853
  scale: initialScale,
8848
8854
  rotate: initialRotate,
@@ -8986,7 +8992,7 @@ import { __ as __60 } from "@wordpress/i18n";
8986
8992
 
8987
8993
  // src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
8988
8994
  import * as React115 from "react";
8989
- import { useRef as useRef31 } from "react";
8995
+ import { useRef as useRef32 } from "react";
8990
8996
  import { perspectiveOriginPropTypeUtil } from "@elementor/editor-props";
8991
8997
  import { Grid as Grid27, Stack as Stack19 } from "@elementor/ui";
8992
8998
  import { __ as __58 } from "@wordpress/i18n";
@@ -9018,13 +9024,13 @@ var PerspectiveOriginControlProvider = () => {
9018
9024
  return /* @__PURE__ */ React115.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React115.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React115.createElement(ControlFields, { control }))));
9019
9025
  };
9020
9026
  var ControlFields = ({ control }) => {
9021
- const rowRef = useRef31(null);
9027
+ const rowRef = useRef32(null);
9022
9028
  return /* @__PURE__ */ React115.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React115.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React115.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React115.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React115.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
9023
9029
  };
9024
9030
 
9025
9031
  // src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
9026
9032
  import * as React116 from "react";
9027
- import { useRef as useRef32 } from "react";
9033
+ import { useRef as useRef33 } from "react";
9028
9034
  import { transformOriginPropTypeUtil } from "@elementor/editor-props";
9029
9035
  import { Grid as Grid28, Stack as Stack20 } from "@elementor/ui";
9030
9036
  import { __ as __59 } from "@wordpress/i18n";
@@ -9052,7 +9058,7 @@ var TransformOriginControl = () => {
9052
9058
  };
9053
9059
  var ControlFields2 = ({ control }) => {
9054
9060
  const context = useBoundProp(transformOriginPropTypeUtil);
9055
- const rowRef = useRef32(null);
9061
+ const rowRef = useRef33(null);
9056
9062
  return /* @__PURE__ */ React116.createElement(PropProvider, { ...context }, /* @__PURE__ */ React116.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React116.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React116.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React116.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React116.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React116.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef })))));
9057
9063
  };
9058
9064
 
@@ -9100,7 +9106,7 @@ var SIZE12 = "tiny";
9100
9106
  var TransformRepeaterControl = createControl(
9101
9107
  ({ showChildrenPerspective }) => {
9102
9108
  const context = useBoundProp(transformPropTypeUtil);
9103
- const headerRef = useRef33(null);
9109
+ const headerRef = useRef34(null);
9104
9110
  const popupState = usePopupState10({ variant: "popover" });
9105
9111
  return /* @__PURE__ */ React118.createElement(PropProvider, { ...context }, /* @__PURE__ */ React118.createElement(
9106
9112
  TransformSettingsControl,
@@ -9192,13 +9198,13 @@ import { __ as __64 } from "@wordpress/i18n";
9192
9198
 
9193
9199
  // src/controls/selection-size-control.tsx
9194
9200
  import * as React119 from "react";
9195
- import { useMemo as useMemo17, useRef as useRef34 } from "react";
9201
+ import { useMemo as useMemo17, useRef as useRef35 } from "react";
9196
9202
  import { selectionSizePropTypeUtil } from "@elementor/editor-props";
9197
9203
  import { Grid as Grid29 } from "@elementor/ui";
9198
9204
  var SelectionSizeControl = createControl(
9199
9205
  ({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
9200
9206
  const { value, setValue, propType } = useBoundProp(selectionSizePropTypeUtil);
9201
- const rowRef = useRef34(null);
9207
+ const rowRef = useRef35(null);
9202
9208
  const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
9203
9209
  const currentSizeConfig = useMemo17(() => {
9204
9210
  switch (value.selection.$$type) {
@@ -9413,7 +9419,7 @@ function subscribeToTransitionEvent() {
9413
9419
 
9414
9420
  // src/controls/transition-control/transition-selector.tsx
9415
9421
  import * as React120 from "react";
9416
- import { useMemo as useMemo18, useRef as useRef35 } from "react";
9422
+ import { useMemo as useMemo18, useRef as useRef36 } from "react";
9417
9423
  import { keyValuePropTypeUtil as keyValuePropTypeUtil2 } from "@elementor/editor-props";
9418
9424
  import { PromotionAlert, PromotionChip } from "@elementor/editor-ui";
9419
9425
  import { ChevronDownIcon as ChevronDownIcon3, VariationsIcon } from "@elementor/icons";
@@ -9459,7 +9465,7 @@ var TransitionSelector = ({
9459
9465
  const {
9460
9466
  key: { value: transitionLabel }
9461
9467
  } = value;
9462
- const defaultRef = useRef35(null);
9468
+ const defaultRef = useRef36(null);
9463
9469
  const popoverState = usePopupState11({ variant: "popover" });
9464
9470
  const disabledCategories = useMemo18(() => {
9465
9471
  return new Set(
@@ -10009,7 +10015,7 @@ import { Box as Box36, Stack as Stack24 } from "@elementor/ui";
10009
10015
 
10010
10016
  // src/components/inline-editor.tsx
10011
10017
  import * as React127 from "react";
10012
- import { useEffect as useEffect20, useRef as useRef36 } from "react";
10018
+ import { useEffect as useEffect20, useRef as useRef37 } from "react";
10013
10019
  import { Box as Box34 } from "@elementor/ui";
10014
10020
  import Bold from "@tiptap/extension-bold";
10015
10021
  import Document from "@tiptap/extension-document";
@@ -10072,8 +10078,8 @@ var InlineEditor = React127.forwardRef((props, ref) => {
10072
10078
  onSelectionEnd,
10073
10079
  mountElement = null
10074
10080
  } = props;
10075
- const containerRef = useRef36(null);
10076
- const onBlurRef = useRef36(onBlur);
10081
+ const containerRef = useRef37(null);
10082
+ const onBlurRef = useRef37(onBlur);
10077
10083
  onBlurRef.current = onBlur;
10078
10084
  const documentContentSettings = !!expectedTag ? "block+" : "inline*";
10079
10085
  const onUpdate = ({ editor: updatedEditor }) => {
@@ -10171,7 +10177,7 @@ var InlineEditor = React127.forwardRef((props, ref) => {
10171
10177
  return /* @__PURE__ */ React127.createElement(Box34, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React127.createElement(EditorContent, { ref, editor }));
10172
10178
  });
10173
10179
  var useOnUpdate = (callback, dependencies) => {
10174
- const hasMounted = useRef36(false);
10180
+ const hasMounted = useRef37(false);
10175
10181
  useEffect20(() => {
10176
10182
  if (hasMounted.current) {
10177
10183
  callback();
@@ -10183,7 +10189,7 @@ var useOnUpdate = (callback, dependencies) => {
10183
10189
 
10184
10190
  // src/components/inline-editor-toolbar.tsx
10185
10191
  import * as React129 from "react";
10186
- import { useEffect as useEffect22, useMemo as useMemo20, useRef as useRef38, useState as useState27 } from "react";
10192
+ import { useEffect as useEffect22, useMemo as useMemo20, useRef as useRef39, useState as useState27 } from "react";
10187
10193
  import { getContainer as getContainer2, getElementSetting } from "@elementor/editor-elements";
10188
10194
  import {
10189
10195
  BoldIcon,
@@ -10209,7 +10215,7 @@ import { __ as __68 } from "@wordpress/i18n";
10209
10215
 
10210
10216
  // src/components/url-popover.tsx
10211
10217
  import * as React128 from "react";
10212
- import { useEffect as useEffect21, useRef as useRef37 } from "react";
10218
+ import { useEffect as useEffect21, useRef as useRef38 } from "react";
10213
10219
  import { ExternalLinkIcon } from "@elementor/icons";
10214
10220
  import { bindPopover as bindPopover8, Popover as Popover9, Stack as Stack23, TextField as TextField12, ToggleButton as ToggleButton3, Tooltip as Tooltip13 } from "@elementor/ui";
10215
10221
  import { __ as __67 } from "@wordpress/i18n";
@@ -10222,7 +10228,7 @@ var UrlPopover = ({
10222
10228
  openInNewTab,
10223
10229
  onToggleNewTab
10224
10230
  }) => {
10225
- const inputRef = useRef37(null);
10231
+ const inputRef = useRef38(null);
10226
10232
  useEffect21(() => {
10227
10233
  if (popupState.isOpen) {
10228
10234
  requestAnimationFrame(() => inputRef.current?.focus());
@@ -10280,7 +10286,7 @@ var InlineEditorToolbar = ({
10280
10286
  }) => {
10281
10287
  const [urlValue, setUrlValue] = useState27("");
10282
10288
  const [openInNewTab, setOpenInNewTab] = useState27(false);
10283
- const toolbarRef = useRef38(null);
10289
+ const toolbarRef = useRef39(null);
10284
10290
  const linkPopupState = usePopupState12({ variant: "popover" });
10285
10291
  const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
10286
10292
  const editorState = useEditorState({
@@ -10964,7 +10970,7 @@ var GridSpanControl = createControl(
10964
10970
 
10965
10971
  // src/components/promotions/display-conditions-control.tsx
10966
10972
  import * as React138 from "react";
10967
- import { useRef as useRef39 } from "react";
10973
+ import { useRef as useRef40 } from "react";
10968
10974
  import { SitemapIcon } from "@elementor/icons";
10969
10975
  import { IconButton as IconButton12, Stack as Stack27, Tooltip as Tooltip15 } from "@elementor/ui";
10970
10976
  import { __ as __72 } from "@wordpress/i18n";
@@ -11023,7 +11029,7 @@ var PromotionTrigger = forwardRef14(
11023
11029
  var ARIA_LABEL = __72("Display Conditions", "elementor");
11024
11030
  var TRACKING_DATA2 = { target_name: "display_conditions", location_l2: "general" };
11025
11031
  var DisplayConditionsControl = createControl(() => {
11026
- const triggerRef = useRef39(null);
11032
+ const triggerRef = useRef40(null);
11027
11033
  return /* @__PURE__ */ React138.createElement(
11028
11034
  Stack27,
11029
11035
  {
@@ -11055,14 +11061,14 @@ var DisplayConditionsControl = createControl(() => {
11055
11061
 
11056
11062
  // src/components/promotions/attributes-control.tsx
11057
11063
  import * as React139 from "react";
11058
- import { useRef as useRef40 } from "react";
11064
+ import { useRef as useRef41 } from "react";
11059
11065
  import { PlusIcon as PlusIcon4 } from "@elementor/icons";
11060
11066
  import { Stack as Stack28, Tooltip as Tooltip16 } from "@elementor/ui";
11061
11067
  import { __ as __73 } from "@wordpress/i18n";
11062
11068
  var ARIA_LABEL2 = __73("Attributes", "elementor");
11063
11069
  var TRACKING_DATA3 = { target_name: "attributes", location_l2: "general" };
11064
11070
  var AttributesControl = createControl(() => {
11065
- const triggerRef = useRef40(null);
11071
+ const triggerRef = useRef41(null);
11066
11072
  return /* @__PURE__ */ React139.createElement(
11067
11073
  Stack28,
11068
11074
  {