@elementor/editor-controls 1.0.0 → 1.2.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/index.d.mts +78 -41
  3. package/dist/index.d.ts +78 -41
  4. package/dist/index.js +875 -617
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +713 -467
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +11 -11
  9. package/src/components/font-family-selector.tsx +50 -174
  10. package/src/components/popover-content.tsx +3 -11
  11. package/src/components/repeater.tsx +27 -11
  12. package/src/components/text-field-popover.tsx +3 -3
  13. package/src/controls/aspect-ratio-control.tsx +20 -2
  14. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx +2 -2
  15. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx +2 -2
  16. package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +9 -4
  17. package/src/controls/box-shadow-repeater-control.tsx +2 -2
  18. package/src/controls/equal-unequal-sizes-control.tsx +3 -9
  19. package/src/controls/filter-repeater-control.tsx +186 -0
  20. package/src/controls/font-family-control/font-family-control.tsx +6 -2
  21. package/src/controls/gap-control.tsx +3 -3
  22. package/src/controls/image-control.tsx +22 -35
  23. package/src/controls/key-value-control.tsx +119 -0
  24. package/src/controls/link-control.tsx +3 -1
  25. package/src/controls/linked-dimensions-control.tsx +3 -3
  26. package/src/controls/number-control.tsx +3 -3
  27. package/src/controls/position-control.tsx +109 -0
  28. package/src/controls/repeatable-control.tsx +119 -0
  29. package/src/controls/size-control.tsx +11 -9
  30. package/src/controls/stroke-control.tsx +2 -2
  31. package/src/controls/svg-media-control.tsx +0 -2
  32. package/src/hooks/use-repeatable-control-context.ts +24 -0
  33. package/src/index.ts +6 -1
package/dist/index.mjs CHANGED
@@ -1,8 +1,7 @@
1
1
  // src/controls/image-control.tsx
2
- import * as React10 from "react";
2
+ import * as React9 from "react";
3
3
  import { imagePropTypeUtil } from "@elementor/editor-props";
4
- import { Grid, Stack as Stack2 } from "@elementor/ui";
5
- import { __ as __2 } from "@wordpress/i18n";
4
+ import { Stack as Stack2 } from "@elementor/ui";
6
5
 
7
6
  // src/bound-prop-context/prop-context.tsx
8
7
  import * as React from "react";
@@ -184,23 +183,16 @@ var resolveUnionPropType = (propType, key) => {
184
183
  return resolvedPropType;
185
184
  };
186
185
 
187
- // src/components/control-form-label.tsx
188
- import * as React3 from "react";
189
- import { FormLabel } from "@elementor/ui";
190
- var ControlFormLabel = (props) => {
191
- return /* @__PURE__ */ React3.createElement(FormLabel, { size: "tiny", ...props });
192
- };
193
-
194
186
  // src/create-control.tsx
195
- import * as React5 from "react";
187
+ import * as React4 from "react";
196
188
  import { ErrorBoundary } from "@elementor/ui";
197
189
 
198
190
  // src/control-replacements.tsx
199
- import * as React4 from "react";
191
+ import * as React3 from "react";
200
192
  import { createContext as createContext3, useContext as useContext3 } from "react";
201
193
  var ControlReplacementContext = createContext3([]);
202
194
  var ControlReplacementsProvider = ({ replacements, children }) => {
203
- return /* @__PURE__ */ React4.createElement(ControlReplacementContext.Provider, { value: replacements }, children);
195
+ return /* @__PURE__ */ React3.createElement(ControlReplacementContext.Provider, { value: replacements }, children);
204
196
  };
205
197
  var useControlReplacement = (OriginalComponent) => {
206
198
  const { value } = useBoundProp();
@@ -228,7 +220,7 @@ var brandSymbol = Symbol("control");
228
220
  function createControl(Control5) {
229
221
  return (props) => {
230
222
  const Component = useControlReplacement(Control5);
231
- return /* @__PURE__ */ React5.createElement(ErrorBoundary, { fallback: null }, /* @__PURE__ */ React5.createElement(Component, { ...props }));
223
+ return /* @__PURE__ */ React4.createElement(ErrorBoundary, { fallback: null }, /* @__PURE__ */ React4.createElement(Component, { ...props }));
232
224
  };
233
225
  }
234
226
 
@@ -272,7 +264,7 @@ var formatResponse = (response) => {
272
264
  };
273
265
 
274
266
  // src/controls/image-media-control.tsx
275
- import * as React8 from "react";
267
+ import * as React7 from "react";
276
268
  import { imageSrcPropTypeUtil } from "@elementor/editor-props";
277
269
  import { UploadIcon } from "@elementor/icons";
278
270
  import { Button, Card, CardMedia, CardOverlay, CircularProgress, Stack } from "@elementor/ui";
@@ -280,14 +272,14 @@ import { useWpMediaAttachment, useWpMediaFrame } from "@elementor/wp-media";
280
272
  import { __ } from "@wordpress/i18n";
281
273
 
282
274
  // src/control-actions/control-actions.tsx
283
- import * as React7 from "react";
275
+ import * as React6 from "react";
284
276
  import { styled, UnstableFloatingActionBar } from "@elementor/ui";
285
277
 
286
278
  // src/control-actions/control-actions-context.tsx
287
- import * as React6 from "react";
279
+ import * as React5 from "react";
288
280
  import { createContext as createContext4, useContext as useContext4 } from "react";
289
281
  var Context = createContext4(null);
290
- var ControlActionsProvider = ({ children, items }) => /* @__PURE__ */ React6.createElement(Context.Provider, { value: { items } }, children);
282
+ var ControlActionsProvider = ({ children, items }) => /* @__PURE__ */ React5.createElement(Context.Provider, { value: { items } }, children);
291
283
  var useControlActions = () => {
292
284
  const context = useContext4(Context);
293
285
  if (!context) {
@@ -314,8 +306,8 @@ function ControlActions({ children }) {
314
306
  if (items.length === 0 || disabled) {
315
307
  return children;
316
308
  }
317
- const menuItems = items.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React7.createElement(MenuItem2, { key: id }));
318
- return /* @__PURE__ */ React7.createElement(FloatingBarContainer, null, /* @__PURE__ */ React7.createElement(UnstableFloatingActionBar, { actions: menuItems }, children));
309
+ const menuItems = items.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React6.createElement(MenuItem2, { key: id }));
310
+ return /* @__PURE__ */ React6.createElement(FloatingBarContainer, null, /* @__PURE__ */ React6.createElement(UnstableFloatingActionBar, { actions: menuItems }, children));
319
311
  }
320
312
 
321
313
  // src/controls/image-media-control.tsx
@@ -338,7 +330,7 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
338
330
  });
339
331
  }
340
332
  });
341
- return /* @__PURE__ */ React8.createElement(ControlActions, null, /* @__PURE__ */ React8.createElement(Card, { variant: "outlined" }, /* @__PURE__ */ React8.createElement(CardMedia, { image: src, sx: { height: 150 } }, isFetching ? /* @__PURE__ */ React8.createElement(Stack, { justifyContent: "center", alignItems: "center", width: "100%", height: "100%" }, /* @__PURE__ */ React8.createElement(CircularProgress, null)) : /* @__PURE__ */ React8.createElement(React8.Fragment, null)), /* @__PURE__ */ React8.createElement(CardOverlay, null, /* @__PURE__ */ React8.createElement(Stack, { gap: 1 }, /* @__PURE__ */ React8.createElement(
333
+ return /* @__PURE__ */ React7.createElement(ControlActions, null, /* @__PURE__ */ React7.createElement(Card, { variant: "outlined" }, /* @__PURE__ */ React7.createElement(CardMedia, { image: src, sx: { height: 150 } }, isFetching ? /* @__PURE__ */ React7.createElement(Stack, { justifyContent: "center", alignItems: "center", width: "100%", height: "100%" }, /* @__PURE__ */ React7.createElement(CircularProgress, null)) : /* @__PURE__ */ React7.createElement(React7.Fragment, null)), /* @__PURE__ */ React7.createElement(CardOverlay, null, /* @__PURE__ */ React7.createElement(Stack, { gap: 1 }, /* @__PURE__ */ React7.createElement(
342
334
  Button,
343
335
  {
344
336
  size: "tiny",
@@ -347,13 +339,13 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
347
339
  onClick: () => open({ mode: "browse" })
348
340
  },
349
341
  __("Select image", "elementor")
350
- ), /* @__PURE__ */ React8.createElement(
342
+ ), /* @__PURE__ */ React7.createElement(
351
343
  Button,
352
344
  {
353
345
  size: "tiny",
354
346
  variant: "text",
355
347
  color: "inherit",
356
- startIcon: /* @__PURE__ */ React8.createElement(UploadIcon, null),
348
+ startIcon: /* @__PURE__ */ React7.createElement(UploadIcon, null),
357
349
  onClick: () => open({ mode: "upload" })
358
350
  },
359
351
  __("Upload", "elementor")
@@ -361,7 +353,7 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
361
353
  });
362
354
 
363
355
  // src/controls/select-control.tsx
364
- import * as React9 from "react";
356
+ import * as React8 from "react";
365
357
  import { stringPropTypeUtil } from "@elementor/editor-props";
366
358
  import { MenuListItem } from "@elementor/editor-ui";
367
359
  import { Select } from "@elementor/ui";
@@ -372,7 +364,7 @@ var SelectControl = createControl(({ options, onChange }) => {
372
364
  onChange?.(newValue, value);
373
365
  setValue(newValue);
374
366
  };
375
- return /* @__PURE__ */ React9.createElement(ControlActions, null, /* @__PURE__ */ React9.createElement(
367
+ return /* @__PURE__ */ React8.createElement(ControlActions, null, /* @__PURE__ */ React8.createElement(
376
368
  Select,
377
369
  {
378
370
  sx: { overflow: "hidden" },
@@ -383,28 +375,26 @@ var SelectControl = createControl(({ options, onChange }) => {
383
375
  disabled,
384
376
  fullWidth: true
385
377
  },
386
- options.map(({ label, ...props }) => /* @__PURE__ */ React9.createElement(MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, label))
378
+ options.map(({ label, ...props }) => /* @__PURE__ */ React8.createElement(MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, label))
387
379
  ));
388
380
  });
389
381
 
390
382
  // src/controls/image-control.tsx
391
- var ImageControl = createControl(
392
- ({ sizes, resolutionLabel = __2("Image resolution", "elementor"), showMode = "all" }) => {
393
- const propContext = useBoundProp(imagePropTypeUtil);
394
- const { data: allowSvgUpload } = useUnfilteredFilesUpload();
395
- const mediaTypes = allowSvgUpload ? ["image", "svg"] : ["image"];
396
- return /* @__PURE__ */ React10.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React10.createElement(Stack2, { gap: 1.5 }, ["all", "media"].includes(showMode) ? /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React10.createElement(ControlFormLabel, null, __2("Image", "elementor")), /* @__PURE__ */ React10.createElement(ImageMediaControl, { mediaTypes })) : null, ["all", "sizes"].includes(showMode) ? /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React10.createElement(Grid, { container: true, gap: 1.5, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React10.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React10.createElement(ControlFormLabel, null, resolutionLabel)), /* @__PURE__ */ React10.createElement(Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React10.createElement(SelectControl, { options: sizes })))) : null));
397
- }
398
- );
383
+ var ImageControl = createControl(({ sizes, showMode = "all" }) => {
384
+ const propContext = useBoundProp(imagePropTypeUtil);
385
+ const { data: allowSvgUpload } = useUnfilteredFilesUpload();
386
+ const mediaTypes = allowSvgUpload ? ["image", "svg"] : ["image"];
387
+ return /* @__PURE__ */ React9.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React9.createElement(Stack2, { gap: 1.5 }, ["all", "media"].includes(showMode) ? /* @__PURE__ */ React9.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React9.createElement(ImageMediaControl, { mediaTypes })) : null, ["all", "sizes"].includes(showMode) ? /* @__PURE__ */ React9.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React9.createElement(SelectControl, { options: sizes })) : null));
388
+ });
399
389
 
400
390
  // src/controls/text-control.tsx
401
- import * as React11 from "react";
391
+ import * as React10 from "react";
402
392
  import { stringPropTypeUtil as stringPropTypeUtil2 } from "@elementor/editor-props";
403
393
  import { TextField } from "@elementor/ui";
404
394
  var TextControl = createControl(({ placeholder }) => {
405
395
  const { value, setValue, disabled } = useBoundProp(stringPropTypeUtil2);
406
396
  const handleChange = (event) => setValue(event.target.value);
407
- return /* @__PURE__ */ React11.createElement(ControlActions, null, /* @__PURE__ */ React11.createElement(
397
+ return /* @__PURE__ */ React10.createElement(ControlActions, null, /* @__PURE__ */ React10.createElement(
408
398
  TextField,
409
399
  {
410
400
  size: "tiny",
@@ -418,7 +408,7 @@ var TextControl = createControl(({ placeholder }) => {
418
408
  });
419
409
 
420
410
  // src/controls/text-area-control.tsx
421
- import * as React12 from "react";
411
+ import * as React11 from "react";
422
412
  import { stringPropTypeUtil as stringPropTypeUtil3 } from "@elementor/editor-props";
423
413
  import { TextField as TextField2 } from "@elementor/ui";
424
414
  var TextAreaControl = createControl(({ placeholder }) => {
@@ -426,7 +416,7 @@ var TextAreaControl = createControl(({ placeholder }) => {
426
416
  const handleChange = (event) => {
427
417
  setValue(event.target.value);
428
418
  };
429
- return /* @__PURE__ */ React12.createElement(ControlActions, null, /* @__PURE__ */ React12.createElement(
419
+ return /* @__PURE__ */ React11.createElement(ControlActions, null, /* @__PURE__ */ React11.createElement(
430
420
  TextField2,
431
421
  {
432
422
  size: "tiny",
@@ -442,14 +432,14 @@ var TextAreaControl = createControl(({ placeholder }) => {
442
432
  });
443
433
 
444
434
  // src/controls/size-control.tsx
445
- import * as React16 from "react";
435
+ import * as React15 from "react";
446
436
  import { useEffect as useEffect2, useState as useState3 } from "react";
447
437
  import { sizePropTypeUtil } from "@elementor/editor-props";
448
438
  import { useActiveBreakpoint } from "@elementor/editor-responsive";
449
439
  import { usePopupState as usePopupState2 } from "@elementor/ui";
450
440
 
451
441
  // src/components/size-control/size-input.tsx
452
- import * as React14 from "react";
442
+ import * as React13 from "react";
453
443
  import { useRef } from "react";
454
444
  import { PencilIcon } from "@elementor/icons";
455
445
  import { Box, InputAdornment as InputAdornment2 } from "@elementor/ui";
@@ -462,7 +452,7 @@ function isUnitExtendedOption(unit) {
462
452
  }
463
453
 
464
454
  // src/components/size-control/text-field-inner-selection.tsx
465
- import * as React13 from "react";
455
+ import * as React12 from "react";
466
456
  import { forwardRef, useId } from "react";
467
457
  import { MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
468
458
  import {
@@ -487,7 +477,7 @@ var TextFieldInnerSelection = forwardRef(
487
477
  inputProps,
488
478
  disabled
489
479
  }, ref) => {
490
- return /* @__PURE__ */ React13.createElement(
480
+ return /* @__PURE__ */ React12.createElement(
491
481
  TextField3,
492
482
  {
493
483
  ref,
@@ -523,7 +513,7 @@ var SelectionEndAdornment = ({
523
513
  onClick(options[index]);
524
514
  popupState.close();
525
515
  };
526
- return /* @__PURE__ */ React13.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React13.createElement(
516
+ return /* @__PURE__ */ React12.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React12.createElement(
527
517
  Button2,
528
518
  {
529
519
  size: "small",
@@ -533,7 +523,7 @@ var SelectionEndAdornment = ({
533
523
  ...bindTrigger(popupState)
534
524
  },
535
525
  alternativeOptionLabels[value] ?? value
536
- ), /* @__PURE__ */ React13.createElement(Menu, { MenuListProps: { dense: true }, ...bindMenu(popupState) }, options.map((option, index) => /* @__PURE__ */ React13.createElement(
526
+ ), /* @__PURE__ */ React12.createElement(Menu, { MenuListProps: { dense: true }, ...bindMenu(popupState) }, options.map((option, index) => /* @__PURE__ */ React12.createElement(
537
527
  MenuListItem2,
538
528
  {
539
529
  key: option,
@@ -586,8 +576,8 @@ var SizeInput = ({
586
576
  autoComplete: "off",
587
577
  onClick,
588
578
  onFocus,
589
- startAdornment: startIcon ? /* @__PURE__ */ React14.createElement(InputAdornment2, { position: "start", disabled }, startIcon) : void 0,
590
- endAdornment: /* @__PURE__ */ React14.createElement(
579
+ startAdornment: startIcon ? /* @__PURE__ */ React13.createElement(InputAdornment2, { position: "start", disabled }, startIcon) : void 0,
580
+ endAdornment: /* @__PURE__ */ React13.createElement(
591
581
  SelectionEndAdornment,
592
582
  {
593
583
  disabled,
@@ -595,7 +585,7 @@ var SizeInput = ({
595
585
  onClick: handleUnitChange,
596
586
  value: unit,
597
587
  alternativeOptionLabels: {
598
- custom: /* @__PURE__ */ React14.createElement(PencilIcon, { fontSize: "small" })
588
+ custom: /* @__PURE__ */ React13.createElement(PencilIcon, { fontSize: "small" })
599
589
  },
600
590
  menuItemsAttributes: units2.includes("custom") ? {
601
591
  custom: popupAttributes
@@ -603,7 +593,7 @@ var SizeInput = ({
603
593
  }
604
594
  )
605
595
  };
606
- return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(Box, null, /* @__PURE__ */ React14.createElement(
596
+ return /* @__PURE__ */ React13.createElement(ControlActions, null, /* @__PURE__ */ React13.createElement(Box, null, /* @__PURE__ */ React13.createElement(
607
597
  TextFieldInnerSelection,
608
598
  {
609
599
  disabled,
@@ -625,11 +615,11 @@ var SizeInput = ({
625
615
  };
626
616
 
627
617
  // src/components/text-field-popover.tsx
628
- import * as React15 from "react";
618
+ import * as React14 from "react";
629
619
  import { bindPopover, Paper, Popover, TextField as TextField4 } from "@elementor/ui";
630
620
  var TextFieldPopover = (props) => {
631
621
  const { popupState, restoreValue, anchorRef, value, onChange } = props;
632
- return /* @__PURE__ */ React15.createElement(
622
+ return /* @__PURE__ */ React14.createElement(
633
623
  Popover,
634
624
  {
635
625
  disablePortal: true,
@@ -641,16 +631,16 @@ var TextFieldPopover = (props) => {
641
631
  popupState.close();
642
632
  }
643
633
  },
644
- /* @__PURE__ */ React15.createElement(
634
+ /* @__PURE__ */ React14.createElement(
645
635
  Paper,
646
636
  {
647
637
  sx: {
648
- width: anchorRef.current.offsetWidth + "px",
638
+ width: anchorRef.current?.offsetWidth + "px",
649
639
  borderRadius: 2,
650
640
  p: 1.5
651
641
  }
652
642
  },
653
- /* @__PURE__ */ React15.createElement(
643
+ /* @__PURE__ */ React14.createElement(
654
644
  TextField4,
655
645
  {
656
646
  value,
@@ -722,9 +712,10 @@ var useSyncExternalState = ({
722
712
  var DEFAULT_UNIT = "px";
723
713
  var DEFAULT_SIZE = NaN;
724
714
  var SizeControl = createControl((props) => {
715
+ const defaultUnit = props.defaultUnit ?? DEFAULT_UNIT;
725
716
  const { units: units2 = [...defaultUnits], placeholder, startIcon, anchorRef } = props;
726
717
  const { value: sizeValue, setValue: setSizeValue, disabled, restoreValue } = useBoundProp(sizePropTypeUtil);
727
- const [internalState, setInternalState] = useState3(createStateFromSizeProp(sizeValue));
718
+ const [internalState, setInternalState] = useState3(createStateFromSizeProp(sizeValue, defaultUnit));
728
719
  const activeBreakpoint = useActiveBreakpoint();
729
720
  const extendedOptions = useSizeExtendedOptions(props.extendedOptions || [], props.disableCustom ?? false);
730
721
  const popupState = usePopupState2({ variant: "popover" });
@@ -741,7 +732,7 @@ var SizeControl = createControl((props) => {
741
732
  return !!newState?.numeric || newState?.numeric === 0;
742
733
  },
743
734
  fallback: (newState) => ({
744
- unit: newState?.unit ?? DEFAULT_UNIT,
735
+ unit: newState?.unit ?? props.defaultUnit ?? DEFAULT_UNIT,
745
736
  numeric: newState?.numeric ?? DEFAULT_SIZE,
746
737
  custom: newState?.custom ?? ""
747
738
  })
@@ -776,7 +767,7 @@ var SizeControl = createControl((props) => {
776
767
  }
777
768
  };
778
769
  useEffect2(() => {
779
- const newState = createStateFromSizeProp(sizeValue);
770
+ const newState = createStateFromSizeProp(sizeValue, defaultUnit);
780
771
  const currentUnit = isUnitExtendedOption(state.unit) ? "custom" : "numeric";
781
772
  const mergedStates = { ...state, [currentUnit]: newState[currentUnit] };
782
773
  if (mergedStates.unit !== "auto" && areStatesEqual(state, mergedStates)) {
@@ -789,12 +780,12 @@ var SizeControl = createControl((props) => {
789
780
  setState(newState);
790
781
  }, [sizeValue]);
791
782
  useEffect2(() => {
792
- const newState = createStateFromSizeProp(sizeValue);
783
+ const newState = createStateFromSizeProp(sizeValue, defaultUnit);
793
784
  if (activeBreakpoint && !areStatesEqual(newState, state)) {
794
785
  setState(newState);
795
786
  }
796
787
  }, [activeBreakpoint]);
797
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
788
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
798
789
  SizeInput,
799
790
  {
800
791
  disabled,
@@ -810,7 +801,7 @@ var SizeControl = createControl((props) => {
810
801
  onClick: onInputClick,
811
802
  popupState
812
803
  }
813
- ), anchorRef?.current && /* @__PURE__ */ React16.createElement(
804
+ ), anchorRef?.current && /* @__PURE__ */ React15.createElement(
814
805
  TextFieldPopover,
815
806
  {
816
807
  popupState,
@@ -827,8 +818,8 @@ function formatSize(size, unit) {
827
818
  }
828
819
  return size || size === 0 ? Number(size) : NaN;
829
820
  }
830
- function createStateFromSizeProp(sizeValue) {
831
- const unit = sizeValue?.unit ?? DEFAULT_UNIT;
821
+ function createStateFromSizeProp(sizeValue, defaultUnit) {
822
+ const unit = sizeValue?.unit ?? defaultUnit;
832
823
  const size = sizeValue?.size ?? "";
833
824
  return {
834
825
  numeric: !isUnitExtendedOption(unit) && !isNaN(Number(size)) && (size || size === 0) ? Number(size) : DEFAULT_SIZE,
@@ -866,8 +857,15 @@ function areStatesEqual(state1, state2) {
866
857
  import * as React19 from "react";
867
858
  import { forwardRef as forwardRef2, useRef as useRef2 } from "react";
868
859
  import { strokePropTypeUtil } from "@elementor/editor-props";
869
- import { Grid as Grid2 } from "@elementor/ui";
870
- import { __ as __3 } from "@wordpress/i18n";
860
+ import { Grid } from "@elementor/ui";
861
+ import { __ as __2 } from "@wordpress/i18n";
862
+
863
+ // src/components/control-form-label.tsx
864
+ import * as React16 from "react";
865
+ import { FormLabel } from "@elementor/ui";
866
+ var ControlFormLabel = (props) => {
867
+ return /* @__PURE__ */ React16.createElement(FormLabel, { size: "tiny", ...props });
868
+ };
871
869
 
872
870
  // src/components/section-content.tsx
873
871
  import * as React17 from "react";
@@ -916,29 +914,29 @@ var ColorControl = createControl(
916
914
  var units = ["px", "em", "rem"];
917
915
  var StrokeControl = createControl(() => {
918
916
  const propContext = useBoundProp(strokePropTypeUtil);
919
- const rowRef = useRef2();
920
- return /* @__PURE__ */ React19.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React19.createElement(SectionContent, null, /* @__PURE__ */ React19.createElement(Control, { bind: "width", label: __3("Stroke width", "elementor"), ref: rowRef }, /* @__PURE__ */ React19.createElement(SizeControl, { units, anchorRef: rowRef })), /* @__PURE__ */ React19.createElement(Control, { bind: "color", label: __3("Stroke color", "elementor") }, /* @__PURE__ */ React19.createElement(ColorControl, null))));
917
+ const rowRef = useRef2(null);
918
+ return /* @__PURE__ */ React19.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React19.createElement(SectionContent, null, /* @__PURE__ */ React19.createElement(Control, { bind: "width", label: __2("Stroke width", "elementor"), ref: rowRef }, /* @__PURE__ */ React19.createElement(SizeControl, { units, anchorRef: rowRef })), /* @__PURE__ */ React19.createElement(Control, { bind: "color", label: __2("Stroke color", "elementor") }, /* @__PURE__ */ React19.createElement(ColorControl, null))));
921
919
  });
922
- var Control = forwardRef2(({ bind, label, children }, ref) => /* @__PURE__ */ React19.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React19.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React19.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React19.createElement(Grid2, { item: true, xs: 6 }, children))));
920
+ var Control = forwardRef2(({ bind, label, children }, ref) => /* @__PURE__ */ React19.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React19.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React19.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React19.createElement(Grid, { item: true, xs: 6 }, children))));
923
921
 
924
922
  // src/controls/box-shadow-repeater-control.tsx
925
923
  import * as React26 from "react";
926
924
  import { useRef as useRef3 } from "react";
927
925
  import { boxShadowPropTypeUtil, shadowPropTypeUtil } from "@elementor/editor-props";
928
- import { FormLabel as FormLabel2, Grid as Grid4, UnstableColorIndicator } from "@elementor/ui";
929
- import { __ as __5 } from "@wordpress/i18n";
926
+ import { FormLabel as FormLabel2, Grid as Grid3, UnstableColorIndicator } from "@elementor/ui";
927
+ import { __ as __4 } from "@wordpress/i18n";
930
928
 
931
929
  // src/components/popover-content.tsx
932
930
  import * as React20 from "react";
933
931
  import { Stack as Stack4 } from "@elementor/ui";
934
- var PopoverContent = ({ alignItems, gap = 1.5, p, pt, pb, children }) => /* @__PURE__ */ React20.createElement(Stack4, { alignItems, gap, p, pt, pb }, children);
932
+ var PopoverContent = ({ gap = 1.5, children, ...props }) => /* @__PURE__ */ React20.createElement(Stack4, { ...props, gap }, children);
935
933
 
936
934
  // src/components/popover-grid-container.tsx
937
935
  import { forwardRef as forwardRef3 } from "react";
938
936
  import * as React21 from "react";
939
- import { Grid as Grid3 } from "@elementor/ui";
937
+ import { Grid as Grid2 } from "@elementor/ui";
940
938
  var PopoverGridContainer = forwardRef3(
941
- ({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */ React21.createElement(Grid3, { container: true, gap, alignItems, flexWrap, ref }, children)
939
+ ({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */ React21.createElement(Grid2, { container: true, gap, alignItems, flexWrap, ref }, children)
942
940
  );
943
941
 
944
942
  // src/components/repeater.tsx
@@ -957,7 +955,7 @@ import {
957
955
  UnstableTag,
958
956
  usePopupState as usePopupState3
959
957
  } from "@elementor/ui";
960
- import { __ as __4 } from "@wordpress/i18n";
958
+ import { __ as __3 } from "@wordpress/i18n";
961
959
 
962
960
  // src/control-adornments/control-adornments.tsx
963
961
  import * as React23 from "react";
@@ -1076,7 +1074,10 @@ var Repeater = ({
1076
1074
  openOnAdd = false,
1077
1075
  addToBottom = false,
1078
1076
  values: repeaterValues = [],
1079
- setValues: setRepeaterValues
1077
+ setValues: setRepeaterValues,
1078
+ showDuplicate = true,
1079
+ showToggle = true,
1080
+ isSortable = true
1080
1081
  }) => {
1081
1082
  const [openItem, setOpenItem] = useState4(EMPTY_OPEN_ITEM);
1082
1083
  const [items, setItems] = useSyncExternalState({
@@ -1160,7 +1161,7 @@ var Repeater = ({
1160
1161
  sx: { ml: "auto" },
1161
1162
  disabled,
1162
1163
  onClick: addRepeaterItem,
1163
- "aria-label": __4("Add item", "elementor")
1164
+ "aria-label": __3("Add item", "elementor")
1164
1165
  },
1165
1166
  /* @__PURE__ */ React25.createElement(PlusIcon, { fontSize: SIZE })
1166
1167
  )
@@ -1169,7 +1170,7 @@ var Repeater = ({
1169
1170
  if (!value) {
1170
1171
  return null;
1171
1172
  }
1172
- return /* @__PURE__ */ React25.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled }, /* @__PURE__ */ React25.createElement(
1173
+ return /* @__PURE__ */ React25.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React25.createElement(
1173
1174
  RepeaterItem,
1174
1175
  {
1175
1176
  disabled,
@@ -1180,7 +1181,9 @@ var Repeater = ({
1180
1181
  duplicateItem: () => duplicateRepeaterItem(index),
1181
1182
  toggleDisableItem: () => toggleDisableRepeaterItem(index),
1182
1183
  openOnMount: openOnAdd && openItem === key,
1183
- onOpen: () => setOpenItem(EMPTY_OPEN_ITEM)
1184
+ onOpen: () => setOpenItem(EMPTY_OPEN_ITEM),
1185
+ showDuplicate,
1186
+ showToggle
1184
1187
  },
1185
1188
  (props) => /* @__PURE__ */ React25.createElement(itemSettings.Content, { ...props, value, bind: String(index) })
1186
1189
  ));
@@ -1196,13 +1199,15 @@ var RepeaterItem = ({
1196
1199
  toggleDisableItem,
1197
1200
  openOnMount,
1198
1201
  onOpen,
1202
+ showDuplicate,
1203
+ showToggle,
1199
1204
  disabled
1200
1205
  }) => {
1201
1206
  const [anchorEl, setAnchorEl] = useState4(null);
1202
1207
  const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount, onOpen);
1203
- const duplicateLabel = __4("Duplicate", "elementor");
1204
- const toggleLabel = propDisabled ? __4("Show", "elementor") : __4("Hide", "elementor");
1205
- const removeLabel = __4("Remove", "elementor");
1208
+ const duplicateLabel = __3("Duplicate", "elementor");
1209
+ const toggleLabel = propDisabled ? __3("Show", "elementor") : __3("Hide", "elementor");
1210
+ const removeLabel = __3("Remove", "elementor");
1206
1211
  return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
1207
1212
  UnstableTag,
1208
1213
  {
@@ -1212,10 +1217,10 @@ var RepeaterItem = ({
1212
1217
  fullWidth: true,
1213
1218
  ref: setRef,
1214
1219
  variant: "outlined",
1215
- "aria-label": __4("Open item", "elementor"),
1220
+ "aria-label": __3("Open item", "elementor"),
1216
1221
  ...bindTrigger2(popoverState),
1217
1222
  startIcon,
1218
- actions: /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(IconButton, { size: SIZE, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React25.createElement(CopyIcon, { fontSize: SIZE }))), /* @__PURE__ */ React25.createElement(Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(IconButton, { size: SIZE, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React25.createElement(EyeOffIcon, { fontSize: SIZE }) : /* @__PURE__ */ React25.createElement(EyeIcon, { fontSize: SIZE }))), /* @__PURE__ */ React25.createElement(Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(IconButton, { size: SIZE, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React25.createElement(XIcon, { fontSize: SIZE }))))
1223
+ actions: /* @__PURE__ */ React25.createElement(React25.Fragment, null, showDuplicate && /* @__PURE__ */ React25.createElement(Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(IconButton, { size: SIZE, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React25.createElement(CopyIcon, { fontSize: SIZE }))), showToggle && /* @__PURE__ */ React25.createElement(Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(IconButton, { size: SIZE, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React25.createElement(EyeOffIcon, { fontSize: SIZE }) : /* @__PURE__ */ React25.createElement(EyeIcon, { fontSize: SIZE }))), /* @__PURE__ */ React25.createElement(Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(IconButton, { size: SIZE, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React25.createElement(XIcon, { fontSize: SIZE }))))
1219
1224
  }
1220
1225
  ), /* @__PURE__ */ React25.createElement(
1221
1226
  Popover2,
@@ -1262,7 +1267,7 @@ var BoxShadowRepeaterControl = createControl(() => {
1262
1267
  disabled,
1263
1268
  values: value ?? [],
1264
1269
  setValues: setValue,
1265
- label: __5("Box shadow", "elementor"),
1270
+ label: __4("Box shadow", "elementor"),
1266
1271
  itemSettings: {
1267
1272
  Icon: ItemIcon,
1268
1273
  Label: ItemLabel,
@@ -1278,23 +1283,23 @@ var ItemContent = ({ anchorEl, bind }) => {
1278
1283
  };
1279
1284
  var Content = ({ anchorEl }) => {
1280
1285
  const context = useBoundProp(shadowPropTypeUtil);
1281
- const rowRef = [useRef3(), useRef3()];
1282
- return /* @__PURE__ */ React26.createElement(PropProvider, { ...context }, /* @__PURE__ */ React26.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React26.createElement(PopoverGridContainer, null, /* @__PURE__ */ React26.createElement(Control2, { bind: "color", label: __5("Color", "elementor") }, /* @__PURE__ */ React26.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React26.createElement(Control2, { bind: "position", label: __5("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React26.createElement(
1286
+ const rowRef = [useRef3(null), useRef3(null)];
1287
+ return /* @__PURE__ */ React26.createElement(PropProvider, { ...context }, /* @__PURE__ */ React26.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React26.createElement(PopoverGridContainer, null, /* @__PURE__ */ React26.createElement(Control2, { bind: "color", label: __4("Color", "elementor") }, /* @__PURE__ */ React26.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React26.createElement(Control2, { bind: "position", label: __4("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React26.createElement(
1283
1288
  SelectControl,
1284
1289
  {
1285
1290
  options: [
1286
- { label: __5("Inset", "elementor"), value: "inset" },
1287
- { label: __5("Outset", "elementor"), value: null }
1291
+ { label: __4("Inset", "elementor"), value: "inset" },
1292
+ { label: __4("Outset", "elementor"), value: null }
1288
1293
  ]
1289
1294
  }
1290
- ))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "hOffset", label: __5("Horizontal", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[0] })), /* @__PURE__ */ React26.createElement(Control2, { bind: "vOffset", label: __5("Vertical", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[0] }))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[1] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "blur", label: __5("Blur", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[1] })), /* @__PURE__ */ React26.createElement(Control2, { bind: "spread", label: __5("Spread", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[1] })))));
1295
+ ))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "hOffset", label: __4("Horizontal", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[0] })), /* @__PURE__ */ React26.createElement(Control2, { bind: "vOffset", label: __4("Vertical", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[0] }))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[1] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "blur", label: __4("Blur", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[1] })), /* @__PURE__ */ React26.createElement(Control2, { bind: "spread", label: __4("Spread", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[1] })))));
1291
1296
  };
1292
1297
  var Control2 = ({
1293
1298
  label,
1294
1299
  bind,
1295
1300
  children,
1296
1301
  sx
1297
- }) => /* @__PURE__ */ React26.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React26.createElement(Grid4, { item: true, xs: 6, sx }, /* @__PURE__ */ React26.createElement(Grid4, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React26.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(FormLabel2, { size: "tiny" }, label)), /* @__PURE__ */ React26.createElement(Grid4, { item: true, xs: 12 }, children))));
1302
+ }) => /* @__PURE__ */ React26.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React26.createElement(Grid3, { item: true, xs: 6, sx }, /* @__PURE__ */ React26.createElement(Grid3, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React26.createElement(Grid3, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(FormLabel2, { size: "tiny" }, label)), /* @__PURE__ */ React26.createElement(Grid3, { item: true, xs: 12 }, children))));
1298
1303
  var ItemLabel = ({ value }) => {
1299
1304
  const { position, hOffset, vOffset, blur, spread } = value.value;
1300
1305
  const { size: blurSize = "", unit: blurUnit = "" } = blur?.value || {};
@@ -1337,13 +1342,126 @@ var initialShadow = {
1337
1342
  }
1338
1343
  };
1339
1344
 
1345
+ // src/controls/filter-repeater-control.tsx
1346
+ import * as React28 from "react";
1347
+ import { useRef as useRef4 } from "react";
1348
+ import {
1349
+ blurFilterPropTypeUtil,
1350
+ brightnessFilterPropTypeUtil,
1351
+ filterPropTypeUtil
1352
+ } from "@elementor/editor-props";
1353
+ import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
1354
+ import { Box as Box3, Grid as Grid4, Select as Select2 } from "@elementor/ui";
1355
+ import { __ as __5 } from "@wordpress/i18n";
1356
+
1357
+ // src/components/control-label.tsx
1358
+ import * as React27 from "react";
1359
+ import { Stack as Stack6 } from "@elementor/ui";
1360
+ var ControlLabel = ({ children }) => {
1361
+ return /* @__PURE__ */ React27.createElement(Stack6, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React27.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React27.createElement(ControlAdornments, null));
1362
+ };
1363
+
1364
+ // src/controls/filter-repeater-control.tsx
1365
+ var DEFAULT_FILTER_KEY = "blur";
1366
+ var filterConfig = {
1367
+ blur: {
1368
+ defaultValue: { $$type: "radius", radius: { $$type: "size", value: { size: 0, unit: "px" } } },
1369
+ name: __5("Blur", "elementor"),
1370
+ valueName: __5("Radius", "elementor"),
1371
+ propType: blurFilterPropTypeUtil,
1372
+ units: defaultUnits.filter((unit) => unit !== "%")
1373
+ },
1374
+ brightness: {
1375
+ defaultValue: { $$type: "amount", amount: { $$type: "size", value: { size: 100, unit: "%" } } },
1376
+ name: __5("Brightness", "elementor"),
1377
+ valueName: __5("Amount", "elementor"),
1378
+ propType: brightnessFilterPropTypeUtil,
1379
+ units: ["%"]
1380
+ }
1381
+ };
1382
+ var filterKeys = Object.keys(filterConfig);
1383
+ var singleSizeFilterNames = filterKeys.filter((name) => {
1384
+ const filter = filterConfig[name].defaultValue;
1385
+ return filter[filter.$$type].$$type === "size";
1386
+ });
1387
+ var FilterRepeaterControl = createControl(() => {
1388
+ const { propType, value: filterValues, setValue, disabled } = useBoundProp(filterPropTypeUtil);
1389
+ return /* @__PURE__ */ React28.createElement(PropProvider, { propType, value: filterValues, setValue }, /* @__PURE__ */ React28.createElement(
1390
+ Repeater,
1391
+ {
1392
+ openOnAdd: true,
1393
+ disabled,
1394
+ values: filterValues ?? [],
1395
+ setValues: setValue,
1396
+ label: __5("Filter", "elementor"),
1397
+ itemSettings: {
1398
+ Icon: ItemIcon2,
1399
+ Label: ItemLabel2,
1400
+ Content: ItemContent2,
1401
+ initialValues: {
1402
+ $$type: DEFAULT_FILTER_KEY,
1403
+ value: filterConfig[DEFAULT_FILTER_KEY].defaultValue
1404
+ }
1405
+ }
1406
+ }
1407
+ ));
1408
+ });
1409
+ var ItemIcon2 = () => /* @__PURE__ */ React28.createElement(React28.Fragment, null);
1410
+ var ItemLabel2 = (props) => {
1411
+ const { $$type } = props.value;
1412
+ return singleSizeFilterNames.includes($$type) && /* @__PURE__ */ React28.createElement(SingleSizeItemLabel, { value: props.value });
1413
+ };
1414
+ var SingleSizeItemLabel = ({ value }) => {
1415
+ const { $$type, value: sizeValue } = value;
1416
+ const { $$type: key } = filterConfig[$$type].defaultValue;
1417
+ const defaultUnit = filterConfig[$$type].defaultValue[key].value.unit;
1418
+ const { unit, size } = sizeValue[key]?.value ?? { unit: defaultUnit, size: 0 };
1419
+ const label = /* @__PURE__ */ React28.createElement(Box3, { component: "span", style: { textTransform: "capitalize" } }, value.$$type, ":");
1420
+ return /* @__PURE__ */ React28.createElement(Box3, { component: "span" }, label, unit !== "custom" ? ` ${size ?? 0}${unit ?? defaultUnit}` : size);
1421
+ };
1422
+ var ItemContent2 = ({ bind }) => {
1423
+ const { value: filterValues, setValue } = useBoundProp(filterPropTypeUtil);
1424
+ const itemIndex = parseInt(bind, 10);
1425
+ const item = filterValues?.[itemIndex];
1426
+ const handleChange = (e) => {
1427
+ const newFilterValues = [...filterValues];
1428
+ const filterType = e.target.value;
1429
+ newFilterValues[itemIndex] = {
1430
+ $$type: filterType,
1431
+ value: filterConfig[filterType].defaultValue
1432
+ };
1433
+ setValue(newFilterValues);
1434
+ };
1435
+ return /* @__PURE__ */ React28.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React28.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React28.createElement(PopoverGridContainer, null, /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel, null, __5("Filter", "elementor"))), /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(
1436
+ Select2,
1437
+ {
1438
+ sx: { overflow: "hidden" },
1439
+ size: "tiny",
1440
+ value: item?.$$type ?? DEFAULT_FILTER_KEY,
1441
+ onChange: handleChange,
1442
+ fullWidth: true
1443
+ },
1444
+ filterKeys.map((filterKey) => /* @__PURE__ */ React28.createElement(MenuListItem3, { key: filterKey, value: filterKey }, filterConfig[filterKey].name))
1445
+ ))), /* @__PURE__ */ React28.createElement(Content2, { filterType: item?.$$type })));
1446
+ };
1447
+ var Content2 = ({ filterType }) => {
1448
+ return singleSizeFilterNames.includes(filterType) && /* @__PURE__ */ React28.createElement(SingleSizeItemContent, { filterType });
1449
+ };
1450
+ var SingleSizeItemContent = ({ filterType }) => {
1451
+ const { propType, valueName, defaultValue, units: units2 } = filterConfig[filterType];
1452
+ const { $$type } = defaultValue;
1453
+ const context = useBoundProp(propType);
1454
+ const rowRef = useRef4(null);
1455
+ return /* @__PURE__ */ React28.createElement(PropProvider, { ...context }, /* @__PURE__ */ React28.createElement(PropKeyProvider, { bind: $$type }, /* @__PURE__ */ React28.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel, null, valueName)), /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(SizeControl, { anchorRef: rowRef, units: units2 })))));
1456
+ };
1457
+
1340
1458
  // src/controls/toggle-control.tsx
1341
- import * as React29 from "react";
1459
+ import * as React31 from "react";
1342
1460
  import { stringPropTypeUtil as stringPropTypeUtil4 } from "@elementor/editor-props";
1343
1461
 
1344
1462
  // src/components/control-toggle-button-group.tsx
1345
- import * as React28 from "react";
1346
- import { useEffect as useEffect4, useMemo as useMemo2, useRef as useRef4, useState as useState5 } from "react";
1463
+ import * as React30 from "react";
1464
+ import { useEffect as useEffect4, useMemo as useMemo2, useRef as useRef5, useState as useState5 } from "react";
1347
1465
  import { ChevronDownIcon } from "@elementor/icons";
1348
1466
  import {
1349
1467
  ListItemText,
@@ -1357,14 +1475,14 @@ import {
1357
1475
  } from "@elementor/ui";
1358
1476
 
1359
1477
  // src/components/conditional-tooltip.tsx
1360
- import * as React27 from "react";
1478
+ import * as React29 from "react";
1361
1479
  import { Tooltip as Tooltip2 } from "@elementor/ui";
1362
1480
  var ConditionalTooltip = ({
1363
1481
  showTooltip,
1364
1482
  children,
1365
1483
  label
1366
1484
  }) => {
1367
- return showTooltip && label ? /* @__PURE__ */ React27.createElement(Tooltip2, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
1485
+ return showTooltip && label ? /* @__PURE__ */ React29.createElement(Tooltip2, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
1368
1486
  };
1369
1487
 
1370
1488
  // src/components/control-toggle-button-group.tsx
@@ -1407,7 +1525,7 @@ var ControlToggleButtonGroup = ({
1407
1525
  const templateColumnsSuffix = isOffLimits ? "auto" : "";
1408
1526
  return `repeat(${itemsCount}, minmax(0, 25%)) ${templateColumnsSuffix}`;
1409
1527
  }, [menuItems?.length, fixedItems.length]);
1410
- return /* @__PURE__ */ React28.createElement(ControlActions, null, /* @__PURE__ */ React28.createElement(
1528
+ return /* @__PURE__ */ React30.createElement(ControlActions, null, /* @__PURE__ */ React30.createElement(
1411
1529
  StyledToggleButtonGroup,
1412
1530
  {
1413
1531
  justify,
@@ -1422,16 +1540,16 @@ var ControlToggleButtonGroup = ({
1422
1540
  width: `100%`
1423
1541
  }
1424
1542
  },
1425
- fixedItems.map(({ label, value: buttonValue, renderContent: Content3, showTooltip }) => /* @__PURE__ */ React28.createElement(
1543
+ fixedItems.map(({ label, value: buttonValue, renderContent: Content5, showTooltip }) => /* @__PURE__ */ React30.createElement(
1426
1544
  ConditionalTooltip,
1427
1545
  {
1428
1546
  key: buttonValue,
1429
1547
  label,
1430
1548
  showTooltip: showTooltip || false
1431
1549
  },
1432
- /* @__PURE__ */ React28.createElement(ToggleButton, { value: buttonValue, "aria-label": label, size, fullWidth }, /* @__PURE__ */ React28.createElement(Content3, { size }))
1550
+ /* @__PURE__ */ React30.createElement(ToggleButton, { value: buttonValue, "aria-label": label, size, fullWidth }, /* @__PURE__ */ React30.createElement(Content5, { size }))
1433
1551
  )),
1434
- menuItems.length && exclusive && /* @__PURE__ */ React28.createElement(
1552
+ menuItems.length && exclusive && /* @__PURE__ */ React30.createElement(
1435
1553
  SplitButtonGroup,
1436
1554
  {
1437
1555
  size,
@@ -1452,7 +1570,7 @@ var SplitButtonGroup = ({
1452
1570
  }) => {
1453
1571
  const previewButton = usePreviewButton(items, value);
1454
1572
  const [isMenuOpen, setIsMenuOpen] = useState5(false);
1455
- const menuButtonRef = useRef4(null);
1573
+ const menuButtonRef = useRef5(null);
1456
1574
  const onMenuToggle = (ev) => {
1457
1575
  setIsMenuOpen((prev) => !prev);
1458
1576
  ev.preventDefault();
@@ -1465,7 +1583,7 @@ var SplitButtonGroup = ({
1465
1583
  const shouldRemove = newValue === value;
1466
1584
  onChange(shouldRemove ? null : newValue);
1467
1585
  };
1468
- return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(
1586
+ return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(
1469
1587
  ToggleButton,
1470
1588
  {
1471
1589
  value: previewButton.value,
@@ -1479,7 +1597,7 @@ var SplitButtonGroup = ({
1479
1597
  ref: menuButtonRef
1480
1598
  },
1481
1599
  previewButton.renderContent({ size })
1482
- ), /* @__PURE__ */ React28.createElement(
1600
+ ), /* @__PURE__ */ React30.createElement(
1483
1601
  ToggleButton,
1484
1602
  {
1485
1603
  size,
@@ -1490,8 +1608,8 @@ var SplitButtonGroup = ({
1490
1608
  ref: menuButtonRef,
1491
1609
  value: "__chevron-icon-button__"
1492
1610
  },
1493
- /* @__PURE__ */ React28.createElement(ChevronDownIcon, { fontSize: size })
1494
- ), /* @__PURE__ */ React28.createElement(
1611
+ /* @__PURE__ */ React30.createElement(ChevronDownIcon, { fontSize: size })
1612
+ ), /* @__PURE__ */ React30.createElement(
1495
1613
  Menu2,
1496
1614
  {
1497
1615
  open: isMenuOpen,
@@ -1509,14 +1627,14 @@ var SplitButtonGroup = ({
1509
1627
  mt: 0.5
1510
1628
  }
1511
1629
  },
1512
- items.map(({ label, value: buttonValue }) => /* @__PURE__ */ React28.createElement(
1630
+ items.map(({ label, value: buttonValue }) => /* @__PURE__ */ React30.createElement(
1513
1631
  MenuItem,
1514
1632
  {
1515
1633
  key: buttonValue,
1516
1634
  selected: buttonValue === value,
1517
1635
  onClick: () => onMenuItemClick(buttonValue)
1518
1636
  },
1519
- /* @__PURE__ */ React28.createElement(ListItemText, null, /* @__PURE__ */ React28.createElement(Typography2, { sx: { fontSize: "14px" } }, label))
1637
+ /* @__PURE__ */ React30.createElement(ListItemText, null, /* @__PURE__ */ React30.createElement(Typography2, { sx: { fontSize: "14px" } }, label))
1520
1638
  ))
1521
1639
  ));
1522
1640
  };
@@ -1556,7 +1674,7 @@ var ToggleControl = createControl(
1556
1674
  fullWidth,
1557
1675
  size
1558
1676
  };
1559
- return exclusive ? /* @__PURE__ */ React29.createElement(
1677
+ return exclusive ? /* @__PURE__ */ React31.createElement(
1560
1678
  ControlToggleButtonGroup,
1561
1679
  {
1562
1680
  ...toggleButtonGroupProps,
@@ -1565,7 +1683,7 @@ var ToggleControl = createControl(
1565
1683
  disabled,
1566
1684
  exclusive: true
1567
1685
  }
1568
- ) : /* @__PURE__ */ React29.createElement(
1686
+ ) : /* @__PURE__ */ React31.createElement(
1569
1687
  ControlToggleButtonGroup,
1570
1688
  {
1571
1689
  ...toggleButtonGroupProps,
@@ -1579,20 +1697,20 @@ var ToggleControl = createControl(
1579
1697
  );
1580
1698
 
1581
1699
  // src/controls/number-control.tsx
1582
- import * as React30 from "react";
1700
+ import * as React32 from "react";
1583
1701
  import { numberPropTypeUtil } from "@elementor/editor-props";
1584
1702
  import { TextField as TextField5 } from "@elementor/ui";
1585
1703
  var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
1586
1704
  var RESTRICTED_INPUT_KEYS2 = ["e", "E", "+", "-"];
1587
1705
  var NumberControl = createControl(
1588
1706
  ({
1589
- placeholder,
1707
+ placeholder: labelPlaceholder,
1590
1708
  max = Number.MAX_VALUE,
1591
1709
  min = -Number.MAX_VALUE,
1592
1710
  step = 1,
1593
1711
  shouldForceInt = false
1594
1712
  }) => {
1595
- const { value, setValue, disabled } = useBoundProp(numberPropTypeUtil);
1713
+ const { value, setValue, placeholder, disabled } = useBoundProp(numberPropTypeUtil);
1596
1714
  const handleChange = (event) => {
1597
1715
  const eventValue = event.target.value;
1598
1716
  if (isEmptyOrNaN(eventValue)) {
@@ -1602,7 +1720,7 @@ var NumberControl = createControl(
1602
1720
  const formattedValue = shouldForceInt ? +parseInt(eventValue) : Number(eventValue);
1603
1721
  setValue(Math.min(Math.max(formattedValue, min), max));
1604
1722
  };
1605
- return /* @__PURE__ */ React30.createElement(ControlActions, null, /* @__PURE__ */ React30.createElement(
1723
+ return /* @__PURE__ */ React32.createElement(ControlActions, null, /* @__PURE__ */ React32.createElement(
1606
1724
  TextField5,
1607
1725
  {
1608
1726
  size: "tiny",
@@ -1611,7 +1729,7 @@ var NumberControl = createControl(
1611
1729
  disabled,
1612
1730
  value: isEmptyOrNaN(value) ? "" : value,
1613
1731
  onChange: handleChange,
1614
- placeholder,
1732
+ placeholder: labelPlaceholder ?? (placeholder ? String(placeholder) : ""),
1615
1733
  inputProps: { step },
1616
1734
  onKeyDown: (event) => {
1617
1735
  if (RESTRICTED_INPUT_KEYS2.includes(event.key)) {
@@ -1624,21 +1742,12 @@ var NumberControl = createControl(
1624
1742
  );
1625
1743
 
1626
1744
  // src/controls/equal-unequal-sizes-control.tsx
1627
- import * as React32 from "react";
1628
- import { useId as useId2, useRef as useRef5 } from "react";
1745
+ import * as React33 from "react";
1746
+ import { useId as useId2, useRef as useRef6 } from "react";
1629
1747
  import { sizePropTypeUtil as sizePropTypeUtil2 } from "@elementor/editor-props";
1630
1748
  import { isExperimentActive as isExperimentActive2 } from "@elementor/editor-v1-adapters";
1631
1749
  import { bindPopover as bindPopover3, bindToggle, Grid as Grid5, Popover as Popover3, Stack as Stack7, ToggleButton as ToggleButton2, Tooltip as Tooltip3, usePopupState as usePopupState4 } from "@elementor/ui";
1632
1750
  import { __ as __6 } from "@wordpress/i18n";
1633
-
1634
- // src/components/control-label.tsx
1635
- import * as React31 from "react";
1636
- import { Stack as Stack6 } from "@elementor/ui";
1637
- var ControlLabel = ({ children }) => {
1638
- return /* @__PURE__ */ React31.createElement(Stack6, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React31.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React31.createElement(ControlAdornments, null));
1639
- };
1640
-
1641
- // src/controls/equal-unequal-sizes-control.tsx
1642
1751
  var isEqualSizes = (propValue, items) => {
1643
1752
  const values = Object.values(propValue);
1644
1753
  if (values.length !== items.length) {
@@ -1665,7 +1774,7 @@ function EqualUnequalSizesControl({
1665
1774
  disabled: multiSizeDisabled
1666
1775
  } = useBoundProp(multiSizePropTypeUtil);
1667
1776
  const { value: sizeValue, setValue: setSizeValue } = useBoundProp(sizePropTypeUtil2);
1668
- const rowRefs = [useRef5(), useRef5()];
1777
+ const rowRefs = [useRef6(null), useRef6(null)];
1669
1778
  const splitEqualValue = () => {
1670
1779
  if (!sizeValue) {
1671
1780
  return null;
@@ -1694,13 +1803,13 @@ function EqualUnequalSizesControl({
1694
1803
  };
1695
1804
  const isShowingGeneralIndicator = !isExperimentActive2("e_v_3_30") || !popupState.isOpen;
1696
1805
  const isMixed = !!multiSizeValue;
1697
- return /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React32.createElement(Grid5, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React32.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React32.createElement(ControlLabel, null, label)), /* @__PURE__ */ React32.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(Stack7, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React32.createElement(
1806
+ return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React33.createElement(Grid5, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React33.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React33.createElement(ControlLabel, null, label)), /* @__PURE__ */ React33.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(Stack7, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React33.createElement(
1698
1807
  SizeControl,
1699
1808
  {
1700
1809
  placeholder: isMixed ? __6("Mixed", "elementor") : void 0,
1701
1810
  anchorRef: rowRefs[0]
1702
1811
  }
1703
- ), /* @__PURE__ */ React32.createElement(Tooltip3, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React32.createElement(
1812
+ ), /* @__PURE__ */ React33.createElement(Tooltip3, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React33.createElement(
1704
1813
  ToggleButton2,
1705
1814
  {
1706
1815
  size: "tiny",
@@ -1711,7 +1820,7 @@ function EqualUnequalSizesControl({
1711
1820
  "aria-label": tooltipLabel
1712
1821
  },
1713
1822
  icon
1714
- ))))), /* @__PURE__ */ React32.createElement(
1823
+ ))))), /* @__PURE__ */ React33.createElement(
1715
1824
  Popover3,
1716
1825
  {
1717
1826
  disablePortal: true,
@@ -1729,7 +1838,7 @@ function EqualUnequalSizesControl({
1729
1838
  paper: { sx: { mt: 0.5, width: rowRefs[0].current?.getBoundingClientRect().width } }
1730
1839
  }
1731
1840
  },
1732
- /* @__PURE__ */ React32.createElement(
1841
+ /* @__PURE__ */ React33.createElement(
1733
1842
  PropProvider,
1734
1843
  {
1735
1844
  propType: multiSizePropType,
@@ -1737,21 +1846,18 @@ function EqualUnequalSizesControl({
1737
1846
  setValue: setNestedProp,
1738
1847
  disabled: multiSizeDisabled
1739
1848
  },
1740
- /* @__PURE__ */ React32.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React32.createElement(PopoverGridContainer, { ref: rowRefs[1] }, /* @__PURE__ */ React32.createElement(MultiSizeValueControl, { item: items[0], rowRef: rowRefs[1] }), /* @__PURE__ */ React32.createElement(MultiSizeValueControl, { item: items[1], rowRef: rowRefs[1] })), /* @__PURE__ */ React32.createElement(PopoverGridContainer, { ref: rowRefs[2] }, /* @__PURE__ */ React32.createElement(MultiSizeValueControl, { item: items[2], rowRef: rowRefs[2] }), /* @__PURE__ */ React32.createElement(MultiSizeValueControl, { item: items[3], rowRef: rowRefs[2] })))
1849
+ /* @__PURE__ */ React33.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React33.createElement(PopoverGridContainer, { ref: rowRefs[1] }, /* @__PURE__ */ React33.createElement(MultiSizeValueControl, { item: items[0], rowRef: rowRefs[1] }), /* @__PURE__ */ React33.createElement(MultiSizeValueControl, { item: items[1], rowRef: rowRefs[1] })), /* @__PURE__ */ React33.createElement(PopoverGridContainer, { ref: rowRefs[2] }, /* @__PURE__ */ React33.createElement(MultiSizeValueControl, { item: items[2], rowRef: rowRefs[2] }), /* @__PURE__ */ React33.createElement(MultiSizeValueControl, { item: items[3], rowRef: rowRefs[2] })))
1741
1850
  )
1742
1851
  ));
1743
1852
  }
1744
- var MultiSizeValueControl = ({
1745
- item,
1746
- rowRef
1747
- }) => {
1853
+ var MultiSizeValueControl = ({ item, rowRef }) => {
1748
1854
  const isUsingNestedProps = isExperimentActive2("e_v_3_30");
1749
- return /* @__PURE__ */ React32.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React32.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(Grid5, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React32.createElement(Grid5, { item: true, xs: 12 }, isUsingNestedProps ? /* @__PURE__ */ React32.createElement(ControlLabel, null, item.label) : /* @__PURE__ */ React32.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React32.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React32.createElement(SizeControl, { startIcon: item.icon, anchorRef: rowRef })))));
1855
+ return /* @__PURE__ */ React33.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React33.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(Grid5, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React33.createElement(Grid5, { item: true, xs: 12 }, isUsingNestedProps ? /* @__PURE__ */ React33.createElement(ControlLabel, null, item.label) : /* @__PURE__ */ React33.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React33.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React33.createElement(SizeControl, { startIcon: item.icon, anchorRef: rowRef })))));
1750
1856
  };
1751
1857
 
1752
1858
  // src/controls/linked-dimensions-control.tsx
1753
- import * as React33 from "react";
1754
- import { useRef as useRef6 } from "react";
1859
+ import * as React34 from "react";
1860
+ import { useRef as useRef7 } from "react";
1755
1861
  import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil3 } from "@elementor/editor-props";
1756
1862
  import { isExperimentActive as isExperimentActive3 } from "@elementor/editor-v1-adapters";
1757
1863
  import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
@@ -1764,7 +1870,7 @@ var LinkedDimensionsControl = createControl(
1764
1870
  extendedOptions
1765
1871
  }) => {
1766
1872
  const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(sizePropTypeUtil3);
1767
- const gridRowRefs = [useRef6(), useRef6()];
1873
+ const gridRowRefs = [useRef7(null), useRef7(null)];
1768
1874
  const {
1769
1875
  value: dimensionsValue,
1770
1876
  setValue: setDimensionsValue,
@@ -1791,7 +1897,7 @@ var LinkedDimensionsControl = createControl(
1791
1897
  const linkedLabel = __7("Link %s", "elementor").replace("%s", tooltipLabel);
1792
1898
  const unlinkedLabel = __7("Unlink %s", "elementor").replace("%s", tooltipLabel);
1793
1899
  const disabled = sizeDisabled || dimensionsDisabled;
1794
- return /* @__PURE__ */ React33.createElement(
1900
+ return /* @__PURE__ */ React34.createElement(
1795
1901
  PropProvider,
1796
1902
  {
1797
1903
  propType,
@@ -1799,7 +1905,7 @@ var LinkedDimensionsControl = createControl(
1799
1905
  setValue: setDimensionsValue,
1800
1906
  disabled
1801
1907
  },
1802
- /* @__PURE__ */ React33.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, isUsingNestedProps ? /* @__PURE__ */ React33.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React33.createElement(ControlLabel, null, label), /* @__PURE__ */ React33.createElement(Tooltip4, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React33.createElement(
1908
+ /* @__PURE__ */ React34.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, isUsingNestedProps ? /* @__PURE__ */ React34.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React34.createElement(ControlLabel, null, label), /* @__PURE__ */ React34.createElement(Tooltip4, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React34.createElement(
1803
1909
  ToggleButton3,
1804
1910
  {
1805
1911
  "aria-label": isLinked ? unlinkedLabel : linkedLabel,
@@ -1810,9 +1916,9 @@ var LinkedDimensionsControl = createControl(
1810
1916
  onChange: onLinkToggle,
1811
1917
  disabled
1812
1918
  },
1813
- /* @__PURE__ */ React33.createElement(LinkedIcon, { fontSize: "tiny" })
1919
+ /* @__PURE__ */ React34.createElement(LinkedIcon, { fontSize: "tiny" })
1814
1920
  ))),
1815
- getCssMarginProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React33.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React33.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React33.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React33.createElement(Label, { ...props })), /* @__PURE__ */ React33.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React33.createElement(
1921
+ getCssMarginProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React34.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React34.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React34.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React34.createElement(Label, { ...props })), /* @__PURE__ */ React34.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React34.createElement(
1816
1922
  Control3,
1817
1923
  {
1818
1924
  bind: props.bind,
@@ -1833,16 +1939,16 @@ var Control3 = ({
1833
1939
  anchorRef
1834
1940
  }) => {
1835
1941
  if (isLinked) {
1836
- return /* @__PURE__ */ React33.createElement(SizeControl, { startIcon, extendedOptions, anchorRef });
1942
+ return /* @__PURE__ */ React34.createElement(SizeControl, { startIcon, extendedOptions, anchorRef });
1837
1943
  }
1838
- return /* @__PURE__ */ React33.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React33.createElement(SizeControl, { startIcon, extendedOptions, anchorRef }));
1944
+ return /* @__PURE__ */ React34.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React34.createElement(SizeControl, { startIcon, extendedOptions, anchorRef }));
1839
1945
  };
1840
1946
  var Label = ({ label, bind }) => {
1841
1947
  const isUsingNestedProps = isExperimentActive3("e_v_3_30");
1842
1948
  if (!isUsingNestedProps) {
1843
- return /* @__PURE__ */ React33.createElement(ControlFormLabel, null, label);
1949
+ return /* @__PURE__ */ React34.createElement(ControlFormLabel, null, label);
1844
1950
  }
1845
- return /* @__PURE__ */ React33.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React33.createElement(ControlLabel, null, label));
1951
+ return /* @__PURE__ */ React34.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React34.createElement(ControlLabel, null, label));
1846
1952
  };
1847
1953
  function getCssMarginProps(isSiteRtl) {
1848
1954
  return [
@@ -1850,54 +1956,42 @@ function getCssMarginProps(isSiteRtl) {
1850
1956
  {
1851
1957
  bind: "block-start",
1852
1958
  label: __7("Top", "elementor"),
1853
- icon: /* @__PURE__ */ React33.createElement(SideTopIcon, { fontSize: "tiny" })
1959
+ icon: /* @__PURE__ */ React34.createElement(SideTopIcon, { fontSize: "tiny" })
1854
1960
  },
1855
1961
  {
1856
1962
  bind: "inline-end",
1857
1963
  label: isSiteRtl ? __7("Left", "elementor") : __7("Right", "elementor"),
1858
- icon: isSiteRtl ? /* @__PURE__ */ React33.createElement(SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React33.createElement(SideRightIcon, { fontSize: "tiny" })
1964
+ icon: isSiteRtl ? /* @__PURE__ */ React34.createElement(SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React34.createElement(SideRightIcon, { fontSize: "tiny" })
1859
1965
  }
1860
1966
  ],
1861
1967
  [
1862
1968
  {
1863
1969
  bind: "block-end",
1864
1970
  label: __7("Bottom", "elementor"),
1865
- icon: /* @__PURE__ */ React33.createElement(SideBottomIcon, { fontSize: "tiny" })
1971
+ icon: /* @__PURE__ */ React34.createElement(SideBottomIcon, { fontSize: "tiny" })
1866
1972
  },
1867
1973
  {
1868
1974
  bind: "inline-start",
1869
1975
  label: isSiteRtl ? __7("Right", "elementor") : __7("Left", "elementor"),
1870
- icon: isSiteRtl ? /* @__PURE__ */ React33.createElement(SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React33.createElement(SideLeftIcon, { fontSize: "tiny" })
1976
+ icon: isSiteRtl ? /* @__PURE__ */ React34.createElement(SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React34.createElement(SideLeftIcon, { fontSize: "tiny" })
1871
1977
  }
1872
1978
  ]
1873
1979
  ];
1874
1980
  }
1875
1981
 
1876
1982
  // src/controls/font-family-control/font-family-control.tsx
1877
- import * as React35 from "react";
1983
+ import * as React36 from "react";
1878
1984
  import { stringPropTypeUtil as stringPropTypeUtil5 } from "@elementor/editor-props";
1879
1985
  import { ChevronDownIcon as ChevronDownIcon2 } from "@elementor/icons";
1880
1986
  import { bindPopover as bindPopover4, bindTrigger as bindTrigger3, Popover as Popover4, UnstableTag as UnstableTag2, usePopupState as usePopupState5 } from "@elementor/ui";
1881
1987
 
1882
1988
  // src/components/font-family-selector.tsx
1883
- import { useEffect as useEffect5, useRef as useRef7, useState as useState6 } from "react";
1884
- import * as React34 from "react";
1885
- import { PopoverHeader } from "@elementor/editor-ui";
1886
- import { SearchIcon, TextIcon } from "@elementor/icons";
1887
- import {
1888
- Box as Box3,
1889
- Divider as Divider2,
1890
- InputAdornment as InputAdornment3,
1891
- Link,
1892
- MenuList,
1893
- MenuSubheader,
1894
- Stack as Stack9,
1895
- styled as styled4,
1896
- TextField as TextField6,
1897
- Typography as Typography3
1898
- } from "@elementor/ui";
1989
+ import * as React35 from "react";
1990
+ import { useEffect as useEffect5, useState as useState6 } from "react";
1991
+ import { PopoverHeader, PopoverMenuList, PopoverScrollableContent, PopoverSearch } from "@elementor/editor-ui";
1992
+ import { TextIcon } from "@elementor/icons";
1993
+ import { Box as Box4, Divider as Divider2, Link, Stack as Stack9, Typography as Typography3 } from "@elementor/ui";
1899
1994
  import { debounce } from "@elementor/utils";
1900
- import { useVirtualizer } from "@tanstack/react-virtual";
1901
1995
  import { __ as __8 } from "@wordpress/i18n";
1902
1996
 
1903
1997
  // src/controls/font-family-control/enqueue-font.tsx
@@ -1928,38 +2022,33 @@ var FontFamilySelector = ({
1928
2022
  fontFamilies,
1929
2023
  fontFamily,
1930
2024
  onFontFamilyChange,
1931
- onClose
2025
+ onClose,
2026
+ sectionWidth
1932
2027
  }) => {
1933
2028
  const [searchValue, setSearchValue] = useState6("");
1934
2029
  const filteredFontFamilies = useFilteredFontFamilies(fontFamilies, searchValue);
1935
- const handleSearch = (event) => {
1936
- setSearchValue(event.target.value);
2030
+ const handleSearch = (value) => {
2031
+ setSearchValue(value);
1937
2032
  };
1938
2033
  const handleClose = () => {
1939
2034
  setSearchValue("");
1940
2035
  onClose();
1941
2036
  };
1942
- return /* @__PURE__ */ React34.createElement(Stack9, null, /* @__PURE__ */ React34.createElement(
2037
+ return /* @__PURE__ */ React35.createElement(Stack9, null, /* @__PURE__ */ React35.createElement(
1943
2038
  PopoverHeader,
1944
2039
  {
1945
2040
  title: __8("Font Family", "elementor"),
1946
2041
  onClose: handleClose,
1947
- icon: /* @__PURE__ */ React34.createElement(TextIcon, { fontSize: SIZE2 })
2042
+ icon: /* @__PURE__ */ React35.createElement(TextIcon, { fontSize: SIZE2 })
1948
2043
  }
1949
- ), /* @__PURE__ */ React34.createElement(Box3, { px: 1.5, pb: 1 }, /* @__PURE__ */ React34.createElement(
1950
- TextField6,
2044
+ ), /* @__PURE__ */ React35.createElement(
2045
+ PopoverSearch,
1951
2046
  {
1952
- autoFocus: true,
1953
- fullWidth: true,
1954
- size: SIZE2,
1955
2047
  value: searchValue,
1956
- placeholder: __8("Search", "elementor"),
1957
- onChange: handleSearch,
1958
- InputProps: {
1959
- startAdornment: /* @__PURE__ */ React34.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React34.createElement(SearchIcon, { fontSize: SIZE2 }))
1960
- }
2048
+ onSearch: handleSearch,
2049
+ placeholder: __8("Search", "elementor")
1961
2050
  }
1962
- )), /* @__PURE__ */ React34.createElement(Divider2, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React34.createElement(
2051
+ ), /* @__PURE__ */ React35.createElement(Divider2, null), /* @__PURE__ */ React35.createElement(PopoverScrollableContent, { width: sectionWidth }, filteredFontFamilies.length > 0 ? /* @__PURE__ */ React35.createElement(
1963
2052
  FontList,
1964
2053
  {
1965
2054
  fontListItems: filteredFontFamilies,
@@ -1967,35 +2056,55 @@ var FontFamilySelector = ({
1967
2056
  handleClose,
1968
2057
  fontFamily
1969
2058
  }
1970
- ) : /* @__PURE__ */ React34.createElement(Box3, { sx: { overflowY: "auto", height: 260, width: 220 } }, /* @__PURE__ */ React34.createElement(Stack9, { alignItems: "center", p: 2.5, gap: 1.5, overflow: "hidden" }, /* @__PURE__ */ React34.createElement(TextIcon, { fontSize: "large" }), /* @__PURE__ */ React34.createElement(Box3, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React34.createElement(Typography3, { align: "center", variant: "subtitle2", color: "text.secondary" }, __8("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React34.createElement(
1971
- Typography3,
2059
+ ) : /* @__PURE__ */ React35.createElement(
2060
+ Stack9,
1972
2061
  {
1973
- variant: "subtitle2",
1974
- color: "text.secondary",
1975
- sx: {
1976
- display: "flex",
1977
- width: "100%",
1978
- justifyContent: "center"
1979
- }
1980
- },
1981
- /* @__PURE__ */ React34.createElement("span", null, "\u201C"),
1982
- /* @__PURE__ */ React34.createElement("span", { style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" } }, searchValue),
1983
- /* @__PURE__ */ React34.createElement("span", null, "\u201D.")
1984
- )), /* @__PURE__ */ React34.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __8("Try something else.", "elementor"), /* @__PURE__ */ React34.createElement(
1985
- Link,
1986
- {
1987
- color: "secondary",
1988
- variant: "caption",
1989
- component: "button",
1990
- onClick: () => setSearchValue("")
2062
+ alignItems: "center",
2063
+ justifyContent: "center",
2064
+ height: "100%",
2065
+ p: 2.5,
2066
+ gap: 1.5,
2067
+ overflow: "hidden"
1991
2068
  },
1992
- __8("Clear & try again", "elementor")
1993
- )))));
2069
+ /* @__PURE__ */ React35.createElement(TextIcon, { fontSize: "large" }),
2070
+ /* @__PURE__ */ React35.createElement(Box4, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React35.createElement(Typography3, { align: "center", variant: "subtitle2", color: "text.secondary" }, __8("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React35.createElement(
2071
+ Typography3,
2072
+ {
2073
+ variant: "subtitle2",
2074
+ color: "text.secondary",
2075
+ sx: {
2076
+ display: "flex",
2077
+ width: "100%",
2078
+ justifyContent: "center"
2079
+ }
2080
+ },
2081
+ /* @__PURE__ */ React35.createElement("span", null, "\u201C"),
2082
+ /* @__PURE__ */ React35.createElement("span", { style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" } }, searchValue),
2083
+ /* @__PURE__ */ React35.createElement("span", null, "\u201D.")
2084
+ )),
2085
+ /* @__PURE__ */ React35.createElement(
2086
+ Typography3,
2087
+ {
2088
+ align: "center",
2089
+ variant: "caption",
2090
+ color: "text.secondary",
2091
+ sx: { display: "flex", flexDirection: "column" }
2092
+ },
2093
+ __8("Try something else.", "elementor"),
2094
+ /* @__PURE__ */ React35.createElement(
2095
+ Link,
2096
+ {
2097
+ color: "secondary",
2098
+ variant: "caption",
2099
+ component: "button",
2100
+ onClick: () => setSearchValue("")
2101
+ },
2102
+ __8("Clear & try again", "elementor")
2103
+ )
2104
+ )
2105
+ )));
1994
2106
  };
1995
- var LIST_ITEM_HEIGHT = 36;
1996
- var LIST_ITEMS_BUFFER = 6;
1997
2107
  var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
1998
- const containerRef = useRef7(null);
1999
2108
  const selectedItem = fontListItems.find((item) => item.value === fontFamily);
2000
2109
  const debouncedVirtualizeChange = useDebounce(({ getVirtualIndexes }) => {
2001
2110
  getVirtualIndexes().forEach((index) => {
@@ -2005,120 +2114,19 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
2005
2114
  }
2006
2115
  });
2007
2116
  }, 100);
2008
- const virtualizer = useVirtualizer({
2009
- count: fontListItems.length,
2010
- getScrollElement: () => containerRef.current,
2011
- estimateSize: () => LIST_ITEM_HEIGHT,
2012
- overscan: LIST_ITEMS_BUFFER,
2013
- onChange: debouncedVirtualizeChange
2014
- });
2015
- useEffect5(
2016
- () => {
2017
- virtualizer.scrollToIndex(fontListItems.findIndex((item) => item.value === fontFamily));
2018
- },
2019
- // eslint-disable-next-line react-compiler/react-compiler
2020
- // eslint-disable-next-line react-hooks/exhaustive-deps
2021
- [fontFamily]
2022
- );
2023
- return /* @__PURE__ */ React34.createElement(
2024
- Box3,
2117
+ return /* @__PURE__ */ React35.createElement(
2118
+ PopoverMenuList,
2025
2119
  {
2026
- ref: containerRef,
2027
- sx: {
2028
- overflowY: "auto",
2029
- height: 260,
2030
- width: 220
2031
- }
2032
- },
2033
- /* @__PURE__ */ React34.createElement(
2034
- StyledMenuList,
2035
- {
2036
- role: "listbox",
2037
- style: {
2038
- height: `${virtualizer.getTotalSize()}px`
2039
- },
2040
- "data-testid": "font-list"
2041
- },
2042
- virtualizer.getVirtualItems().map((virtualRow) => {
2043
- const item = fontListItems[virtualRow.index];
2044
- const isLast = virtualRow.index === fontListItems.length - 1;
2045
- const isFirst = virtualRow.index === 1;
2046
- const isSelected = selectedItem?.value === item.value;
2047
- const tabIndexFallback = !selectedItem ? 0 : -1;
2048
- if (item.type === "category") {
2049
- return /* @__PURE__ */ React34.createElement(
2050
- MenuSubheader,
2051
- {
2052
- key: virtualRow.key,
2053
- style: {
2054
- transform: `translateY(${virtualRow.start}px)`
2055
- }
2056
- },
2057
- item.value
2058
- );
2059
- }
2060
- return /* @__PURE__ */ React34.createElement(
2061
- "li",
2062
- {
2063
- key: virtualRow.key,
2064
- role: "option",
2065
- "aria-selected": isSelected,
2066
- onClick: () => {
2067
- setFontFamily(item.value);
2068
- handleClose();
2069
- },
2070
- onKeyDown: (event) => {
2071
- if (event.key === "Enter") {
2072
- setFontFamily(item.value);
2073
- handleClose();
2074
- }
2075
- if (event.key === "ArrowDown" && isLast) {
2076
- event.preventDefault();
2077
- event.stopPropagation();
2078
- }
2079
- if (event.key === "ArrowUp" && isFirst) {
2080
- event.preventDefault();
2081
- event.stopPropagation();
2082
- }
2083
- },
2084
- tabIndex: isSelected ? 0 : tabIndexFallback,
2085
- style: {
2086
- transform: `translateY(${virtualRow.start}px)`,
2087
- fontFamily: item.value
2088
- }
2089
- },
2090
- item.value
2091
- );
2092
- })
2093
- )
2120
+ items: fontListItems,
2121
+ selectedValue: selectedItem?.value,
2122
+ onChange: debouncedVirtualizeChange,
2123
+ onSelect: setFontFamily,
2124
+ onClose: handleClose,
2125
+ itemStyle: (item) => ({ fontFamily: item.value }),
2126
+ "data-testid": "font-list"
2127
+ }
2094
2128
  );
2095
2129
  };
2096
- var StyledMenuList = styled4(MenuList)(({ theme }) => ({
2097
- "& > li": {
2098
- height: LIST_ITEM_HEIGHT,
2099
- position: "absolute",
2100
- top: 0,
2101
- left: 0,
2102
- width: "100%",
2103
- display: "flex",
2104
- alignItems: "center"
2105
- },
2106
- '& > [role="option"]': {
2107
- ...theme.typography.caption,
2108
- lineHeight: "inherit",
2109
- padding: theme.spacing(0.75, 2, 0.75, 4),
2110
- "&:hover, &:focus": {
2111
- backgroundColor: theme.palette.action.hover
2112
- },
2113
- '&[aria-selected="true"]': {
2114
- backgroundColor: theme.palette.action.selected
2115
- },
2116
- cursor: "pointer",
2117
- textOverflow: "ellipsis"
2118
- },
2119
- width: "100%",
2120
- position: "relative"
2121
- }));
2122
2130
  var useDebounce = (fn, delay) => {
2123
2131
  const [debouncedFn] = useState6(() => debounce(fn, delay));
2124
2132
  useEffect5(() => () => debouncedFn.cancel(), [debouncedFn]);
@@ -2127,48 +2135,51 @@ var useDebounce = (fn, delay) => {
2127
2135
 
2128
2136
  // src/controls/font-family-control/font-family-control.tsx
2129
2137
  var SIZE3 = "tiny";
2130
- var FontFamilyControl = createControl(({ fontFamilies }) => {
2138
+ var FontFamilyControl = createControl(({ fontFamilies, sectionWidth }) => {
2131
2139
  const { value: fontFamily, setValue: setFontFamily, disabled } = useBoundProp(stringPropTypeUtil5);
2132
2140
  const popoverState = usePopupState5({ variant: "popover" });
2133
- return /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(ControlActions, null, /* @__PURE__ */ React35.createElement(
2141
+ return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(ControlActions, null, /* @__PURE__ */ React36.createElement(
2134
2142
  UnstableTag2,
2135
2143
  {
2136
2144
  variant: "outlined",
2137
2145
  label: fontFamily,
2138
- endIcon: /* @__PURE__ */ React35.createElement(ChevronDownIcon2, { fontSize: SIZE3 }),
2146
+ endIcon: /* @__PURE__ */ React36.createElement(ChevronDownIcon2, { fontSize: SIZE3 }),
2139
2147
  ...bindTrigger3(popoverState),
2140
2148
  fullWidth: true,
2141
2149
  disabled
2142
2150
  }
2143
- )), /* @__PURE__ */ React35.createElement(
2151
+ )), /* @__PURE__ */ React36.createElement(
2144
2152
  Popover4,
2145
2153
  {
2146
2154
  disablePortal: true,
2147
2155
  disableScrollLock: true,
2148
- anchorOrigin: { vertical: "bottom", horizontal: "left" },
2156
+ anchorOrigin: { vertical: "bottom", horizontal: "right" },
2157
+ transformOrigin: { vertical: "top", horizontal: "right" },
2158
+ sx: { my: 1.5 },
2149
2159
  ...bindPopover4(popoverState)
2150
2160
  },
2151
- /* @__PURE__ */ React35.createElement(
2161
+ /* @__PURE__ */ React36.createElement(
2152
2162
  FontFamilySelector,
2153
2163
  {
2154
2164
  fontFamilies,
2155
2165
  fontFamily,
2156
2166
  onFontFamilyChange: setFontFamily,
2157
- onClose: popoverState.close
2167
+ onClose: popoverState.close,
2168
+ sectionWidth
2158
2169
  }
2159
2170
  )
2160
2171
  ));
2161
2172
  });
2162
2173
 
2163
2174
  // src/controls/url-control.tsx
2164
- import * as React36 from "react";
2175
+ import * as React37 from "react";
2165
2176
  import { urlPropTypeUtil } from "@elementor/editor-props";
2166
- import { TextField as TextField7 } from "@elementor/ui";
2177
+ import { TextField as TextField6 } from "@elementor/ui";
2167
2178
  var UrlControl = createControl(({ placeholder }) => {
2168
2179
  const { value, setValue, disabled } = useBoundProp(urlPropTypeUtil);
2169
2180
  const handleChange = (event) => setValue(event.target.value);
2170
- return /* @__PURE__ */ React36.createElement(ControlActions, null, /* @__PURE__ */ React36.createElement(
2171
- TextField7,
2181
+ return /* @__PURE__ */ React37.createElement(ControlActions, null, /* @__PURE__ */ React37.createElement(
2182
+ TextField6,
2172
2183
  {
2173
2184
  size: "tiny",
2174
2185
  fullWidth: true,
@@ -2181,7 +2192,7 @@ var UrlControl = createControl(({ placeholder }) => {
2181
2192
  });
2182
2193
 
2183
2194
  // src/controls/link-control.tsx
2184
- import * as React38 from "react";
2195
+ import * as React39 from "react";
2185
2196
  import { useMemo as useMemo3, useState as useState7 } from "react";
2186
2197
  import { getLinkInLinkRestriction, selectElement } from "@elementor/editor-elements";
2187
2198
  import {
@@ -2195,20 +2206,20 @@ import { InfoTipCard } from "@elementor/editor-ui";
2195
2206
  import { httpService as httpService2 } from "@elementor/http-client";
2196
2207
  import { AlertTriangleIcon, MinusIcon, PlusIcon as PlusIcon2 } from "@elementor/icons";
2197
2208
  import { useSessionStorage } from "@elementor/session";
2198
- import { Box as Box5, Collapse, Grid as Grid7, IconButton as IconButton3, Infotip, Stack as Stack10, Switch } from "@elementor/ui";
2209
+ import { Box as Box6, Collapse, Grid as Grid7, IconButton as IconButton3, Infotip, Stack as Stack10, Switch } from "@elementor/ui";
2199
2210
  import { debounce as debounce2 } from "@elementor/utils";
2200
2211
  import { __ as __9 } from "@wordpress/i18n";
2201
2212
 
2202
2213
  // src/components/autocomplete.tsx
2203
- import * as React37 from "react";
2214
+ import * as React38 from "react";
2204
2215
  import { forwardRef as forwardRef4 } from "react";
2205
2216
  import { XIcon as XIcon2 } from "@elementor/icons";
2206
2217
  import {
2207
2218
  Autocomplete as AutocompleteBase,
2208
- Box as Box4,
2219
+ Box as Box5,
2209
2220
  IconButton as IconButton2,
2210
- InputAdornment as InputAdornment4,
2211
- TextField as TextField8
2221
+ InputAdornment as InputAdornment3,
2222
+ TextField as TextField7
2212
2223
  } from "@elementor/ui";
2213
2224
  var Autocomplete = forwardRef4((props, ref) => {
2214
2225
  const {
@@ -2226,7 +2237,7 @@ var Autocomplete = forwardRef4((props, ref) => {
2226
2237
  const muiWarningPreventer = allowCustomValues || !!value?.toString()?.length;
2227
2238
  const isOptionEqualToValue = muiWarningPreventer ? void 0 : () => true;
2228
2239
  const isValueFromOptions = typeof value === "number" && !!findMatchingOption(options, value);
2229
- return /* @__PURE__ */ React37.createElement(
2240
+ return /* @__PURE__ */ React38.createElement(
2230
2241
  AutocompleteBase,
2231
2242
  {
2232
2243
  ...restProps,
@@ -2244,8 +2255,8 @@ var Autocomplete = forwardRef4((props, ref) => {
2244
2255
  groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
2245
2256
  isOptionEqualToValue,
2246
2257
  filterOptions: () => optionKeys,
2247
- renderOption: (optionProps, optionId) => /* @__PURE__ */ React37.createElement(Box4, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
2248
- renderInput: (params) => /* @__PURE__ */ React37.createElement(
2258
+ renderOption: (optionProps, optionId) => /* @__PURE__ */ React38.createElement(Box5, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
2259
+ renderInput: (params) => /* @__PURE__ */ React38.createElement(
2249
2260
  TextInput,
2250
2261
  {
2251
2262
  params,
@@ -2268,8 +2279,8 @@ var TextInput = ({
2268
2279
  const onChange = (event) => {
2269
2280
  handleChange(event.target.value);
2270
2281
  };
2271
- return /* @__PURE__ */ React37.createElement(
2272
- TextField8,
2282
+ return /* @__PURE__ */ React38.createElement(
2283
+ TextField7,
2273
2284
  {
2274
2285
  ...params,
2275
2286
  placeholder,
@@ -2281,7 +2292,7 @@ var TextInput = ({
2281
2292
  },
2282
2293
  InputProps: {
2283
2294
  ...params.InputProps,
2284
- endAdornment: /* @__PURE__ */ React37.createElement(ClearButton, { params, allowClear, handleChange })
2295
+ endAdornment: /* @__PURE__ */ React38.createElement(ClearButton, { params, allowClear, handleChange })
2285
2296
  }
2286
2297
  }
2287
2298
  );
@@ -2290,7 +2301,7 @@ var ClearButton = ({
2290
2301
  allowClear,
2291
2302
  handleChange,
2292
2303
  params
2293
- }) => /* @__PURE__ */ React37.createElement(InputAdornment4, { position: "end" }, allowClear && /* @__PURE__ */ React37.createElement(IconButton2, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React37.createElement(XIcon2, { fontSize: params.size })));
2304
+ }) => /* @__PURE__ */ React38.createElement(InputAdornment3, { position: "end" }, allowClear && /* @__PURE__ */ React38.createElement(IconButton2, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React38.createElement(XIcon2, { fontSize: params.size })));
2294
2305
  function findMatchingOption(options, optionId = null) {
2295
2306
  const formattedOption = (optionId || "").toString();
2296
2307
  return options.find(({ id }) => formattedOption === id.toString());
@@ -2326,7 +2337,8 @@ var LinkControl = createControl((props) => {
2326
2337
  queryOptions: { endpoint = "", requestParams = {} },
2327
2338
  placeholder,
2328
2339
  minInputLength = 2,
2329
- context: { elementId }
2340
+ context: { elementId },
2341
+ label = __9("Link", "elementor")
2330
2342
  } = props || {};
2331
2343
  const [linkInLinkRestriction, setLinkInLinkRestriction] = useState7(getLinkInLinkRestriction(elementId));
2332
2344
  const [options, setOptions] = useState7(
@@ -2389,7 +2401,7 @@ var LinkControl = createControl((props) => {
2389
2401
  ),
2390
2402
  [endpoint]
2391
2403
  );
2392
- return /* @__PURE__ */ React38.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React38.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React38.createElement(
2404
+ return /* @__PURE__ */ React39.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React39.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React39.createElement(
2393
2405
  Stack10,
2394
2406
  {
2395
2407
  direction: "row",
@@ -2399,8 +2411,8 @@ var LinkControl = createControl((props) => {
2399
2411
  marginInlineEnd: -0.75
2400
2412
  }
2401
2413
  },
2402
- /* @__PURE__ */ React38.createElement(ControlFormLabel, null, __9("Link", "elementor")),
2403
- /* @__PURE__ */ React38.createElement(ConditionalInfoTip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React38.createElement(
2414
+ /* @__PURE__ */ React39.createElement(ControlFormLabel, null, label),
2415
+ /* @__PURE__ */ React39.createElement(ConditionalInfoTip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React39.createElement(
2404
2416
  ToggleIconControl,
2405
2417
  {
2406
2418
  disabled: shouldDisableAddingLink,
@@ -2409,7 +2421,7 @@ var LinkControl = createControl((props) => {
2409
2421
  label: __9("Toggle link", "elementor")
2410
2422
  }
2411
2423
  ))
2412
- ), /* @__PURE__ */ React38.createElement(Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React38.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React38.createElement(ControlActions, null, /* @__PURE__ */ React38.createElement(
2424
+ ), /* @__PURE__ */ React39.createElement(Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React39.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React39.createElement(ControlActions, null, /* @__PURE__ */ React39.createElement(
2413
2425
  Autocomplete,
2414
2426
  {
2415
2427
  options,
@@ -2420,10 +2432,10 @@ var LinkControl = createControl((props) => {
2420
2432
  onTextChange,
2421
2433
  minInputLength
2422
2434
  }
2423
- ))), /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React38.createElement(SwitchControl, { disabled: propContext.disabled || !value }))))));
2435
+ ))), /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React39.createElement(SwitchControl, { disabled: propContext.disabled || !value }))))));
2424
2436
  });
2425
2437
  var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
2426
- return /* @__PURE__ */ React38.createElement(IconButton3, { size: SIZE4, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React38.createElement(MinusIcon, { fontSize: SIZE4 }) : /* @__PURE__ */ React38.createElement(PlusIcon2, { fontSize: SIZE4 }));
2438
+ return /* @__PURE__ */ React39.createElement(IconButton3, { size: SIZE4, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React39.createElement(MinusIcon, { fontSize: SIZE4 }) : /* @__PURE__ */ React39.createElement(PlusIcon2, { fontSize: SIZE4 }));
2427
2439
  };
2428
2440
  var SwitchControl = ({ disabled }) => {
2429
2441
  const { value = false, setValue } = useBoundProp(booleanPropTypeUtil);
@@ -2435,7 +2447,7 @@ var SwitchControl = ({ disabled }) => {
2435
2447
  opacity: 0
2436
2448
  }
2437
2449
  } : {};
2438
- return /* @__PURE__ */ React38.createElement(Grid7, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React38.createElement(Grid7, { item: true }, /* @__PURE__ */ React38.createElement(ControlFormLabel, null, __9("Open in a new tab", "elementor"))), /* @__PURE__ */ React38.createElement(Grid7, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React38.createElement(Switch, { checked: value, onClick, disabled, inputProps })));
2450
+ return /* @__PURE__ */ React39.createElement(Grid7, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React39.createElement(Grid7, { item: true }, /* @__PURE__ */ React39.createElement(ControlFormLabel, null, __9("Open in a new tab", "elementor"))), /* @__PURE__ */ React39.createElement(Grid7, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React39.createElement(Switch, { checked: value, onClick, disabled, inputProps })));
2439
2451
  };
2440
2452
  async function fetchOptions(ajaxUrl, params) {
2441
2453
  if (!params || !ajaxUrl) {
@@ -2472,15 +2484,15 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
2472
2484
  selectElement(elementId);
2473
2485
  }
2474
2486
  };
2475
- return shouldRestrict && isVisible ? /* @__PURE__ */ React38.createElement(
2487
+ return shouldRestrict && isVisible ? /* @__PURE__ */ React39.createElement(
2476
2488
  Infotip,
2477
2489
  {
2478
2490
  placement: "right",
2479
- content: /* @__PURE__ */ React38.createElement(
2491
+ content: /* @__PURE__ */ React39.createElement(
2480
2492
  InfoTipCard,
2481
2493
  {
2482
2494
  content: INFOTIP_CONTENT[reason],
2483
- svgIcon: /* @__PURE__ */ React38.createElement(AlertTriangleIcon, null),
2495
+ svgIcon: /* @__PURE__ */ React39.createElement(AlertTriangleIcon, null),
2484
2496
  learnMoreButton,
2485
2497
  ctaButton: {
2486
2498
  label: __9("Take me there", "elementor"),
@@ -2489,16 +2501,16 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
2489
2501
  }
2490
2502
  )
2491
2503
  },
2492
- /* @__PURE__ */ React38.createElement(Box5, null, children)
2493
- ) : /* @__PURE__ */ React38.createElement(React38.Fragment, null, children);
2504
+ /* @__PURE__ */ React39.createElement(Box6, null, children)
2505
+ ) : /* @__PURE__ */ React39.createElement(React39.Fragment, null, children);
2494
2506
  };
2495
2507
  var INFOTIP_CONTENT = {
2496
- descendant: /* @__PURE__ */ React38.createElement(React38.Fragment, null, __9("To add a link to this container,", "elementor"), /* @__PURE__ */ React38.createElement("br", null), __9("first remove the link from the elements inside of it.", "elementor")),
2497
- ancestor: /* @__PURE__ */ React38.createElement(React38.Fragment, null, __9("To add a link to this element,", "elementor"), /* @__PURE__ */ React38.createElement("br", null), __9("first remove the link from its parent container.", "elementor"))
2508
+ descendant: /* @__PURE__ */ React39.createElement(React39.Fragment, null, __9("To add a link to this container,", "elementor"), /* @__PURE__ */ React39.createElement("br", null), __9("first remove the link from the elements inside of it.", "elementor")),
2509
+ ancestor: /* @__PURE__ */ React39.createElement(React39.Fragment, null, __9("To add a link to this element,", "elementor"), /* @__PURE__ */ React39.createElement("br", null), __9("first remove the link from its parent container.", "elementor"))
2498
2510
  };
2499
2511
 
2500
2512
  // src/controls/gap-control.tsx
2501
- import * as React39 from "react";
2513
+ import * as React40 from "react";
2502
2514
  import { useRef as useRef8 } from "react";
2503
2515
  import { layoutDirectionPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
2504
2516
  import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
@@ -2511,7 +2523,7 @@ var GapControl = createControl(({ label }) => {
2511
2523
  propType,
2512
2524
  disabled: directionDisabled
2513
2525
  } = useBoundProp(layoutDirectionPropTypeUtil);
2514
- const stackRef = useRef8();
2526
+ const stackRef = useRef8(null);
2515
2527
  const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(sizePropTypeUtil4);
2516
2528
  const isLinked = !directionValue && !sizeValue ? true : !!sizeValue;
2517
2529
  const onLinkToggle = () => {
@@ -2530,7 +2542,7 @@ var GapControl = createControl(({ label }) => {
2530
2542
  const linkedLabel = __10("Link %s", "elementor").replace("%s", tooltipLabel);
2531
2543
  const unlinkedLabel = __10("Unlink %s", "elementor").replace("%s", tooltipLabel);
2532
2544
  const disabled = sizeDisabled || directionDisabled;
2533
- return /* @__PURE__ */ React39.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React39.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(ControlLabel, null, label), /* @__PURE__ */ React39.createElement(Tooltip5, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React39.createElement(
2545
+ return /* @__PURE__ */ React40.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React40.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(ControlLabel, null, label), /* @__PURE__ */ React40.createElement(Tooltip5, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React40.createElement(
2534
2546
  ToggleButton4,
2535
2547
  {
2536
2548
  "aria-label": isLinked ? unlinkedLabel : linkedLabel,
@@ -2541,8 +2553,8 @@ var GapControl = createControl(({ label }) => {
2541
2553
  onChange: onLinkToggle,
2542
2554
  disabled
2543
2555
  },
2544
- /* @__PURE__ */ React39.createElement(LinkedIcon, { fontSize: "tiny" })
2545
- ))), /* @__PURE__ */ React39.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React39.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React39.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(ControlFormLabel, null, __10("Column", "elementor"))), /* @__PURE__ */ React39.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(Control4, { bind: "column", isLinked, anchorRef: stackRef }))), /* @__PURE__ */ React39.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React39.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(ControlFormLabel, null, __10("Row", "elementor"))), /* @__PURE__ */ React39.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(Control4, { bind: "row", isLinked, anchorRef: stackRef })))));
2556
+ /* @__PURE__ */ React40.createElement(LinkedIcon, { fontSize: "tiny" })
2557
+ ))), /* @__PURE__ */ React40.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React40.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React40.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(ControlFormLabel, null, __10("Column", "elementor"))), /* @__PURE__ */ React40.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(Control4, { bind: "column", isLinked, anchorRef: stackRef }))), /* @__PURE__ */ React40.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React40.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(ControlFormLabel, null, __10("Row", "elementor"))), /* @__PURE__ */ React40.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(Control4, { bind: "row", isLinked, anchorRef: stackRef })))));
2546
2558
  });
2547
2559
  var Control4 = ({
2548
2560
  bind,
@@ -2550,18 +2562,18 @@ var Control4 = ({
2550
2562
  anchorRef
2551
2563
  }) => {
2552
2564
  if (isLinked) {
2553
- return /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef });
2565
+ return /* @__PURE__ */ React40.createElement(SizeControl, { anchorRef });
2554
2566
  }
2555
- return /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef }));
2567
+ return /* @__PURE__ */ React40.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React40.createElement(SizeControl, { anchorRef }));
2556
2568
  };
2557
2569
 
2558
2570
  // src/controls/aspect-ratio-control.tsx
2559
- import * as React40 from "react";
2560
- import { useState as useState8 } from "react";
2571
+ import * as React41 from "react";
2572
+ import { useEffect as useEffect6, useState as useState8 } from "react";
2561
2573
  import { stringPropTypeUtil as stringPropTypeUtil7 } from "@elementor/editor-props";
2562
- import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
2574
+ import { MenuListItem as MenuListItem4 } from "@elementor/editor-ui";
2563
2575
  import { ArrowsMoveHorizontalIcon, ArrowsMoveVerticalIcon } from "@elementor/icons";
2564
- import { Grid as Grid9, Select as Select2, Stack as Stack12, TextField as TextField9 } from "@elementor/ui";
2576
+ import { Grid as Grid9, Select as Select3, Stack as Stack12, TextField as TextField8 } from "@elementor/ui";
2565
2577
  import { __ as __11 } from "@wordpress/i18n";
2566
2578
  var RATIO_OPTIONS = [
2567
2579
  { label: __11("Auto", "elementor"), value: "auto" },
@@ -2584,6 +2596,21 @@ var AspectRatioControl = createControl(({ label }) => {
2584
2596
  const [selectedValue, setSelectedValue] = useState8(
2585
2597
  isCustomSelected ? CUSTOM_RATIO : aspectRatioValue || ""
2586
2598
  );
2599
+ useEffect6(() => {
2600
+ const isCustomValue = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
2601
+ if (isCustomValue) {
2602
+ const [width, height] = aspectRatioValue.split("/");
2603
+ setCustomWidth(width || "");
2604
+ setCustomHeight(height || "");
2605
+ setSelectedValue(CUSTOM_RATIO);
2606
+ setIsCustom(true);
2607
+ } else {
2608
+ setSelectedValue(aspectRatioValue || "");
2609
+ setIsCustom(false);
2610
+ setCustomWidth("");
2611
+ setCustomHeight("");
2612
+ }
2613
+ }, [aspectRatioValue]);
2587
2614
  const handleSelectChange = (event) => {
2588
2615
  const newValue = event.target.value;
2589
2616
  const isCustomRatio = newValue === CUSTOM_RATIO;
@@ -2608,8 +2635,8 @@ var AspectRatioControl = createControl(({ label }) => {
2608
2635
  setAspectRatioValue(`${customWidth}/${newHeight}`);
2609
2636
  }
2610
2637
  };
2611
- return /* @__PURE__ */ React40.createElement(ControlActions, null, /* @__PURE__ */ React40.createElement(Stack12, { direction: "column", pt: 2, gap: 2 }, /* @__PURE__ */ React40.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, label)), /* @__PURE__ */ React40.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(
2612
- Select2,
2638
+ return /* @__PURE__ */ React41.createElement(ControlActions, null, /* @__PURE__ */ React41.createElement(Stack12, { direction: "column", gap: 2 }, /* @__PURE__ */ React41.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, label)), /* @__PURE__ */ React41.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(
2639
+ Select3,
2613
2640
  {
2614
2641
  size: "tiny",
2615
2642
  displayEmpty: true,
@@ -2620,10 +2647,10 @@ var AspectRatioControl = createControl(({ label }) => {
2620
2647
  fullWidth: true
2621
2648
  },
2622
2649
  [...RATIO_OPTIONS, { label: __11("Custom", "elementor"), value: CUSTOM_RATIO }].map(
2623
- ({ label: optionLabel, ...props }) => /* @__PURE__ */ React40.createElement(MenuListItem3, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
2650
+ ({ label: optionLabel, ...props }) => /* @__PURE__ */ React41.createElement(MenuListItem4, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
2624
2651
  )
2625
- ))), isCustom && /* @__PURE__ */ React40.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(
2626
- TextField9,
2652
+ ))), isCustom && /* @__PURE__ */ React41.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(
2653
+ TextField8,
2627
2654
  {
2628
2655
  size: "tiny",
2629
2656
  type: "number",
@@ -2632,11 +2659,11 @@ var AspectRatioControl = createControl(({ label }) => {
2632
2659
  value: customWidth,
2633
2660
  onChange: handleCustomWidthChange,
2634
2661
  InputProps: {
2635
- startAdornment: /* @__PURE__ */ React40.createElement(ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
2662
+ startAdornment: /* @__PURE__ */ React41.createElement(ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
2636
2663
  }
2637
2664
  }
2638
- )), /* @__PURE__ */ React40.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(
2639
- TextField9,
2665
+ )), /* @__PURE__ */ React41.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(
2666
+ TextField8,
2640
2667
  {
2641
2668
  size: "tiny",
2642
2669
  type: "number",
@@ -2645,23 +2672,23 @@ var AspectRatioControl = createControl(({ label }) => {
2645
2672
  value: customHeight,
2646
2673
  onChange: handleCustomHeightChange,
2647
2674
  InputProps: {
2648
- startAdornment: /* @__PURE__ */ React40.createElement(ArrowsMoveVerticalIcon, { fontSize: "tiny" })
2675
+ startAdornment: /* @__PURE__ */ React41.createElement(ArrowsMoveVerticalIcon, { fontSize: "tiny" })
2649
2676
  }
2650
2677
  }
2651
2678
  )))));
2652
2679
  });
2653
2680
 
2654
2681
  // src/controls/svg-media-control.tsx
2655
- import * as React42 from "react";
2682
+ import * as React43 from "react";
2656
2683
  import { useState as useState10 } from "react";
2657
2684
  import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
2658
2685
  import { UploadIcon as UploadIcon2 } from "@elementor/icons";
2659
- import { Button as Button4, Card as Card2, CardMedia as CardMedia2, CardOverlay as CardOverlay2, CircularProgress as CircularProgress3, Stack as Stack13, styled as styled5 } from "@elementor/ui";
2686
+ import { Button as Button4, Card as Card2, CardMedia as CardMedia2, CardOverlay as CardOverlay2, CircularProgress as CircularProgress3, Stack as Stack13, styled as styled4 } from "@elementor/ui";
2660
2687
  import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWpMediaFrame2 } from "@elementor/wp-media";
2661
2688
  import { __ as __13 } from "@wordpress/i18n";
2662
2689
 
2663
2690
  // src/components/enable-unfiltered-modal.tsx
2664
- import * as React41 from "react";
2691
+ import * as React42 from "react";
2665
2692
  import { useState as useState9 } from "react";
2666
2693
  import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
2667
2694
  import {
@@ -2714,9 +2741,9 @@ var EnableUnfilteredModal = (props) => {
2714
2741
  }
2715
2742
  };
2716
2743
  const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
2717
- return canManageOptions ? /* @__PURE__ */ React41.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React41.createElement(NonAdminDialog, { ...dialogProps });
2744
+ return canManageOptions ? /* @__PURE__ */ React42.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React42.createElement(NonAdminDialog, { ...dialogProps });
2718
2745
  };
2719
- var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React41.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React41.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React41.createElement(DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React41.createElement(Divider3, null), /* @__PURE__ */ React41.createElement(DialogContent, null, /* @__PURE__ */ React41.createElement(DialogContentText, null, isError ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React41.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React41.createElement(DialogActions, null, /* @__PURE__ */ React41.createElement(Button3, { size: "medium", color: "secondary", onClick: () => onClose(false) }, __12("Cancel", "elementor")), /* @__PURE__ */ React41.createElement(
2746
+ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React42.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React42.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React42.createElement(DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React42.createElement(Divider3, null), /* @__PURE__ */ React42.createElement(DialogContent, null, /* @__PURE__ */ React42.createElement(DialogContentText, null, isError ? /* @__PURE__ */ React42.createElement(React42.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React42.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React42.createElement(DialogActions, null, /* @__PURE__ */ React42.createElement(Button3, { size: "medium", color: "secondary", onClick: () => onClose(false) }, __12("Cancel", "elementor")), /* @__PURE__ */ React42.createElement(
2720
2747
  Button3,
2721
2748
  {
2722
2749
  size: "medium",
@@ -2725,16 +2752,16 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
2725
2752
  color: "primary",
2726
2753
  disabled: isPending
2727
2754
  },
2728
- isPending ? /* @__PURE__ */ React41.createElement(CircularProgress2, { size: 24 }) : __12("Enable", "elementor")
2755
+ isPending ? /* @__PURE__ */ React42.createElement(CircularProgress2, { size: 24 }) : __12("Enable", "elementor")
2729
2756
  )));
2730
- var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */ React41.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React41.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React41.createElement(DialogTitle, null, NON_ADMIN_TITLE_TEXT)), /* @__PURE__ */ React41.createElement(Divider3, null), /* @__PURE__ */ React41.createElement(DialogContent, null, /* @__PURE__ */ React41.createElement(DialogContentText, null, NON_ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React41.createElement(DialogActions, null, /* @__PURE__ */ React41.createElement(Button3, { size: "medium", onClick: () => onClose(false), variant: "contained", color: "primary" }, __12("Got it", "elementor"))));
2757
+ var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */ React42.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React42.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React42.createElement(DialogTitle, null, NON_ADMIN_TITLE_TEXT)), /* @__PURE__ */ React42.createElement(Divider3, null), /* @__PURE__ */ React42.createElement(DialogContent, null, /* @__PURE__ */ React42.createElement(DialogContentText, null, NON_ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React42.createElement(DialogActions, null, /* @__PURE__ */ React42.createElement(Button3, { size: "medium", onClick: () => onClose(false), variant: "contained", color: "primary" }, __12("Got it", "elementor"))));
2731
2758
 
2732
2759
  // src/controls/svg-media-control.tsx
2733
2760
  var TILE_SIZE = 8;
2734
2761
  var TILE_WHITE = "transparent";
2735
2762
  var TILE_BLACK = "#c1c1c1";
2736
2763
  var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
2737
- var StyledCard = styled5(Card2)`
2764
+ var StyledCard = styled4(Card2)`
2738
2765
  background-color: white;
2739
2766
  background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
2740
2767
  background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
@@ -2743,7 +2770,7 @@ var StyledCard = styled5(Card2)`
2743
2770
  ${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
2744
2771
  border: none;
2745
2772
  `;
2746
- var StyledCardMediaContainer = styled5(Stack13)`
2773
+ var StyledCardMediaContainer = styled4(Stack13)`
2747
2774
  position: relative;
2748
2775
  height: 140px;
2749
2776
  object-fit: contain;
@@ -2788,7 +2815,7 @@ var SvgMediaControl = createControl(() => {
2788
2815
  open(openOptions);
2789
2816
  }
2790
2817
  };
2791
- return /* @__PURE__ */ React42.createElement(Stack13, { gap: 1 }, /* @__PURE__ */ React42.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React42.createElement(ControlFormLabel, null, " ", __13("SVG", "elementor"), " "), /* @__PURE__ */ React42.createElement(ControlActions, null, /* @__PURE__ */ React42.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React42.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React42.createElement(CircularProgress3, { role: "progressbar" }) : /* @__PURE__ */ React42.createElement(
2818
+ return /* @__PURE__ */ React43.createElement(Stack13, { gap: 1 }, /* @__PURE__ */ React43.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React43.createElement(ControlActions, null, /* @__PURE__ */ React43.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React43.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React43.createElement(CircularProgress3, { role: "progressbar" }) : /* @__PURE__ */ React43.createElement(
2792
2819
  CardMedia2,
2793
2820
  {
2794
2821
  component: "img",
@@ -2796,7 +2823,7 @@ var SvgMediaControl = createControl(() => {
2796
2823
  alt: __13("Preview SVG", "elementor"),
2797
2824
  sx: { maxHeight: "140px", width: "50px" }
2798
2825
  }
2799
- )), /* @__PURE__ */ React42.createElement(
2826
+ )), /* @__PURE__ */ React43.createElement(
2800
2827
  CardOverlay2,
2801
2828
  {
2802
2829
  sx: {
@@ -2805,7 +2832,7 @@ var SvgMediaControl = createControl(() => {
2805
2832
  }
2806
2833
  }
2807
2834
  },
2808
- /* @__PURE__ */ React42.createElement(Stack13, { gap: 1 }, /* @__PURE__ */ React42.createElement(
2835
+ /* @__PURE__ */ React43.createElement(Stack13, { gap: 1 }, /* @__PURE__ */ React43.createElement(
2809
2836
  Button4,
2810
2837
  {
2811
2838
  size: "tiny",
@@ -2814,13 +2841,13 @@ var SvgMediaControl = createControl(() => {
2814
2841
  onClick: () => handleClick(MODE_BROWSE)
2815
2842
  },
2816
2843
  __13("Select SVG", "elementor")
2817
- ), /* @__PURE__ */ React42.createElement(
2844
+ ), /* @__PURE__ */ React43.createElement(
2818
2845
  Button4,
2819
2846
  {
2820
2847
  size: "tiny",
2821
2848
  variant: "text",
2822
2849
  color: "inherit",
2823
- startIcon: /* @__PURE__ */ React42.createElement(UploadIcon2, null),
2850
+ startIcon: /* @__PURE__ */ React43.createElement(UploadIcon2, null),
2824
2851
  onClick: () => handleClick(MODE_UPLOAD)
2825
2852
  },
2826
2853
  __13("Upload", "elementor")
@@ -2829,21 +2856,21 @@ var SvgMediaControl = createControl(() => {
2829
2856
  });
2830
2857
 
2831
2858
  // src/controls/background-control/background-control.tsx
2832
- import * as React49 from "react";
2859
+ import * as React50 from "react";
2833
2860
  import { backgroundPropTypeUtil } from "@elementor/editor-props";
2834
2861
  import { isExperimentActive as isExperimentActive4 } from "@elementor/editor-v1-adapters";
2835
2862
  import { Grid as Grid15 } from "@elementor/ui";
2836
2863
  import { __ as __19 } from "@wordpress/i18n";
2837
2864
 
2838
2865
  // src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
2839
- import * as React48 from "react";
2866
+ import * as React49 from "react";
2840
2867
  import {
2841
2868
  backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
2842
2869
  backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
2843
2870
  backgroundOverlayPropTypeUtil,
2844
2871
  colorPropTypeUtil as colorPropTypeUtil3
2845
2872
  } from "@elementor/editor-props";
2846
- import { Box as Box6, CardMedia as CardMedia3, Grid as Grid14, styled as styled6, Tab, TabPanel, Tabs, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
2873
+ import { Box as Box7, CardMedia as CardMedia3, Grid as Grid14, styled as styled5, Tab, TabPanel, Tabs, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
2847
2874
  import { useWpMediaAttachment as useWpMediaAttachment3 } from "@elementor/wp-media";
2848
2875
  import { __ as __18 } from "@wordpress/i18n";
2849
2876
 
@@ -2852,7 +2879,7 @@ import { parseEnv } from "@elementor/env";
2852
2879
  var { env } = parseEnv("@elementor/editor-controls");
2853
2880
 
2854
2881
  // src/controls/background-control/background-gradient-color-control.tsx
2855
- import * as React43 from "react";
2882
+ import * as React44 from "react";
2856
2883
  import {
2857
2884
  backgroundGradientOverlayPropTypeUtil,
2858
2885
  colorPropTypeUtil as colorPropTypeUtil2,
@@ -2899,7 +2926,7 @@ var BackgroundGradientColorControl = createControl(() => {
2899
2926
  positions: positions?.value.split(" ")
2900
2927
  };
2901
2928
  };
2902
- return /* @__PURE__ */ React43.createElement(ControlActions, null, /* @__PURE__ */ React43.createElement(
2929
+ return /* @__PURE__ */ React44.createElement(ControlActions, null, /* @__PURE__ */ React44.createElement(
2903
2930
  UnstableGradientBox,
2904
2931
  {
2905
2932
  sx: { width: "auto", padding: 1.5 },
@@ -2924,7 +2951,7 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
2924
2951
  });
2925
2952
 
2926
2953
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
2927
- import * as React44 from "react";
2954
+ import * as React45 from "react";
2928
2955
  import { PinIcon, PinnedOffIcon } from "@elementor/icons";
2929
2956
  import { Grid as Grid10 } from "@elementor/ui";
2930
2957
  import { __ as __14 } from "@wordpress/i18n";
@@ -2932,27 +2959,27 @@ var attachmentControlOptions = [
2932
2959
  {
2933
2960
  value: "fixed",
2934
2961
  label: __14("Fixed", "elementor"),
2935
- renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(PinIcon, { fontSize: size }),
2962
+ renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(PinIcon, { fontSize: size }),
2936
2963
  showTooltip: true
2937
2964
  },
2938
2965
  {
2939
2966
  value: "scroll",
2940
2967
  label: __14("Scroll", "elementor"),
2941
- renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(PinnedOffIcon, { fontSize: size }),
2968
+ renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(PinnedOffIcon, { fontSize: size }),
2942
2969
  showTooltip: true
2943
2970
  }
2944
2971
  ];
2945
2972
  var BackgroundImageOverlayAttachment = () => {
2946
- return /* @__PURE__ */ React44.createElement(PopoverGridContainer, null, /* @__PURE__ */ React44.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlFormLabel, null, __14("Attachment", "elementor"))), /* @__PURE__ */ React44.createElement(Grid10, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React44.createElement(ToggleControl, { options: attachmentControlOptions })));
2973
+ return /* @__PURE__ */ React45.createElement(PopoverGridContainer, null, /* @__PURE__ */ React45.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlFormLabel, null, __14("Attachment", "elementor"))), /* @__PURE__ */ React45.createElement(Grid10, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React45.createElement(ToggleControl, { options: attachmentControlOptions })));
2947
2974
  };
2948
2975
 
2949
2976
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
2950
- import * as React45 from "react";
2977
+ import * as React46 from "react";
2951
2978
  import { useRef as useRef9 } from "react";
2952
2979
  import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil9 } from "@elementor/editor-props";
2953
- import { MenuListItem as MenuListItem4 } from "@elementor/editor-ui";
2980
+ import { MenuListItem as MenuListItem5 } from "@elementor/editor-ui";
2954
2981
  import { LetterXIcon, LetterYIcon } from "@elementor/icons";
2955
- import { Grid as Grid11, Select as Select3 } from "@elementor/ui";
2982
+ import { Grid as Grid11, Select as Select4 } from "@elementor/ui";
2956
2983
  import { __ as __15 } from "@wordpress/i18n";
2957
2984
  var backgroundPositionOptions = [
2958
2985
  { label: __15("Center center", "elementor"), value: "center center" },
@@ -2970,7 +2997,7 @@ var BackgroundImageOverlayPosition = () => {
2970
2997
  const backgroundImageOffsetContext = useBoundProp(backgroundImagePositionOffsetPropTypeUtil);
2971
2998
  const stringPropContext = useBoundProp(stringPropTypeUtil9);
2972
2999
  const isCustom = !!backgroundImageOffsetContext.value;
2973
- const rowRef = useRef9();
3000
+ const rowRef = useRef9(null);
2974
3001
  const handlePositionChange = (event) => {
2975
3002
  const value = event.target.value || null;
2976
3003
  if (value === "custom") {
@@ -2979,8 +3006,8 @@ var BackgroundImageOverlayPosition = () => {
2979
3006
  stringPropContext.setValue(value);
2980
3007
  }
2981
3008
  };
2982
- return /* @__PURE__ */ React45.createElement(Grid11, { container: true, spacing: 1.5 }, /* @__PURE__ */ React45.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React45.createElement(PopoverGridContainer, null, /* @__PURE__ */ React45.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlFormLabel, null, __15("Position", "elementor"))), /* @__PURE__ */ React45.createElement(Grid11, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React45.createElement(
2983
- Select3,
3009
+ return /* @__PURE__ */ React46.createElement(Grid11, { container: true, spacing: 1.5 }, /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(PopoverGridContainer, null, /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlFormLabel, null, __15("Position", "elementor"))), /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React46.createElement(
3010
+ Select4,
2984
3011
  {
2985
3012
  fullWidth: true,
2986
3013
  size: "tiny",
@@ -2988,24 +3015,24 @@ var BackgroundImageOverlayPosition = () => {
2988
3015
  disabled: stringPropContext.disabled,
2989
3016
  value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
2990
3017
  },
2991
- backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React45.createElement(MenuListItem4, { key: value, value: value ?? "" }, label))
2992
- )))), isCustom ? /* @__PURE__ */ React45.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React45.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React45.createElement(Grid11, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React45.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React45.createElement(
3018
+ backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React46.createElement(MenuListItem5, { key: value, value: value ?? "" }, label))
3019
+ )))), isCustom ? /* @__PURE__ */ React46.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(Grid11, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React46.createElement(
2993
3020
  SizeControl,
2994
3021
  {
2995
- startIcon: /* @__PURE__ */ React45.createElement(LetterXIcon, { fontSize: "tiny" }),
3022
+ startIcon: /* @__PURE__ */ React46.createElement(LetterXIcon, { fontSize: "tiny" }),
2996
3023
  anchorRef: rowRef
2997
3024
  }
2998
- ))), /* @__PURE__ */ React45.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React45.createElement(
3025
+ ))), /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React46.createElement(
2999
3026
  SizeControl,
3000
3027
  {
3001
- startIcon: /* @__PURE__ */ React45.createElement(LetterYIcon, { fontSize: "tiny" }),
3028
+ startIcon: /* @__PURE__ */ React46.createElement(LetterYIcon, { fontSize: "tiny" }),
3002
3029
  anchorRef: rowRef
3003
3030
  }
3004
3031
  )))))) : null);
3005
3032
  };
3006
3033
 
3007
3034
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
3008
- import * as React46 from "react";
3035
+ import * as React47 from "react";
3009
3036
  import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon3 } from "@elementor/icons";
3010
3037
  import { Grid as Grid12 } from "@elementor/ui";
3011
3038
  import { __ as __16 } from "@wordpress/i18n";
@@ -3013,34 +3040,34 @@ var repeatControlOptions = [
3013
3040
  {
3014
3041
  value: "repeat",
3015
3042
  label: __16("Repeat", "elementor"),
3016
- renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(GridDotsIcon, { fontSize: size }),
3043
+ renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(GridDotsIcon, { fontSize: size }),
3017
3044
  showTooltip: true
3018
3045
  },
3019
3046
  {
3020
3047
  value: "repeat-x",
3021
3048
  label: __16("Repeat-x", "elementor"),
3022
- renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(DotsHorizontalIcon, { fontSize: size }),
3049
+ renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(DotsHorizontalIcon, { fontSize: size }),
3023
3050
  showTooltip: true
3024
3051
  },
3025
3052
  {
3026
3053
  value: "repeat-y",
3027
3054
  label: __16("Repeat-y", "elementor"),
3028
- renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(DotsVerticalIcon, { fontSize: size }),
3055
+ renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(DotsVerticalIcon, { fontSize: size }),
3029
3056
  showTooltip: true
3030
3057
  },
3031
3058
  {
3032
3059
  value: "no-repeat",
3033
3060
  label: __16("No-repeat", "elementor"),
3034
- renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(XIcon3, { fontSize: size }),
3061
+ renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(XIcon3, { fontSize: size }),
3035
3062
  showTooltip: true
3036
3063
  }
3037
3064
  ];
3038
3065
  var BackgroundImageOverlayRepeat = () => {
3039
- return /* @__PURE__ */ React46.createElement(PopoverGridContainer, null, /* @__PURE__ */ React46.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlFormLabel, null, __16("Repeat", "elementor"))), /* @__PURE__ */ React46.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React46.createElement(ToggleControl, { options: repeatControlOptions })));
3066
+ return /* @__PURE__ */ React47.createElement(PopoverGridContainer, null, /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlFormLabel, null, __16("Repeat", "elementor"))), /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React47.createElement(ToggleControl, { options: repeatControlOptions })));
3040
3067
  };
3041
3068
 
3042
3069
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
3043
- import * as React47 from "react";
3070
+ import * as React48 from "react";
3044
3071
  import { useRef as useRef10 } from "react";
3045
3072
  import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil10 } from "@elementor/editor-props";
3046
3073
  import {
@@ -3057,25 +3084,25 @@ var sizeControlOptions = [
3057
3084
  {
3058
3085
  value: "auto",
3059
3086
  label: __17("Auto", "elementor"),
3060
- renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(LetterAIcon, { fontSize: size }),
3087
+ renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(LetterAIcon, { fontSize: size }),
3061
3088
  showTooltip: true
3062
3089
  },
3063
3090
  {
3064
3091
  value: "cover",
3065
3092
  label: __17("Cover", "elementor"),
3066
- renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(ArrowsMaximizeIcon, { fontSize: size }),
3093
+ renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(ArrowsMaximizeIcon, { fontSize: size }),
3067
3094
  showTooltip: true
3068
3095
  },
3069
3096
  {
3070
3097
  value: "contain",
3071
3098
  label: __17("Contain", "elementor"),
3072
- renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(ArrowBarBothIcon, { fontSize: size }),
3099
+ renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(ArrowBarBothIcon, { fontSize: size }),
3073
3100
  showTooltip: true
3074
3101
  },
3075
3102
  {
3076
3103
  value: "custom",
3077
3104
  label: __17("Custom", "elementor"),
3078
- renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(PencilIcon2, { fontSize: size }),
3105
+ renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(PencilIcon2, { fontSize: size }),
3079
3106
  showTooltip: true
3080
3107
  }
3081
3108
  ];
@@ -3083,7 +3110,7 @@ var BackgroundImageOverlaySize = () => {
3083
3110
  const backgroundImageScaleContext = useBoundProp(backgroundImageSizeScalePropTypeUtil);
3084
3111
  const stringPropContext = useBoundProp(stringPropTypeUtil10);
3085
3112
  const isCustom = !!backgroundImageScaleContext.value;
3086
- const rowRef = useRef10();
3113
+ const rowRef = useRef10(null);
3087
3114
  const handleSizeChange = (size) => {
3088
3115
  if (size === "custom") {
3089
3116
  backgroundImageScaleContext.setValue({ width: null, height: null });
@@ -3091,7 +3118,7 @@ var BackgroundImageOverlaySize = () => {
3091
3118
  stringPropContext.setValue(size);
3092
3119
  }
3093
3120
  };
3094
- return /* @__PURE__ */ React47.createElement(Grid13, { container: true, spacing: 1.5 }, /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React47.createElement(PopoverGridContainer, null, /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlFormLabel, null, __17("Size", "elementor"))), /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React47.createElement(
3121
+ return /* @__PURE__ */ React48.createElement(Grid13, { container: true, spacing: 1.5 }, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React48.createElement(PopoverGridContainer, null, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlFormLabel, null, __17("Size", "elementor"))), /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React48.createElement(
3095
3122
  ControlToggleButtonGroup,
3096
3123
  {
3097
3124
  exclusive: true,
@@ -3100,17 +3127,17 @@ var BackgroundImageOverlaySize = () => {
3100
3127
  disabled: stringPropContext.disabled,
3101
3128
  value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
3102
3129
  }
3103
- )))), isCustom ? /* @__PURE__ */ React47.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React47.createElement(PopoverGridContainer, null, /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React47.createElement(
3130
+ )))), isCustom ? /* @__PURE__ */ React48.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React48.createElement(PopoverGridContainer, null, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React48.createElement(
3104
3131
  SizeControl,
3105
3132
  {
3106
- startIcon: /* @__PURE__ */ React47.createElement(ArrowsMoveHorizontalIcon2, { fontSize: "tiny" }),
3133
+ startIcon: /* @__PURE__ */ React48.createElement(ArrowsMoveHorizontalIcon2, { fontSize: "tiny" }),
3107
3134
  extendedOptions: ["auto"],
3108
3135
  anchorRef: rowRef
3109
3136
  }
3110
- ))), /* @__PURE__ */ React47.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React47.createElement(
3137
+ ))), /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React48.createElement(
3111
3138
  SizeControl,
3112
3139
  {
3113
- startIcon: /* @__PURE__ */ React47.createElement(ArrowsMoveVerticalIcon2, { fontSize: "tiny" }),
3140
+ startIcon: /* @__PURE__ */ React48.createElement(ArrowsMoveVerticalIcon2, { fontSize: "tiny" }),
3114
3141
  extendedOptions: ["auto"],
3115
3142
  anchorRef: rowRef
3116
3143
  }
@@ -3218,7 +3245,7 @@ var backgroundResolutionOptions = [
3218
3245
  ];
3219
3246
  var BackgroundOverlayRepeaterControl = createControl(() => {
3220
3247
  const { propType, value: overlayValues, setValue, disabled } = useBoundProp(backgroundOverlayPropTypeUtil);
3221
- return /* @__PURE__ */ React48.createElement(PropProvider, { propType, value: overlayValues, setValue, disabled }, /* @__PURE__ */ React48.createElement(
3248
+ return /* @__PURE__ */ React49.createElement(PropProvider, { propType, value: overlayValues, setValue, disabled }, /* @__PURE__ */ React49.createElement(
3222
3249
  Repeater,
3223
3250
  {
3224
3251
  openOnAdd: true,
@@ -3227,24 +3254,24 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
3227
3254
  setValues: setValue,
3228
3255
  label: __18("Overlay", "elementor"),
3229
3256
  itemSettings: {
3230
- Icon: ItemIcon2,
3231
- Label: ItemLabel2,
3232
- Content: ItemContent2,
3257
+ Icon: ItemIcon3,
3258
+ Label: ItemLabel3,
3259
+ Content: ItemContent3,
3233
3260
  initialValues: getInitialBackgroundOverlay()
3234
3261
  }
3235
3262
  }
3236
3263
  ));
3237
3264
  });
3238
- var ItemContent2 = ({ anchorEl = null, bind }) => {
3239
- return /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React48.createElement(Content2, { anchorEl }));
3265
+ var ItemContent3 = ({ anchorEl = null, bind }) => {
3266
+ return /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React49.createElement(Content3, { anchorEl }));
3240
3267
  };
3241
- var Content2 = ({ anchorEl }) => {
3268
+ var Content3 = ({ anchorEl }) => {
3242
3269
  const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
3243
3270
  image: getInitialBackgroundOverlay().value,
3244
3271
  color: initialBackgroundColorOverlay.value,
3245
3272
  gradient: initialBackgroundGradientOverlay.value
3246
3273
  });
3247
- return /* @__PURE__ */ React48.createElement(Box6, { sx: { width: "100%" } }, /* @__PURE__ */ React48.createElement(Box6, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React48.createElement(
3274
+ return /* @__PURE__ */ React49.createElement(Box7, { sx: { width: "100%" } }, /* @__PURE__ */ React49.createElement(Box7, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React49.createElement(
3248
3275
  Tabs,
3249
3276
  {
3250
3277
  size: "small",
@@ -3252,19 +3279,19 @@ var Content2 = ({ anchorEl }) => {
3252
3279
  ...getTabsProps(),
3253
3280
  "aria-label": __18("Background Overlay", "elementor")
3254
3281
  },
3255
- /* @__PURE__ */ React48.createElement(Tab, { label: __18("Image", "elementor"), ...getTabProps("image") }),
3256
- /* @__PURE__ */ React48.createElement(Tab, { label: __18("Gradient", "elementor"), ...getTabProps("gradient") }),
3257
- /* @__PURE__ */ React48.createElement(Tab, { label: __18("Color", "elementor"), ...getTabProps("color") })
3258
- )), /* @__PURE__ */ React48.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React48.createElement(PopoverContent, null, /* @__PURE__ */ React48.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React48.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React48.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React48.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React48.createElement(PopoverContent, null, /* @__PURE__ */ React48.createElement(ColorOverlayContent, { anchorEl }))));
3282
+ /* @__PURE__ */ React49.createElement(Tab, { label: __18("Image", "elementor"), ...getTabProps("image") }),
3283
+ /* @__PURE__ */ React49.createElement(Tab, { label: __18("Gradient", "elementor"), ...getTabProps("gradient") }),
3284
+ /* @__PURE__ */ React49.createElement(Tab, { label: __18("Color", "elementor"), ...getTabProps("color") })
3285
+ )), /* @__PURE__ */ React49.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React49.createElement(PopoverContent, null, /* @__PURE__ */ React49.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React49.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React49.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React49.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React49.createElement(PopoverContent, null, /* @__PURE__ */ React49.createElement(ColorOverlayContent, { anchorEl }))));
3259
3286
  };
3260
- var ItemIcon2 = ({ value }) => {
3287
+ var ItemIcon3 = ({ value }) => {
3261
3288
  switch (value.$$type) {
3262
3289
  case "background-image-overlay":
3263
- return /* @__PURE__ */ React48.createElement(ItemIconImage, { value });
3290
+ return /* @__PURE__ */ React49.createElement(ItemIconImage, { value });
3264
3291
  case "background-color-overlay":
3265
- return /* @__PURE__ */ React48.createElement(ItemIconColor, { value });
3292
+ return /* @__PURE__ */ React49.createElement(ItemIconColor, { value });
3266
3293
  case "background-gradient-overlay":
3267
- return /* @__PURE__ */ React48.createElement(ItemIconGradient, { value });
3294
+ return /* @__PURE__ */ React49.createElement(ItemIconGradient, { value });
3268
3295
  default:
3269
3296
  return null;
3270
3297
  }
@@ -3277,11 +3304,11 @@ var extractColorFrom = (prop) => {
3277
3304
  };
3278
3305
  var ItemIconColor = ({ value: prop }) => {
3279
3306
  const color = extractColorFrom(prop);
3280
- return /* @__PURE__ */ React48.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
3307
+ return /* @__PURE__ */ React49.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
3281
3308
  };
3282
3309
  var ItemIconImage = ({ value }) => {
3283
3310
  const { imageUrl } = useImage(value);
3284
- return /* @__PURE__ */ React48.createElement(
3311
+ return /* @__PURE__ */ React49.createElement(
3285
3312
  CardMedia3,
3286
3313
  {
3287
3314
  image: imageUrl,
@@ -3296,49 +3323,43 @@ var ItemIconImage = ({ value }) => {
3296
3323
  };
3297
3324
  var ItemIconGradient = ({ value }) => {
3298
3325
  const gradient = getGradientValue(value);
3299
- return /* @__PURE__ */ React48.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
3326
+ return /* @__PURE__ */ React49.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
3300
3327
  };
3301
- var ItemLabel2 = ({ value }) => {
3328
+ var ItemLabel3 = ({ value }) => {
3302
3329
  switch (value.$$type) {
3303
3330
  case "background-image-overlay":
3304
- return /* @__PURE__ */ React48.createElement(ItemLabelImage, { value });
3331
+ return /* @__PURE__ */ React49.createElement(ItemLabelImage, { value });
3305
3332
  case "background-color-overlay":
3306
- return /* @__PURE__ */ React48.createElement(ItemLabelColor, { value });
3333
+ return /* @__PURE__ */ React49.createElement(ItemLabelColor, { value });
3307
3334
  case "background-gradient-overlay":
3308
- return /* @__PURE__ */ React48.createElement(ItemLabelGradient, { value });
3335
+ return /* @__PURE__ */ React49.createElement(ItemLabelGradient, { value });
3309
3336
  default:
3310
3337
  return null;
3311
3338
  }
3312
3339
  };
3313
3340
  var ItemLabelColor = ({ value: prop }) => {
3314
3341
  const color = extractColorFrom(prop);
3315
- return /* @__PURE__ */ React48.createElement("span", null, color);
3342
+ return /* @__PURE__ */ React49.createElement("span", null, color);
3316
3343
  };
3317
3344
  var ItemLabelImage = ({ value }) => {
3318
3345
  const { imageTitle } = useImage(value);
3319
- return /* @__PURE__ */ React48.createElement("span", null, imageTitle);
3346
+ return /* @__PURE__ */ React49.createElement("span", null, imageTitle);
3320
3347
  };
3321
3348
  var ItemLabelGradient = ({ value }) => {
3322
3349
  if (value.value.type.value === "linear") {
3323
- return /* @__PURE__ */ React48.createElement("span", null, __18("Linear Gradient", "elementor"));
3350
+ return /* @__PURE__ */ React49.createElement("span", null, __18("Linear Gradient", "elementor"));
3324
3351
  }
3325
- return /* @__PURE__ */ React48.createElement("span", null, __18("Radial Gradient", "elementor"));
3352
+ return /* @__PURE__ */ React49.createElement("span", null, __18("Radial Gradient", "elementor"));
3326
3353
  };
3327
3354
  var ColorOverlayContent = ({ anchorEl }) => {
3328
3355
  const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
3329
- return /* @__PURE__ */ React48.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React48.createElement(ColorControl, { anchorEl })));
3356
+ return /* @__PURE__ */ React49.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React49.createElement(ColorControl, { anchorEl })));
3330
3357
  };
3331
3358
  var ImageOverlayContent = () => {
3332
3359
  const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
3333
- return /* @__PURE__ */ React48.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React48.createElement(Grid14, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React48.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React48.createElement(
3334
- ImageControl,
3335
- {
3336
- resolutionLabel: __18("Resolution", "elementor"),
3337
- sizes: backgroundResolutionOptions
3338
- }
3339
- )))), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlayAttachment, null)));
3360
+ return /* @__PURE__ */ React49.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React49.createElement(Grid14, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React49.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlFormLabel, null, __18("Resolution", "elementor"))), /* @__PURE__ */ React49.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React49.createElement(ImageControl, { sizes: backgroundResolutionOptions })))))), /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React49.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React49.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React49.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React49.createElement(BackgroundImageOverlayAttachment, null)));
3340
3361
  };
3341
- var StyledUnstableColorIndicator = styled6(UnstableColorIndicator2)(({ theme }) => ({
3362
+ var StyledUnstableColorIndicator = styled5(UnstableColorIndicator2)(({ theme }) => ({
3342
3363
  borderRadius: `${theme.shape.borderRadius / 2}px`
3343
3364
  }));
3344
3365
  var useImage = (image) => {
@@ -3376,11 +3397,11 @@ var BackgroundControl = createControl(() => {
3376
3397
  const propContext = useBoundProp(backgroundPropTypeUtil);
3377
3398
  const isUsingNestedProps = isExperimentActive4("e_v_3_30");
3378
3399
  const colorLabel = __19("Color", "elementor");
3379
- return /* @__PURE__ */ React49.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React49.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React49.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid15, { item: true, xs: 6 }, isUsingNestedProps ? /* @__PURE__ */ React49.createElement(ControlLabel, null, colorLabel) : /* @__PURE__ */ React49.createElement(ControlFormLabel, null, colorLabel)), /* @__PURE__ */ React49.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ColorControl, null)))));
3400
+ return /* @__PURE__ */ React50.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React50.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React50.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid15, { item: true, xs: 6 }, isUsingNestedProps ? /* @__PURE__ */ React50.createElement(ControlLabel, null, colorLabel) : /* @__PURE__ */ React50.createElement(ControlFormLabel, null, colorLabel)), /* @__PURE__ */ React50.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ColorControl, null)))));
3380
3401
  });
3381
3402
 
3382
3403
  // src/controls/switch-control.tsx
3383
- import * as React50 from "react";
3404
+ import * as React51 from "react";
3384
3405
  import { booleanPropTypeUtil as booleanPropTypeUtil2 } from "@elementor/editor-props";
3385
3406
  import { Switch as Switch2 } from "@elementor/ui";
3386
3407
  var SwitchControl2 = createControl(() => {
@@ -3388,8 +3409,228 @@ var SwitchControl2 = createControl(() => {
3388
3409
  const handleChange = (event) => {
3389
3410
  setValue(event.target.checked);
3390
3411
  };
3391
- return /* @__PURE__ */ React50.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React50.createElement(Switch2, { checked: !!value, onChange: handleChange, size: "small", disabled }));
3412
+ return /* @__PURE__ */ React51.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React51.createElement(Switch2, { checked: !!value, onChange: handleChange, size: "small", disabled }));
3392
3413
  });
3414
+
3415
+ // src/controls/repeatable-control.tsx
3416
+ import * as React52 from "react";
3417
+ import { useMemo as useMemo4 } from "react";
3418
+ import { createArrayPropUtils } from "@elementor/editor-props";
3419
+ import { Box as Box8 } from "@elementor/ui";
3420
+
3421
+ // src/hooks/use-repeatable-control-context.ts
3422
+ import { createContext as createContext6, useContext as useContext6 } from "react";
3423
+ var RepeatableControlContext = createContext6(void 0);
3424
+ var useRepeatableControlContext = () => {
3425
+ const context = useContext6(RepeatableControlContext);
3426
+ if (!context) {
3427
+ throw new Error("useRepeatableControlContext must be used within RepeatableControl");
3428
+ }
3429
+ return context;
3430
+ };
3431
+
3432
+ // src/controls/repeatable-control.tsx
3433
+ var RepeatableControl = createControl(
3434
+ ({
3435
+ repeaterLabel,
3436
+ childControlConfig,
3437
+ showDuplicate,
3438
+ showToggle,
3439
+ initialValues,
3440
+ patternLabel,
3441
+ placeholder
3442
+ }) => {
3443
+ const { propTypeUtil: childPropTypeUtil } = childControlConfig;
3444
+ if (!childPropTypeUtil) {
3445
+ return null;
3446
+ }
3447
+ const childArrayPropTypeUtil = useMemo4(
3448
+ () => createArrayPropUtils(childPropTypeUtil.key, childPropTypeUtil.schema),
3449
+ [childPropTypeUtil.key, childPropTypeUtil.schema]
3450
+ );
3451
+ const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil);
3452
+ const ItemLabel4 = ({ value: itemValue }) => {
3453
+ const pattern = patternLabel || "";
3454
+ const finalLabel = interpolate(pattern, itemValue.value);
3455
+ if (finalLabel) {
3456
+ return /* @__PURE__ */ React52.createElement("span", null, finalLabel);
3457
+ }
3458
+ return /* @__PURE__ */ React52.createElement(Box8, { component: "span", color: "text.tertiary" }, placeholder);
3459
+ };
3460
+ return /* @__PURE__ */ React52.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React52.createElement(RepeatableControlContext.Provider, { value: childControlConfig }, /* @__PURE__ */ React52.createElement(
3461
+ Repeater,
3462
+ {
3463
+ openOnAdd: true,
3464
+ values: value ?? [],
3465
+ setValues: setValue,
3466
+ label: repeaterLabel,
3467
+ isSortable: false,
3468
+ itemSettings: {
3469
+ Icon: ItemIcon4,
3470
+ Label: ItemLabel4,
3471
+ Content: ItemContent4,
3472
+ initialValues: childPropTypeUtil.create(initialValues || null)
3473
+ },
3474
+ showDuplicate,
3475
+ showToggle
3476
+ }
3477
+ )));
3478
+ }
3479
+ );
3480
+ var ItemContent4 = ({ bind }) => {
3481
+ return /* @__PURE__ */ React52.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React52.createElement(Content4, null));
3482
+ };
3483
+ var ItemIcon4 = () => /* @__PURE__ */ React52.createElement(React52.Fragment, null);
3484
+ var Content4 = () => {
3485
+ const { component: ChildControl, props = {} } = useRepeatableControlContext();
3486
+ return /* @__PURE__ */ React52.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React52.createElement(PopoverGridContainer, null, /* @__PURE__ */ React52.createElement(ChildControl, { ...props })));
3487
+ };
3488
+ var interpolate = (template, data) => {
3489
+ if (Object.values(data).some((value) => value.value === "" || value === "")) {
3490
+ return null;
3491
+ }
3492
+ return new Function(...Object.keys(data), `return \`${template}\`;`)(...Object.values(data));
3493
+ };
3494
+
3495
+ // src/controls/key-value-control.tsx
3496
+ import * as React53 from "react";
3497
+ import { useMemo as useMemo5, useState as useState11 } from "react";
3498
+ import { keyValuePropTypeUtil } from "@elementor/editor-props";
3499
+ import { FormHelperText, FormLabel as FormLabel3, Grid as Grid16, TextField as TextField9 } from "@elementor/ui";
3500
+ import { __ as __20 } from "@wordpress/i18n";
3501
+ var KeyValueControl = createControl((props = {}) => {
3502
+ const { value, setValue } = useBoundProp(keyValuePropTypeUtil);
3503
+ const [keyError, setKeyError] = useState11(null);
3504
+ const [valueError, setValueError] = useState11(null);
3505
+ const [sessionState, setSessionState] = useState11({
3506
+ key: value?.key?.value || "",
3507
+ value: value?.value?.value || ""
3508
+ });
3509
+ const keyLabel = props.keyName || __20("Key", "elementor");
3510
+ const valueLabel = props.valueName || __20("Value", "elementor");
3511
+ const [keyRegex, valueRegex, errMsg] = useMemo5(
3512
+ () => [
3513
+ props.regexKey ? new RegExp(props.regexKey) : void 0,
3514
+ props.regexValue ? new RegExp(props.regexValue) : void 0,
3515
+ props.validationErrorMessage || __20("Invalid Format", "elementor")
3516
+ ],
3517
+ [props.regexKey, props.regexValue, props.validationErrorMessage]
3518
+ );
3519
+ const validate = (newValue, fieldType) => {
3520
+ if (fieldType === "key" && keyRegex) {
3521
+ const isValid = keyRegex.test(newValue);
3522
+ setKeyError(isValid ? null : errMsg);
3523
+ return isValid;
3524
+ } else if (fieldType === "value" && valueRegex) {
3525
+ const isValid = valueRegex.test(newValue);
3526
+ setValueError(isValid ? null : errMsg);
3527
+ return isValid;
3528
+ }
3529
+ return true;
3530
+ };
3531
+ const handleChange = (event, fieldType) => {
3532
+ const newValue = event.target.value;
3533
+ setSessionState((prev) => ({
3534
+ ...prev,
3535
+ [fieldType]: newValue
3536
+ }));
3537
+ if (validate(newValue, fieldType)) {
3538
+ setValue({
3539
+ ...value,
3540
+ [fieldType]: {
3541
+ value: newValue,
3542
+ $$type: "string"
3543
+ }
3544
+ });
3545
+ } else {
3546
+ setValue({
3547
+ ...value,
3548
+ [fieldType]: {
3549
+ value: "",
3550
+ $$type: "string"
3551
+ }
3552
+ });
3553
+ }
3554
+ };
3555
+ const isKeyInvalid = keyError !== null;
3556
+ const isValueInvalid = valueError !== null;
3557
+ return /* @__PURE__ */ React53.createElement(ControlActions, null, /* @__PURE__ */ React53.createElement(Grid16, { container: true, gap: 1.5 }, /* @__PURE__ */ React53.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(FormLabel3, { size: "tiny" }, keyLabel), /* @__PURE__ */ React53.createElement(
3558
+ TextField9,
3559
+ {
3560
+ autoFocus: true,
3561
+ sx: { pt: 1 },
3562
+ size: "tiny",
3563
+ fullWidth: true,
3564
+ value: sessionState.key,
3565
+ onChange: (e) => handleChange(e, "key"),
3566
+ error: isKeyInvalid
3567
+ }
3568
+ ), isKeyInvalid && /* @__PURE__ */ React53.createElement(FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React53.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(FormLabel3, { size: "tiny" }, valueLabel), /* @__PURE__ */ React53.createElement(
3569
+ TextField9,
3570
+ {
3571
+ sx: { pt: 1 },
3572
+ size: "tiny",
3573
+ fullWidth: true,
3574
+ value: sessionState.value,
3575
+ onChange: (e) => handleChange(e, "value"),
3576
+ disabled: isKeyInvalid,
3577
+ error: isValueInvalid
3578
+ }
3579
+ ), isValueInvalid && /* @__PURE__ */ React53.createElement(FormHelperText, { error: true }, valueError))));
3580
+ });
3581
+
3582
+ // src/controls/position-control.tsx
3583
+ import * as React54 from "react";
3584
+ import { useMemo as useMemo6 } from "react";
3585
+ import { positionPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil11 } from "@elementor/editor-props";
3586
+ import { MenuListItem as MenuListItem6 } from "@elementor/editor-ui";
3587
+ import { isExperimentActive as isExperimentActive5 } from "@elementor/editor-v1-adapters";
3588
+ import { LetterXIcon as LetterXIcon2, LetterYIcon as LetterYIcon2 } from "@elementor/icons";
3589
+ import { Grid as Grid17, Select as Select5 } from "@elementor/ui";
3590
+ import { __ as __21 } from "@wordpress/i18n";
3591
+ var positionOptions = [
3592
+ { label: __21("Center center", "elementor"), value: "center center" },
3593
+ { label: __21("Center left", "elementor"), value: "center left" },
3594
+ { label: __21("Center right", "elementor"), value: "center right" },
3595
+ { label: __21("Top center", "elementor"), value: "top center" },
3596
+ { label: __21("Top left", "elementor"), value: "top left" },
3597
+ { label: __21("Top right", "elementor"), value: "top right" },
3598
+ { label: __21("Bottom center", "elementor"), value: "bottom center" },
3599
+ { label: __21("Bottom left", "elementor"), value: "bottom left" },
3600
+ { label: __21("Bottom right", "elementor"), value: "bottom right" }
3601
+ ];
3602
+ var PositionControl = () => {
3603
+ const positionContext = useBoundProp(positionPropTypeUtil);
3604
+ const stringPropContext = useBoundProp(stringPropTypeUtil11);
3605
+ const isVersion331Active = isExperimentActive5("e_v_3_31");
3606
+ const isCustom = !!positionContext.value && isVersion331Active;
3607
+ const availablePositionOptions = useMemo6(() => {
3608
+ const options = [...positionOptions];
3609
+ if (isVersion331Active) {
3610
+ options.push({ label: __21("Custom", "elementor"), value: "custom" });
3611
+ }
3612
+ return options;
3613
+ }, [isVersion331Active]);
3614
+ const handlePositionChange = (event) => {
3615
+ const value = event.target.value || null;
3616
+ if (value === "custom" && isVersion331Active) {
3617
+ positionContext.setValue({ x: null, y: null });
3618
+ } else {
3619
+ stringPropContext.setValue(value);
3620
+ }
3621
+ };
3622
+ return /* @__PURE__ */ React54.createElement(Grid17, { container: true, spacing: 1.5 }, /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlFormLabel, null, __21("Object position", "elementor"))), /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React54.createElement(
3623
+ Select5,
3624
+ {
3625
+ size: "tiny",
3626
+ disabled: stringPropContext.disabled,
3627
+ value: (positionContext.value ? "custom" : stringPropContext.value) ?? "",
3628
+ onChange: handlePositionChange,
3629
+ fullWidth: true
3630
+ },
3631
+ availablePositionOptions.map(({ label, value }) => /* @__PURE__ */ React54.createElement(MenuListItem6, { key: value, value: value ?? "" }, label))
3632
+ )))), isCustom && /* @__PURE__ */ React54.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(Grid17, { container: true, spacing: 1.5 }, /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React54.createElement(SizeControl, { startIcon: /* @__PURE__ */ React54.createElement(LetterXIcon2, { fontSize: "tiny" }) }))), /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React54.createElement(SizeControl, { startIcon: /* @__PURE__ */ React54.createElement(LetterYIcon2, { fontSize: "tiny" }) })))))));
3633
+ };
3393
3634
  export {
3394
3635
  AspectRatioControl,
3395
3636
  BackgroundControl,
@@ -3402,15 +3643,20 @@ export {
3402
3643
  ControlReplacementsProvider,
3403
3644
  ControlToggleButtonGroup,
3404
3645
  EqualUnequalSizesControl,
3646
+ FilterRepeaterControl,
3405
3647
  FontFamilyControl,
3406
3648
  FontFamilySelector,
3407
3649
  GapControl,
3408
3650
  ImageControl,
3651
+ KeyValueControl,
3409
3652
  LinkControl,
3410
3653
  LinkedDimensionsControl,
3411
3654
  NumberControl,
3655
+ PopoverContent,
3656
+ PositionControl,
3412
3657
  PropKeyProvider,
3413
3658
  PropProvider,
3659
+ RepeatableControl,
3414
3660
  SelectControl,
3415
3661
  SizeControl,
3416
3662
  StrokeControl,