@elementor/editor-controls 1.2.0 → 1.3.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 +26 -0
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +645 -415
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +570 -341
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/bound-prop-context/prop-context.tsx +3 -3
- package/src/bound-prop-context/prop-key-context.tsx +1 -0
- package/src/bound-prop-context/use-bound-prop.ts +5 -1
- package/src/components/text-field-popover.tsx +19 -18
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +3 -15
- package/src/controls/box-shadow-repeater-control.tsx +1 -1
- package/src/controls/equal-unequal-sizes-control.tsx +1 -1
- package/src/controls/font-family-control/font-family-control.tsx +14 -2
- package/src/controls/image-control.tsx +45 -16
- package/src/controls/link-control.tsx +25 -20
- package/src/controls/linked-dimensions-control.tsx +1 -1
- package/src/controls/repeatable-control.tsx +77 -17
- package/src/controls/select-control.tsx +22 -2
- package/src/controls/switch-control.tsx +9 -1
- package/src/controls/transform-control/functions/axis-row.tsx +32 -0
- package/src/controls/transform-control/functions/move.tsx +44 -0
- package/src/controls/transform-control/transform-content.tsx +36 -0
- package/src/controls/transform-control/transform-icon.tsx +12 -0
- package/src/controls/transform-control/transform-label.tsx +27 -0
- package/src/controls/transform-control/transform-repeater-control.tsx +42 -0
- package/src/hooks/use-repeatable-control-context.ts +6 -1
- package/src/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -59,10 +59,11 @@ __export(index_exports, {
|
|
|
59
59
|
SizeControl: () => SizeControl,
|
|
60
60
|
StrokeControl: () => StrokeControl,
|
|
61
61
|
SvgMediaControl: () => SvgMediaControl,
|
|
62
|
-
SwitchControl: () =>
|
|
62
|
+
SwitchControl: () => SwitchControl,
|
|
63
63
|
TextAreaControl: () => TextAreaControl,
|
|
64
64
|
TextControl: () => TextControl,
|
|
65
65
|
ToggleControl: () => ToggleControl,
|
|
66
|
+
TransformRepeaterControl: () => TransformRepeaterControl,
|
|
66
67
|
UrlControl: () => UrlControl,
|
|
67
68
|
createControlReplacementsRegistry: () => createControlReplacementsRegistry,
|
|
68
69
|
injectIntoRepeaterItemIcon: () => injectIntoRepeaterItemIcon,
|
|
@@ -74,9 +75,10 @@ __export(index_exports, {
|
|
|
74
75
|
module.exports = __toCommonJS(index_exports);
|
|
75
76
|
|
|
76
77
|
// src/controls/image-control.tsx
|
|
77
|
-
var
|
|
78
|
+
var React10 = __toESM(require("react"));
|
|
78
79
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
79
|
-
var
|
|
80
|
+
var import_ui6 = require("@elementor/ui");
|
|
81
|
+
var import_i18n2 = require("@wordpress/i18n");
|
|
80
82
|
|
|
81
83
|
// src/bound-prop-context/prop-context.tsx
|
|
82
84
|
var React = __toESM(require("react"));
|
|
@@ -105,7 +107,7 @@ var PropProvider = ({
|
|
|
105
107
|
setValue,
|
|
106
108
|
propType,
|
|
107
109
|
placeholder,
|
|
108
|
-
|
|
110
|
+
isDisabled
|
|
109
111
|
}) => {
|
|
110
112
|
return /* @__PURE__ */ React.createElement(
|
|
111
113
|
PropContext.Provider,
|
|
@@ -115,7 +117,7 @@ var PropProvider = ({
|
|
|
115
117
|
propType,
|
|
116
118
|
setValue,
|
|
117
119
|
placeholder,
|
|
118
|
-
|
|
120
|
+
isDisabled
|
|
119
121
|
}
|
|
120
122
|
},
|
|
121
123
|
children
|
|
@@ -205,8 +207,9 @@ var import_react3 = require("react");
|
|
|
205
207
|
function useBoundProp(propTypeUtil) {
|
|
206
208
|
const propKeyContext = usePropKeyContext();
|
|
207
209
|
const { isValid, validate, restoreValue } = useValidation(propKeyContext.propType);
|
|
210
|
+
const disabled = propKeyContext.isDisabled?.(propKeyContext.propType);
|
|
208
211
|
if (!propTypeUtil) {
|
|
209
|
-
return propKeyContext;
|
|
212
|
+
return { ...propKeyContext, disabled };
|
|
210
213
|
}
|
|
211
214
|
function setValue(value2, options, meta) {
|
|
212
215
|
if (!validate(value2)) {
|
|
@@ -226,7 +229,8 @@ function useBoundProp(propTypeUtil) {
|
|
|
226
229
|
setValue,
|
|
227
230
|
value: isValid ? value : null,
|
|
228
231
|
restoreValue,
|
|
229
|
-
placeholder
|
|
232
|
+
placeholder,
|
|
233
|
+
disabled
|
|
230
234
|
};
|
|
231
235
|
}
|
|
232
236
|
var useValidation = (propType) => {
|
|
@@ -258,16 +262,23 @@ var resolveUnionPropType = (propType, key) => {
|
|
|
258
262
|
return resolvedPropType;
|
|
259
263
|
};
|
|
260
264
|
|
|
261
|
-
// src/
|
|
262
|
-
var
|
|
265
|
+
// src/components/control-form-label.tsx
|
|
266
|
+
var React3 = __toESM(require("react"));
|
|
263
267
|
var import_ui = require("@elementor/ui");
|
|
268
|
+
var ControlFormLabel = (props) => {
|
|
269
|
+
return /* @__PURE__ */ React3.createElement(import_ui.FormLabel, { size: "tiny", ...props });
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
// src/create-control.tsx
|
|
273
|
+
var React5 = __toESM(require("react"));
|
|
274
|
+
var import_ui2 = require("@elementor/ui");
|
|
264
275
|
|
|
265
276
|
// src/control-replacements.tsx
|
|
266
|
-
var
|
|
277
|
+
var React4 = __toESM(require("react"));
|
|
267
278
|
var import_react4 = require("react");
|
|
268
279
|
var ControlReplacementContext = (0, import_react4.createContext)([]);
|
|
269
280
|
var ControlReplacementsProvider = ({ replacements, children }) => {
|
|
270
|
-
return /* @__PURE__ */
|
|
281
|
+
return /* @__PURE__ */ React4.createElement(ControlReplacementContext.Provider, { value: replacements }, children);
|
|
271
282
|
};
|
|
272
283
|
var useControlReplacement = (OriginalComponent) => {
|
|
273
284
|
const { value } = useBoundProp();
|
|
@@ -295,7 +306,7 @@ var brandSymbol = Symbol("control");
|
|
|
295
306
|
function createControl(Control5) {
|
|
296
307
|
return (props) => {
|
|
297
308
|
const Component = useControlReplacement(Control5);
|
|
298
|
-
return /* @__PURE__ */
|
|
309
|
+
return /* @__PURE__ */ React5.createElement(import_ui2.ErrorBoundary, { fallback: null }, /* @__PURE__ */ React5.createElement(Component, { ...props }));
|
|
299
310
|
};
|
|
300
311
|
}
|
|
301
312
|
|
|
@@ -339,22 +350,22 @@ var formatResponse = (response) => {
|
|
|
339
350
|
};
|
|
340
351
|
|
|
341
352
|
// src/controls/image-media-control.tsx
|
|
342
|
-
var
|
|
353
|
+
var React8 = __toESM(require("react"));
|
|
343
354
|
var import_editor_props = require("@elementor/editor-props");
|
|
344
355
|
var import_icons = require("@elementor/icons");
|
|
345
|
-
var
|
|
356
|
+
var import_ui4 = require("@elementor/ui");
|
|
346
357
|
var import_wp_media = require("@elementor/wp-media");
|
|
347
358
|
var import_i18n = require("@wordpress/i18n");
|
|
348
359
|
|
|
349
360
|
// src/control-actions/control-actions.tsx
|
|
350
|
-
var
|
|
351
|
-
var
|
|
361
|
+
var React7 = __toESM(require("react"));
|
|
362
|
+
var import_ui3 = require("@elementor/ui");
|
|
352
363
|
|
|
353
364
|
// src/control-actions/control-actions-context.tsx
|
|
354
|
-
var
|
|
365
|
+
var React6 = __toESM(require("react"));
|
|
355
366
|
var import_react5 = require("react");
|
|
356
367
|
var Context = (0, import_react5.createContext)(null);
|
|
357
|
-
var ControlActionsProvider = ({ children, items }) => /* @__PURE__ */
|
|
368
|
+
var ControlActionsProvider = ({ children, items }) => /* @__PURE__ */ React6.createElement(Context.Provider, { value: { items } }, children);
|
|
358
369
|
var useControlActions = () => {
|
|
359
370
|
const context = (0, import_react5.useContext)(Context);
|
|
360
371
|
if (!context) {
|
|
@@ -364,7 +375,7 @@ var useControlActions = () => {
|
|
|
364
375
|
};
|
|
365
376
|
|
|
366
377
|
// src/control-actions/control-actions.tsx
|
|
367
|
-
var FloatingBarContainer = (0,
|
|
378
|
+
var FloatingBarContainer = (0, import_ui3.styled)("span")`
|
|
368
379
|
display: contents;
|
|
369
380
|
|
|
370
381
|
.MuiFloatingActionBar-popper:has( .MuiFloatingActionBar-actions:empty ) {
|
|
@@ -381,8 +392,8 @@ function ControlActions({ children }) {
|
|
|
381
392
|
if (items.length === 0 || disabled) {
|
|
382
393
|
return children;
|
|
383
394
|
}
|
|
384
|
-
const menuItems = items.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */
|
|
385
|
-
return /* @__PURE__ */
|
|
395
|
+
const menuItems = items.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React7.createElement(MenuItem2, { key: id }));
|
|
396
|
+
return /* @__PURE__ */ React7.createElement(FloatingBarContainer, null, /* @__PURE__ */ React7.createElement(import_ui3.UnstableFloatingActionBar, { actions: menuItems }, children));
|
|
386
397
|
}
|
|
387
398
|
|
|
388
399
|
// src/controls/image-media-control.tsx
|
|
@@ -405,8 +416,8 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
405
416
|
});
|
|
406
417
|
}
|
|
407
418
|
});
|
|
408
|
-
return /* @__PURE__ */
|
|
409
|
-
|
|
419
|
+
return /* @__PURE__ */ React8.createElement(ControlActions, null, /* @__PURE__ */ React8.createElement(import_ui4.Card, { variant: "outlined" }, /* @__PURE__ */ React8.createElement(import_ui4.CardMedia, { image: src, sx: { height: 150 } }, isFetching ? /* @__PURE__ */ React8.createElement(import_ui4.Stack, { justifyContent: "center", alignItems: "center", width: "100%", height: "100%" }, /* @__PURE__ */ React8.createElement(import_ui4.CircularProgress, null)) : /* @__PURE__ */ React8.createElement(React8.Fragment, null)), /* @__PURE__ */ React8.createElement(import_ui4.CardOverlay, null, /* @__PURE__ */ React8.createElement(import_ui4.Stack, { gap: 1 }, /* @__PURE__ */ React8.createElement(
|
|
420
|
+
import_ui4.Button,
|
|
410
421
|
{
|
|
411
422
|
size: "tiny",
|
|
412
423
|
color: "inherit",
|
|
@@ -414,13 +425,13 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
414
425
|
onClick: () => open({ mode: "browse" })
|
|
415
426
|
},
|
|
416
427
|
(0, import_i18n.__)("Select image", "elementor")
|
|
417
|
-
), /* @__PURE__ */
|
|
418
|
-
|
|
428
|
+
), /* @__PURE__ */ React8.createElement(
|
|
429
|
+
import_ui4.Button,
|
|
419
430
|
{
|
|
420
431
|
size: "tiny",
|
|
421
432
|
variant: "text",
|
|
422
433
|
color: "inherit",
|
|
423
|
-
startIcon: /* @__PURE__ */
|
|
434
|
+
startIcon: /* @__PURE__ */ React8.createElement(import_icons.UploadIcon, null),
|
|
424
435
|
onClick: () => open({ mode: "upload" })
|
|
425
436
|
},
|
|
426
437
|
(0, import_i18n.__)("Upload", "elementor")
|
|
@@ -428,49 +439,80 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
428
439
|
});
|
|
429
440
|
|
|
430
441
|
// src/controls/select-control.tsx
|
|
431
|
-
var
|
|
442
|
+
var React9 = __toESM(require("react"));
|
|
432
443
|
var import_editor_props2 = require("@elementor/editor-props");
|
|
433
444
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
434
|
-
var
|
|
445
|
+
var import_ui5 = require("@elementor/ui");
|
|
435
446
|
var SelectControl = createControl(({ options, onChange }) => {
|
|
436
|
-
const { value, setValue, disabled } = useBoundProp(import_editor_props2.stringPropTypeUtil);
|
|
447
|
+
const { value, setValue, disabled, placeholder } = useBoundProp(import_editor_props2.stringPropTypeUtil);
|
|
437
448
|
const handleChange = (event) => {
|
|
438
449
|
const newValue = event.target.value || null;
|
|
439
450
|
onChange?.(newValue, value);
|
|
440
451
|
setValue(newValue);
|
|
441
452
|
};
|
|
442
|
-
return /* @__PURE__ */
|
|
443
|
-
|
|
453
|
+
return /* @__PURE__ */ React9.createElement(ControlActions, null, /* @__PURE__ */ React9.createElement(
|
|
454
|
+
import_ui5.Select,
|
|
444
455
|
{
|
|
445
456
|
sx: { overflow: "hidden" },
|
|
446
457
|
displayEmpty: true,
|
|
447
458
|
size: "tiny",
|
|
459
|
+
renderValue: (selectedValue) => {
|
|
460
|
+
const findOptionByValue = (searchValue) => options.find((opt) => opt.value === searchValue);
|
|
461
|
+
if (!selectedValue || selectedValue === "") {
|
|
462
|
+
if (placeholder) {
|
|
463
|
+
const placeholderOption = findOptionByValue(placeholder);
|
|
464
|
+
const displayText = placeholderOption?.label || placeholder;
|
|
465
|
+
return /* @__PURE__ */ React9.createElement(import_ui5.Typography, { component: "span", variant: "caption", color: "text.tertiary" }, displayText);
|
|
466
|
+
}
|
|
467
|
+
return "";
|
|
468
|
+
}
|
|
469
|
+
const option = findOptionByValue(selectedValue);
|
|
470
|
+
return option?.label || selectedValue;
|
|
471
|
+
},
|
|
448
472
|
value: value ?? "",
|
|
449
473
|
onChange: handleChange,
|
|
450
474
|
disabled,
|
|
451
475
|
fullWidth: true
|
|
452
476
|
},
|
|
453
|
-
options.map(({ label, ...props }) => /* @__PURE__ */
|
|
477
|
+
options.map(({ label, ...props }) => /* @__PURE__ */ React9.createElement(import_editor_ui.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, label))
|
|
454
478
|
));
|
|
455
479
|
});
|
|
456
480
|
|
|
457
481
|
// src/controls/image-control.tsx
|
|
458
482
|
var ImageControl = createControl(({ sizes, showMode = "all" }) => {
|
|
459
483
|
const propContext = useBoundProp(import_editor_props3.imagePropTypeUtil);
|
|
484
|
+
let componentToRender;
|
|
485
|
+
switch (showMode) {
|
|
486
|
+
case "media":
|
|
487
|
+
componentToRender = /* @__PURE__ */ React10.createElement(ImageSrcControl, null);
|
|
488
|
+
break;
|
|
489
|
+
case "sizes":
|
|
490
|
+
componentToRender = /* @__PURE__ */ React10.createElement(ImageSizeControl, { sizes });
|
|
491
|
+
break;
|
|
492
|
+
case "all":
|
|
493
|
+
default:
|
|
494
|
+
componentToRender = /* @__PURE__ */ React10.createElement(import_ui6.Stack, { gap: 1.5 }, /* @__PURE__ */ React10.createElement(ControlFormLabel, null, (0, import_i18n2.__)("Image", "elementor")), /* @__PURE__ */ React10.createElement(ImageSrcControl, null), /* @__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(ControlFormLabel, null, (0, import_i18n2.__)("Resolution", "elementor"))), /* @__PURE__ */ React10.createElement(import_ui6.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React10.createElement(ImageSizeControl, { sizes }))));
|
|
495
|
+
}
|
|
496
|
+
return /* @__PURE__ */ React10.createElement(PropProvider, { ...propContext }, componentToRender);
|
|
497
|
+
});
|
|
498
|
+
var ImageSrcControl = () => {
|
|
460
499
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
461
500
|
const mediaTypes = allowSvgUpload ? ["image", "svg"] : ["image"];
|
|
462
|
-
return /* @__PURE__ */
|
|
463
|
-
}
|
|
501
|
+
return /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React10.createElement(ImageMediaControl, { mediaTypes }));
|
|
502
|
+
};
|
|
503
|
+
var ImageSizeControl = ({ sizes }) => {
|
|
504
|
+
return /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React10.createElement(SelectControl, { options: sizes }));
|
|
505
|
+
};
|
|
464
506
|
|
|
465
507
|
// src/controls/text-control.tsx
|
|
466
|
-
var
|
|
508
|
+
var React11 = __toESM(require("react"));
|
|
467
509
|
var import_editor_props4 = require("@elementor/editor-props");
|
|
468
|
-
var
|
|
510
|
+
var import_ui7 = require("@elementor/ui");
|
|
469
511
|
var TextControl = createControl(({ placeholder }) => {
|
|
470
512
|
const { value, setValue, disabled } = useBoundProp(import_editor_props4.stringPropTypeUtil);
|
|
471
513
|
const handleChange = (event) => setValue(event.target.value);
|
|
472
|
-
return /* @__PURE__ */
|
|
473
|
-
|
|
514
|
+
return /* @__PURE__ */ React11.createElement(ControlActions, null, /* @__PURE__ */ React11.createElement(
|
|
515
|
+
import_ui7.TextField,
|
|
474
516
|
{
|
|
475
517
|
size: "tiny",
|
|
476
518
|
fullWidth: true,
|
|
@@ -483,16 +525,16 @@ var TextControl = createControl(({ placeholder }) => {
|
|
|
483
525
|
});
|
|
484
526
|
|
|
485
527
|
// src/controls/text-area-control.tsx
|
|
486
|
-
var
|
|
528
|
+
var React12 = __toESM(require("react"));
|
|
487
529
|
var import_editor_props5 = require("@elementor/editor-props");
|
|
488
|
-
var
|
|
530
|
+
var import_ui8 = require("@elementor/ui");
|
|
489
531
|
var TextAreaControl = createControl(({ placeholder }) => {
|
|
490
532
|
const { value, setValue, disabled } = useBoundProp(import_editor_props5.stringPropTypeUtil);
|
|
491
533
|
const handleChange = (event) => {
|
|
492
534
|
setValue(event.target.value);
|
|
493
535
|
};
|
|
494
|
-
return /* @__PURE__ */
|
|
495
|
-
|
|
536
|
+
return /* @__PURE__ */ React12.createElement(ControlActions, null, /* @__PURE__ */ React12.createElement(
|
|
537
|
+
import_ui8.TextField,
|
|
496
538
|
{
|
|
497
539
|
size: "tiny",
|
|
498
540
|
multiline: true,
|
|
@@ -507,17 +549,17 @@ var TextAreaControl = createControl(({ placeholder }) => {
|
|
|
507
549
|
});
|
|
508
550
|
|
|
509
551
|
// src/controls/size-control.tsx
|
|
510
|
-
var
|
|
552
|
+
var React16 = __toESM(require("react"));
|
|
511
553
|
var import_react10 = require("react");
|
|
512
554
|
var import_editor_props6 = require("@elementor/editor-props");
|
|
513
555
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
514
|
-
var
|
|
556
|
+
var import_ui12 = require("@elementor/ui");
|
|
515
557
|
|
|
516
558
|
// src/components/size-control/size-input.tsx
|
|
517
|
-
var
|
|
559
|
+
var React14 = __toESM(require("react"));
|
|
518
560
|
var import_react7 = require("react");
|
|
519
561
|
var import_icons2 = require("@elementor/icons");
|
|
520
|
-
var
|
|
562
|
+
var import_ui10 = require("@elementor/ui");
|
|
521
563
|
|
|
522
564
|
// src/utils/size-control.ts
|
|
523
565
|
var defaultUnits = ["px", "%", "em", "rem", "vw", "vh"];
|
|
@@ -527,10 +569,10 @@ function isUnitExtendedOption(unit) {
|
|
|
527
569
|
}
|
|
528
570
|
|
|
529
571
|
// src/components/size-control/text-field-inner-selection.tsx
|
|
530
|
-
var
|
|
572
|
+
var React13 = __toESM(require("react"));
|
|
531
573
|
var import_react6 = require("react");
|
|
532
574
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
533
|
-
var
|
|
575
|
+
var import_ui9 = require("@elementor/ui");
|
|
534
576
|
var TextFieldInnerSelection = (0, import_react6.forwardRef)(
|
|
535
577
|
({
|
|
536
578
|
placeholder,
|
|
@@ -544,8 +586,8 @@ var TextFieldInnerSelection = (0, import_react6.forwardRef)(
|
|
|
544
586
|
inputProps,
|
|
545
587
|
disabled
|
|
546
588
|
}, ref) => {
|
|
547
|
-
return /* @__PURE__ */
|
|
548
|
-
|
|
589
|
+
return /* @__PURE__ */ React13.createElement(
|
|
590
|
+
import_ui9.TextField,
|
|
549
591
|
{
|
|
550
592
|
ref,
|
|
551
593
|
sx: { input: { cursor: shouldBlockInput ? "default !important" : void 0 } },
|
|
@@ -572,7 +614,7 @@ var SelectionEndAdornment = ({
|
|
|
572
614
|
menuItemsAttributes = {},
|
|
573
615
|
disabled
|
|
574
616
|
}) => {
|
|
575
|
-
const popupState = (0,
|
|
617
|
+
const popupState = (0, import_ui9.usePopupState)({
|
|
576
618
|
variant: "popover",
|
|
577
619
|
popupId: (0, import_react6.useId)()
|
|
578
620
|
});
|
|
@@ -580,17 +622,17 @@ var SelectionEndAdornment = ({
|
|
|
580
622
|
onClick(options[index]);
|
|
581
623
|
popupState.close();
|
|
582
624
|
};
|
|
583
|
-
return /* @__PURE__ */
|
|
584
|
-
|
|
625
|
+
return /* @__PURE__ */ React13.createElement(import_ui9.InputAdornment, { position: "end" }, /* @__PURE__ */ React13.createElement(
|
|
626
|
+
import_ui9.Button,
|
|
585
627
|
{
|
|
586
628
|
size: "small",
|
|
587
629
|
color: "secondary",
|
|
588
630
|
disabled,
|
|
589
631
|
sx: { font: "inherit", minWidth: "initial", textTransform: "uppercase" },
|
|
590
|
-
...(0,
|
|
632
|
+
...(0, import_ui9.bindTrigger)(popupState)
|
|
591
633
|
},
|
|
592
634
|
alternativeOptionLabels[value] ?? value
|
|
593
|
-
), /* @__PURE__ */
|
|
635
|
+
), /* @__PURE__ */ React13.createElement(import_ui9.Menu, { MenuListProps: { dense: true }, ...(0, import_ui9.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React13.createElement(
|
|
594
636
|
import_editor_ui2.MenuListItem,
|
|
595
637
|
{
|
|
596
638
|
key: option,
|
|
@@ -643,8 +685,8 @@ var SizeInput = ({
|
|
|
643
685
|
autoComplete: "off",
|
|
644
686
|
onClick,
|
|
645
687
|
onFocus,
|
|
646
|
-
startAdornment: startIcon ? /* @__PURE__ */
|
|
647
|
-
endAdornment: /* @__PURE__ */
|
|
688
|
+
startAdornment: startIcon ? /* @__PURE__ */ React14.createElement(import_ui10.InputAdornment, { position: "start", disabled }, startIcon) : void 0,
|
|
689
|
+
endAdornment: /* @__PURE__ */ React14.createElement(
|
|
648
690
|
SelectionEndAdornment,
|
|
649
691
|
{
|
|
650
692
|
disabled,
|
|
@@ -652,7 +694,7 @@ var SizeInput = ({
|
|
|
652
694
|
onClick: handleUnitChange,
|
|
653
695
|
value: unit,
|
|
654
696
|
alternativeOptionLabels: {
|
|
655
|
-
custom: /* @__PURE__ */
|
|
697
|
+
custom: /* @__PURE__ */ React14.createElement(import_icons2.PencilIcon, { fontSize: "small" })
|
|
656
698
|
},
|
|
657
699
|
menuItemsAttributes: units2.includes("custom") ? {
|
|
658
700
|
custom: popupAttributes
|
|
@@ -660,7 +702,7 @@ var SizeInput = ({
|
|
|
660
702
|
}
|
|
661
703
|
)
|
|
662
704
|
};
|
|
663
|
-
return /* @__PURE__ */
|
|
705
|
+
return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(import_ui10.Box, null, /* @__PURE__ */ React14.createElement(
|
|
664
706
|
TextFieldInnerSelection,
|
|
665
707
|
{
|
|
666
708
|
disabled,
|
|
@@ -682,15 +724,24 @@ var SizeInput = ({
|
|
|
682
724
|
};
|
|
683
725
|
|
|
684
726
|
// src/components/text-field-popover.tsx
|
|
685
|
-
var
|
|
686
|
-
var
|
|
727
|
+
var React15 = __toESM(require("react"));
|
|
728
|
+
var import_ui11 = require("@elementor/ui");
|
|
687
729
|
var TextFieldPopover = (props) => {
|
|
688
730
|
const { popupState, restoreValue, anchorRef, value, onChange } = props;
|
|
689
|
-
return /* @__PURE__ */
|
|
690
|
-
|
|
731
|
+
return /* @__PURE__ */ React15.createElement(
|
|
732
|
+
import_ui11.Popover,
|
|
691
733
|
{
|
|
692
734
|
disablePortal: true,
|
|
693
|
-
|
|
735
|
+
slotProps: {
|
|
736
|
+
paper: {
|
|
737
|
+
sx: {
|
|
738
|
+
borderRadius: 2,
|
|
739
|
+
width: anchorRef.current?.offsetWidth + "px",
|
|
740
|
+
p: 1.5
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
...(0, import_ui11.bindPopover)(popupState),
|
|
694
745
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
695
746
|
transformOrigin: { vertical: "top", horizontal: "center" },
|
|
696
747
|
onClose: () => {
|
|
@@ -698,28 +749,18 @@ var TextFieldPopover = (props) => {
|
|
|
698
749
|
popupState.close();
|
|
699
750
|
}
|
|
700
751
|
},
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
-
|
|
752
|
+
/* @__PURE__ */ React15.createElement(
|
|
753
|
+
import_ui11.TextField,
|
|
703
754
|
{
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
import_ui10.TextField,
|
|
712
|
-
{
|
|
713
|
-
value,
|
|
714
|
-
onChange,
|
|
715
|
-
size: "tiny",
|
|
716
|
-
type: "text",
|
|
717
|
-
fullWidth: true,
|
|
718
|
-
inputProps: {
|
|
719
|
-
autoFocus: true
|
|
720
|
-
}
|
|
755
|
+
value,
|
|
756
|
+
onChange,
|
|
757
|
+
size: "tiny",
|
|
758
|
+
type: "text",
|
|
759
|
+
fullWidth: true,
|
|
760
|
+
inputProps: {
|
|
761
|
+
autoFocus: true
|
|
721
762
|
}
|
|
722
|
-
|
|
763
|
+
}
|
|
723
764
|
)
|
|
724
765
|
);
|
|
725
766
|
};
|
|
@@ -785,7 +826,7 @@ var SizeControl = createControl((props) => {
|
|
|
785
826
|
const [internalState, setInternalState] = (0, import_react10.useState)(createStateFromSizeProp(sizeValue, defaultUnit));
|
|
786
827
|
const activeBreakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
|
|
787
828
|
const extendedOptions = useSizeExtendedOptions(props.extendedOptions || [], props.disableCustom ?? false);
|
|
788
|
-
const popupState = (0,
|
|
829
|
+
const popupState = (0, import_ui12.usePopupState)({ variant: "popover" });
|
|
789
830
|
const [state, setState] = useSyncExternalState({
|
|
790
831
|
external: internalState,
|
|
791
832
|
setExternal: (newState) => setSizeValue(extractValueFromState(newState)),
|
|
@@ -852,7 +893,7 @@ var SizeControl = createControl((props) => {
|
|
|
852
893
|
setState(newState);
|
|
853
894
|
}
|
|
854
895
|
}, [activeBreakpoint]);
|
|
855
|
-
return /* @__PURE__ */
|
|
896
|
+
return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
|
|
856
897
|
SizeInput,
|
|
857
898
|
{
|
|
858
899
|
disabled,
|
|
@@ -868,7 +909,7 @@ var SizeControl = createControl((props) => {
|
|
|
868
909
|
onClick: onInputClick,
|
|
869
910
|
popupState
|
|
870
911
|
}
|
|
871
|
-
), anchorRef?.current && /* @__PURE__ */
|
|
912
|
+
), anchorRef?.current && /* @__PURE__ */ React16.createElement(
|
|
872
913
|
TextFieldPopover,
|
|
873
914
|
{
|
|
874
915
|
popupState,
|
|
@@ -925,14 +966,7 @@ var React19 = __toESM(require("react"));
|
|
|
925
966
|
var import_react11 = require("react");
|
|
926
967
|
var import_editor_props8 = require("@elementor/editor-props");
|
|
927
968
|
var import_ui15 = require("@elementor/ui");
|
|
928
|
-
var
|
|
929
|
-
|
|
930
|
-
// src/components/control-form-label.tsx
|
|
931
|
-
var React16 = __toESM(require("react"));
|
|
932
|
-
var import_ui12 = require("@elementor/ui");
|
|
933
|
-
var ControlFormLabel = (props) => {
|
|
934
|
-
return /* @__PURE__ */ React16.createElement(import_ui12.FormLabel, { size: "tiny", ...props });
|
|
935
|
-
};
|
|
969
|
+
var import_i18n3 = require("@wordpress/i18n");
|
|
936
970
|
|
|
937
971
|
// src/components/section-content.tsx
|
|
938
972
|
var React17 = __toESM(require("react"));
|
|
@@ -982,7 +1016,7 @@ var units = ["px", "em", "rem"];
|
|
|
982
1016
|
var StrokeControl = createControl(() => {
|
|
983
1017
|
const propContext = useBoundProp(import_editor_props8.strokePropTypeUtil);
|
|
984
1018
|
const rowRef = (0, import_react11.useRef)(null);
|
|
985
|
-
return /* @__PURE__ */ React19.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React19.createElement(SectionContent, null, /* @__PURE__ */ React19.createElement(Control, { bind: "width", label: (0,
|
|
1019
|
+
return /* @__PURE__ */ React19.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React19.createElement(SectionContent, null, /* @__PURE__ */ React19.createElement(Control, { bind: "width", label: (0, import_i18n3.__)("Stroke width", "elementor"), ref: rowRef }, /* @__PURE__ */ React19.createElement(SizeControl, { units, anchorRef: rowRef })), /* @__PURE__ */ React19.createElement(Control, { bind: "color", label: (0, import_i18n3.__)("Stroke color", "elementor") }, /* @__PURE__ */ React19.createElement(ColorControl, null))));
|
|
986
1020
|
});
|
|
987
1021
|
var Control = (0, import_react11.forwardRef)(({ bind, label, children }, ref) => /* @__PURE__ */ React19.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React19.createElement(import_ui15.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React19.createElement(import_ui15.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React19.createElement(import_ui15.Grid, { item: true, xs: 6 }, children))));
|
|
988
1022
|
|
|
@@ -991,7 +1025,7 @@ var React26 = __toESM(require("react"));
|
|
|
991
1025
|
var import_react15 = require("react");
|
|
992
1026
|
var import_editor_props9 = require("@elementor/editor-props");
|
|
993
1027
|
var import_ui20 = require("@elementor/ui");
|
|
994
|
-
var
|
|
1028
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
995
1029
|
|
|
996
1030
|
// src/components/popover-content.tsx
|
|
997
1031
|
var React20 = __toESM(require("react"));
|
|
@@ -1011,7 +1045,7 @@ var React25 = __toESM(require("react"));
|
|
|
1011
1045
|
var import_react14 = require("react");
|
|
1012
1046
|
var import_icons4 = require("@elementor/icons");
|
|
1013
1047
|
var import_ui19 = require("@elementor/ui");
|
|
1014
|
-
var
|
|
1048
|
+
var import_i18n4 = require("@wordpress/i18n");
|
|
1015
1049
|
|
|
1016
1050
|
// src/control-adornments/control-adornments.tsx
|
|
1017
1051
|
var React23 = __toESM(require("react"));
|
|
@@ -1210,7 +1244,7 @@ var Repeater = ({
|
|
|
1210
1244
|
sx: { ml: "auto" },
|
|
1211
1245
|
disabled,
|
|
1212
1246
|
onClick: addRepeaterItem,
|
|
1213
|
-
"aria-label": (0,
|
|
1247
|
+
"aria-label": (0, import_i18n4.__)("Add item", "elementor")
|
|
1214
1248
|
},
|
|
1215
1249
|
/* @__PURE__ */ React25.createElement(import_icons4.PlusIcon, { fontSize: SIZE })
|
|
1216
1250
|
)
|
|
@@ -1254,9 +1288,9 @@ var RepeaterItem = ({
|
|
|
1254
1288
|
}) => {
|
|
1255
1289
|
const [anchorEl, setAnchorEl] = (0, import_react14.useState)(null);
|
|
1256
1290
|
const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount, onOpen);
|
|
1257
|
-
const duplicateLabel = (0,
|
|
1258
|
-
const toggleLabel = propDisabled ? (0,
|
|
1259
|
-
const removeLabel = (0,
|
|
1291
|
+
const duplicateLabel = (0, import_i18n4.__)("Duplicate", "elementor");
|
|
1292
|
+
const toggleLabel = propDisabled ? (0, import_i18n4.__)("Show", "elementor") : (0, import_i18n4.__)("Hide", "elementor");
|
|
1293
|
+
const removeLabel = (0, import_i18n4.__)("Remove", "elementor");
|
|
1260
1294
|
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
|
|
1261
1295
|
import_ui19.UnstableTag,
|
|
1262
1296
|
{
|
|
@@ -1266,7 +1300,7 @@ var RepeaterItem = ({
|
|
|
1266
1300
|
fullWidth: true,
|
|
1267
1301
|
ref: setRef,
|
|
1268
1302
|
variant: "outlined",
|
|
1269
|
-
"aria-label": (0,
|
|
1303
|
+
"aria-label": (0, import_i18n4.__)("Open item", "elementor"),
|
|
1270
1304
|
...(0, import_ui19.bindTrigger)(popoverState),
|
|
1271
1305
|
startIcon,
|
|
1272
1306
|
actions: /* @__PURE__ */ React25.createElement(React25.Fragment, null, showDuplicate && /* @__PURE__ */ React25.createElement(import_ui19.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(import_ui19.IconButton, { size: SIZE, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React25.createElement(import_icons4.CopyIcon, { fontSize: SIZE }))), showToggle && /* @__PURE__ */ React25.createElement(import_ui19.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(import_ui19.IconButton, { size: SIZE, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React25.createElement(import_icons4.EyeOffIcon, { fontSize: SIZE }) : /* @__PURE__ */ React25.createElement(import_icons4.EyeIcon, { fontSize: SIZE }))), /* @__PURE__ */ React25.createElement(import_ui19.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(import_ui19.IconButton, { size: SIZE, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React25.createElement(import_icons4.XIcon, { fontSize: SIZE }))))
|
|
@@ -1309,14 +1343,14 @@ var usePopover = (openOnMount, onOpen) => {
|
|
|
1309
1343
|
// src/controls/box-shadow-repeater-control.tsx
|
|
1310
1344
|
var BoxShadowRepeaterControl = createControl(() => {
|
|
1311
1345
|
const { propType, value, setValue, disabled } = useBoundProp(import_editor_props9.boxShadowPropTypeUtil);
|
|
1312
|
-
return /* @__PURE__ */ React26.createElement(PropProvider, { propType, value, setValue, disabled }, /* @__PURE__ */ React26.createElement(
|
|
1346
|
+
return /* @__PURE__ */ React26.createElement(PropProvider, { propType, value, setValue, isDisabled: () => disabled }, /* @__PURE__ */ React26.createElement(
|
|
1313
1347
|
Repeater,
|
|
1314
1348
|
{
|
|
1315
1349
|
openOnAdd: true,
|
|
1316
1350
|
disabled,
|
|
1317
1351
|
values: value ?? [],
|
|
1318
1352
|
setValues: setValue,
|
|
1319
|
-
label: (0,
|
|
1353
|
+
label: (0, import_i18n5.__)("Box shadow", "elementor"),
|
|
1320
1354
|
itemSettings: {
|
|
1321
1355
|
Icon: ItemIcon,
|
|
1322
1356
|
Label: ItemLabel,
|
|
@@ -1333,15 +1367,15 @@ var ItemContent = ({ anchorEl, bind }) => {
|
|
|
1333
1367
|
var Content = ({ anchorEl }) => {
|
|
1334
1368
|
const context = useBoundProp(import_editor_props9.shadowPropTypeUtil);
|
|
1335
1369
|
const rowRef = [(0, import_react15.useRef)(null), (0, import_react15.useRef)(null)];
|
|
1336
|
-
return /* @__PURE__ */ React26.createElement(PropProvider, { ...context }, /* @__PURE__ */ React26.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React26.createElement(PopoverGridContainer, null, /* @__PURE__ */ React26.createElement(Control2, { bind: "color", label: (0,
|
|
1370
|
+
return /* @__PURE__ */ React26.createElement(PropProvider, { ...context }, /* @__PURE__ */ React26.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React26.createElement(PopoverGridContainer, null, /* @__PURE__ */ React26.createElement(Control2, { bind: "color", label: (0, import_i18n5.__)("Color", "elementor") }, /* @__PURE__ */ React26.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React26.createElement(Control2, { bind: "position", label: (0, import_i18n5.__)("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React26.createElement(
|
|
1337
1371
|
SelectControl,
|
|
1338
1372
|
{
|
|
1339
1373
|
options: [
|
|
1340
|
-
{ label: (0,
|
|
1341
|
-
{ label: (0,
|
|
1374
|
+
{ label: (0, import_i18n5.__)("Inset", "elementor"), value: "inset" },
|
|
1375
|
+
{ label: (0, import_i18n5.__)("Outset", "elementor"), value: null }
|
|
1342
1376
|
]
|
|
1343
1377
|
}
|
|
1344
|
-
))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "hOffset", label: (0,
|
|
1378
|
+
))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "hOffset", label: (0, import_i18n5.__)("Horizontal", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[0] })), /* @__PURE__ */ React26.createElement(Control2, { bind: "vOffset", label: (0, import_i18n5.__)("Vertical", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[0] }))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[1] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "blur", label: (0, import_i18n5.__)("Blur", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[1] })), /* @__PURE__ */ React26.createElement(Control2, { bind: "spread", label: (0, import_i18n5.__)("Spread", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[1] })))));
|
|
1345
1379
|
};
|
|
1346
1380
|
var Control2 = ({
|
|
1347
1381
|
label,
|
|
@@ -1397,7 +1431,7 @@ var import_react16 = require("react");
|
|
|
1397
1431
|
var import_editor_props10 = require("@elementor/editor-props");
|
|
1398
1432
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
1399
1433
|
var import_ui22 = require("@elementor/ui");
|
|
1400
|
-
var
|
|
1434
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
1401
1435
|
|
|
1402
1436
|
// src/components/control-label.tsx
|
|
1403
1437
|
var React27 = __toESM(require("react"));
|
|
@@ -1411,15 +1445,15 @@ var DEFAULT_FILTER_KEY = "blur";
|
|
|
1411
1445
|
var filterConfig = {
|
|
1412
1446
|
blur: {
|
|
1413
1447
|
defaultValue: { $$type: "radius", radius: { $$type: "size", value: { size: 0, unit: "px" } } },
|
|
1414
|
-
name: (0,
|
|
1415
|
-
valueName: (0,
|
|
1448
|
+
name: (0, import_i18n6.__)("Blur", "elementor"),
|
|
1449
|
+
valueName: (0, import_i18n6.__)("Radius", "elementor"),
|
|
1416
1450
|
propType: import_editor_props10.blurFilterPropTypeUtil,
|
|
1417
1451
|
units: defaultUnits.filter((unit) => unit !== "%")
|
|
1418
1452
|
},
|
|
1419
1453
|
brightness: {
|
|
1420
1454
|
defaultValue: { $$type: "amount", amount: { $$type: "size", value: { size: 100, unit: "%" } } },
|
|
1421
|
-
name: (0,
|
|
1422
|
-
valueName: (0,
|
|
1455
|
+
name: (0, import_i18n6.__)("Brightness", "elementor"),
|
|
1456
|
+
valueName: (0, import_i18n6.__)("Amount", "elementor"),
|
|
1423
1457
|
propType: import_editor_props10.brightnessFilterPropTypeUtil,
|
|
1424
1458
|
units: ["%"]
|
|
1425
1459
|
}
|
|
@@ -1438,7 +1472,7 @@ var FilterRepeaterControl = createControl(() => {
|
|
|
1438
1472
|
disabled,
|
|
1439
1473
|
values: filterValues ?? [],
|
|
1440
1474
|
setValues: setValue,
|
|
1441
|
-
label: (0,
|
|
1475
|
+
label: (0, import_i18n6.__)("Filter", "elementor"),
|
|
1442
1476
|
itemSettings: {
|
|
1443
1477
|
Icon: ItemIcon2,
|
|
1444
1478
|
Label: ItemLabel2,
|
|
@@ -1477,7 +1511,7 @@ var ItemContent2 = ({ bind }) => {
|
|
|
1477
1511
|
};
|
|
1478
1512
|
setValue(newFilterValues);
|
|
1479
1513
|
};
|
|
1480
|
-
return /* @__PURE__ */ React28.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React28.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React28.createElement(PopoverGridContainer, null, /* @__PURE__ */ React28.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel, null, (0,
|
|
1514
|
+
return /* @__PURE__ */ React28.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React28.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React28.createElement(PopoverGridContainer, null, /* @__PURE__ */ React28.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel, null, (0, import_i18n6.__)("Filter", "elementor"))), /* @__PURE__ */ React28.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(
|
|
1481
1515
|
import_ui22.Select,
|
|
1482
1516
|
{
|
|
1483
1517
|
sx: { overflow: "hidden" },
|
|
@@ -1783,7 +1817,7 @@ var import_react18 = require("react");
|
|
|
1783
1817
|
var import_editor_props13 = require("@elementor/editor-props");
|
|
1784
1818
|
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
1785
1819
|
var import_ui26 = require("@elementor/ui");
|
|
1786
|
-
var
|
|
1820
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
1787
1821
|
var isEqualSizes = (propValue, items) => {
|
|
1788
1822
|
const values = Object.values(propValue);
|
|
1789
1823
|
if (values.length !== items.length) {
|
|
@@ -1842,7 +1876,7 @@ function EqualUnequalSizesControl({
|
|
|
1842
1876
|
return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React33.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React33.createElement(ControlLabel, null, label)), /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(import_ui26.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React33.createElement(
|
|
1843
1877
|
SizeControl,
|
|
1844
1878
|
{
|
|
1845
|
-
placeholder: isMixed ? (0,
|
|
1879
|
+
placeholder: isMixed ? (0, import_i18n7.__)("Mixed", "elementor") : void 0,
|
|
1846
1880
|
anchorRef: rowRefs[0]
|
|
1847
1881
|
}
|
|
1848
1882
|
), /* @__PURE__ */ React33.createElement(import_ui26.Tooltip, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React33.createElement(
|
|
@@ -1880,7 +1914,7 @@ function EqualUnequalSizesControl({
|
|
|
1880
1914
|
propType: multiSizePropType,
|
|
1881
1915
|
value: getMultiSizeValues(),
|
|
1882
1916
|
setValue: setNestedProp,
|
|
1883
|
-
|
|
1917
|
+
isDisabled: () => multiSizeDisabled
|
|
1884
1918
|
},
|
|
1885
1919
|
/* @__PURE__ */ React33.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React33.createElement(PopoverGridContainer, { ref: rowRefs[1] }, /* @__PURE__ */ React33.createElement(MultiSizeValueControl, { item: items[0], rowRef: rowRefs[1] }), /* @__PURE__ */ React33.createElement(MultiSizeValueControl, { item: items[1], rowRef: rowRefs[1] })), /* @__PURE__ */ React33.createElement(PopoverGridContainer, { ref: rowRefs[2] }, /* @__PURE__ */ React33.createElement(MultiSizeValueControl, { item: items[2], rowRef: rowRefs[2] }), /* @__PURE__ */ React33.createElement(MultiSizeValueControl, { item: items[3], rowRef: rowRefs[2] })))
|
|
1886
1920
|
)
|
|
@@ -1898,7 +1932,7 @@ var import_editor_props14 = require("@elementor/editor-props");
|
|
|
1898
1932
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
1899
1933
|
var import_icons6 = require("@elementor/icons");
|
|
1900
1934
|
var import_ui27 = require("@elementor/ui");
|
|
1901
|
-
var
|
|
1935
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
1902
1936
|
var LinkedDimensionsControl = createControl(
|
|
1903
1937
|
({
|
|
1904
1938
|
label,
|
|
@@ -1930,8 +1964,8 @@ var LinkedDimensionsControl = createControl(
|
|
|
1930
1964
|
};
|
|
1931
1965
|
const tooltipLabel = label.toLowerCase();
|
|
1932
1966
|
const LinkedIcon = isLinked ? import_icons6.LinkIcon : import_icons6.DetachIcon;
|
|
1933
|
-
const linkedLabel = (0,
|
|
1934
|
-
const unlinkedLabel = (0,
|
|
1967
|
+
const linkedLabel = (0, import_i18n8.__)("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1968
|
+
const unlinkedLabel = (0, import_i18n8.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1935
1969
|
const disabled = sizeDisabled || dimensionsDisabled;
|
|
1936
1970
|
return /* @__PURE__ */ React34.createElement(
|
|
1937
1971
|
PropProvider,
|
|
@@ -1939,7 +1973,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
1939
1973
|
propType,
|
|
1940
1974
|
value: dimensionsValue,
|
|
1941
1975
|
setValue: setDimensionsValue,
|
|
1942
|
-
disabled
|
|
1976
|
+
isDisabled: () => disabled
|
|
1943
1977
|
},
|
|
1944
1978
|
/* @__PURE__ */ React34.createElement(import_ui27.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, isUsingNestedProps ? /* @__PURE__ */ React34.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React34.createElement(ControlLabel, null, label), /* @__PURE__ */ React34.createElement(import_ui27.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React34.createElement(
|
|
1945
1979
|
import_ui27.ToggleButton,
|
|
@@ -1991,24 +2025,24 @@ function getCssMarginProps(isSiteRtl) {
|
|
|
1991
2025
|
[
|
|
1992
2026
|
{
|
|
1993
2027
|
bind: "block-start",
|
|
1994
|
-
label: (0,
|
|
2028
|
+
label: (0, import_i18n8.__)("Top", "elementor"),
|
|
1995
2029
|
icon: /* @__PURE__ */ React34.createElement(import_icons6.SideTopIcon, { fontSize: "tiny" })
|
|
1996
2030
|
},
|
|
1997
2031
|
{
|
|
1998
2032
|
bind: "inline-end",
|
|
1999
|
-
label: isSiteRtl ? (0,
|
|
2033
|
+
label: isSiteRtl ? (0, import_i18n8.__)("Left", "elementor") : (0, import_i18n8.__)("Right", "elementor"),
|
|
2000
2034
|
icon: isSiteRtl ? /* @__PURE__ */ React34.createElement(import_icons6.SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React34.createElement(import_icons6.SideRightIcon, { fontSize: "tiny" })
|
|
2001
2035
|
}
|
|
2002
2036
|
],
|
|
2003
2037
|
[
|
|
2004
2038
|
{
|
|
2005
2039
|
bind: "block-end",
|
|
2006
|
-
label: (0,
|
|
2040
|
+
label: (0, import_i18n8.__)("Bottom", "elementor"),
|
|
2007
2041
|
icon: /* @__PURE__ */ React34.createElement(import_icons6.SideBottomIcon, { fontSize: "tiny" })
|
|
2008
2042
|
},
|
|
2009
2043
|
{
|
|
2010
2044
|
bind: "inline-start",
|
|
2011
|
-
label: isSiteRtl ? (0,
|
|
2045
|
+
label: isSiteRtl ? (0, import_i18n8.__)("Right", "elementor") : (0, import_i18n8.__)("Left", "elementor"),
|
|
2012
2046
|
icon: isSiteRtl ? /* @__PURE__ */ React34.createElement(import_icons6.SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React34.createElement(import_icons6.SideLeftIcon, { fontSize: "tiny" })
|
|
2013
2047
|
}
|
|
2014
2048
|
]
|
|
@@ -2028,7 +2062,7 @@ var import_editor_ui4 = require("@elementor/editor-ui");
|
|
|
2028
2062
|
var import_icons7 = require("@elementor/icons");
|
|
2029
2063
|
var import_ui28 = require("@elementor/ui");
|
|
2030
2064
|
var import_utils2 = require("@elementor/utils");
|
|
2031
|
-
var
|
|
2065
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
2032
2066
|
|
|
2033
2067
|
// src/controls/font-family-control/enqueue-font.tsx
|
|
2034
2068
|
var enqueueFont = (fontFamily, context = "editor") => {
|
|
@@ -2073,7 +2107,7 @@ var FontFamilySelector = ({
|
|
|
2073
2107
|
return /* @__PURE__ */ React35.createElement(import_ui28.Stack, null, /* @__PURE__ */ React35.createElement(
|
|
2074
2108
|
import_editor_ui4.PopoverHeader,
|
|
2075
2109
|
{
|
|
2076
|
-
title: (0,
|
|
2110
|
+
title: (0, import_i18n9.__)("Font Family", "elementor"),
|
|
2077
2111
|
onClose: handleClose,
|
|
2078
2112
|
icon: /* @__PURE__ */ React35.createElement(import_icons7.TextIcon, { fontSize: SIZE2 })
|
|
2079
2113
|
}
|
|
@@ -2082,7 +2116,7 @@ var FontFamilySelector = ({
|
|
|
2082
2116
|
{
|
|
2083
2117
|
value: searchValue,
|
|
2084
2118
|
onSearch: handleSearch,
|
|
2085
|
-
placeholder: (0,
|
|
2119
|
+
placeholder: (0, import_i18n9.__)("Search", "elementor")
|
|
2086
2120
|
}
|
|
2087
2121
|
), /* @__PURE__ */ React35.createElement(import_ui28.Divider, null), /* @__PURE__ */ React35.createElement(import_editor_ui4.PopoverScrollableContent, { width: sectionWidth }, filteredFontFamilies.length > 0 ? /* @__PURE__ */ React35.createElement(
|
|
2088
2122
|
FontList,
|
|
@@ -2103,7 +2137,7 @@ var FontFamilySelector = ({
|
|
|
2103
2137
|
overflow: "hidden"
|
|
2104
2138
|
},
|
|
2105
2139
|
/* @__PURE__ */ React35.createElement(import_icons7.TextIcon, { fontSize: "large" }),
|
|
2106
|
-
/* @__PURE__ */ React35.createElement(import_ui28.Box, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React35.createElement(import_ui28.Typography, { align: "center", variant: "subtitle2", color: "text.secondary" }, (0,
|
|
2140
|
+
/* @__PURE__ */ React35.createElement(import_ui28.Box, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React35.createElement(import_ui28.Typography, { align: "center", variant: "subtitle2", color: "text.secondary" }, (0, import_i18n9.__)("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React35.createElement(
|
|
2107
2141
|
import_ui28.Typography,
|
|
2108
2142
|
{
|
|
2109
2143
|
variant: "subtitle2",
|
|
@@ -2126,7 +2160,7 @@ var FontFamilySelector = ({
|
|
|
2126
2160
|
color: "text.secondary",
|
|
2127
2161
|
sx: { display: "flex", flexDirection: "column" }
|
|
2128
2162
|
},
|
|
2129
|
-
(0,
|
|
2163
|
+
(0, import_i18n9.__)("Try something else.", "elementor"),
|
|
2130
2164
|
/* @__PURE__ */ React35.createElement(
|
|
2131
2165
|
import_ui28.Link,
|
|
2132
2166
|
{
|
|
@@ -2135,7 +2169,7 @@ var FontFamilySelector = ({
|
|
|
2135
2169
|
component: "button",
|
|
2136
2170
|
onClick: () => setSearchValue("")
|
|
2137
2171
|
},
|
|
2138
|
-
(0,
|
|
2172
|
+
(0, import_i18n9.__)("Clear & try again", "elementor")
|
|
2139
2173
|
)
|
|
2140
2174
|
)
|
|
2141
2175
|
)));
|
|
@@ -2172,17 +2206,24 @@ var useDebounce = (fn, delay) => {
|
|
|
2172
2206
|
// src/controls/font-family-control/font-family-control.tsx
|
|
2173
2207
|
var SIZE3 = "tiny";
|
|
2174
2208
|
var FontFamilyControl = createControl(({ fontFamilies, sectionWidth }) => {
|
|
2175
|
-
const { value: fontFamily, setValue: setFontFamily, disabled } = useBoundProp(import_editor_props15.stringPropTypeUtil);
|
|
2209
|
+
const { value: fontFamily, setValue: setFontFamily, disabled, placeholder } = useBoundProp(import_editor_props15.stringPropTypeUtil);
|
|
2176
2210
|
const popoverState = (0, import_ui29.usePopupState)({ variant: "popover" });
|
|
2211
|
+
const isShowingPlaceholder = !fontFamily && placeholder;
|
|
2177
2212
|
return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(ControlActions, null, /* @__PURE__ */ React36.createElement(
|
|
2178
2213
|
import_ui29.UnstableTag,
|
|
2179
2214
|
{
|
|
2180
2215
|
variant: "outlined",
|
|
2181
|
-
label: fontFamily,
|
|
2216
|
+
label: fontFamily || placeholder,
|
|
2182
2217
|
endIcon: /* @__PURE__ */ React36.createElement(import_icons8.ChevronDownIcon, { fontSize: SIZE3 }),
|
|
2183
2218
|
...(0, import_ui29.bindTrigger)(popoverState),
|
|
2184
2219
|
fullWidth: true,
|
|
2185
|
-
disabled
|
|
2220
|
+
disabled,
|
|
2221
|
+
sx: isShowingPlaceholder ? {
|
|
2222
|
+
"& .MuiTag-label": {
|
|
2223
|
+
color: (theme) => theme.palette.text.tertiary
|
|
2224
|
+
},
|
|
2225
|
+
textTransform: "capitalize"
|
|
2226
|
+
} : void 0
|
|
2186
2227
|
}
|
|
2187
2228
|
)), /* @__PURE__ */ React36.createElement(
|
|
2188
2229
|
import_ui29.Popover,
|
|
@@ -2228,17 +2269,18 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
2228
2269
|
});
|
|
2229
2270
|
|
|
2230
2271
|
// src/controls/link-control.tsx
|
|
2231
|
-
var
|
|
2272
|
+
var React40 = __toESM(require("react"));
|
|
2232
2273
|
var import_react22 = require("react");
|
|
2233
2274
|
var import_editor_elements = require("@elementor/editor-elements");
|
|
2234
|
-
var
|
|
2275
|
+
var import_editor_props18 = require("@elementor/editor-props");
|
|
2235
2276
|
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
2277
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
2236
2278
|
var import_http_client2 = require("@elementor/http-client");
|
|
2237
2279
|
var import_icons10 = require("@elementor/icons");
|
|
2238
2280
|
var import_session = require("@elementor/session");
|
|
2239
|
-
var
|
|
2281
|
+
var import_ui33 = require("@elementor/ui");
|
|
2240
2282
|
var import_utils3 = require("@elementor/utils");
|
|
2241
|
-
var
|
|
2283
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
2242
2284
|
|
|
2243
2285
|
// src/components/autocomplete.tsx
|
|
2244
2286
|
var React38 = __toESM(require("react"));
|
|
@@ -2346,14 +2388,37 @@ function _factoryFilter(newValue, options, minInputLength) {
|
|
|
2346
2388
|
);
|
|
2347
2389
|
}
|
|
2348
2390
|
|
|
2391
|
+
// src/controls/switch-control.tsx
|
|
2392
|
+
var React39 = __toESM(require("react"));
|
|
2393
|
+
var import_editor_props17 = require("@elementor/editor-props");
|
|
2394
|
+
var import_ui32 = require("@elementor/ui");
|
|
2395
|
+
var SwitchControl = createControl(() => {
|
|
2396
|
+
const { value, setValue, disabled } = useBoundProp(import_editor_props17.booleanPropTypeUtil);
|
|
2397
|
+
const handleChange = (event) => {
|
|
2398
|
+
setValue(event.target.checked);
|
|
2399
|
+
};
|
|
2400
|
+
return /* @__PURE__ */ React39.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React39.createElement(
|
|
2401
|
+
import_ui32.Switch,
|
|
2402
|
+
{
|
|
2403
|
+
checked: !!value,
|
|
2404
|
+
onChange: handleChange,
|
|
2405
|
+
size: "small",
|
|
2406
|
+
disabled,
|
|
2407
|
+
inputProps: {
|
|
2408
|
+
...disabled ? { style: { opacity: 0 } } : {}
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
));
|
|
2412
|
+
});
|
|
2413
|
+
|
|
2349
2414
|
// src/controls/link-control.tsx
|
|
2350
2415
|
var SIZE4 = "tiny";
|
|
2351
2416
|
var learnMoreButton = {
|
|
2352
|
-
label: (0,
|
|
2417
|
+
label: (0, import_i18n10.__)("Learn More", "elementor"),
|
|
2353
2418
|
href: "https://go.elementor.com/element-link-inside-link-infotip"
|
|
2354
2419
|
};
|
|
2355
2420
|
var LinkControl = createControl((props) => {
|
|
2356
|
-
const { value, path, setValue, ...propContext } = useBoundProp(
|
|
2421
|
+
const { value, path, setValue, ...propContext } = useBoundProp(import_editor_props18.linkPropTypeUtil);
|
|
2357
2422
|
const [linkSessionValue, setLinkSessionValue] = (0, import_session.useSessionStorage)(path.join("/"));
|
|
2358
2423
|
const [isActive, setIsActive] = (0, import_react22.useState)(!!value);
|
|
2359
2424
|
const {
|
|
@@ -2362,7 +2427,7 @@ var LinkControl = createControl((props) => {
|
|
|
2362
2427
|
placeholder,
|
|
2363
2428
|
minInputLength = 2,
|
|
2364
2429
|
context: { elementId },
|
|
2365
|
-
label = (0,
|
|
2430
|
+
label = (0, import_i18n10.__)("Link", "elementor")
|
|
2366
2431
|
} = props || {};
|
|
2367
2432
|
const [linkInLinkRestriction, setLinkInLinkRestriction] = (0, import_react22.useState)((0, import_editor_elements.getLinkInLinkRestriction)(elementId));
|
|
2368
2433
|
const [options, setOptions] = (0, import_react22.useState)(
|
|
@@ -2390,8 +2455,8 @@ var LinkControl = createControl((props) => {
|
|
|
2390
2455
|
const onOptionChange = (newValue) => {
|
|
2391
2456
|
const valueToSave = newValue ? {
|
|
2392
2457
|
...value,
|
|
2393
|
-
destination:
|
|
2394
|
-
label:
|
|
2458
|
+
destination: import_editor_props18.numberPropTypeUtil.create(newValue),
|
|
2459
|
+
label: import_editor_props18.stringPropTypeUtil.create(findMatchingOption(options, newValue)?.label || null)
|
|
2395
2460
|
} : null;
|
|
2396
2461
|
onSaveNewValue(valueToSave);
|
|
2397
2462
|
};
|
|
@@ -2399,8 +2464,8 @@ var LinkControl = createControl((props) => {
|
|
|
2399
2464
|
newValue = newValue?.trim() || "";
|
|
2400
2465
|
const valueToSave = newValue ? {
|
|
2401
2466
|
...value,
|
|
2402
|
-
destination:
|
|
2403
|
-
label:
|
|
2467
|
+
destination: import_editor_props18.urlPropTypeUtil.create(newValue),
|
|
2468
|
+
label: import_editor_props18.stringPropTypeUtil.create("")
|
|
2404
2469
|
} : null;
|
|
2405
2470
|
onSaveNewValue(valueToSave);
|
|
2406
2471
|
updateOptions(newValue);
|
|
@@ -2425,8 +2490,8 @@ var LinkControl = createControl((props) => {
|
|
|
2425
2490
|
),
|
|
2426
2491
|
[endpoint]
|
|
2427
2492
|
);
|
|
2428
|
-
return /* @__PURE__ */
|
|
2429
|
-
|
|
2493
|
+
return /* @__PURE__ */ React40.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React40.createElement(import_ui33.Stack, { gap: 1.5 }, /* @__PURE__ */ React40.createElement(
|
|
2494
|
+
import_ui33.Stack,
|
|
2430
2495
|
{
|
|
2431
2496
|
direction: "row",
|
|
2432
2497
|
sx: {
|
|
@@ -2435,17 +2500,17 @@ var LinkControl = createControl((props) => {
|
|
|
2435
2500
|
marginInlineEnd: -0.75
|
|
2436
2501
|
}
|
|
2437
2502
|
},
|
|
2438
|
-
/* @__PURE__ */
|
|
2439
|
-
/* @__PURE__ */
|
|
2503
|
+
/* @__PURE__ */ React40.createElement(ControlFormLabel, null, label),
|
|
2504
|
+
/* @__PURE__ */ React40.createElement(ConditionalInfoTip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React40.createElement(
|
|
2440
2505
|
ToggleIconControl,
|
|
2441
2506
|
{
|
|
2442
2507
|
disabled: shouldDisableAddingLink,
|
|
2443
2508
|
active: isActive,
|
|
2444
2509
|
onIconClick: onEnabledChange,
|
|
2445
|
-
label: (0,
|
|
2510
|
+
label: (0, import_i18n10.__)("Toggle link", "elementor")
|
|
2446
2511
|
}
|
|
2447
2512
|
))
|
|
2448
|
-
), /* @__PURE__ */
|
|
2513
|
+
), /* @__PURE__ */ React40.createElement(import_ui33.Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React40.createElement(import_ui33.Stack, { gap: 1.5 }, /* @__PURE__ */ React40.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React40.createElement(ControlActions, null, /* @__PURE__ */ React40.createElement(
|
|
2449
2514
|
Autocomplete,
|
|
2450
2515
|
{
|
|
2451
2516
|
options,
|
|
@@ -2456,22 +2521,31 @@ var LinkControl = createControl((props) => {
|
|
|
2456
2521
|
onTextChange,
|
|
2457
2522
|
minInputLength
|
|
2458
2523
|
}
|
|
2459
|
-
))), /* @__PURE__ */
|
|
2524
|
+
))), /* @__PURE__ */ React40.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true }, /* @__PURE__ */ React40.createElement(ControlFormLabel, null, (0, import_i18n10.__)("Open in a new tab", "elementor"))), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React40.createElement(SwitchControlComponent, { disabled: propContext.disabled || !value }))))))));
|
|
2460
2525
|
});
|
|
2461
2526
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
2462
|
-
return /* @__PURE__ */
|
|
2527
|
+
return /* @__PURE__ */ React40.createElement(import_ui33.IconButton, { size: SIZE4, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React40.createElement(import_icons10.MinusIcon, { fontSize: SIZE4 }) : /* @__PURE__ */ React40.createElement(import_icons10.PlusIcon, { fontSize: SIZE4 }));
|
|
2463
2528
|
};
|
|
2464
|
-
var
|
|
2465
|
-
const { value
|
|
2529
|
+
var SwitchControlComponent = ({ disabled }) => {
|
|
2530
|
+
const { value, setValue } = useBoundProp(import_editor_props18.booleanPropTypeUtil);
|
|
2531
|
+
const isVersion331Active = (0, import_editor_v1_adapters4.isExperimentActive)("e_v_3_31");
|
|
2532
|
+
if (isVersion331Active) {
|
|
2533
|
+
return /* @__PURE__ */ React40.createElement(SwitchControl, null);
|
|
2534
|
+
}
|
|
2466
2535
|
const onClick = () => {
|
|
2467
2536
|
setValue(!value);
|
|
2468
2537
|
};
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2538
|
+
return /* @__PURE__ */ React40.createElement(
|
|
2539
|
+
import_ui33.Switch,
|
|
2540
|
+
{
|
|
2541
|
+
checked: value ?? false,
|
|
2542
|
+
onClick,
|
|
2543
|
+
disabled,
|
|
2544
|
+
inputProps: {
|
|
2545
|
+
...disabled ? { style: { opacity: 0 } } : {}
|
|
2546
|
+
}
|
|
2472
2547
|
}
|
|
2473
|
-
|
|
2474
|
-
return /* @__PURE__ */ React39.createElement(import_ui32.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true }, /* @__PURE__ */ React39.createElement(ControlFormLabel, null, (0, import_i18n9.__)("Open in a new tab", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React39.createElement(import_ui32.Switch, { checked: value, onClick, disabled, inputProps })));
|
|
2548
|
+
);
|
|
2475
2549
|
};
|
|
2476
2550
|
async function fetchOptions(ajaxUrl, params) {
|
|
2477
2551
|
if (!params || !ajaxUrl) {
|
|
@@ -2508,54 +2582,54 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2508
2582
|
(0, import_editor_elements.selectElement)(elementId);
|
|
2509
2583
|
}
|
|
2510
2584
|
};
|
|
2511
|
-
return shouldRestrict && isVisible ? /* @__PURE__ */
|
|
2512
|
-
|
|
2585
|
+
return shouldRestrict && isVisible ? /* @__PURE__ */ React40.createElement(
|
|
2586
|
+
import_ui33.Infotip,
|
|
2513
2587
|
{
|
|
2514
2588
|
placement: "right",
|
|
2515
|
-
content: /* @__PURE__ */
|
|
2589
|
+
content: /* @__PURE__ */ React40.createElement(
|
|
2516
2590
|
import_editor_ui5.InfoTipCard,
|
|
2517
2591
|
{
|
|
2518
2592
|
content: INFOTIP_CONTENT[reason],
|
|
2519
|
-
svgIcon: /* @__PURE__ */
|
|
2593
|
+
svgIcon: /* @__PURE__ */ React40.createElement(import_icons10.AlertTriangleIcon, null),
|
|
2520
2594
|
learnMoreButton,
|
|
2521
2595
|
ctaButton: {
|
|
2522
|
-
label: (0,
|
|
2596
|
+
label: (0, import_i18n10.__)("Take me there", "elementor"),
|
|
2523
2597
|
onClick: handleTakeMeClick
|
|
2524
2598
|
}
|
|
2525
2599
|
}
|
|
2526
2600
|
)
|
|
2527
2601
|
},
|
|
2528
|
-
/* @__PURE__ */
|
|
2529
|
-
) : /* @__PURE__ */
|
|
2602
|
+
/* @__PURE__ */ React40.createElement(import_ui33.Box, null, children)
|
|
2603
|
+
) : /* @__PURE__ */ React40.createElement(React40.Fragment, null, children);
|
|
2530
2604
|
};
|
|
2531
2605
|
var INFOTIP_CONTENT = {
|
|
2532
|
-
descendant: /* @__PURE__ */
|
|
2533
|
-
ancestor: /* @__PURE__ */
|
|
2606
|
+
descendant: /* @__PURE__ */ React40.createElement(React40.Fragment, null, (0, import_i18n10.__)("To add a link to this container,", "elementor"), /* @__PURE__ */ React40.createElement("br", null), (0, import_i18n10.__)("first remove the link from the elements inside of it.", "elementor")),
|
|
2607
|
+
ancestor: /* @__PURE__ */ React40.createElement(React40.Fragment, null, (0, import_i18n10.__)("To add a link to this element,", "elementor"), /* @__PURE__ */ React40.createElement("br", null), (0, import_i18n10.__)("first remove the link from its parent container.", "elementor"))
|
|
2534
2608
|
};
|
|
2535
2609
|
|
|
2536
2610
|
// src/controls/gap-control.tsx
|
|
2537
|
-
var
|
|
2611
|
+
var React41 = __toESM(require("react"));
|
|
2538
2612
|
var import_react23 = require("react");
|
|
2539
|
-
var
|
|
2613
|
+
var import_editor_props19 = require("@elementor/editor-props");
|
|
2540
2614
|
var import_icons11 = require("@elementor/icons");
|
|
2541
|
-
var
|
|
2542
|
-
var
|
|
2615
|
+
var import_ui34 = require("@elementor/ui");
|
|
2616
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
2543
2617
|
var GapControl = createControl(({ label }) => {
|
|
2544
2618
|
const {
|
|
2545
2619
|
value: directionValue,
|
|
2546
2620
|
setValue: setDirectionValue,
|
|
2547
2621
|
propType,
|
|
2548
2622
|
disabled: directionDisabled
|
|
2549
|
-
} = useBoundProp(
|
|
2623
|
+
} = useBoundProp(import_editor_props19.layoutDirectionPropTypeUtil);
|
|
2550
2624
|
const stackRef = (0, import_react23.useRef)(null);
|
|
2551
|
-
const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(
|
|
2625
|
+
const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(import_editor_props19.sizePropTypeUtil);
|
|
2552
2626
|
const isLinked = !directionValue && !sizeValue ? true : !!sizeValue;
|
|
2553
2627
|
const onLinkToggle = () => {
|
|
2554
2628
|
if (!isLinked) {
|
|
2555
2629
|
setSizeValue(directionValue?.column?.value ?? null);
|
|
2556
2630
|
return;
|
|
2557
2631
|
}
|
|
2558
|
-
const value = sizeValue ?
|
|
2632
|
+
const value = sizeValue ? import_editor_props19.sizePropTypeUtil.create(sizeValue) : null;
|
|
2559
2633
|
setDirectionValue({
|
|
2560
2634
|
row: value,
|
|
2561
2635
|
column: value
|
|
@@ -2563,11 +2637,11 @@ var GapControl = createControl(({ label }) => {
|
|
|
2563
2637
|
};
|
|
2564
2638
|
const tooltipLabel = label.toLowerCase();
|
|
2565
2639
|
const LinkedIcon = isLinked ? import_icons11.LinkIcon : import_icons11.DetachIcon;
|
|
2566
|
-
const linkedLabel = (0,
|
|
2567
|
-
const unlinkedLabel = (0,
|
|
2640
|
+
const linkedLabel = (0, import_i18n11.__)("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
2641
|
+
const unlinkedLabel = (0, import_i18n11.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
2568
2642
|
const disabled = sizeDisabled || directionDisabled;
|
|
2569
|
-
return /* @__PURE__ */
|
|
2570
|
-
|
|
2643
|
+
return /* @__PURE__ */ React41.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React41.createElement(import_ui34.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(ControlLabel, null, label), /* @__PURE__ */ React41.createElement(import_ui34.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React41.createElement(
|
|
2644
|
+
import_ui34.ToggleButton,
|
|
2571
2645
|
{
|
|
2572
2646
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
2573
2647
|
size: "tiny",
|
|
@@ -2577,8 +2651,8 @@ var GapControl = createControl(({ label }) => {
|
|
|
2577
2651
|
onChange: onLinkToggle,
|
|
2578
2652
|
disabled
|
|
2579
2653
|
},
|
|
2580
|
-
/* @__PURE__ */
|
|
2581
|
-
))), /* @__PURE__ */
|
|
2654
|
+
/* @__PURE__ */ React41.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2655
|
+
))), /* @__PURE__ */ React41.createElement(import_ui34.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(ControlFormLabel, null, (0, import_i18n11.__)("Column", "elementor"))), /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(Control4, { bind: "column", isLinked, anchorRef: stackRef }))), /* @__PURE__ */ React41.createElement(import_ui34.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(ControlFormLabel, null, (0, import_i18n11.__)("Row", "elementor"))), /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(Control4, { bind: "row", isLinked, anchorRef: stackRef })))));
|
|
2582
2656
|
});
|
|
2583
2657
|
var Control4 = ({
|
|
2584
2658
|
bind,
|
|
@@ -2586,21 +2660,21 @@ var Control4 = ({
|
|
|
2586
2660
|
anchorRef
|
|
2587
2661
|
}) => {
|
|
2588
2662
|
if (isLinked) {
|
|
2589
|
-
return /* @__PURE__ */
|
|
2663
|
+
return /* @__PURE__ */ React41.createElement(SizeControl, { anchorRef });
|
|
2590
2664
|
}
|
|
2591
|
-
return /* @__PURE__ */
|
|
2665
|
+
return /* @__PURE__ */ React41.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React41.createElement(SizeControl, { anchorRef }));
|
|
2592
2666
|
};
|
|
2593
2667
|
|
|
2594
2668
|
// src/controls/aspect-ratio-control.tsx
|
|
2595
|
-
var
|
|
2669
|
+
var React42 = __toESM(require("react"));
|
|
2596
2670
|
var import_react24 = require("react");
|
|
2597
|
-
var
|
|
2671
|
+
var import_editor_props20 = require("@elementor/editor-props");
|
|
2598
2672
|
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
2599
2673
|
var import_icons12 = require("@elementor/icons");
|
|
2600
|
-
var
|
|
2601
|
-
var
|
|
2674
|
+
var import_ui35 = require("@elementor/ui");
|
|
2675
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
2602
2676
|
var RATIO_OPTIONS = [
|
|
2603
|
-
{ label: (0,
|
|
2677
|
+
{ label: (0, import_i18n12.__)("Auto", "elementor"), value: "auto" },
|
|
2604
2678
|
{ label: "1/1", value: "1/1" },
|
|
2605
2679
|
{ label: "4/3", value: "4/3" },
|
|
2606
2680
|
{ label: "3/4", value: "3/4" },
|
|
@@ -2611,7 +2685,7 @@ var RATIO_OPTIONS = [
|
|
|
2611
2685
|
];
|
|
2612
2686
|
var CUSTOM_RATIO = "custom";
|
|
2613
2687
|
var AspectRatioControl = createControl(({ label }) => {
|
|
2614
|
-
const { value: aspectRatioValue, setValue: setAspectRatioValue, disabled } = useBoundProp(
|
|
2688
|
+
const { value: aspectRatioValue, setValue: setAspectRatioValue, disabled } = useBoundProp(import_editor_props20.stringPropTypeUtil);
|
|
2615
2689
|
const isCustomSelected = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
2616
2690
|
const [initialWidth, initialHeight] = isCustomSelected ? aspectRatioValue.split("/") : ["", ""];
|
|
2617
2691
|
const [isCustom, setIsCustom] = (0, import_react24.useState)(isCustomSelected);
|
|
@@ -2659,8 +2733,8 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2659
2733
|
setAspectRatioValue(`${customWidth}/${newHeight}`);
|
|
2660
2734
|
}
|
|
2661
2735
|
};
|
|
2662
|
-
return /* @__PURE__ */
|
|
2663
|
-
|
|
2736
|
+
return /* @__PURE__ */ React42.createElement(ControlActions, null, /* @__PURE__ */ React42.createElement(import_ui35.Stack, { direction: "column", gap: 2 }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, label)), /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(
|
|
2737
|
+
import_ui35.Select,
|
|
2664
2738
|
{
|
|
2665
2739
|
size: "tiny",
|
|
2666
2740
|
displayEmpty: true,
|
|
@@ -2670,11 +2744,11 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2670
2744
|
onChange: handleSelectChange,
|
|
2671
2745
|
fullWidth: true
|
|
2672
2746
|
},
|
|
2673
|
-
[...RATIO_OPTIONS, { label: (0,
|
|
2674
|
-
({ label: optionLabel, ...props }) => /* @__PURE__ */
|
|
2747
|
+
[...RATIO_OPTIONS, { label: (0, import_i18n12.__)("Custom", "elementor"), value: CUSTOM_RATIO }].map(
|
|
2748
|
+
({ label: optionLabel, ...props }) => /* @__PURE__ */ React42.createElement(import_editor_ui6.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
|
|
2675
2749
|
)
|
|
2676
|
-
))), isCustom && /* @__PURE__ */
|
|
2677
|
-
|
|
2750
|
+
))), isCustom && /* @__PURE__ */ React42.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(
|
|
2751
|
+
import_ui35.TextField,
|
|
2678
2752
|
{
|
|
2679
2753
|
size: "tiny",
|
|
2680
2754
|
type: "number",
|
|
@@ -2683,11 +2757,11 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2683
2757
|
value: customWidth,
|
|
2684
2758
|
onChange: handleCustomWidthChange,
|
|
2685
2759
|
InputProps: {
|
|
2686
|
-
startAdornment: /* @__PURE__ */
|
|
2760
|
+
startAdornment: /* @__PURE__ */ React42.createElement(import_icons12.ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
|
|
2687
2761
|
}
|
|
2688
2762
|
}
|
|
2689
|
-
)), /* @__PURE__ */
|
|
2690
|
-
|
|
2763
|
+
)), /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(
|
|
2764
|
+
import_ui35.TextField,
|
|
2691
2765
|
{
|
|
2692
2766
|
size: "tiny",
|
|
2693
2767
|
type: "number",
|
|
@@ -2696,39 +2770,39 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2696
2770
|
value: customHeight,
|
|
2697
2771
|
onChange: handleCustomHeightChange,
|
|
2698
2772
|
InputProps: {
|
|
2699
|
-
startAdornment: /* @__PURE__ */
|
|
2773
|
+
startAdornment: /* @__PURE__ */ React42.createElement(import_icons12.ArrowsMoveVerticalIcon, { fontSize: "tiny" })
|
|
2700
2774
|
}
|
|
2701
2775
|
}
|
|
2702
2776
|
)))));
|
|
2703
2777
|
});
|
|
2704
2778
|
|
|
2705
2779
|
// src/controls/svg-media-control.tsx
|
|
2706
|
-
var
|
|
2780
|
+
var React44 = __toESM(require("react"));
|
|
2707
2781
|
var import_react26 = require("react");
|
|
2708
|
-
var
|
|
2782
|
+
var import_editor_props21 = require("@elementor/editor-props");
|
|
2709
2783
|
var import_icons13 = require("@elementor/icons");
|
|
2710
|
-
var
|
|
2784
|
+
var import_ui37 = require("@elementor/ui");
|
|
2711
2785
|
var import_wp_media2 = require("@elementor/wp-media");
|
|
2712
|
-
var
|
|
2786
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
2713
2787
|
|
|
2714
2788
|
// src/components/enable-unfiltered-modal.tsx
|
|
2715
|
-
var
|
|
2789
|
+
var React43 = __toESM(require("react"));
|
|
2716
2790
|
var import_react25 = require("react");
|
|
2717
2791
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
2718
|
-
var
|
|
2719
|
-
var
|
|
2720
|
-
var ADMIN_TITLE_TEXT = (0,
|
|
2721
|
-
var ADMIN_CONTENT_TEXT = (0,
|
|
2792
|
+
var import_ui36 = require("@elementor/ui");
|
|
2793
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
2794
|
+
var ADMIN_TITLE_TEXT = (0, import_i18n13.__)("Enable Unfiltered Uploads", "elementor");
|
|
2795
|
+
var ADMIN_CONTENT_TEXT = (0, import_i18n13.__)(
|
|
2722
2796
|
"Before you enable unfiltered files upload, note that such files include a security risk. Elementor does run a process to remove possible malicious code, but there is still risk involved when using such files.",
|
|
2723
2797
|
"elementor"
|
|
2724
2798
|
);
|
|
2725
|
-
var NON_ADMIN_TITLE_TEXT = (0,
|
|
2726
|
-
var NON_ADMIN_CONTENT_TEXT = (0,
|
|
2799
|
+
var NON_ADMIN_TITLE_TEXT = (0, import_i18n13.__)("Sorry, you can't upload that file yet", "elementor");
|
|
2800
|
+
var NON_ADMIN_CONTENT_TEXT = (0, import_i18n13.__)(
|
|
2727
2801
|
"This is because this file type may pose a security risk. To upload them anyway, ask the site administrator to enable unfiltered file uploads.",
|
|
2728
2802
|
"elementor"
|
|
2729
2803
|
);
|
|
2730
|
-
var ADMIN_FAILED_CONTENT_TEXT_PT1 = (0,
|
|
2731
|
-
var ADMIN_FAILED_CONTENT_TEXT_PT2 = (0,
|
|
2804
|
+
var ADMIN_FAILED_CONTENT_TEXT_PT1 = (0, import_i18n13.__)("Failed to enable unfiltered files upload.", "elementor");
|
|
2805
|
+
var ADMIN_FAILED_CONTENT_TEXT_PT2 = (0, import_i18n13.__)(
|
|
2732
2806
|
"You can try again, if the problem persists, please contact support.",
|
|
2733
2807
|
"elementor"
|
|
2734
2808
|
);
|
|
@@ -2755,10 +2829,10 @@ var EnableUnfilteredModal = (props) => {
|
|
|
2755
2829
|
}
|
|
2756
2830
|
};
|
|
2757
2831
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
2758
|
-
return canManageOptions ? /* @__PURE__ */
|
|
2832
|
+
return canManageOptions ? /* @__PURE__ */ React43.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React43.createElement(NonAdminDialog, { ...dialogProps });
|
|
2759
2833
|
};
|
|
2760
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
2761
|
-
|
|
2834
|
+
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React43.createElement(import_ui36.Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React43.createElement(import_ui36.DialogHeader, { logo: false }, /* @__PURE__ */ React43.createElement(import_ui36.DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React43.createElement(import_ui36.Divider, null), /* @__PURE__ */ React43.createElement(import_ui36.DialogContent, null, /* @__PURE__ */ React43.createElement(import_ui36.DialogContentText, null, isError ? /* @__PURE__ */ React43.createElement(React43.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React43.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React43.createElement(import_ui36.DialogActions, null, /* @__PURE__ */ React43.createElement(import_ui36.Button, { size: "medium", color: "secondary", onClick: () => onClose(false) }, (0, import_i18n13.__)("Cancel", "elementor")), /* @__PURE__ */ React43.createElement(
|
|
2835
|
+
import_ui36.Button,
|
|
2762
2836
|
{
|
|
2763
2837
|
size: "medium",
|
|
2764
2838
|
onClick: () => handleEnable(),
|
|
@@ -2766,16 +2840,16 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
2766
2840
|
color: "primary",
|
|
2767
2841
|
disabled: isPending
|
|
2768
2842
|
},
|
|
2769
|
-
isPending ? /* @__PURE__ */
|
|
2843
|
+
isPending ? /* @__PURE__ */ React43.createElement(import_ui36.CircularProgress, { size: 24 }) : (0, import_i18n13.__)("Enable", "elementor")
|
|
2770
2844
|
)));
|
|
2771
|
-
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */
|
|
2845
|
+
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */ React43.createElement(import_ui36.Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React43.createElement(import_ui36.DialogHeader, { logo: false }, /* @__PURE__ */ React43.createElement(import_ui36.DialogTitle, null, NON_ADMIN_TITLE_TEXT)), /* @__PURE__ */ React43.createElement(import_ui36.Divider, null), /* @__PURE__ */ React43.createElement(import_ui36.DialogContent, null, /* @__PURE__ */ React43.createElement(import_ui36.DialogContentText, null, NON_ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React43.createElement(import_ui36.DialogActions, null, /* @__PURE__ */ React43.createElement(import_ui36.Button, { size: "medium", onClick: () => onClose(false), variant: "contained", color: "primary" }, (0, import_i18n13.__)("Got it", "elementor"))));
|
|
2772
2846
|
|
|
2773
2847
|
// src/controls/svg-media-control.tsx
|
|
2774
2848
|
var TILE_SIZE = 8;
|
|
2775
2849
|
var TILE_WHITE = "transparent";
|
|
2776
2850
|
var TILE_BLACK = "#c1c1c1";
|
|
2777
2851
|
var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
|
|
2778
|
-
var StyledCard = (0,
|
|
2852
|
+
var StyledCard = (0, import_ui37.styled)(import_ui37.Card)`
|
|
2779
2853
|
background-color: white;
|
|
2780
2854
|
background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
|
|
2781
2855
|
background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
|
|
@@ -2784,7 +2858,7 @@ var StyledCard = (0, import_ui36.styled)(import_ui36.Card)`
|
|
|
2784
2858
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
2785
2859
|
border: none;
|
|
2786
2860
|
`;
|
|
2787
|
-
var StyledCardMediaContainer = (0,
|
|
2861
|
+
var StyledCardMediaContainer = (0, import_ui37.styled)(import_ui37.Stack)`
|
|
2788
2862
|
position: relative;
|
|
2789
2863
|
height: 140px;
|
|
2790
2864
|
object-fit: contain;
|
|
@@ -2796,7 +2870,7 @@ var StyledCardMediaContainer = (0, import_ui36.styled)(import_ui36.Stack)`
|
|
|
2796
2870
|
var MODE_BROWSE = { mode: "browse" };
|
|
2797
2871
|
var MODE_UPLOAD = { mode: "upload" };
|
|
2798
2872
|
var SvgMediaControl = createControl(() => {
|
|
2799
|
-
const { value, setValue } = useBoundProp(
|
|
2873
|
+
const { value, setValue } = useBoundProp(import_editor_props21.imageSrcPropTypeUtil);
|
|
2800
2874
|
const { id, url } = value ?? {};
|
|
2801
2875
|
const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
|
|
2802
2876
|
const src = attachment?.url ?? url?.value ?? null;
|
|
@@ -2829,16 +2903,16 @@ var SvgMediaControl = createControl(() => {
|
|
|
2829
2903
|
open(openOptions);
|
|
2830
2904
|
}
|
|
2831
2905
|
};
|
|
2832
|
-
return /* @__PURE__ */
|
|
2833
|
-
|
|
2906
|
+
return /* @__PURE__ */ React44.createElement(import_ui37.Stack, { gap: 1 }, /* @__PURE__ */ React44.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React44.createElement(ControlActions, null, /* @__PURE__ */ React44.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React44.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React44.createElement(import_ui37.CircularProgress, { role: "progressbar" }) : /* @__PURE__ */ React44.createElement(
|
|
2907
|
+
import_ui37.CardMedia,
|
|
2834
2908
|
{
|
|
2835
2909
|
component: "img",
|
|
2836
2910
|
image: src,
|
|
2837
|
-
alt: (0,
|
|
2911
|
+
alt: (0, import_i18n14.__)("Preview SVG", "elementor"),
|
|
2838
2912
|
sx: { maxHeight: "140px", width: "50px" }
|
|
2839
2913
|
}
|
|
2840
|
-
)), /* @__PURE__ */
|
|
2841
|
-
|
|
2914
|
+
)), /* @__PURE__ */ React44.createElement(
|
|
2915
|
+
import_ui37.CardOverlay,
|
|
2842
2916
|
{
|
|
2843
2917
|
sx: {
|
|
2844
2918
|
"&:hover": {
|
|
@@ -2846,69 +2920,69 @@ var SvgMediaControl = createControl(() => {
|
|
|
2846
2920
|
}
|
|
2847
2921
|
}
|
|
2848
2922
|
},
|
|
2849
|
-
/* @__PURE__ */
|
|
2850
|
-
|
|
2923
|
+
/* @__PURE__ */ React44.createElement(import_ui37.Stack, { gap: 1 }, /* @__PURE__ */ React44.createElement(
|
|
2924
|
+
import_ui37.Button,
|
|
2851
2925
|
{
|
|
2852
2926
|
size: "tiny",
|
|
2853
2927
|
color: "inherit",
|
|
2854
2928
|
variant: "outlined",
|
|
2855
2929
|
onClick: () => handleClick(MODE_BROWSE)
|
|
2856
2930
|
},
|
|
2857
|
-
(0,
|
|
2858
|
-
), /* @__PURE__ */
|
|
2859
|
-
|
|
2931
|
+
(0, import_i18n14.__)("Select SVG", "elementor")
|
|
2932
|
+
), /* @__PURE__ */ React44.createElement(
|
|
2933
|
+
import_ui37.Button,
|
|
2860
2934
|
{
|
|
2861
2935
|
size: "tiny",
|
|
2862
2936
|
variant: "text",
|
|
2863
2937
|
color: "inherit",
|
|
2864
|
-
startIcon: /* @__PURE__ */
|
|
2938
|
+
startIcon: /* @__PURE__ */ React44.createElement(import_icons13.UploadIcon, null),
|
|
2865
2939
|
onClick: () => handleClick(MODE_UPLOAD)
|
|
2866
2940
|
},
|
|
2867
|
-
(0,
|
|
2941
|
+
(0, import_i18n14.__)("Upload", "elementor")
|
|
2868
2942
|
))
|
|
2869
2943
|
))));
|
|
2870
2944
|
});
|
|
2871
2945
|
|
|
2872
2946
|
// src/controls/background-control/background-control.tsx
|
|
2947
|
+
var React51 = __toESM(require("react"));
|
|
2948
|
+
var import_editor_props27 = require("@elementor/editor-props");
|
|
2949
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
2950
|
+
var import_ui45 = require("@elementor/ui");
|
|
2951
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
2952
|
+
|
|
2953
|
+
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
2873
2954
|
var React50 = __toESM(require("react"));
|
|
2874
2955
|
var import_editor_props26 = require("@elementor/editor-props");
|
|
2875
|
-
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
2876
2956
|
var import_ui44 = require("@elementor/ui");
|
|
2877
|
-
var import_i18n19 = require("@wordpress/i18n");
|
|
2878
|
-
|
|
2879
|
-
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
2880
|
-
var React49 = __toESM(require("react"));
|
|
2881
|
-
var import_editor_props25 = require("@elementor/editor-props");
|
|
2882
|
-
var import_ui43 = require("@elementor/ui");
|
|
2883
2957
|
var import_wp_media3 = require("@elementor/wp-media");
|
|
2884
|
-
var
|
|
2958
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
2885
2959
|
|
|
2886
2960
|
// src/env.ts
|
|
2887
2961
|
var import_env = require("@elementor/env");
|
|
2888
2962
|
var { env } = (0, import_env.parseEnv)("@elementor/editor-controls");
|
|
2889
2963
|
|
|
2890
2964
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
2891
|
-
var
|
|
2892
|
-
var
|
|
2893
|
-
var
|
|
2965
|
+
var React45 = __toESM(require("react"));
|
|
2966
|
+
var import_editor_props22 = require("@elementor/editor-props");
|
|
2967
|
+
var import_ui38 = require("@elementor/ui");
|
|
2894
2968
|
var BackgroundGradientColorControl = createControl(() => {
|
|
2895
|
-
const { value, setValue } = useBoundProp(
|
|
2969
|
+
const { value, setValue } = useBoundProp(import_editor_props22.backgroundGradientOverlayPropTypeUtil);
|
|
2896
2970
|
const handleChange = (newValue) => {
|
|
2897
2971
|
const transformedValue = createTransformableValue(newValue);
|
|
2898
2972
|
if (transformedValue.positions) {
|
|
2899
|
-
transformedValue.positions =
|
|
2973
|
+
transformedValue.positions = import_editor_props22.stringPropTypeUtil.create(newValue.positions.join(" "));
|
|
2900
2974
|
}
|
|
2901
2975
|
setValue(transformedValue);
|
|
2902
2976
|
};
|
|
2903
2977
|
const createTransformableValue = (newValue) => ({
|
|
2904
2978
|
...newValue,
|
|
2905
|
-
type:
|
|
2906
|
-
angle:
|
|
2907
|
-
stops:
|
|
2979
|
+
type: import_editor_props22.stringPropTypeUtil.create(newValue.type),
|
|
2980
|
+
angle: import_editor_props22.numberPropTypeUtil.create(newValue.angle),
|
|
2981
|
+
stops: import_editor_props22.gradientColorStopPropTypeUtil.create(
|
|
2908
2982
|
newValue.stops.map(
|
|
2909
|
-
({ color, offset }) =>
|
|
2910
|
-
color:
|
|
2911
|
-
offset:
|
|
2983
|
+
({ color, offset }) => import_editor_props22.colorStopPropTypeUtil.create({
|
|
2984
|
+
color: import_editor_props22.colorPropTypeUtil.create(color),
|
|
2985
|
+
offset: import_editor_props22.numberPropTypeUtil.create(offset)
|
|
2912
2986
|
})
|
|
2913
2987
|
)
|
|
2914
2988
|
)
|
|
@@ -2928,8 +3002,8 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
2928
3002
|
positions: positions?.value.split(" ")
|
|
2929
3003
|
};
|
|
2930
3004
|
};
|
|
2931
|
-
return /* @__PURE__ */
|
|
2932
|
-
|
|
3005
|
+
return /* @__PURE__ */ React45.createElement(ControlActions, null, /* @__PURE__ */ React45.createElement(
|
|
3006
|
+
import_ui38.UnstableGradientBox,
|
|
2933
3007
|
{
|
|
2934
3008
|
sx: { width: "auto", padding: 1.5 },
|
|
2935
3009
|
value: normalizeValue(),
|
|
@@ -2937,67 +3011,67 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
2937
3011
|
}
|
|
2938
3012
|
));
|
|
2939
3013
|
});
|
|
2940
|
-
var initialBackgroundGradientOverlay =
|
|
2941
|
-
type:
|
|
2942
|
-
angle:
|
|
2943
|
-
stops:
|
|
2944
|
-
|
|
2945
|
-
color:
|
|
2946
|
-
offset:
|
|
3014
|
+
var initialBackgroundGradientOverlay = import_editor_props22.backgroundGradientOverlayPropTypeUtil.create({
|
|
3015
|
+
type: import_editor_props22.stringPropTypeUtil.create("linear"),
|
|
3016
|
+
angle: import_editor_props22.numberPropTypeUtil.create(180),
|
|
3017
|
+
stops: import_editor_props22.gradientColorStopPropTypeUtil.create([
|
|
3018
|
+
import_editor_props22.colorStopPropTypeUtil.create({
|
|
3019
|
+
color: import_editor_props22.colorPropTypeUtil.create("rgb(0,0,0)"),
|
|
3020
|
+
offset: import_editor_props22.numberPropTypeUtil.create(0)
|
|
2947
3021
|
}),
|
|
2948
|
-
|
|
2949
|
-
color:
|
|
2950
|
-
offset:
|
|
3022
|
+
import_editor_props22.colorStopPropTypeUtil.create({
|
|
3023
|
+
color: import_editor_props22.colorPropTypeUtil.create("rgb(255,255,255)"),
|
|
3024
|
+
offset: import_editor_props22.numberPropTypeUtil.create(100)
|
|
2951
3025
|
})
|
|
2952
3026
|
])
|
|
2953
3027
|
});
|
|
2954
3028
|
|
|
2955
3029
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
2956
|
-
var
|
|
3030
|
+
var React46 = __toESM(require("react"));
|
|
2957
3031
|
var import_icons14 = require("@elementor/icons");
|
|
2958
|
-
var
|
|
2959
|
-
var
|
|
3032
|
+
var import_ui39 = require("@elementor/ui");
|
|
3033
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
2960
3034
|
var attachmentControlOptions = [
|
|
2961
3035
|
{
|
|
2962
3036
|
value: "fixed",
|
|
2963
|
-
label: (0,
|
|
2964
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3037
|
+
label: (0, import_i18n15.__)("Fixed", "elementor"),
|
|
3038
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons14.PinIcon, { fontSize: size }),
|
|
2965
3039
|
showTooltip: true
|
|
2966
3040
|
},
|
|
2967
3041
|
{
|
|
2968
3042
|
value: "scroll",
|
|
2969
|
-
label: (0,
|
|
2970
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3043
|
+
label: (0, import_i18n15.__)("Scroll", "elementor"),
|
|
3044
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons14.PinnedOffIcon, { fontSize: size }),
|
|
2971
3045
|
showTooltip: true
|
|
2972
3046
|
}
|
|
2973
3047
|
];
|
|
2974
3048
|
var BackgroundImageOverlayAttachment = () => {
|
|
2975
|
-
return /* @__PURE__ */
|
|
3049
|
+
return /* @__PURE__ */ React46.createElement(PopoverGridContainer, null, /* @__PURE__ */ React46.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlFormLabel, null, (0, import_i18n15.__)("Attachment", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React46.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
2976
3050
|
};
|
|
2977
3051
|
|
|
2978
3052
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
2979
|
-
var
|
|
3053
|
+
var React47 = __toESM(require("react"));
|
|
2980
3054
|
var import_react27 = require("react");
|
|
2981
|
-
var
|
|
3055
|
+
var import_editor_props23 = require("@elementor/editor-props");
|
|
2982
3056
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
2983
3057
|
var import_icons15 = require("@elementor/icons");
|
|
2984
|
-
var
|
|
2985
|
-
var
|
|
3058
|
+
var import_ui40 = require("@elementor/ui");
|
|
3059
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
2986
3060
|
var backgroundPositionOptions = [
|
|
2987
|
-
{ label: (0,
|
|
2988
|
-
{ label: (0,
|
|
2989
|
-
{ label: (0,
|
|
2990
|
-
{ label: (0,
|
|
2991
|
-
{ label: (0,
|
|
2992
|
-
{ label: (0,
|
|
2993
|
-
{ label: (0,
|
|
2994
|
-
{ label: (0,
|
|
2995
|
-
{ label: (0,
|
|
2996
|
-
{ label: (0,
|
|
3061
|
+
{ label: (0, import_i18n16.__)("Center center", "elementor"), value: "center center" },
|
|
3062
|
+
{ label: (0, import_i18n16.__)("Center left", "elementor"), value: "center left" },
|
|
3063
|
+
{ label: (0, import_i18n16.__)("Center right", "elementor"), value: "center right" },
|
|
3064
|
+
{ label: (0, import_i18n16.__)("Top center", "elementor"), value: "top center" },
|
|
3065
|
+
{ label: (0, import_i18n16.__)("Top left", "elementor"), value: "top left" },
|
|
3066
|
+
{ label: (0, import_i18n16.__)("Top right", "elementor"), value: "top right" },
|
|
3067
|
+
{ label: (0, import_i18n16.__)("Bottom center", "elementor"), value: "bottom center" },
|
|
3068
|
+
{ label: (0, import_i18n16.__)("Bottom left", "elementor"), value: "bottom left" },
|
|
3069
|
+
{ label: (0, import_i18n16.__)("Bottom right", "elementor"), value: "bottom right" },
|
|
3070
|
+
{ label: (0, import_i18n16.__)("Custom", "elementor"), value: "custom" }
|
|
2997
3071
|
];
|
|
2998
3072
|
var BackgroundImageOverlayPosition = () => {
|
|
2999
|
-
const backgroundImageOffsetContext = useBoundProp(
|
|
3000
|
-
const stringPropContext = useBoundProp(
|
|
3073
|
+
const backgroundImageOffsetContext = useBoundProp(import_editor_props23.backgroundImagePositionOffsetPropTypeUtil);
|
|
3074
|
+
const stringPropContext = useBoundProp(import_editor_props23.stringPropTypeUtil);
|
|
3001
3075
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
3002
3076
|
const rowRef = (0, import_react27.useRef)(null);
|
|
3003
3077
|
const handlePositionChange = (event) => {
|
|
@@ -3008,8 +3082,8 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
3008
3082
|
stringPropContext.setValue(value);
|
|
3009
3083
|
}
|
|
3010
3084
|
};
|
|
3011
|
-
return /* @__PURE__ */
|
|
3012
|
-
|
|
3085
|
+
return /* @__PURE__ */ React47.createElement(import_ui40.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React47.createElement(PopoverGridContainer, null, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlFormLabel, null, (0, import_i18n16.__)("Position", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React47.createElement(
|
|
3086
|
+
import_ui40.Select,
|
|
3013
3087
|
{
|
|
3014
3088
|
fullWidth: true,
|
|
3015
3089
|
size: "tiny",
|
|
@@ -3017,93 +3091,93 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
3017
3091
|
disabled: stringPropContext.disabled,
|
|
3018
3092
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
3019
3093
|
},
|
|
3020
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
3021
|
-
)))), isCustom ? /* @__PURE__ */
|
|
3094
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React47.createElement(import_editor_ui7.MenuListItem, { key: value, value: value ?? "" }, label))
|
|
3095
|
+
)))), isCustom ? /* @__PURE__ */ React47.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React47.createElement(
|
|
3022
3096
|
SizeControl,
|
|
3023
3097
|
{
|
|
3024
|
-
startIcon: /* @__PURE__ */
|
|
3098
|
+
startIcon: /* @__PURE__ */ React47.createElement(import_icons15.LetterXIcon, { fontSize: "tiny" }),
|
|
3025
3099
|
anchorRef: rowRef
|
|
3026
3100
|
}
|
|
3027
|
-
))), /* @__PURE__ */
|
|
3101
|
+
))), /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React47.createElement(
|
|
3028
3102
|
SizeControl,
|
|
3029
3103
|
{
|
|
3030
|
-
startIcon: /* @__PURE__ */
|
|
3104
|
+
startIcon: /* @__PURE__ */ React47.createElement(import_icons15.LetterYIcon, { fontSize: "tiny" }),
|
|
3031
3105
|
anchorRef: rowRef
|
|
3032
3106
|
}
|
|
3033
3107
|
)))))) : null);
|
|
3034
3108
|
};
|
|
3035
3109
|
|
|
3036
3110
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
3037
|
-
var
|
|
3111
|
+
var React48 = __toESM(require("react"));
|
|
3038
3112
|
var import_icons16 = require("@elementor/icons");
|
|
3039
|
-
var
|
|
3040
|
-
var
|
|
3113
|
+
var import_ui41 = require("@elementor/ui");
|
|
3114
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
3041
3115
|
var repeatControlOptions = [
|
|
3042
3116
|
{
|
|
3043
3117
|
value: "repeat",
|
|
3044
|
-
label: (0,
|
|
3045
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3118
|
+
label: (0, import_i18n17.__)("Repeat", "elementor"),
|
|
3119
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons16.GridDotsIcon, { fontSize: size }),
|
|
3046
3120
|
showTooltip: true
|
|
3047
3121
|
},
|
|
3048
3122
|
{
|
|
3049
3123
|
value: "repeat-x",
|
|
3050
|
-
label: (0,
|
|
3051
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3124
|
+
label: (0, import_i18n17.__)("Repeat-x", "elementor"),
|
|
3125
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons16.DotsHorizontalIcon, { fontSize: size }),
|
|
3052
3126
|
showTooltip: true
|
|
3053
3127
|
},
|
|
3054
3128
|
{
|
|
3055
3129
|
value: "repeat-y",
|
|
3056
|
-
label: (0,
|
|
3057
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3130
|
+
label: (0, import_i18n17.__)("Repeat-y", "elementor"),
|
|
3131
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons16.DotsVerticalIcon, { fontSize: size }),
|
|
3058
3132
|
showTooltip: true
|
|
3059
3133
|
},
|
|
3060
3134
|
{
|
|
3061
3135
|
value: "no-repeat",
|
|
3062
|
-
label: (0,
|
|
3063
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3136
|
+
label: (0, import_i18n17.__)("No-repeat", "elementor"),
|
|
3137
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons16.XIcon, { fontSize: size }),
|
|
3064
3138
|
showTooltip: true
|
|
3065
3139
|
}
|
|
3066
3140
|
];
|
|
3067
3141
|
var BackgroundImageOverlayRepeat = () => {
|
|
3068
|
-
return /* @__PURE__ */
|
|
3142
|
+
return /* @__PURE__ */ React48.createElement(PopoverGridContainer, null, /* @__PURE__ */ React48.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlFormLabel, null, (0, import_i18n17.__)("Repeat", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React48.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
3069
3143
|
};
|
|
3070
3144
|
|
|
3071
3145
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
3072
|
-
var
|
|
3146
|
+
var React49 = __toESM(require("react"));
|
|
3073
3147
|
var import_react28 = require("react");
|
|
3074
|
-
var
|
|
3148
|
+
var import_editor_props24 = require("@elementor/editor-props");
|
|
3075
3149
|
var import_icons17 = require("@elementor/icons");
|
|
3076
|
-
var
|
|
3077
|
-
var
|
|
3150
|
+
var import_ui42 = require("@elementor/ui");
|
|
3151
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
3078
3152
|
var sizeControlOptions = [
|
|
3079
3153
|
{
|
|
3080
3154
|
value: "auto",
|
|
3081
|
-
label: (0,
|
|
3082
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3155
|
+
label: (0, import_i18n18.__)("Auto", "elementor"),
|
|
3156
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons17.LetterAIcon, { fontSize: size }),
|
|
3083
3157
|
showTooltip: true
|
|
3084
3158
|
},
|
|
3085
3159
|
{
|
|
3086
3160
|
value: "cover",
|
|
3087
|
-
label: (0,
|
|
3088
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3161
|
+
label: (0, import_i18n18.__)("Cover", "elementor"),
|
|
3162
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons17.ArrowsMaximizeIcon, { fontSize: size }),
|
|
3089
3163
|
showTooltip: true
|
|
3090
3164
|
},
|
|
3091
3165
|
{
|
|
3092
3166
|
value: "contain",
|
|
3093
|
-
label: (0,
|
|
3094
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3167
|
+
label: (0, import_i18n18.__)("Contain", "elementor"),
|
|
3168
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons17.ArrowBarBothIcon, { fontSize: size }),
|
|
3095
3169
|
showTooltip: true
|
|
3096
3170
|
},
|
|
3097
3171
|
{
|
|
3098
3172
|
value: "custom",
|
|
3099
|
-
label: (0,
|
|
3100
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3173
|
+
label: (0, import_i18n18.__)("Custom", "elementor"),
|
|
3174
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons17.PencilIcon, { fontSize: size }),
|
|
3101
3175
|
showTooltip: true
|
|
3102
3176
|
}
|
|
3103
3177
|
];
|
|
3104
3178
|
var BackgroundImageOverlaySize = () => {
|
|
3105
|
-
const backgroundImageScaleContext = useBoundProp(
|
|
3106
|
-
const stringPropContext = useBoundProp(
|
|
3179
|
+
const backgroundImageScaleContext = useBoundProp(import_editor_props24.backgroundImageSizeScalePropTypeUtil);
|
|
3180
|
+
const stringPropContext = useBoundProp(import_editor_props24.stringPropTypeUtil);
|
|
3107
3181
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
3108
3182
|
const rowRef = (0, import_react28.useRef)(null);
|
|
3109
3183
|
const handleSizeChange = (size) => {
|
|
@@ -3113,7 +3187,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
3113
3187
|
stringPropContext.setValue(size);
|
|
3114
3188
|
}
|
|
3115
3189
|
};
|
|
3116
|
-
return /* @__PURE__ */
|
|
3190
|
+
return /* @__PURE__ */ React49.createElement(import_ui42.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React49.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(PopoverGridContainer, null, /* @__PURE__ */ React49.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlFormLabel, null, (0, import_i18n18.__)("Size", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui42.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React49.createElement(
|
|
3117
3191
|
ControlToggleButtonGroup,
|
|
3118
3192
|
{
|
|
3119
3193
|
exclusive: true,
|
|
@@ -3122,17 +3196,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
3122
3196
|
disabled: stringPropContext.disabled,
|
|
3123
3197
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
3124
3198
|
}
|
|
3125
|
-
)))), isCustom ? /* @__PURE__ */
|
|
3199
|
+
)))), isCustom ? /* @__PURE__ */ React49.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React49.createElement(import_ui42.Grid, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React49.createElement(PopoverGridContainer, null, /* @__PURE__ */ React49.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React49.createElement(
|
|
3126
3200
|
SizeControl,
|
|
3127
3201
|
{
|
|
3128
|
-
startIcon: /* @__PURE__ */
|
|
3202
|
+
startIcon: /* @__PURE__ */ React49.createElement(import_icons17.ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
|
|
3129
3203
|
extendedOptions: ["auto"],
|
|
3130
3204
|
anchorRef: rowRef
|
|
3131
3205
|
}
|
|
3132
|
-
))), /* @__PURE__ */
|
|
3206
|
+
))), /* @__PURE__ */ React49.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React49.createElement(
|
|
3133
3207
|
SizeControl,
|
|
3134
3208
|
{
|
|
3135
|
-
startIcon: /* @__PURE__ */
|
|
3209
|
+
startIcon: /* @__PURE__ */ React49.createElement(import_icons17.ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
|
|
3136
3210
|
extendedOptions: ["auto"],
|
|
3137
3211
|
anchorRef: rowRef
|
|
3138
3212
|
}
|
|
@@ -3141,16 +3215,16 @@ var BackgroundImageOverlaySize = () => {
|
|
|
3141
3215
|
|
|
3142
3216
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
3143
3217
|
var import_react29 = require("react");
|
|
3144
|
-
var
|
|
3145
|
-
var
|
|
3218
|
+
var import_editor_props25 = require("@elementor/editor-props");
|
|
3219
|
+
var import_ui43 = require("@elementor/ui");
|
|
3146
3220
|
var useBackgroundTabsHistory = ({
|
|
3147
3221
|
color: initialBackgroundColorOverlay2,
|
|
3148
3222
|
image: initialBackgroundImageOverlay,
|
|
3149
3223
|
gradient: initialBackgroundGradientOverlay2
|
|
3150
3224
|
}) => {
|
|
3151
|
-
const { value: imageValue, setValue: setImageValue } = useBoundProp(
|
|
3152
|
-
const { value: colorValue, setValue: setColorValue } = useBoundProp(
|
|
3153
|
-
const { value: gradientValue, setValue: setGradientValue } = useBoundProp(
|
|
3225
|
+
const { value: imageValue, setValue: setImageValue } = useBoundProp(import_editor_props25.backgroundImageOverlayPropTypeUtil);
|
|
3226
|
+
const { value: colorValue, setValue: setColorValue } = useBoundProp(import_editor_props25.backgroundColorOverlayPropTypeUtil);
|
|
3227
|
+
const { value: gradientValue, setValue: setGradientValue } = useBoundProp(import_editor_props25.backgroundGradientOverlayPropTypeUtil);
|
|
3154
3228
|
const getCurrentOverlayType = () => {
|
|
3155
3229
|
if (colorValue) {
|
|
3156
3230
|
return "color";
|
|
@@ -3160,7 +3234,7 @@ var useBackgroundTabsHistory = ({
|
|
|
3160
3234
|
}
|
|
3161
3235
|
return "image";
|
|
3162
3236
|
};
|
|
3163
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
3237
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui43.useTabs)(getCurrentOverlayType());
|
|
3164
3238
|
const valuesHistory = (0, import_react29.useRef)({
|
|
3165
3239
|
image: initialBackgroundImageOverlay,
|
|
3166
3240
|
color: initialBackgroundColorOverlay2,
|
|
@@ -3199,9 +3273,9 @@ var useBackgroundTabsHistory = ({
|
|
|
3199
3273
|
|
|
3200
3274
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
3201
3275
|
var DEFAULT_BACKGROUND_COLOR_OVERLAY_COLOR = "#00000033";
|
|
3202
|
-
var initialBackgroundColorOverlay =
|
|
3276
|
+
var initialBackgroundColorOverlay = import_editor_props26.backgroundColorOverlayPropTypeUtil.create(
|
|
3203
3277
|
{
|
|
3204
|
-
color:
|
|
3278
|
+
color: import_editor_props26.colorPropTypeUtil.create(DEFAULT_BACKGROUND_COLOR_OVERLAY_COLOR)
|
|
3205
3279
|
}
|
|
3206
3280
|
);
|
|
3207
3281
|
var getInitialBackgroundOverlay = () => ({
|
|
@@ -3229,21 +3303,21 @@ var getInitialBackgroundOverlay = () => ({
|
|
|
3229
3303
|
}
|
|
3230
3304
|
});
|
|
3231
3305
|
var backgroundResolutionOptions = [
|
|
3232
|
-
{ label: (0,
|
|
3233
|
-
{ label: (0,
|
|
3234
|
-
{ label: (0,
|
|
3235
|
-
{ label: (0,
|
|
3306
|
+
{ label: (0, import_i18n19.__)("Thumbnail - 150 x 150", "elementor"), value: "thumbnail" },
|
|
3307
|
+
{ label: (0, import_i18n19.__)("Medium - 300 x 300", "elementor"), value: "medium" },
|
|
3308
|
+
{ label: (0, import_i18n19.__)("Large 1024 x 1024", "elementor"), value: "large" },
|
|
3309
|
+
{ label: (0, import_i18n19.__)("Full", "elementor"), value: "full" }
|
|
3236
3310
|
];
|
|
3237
3311
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
3238
|
-
const { propType, value: overlayValues, setValue, disabled } = useBoundProp(
|
|
3239
|
-
return /* @__PURE__ */
|
|
3312
|
+
const { propType, value: overlayValues, setValue, disabled } = useBoundProp(import_editor_props26.backgroundOverlayPropTypeUtil);
|
|
3313
|
+
return /* @__PURE__ */ React50.createElement(PropProvider, { propType, value: overlayValues, setValue, isDisabled: () => disabled }, /* @__PURE__ */ React50.createElement(
|
|
3240
3314
|
Repeater,
|
|
3241
3315
|
{
|
|
3242
3316
|
openOnAdd: true,
|
|
3243
3317
|
disabled,
|
|
3244
3318
|
values: overlayValues ?? [],
|
|
3245
3319
|
setValues: setValue,
|
|
3246
|
-
label: (0,
|
|
3320
|
+
label: (0, import_i18n19.__)("Overlay", "elementor"),
|
|
3247
3321
|
itemSettings: {
|
|
3248
3322
|
Icon: ItemIcon3,
|
|
3249
3323
|
Label: ItemLabel3,
|
|
@@ -3254,7 +3328,7 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
|
3254
3328
|
));
|
|
3255
3329
|
});
|
|
3256
3330
|
var ItemContent3 = ({ anchorEl = null, bind }) => {
|
|
3257
|
-
return /* @__PURE__ */
|
|
3331
|
+
return /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React50.createElement(Content3, { anchorEl }));
|
|
3258
3332
|
};
|
|
3259
3333
|
var Content3 = ({ anchorEl }) => {
|
|
3260
3334
|
const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
|
|
@@ -3262,27 +3336,27 @@ var Content3 = ({ anchorEl }) => {
|
|
|
3262
3336
|
color: initialBackgroundColorOverlay.value,
|
|
3263
3337
|
gradient: initialBackgroundGradientOverlay.value
|
|
3264
3338
|
});
|
|
3265
|
-
return /* @__PURE__ */
|
|
3266
|
-
|
|
3339
|
+
return /* @__PURE__ */ React50.createElement(import_ui44.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React50.createElement(import_ui44.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React50.createElement(
|
|
3340
|
+
import_ui44.Tabs,
|
|
3267
3341
|
{
|
|
3268
3342
|
size: "small",
|
|
3269
3343
|
variant: "fullWidth",
|
|
3270
3344
|
...getTabsProps(),
|
|
3271
|
-
"aria-label": (0,
|
|
3345
|
+
"aria-label": (0, import_i18n19.__)("Background Overlay", "elementor")
|
|
3272
3346
|
},
|
|
3273
|
-
/* @__PURE__ */
|
|
3274
|
-
/* @__PURE__ */
|
|
3275
|
-
/* @__PURE__ */
|
|
3276
|
-
)), /* @__PURE__ */
|
|
3347
|
+
/* @__PURE__ */ React50.createElement(import_ui44.Tab, { label: (0, import_i18n19.__)("Image", "elementor"), ...getTabProps("image") }),
|
|
3348
|
+
/* @__PURE__ */ React50.createElement(import_ui44.Tab, { label: (0, import_i18n19.__)("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
3349
|
+
/* @__PURE__ */ React50.createElement(import_ui44.Tab, { label: (0, import_i18n19.__)("Color", "elementor"), ...getTabProps("color") })
|
|
3350
|
+
)), /* @__PURE__ */ React50.createElement(import_ui44.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React50.createElement(PopoverContent, null, /* @__PURE__ */ React50.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React50.createElement(import_ui44.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React50.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React50.createElement(import_ui44.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React50.createElement(PopoverContent, null, /* @__PURE__ */ React50.createElement(ColorOverlayContent, { anchorEl }))));
|
|
3277
3351
|
};
|
|
3278
3352
|
var ItemIcon3 = ({ value }) => {
|
|
3279
3353
|
switch (value.$$type) {
|
|
3280
3354
|
case "background-image-overlay":
|
|
3281
|
-
return /* @__PURE__ */
|
|
3355
|
+
return /* @__PURE__ */ React50.createElement(ItemIconImage, { value });
|
|
3282
3356
|
case "background-color-overlay":
|
|
3283
|
-
return /* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ React50.createElement(ItemIconColor, { value });
|
|
3284
3358
|
case "background-gradient-overlay":
|
|
3285
|
-
return /* @__PURE__ */
|
|
3359
|
+
return /* @__PURE__ */ React50.createElement(ItemIconGradient, { value });
|
|
3286
3360
|
default:
|
|
3287
3361
|
return null;
|
|
3288
3362
|
}
|
|
@@ -3295,12 +3369,12 @@ var extractColorFrom = (prop) => {
|
|
|
3295
3369
|
};
|
|
3296
3370
|
var ItemIconColor = ({ value: prop }) => {
|
|
3297
3371
|
const color = extractColorFrom(prop);
|
|
3298
|
-
return /* @__PURE__ */
|
|
3372
|
+
return /* @__PURE__ */ React50.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
3299
3373
|
};
|
|
3300
3374
|
var ItemIconImage = ({ value }) => {
|
|
3301
3375
|
const { imageUrl } = useImage(value);
|
|
3302
|
-
return /* @__PURE__ */
|
|
3303
|
-
|
|
3376
|
+
return /* @__PURE__ */ React50.createElement(
|
|
3377
|
+
import_ui44.CardMedia,
|
|
3304
3378
|
{
|
|
3305
3379
|
image: imageUrl,
|
|
3306
3380
|
sx: (theme) => ({
|
|
@@ -3314,43 +3388,43 @@ var ItemIconImage = ({ value }) => {
|
|
|
3314
3388
|
};
|
|
3315
3389
|
var ItemIconGradient = ({ value }) => {
|
|
3316
3390
|
const gradient = getGradientValue(value);
|
|
3317
|
-
return /* @__PURE__ */
|
|
3391
|
+
return /* @__PURE__ */ React50.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
3318
3392
|
};
|
|
3319
3393
|
var ItemLabel3 = ({ value }) => {
|
|
3320
3394
|
switch (value.$$type) {
|
|
3321
3395
|
case "background-image-overlay":
|
|
3322
|
-
return /* @__PURE__ */
|
|
3396
|
+
return /* @__PURE__ */ React50.createElement(ItemLabelImage, { value });
|
|
3323
3397
|
case "background-color-overlay":
|
|
3324
|
-
return /* @__PURE__ */
|
|
3398
|
+
return /* @__PURE__ */ React50.createElement(ItemLabelColor, { value });
|
|
3325
3399
|
case "background-gradient-overlay":
|
|
3326
|
-
return /* @__PURE__ */
|
|
3400
|
+
return /* @__PURE__ */ React50.createElement(ItemLabelGradient, { value });
|
|
3327
3401
|
default:
|
|
3328
3402
|
return null;
|
|
3329
3403
|
}
|
|
3330
3404
|
};
|
|
3331
3405
|
var ItemLabelColor = ({ value: prop }) => {
|
|
3332
3406
|
const color = extractColorFrom(prop);
|
|
3333
|
-
return /* @__PURE__ */
|
|
3407
|
+
return /* @__PURE__ */ React50.createElement("span", null, color);
|
|
3334
3408
|
};
|
|
3335
3409
|
var ItemLabelImage = ({ value }) => {
|
|
3336
3410
|
const { imageTitle } = useImage(value);
|
|
3337
|
-
return /* @__PURE__ */
|
|
3411
|
+
return /* @__PURE__ */ React50.createElement("span", null, imageTitle);
|
|
3338
3412
|
};
|
|
3339
3413
|
var ItemLabelGradient = ({ value }) => {
|
|
3340
3414
|
if (value.value.type.value === "linear") {
|
|
3341
|
-
return /* @__PURE__ */
|
|
3415
|
+
return /* @__PURE__ */ React50.createElement("span", null, (0, import_i18n19.__)("Linear Gradient", "elementor"));
|
|
3342
3416
|
}
|
|
3343
|
-
return /* @__PURE__ */
|
|
3417
|
+
return /* @__PURE__ */ React50.createElement("span", null, (0, import_i18n19.__)("Radial Gradient", "elementor"));
|
|
3344
3418
|
};
|
|
3345
3419
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
3346
|
-
const propContext = useBoundProp(
|
|
3347
|
-
return /* @__PURE__ */
|
|
3420
|
+
const propContext = useBoundProp(import_editor_props26.backgroundColorOverlayPropTypeUtil);
|
|
3421
|
+
return /* @__PURE__ */ React50.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React50.createElement(ColorControl, { anchorEl })));
|
|
3348
3422
|
};
|
|
3349
3423
|
var ImageOverlayContent = () => {
|
|
3350
|
-
const propContext = useBoundProp(
|
|
3351
|
-
return /* @__PURE__ */
|
|
3424
|
+
const propContext = useBoundProp(import_editor_props26.backgroundImageOverlayPropTypeUtil);
|
|
3425
|
+
return /* @__PURE__ */ React50.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React50.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React50.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React50.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React50.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React50.createElement(BackgroundImageOverlayAttachment, null)));
|
|
3352
3426
|
};
|
|
3353
|
-
var StyledUnstableColorIndicator = (0,
|
|
3427
|
+
var StyledUnstableColorIndicator = (0, import_ui44.styled)(import_ui44.UnstableColorIndicator)(({ theme }) => ({
|
|
3354
3428
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
3355
3429
|
}));
|
|
3356
3430
|
var useImage = (image) => {
|
|
@@ -3385,22 +3459,10 @@ var getGradientValue = (value) => {
|
|
|
3385
3459
|
|
|
3386
3460
|
// src/controls/background-control/background-control.tsx
|
|
3387
3461
|
var BackgroundControl = createControl(() => {
|
|
3388
|
-
const propContext = useBoundProp(
|
|
3389
|
-
const isUsingNestedProps = (0,
|
|
3390
|
-
const colorLabel = (0,
|
|
3391
|
-
return /* @__PURE__ */
|
|
3392
|
-
});
|
|
3393
|
-
|
|
3394
|
-
// src/controls/switch-control.tsx
|
|
3395
|
-
var React51 = __toESM(require("react"));
|
|
3396
|
-
var import_editor_props27 = require("@elementor/editor-props");
|
|
3397
|
-
var import_ui45 = require("@elementor/ui");
|
|
3398
|
-
var SwitchControl2 = createControl(() => {
|
|
3399
|
-
const { value, setValue, disabled } = useBoundProp(import_editor_props27.booleanPropTypeUtil);
|
|
3400
|
-
const handleChange = (event) => {
|
|
3401
|
-
setValue(event.target.checked);
|
|
3402
|
-
};
|
|
3403
|
-
return /* @__PURE__ */ React51.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React51.createElement(import_ui45.Switch, { checked: !!value, onChange: handleChange, size: "small", disabled }));
|
|
3462
|
+
const propContext = useBoundProp(import_editor_props27.backgroundPropTypeUtil);
|
|
3463
|
+
const isUsingNestedProps = (0, import_editor_v1_adapters5.isExperimentActive)("e_v_3_30");
|
|
3464
|
+
const colorLabel = (0, import_i18n20.__)("Color", "elementor");
|
|
3465
|
+
return /* @__PURE__ */ React51.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React51.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React51.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React51.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React51.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui45.Grid, { item: true, xs: 6 }, isUsingNestedProps ? /* @__PURE__ */ React51.createElement(ControlLabel, null, colorLabel) : /* @__PURE__ */ React51.createElement(ControlFormLabel, null, colorLabel)), /* @__PURE__ */ React51.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ColorControl, null)))));
|
|
3404
3466
|
});
|
|
3405
3467
|
|
|
3406
3468
|
// src/controls/repeatable-control.tsx
|
|
@@ -3439,16 +3501,16 @@ var RepeatableControl = createControl(
|
|
|
3439
3501
|
() => (0, import_editor_props28.createArrayPropUtils)(childPropTypeUtil.key, childPropTypeUtil.schema),
|
|
3440
3502
|
[childPropTypeUtil.key, childPropTypeUtil.schema]
|
|
3441
3503
|
);
|
|
3504
|
+
const contextValue = (0, import_react31.useMemo)(
|
|
3505
|
+
() => ({
|
|
3506
|
+
...childControlConfig,
|
|
3507
|
+
placeholder: placeholder || "",
|
|
3508
|
+
patternLabel: patternLabel || ""
|
|
3509
|
+
}),
|
|
3510
|
+
[childControlConfig, placeholder, patternLabel]
|
|
3511
|
+
);
|
|
3442
3512
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
3443
|
-
|
|
3444
|
-
const pattern = patternLabel || "";
|
|
3445
|
-
const finalLabel = interpolate(pattern, itemValue.value);
|
|
3446
|
-
if (finalLabel) {
|
|
3447
|
-
return /* @__PURE__ */ React52.createElement("span", null, finalLabel);
|
|
3448
|
-
}
|
|
3449
|
-
return /* @__PURE__ */ React52.createElement(import_ui46.Box, { component: "span", color: "text.tertiary" }, placeholder);
|
|
3450
|
-
};
|
|
3451
|
-
return /* @__PURE__ */ React52.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React52.createElement(RepeatableControlContext.Provider, { value: childControlConfig }, /* @__PURE__ */ React52.createElement(
|
|
3513
|
+
return /* @__PURE__ */ React52.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React52.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React52.createElement(
|
|
3452
3514
|
Repeater,
|
|
3453
3515
|
{
|
|
3454
3516
|
openOnAdd: true,
|
|
@@ -3477,18 +3539,61 @@ var Content4 = () => {
|
|
|
3477
3539
|
return /* @__PURE__ */ React52.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React52.createElement(PopoverGridContainer, null, /* @__PURE__ */ React52.createElement(ChildControl, { ...props })));
|
|
3478
3540
|
};
|
|
3479
3541
|
var interpolate = (template, data) => {
|
|
3480
|
-
if (
|
|
3481
|
-
return
|
|
3542
|
+
if (!data) {
|
|
3543
|
+
return template;
|
|
3482
3544
|
}
|
|
3483
3545
|
return new Function(...Object.keys(data), `return \`${template}\`;`)(...Object.values(data));
|
|
3484
3546
|
};
|
|
3547
|
+
var getNestedValue = (obj, path) => {
|
|
3548
|
+
return path.split(".").reduce((current, key) => current?.[key], obj);
|
|
3549
|
+
};
|
|
3550
|
+
var isEmptyValue = (val) => {
|
|
3551
|
+
if (typeof val === "string") {
|
|
3552
|
+
return val.trim() === "";
|
|
3553
|
+
}
|
|
3554
|
+
if (Number.isNaN(val)) {
|
|
3555
|
+
return true;
|
|
3556
|
+
}
|
|
3557
|
+
if (Array.isArray(val)) {
|
|
3558
|
+
return val.length === 0;
|
|
3559
|
+
}
|
|
3560
|
+
if (typeof val === "object" && val !== null && Object.keys(val).length === 0) {
|
|
3561
|
+
return true;
|
|
3562
|
+
}
|
|
3563
|
+
return false;
|
|
3564
|
+
};
|
|
3565
|
+
var shouldShowPlaceholder = (pattern, data) => {
|
|
3566
|
+
const propertyPaths = getAllProperties(pattern);
|
|
3567
|
+
const values = propertyPaths.map((path) => getNestedValue(data, path));
|
|
3568
|
+
if (values.length === 0) {
|
|
3569
|
+
return false;
|
|
3570
|
+
}
|
|
3571
|
+
if (values.some((value) => value === null || value === void 0)) {
|
|
3572
|
+
return true;
|
|
3573
|
+
}
|
|
3574
|
+
if (values.every(isEmptyValue)) {
|
|
3575
|
+
return true;
|
|
3576
|
+
}
|
|
3577
|
+
return false;
|
|
3578
|
+
};
|
|
3579
|
+
var ItemLabel4 = ({ value }) => {
|
|
3580
|
+
const { placeholder, patternLabel } = useRepeatableControlContext();
|
|
3581
|
+
const label = shouldShowPlaceholder(patternLabel, value) ? placeholder : interpolate(patternLabel, value);
|
|
3582
|
+
return /* @__PURE__ */ React52.createElement(import_ui46.Box, { component: "span", color: "text.tertiary" }, label);
|
|
3583
|
+
};
|
|
3584
|
+
var getAllProperties = (pattern) => {
|
|
3585
|
+
const properties = pattern.match(/\$\{([^}]+)\}/g)?.map(
|
|
3586
|
+
(match) => match.slice(2, -1)
|
|
3587
|
+
) || [];
|
|
3588
|
+
return properties;
|
|
3589
|
+
};
|
|
3485
3590
|
|
|
3486
3591
|
// src/controls/key-value-control.tsx
|
|
3487
3592
|
var React53 = __toESM(require("react"));
|
|
3488
3593
|
var import_react32 = require("react");
|
|
3489
3594
|
var import_editor_props29 = require("@elementor/editor-props");
|
|
3490
3595
|
var import_ui47 = require("@elementor/ui");
|
|
3491
|
-
var
|
|
3596
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
3492
3597
|
var KeyValueControl = createControl((props = {}) => {
|
|
3493
3598
|
const { value, setValue } = useBoundProp(import_editor_props29.keyValuePropTypeUtil);
|
|
3494
3599
|
const [keyError, setKeyError] = (0, import_react32.useState)(null);
|
|
@@ -3497,13 +3602,13 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
3497
3602
|
key: value?.key?.value || "",
|
|
3498
3603
|
value: value?.value?.value || ""
|
|
3499
3604
|
});
|
|
3500
|
-
const keyLabel = props.keyName || (0,
|
|
3501
|
-
const valueLabel = props.valueName || (0,
|
|
3605
|
+
const keyLabel = props.keyName || (0, import_i18n21.__)("Key", "elementor");
|
|
3606
|
+
const valueLabel = props.valueName || (0, import_i18n21.__)("Value", "elementor");
|
|
3502
3607
|
const [keyRegex, valueRegex, errMsg] = (0, import_react32.useMemo)(
|
|
3503
3608
|
() => [
|
|
3504
3609
|
props.regexKey ? new RegExp(props.regexKey) : void 0,
|
|
3505
3610
|
props.regexValue ? new RegExp(props.regexValue) : void 0,
|
|
3506
|
-
props.validationErrorMessage || (0,
|
|
3611
|
+
props.validationErrorMessage || (0, import_i18n21.__)("Invalid Format", "elementor")
|
|
3507
3612
|
],
|
|
3508
3613
|
[props.regexKey, props.regexValue, props.validationErrorMessage]
|
|
3509
3614
|
);
|
|
@@ -3575,30 +3680,30 @@ var React54 = __toESM(require("react"));
|
|
|
3575
3680
|
var import_react33 = require("react");
|
|
3576
3681
|
var import_editor_props30 = require("@elementor/editor-props");
|
|
3577
3682
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
3578
|
-
var
|
|
3683
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
3579
3684
|
var import_icons18 = require("@elementor/icons");
|
|
3580
3685
|
var import_ui48 = require("@elementor/ui");
|
|
3581
|
-
var
|
|
3686
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
3582
3687
|
var positionOptions = [
|
|
3583
|
-
{ label: (0,
|
|
3584
|
-
{ label: (0,
|
|
3585
|
-
{ label: (0,
|
|
3586
|
-
{ label: (0,
|
|
3587
|
-
{ label: (0,
|
|
3588
|
-
{ label: (0,
|
|
3589
|
-
{ label: (0,
|
|
3590
|
-
{ label: (0,
|
|
3591
|
-
{ label: (0,
|
|
3688
|
+
{ label: (0, import_i18n22.__)("Center center", "elementor"), value: "center center" },
|
|
3689
|
+
{ label: (0, import_i18n22.__)("Center left", "elementor"), value: "center left" },
|
|
3690
|
+
{ label: (0, import_i18n22.__)("Center right", "elementor"), value: "center right" },
|
|
3691
|
+
{ label: (0, import_i18n22.__)("Top center", "elementor"), value: "top center" },
|
|
3692
|
+
{ label: (0, import_i18n22.__)("Top left", "elementor"), value: "top left" },
|
|
3693
|
+
{ label: (0, import_i18n22.__)("Top right", "elementor"), value: "top right" },
|
|
3694
|
+
{ label: (0, import_i18n22.__)("Bottom center", "elementor"), value: "bottom center" },
|
|
3695
|
+
{ label: (0, import_i18n22.__)("Bottom left", "elementor"), value: "bottom left" },
|
|
3696
|
+
{ label: (0, import_i18n22.__)("Bottom right", "elementor"), value: "bottom right" }
|
|
3592
3697
|
];
|
|
3593
3698
|
var PositionControl = () => {
|
|
3594
3699
|
const positionContext = useBoundProp(import_editor_props30.positionPropTypeUtil);
|
|
3595
3700
|
const stringPropContext = useBoundProp(import_editor_props30.stringPropTypeUtil);
|
|
3596
|
-
const isVersion331Active = (0,
|
|
3701
|
+
const isVersion331Active = (0, import_editor_v1_adapters6.isExperimentActive)("e_v_3_31");
|
|
3597
3702
|
const isCustom = !!positionContext.value && isVersion331Active;
|
|
3598
3703
|
const availablePositionOptions = (0, import_react33.useMemo)(() => {
|
|
3599
3704
|
const options = [...positionOptions];
|
|
3600
3705
|
if (isVersion331Active) {
|
|
3601
|
-
options.push({ label: (0,
|
|
3706
|
+
options.push({ label: (0, import_i18n22.__)("Custom", "elementor"), value: "custom" });
|
|
3602
3707
|
}
|
|
3603
3708
|
return options;
|
|
3604
3709
|
}, [isVersion331Active]);
|
|
@@ -3610,7 +3715,7 @@ var PositionControl = () => {
|
|
|
3610
3715
|
stringPropContext.setValue(value);
|
|
3611
3716
|
}
|
|
3612
3717
|
};
|
|
3613
|
-
return /* @__PURE__ */ React54.createElement(import_ui48.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React54.createElement(import_ui48.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(import_ui48.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlFormLabel, null, (0,
|
|
3718
|
+
return /* @__PURE__ */ React54.createElement(import_ui48.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React54.createElement(import_ui48.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(import_ui48.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlFormLabel, null, (0, import_i18n22.__)("Object position", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui48.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React54.createElement(
|
|
3614
3719
|
import_ui48.Select,
|
|
3615
3720
|
{
|
|
3616
3721
|
size: "tiny",
|
|
@@ -3622,6 +3727,130 @@ var PositionControl = () => {
|
|
|
3622
3727
|
availablePositionOptions.map(({ label, value }) => /* @__PURE__ */ React54.createElement(import_editor_ui8.MenuListItem, { key: value, value: value ?? "" }, label))
|
|
3623
3728
|
)))), isCustom && /* @__PURE__ */ React54.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React54.createElement(import_ui48.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(import_ui48.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React54.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React54.createElement(SizeControl, { startIcon: /* @__PURE__ */ React54.createElement(import_icons18.LetterXIcon, { fontSize: "tiny" }) }))), /* @__PURE__ */ React54.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React54.createElement(SizeControl, { startIcon: /* @__PURE__ */ React54.createElement(import_icons18.LetterYIcon, { fontSize: "tiny" }) })))))));
|
|
3624
3729
|
};
|
|
3730
|
+
|
|
3731
|
+
// src/controls/transform-control/transform-repeater-control.tsx
|
|
3732
|
+
var React60 = __toESM(require("react"));
|
|
3733
|
+
var import_editor_props32 = require("@elementor/editor-props");
|
|
3734
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
3735
|
+
|
|
3736
|
+
// src/controls/transform-control/transform-content.tsx
|
|
3737
|
+
var React57 = __toESM(require("react"));
|
|
3738
|
+
var import_ui51 = require("@elementor/ui");
|
|
3739
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
3740
|
+
|
|
3741
|
+
// src/controls/transform-control/functions/move.tsx
|
|
3742
|
+
var React56 = __toESM(require("react"));
|
|
3743
|
+
var import_react34 = require("react");
|
|
3744
|
+
var import_editor_props31 = require("@elementor/editor-props");
|
|
3745
|
+
var import_icons19 = require("@elementor/icons");
|
|
3746
|
+
var import_ui50 = require("@elementor/ui");
|
|
3747
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
3748
|
+
|
|
3749
|
+
// src/controls/transform-control/functions/axis-row.tsx
|
|
3750
|
+
var React55 = __toESM(require("react"));
|
|
3751
|
+
var import_ui49 = require("@elementor/ui");
|
|
3752
|
+
var AxisRow = ({ label, bindValue, startIcon, anchorRef }) => {
|
|
3753
|
+
return /* @__PURE__ */ React55.createElement(import_ui49.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React55.createElement(import_ui49.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, label)), /* @__PURE__ */ React55.createElement(import_ui49.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(PropKeyProvider, { bind: bindValue }, /* @__PURE__ */ React55.createElement(SizeControl, { anchorRef, startIcon })))));
|
|
3754
|
+
};
|
|
3755
|
+
|
|
3756
|
+
// src/controls/transform-control/functions/move.tsx
|
|
3757
|
+
var moveAxisControls = [
|
|
3758
|
+
{
|
|
3759
|
+
label: (0, import_i18n23.__)("Move X", "elementor"),
|
|
3760
|
+
bindValue: "x",
|
|
3761
|
+
startIcon: /* @__PURE__ */ React56.createElement(import_icons19.ArrowRightIcon, { fontSize: "tiny" })
|
|
3762
|
+
},
|
|
3763
|
+
{
|
|
3764
|
+
label: (0, import_i18n23.__)("Move Y", "elementor"),
|
|
3765
|
+
bindValue: "y",
|
|
3766
|
+
startIcon: /* @__PURE__ */ React56.createElement(import_icons19.ArrowDownSmallIcon, { fontSize: "tiny" })
|
|
3767
|
+
},
|
|
3768
|
+
{
|
|
3769
|
+
label: (0, import_i18n23.__)("Move Z", "elementor"),
|
|
3770
|
+
bindValue: "z",
|
|
3771
|
+
startIcon: /* @__PURE__ */ React56.createElement(import_icons19.ArrowDownLeftIcon, { fontSize: "tiny" })
|
|
3772
|
+
}
|
|
3773
|
+
];
|
|
3774
|
+
var Move = () => {
|
|
3775
|
+
const context = useBoundProp(import_editor_props31.moveTransformPropTypeUtil);
|
|
3776
|
+
const rowRef = (0, import_react34.useRef)(null);
|
|
3777
|
+
return /* @__PURE__ */ React56.createElement(import_ui50.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React56.createElement(PropProvider, { ...context }, /* @__PURE__ */ React56.createElement(PropKeyProvider, { bind: "transform-move" }, moveAxisControls.map((control) => /* @__PURE__ */ React56.createElement(AxisRow, { key: control.bindValue, ...control, anchorRef: rowRef })))));
|
|
3778
|
+
};
|
|
3779
|
+
|
|
3780
|
+
// src/controls/transform-control/transform-content.tsx
|
|
3781
|
+
var TransformContent = ({ bind }) => {
|
|
3782
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui51.useTabs)("transform-move");
|
|
3783
|
+
return /* @__PURE__ */ React57.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React57.createElement(PopoverContent, null, /* @__PURE__ */ React57.createElement(import_ui51.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React57.createElement(import_ui51.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React57.createElement(
|
|
3784
|
+
import_ui51.Tabs,
|
|
3785
|
+
{
|
|
3786
|
+
size: "small",
|
|
3787
|
+
variant: "fullWidth",
|
|
3788
|
+
...getTabsProps(),
|
|
3789
|
+
"aria-label": (0, import_i18n24.__)("Transform", "elementor")
|
|
3790
|
+
},
|
|
3791
|
+
/* @__PURE__ */ React57.createElement(import_ui51.Tab, { label: (0, import_i18n24.__)("Move", "elementor"), ...getTabProps("transform-move") })
|
|
3792
|
+
)), /* @__PURE__ */ React57.createElement(import_ui51.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("transform-move") }, /* @__PURE__ */ React57.createElement(Move, null)))));
|
|
3793
|
+
};
|
|
3794
|
+
|
|
3795
|
+
// src/controls/transform-control/transform-icon.tsx
|
|
3796
|
+
var React58 = __toESM(require("react"));
|
|
3797
|
+
var import_icons20 = require("@elementor/icons");
|
|
3798
|
+
var TransformIcon = ({ value }) => {
|
|
3799
|
+
switch (value.$$type) {
|
|
3800
|
+
case "transform-move":
|
|
3801
|
+
return /* @__PURE__ */ React58.createElement(import_icons20.ArrowsMaximizeIcon, { fontSize: "tiny" });
|
|
3802
|
+
default:
|
|
3803
|
+
return null;
|
|
3804
|
+
}
|
|
3805
|
+
};
|
|
3806
|
+
|
|
3807
|
+
// src/controls/transform-control/transform-label.tsx
|
|
3808
|
+
var React59 = __toESM(require("react"));
|
|
3809
|
+
var import_ui52 = require("@elementor/ui");
|
|
3810
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
3811
|
+
var transformMoveValue = (value) => Object.values(value).map((axis) => `${axis?.value.size}${axis?.value.unit}`).join(", ");
|
|
3812
|
+
var TransformLabel = (props) => {
|
|
3813
|
+
const { $$type, value } = props.value;
|
|
3814
|
+
switch ($$type) {
|
|
3815
|
+
case "transform-move":
|
|
3816
|
+
return /* @__PURE__ */ React59.createElement(Label2, { label: (0, import_i18n25.__)("Move", "elementor"), value: transformMoveValue(value) });
|
|
3817
|
+
default:
|
|
3818
|
+
return "";
|
|
3819
|
+
}
|
|
3820
|
+
};
|
|
3821
|
+
var Label2 = ({ label, value }) => {
|
|
3822
|
+
return /* @__PURE__ */ React59.createElement(import_ui52.Box, { component: "span" }, label, ": ", value);
|
|
3823
|
+
};
|
|
3824
|
+
|
|
3825
|
+
// src/controls/transform-control/transform-repeater-control.tsx
|
|
3826
|
+
var initialTransformValue = {
|
|
3827
|
+
$$type: "transform-move",
|
|
3828
|
+
value: {
|
|
3829
|
+
x: { $$type: "size", value: { size: 0, unit: "px" } },
|
|
3830
|
+
y: { $$type: "size", value: { size: 0, unit: "px" } },
|
|
3831
|
+
z: { $$type: "size", value: { size: 0, unit: "px" } }
|
|
3832
|
+
}
|
|
3833
|
+
};
|
|
3834
|
+
var TransformRepeaterControl = createControl(() => {
|
|
3835
|
+
const { propType, value: transformValues, setValue, disabled } = useBoundProp(import_editor_props32.transformPropTypeUtil);
|
|
3836
|
+
return /* @__PURE__ */ React60.createElement(PropProvider, { propType, value: transformValues, setValue }, /* @__PURE__ */ React60.createElement(
|
|
3837
|
+
Repeater,
|
|
3838
|
+
{
|
|
3839
|
+
openOnAdd: true,
|
|
3840
|
+
disabled,
|
|
3841
|
+
values: transformValues ?? [],
|
|
3842
|
+
setValues: setValue,
|
|
3843
|
+
label: (0, import_i18n26.__)("Transform", "elementor"),
|
|
3844
|
+
showDuplicate: false,
|
|
3845
|
+
itemSettings: {
|
|
3846
|
+
Icon: TransformIcon,
|
|
3847
|
+
Label: TransformLabel,
|
|
3848
|
+
Content: TransformContent,
|
|
3849
|
+
initialValues: initialTransformValue
|
|
3850
|
+
}
|
|
3851
|
+
}
|
|
3852
|
+
));
|
|
3853
|
+
});
|
|
3625
3854
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3626
3855
|
0 && (module.exports = {
|
|
3627
3856
|
AspectRatioControl,
|
|
@@ -3657,6 +3886,7 @@ var PositionControl = () => {
|
|
|
3657
3886
|
TextAreaControl,
|
|
3658
3887
|
TextControl,
|
|
3659
3888
|
ToggleControl,
|
|
3889
|
+
TransformRepeaterControl,
|
|
3660
3890
|
UrlControl,
|
|
3661
3891
|
createControlReplacementsRegistry,
|
|
3662
3892
|
injectIntoRepeaterItemIcon,
|