@elementor/editor-interactions 4.4.1 → 4.4.2
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.d.mts +4 -12
- package/dist/index.d.ts +4 -12
- package/dist/index.js +2 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -13
- package/src/components/empty-state.tsx +3 -13
- package/src/components/interactions-list.tsx +0 -2
- package/src/components/interactions-tab.tsx +0 -1
- package/src/index.ts +0 -1
- package/src/components/interactions-header-location.tsx +0 -12
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
// src/components/empty-state.tsx
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { SwipeIcon } from "@elementor/icons";
|
|
4
|
-
import {
|
|
4
|
+
import { Button, Stack, Typography } from "@elementor/ui";
|
|
5
5
|
import { __ } from "@wordpress/i18n";
|
|
6
|
-
|
|
7
|
-
// src/components/interactions-header-location.tsx
|
|
8
|
-
import { createLocation } from "@elementor/locations";
|
|
9
|
-
var {
|
|
10
|
-
Slot: InteractionsHeaderSlot,
|
|
11
|
-
inject: injectIntoInteractionsHeader,
|
|
12
|
-
useInjections: useInteractionsHeaderInjections
|
|
13
|
-
} = createLocation();
|
|
14
|
-
|
|
15
|
-
// src/components/empty-state.tsx
|
|
16
|
-
var EmptyState = ({ elementId, onCreateInteraction }) => {
|
|
6
|
+
var EmptyState = ({ onCreateInteraction }) => {
|
|
17
7
|
return /* @__PURE__ */ React.createElement(
|
|
18
8
|
Stack,
|
|
19
9
|
{
|
|
@@ -21,10 +11,9 @@ var EmptyState = ({ elementId, onCreateInteraction }) => {
|
|
|
21
11
|
justifyContent: "center",
|
|
22
12
|
height: "100%",
|
|
23
13
|
color: "text.secondary",
|
|
24
|
-
sx: {
|
|
14
|
+
sx: { p: 2.5, pt: 8, pb: 5.5 },
|
|
25
15
|
gap: 1.5
|
|
26
16
|
},
|
|
27
|
-
/* @__PURE__ */ React.createElement(Box, { sx: { position: "absolute", top: 8, insetInlineEnd: 8 } }, /* @__PURE__ */ React.createElement(InteractionsHeaderSlot, { elementId })),
|
|
28
17
|
/* @__PURE__ */ React.createElement(SwipeIcon, { fontSize: "large" }),
|
|
29
18
|
/* @__PURE__ */ React.createElement(Typography, { align: "center", variant: "subtitle2" }, __("Animate elements with Interactions", "elementor")),
|
|
30
19
|
/* @__PURE__ */ React.createElement(Typography, { align: "center", variant: "caption", maxWidth: "170px" }, __(
|
|
@@ -575,7 +564,7 @@ import * as React10 from "react";
|
|
|
575
564
|
import { useCallback as useCallback5, useEffect as useEffect2, useMemo as useMemo4, useRef } from "react";
|
|
576
565
|
import { Repeater } from "@elementor/editor-controls";
|
|
577
566
|
import { InfoCircleFilledIcon, PlayerPlayIcon } from "@elementor/icons";
|
|
578
|
-
import { Alert, AlertTitle, Box
|
|
567
|
+
import { Alert, AlertTitle, Box, IconButton, Tooltip } from "@elementor/ui";
|
|
579
568
|
import { __ as __6 } from "@wordpress/i18n";
|
|
580
569
|
|
|
581
570
|
// src/contexts/interactions-item-context.tsx
|
|
@@ -1079,7 +1068,7 @@ function InteractionsList(props) {
|
|
|
1079
1068
|
const isMaxNumberOfInteractionsReached = useMemo4(() => {
|
|
1080
1069
|
return interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;
|
|
1081
1070
|
}, [interactions.items?.length]);
|
|
1082
|
-
const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React10.createElement(Alert, { color: "secondary", icon: /* @__PURE__ */ React10.createElement(InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React10.createElement(AlertTitle, null, __6("Interactions", "elementor")), /* @__PURE__ */ React10.createElement(
|
|
1071
|
+
const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React10.createElement(Alert, { color: "secondary", icon: /* @__PURE__ */ React10.createElement(InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React10.createElement(AlertTitle, null, __6("Interactions", "elementor")), /* @__PURE__ */ React10.createElement(Box, { component: "span" }, __6(
|
|
1083
1072
|
"You've reached the limit of 5 interactions for this element. Please remove an interaction before creating a new one.",
|
|
1084
1073
|
"elementor"
|
|
1085
1074
|
))) : void 0;
|
|
@@ -1125,7 +1114,6 @@ function InteractionsList(props) {
|
|
|
1125
1114
|
openOnAdd: true,
|
|
1126
1115
|
openItem: triggerCreateOnShowEmpty ? 0 : void 0,
|
|
1127
1116
|
label: __6("Interactions", "elementor"),
|
|
1128
|
-
headerActions: /* @__PURE__ */ React10.createElement(InteractionsHeaderSlot, { elementId }),
|
|
1129
1117
|
values: interactions.items,
|
|
1130
1118
|
setValues: handleRepeaterChange,
|
|
1131
1119
|
showDuplicate: false,
|
|
@@ -1178,7 +1166,6 @@ function InteractionsTabContent({ elementId }) {
|
|
|
1178
1166
|
return /* @__PURE__ */ React11.createElement(SessionStorageProvider, { prefix: elementId }, hasInteractions ? /* @__PURE__ */ React11.createElement(InteractionsProvider, { elementId }, /* @__PURE__ */ React11.createElement(InteractionsContent, { firstInteractionState })) : /* @__PURE__ */ React11.createElement(
|
|
1179
1167
|
EmptyState,
|
|
1180
1168
|
{
|
|
1181
|
-
elementId,
|
|
1182
1169
|
onCreateInteraction: () => {
|
|
1183
1170
|
firstInteractionState[1](true);
|
|
1184
1171
|
}
|
|
@@ -1529,7 +1516,7 @@ import * as React13 from "react";
|
|
|
1529
1516
|
import { forwardRef, useCallback as useCallback7, useImperativeHandle, useState as useState5 } from "react";
|
|
1530
1517
|
import { trackUpgradePromotionClick, trackViewPromotion } from "@elementor/editor-controls";
|
|
1531
1518
|
import { PromotionChip, PromotionPopover, useCanvasClickHandler } from "@elementor/editor-ui";
|
|
1532
|
-
import { Box as
|
|
1519
|
+
import { Box as Box2 } from "@elementor/ui";
|
|
1533
1520
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1534
1521
|
var InteractionsPromotionChip = forwardRef(
|
|
1535
1522
|
({ content, upgradeUrl, anchorRef, trackingData }, ref) => {
|
|
@@ -1565,7 +1552,7 @@ var InteractionsPromotionChip = forwardRef(
|
|
|
1565
1552
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
1566
1553
|
},
|
|
1567
1554
|
/* @__PURE__ */ React13.createElement(
|
|
1568
|
-
|
|
1555
|
+
Box2,
|
|
1569
1556
|
{
|
|
1570
1557
|
onMouseDown: (e) => e.stopPropagation(),
|
|
1571
1558
|
onClick: handleToggle,
|
|
@@ -1733,11 +1720,11 @@ import { __ as __14 } from "@wordpress/i18n";
|
|
|
1733
1720
|
// src/ui/promotion-overlay-layout.tsx
|
|
1734
1721
|
import * as React18 from "react";
|
|
1735
1722
|
import { forwardRef as forwardRef2 } from "react";
|
|
1736
|
-
import { Box as
|
|
1723
|
+
import { Box as Box3 } from "@elementor/ui";
|
|
1737
1724
|
var OVERLAY_GRID = "1 / 1";
|
|
1738
1725
|
var CHIP_OFFSET = "50%";
|
|
1739
1726
|
var PromotionOverlayLayout = forwardRef2(
|
|
1740
|
-
({ children, promotionChip }, ref) => /* @__PURE__ */ React18.createElement(
|
|
1727
|
+
({ children, promotionChip }, ref) => /* @__PURE__ */ React18.createElement(Box3, { ref, sx: { display: "grid", alignItems: "center" } }, /* @__PURE__ */ React18.createElement(Box3, { sx: { gridArea: OVERLAY_GRID } }, children), /* @__PURE__ */ React18.createElement(Box3, { sx: { gridArea: OVERLAY_GRID, marginInlineEnd: CHIP_OFFSET, justifySelf: "end" } }, promotionChip))
|
|
1741
1728
|
);
|
|
1742
1729
|
|
|
1743
1730
|
// src/components/controls/repeat.tsx
|
|
@@ -2312,7 +2299,6 @@ export {
|
|
|
2312
2299
|
generateTempInteractionId,
|
|
2313
2300
|
getInteractionsConfig,
|
|
2314
2301
|
init,
|
|
2315
|
-
injectIntoInteractionsHeader,
|
|
2316
2302
|
interactionsRepository,
|
|
2317
2303
|
isTempId,
|
|
2318
2304
|
parseSizeValue,
|