@elementor/editor-controls 0.14.0 → 0.16.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 +30 -0
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +480 -221
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +485 -217
- 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/background-control/background-gradient-color-control.tsx +101 -0
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +43 -5
- package/src/controls/background-control/background-overlay/use-background-tabs-history.ts +29 -2
- 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 +302 -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,47 @@ 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.
|
|
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.TextIcon, { 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,
|
|
1395
|
+
{
|
|
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, overflow: "hidden" }, /* @__PURE__ */ React28.createElement(import_icons5.TextIcon, { fontSize: "large" }), /* @__PURE__ */ React28.createElement(import_ui23.Box, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React28.createElement(import_ui23.Typography, { align: "center", variant: "subtitle2", color: "text.secondary" }, (0, import_i18n8.__)("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React28.createElement(
|
|
1402
|
+
import_ui23.Typography,
|
|
1386
1403
|
{
|
|
1387
|
-
|
|
1404
|
+
variant: "subtitle2",
|
|
1405
|
+
color: "text.secondary",
|
|
1406
|
+
sx: {
|
|
1407
|
+
display: "flex",
|
|
1408
|
+
width: "100%",
|
|
1409
|
+
justifyContent: "center"
|
|
1410
|
+
}
|
|
1388
1411
|
},
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
return /* @__PURE__ */ React28.createElement(
|
|
1393
|
-
import_ui23.MenuItem,
|
|
1412
|
+
/* @__PURE__ */ React28.createElement("span", null, "\u201C"),
|
|
1413
|
+
/* @__PURE__ */ React28.createElement(
|
|
1414
|
+
"span",
|
|
1394
1415
|
{
|
|
1395
|
-
|
|
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 }
|
|
1416
|
+
style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" }
|
|
1404
1417
|
},
|
|
1405
|
-
|
|
1406
|
-
)
|
|
1407
|
-
|
|
1418
|
+
searchValue
|
|
1419
|
+
),
|
|
1420
|
+
/* @__PURE__ */ React28.createElement("span", null, "\u201D.")
|
|
1421
|
+
)), /* @__PURE__ */ React28.createElement(import_ui23.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n8.__)("Try something else.", "elementor"), /* @__PURE__ */ React28.createElement(
|
|
1408
1422
|
import_ui23.Link,
|
|
1409
1423
|
{
|
|
1410
1424
|
color: "secondary",
|
|
@@ -1412,10 +1426,139 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1412
1426
|
component: "button",
|
|
1413
1427
|
onClick: () => setSearchValue("")
|
|
1414
1428
|
},
|
|
1415
|
-
(0,
|
|
1416
|
-
)
|
|
1429
|
+
(0, import_i18n8.__)("Clear & try again", "elementor")
|
|
1430
|
+
)))))
|
|
1417
1431
|
));
|
|
1418
1432
|
});
|
|
1433
|
+
var LIST_ITEM_HEIGHT = 36;
|
|
1434
|
+
var LIST_ITEMS_BUFFER = 6;
|
|
1435
|
+
var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
1436
|
+
const containerRef = (0, import_react9.useRef)(null);
|
|
1437
|
+
const selectedItem = fontListItems.find((item) => item.value === fontFamily);
|
|
1438
|
+
const debouncedVirtualizeChange = useDebounce(({ getVirtualIndexes }) => {
|
|
1439
|
+
getVirtualIndexes().forEach((index) => {
|
|
1440
|
+
const item = fontListItems[index];
|
|
1441
|
+
if (item && item.type === "font") {
|
|
1442
|
+
enqueueFont(item.value);
|
|
1443
|
+
}
|
|
1444
|
+
});
|
|
1445
|
+
}, 100);
|
|
1446
|
+
const virtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
1447
|
+
count: fontListItems.length,
|
|
1448
|
+
getScrollElement: () => containerRef.current,
|
|
1449
|
+
estimateSize: () => LIST_ITEM_HEIGHT,
|
|
1450
|
+
overscan: LIST_ITEMS_BUFFER,
|
|
1451
|
+
onChange: debouncedVirtualizeChange
|
|
1452
|
+
});
|
|
1453
|
+
(0, import_react9.useEffect)(
|
|
1454
|
+
() => {
|
|
1455
|
+
virtualizer.scrollToIndex(fontListItems.findIndex((item) => item.value === fontFamily));
|
|
1456
|
+
},
|
|
1457
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1458
|
+
[fontFamily]
|
|
1459
|
+
);
|
|
1460
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1461
|
+
import_ui23.Box,
|
|
1462
|
+
{
|
|
1463
|
+
ref: containerRef,
|
|
1464
|
+
sx: {
|
|
1465
|
+
overflowY: "auto",
|
|
1466
|
+
height: 260,
|
|
1467
|
+
width: 220
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
/* @__PURE__ */ React28.createElement(
|
|
1471
|
+
StyledMenuList,
|
|
1472
|
+
{
|
|
1473
|
+
role: "listbox",
|
|
1474
|
+
style: {
|
|
1475
|
+
height: `${virtualizer.getTotalSize()}px`
|
|
1476
|
+
},
|
|
1477
|
+
"data-testid": "font-list"
|
|
1478
|
+
},
|
|
1479
|
+
virtualizer.getVirtualItems().map((virtualRow) => {
|
|
1480
|
+
const item = fontListItems[virtualRow.index];
|
|
1481
|
+
const isLast = virtualRow.index === fontListItems.length - 1;
|
|
1482
|
+
const isFirst = virtualRow.index === 1;
|
|
1483
|
+
const isSelected = selectedItem?.value === item.value;
|
|
1484
|
+
const tabIndexFallback = !selectedItem ? 0 : -1;
|
|
1485
|
+
if (item.type === "category") {
|
|
1486
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1487
|
+
import_ui23.ListSubheader,
|
|
1488
|
+
{
|
|
1489
|
+
key: virtualRow.key,
|
|
1490
|
+
style: {
|
|
1491
|
+
transform: `translateY(${virtualRow.start}px)`
|
|
1492
|
+
}
|
|
1493
|
+
},
|
|
1494
|
+
item.value
|
|
1495
|
+
);
|
|
1496
|
+
}
|
|
1497
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1498
|
+
"li",
|
|
1499
|
+
{
|
|
1500
|
+
key: virtualRow.key,
|
|
1501
|
+
role: "option",
|
|
1502
|
+
"aria-selected": isSelected,
|
|
1503
|
+
onClick: () => {
|
|
1504
|
+
setFontFamily(item.value);
|
|
1505
|
+
handleClose();
|
|
1506
|
+
},
|
|
1507
|
+
onKeyDown: (event) => {
|
|
1508
|
+
if (event.key === "Enter") {
|
|
1509
|
+
setFontFamily(item.value);
|
|
1510
|
+
handleClose();
|
|
1511
|
+
}
|
|
1512
|
+
if (event.key === "ArrowDown" && isLast) {
|
|
1513
|
+
event.preventDefault();
|
|
1514
|
+
event.stopPropagation();
|
|
1515
|
+
}
|
|
1516
|
+
if (event.key === "ArrowUp" && isFirst) {
|
|
1517
|
+
event.preventDefault();
|
|
1518
|
+
event.stopPropagation();
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
tabIndex: isSelected ? 0 : tabIndexFallback,
|
|
1522
|
+
style: {
|
|
1523
|
+
transform: `translateY(${virtualRow.start}px)`,
|
|
1524
|
+
fontFamily: item.value
|
|
1525
|
+
}
|
|
1526
|
+
},
|
|
1527
|
+
item.value
|
|
1528
|
+
);
|
|
1529
|
+
})
|
|
1530
|
+
)
|
|
1531
|
+
);
|
|
1532
|
+
};
|
|
1533
|
+
var StyledMenuList = (0, import_ui23.styled)(import_ui23.MenuList)(({ theme }) => ({
|
|
1534
|
+
"& > li": {
|
|
1535
|
+
height: LIST_ITEM_HEIGHT,
|
|
1536
|
+
position: "absolute",
|
|
1537
|
+
top: 0,
|
|
1538
|
+
left: 0,
|
|
1539
|
+
width: "100%"
|
|
1540
|
+
},
|
|
1541
|
+
'& > [role="option"]': {
|
|
1542
|
+
...theme.typography.caption,
|
|
1543
|
+
lineHeight: "inherit",
|
|
1544
|
+
padding: theme.spacing(0.75, 2),
|
|
1545
|
+
"&:hover, &:focus": {
|
|
1546
|
+
backgroundColor: theme.palette.action.hover
|
|
1547
|
+
},
|
|
1548
|
+
'&[aria-selected="true"]': {
|
|
1549
|
+
backgroundColor: theme.palette.action.selected
|
|
1550
|
+
},
|
|
1551
|
+
cursor: "pointer",
|
|
1552
|
+
textOverflow: "ellipsis"
|
|
1553
|
+
},
|
|
1554
|
+
width: "100%",
|
|
1555
|
+
position: "relative"
|
|
1556
|
+
}));
|
|
1557
|
+
var useDebounce = (fn, delay) => {
|
|
1558
|
+
const [debouncedFn] = (0, import_react9.useState)(() => (0, import_utils2.debounce)(fn, delay));
|
|
1559
|
+
(0, import_react9.useEffect)(() => () => debouncedFn.cancel(), [debouncedFn]);
|
|
1560
|
+
return debouncedFn;
|
|
1561
|
+
};
|
|
1419
1562
|
|
|
1420
1563
|
// src/controls/url-control.tsx
|
|
1421
1564
|
var React29 = __toESM(require("react"));
|
|
@@ -1440,12 +1583,12 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1440
1583
|
var React31 = __toESM(require("react"));
|
|
1441
1584
|
var import_react11 = require("react");
|
|
1442
1585
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
1443
|
-
var
|
|
1586
|
+
var import_http2 = require("@elementor/http");
|
|
1444
1587
|
var import_icons7 = require("@elementor/icons");
|
|
1445
1588
|
var import_session = require("@elementor/session");
|
|
1446
1589
|
var import_ui26 = require("@elementor/ui");
|
|
1447
|
-
var
|
|
1448
|
-
var
|
|
1590
|
+
var import_utils3 = require("@elementor/utils");
|
|
1591
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
1449
1592
|
|
|
1450
1593
|
// src/components/autocomplete.tsx
|
|
1451
1594
|
var React30 = __toESM(require("react"));
|
|
@@ -1603,7 +1746,7 @@ var LinkControl = createControl((props) => {
|
|
|
1603
1746
|
debounceFetch({ ...requestParams, term: newValue });
|
|
1604
1747
|
};
|
|
1605
1748
|
const debounceFetch = (0, import_react11.useMemo)(
|
|
1606
|
-
() => (0,
|
|
1749
|
+
() => (0, import_utils3.debounce)(
|
|
1607
1750
|
(params) => fetchOptions(endpoint, params).then((newOptions) => {
|
|
1608
1751
|
setOptions(formatOptions(newOptions));
|
|
1609
1752
|
}),
|
|
@@ -1620,13 +1763,13 @@ var LinkControl = createControl((props) => {
|
|
|
1620
1763
|
alignItems: "center"
|
|
1621
1764
|
}
|
|
1622
1765
|
},
|
|
1623
|
-
/* @__PURE__ */ React31.createElement(ControlLabel, null, (0,
|
|
1766
|
+
/* @__PURE__ */ React31.createElement(ControlLabel, null, (0, import_i18n9.__)("Link", "elementor")),
|
|
1624
1767
|
/* @__PURE__ */ React31.createElement(
|
|
1625
1768
|
ToggleIconControl,
|
|
1626
1769
|
{
|
|
1627
1770
|
enabled: isEnabled,
|
|
1628
1771
|
onIconClick: onEnabledChange,
|
|
1629
|
-
label: (0,
|
|
1772
|
+
label: (0, import_i18n9.__)("Toggle link", "elementor")
|
|
1630
1773
|
}
|
|
1631
1774
|
)
|
|
1632
1775
|
), /* @__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 +1793,14 @@ var SwitchControl = () => {
|
|
|
1650
1793
|
const onClick = () => {
|
|
1651
1794
|
setValue(!value);
|
|
1652
1795
|
};
|
|
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,
|
|
1796
|
+
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
1797
|
};
|
|
1655
1798
|
async function fetchOptions(ajaxUrl, params) {
|
|
1656
1799
|
if (!params || !ajaxUrl) {
|
|
1657
1800
|
return [];
|
|
1658
1801
|
}
|
|
1659
1802
|
try {
|
|
1660
|
-
const { data: response } = await (0,
|
|
1803
|
+
const { data: response } = await (0, import_http2.httpService)().get(ajaxUrl, { params });
|
|
1661
1804
|
return response.data.value;
|
|
1662
1805
|
} catch {
|
|
1663
1806
|
return [];
|
|
@@ -1686,7 +1829,7 @@ var React32 = __toESM(require("react"));
|
|
|
1686
1829
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
1687
1830
|
var import_icons8 = require("@elementor/icons");
|
|
1688
1831
|
var import_ui27 = require("@elementor/ui");
|
|
1689
|
-
var
|
|
1832
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
1690
1833
|
var GapControl = createControl(({ label }) => {
|
|
1691
1834
|
const {
|
|
1692
1835
|
value: directionValue,
|
|
@@ -1706,11 +1849,14 @@ var GapControl = createControl(({ label }) => {
|
|
|
1706
1849
|
column: value
|
|
1707
1850
|
});
|
|
1708
1851
|
};
|
|
1852
|
+
const tooltipLabel = label.toLowerCase();
|
|
1709
1853
|
const LinkedIcon = isLinked ? import_icons8.LinkIcon : import_icons8.DetachIcon;
|
|
1710
|
-
|
|
1854
|
+
const linkedLabel = (0, import_i18n10.__)("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1855
|
+
const unlinkedLabel = (0, import_i18n10.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1856
|
+
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
1857
|
import_ui27.ToggleButton,
|
|
1712
1858
|
{
|
|
1713
|
-
"aria-label":
|
|
1859
|
+
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
1714
1860
|
size: "tiny",
|
|
1715
1861
|
value: "check",
|
|
1716
1862
|
selected: isLinked,
|
|
@@ -1718,7 +1864,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
1718
1864
|
onChange: onLinkToggle
|
|
1719
1865
|
},
|
|
1720
1866
|
/* @__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,
|
|
1867
|
+
))), /* @__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
1868
|
});
|
|
1723
1869
|
var Control4 = ({ bind, isLinked }) => {
|
|
1724
1870
|
if (isLinked) {
|
|
@@ -1733,7 +1879,7 @@ var import_editor_props18 = require("@elementor/editor-props");
|
|
|
1733
1879
|
var import_icons9 = require("@elementor/icons");
|
|
1734
1880
|
var import_ui28 = require("@elementor/ui");
|
|
1735
1881
|
var import_wp_media2 = require("@elementor/wp-media");
|
|
1736
|
-
var
|
|
1882
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
1737
1883
|
var TILE_SIZE = 8;
|
|
1738
1884
|
var TILE_WHITE = "transparent";
|
|
1739
1885
|
var TILE_BLACK = "#c1c1c1";
|
|
@@ -1761,9 +1907,9 @@ var SvgMediaControl = createControl(() => {
|
|
|
1761
1907
|
const { id, url } = value ?? {};
|
|
1762
1908
|
const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
|
|
1763
1909
|
const src = attachment?.url ?? url?.value ?? null;
|
|
1910
|
+
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
1764
1911
|
const { open } = (0, import_wp_media2.useWpMediaFrame)({
|
|
1765
|
-
|
|
1766
|
-
allowedExtensions: ["svg"],
|
|
1912
|
+
mediaTypes: ["svg"],
|
|
1767
1913
|
multiple: false,
|
|
1768
1914
|
selected: id?.value || null,
|
|
1769
1915
|
onSelect: (selectedAttachment) => {
|
|
@@ -1776,12 +1922,18 @@ var SvgMediaControl = createControl(() => {
|
|
|
1776
1922
|
});
|
|
1777
1923
|
}
|
|
1778
1924
|
});
|
|
1779
|
-
|
|
1925
|
+
const handleClick = (openOptions) => {
|
|
1926
|
+
if (allowSvgUpload) {
|
|
1927
|
+
open(openOptions);
|
|
1928
|
+
} else {
|
|
1929
|
+
}
|
|
1930
|
+
};
|
|
1931
|
+
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
1932
|
import_ui28.CardMedia,
|
|
1781
1933
|
{
|
|
1782
1934
|
component: "img",
|
|
1783
1935
|
image: src,
|
|
1784
|
-
alt: (0,
|
|
1936
|
+
alt: (0, import_i18n11.__)("Preview SVG", "elementor"),
|
|
1785
1937
|
sx: { maxHeight: "140px", width: "50px" }
|
|
1786
1938
|
}
|
|
1787
1939
|
)), /* @__PURE__ */ React33.createElement(
|
|
@@ -1799,9 +1951,9 @@ var SvgMediaControl = createControl(() => {
|
|
|
1799
1951
|
size: "tiny",
|
|
1800
1952
|
color: "inherit",
|
|
1801
1953
|
variant: "outlined",
|
|
1802
|
-
onClick: () =>
|
|
1954
|
+
onClick: () => handleClick({ mode: "browse" })
|
|
1803
1955
|
},
|
|
1804
|
-
(0,
|
|
1956
|
+
(0, import_i18n11.__)("Select SVG", "elementor")
|
|
1805
1957
|
), /* @__PURE__ */ React33.createElement(
|
|
1806
1958
|
import_ui28.Button,
|
|
1807
1959
|
{
|
|
@@ -1809,74 +1961,139 @@ var SvgMediaControl = createControl(() => {
|
|
|
1809
1961
|
variant: "text",
|
|
1810
1962
|
color: "inherit",
|
|
1811
1963
|
startIcon: /* @__PURE__ */ React33.createElement(import_icons9.UploadIcon, null),
|
|
1812
|
-
onClick: () =>
|
|
1964
|
+
onClick: () => handleClick({ mode: "upload" })
|
|
1813
1965
|
},
|
|
1814
|
-
(0,
|
|
1966
|
+
(0, import_i18n11.__)("Upload", "elementor")
|
|
1815
1967
|
))
|
|
1816
1968
|
))));
|
|
1817
1969
|
});
|
|
1818
1970
|
|
|
1819
1971
|
// src/controls/background-control/background-control.tsx
|
|
1972
|
+
var React40 = __toESM(require("react"));
|
|
1973
|
+
var import_editor_props24 = require("@elementor/editor-props");
|
|
1974
|
+
var import_ui36 = require("@elementor/ui");
|
|
1975
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
1976
|
+
|
|
1977
|
+
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
1820
1978
|
var React39 = __toESM(require("react"));
|
|
1821
1979
|
var import_editor_props23 = require("@elementor/editor-props");
|
|
1822
1980
|
var import_ui35 = require("@elementor/ui");
|
|
1823
|
-
var import_i18n18 = require("@wordpress/i18n");
|
|
1824
|
-
|
|
1825
|
-
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
1826
|
-
var React38 = __toESM(require("react"));
|
|
1827
|
-
var import_editor_props22 = require("@elementor/editor-props");
|
|
1828
|
-
var import_ui34 = require("@elementor/ui");
|
|
1829
1981
|
var import_wp_media3 = require("@elementor/wp-media");
|
|
1830
|
-
var
|
|
1982
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
1831
1983
|
|
|
1832
1984
|
// src/env.ts
|
|
1833
1985
|
var import_env = require("@elementor/env");
|
|
1834
1986
|
var { env } = (0, import_env.parseEnv)("@elementor/editor-controls");
|
|
1835
1987
|
|
|
1836
|
-
// src/controls/background-control/background-
|
|
1988
|
+
// src/controls/background-control/background-gradient-color-control.tsx
|
|
1837
1989
|
var React34 = __toESM(require("react"));
|
|
1838
|
-
var
|
|
1990
|
+
var import_editor_props19 = require("@elementor/editor-props");
|
|
1839
1991
|
var import_ui29 = require("@elementor/ui");
|
|
1840
|
-
var
|
|
1992
|
+
var BackgroundGradientColorControl = createControl(() => {
|
|
1993
|
+
const { value, setValue } = useBoundProp(import_editor_props19.backgroundGradientOverlayPropTypeUtil);
|
|
1994
|
+
const handleChange = (newValue) => {
|
|
1995
|
+
const transformedValue = createTransformableValue(newValue);
|
|
1996
|
+
if (transformedValue.positions) {
|
|
1997
|
+
transformedValue.positions = import_editor_props19.stringPropTypeUtil.create(newValue.positions.join(" "));
|
|
1998
|
+
}
|
|
1999
|
+
setValue(transformedValue);
|
|
2000
|
+
};
|
|
2001
|
+
const createTransformableValue = (newValue) => ({
|
|
2002
|
+
...newValue,
|
|
2003
|
+
type: import_editor_props19.stringPropTypeUtil.create(newValue.type),
|
|
2004
|
+
angle: import_editor_props19.numberPropTypeUtil.create(newValue.angle),
|
|
2005
|
+
stops: import_editor_props19.gradientColorStopPropTypeUtil.create(
|
|
2006
|
+
newValue.stops.map(
|
|
2007
|
+
({ color, offset }) => import_editor_props19.colorStopPropTypeUtil.create({
|
|
2008
|
+
color: import_editor_props19.colorPropTypeUtil.create(color),
|
|
2009
|
+
offset: import_editor_props19.numberPropTypeUtil.create(offset)
|
|
2010
|
+
})
|
|
2011
|
+
)
|
|
2012
|
+
)
|
|
2013
|
+
});
|
|
2014
|
+
const normalizeValue = () => {
|
|
2015
|
+
if (!value) {
|
|
2016
|
+
return;
|
|
2017
|
+
}
|
|
2018
|
+
const { type, angle, stops, positions } = value;
|
|
2019
|
+
return {
|
|
2020
|
+
type: type.value,
|
|
2021
|
+
angle: angle.value,
|
|
2022
|
+
stops: stops.value.map(({ value: { color, offset } }) => ({
|
|
2023
|
+
color: color.value,
|
|
2024
|
+
offset: offset.value
|
|
2025
|
+
})),
|
|
2026
|
+
positions: positions?.value.split(" ")
|
|
2027
|
+
};
|
|
2028
|
+
};
|
|
2029
|
+
return /* @__PURE__ */ React34.createElement(ControlActions, null, /* @__PURE__ */ React34.createElement(
|
|
2030
|
+
import_ui29.UnstableGradientBox,
|
|
2031
|
+
{
|
|
2032
|
+
sx: { width: "auto", padding: 1.5 },
|
|
2033
|
+
value: normalizeValue(),
|
|
2034
|
+
onChange: handleChange
|
|
2035
|
+
}
|
|
2036
|
+
));
|
|
2037
|
+
});
|
|
2038
|
+
var initialBackgroundGradientOverlay = import_editor_props19.backgroundGradientOverlayPropTypeUtil.create({
|
|
2039
|
+
type: import_editor_props19.stringPropTypeUtil.create("linear"),
|
|
2040
|
+
angle: import_editor_props19.numberPropTypeUtil.create(180),
|
|
2041
|
+
stops: import_editor_props19.gradientColorStopPropTypeUtil.create([
|
|
2042
|
+
import_editor_props19.colorStopPropTypeUtil.create({
|
|
2043
|
+
color: import_editor_props19.stringPropTypeUtil.create("var(--primary-color)"),
|
|
2044
|
+
offset: import_editor_props19.numberPropTypeUtil.create(0)
|
|
2045
|
+
}),
|
|
2046
|
+
import_editor_props19.colorStopPropTypeUtil.create({
|
|
2047
|
+
color: import_editor_props19.colorPropTypeUtil.create("rgb(255,255,255)"),
|
|
2048
|
+
offset: import_editor_props19.numberPropTypeUtil.create(100)
|
|
2049
|
+
})
|
|
2050
|
+
])
|
|
2051
|
+
});
|
|
2052
|
+
|
|
2053
|
+
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
2054
|
+
var React35 = __toESM(require("react"));
|
|
2055
|
+
var import_icons10 = require("@elementor/icons");
|
|
2056
|
+
var import_ui30 = require("@elementor/ui");
|
|
2057
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
1841
2058
|
var attachmentControlOptions = [
|
|
1842
2059
|
{
|
|
1843
2060
|
value: "fixed",
|
|
1844
|
-
label: (0,
|
|
1845
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2061
|
+
label: (0, import_i18n12.__)("Fixed", "elementor"),
|
|
2062
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons10.PinIcon, { fontSize: size }),
|
|
1846
2063
|
showTooltip: true
|
|
1847
2064
|
},
|
|
1848
2065
|
{
|
|
1849
2066
|
value: "scroll",
|
|
1850
|
-
label: (0,
|
|
1851
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2067
|
+
label: (0, import_i18n12.__)("Scroll", "elementor"),
|
|
2068
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons10.PinnedOffIcon, { fontSize: size }),
|
|
1852
2069
|
showTooltip: true
|
|
1853
2070
|
}
|
|
1854
2071
|
];
|
|
1855
2072
|
var BackgroundImageOverlayAttachment = () => {
|
|
1856
|
-
return /* @__PURE__ */
|
|
2073
|
+
return /* @__PURE__ */ React35.createElement(PopoverGridContainer, null, /* @__PURE__ */ React35.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel, null, (0, import_i18n12.__)("Attachment", "elementor"))), /* @__PURE__ */ React35.createElement(import_ui30.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React35.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
1857
2074
|
};
|
|
1858
2075
|
|
|
1859
2076
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
1860
|
-
var
|
|
1861
|
-
var
|
|
2077
|
+
var React36 = __toESM(require("react"));
|
|
2078
|
+
var import_editor_props20 = require("@elementor/editor-props");
|
|
1862
2079
|
var import_icons11 = require("@elementor/icons");
|
|
1863
|
-
var
|
|
1864
|
-
var
|
|
2080
|
+
var import_ui31 = require("@elementor/ui");
|
|
2081
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
1865
2082
|
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,
|
|
2083
|
+
{ label: (0, import_i18n13.__)("Center center", "elementor"), value: "center center" },
|
|
2084
|
+
{ label: (0, import_i18n13.__)("Center left", "elementor"), value: "center left" },
|
|
2085
|
+
{ label: (0, import_i18n13.__)("Center right", "elementor"), value: "center right" },
|
|
2086
|
+
{ label: (0, import_i18n13.__)("Top center", "elementor"), value: "top center" },
|
|
2087
|
+
{ label: (0, import_i18n13.__)("Top left", "elementor"), value: "top left" },
|
|
2088
|
+
{ label: (0, import_i18n13.__)("Top right", "elementor"), value: "top right" },
|
|
2089
|
+
{ label: (0, import_i18n13.__)("Bottom center", "elementor"), value: "bottom center" },
|
|
2090
|
+
{ label: (0, import_i18n13.__)("Bottom left", "elementor"), value: "bottom left" },
|
|
2091
|
+
{ label: (0, import_i18n13.__)("Bottom right", "elementor"), value: "bottom right" },
|
|
2092
|
+
{ label: (0, import_i18n13.__)("Custom", "elementor"), value: "custom" }
|
|
1876
2093
|
];
|
|
1877
2094
|
var BackgroundImageOverlayPosition = () => {
|
|
1878
|
-
const backgroundImageOffsetContext = useBoundProp(
|
|
1879
|
-
const stringPropContext = useBoundProp(
|
|
2095
|
+
const backgroundImageOffsetContext = useBoundProp(import_editor_props20.backgroundImagePositionOffsetPropTypeUtil);
|
|
2096
|
+
const stringPropContext = useBoundProp(import_editor_props20.stringPropTypeUtil);
|
|
1880
2097
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
1881
2098
|
const handlePositionChange = (event) => {
|
|
1882
2099
|
const value = event.target.value || null;
|
|
@@ -1886,88 +2103,88 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
1886
2103
|
stringPropContext.setValue(value);
|
|
1887
2104
|
}
|
|
1888
2105
|
};
|
|
1889
|
-
return /* @__PURE__ */
|
|
1890
|
-
|
|
2106
|
+
return /* @__PURE__ */ React36.createElement(import_ui31.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React36.createElement(import_ui31.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React36.createElement(PopoverGridContainer, null, /* @__PURE__ */ React36.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, (0, import_i18n13.__)("Position", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui31.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React36.createElement(
|
|
2107
|
+
import_ui31.Select,
|
|
1891
2108
|
{
|
|
1892
2109
|
size: "tiny",
|
|
1893
2110
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? "",
|
|
1894
2111
|
onChange: handlePositionChange,
|
|
1895
2112
|
fullWidth: true
|
|
1896
2113
|
},
|
|
1897
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
1898
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2114
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React36.createElement(import_ui31.MenuItem, { key: value, value: value ?? "" }, label))
|
|
2115
|
+
)))), isCustom ? /* @__PURE__ */ React36.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React36.createElement(import_ui31.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React36.createElement(import_ui31.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React36.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React36.createElement(SizeControl, { startIcon: /* @__PURE__ */ React36.createElement(import_icons11.LetterXIcon, { fontSize: "tiny" }) }))), /* @__PURE__ */ React36.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React36.createElement(SizeControl, { startIcon: /* @__PURE__ */ React36.createElement(import_icons11.LetterYIcon, { fontSize: "tiny" }) })))))) : null);
|
|
1899
2116
|
};
|
|
1900
2117
|
|
|
1901
2118
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
1902
|
-
var
|
|
2119
|
+
var React37 = __toESM(require("react"));
|
|
1903
2120
|
var import_icons12 = require("@elementor/icons");
|
|
1904
|
-
var
|
|
1905
|
-
var
|
|
2121
|
+
var import_ui32 = require("@elementor/ui");
|
|
2122
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
1906
2123
|
var repeatControlOptions = [
|
|
1907
2124
|
{
|
|
1908
2125
|
value: "repeat",
|
|
1909
|
-
label: (0,
|
|
1910
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2126
|
+
label: (0, import_i18n14.__)("Repeat", "elementor"),
|
|
2127
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons12.GridDotsIcon, { fontSize: size }),
|
|
1911
2128
|
showTooltip: true
|
|
1912
2129
|
},
|
|
1913
2130
|
{
|
|
1914
2131
|
value: "repeat-x",
|
|
1915
|
-
label: (0,
|
|
1916
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2132
|
+
label: (0, import_i18n14.__)("Repeat-x", "elementor"),
|
|
2133
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons12.DotsHorizontalIcon, { fontSize: size }),
|
|
1917
2134
|
showTooltip: true
|
|
1918
2135
|
},
|
|
1919
2136
|
{
|
|
1920
2137
|
value: "repeat-y",
|
|
1921
|
-
label: (0,
|
|
1922
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2138
|
+
label: (0, import_i18n14.__)("Repeat-y", "elementor"),
|
|
2139
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons12.DotsVerticalIcon, { fontSize: size }),
|
|
1923
2140
|
showTooltip: true
|
|
1924
2141
|
},
|
|
1925
2142
|
{
|
|
1926
2143
|
value: "no-repeat",
|
|
1927
|
-
label: (0,
|
|
1928
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2144
|
+
label: (0, import_i18n14.__)("No-repeat", "elementor"),
|
|
2145
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons12.XIcon, { fontSize: size }),
|
|
1929
2146
|
showTooltip: true
|
|
1930
2147
|
}
|
|
1931
2148
|
];
|
|
1932
2149
|
var BackgroundImageOverlayRepeat = () => {
|
|
1933
|
-
return /* @__PURE__ */
|
|
2150
|
+
return /* @__PURE__ */ React37.createElement(PopoverGridContainer, null, /* @__PURE__ */ React37.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, (0, import_i18n14.__)("Repeat", "elementor"))), /* @__PURE__ */ React37.createElement(import_ui32.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React37.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
1934
2151
|
};
|
|
1935
2152
|
|
|
1936
2153
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
1937
|
-
var
|
|
1938
|
-
var
|
|
2154
|
+
var React38 = __toESM(require("react"));
|
|
2155
|
+
var import_editor_props21 = require("@elementor/editor-props");
|
|
1939
2156
|
var import_icons13 = require("@elementor/icons");
|
|
1940
|
-
var
|
|
1941
|
-
var
|
|
2157
|
+
var import_ui33 = require("@elementor/ui");
|
|
2158
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
1942
2159
|
var sizeControlOptions = [
|
|
1943
2160
|
{
|
|
1944
2161
|
value: "auto",
|
|
1945
|
-
label: (0,
|
|
1946
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2162
|
+
label: (0, import_i18n15.__)("Auto", "elementor"),
|
|
2163
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons13.LetterAIcon, { fontSize: size }),
|
|
1947
2164
|
showTooltip: true
|
|
1948
2165
|
},
|
|
1949
2166
|
{
|
|
1950
2167
|
value: "cover",
|
|
1951
|
-
label: (0,
|
|
1952
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2168
|
+
label: (0, import_i18n15.__)("Cover", "elementor"),
|
|
2169
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons13.ArrowsMaximizeIcon, { fontSize: size }),
|
|
1953
2170
|
showTooltip: true
|
|
1954
2171
|
},
|
|
1955
2172
|
{
|
|
1956
2173
|
value: "contain",
|
|
1957
|
-
label: (0,
|
|
1958
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2174
|
+
label: (0, import_i18n15.__)("Contain", "elementor"),
|
|
2175
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons13.ArrowBarBothIcon, { fontSize: size }),
|
|
1959
2176
|
showTooltip: true
|
|
1960
2177
|
},
|
|
1961
2178
|
{
|
|
1962
2179
|
value: "custom",
|
|
1963
|
-
label: (0,
|
|
1964
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2180
|
+
label: (0, import_i18n15.__)("Custom", "elementor"),
|
|
2181
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons13.PencilIcon, { fontSize: size }),
|
|
1965
2182
|
showTooltip: true
|
|
1966
2183
|
}
|
|
1967
2184
|
];
|
|
1968
2185
|
var BackgroundImageOverlaySize = () => {
|
|
1969
|
-
const backgroundImageScaleContext = useBoundProp(
|
|
1970
|
-
const stringPropContext = useBoundProp(
|
|
2186
|
+
const backgroundImageScaleContext = useBoundProp(import_editor_props21.backgroundImageSizeScalePropTypeUtil);
|
|
2187
|
+
const stringPropContext = useBoundProp(import_editor_props21.stringPropTypeUtil);
|
|
1971
2188
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
1972
2189
|
const handleSizeChange = (size) => {
|
|
1973
2190
|
if (size === "custom") {
|
|
@@ -1976,7 +2193,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
1976
2193
|
stringPropContext.setValue(size);
|
|
1977
2194
|
}
|
|
1978
2195
|
};
|
|
1979
|
-
return /* @__PURE__ */
|
|
2196
|
+
return /* @__PURE__ */ React38.createElement(import_ui33.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React38.createElement(import_ui33.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(PopoverGridContainer, null, /* @__PURE__ */ React38.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, (0, import_i18n15.__)("Size", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui33.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React38.createElement(
|
|
1980
2197
|
ControlToggleButtonGroup,
|
|
1981
2198
|
{
|
|
1982
2199
|
exclusive: true,
|
|
@@ -1984,16 +2201,16 @@ var BackgroundImageOverlaySize = () => {
|
|
|
1984
2201
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value,
|
|
1985
2202
|
onChange: handleSizeChange
|
|
1986
2203
|
}
|
|
1987
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2204
|
+
)))), isCustom ? /* @__PURE__ */ React38.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React38.createElement(import_ui33.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(PopoverGridContainer, null, /* @__PURE__ */ React38.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React38.createElement(
|
|
1988
2205
|
SizeControl,
|
|
1989
2206
|
{
|
|
1990
|
-
startIcon: /* @__PURE__ */
|
|
2207
|
+
startIcon: /* @__PURE__ */ React38.createElement(import_icons13.ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
|
|
1991
2208
|
extendedValues: ["auto"]
|
|
1992
2209
|
}
|
|
1993
|
-
))), /* @__PURE__ */
|
|
2210
|
+
))), /* @__PURE__ */ React38.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React38.createElement(
|
|
1994
2211
|
SizeControl,
|
|
1995
2212
|
{
|
|
1996
|
-
startIcon: /* @__PURE__ */
|
|
2213
|
+
startIcon: /* @__PURE__ */ React38.createElement(import_icons13.ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
|
|
1997
2214
|
extendedValues: ["auto"]
|
|
1998
2215
|
}
|
|
1999
2216
|
)))))) : null);
|
|
@@ -2001,18 +2218,30 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2001
2218
|
|
|
2002
2219
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
2003
2220
|
var import_react12 = require("react");
|
|
2004
|
-
var
|
|
2005
|
-
var
|
|
2221
|
+
var import_editor_props22 = require("@elementor/editor-props");
|
|
2222
|
+
var import_ui34 = require("@elementor/ui");
|
|
2006
2223
|
var useBackgroundTabsHistory = ({
|
|
2007
2224
|
color: initialBackgroundColorOverlay2,
|
|
2008
|
-
image: initialBackgroundImageOverlay
|
|
2225
|
+
image: initialBackgroundImageOverlay,
|
|
2226
|
+
gradient: initialBackgroundGradientOverlay2
|
|
2009
2227
|
}) => {
|
|
2010
|
-
const { value: imageValue, setValue: setImageValue } = useBoundProp(
|
|
2011
|
-
const { value: colorValue, setValue: setColorValue } = useBoundProp(
|
|
2012
|
-
const {
|
|
2228
|
+
const { value: imageValue, setValue: setImageValue } = useBoundProp(import_editor_props22.backgroundImageOverlayPropTypeUtil);
|
|
2229
|
+
const { value: colorValue, setValue: setColorValue } = useBoundProp(import_editor_props22.backgroundColorOverlayPropTypeUtil);
|
|
2230
|
+
const { value: gradientValue, setValue: setGradientValue } = useBoundProp(import_editor_props22.backgroundGradientOverlayPropTypeUtil);
|
|
2231
|
+
const getCurrentOverlayType = () => {
|
|
2232
|
+
if (colorValue) {
|
|
2233
|
+
return "color";
|
|
2234
|
+
}
|
|
2235
|
+
if (gradientValue) {
|
|
2236
|
+
return "gradient";
|
|
2237
|
+
}
|
|
2238
|
+
return "image";
|
|
2239
|
+
};
|
|
2240
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui34.useTabs)(getCurrentOverlayType());
|
|
2013
2241
|
const valuesHistory = (0, import_react12.useRef)({
|
|
2014
2242
|
image: initialBackgroundImageOverlay,
|
|
2015
|
-
color: initialBackgroundColorOverlay2
|
|
2243
|
+
color: initialBackgroundColorOverlay2,
|
|
2244
|
+
gradient: initialBackgroundGradientOverlay2
|
|
2016
2245
|
});
|
|
2017
2246
|
const saveToHistory = (key, value) => {
|
|
2018
2247
|
if (value) {
|
|
@@ -2024,10 +2253,17 @@ var useBackgroundTabsHistory = ({
|
|
|
2024
2253
|
case "image":
|
|
2025
2254
|
setImageValue(valuesHistory.current.image);
|
|
2026
2255
|
saveToHistory("color", colorValue);
|
|
2256
|
+
saveToHistory("gradient", gradientValue);
|
|
2257
|
+
break;
|
|
2258
|
+
case "gradient":
|
|
2259
|
+
setGradientValue(valuesHistory.current.gradient);
|
|
2260
|
+
saveToHistory("color", colorValue);
|
|
2261
|
+
saveToHistory("image", imageValue);
|
|
2027
2262
|
break;
|
|
2028
2263
|
case "color":
|
|
2029
2264
|
setColorValue(valuesHistory.current.color);
|
|
2030
2265
|
saveToHistory("image", imageValue);
|
|
2266
|
+
saveToHistory("gradient", gradientValue);
|
|
2031
2267
|
}
|
|
2032
2268
|
return getTabsProps().onChange(e, tabName);
|
|
2033
2269
|
};
|
|
@@ -2068,19 +2304,19 @@ var getInitialBackgroundOverlay = () => ({
|
|
|
2068
2304
|
}
|
|
2069
2305
|
});
|
|
2070
2306
|
var backgroundResolutionOptions = [
|
|
2071
|
-
{ label: (0,
|
|
2072
|
-
{ label: (0,
|
|
2073
|
-
{ label: (0,
|
|
2074
|
-
{ label: (0,
|
|
2307
|
+
{ label: (0, import_i18n16.__)("Thumbnail - 150 x 150", "elementor"), value: "thumbnail" },
|
|
2308
|
+
{ label: (0, import_i18n16.__)("Medium - 300 x 300", "elementor"), value: "medium" },
|
|
2309
|
+
{ label: (0, import_i18n16.__)("Large 1024 x 1024", "elementor"), value: "large" },
|
|
2310
|
+
{ label: (0, import_i18n16.__)("Full", "elementor"), value: "full" }
|
|
2075
2311
|
];
|
|
2076
2312
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
2077
|
-
const { propType, value: overlayValues, setValue } = useBoundProp(
|
|
2078
|
-
return /* @__PURE__ */
|
|
2313
|
+
const { propType, value: overlayValues, setValue } = useBoundProp(import_editor_props23.backgroundOverlayPropTypeUtil);
|
|
2314
|
+
return /* @__PURE__ */ React39.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React39.createElement(
|
|
2079
2315
|
Repeater,
|
|
2080
2316
|
{
|
|
2081
2317
|
values: overlayValues ?? [],
|
|
2082
2318
|
setValues: setValue,
|
|
2083
|
-
label: (0,
|
|
2319
|
+
label: (0, import_i18n16.__)("Overlay", "elementor"),
|
|
2084
2320
|
itemSettings: {
|
|
2085
2321
|
Icon: ItemIcon2,
|
|
2086
2322
|
Label: ItemLabel2,
|
|
@@ -2091,58 +2327,73 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
|
2091
2327
|
));
|
|
2092
2328
|
});
|
|
2093
2329
|
var ItemContent2 = ({ bind }) => {
|
|
2094
|
-
return /* @__PURE__ */
|
|
2330
|
+
return /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React39.createElement(Content2, null));
|
|
2095
2331
|
};
|
|
2096
2332
|
var Content2 = () => {
|
|
2097
2333
|
const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
|
|
2098
2334
|
image: getInitialBackgroundOverlay().value,
|
|
2099
|
-
color: initialBackgroundColorOverlay.value
|
|
2335
|
+
color: initialBackgroundColorOverlay.value,
|
|
2336
|
+
gradient: initialBackgroundGradientOverlay.value
|
|
2100
2337
|
});
|
|
2101
|
-
return /* @__PURE__ */
|
|
2338
|
+
return /* @__PURE__ */ React39.createElement(import_ui35.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React39.createElement(import_ui35.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React39.createElement(import_ui35.Tabs, { ...getTabsProps(), "aria-label": (0, import_i18n16.__)("Background Overlay", "elementor") }, /* @__PURE__ */ React39.createElement(import_ui35.Tab, { label: (0, import_i18n16.__)("Image", "elementor"), ...getTabProps("image") }), /* @__PURE__ */ React39.createElement(import_ui35.Tab, { label: (0, import_i18n16.__)("Gradient", "elementor"), ...getTabProps("gradient") }), /* @__PURE__ */ React39.createElement(import_ui35.Tab, { label: (0, import_i18n16.__)("Color", "elementor"), ...getTabProps("color") }))), /* @__PURE__ */ React39.createElement(import_ui35.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React39.createElement(PopoverContent, null, /* @__PURE__ */ React39.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React39.createElement(import_ui35.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React39.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React39.createElement(import_ui35.TabPanel, { ...getTabPanelProps("color"), sx: { p: 1.5 } }, /* @__PURE__ */ React39.createElement(ColorControl, { propTypeUtil: import_editor_props23.backgroundColorOverlayPropTypeUtil })));
|
|
2102
2339
|
};
|
|
2103
2340
|
var ItemIcon2 = ({ value }) => {
|
|
2104
2341
|
switch (value.$$type) {
|
|
2105
2342
|
case "background-image-overlay":
|
|
2106
|
-
return /* @__PURE__ */
|
|
2343
|
+
return /* @__PURE__ */ React39.createElement(ItemIconImage, { value });
|
|
2107
2344
|
case "background-color-overlay":
|
|
2108
|
-
return /* @__PURE__ */
|
|
2345
|
+
return /* @__PURE__ */ React39.createElement(ItemIconColor, { value });
|
|
2346
|
+
case "background-gradient-overlay":
|
|
2347
|
+
return /* @__PURE__ */ React39.createElement(ItemIconGradient, { value });
|
|
2109
2348
|
default:
|
|
2110
2349
|
return null;
|
|
2111
2350
|
}
|
|
2112
2351
|
};
|
|
2113
2352
|
var ItemIconColor = ({ value }) => {
|
|
2114
|
-
return /* @__PURE__ */
|
|
2353
|
+
return /* @__PURE__ */ React39.createElement(import_ui35.UnstableColorIndicator, { size: "inherit", component: "span", value: value.value });
|
|
2115
2354
|
};
|
|
2116
2355
|
var ItemIconImage = ({ value }) => {
|
|
2117
2356
|
const { imageUrl } = useImage(value);
|
|
2118
|
-
return /* @__PURE__ */
|
|
2357
|
+
return /* @__PURE__ */ React39.createElement(import_ui35.CardMedia, { image: imageUrl, sx: { height: 13, width: 13, borderRadius: "4px" } });
|
|
2358
|
+
};
|
|
2359
|
+
var ItemIconGradient = ({ value }) => {
|
|
2360
|
+
const gradient = getGradientValue(value);
|
|
2361
|
+
return /* @__PURE__ */ React39.createElement(import_ui35.UnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
2119
2362
|
};
|
|
2120
2363
|
var ItemLabel2 = ({ value }) => {
|
|
2121
2364
|
switch (value.$$type) {
|
|
2122
2365
|
case "background-image-overlay":
|
|
2123
|
-
return /* @__PURE__ */
|
|
2366
|
+
return /* @__PURE__ */ React39.createElement(ItemLabelImage, { value });
|
|
2124
2367
|
case "background-color-overlay":
|
|
2125
|
-
return /* @__PURE__ */
|
|
2368
|
+
return /* @__PURE__ */ React39.createElement(ItemLabelColor, { value });
|
|
2369
|
+
case "background-gradient-overlay":
|
|
2370
|
+
return /* @__PURE__ */ React39.createElement(ItemLabelGradient, { value });
|
|
2126
2371
|
default:
|
|
2127
2372
|
return null;
|
|
2128
2373
|
}
|
|
2129
2374
|
};
|
|
2130
2375
|
var ItemLabelColor = ({ value }) => {
|
|
2131
|
-
return /* @__PURE__ */
|
|
2376
|
+
return /* @__PURE__ */ React39.createElement("span", null, value.value);
|
|
2132
2377
|
};
|
|
2133
2378
|
var ItemLabelImage = ({ value }) => {
|
|
2134
2379
|
const { imageTitle } = useImage(value);
|
|
2135
|
-
return /* @__PURE__ */
|
|
2380
|
+
return /* @__PURE__ */ React39.createElement("span", null, imageTitle);
|
|
2381
|
+
};
|
|
2382
|
+
var ItemLabelGradient = ({ value }) => {
|
|
2383
|
+
if (value.value.type.value === "linear") {
|
|
2384
|
+
return /* @__PURE__ */ React39.createElement("span", null, (0, import_i18n16.__)("Linear Gradient", "elementor"));
|
|
2385
|
+
}
|
|
2386
|
+
return /* @__PURE__ */ React39.createElement("span", null, (0, import_i18n16.__)("Radial Gradient", "elementor"));
|
|
2136
2387
|
};
|
|
2137
2388
|
var ImageOverlayContent = () => {
|
|
2138
|
-
const propContext = useBoundProp(
|
|
2139
|
-
return /* @__PURE__ */
|
|
2389
|
+
const propContext = useBoundProp(import_editor_props23.backgroundImageOverlayPropTypeUtil);
|
|
2390
|
+
return /* @__PURE__ */ React39.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React39.createElement(import_ui35.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React39.createElement(import_ui35.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(
|
|
2140
2391
|
ImageControl,
|
|
2141
2392
|
{
|
|
2142
|
-
resolutionLabel: (0,
|
|
2393
|
+
resolutionLabel: (0, import_i18n16.__)("Resolution", "elementor"),
|
|
2143
2394
|
sizes: backgroundResolutionOptions
|
|
2144
2395
|
}
|
|
2145
|
-
)))), /* @__PURE__ */
|
|
2396
|
+
)))), /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React39.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React39.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React39.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React39.createElement(BackgroundImageOverlayAttachment, null)));
|
|
2146
2397
|
};
|
|
2147
2398
|
var useImage = (image) => {
|
|
2148
2399
|
let imageTitle, imageUrl = null;
|
|
@@ -2158,11 +2409,19 @@ var useImage = (image) => {
|
|
|
2158
2409
|
}
|
|
2159
2410
|
return { imageTitle, imageUrl };
|
|
2160
2411
|
};
|
|
2412
|
+
var getGradientValue = (value) => {
|
|
2413
|
+
const gradient = value.value;
|
|
2414
|
+
const stops = gradient.stops.value?.map(({ value: { color, offset } }) => `${color.value} ${offset.value ?? 0}%`)?.join(",");
|
|
2415
|
+
if (gradient.type.value === "linear") {
|
|
2416
|
+
return `linear-gradient(${gradient.angle.value}deg, ${stops})`;
|
|
2417
|
+
}
|
|
2418
|
+
return `radial-gradient(circle at ${gradient.positions.value}, ${stops})`;
|
|
2419
|
+
};
|
|
2161
2420
|
|
|
2162
2421
|
// src/controls/background-control/background-control.tsx
|
|
2163
2422
|
var BackgroundControl = createControl(() => {
|
|
2164
|
-
const propContext = useBoundProp(
|
|
2165
|
-
return /* @__PURE__ */
|
|
2423
|
+
const propContext = useBoundProp(import_editor_props24.backgroundPropTypeUtil);
|
|
2424
|
+
return /* @__PURE__ */ React40.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React40.createElement(SectionContent, null, /* @__PURE__ */ React40.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React40.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React40.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React40.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, (0, import_i18n17.__)("Color", "elementor"))), /* @__PURE__ */ React40.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ColorControl, null))))));
|
|
2166
2425
|
});
|
|
2167
2426
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2168
2427
|
0 && (module.exports = {
|