@elementor/editor-controls 0.14.0 → 0.15.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.
- package/CHANGELOG.md +18 -0
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +297 -165
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +311 -178
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -6
- package/src/api.ts +16 -0
- package/src/components/repeater.tsx +20 -23
- package/src/controls/equal-unequal-sizes-control.tsx +15 -10
- package/src/controls/font-family-control/enqueue-font.tsx +15 -0
- package/src/controls/font-family-control/font-family-control.tsx +286 -0
- package/src/controls/gap-control.tsx +19 -11
- package/src/controls/image-control.tsx +6 -1
- package/src/controls/image-media-control.tsx +4 -6
- package/src/controls/linked-dimensions-control.tsx +57 -25
- package/src/controls/svg-media-control.tsx +15 -5
- package/src/hooks/use-filtered-font-families.ts +13 -26
- package/src/hooks/use-unfiltered-files-upload.ts +40 -0
- package/src/index.ts +1 -1
- package/src/controls/font-family-control.tsx +0 -157
package/dist/index.js
CHANGED
|
@@ -271,6 +271,34 @@ function createControl(Component, { supportsReplacements = true } = {}) {
|
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
// src/hooks/use-unfiltered-files-upload.ts
|
|
275
|
+
var import_query = require("@elementor/query");
|
|
276
|
+
|
|
277
|
+
// src/api.ts
|
|
278
|
+
var import_http = require("@elementor/http");
|
|
279
|
+
var ELEMENTOR_SETTING_URL = "elementor/v1/settings";
|
|
280
|
+
var apiClient = {
|
|
281
|
+
getElementorSetting: (key) => (0, import_http.httpService)().get(`${ELEMENTOR_SETTING_URL}/${key}`).then((res) => formatSettingResponse(res.data)),
|
|
282
|
+
updateElementorSetting: (key, value) => (0, import_http.httpService)().put(`${ELEMENTOR_SETTING_URL}/${key}`, { value })
|
|
283
|
+
};
|
|
284
|
+
var formatSettingResponse = (response) => response.data.value;
|
|
285
|
+
|
|
286
|
+
// src/hooks/use-unfiltered-files-upload.ts
|
|
287
|
+
var UNFILTERED_FILES_UPLOAD_KEY = "elementor_unfiltered_files_upload";
|
|
288
|
+
var unfilteredFilesQueryKey = {
|
|
289
|
+
queryKey: [UNFILTERED_FILES_UPLOAD_KEY]
|
|
290
|
+
};
|
|
291
|
+
var useUnfilteredFilesUpload = () => (0, import_query.useQuery)({
|
|
292
|
+
...unfilteredFilesQueryKey,
|
|
293
|
+
queryFn: () => apiClient.getElementorSetting(UNFILTERED_FILES_UPLOAD_KEY).then((res) => {
|
|
294
|
+
return formatResponse(res);
|
|
295
|
+
}),
|
|
296
|
+
staleTime: Infinity
|
|
297
|
+
});
|
|
298
|
+
var formatResponse = (response) => {
|
|
299
|
+
return Boolean(response === "1");
|
|
300
|
+
};
|
|
301
|
+
|
|
274
302
|
// src/controls/image-media-control.tsx
|
|
275
303
|
var React8 = __toESM(require("react"));
|
|
276
304
|
var import_editor_props = require("@elementor/editor-props");
|
|
@@ -309,19 +337,18 @@ function ControlActions({ children }) {
|
|
|
309
337
|
if (items.length === 0) {
|
|
310
338
|
return children;
|
|
311
339
|
}
|
|
312
|
-
const menuItems = items.map(({ MenuItem:
|
|
340
|
+
const menuItems = items.map(({ MenuItem: MenuItem4, id }) => /* @__PURE__ */ React7.createElement(MenuItem4, { key: id }));
|
|
313
341
|
return /* @__PURE__ */ React7.createElement(FloatingBarContainer, null, /* @__PURE__ */ React7.createElement(import_ui3.UnstableFloatingActionBar, { actions: menuItems }, children));
|
|
314
342
|
}
|
|
315
343
|
|
|
316
344
|
// src/controls/image-media-control.tsx
|
|
317
|
-
var ImageMediaControl = createControl((
|
|
345
|
+
var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
318
346
|
const { value, setValue } = useBoundProp(import_editor_props.imageSrcPropTypeUtil);
|
|
319
347
|
const { id, url } = value ?? {};
|
|
320
348
|
const { data: attachment, isFetching } = (0, import_wp_media.useWpMediaAttachment)(id?.value || null);
|
|
321
349
|
const src = attachment?.url ?? url?.value ?? null;
|
|
322
350
|
const { open } = (0, import_wp_media.useWpMediaFrame)({
|
|
323
|
-
|
|
324
|
-
allowedExtensions: props.allowedExtensions,
|
|
351
|
+
mediaTypes,
|
|
325
352
|
multiple: false,
|
|
326
353
|
selected: id?.value || null,
|
|
327
354
|
onSelect: (selectedAttachment) => {
|
|
@@ -385,7 +412,9 @@ var SelectControl = createControl(({ options, onChange }) => {
|
|
|
385
412
|
var ImageControl = createControl(
|
|
386
413
|
({ sizes, resolutionLabel = (0, import_i18n2.__)("Image resolution", "elementor") }) => {
|
|
387
414
|
const propContext = useBoundProp(import_editor_props3.imagePropTypeUtil);
|
|
388
|
-
|
|
415
|
+
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
416
|
+
const mediaTypes = allowSvgUpload ? ["image", "svg"] : ["image"];
|
|
417
|
+
return /* @__PURE__ */ React10.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React10.createElement(import_ui6.Stack, { gap: 1.5 }, /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React10.createElement(ControlLabel, null, " ", (0, import_i18n2.__)("Image", "elementor"), " "), /* @__PURE__ */ React10.createElement(ImageMediaControl, { mediaTypes })), /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React10.createElement(import_ui6.Grid, { container: true, gap: 1.5, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React10.createElement(import_ui6.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React10.createElement(ControlLabel, null, " ", resolutionLabel, " ")), /* @__PURE__ */ React10.createElement(import_ui6.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React10.createElement(SelectControl, { options: sizes }))))));
|
|
389
418
|
}
|
|
390
419
|
);
|
|
391
420
|
|
|
@@ -859,6 +888,9 @@ var RepeaterItem = ({
|
|
|
859
888
|
const [anchorEl, setAnchorEl] = (0, import_react7.useState)(null);
|
|
860
889
|
const popoverState = (0, import_ui17.usePopupState)({ popupId, variant: "popover" });
|
|
861
890
|
const popoverProps = (0, import_ui17.bindPopover)(popoverState);
|
|
891
|
+
const duplicateLabel = (0, import_i18n4.__)("Duplicate", "elementor");
|
|
892
|
+
const toggleLabel = disabled ? (0, import_i18n4.__)("Show", "elementor") : (0, import_i18n4.__)("Hide", "elementor");
|
|
893
|
+
const removeLabel = (0, import_i18n4.__)("Remove", "elementor");
|
|
862
894
|
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
|
|
863
895
|
import_ui17.UnstableTag,
|
|
864
896
|
{
|
|
@@ -870,31 +902,7 @@ var RepeaterItem = ({
|
|
|
870
902
|
"aria-label": (0, import_i18n4.__)("Open item", "elementor"),
|
|
871
903
|
...(0, import_ui17.bindTrigger)(popoverState),
|
|
872
904
|
startIcon,
|
|
873
|
-
actions: /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
|
|
874
|
-
import_ui17.IconButton,
|
|
875
|
-
{
|
|
876
|
-
size: SIZE,
|
|
877
|
-
onClick: duplicateItem,
|
|
878
|
-
"aria-label": (0, import_i18n4.__)("Duplicate item", "elementor")
|
|
879
|
-
},
|
|
880
|
-
/* @__PURE__ */ React21.createElement(import_icons3.CopyIcon, { fontSize: SIZE })
|
|
881
|
-
), /* @__PURE__ */ React21.createElement(
|
|
882
|
-
import_ui17.IconButton,
|
|
883
|
-
{
|
|
884
|
-
size: SIZE,
|
|
885
|
-
onClick: toggleDisableItem,
|
|
886
|
-
"aria-label": disabled ? (0, import_i18n4.__)("Enable item", "elementor") : (0, import_i18n4.__)("Disable item", "elementor")
|
|
887
|
-
},
|
|
888
|
-
disabled ? /* @__PURE__ */ React21.createElement(import_icons3.EyeOffIcon, { fontSize: SIZE }) : /* @__PURE__ */ React21.createElement(import_icons3.EyeIcon, { fontSize: SIZE })
|
|
889
|
-
), /* @__PURE__ */ React21.createElement(
|
|
890
|
-
import_ui17.IconButton,
|
|
891
|
-
{
|
|
892
|
-
size: SIZE,
|
|
893
|
-
onClick: removeItem,
|
|
894
|
-
"aria-label": (0, import_i18n4.__)("Remove item", "elementor")
|
|
895
|
-
},
|
|
896
|
-
/* @__PURE__ */ React21.createElement(import_icons3.XIcon, { fontSize: SIZE })
|
|
897
|
-
)),
|
|
905
|
+
actions: /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(import_ui17.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React21.createElement(import_ui17.IconButton, { size: SIZE, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React21.createElement(import_icons3.CopyIcon, { fontSize: SIZE }))), /* @__PURE__ */ React21.createElement(import_ui17.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React21.createElement(import_ui17.IconButton, { size: SIZE, onClick: toggleDisableItem, "aria-label": toggleLabel }, disabled ? /* @__PURE__ */ React21.createElement(import_icons3.EyeOffIcon, { fontSize: SIZE }) : /* @__PURE__ */ React21.createElement(import_icons3.EyeIcon, { fontSize: SIZE }))), /* @__PURE__ */ React21.createElement(import_ui17.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React21.createElement(import_ui17.IconButton, { size: SIZE, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React21.createElement(import_icons3.XIcon, { fontSize: SIZE })))),
|
|
898
906
|
sx: { backgroundColor: "background.paper" }
|
|
899
907
|
}
|
|
900
908
|
), /* @__PURE__ */ React21.createElement(
|
|
@@ -1136,6 +1144,7 @@ var isEqualSizes = (propValue, items) => {
|
|
|
1136
1144
|
function EqualUnequalSizesControl({
|
|
1137
1145
|
label,
|
|
1138
1146
|
icon,
|
|
1147
|
+
tooltipLabel,
|
|
1139
1148
|
items,
|
|
1140
1149
|
multiSizePropTypeUtil
|
|
1141
1150
|
}) {
|
|
@@ -1175,17 +1184,18 @@ function EqualUnequalSizesControl({
|
|
|
1175
1184
|
return splitEqualValue() ?? null;
|
|
1176
1185
|
};
|
|
1177
1186
|
const isMixed = !!multiSizeValue;
|
|
1178
|
-
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(import_ui21.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: controlRef }, /* @__PURE__ */ React26.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(ControlLabel, null, label)), /* @__PURE__ */ React26.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(import_ui21.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React26.createElement(SizeControl, { placeholder: isMixed ? (0, import_i18n6.__)("Mixed", "elementor") : void 0 }), /* @__PURE__ */ React26.createElement(
|
|
1187
|
+
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(import_ui21.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: controlRef }, /* @__PURE__ */ React26.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(ControlLabel, null, label)), /* @__PURE__ */ React26.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(import_ui21.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React26.createElement(SizeControl, { placeholder: isMixed ? (0, import_i18n6.__)("Mixed", "elementor") : void 0 }), /* @__PURE__ */ React26.createElement(import_ui21.Tooltip, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React26.createElement(
|
|
1179
1188
|
import_ui21.ToggleButton,
|
|
1180
1189
|
{
|
|
1181
1190
|
size: "tiny",
|
|
1182
1191
|
value: "check",
|
|
1183
1192
|
sx: { marginLeft: "auto" },
|
|
1184
1193
|
...(0, import_ui21.bindToggle)(popupState),
|
|
1185
|
-
selected: popupState.isOpen
|
|
1194
|
+
selected: popupState.isOpen,
|
|
1195
|
+
"aria-label": tooltipLabel
|
|
1186
1196
|
},
|
|
1187
1197
|
icon
|
|
1188
|
-
)))), /* @__PURE__ */ React26.createElement(
|
|
1198
|
+
))))), /* @__PURE__ */ React26.createElement(
|
|
1189
1199
|
import_ui21.Popover,
|
|
1190
1200
|
{
|
|
1191
1201
|
disablePortal: true,
|
|
@@ -1215,7 +1225,11 @@ var import_icons4 = require("@elementor/icons");
|
|
|
1215
1225
|
var import_ui22 = require("@elementor/ui");
|
|
1216
1226
|
var import_i18n7 = require("@wordpress/i18n");
|
|
1217
1227
|
var LinkedDimensionsControl = createControl(
|
|
1218
|
-
({
|
|
1228
|
+
({
|
|
1229
|
+
label,
|
|
1230
|
+
isSiteRtl = false,
|
|
1231
|
+
extendedValues
|
|
1232
|
+
}) => {
|
|
1219
1233
|
const {
|
|
1220
1234
|
value: dimensionsValue,
|
|
1221
1235
|
setValue: setDimensionsValue,
|
|
@@ -1225,22 +1239,25 @@ var LinkedDimensionsControl = createControl(
|
|
|
1225
1239
|
const isLinked = !dimensionsValue && !sizeValue ? true : !!sizeValue;
|
|
1226
1240
|
const onLinkToggle = () => {
|
|
1227
1241
|
if (!isLinked) {
|
|
1228
|
-
setSizeValue(dimensionsValue?.
|
|
1242
|
+
setSizeValue(dimensionsValue["block-start"]?.value);
|
|
1229
1243
|
return;
|
|
1230
1244
|
}
|
|
1231
1245
|
const value = sizeValue ? import_editor_props13.sizePropTypeUtil.create(sizeValue) : null;
|
|
1232
1246
|
setDimensionsValue({
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1247
|
+
"block-start": value,
|
|
1248
|
+
"block-end": value,
|
|
1249
|
+
"inline-start": value,
|
|
1250
|
+
"inline-end": value
|
|
1237
1251
|
});
|
|
1238
1252
|
};
|
|
1253
|
+
const tooltipLabel = label.toLowerCase();
|
|
1239
1254
|
const LinkedIcon = isLinked ? import_icons4.LinkIcon : import_icons4.DetachIcon;
|
|
1240
|
-
|
|
1255
|
+
const linkedLabel = (0, import_i18n7.__)("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1256
|
+
const unlinkedLabel = (0, import_i18n7.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1257
|
+
return /* @__PURE__ */ React27.createElement(PropProvider, { propType, value: dimensionsValue, setValue: setDimensionsValue }, /* @__PURE__ */ React27.createElement(import_ui22.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(ControlLabel, null, label), /* @__PURE__ */ React27.createElement(import_ui22.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React27.createElement(
|
|
1241
1258
|
import_ui22.ToggleButton,
|
|
1242
1259
|
{
|
|
1243
|
-
"aria-label":
|
|
1260
|
+
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
1244
1261
|
size: "tiny",
|
|
1245
1262
|
value: "check",
|
|
1246
1263
|
selected: isLinked,
|
|
@@ -1248,35 +1265,35 @@ var LinkedDimensionsControl = createControl(
|
|
|
1248
1265
|
onChange: onLinkToggle
|
|
1249
1266
|
},
|
|
1250
1267
|
/* @__PURE__ */ React27.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1251
|
-
)), /* @__PURE__ */ React27.createElement(import_ui22.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ControlLabel, null, (0, import_i18n7.__)("Top", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(
|
|
1268
|
+
))), /* @__PURE__ */ React27.createElement(import_ui22.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ControlLabel, null, (0, import_i18n7.__)("Top", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(
|
|
1252
1269
|
Control3,
|
|
1253
1270
|
{
|
|
1254
|
-
bind: "
|
|
1271
|
+
bind: "block-start",
|
|
1255
1272
|
startIcon: /* @__PURE__ */ React27.createElement(import_icons4.SideTopIcon, { fontSize: "tiny" }),
|
|
1256
1273
|
isLinked,
|
|
1257
1274
|
extendedValues
|
|
1258
1275
|
}
|
|
1259
|
-
))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ControlLabel, null, (0, import_i18n7.__)("Right", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(
|
|
1276
|
+
))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ControlLabel, null, isSiteRtl ? (0, import_i18n7.__)("Left", "elementor") : (0, import_i18n7.__)("Right", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(
|
|
1260
1277
|
Control3,
|
|
1261
1278
|
{
|
|
1262
|
-
bind: "
|
|
1263
|
-
startIcon: /* @__PURE__ */ React27.createElement(import_icons4.SideRightIcon, { fontSize: "tiny" }),
|
|
1279
|
+
bind: "inline-end",
|
|
1280
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React27.createElement(import_icons4.SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React27.createElement(import_icons4.SideRightIcon, { fontSize: "tiny" }),
|
|
1264
1281
|
isLinked,
|
|
1265
1282
|
extendedValues
|
|
1266
1283
|
}
|
|
1267
1284
|
)))), /* @__PURE__ */ React27.createElement(import_ui22.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ControlLabel, null, (0, import_i18n7.__)("Bottom", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(
|
|
1268
1285
|
Control3,
|
|
1269
1286
|
{
|
|
1270
|
-
bind: "
|
|
1287
|
+
bind: "block-end",
|
|
1271
1288
|
startIcon: /* @__PURE__ */ React27.createElement(import_icons4.SideBottomIcon, { fontSize: "tiny" }),
|
|
1272
1289
|
isLinked,
|
|
1273
1290
|
extendedValues
|
|
1274
1291
|
}
|
|
1275
|
-
))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ControlLabel, null, (0, import_i18n7.__)("Left", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(
|
|
1292
|
+
))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ControlLabel, null, isSiteRtl ? (0, import_i18n7.__)("Right", "elementor") : (0, import_i18n7.__)("Left", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(
|
|
1276
1293
|
Control3,
|
|
1277
1294
|
{
|
|
1278
|
-
bind: "
|
|
1279
|
-
startIcon: /* @__PURE__ */ React27.createElement(import_icons4.SideLeftIcon, { fontSize: "tiny" }),
|
|
1295
|
+
bind: "inline-start",
|
|
1296
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React27.createElement(import_icons4.SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React27.createElement(import_icons4.SideLeftIcon, { fontSize: "tiny" }),
|
|
1280
1297
|
isLinked,
|
|
1281
1298
|
extendedValues
|
|
1282
1299
|
}
|
|
@@ -1295,55 +1312,47 @@ var Control3 = ({
|
|
|
1295
1312
|
return /* @__PURE__ */ React27.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React27.createElement(SizeControl, { startIcon, extendedValues }));
|
|
1296
1313
|
};
|
|
1297
1314
|
|
|
1298
|
-
// src/controls/font-family-control.tsx
|
|
1299
|
-
var import_react9 = require("react");
|
|
1315
|
+
// src/controls/font-family-control/font-family-control.tsx
|
|
1300
1316
|
var React28 = __toESM(require("react"));
|
|
1317
|
+
var import_react9 = require("react");
|
|
1301
1318
|
var import_editor_props14 = require("@elementor/editor-props");
|
|
1302
1319
|
var import_icons5 = require("@elementor/icons");
|
|
1303
1320
|
var import_ui23 = require("@elementor/ui");
|
|
1304
|
-
var
|
|
1321
|
+
var import_utils2 = require("@elementor/utils");
|
|
1322
|
+
var import_react_virtual = require("@tanstack/react-virtual");
|
|
1323
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
1305
1324
|
|
|
1306
1325
|
// src/hooks/use-filtered-font-families.ts
|
|
1307
|
-
var import_i18n8 = require("@wordpress/i18n");
|
|
1308
|
-
var supportedCategories = {
|
|
1309
|
-
system: (0, import_i18n8.__)("System", "elementor"),
|
|
1310
|
-
googlefonts: (0, import_i18n8.__)("Google Fonts", "elementor"),
|
|
1311
|
-
customfonts: (0, import_i18n8.__)("Custom Fonts", "elementor")
|
|
1312
|
-
};
|
|
1313
1326
|
var useFilteredFontFamilies = (fontFamilies, searchValue) => {
|
|
1314
1327
|
const filteredFontFamilies = Object.entries(fontFamilies).reduce(
|
|
1315
|
-
(acc, [
|
|
1316
|
-
const
|
|
1317
|
-
if (
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
const existingCategory = acc.get(categoryLabel);
|
|
1323
|
-
if (existingCategory) {
|
|
1324
|
-
existingCategory.push(font);
|
|
1325
|
-
} else {
|
|
1326
|
-
acc.set(categoryLabel, [font]);
|
|
1327
|
-
}
|
|
1328
|
+
(acc, [category, fonts]) => {
|
|
1329
|
+
const filteredFonts = fonts.filter((font) => font.toLowerCase().includes(searchValue.toLowerCase()));
|
|
1330
|
+
if (filteredFonts.length) {
|
|
1331
|
+
acc.push({ type: "category", value: category });
|
|
1332
|
+
filteredFonts.forEach((font) => {
|
|
1333
|
+
acc.push({ type: "font", value: font });
|
|
1334
|
+
});
|
|
1328
1335
|
}
|
|
1329
1336
|
return acc;
|
|
1330
1337
|
},
|
|
1331
|
-
|
|
1338
|
+
[]
|
|
1332
1339
|
);
|
|
1333
1340
|
return [...filteredFontFamilies];
|
|
1334
1341
|
};
|
|
1335
1342
|
|
|
1336
|
-
// src/controls/font-family-control.tsx
|
|
1343
|
+
// src/controls/font-family-control/enqueue-font.tsx
|
|
1344
|
+
var enqueueFont = (fontFamily, context = "editor") => {
|
|
1345
|
+
const extendedWindow = window;
|
|
1346
|
+
return extendedWindow.elementor?.helpers?.enqueueFont?.(fontFamily, context) ?? null;
|
|
1347
|
+
};
|
|
1348
|
+
|
|
1349
|
+
// src/controls/font-family-control/font-family-control.tsx
|
|
1337
1350
|
var SIZE2 = "tiny";
|
|
1338
1351
|
var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
1339
1352
|
const [searchValue, setSearchValue] = (0, import_react9.useState)("");
|
|
1340
1353
|
const { value: fontFamily, setValue: setFontFamily } = useBoundProp(import_editor_props14.stringPropTypeUtil);
|
|
1341
|
-
const
|
|
1342
|
-
const popoverState = (0, import_ui23.usePopupState)({ variant: "popover", popupId });
|
|
1354
|
+
const popoverState = (0, import_ui23.usePopupState)({ variant: "popover" });
|
|
1343
1355
|
const filteredFontFamilies = useFilteredFontFamilies(fontFamilies, searchValue);
|
|
1344
|
-
if (!filteredFontFamilies) {
|
|
1345
|
-
return null;
|
|
1346
|
-
}
|
|
1347
1356
|
const handleSearch = (event) => {
|
|
1348
1357
|
setSearchValue(event.target.value);
|
|
1349
1358
|
};
|
|
@@ -1369,42 +1378,27 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1369
1378
|
...(0, import_ui23.bindPopover)(popoverState),
|
|
1370
1379
|
onClose: handleClose
|
|
1371
1380
|
},
|
|
1372
|
-
/* @__PURE__ */ React28.createElement(import_ui23.Stack, null, /* @__PURE__ */ React28.createElement(import_ui23.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React28.createElement(import_icons5.EditIcon, { fontSize: SIZE2, sx: { mr: 0.5 } }), /* @__PURE__ */ React28.createElement(import_ui23.Typography, { variant: "subtitle2" }, (0,
|
|
1381
|
+
/* @__PURE__ */ React28.createElement(import_ui23.Stack, null, /* @__PURE__ */ React28.createElement(import_ui23.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React28.createElement(import_icons5.EditIcon, { fontSize: SIZE2, sx: { mr: 0.5 } }), /* @__PURE__ */ React28.createElement(import_ui23.Typography, { variant: "subtitle2" }, (0, import_i18n8.__)("Font Family", "elementor")), /* @__PURE__ */ React28.createElement(import_ui23.IconButton, { size: SIZE2, sx: { ml: "auto" }, onClick: handleClose }, /* @__PURE__ */ React28.createElement(import_icons5.XIcon, { fontSize: SIZE2 }))), /* @__PURE__ */ React28.createElement(import_ui23.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React28.createElement(
|
|
1373
1382
|
import_ui23.TextField,
|
|
1374
1383
|
{
|
|
1375
1384
|
fullWidth: true,
|
|
1376
1385
|
size: SIZE2,
|
|
1377
1386
|
value: searchValue,
|
|
1378
|
-
placeholder: (0,
|
|
1387
|
+
placeholder: (0, import_i18n8.__)("Search", "elementor"),
|
|
1379
1388
|
onChange: handleSearch,
|
|
1380
1389
|
InputProps: {
|
|
1381
1390
|
startAdornment: /* @__PURE__ */ React28.createElement(import_ui23.InputAdornment, { position: "start" }, /* @__PURE__ */ React28.createElement(import_icons5.SearchIcon, { fontSize: SIZE2 }))
|
|
1382
1391
|
}
|
|
1383
1392
|
}
|
|
1384
|
-
)), /* @__PURE__ */ React28.createElement(import_ui23.Divider, null),
|
|
1385
|
-
|
|
1393
|
+
)), /* @__PURE__ */ React28.createElement(import_ui23.Divider, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React28.createElement(
|
|
1394
|
+
FontList,
|
|
1386
1395
|
{
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
import_ui23.MenuItem,
|
|
1394
|
-
{
|
|
1395
|
-
key: item,
|
|
1396
|
-
selected: isSelected,
|
|
1397
|
-
autoFocus: isSelected,
|
|
1398
|
-
onClick: () => {
|
|
1399
|
-
setFontFamily(item);
|
|
1400
|
-
handleClose();
|
|
1401
|
-
},
|
|
1402
|
-
sx: { px: 1.5, typography: "caption" },
|
|
1403
|
-
style: { fontFamily: item }
|
|
1404
|
-
},
|
|
1405
|
-
item
|
|
1406
|
-
);
|
|
1407
|
-
})))) : /* @__PURE__ */ React28.createElement(import_ui23.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React28.createElement(import_icons5.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React28.createElement(import_ui23.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n9.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React28.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React28.createElement(import_ui23.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React28.createElement(
|
|
1396
|
+
fontListItems: filteredFontFamilies,
|
|
1397
|
+
setFontFamily,
|
|
1398
|
+
handleClose,
|
|
1399
|
+
fontFamily
|
|
1400
|
+
}
|
|
1401
|
+
) : /* @__PURE__ */ React28.createElement(import_ui23.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, /* @__PURE__ */ React28.createElement(import_ui23.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React28.createElement(import_icons5.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React28.createElement(import_ui23.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n8.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React28.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React28.createElement(import_ui23.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React28.createElement(
|
|
1408
1402
|
import_ui23.Link,
|
|
1409
1403
|
{
|
|
1410
1404
|
color: "secondary",
|
|
@@ -1412,10 +1406,139 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1412
1406
|
component: "button",
|
|
1413
1407
|
onClick: () => setSearchValue("")
|
|
1414
1408
|
},
|
|
1415
|
-
(0,
|
|
1416
|
-
), "\xA0", (0,
|
|
1409
|
+
(0, import_i18n8.__)("Clear the filters", "elementor")
|
|
1410
|
+
), "\xA0", (0, import_i18n8.__)("and try again.", "elementor")))))
|
|
1417
1411
|
));
|
|
1418
1412
|
});
|
|
1413
|
+
var LIST_ITEM_HEIGHT = 36;
|
|
1414
|
+
var LIST_ITEMS_BUFFER = 6;
|
|
1415
|
+
var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
1416
|
+
const containerRef = (0, import_react9.useRef)(null);
|
|
1417
|
+
const selectedItem = fontListItems.find((item) => item.value === fontFamily);
|
|
1418
|
+
const debouncedVirtualizeChange = useDebounce(({ getVirtualIndexes }) => {
|
|
1419
|
+
getVirtualIndexes().forEach((index) => {
|
|
1420
|
+
const item = fontListItems[index];
|
|
1421
|
+
if (item && item.type === "font") {
|
|
1422
|
+
enqueueFont(item.value);
|
|
1423
|
+
}
|
|
1424
|
+
});
|
|
1425
|
+
}, 100);
|
|
1426
|
+
const virtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
1427
|
+
count: fontListItems.length,
|
|
1428
|
+
getScrollElement: () => containerRef.current,
|
|
1429
|
+
estimateSize: () => LIST_ITEM_HEIGHT,
|
|
1430
|
+
overscan: LIST_ITEMS_BUFFER,
|
|
1431
|
+
onChange: debouncedVirtualizeChange
|
|
1432
|
+
});
|
|
1433
|
+
(0, import_react9.useEffect)(
|
|
1434
|
+
() => {
|
|
1435
|
+
virtualizer.scrollToIndex(fontListItems.findIndex((item) => item.value === fontFamily));
|
|
1436
|
+
},
|
|
1437
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1438
|
+
[fontFamily]
|
|
1439
|
+
);
|
|
1440
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1441
|
+
import_ui23.Box,
|
|
1442
|
+
{
|
|
1443
|
+
ref: containerRef,
|
|
1444
|
+
sx: {
|
|
1445
|
+
overflowY: "auto",
|
|
1446
|
+
height: 260,
|
|
1447
|
+
width: 220
|
|
1448
|
+
}
|
|
1449
|
+
},
|
|
1450
|
+
/* @__PURE__ */ React28.createElement(
|
|
1451
|
+
StyledMenuList,
|
|
1452
|
+
{
|
|
1453
|
+
role: "listbox",
|
|
1454
|
+
style: {
|
|
1455
|
+
height: `${virtualizer.getTotalSize()}px`
|
|
1456
|
+
},
|
|
1457
|
+
"data-testid": "font-list"
|
|
1458
|
+
},
|
|
1459
|
+
virtualizer.getVirtualItems().map((virtualRow) => {
|
|
1460
|
+
const item = fontListItems[virtualRow.index];
|
|
1461
|
+
const isLast = virtualRow.index === fontListItems.length - 1;
|
|
1462
|
+
const isFirst = virtualRow.index === 1;
|
|
1463
|
+
const isSelected = selectedItem?.value === item.value;
|
|
1464
|
+
const tabIndexFallback = !selectedItem ? 0 : -1;
|
|
1465
|
+
if (item.type === "category") {
|
|
1466
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1467
|
+
import_ui23.ListSubheader,
|
|
1468
|
+
{
|
|
1469
|
+
key: virtualRow.key,
|
|
1470
|
+
style: {
|
|
1471
|
+
transform: `translateY(${virtualRow.start}px)`
|
|
1472
|
+
}
|
|
1473
|
+
},
|
|
1474
|
+
item.value
|
|
1475
|
+
);
|
|
1476
|
+
}
|
|
1477
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1478
|
+
"li",
|
|
1479
|
+
{
|
|
1480
|
+
key: virtualRow.key,
|
|
1481
|
+
role: "option",
|
|
1482
|
+
"aria-selected": isSelected,
|
|
1483
|
+
onClick: () => {
|
|
1484
|
+
setFontFamily(item.value);
|
|
1485
|
+
handleClose();
|
|
1486
|
+
},
|
|
1487
|
+
onKeyDown: (event) => {
|
|
1488
|
+
if (event.key === "Enter") {
|
|
1489
|
+
setFontFamily(item.value);
|
|
1490
|
+
handleClose();
|
|
1491
|
+
}
|
|
1492
|
+
if (event.key === "ArrowDown" && isLast) {
|
|
1493
|
+
event.preventDefault();
|
|
1494
|
+
event.stopPropagation();
|
|
1495
|
+
}
|
|
1496
|
+
if (event.key === "ArrowUp" && isFirst) {
|
|
1497
|
+
event.preventDefault();
|
|
1498
|
+
event.stopPropagation();
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
tabIndex: isSelected ? 0 : tabIndexFallback,
|
|
1502
|
+
style: {
|
|
1503
|
+
transform: `translateY(${virtualRow.start}px)`,
|
|
1504
|
+
fontFamily: item.value
|
|
1505
|
+
}
|
|
1506
|
+
},
|
|
1507
|
+
item.value
|
|
1508
|
+
);
|
|
1509
|
+
})
|
|
1510
|
+
)
|
|
1511
|
+
);
|
|
1512
|
+
};
|
|
1513
|
+
var StyledMenuList = (0, import_ui23.styled)(import_ui23.MenuList)(({ theme }) => ({
|
|
1514
|
+
"& > li": {
|
|
1515
|
+
height: LIST_ITEM_HEIGHT,
|
|
1516
|
+
position: "absolute",
|
|
1517
|
+
top: 0,
|
|
1518
|
+
left: 0,
|
|
1519
|
+
width: "100%"
|
|
1520
|
+
},
|
|
1521
|
+
'& > [role="option"]': {
|
|
1522
|
+
...theme.typography.caption,
|
|
1523
|
+
lineHeight: "inherit",
|
|
1524
|
+
padding: theme.spacing(0.75, 2),
|
|
1525
|
+
"&:hover, &:focus": {
|
|
1526
|
+
backgroundColor: theme.palette.action.hover
|
|
1527
|
+
},
|
|
1528
|
+
'&[aria-selected="true"]': {
|
|
1529
|
+
backgroundColor: theme.palette.action.selected
|
|
1530
|
+
},
|
|
1531
|
+
cursor: "pointer",
|
|
1532
|
+
textOverflow: "ellipsis"
|
|
1533
|
+
},
|
|
1534
|
+
width: "100%",
|
|
1535
|
+
position: "relative"
|
|
1536
|
+
}));
|
|
1537
|
+
var useDebounce = (fn, delay) => {
|
|
1538
|
+
const [debouncedFn] = (0, import_react9.useState)(() => (0, import_utils2.debounce)(fn, delay));
|
|
1539
|
+
(0, import_react9.useEffect)(() => () => debouncedFn.cancel(), [debouncedFn]);
|
|
1540
|
+
return debouncedFn;
|
|
1541
|
+
};
|
|
1419
1542
|
|
|
1420
1543
|
// src/controls/url-control.tsx
|
|
1421
1544
|
var React29 = __toESM(require("react"));
|
|
@@ -1440,12 +1563,12 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1440
1563
|
var React31 = __toESM(require("react"));
|
|
1441
1564
|
var import_react11 = require("react");
|
|
1442
1565
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
1443
|
-
var
|
|
1566
|
+
var import_http2 = require("@elementor/http");
|
|
1444
1567
|
var import_icons7 = require("@elementor/icons");
|
|
1445
1568
|
var import_session = require("@elementor/session");
|
|
1446
1569
|
var import_ui26 = require("@elementor/ui");
|
|
1447
|
-
var
|
|
1448
|
-
var
|
|
1570
|
+
var import_utils3 = require("@elementor/utils");
|
|
1571
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
1449
1572
|
|
|
1450
1573
|
// src/components/autocomplete.tsx
|
|
1451
1574
|
var React30 = __toESM(require("react"));
|
|
@@ -1603,7 +1726,7 @@ var LinkControl = createControl((props) => {
|
|
|
1603
1726
|
debounceFetch({ ...requestParams, term: newValue });
|
|
1604
1727
|
};
|
|
1605
1728
|
const debounceFetch = (0, import_react11.useMemo)(
|
|
1606
|
-
() => (0,
|
|
1729
|
+
() => (0, import_utils3.debounce)(
|
|
1607
1730
|
(params) => fetchOptions(endpoint, params).then((newOptions) => {
|
|
1608
1731
|
setOptions(formatOptions(newOptions));
|
|
1609
1732
|
}),
|
|
@@ -1620,13 +1743,13 @@ var LinkControl = createControl((props) => {
|
|
|
1620
1743
|
alignItems: "center"
|
|
1621
1744
|
}
|
|
1622
1745
|
},
|
|
1623
|
-
/* @__PURE__ */ React31.createElement(ControlLabel, null, (0,
|
|
1746
|
+
/* @__PURE__ */ React31.createElement(ControlLabel, null, (0, import_i18n9.__)("Link", "elementor")),
|
|
1624
1747
|
/* @__PURE__ */ React31.createElement(
|
|
1625
1748
|
ToggleIconControl,
|
|
1626
1749
|
{
|
|
1627
1750
|
enabled: isEnabled,
|
|
1628
1751
|
onIconClick: onEnabledChange,
|
|
1629
|
-
label: (0,
|
|
1752
|
+
label: (0, import_i18n9.__)("Toggle link", "elementor")
|
|
1630
1753
|
}
|
|
1631
1754
|
)
|
|
1632
1755
|
), /* @__PURE__ */ React31.createElement(import_ui26.Collapse, { in: isEnabled, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React31.createElement(import_ui26.Stack, { gap: 1.5 }, /* @__PURE__ */ React31.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React31.createElement(ControlActions, null, /* @__PURE__ */ React31.createElement(
|
|
@@ -1650,14 +1773,14 @@ var SwitchControl = () => {
|
|
|
1650
1773
|
const onClick = () => {
|
|
1651
1774
|
setValue(!value);
|
|
1652
1775
|
};
|
|
1653
|
-
return /* @__PURE__ */ React31.createElement(import_ui26.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React31.createElement(import_ui26.Grid, { item: true }, /* @__PURE__ */ React31.createElement(ControlLabel, null, (0,
|
|
1776
|
+
return /* @__PURE__ */ React31.createElement(import_ui26.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React31.createElement(import_ui26.Grid, { item: true }, /* @__PURE__ */ React31.createElement(ControlLabel, null, (0, import_i18n9.__)("Open in a new tab", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui26.Grid, { item: true }, /* @__PURE__ */ React31.createElement(import_ui26.Switch, { checked: value, onClick })));
|
|
1654
1777
|
};
|
|
1655
1778
|
async function fetchOptions(ajaxUrl, params) {
|
|
1656
1779
|
if (!params || !ajaxUrl) {
|
|
1657
1780
|
return [];
|
|
1658
1781
|
}
|
|
1659
1782
|
try {
|
|
1660
|
-
const { data: response } = await (0,
|
|
1783
|
+
const { data: response } = await (0, import_http2.httpService)().get(ajaxUrl, { params });
|
|
1661
1784
|
return response.data.value;
|
|
1662
1785
|
} catch {
|
|
1663
1786
|
return [];
|
|
@@ -1686,7 +1809,7 @@ var React32 = __toESM(require("react"));
|
|
|
1686
1809
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
1687
1810
|
var import_icons8 = require("@elementor/icons");
|
|
1688
1811
|
var import_ui27 = require("@elementor/ui");
|
|
1689
|
-
var
|
|
1812
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
1690
1813
|
var GapControl = createControl(({ label }) => {
|
|
1691
1814
|
const {
|
|
1692
1815
|
value: directionValue,
|
|
@@ -1706,11 +1829,14 @@ var GapControl = createControl(({ label }) => {
|
|
|
1706
1829
|
column: value
|
|
1707
1830
|
});
|
|
1708
1831
|
};
|
|
1832
|
+
const tooltipLabel = label.toLowerCase();
|
|
1709
1833
|
const LinkedIcon = isLinked ? import_icons8.LinkIcon : import_icons8.DetachIcon;
|
|
1710
|
-
|
|
1834
|
+
const linkedLabel = (0, import_i18n10.__)("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1835
|
+
const unlinkedLabel = (0, import_i18n10.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1836
|
+
return /* @__PURE__ */ React32.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React32.createElement(import_ui27.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(ControlLabel, null, label), /* @__PURE__ */ React32.createElement(import_ui27.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React32.createElement(
|
|
1711
1837
|
import_ui27.ToggleButton,
|
|
1712
1838
|
{
|
|
1713
|
-
"aria-label":
|
|
1839
|
+
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
1714
1840
|
size: "tiny",
|
|
1715
1841
|
value: "check",
|
|
1716
1842
|
selected: isLinked,
|
|
@@ -1718,7 +1844,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
1718
1844
|
onChange: onLinkToggle
|
|
1719
1845
|
},
|
|
1720
1846
|
/* @__PURE__ */ React32.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1721
|
-
)), /* @__PURE__ */ React32.createElement(import_ui27.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui27.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React32.createElement(import_ui27.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React32.createElement(ControlLabel, null, (0,
|
|
1847
|
+
))), /* @__PURE__ */ React32.createElement(import_ui27.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui27.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React32.createElement(import_ui27.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React32.createElement(ControlLabel, null, (0, import_i18n10.__)("Column", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui27.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React32.createElement(Control4, { bind: "column", isLinked }))), /* @__PURE__ */ React32.createElement(import_ui27.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React32.createElement(import_ui27.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React32.createElement(ControlLabel, null, (0, import_i18n10.__)("Row", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui27.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React32.createElement(Control4, { bind: "row", isLinked })))));
|
|
1722
1848
|
});
|
|
1723
1849
|
var Control4 = ({ bind, isLinked }) => {
|
|
1724
1850
|
if (isLinked) {
|
|
@@ -1733,7 +1859,7 @@ var import_editor_props18 = require("@elementor/editor-props");
|
|
|
1733
1859
|
var import_icons9 = require("@elementor/icons");
|
|
1734
1860
|
var import_ui28 = require("@elementor/ui");
|
|
1735
1861
|
var import_wp_media2 = require("@elementor/wp-media");
|
|
1736
|
-
var
|
|
1862
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
1737
1863
|
var TILE_SIZE = 8;
|
|
1738
1864
|
var TILE_WHITE = "transparent";
|
|
1739
1865
|
var TILE_BLACK = "#c1c1c1";
|
|
@@ -1761,9 +1887,9 @@ var SvgMediaControl = createControl(() => {
|
|
|
1761
1887
|
const { id, url } = value ?? {};
|
|
1762
1888
|
const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
|
|
1763
1889
|
const src = attachment?.url ?? url?.value ?? null;
|
|
1890
|
+
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
1764
1891
|
const { open } = (0, import_wp_media2.useWpMediaFrame)({
|
|
1765
|
-
|
|
1766
|
-
allowedExtensions: ["svg"],
|
|
1892
|
+
mediaTypes: ["svg"],
|
|
1767
1893
|
multiple: false,
|
|
1768
1894
|
selected: id?.value || null,
|
|
1769
1895
|
onSelect: (selectedAttachment) => {
|
|
@@ -1776,12 +1902,18 @@ var SvgMediaControl = createControl(() => {
|
|
|
1776
1902
|
});
|
|
1777
1903
|
}
|
|
1778
1904
|
});
|
|
1779
|
-
|
|
1905
|
+
const handleClick = (openOptions) => {
|
|
1906
|
+
if (allowSvgUpload) {
|
|
1907
|
+
open(openOptions);
|
|
1908
|
+
} else {
|
|
1909
|
+
}
|
|
1910
|
+
};
|
|
1911
|
+
return /* @__PURE__ */ React33.createElement(import_ui28.Stack, { gap: 1 }, /* @__PURE__ */ React33.createElement(ControlLabel, null, " ", (0, import_i18n11.__)("SVG", "elementor"), " "), /* @__PURE__ */ React33.createElement(ControlActions, null, /* @__PURE__ */ React33.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React33.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React33.createElement(import_ui28.CircularProgress, { role: "progressbar" }) : /* @__PURE__ */ React33.createElement(
|
|
1780
1912
|
import_ui28.CardMedia,
|
|
1781
1913
|
{
|
|
1782
1914
|
component: "img",
|
|
1783
1915
|
image: src,
|
|
1784
|
-
alt: (0,
|
|
1916
|
+
alt: (0, import_i18n11.__)("Preview SVG", "elementor"),
|
|
1785
1917
|
sx: { maxHeight: "140px", width: "50px" }
|
|
1786
1918
|
}
|
|
1787
1919
|
)), /* @__PURE__ */ React33.createElement(
|
|
@@ -1799,9 +1931,9 @@ var SvgMediaControl = createControl(() => {
|
|
|
1799
1931
|
size: "tiny",
|
|
1800
1932
|
color: "inherit",
|
|
1801
1933
|
variant: "outlined",
|
|
1802
|
-
onClick: () =>
|
|
1934
|
+
onClick: () => handleClick({ mode: "browse" })
|
|
1803
1935
|
},
|
|
1804
|
-
(0,
|
|
1936
|
+
(0, import_i18n11.__)("Select SVG", "elementor")
|
|
1805
1937
|
), /* @__PURE__ */ React33.createElement(
|
|
1806
1938
|
import_ui28.Button,
|
|
1807
1939
|
{
|
|
@@ -1809,9 +1941,9 @@ var SvgMediaControl = createControl(() => {
|
|
|
1809
1941
|
variant: "text",
|
|
1810
1942
|
color: "inherit",
|
|
1811
1943
|
startIcon: /* @__PURE__ */ React33.createElement(import_icons9.UploadIcon, null),
|
|
1812
|
-
onClick: () =>
|
|
1944
|
+
onClick: () => handleClick({ mode: "upload" })
|
|
1813
1945
|
},
|
|
1814
|
-
(0,
|
|
1946
|
+
(0, import_i18n11.__)("Upload", "elementor")
|
|
1815
1947
|
))
|
|
1816
1948
|
))));
|
|
1817
1949
|
});
|
|
@@ -1820,14 +1952,14 @@ var SvgMediaControl = createControl(() => {
|
|
|
1820
1952
|
var React39 = __toESM(require("react"));
|
|
1821
1953
|
var import_editor_props23 = require("@elementor/editor-props");
|
|
1822
1954
|
var import_ui35 = require("@elementor/ui");
|
|
1823
|
-
var
|
|
1955
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
1824
1956
|
|
|
1825
1957
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
1826
1958
|
var React38 = __toESM(require("react"));
|
|
1827
1959
|
var import_editor_props22 = require("@elementor/editor-props");
|
|
1828
1960
|
var import_ui34 = require("@elementor/ui");
|
|
1829
1961
|
var import_wp_media3 = require("@elementor/wp-media");
|
|
1830
|
-
var
|
|
1962
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
1831
1963
|
|
|
1832
1964
|
// src/env.ts
|
|
1833
1965
|
var import_env = require("@elementor/env");
|
|
@@ -1837,23 +1969,23 @@ var { env } = (0, import_env.parseEnv)("@elementor/editor-controls");
|
|
|
1837
1969
|
var React34 = __toESM(require("react"));
|
|
1838
1970
|
var import_icons10 = require("@elementor/icons");
|
|
1839
1971
|
var import_ui29 = require("@elementor/ui");
|
|
1840
|
-
var
|
|
1972
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
1841
1973
|
var attachmentControlOptions = [
|
|
1842
1974
|
{
|
|
1843
1975
|
value: "fixed",
|
|
1844
|
-
label: (0,
|
|
1976
|
+
label: (0, import_i18n12.__)("Fixed", "elementor"),
|
|
1845
1977
|
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(import_icons10.PinIcon, { fontSize: size }),
|
|
1846
1978
|
showTooltip: true
|
|
1847
1979
|
},
|
|
1848
1980
|
{
|
|
1849
1981
|
value: "scroll",
|
|
1850
|
-
label: (0,
|
|
1982
|
+
label: (0, import_i18n12.__)("Scroll", "elementor"),
|
|
1851
1983
|
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(import_icons10.PinnedOffIcon, { fontSize: size }),
|
|
1852
1984
|
showTooltip: true
|
|
1853
1985
|
}
|
|
1854
1986
|
];
|
|
1855
1987
|
var BackgroundImageOverlayAttachment = () => {
|
|
1856
|
-
return /* @__PURE__ */ React34.createElement(PopoverGridContainer, null, /* @__PURE__ */ React34.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, (0,
|
|
1988
|
+
return /* @__PURE__ */ React34.createElement(PopoverGridContainer, null, /* @__PURE__ */ React34.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, (0, import_i18n12.__)("Attachment", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui29.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React34.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
1857
1989
|
};
|
|
1858
1990
|
|
|
1859
1991
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
@@ -1861,18 +1993,18 @@ var React35 = __toESM(require("react"));
|
|
|
1861
1993
|
var import_editor_props19 = require("@elementor/editor-props");
|
|
1862
1994
|
var import_icons11 = require("@elementor/icons");
|
|
1863
1995
|
var import_ui30 = require("@elementor/ui");
|
|
1864
|
-
var
|
|
1996
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
1865
1997
|
var backgroundPositionOptions = [
|
|
1866
|
-
{ label: (0,
|
|
1867
|
-
{ label: (0,
|
|
1868
|
-
{ label: (0,
|
|
1869
|
-
{ label: (0,
|
|
1870
|
-
{ label: (0,
|
|
1871
|
-
{ label: (0,
|
|
1872
|
-
{ label: (0,
|
|
1873
|
-
{ label: (0,
|
|
1874
|
-
{ label: (0,
|
|
1875
|
-
{ label: (0,
|
|
1998
|
+
{ label: (0, import_i18n13.__)("Center center", "elementor"), value: "center center" },
|
|
1999
|
+
{ label: (0, import_i18n13.__)("Center left", "elementor"), value: "center left" },
|
|
2000
|
+
{ label: (0, import_i18n13.__)("Center right", "elementor"), value: "center right" },
|
|
2001
|
+
{ label: (0, import_i18n13.__)("Top center", "elementor"), value: "top center" },
|
|
2002
|
+
{ label: (0, import_i18n13.__)("Top left", "elementor"), value: "top left" },
|
|
2003
|
+
{ label: (0, import_i18n13.__)("Top right", "elementor"), value: "top right" },
|
|
2004
|
+
{ label: (0, import_i18n13.__)("Bottom center", "elementor"), value: "bottom center" },
|
|
2005
|
+
{ label: (0, import_i18n13.__)("Bottom left", "elementor"), value: "bottom left" },
|
|
2006
|
+
{ label: (0, import_i18n13.__)("Bottom right", "elementor"), value: "bottom right" },
|
|
2007
|
+
{ label: (0, import_i18n13.__)("Custom", "elementor"), value: "custom" }
|
|
1876
2008
|
];
|
|
1877
2009
|
var BackgroundImageOverlayPosition = () => {
|
|
1878
2010
|
const backgroundImageOffsetContext = useBoundProp(import_editor_props19.backgroundImagePositionOffsetPropTypeUtil);
|
|
@@ -1886,7 +2018,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
1886
2018
|
stringPropContext.setValue(value);
|
|
1887
2019
|
}
|
|
1888
2020
|
};
|
|
1889
|
-
return /* @__PURE__ */ React35.createElement(import_ui30.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React35.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React35.createElement(PopoverGridContainer, null, /* @__PURE__ */ React35.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel, null, (0,
|
|
2021
|
+
return /* @__PURE__ */ React35.createElement(import_ui30.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React35.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React35.createElement(PopoverGridContainer, null, /* @__PURE__ */ React35.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel, null, (0, import_i18n13.__)("Position", "elementor"))), /* @__PURE__ */ React35.createElement(import_ui30.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React35.createElement(
|
|
1890
2022
|
import_ui30.Select,
|
|
1891
2023
|
{
|
|
1892
2024
|
size: "tiny",
|
|
@@ -1902,35 +2034,35 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
1902
2034
|
var React36 = __toESM(require("react"));
|
|
1903
2035
|
var import_icons12 = require("@elementor/icons");
|
|
1904
2036
|
var import_ui31 = require("@elementor/ui");
|
|
1905
|
-
var
|
|
2037
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
1906
2038
|
var repeatControlOptions = [
|
|
1907
2039
|
{
|
|
1908
2040
|
value: "repeat",
|
|
1909
|
-
label: (0,
|
|
2041
|
+
label: (0, import_i18n14.__)("Repeat", "elementor"),
|
|
1910
2042
|
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(import_icons12.GridDotsIcon, { fontSize: size }),
|
|
1911
2043
|
showTooltip: true
|
|
1912
2044
|
},
|
|
1913
2045
|
{
|
|
1914
2046
|
value: "repeat-x",
|
|
1915
|
-
label: (0,
|
|
2047
|
+
label: (0, import_i18n14.__)("Repeat-x", "elementor"),
|
|
1916
2048
|
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(import_icons12.DotsHorizontalIcon, { fontSize: size }),
|
|
1917
2049
|
showTooltip: true
|
|
1918
2050
|
},
|
|
1919
2051
|
{
|
|
1920
2052
|
value: "repeat-y",
|
|
1921
|
-
label: (0,
|
|
2053
|
+
label: (0, import_i18n14.__)("Repeat-y", "elementor"),
|
|
1922
2054
|
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(import_icons12.DotsVerticalIcon, { fontSize: size }),
|
|
1923
2055
|
showTooltip: true
|
|
1924
2056
|
},
|
|
1925
2057
|
{
|
|
1926
2058
|
value: "no-repeat",
|
|
1927
|
-
label: (0,
|
|
2059
|
+
label: (0, import_i18n14.__)("No-repeat", "elementor"),
|
|
1928
2060
|
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(import_icons12.XIcon, { fontSize: size }),
|
|
1929
2061
|
showTooltip: true
|
|
1930
2062
|
}
|
|
1931
2063
|
];
|
|
1932
2064
|
var BackgroundImageOverlayRepeat = () => {
|
|
1933
|
-
return /* @__PURE__ */ React36.createElement(PopoverGridContainer, null, /* @__PURE__ */ React36.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, (0,
|
|
2065
|
+
return /* @__PURE__ */ React36.createElement(PopoverGridContainer, null, /* @__PURE__ */ React36.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, (0, import_i18n14.__)("Repeat", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui31.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React36.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
1934
2066
|
};
|
|
1935
2067
|
|
|
1936
2068
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
@@ -1938,29 +2070,29 @@ var React37 = __toESM(require("react"));
|
|
|
1938
2070
|
var import_editor_props20 = require("@elementor/editor-props");
|
|
1939
2071
|
var import_icons13 = require("@elementor/icons");
|
|
1940
2072
|
var import_ui32 = require("@elementor/ui");
|
|
1941
|
-
var
|
|
2073
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
1942
2074
|
var sizeControlOptions = [
|
|
1943
2075
|
{
|
|
1944
2076
|
value: "auto",
|
|
1945
|
-
label: (0,
|
|
2077
|
+
label: (0, import_i18n15.__)("Auto", "elementor"),
|
|
1946
2078
|
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons13.LetterAIcon, { fontSize: size }),
|
|
1947
2079
|
showTooltip: true
|
|
1948
2080
|
},
|
|
1949
2081
|
{
|
|
1950
2082
|
value: "cover",
|
|
1951
|
-
label: (0,
|
|
2083
|
+
label: (0, import_i18n15.__)("Cover", "elementor"),
|
|
1952
2084
|
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons13.ArrowsMaximizeIcon, { fontSize: size }),
|
|
1953
2085
|
showTooltip: true
|
|
1954
2086
|
},
|
|
1955
2087
|
{
|
|
1956
2088
|
value: "contain",
|
|
1957
|
-
label: (0,
|
|
2089
|
+
label: (0, import_i18n15.__)("Contain", "elementor"),
|
|
1958
2090
|
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons13.ArrowBarBothIcon, { fontSize: size }),
|
|
1959
2091
|
showTooltip: true
|
|
1960
2092
|
},
|
|
1961
2093
|
{
|
|
1962
2094
|
value: "custom",
|
|
1963
|
-
label: (0,
|
|
2095
|
+
label: (0, import_i18n15.__)("Custom", "elementor"),
|
|
1964
2096
|
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons13.PencilIcon, { fontSize: size }),
|
|
1965
2097
|
showTooltip: true
|
|
1966
2098
|
}
|
|
@@ -1976,7 +2108,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
1976
2108
|
stringPropContext.setValue(size);
|
|
1977
2109
|
}
|
|
1978
2110
|
};
|
|
1979
|
-
return /* @__PURE__ */ React37.createElement(import_ui32.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React37.createElement(import_ui32.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(PopoverGridContainer, null, /* @__PURE__ */ React37.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, (0,
|
|
2111
|
+
return /* @__PURE__ */ React37.createElement(import_ui32.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React37.createElement(import_ui32.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(PopoverGridContainer, null, /* @__PURE__ */ React37.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, (0, import_i18n15.__)("Size", "elementor"))), /* @__PURE__ */ React37.createElement(import_ui32.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React37.createElement(
|
|
1980
2112
|
ControlToggleButtonGroup,
|
|
1981
2113
|
{
|
|
1982
2114
|
exclusive: true,
|
|
@@ -2068,10 +2200,10 @@ var getInitialBackgroundOverlay = () => ({
|
|
|
2068
2200
|
}
|
|
2069
2201
|
});
|
|
2070
2202
|
var backgroundResolutionOptions = [
|
|
2071
|
-
{ label: (0,
|
|
2072
|
-
{ label: (0,
|
|
2073
|
-
{ label: (0,
|
|
2074
|
-
{ label: (0,
|
|
2203
|
+
{ label: (0, import_i18n16.__)("Thumbnail - 150 x 150", "elementor"), value: "thumbnail" },
|
|
2204
|
+
{ label: (0, import_i18n16.__)("Medium - 300 x 300", "elementor"), value: "medium" },
|
|
2205
|
+
{ label: (0, import_i18n16.__)("Large 1024 x 1024", "elementor"), value: "large" },
|
|
2206
|
+
{ label: (0, import_i18n16.__)("Full", "elementor"), value: "full" }
|
|
2075
2207
|
];
|
|
2076
2208
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
2077
2209
|
const { propType, value: overlayValues, setValue } = useBoundProp(import_editor_props22.backgroundOverlayPropTypeUtil);
|
|
@@ -2080,7 +2212,7 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
|
2080
2212
|
{
|
|
2081
2213
|
values: overlayValues ?? [],
|
|
2082
2214
|
setValues: setValue,
|
|
2083
|
-
label: (0,
|
|
2215
|
+
label: (0, import_i18n16.__)("Overlay", "elementor"),
|
|
2084
2216
|
itemSettings: {
|
|
2085
2217
|
Icon: ItemIcon2,
|
|
2086
2218
|
Label: ItemLabel2,
|
|
@@ -2098,7 +2230,7 @@ var Content2 = () => {
|
|
|
2098
2230
|
image: getInitialBackgroundOverlay().value,
|
|
2099
2231
|
color: initialBackgroundColorOverlay.value
|
|
2100
2232
|
});
|
|
2101
|
-
return /* @__PURE__ */ React38.createElement(import_ui34.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React38.createElement(import_ui34.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React38.createElement(import_ui34.Tabs, { ...getTabsProps(), "aria-label": (0,
|
|
2233
|
+
return /* @__PURE__ */ React38.createElement(import_ui34.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React38.createElement(import_ui34.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React38.createElement(import_ui34.Tabs, { ...getTabsProps(), "aria-label": (0, import_i18n16.__)("Background Overlay", "elementor") }, /* @__PURE__ */ React38.createElement(import_ui34.Tab, { label: (0, import_i18n16.__)("Image", "elementor"), ...getTabProps("image") }), /* @__PURE__ */ React38.createElement(import_ui34.Tab, { label: (0, import_i18n16.__)("Color", "elementor"), ...getTabProps("color") }))), /* @__PURE__ */ React38.createElement(import_ui34.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React38.createElement(PopoverContent, null, /* @__PURE__ */ React38.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React38.createElement(import_ui34.TabPanel, { ...getTabPanelProps("color"), sx: { p: 1.5 } }, /* @__PURE__ */ React38.createElement(import_ui34.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React38.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(ColorControl, { propTypeUtil: import_editor_props22.backgroundColorOverlayPropTypeUtil })))));
|
|
2102
2234
|
};
|
|
2103
2235
|
var ItemIcon2 = ({ value }) => {
|
|
2104
2236
|
switch (value.$$type) {
|
|
@@ -2139,7 +2271,7 @@ var ImageOverlayContent = () => {
|
|
|
2139
2271
|
return /* @__PURE__ */ React38.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React38.createElement(import_ui34.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React38.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(
|
|
2140
2272
|
ImageControl,
|
|
2141
2273
|
{
|
|
2142
|
-
resolutionLabel: (0,
|
|
2274
|
+
resolutionLabel: (0, import_i18n16.__)("Resolution", "elementor"),
|
|
2143
2275
|
sizes: backgroundResolutionOptions
|
|
2144
2276
|
}
|
|
2145
2277
|
)))), /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React38.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React38.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React38.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React38.createElement(BackgroundImageOverlayAttachment, null)));
|
|
@@ -2162,7 +2294,7 @@ var useImage = (image) => {
|
|
|
2162
2294
|
// src/controls/background-control/background-control.tsx
|
|
2163
2295
|
var BackgroundControl = createControl(() => {
|
|
2164
2296
|
const propContext = useBoundProp(import_editor_props23.backgroundPropTypeUtil);
|
|
2165
|
-
return /* @__PURE__ */ React39.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React39.createElement(SectionContent, null, /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React39.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React39.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, (0,
|
|
2297
|
+
return /* @__PURE__ */ React39.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React39.createElement(SectionContent, null, /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React39.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React39.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, (0, import_i18n17.__)("Color", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ColorControl, null))))));
|
|
2166
2298
|
});
|
|
2167
2299
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2168
2300
|
0 && (module.exports = {
|