@elementor/editor-interactions 4.0.0-552 → 4.0.0-564

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -132,10 +132,10 @@ var PopupStateProvider = ({ children }) => {
132
132
  // src/components/interactions-list.tsx
133
133
  var React12 = __toESM(require("react"));
134
134
  var import_react9 = require("react");
135
- var import_editor_controls6 = require("@elementor/editor-controls");
135
+ var import_editor_controls7 = require("@elementor/editor-controls");
136
136
  var import_icons3 = require("@elementor/icons");
137
137
  var import_ui6 = require("@elementor/ui");
138
- var import_i18n8 = require("@wordpress/i18n");
138
+ var import_i18n7 = require("@wordpress/i18n");
139
139
 
140
140
  // src/contexts/interactions-item-context.tsx
141
141
  var React4 = __toESM(require("react"));
@@ -378,14 +378,14 @@ var buildDisplayLabel = (item) => {
378
378
  var React11 = __toESM(require("react"));
379
379
  var import_react8 = require("react");
380
380
  var import_ui5 = require("@elementor/ui");
381
- var import_i18n7 = require("@wordpress/i18n");
381
+ var import_i18n6 = require("@wordpress/i18n");
382
382
 
383
383
  // src/components/interaction-details.tsx
384
384
  var React9 = __toESM(require("react"));
385
385
  var import_react6 = require("react");
386
- var import_editor_controls4 = require("@elementor/editor-controls");
386
+ var import_editor_controls5 = require("@elementor/editor-controls");
387
387
  var import_ui3 = require("@elementor/ui");
388
- var import_i18n5 = require("@wordpress/i18n");
388
+ var import_i18n4 = require("@wordpress/i18n");
389
389
 
390
390
  // src/interactions-controls-registry.ts
391
391
  var controlsRegistry = /* @__PURE__ */ new Map();
@@ -400,6 +400,20 @@ function getInteractionsControl(type) {
400
400
  return controlsRegistry.get(type);
401
401
  }
402
402
 
403
+ // src/utils/resolve-direction.ts
404
+ var resolveDirection = (hasDirection, newEffect, newDirection, currentDirection, currentEffect) => {
405
+ if (newEffect === "slide" && !newDirection) {
406
+ return "top";
407
+ }
408
+ if (currentEffect === "slide" && hasDirection) {
409
+ return newDirection ?? "top";
410
+ }
411
+ if (hasDirection) {
412
+ return newDirection;
413
+ }
414
+ return currentDirection;
415
+ };
416
+
403
417
  // src/components/controls/direction.tsx
404
418
  var React5 = __toESM(require("react"));
405
419
  var import_react4 = require("react");
@@ -439,56 +453,30 @@ function Direction({ value, onChange, interactionType }) {
439
453
  return /* @__PURE__ */ React5.createElement(import_editor_controls.ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value });
440
454
  }
441
455
 
442
- // src/components/controls/effect.tsx
443
- var React6 = __toESM(require("react"));
444
- var import_editor_ui = require("@elementor/editor-ui");
445
- var import_ui2 = require("@elementor/ui");
446
- var import_i18n3 = require("@wordpress/i18n");
447
- function Effect({ value, onChange }) {
448
- const availableEffects = [
449
- { key: "fade", label: (0, import_i18n3.__)("Fade", "elementor") },
450
- { key: "slide", label: (0, import_i18n3.__)("Slide", "elementor") },
451
- { key: "scale", label: (0, import_i18n3.__)("Scale", "elementor") }
452
- ];
453
- return /* @__PURE__ */ React6.createElement(
454
- import_ui2.Select,
455
- {
456
- fullWidth: true,
457
- displayEmpty: true,
458
- size: "tiny",
459
- value,
460
- onChange: (event) => onChange(event.target.value)
461
- },
462
- availableEffects.map((effect) => {
463
- return /* @__PURE__ */ React6.createElement(import_editor_ui.MenuListItem, { key: effect.key, value: effect.key }, effect.label);
464
- })
465
- );
466
- }
467
-
468
456
  // src/components/controls/effect-type.tsx
469
- var React7 = __toESM(require("react"));
457
+ var React6 = __toESM(require("react"));
470
458
  var import_editor_controls2 = require("@elementor/editor-controls");
471
- var import_i18n4 = require("@wordpress/i18n");
459
+ var import_i18n3 = require("@wordpress/i18n");
472
460
  function EffectType({ value, onChange }) {
473
461
  const options = [
474
462
  {
475
463
  value: "in",
476
- label: (0, import_i18n4.__)("In", "elementor"),
477
- renderContent: () => (0, import_i18n4.__)("In", "elementor"),
464
+ label: (0, import_i18n3.__)("In", "elementor"),
465
+ renderContent: () => (0, import_i18n3.__)("In", "elementor"),
478
466
  showTooltip: true
479
467
  },
480
468
  {
481
469
  value: "out",
482
- label: (0, import_i18n4.__)("Out", "elementor"),
483
- renderContent: () => (0, import_i18n4.__)("Out", "elementor"),
470
+ label: (0, import_i18n3.__)("Out", "elementor"),
471
+ renderContent: () => (0, import_i18n3.__)("Out", "elementor"),
484
472
  showTooltip: true
485
473
  }
486
474
  ];
487
- return /* @__PURE__ */ React7.createElement(import_editor_controls2.ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value });
475
+ return /* @__PURE__ */ React6.createElement(import_editor_controls2.ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value });
488
476
  }
489
477
 
490
478
  // src/components/controls/time-frame-indicator.tsx
491
- var React8 = __toESM(require("react"));
479
+ var React7 = __toESM(require("react"));
492
480
  var import_react5 = require("react");
493
481
  var import_editor_controls3 = require("@elementor/editor-controls");
494
482
 
@@ -530,7 +518,7 @@ function TimeFrameIndicator({
530
518
  setValue(parseSizeValue(defaultValue, TIME_UNITS, void 0, DEFAULT_TIME_UNIT));
531
519
  }
532
520
  };
533
- return /* @__PURE__ */ React8.createElement(
521
+ return /* @__PURE__ */ React7.createElement(
534
522
  import_editor_controls3.UnstableSizeField,
535
523
  {
536
524
  units: TIME_UNITS,
@@ -546,6 +534,14 @@ function TimeFrameIndicator({
546
534
  );
547
535
  }
548
536
 
537
+ // src/components/field.tsx
538
+ var React8 = __toESM(require("react"));
539
+ var import_editor_controls4 = require("@elementor/editor-controls");
540
+ var import_ui2 = require("@elementor/ui");
541
+ var Field = ({ label, children }) => {
542
+ return /* @__PURE__ */ React8.createElement(import_ui2.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React8.createElement(import_editor_controls4.PopoverGridContainer, null, /* @__PURE__ */ React8.createElement(import_ui2.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React8.createElement(import_editor_controls4.ControlFormLabel, null, label)), /* @__PURE__ */ React8.createElement(import_ui2.Grid, { item: true, xs: 6 }, children)));
543
+ };
544
+
549
545
  // src/components/interaction-details.tsx
550
546
  var DEFAULT_VALUES = {
551
547
  trigger: "load",
@@ -560,7 +556,7 @@ var DEFAULT_VALUES = {
560
556
  offsetTop: 15,
561
557
  offsetBottom: 85
562
558
  };
563
- var TRIGGERS_WITHOUT_REPLAY = ["load", "scrollOn"];
559
+ var TRIGGERS_WITHOUT_REPLAY = ["load", "scrollOn", "hover", "click"];
564
560
  var controlVisibilityConfig = {
565
561
  replay: (values) => !TRIGGERS_WITHOUT_REPLAY.includes(values.trigger),
566
562
  relativeTo: (values) => values.trigger === "scrollOn",
@@ -612,6 +608,7 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
612
608
  offsetBottom
613
609
  };
614
610
  const TriggerControl = useControlComponent("trigger", true);
611
+ const EffectControl = useControlComponent("effect");
615
612
  const ReplayControl = useControlComponent("replay", controlVisibilityConfig.replay(interactionValues));
616
613
  const RelativeToControl = useControlComponent(
617
614
  "relativeTo",
@@ -623,17 +620,14 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
623
620
  controlVisibilityConfig.offsetBottom(interactionValues)
624
621
  );
625
622
  const EasingControl = useControlComponent("easing");
626
- const resolveDirection = (hasDirection, newEffect, newDirection) => {
627
- if (newEffect === "slide" && !newDirection) {
628
- return "top";
629
- }
630
- if (hasDirection) {
631
- return newDirection;
632
- }
633
- return direction;
634
- };
635
623
  const updateInteraction = (updates) => {
636
- const resolvedDirectionValue = resolveDirection("direction" in updates, updates.effect, updates.direction);
624
+ const resolvedDirectionValue = resolveDirection(
625
+ "direction" in updates,
626
+ updates.effect,
627
+ updates.direction,
628
+ direction,
629
+ effect
630
+ );
637
631
  const updatedInteraction = {
638
632
  ...interaction,
639
633
  interaction_id: interaction.interaction_id,
@@ -657,53 +651,53 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
657
651
  onPlayInteraction(interactionId);
658
652
  }, 0);
659
653
  };
660
- return /* @__PURE__ */ React9.createElement(import_editor_controls4.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React9.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, TriggerControl && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Trigger", "elementor") }, /* @__PURE__ */ React9.createElement(TriggerControl, { value: trigger, onChange: (v) => updateInteraction({ trigger: v }) })), ReplayControl && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Replay", "elementor") }, /* @__PURE__ */ React9.createElement(
654
+ return /* @__PURE__ */ React9.createElement(import_editor_controls5.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React9.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, TriggerControl && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Trigger", "elementor") }, /* @__PURE__ */ React9.createElement(TriggerControl, { value: trigger, onChange: (v) => updateInteraction({ trigger: v }) })), ReplayControl && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Replay", "elementor") }, /* @__PURE__ */ React9.createElement(
661
655
  ReplayControl,
662
656
  {
663
657
  value: replay,
664
658
  onChange: (v) => updateInteraction({ replay: v }),
665
659
  disabled: true
666
660
  }
667
- ))), /* @__PURE__ */ React9.createElement(import_ui3.Divider, null), /* @__PURE__ */ React9.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Effect", "elementor") }, /* @__PURE__ */ React9.createElement(Effect, { value: effect, onChange: (v) => updateInteraction({ effect: v }) })), /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Type", "elementor") }, /* @__PURE__ */ React9.createElement(EffectType, { value: type, onChange: (v) => updateInteraction({ type: v }) })), /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Direction", "elementor") }, /* @__PURE__ */ React9.createElement(
661
+ ))), /* @__PURE__ */ React9.createElement(import_ui3.Divider, null), /* @__PURE__ */ React9.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, EffectControl && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Effect", "elementor") }, /* @__PURE__ */ React9.createElement(EffectControl, { value: effect, onChange: (v) => updateInteraction({ effect: v }) })), /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Type", "elementor") }, /* @__PURE__ */ React9.createElement(EffectType, { value: type, onChange: (v) => updateInteraction({ type: v }) })), /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Direction", "elementor") }, /* @__PURE__ */ React9.createElement(
668
662
  Direction,
669
663
  {
670
664
  value: direction,
671
665
  onChange: (v) => updateInteraction({ direction: v }),
672
666
  interactionType: type
673
667
  }
674
- )), controlVisibilityConfig.duration(interactionValues) && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Duration", "elementor") }, /* @__PURE__ */ React9.createElement(
668
+ )), controlVisibilityConfig.duration(interactionValues) && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Duration", "elementor") }, /* @__PURE__ */ React9.createElement(
675
669
  TimeFrameIndicator,
676
670
  {
677
671
  value: String(duration),
678
672
  onChange: (v) => updateInteraction({ duration: v }),
679
673
  defaultValue: DEFAULT_VALUES.duration
680
674
  }
681
- )), controlVisibilityConfig.delay(interactionValues) && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Delay", "elementor") }, /* @__PURE__ */ React9.createElement(
675
+ )), controlVisibilityConfig.delay(interactionValues) && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Delay", "elementor") }, /* @__PURE__ */ React9.createElement(
682
676
  TimeFrameIndicator,
683
677
  {
684
678
  value: String(delay),
685
679
  onChange: (v) => updateInteraction({ delay: v }),
686
680
  defaultValue: DEFAULT_VALUES.delay
687
681
  }
688
- ))), controlVisibilityConfig.relativeTo(interactionValues) && RelativeToControl && /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(import_ui3.Divider, null), /* @__PURE__ */ React9.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Relative To", "elementor") }, /* @__PURE__ */ React9.createElement(
682
+ ))), controlVisibilityConfig.relativeTo(interactionValues) && RelativeToControl && /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(import_ui3.Divider, null), /* @__PURE__ */ React9.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Relative To", "elementor") }, /* @__PURE__ */ React9.createElement(
689
683
  RelativeToControl,
690
684
  {
691
685
  value: relativeTo,
692
686
  onChange: (v) => updateInteraction({ relativeTo: v })
693
687
  }
694
- )), OffsetTopControl && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Offset Top", "elementor") }, /* @__PURE__ */ React9.createElement(
688
+ )), OffsetTopControl && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Offset Top", "elementor") }, /* @__PURE__ */ React9.createElement(
695
689
  OffsetTopControl,
696
690
  {
697
691
  value: String(parseSizeValue(offsetTop, ["%"]).size),
698
692
  onChange: (v) => updateInteraction({ offsetTop: v })
699
693
  }
700
- )), OffsetBottomControl && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Offset Bottom", "elementor") }, /* @__PURE__ */ React9.createElement(
694
+ )), OffsetBottomControl && /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Offset Bottom", "elementor") }, /* @__PURE__ */ React9.createElement(
701
695
  OffsetBottomControl,
702
696
  {
703
697
  value: String(parseSizeValue(offsetBottom, ["%"]).size),
704
698
  onChange: (v) => updateInteraction({ offsetBottom: v })
705
699
  }
706
- ))), /* @__PURE__ */ React9.createElement(import_ui3.Divider, null)), EasingControl && /* @__PURE__ */ React9.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n5.__)("Easing", "elementor") }, /* @__PURE__ */ React9.createElement(
700
+ ))), /* @__PURE__ */ React9.createElement(import_ui3.Divider, null)), EasingControl && /* @__PURE__ */ React9.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React9.createElement(Field, { label: (0, import_i18n4.__)("Easing", "elementor") }, /* @__PURE__ */ React9.createElement(
707
701
  EasingControl,
708
702
  {
709
703
  value: easing,
@@ -713,17 +707,14 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
713
707
  }
714
708
  ))));
715
709
  };
716
- function Field({ label, children }) {
717
- return /* @__PURE__ */ React9.createElement(import_ui3.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React9.createElement(import_editor_controls4.PopoverGridContainer, null, /* @__PURE__ */ React9.createElement(import_ui3.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React9.createElement(import_editor_controls4.ControlFormLabel, null, label)), /* @__PURE__ */ React9.createElement(import_ui3.Grid, { item: true, xs: 6 }, children)));
718
- }
719
710
 
720
711
  // src/components/interaction-settings.tsx
721
712
  var React10 = __toESM(require("react"));
722
713
  var import_react7 = require("react");
723
- var import_editor_controls5 = require("@elementor/editor-controls");
714
+ var import_editor_controls6 = require("@elementor/editor-controls");
724
715
  var import_editor_responsive = require("@elementor/editor-responsive");
725
716
  var import_ui4 = require("@elementor/ui");
726
- var import_i18n6 = require("@wordpress/i18n");
717
+ var import_i18n5 = require("@wordpress/i18n");
727
718
  var SIZE = "tiny";
728
719
  var InteractionSettings = ({ interaction, onChange }) => {
729
720
  const breakpoints = (0, import_editor_responsive.useBreakpoints)();
@@ -757,7 +748,7 @@ var InteractionSettings = ({ interaction, onChange }) => {
757
748
  },
758
749
  [interaction, availableBreakpoints, onChange]
759
750
  );
760
- return /* @__PURE__ */ React10.createElement(import_editor_controls5.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React10.createElement(import_ui4.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React10.createElement(import_ui4.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React10.createElement(import_ui4.Stack, { direction: "column", gap: 1 }, /* @__PURE__ */ React10.createElement(import_editor_controls5.ControlFormLabel, { sx: { width: "100%" } }, (0, import_i18n6.__)("Trigger on", "elementor")), /* @__PURE__ */ React10.createElement(
751
+ return /* @__PURE__ */ React10.createElement(import_editor_controls6.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React10.createElement(import_ui4.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React10.createElement(import_ui4.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React10.createElement(import_ui4.Stack, { direction: "column", gap: 1 }, /* @__PURE__ */ React10.createElement(import_editor_controls6.ControlFormLabel, { sx: { width: "100%" } }, (0, import_i18n5.__)("Trigger on", "elementor")), /* @__PURE__ */ React10.createElement(
761
752
  import_ui4.Autocomplete,
762
753
  {
763
754
  fullWidth: true,
@@ -801,11 +792,11 @@ var InteractionsListItem = ({
801
792
  {
802
793
  size: "small",
803
794
  variant: "fullWidth",
804
- "aria-label": (0, import_i18n7.__)("Interaction", "elementor"),
795
+ "aria-label": (0, import_i18n6.__)("Interaction", "elementor"),
805
796
  ...getTabsProps()
806
797
  },
807
- /* @__PURE__ */ React11.createElement(import_ui5.Tab, { label: (0, import_i18n7.__)("Details", "elementor"), ...getTabProps("details") }),
808
- /* @__PURE__ */ React11.createElement(import_ui5.Tab, { label: (0, import_i18n7.__)("Settings", "elementor"), ...getTabProps("settings") })
798
+ /* @__PURE__ */ React11.createElement(import_ui5.Tab, { label: (0, import_i18n6.__)("Details", "elementor"), ...getTabProps("details") }),
799
+ /* @__PURE__ */ React11.createElement(import_ui5.Tab, { label: (0, import_i18n6.__)("Settings", "elementor"), ...getTabProps("settings") })
809
800
  ), /* @__PURE__ */ React11.createElement(import_ui5.Divider, null), /* @__PURE__ */ React11.createElement(import_ui5.TabPanel, { sx: { p: 0 }, ...getTabPanelProps("details") }, /* @__PURE__ */ React11.createElement(
810
801
  InteractionDetails,
811
802
  {
@@ -848,7 +839,7 @@ function InteractionsList(props) {
848
839
  const isMaxNumberOfInteractionsReached = (0, import_react9.useMemo)(() => {
849
840
  return interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;
850
841
  }, [interactions.items?.length]);
851
- const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React12.createElement(import_ui6.Alert, { color: "secondary", icon: /* @__PURE__ */ React12.createElement(import_icons3.InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React12.createElement(import_ui6.AlertTitle, null, (0, import_i18n8.__)("Interactions", "elementor")), /* @__PURE__ */ React12.createElement(import_ui6.Box, { component: "span" }, (0, import_i18n8.__)(
842
+ const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React12.createElement(import_ui6.Alert, { color: "secondary", icon: /* @__PURE__ */ React12.createElement(import_icons3.InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React12.createElement(import_ui6.AlertTitle, null, (0, import_i18n7.__)("Interactions", "elementor")), /* @__PURE__ */ React12.createElement(import_ui6.Box, { component: "span" }, (0, import_i18n7.__)(
852
843
  "You've reached the limit of 5 interactions for this element. Please remove an interaction before creating a new one.",
853
844
  "elementor"
854
845
  ))) : void 0;
@@ -883,11 +874,11 @@ function InteractionsList(props) {
883
874
  [handleInteractionChange, onPlayInteraction]
884
875
  );
885
876
  return /* @__PURE__ */ React12.createElement(InteractionItemContextProvider, { value: contextValue }, /* @__PURE__ */ React12.createElement(
886
- import_editor_controls6.Repeater,
877
+ import_editor_controls7.Repeater,
887
878
  {
888
879
  openOnAdd: true,
889
880
  openItem: triggerCreateOnShowEmpty ? 0 : void 0,
890
- label: (0, import_i18n8.__)("Interactions", "elementor"),
881
+ label: (0, import_i18n7.__)("Interactions", "elementor"),
891
882
  values: interactions.items,
892
883
  setValues: handleRepeaterChange,
893
884
  showDuplicate: false,
@@ -900,10 +891,10 @@ function InteractionsList(props) {
900
891
  Label: ({ value }) => buildDisplayLabel(value.value),
901
892
  Icon: () => null,
902
893
  Content: InteractionsListItem,
903
- actions: (value) => /* @__PURE__ */ React12.createElement(import_ui6.Tooltip, { key: "preview", placement: "top", title: (0, import_i18n8.__)("Preview", "elementor") }, /* @__PURE__ */ React12.createElement(
894
+ actions: (value) => /* @__PURE__ */ React12.createElement(import_ui6.Tooltip, { key: "preview", placement: "top", title: (0, import_i18n7.__)("Preview", "elementor") }, /* @__PURE__ */ React12.createElement(
904
895
  import_ui6.IconButton,
905
896
  {
906
- "aria-label": (0, import_i18n8.__)("Play interaction", "elementor"),
897
+ "aria-label": (0, import_i18n7.__)("Play interaction", "elementor"),
907
898
  size: "tiny",
908
899
  onClick: () => onPlayInteraction(extractString(value.value.interaction_id))
909
900
  },
@@ -1119,17 +1110,17 @@ var documentElementsInteractionsProvider = createInteractionsProvider({
1119
1110
 
1120
1111
  // src/components/controls/easing.tsx
1121
1112
  var React14 = __toESM(require("react"));
1122
- var import_editor_ui2 = require("@elementor/editor-ui");
1113
+ var import_editor_ui = require("@elementor/editor-ui");
1123
1114
  var import_ui8 = require("@elementor/ui");
1124
- var import_i18n9 = require("@wordpress/i18n");
1115
+ var import_i18n8 = require("@wordpress/i18n");
1125
1116
  var EASING_OPTIONS = {
1126
- easeIn: (0, import_i18n9.__)("Ease In", "elementor"),
1127
- easeInOut: (0, import_i18n9.__)("Ease In Out", "elementor"),
1128
- easeOut: (0, import_i18n9.__)("Ease Out", "elementor"),
1129
- backIn: (0, import_i18n9.__)("Back In", "elementor"),
1130
- backInOut: (0, import_i18n9.__)("Back In Out", "elementor"),
1131
- backOut: (0, import_i18n9.__)("Back Out", "elementor"),
1132
- linear: (0, import_i18n9.__)("Linear", "elementor")
1117
+ easeIn: (0, import_i18n8.__)("Ease In", "elementor"),
1118
+ easeInOut: (0, import_i18n8.__)("Ease In Out", "elementor"),
1119
+ easeOut: (0, import_i18n8.__)("Ease Out", "elementor"),
1120
+ backIn: (0, import_i18n8.__)("Back In", "elementor"),
1121
+ backInOut: (0, import_i18n8.__)("Back In Out", "elementor"),
1122
+ backOut: (0, import_i18n8.__)("Back Out", "elementor"),
1123
+ linear: (0, import_i18n8.__)("Linear", "elementor")
1133
1124
  };
1134
1125
  var DEFAULT_EASING = "easeIn";
1135
1126
  function Easing({}) {
@@ -1140,13 +1131,39 @@ function Easing({}) {
1140
1131
  return /* @__PURE__ */ React14.createElement(import_ui8.Select, { value: DEFAULT_EASING, onChange: () => {
1141
1132
  }, fullWidth: true, displayEmpty: true, size: "tiny" }, availableOptions.map((option) => {
1142
1133
  const isDisabled = DEFAULT_EASING !== option.key;
1143
- return /* @__PURE__ */ React14.createElement(import_editor_ui2.MenuListItem, { key: option.key, value: option.key, disabled: isDisabled }, option.label);
1134
+ return /* @__PURE__ */ React14.createElement(import_editor_ui.MenuListItem, { key: option.key, value: option.key, disabled: isDisabled }, option.label);
1144
1135
  }));
1145
1136
  }
1146
1137
 
1147
- // src/components/controls/replay.tsx
1138
+ // src/components/controls/effect.tsx
1148
1139
  var React15 = __toESM(require("react"));
1149
- var import_editor_controls7 = require("@elementor/editor-controls");
1140
+ var import_editor_ui2 = require("@elementor/editor-ui");
1141
+ var import_ui9 = require("@elementor/ui");
1142
+ var import_i18n9 = require("@wordpress/i18n");
1143
+ function Effect({ value, onChange }) {
1144
+ const availableEffects = [
1145
+ { key: "fade", label: (0, import_i18n9.__)("Fade", "elementor") },
1146
+ { key: "slide", label: (0, import_i18n9.__)("Slide", "elementor") },
1147
+ { key: "scale", label: (0, import_i18n9.__)("Scale", "elementor") }
1148
+ ];
1149
+ return /* @__PURE__ */ React15.createElement(
1150
+ import_ui9.Select,
1151
+ {
1152
+ fullWidth: true,
1153
+ displayEmpty: true,
1154
+ size: "tiny",
1155
+ value,
1156
+ onChange: (event) => onChange(event.target.value)
1157
+ },
1158
+ availableEffects.map((effect) => {
1159
+ return /* @__PURE__ */ React15.createElement(import_editor_ui2.MenuListItem, { key: effect.key, value: effect.key }, effect.label);
1160
+ })
1161
+ );
1162
+ }
1163
+
1164
+ // src/components/controls/replay.tsx
1165
+ var React16 = __toESM(require("react"));
1166
+ var import_editor_controls8 = require("@elementor/editor-controls");
1150
1167
  var import_icons4 = require("@elementor/icons");
1151
1168
  var import_i18n10 = require("@wordpress/i18n");
1152
1169
  function Replay({ onChange }) {
@@ -1155,22 +1172,22 @@ function Replay({ onChange }) {
1155
1172
  value: false,
1156
1173
  disabled: false,
1157
1174
  label: (0, import_i18n10.__)("No", "elementor"),
1158
- renderContent: ({ size }) => /* @__PURE__ */ React15.createElement(import_icons4.MinusIcon, { fontSize: size })
1175
+ renderContent: ({ size }) => /* @__PURE__ */ React16.createElement(import_icons4.MinusIcon, { fontSize: size })
1159
1176
  },
1160
1177
  {
1161
1178
  value: true,
1162
1179
  disabled: true,
1163
1180
  label: (0, import_i18n10.__)("Yes", "elementor"),
1164
- renderContent: ({ size }) => /* @__PURE__ */ React15.createElement(import_icons4.CheckIcon, { fontSize: size })
1181
+ renderContent: ({ size }) => /* @__PURE__ */ React16.createElement(import_icons4.CheckIcon, { fontSize: size })
1165
1182
  }
1166
1183
  ];
1167
- return /* @__PURE__ */ React15.createElement(import_editor_controls7.ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value: false });
1184
+ return /* @__PURE__ */ React16.createElement(import_editor_controls8.ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value: false });
1168
1185
  }
1169
1186
 
1170
1187
  // src/components/controls/trigger.tsx
1171
- var React16 = __toESM(require("react"));
1188
+ var React17 = __toESM(require("react"));
1172
1189
  var import_editor_ui3 = require("@elementor/editor-ui");
1173
- var import_ui9 = require("@elementor/ui");
1190
+ var import_ui10 = require("@elementor/ui");
1174
1191
  var import_i18n11 = require("@wordpress/i18n");
1175
1192
  function Trigger({ value, onChange }) {
1176
1193
  const availableTriggers = Object.entries({
@@ -1181,8 +1198,8 @@ function Trigger({ value, onChange }) {
1181
1198
  key,
1182
1199
  label
1183
1200
  }));
1184
- return /* @__PURE__ */ React16.createElement(
1185
- import_ui9.Select,
1201
+ return /* @__PURE__ */ React17.createElement(
1202
+ import_ui10.Select,
1186
1203
  {
1187
1204
  fullWidth: true,
1188
1205
  displayEmpty: true,
@@ -1191,7 +1208,7 @@ function Trigger({ value, onChange }) {
1191
1208
  value
1192
1209
  },
1193
1210
  availableTriggers.map((trigger) => {
1194
- return /* @__PURE__ */ React16.createElement(import_editor_ui3.MenuListItem, { key: trigger.key, value: trigger.key }, trigger.label);
1211
+ return /* @__PURE__ */ React17.createElement(import_editor_ui3.MenuListItem, { key: trigger.key, value: trigger.key }, trigger.label);
1195
1212
  })
1196
1213
  );
1197
1214
  }
@@ -1254,6 +1271,11 @@ function init() {
1254
1271
  component: Replay,
1255
1272
  options: ["true", "false"]
1256
1273
  });
1274
+ registerInteractionsControl({
1275
+ type: "effect",
1276
+ component: Effect,
1277
+ options: ["fade", "slide", "scale"]
1278
+ });
1257
1279
  } catch (error) {
1258
1280
  throw error;
1259
1281
  }