@elementor/editor-controls 1.1.0 → 1.2.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 +31 -0
- package/dist/index.d.mts +20 -11
- package/dist/index.d.ts +20 -11
- package/dist/index.js +739 -565
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +548 -372
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/components/font-family-selector.tsx +30 -13
- package/src/components/popover-content.tsx +3 -11
- package/src/components/repeater.tsx +3 -1
- package/src/components/text-field-popover.tsx +3 -3
- package/src/controls/aspect-ratio-control.tsx +20 -2
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx +2 -2
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx +2 -2
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +9 -4
- package/src/controls/box-shadow-repeater-control.tsx +2 -2
- package/src/controls/equal-unequal-sizes-control.tsx +3 -9
- package/src/controls/filter-repeater-control.tsx +186 -0
- package/src/controls/font-family-control/font-family-control.tsx +6 -2
- package/src/controls/gap-control.tsx +3 -3
- package/src/controls/image-control.tsx +22 -35
- package/src/controls/key-value-control.tsx +39 -19
- package/src/controls/link-control.tsx +3 -1
- package/src/controls/linked-dimensions-control.tsx +3 -3
- package/src/controls/number-control.tsx +3 -3
- package/src/controls/repeatable-control.tsx +38 -8
- package/src/controls/size-control.tsx +3 -3
- package/src/controls/stroke-control.tsx +2 -2
- package/src/controls/svg-media-control.tsx +0 -2
- package/src/index.ts +3 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// src/controls/image-control.tsx
|
|
2
|
-
import * as
|
|
2
|
+
import * as React9 from "react";
|
|
3
3
|
import { imagePropTypeUtil } from "@elementor/editor-props";
|
|
4
|
-
import {
|
|
5
|
-
import { __ as __2 } from "@wordpress/i18n";
|
|
4
|
+
import { Stack as Stack2 } from "@elementor/ui";
|
|
6
5
|
|
|
7
6
|
// src/bound-prop-context/prop-context.tsx
|
|
8
7
|
import * as React from "react";
|
|
@@ -184,23 +183,16 @@ var resolveUnionPropType = (propType, key) => {
|
|
|
184
183
|
return resolvedPropType;
|
|
185
184
|
};
|
|
186
185
|
|
|
187
|
-
// src/components/control-form-label.tsx
|
|
188
|
-
import * as React3 from "react";
|
|
189
|
-
import { FormLabel } from "@elementor/ui";
|
|
190
|
-
var ControlFormLabel = (props) => {
|
|
191
|
-
return /* @__PURE__ */ React3.createElement(FormLabel, { size: "tiny", ...props });
|
|
192
|
-
};
|
|
193
|
-
|
|
194
186
|
// src/create-control.tsx
|
|
195
|
-
import * as
|
|
187
|
+
import * as React4 from "react";
|
|
196
188
|
import { ErrorBoundary } from "@elementor/ui";
|
|
197
189
|
|
|
198
190
|
// src/control-replacements.tsx
|
|
199
|
-
import * as
|
|
191
|
+
import * as React3 from "react";
|
|
200
192
|
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
201
193
|
var ControlReplacementContext = createContext3([]);
|
|
202
194
|
var ControlReplacementsProvider = ({ replacements, children }) => {
|
|
203
|
-
return /* @__PURE__ */
|
|
195
|
+
return /* @__PURE__ */ React3.createElement(ControlReplacementContext.Provider, { value: replacements }, children);
|
|
204
196
|
};
|
|
205
197
|
var useControlReplacement = (OriginalComponent) => {
|
|
206
198
|
const { value } = useBoundProp();
|
|
@@ -228,7 +220,7 @@ var brandSymbol = Symbol("control");
|
|
|
228
220
|
function createControl(Control5) {
|
|
229
221
|
return (props) => {
|
|
230
222
|
const Component = useControlReplacement(Control5);
|
|
231
|
-
return /* @__PURE__ */
|
|
223
|
+
return /* @__PURE__ */ React4.createElement(ErrorBoundary, { fallback: null }, /* @__PURE__ */ React4.createElement(Component, { ...props }));
|
|
232
224
|
};
|
|
233
225
|
}
|
|
234
226
|
|
|
@@ -272,7 +264,7 @@ var formatResponse = (response) => {
|
|
|
272
264
|
};
|
|
273
265
|
|
|
274
266
|
// src/controls/image-media-control.tsx
|
|
275
|
-
import * as
|
|
267
|
+
import * as React7 from "react";
|
|
276
268
|
import { imageSrcPropTypeUtil } from "@elementor/editor-props";
|
|
277
269
|
import { UploadIcon } from "@elementor/icons";
|
|
278
270
|
import { Button, Card, CardMedia, CardOverlay, CircularProgress, Stack } from "@elementor/ui";
|
|
@@ -280,14 +272,14 @@ import { useWpMediaAttachment, useWpMediaFrame } from "@elementor/wp-media";
|
|
|
280
272
|
import { __ } from "@wordpress/i18n";
|
|
281
273
|
|
|
282
274
|
// src/control-actions/control-actions.tsx
|
|
283
|
-
import * as
|
|
275
|
+
import * as React6 from "react";
|
|
284
276
|
import { styled, UnstableFloatingActionBar } from "@elementor/ui";
|
|
285
277
|
|
|
286
278
|
// src/control-actions/control-actions-context.tsx
|
|
287
|
-
import * as
|
|
279
|
+
import * as React5 from "react";
|
|
288
280
|
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
289
281
|
var Context = createContext4(null);
|
|
290
|
-
var ControlActionsProvider = ({ children, items }) => /* @__PURE__ */
|
|
282
|
+
var ControlActionsProvider = ({ children, items }) => /* @__PURE__ */ React5.createElement(Context.Provider, { value: { items } }, children);
|
|
291
283
|
var useControlActions = () => {
|
|
292
284
|
const context = useContext4(Context);
|
|
293
285
|
if (!context) {
|
|
@@ -314,8 +306,8 @@ function ControlActions({ children }) {
|
|
|
314
306
|
if (items.length === 0 || disabled) {
|
|
315
307
|
return children;
|
|
316
308
|
}
|
|
317
|
-
const menuItems = items.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */
|
|
318
|
-
return /* @__PURE__ */
|
|
309
|
+
const menuItems = items.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React6.createElement(MenuItem2, { key: id }));
|
|
310
|
+
return /* @__PURE__ */ React6.createElement(FloatingBarContainer, null, /* @__PURE__ */ React6.createElement(UnstableFloatingActionBar, { actions: menuItems }, children));
|
|
319
311
|
}
|
|
320
312
|
|
|
321
313
|
// src/controls/image-media-control.tsx
|
|
@@ -338,7 +330,7 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
338
330
|
});
|
|
339
331
|
}
|
|
340
332
|
});
|
|
341
|
-
return /* @__PURE__ */
|
|
333
|
+
return /* @__PURE__ */ React7.createElement(ControlActions, null, /* @__PURE__ */ React7.createElement(Card, { variant: "outlined" }, /* @__PURE__ */ React7.createElement(CardMedia, { image: src, sx: { height: 150 } }, isFetching ? /* @__PURE__ */ React7.createElement(Stack, { justifyContent: "center", alignItems: "center", width: "100%", height: "100%" }, /* @__PURE__ */ React7.createElement(CircularProgress, null)) : /* @__PURE__ */ React7.createElement(React7.Fragment, null)), /* @__PURE__ */ React7.createElement(CardOverlay, null, /* @__PURE__ */ React7.createElement(Stack, { gap: 1 }, /* @__PURE__ */ React7.createElement(
|
|
342
334
|
Button,
|
|
343
335
|
{
|
|
344
336
|
size: "tiny",
|
|
@@ -347,13 +339,13 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
347
339
|
onClick: () => open({ mode: "browse" })
|
|
348
340
|
},
|
|
349
341
|
__("Select image", "elementor")
|
|
350
|
-
), /* @__PURE__ */
|
|
342
|
+
), /* @__PURE__ */ React7.createElement(
|
|
351
343
|
Button,
|
|
352
344
|
{
|
|
353
345
|
size: "tiny",
|
|
354
346
|
variant: "text",
|
|
355
347
|
color: "inherit",
|
|
356
|
-
startIcon: /* @__PURE__ */
|
|
348
|
+
startIcon: /* @__PURE__ */ React7.createElement(UploadIcon, null),
|
|
357
349
|
onClick: () => open({ mode: "upload" })
|
|
358
350
|
},
|
|
359
351
|
__("Upload", "elementor")
|
|
@@ -361,7 +353,7 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
361
353
|
});
|
|
362
354
|
|
|
363
355
|
// src/controls/select-control.tsx
|
|
364
|
-
import * as
|
|
356
|
+
import * as React8 from "react";
|
|
365
357
|
import { stringPropTypeUtil } from "@elementor/editor-props";
|
|
366
358
|
import { MenuListItem } from "@elementor/editor-ui";
|
|
367
359
|
import { Select } from "@elementor/ui";
|
|
@@ -372,7 +364,7 @@ var SelectControl = createControl(({ options, onChange }) => {
|
|
|
372
364
|
onChange?.(newValue, value);
|
|
373
365
|
setValue(newValue);
|
|
374
366
|
};
|
|
375
|
-
return /* @__PURE__ */
|
|
367
|
+
return /* @__PURE__ */ React8.createElement(ControlActions, null, /* @__PURE__ */ React8.createElement(
|
|
376
368
|
Select,
|
|
377
369
|
{
|
|
378
370
|
sx: { overflow: "hidden" },
|
|
@@ -383,28 +375,26 @@ var SelectControl = createControl(({ options, onChange }) => {
|
|
|
383
375
|
disabled,
|
|
384
376
|
fullWidth: true
|
|
385
377
|
},
|
|
386
|
-
options.map(({ label, ...props }) => /* @__PURE__ */
|
|
378
|
+
options.map(({ label, ...props }) => /* @__PURE__ */ React8.createElement(MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, label))
|
|
387
379
|
));
|
|
388
380
|
});
|
|
389
381
|
|
|
390
382
|
// src/controls/image-control.tsx
|
|
391
|
-
var ImageControl = createControl(
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
);
|
|
383
|
+
var ImageControl = createControl(({ sizes, showMode = "all" }) => {
|
|
384
|
+
const propContext = useBoundProp(imagePropTypeUtil);
|
|
385
|
+
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
386
|
+
const mediaTypes = allowSvgUpload ? ["image", "svg"] : ["image"];
|
|
387
|
+
return /* @__PURE__ */ React9.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React9.createElement(Stack2, { gap: 1.5 }, ["all", "media"].includes(showMode) ? /* @__PURE__ */ React9.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React9.createElement(ImageMediaControl, { mediaTypes })) : null, ["all", "sizes"].includes(showMode) ? /* @__PURE__ */ React9.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React9.createElement(SelectControl, { options: sizes })) : null));
|
|
388
|
+
});
|
|
399
389
|
|
|
400
390
|
// src/controls/text-control.tsx
|
|
401
|
-
import * as
|
|
391
|
+
import * as React10 from "react";
|
|
402
392
|
import { stringPropTypeUtil as stringPropTypeUtil2 } from "@elementor/editor-props";
|
|
403
393
|
import { TextField } from "@elementor/ui";
|
|
404
394
|
var TextControl = createControl(({ placeholder }) => {
|
|
405
395
|
const { value, setValue, disabled } = useBoundProp(stringPropTypeUtil2);
|
|
406
396
|
const handleChange = (event) => setValue(event.target.value);
|
|
407
|
-
return /* @__PURE__ */
|
|
397
|
+
return /* @__PURE__ */ React10.createElement(ControlActions, null, /* @__PURE__ */ React10.createElement(
|
|
408
398
|
TextField,
|
|
409
399
|
{
|
|
410
400
|
size: "tiny",
|
|
@@ -418,7 +408,7 @@ var TextControl = createControl(({ placeholder }) => {
|
|
|
418
408
|
});
|
|
419
409
|
|
|
420
410
|
// src/controls/text-area-control.tsx
|
|
421
|
-
import * as
|
|
411
|
+
import * as React11 from "react";
|
|
422
412
|
import { stringPropTypeUtil as stringPropTypeUtil3 } from "@elementor/editor-props";
|
|
423
413
|
import { TextField as TextField2 } from "@elementor/ui";
|
|
424
414
|
var TextAreaControl = createControl(({ placeholder }) => {
|
|
@@ -426,7 +416,7 @@ var TextAreaControl = createControl(({ placeholder }) => {
|
|
|
426
416
|
const handleChange = (event) => {
|
|
427
417
|
setValue(event.target.value);
|
|
428
418
|
};
|
|
429
|
-
return /* @__PURE__ */
|
|
419
|
+
return /* @__PURE__ */ React11.createElement(ControlActions, null, /* @__PURE__ */ React11.createElement(
|
|
430
420
|
TextField2,
|
|
431
421
|
{
|
|
432
422
|
size: "tiny",
|
|
@@ -442,14 +432,14 @@ var TextAreaControl = createControl(({ placeholder }) => {
|
|
|
442
432
|
});
|
|
443
433
|
|
|
444
434
|
// src/controls/size-control.tsx
|
|
445
|
-
import * as
|
|
435
|
+
import * as React15 from "react";
|
|
446
436
|
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
447
437
|
import { sizePropTypeUtil } from "@elementor/editor-props";
|
|
448
438
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
449
439
|
import { usePopupState as usePopupState2 } from "@elementor/ui";
|
|
450
440
|
|
|
451
441
|
// src/components/size-control/size-input.tsx
|
|
452
|
-
import * as
|
|
442
|
+
import * as React13 from "react";
|
|
453
443
|
import { useRef } from "react";
|
|
454
444
|
import { PencilIcon } from "@elementor/icons";
|
|
455
445
|
import { Box, InputAdornment as InputAdornment2 } from "@elementor/ui";
|
|
@@ -462,7 +452,7 @@ function isUnitExtendedOption(unit) {
|
|
|
462
452
|
}
|
|
463
453
|
|
|
464
454
|
// src/components/size-control/text-field-inner-selection.tsx
|
|
465
|
-
import * as
|
|
455
|
+
import * as React12 from "react";
|
|
466
456
|
import { forwardRef, useId } from "react";
|
|
467
457
|
import { MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
|
|
468
458
|
import {
|
|
@@ -487,7 +477,7 @@ var TextFieldInnerSelection = forwardRef(
|
|
|
487
477
|
inputProps,
|
|
488
478
|
disabled
|
|
489
479
|
}, ref) => {
|
|
490
|
-
return /* @__PURE__ */
|
|
480
|
+
return /* @__PURE__ */ React12.createElement(
|
|
491
481
|
TextField3,
|
|
492
482
|
{
|
|
493
483
|
ref,
|
|
@@ -523,7 +513,7 @@ var SelectionEndAdornment = ({
|
|
|
523
513
|
onClick(options[index]);
|
|
524
514
|
popupState.close();
|
|
525
515
|
};
|
|
526
|
-
return /* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ React12.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React12.createElement(
|
|
527
517
|
Button2,
|
|
528
518
|
{
|
|
529
519
|
size: "small",
|
|
@@ -533,7 +523,7 @@ var SelectionEndAdornment = ({
|
|
|
533
523
|
...bindTrigger(popupState)
|
|
534
524
|
},
|
|
535
525
|
alternativeOptionLabels[value] ?? value
|
|
536
|
-
), /* @__PURE__ */
|
|
526
|
+
), /* @__PURE__ */ React12.createElement(Menu, { MenuListProps: { dense: true }, ...bindMenu(popupState) }, options.map((option, index) => /* @__PURE__ */ React12.createElement(
|
|
537
527
|
MenuListItem2,
|
|
538
528
|
{
|
|
539
529
|
key: option,
|
|
@@ -586,8 +576,8 @@ var SizeInput = ({
|
|
|
586
576
|
autoComplete: "off",
|
|
587
577
|
onClick,
|
|
588
578
|
onFocus,
|
|
589
|
-
startAdornment: startIcon ? /* @__PURE__ */
|
|
590
|
-
endAdornment: /* @__PURE__ */
|
|
579
|
+
startAdornment: startIcon ? /* @__PURE__ */ React13.createElement(InputAdornment2, { position: "start", disabled }, startIcon) : void 0,
|
|
580
|
+
endAdornment: /* @__PURE__ */ React13.createElement(
|
|
591
581
|
SelectionEndAdornment,
|
|
592
582
|
{
|
|
593
583
|
disabled,
|
|
@@ -595,7 +585,7 @@ var SizeInput = ({
|
|
|
595
585
|
onClick: handleUnitChange,
|
|
596
586
|
value: unit,
|
|
597
587
|
alternativeOptionLabels: {
|
|
598
|
-
custom: /* @__PURE__ */
|
|
588
|
+
custom: /* @__PURE__ */ React13.createElement(PencilIcon, { fontSize: "small" })
|
|
599
589
|
},
|
|
600
590
|
menuItemsAttributes: units2.includes("custom") ? {
|
|
601
591
|
custom: popupAttributes
|
|
@@ -603,7 +593,7 @@ var SizeInput = ({
|
|
|
603
593
|
}
|
|
604
594
|
)
|
|
605
595
|
};
|
|
606
|
-
return /* @__PURE__ */
|
|
596
|
+
return /* @__PURE__ */ React13.createElement(ControlActions, null, /* @__PURE__ */ React13.createElement(Box, null, /* @__PURE__ */ React13.createElement(
|
|
607
597
|
TextFieldInnerSelection,
|
|
608
598
|
{
|
|
609
599
|
disabled,
|
|
@@ -625,11 +615,11 @@ var SizeInput = ({
|
|
|
625
615
|
};
|
|
626
616
|
|
|
627
617
|
// src/components/text-field-popover.tsx
|
|
628
|
-
import * as
|
|
618
|
+
import * as React14 from "react";
|
|
629
619
|
import { bindPopover, Paper, Popover, TextField as TextField4 } from "@elementor/ui";
|
|
630
620
|
var TextFieldPopover = (props) => {
|
|
631
621
|
const { popupState, restoreValue, anchorRef, value, onChange } = props;
|
|
632
|
-
return /* @__PURE__ */
|
|
622
|
+
return /* @__PURE__ */ React14.createElement(
|
|
633
623
|
Popover,
|
|
634
624
|
{
|
|
635
625
|
disablePortal: true,
|
|
@@ -641,16 +631,16 @@ var TextFieldPopover = (props) => {
|
|
|
641
631
|
popupState.close();
|
|
642
632
|
}
|
|
643
633
|
},
|
|
644
|
-
/* @__PURE__ */
|
|
634
|
+
/* @__PURE__ */ React14.createElement(
|
|
645
635
|
Paper,
|
|
646
636
|
{
|
|
647
637
|
sx: {
|
|
648
|
-
width: anchorRef.current
|
|
638
|
+
width: anchorRef.current?.offsetWidth + "px",
|
|
649
639
|
borderRadius: 2,
|
|
650
640
|
p: 1.5
|
|
651
641
|
}
|
|
652
642
|
},
|
|
653
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ React14.createElement(
|
|
654
644
|
TextField4,
|
|
655
645
|
{
|
|
656
646
|
value,
|
|
@@ -795,7 +785,7 @@ var SizeControl = createControl((props) => {
|
|
|
795
785
|
setState(newState);
|
|
796
786
|
}
|
|
797
787
|
}, [activeBreakpoint]);
|
|
798
|
-
return /* @__PURE__ */
|
|
788
|
+
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
|
|
799
789
|
SizeInput,
|
|
800
790
|
{
|
|
801
791
|
disabled,
|
|
@@ -811,7 +801,7 @@ var SizeControl = createControl((props) => {
|
|
|
811
801
|
onClick: onInputClick,
|
|
812
802
|
popupState
|
|
813
803
|
}
|
|
814
|
-
), anchorRef?.current && /* @__PURE__ */
|
|
804
|
+
), anchorRef?.current && /* @__PURE__ */ React15.createElement(
|
|
815
805
|
TextFieldPopover,
|
|
816
806
|
{
|
|
817
807
|
popupState,
|
|
@@ -867,8 +857,15 @@ function areStatesEqual(state1, state2) {
|
|
|
867
857
|
import * as React19 from "react";
|
|
868
858
|
import { forwardRef as forwardRef2, useRef as useRef2 } from "react";
|
|
869
859
|
import { strokePropTypeUtil } from "@elementor/editor-props";
|
|
870
|
-
import { Grid
|
|
871
|
-
import { __ as
|
|
860
|
+
import { Grid } from "@elementor/ui";
|
|
861
|
+
import { __ as __2 } from "@wordpress/i18n";
|
|
862
|
+
|
|
863
|
+
// src/components/control-form-label.tsx
|
|
864
|
+
import * as React16 from "react";
|
|
865
|
+
import { FormLabel } from "@elementor/ui";
|
|
866
|
+
var ControlFormLabel = (props) => {
|
|
867
|
+
return /* @__PURE__ */ React16.createElement(FormLabel, { size: "tiny", ...props });
|
|
868
|
+
};
|
|
872
869
|
|
|
873
870
|
// src/components/section-content.tsx
|
|
874
871
|
import * as React17 from "react";
|
|
@@ -917,29 +914,29 @@ var ColorControl = createControl(
|
|
|
917
914
|
var units = ["px", "em", "rem"];
|
|
918
915
|
var StrokeControl = createControl(() => {
|
|
919
916
|
const propContext = useBoundProp(strokePropTypeUtil);
|
|
920
|
-
const rowRef = useRef2();
|
|
921
|
-
return /* @__PURE__ */ React19.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React19.createElement(SectionContent, null, /* @__PURE__ */ React19.createElement(Control, { bind: "width", label:
|
|
917
|
+
const rowRef = useRef2(null);
|
|
918
|
+
return /* @__PURE__ */ React19.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React19.createElement(SectionContent, null, /* @__PURE__ */ React19.createElement(Control, { bind: "width", label: __2("Stroke width", "elementor"), ref: rowRef }, /* @__PURE__ */ React19.createElement(SizeControl, { units, anchorRef: rowRef })), /* @__PURE__ */ React19.createElement(Control, { bind: "color", label: __2("Stroke color", "elementor") }, /* @__PURE__ */ React19.createElement(ColorControl, null))));
|
|
922
919
|
});
|
|
923
|
-
var Control = forwardRef2(({ bind, label, children }, ref) => /* @__PURE__ */ React19.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React19.createElement(
|
|
920
|
+
var Control = forwardRef2(({ bind, label, children }, ref) => /* @__PURE__ */ React19.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React19.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React19.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React19.createElement(Grid, { item: true, xs: 6 }, children))));
|
|
924
921
|
|
|
925
922
|
// src/controls/box-shadow-repeater-control.tsx
|
|
926
923
|
import * as React26 from "react";
|
|
927
924
|
import { useRef as useRef3 } from "react";
|
|
928
925
|
import { boxShadowPropTypeUtil, shadowPropTypeUtil } from "@elementor/editor-props";
|
|
929
|
-
import { FormLabel as FormLabel2, Grid as
|
|
930
|
-
import { __ as
|
|
926
|
+
import { FormLabel as FormLabel2, Grid as Grid3, UnstableColorIndicator } from "@elementor/ui";
|
|
927
|
+
import { __ as __4 } from "@wordpress/i18n";
|
|
931
928
|
|
|
932
929
|
// src/components/popover-content.tsx
|
|
933
930
|
import * as React20 from "react";
|
|
934
931
|
import { Stack as Stack4 } from "@elementor/ui";
|
|
935
|
-
var PopoverContent = ({
|
|
932
|
+
var PopoverContent = ({ gap = 1.5, children, ...props }) => /* @__PURE__ */ React20.createElement(Stack4, { ...props, gap }, children);
|
|
936
933
|
|
|
937
934
|
// src/components/popover-grid-container.tsx
|
|
938
935
|
import { forwardRef as forwardRef3 } from "react";
|
|
939
936
|
import * as React21 from "react";
|
|
940
|
-
import { Grid as
|
|
937
|
+
import { Grid as Grid2 } from "@elementor/ui";
|
|
941
938
|
var PopoverGridContainer = forwardRef3(
|
|
942
|
-
({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */ React21.createElement(
|
|
939
|
+
({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */ React21.createElement(Grid2, { container: true, gap, alignItems, flexWrap, ref }, children)
|
|
943
940
|
);
|
|
944
941
|
|
|
945
942
|
// src/components/repeater.tsx
|
|
@@ -958,7 +955,7 @@ import {
|
|
|
958
955
|
UnstableTag,
|
|
959
956
|
usePopupState as usePopupState3
|
|
960
957
|
} from "@elementor/ui";
|
|
961
|
-
import { __ as
|
|
958
|
+
import { __ as __3 } from "@wordpress/i18n";
|
|
962
959
|
|
|
963
960
|
// src/control-adornments/control-adornments.tsx
|
|
964
961
|
import * as React23 from "react";
|
|
@@ -1079,7 +1076,8 @@ var Repeater = ({
|
|
|
1079
1076
|
values: repeaterValues = [],
|
|
1080
1077
|
setValues: setRepeaterValues,
|
|
1081
1078
|
showDuplicate = true,
|
|
1082
|
-
showToggle = true
|
|
1079
|
+
showToggle = true,
|
|
1080
|
+
isSortable = true
|
|
1083
1081
|
}) => {
|
|
1084
1082
|
const [openItem, setOpenItem] = useState4(EMPTY_OPEN_ITEM);
|
|
1085
1083
|
const [items, setItems] = useSyncExternalState({
|
|
@@ -1163,7 +1161,7 @@ var Repeater = ({
|
|
|
1163
1161
|
sx: { ml: "auto" },
|
|
1164
1162
|
disabled,
|
|
1165
1163
|
onClick: addRepeaterItem,
|
|
1166
|
-
"aria-label":
|
|
1164
|
+
"aria-label": __3("Add item", "elementor")
|
|
1167
1165
|
},
|
|
1168
1166
|
/* @__PURE__ */ React25.createElement(PlusIcon, { fontSize: SIZE })
|
|
1169
1167
|
)
|
|
@@ -1172,7 +1170,7 @@ var Repeater = ({
|
|
|
1172
1170
|
if (!value) {
|
|
1173
1171
|
return null;
|
|
1174
1172
|
}
|
|
1175
|
-
return /* @__PURE__ */ React25.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled }, /* @__PURE__ */ React25.createElement(
|
|
1173
|
+
return /* @__PURE__ */ React25.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React25.createElement(
|
|
1176
1174
|
RepeaterItem,
|
|
1177
1175
|
{
|
|
1178
1176
|
disabled,
|
|
@@ -1207,9 +1205,9 @@ var RepeaterItem = ({
|
|
|
1207
1205
|
}) => {
|
|
1208
1206
|
const [anchorEl, setAnchorEl] = useState4(null);
|
|
1209
1207
|
const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount, onOpen);
|
|
1210
|
-
const duplicateLabel =
|
|
1211
|
-
const toggleLabel = propDisabled ?
|
|
1212
|
-
const removeLabel =
|
|
1208
|
+
const duplicateLabel = __3("Duplicate", "elementor");
|
|
1209
|
+
const toggleLabel = propDisabled ? __3("Show", "elementor") : __3("Hide", "elementor");
|
|
1210
|
+
const removeLabel = __3("Remove", "elementor");
|
|
1213
1211
|
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
|
|
1214
1212
|
UnstableTag,
|
|
1215
1213
|
{
|
|
@@ -1219,7 +1217,7 @@ var RepeaterItem = ({
|
|
|
1219
1217
|
fullWidth: true,
|
|
1220
1218
|
ref: setRef,
|
|
1221
1219
|
variant: "outlined",
|
|
1222
|
-
"aria-label":
|
|
1220
|
+
"aria-label": __3("Open item", "elementor"),
|
|
1223
1221
|
...bindTrigger2(popoverState),
|
|
1224
1222
|
startIcon,
|
|
1225
1223
|
actions: /* @__PURE__ */ React25.createElement(React25.Fragment, null, showDuplicate && /* @__PURE__ */ React25.createElement(Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(IconButton, { size: SIZE, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React25.createElement(CopyIcon, { fontSize: SIZE }))), showToggle && /* @__PURE__ */ React25.createElement(Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(IconButton, { size: SIZE, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React25.createElement(EyeOffIcon, { fontSize: SIZE }) : /* @__PURE__ */ React25.createElement(EyeIcon, { fontSize: SIZE }))), /* @__PURE__ */ React25.createElement(Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React25.createElement(IconButton, { size: SIZE, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React25.createElement(XIcon, { fontSize: SIZE }))))
|
|
@@ -1269,7 +1267,7 @@ var BoxShadowRepeaterControl = createControl(() => {
|
|
|
1269
1267
|
disabled,
|
|
1270
1268
|
values: value ?? [],
|
|
1271
1269
|
setValues: setValue,
|
|
1272
|
-
label:
|
|
1270
|
+
label: __4("Box shadow", "elementor"),
|
|
1273
1271
|
itemSettings: {
|
|
1274
1272
|
Icon: ItemIcon,
|
|
1275
1273
|
Label: ItemLabel,
|
|
@@ -1285,23 +1283,23 @@ var ItemContent = ({ anchorEl, bind }) => {
|
|
|
1285
1283
|
};
|
|
1286
1284
|
var Content = ({ anchorEl }) => {
|
|
1287
1285
|
const context = useBoundProp(shadowPropTypeUtil);
|
|
1288
|
-
const rowRef = [useRef3(), useRef3()];
|
|
1289
|
-
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:
|
|
1286
|
+
const rowRef = [useRef3(null), useRef3(null)];
|
|
1287
|
+
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: __4("Color", "elementor") }, /* @__PURE__ */ React26.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React26.createElement(Control2, { bind: "position", label: __4("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React26.createElement(
|
|
1290
1288
|
SelectControl,
|
|
1291
1289
|
{
|
|
1292
1290
|
options: [
|
|
1293
|
-
{ label:
|
|
1294
|
-
{ label:
|
|
1291
|
+
{ label: __4("Inset", "elementor"), value: "inset" },
|
|
1292
|
+
{ label: __4("Outset", "elementor"), value: null }
|
|
1295
1293
|
]
|
|
1296
1294
|
}
|
|
1297
|
-
))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "hOffset", label:
|
|
1295
|
+
))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "hOffset", label: __4("Horizontal", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[0] })), /* @__PURE__ */ React26.createElement(Control2, { bind: "vOffset", label: __4("Vertical", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[0] }))), /* @__PURE__ */ React26.createElement(PopoverGridContainer, { ref: rowRef[1] }, /* @__PURE__ */ React26.createElement(Control2, { bind: "blur", label: __4("Blur", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[1] })), /* @__PURE__ */ React26.createElement(Control2, { bind: "spread", label: __4("Spread", "elementor") }, /* @__PURE__ */ React26.createElement(SizeControl, { anchorRef: rowRef[1] })))));
|
|
1298
1296
|
};
|
|
1299
1297
|
var Control2 = ({
|
|
1300
1298
|
label,
|
|
1301
1299
|
bind,
|
|
1302
1300
|
children,
|
|
1303
1301
|
sx
|
|
1304
|
-
}) => /* @__PURE__ */ React26.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React26.createElement(
|
|
1302
|
+
}) => /* @__PURE__ */ React26.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React26.createElement(Grid3, { item: true, xs: 6, sx }, /* @__PURE__ */ React26.createElement(Grid3, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React26.createElement(Grid3, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(FormLabel2, { size: "tiny" }, label)), /* @__PURE__ */ React26.createElement(Grid3, { item: true, xs: 12 }, children))));
|
|
1305
1303
|
var ItemLabel = ({ value }) => {
|
|
1306
1304
|
const { position, hOffset, vOffset, blur, spread } = value.value;
|
|
1307
1305
|
const { size: blurSize = "", unit: blurUnit = "" } = blur?.value || {};
|
|
@@ -1344,13 +1342,126 @@ var initialShadow = {
|
|
|
1344
1342
|
}
|
|
1345
1343
|
};
|
|
1346
1344
|
|
|
1345
|
+
// src/controls/filter-repeater-control.tsx
|
|
1346
|
+
import * as React28 from "react";
|
|
1347
|
+
import { useRef as useRef4 } from "react";
|
|
1348
|
+
import {
|
|
1349
|
+
blurFilterPropTypeUtil,
|
|
1350
|
+
brightnessFilterPropTypeUtil,
|
|
1351
|
+
filterPropTypeUtil
|
|
1352
|
+
} from "@elementor/editor-props";
|
|
1353
|
+
import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
|
|
1354
|
+
import { Box as Box3, Grid as Grid4, Select as Select2 } from "@elementor/ui";
|
|
1355
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
1356
|
+
|
|
1357
|
+
// src/components/control-label.tsx
|
|
1358
|
+
import * as React27 from "react";
|
|
1359
|
+
import { Stack as Stack6 } from "@elementor/ui";
|
|
1360
|
+
var ControlLabel = ({ children }) => {
|
|
1361
|
+
return /* @__PURE__ */ React27.createElement(Stack6, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React27.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React27.createElement(ControlAdornments, null));
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
// src/controls/filter-repeater-control.tsx
|
|
1365
|
+
var DEFAULT_FILTER_KEY = "blur";
|
|
1366
|
+
var filterConfig = {
|
|
1367
|
+
blur: {
|
|
1368
|
+
defaultValue: { $$type: "radius", radius: { $$type: "size", value: { size: 0, unit: "px" } } },
|
|
1369
|
+
name: __5("Blur", "elementor"),
|
|
1370
|
+
valueName: __5("Radius", "elementor"),
|
|
1371
|
+
propType: blurFilterPropTypeUtil,
|
|
1372
|
+
units: defaultUnits.filter((unit) => unit !== "%")
|
|
1373
|
+
},
|
|
1374
|
+
brightness: {
|
|
1375
|
+
defaultValue: { $$type: "amount", amount: { $$type: "size", value: { size: 100, unit: "%" } } },
|
|
1376
|
+
name: __5("Brightness", "elementor"),
|
|
1377
|
+
valueName: __5("Amount", "elementor"),
|
|
1378
|
+
propType: brightnessFilterPropTypeUtil,
|
|
1379
|
+
units: ["%"]
|
|
1380
|
+
}
|
|
1381
|
+
};
|
|
1382
|
+
var filterKeys = Object.keys(filterConfig);
|
|
1383
|
+
var singleSizeFilterNames = filterKeys.filter((name) => {
|
|
1384
|
+
const filter = filterConfig[name].defaultValue;
|
|
1385
|
+
return filter[filter.$$type].$$type === "size";
|
|
1386
|
+
});
|
|
1387
|
+
var FilterRepeaterControl = createControl(() => {
|
|
1388
|
+
const { propType, value: filterValues, setValue, disabled } = useBoundProp(filterPropTypeUtil);
|
|
1389
|
+
return /* @__PURE__ */ React28.createElement(PropProvider, { propType, value: filterValues, setValue }, /* @__PURE__ */ React28.createElement(
|
|
1390
|
+
Repeater,
|
|
1391
|
+
{
|
|
1392
|
+
openOnAdd: true,
|
|
1393
|
+
disabled,
|
|
1394
|
+
values: filterValues ?? [],
|
|
1395
|
+
setValues: setValue,
|
|
1396
|
+
label: __5("Filter", "elementor"),
|
|
1397
|
+
itemSettings: {
|
|
1398
|
+
Icon: ItemIcon2,
|
|
1399
|
+
Label: ItemLabel2,
|
|
1400
|
+
Content: ItemContent2,
|
|
1401
|
+
initialValues: {
|
|
1402
|
+
$$type: DEFAULT_FILTER_KEY,
|
|
1403
|
+
value: filterConfig[DEFAULT_FILTER_KEY].defaultValue
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
));
|
|
1408
|
+
});
|
|
1409
|
+
var ItemIcon2 = () => /* @__PURE__ */ React28.createElement(React28.Fragment, null);
|
|
1410
|
+
var ItemLabel2 = (props) => {
|
|
1411
|
+
const { $$type } = props.value;
|
|
1412
|
+
return singleSizeFilterNames.includes($$type) && /* @__PURE__ */ React28.createElement(SingleSizeItemLabel, { value: props.value });
|
|
1413
|
+
};
|
|
1414
|
+
var SingleSizeItemLabel = ({ value }) => {
|
|
1415
|
+
const { $$type, value: sizeValue } = value;
|
|
1416
|
+
const { $$type: key } = filterConfig[$$type].defaultValue;
|
|
1417
|
+
const defaultUnit = filterConfig[$$type].defaultValue[key].value.unit;
|
|
1418
|
+
const { unit, size } = sizeValue[key]?.value ?? { unit: defaultUnit, size: 0 };
|
|
1419
|
+
const label = /* @__PURE__ */ React28.createElement(Box3, { component: "span", style: { textTransform: "capitalize" } }, value.$$type, ":");
|
|
1420
|
+
return /* @__PURE__ */ React28.createElement(Box3, { component: "span" }, label, unit !== "custom" ? ` ${size ?? 0}${unit ?? defaultUnit}` : size);
|
|
1421
|
+
};
|
|
1422
|
+
var ItemContent2 = ({ bind }) => {
|
|
1423
|
+
const { value: filterValues, setValue } = useBoundProp(filterPropTypeUtil);
|
|
1424
|
+
const itemIndex = parseInt(bind, 10);
|
|
1425
|
+
const item = filterValues?.[itemIndex];
|
|
1426
|
+
const handleChange = (e) => {
|
|
1427
|
+
const newFilterValues = [...filterValues];
|
|
1428
|
+
const filterType = e.target.value;
|
|
1429
|
+
newFilterValues[itemIndex] = {
|
|
1430
|
+
$$type: filterType,
|
|
1431
|
+
value: filterConfig[filterType].defaultValue
|
|
1432
|
+
};
|
|
1433
|
+
setValue(newFilterValues);
|
|
1434
|
+
};
|
|
1435
|
+
return /* @__PURE__ */ React28.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React28.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React28.createElement(PopoverGridContainer, null, /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel, null, __5("Filter", "elementor"))), /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(
|
|
1436
|
+
Select2,
|
|
1437
|
+
{
|
|
1438
|
+
sx: { overflow: "hidden" },
|
|
1439
|
+
size: "tiny",
|
|
1440
|
+
value: item?.$$type ?? DEFAULT_FILTER_KEY,
|
|
1441
|
+
onChange: handleChange,
|
|
1442
|
+
fullWidth: true
|
|
1443
|
+
},
|
|
1444
|
+
filterKeys.map((filterKey) => /* @__PURE__ */ React28.createElement(MenuListItem3, { key: filterKey, value: filterKey }, filterConfig[filterKey].name))
|
|
1445
|
+
))), /* @__PURE__ */ React28.createElement(Content2, { filterType: item?.$$type })));
|
|
1446
|
+
};
|
|
1447
|
+
var Content2 = ({ filterType }) => {
|
|
1448
|
+
return singleSizeFilterNames.includes(filterType) && /* @__PURE__ */ React28.createElement(SingleSizeItemContent, { filterType });
|
|
1449
|
+
};
|
|
1450
|
+
var SingleSizeItemContent = ({ filterType }) => {
|
|
1451
|
+
const { propType, valueName, defaultValue, units: units2 } = filterConfig[filterType];
|
|
1452
|
+
const { $$type } = defaultValue;
|
|
1453
|
+
const context = useBoundProp(propType);
|
|
1454
|
+
const rowRef = useRef4(null);
|
|
1455
|
+
return /* @__PURE__ */ React28.createElement(PropProvider, { ...context }, /* @__PURE__ */ React28.createElement(PropKeyProvider, { bind: $$type }, /* @__PURE__ */ React28.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel, null, valueName)), /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(SizeControl, { anchorRef: rowRef, units: units2 })))));
|
|
1456
|
+
};
|
|
1457
|
+
|
|
1347
1458
|
// src/controls/toggle-control.tsx
|
|
1348
|
-
import * as
|
|
1459
|
+
import * as React31 from "react";
|
|
1349
1460
|
import { stringPropTypeUtil as stringPropTypeUtil4 } from "@elementor/editor-props";
|
|
1350
1461
|
|
|
1351
1462
|
// src/components/control-toggle-button-group.tsx
|
|
1352
|
-
import * as
|
|
1353
|
-
import { useEffect as useEffect4, useMemo as useMemo2, useRef as
|
|
1463
|
+
import * as React30 from "react";
|
|
1464
|
+
import { useEffect as useEffect4, useMemo as useMemo2, useRef as useRef5, useState as useState5 } from "react";
|
|
1354
1465
|
import { ChevronDownIcon } from "@elementor/icons";
|
|
1355
1466
|
import {
|
|
1356
1467
|
ListItemText,
|
|
@@ -1364,14 +1475,14 @@ import {
|
|
|
1364
1475
|
} from "@elementor/ui";
|
|
1365
1476
|
|
|
1366
1477
|
// src/components/conditional-tooltip.tsx
|
|
1367
|
-
import * as
|
|
1478
|
+
import * as React29 from "react";
|
|
1368
1479
|
import { Tooltip as Tooltip2 } from "@elementor/ui";
|
|
1369
1480
|
var ConditionalTooltip = ({
|
|
1370
1481
|
showTooltip,
|
|
1371
1482
|
children,
|
|
1372
1483
|
label
|
|
1373
1484
|
}) => {
|
|
1374
|
-
return showTooltip && label ? /* @__PURE__ */
|
|
1485
|
+
return showTooltip && label ? /* @__PURE__ */ React29.createElement(Tooltip2, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
|
|
1375
1486
|
};
|
|
1376
1487
|
|
|
1377
1488
|
// src/components/control-toggle-button-group.tsx
|
|
@@ -1414,7 +1525,7 @@ var ControlToggleButtonGroup = ({
|
|
|
1414
1525
|
const templateColumnsSuffix = isOffLimits ? "auto" : "";
|
|
1415
1526
|
return `repeat(${itemsCount}, minmax(0, 25%)) ${templateColumnsSuffix}`;
|
|
1416
1527
|
}, [menuItems?.length, fixedItems.length]);
|
|
1417
|
-
return /* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ React30.createElement(ControlActions, null, /* @__PURE__ */ React30.createElement(
|
|
1418
1529
|
StyledToggleButtonGroup,
|
|
1419
1530
|
{
|
|
1420
1531
|
justify,
|
|
@@ -1429,16 +1540,16 @@ var ControlToggleButtonGroup = ({
|
|
|
1429
1540
|
width: `100%`
|
|
1430
1541
|
}
|
|
1431
1542
|
},
|
|
1432
|
-
fixedItems.map(({ label, value: buttonValue, renderContent:
|
|
1543
|
+
fixedItems.map(({ label, value: buttonValue, renderContent: Content5, showTooltip }) => /* @__PURE__ */ React30.createElement(
|
|
1433
1544
|
ConditionalTooltip,
|
|
1434
1545
|
{
|
|
1435
1546
|
key: buttonValue,
|
|
1436
1547
|
label,
|
|
1437
1548
|
showTooltip: showTooltip || false
|
|
1438
1549
|
},
|
|
1439
|
-
/* @__PURE__ */
|
|
1550
|
+
/* @__PURE__ */ React30.createElement(ToggleButton, { value: buttonValue, "aria-label": label, size, fullWidth }, /* @__PURE__ */ React30.createElement(Content5, { size }))
|
|
1440
1551
|
)),
|
|
1441
|
-
menuItems.length && exclusive && /* @__PURE__ */
|
|
1552
|
+
menuItems.length && exclusive && /* @__PURE__ */ React30.createElement(
|
|
1442
1553
|
SplitButtonGroup,
|
|
1443
1554
|
{
|
|
1444
1555
|
size,
|
|
@@ -1459,7 +1570,7 @@ var SplitButtonGroup = ({
|
|
|
1459
1570
|
}) => {
|
|
1460
1571
|
const previewButton = usePreviewButton(items, value);
|
|
1461
1572
|
const [isMenuOpen, setIsMenuOpen] = useState5(false);
|
|
1462
|
-
const menuButtonRef =
|
|
1573
|
+
const menuButtonRef = useRef5(null);
|
|
1463
1574
|
const onMenuToggle = (ev) => {
|
|
1464
1575
|
setIsMenuOpen((prev) => !prev);
|
|
1465
1576
|
ev.preventDefault();
|
|
@@ -1472,7 +1583,7 @@ var SplitButtonGroup = ({
|
|
|
1472
1583
|
const shouldRemove = newValue === value;
|
|
1473
1584
|
onChange(shouldRemove ? null : newValue);
|
|
1474
1585
|
};
|
|
1475
|
-
return /* @__PURE__ */
|
|
1586
|
+
return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(
|
|
1476
1587
|
ToggleButton,
|
|
1477
1588
|
{
|
|
1478
1589
|
value: previewButton.value,
|
|
@@ -1486,7 +1597,7 @@ var SplitButtonGroup = ({
|
|
|
1486
1597
|
ref: menuButtonRef
|
|
1487
1598
|
},
|
|
1488
1599
|
previewButton.renderContent({ size })
|
|
1489
|
-
), /* @__PURE__ */
|
|
1600
|
+
), /* @__PURE__ */ React30.createElement(
|
|
1490
1601
|
ToggleButton,
|
|
1491
1602
|
{
|
|
1492
1603
|
size,
|
|
@@ -1497,8 +1608,8 @@ var SplitButtonGroup = ({
|
|
|
1497
1608
|
ref: menuButtonRef,
|
|
1498
1609
|
value: "__chevron-icon-button__"
|
|
1499
1610
|
},
|
|
1500
|
-
/* @__PURE__ */
|
|
1501
|
-
), /* @__PURE__ */
|
|
1611
|
+
/* @__PURE__ */ React30.createElement(ChevronDownIcon, { fontSize: size })
|
|
1612
|
+
), /* @__PURE__ */ React30.createElement(
|
|
1502
1613
|
Menu2,
|
|
1503
1614
|
{
|
|
1504
1615
|
open: isMenuOpen,
|
|
@@ -1516,14 +1627,14 @@ var SplitButtonGroup = ({
|
|
|
1516
1627
|
mt: 0.5
|
|
1517
1628
|
}
|
|
1518
1629
|
},
|
|
1519
|
-
items.map(({ label, value: buttonValue }) => /* @__PURE__ */
|
|
1630
|
+
items.map(({ label, value: buttonValue }) => /* @__PURE__ */ React30.createElement(
|
|
1520
1631
|
MenuItem,
|
|
1521
1632
|
{
|
|
1522
1633
|
key: buttonValue,
|
|
1523
1634
|
selected: buttonValue === value,
|
|
1524
1635
|
onClick: () => onMenuItemClick(buttonValue)
|
|
1525
1636
|
},
|
|
1526
|
-
/* @__PURE__ */
|
|
1637
|
+
/* @__PURE__ */ React30.createElement(ListItemText, null, /* @__PURE__ */ React30.createElement(Typography2, { sx: { fontSize: "14px" } }, label))
|
|
1527
1638
|
))
|
|
1528
1639
|
));
|
|
1529
1640
|
};
|
|
@@ -1563,7 +1674,7 @@ var ToggleControl = createControl(
|
|
|
1563
1674
|
fullWidth,
|
|
1564
1675
|
size
|
|
1565
1676
|
};
|
|
1566
|
-
return exclusive ? /* @__PURE__ */
|
|
1677
|
+
return exclusive ? /* @__PURE__ */ React31.createElement(
|
|
1567
1678
|
ControlToggleButtonGroup,
|
|
1568
1679
|
{
|
|
1569
1680
|
...toggleButtonGroupProps,
|
|
@@ -1572,7 +1683,7 @@ var ToggleControl = createControl(
|
|
|
1572
1683
|
disabled,
|
|
1573
1684
|
exclusive: true
|
|
1574
1685
|
}
|
|
1575
|
-
) : /* @__PURE__ */
|
|
1686
|
+
) : /* @__PURE__ */ React31.createElement(
|
|
1576
1687
|
ControlToggleButtonGroup,
|
|
1577
1688
|
{
|
|
1578
1689
|
...toggleButtonGroupProps,
|
|
@@ -1586,20 +1697,20 @@ var ToggleControl = createControl(
|
|
|
1586
1697
|
);
|
|
1587
1698
|
|
|
1588
1699
|
// src/controls/number-control.tsx
|
|
1589
|
-
import * as
|
|
1700
|
+
import * as React32 from "react";
|
|
1590
1701
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
1591
1702
|
import { TextField as TextField5 } from "@elementor/ui";
|
|
1592
1703
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
1593
1704
|
var RESTRICTED_INPUT_KEYS2 = ["e", "E", "+", "-"];
|
|
1594
1705
|
var NumberControl = createControl(
|
|
1595
1706
|
({
|
|
1596
|
-
placeholder,
|
|
1707
|
+
placeholder: labelPlaceholder,
|
|
1597
1708
|
max = Number.MAX_VALUE,
|
|
1598
1709
|
min = -Number.MAX_VALUE,
|
|
1599
1710
|
step = 1,
|
|
1600
1711
|
shouldForceInt = false
|
|
1601
1712
|
}) => {
|
|
1602
|
-
const { value, setValue, disabled } = useBoundProp(numberPropTypeUtil);
|
|
1713
|
+
const { value, setValue, placeholder, disabled } = useBoundProp(numberPropTypeUtil);
|
|
1603
1714
|
const handleChange = (event) => {
|
|
1604
1715
|
const eventValue = event.target.value;
|
|
1605
1716
|
if (isEmptyOrNaN(eventValue)) {
|
|
@@ -1609,7 +1720,7 @@ var NumberControl = createControl(
|
|
|
1609
1720
|
const formattedValue = shouldForceInt ? +parseInt(eventValue) : Number(eventValue);
|
|
1610
1721
|
setValue(Math.min(Math.max(formattedValue, min), max));
|
|
1611
1722
|
};
|
|
1612
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ React32.createElement(ControlActions, null, /* @__PURE__ */ React32.createElement(
|
|
1613
1724
|
TextField5,
|
|
1614
1725
|
{
|
|
1615
1726
|
size: "tiny",
|
|
@@ -1618,7 +1729,7 @@ var NumberControl = createControl(
|
|
|
1618
1729
|
disabled,
|
|
1619
1730
|
value: isEmptyOrNaN(value) ? "" : value,
|
|
1620
1731
|
onChange: handleChange,
|
|
1621
|
-
placeholder,
|
|
1732
|
+
placeholder: labelPlaceholder ?? (placeholder ? String(placeholder) : ""),
|
|
1622
1733
|
inputProps: { step },
|
|
1623
1734
|
onKeyDown: (event) => {
|
|
1624
1735
|
if (RESTRICTED_INPUT_KEYS2.includes(event.key)) {
|
|
@@ -1631,21 +1742,12 @@ var NumberControl = createControl(
|
|
|
1631
1742
|
);
|
|
1632
1743
|
|
|
1633
1744
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
1634
|
-
import * as
|
|
1635
|
-
import { useId as useId2, useRef as
|
|
1745
|
+
import * as React33 from "react";
|
|
1746
|
+
import { useId as useId2, useRef as useRef6 } from "react";
|
|
1636
1747
|
import { sizePropTypeUtil as sizePropTypeUtil2 } from "@elementor/editor-props";
|
|
1637
1748
|
import { isExperimentActive as isExperimentActive2 } from "@elementor/editor-v1-adapters";
|
|
1638
1749
|
import { bindPopover as bindPopover3, bindToggle, Grid as Grid5, Popover as Popover3, Stack as Stack7, ToggleButton as ToggleButton2, Tooltip as Tooltip3, usePopupState as usePopupState4 } from "@elementor/ui";
|
|
1639
1750
|
import { __ as __6 } from "@wordpress/i18n";
|
|
1640
|
-
|
|
1641
|
-
// src/components/control-label.tsx
|
|
1642
|
-
import * as React31 from "react";
|
|
1643
|
-
import { Stack as Stack6 } from "@elementor/ui";
|
|
1644
|
-
var ControlLabel = ({ children }) => {
|
|
1645
|
-
return /* @__PURE__ */ React31.createElement(Stack6, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React31.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React31.createElement(ControlAdornments, null));
|
|
1646
|
-
};
|
|
1647
|
-
|
|
1648
|
-
// src/controls/equal-unequal-sizes-control.tsx
|
|
1649
1751
|
var isEqualSizes = (propValue, items) => {
|
|
1650
1752
|
const values = Object.values(propValue);
|
|
1651
1753
|
if (values.length !== items.length) {
|
|
@@ -1672,7 +1774,7 @@ function EqualUnequalSizesControl({
|
|
|
1672
1774
|
disabled: multiSizeDisabled
|
|
1673
1775
|
} = useBoundProp(multiSizePropTypeUtil);
|
|
1674
1776
|
const { value: sizeValue, setValue: setSizeValue } = useBoundProp(sizePropTypeUtil2);
|
|
1675
|
-
const rowRefs = [
|
|
1777
|
+
const rowRefs = [useRef6(null), useRef6(null)];
|
|
1676
1778
|
const splitEqualValue = () => {
|
|
1677
1779
|
if (!sizeValue) {
|
|
1678
1780
|
return null;
|
|
@@ -1701,13 +1803,13 @@ function EqualUnequalSizesControl({
|
|
|
1701
1803
|
};
|
|
1702
1804
|
const isShowingGeneralIndicator = !isExperimentActive2("e_v_3_30") || !popupState.isOpen;
|
|
1703
1805
|
const isMixed = !!multiSizeValue;
|
|
1704
|
-
return /* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React33.createElement(Grid5, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React33.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React33.createElement(ControlLabel, null, label)), /* @__PURE__ */ React33.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(Stack7, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React33.createElement(
|
|
1705
1807
|
SizeControl,
|
|
1706
1808
|
{
|
|
1707
1809
|
placeholder: isMixed ? __6("Mixed", "elementor") : void 0,
|
|
1708
1810
|
anchorRef: rowRefs[0]
|
|
1709
1811
|
}
|
|
1710
|
-
), /* @__PURE__ */
|
|
1812
|
+
), /* @__PURE__ */ React33.createElement(Tooltip3, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React33.createElement(
|
|
1711
1813
|
ToggleButton2,
|
|
1712
1814
|
{
|
|
1713
1815
|
size: "tiny",
|
|
@@ -1718,7 +1820,7 @@ function EqualUnequalSizesControl({
|
|
|
1718
1820
|
"aria-label": tooltipLabel
|
|
1719
1821
|
},
|
|
1720
1822
|
icon
|
|
1721
|
-
))))), /* @__PURE__ */
|
|
1823
|
+
))))), /* @__PURE__ */ React33.createElement(
|
|
1722
1824
|
Popover3,
|
|
1723
1825
|
{
|
|
1724
1826
|
disablePortal: true,
|
|
@@ -1736,7 +1838,7 @@ function EqualUnequalSizesControl({
|
|
|
1736
1838
|
paper: { sx: { mt: 0.5, width: rowRefs[0].current?.getBoundingClientRect().width } }
|
|
1737
1839
|
}
|
|
1738
1840
|
},
|
|
1739
|
-
/* @__PURE__ */
|
|
1841
|
+
/* @__PURE__ */ React33.createElement(
|
|
1740
1842
|
PropProvider,
|
|
1741
1843
|
{
|
|
1742
1844
|
propType: multiSizePropType,
|
|
@@ -1744,21 +1846,18 @@ function EqualUnequalSizesControl({
|
|
|
1744
1846
|
setValue: setNestedProp,
|
|
1745
1847
|
disabled: multiSizeDisabled
|
|
1746
1848
|
},
|
|
1747
|
-
/* @__PURE__ */
|
|
1849
|
+
/* @__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] })))
|
|
1748
1850
|
)
|
|
1749
1851
|
));
|
|
1750
1852
|
}
|
|
1751
|
-
var MultiSizeValueControl = ({
|
|
1752
|
-
item,
|
|
1753
|
-
rowRef
|
|
1754
|
-
}) => {
|
|
1853
|
+
var MultiSizeValueControl = ({ item, rowRef }) => {
|
|
1755
1854
|
const isUsingNestedProps = isExperimentActive2("e_v_3_30");
|
|
1756
|
-
return /* @__PURE__ */
|
|
1855
|
+
return /* @__PURE__ */ React33.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React33.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(Grid5, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React33.createElement(Grid5, { item: true, xs: 12 }, isUsingNestedProps ? /* @__PURE__ */ React33.createElement(ControlLabel, null, item.label) : /* @__PURE__ */ React33.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React33.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React33.createElement(SizeControl, { startIcon: item.icon, anchorRef: rowRef })))));
|
|
1757
1856
|
};
|
|
1758
1857
|
|
|
1759
1858
|
// src/controls/linked-dimensions-control.tsx
|
|
1760
|
-
import * as
|
|
1761
|
-
import { useRef as
|
|
1859
|
+
import * as React34 from "react";
|
|
1860
|
+
import { useRef as useRef7 } from "react";
|
|
1762
1861
|
import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil3 } from "@elementor/editor-props";
|
|
1763
1862
|
import { isExperimentActive as isExperimentActive3 } from "@elementor/editor-v1-adapters";
|
|
1764
1863
|
import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
@@ -1771,7 +1870,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
1771
1870
|
extendedOptions
|
|
1772
1871
|
}) => {
|
|
1773
1872
|
const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(sizePropTypeUtil3);
|
|
1774
|
-
const gridRowRefs = [
|
|
1873
|
+
const gridRowRefs = [useRef7(null), useRef7(null)];
|
|
1775
1874
|
const {
|
|
1776
1875
|
value: dimensionsValue,
|
|
1777
1876
|
setValue: setDimensionsValue,
|
|
@@ -1798,7 +1897,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
1798
1897
|
const linkedLabel = __7("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1799
1898
|
const unlinkedLabel = __7("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1800
1899
|
const disabled = sizeDisabled || dimensionsDisabled;
|
|
1801
|
-
return /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ React34.createElement(
|
|
1802
1901
|
PropProvider,
|
|
1803
1902
|
{
|
|
1804
1903
|
propType,
|
|
@@ -1806,7 +1905,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
1806
1905
|
setValue: setDimensionsValue,
|
|
1807
1906
|
disabled
|
|
1808
1907
|
},
|
|
1809
|
-
/* @__PURE__ */
|
|
1908
|
+
/* @__PURE__ */ React34.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, isUsingNestedProps ? /* @__PURE__ */ React34.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React34.createElement(ControlLabel, null, label), /* @__PURE__ */ React34.createElement(Tooltip4, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React34.createElement(
|
|
1810
1909
|
ToggleButton3,
|
|
1811
1910
|
{
|
|
1812
1911
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -1817,9 +1916,9 @@ var LinkedDimensionsControl = createControl(
|
|
|
1817
1916
|
onChange: onLinkToggle,
|
|
1818
1917
|
disabled
|
|
1819
1918
|
},
|
|
1820
|
-
/* @__PURE__ */
|
|
1919
|
+
/* @__PURE__ */ React34.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1821
1920
|
))),
|
|
1822
|
-
getCssMarginProps(isSiteRtl).map((row, index) => /* @__PURE__ */
|
|
1921
|
+
getCssMarginProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React34.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React34.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React34.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React34.createElement(Label, { ...props })), /* @__PURE__ */ React34.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React34.createElement(
|
|
1823
1922
|
Control3,
|
|
1824
1923
|
{
|
|
1825
1924
|
bind: props.bind,
|
|
@@ -1840,16 +1939,16 @@ var Control3 = ({
|
|
|
1840
1939
|
anchorRef
|
|
1841
1940
|
}) => {
|
|
1842
1941
|
if (isLinked) {
|
|
1843
|
-
return /* @__PURE__ */
|
|
1942
|
+
return /* @__PURE__ */ React34.createElement(SizeControl, { startIcon, extendedOptions, anchorRef });
|
|
1844
1943
|
}
|
|
1845
|
-
return /* @__PURE__ */
|
|
1944
|
+
return /* @__PURE__ */ React34.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React34.createElement(SizeControl, { startIcon, extendedOptions, anchorRef }));
|
|
1846
1945
|
};
|
|
1847
1946
|
var Label = ({ label, bind }) => {
|
|
1848
1947
|
const isUsingNestedProps = isExperimentActive3("e_v_3_30");
|
|
1849
1948
|
if (!isUsingNestedProps) {
|
|
1850
|
-
return /* @__PURE__ */
|
|
1949
|
+
return /* @__PURE__ */ React34.createElement(ControlFormLabel, null, label);
|
|
1851
1950
|
}
|
|
1852
|
-
return /* @__PURE__ */
|
|
1951
|
+
return /* @__PURE__ */ React34.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React34.createElement(ControlLabel, null, label));
|
|
1853
1952
|
};
|
|
1854
1953
|
function getCssMarginProps(isSiteRtl) {
|
|
1855
1954
|
return [
|
|
@@ -1857,41 +1956,41 @@ function getCssMarginProps(isSiteRtl) {
|
|
|
1857
1956
|
{
|
|
1858
1957
|
bind: "block-start",
|
|
1859
1958
|
label: __7("Top", "elementor"),
|
|
1860
|
-
icon: /* @__PURE__ */
|
|
1959
|
+
icon: /* @__PURE__ */ React34.createElement(SideTopIcon, { fontSize: "tiny" })
|
|
1861
1960
|
},
|
|
1862
1961
|
{
|
|
1863
1962
|
bind: "inline-end",
|
|
1864
1963
|
label: isSiteRtl ? __7("Left", "elementor") : __7("Right", "elementor"),
|
|
1865
|
-
icon: isSiteRtl ? /* @__PURE__ */
|
|
1964
|
+
icon: isSiteRtl ? /* @__PURE__ */ React34.createElement(SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React34.createElement(SideRightIcon, { fontSize: "tiny" })
|
|
1866
1965
|
}
|
|
1867
1966
|
],
|
|
1868
1967
|
[
|
|
1869
1968
|
{
|
|
1870
1969
|
bind: "block-end",
|
|
1871
1970
|
label: __7("Bottom", "elementor"),
|
|
1872
|
-
icon: /* @__PURE__ */
|
|
1971
|
+
icon: /* @__PURE__ */ React34.createElement(SideBottomIcon, { fontSize: "tiny" })
|
|
1873
1972
|
},
|
|
1874
1973
|
{
|
|
1875
1974
|
bind: "inline-start",
|
|
1876
1975
|
label: isSiteRtl ? __7("Right", "elementor") : __7("Left", "elementor"),
|
|
1877
|
-
icon: isSiteRtl ? /* @__PURE__ */
|
|
1976
|
+
icon: isSiteRtl ? /* @__PURE__ */ React34.createElement(SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React34.createElement(SideLeftIcon, { fontSize: "tiny" })
|
|
1878
1977
|
}
|
|
1879
1978
|
]
|
|
1880
1979
|
];
|
|
1881
1980
|
}
|
|
1882
1981
|
|
|
1883
1982
|
// src/controls/font-family-control/font-family-control.tsx
|
|
1884
|
-
import * as
|
|
1983
|
+
import * as React36 from "react";
|
|
1885
1984
|
import { stringPropTypeUtil as stringPropTypeUtil5 } from "@elementor/editor-props";
|
|
1886
1985
|
import { ChevronDownIcon as ChevronDownIcon2 } from "@elementor/icons";
|
|
1887
1986
|
import { bindPopover as bindPopover4, bindTrigger as bindTrigger3, Popover as Popover4, UnstableTag as UnstableTag2, usePopupState as usePopupState5 } from "@elementor/ui";
|
|
1888
1987
|
|
|
1889
1988
|
// src/components/font-family-selector.tsx
|
|
1890
|
-
import * as
|
|
1989
|
+
import * as React35 from "react";
|
|
1891
1990
|
import { useEffect as useEffect5, useState as useState6 } from "react";
|
|
1892
1991
|
import { PopoverHeader, PopoverMenuList, PopoverScrollableContent, PopoverSearch } from "@elementor/editor-ui";
|
|
1893
1992
|
import { TextIcon } from "@elementor/icons";
|
|
1894
|
-
import { Box as
|
|
1993
|
+
import { Box as Box4, Divider as Divider2, Link, Stack as Stack9, Typography as Typography3 } from "@elementor/ui";
|
|
1895
1994
|
import { debounce } from "@elementor/utils";
|
|
1896
1995
|
import { __ as __8 } from "@wordpress/i18n";
|
|
1897
1996
|
|
|
@@ -1923,7 +2022,8 @@ var FontFamilySelector = ({
|
|
|
1923
2022
|
fontFamilies,
|
|
1924
2023
|
fontFamily,
|
|
1925
2024
|
onFontFamilyChange,
|
|
1926
|
-
onClose
|
|
2025
|
+
onClose,
|
|
2026
|
+
sectionWidth
|
|
1927
2027
|
}) => {
|
|
1928
2028
|
const [searchValue, setSearchValue] = useState6("");
|
|
1929
2029
|
const filteredFontFamilies = useFilteredFontFamilies(fontFamilies, searchValue);
|
|
@@ -1934,21 +2034,21 @@ var FontFamilySelector = ({
|
|
|
1934
2034
|
setSearchValue("");
|
|
1935
2035
|
onClose();
|
|
1936
2036
|
};
|
|
1937
|
-
return /* @__PURE__ */
|
|
2037
|
+
return /* @__PURE__ */ React35.createElement(Stack9, null, /* @__PURE__ */ React35.createElement(
|
|
1938
2038
|
PopoverHeader,
|
|
1939
2039
|
{
|
|
1940
2040
|
title: __8("Font Family", "elementor"),
|
|
1941
2041
|
onClose: handleClose,
|
|
1942
|
-
icon: /* @__PURE__ */
|
|
2042
|
+
icon: /* @__PURE__ */ React35.createElement(TextIcon, { fontSize: SIZE2 })
|
|
1943
2043
|
}
|
|
1944
|
-
), /* @__PURE__ */
|
|
2044
|
+
), /* @__PURE__ */ React35.createElement(
|
|
1945
2045
|
PopoverSearch,
|
|
1946
2046
|
{
|
|
1947
2047
|
value: searchValue,
|
|
1948
2048
|
onSearch: handleSearch,
|
|
1949
2049
|
placeholder: __8("Search", "elementor")
|
|
1950
2050
|
}
|
|
1951
|
-
), /* @__PURE__ */
|
|
2051
|
+
), /* @__PURE__ */ React35.createElement(Divider2, null), /* @__PURE__ */ React35.createElement(PopoverScrollableContent, { width: sectionWidth }, filteredFontFamilies.length > 0 ? /* @__PURE__ */ React35.createElement(
|
|
1952
2052
|
FontList,
|
|
1953
2053
|
{
|
|
1954
2054
|
fontListItems: filteredFontFamilies,
|
|
@@ -1956,30 +2056,53 @@ var FontFamilySelector = ({
|
|
|
1956
2056
|
handleClose,
|
|
1957
2057
|
fontFamily
|
|
1958
2058
|
}
|
|
1959
|
-
) : /* @__PURE__ */
|
|
1960
|
-
|
|
2059
|
+
) : /* @__PURE__ */ React35.createElement(
|
|
2060
|
+
Stack9,
|
|
1961
2061
|
{
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
}
|
|
1969
|
-
},
|
|
1970
|
-
/* @__PURE__ */ React34.createElement("span", null, "\u201C"),
|
|
1971
|
-
/* @__PURE__ */ React34.createElement("span", { style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" } }, searchValue),
|
|
1972
|
-
/* @__PURE__ */ React34.createElement("span", null, "\u201D.")
|
|
1973
|
-
)), /* @__PURE__ */ React34.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __8("Try something else.", "elementor"), /* @__PURE__ */ React34.createElement(
|
|
1974
|
-
Link,
|
|
1975
|
-
{
|
|
1976
|
-
color: "secondary",
|
|
1977
|
-
variant: "caption",
|
|
1978
|
-
component: "button",
|
|
1979
|
-
onClick: () => setSearchValue("")
|
|
2062
|
+
alignItems: "center",
|
|
2063
|
+
justifyContent: "center",
|
|
2064
|
+
height: "100%",
|
|
2065
|
+
p: 2.5,
|
|
2066
|
+
gap: 1.5,
|
|
2067
|
+
overflow: "hidden"
|
|
1980
2068
|
},
|
|
1981
|
-
|
|
1982
|
-
|
|
2069
|
+
/* @__PURE__ */ React35.createElement(TextIcon, { fontSize: "large" }),
|
|
2070
|
+
/* @__PURE__ */ React35.createElement(Box4, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React35.createElement(Typography3, { align: "center", variant: "subtitle2", color: "text.secondary" }, __8("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React35.createElement(
|
|
2071
|
+
Typography3,
|
|
2072
|
+
{
|
|
2073
|
+
variant: "subtitle2",
|
|
2074
|
+
color: "text.secondary",
|
|
2075
|
+
sx: {
|
|
2076
|
+
display: "flex",
|
|
2077
|
+
width: "100%",
|
|
2078
|
+
justifyContent: "center"
|
|
2079
|
+
}
|
|
2080
|
+
},
|
|
2081
|
+
/* @__PURE__ */ React35.createElement("span", null, "\u201C"),
|
|
2082
|
+
/* @__PURE__ */ React35.createElement("span", { style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" } }, searchValue),
|
|
2083
|
+
/* @__PURE__ */ React35.createElement("span", null, "\u201D.")
|
|
2084
|
+
)),
|
|
2085
|
+
/* @__PURE__ */ React35.createElement(
|
|
2086
|
+
Typography3,
|
|
2087
|
+
{
|
|
2088
|
+
align: "center",
|
|
2089
|
+
variant: "caption",
|
|
2090
|
+
color: "text.secondary",
|
|
2091
|
+
sx: { display: "flex", flexDirection: "column" }
|
|
2092
|
+
},
|
|
2093
|
+
__8("Try something else.", "elementor"),
|
|
2094
|
+
/* @__PURE__ */ React35.createElement(
|
|
2095
|
+
Link,
|
|
2096
|
+
{
|
|
2097
|
+
color: "secondary",
|
|
2098
|
+
variant: "caption",
|
|
2099
|
+
component: "button",
|
|
2100
|
+
onClick: () => setSearchValue("")
|
|
2101
|
+
},
|
|
2102
|
+
__8("Clear & try again", "elementor")
|
|
2103
|
+
)
|
|
2104
|
+
)
|
|
2105
|
+
)));
|
|
1983
2106
|
};
|
|
1984
2107
|
var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
1985
2108
|
const selectedItem = fontListItems.find((item) => item.value === fontFamily);
|
|
@@ -1991,7 +2114,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1991
2114
|
}
|
|
1992
2115
|
});
|
|
1993
2116
|
}, 100);
|
|
1994
|
-
return /* @__PURE__ */
|
|
2117
|
+
return /* @__PURE__ */ React35.createElement(
|
|
1995
2118
|
PopoverMenuList,
|
|
1996
2119
|
{
|
|
1997
2120
|
items: fontListItems,
|
|
@@ -2012,47 +2135,50 @@ var useDebounce = (fn, delay) => {
|
|
|
2012
2135
|
|
|
2013
2136
|
// src/controls/font-family-control/font-family-control.tsx
|
|
2014
2137
|
var SIZE3 = "tiny";
|
|
2015
|
-
var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
2138
|
+
var FontFamilyControl = createControl(({ fontFamilies, sectionWidth }) => {
|
|
2016
2139
|
const { value: fontFamily, setValue: setFontFamily, disabled } = useBoundProp(stringPropTypeUtil5);
|
|
2017
2140
|
const popoverState = usePopupState5({ variant: "popover" });
|
|
2018
|
-
return /* @__PURE__ */
|
|
2141
|
+
return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(ControlActions, null, /* @__PURE__ */ React36.createElement(
|
|
2019
2142
|
UnstableTag2,
|
|
2020
2143
|
{
|
|
2021
2144
|
variant: "outlined",
|
|
2022
2145
|
label: fontFamily,
|
|
2023
|
-
endIcon: /* @__PURE__ */
|
|
2146
|
+
endIcon: /* @__PURE__ */ React36.createElement(ChevronDownIcon2, { fontSize: SIZE3 }),
|
|
2024
2147
|
...bindTrigger3(popoverState),
|
|
2025
2148
|
fullWidth: true,
|
|
2026
2149
|
disabled
|
|
2027
2150
|
}
|
|
2028
|
-
)), /* @__PURE__ */
|
|
2151
|
+
)), /* @__PURE__ */ React36.createElement(
|
|
2029
2152
|
Popover4,
|
|
2030
2153
|
{
|
|
2031
2154
|
disablePortal: true,
|
|
2032
2155
|
disableScrollLock: true,
|
|
2033
|
-
anchorOrigin: { vertical: "bottom", horizontal: "
|
|
2156
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
2157
|
+
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
2158
|
+
sx: { my: 1.5 },
|
|
2034
2159
|
...bindPopover4(popoverState)
|
|
2035
2160
|
},
|
|
2036
|
-
/* @__PURE__ */
|
|
2161
|
+
/* @__PURE__ */ React36.createElement(
|
|
2037
2162
|
FontFamilySelector,
|
|
2038
2163
|
{
|
|
2039
2164
|
fontFamilies,
|
|
2040
2165
|
fontFamily,
|
|
2041
2166
|
onFontFamilyChange: setFontFamily,
|
|
2042
|
-
onClose: popoverState.close
|
|
2167
|
+
onClose: popoverState.close,
|
|
2168
|
+
sectionWidth
|
|
2043
2169
|
}
|
|
2044
2170
|
)
|
|
2045
2171
|
));
|
|
2046
2172
|
});
|
|
2047
2173
|
|
|
2048
2174
|
// src/controls/url-control.tsx
|
|
2049
|
-
import * as
|
|
2175
|
+
import * as React37 from "react";
|
|
2050
2176
|
import { urlPropTypeUtil } from "@elementor/editor-props";
|
|
2051
2177
|
import { TextField as TextField6 } from "@elementor/ui";
|
|
2052
2178
|
var UrlControl = createControl(({ placeholder }) => {
|
|
2053
2179
|
const { value, setValue, disabled } = useBoundProp(urlPropTypeUtil);
|
|
2054
2180
|
const handleChange = (event) => setValue(event.target.value);
|
|
2055
|
-
return /* @__PURE__ */
|
|
2181
|
+
return /* @__PURE__ */ React37.createElement(ControlActions, null, /* @__PURE__ */ React37.createElement(
|
|
2056
2182
|
TextField6,
|
|
2057
2183
|
{
|
|
2058
2184
|
size: "tiny",
|
|
@@ -2066,7 +2192,7 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
2066
2192
|
});
|
|
2067
2193
|
|
|
2068
2194
|
// src/controls/link-control.tsx
|
|
2069
|
-
import * as
|
|
2195
|
+
import * as React39 from "react";
|
|
2070
2196
|
import { useMemo as useMemo3, useState as useState7 } from "react";
|
|
2071
2197
|
import { getLinkInLinkRestriction, selectElement } from "@elementor/editor-elements";
|
|
2072
2198
|
import {
|
|
@@ -2080,17 +2206,17 @@ import { InfoTipCard } from "@elementor/editor-ui";
|
|
|
2080
2206
|
import { httpService as httpService2 } from "@elementor/http-client";
|
|
2081
2207
|
import { AlertTriangleIcon, MinusIcon, PlusIcon as PlusIcon2 } from "@elementor/icons";
|
|
2082
2208
|
import { useSessionStorage } from "@elementor/session";
|
|
2083
|
-
import { Box as
|
|
2209
|
+
import { Box as Box6, Collapse, Grid as Grid7, IconButton as IconButton3, Infotip, Stack as Stack10, Switch } from "@elementor/ui";
|
|
2084
2210
|
import { debounce as debounce2 } from "@elementor/utils";
|
|
2085
2211
|
import { __ as __9 } from "@wordpress/i18n";
|
|
2086
2212
|
|
|
2087
2213
|
// src/components/autocomplete.tsx
|
|
2088
|
-
import * as
|
|
2214
|
+
import * as React38 from "react";
|
|
2089
2215
|
import { forwardRef as forwardRef4 } from "react";
|
|
2090
2216
|
import { XIcon as XIcon2 } from "@elementor/icons";
|
|
2091
2217
|
import {
|
|
2092
2218
|
Autocomplete as AutocompleteBase,
|
|
2093
|
-
Box as
|
|
2219
|
+
Box as Box5,
|
|
2094
2220
|
IconButton as IconButton2,
|
|
2095
2221
|
InputAdornment as InputAdornment3,
|
|
2096
2222
|
TextField as TextField7
|
|
@@ -2111,7 +2237,7 @@ var Autocomplete = forwardRef4((props, ref) => {
|
|
|
2111
2237
|
const muiWarningPreventer = allowCustomValues || !!value?.toString()?.length;
|
|
2112
2238
|
const isOptionEqualToValue = muiWarningPreventer ? void 0 : () => true;
|
|
2113
2239
|
const isValueFromOptions = typeof value === "number" && !!findMatchingOption(options, value);
|
|
2114
|
-
return /* @__PURE__ */
|
|
2240
|
+
return /* @__PURE__ */ React38.createElement(
|
|
2115
2241
|
AutocompleteBase,
|
|
2116
2242
|
{
|
|
2117
2243
|
...restProps,
|
|
@@ -2129,8 +2255,8 @@ var Autocomplete = forwardRef4((props, ref) => {
|
|
|
2129
2255
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
2130
2256
|
isOptionEqualToValue,
|
|
2131
2257
|
filterOptions: () => optionKeys,
|
|
2132
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
2133
|
-
renderInput: (params) => /* @__PURE__ */
|
|
2258
|
+
renderOption: (optionProps, optionId) => /* @__PURE__ */ React38.createElement(Box5, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
|
|
2259
|
+
renderInput: (params) => /* @__PURE__ */ React38.createElement(
|
|
2134
2260
|
TextInput,
|
|
2135
2261
|
{
|
|
2136
2262
|
params,
|
|
@@ -2153,7 +2279,7 @@ var TextInput = ({
|
|
|
2153
2279
|
const onChange = (event) => {
|
|
2154
2280
|
handleChange(event.target.value);
|
|
2155
2281
|
};
|
|
2156
|
-
return /* @__PURE__ */
|
|
2282
|
+
return /* @__PURE__ */ React38.createElement(
|
|
2157
2283
|
TextField7,
|
|
2158
2284
|
{
|
|
2159
2285
|
...params,
|
|
@@ -2166,7 +2292,7 @@ var TextInput = ({
|
|
|
2166
2292
|
},
|
|
2167
2293
|
InputProps: {
|
|
2168
2294
|
...params.InputProps,
|
|
2169
|
-
endAdornment: /* @__PURE__ */
|
|
2295
|
+
endAdornment: /* @__PURE__ */ React38.createElement(ClearButton, { params, allowClear, handleChange })
|
|
2170
2296
|
}
|
|
2171
2297
|
}
|
|
2172
2298
|
);
|
|
@@ -2175,7 +2301,7 @@ var ClearButton = ({
|
|
|
2175
2301
|
allowClear,
|
|
2176
2302
|
handleChange,
|
|
2177
2303
|
params
|
|
2178
|
-
}) => /* @__PURE__ */
|
|
2304
|
+
}) => /* @__PURE__ */ React38.createElement(InputAdornment3, { position: "end" }, allowClear && /* @__PURE__ */ React38.createElement(IconButton2, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React38.createElement(XIcon2, { fontSize: params.size })));
|
|
2179
2305
|
function findMatchingOption(options, optionId = null) {
|
|
2180
2306
|
const formattedOption = (optionId || "").toString();
|
|
2181
2307
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -2211,7 +2337,8 @@ var LinkControl = createControl((props) => {
|
|
|
2211
2337
|
queryOptions: { endpoint = "", requestParams = {} },
|
|
2212
2338
|
placeholder,
|
|
2213
2339
|
minInputLength = 2,
|
|
2214
|
-
context: { elementId }
|
|
2340
|
+
context: { elementId },
|
|
2341
|
+
label = __9("Link", "elementor")
|
|
2215
2342
|
} = props || {};
|
|
2216
2343
|
const [linkInLinkRestriction, setLinkInLinkRestriction] = useState7(getLinkInLinkRestriction(elementId));
|
|
2217
2344
|
const [options, setOptions] = useState7(
|
|
@@ -2274,7 +2401,7 @@ var LinkControl = createControl((props) => {
|
|
|
2274
2401
|
),
|
|
2275
2402
|
[endpoint]
|
|
2276
2403
|
);
|
|
2277
|
-
return /* @__PURE__ */
|
|
2404
|
+
return /* @__PURE__ */ React39.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React39.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React39.createElement(
|
|
2278
2405
|
Stack10,
|
|
2279
2406
|
{
|
|
2280
2407
|
direction: "row",
|
|
@@ -2284,8 +2411,8 @@ var LinkControl = createControl((props) => {
|
|
|
2284
2411
|
marginInlineEnd: -0.75
|
|
2285
2412
|
}
|
|
2286
2413
|
},
|
|
2287
|
-
/* @__PURE__ */
|
|
2288
|
-
/* @__PURE__ */
|
|
2414
|
+
/* @__PURE__ */ React39.createElement(ControlFormLabel, null, label),
|
|
2415
|
+
/* @__PURE__ */ React39.createElement(ConditionalInfoTip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React39.createElement(
|
|
2289
2416
|
ToggleIconControl,
|
|
2290
2417
|
{
|
|
2291
2418
|
disabled: shouldDisableAddingLink,
|
|
@@ -2294,7 +2421,7 @@ var LinkControl = createControl((props) => {
|
|
|
2294
2421
|
label: __9("Toggle link", "elementor")
|
|
2295
2422
|
}
|
|
2296
2423
|
))
|
|
2297
|
-
), /* @__PURE__ */
|
|
2424
|
+
), /* @__PURE__ */ React39.createElement(Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React39.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React39.createElement(ControlActions, null, /* @__PURE__ */ React39.createElement(
|
|
2298
2425
|
Autocomplete,
|
|
2299
2426
|
{
|
|
2300
2427
|
options,
|
|
@@ -2305,10 +2432,10 @@ var LinkControl = createControl((props) => {
|
|
|
2305
2432
|
onTextChange,
|
|
2306
2433
|
minInputLength
|
|
2307
2434
|
}
|
|
2308
|
-
))), /* @__PURE__ */
|
|
2435
|
+
))), /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React39.createElement(SwitchControl, { disabled: propContext.disabled || !value }))))));
|
|
2309
2436
|
});
|
|
2310
2437
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
2311
|
-
return /* @__PURE__ */
|
|
2438
|
+
return /* @__PURE__ */ React39.createElement(IconButton3, { size: SIZE4, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React39.createElement(MinusIcon, { fontSize: SIZE4 }) : /* @__PURE__ */ React39.createElement(PlusIcon2, { fontSize: SIZE4 }));
|
|
2312
2439
|
};
|
|
2313
2440
|
var SwitchControl = ({ disabled }) => {
|
|
2314
2441
|
const { value = false, setValue } = useBoundProp(booleanPropTypeUtil);
|
|
@@ -2320,7 +2447,7 @@ var SwitchControl = ({ disabled }) => {
|
|
|
2320
2447
|
opacity: 0
|
|
2321
2448
|
}
|
|
2322
2449
|
} : {};
|
|
2323
|
-
return /* @__PURE__ */
|
|
2450
|
+
return /* @__PURE__ */ React39.createElement(Grid7, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React39.createElement(Grid7, { item: true }, /* @__PURE__ */ React39.createElement(ControlFormLabel, null, __9("Open in a new tab", "elementor"))), /* @__PURE__ */ React39.createElement(Grid7, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React39.createElement(Switch, { checked: value, onClick, disabled, inputProps })));
|
|
2324
2451
|
};
|
|
2325
2452
|
async function fetchOptions(ajaxUrl, params) {
|
|
2326
2453
|
if (!params || !ajaxUrl) {
|
|
@@ -2357,15 +2484,15 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2357
2484
|
selectElement(elementId);
|
|
2358
2485
|
}
|
|
2359
2486
|
};
|
|
2360
|
-
return shouldRestrict && isVisible ? /* @__PURE__ */
|
|
2487
|
+
return shouldRestrict && isVisible ? /* @__PURE__ */ React39.createElement(
|
|
2361
2488
|
Infotip,
|
|
2362
2489
|
{
|
|
2363
2490
|
placement: "right",
|
|
2364
|
-
content: /* @__PURE__ */
|
|
2491
|
+
content: /* @__PURE__ */ React39.createElement(
|
|
2365
2492
|
InfoTipCard,
|
|
2366
2493
|
{
|
|
2367
2494
|
content: INFOTIP_CONTENT[reason],
|
|
2368
|
-
svgIcon: /* @__PURE__ */
|
|
2495
|
+
svgIcon: /* @__PURE__ */ React39.createElement(AlertTriangleIcon, null),
|
|
2369
2496
|
learnMoreButton,
|
|
2370
2497
|
ctaButton: {
|
|
2371
2498
|
label: __9("Take me there", "elementor"),
|
|
@@ -2374,17 +2501,17 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2374
2501
|
}
|
|
2375
2502
|
)
|
|
2376
2503
|
},
|
|
2377
|
-
/* @__PURE__ */
|
|
2378
|
-
) : /* @__PURE__ */
|
|
2504
|
+
/* @__PURE__ */ React39.createElement(Box6, null, children)
|
|
2505
|
+
) : /* @__PURE__ */ React39.createElement(React39.Fragment, null, children);
|
|
2379
2506
|
};
|
|
2380
2507
|
var INFOTIP_CONTENT = {
|
|
2381
|
-
descendant: /* @__PURE__ */
|
|
2382
|
-
ancestor: /* @__PURE__ */
|
|
2508
|
+
descendant: /* @__PURE__ */ React39.createElement(React39.Fragment, null, __9("To add a link to this container,", "elementor"), /* @__PURE__ */ React39.createElement("br", null), __9("first remove the link from the elements inside of it.", "elementor")),
|
|
2509
|
+
ancestor: /* @__PURE__ */ React39.createElement(React39.Fragment, null, __9("To add a link to this element,", "elementor"), /* @__PURE__ */ React39.createElement("br", null), __9("first remove the link from its parent container.", "elementor"))
|
|
2383
2510
|
};
|
|
2384
2511
|
|
|
2385
2512
|
// src/controls/gap-control.tsx
|
|
2386
|
-
import * as
|
|
2387
|
-
import { useRef as
|
|
2513
|
+
import * as React40 from "react";
|
|
2514
|
+
import { useRef as useRef8 } from "react";
|
|
2388
2515
|
import { layoutDirectionPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
|
|
2389
2516
|
import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
|
|
2390
2517
|
import { Grid as Grid8, Stack as Stack11, ToggleButton as ToggleButton4, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
@@ -2396,7 +2523,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
2396
2523
|
propType,
|
|
2397
2524
|
disabled: directionDisabled
|
|
2398
2525
|
} = useBoundProp(layoutDirectionPropTypeUtil);
|
|
2399
|
-
const stackRef =
|
|
2526
|
+
const stackRef = useRef8(null);
|
|
2400
2527
|
const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(sizePropTypeUtil4);
|
|
2401
2528
|
const isLinked = !directionValue && !sizeValue ? true : !!sizeValue;
|
|
2402
2529
|
const onLinkToggle = () => {
|
|
@@ -2415,7 +2542,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
2415
2542
|
const linkedLabel = __10("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
2416
2543
|
const unlinkedLabel = __10("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
2417
2544
|
const disabled = sizeDisabled || directionDisabled;
|
|
2418
|
-
return /* @__PURE__ */
|
|
2545
|
+
return /* @__PURE__ */ React40.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React40.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(ControlLabel, null, label), /* @__PURE__ */ React40.createElement(Tooltip5, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React40.createElement(
|
|
2419
2546
|
ToggleButton4,
|
|
2420
2547
|
{
|
|
2421
2548
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -2426,8 +2553,8 @@ var GapControl = createControl(({ label }) => {
|
|
|
2426
2553
|
onChange: onLinkToggle,
|
|
2427
2554
|
disabled
|
|
2428
2555
|
},
|
|
2429
|
-
/* @__PURE__ */
|
|
2430
|
-
))), /* @__PURE__ */
|
|
2556
|
+
/* @__PURE__ */ React40.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2557
|
+
))), /* @__PURE__ */ React40.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React40.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React40.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(ControlFormLabel, null, __10("Column", "elementor"))), /* @__PURE__ */ React40.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(Control4, { bind: "column", isLinked, anchorRef: stackRef }))), /* @__PURE__ */ React40.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React40.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(ControlFormLabel, null, __10("Row", "elementor"))), /* @__PURE__ */ React40.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(Control4, { bind: "row", isLinked, anchorRef: stackRef })))));
|
|
2431
2558
|
});
|
|
2432
2559
|
var Control4 = ({
|
|
2433
2560
|
bind,
|
|
@@ -2435,18 +2562,18 @@ var Control4 = ({
|
|
|
2435
2562
|
anchorRef
|
|
2436
2563
|
}) => {
|
|
2437
2564
|
if (isLinked) {
|
|
2438
|
-
return /* @__PURE__ */
|
|
2565
|
+
return /* @__PURE__ */ React40.createElement(SizeControl, { anchorRef });
|
|
2439
2566
|
}
|
|
2440
|
-
return /* @__PURE__ */
|
|
2567
|
+
return /* @__PURE__ */ React40.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React40.createElement(SizeControl, { anchorRef }));
|
|
2441
2568
|
};
|
|
2442
2569
|
|
|
2443
2570
|
// src/controls/aspect-ratio-control.tsx
|
|
2444
|
-
import * as
|
|
2445
|
-
import { useState as useState8 } from "react";
|
|
2571
|
+
import * as React41 from "react";
|
|
2572
|
+
import { useEffect as useEffect6, useState as useState8 } from "react";
|
|
2446
2573
|
import { stringPropTypeUtil as stringPropTypeUtil7 } from "@elementor/editor-props";
|
|
2447
|
-
import { MenuListItem as
|
|
2574
|
+
import { MenuListItem as MenuListItem4 } from "@elementor/editor-ui";
|
|
2448
2575
|
import { ArrowsMoveHorizontalIcon, ArrowsMoveVerticalIcon } from "@elementor/icons";
|
|
2449
|
-
import { Grid as Grid9, Select as
|
|
2576
|
+
import { Grid as Grid9, Select as Select3, Stack as Stack12, TextField as TextField8 } from "@elementor/ui";
|
|
2450
2577
|
import { __ as __11 } from "@wordpress/i18n";
|
|
2451
2578
|
var RATIO_OPTIONS = [
|
|
2452
2579
|
{ label: __11("Auto", "elementor"), value: "auto" },
|
|
@@ -2469,6 +2596,21 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2469
2596
|
const [selectedValue, setSelectedValue] = useState8(
|
|
2470
2597
|
isCustomSelected ? CUSTOM_RATIO : aspectRatioValue || ""
|
|
2471
2598
|
);
|
|
2599
|
+
useEffect6(() => {
|
|
2600
|
+
const isCustomValue = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
2601
|
+
if (isCustomValue) {
|
|
2602
|
+
const [width, height] = aspectRatioValue.split("/");
|
|
2603
|
+
setCustomWidth(width || "");
|
|
2604
|
+
setCustomHeight(height || "");
|
|
2605
|
+
setSelectedValue(CUSTOM_RATIO);
|
|
2606
|
+
setIsCustom(true);
|
|
2607
|
+
} else {
|
|
2608
|
+
setSelectedValue(aspectRatioValue || "");
|
|
2609
|
+
setIsCustom(false);
|
|
2610
|
+
setCustomWidth("");
|
|
2611
|
+
setCustomHeight("");
|
|
2612
|
+
}
|
|
2613
|
+
}, [aspectRatioValue]);
|
|
2472
2614
|
const handleSelectChange = (event) => {
|
|
2473
2615
|
const newValue = event.target.value;
|
|
2474
2616
|
const isCustomRatio = newValue === CUSTOM_RATIO;
|
|
@@ -2493,8 +2635,8 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2493
2635
|
setAspectRatioValue(`${customWidth}/${newHeight}`);
|
|
2494
2636
|
}
|
|
2495
2637
|
};
|
|
2496
|
-
return /* @__PURE__ */
|
|
2497
|
-
|
|
2638
|
+
return /* @__PURE__ */ React41.createElement(ControlActions, null, /* @__PURE__ */ React41.createElement(Stack12, { direction: "column", gap: 2 }, /* @__PURE__ */ React41.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, label)), /* @__PURE__ */ React41.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(
|
|
2639
|
+
Select3,
|
|
2498
2640
|
{
|
|
2499
2641
|
size: "tiny",
|
|
2500
2642
|
displayEmpty: true,
|
|
@@ -2505,9 +2647,9 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2505
2647
|
fullWidth: true
|
|
2506
2648
|
},
|
|
2507
2649
|
[...RATIO_OPTIONS, { label: __11("Custom", "elementor"), value: CUSTOM_RATIO }].map(
|
|
2508
|
-
({ label: optionLabel, ...props }) => /* @__PURE__ */
|
|
2650
|
+
({ label: optionLabel, ...props }) => /* @__PURE__ */ React41.createElement(MenuListItem4, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
|
|
2509
2651
|
)
|
|
2510
|
-
))), isCustom && /* @__PURE__ */
|
|
2652
|
+
))), isCustom && /* @__PURE__ */ React41.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(
|
|
2511
2653
|
TextField8,
|
|
2512
2654
|
{
|
|
2513
2655
|
size: "tiny",
|
|
@@ -2517,10 +2659,10 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2517
2659
|
value: customWidth,
|
|
2518
2660
|
onChange: handleCustomWidthChange,
|
|
2519
2661
|
InputProps: {
|
|
2520
|
-
startAdornment: /* @__PURE__ */
|
|
2662
|
+
startAdornment: /* @__PURE__ */ React41.createElement(ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
|
|
2521
2663
|
}
|
|
2522
2664
|
}
|
|
2523
|
-
)), /* @__PURE__ */
|
|
2665
|
+
)), /* @__PURE__ */ React41.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(
|
|
2524
2666
|
TextField8,
|
|
2525
2667
|
{
|
|
2526
2668
|
size: "tiny",
|
|
@@ -2530,14 +2672,14 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2530
2672
|
value: customHeight,
|
|
2531
2673
|
onChange: handleCustomHeightChange,
|
|
2532
2674
|
InputProps: {
|
|
2533
|
-
startAdornment: /* @__PURE__ */
|
|
2675
|
+
startAdornment: /* @__PURE__ */ React41.createElement(ArrowsMoveVerticalIcon, { fontSize: "tiny" })
|
|
2534
2676
|
}
|
|
2535
2677
|
}
|
|
2536
2678
|
)))));
|
|
2537
2679
|
});
|
|
2538
2680
|
|
|
2539
2681
|
// src/controls/svg-media-control.tsx
|
|
2540
|
-
import * as
|
|
2682
|
+
import * as React43 from "react";
|
|
2541
2683
|
import { useState as useState10 } from "react";
|
|
2542
2684
|
import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
|
|
2543
2685
|
import { UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
@@ -2546,7 +2688,7 @@ import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWp
|
|
|
2546
2688
|
import { __ as __13 } from "@wordpress/i18n";
|
|
2547
2689
|
|
|
2548
2690
|
// src/components/enable-unfiltered-modal.tsx
|
|
2549
|
-
import * as
|
|
2691
|
+
import * as React42 from "react";
|
|
2550
2692
|
import { useState as useState9 } from "react";
|
|
2551
2693
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
2552
2694
|
import {
|
|
@@ -2599,9 +2741,9 @@ var EnableUnfilteredModal = (props) => {
|
|
|
2599
2741
|
}
|
|
2600
2742
|
};
|
|
2601
2743
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
2602
|
-
return canManageOptions ? /* @__PURE__ */
|
|
2744
|
+
return canManageOptions ? /* @__PURE__ */ React42.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React42.createElement(NonAdminDialog, { ...dialogProps });
|
|
2603
2745
|
};
|
|
2604
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
2746
|
+
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React42.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React42.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React42.createElement(DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React42.createElement(Divider3, null), /* @__PURE__ */ React42.createElement(DialogContent, null, /* @__PURE__ */ React42.createElement(DialogContentText, null, isError ? /* @__PURE__ */ React42.createElement(React42.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React42.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React42.createElement(DialogActions, null, /* @__PURE__ */ React42.createElement(Button3, { size: "medium", color: "secondary", onClick: () => onClose(false) }, __12("Cancel", "elementor")), /* @__PURE__ */ React42.createElement(
|
|
2605
2747
|
Button3,
|
|
2606
2748
|
{
|
|
2607
2749
|
size: "medium",
|
|
@@ -2610,9 +2752,9 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
2610
2752
|
color: "primary",
|
|
2611
2753
|
disabled: isPending
|
|
2612
2754
|
},
|
|
2613
|
-
isPending ? /* @__PURE__ */
|
|
2755
|
+
isPending ? /* @__PURE__ */ React42.createElement(CircularProgress2, { size: 24 }) : __12("Enable", "elementor")
|
|
2614
2756
|
)));
|
|
2615
|
-
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */
|
|
2757
|
+
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */ React42.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React42.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React42.createElement(DialogTitle, null, NON_ADMIN_TITLE_TEXT)), /* @__PURE__ */ React42.createElement(Divider3, null), /* @__PURE__ */ React42.createElement(DialogContent, null, /* @__PURE__ */ React42.createElement(DialogContentText, null, NON_ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React42.createElement(DialogActions, null, /* @__PURE__ */ React42.createElement(Button3, { size: "medium", onClick: () => onClose(false), variant: "contained", color: "primary" }, __12("Got it", "elementor"))));
|
|
2616
2758
|
|
|
2617
2759
|
// src/controls/svg-media-control.tsx
|
|
2618
2760
|
var TILE_SIZE = 8;
|
|
@@ -2673,7 +2815,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2673
2815
|
open(openOptions);
|
|
2674
2816
|
}
|
|
2675
2817
|
};
|
|
2676
|
-
return /* @__PURE__ */
|
|
2818
|
+
return /* @__PURE__ */ React43.createElement(Stack13, { gap: 1 }, /* @__PURE__ */ React43.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React43.createElement(ControlActions, null, /* @__PURE__ */ React43.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React43.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React43.createElement(CircularProgress3, { role: "progressbar" }) : /* @__PURE__ */ React43.createElement(
|
|
2677
2819
|
CardMedia2,
|
|
2678
2820
|
{
|
|
2679
2821
|
component: "img",
|
|
@@ -2681,7 +2823,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2681
2823
|
alt: __13("Preview SVG", "elementor"),
|
|
2682
2824
|
sx: { maxHeight: "140px", width: "50px" }
|
|
2683
2825
|
}
|
|
2684
|
-
)), /* @__PURE__ */
|
|
2826
|
+
)), /* @__PURE__ */ React43.createElement(
|
|
2685
2827
|
CardOverlay2,
|
|
2686
2828
|
{
|
|
2687
2829
|
sx: {
|
|
@@ -2690,7 +2832,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2690
2832
|
}
|
|
2691
2833
|
}
|
|
2692
2834
|
},
|
|
2693
|
-
/* @__PURE__ */
|
|
2835
|
+
/* @__PURE__ */ React43.createElement(Stack13, { gap: 1 }, /* @__PURE__ */ React43.createElement(
|
|
2694
2836
|
Button4,
|
|
2695
2837
|
{
|
|
2696
2838
|
size: "tiny",
|
|
@@ -2699,13 +2841,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
2699
2841
|
onClick: () => handleClick(MODE_BROWSE)
|
|
2700
2842
|
},
|
|
2701
2843
|
__13("Select SVG", "elementor")
|
|
2702
|
-
), /* @__PURE__ */
|
|
2844
|
+
), /* @__PURE__ */ React43.createElement(
|
|
2703
2845
|
Button4,
|
|
2704
2846
|
{
|
|
2705
2847
|
size: "tiny",
|
|
2706
2848
|
variant: "text",
|
|
2707
2849
|
color: "inherit",
|
|
2708
|
-
startIcon: /* @__PURE__ */
|
|
2850
|
+
startIcon: /* @__PURE__ */ React43.createElement(UploadIcon2, null),
|
|
2709
2851
|
onClick: () => handleClick(MODE_UPLOAD)
|
|
2710
2852
|
},
|
|
2711
2853
|
__13("Upload", "elementor")
|
|
@@ -2714,21 +2856,21 @@ var SvgMediaControl = createControl(() => {
|
|
|
2714
2856
|
});
|
|
2715
2857
|
|
|
2716
2858
|
// src/controls/background-control/background-control.tsx
|
|
2717
|
-
import * as
|
|
2859
|
+
import * as React50 from "react";
|
|
2718
2860
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
2719
2861
|
import { isExperimentActive as isExperimentActive4 } from "@elementor/editor-v1-adapters";
|
|
2720
2862
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
2721
2863
|
import { __ as __19 } from "@wordpress/i18n";
|
|
2722
2864
|
|
|
2723
2865
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
2724
|
-
import * as
|
|
2866
|
+
import * as React49 from "react";
|
|
2725
2867
|
import {
|
|
2726
2868
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
2727
2869
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
2728
2870
|
backgroundOverlayPropTypeUtil,
|
|
2729
2871
|
colorPropTypeUtil as colorPropTypeUtil3
|
|
2730
2872
|
} from "@elementor/editor-props";
|
|
2731
|
-
import { Box as
|
|
2873
|
+
import { Box as Box7, CardMedia as CardMedia3, Grid as Grid14, styled as styled5, Tab, TabPanel, Tabs, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
2732
2874
|
import { useWpMediaAttachment as useWpMediaAttachment3 } from "@elementor/wp-media";
|
|
2733
2875
|
import { __ as __18 } from "@wordpress/i18n";
|
|
2734
2876
|
|
|
@@ -2737,7 +2879,7 @@ import { parseEnv } from "@elementor/env";
|
|
|
2737
2879
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
2738
2880
|
|
|
2739
2881
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
2740
|
-
import * as
|
|
2882
|
+
import * as React44 from "react";
|
|
2741
2883
|
import {
|
|
2742
2884
|
backgroundGradientOverlayPropTypeUtil,
|
|
2743
2885
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -2784,7 +2926,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
2784
2926
|
positions: positions?.value.split(" ")
|
|
2785
2927
|
};
|
|
2786
2928
|
};
|
|
2787
|
-
return /* @__PURE__ */
|
|
2929
|
+
return /* @__PURE__ */ React44.createElement(ControlActions, null, /* @__PURE__ */ React44.createElement(
|
|
2788
2930
|
UnstableGradientBox,
|
|
2789
2931
|
{
|
|
2790
2932
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -2809,7 +2951,7 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
2809
2951
|
});
|
|
2810
2952
|
|
|
2811
2953
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
2812
|
-
import * as
|
|
2954
|
+
import * as React45 from "react";
|
|
2813
2955
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
2814
2956
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
2815
2957
|
import { __ as __14 } from "@wordpress/i18n";
|
|
@@ -2817,27 +2959,27 @@ var attachmentControlOptions = [
|
|
|
2817
2959
|
{
|
|
2818
2960
|
value: "fixed",
|
|
2819
2961
|
label: __14("Fixed", "elementor"),
|
|
2820
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2962
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(PinIcon, { fontSize: size }),
|
|
2821
2963
|
showTooltip: true
|
|
2822
2964
|
},
|
|
2823
2965
|
{
|
|
2824
2966
|
value: "scroll",
|
|
2825
2967
|
label: __14("Scroll", "elementor"),
|
|
2826
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2968
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(PinnedOffIcon, { fontSize: size }),
|
|
2827
2969
|
showTooltip: true
|
|
2828
2970
|
}
|
|
2829
2971
|
];
|
|
2830
2972
|
var BackgroundImageOverlayAttachment = () => {
|
|
2831
|
-
return /* @__PURE__ */
|
|
2973
|
+
return /* @__PURE__ */ React45.createElement(PopoverGridContainer, null, /* @__PURE__ */ React45.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlFormLabel, null, __14("Attachment", "elementor"))), /* @__PURE__ */ React45.createElement(Grid10, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React45.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
2832
2974
|
};
|
|
2833
2975
|
|
|
2834
2976
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
2835
|
-
import * as
|
|
2836
|
-
import { useRef as
|
|
2977
|
+
import * as React46 from "react";
|
|
2978
|
+
import { useRef as useRef9 } from "react";
|
|
2837
2979
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil9 } from "@elementor/editor-props";
|
|
2838
|
-
import { MenuListItem as
|
|
2980
|
+
import { MenuListItem as MenuListItem5 } from "@elementor/editor-ui";
|
|
2839
2981
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
2840
|
-
import { Grid as Grid11, Select as
|
|
2982
|
+
import { Grid as Grid11, Select as Select4 } from "@elementor/ui";
|
|
2841
2983
|
import { __ as __15 } from "@wordpress/i18n";
|
|
2842
2984
|
var backgroundPositionOptions = [
|
|
2843
2985
|
{ label: __15("Center center", "elementor"), value: "center center" },
|
|
@@ -2855,7 +2997,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2855
2997
|
const backgroundImageOffsetContext = useBoundProp(backgroundImagePositionOffsetPropTypeUtil);
|
|
2856
2998
|
const stringPropContext = useBoundProp(stringPropTypeUtil9);
|
|
2857
2999
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
2858
|
-
const rowRef =
|
|
3000
|
+
const rowRef = useRef9(null);
|
|
2859
3001
|
const handlePositionChange = (event) => {
|
|
2860
3002
|
const value = event.target.value || null;
|
|
2861
3003
|
if (value === "custom") {
|
|
@@ -2864,8 +3006,8 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2864
3006
|
stringPropContext.setValue(value);
|
|
2865
3007
|
}
|
|
2866
3008
|
};
|
|
2867
|
-
return /* @__PURE__ */
|
|
2868
|
-
|
|
3009
|
+
return /* @__PURE__ */ React46.createElement(Grid11, { container: true, spacing: 1.5 }, /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(PopoverGridContainer, null, /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlFormLabel, null, __15("Position", "elementor"))), /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React46.createElement(
|
|
3010
|
+
Select4,
|
|
2869
3011
|
{
|
|
2870
3012
|
fullWidth: true,
|
|
2871
3013
|
size: "tiny",
|
|
@@ -2873,24 +3015,24 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2873
3015
|
disabled: stringPropContext.disabled,
|
|
2874
3016
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
2875
3017
|
},
|
|
2876
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
2877
|
-
)))), isCustom ? /* @__PURE__ */
|
|
3018
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React46.createElement(MenuListItem5, { key: value, value: value ?? "" }, label))
|
|
3019
|
+
)))), isCustom ? /* @__PURE__ */ React46.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(Grid11, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React46.createElement(
|
|
2878
3020
|
SizeControl,
|
|
2879
3021
|
{
|
|
2880
|
-
startIcon: /* @__PURE__ */
|
|
3022
|
+
startIcon: /* @__PURE__ */ React46.createElement(LetterXIcon, { fontSize: "tiny" }),
|
|
2881
3023
|
anchorRef: rowRef
|
|
2882
3024
|
}
|
|
2883
|
-
))), /* @__PURE__ */
|
|
3025
|
+
))), /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React46.createElement(
|
|
2884
3026
|
SizeControl,
|
|
2885
3027
|
{
|
|
2886
|
-
startIcon: /* @__PURE__ */
|
|
3028
|
+
startIcon: /* @__PURE__ */ React46.createElement(LetterYIcon, { fontSize: "tiny" }),
|
|
2887
3029
|
anchorRef: rowRef
|
|
2888
3030
|
}
|
|
2889
3031
|
)))))) : null);
|
|
2890
3032
|
};
|
|
2891
3033
|
|
|
2892
3034
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
2893
|
-
import * as
|
|
3035
|
+
import * as React47 from "react";
|
|
2894
3036
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon3 } from "@elementor/icons";
|
|
2895
3037
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
2896
3038
|
import { __ as __16 } from "@wordpress/i18n";
|
|
@@ -2898,35 +3040,35 @@ var repeatControlOptions = [
|
|
|
2898
3040
|
{
|
|
2899
3041
|
value: "repeat",
|
|
2900
3042
|
label: __16("Repeat", "elementor"),
|
|
2901
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3043
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(GridDotsIcon, { fontSize: size }),
|
|
2902
3044
|
showTooltip: true
|
|
2903
3045
|
},
|
|
2904
3046
|
{
|
|
2905
3047
|
value: "repeat-x",
|
|
2906
3048
|
label: __16("Repeat-x", "elementor"),
|
|
2907
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3049
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
2908
3050
|
showTooltip: true
|
|
2909
3051
|
},
|
|
2910
3052
|
{
|
|
2911
3053
|
value: "repeat-y",
|
|
2912
3054
|
label: __16("Repeat-y", "elementor"),
|
|
2913
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3055
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
2914
3056
|
showTooltip: true
|
|
2915
3057
|
},
|
|
2916
3058
|
{
|
|
2917
3059
|
value: "no-repeat",
|
|
2918
3060
|
label: __16("No-repeat", "elementor"),
|
|
2919
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3061
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(XIcon3, { fontSize: size }),
|
|
2920
3062
|
showTooltip: true
|
|
2921
3063
|
}
|
|
2922
3064
|
];
|
|
2923
3065
|
var BackgroundImageOverlayRepeat = () => {
|
|
2924
|
-
return /* @__PURE__ */
|
|
3066
|
+
return /* @__PURE__ */ React47.createElement(PopoverGridContainer, null, /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlFormLabel, null, __16("Repeat", "elementor"))), /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React47.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
2925
3067
|
};
|
|
2926
3068
|
|
|
2927
3069
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
2928
|
-
import * as
|
|
2929
|
-
import { useRef as
|
|
3070
|
+
import * as React48 from "react";
|
|
3071
|
+
import { useRef as useRef10 } from "react";
|
|
2930
3072
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil10 } from "@elementor/editor-props";
|
|
2931
3073
|
import {
|
|
2932
3074
|
ArrowBarBothIcon,
|
|
@@ -2942,25 +3084,25 @@ var sizeControlOptions = [
|
|
|
2942
3084
|
{
|
|
2943
3085
|
value: "auto",
|
|
2944
3086
|
label: __17("Auto", "elementor"),
|
|
2945
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3087
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(LetterAIcon, { fontSize: size }),
|
|
2946
3088
|
showTooltip: true
|
|
2947
3089
|
},
|
|
2948
3090
|
{
|
|
2949
3091
|
value: "cover",
|
|
2950
3092
|
label: __17("Cover", "elementor"),
|
|
2951
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3093
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
2952
3094
|
showTooltip: true
|
|
2953
3095
|
},
|
|
2954
3096
|
{
|
|
2955
3097
|
value: "contain",
|
|
2956
3098
|
label: __17("Contain", "elementor"),
|
|
2957
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3099
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
2958
3100
|
showTooltip: true
|
|
2959
3101
|
},
|
|
2960
3102
|
{
|
|
2961
3103
|
value: "custom",
|
|
2962
3104
|
label: __17("Custom", "elementor"),
|
|
2963
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3105
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(PencilIcon2, { fontSize: size }),
|
|
2964
3106
|
showTooltip: true
|
|
2965
3107
|
}
|
|
2966
3108
|
];
|
|
@@ -2968,7 +3110,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2968
3110
|
const backgroundImageScaleContext = useBoundProp(backgroundImageSizeScalePropTypeUtil);
|
|
2969
3111
|
const stringPropContext = useBoundProp(stringPropTypeUtil10);
|
|
2970
3112
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
2971
|
-
const rowRef =
|
|
3113
|
+
const rowRef = useRef10(null);
|
|
2972
3114
|
const handleSizeChange = (size) => {
|
|
2973
3115
|
if (size === "custom") {
|
|
2974
3116
|
backgroundImageScaleContext.setValue({ width: null, height: null });
|
|
@@ -2976,7 +3118,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2976
3118
|
stringPropContext.setValue(size);
|
|
2977
3119
|
}
|
|
2978
3120
|
};
|
|
2979
|
-
return /* @__PURE__ */
|
|
3121
|
+
return /* @__PURE__ */ React48.createElement(Grid13, { container: true, spacing: 1.5 }, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React48.createElement(PopoverGridContainer, null, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlFormLabel, null, __17("Size", "elementor"))), /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React48.createElement(
|
|
2980
3122
|
ControlToggleButtonGroup,
|
|
2981
3123
|
{
|
|
2982
3124
|
exclusive: true,
|
|
@@ -2985,17 +3127,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2985
3127
|
disabled: stringPropContext.disabled,
|
|
2986
3128
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
2987
3129
|
}
|
|
2988
|
-
)))), isCustom ? /* @__PURE__ */
|
|
3130
|
+
)))), isCustom ? /* @__PURE__ */ React48.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React48.createElement(PopoverGridContainer, null, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React48.createElement(
|
|
2989
3131
|
SizeControl,
|
|
2990
3132
|
{
|
|
2991
|
-
startIcon: /* @__PURE__ */
|
|
3133
|
+
startIcon: /* @__PURE__ */ React48.createElement(ArrowsMoveHorizontalIcon2, { fontSize: "tiny" }),
|
|
2992
3134
|
extendedOptions: ["auto"],
|
|
2993
3135
|
anchorRef: rowRef
|
|
2994
3136
|
}
|
|
2995
|
-
))), /* @__PURE__ */
|
|
3137
|
+
))), /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React48.createElement(
|
|
2996
3138
|
SizeControl,
|
|
2997
3139
|
{
|
|
2998
|
-
startIcon: /* @__PURE__ */
|
|
3140
|
+
startIcon: /* @__PURE__ */ React48.createElement(ArrowsMoveVerticalIcon2, { fontSize: "tiny" }),
|
|
2999
3141
|
extendedOptions: ["auto"],
|
|
3000
3142
|
anchorRef: rowRef
|
|
3001
3143
|
}
|
|
@@ -3003,7 +3145,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
3003
3145
|
};
|
|
3004
3146
|
|
|
3005
3147
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
3006
|
-
import { useRef as
|
|
3148
|
+
import { useRef as useRef11 } from "react";
|
|
3007
3149
|
import {
|
|
3008
3150
|
backgroundColorOverlayPropTypeUtil,
|
|
3009
3151
|
backgroundGradientOverlayPropTypeUtil as backgroundGradientOverlayPropTypeUtil2,
|
|
@@ -3028,7 +3170,7 @@ var useBackgroundTabsHistory = ({
|
|
|
3028
3170
|
return "image";
|
|
3029
3171
|
};
|
|
3030
3172
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs(getCurrentOverlayType());
|
|
3031
|
-
const valuesHistory =
|
|
3173
|
+
const valuesHistory = useRef11({
|
|
3032
3174
|
image: initialBackgroundImageOverlay,
|
|
3033
3175
|
color: initialBackgroundColorOverlay2,
|
|
3034
3176
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -3103,7 +3245,7 @@ var backgroundResolutionOptions = [
|
|
|
3103
3245
|
];
|
|
3104
3246
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
3105
3247
|
const { propType, value: overlayValues, setValue, disabled } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
3106
|
-
return /* @__PURE__ */
|
|
3248
|
+
return /* @__PURE__ */ React49.createElement(PropProvider, { propType, value: overlayValues, setValue, disabled }, /* @__PURE__ */ React49.createElement(
|
|
3107
3249
|
Repeater,
|
|
3108
3250
|
{
|
|
3109
3251
|
openOnAdd: true,
|
|
@@ -3112,24 +3254,24 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
|
3112
3254
|
setValues: setValue,
|
|
3113
3255
|
label: __18("Overlay", "elementor"),
|
|
3114
3256
|
itemSettings: {
|
|
3115
|
-
Icon:
|
|
3116
|
-
Label:
|
|
3117
|
-
Content:
|
|
3257
|
+
Icon: ItemIcon3,
|
|
3258
|
+
Label: ItemLabel3,
|
|
3259
|
+
Content: ItemContent3,
|
|
3118
3260
|
initialValues: getInitialBackgroundOverlay()
|
|
3119
3261
|
}
|
|
3120
3262
|
}
|
|
3121
3263
|
));
|
|
3122
3264
|
});
|
|
3123
|
-
var
|
|
3124
|
-
return /* @__PURE__ */
|
|
3265
|
+
var ItemContent3 = ({ anchorEl = null, bind }) => {
|
|
3266
|
+
return /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React49.createElement(Content3, { anchorEl }));
|
|
3125
3267
|
};
|
|
3126
|
-
var
|
|
3268
|
+
var Content3 = ({ anchorEl }) => {
|
|
3127
3269
|
const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
|
|
3128
3270
|
image: getInitialBackgroundOverlay().value,
|
|
3129
3271
|
color: initialBackgroundColorOverlay.value,
|
|
3130
3272
|
gradient: initialBackgroundGradientOverlay.value
|
|
3131
3273
|
});
|
|
3132
|
-
return /* @__PURE__ */
|
|
3274
|
+
return /* @__PURE__ */ React49.createElement(Box7, { sx: { width: "100%" } }, /* @__PURE__ */ React49.createElement(Box7, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React49.createElement(
|
|
3133
3275
|
Tabs,
|
|
3134
3276
|
{
|
|
3135
3277
|
size: "small",
|
|
@@ -3137,19 +3279,19 @@ var Content2 = ({ anchorEl }) => {
|
|
|
3137
3279
|
...getTabsProps(),
|
|
3138
3280
|
"aria-label": __18("Background Overlay", "elementor")
|
|
3139
3281
|
},
|
|
3140
|
-
/* @__PURE__ */
|
|
3141
|
-
/* @__PURE__ */
|
|
3142
|
-
/* @__PURE__ */
|
|
3143
|
-
)), /* @__PURE__ */
|
|
3282
|
+
/* @__PURE__ */ React49.createElement(Tab, { label: __18("Image", "elementor"), ...getTabProps("image") }),
|
|
3283
|
+
/* @__PURE__ */ React49.createElement(Tab, { label: __18("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
3284
|
+
/* @__PURE__ */ React49.createElement(Tab, { label: __18("Color", "elementor"), ...getTabProps("color") })
|
|
3285
|
+
)), /* @__PURE__ */ React49.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React49.createElement(PopoverContent, null, /* @__PURE__ */ React49.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React49.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React49.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React49.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React49.createElement(PopoverContent, null, /* @__PURE__ */ React49.createElement(ColorOverlayContent, { anchorEl }))));
|
|
3144
3286
|
};
|
|
3145
|
-
var
|
|
3287
|
+
var ItemIcon3 = ({ value }) => {
|
|
3146
3288
|
switch (value.$$type) {
|
|
3147
3289
|
case "background-image-overlay":
|
|
3148
|
-
return /* @__PURE__ */
|
|
3290
|
+
return /* @__PURE__ */ React49.createElement(ItemIconImage, { value });
|
|
3149
3291
|
case "background-color-overlay":
|
|
3150
|
-
return /* @__PURE__ */
|
|
3292
|
+
return /* @__PURE__ */ React49.createElement(ItemIconColor, { value });
|
|
3151
3293
|
case "background-gradient-overlay":
|
|
3152
|
-
return /* @__PURE__ */
|
|
3294
|
+
return /* @__PURE__ */ React49.createElement(ItemIconGradient, { value });
|
|
3153
3295
|
default:
|
|
3154
3296
|
return null;
|
|
3155
3297
|
}
|
|
@@ -3162,11 +3304,11 @@ var extractColorFrom = (prop) => {
|
|
|
3162
3304
|
};
|
|
3163
3305
|
var ItemIconColor = ({ value: prop }) => {
|
|
3164
3306
|
const color = extractColorFrom(prop);
|
|
3165
|
-
return /* @__PURE__ */
|
|
3307
|
+
return /* @__PURE__ */ React49.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
3166
3308
|
};
|
|
3167
3309
|
var ItemIconImage = ({ value }) => {
|
|
3168
3310
|
const { imageUrl } = useImage(value);
|
|
3169
|
-
return /* @__PURE__ */
|
|
3311
|
+
return /* @__PURE__ */ React49.createElement(
|
|
3170
3312
|
CardMedia3,
|
|
3171
3313
|
{
|
|
3172
3314
|
image: imageUrl,
|
|
@@ -3181,47 +3323,41 @@ var ItemIconImage = ({ value }) => {
|
|
|
3181
3323
|
};
|
|
3182
3324
|
var ItemIconGradient = ({ value }) => {
|
|
3183
3325
|
const gradient = getGradientValue(value);
|
|
3184
|
-
return /* @__PURE__ */
|
|
3326
|
+
return /* @__PURE__ */ React49.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
3185
3327
|
};
|
|
3186
|
-
var
|
|
3328
|
+
var ItemLabel3 = ({ value }) => {
|
|
3187
3329
|
switch (value.$$type) {
|
|
3188
3330
|
case "background-image-overlay":
|
|
3189
|
-
return /* @__PURE__ */
|
|
3331
|
+
return /* @__PURE__ */ React49.createElement(ItemLabelImage, { value });
|
|
3190
3332
|
case "background-color-overlay":
|
|
3191
|
-
return /* @__PURE__ */
|
|
3333
|
+
return /* @__PURE__ */ React49.createElement(ItemLabelColor, { value });
|
|
3192
3334
|
case "background-gradient-overlay":
|
|
3193
|
-
return /* @__PURE__ */
|
|
3335
|
+
return /* @__PURE__ */ React49.createElement(ItemLabelGradient, { value });
|
|
3194
3336
|
default:
|
|
3195
3337
|
return null;
|
|
3196
3338
|
}
|
|
3197
3339
|
};
|
|
3198
3340
|
var ItemLabelColor = ({ value: prop }) => {
|
|
3199
3341
|
const color = extractColorFrom(prop);
|
|
3200
|
-
return /* @__PURE__ */
|
|
3342
|
+
return /* @__PURE__ */ React49.createElement("span", null, color);
|
|
3201
3343
|
};
|
|
3202
3344
|
var ItemLabelImage = ({ value }) => {
|
|
3203
3345
|
const { imageTitle } = useImage(value);
|
|
3204
|
-
return /* @__PURE__ */
|
|
3346
|
+
return /* @__PURE__ */ React49.createElement("span", null, imageTitle);
|
|
3205
3347
|
};
|
|
3206
3348
|
var ItemLabelGradient = ({ value }) => {
|
|
3207
3349
|
if (value.value.type.value === "linear") {
|
|
3208
|
-
return /* @__PURE__ */
|
|
3350
|
+
return /* @__PURE__ */ React49.createElement("span", null, __18("Linear Gradient", "elementor"));
|
|
3209
3351
|
}
|
|
3210
|
-
return /* @__PURE__ */
|
|
3352
|
+
return /* @__PURE__ */ React49.createElement("span", null, __18("Radial Gradient", "elementor"));
|
|
3211
3353
|
};
|
|
3212
3354
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
3213
3355
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
3214
|
-
return /* @__PURE__ */
|
|
3356
|
+
return /* @__PURE__ */ React49.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React49.createElement(ColorControl, { anchorEl })));
|
|
3215
3357
|
};
|
|
3216
3358
|
var ImageOverlayContent = () => {
|
|
3217
3359
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
3218
|
-
return /* @__PURE__ */
|
|
3219
|
-
ImageControl,
|
|
3220
|
-
{
|
|
3221
|
-
resolutionLabel: __18("Resolution", "elementor"),
|
|
3222
|
-
sizes: backgroundResolutionOptions
|
|
3223
|
-
}
|
|
3224
|
-
)))), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React48.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React48.createElement(BackgroundImageOverlayAttachment, null)));
|
|
3360
|
+
return /* @__PURE__ */ React49.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React49.createElement(Grid14, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React49.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React49.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlFormLabel, null, __18("Resolution", "elementor"))), /* @__PURE__ */ React49.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React49.createElement(ImageControl, { sizes: backgroundResolutionOptions })))))), /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React49.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React49.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React49.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React49.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React49.createElement(BackgroundImageOverlayAttachment, null)));
|
|
3225
3361
|
};
|
|
3226
3362
|
var StyledUnstableColorIndicator = styled5(UnstableColorIndicator2)(({ theme }) => ({
|
|
3227
3363
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -3261,11 +3397,11 @@ var BackgroundControl = createControl(() => {
|
|
|
3261
3397
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
3262
3398
|
const isUsingNestedProps = isExperimentActive4("e_v_3_30");
|
|
3263
3399
|
const colorLabel = __19("Color", "elementor");
|
|
3264
|
-
return /* @__PURE__ */
|
|
3400
|
+
return /* @__PURE__ */ React50.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React50.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React50.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React50.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid15, { item: true, xs: 6 }, isUsingNestedProps ? /* @__PURE__ */ React50.createElement(ControlLabel, null, colorLabel) : /* @__PURE__ */ React50.createElement(ControlFormLabel, null, colorLabel)), /* @__PURE__ */ React50.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ColorControl, null)))));
|
|
3265
3401
|
});
|
|
3266
3402
|
|
|
3267
3403
|
// src/controls/switch-control.tsx
|
|
3268
|
-
import * as
|
|
3404
|
+
import * as React51 from "react";
|
|
3269
3405
|
import { booleanPropTypeUtil as booleanPropTypeUtil2 } from "@elementor/editor-props";
|
|
3270
3406
|
import { Switch as Switch2 } from "@elementor/ui";
|
|
3271
3407
|
var SwitchControl2 = createControl(() => {
|
|
@@ -3273,14 +3409,14 @@ var SwitchControl2 = createControl(() => {
|
|
|
3273
3409
|
const handleChange = (event) => {
|
|
3274
3410
|
setValue(event.target.checked);
|
|
3275
3411
|
};
|
|
3276
|
-
return /* @__PURE__ */
|
|
3412
|
+
return /* @__PURE__ */ React51.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React51.createElement(Switch2, { checked: !!value, onChange: handleChange, size: "small", disabled }));
|
|
3277
3413
|
});
|
|
3278
3414
|
|
|
3279
3415
|
// src/controls/repeatable-control.tsx
|
|
3280
|
-
import * as
|
|
3416
|
+
import * as React52 from "react";
|
|
3281
3417
|
import { useMemo as useMemo4 } from "react";
|
|
3282
3418
|
import { createArrayPropUtils } from "@elementor/editor-props";
|
|
3283
|
-
import {
|
|
3419
|
+
import { Box as Box8 } from "@elementor/ui";
|
|
3284
3420
|
|
|
3285
3421
|
// src/hooks/use-repeatable-control-context.ts
|
|
3286
3422
|
import { createContext as createContext6, useContext as useContext6 } from "react";
|
|
@@ -3295,7 +3431,15 @@ var useRepeatableControlContext = () => {
|
|
|
3295
3431
|
|
|
3296
3432
|
// src/controls/repeatable-control.tsx
|
|
3297
3433
|
var RepeatableControl = createControl(
|
|
3298
|
-
({
|
|
3434
|
+
({
|
|
3435
|
+
repeaterLabel,
|
|
3436
|
+
childControlConfig,
|
|
3437
|
+
showDuplicate,
|
|
3438
|
+
showToggle,
|
|
3439
|
+
initialValues,
|
|
3440
|
+
patternLabel,
|
|
3441
|
+
placeholder
|
|
3442
|
+
}) => {
|
|
3299
3443
|
const { propTypeUtil: childPropTypeUtil } = childControlConfig;
|
|
3300
3444
|
if (!childPropTypeUtil) {
|
|
3301
3445
|
return null;
|
|
@@ -3305,18 +3449,27 @@ var RepeatableControl = createControl(
|
|
|
3305
3449
|
[childPropTypeUtil.key, childPropTypeUtil.schema]
|
|
3306
3450
|
);
|
|
3307
3451
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
3308
|
-
|
|
3452
|
+
const ItemLabel4 = ({ value: itemValue }) => {
|
|
3453
|
+
const pattern = patternLabel || "";
|
|
3454
|
+
const finalLabel = interpolate(pattern, itemValue.value);
|
|
3455
|
+
if (finalLabel) {
|
|
3456
|
+
return /* @__PURE__ */ React52.createElement("span", null, finalLabel);
|
|
3457
|
+
}
|
|
3458
|
+
return /* @__PURE__ */ React52.createElement(Box8, { component: "span", color: "text.tertiary" }, placeholder);
|
|
3459
|
+
};
|
|
3460
|
+
return /* @__PURE__ */ React52.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React52.createElement(RepeatableControlContext.Provider, { value: childControlConfig }, /* @__PURE__ */ React52.createElement(
|
|
3309
3461
|
Repeater,
|
|
3310
3462
|
{
|
|
3311
3463
|
openOnAdd: true,
|
|
3312
3464
|
values: value ?? [],
|
|
3313
3465
|
setValues: setValue,
|
|
3314
|
-
label,
|
|
3466
|
+
label: repeaterLabel,
|
|
3467
|
+
isSortable: false,
|
|
3315
3468
|
itemSettings: {
|
|
3316
|
-
Icon:
|
|
3317
|
-
Label:
|
|
3318
|
-
Content:
|
|
3319
|
-
initialValues: childPropTypeUtil.create(null)
|
|
3469
|
+
Icon: ItemIcon4,
|
|
3470
|
+
Label: ItemLabel4,
|
|
3471
|
+
Content: ItemContent4,
|
|
3472
|
+
initialValues: childPropTypeUtil.create(initialValues || null)
|
|
3320
3473
|
},
|
|
3321
3474
|
showDuplicate,
|
|
3322
3475
|
showToggle
|
|
@@ -3324,106 +3477,127 @@ var RepeatableControl = createControl(
|
|
|
3324
3477
|
)));
|
|
3325
3478
|
}
|
|
3326
3479
|
);
|
|
3327
|
-
var
|
|
3328
|
-
return /* @__PURE__ */
|
|
3480
|
+
var ItemContent4 = ({ bind }) => {
|
|
3481
|
+
return /* @__PURE__ */ React52.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React52.createElement(Content4, null));
|
|
3329
3482
|
};
|
|
3330
|
-
var
|
|
3331
|
-
var
|
|
3483
|
+
var ItemIcon4 = () => /* @__PURE__ */ React52.createElement(React52.Fragment, null);
|
|
3484
|
+
var Content4 = () => {
|
|
3332
3485
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
3333
|
-
return /* @__PURE__ */
|
|
3486
|
+
return /* @__PURE__ */ React52.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React52.createElement(PopoverGridContainer, null, /* @__PURE__ */ React52.createElement(ChildControl, { ...props })));
|
|
3334
3487
|
};
|
|
3335
|
-
var
|
|
3336
|
-
|
|
3337
|
-
|
|
3488
|
+
var interpolate = (template, data) => {
|
|
3489
|
+
if (Object.values(data).some((value) => value.value === "" || value === "")) {
|
|
3490
|
+
return null;
|
|
3491
|
+
}
|
|
3492
|
+
return new Function(...Object.keys(data), `return \`${template}\`;`)(...Object.values(data));
|
|
3338
3493
|
};
|
|
3339
3494
|
|
|
3340
3495
|
// src/controls/key-value-control.tsx
|
|
3341
|
-
import * as
|
|
3496
|
+
import * as React53 from "react";
|
|
3342
3497
|
import { useMemo as useMemo5, useState as useState11 } from "react";
|
|
3343
3498
|
import { keyValuePropTypeUtil } from "@elementor/editor-props";
|
|
3344
3499
|
import { FormHelperText, FormLabel as FormLabel3, Grid as Grid16, TextField as TextField9 } from "@elementor/ui";
|
|
3345
|
-
import { __ as
|
|
3500
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
3346
3501
|
var KeyValueControl = createControl((props = {}) => {
|
|
3347
3502
|
const { value, setValue } = useBoundProp(keyValuePropTypeUtil);
|
|
3348
3503
|
const [keyError, setKeyError] = useState11(null);
|
|
3349
3504
|
const [valueError, setValueError] = useState11(null);
|
|
3350
|
-
const
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3505
|
+
const [sessionState, setSessionState] = useState11({
|
|
3506
|
+
key: value?.key?.value || "",
|
|
3507
|
+
value: value?.value?.value || ""
|
|
3508
|
+
});
|
|
3509
|
+
const keyLabel = props.keyName || __20("Key", "elementor");
|
|
3510
|
+
const valueLabel = props.valueName || __20("Value", "elementor");
|
|
3354
3511
|
const [keyRegex, valueRegex, errMsg] = useMemo5(
|
|
3355
3512
|
() => [
|
|
3356
3513
|
props.regexKey ? new RegExp(props.regexKey) : void 0,
|
|
3357
3514
|
props.regexValue ? new RegExp(props.regexValue) : void 0,
|
|
3358
|
-
props.validationErrorMessage ||
|
|
3515
|
+
props.validationErrorMessage || __20("Invalid Format", "elementor")
|
|
3359
3516
|
],
|
|
3360
3517
|
[props.regexKey, props.regexValue, props.validationErrorMessage]
|
|
3361
3518
|
);
|
|
3362
|
-
const validate = (newValue,
|
|
3363
|
-
if (
|
|
3519
|
+
const validate = (newValue, fieldType) => {
|
|
3520
|
+
if (fieldType === "key" && keyRegex) {
|
|
3364
3521
|
const isValid = keyRegex.test(newValue);
|
|
3365
3522
|
setKeyError(isValid ? null : errMsg);
|
|
3366
|
-
|
|
3523
|
+
return isValid;
|
|
3524
|
+
} else if (fieldType === "value" && valueRegex) {
|
|
3367
3525
|
const isValid = valueRegex.test(newValue);
|
|
3368
3526
|
setValueError(isValid ? null : errMsg);
|
|
3527
|
+
return isValid;
|
|
3369
3528
|
}
|
|
3529
|
+
return true;
|
|
3370
3530
|
};
|
|
3371
3531
|
const handleChange = (event, fieldType) => {
|
|
3372
3532
|
const newValue = event.target.value;
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3533
|
+
setSessionState((prev) => ({
|
|
3534
|
+
...prev,
|
|
3535
|
+
[fieldType]: newValue
|
|
3536
|
+
}));
|
|
3537
|
+
if (validate(newValue, fieldType)) {
|
|
3538
|
+
setValue({
|
|
3539
|
+
...value,
|
|
3540
|
+
[fieldType]: {
|
|
3541
|
+
value: newValue,
|
|
3542
|
+
$$type: "string"
|
|
3543
|
+
}
|
|
3544
|
+
});
|
|
3545
|
+
} else {
|
|
3546
|
+
setValue({
|
|
3547
|
+
...value,
|
|
3548
|
+
[fieldType]: {
|
|
3549
|
+
value: "",
|
|
3550
|
+
$$type: "string"
|
|
3551
|
+
}
|
|
3552
|
+
});
|
|
3553
|
+
}
|
|
3381
3554
|
};
|
|
3382
3555
|
const isKeyInvalid = keyError !== null;
|
|
3383
3556
|
const isValueInvalid = valueError !== null;
|
|
3384
|
-
return /* @__PURE__ */
|
|
3557
|
+
return /* @__PURE__ */ React53.createElement(ControlActions, null, /* @__PURE__ */ React53.createElement(Grid16, { container: true, gap: 1.5 }, /* @__PURE__ */ React53.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(FormLabel3, { size: "tiny" }, keyLabel), /* @__PURE__ */ React53.createElement(
|
|
3385
3558
|
TextField9,
|
|
3386
3559
|
{
|
|
3560
|
+
autoFocus: true,
|
|
3387
3561
|
sx: { pt: 1 },
|
|
3388
3562
|
size: "tiny",
|
|
3389
3563
|
fullWidth: true,
|
|
3390
|
-
value:
|
|
3564
|
+
value: sessionState.key,
|
|
3391
3565
|
onChange: (e) => handleChange(e, "key"),
|
|
3392
3566
|
error: isKeyInvalid
|
|
3393
3567
|
}
|
|
3394
|
-
), isKeyInvalid && /* @__PURE__ */
|
|
3568
|
+
), isKeyInvalid && /* @__PURE__ */ React53.createElement(FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React53.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(FormLabel3, { size: "tiny" }, valueLabel), /* @__PURE__ */ React53.createElement(
|
|
3395
3569
|
TextField9,
|
|
3396
3570
|
{
|
|
3397
3571
|
sx: { pt: 1 },
|
|
3398
3572
|
size: "tiny",
|
|
3399
3573
|
fullWidth: true,
|
|
3400
|
-
value:
|
|
3574
|
+
value: sessionState.value,
|
|
3401
3575
|
onChange: (e) => handleChange(e, "value"),
|
|
3402
3576
|
disabled: isKeyInvalid,
|
|
3403
3577
|
error: isValueInvalid
|
|
3404
3578
|
}
|
|
3405
|
-
), isValueInvalid && /* @__PURE__ */
|
|
3579
|
+
), isValueInvalid && /* @__PURE__ */ React53.createElement(FormHelperText, { error: true }, valueError))));
|
|
3406
3580
|
});
|
|
3407
3581
|
|
|
3408
3582
|
// src/controls/position-control.tsx
|
|
3409
|
-
import * as
|
|
3583
|
+
import * as React54 from "react";
|
|
3410
3584
|
import { useMemo as useMemo6 } from "react";
|
|
3411
3585
|
import { positionPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil11 } from "@elementor/editor-props";
|
|
3412
|
-
import { MenuListItem as
|
|
3586
|
+
import { MenuListItem as MenuListItem6 } from "@elementor/editor-ui";
|
|
3413
3587
|
import { isExperimentActive as isExperimentActive5 } from "@elementor/editor-v1-adapters";
|
|
3414
3588
|
import { LetterXIcon as LetterXIcon2, LetterYIcon as LetterYIcon2 } from "@elementor/icons";
|
|
3415
|
-
import { Grid as Grid17, Select as
|
|
3416
|
-
import { __ as
|
|
3589
|
+
import { Grid as Grid17, Select as Select5 } from "@elementor/ui";
|
|
3590
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
3417
3591
|
var positionOptions = [
|
|
3418
|
-
{ label:
|
|
3419
|
-
{ label:
|
|
3420
|
-
{ label:
|
|
3421
|
-
{ label:
|
|
3422
|
-
{ label:
|
|
3423
|
-
{ label:
|
|
3424
|
-
{ label:
|
|
3425
|
-
{ label:
|
|
3426
|
-
{ label:
|
|
3592
|
+
{ label: __21("Center center", "elementor"), value: "center center" },
|
|
3593
|
+
{ label: __21("Center left", "elementor"), value: "center left" },
|
|
3594
|
+
{ label: __21("Center right", "elementor"), value: "center right" },
|
|
3595
|
+
{ label: __21("Top center", "elementor"), value: "top center" },
|
|
3596
|
+
{ label: __21("Top left", "elementor"), value: "top left" },
|
|
3597
|
+
{ label: __21("Top right", "elementor"), value: "top right" },
|
|
3598
|
+
{ label: __21("Bottom center", "elementor"), value: "bottom center" },
|
|
3599
|
+
{ label: __21("Bottom left", "elementor"), value: "bottom left" },
|
|
3600
|
+
{ label: __21("Bottom right", "elementor"), value: "bottom right" }
|
|
3427
3601
|
];
|
|
3428
3602
|
var PositionControl = () => {
|
|
3429
3603
|
const positionContext = useBoundProp(positionPropTypeUtil);
|
|
@@ -3433,7 +3607,7 @@ var PositionControl = () => {
|
|
|
3433
3607
|
const availablePositionOptions = useMemo6(() => {
|
|
3434
3608
|
const options = [...positionOptions];
|
|
3435
3609
|
if (isVersion331Active) {
|
|
3436
|
-
options.push({ label:
|
|
3610
|
+
options.push({ label: __21("Custom", "elementor"), value: "custom" });
|
|
3437
3611
|
}
|
|
3438
3612
|
return options;
|
|
3439
3613
|
}, [isVersion331Active]);
|
|
@@ -3445,8 +3619,8 @@ var PositionControl = () => {
|
|
|
3445
3619
|
stringPropContext.setValue(value);
|
|
3446
3620
|
}
|
|
3447
3621
|
};
|
|
3448
|
-
return /* @__PURE__ */
|
|
3449
|
-
|
|
3622
|
+
return /* @__PURE__ */ React54.createElement(Grid17, { container: true, spacing: 1.5 }, /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlFormLabel, null, __21("Object position", "elementor"))), /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React54.createElement(
|
|
3623
|
+
Select5,
|
|
3450
3624
|
{
|
|
3451
3625
|
size: "tiny",
|
|
3452
3626
|
disabled: stringPropContext.disabled,
|
|
@@ -3454,8 +3628,8 @@ var PositionControl = () => {
|
|
|
3454
3628
|
onChange: handlePositionChange,
|
|
3455
3629
|
fullWidth: true
|
|
3456
3630
|
},
|
|
3457
|
-
availablePositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
3458
|
-
)))), isCustom && /* @__PURE__ */
|
|
3631
|
+
availablePositionOptions.map(({ label, value }) => /* @__PURE__ */ React54.createElement(MenuListItem6, { key: value, value: value ?? "" }, label))
|
|
3632
|
+
)))), isCustom && /* @__PURE__ */ React54.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(Grid17, { container: true, spacing: 1.5 }, /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React54.createElement(SizeControl, { startIcon: /* @__PURE__ */ React54.createElement(LetterXIcon2, { fontSize: "tiny" }) }))), /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React54.createElement(SizeControl, { startIcon: /* @__PURE__ */ React54.createElement(LetterYIcon2, { fontSize: "tiny" }) })))))));
|
|
3459
3633
|
};
|
|
3460
3634
|
export {
|
|
3461
3635
|
AspectRatioControl,
|
|
@@ -3469,6 +3643,7 @@ export {
|
|
|
3469
3643
|
ControlReplacementsProvider,
|
|
3470
3644
|
ControlToggleButtonGroup,
|
|
3471
3645
|
EqualUnequalSizesControl,
|
|
3646
|
+
FilterRepeaterControl,
|
|
3472
3647
|
FontFamilyControl,
|
|
3473
3648
|
FontFamilySelector,
|
|
3474
3649
|
GapControl,
|
|
@@ -3477,6 +3652,7 @@ export {
|
|
|
3477
3652
|
LinkControl,
|
|
3478
3653
|
LinkedDimensionsControl,
|
|
3479
3654
|
NumberControl,
|
|
3655
|
+
PopoverContent,
|
|
3480
3656
|
PositionControl,
|
|
3481
3657
|
PropKeyProvider,
|
|
3482
3658
|
PropProvider,
|