@elementor/editor-interactions 4.0.0-604 → 4.0.0-607
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 +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +60 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -48
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
- package/src/components/controls/easing.tsx +0 -1
- package/src/components/controls/effect.tsx +30 -24
- package/src/index.ts +1 -0
- package/src/ui/promotion-select.tsx +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1036,13 +1036,14 @@ function Direction({ value, onChange, interactionType }) {
|
|
|
1036
1036
|
|
|
1037
1037
|
// src/components/controls/easing.tsx
|
|
1038
1038
|
import * as React15 from "react";
|
|
1039
|
-
import { __ as
|
|
1039
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
1040
1040
|
|
|
1041
1041
|
// src/ui/promotion-select.tsx
|
|
1042
1042
|
import * as React14 from "react";
|
|
1043
1043
|
import { useRef as useRef4 } from "react";
|
|
1044
1044
|
import { MenuListItem } from "@elementor/editor-ui";
|
|
1045
1045
|
import { MenuSubheader, Select } from "@elementor/ui";
|
|
1046
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
1046
1047
|
|
|
1047
1048
|
// src/ui/interactions-promotion-chip.tsx
|
|
1048
1049
|
import * as React13 from "react";
|
|
@@ -1128,7 +1129,7 @@ function PromotionSelect({
|
|
|
1128
1129
|
promotionRef.current?.toggle();
|
|
1129
1130
|
}
|
|
1130
1131
|
},
|
|
1131
|
-
promotionLabel,
|
|
1132
|
+
promotionLabel ?? __8("PRO features", "elementor"),
|
|
1132
1133
|
/* @__PURE__ */ React14.createElement(
|
|
1133
1134
|
InteractionsPromotionChip,
|
|
1134
1135
|
{
|
|
@@ -1145,13 +1146,13 @@ function PromotionSelect({
|
|
|
1145
1146
|
|
|
1146
1147
|
// src/components/controls/easing.tsx
|
|
1147
1148
|
var EASING_OPTIONS = {
|
|
1148
|
-
easeIn:
|
|
1149
|
-
easeInOut:
|
|
1150
|
-
easeOut:
|
|
1151
|
-
backIn:
|
|
1152
|
-
backInOut:
|
|
1153
|
-
backOut:
|
|
1154
|
-
linear:
|
|
1149
|
+
easeIn: __9("Ease In", "elementor"),
|
|
1150
|
+
easeInOut: __9("Ease In Out", "elementor"),
|
|
1151
|
+
easeOut: __9("Ease Out", "elementor"),
|
|
1152
|
+
backIn: __9("Back In", "elementor"),
|
|
1153
|
+
backInOut: __9("Back In Out", "elementor"),
|
|
1154
|
+
backOut: __9("Back Out", "elementor"),
|
|
1155
|
+
linear: __9("Linear", "elementor")
|
|
1155
1156
|
};
|
|
1156
1157
|
var BASE_EASINGS = ["easeIn"];
|
|
1157
1158
|
function Easing({}) {
|
|
@@ -1167,8 +1168,7 @@ function Easing({}) {
|
|
|
1167
1168
|
value: DEFAULT_VALUES.easing,
|
|
1168
1169
|
baseOptions,
|
|
1169
1170
|
disabledOptions,
|
|
1170
|
-
|
|
1171
|
-
promotionContent: __8("Upgrade to control the smoothness of the interaction.", "elementor"),
|
|
1171
|
+
promotionContent: __9("Upgrade to control the smoothness of the interaction.", "elementor"),
|
|
1172
1172
|
upgradeUrl: "https://go.elementor.com/go-pro-interactions-easing-modal/"
|
|
1173
1173
|
}
|
|
1174
1174
|
);
|
|
@@ -1176,48 +1176,54 @@ function Easing({}) {
|
|
|
1176
1176
|
|
|
1177
1177
|
// src/components/controls/effect.tsx
|
|
1178
1178
|
import * as React16 from "react";
|
|
1179
|
-
import {
|
|
1180
|
-
|
|
1181
|
-
|
|
1179
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
1180
|
+
var EFFECT_OPTIONS = {
|
|
1181
|
+
fade: __10("Fade", "elementor"),
|
|
1182
|
+
slide: __10("Slide", "elementor"),
|
|
1183
|
+
scale: __10("Scale", "elementor"),
|
|
1184
|
+
custom: __10("Custom", "elementor")
|
|
1185
|
+
};
|
|
1186
|
+
var BASE_EFFECTS = ["fade", "slide", "scale"];
|
|
1182
1187
|
function Effect({ value, onChange }) {
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1188
|
+
const baseOptions = Object.fromEntries(
|
|
1189
|
+
Object.entries(EFFECT_OPTIONS).filter(([key]) => BASE_EFFECTS.includes(key))
|
|
1190
|
+
);
|
|
1191
|
+
const disabledOptions = Object.fromEntries(
|
|
1192
|
+
Object.entries(EFFECT_OPTIONS).filter(([key]) => !BASE_EFFECTS.includes(key))
|
|
1193
|
+
);
|
|
1189
1194
|
return /* @__PURE__ */ React16.createElement(
|
|
1190
|
-
|
|
1195
|
+
PromotionSelect,
|
|
1191
1196
|
{
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1197
|
+
value: value in baseOptions ? value : DEFAULT_VALUES.effect,
|
|
1198
|
+
onChange,
|
|
1199
|
+
baseOptions,
|
|
1200
|
+
disabledOptions,
|
|
1201
|
+
promotionLabel: __10("PRO effects", "elementor"),
|
|
1202
|
+
promotionContent: __10(
|
|
1203
|
+
"Upgrade to further customize your animation with opacity, scale, move, rotate and more.",
|
|
1204
|
+
"elementor"
|
|
1205
|
+
),
|
|
1206
|
+
upgradeUrl: "https://go.elementor.com/go-pro-interactions-custom-effect-modal/"
|
|
1207
|
+
}
|
|
1202
1208
|
);
|
|
1203
1209
|
}
|
|
1204
1210
|
|
|
1205
1211
|
// src/components/controls/effect-type.tsx
|
|
1206
1212
|
import * as React17 from "react";
|
|
1207
1213
|
import { ToggleButtonGroupUi as ToggleButtonGroupUi2 } from "@elementor/editor-controls";
|
|
1208
|
-
import { __ as
|
|
1214
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
1209
1215
|
function EffectType({ value, onChange }) {
|
|
1210
1216
|
const options = [
|
|
1211
1217
|
{
|
|
1212
1218
|
value: "in",
|
|
1213
|
-
label:
|
|
1214
|
-
renderContent: () =>
|
|
1219
|
+
label: __11("In", "elementor"),
|
|
1220
|
+
renderContent: () => __11("In", "elementor"),
|
|
1215
1221
|
showTooltip: true
|
|
1216
1222
|
},
|
|
1217
1223
|
{
|
|
1218
1224
|
value: "out",
|
|
1219
|
-
label:
|
|
1220
|
-
renderContent: () =>
|
|
1225
|
+
label: __11("Out", "elementor"),
|
|
1226
|
+
renderContent: () => __11("Out", "elementor"),
|
|
1221
1227
|
showTooltip: true
|
|
1222
1228
|
}
|
|
1223
1229
|
];
|
|
@@ -1229,10 +1235,10 @@ import * as React18 from "react";
|
|
|
1229
1235
|
import { ToggleButtonGroupUi as ToggleButtonGroupUi3 } from "@elementor/editor-controls";
|
|
1230
1236
|
import { CheckIcon, MinusIcon } from "@elementor/icons";
|
|
1231
1237
|
import { Box as Box4 } from "@elementor/ui";
|
|
1232
|
-
import { __ as
|
|
1238
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
1233
1239
|
var REPLAY_OPTIONS = {
|
|
1234
|
-
no:
|
|
1235
|
-
yes:
|
|
1240
|
+
no: __12("No", "elementor"),
|
|
1241
|
+
yes: __12("Yes", "elementor")
|
|
1236
1242
|
};
|
|
1237
1243
|
var BASE_REPLAY = ["no"];
|
|
1238
1244
|
var OVERLAY_GRID = "1 / 1";
|
|
@@ -1257,7 +1263,7 @@ function Replay({ onChange, anchorRef }) {
|
|
|
1257
1263
|
return /* @__PURE__ */ React18.createElement(Box4, { sx: { display: "grid", alignItems: "center" } }, /* @__PURE__ */ React18.createElement(Box4, { sx: { gridArea: OVERLAY_GRID } }, /* @__PURE__ */ React18.createElement(ToggleButtonGroupUi3, { items: options, exclusive: true, onChange, value: false })), /* @__PURE__ */ React18.createElement(Box4, { sx: { gridArea: OVERLAY_GRID, marginInlineEnd: CHIP_OFFSET, justifySelf: "end" } }, /* @__PURE__ */ React18.createElement(
|
|
1258
1264
|
InteractionsPromotionChip,
|
|
1259
1265
|
{
|
|
1260
|
-
content:
|
|
1266
|
+
content: __12("Upgrade to run the animation every time its trigger occurs.", "elementor"),
|
|
1261
1267
|
upgradeUrl: "https://go.elementor.com/go-pro-interactions-replay-modal/",
|
|
1262
1268
|
anchorRef
|
|
1263
1269
|
}
|
|
@@ -1266,13 +1272,13 @@ function Replay({ onChange, anchorRef }) {
|
|
|
1266
1272
|
|
|
1267
1273
|
// src/components/controls/trigger.tsx
|
|
1268
1274
|
import * as React19 from "react";
|
|
1269
|
-
import { __ as
|
|
1275
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
1270
1276
|
var TRIGGER_OPTIONS = {
|
|
1271
|
-
load:
|
|
1272
|
-
scrollIn:
|
|
1273
|
-
scrollOn:
|
|
1274
|
-
hover:
|
|
1275
|
-
click:
|
|
1277
|
+
load: __13("Page load", "elementor"),
|
|
1278
|
+
scrollIn: __13("Scroll into view", "elementor"),
|
|
1279
|
+
scrollOn: __13("While scrolling", "elementor"),
|
|
1280
|
+
hover: __13("On hover", "elementor"),
|
|
1281
|
+
click: __13("On click", "elementor")
|
|
1276
1282
|
};
|
|
1277
1283
|
var BASE_TRIGGERS = ["load", "scrollIn"];
|
|
1278
1284
|
function Trigger({ value, onChange }) {
|
|
@@ -1289,8 +1295,8 @@ function Trigger({ value, onChange }) {
|
|
|
1289
1295
|
onChange,
|
|
1290
1296
|
baseOptions,
|
|
1291
1297
|
disabledOptions,
|
|
1292
|
-
promotionLabel:
|
|
1293
|
-
promotionContent:
|
|
1298
|
+
promotionLabel: __13("PRO triggers", "elementor"),
|
|
1299
|
+
promotionContent: __13("Upgrade to unlock more interactions triggers.", "elementor"),
|
|
1294
1300
|
upgradeUrl: "https://go.elementor.com/go-pro-interactions-triggers-modal/"
|
|
1295
1301
|
}
|
|
1296
1302
|
);
|
|
@@ -1375,9 +1381,11 @@ function init() {
|
|
|
1375
1381
|
}
|
|
1376
1382
|
export {
|
|
1377
1383
|
BASE_EASINGS,
|
|
1384
|
+
BASE_EFFECTS,
|
|
1378
1385
|
BASE_REPLAY,
|
|
1379
1386
|
BASE_TRIGGERS,
|
|
1380
1387
|
EASING_OPTIONS,
|
|
1388
|
+
EFFECT_OPTIONS,
|
|
1381
1389
|
ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX,
|
|
1382
1390
|
EmptyState,
|
|
1383
1391
|
InteractionsTab,
|