@elementor/editor-controls 4.0.0-501 → 4.0.0-502
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +864 -895
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +566 -595
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/control-actions/control-actions.tsx +1 -1
- package/src/index.ts +0 -2
- package/src/components/floating-bar.tsx +0 -45
package/dist/index.js
CHANGED
|
@@ -44,7 +44,6 @@ __export(index_exports, {
|
|
|
44
44
|
DateTimeControl: () => DateTimeControl,
|
|
45
45
|
EqualUnequalSizesControl: () => EqualUnequalSizesControl,
|
|
46
46
|
FilterRepeaterControl: () => FilterRepeaterControl,
|
|
47
|
-
FloatingActionsBar: () => FloatingActionsBar,
|
|
48
47
|
FontFamilyControl: () => FontFamilyControl,
|
|
49
48
|
GapControl: () => GapControl,
|
|
50
49
|
HtmlTagControl: () => HtmlTagControl,
|
|
@@ -92,15 +91,14 @@ __export(index_exports, {
|
|
|
92
91
|
useControlActions: () => useControlActions,
|
|
93
92
|
useControlReplacement: () => useControlReplacement,
|
|
94
93
|
useElementCanHaveChildren: () => useElementCanHaveChildren,
|
|
95
|
-
useFloatingActionsBar: () => useFloatingActionsBar,
|
|
96
94
|
useSyncExternalState: () => useSyncExternalState
|
|
97
95
|
});
|
|
98
96
|
module.exports = __toCommonJS(index_exports);
|
|
99
97
|
|
|
100
98
|
// src/controls/image-control.tsx
|
|
101
|
-
var
|
|
99
|
+
var React13 = __toESM(require("react"));
|
|
102
100
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
103
|
-
var
|
|
101
|
+
var import_ui6 = require("@elementor/ui");
|
|
104
102
|
var import_i18n2 = require("@wordpress/i18n");
|
|
105
103
|
|
|
106
104
|
// src/bound-prop-context/prop-context.tsx
|
|
@@ -422,51 +420,24 @@ var formatResponse = (response) => {
|
|
|
422
420
|
};
|
|
423
421
|
|
|
424
422
|
// src/controls/image-media-control.tsx
|
|
425
|
-
var
|
|
423
|
+
var React11 = __toESM(require("react"));
|
|
426
424
|
var import_editor_props = require("@elementor/editor-props");
|
|
427
425
|
var import_icons = require("@elementor/icons");
|
|
428
|
-
var
|
|
426
|
+
var import_ui4 = require("@elementor/ui");
|
|
429
427
|
var import_wp_media = require("@elementor/wp-media");
|
|
430
428
|
var import_i18n = require("@wordpress/i18n");
|
|
431
429
|
|
|
432
430
|
// src/control-actions/control-actions.tsx
|
|
433
|
-
var
|
|
431
|
+
var React10 = __toESM(require("react"));
|
|
432
|
+
var import_editor_ui = require("@elementor/editor-ui");
|
|
434
433
|
|
|
435
|
-
// src/
|
|
434
|
+
// src/control-actions/control-actions-context.tsx
|
|
436
435
|
var React9 = __toESM(require("react"));
|
|
437
436
|
var import_react6 = require("react");
|
|
438
|
-
var
|
|
439
|
-
var
|
|
440
|
-
display: contents;
|
|
441
|
-
|
|
442
|
-
.MuiFloatingActionBar-popper:has( .MuiFloatingActionBar-actions:empty ) {
|
|
443
|
-
display: none;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.MuiFloatingActionBar-popper {
|
|
447
|
-
z-index: 1000;
|
|
448
|
-
}
|
|
449
|
-
`;
|
|
450
|
-
var FloatingActionsContext = (0, import_react6.createContext)(null);
|
|
451
|
-
function FloatingActionsBar({ actions, children }) {
|
|
452
|
-
const [open, setOpen] = (0, import_react6.useState)(false);
|
|
453
|
-
return /* @__PURE__ */ React9.createElement(FloatingActionsContext.Provider, { value: { open, setOpen } }, /* @__PURE__ */ React9.createElement(FloatingBarContainer, null, /* @__PURE__ */ React9.createElement(import_ui4.UnstableFloatingActionBar, { actions, open: open || void 0 }, children)));
|
|
454
|
-
}
|
|
455
|
-
function useFloatingActionsBar() {
|
|
456
|
-
const context = (0, import_react6.useContext)(FloatingActionsContext);
|
|
457
|
-
if (!context) {
|
|
458
|
-
throw new Error("useFloatingActions must be used within a FloatingActionsBar");
|
|
459
|
-
}
|
|
460
|
-
return context;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
// src/control-actions/control-actions-context.tsx
|
|
464
|
-
var React10 = __toESM(require("react"));
|
|
465
|
-
var import_react7 = require("react");
|
|
466
|
-
var Context2 = (0, import_react7.createContext)(null);
|
|
467
|
-
var ControlActionsProvider = ({ children, items: items2 }) => /* @__PURE__ */ React10.createElement(Context2.Provider, { value: { items: items2 } }, children);
|
|
437
|
+
var Context2 = (0, import_react6.createContext)(null);
|
|
438
|
+
var ControlActionsProvider = ({ children, items: items2 }) => /* @__PURE__ */ React9.createElement(Context2.Provider, { value: { items: items2 } }, children);
|
|
468
439
|
var useControlActions = () => {
|
|
469
|
-
const context = (0,
|
|
440
|
+
const context = (0, import_react6.useContext)(Context2);
|
|
470
441
|
if (!context) {
|
|
471
442
|
throw new Error("useControlActions must be used within a ControlActionsProvider");
|
|
472
443
|
}
|
|
@@ -480,8 +451,8 @@ function ControlActions({ children }) {
|
|
|
480
451
|
if (items2.length === 0 || disabled) {
|
|
481
452
|
return children;
|
|
482
453
|
}
|
|
483
|
-
const menuItems = items2.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */
|
|
484
|
-
return /* @__PURE__ */
|
|
454
|
+
const menuItems = items2.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id }));
|
|
455
|
+
return /* @__PURE__ */ React10.createElement(import_editor_ui.FloatingActionsBar, { actions: menuItems }, children);
|
|
485
456
|
}
|
|
486
457
|
|
|
487
458
|
// src/controls/image-media-control.tsx
|
|
@@ -504,8 +475,8 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
504
475
|
});
|
|
505
476
|
}
|
|
506
477
|
});
|
|
507
|
-
return /* @__PURE__ */
|
|
508
|
-
|
|
478
|
+
return /* @__PURE__ */ React11.createElement(ControlActions, null, /* @__PURE__ */ React11.createElement(import_ui4.Card, { variant: "outlined" }, /* @__PURE__ */ React11.createElement(import_ui4.CardMedia, { image: src, sx: { height: propType.meta.isDynamic ? 134 : 150 } }, isFetching ? /* @__PURE__ */ React11.createElement(import_ui4.Stack, { justifyContent: "center", alignItems: "center", width: "100%", height: "100%" }, /* @__PURE__ */ React11.createElement(import_ui4.CircularProgress, null)) : /* @__PURE__ */ React11.createElement(React11.Fragment, null)), /* @__PURE__ */ React11.createElement(import_ui4.CardOverlay, null, /* @__PURE__ */ React11.createElement(import_ui4.Stack, { gap: 1 }, /* @__PURE__ */ React11.createElement(
|
|
479
|
+
import_ui4.Button,
|
|
509
480
|
{
|
|
510
481
|
size: "tiny",
|
|
511
482
|
color: "inherit",
|
|
@@ -513,13 +484,13 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
513
484
|
onClick: () => open({ mode: "browse" })
|
|
514
485
|
},
|
|
515
486
|
(0, import_i18n.__)("Select image", "elementor")
|
|
516
|
-
), /* @__PURE__ */
|
|
517
|
-
|
|
487
|
+
), /* @__PURE__ */ React11.createElement(
|
|
488
|
+
import_ui4.Button,
|
|
518
489
|
{
|
|
519
490
|
size: "tiny",
|
|
520
491
|
variant: "text",
|
|
521
492
|
color: "inherit",
|
|
522
|
-
startIcon: /* @__PURE__ */
|
|
493
|
+
startIcon: /* @__PURE__ */ React11.createElement(import_icons.UploadIcon, null),
|
|
523
494
|
onClick: () => open({ mode: "upload" })
|
|
524
495
|
},
|
|
525
496
|
(0, import_i18n.__)("Upload", "elementor")
|
|
@@ -527,10 +498,10 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
527
498
|
});
|
|
528
499
|
|
|
529
500
|
// src/controls/select-control.tsx
|
|
530
|
-
var
|
|
501
|
+
var React12 = __toESM(require("react"));
|
|
531
502
|
var import_editor_props2 = require("@elementor/editor-props");
|
|
532
|
-
var
|
|
533
|
-
var
|
|
503
|
+
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
504
|
+
var import_ui5 = require("@elementor/ui");
|
|
534
505
|
var DEFAULT_MENU_PROPS = {
|
|
535
506
|
MenuListProps: {
|
|
536
507
|
sx: {
|
|
@@ -547,8 +518,8 @@ var SelectControl = createControl(
|
|
|
547
518
|
setValue(newValue);
|
|
548
519
|
};
|
|
549
520
|
const isDisabled = disabled || options.length === 0;
|
|
550
|
-
return /* @__PURE__ */
|
|
551
|
-
|
|
521
|
+
return /* @__PURE__ */ React12.createElement(ControlActions, null, /* @__PURE__ */ React12.createElement(
|
|
522
|
+
import_ui5.Select,
|
|
552
523
|
{
|
|
553
524
|
sx: { overflow: "hidden" },
|
|
554
525
|
displayEmpty: true,
|
|
@@ -561,7 +532,7 @@ var SelectControl = createControl(
|
|
|
561
532
|
if (placeholder) {
|
|
562
533
|
const placeholderOption = findOptionByValue(placeholder);
|
|
563
534
|
const displayText = placeholderOption?.label || placeholder;
|
|
564
|
-
return /* @__PURE__ */
|
|
535
|
+
return /* @__PURE__ */ React12.createElement(import_ui5.Typography, { component: "span", variant: "caption", color: "text.tertiary" }, displayText);
|
|
565
536
|
}
|
|
566
537
|
return "";
|
|
567
538
|
}
|
|
@@ -573,7 +544,7 @@ var SelectControl = createControl(
|
|
|
573
544
|
disabled: isDisabled,
|
|
574
545
|
fullWidth: true
|
|
575
546
|
},
|
|
576
|
-
options.map(({ label, ...props }) => /* @__PURE__ */
|
|
547
|
+
options.map(({ label, ...props }) => /* @__PURE__ */ React12.createElement(import_editor_ui2.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, label))
|
|
577
548
|
));
|
|
578
549
|
}
|
|
579
550
|
);
|
|
@@ -581,21 +552,21 @@ var SelectControl = createControl(
|
|
|
581
552
|
// src/controls/image-control.tsx
|
|
582
553
|
var ImageControl = createControl(({ sizes, label = (0, import_i18n2.__)("Image", "elementor") }) => {
|
|
583
554
|
const propContext = useBoundProp(import_editor_props3.imagePropTypeUtil);
|
|
584
|
-
return /* @__PURE__ */
|
|
555
|
+
return /* @__PURE__ */ React13.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React13.createElement(import_ui6.Stack, { gap: 1.5 }, /* @__PURE__ */ React13.createElement(ControlLabel, null, label), /* @__PURE__ */ React13.createElement(ImageSrcControl, null), /* @__PURE__ */ React13.createElement(import_ui6.Grid, { container: true, gap: 1.5, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React13.createElement(import_ui6.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React13.createElement(ControlFormLabel, null, (0, import_i18n2.__)("Resolution", "elementor"))), /* @__PURE__ */ React13.createElement(import_ui6.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React13.createElement(ImageSizeControl, { sizes })))));
|
|
585
556
|
});
|
|
586
557
|
var ImageSrcControl = () => {
|
|
587
558
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
588
559
|
const mediaTypes = allowSvgUpload ? ["image", "svg"] : ["image"];
|
|
589
|
-
return /* @__PURE__ */
|
|
560
|
+
return /* @__PURE__ */ React13.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React13.createElement(ImageMediaControl, { mediaTypes }));
|
|
590
561
|
};
|
|
591
562
|
var ImageSizeControl = ({ sizes }) => {
|
|
592
|
-
return /* @__PURE__ */
|
|
563
|
+
return /* @__PURE__ */ React13.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React13.createElement(SelectControl, { options: sizes }));
|
|
593
564
|
};
|
|
594
565
|
|
|
595
566
|
// src/controls/text-control.tsx
|
|
596
|
-
var
|
|
567
|
+
var React14 = __toESM(require("react"));
|
|
597
568
|
var import_editor_props4 = require("@elementor/editor-props");
|
|
598
|
-
var
|
|
569
|
+
var import_ui7 = require("@elementor/ui");
|
|
599
570
|
var TextControl = createControl(
|
|
600
571
|
({
|
|
601
572
|
placeholder,
|
|
@@ -608,8 +579,8 @@ var TextControl = createControl(
|
|
|
608
579
|
}) => {
|
|
609
580
|
const { value, setValue, disabled } = useBoundProp(import_editor_props4.stringPropTypeUtil);
|
|
610
581
|
const handleChange = (event) => setValue(event.target.value);
|
|
611
|
-
return /* @__PURE__ */
|
|
612
|
-
|
|
582
|
+
return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(
|
|
583
|
+
import_ui7.TextField,
|
|
613
584
|
{
|
|
614
585
|
size: "tiny",
|
|
615
586
|
fullWidth: true,
|
|
@@ -629,16 +600,16 @@ var TextControl = createControl(
|
|
|
629
600
|
);
|
|
630
601
|
|
|
631
602
|
// src/controls/text-area-control.tsx
|
|
632
|
-
var
|
|
603
|
+
var React15 = __toESM(require("react"));
|
|
633
604
|
var import_editor_props5 = require("@elementor/editor-props");
|
|
634
|
-
var
|
|
605
|
+
var import_ui8 = require("@elementor/ui");
|
|
635
606
|
var TextAreaControl = createControl(({ placeholder, ariaLabel }) => {
|
|
636
607
|
const { value, setValue, disabled } = useBoundProp(import_editor_props5.stringPropTypeUtil);
|
|
637
608
|
const handleChange = (event) => {
|
|
638
609
|
setValue(event.target.value);
|
|
639
610
|
};
|
|
640
|
-
return /* @__PURE__ */
|
|
641
|
-
|
|
611
|
+
return /* @__PURE__ */ React15.createElement(ControlActions, null, /* @__PURE__ */ React15.createElement(
|
|
612
|
+
import_ui8.TextField,
|
|
642
613
|
{
|
|
643
614
|
size: "tiny",
|
|
644
615
|
multiline: true,
|
|
@@ -656,17 +627,17 @@ var TextAreaControl = createControl(({ placeholder, ariaLabel }) => {
|
|
|
656
627
|
});
|
|
657
628
|
|
|
658
629
|
// src/controls/size-control.tsx
|
|
659
|
-
var
|
|
660
|
-
var
|
|
630
|
+
var React20 = __toESM(require("react"));
|
|
631
|
+
var import_react13 = require("react");
|
|
661
632
|
var import_editor_props7 = require("@elementor/editor-props");
|
|
662
633
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
663
|
-
var
|
|
634
|
+
var import_ui13 = require("@elementor/ui");
|
|
664
635
|
|
|
665
636
|
// src/components/size-control/size-input.tsx
|
|
666
|
-
var
|
|
667
|
-
var
|
|
637
|
+
var React18 = __toESM(require("react"));
|
|
638
|
+
var import_react9 = require("react");
|
|
668
639
|
var import_icons2 = require("@elementor/icons");
|
|
669
|
-
var
|
|
640
|
+
var import_ui11 = require("@elementor/ui");
|
|
670
641
|
|
|
671
642
|
// src/utils/size-control.ts
|
|
672
643
|
var lengthUnits = ["px", "%", "em", "rem", "vw", "vh", "ch"];
|
|
@@ -680,19 +651,19 @@ function isUnitExtendedOption(unit) {
|
|
|
680
651
|
}
|
|
681
652
|
|
|
682
653
|
// src/components/size-control/text-field-inner-selection.tsx
|
|
683
|
-
var React18 = __toESM(require("react"));
|
|
684
|
-
var import_react9 = require("react");
|
|
685
|
-
var import_editor_props6 = require("@elementor/editor-props");
|
|
686
|
-
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
687
|
-
var import_ui11 = require("@elementor/ui");
|
|
688
|
-
|
|
689
|
-
// src/components/number-input.tsx
|
|
690
654
|
var React17 = __toESM(require("react"));
|
|
691
655
|
var import_react8 = require("react");
|
|
656
|
+
var import_editor_props6 = require("@elementor/editor-props");
|
|
657
|
+
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
692
658
|
var import_ui10 = require("@elementor/ui");
|
|
659
|
+
|
|
660
|
+
// src/components/number-input.tsx
|
|
661
|
+
var React16 = __toESM(require("react"));
|
|
662
|
+
var import_react7 = require("react");
|
|
663
|
+
var import_ui9 = require("@elementor/ui");
|
|
693
664
|
var RESTRICTED_INPUT_KEYS = ["e", "E", "+"];
|
|
694
|
-
var NumberInput = (0,
|
|
695
|
-
const [key, setKey] = (0,
|
|
665
|
+
var NumberInput = (0, import_react7.forwardRef)((props, ref) => {
|
|
666
|
+
const [key, setKey] = (0, import_react7.useState)(0);
|
|
696
667
|
const handleKeyDown = (event) => {
|
|
697
668
|
blockRestrictedKeys(event, props.inputProps?.min);
|
|
698
669
|
props.onKeyDown?.(event);
|
|
@@ -704,7 +675,7 @@ var NumberInput = (0, import_react8.forwardRef)((props, ref) => {
|
|
|
704
675
|
setKey((prev) => prev + 1);
|
|
705
676
|
}
|
|
706
677
|
};
|
|
707
|
-
return /* @__PURE__ */
|
|
678
|
+
return /* @__PURE__ */ React16.createElement(import_ui9.TextField, { ...props, ref, key, onKeyDown: handleKeyDown, onBlur: handleBlur });
|
|
708
679
|
});
|
|
709
680
|
function blockRestrictedKeys(event, min) {
|
|
710
681
|
const restrictedInputKeys = [...RESTRICTED_INPUT_KEYS];
|
|
@@ -717,7 +688,7 @@ function blockRestrictedKeys(event, min) {
|
|
|
717
688
|
}
|
|
718
689
|
|
|
719
690
|
// src/components/size-control/text-field-inner-selection.tsx
|
|
720
|
-
var TextFieldInnerSelection = (0,
|
|
691
|
+
var TextFieldInnerSelection = (0, import_react8.forwardRef)(
|
|
721
692
|
({
|
|
722
693
|
placeholder,
|
|
723
694
|
type,
|
|
@@ -736,7 +707,7 @@ var TextFieldInnerSelection = (0, import_react9.forwardRef)(
|
|
|
736
707
|
const getCursorStyle2 = () => ({
|
|
737
708
|
input: { cursor: InputProps.readOnly ? "default !important" : void 0 }
|
|
738
709
|
});
|
|
739
|
-
return /* @__PURE__ */
|
|
710
|
+
return /* @__PURE__ */ React17.createElement(
|
|
740
711
|
NumberInput,
|
|
741
712
|
{
|
|
742
713
|
ref,
|
|
@@ -767,9 +738,9 @@ var SelectionEndAdornment = ({
|
|
|
767
738
|
menuItemsAttributes = {},
|
|
768
739
|
disabled
|
|
769
740
|
}) => {
|
|
770
|
-
const popupState = (0,
|
|
741
|
+
const popupState = (0, import_ui10.usePopupState)({
|
|
771
742
|
variant: "popover",
|
|
772
|
-
popupId: (0,
|
|
743
|
+
popupId: (0, import_react8.useId)()
|
|
773
744
|
});
|
|
774
745
|
const handleMenuItemClick = (index) => {
|
|
775
746
|
onClick(options[index]);
|
|
@@ -781,17 +752,17 @@ var SelectionEndAdornment = ({
|
|
|
781
752
|
flexDirection: "column",
|
|
782
753
|
justifyContent: "center"
|
|
783
754
|
};
|
|
784
|
-
return /* @__PURE__ */
|
|
755
|
+
return /* @__PURE__ */ React17.createElement(import_ui10.InputAdornment, { position: "end" }, /* @__PURE__ */ React17.createElement(
|
|
785
756
|
StyledButton,
|
|
786
757
|
{
|
|
787
758
|
isPrimaryColor: showPrimaryColor,
|
|
788
759
|
size: "small",
|
|
789
760
|
disabled,
|
|
790
|
-
...(0,
|
|
761
|
+
...(0, import_ui10.bindTrigger)(popupState)
|
|
791
762
|
},
|
|
792
763
|
placeholder ?? alternativeOptionLabels[value] ?? value
|
|
793
|
-
), /* @__PURE__ */
|
|
794
|
-
|
|
764
|
+
), /* @__PURE__ */ React17.createElement(import_ui10.Menu, { MenuListProps: { dense: true }, ...(0, import_ui10.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React17.createElement(
|
|
765
|
+
import_editor_ui3.MenuListItem,
|
|
795
766
|
{
|
|
796
767
|
key: option,
|
|
797
768
|
onClick: () => handleMenuItemClick(index),
|
|
@@ -830,7 +801,7 @@ function useUnitPlaceholder(value) {
|
|
|
830
801
|
showPrimaryColor
|
|
831
802
|
};
|
|
832
803
|
}
|
|
833
|
-
var StyledButton = (0,
|
|
804
|
+
var StyledButton = (0, import_ui10.styled)(import_ui10.Button, {
|
|
834
805
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
835
806
|
})(({ isPrimaryColor, theme }) => ({
|
|
836
807
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -858,7 +829,7 @@ var SizeInput = ({
|
|
|
858
829
|
id,
|
|
859
830
|
ariaLabel
|
|
860
831
|
}) => {
|
|
861
|
-
const unitInputBufferRef = (0,
|
|
832
|
+
const unitInputBufferRef = (0, import_react9.useRef)("");
|
|
862
833
|
const inputType = isUnitExtendedOption(unit) ? "text" : "number";
|
|
863
834
|
const inputValue = !isUnitExtendedOption(unit) && Number.isNaN(size) ? "" : size ?? "";
|
|
864
835
|
const handleKeyUp = (event) => {
|
|
@@ -883,7 +854,7 @@ var SizeInput = ({
|
|
|
883
854
|
custom: popupAttributes
|
|
884
855
|
} : void 0;
|
|
885
856
|
const alternativeOptionLabels = {
|
|
886
|
-
custom: /* @__PURE__ */
|
|
857
|
+
custom: /* @__PURE__ */ React18.createElement(import_icons2.MathFunctionIcon, { fontSize: "tiny" })
|
|
887
858
|
};
|
|
888
859
|
const InputProps = {
|
|
889
860
|
...popupAttributes,
|
|
@@ -891,8 +862,8 @@ var SizeInput = ({
|
|
|
891
862
|
autoComplete: "off",
|
|
892
863
|
onClick,
|
|
893
864
|
onFocus,
|
|
894
|
-
startAdornment: startIcon ? /* @__PURE__ */
|
|
895
|
-
endAdornment: /* @__PURE__ */
|
|
865
|
+
startAdornment: startIcon ? /* @__PURE__ */ React18.createElement(import_ui11.InputAdornment, { position: "start", disabled }, startIcon) : void 0,
|
|
866
|
+
endAdornment: /* @__PURE__ */ React18.createElement(
|
|
896
867
|
SelectionEndAdornment,
|
|
897
868
|
{
|
|
898
869
|
disabled,
|
|
@@ -904,7 +875,7 @@ var SizeInput = ({
|
|
|
904
875
|
}
|
|
905
876
|
)
|
|
906
877
|
};
|
|
907
|
-
return /* @__PURE__ */
|
|
878
|
+
return /* @__PURE__ */ React18.createElement(ControlActions, null, /* @__PURE__ */ React18.createElement(import_ui11.Box, null, /* @__PURE__ */ React18.createElement(
|
|
908
879
|
TextFieldInnerSelection,
|
|
909
880
|
{
|
|
910
881
|
disabled,
|
|
@@ -923,17 +894,17 @@ var SizeInput = ({
|
|
|
923
894
|
};
|
|
924
895
|
|
|
925
896
|
// src/components/text-field-popover.tsx
|
|
926
|
-
var
|
|
927
|
-
var
|
|
928
|
-
var
|
|
897
|
+
var React19 = __toESM(require("react"));
|
|
898
|
+
var import_react10 = require("react");
|
|
899
|
+
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
929
900
|
var import_icons3 = require("@elementor/icons");
|
|
930
|
-
var
|
|
901
|
+
var import_ui12 = require("@elementor/ui");
|
|
931
902
|
var import_i18n3 = require("@wordpress/i18n");
|
|
932
903
|
var SIZE = "tiny";
|
|
933
904
|
var TextFieldPopover = (props) => {
|
|
934
905
|
const { popupState, restoreValue, anchorRef, value, onChange } = props;
|
|
935
|
-
const inputRef = (0,
|
|
936
|
-
(0,
|
|
906
|
+
const inputRef = (0, import_react10.useRef)(null);
|
|
907
|
+
(0, import_react10.useEffect)(() => {
|
|
937
908
|
if (popupState.isOpen) {
|
|
938
909
|
requestAnimationFrame(() => {
|
|
939
910
|
if (inputRef.current) {
|
|
@@ -946,8 +917,8 @@ var TextFieldPopover = (props) => {
|
|
|
946
917
|
restoreValue();
|
|
947
918
|
popupState.close();
|
|
948
919
|
};
|
|
949
|
-
return /* @__PURE__ */
|
|
950
|
-
|
|
920
|
+
return /* @__PURE__ */ React19.createElement(
|
|
921
|
+
import_ui12.Popover,
|
|
951
922
|
{
|
|
952
923
|
disablePortal: true,
|
|
953
924
|
slotProps: {
|
|
@@ -958,21 +929,21 @@ var TextFieldPopover = (props) => {
|
|
|
958
929
|
}
|
|
959
930
|
}
|
|
960
931
|
},
|
|
961
|
-
...(0,
|
|
932
|
+
...(0, import_ui12.bindPopover)(popupState),
|
|
962
933
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
963
934
|
transformOrigin: { vertical: "top", horizontal: "center" },
|
|
964
935
|
onClose: handleClose
|
|
965
936
|
},
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
|
|
937
|
+
/* @__PURE__ */ React19.createElement(
|
|
938
|
+
import_editor_ui4.PopoverHeader,
|
|
968
939
|
{
|
|
969
940
|
title: (0, import_i18n3.__)("CSS function", "elementor"),
|
|
970
941
|
onClose: handleClose,
|
|
971
|
-
icon: /* @__PURE__ */
|
|
942
|
+
icon: /* @__PURE__ */ React19.createElement(import_icons3.MathFunctionIcon, { fontSize: SIZE })
|
|
972
943
|
}
|
|
973
944
|
),
|
|
974
|
-
/* @__PURE__ */
|
|
975
|
-
|
|
945
|
+
/* @__PURE__ */ React19.createElement(
|
|
946
|
+
import_ui12.TextField,
|
|
976
947
|
{
|
|
977
948
|
value,
|
|
978
949
|
onChange,
|
|
@@ -989,9 +960,9 @@ var TextFieldPopover = (props) => {
|
|
|
989
960
|
};
|
|
990
961
|
|
|
991
962
|
// src/hooks/use-size-extended-options.ts
|
|
992
|
-
var
|
|
963
|
+
var import_react11 = require("react");
|
|
993
964
|
function useSizeExtendedOptions(options, disableCustom) {
|
|
994
|
-
return (0,
|
|
965
|
+
return (0, import_react11.useMemo)(() => {
|
|
995
966
|
const extendedOptions = [...options];
|
|
996
967
|
if (!disableCustom && !extendedOptions.includes("custom")) {
|
|
997
968
|
extendedOptions.push("custom");
|
|
@@ -1003,7 +974,7 @@ function useSizeExtendedOptions(options, disableCustom) {
|
|
|
1003
974
|
}
|
|
1004
975
|
|
|
1005
976
|
// src/hooks/use-sync-external-state.tsx
|
|
1006
|
-
var
|
|
977
|
+
var import_react12 = require("react");
|
|
1007
978
|
var useSyncExternalState = ({
|
|
1008
979
|
external,
|
|
1009
980
|
setExternal,
|
|
@@ -1022,8 +993,8 @@ var useSyncExternalState = ({
|
|
|
1022
993
|
}
|
|
1023
994
|
return externalValue;
|
|
1024
995
|
}
|
|
1025
|
-
const [internal, setInternal] = (0,
|
|
1026
|
-
(0,
|
|
996
|
+
const [internal, setInternal] = (0, import_react12.useState)(toInternal(external, null));
|
|
997
|
+
(0, import_react12.useEffect)(() => {
|
|
1027
998
|
setInternal((prevInternal) => toInternal(external, prevInternal));
|
|
1028
999
|
}, [external]);
|
|
1029
1000
|
const setInternalValue = (setter, options, meta) => {
|
|
@@ -1074,8 +1045,8 @@ var SizeControl = createControl(
|
|
|
1074
1045
|
const activeBreakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
|
|
1075
1046
|
const actualExtendedOptions = useSizeExtendedOptions(extendedOptions || [], disableCustom ?? false);
|
|
1076
1047
|
const actualUnits = resolveUnits(propType, enablePropTypeUnits, variant, units2, actualExtendedOptions);
|
|
1077
|
-
const popupState = (0,
|
|
1078
|
-
const memorizedExternalState = (0,
|
|
1048
|
+
const popupState = (0, import_ui13.usePopupState)({ variant: "popover" });
|
|
1049
|
+
const memorizedExternalState = (0, import_react13.useMemo)(
|
|
1079
1050
|
() => createStateFromSizeProp(sizeValue, actualDefaultUnit),
|
|
1080
1051
|
[sizeValue, actualDefaultUnit]
|
|
1081
1052
|
);
|
|
@@ -1118,15 +1089,15 @@ var SizeControl = createControl(
|
|
|
1118
1089
|
popupState.open(anchorRef?.current);
|
|
1119
1090
|
}
|
|
1120
1091
|
};
|
|
1121
|
-
const maybeClosePopup =
|
|
1092
|
+
const maybeClosePopup = React20.useCallback(() => {
|
|
1122
1093
|
if (popupState && popupState.isOpen) {
|
|
1123
1094
|
popupState.close();
|
|
1124
1095
|
}
|
|
1125
1096
|
}, [popupState]);
|
|
1126
|
-
(0,
|
|
1097
|
+
(0, import_react13.useEffect)(() => {
|
|
1127
1098
|
maybeClosePopup();
|
|
1128
1099
|
}, [activeBreakpoint]);
|
|
1129
|
-
return /* @__PURE__ */
|
|
1100
|
+
return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(
|
|
1130
1101
|
SizeInput,
|
|
1131
1102
|
{
|
|
1132
1103
|
disabled,
|
|
@@ -1144,7 +1115,7 @@ var SizeControl = createControl(
|
|
|
1144
1115
|
id,
|
|
1145
1116
|
ariaLabel
|
|
1146
1117
|
}
|
|
1147
|
-
), anchorRef?.current && popupState.isOpen && /* @__PURE__ */
|
|
1118
|
+
), anchorRef?.current && popupState.isOpen && /* @__PURE__ */ React20.createElement(
|
|
1148
1119
|
TextFieldPopover,
|
|
1149
1120
|
{
|
|
1150
1121
|
popupState,
|
|
@@ -1203,21 +1174,21 @@ function extractValueFromState(state, allowEmpty = false) {
|
|
|
1203
1174
|
}
|
|
1204
1175
|
|
|
1205
1176
|
// src/controls/stroke-control.tsx
|
|
1206
|
-
var
|
|
1207
|
-
var
|
|
1177
|
+
var React23 = __toESM(require("react"));
|
|
1178
|
+
var import_react14 = require("react");
|
|
1208
1179
|
var import_editor_props9 = require("@elementor/editor-props");
|
|
1209
|
-
var
|
|
1180
|
+
var import_ui16 = require("@elementor/ui");
|
|
1210
1181
|
var import_i18n4 = require("@wordpress/i18n");
|
|
1211
1182
|
|
|
1212
1183
|
// src/components/section-content.tsx
|
|
1213
|
-
var
|
|
1214
|
-
var
|
|
1215
|
-
var SectionContent = ({ gap = 0.5, sx, children }) => /* @__PURE__ */
|
|
1184
|
+
var React21 = __toESM(require("react"));
|
|
1185
|
+
var import_ui14 = require("@elementor/ui");
|
|
1186
|
+
var SectionContent = ({ gap = 0.5, sx, children }) => /* @__PURE__ */ React21.createElement(import_ui14.Stack, { gap, sx: { ...sx } }, children);
|
|
1216
1187
|
|
|
1217
1188
|
// src/controls/color-control.tsx
|
|
1218
|
-
var
|
|
1189
|
+
var React22 = __toESM(require("react"));
|
|
1219
1190
|
var import_editor_props8 = require("@elementor/editor-props");
|
|
1220
|
-
var
|
|
1191
|
+
var import_ui15 = require("@elementor/ui");
|
|
1221
1192
|
var ColorControl = createControl(
|
|
1222
1193
|
({ propTypeUtil = import_editor_props8.colorPropTypeUtil, anchorEl, slotProps = {}, id, ...props }) => {
|
|
1223
1194
|
const { value, setValue, placeholder: boundPropPlaceholder, disabled } = useBoundProp(propTypeUtil);
|
|
@@ -1225,8 +1196,8 @@ var ColorControl = createControl(
|
|
|
1225
1196
|
const handleChange = (selectedColor) => {
|
|
1226
1197
|
setValue(selectedColor || null);
|
|
1227
1198
|
};
|
|
1228
|
-
return /* @__PURE__ */
|
|
1229
|
-
|
|
1199
|
+
return /* @__PURE__ */ React22.createElement(ControlActions, null, /* @__PURE__ */ React22.createElement(
|
|
1200
|
+
import_ui15.UnstableColorField,
|
|
1230
1201
|
{
|
|
1231
1202
|
id,
|
|
1232
1203
|
size: "tiny",
|
|
@@ -1267,28 +1238,28 @@ var ColorControl = createControl(
|
|
|
1267
1238
|
var units = ["px", "em", "rem"];
|
|
1268
1239
|
var StrokeControl = createControl(() => {
|
|
1269
1240
|
const propContext = useBoundProp(import_editor_props9.strokePropTypeUtil);
|
|
1270
|
-
const rowRef = (0,
|
|
1271
|
-
return /* @__PURE__ */
|
|
1241
|
+
const rowRef = (0, import_react14.useRef)(null);
|
|
1242
|
+
return /* @__PURE__ */ React23.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React23.createElement(SectionContent, null, /* @__PURE__ */ React23.createElement(Control, { bind: "width", label: (0, import_i18n4.__)("Stroke width", "elementor"), ref: rowRef }, /* @__PURE__ */ React23.createElement(SizeControl, { units, anchorRef: rowRef })), /* @__PURE__ */ React23.createElement(Control, { bind: "color", label: (0, import_i18n4.__)("Stroke color", "elementor") }, /* @__PURE__ */ React23.createElement(ColorControl, null))));
|
|
1272
1243
|
});
|
|
1273
|
-
var Control = (0,
|
|
1244
|
+
var Control = (0, import_react14.forwardRef)(({ bind, label, children }, ref) => /* @__PURE__ */ React23.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React23.createElement(import_ui16.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React23.createElement(import_ui16.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React23.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React23.createElement(import_ui16.Grid, { item: true, xs: 6 }, children))));
|
|
1274
1245
|
|
|
1275
1246
|
// src/controls/box-shadow-repeater-control.tsx
|
|
1276
|
-
var
|
|
1277
|
-
var
|
|
1247
|
+
var React39 = __toESM(require("react"));
|
|
1248
|
+
var import_react21 = require("react");
|
|
1278
1249
|
var import_editor_props10 = require("@elementor/editor-props");
|
|
1279
|
-
var
|
|
1250
|
+
var import_ui30 = require("@elementor/ui");
|
|
1280
1251
|
var import_i18n11 = require("@wordpress/i18n");
|
|
1281
1252
|
|
|
1282
1253
|
// src/components/control-repeater/actions/tooltip-add-item-action.tsx
|
|
1283
|
-
var
|
|
1254
|
+
var React25 = __toESM(require("react"));
|
|
1284
1255
|
var import_icons4 = require("@elementor/icons");
|
|
1285
|
-
var
|
|
1256
|
+
var import_ui18 = require("@elementor/ui");
|
|
1286
1257
|
var import_i18n5 = require("@wordpress/i18n");
|
|
1287
1258
|
|
|
1288
1259
|
// src/components/control-repeater/context/repeater-context.tsx
|
|
1289
|
-
var
|
|
1290
|
-
var
|
|
1291
|
-
var
|
|
1260
|
+
var React24 = __toESM(require("react"));
|
|
1261
|
+
var import_react16 = require("react");
|
|
1262
|
+
var import_ui17 = require("@elementor/ui");
|
|
1292
1263
|
|
|
1293
1264
|
// src/services/event-bus.ts
|
|
1294
1265
|
var EventBus = class {
|
|
@@ -1325,18 +1296,18 @@ var EventBus = class {
|
|
|
1325
1296
|
var eventBus = new EventBus();
|
|
1326
1297
|
|
|
1327
1298
|
// src/components/control-repeater/context/item-context.tsx
|
|
1328
|
-
var
|
|
1329
|
-
var ItemContext = (0,
|
|
1299
|
+
var import_react15 = require("react");
|
|
1300
|
+
var ItemContext = (0, import_react15.createContext)({
|
|
1330
1301
|
index: -1,
|
|
1331
1302
|
value: {}
|
|
1332
1303
|
});
|
|
1333
1304
|
|
|
1334
1305
|
// src/components/control-repeater/context/repeater-context.tsx
|
|
1335
|
-
var RepeaterContext = (0,
|
|
1306
|
+
var RepeaterContext = (0, import_react16.createContext)(null);
|
|
1336
1307
|
var EMPTY_OPEN_ITEM = -1;
|
|
1337
1308
|
var useRepeaterContext = () => {
|
|
1338
|
-
const context =
|
|
1339
|
-
const itemContext =
|
|
1309
|
+
const context = React24.useContext(RepeaterContext);
|
|
1310
|
+
const itemContext = React24.useContext(ItemContext);
|
|
1340
1311
|
if (!context) {
|
|
1341
1312
|
throw new Error("useRepeaterContext must be used within a RepeaterContextProvider");
|
|
1342
1313
|
}
|
|
@@ -1355,10 +1326,10 @@ var RepeaterContextProvider = ({
|
|
|
1355
1326
|
setExternal: setRepeaterValues,
|
|
1356
1327
|
persistWhen: () => true
|
|
1357
1328
|
});
|
|
1358
|
-
const [uniqueKeys, setUniqueKeys] = (0,
|
|
1329
|
+
const [uniqueKeys, setUniqueKeys] = (0, import_react16.useState)(() => {
|
|
1359
1330
|
return items2?.map(() => generateUniqueKey()) ?? [];
|
|
1360
1331
|
});
|
|
1361
|
-
|
|
1332
|
+
React24.useEffect(() => {
|
|
1362
1333
|
const nextLength = items2?.length ?? 0;
|
|
1363
1334
|
setUniqueKeys((prev) => {
|
|
1364
1335
|
const prevLength = prev.length;
|
|
@@ -1371,7 +1342,7 @@ var RepeaterContextProvider = ({
|
|
|
1371
1342
|
return [...prev, ...Array.from({ length: nextLength - prevLength }, generateUniqueKey)];
|
|
1372
1343
|
});
|
|
1373
1344
|
}, [items2?.length]);
|
|
1374
|
-
const itemsWithKeys = (0,
|
|
1345
|
+
const itemsWithKeys = (0, import_react16.useMemo)(
|
|
1375
1346
|
() => uniqueKeys.map((key, index) => ({
|
|
1376
1347
|
key,
|
|
1377
1348
|
item: items2[index]
|
|
@@ -1381,10 +1352,10 @@ var RepeaterContextProvider = ({
|
|
|
1381
1352
|
const handleSetItems = (newItemsWithKeys) => {
|
|
1382
1353
|
setItems(newItemsWithKeys.map(({ item }) => item));
|
|
1383
1354
|
};
|
|
1384
|
-
const [openItemIndex, setOpenItemIndex] = (0,
|
|
1385
|
-
const [rowRef, setRowRef] = (0,
|
|
1355
|
+
const [openItemIndex, setOpenItemIndex] = (0, import_react16.useState)(EMPTY_OPEN_ITEM);
|
|
1356
|
+
const [rowRef, setRowRef] = (0, import_react16.useState)(null);
|
|
1386
1357
|
const isOpen = openItemIndex !== EMPTY_OPEN_ITEM;
|
|
1387
|
-
const popoverState = (0,
|
|
1358
|
+
const popoverState = (0, import_ui17.usePopupState)({ variant: "popover" });
|
|
1388
1359
|
const addItem = (ev, config) => {
|
|
1389
1360
|
const item = config?.item ?? { ...initial };
|
|
1390
1361
|
const newIndex = config?.index ?? items2.length;
|
|
@@ -1411,7 +1382,7 @@ var RepeaterContextProvider = ({
|
|
|
1411
1382
|
const newItems = [...items2.slice(0, index), updatedItem, ...items2.slice(index + 1)];
|
|
1412
1383
|
setItems(newItems);
|
|
1413
1384
|
};
|
|
1414
|
-
return /* @__PURE__ */
|
|
1385
|
+
return /* @__PURE__ */ React24.createElement(
|
|
1415
1386
|
RepeaterContext.Provider,
|
|
1416
1387
|
{
|
|
1417
1388
|
value: {
|
|
@@ -1448,37 +1419,37 @@ var TooltipAddItemAction = ({
|
|
|
1448
1419
|
}) => {
|
|
1449
1420
|
const { addItem } = useRepeaterContext();
|
|
1450
1421
|
const onClick = (ev) => addItem(ev, { index: newItemIndex });
|
|
1451
|
-
return /* @__PURE__ */
|
|
1452
|
-
|
|
1422
|
+
return /* @__PURE__ */ React25.createElement(ConditionalToolTip, { content: tooltipContent, enable: enableTooltip }, /* @__PURE__ */ React25.createElement(import_ui18.Box, { component: "span", sx: { cursor: disabled ? "not-allowed" : "pointer" } }, /* @__PURE__ */ React25.createElement(
|
|
1423
|
+
import_ui18.IconButton,
|
|
1453
1424
|
{
|
|
1454
1425
|
size: SIZE2,
|
|
1455
1426
|
disabled,
|
|
1456
1427
|
onClick,
|
|
1457
1428
|
"aria-label": (0, import_i18n5.sprintf)((0, import_i18n5.__)("Add %s item", "elementor"), ariaLabel?.toLowerCase())
|
|
1458
1429
|
},
|
|
1459
|
-
/* @__PURE__ */
|
|
1430
|
+
/* @__PURE__ */ React25.createElement(import_icons4.PlusIcon, { fontSize: SIZE2 })
|
|
1460
1431
|
)));
|
|
1461
1432
|
};
|
|
1462
1433
|
var ConditionalToolTip = ({
|
|
1463
1434
|
children,
|
|
1464
1435
|
enable,
|
|
1465
1436
|
content
|
|
1466
|
-
}) => enable && content ? /* @__PURE__ */
|
|
1437
|
+
}) => enable && content ? /* @__PURE__ */ React25.createElement(import_ui18.Infotip, { placement: "right", color: "secondary", content }, children) : children;
|
|
1467
1438
|
|
|
1468
1439
|
// src/components/control-repeater/items/items-container.tsx
|
|
1469
|
-
var
|
|
1440
|
+
var React27 = __toESM(require("react"));
|
|
1470
1441
|
|
|
1471
1442
|
// src/components/repeater/sortable.tsx
|
|
1472
|
-
var
|
|
1443
|
+
var React26 = __toESM(require("react"));
|
|
1473
1444
|
var import_icons5 = require("@elementor/icons");
|
|
1474
|
-
var
|
|
1445
|
+
var import_ui19 = require("@elementor/ui");
|
|
1475
1446
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1476
1447
|
var SortableProvider = (props) => {
|
|
1477
|
-
return /* @__PURE__ */
|
|
1448
|
+
return /* @__PURE__ */ React26.createElement(import_ui19.List, { sx: { p: 0, my: -0.5, mx: 0 } }, /* @__PURE__ */ React26.createElement(import_ui19.UnstableSortableProvider, { restrictAxis: true, disableDragOverlay: false, variant: "static", ...props }));
|
|
1478
1449
|
};
|
|
1479
1450
|
var SortableItem = ({ id, children, disabled }) => {
|
|
1480
|
-
return /* @__PURE__ */
|
|
1481
|
-
|
|
1451
|
+
return /* @__PURE__ */ React26.createElement(
|
|
1452
|
+
import_ui19.UnstableSortableItem,
|
|
1482
1453
|
{
|
|
1483
1454
|
id,
|
|
1484
1455
|
disabled,
|
|
@@ -1490,12 +1461,12 @@ var SortableItem = ({ id, children, disabled }) => {
|
|
|
1490
1461
|
showDropIndication,
|
|
1491
1462
|
dropIndicationStyle
|
|
1492
1463
|
}) => {
|
|
1493
|
-
return /* @__PURE__ */
|
|
1464
|
+
return /* @__PURE__ */ React26.createElement(StyledListItem, { ...itemProps, style: itemStyle, tabIndex: -1 }, !disabled && /* @__PURE__ */ React26.createElement(SortableTrigger, { ...triggerProps, style: triggerStyle }), children, showDropIndication && /* @__PURE__ */ React26.createElement(StyledDivider, { style: dropIndicationStyle }));
|
|
1494
1465
|
}
|
|
1495
1466
|
}
|
|
1496
1467
|
);
|
|
1497
1468
|
};
|
|
1498
|
-
var StyledListItem = (0,
|
|
1469
|
+
var StyledListItem = (0, import_ui19.styled)(import_ui19.ListItem)`
|
|
1499
1470
|
position: relative;
|
|
1500
1471
|
margin-inline: 0px;
|
|
1501
1472
|
padding-inline: 0px;
|
|
@@ -1525,7 +1496,7 @@ var StyledListItem = (0, import_ui20.styled)(import_ui20.ListItem)`
|
|
|
1525
1496
|
}
|
|
1526
1497
|
}
|
|
1527
1498
|
`;
|
|
1528
|
-
var SortableTrigger = (props) => /* @__PURE__ */
|
|
1499
|
+
var SortableTrigger = (props) => /* @__PURE__ */ React26.createElement(
|
|
1529
1500
|
"div",
|
|
1530
1501
|
{
|
|
1531
1502
|
...props,
|
|
@@ -1534,9 +1505,9 @@ var SortableTrigger = (props) => /* @__PURE__ */ React27.createElement(
|
|
|
1534
1505
|
tabIndex: 0,
|
|
1535
1506
|
"aria-label": (0, import_i18n6.__)("Drag item", "elementor")
|
|
1536
1507
|
},
|
|
1537
|
-
/* @__PURE__ */
|
|
1508
|
+
/* @__PURE__ */ React26.createElement(import_icons5.GripVerticalIcon, { fontSize: "tiny" })
|
|
1538
1509
|
);
|
|
1539
|
-
var StyledDivider = (0,
|
|
1510
|
+
var StyledDivider = (0, import_ui19.styled)(import_ui19.Divider)`
|
|
1540
1511
|
height: 0px;
|
|
1541
1512
|
border: none;
|
|
1542
1513
|
overflow: visible;
|
|
@@ -1571,22 +1542,22 @@ var ItemsContainer = ({
|
|
|
1571
1542
|
})
|
|
1572
1543
|
);
|
|
1573
1544
|
};
|
|
1574
|
-
return /* @__PURE__ */
|
|
1545
|
+
return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement(SortableProvider, { value: keys, onChange: onChangeOrder }, keys.map((key, index) => {
|
|
1575
1546
|
const value = items2[index].item;
|
|
1576
|
-
return /* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ React27.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React27.createElement(ItemContext.Provider, { value: { index, value } }, children));
|
|
1577
1548
|
})));
|
|
1578
1549
|
};
|
|
1579
1550
|
|
|
1580
1551
|
// src/components/control-repeater/items/item.tsx
|
|
1581
|
-
var
|
|
1582
|
-
var
|
|
1552
|
+
var React29 = __toESM(require("react"));
|
|
1553
|
+
var import_ui21 = require("@elementor/ui");
|
|
1583
1554
|
var import_i18n7 = require("@wordpress/i18n");
|
|
1584
1555
|
|
|
1585
1556
|
// src/hooks/use-repeatable-control-context.ts
|
|
1586
|
-
var
|
|
1587
|
-
var RepeatableControlContext = (0,
|
|
1557
|
+
var import_react17 = require("react");
|
|
1558
|
+
var RepeatableControlContext = (0, import_react17.createContext)(void 0);
|
|
1588
1559
|
var useRepeatableControlContext = () => {
|
|
1589
|
-
const context = (0,
|
|
1560
|
+
const context = (0, import_react17.useContext)(RepeatableControlContext);
|
|
1590
1561
|
if (!context) {
|
|
1591
1562
|
throw new Error("useRepeatableControlContext must be used within RepeatableControl");
|
|
1592
1563
|
}
|
|
@@ -1594,12 +1565,12 @@ var useRepeatableControlContext = () => {
|
|
|
1594
1565
|
};
|
|
1595
1566
|
|
|
1596
1567
|
// src/components/repeater/repeater-tag.tsx
|
|
1597
|
-
var
|
|
1598
|
-
var
|
|
1599
|
-
var
|
|
1600
|
-
var RepeaterTag = (0,
|
|
1601
|
-
return /* @__PURE__ */
|
|
1602
|
-
|
|
1568
|
+
var React28 = __toESM(require("react"));
|
|
1569
|
+
var import_react18 = require("react");
|
|
1570
|
+
var import_ui20 = require("@elementor/ui");
|
|
1571
|
+
var RepeaterTag = (0, import_react18.forwardRef)((props, ref) => {
|
|
1572
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1573
|
+
import_ui20.UnstableTag,
|
|
1603
1574
|
{
|
|
1604
1575
|
ref,
|
|
1605
1576
|
fullWidth: true,
|
|
@@ -1628,9 +1599,9 @@ var Item = ({ Label: Label3, Icon, actions }) => {
|
|
|
1628
1599
|
value,
|
|
1629
1600
|
isItemDisabled: isItemDisabled2
|
|
1630
1601
|
} = useRepeaterContext();
|
|
1631
|
-
const repeatableContext =
|
|
1602
|
+
const repeatableContext = React29.useContext(RepeatableControlContext);
|
|
1632
1603
|
const disableOpen = !!repeatableContext?.props?.readOnly;
|
|
1633
|
-
const triggerProps = (0,
|
|
1604
|
+
const triggerProps = (0, import_ui21.bindTrigger)(popoverState);
|
|
1634
1605
|
const onClick = (ev) => {
|
|
1635
1606
|
if (disableOpen || isItemDisabled2(index)) {
|
|
1636
1607
|
return;
|
|
@@ -1645,15 +1616,15 @@ var Item = ({ Label: Label3, Icon, actions }) => {
|
|
|
1645
1616
|
setRowRef(ref);
|
|
1646
1617
|
popoverState.setAnchorEl(ref);
|
|
1647
1618
|
};
|
|
1648
|
-
return /* @__PURE__ */
|
|
1619
|
+
return /* @__PURE__ */ React29.createElement(
|
|
1649
1620
|
RepeaterTag,
|
|
1650
1621
|
{
|
|
1651
1622
|
ref: setRef,
|
|
1652
|
-
label: /* @__PURE__ */
|
|
1623
|
+
label: /* @__PURE__ */ React29.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React29.createElement(Label3, { value })),
|
|
1653
1624
|
"aria-label": (0, import_i18n7.__)("Open item", "elementor"),
|
|
1654
1625
|
...triggerProps,
|
|
1655
1626
|
onClick,
|
|
1656
|
-
startIcon: /* @__PURE__ */
|
|
1627
|
+
startIcon: /* @__PURE__ */ React29.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React29.createElement(Icon, { value })),
|
|
1657
1628
|
sx: {
|
|
1658
1629
|
minHeight: (theme) => theme.spacing(3.5),
|
|
1659
1630
|
...isItemDisabled2(index) && {
|
|
@@ -1662,20 +1633,20 @@ var Item = ({ Label: Label3, Icon, actions }) => {
|
|
|
1662
1633
|
}
|
|
1663
1634
|
}
|
|
1664
1635
|
},
|
|
1665
|
-
actions: /* @__PURE__ */
|
|
1636
|
+
actions: /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(RepeaterItemActionsSlot, { index: index ?? -1 }), actions)
|
|
1666
1637
|
}
|
|
1667
1638
|
);
|
|
1668
1639
|
};
|
|
1669
1640
|
|
|
1670
1641
|
// src/components/control-repeater/control-repeater.tsx
|
|
1671
|
-
var
|
|
1642
|
+
var React30 = __toESM(require("react"));
|
|
1672
1643
|
var ControlRepeater = ({
|
|
1673
1644
|
children,
|
|
1674
1645
|
initial,
|
|
1675
1646
|
propTypeUtil,
|
|
1676
1647
|
isItemDisabled: isItemDisabled2
|
|
1677
1648
|
}) => {
|
|
1678
|
-
return /* @__PURE__ */
|
|
1649
|
+
return /* @__PURE__ */ React30.createElement(SectionContent, null, /* @__PURE__ */ React30.createElement(
|
|
1679
1650
|
RepeaterContextProvider,
|
|
1680
1651
|
{
|
|
1681
1652
|
initial,
|
|
@@ -1687,9 +1658,9 @@ var ControlRepeater = ({
|
|
|
1687
1658
|
};
|
|
1688
1659
|
|
|
1689
1660
|
// src/components/control-repeater/actions/disable-item-action.tsx
|
|
1690
|
-
var
|
|
1661
|
+
var React31 = __toESM(require("react"));
|
|
1691
1662
|
var import_icons6 = require("@elementor/icons");
|
|
1692
|
-
var
|
|
1663
|
+
var import_ui22 = require("@elementor/ui");
|
|
1693
1664
|
var import_i18n8 = require("@wordpress/i18n");
|
|
1694
1665
|
var SIZE3 = "tiny";
|
|
1695
1666
|
var DisableItemAction = () => {
|
|
@@ -1707,13 +1678,13 @@ var DisableItemAction = () => {
|
|
|
1707
1678
|
}
|
|
1708
1679
|
updateItem(self, index);
|
|
1709
1680
|
};
|
|
1710
|
-
return /* @__PURE__ */
|
|
1681
|
+
return /* @__PURE__ */ React31.createElement(import_ui22.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React31.createElement(import_ui22.IconButton, { size: SIZE3, onClick, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React31.createElement(import_icons6.EyeOffIcon, { fontSize: SIZE3 }) : /* @__PURE__ */ React31.createElement(import_icons6.EyeIcon, { fontSize: SIZE3 })));
|
|
1711
1682
|
};
|
|
1712
1683
|
|
|
1713
1684
|
// src/components/control-repeater/actions/duplicate-item-action.tsx
|
|
1714
|
-
var
|
|
1685
|
+
var React32 = __toESM(require("react"));
|
|
1715
1686
|
var import_icons7 = require("@elementor/icons");
|
|
1716
|
-
var
|
|
1687
|
+
var import_ui23 = require("@elementor/ui");
|
|
1717
1688
|
var import_i18n9 = require("@wordpress/i18n");
|
|
1718
1689
|
var SIZE4 = "tiny";
|
|
1719
1690
|
var DuplicateItemAction = () => {
|
|
@@ -1727,22 +1698,22 @@ var DuplicateItemAction = () => {
|
|
|
1727
1698
|
const newItem = structuredClone(item);
|
|
1728
1699
|
addItem(ev, { item: newItem, index: index + 1 });
|
|
1729
1700
|
};
|
|
1730
|
-
return /* @__PURE__ */
|
|
1731
|
-
|
|
1701
|
+
return /* @__PURE__ */ React32.createElement(import_ui23.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React32.createElement(
|
|
1702
|
+
import_ui23.IconButton,
|
|
1732
1703
|
{
|
|
1733
1704
|
size: SIZE4,
|
|
1734
1705
|
onClick,
|
|
1735
1706
|
"aria-label": duplicateLabel,
|
|
1736
1707
|
disabled: isItemDisabled2(index)
|
|
1737
1708
|
},
|
|
1738
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ React32.createElement(import_icons7.CopyIcon, { fontSize: SIZE4 })
|
|
1739
1710
|
));
|
|
1740
1711
|
};
|
|
1741
1712
|
|
|
1742
1713
|
// src/components/control-repeater/actions/remove-item-action.tsx
|
|
1743
|
-
var
|
|
1714
|
+
var React33 = __toESM(require("react"));
|
|
1744
1715
|
var import_icons8 = require("@elementor/icons");
|
|
1745
|
-
var
|
|
1716
|
+
var import_ui24 = require("@elementor/ui");
|
|
1746
1717
|
var import_i18n10 = require("@wordpress/i18n");
|
|
1747
1718
|
var SIZE5 = "tiny";
|
|
1748
1719
|
var RemoveItemAction = () => {
|
|
@@ -1752,19 +1723,19 @@ var RemoveItemAction = () => {
|
|
|
1752
1723
|
}
|
|
1753
1724
|
const removeLabel = (0, import_i18n10.__)("Remove", "elementor");
|
|
1754
1725
|
const onClick = () => removeItem(index);
|
|
1755
|
-
return /* @__PURE__ */
|
|
1726
|
+
return /* @__PURE__ */ React33.createElement(import_ui24.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React33.createElement(import_ui24.IconButton, { size: SIZE5, onClick, "aria-label": removeLabel }, /* @__PURE__ */ React33.createElement(import_icons8.XIcon, { fontSize: SIZE5 })));
|
|
1756
1727
|
};
|
|
1757
1728
|
|
|
1758
1729
|
// src/components/control-repeater/items/edit-item-popover.tsx
|
|
1759
|
-
var React36 = __toESM(require("react"));
|
|
1760
|
-
var import_ui27 = require("@elementor/ui");
|
|
1761
|
-
|
|
1762
|
-
// src/components/repeater/repeater-popover.tsx
|
|
1763
1730
|
var React35 = __toESM(require("react"));
|
|
1764
1731
|
var import_ui26 = require("@elementor/ui");
|
|
1732
|
+
|
|
1733
|
+
// src/components/repeater/repeater-popover.tsx
|
|
1734
|
+
var React34 = __toESM(require("react"));
|
|
1735
|
+
var import_ui25 = require("@elementor/ui");
|
|
1765
1736
|
var RepeaterPopover = ({ children, width, ...props }) => {
|
|
1766
|
-
return /* @__PURE__ */
|
|
1767
|
-
|
|
1737
|
+
return /* @__PURE__ */ React34.createElement(
|
|
1738
|
+
import_ui25.Popover,
|
|
1768
1739
|
{
|
|
1769
1740
|
disablePortal: true,
|
|
1770
1741
|
disableEnforceFocus: true,
|
|
@@ -1791,34 +1762,34 @@ var EditItemPopover = ({ children }) => {
|
|
|
1791
1762
|
popoverState.setAnchorEl(null);
|
|
1792
1763
|
setOpenItemIndex(EMPTY_OPEN_ITEM);
|
|
1793
1764
|
};
|
|
1794
|
-
return /* @__PURE__ */
|
|
1765
|
+
return /* @__PURE__ */ React35.createElement(RepeaterPopover, { width: rowRef.offsetWidth, ...(0, import_ui26.bindPopover)(popoverState), onClose }, /* @__PURE__ */ React35.createElement(PropKeyProvider, { bind: String(openItemIndex) }, /* @__PURE__ */ React35.createElement(import_ui26.Box, null, children)));
|
|
1795
1766
|
};
|
|
1796
1767
|
|
|
1797
1768
|
// src/components/popover-content.tsx
|
|
1798
|
-
var
|
|
1799
|
-
var
|
|
1800
|
-
var PopoverContent = ({ gap = 1.5, children, ...props }) => /* @__PURE__ */
|
|
1769
|
+
var React36 = __toESM(require("react"));
|
|
1770
|
+
var import_ui27 = require("@elementor/ui");
|
|
1771
|
+
var PopoverContent = ({ gap = 1.5, children, ...props }) => /* @__PURE__ */ React36.createElement(import_ui27.Stack, { ...props, gap }, children);
|
|
1801
1772
|
|
|
1802
1773
|
// src/components/popover-grid-container.tsx
|
|
1803
|
-
var
|
|
1804
|
-
var
|
|
1805
|
-
var
|
|
1806
|
-
var PopoverGridContainer = (0,
|
|
1807
|
-
({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */
|
|
1774
|
+
var import_react19 = require("react");
|
|
1775
|
+
var React37 = __toESM(require("react"));
|
|
1776
|
+
var import_ui28 = require("@elementor/ui");
|
|
1777
|
+
var PopoverGridContainer = (0, import_react19.forwardRef)(
|
|
1778
|
+
({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */ React37.createElement(import_ui28.Grid, { container: true, gap, alignItems, flexWrap, ref }, children)
|
|
1808
1779
|
);
|
|
1809
1780
|
|
|
1810
1781
|
// src/components/repeater/repeater-header.tsx
|
|
1811
|
-
var
|
|
1812
|
-
var
|
|
1813
|
-
var
|
|
1814
|
-
var RepeaterHeader = (0,
|
|
1782
|
+
var React38 = __toESM(require("react"));
|
|
1783
|
+
var import_react20 = require("react");
|
|
1784
|
+
var import_ui29 = require("@elementor/ui");
|
|
1785
|
+
var RepeaterHeader = (0, import_react20.forwardRef)(
|
|
1815
1786
|
({
|
|
1816
1787
|
label,
|
|
1817
1788
|
children,
|
|
1818
1789
|
adornment: Adornment = ControlAdornments
|
|
1819
1790
|
}, ref) => {
|
|
1820
|
-
return /* @__PURE__ */
|
|
1821
|
-
|
|
1791
|
+
return /* @__PURE__ */ React38.createElement(
|
|
1792
|
+
import_ui29.Stack,
|
|
1822
1793
|
{
|
|
1823
1794
|
direction: "row",
|
|
1824
1795
|
alignItems: "center",
|
|
@@ -1826,7 +1797,7 @@ var RepeaterHeader = (0, import_react21.forwardRef)(
|
|
|
1826
1797
|
sx: { marginInlineEnd: -0.75, py: 0.25 },
|
|
1827
1798
|
ref
|
|
1828
1799
|
},
|
|
1829
|
-
/* @__PURE__ */
|
|
1800
|
+
/* @__PURE__ */ React38.createElement(import_ui29.Box, { display: "flex", alignItems: "center", gap: 1, sx: { flexGrow: 1 } }, /* @__PURE__ */ React38.createElement(import_ui29.Typography, { component: "label", variant: "caption", color: "text.secondary", sx: { lineHeight: 1 } }, label), /* @__PURE__ */ React38.createElement(Adornment, null)),
|
|
1830
1801
|
children
|
|
1831
1802
|
);
|
|
1832
1803
|
}
|
|
@@ -1835,26 +1806,26 @@ var RepeaterHeader = (0, import_react21.forwardRef)(
|
|
|
1835
1806
|
// src/controls/box-shadow-repeater-control.tsx
|
|
1836
1807
|
var BoxShadowRepeaterControl = createControl(() => {
|
|
1837
1808
|
const { propType, value, setValue, disabled } = useBoundProp(import_editor_props10.boxShadowPropTypeUtil);
|
|
1838
|
-
return /* @__PURE__ */
|
|
1809
|
+
return /* @__PURE__ */ React39.createElement(PropProvider, { propType, value, setValue, isDisabled: () => disabled }, /* @__PURE__ */ React39.createElement(ControlRepeater, { initial: initialShadow, propTypeUtil: import_editor_props10.boxShadowPropTypeUtil }, /* @__PURE__ */ React39.createElement(RepeaterHeader, { label: (0, import_i18n11.__)("Box shadow", "elementor") }, /* @__PURE__ */ React39.createElement(TooltipAddItemAction, { newItemIndex: 0, disabled, ariaLabel: "Box shadow" })), /* @__PURE__ */ React39.createElement(ItemsContainer, null, /* @__PURE__ */ React39.createElement(
|
|
1839
1810
|
Item,
|
|
1840
1811
|
{
|
|
1841
1812
|
Icon: ItemIcon,
|
|
1842
1813
|
Label: ItemLabel,
|
|
1843
|
-
actions: /* @__PURE__ */
|
|
1814
|
+
actions: /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(DuplicateItemAction, null), /* @__PURE__ */ React39.createElement(DisableItemAction, null), /* @__PURE__ */ React39.createElement(RemoveItemAction, null))
|
|
1844
1815
|
}
|
|
1845
|
-
)), /* @__PURE__ */
|
|
1816
|
+
)), /* @__PURE__ */ React39.createElement(EditItemPopover, null, /* @__PURE__ */ React39.createElement(Content, null))));
|
|
1846
1817
|
});
|
|
1847
|
-
var StyledUnstableColorIndicator = (0,
|
|
1818
|
+
var StyledUnstableColorIndicator = (0, import_ui30.styled)(import_ui30.UnstableColorIndicator)(({ theme }) => ({
|
|
1848
1819
|
height: "1rem",
|
|
1849
1820
|
width: "1rem",
|
|
1850
1821
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
1851
1822
|
}));
|
|
1852
|
-
var ItemIcon = ({ value }) => /* @__PURE__ */
|
|
1823
|
+
var ItemIcon = ({ value }) => /* @__PURE__ */ React39.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color?.value });
|
|
1853
1824
|
var Content = () => {
|
|
1854
1825
|
const context = useBoundProp(import_editor_props10.shadowPropTypeUtil);
|
|
1855
|
-
const rowRef = [(0,
|
|
1826
|
+
const rowRef = [(0, import_react21.useRef)(null), (0, import_react21.useRef)(null)];
|
|
1856
1827
|
const { rowRef: anchorEl } = useRepeaterContext();
|
|
1857
|
-
return /* @__PURE__ */
|
|
1828
|
+
return /* @__PURE__ */ React39.createElement(PropProvider, { ...context }, /* @__PURE__ */ React39.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React39.createElement(PopoverGridContainer, null, /* @__PURE__ */ React39.createElement(Control2, { bind: "color", label: (0, import_i18n11.__)("Color", "elementor") }, /* @__PURE__ */ React39.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React39.createElement(Control2, { bind: "position", label: (0, import_i18n11.__)("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React39.createElement(
|
|
1858
1829
|
SelectControl,
|
|
1859
1830
|
{
|
|
1860
1831
|
options: [
|
|
@@ -1862,14 +1833,14 @@ var Content = () => {
|
|
|
1862
1833
|
{ label: (0, import_i18n11.__)("Outset", "elementor"), value: null }
|
|
1863
1834
|
]
|
|
1864
1835
|
}
|
|
1865
|
-
))), /* @__PURE__ */
|
|
1836
|
+
))), /* @__PURE__ */ React39.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React39.createElement(Control2, { bind: "hOffset", label: (0, import_i18n11.__)("Horizontal", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[0] })), /* @__PURE__ */ React39.createElement(Control2, { bind: "vOffset", label: (0, import_i18n11.__)("Vertical", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[0] }))), /* @__PURE__ */ React39.createElement(PopoverGridContainer, { ref: rowRef[1] }, /* @__PURE__ */ React39.createElement(Control2, { bind: "blur", label: (0, import_i18n11.__)("Blur", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[1] })), /* @__PURE__ */ React39.createElement(Control2, { bind: "spread", label: (0, import_i18n11.__)("Spread", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[1] })))));
|
|
1866
1837
|
};
|
|
1867
1838
|
var Control2 = ({
|
|
1868
1839
|
label,
|
|
1869
1840
|
bind,
|
|
1870
1841
|
children,
|
|
1871
1842
|
sx
|
|
1872
|
-
}) => /* @__PURE__ */
|
|
1843
|
+
}) => /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6, sx }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(import_ui30.FormLabel, { size: "tiny" }, label)), /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 12 }, children))));
|
|
1873
1844
|
var ItemLabel = ({ value }) => {
|
|
1874
1845
|
const { position, hOffset, vOffset, blur, spread } = value.value;
|
|
1875
1846
|
const { size: blurSize = "", unit: blurUnit = "" } = blur?.value || {};
|
|
@@ -1888,7 +1859,7 @@ var ItemLabel = ({ value }) => {
|
|
|
1888
1859
|
}
|
|
1889
1860
|
return !size ? CUSTOM_SIZE_LABEL : size;
|
|
1890
1861
|
}).join(" ");
|
|
1891
|
-
return /* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ React39.createElement("span", { style: { textTransform: "capitalize" } }, positionLabel, ": ", sizes);
|
|
1892
1863
|
};
|
|
1893
1864
|
var initialShadow = {
|
|
1894
1865
|
$$type: "shadow",
|
|
@@ -1918,13 +1889,13 @@ var initialShadow = {
|
|
|
1918
1889
|
};
|
|
1919
1890
|
|
|
1920
1891
|
// src/controls/filter-control/filter-repeater-control.tsx
|
|
1921
|
-
var
|
|
1892
|
+
var React48 = __toESM(require("react"));
|
|
1922
1893
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
1923
1894
|
var import_i18n16 = require("@wordpress/i18n");
|
|
1924
1895
|
|
|
1925
1896
|
// src/controls/filter-control/context/filter-config-context.tsx
|
|
1926
|
-
var
|
|
1927
|
-
var
|
|
1897
|
+
var React40 = __toESM(require("react"));
|
|
1898
|
+
var import_react22 = require("react");
|
|
1928
1899
|
var import_editor_props11 = require("@elementor/editor-props");
|
|
1929
1900
|
|
|
1930
1901
|
// src/controls/filter-control/utils.ts
|
|
@@ -2023,10 +1994,10 @@ function extractPropType(propType, filterFunctionGroup) {
|
|
|
2023
1994
|
}
|
|
2024
1995
|
|
|
2025
1996
|
// src/controls/filter-control/context/filter-config-context.tsx
|
|
2026
|
-
var FilterConfigContext = (0,
|
|
1997
|
+
var FilterConfigContext = (0, import_react22.createContext)(null);
|
|
2027
1998
|
function FilterConfigProvider({ children }) {
|
|
2028
1999
|
const propContext = useBoundProp(import_editor_props11.cssFilterFunctionPropUtil);
|
|
2029
|
-
const contextValue = (0,
|
|
2000
|
+
const contextValue = (0, import_react22.useMemo)(() => {
|
|
2030
2001
|
const config = buildFilterConfig(propContext.propType.item_prop_type);
|
|
2031
2002
|
const filterOptions = Object.entries(config).map(([key, conf]) => ({
|
|
2032
2003
|
value: key,
|
|
@@ -2039,10 +2010,10 @@ function FilterConfigProvider({ children }) {
|
|
|
2039
2010
|
getInitialValue: () => config.blur.defaultValue
|
|
2040
2011
|
};
|
|
2041
2012
|
}, [propContext.propType]);
|
|
2042
|
-
return /* @__PURE__ */
|
|
2013
|
+
return /* @__PURE__ */ React40.createElement(FilterConfigContext.Provider, { value: contextValue }, children);
|
|
2043
2014
|
}
|
|
2044
2015
|
function useFilterConfig() {
|
|
2045
|
-
const context = (0,
|
|
2016
|
+
const context = (0, import_react22.useContext)(FilterConfigContext);
|
|
2046
2017
|
if (!context) {
|
|
2047
2018
|
throw new Error("useFilterConfig must be used within FilterConfigProvider");
|
|
2048
2019
|
}
|
|
@@ -2050,16 +2021,16 @@ function useFilterConfig() {
|
|
|
2050
2021
|
}
|
|
2051
2022
|
|
|
2052
2023
|
// src/controls/filter-control/filter-content.tsx
|
|
2053
|
-
var
|
|
2024
|
+
var React43 = __toESM(require("react"));
|
|
2054
2025
|
var import_editor_props14 = require("@elementor/editor-props");
|
|
2055
|
-
var
|
|
2026
|
+
var import_ui33 = require("@elementor/ui");
|
|
2056
2027
|
var import_i18n15 = require("@wordpress/i18n");
|
|
2057
2028
|
|
|
2058
2029
|
// src/controls/filter-control/drop-shadow/drop-shadow-item-content.tsx
|
|
2059
|
-
var
|
|
2060
|
-
var
|
|
2030
|
+
var React41 = __toESM(require("react"));
|
|
2031
|
+
var import_react23 = require("react");
|
|
2061
2032
|
var import_editor_props12 = require("@elementor/editor-props");
|
|
2062
|
-
var
|
|
2033
|
+
var import_ui31 = require("@elementor/ui");
|
|
2063
2034
|
var import_i18n14 = require("@wordpress/i18n");
|
|
2064
2035
|
var items = [
|
|
2065
2036
|
{
|
|
@@ -2085,8 +2056,8 @@ var items = [
|
|
|
2085
2056
|
];
|
|
2086
2057
|
var DropShadowItemContent = ({ anchorEl }) => {
|
|
2087
2058
|
const context = useBoundProp(import_editor_props12.dropShadowFilterPropTypeUtil);
|
|
2088
|
-
const rowRefs = [(0,
|
|
2089
|
-
return /* @__PURE__ */
|
|
2059
|
+
const rowRefs = [(0, import_react23.useRef)(null), (0, import_react23.useRef)(null)];
|
|
2060
|
+
return /* @__PURE__ */ React41.createElement(PropProvider, { ...context }, items.map((item) => /* @__PURE__ */ React41.createElement(PopoverGridContainer, { key: item.bind, ref: rowRefs[item.rowIndex] ?? null }, /* @__PURE__ */ React41.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React41.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React41.createElement(import_ui31.Grid, { item: true, xs: 6 }, item.bind === "color" ? /* @__PURE__ */ React41.createElement(ColorControl, { anchorEl }) : /* @__PURE__ */ React41.createElement(
|
|
2090
2061
|
SizeControl,
|
|
2091
2062
|
{
|
|
2092
2063
|
anchorRef: rowRefs[item.rowIndex],
|
|
@@ -2097,10 +2068,10 @@ var DropShadowItemContent = ({ anchorEl }) => {
|
|
|
2097
2068
|
};
|
|
2098
2069
|
|
|
2099
2070
|
// src/controls/filter-control/single-size/single-size-item-content.tsx
|
|
2100
|
-
var
|
|
2101
|
-
var
|
|
2071
|
+
var import_react24 = require("react");
|
|
2072
|
+
var React42 = __toESM(require("react"));
|
|
2102
2073
|
var import_editor_props13 = require("@elementor/editor-props");
|
|
2103
|
-
var
|
|
2074
|
+
var import_ui32 = require("@elementor/ui");
|
|
2104
2075
|
var propTypeMap = {
|
|
2105
2076
|
blur: import_editor_props13.blurFilterPropTypeUtil,
|
|
2106
2077
|
intensity: import_editor_props13.intensityFilterPropTypeUtil,
|
|
@@ -2108,11 +2079,11 @@ var propTypeMap = {
|
|
|
2108
2079
|
"color-tone": import_editor_props13.colorToneFilterPropTypeUtil
|
|
2109
2080
|
};
|
|
2110
2081
|
var SingleSizeItemContent = ({ filterFunc }) => {
|
|
2111
|
-
const rowRef = (0,
|
|
2082
|
+
const rowRef = (0, import_react24.useRef)(null);
|
|
2112
2083
|
const { getFilterFunctionConfig } = useFilterConfig();
|
|
2113
2084
|
const { valueName, filterFunctionGroup } = getFilterFunctionConfig(filterFunc);
|
|
2114
2085
|
const context = useBoundProp(propTypeMap[filterFunctionGroup]);
|
|
2115
|
-
return /* @__PURE__ */
|
|
2086
|
+
return /* @__PURE__ */ React42.createElement(PropProvider, { ...context }, /* @__PURE__ */ React42.createElement(PropKeyProvider, { bind: filterFunctionGroup }, /* @__PURE__ */ React42.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React42.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React42.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlFormLabel, null, valueName)), /* @__PURE__ */ React42.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeControl, { anchorRef: rowRef, enablePropTypeUnits: true }))))));
|
|
2116
2087
|
};
|
|
2117
2088
|
|
|
2118
2089
|
// src/controls/filter-control/filter-content.tsx
|
|
@@ -2130,7 +2101,7 @@ var FilterContent = () => {
|
|
|
2130
2101
|
}
|
|
2131
2102
|
propContext.setValue(newValue);
|
|
2132
2103
|
};
|
|
2133
|
-
return /* @__PURE__ */
|
|
2104
|
+
return /* @__PURE__ */ React43.createElement(PropProvider, { ...propContext, setValue: handleValueChange }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "css-filter-func" }, /* @__PURE__ */ React43.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React43.createElement(PopoverGridContainer, null, /* @__PURE__ */ React43.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlFormLabel, null, (0, import_i18n15.__)("Filter", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "func" }, /* @__PURE__ */ React43.createElement(SelectControl, { options: filterOptions })))), /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "args" }, /* @__PURE__ */ React43.createElement(FilterValueContent, null)))));
|
|
2134
2105
|
};
|
|
2135
2106
|
var FilterValueContent = () => {
|
|
2136
2107
|
const { openItemIndex, items: items2 } = useRepeaterContext();
|
|
@@ -2138,19 +2109,19 @@ var FilterValueContent = () => {
|
|
|
2138
2109
|
const filterFunc = currentItem.item.value.func.value;
|
|
2139
2110
|
const isDropShadow = filterFunc === "drop-shadow";
|
|
2140
2111
|
if (isDropShadow) {
|
|
2141
|
-
return /* @__PURE__ */
|
|
2112
|
+
return /* @__PURE__ */ React43.createElement(DropShadowItemContent, null);
|
|
2142
2113
|
}
|
|
2143
|
-
return /* @__PURE__ */
|
|
2114
|
+
return /* @__PURE__ */ React43.createElement(SingleSizeItemContent, { filterFunc });
|
|
2144
2115
|
};
|
|
2145
2116
|
|
|
2146
2117
|
// src/controls/filter-control/filter-icon.tsx
|
|
2147
|
-
var
|
|
2148
|
-
var
|
|
2118
|
+
var React44 = __toESM(require("react"));
|
|
2119
|
+
var import_ui34 = require("@elementor/ui");
|
|
2149
2120
|
var FilterIcon = ({ value }) => {
|
|
2150
2121
|
if (value.value.func.value !== "drop-shadow") {
|
|
2151
2122
|
return null;
|
|
2152
2123
|
}
|
|
2153
|
-
return /* @__PURE__ */
|
|
2124
|
+
return /* @__PURE__ */ React44.createElement(
|
|
2154
2125
|
StyledUnstableColorIndicator2,
|
|
2155
2126
|
{
|
|
2156
2127
|
size: "inherit",
|
|
@@ -2159,44 +2130,44 @@ var FilterIcon = ({ value }) => {
|
|
|
2159
2130
|
}
|
|
2160
2131
|
);
|
|
2161
2132
|
};
|
|
2162
|
-
var StyledUnstableColorIndicator2 = (0,
|
|
2133
|
+
var StyledUnstableColorIndicator2 = (0, import_ui34.styled)(import_ui34.UnstableColorIndicator)(({ theme }) => ({
|
|
2163
2134
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
2164
2135
|
}));
|
|
2165
2136
|
|
|
2166
2137
|
// src/controls/filter-control/filter-label.tsx
|
|
2167
|
-
var
|
|
2138
|
+
var React47 = __toESM(require("react"));
|
|
2168
2139
|
|
|
2169
2140
|
// src/controls/filter-control/drop-shadow/drop-shadow-item-label.tsx
|
|
2170
|
-
var
|
|
2171
|
-
var
|
|
2141
|
+
var React45 = __toESM(require("react"));
|
|
2142
|
+
var import_ui35 = require("@elementor/ui");
|
|
2172
2143
|
var DropShadowItemLabel = ({ value }) => {
|
|
2173
2144
|
const values = value.value.args.value;
|
|
2174
2145
|
const keys = ["xAxis", "yAxis", "blur"];
|
|
2175
2146
|
const labels = keys.map(
|
|
2176
2147
|
(key) => values[key]?.value?.unit !== "custom" ? `${values[key]?.value?.size ?? 0}${values[key]?.value?.unit ?? "px"}` : values[key]?.value?.size || CUSTOM_SIZE_LABEL
|
|
2177
2148
|
);
|
|
2178
|
-
return /* @__PURE__ */
|
|
2149
|
+
return /* @__PURE__ */ React45.createElement(import_ui35.Box, { component: "span" }, /* @__PURE__ */ React45.createElement(import_ui35.Box, { component: "span", style: { textTransform: "capitalize" } }, "Drop shadow:"), ` ${labels.join(" ")}`);
|
|
2179
2150
|
};
|
|
2180
2151
|
|
|
2181
2152
|
// src/controls/filter-control/single-size/single-size-item-label.tsx
|
|
2182
|
-
var
|
|
2183
|
-
var
|
|
2153
|
+
var React46 = __toESM(require("react"));
|
|
2154
|
+
var import_ui36 = require("@elementor/ui");
|
|
2184
2155
|
var SingleSizeItemLabel = ({ value }) => {
|
|
2185
2156
|
const { func, args } = value.value;
|
|
2186
2157
|
const { getFilterFunctionConfig } = useFilterConfig();
|
|
2187
2158
|
const { defaultValue } = getFilterFunctionConfig(func.value ?? "");
|
|
2188
2159
|
const defaultUnit = defaultValue.value.args.value?.size?.value?.unit ?? lengthUnits[0];
|
|
2189
2160
|
const { unit, size } = args.value.size?.value ?? { unit: defaultUnit, size: 0 };
|
|
2190
|
-
const label = /* @__PURE__ */
|
|
2191
|
-
return /* @__PURE__ */
|
|
2161
|
+
const label = /* @__PURE__ */ React46.createElement(import_ui36.Box, { component: "span", style: { textTransform: "capitalize" } }, func.value ?? "", ":");
|
|
2162
|
+
return /* @__PURE__ */ React46.createElement(import_ui36.Box, { component: "span" }, label, " " + (unit !== "custom" ? `${size ?? 0}${unit ?? defaultUnit}` : size || CUSTOM_SIZE_LABEL));
|
|
2192
2163
|
};
|
|
2193
2164
|
|
|
2194
2165
|
// src/controls/filter-control/filter-label.tsx
|
|
2195
2166
|
var FilterLabel = ({ value }) => {
|
|
2196
2167
|
if (value.value.func.value === "drop-shadow") {
|
|
2197
|
-
return /* @__PURE__ */
|
|
2168
|
+
return /* @__PURE__ */ React47.createElement(DropShadowItemLabel, { value });
|
|
2198
2169
|
}
|
|
2199
|
-
return /* @__PURE__ */
|
|
2170
|
+
return /* @__PURE__ */ React47.createElement(SingleSizeItemLabel, { value });
|
|
2200
2171
|
};
|
|
2201
2172
|
|
|
2202
2173
|
// src/controls/filter-control/filter-repeater-control.tsx
|
|
@@ -2213,7 +2184,7 @@ var FILTER_CONFIG = {
|
|
|
2213
2184
|
var FilterRepeaterControl = createControl(({ filterPropName = "filter" }) => {
|
|
2214
2185
|
const { propTypeUtil, label } = ensureFilterConfig(filterPropName);
|
|
2215
2186
|
const { propType, value: filterValues, setValue } = useBoundProp(propTypeUtil);
|
|
2216
|
-
return /* @__PURE__ */
|
|
2187
|
+
return /* @__PURE__ */ React48.createElement(FilterConfigProvider, null, /* @__PURE__ */ React48.createElement(PropProvider, { propType, value: filterValues, setValue }, /* @__PURE__ */ React48.createElement(
|
|
2217
2188
|
Repeater,
|
|
2218
2189
|
{
|
|
2219
2190
|
propTypeUtil,
|
|
@@ -2224,20 +2195,20 @@ var FilterRepeaterControl = createControl(({ filterPropName = "filter" }) => {
|
|
|
2224
2195
|
});
|
|
2225
2196
|
var Repeater = ({ propTypeUtil, label, filterPropName }) => {
|
|
2226
2197
|
const { getInitialValue: getInitialValue2 } = useFilterConfig();
|
|
2227
|
-
return /* @__PURE__ */
|
|
2198
|
+
return /* @__PURE__ */ React48.createElement(ControlRepeater, { initial: getInitialValue2(), propTypeUtil }, /* @__PURE__ */ React48.createElement(RepeaterHeader, { label }, /* @__PURE__ */ React48.createElement(
|
|
2228
2199
|
TooltipAddItemAction,
|
|
2229
2200
|
{
|
|
2230
2201
|
newItemIndex: 0,
|
|
2231
2202
|
ariaLabel: filterPropName === "backdrop-filter" ? "backdrop filter" : "filter"
|
|
2232
2203
|
}
|
|
2233
|
-
)), /* @__PURE__ */
|
|
2204
|
+
)), /* @__PURE__ */ React48.createElement(ItemsContainer, null, /* @__PURE__ */ React48.createElement(
|
|
2234
2205
|
Item,
|
|
2235
2206
|
{
|
|
2236
2207
|
Label: FilterLabel,
|
|
2237
2208
|
Icon: FilterIcon,
|
|
2238
|
-
actions: /* @__PURE__ */
|
|
2209
|
+
actions: /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(DuplicateItemAction, null), /* @__PURE__ */ React48.createElement(DisableItemAction, null), /* @__PURE__ */ React48.createElement(RemoveItemAction, null))
|
|
2239
2210
|
}
|
|
2240
|
-
)), /* @__PURE__ */
|
|
2211
|
+
)), /* @__PURE__ */ React48.createElement(EditItemPopover, null, /* @__PURE__ */ React48.createElement(FilterContent, null)));
|
|
2241
2212
|
};
|
|
2242
2213
|
function ensureFilterConfig(name) {
|
|
2243
2214
|
if (name && name in FILTER_CONFIG) {
|
|
@@ -2247,8 +2218,8 @@ function ensureFilterConfig(name) {
|
|
|
2247
2218
|
}
|
|
2248
2219
|
|
|
2249
2220
|
// src/controls/select-control-wrapper.tsx
|
|
2250
|
-
var
|
|
2251
|
-
var
|
|
2221
|
+
var React49 = __toESM(require("react"));
|
|
2222
|
+
var import_react25 = require("react");
|
|
2252
2223
|
var getOffCanvasElements = () => {
|
|
2253
2224
|
const extendedWindow = window;
|
|
2254
2225
|
const documentId = extendedWindow.elementor.config.document.id;
|
|
@@ -2266,8 +2237,8 @@ var collectionMethods = {
|
|
|
2266
2237
|
"off-canvas": getOffCanvasElements
|
|
2267
2238
|
};
|
|
2268
2239
|
var useDynamicOptions = (collectionId, initialOptions) => {
|
|
2269
|
-
const [options, setOptions] = (0,
|
|
2270
|
-
(0,
|
|
2240
|
+
const [options, setOptions] = (0, import_react25.useState)(initialOptions ?? []);
|
|
2241
|
+
(0, import_react25.useEffect)(() => {
|
|
2271
2242
|
if (!collectionId || !collectionMethods[collectionId]) {
|
|
2272
2243
|
setOptions(initialOptions ?? []);
|
|
2273
2244
|
return;
|
|
@@ -2279,33 +2250,33 @@ var useDynamicOptions = (collectionId, initialOptions) => {
|
|
|
2279
2250
|
var SelectControlWrapper = createControl(
|
|
2280
2251
|
({ collectionId, options, ...props }) => {
|
|
2281
2252
|
const actualOptions = useDynamicOptions(collectionId, options);
|
|
2282
|
-
return /* @__PURE__ */
|
|
2253
|
+
return /* @__PURE__ */ React49.createElement(SelectControl, { options: actualOptions, ...props });
|
|
2283
2254
|
}
|
|
2284
2255
|
);
|
|
2285
2256
|
|
|
2286
2257
|
// src/controls/toggle-control.tsx
|
|
2287
|
-
var
|
|
2258
|
+
var React53 = __toESM(require("react"));
|
|
2288
2259
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
2289
2260
|
|
|
2290
2261
|
// src/components/control-toggle-button-group.tsx
|
|
2291
|
-
var
|
|
2292
|
-
var
|
|
2262
|
+
var React51 = __toESM(require("react"));
|
|
2263
|
+
var import_react26 = require("react");
|
|
2293
2264
|
var import_icons9 = require("@elementor/icons");
|
|
2294
|
-
var
|
|
2265
|
+
var import_ui38 = require("@elementor/ui");
|
|
2295
2266
|
|
|
2296
2267
|
// src/components/conditional-tooltip.tsx
|
|
2297
|
-
var
|
|
2298
|
-
var
|
|
2268
|
+
var React50 = __toESM(require("react"));
|
|
2269
|
+
var import_ui37 = require("@elementor/ui");
|
|
2299
2270
|
var ConditionalTooltip = ({
|
|
2300
2271
|
showTooltip,
|
|
2301
2272
|
children,
|
|
2302
2273
|
label
|
|
2303
2274
|
}) => {
|
|
2304
|
-
return showTooltip && label ? /* @__PURE__ */
|
|
2275
|
+
return showTooltip && label ? /* @__PURE__ */ React50.createElement(import_ui37.Tooltip, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
|
|
2305
2276
|
};
|
|
2306
2277
|
|
|
2307
2278
|
// src/components/control-toggle-button-group.tsx
|
|
2308
|
-
var StyledToggleButtonGroup = (0,
|
|
2279
|
+
var StyledToggleButtonGroup = (0, import_ui38.styled)(import_ui38.ToggleButtonGroup)`
|
|
2309
2280
|
${({ justify }) => `justify-content: ${justify};`}
|
|
2310
2281
|
button:not( :last-of-type ) {
|
|
2311
2282
|
border-start-end-radius: 0;
|
|
@@ -2320,7 +2291,7 @@ var StyledToggleButtonGroup = (0, import_ui39.styled)(import_ui39.ToggleButtonGr
|
|
|
2320
2291
|
border-end-end-radius: 8px;
|
|
2321
2292
|
}
|
|
2322
2293
|
`;
|
|
2323
|
-
var StyledToggleButton = (0,
|
|
2294
|
+
var StyledToggleButton = (0, import_ui38.styled)(import_ui38.ToggleButton, {
|
|
2324
2295
|
shouldForwardProp: (prop) => prop !== "isPlaceholder"
|
|
2325
2296
|
})`
|
|
2326
2297
|
${({ theme, isPlaceholder }) => isPlaceholder && `
|
|
@@ -2332,7 +2303,7 @@ var StyledToggleButton = (0, import_ui39.styled)(import_ui39.ToggleButton, {
|
|
|
2332
2303
|
}
|
|
2333
2304
|
`}
|
|
2334
2305
|
`;
|
|
2335
|
-
var ToggleButtonGroupUi =
|
|
2306
|
+
var ToggleButtonGroupUi = React51.forwardRef(
|
|
2336
2307
|
({
|
|
2337
2308
|
justify = "end",
|
|
2338
2309
|
size = "tiny",
|
|
@@ -2348,12 +2319,12 @@ var ToggleButtonGroupUi = React52.forwardRef(
|
|
|
2348
2319
|
const shouldSliceItems = exclusive && maxItems !== void 0 && items2.length > maxItems;
|
|
2349
2320
|
const menuItems = shouldSliceItems ? items2.slice(maxItems - 1) : [];
|
|
2350
2321
|
const fixedItems = shouldSliceItems ? items2.slice(0, maxItems - 1) : items2;
|
|
2351
|
-
const theme = (0,
|
|
2322
|
+
const theme = (0, import_ui38.useTheme)();
|
|
2352
2323
|
const isRtl = "rtl" === theme.direction;
|
|
2353
2324
|
const handleChange = (_, newValue) => {
|
|
2354
2325
|
onChange(newValue);
|
|
2355
2326
|
};
|
|
2356
|
-
const getGridTemplateColumns = (0,
|
|
2327
|
+
const getGridTemplateColumns = (0, import_react26.useMemo)(() => {
|
|
2357
2328
|
const isOffLimits = menuItems?.length;
|
|
2358
2329
|
const itemsCount = isOffLimits ? fixedItems.length + 1 : fixedItems.length;
|
|
2359
2330
|
const templateColumnsSuffix = isOffLimits ? "auto" : "";
|
|
@@ -2377,7 +2348,7 @@ var ToggleButtonGroupUi = React52.forwardRef(
|
|
|
2377
2348
|
return [];
|
|
2378
2349
|
};
|
|
2379
2350
|
const placeholderArray = getPlaceholderArray(placeholder);
|
|
2380
|
-
return /* @__PURE__ */
|
|
2351
|
+
return /* @__PURE__ */ React51.createElement(
|
|
2381
2352
|
StyledToggleButtonGroup,
|
|
2382
2353
|
{
|
|
2383
2354
|
ref,
|
|
@@ -2395,14 +2366,14 @@ var ToggleButtonGroupUi = React52.forwardRef(
|
|
|
2395
2366
|
},
|
|
2396
2367
|
fixedItems.map(({ label, value: buttonValue, renderContent: Content3, showTooltip }) => {
|
|
2397
2368
|
const isPlaceholder = placeholderArray.length > 0 && placeholderArray.includes(buttonValue) && (shouldShowExclusivePlaceholder || shouldShowNonExclusivePlaceholder);
|
|
2398
|
-
return /* @__PURE__ */
|
|
2369
|
+
return /* @__PURE__ */ React51.createElement(
|
|
2399
2370
|
ConditionalTooltip,
|
|
2400
2371
|
{
|
|
2401
2372
|
key: buttonValue,
|
|
2402
2373
|
label,
|
|
2403
2374
|
showTooltip: showTooltip || false
|
|
2404
2375
|
},
|
|
2405
|
-
/* @__PURE__ */
|
|
2376
|
+
/* @__PURE__ */ React51.createElement(
|
|
2406
2377
|
StyledToggleButton,
|
|
2407
2378
|
{
|
|
2408
2379
|
value: buttonValue,
|
|
@@ -2411,11 +2382,11 @@ var ToggleButtonGroupUi = React52.forwardRef(
|
|
|
2411
2382
|
fullWidth,
|
|
2412
2383
|
isPlaceholder
|
|
2413
2384
|
},
|
|
2414
|
-
/* @__PURE__ */
|
|
2385
|
+
/* @__PURE__ */ React51.createElement(Content3, { size })
|
|
2415
2386
|
)
|
|
2416
2387
|
);
|
|
2417
2388
|
}),
|
|
2418
|
-
menuItems.length && exclusive && /* @__PURE__ */
|
|
2389
|
+
menuItems.length && exclusive && /* @__PURE__ */ React51.createElement(
|
|
2419
2390
|
SplitButtonGroup,
|
|
2420
2391
|
{
|
|
2421
2392
|
size,
|
|
@@ -2429,7 +2400,7 @@ var ToggleButtonGroupUi = React52.forwardRef(
|
|
|
2429
2400
|
}
|
|
2430
2401
|
);
|
|
2431
2402
|
var ControlToggleButtonGroup = (props) => {
|
|
2432
|
-
return /* @__PURE__ */
|
|
2403
|
+
return /* @__PURE__ */ React51.createElement(ControlActions, null, /* @__PURE__ */ React51.createElement(ToggleButtonGroupUi, { ...props }));
|
|
2433
2404
|
};
|
|
2434
2405
|
var SplitButtonGroup = ({
|
|
2435
2406
|
size = "tiny",
|
|
@@ -2439,8 +2410,8 @@ var SplitButtonGroup = ({
|
|
|
2439
2410
|
value
|
|
2440
2411
|
}) => {
|
|
2441
2412
|
const previewButton = usePreviewButton(items2, value);
|
|
2442
|
-
const [isMenuOpen, setIsMenuOpen] = (0,
|
|
2443
|
-
const menuButtonRef = (0,
|
|
2413
|
+
const [isMenuOpen, setIsMenuOpen] = (0, import_react26.useState)(false);
|
|
2414
|
+
const menuButtonRef = (0, import_react26.useRef)(null);
|
|
2444
2415
|
const onMenuToggle = (ev) => {
|
|
2445
2416
|
setIsMenuOpen((prev) => !prev);
|
|
2446
2417
|
ev.preventDefault();
|
|
@@ -2453,8 +2424,8 @@ var SplitButtonGroup = ({
|
|
|
2453
2424
|
const shouldRemove = newValue === value;
|
|
2454
2425
|
onChange(shouldRemove ? null : newValue);
|
|
2455
2426
|
};
|
|
2456
|
-
return /* @__PURE__ */
|
|
2457
|
-
|
|
2427
|
+
return /* @__PURE__ */ React51.createElement(React51.Fragment, null, /* @__PURE__ */ React51.createElement(
|
|
2428
|
+
import_ui38.ToggleButton,
|
|
2458
2429
|
{
|
|
2459
2430
|
value: previewButton.value,
|
|
2460
2431
|
"aria-label": previewButton.label,
|
|
@@ -2466,8 +2437,8 @@ var SplitButtonGroup = ({
|
|
|
2466
2437
|
}
|
|
2467
2438
|
},
|
|
2468
2439
|
previewButton.renderContent({ size })
|
|
2469
|
-
), /* @__PURE__ */
|
|
2470
|
-
|
|
2440
|
+
), /* @__PURE__ */ React51.createElement(
|
|
2441
|
+
import_ui38.ToggleButton,
|
|
2471
2442
|
{
|
|
2472
2443
|
size,
|
|
2473
2444
|
"aria-expanded": isMenuOpen ? "true" : void 0,
|
|
@@ -2477,9 +2448,9 @@ var SplitButtonGroup = ({
|
|
|
2477
2448
|
ref: menuButtonRef,
|
|
2478
2449
|
value: "__chevron-icon-button__"
|
|
2479
2450
|
},
|
|
2480
|
-
/* @__PURE__ */
|
|
2481
|
-
), /* @__PURE__ */
|
|
2482
|
-
|
|
2451
|
+
/* @__PURE__ */ React51.createElement(import_icons9.ChevronDownIcon, { fontSize: size })
|
|
2452
|
+
), /* @__PURE__ */ React51.createElement(
|
|
2453
|
+
import_ui38.Menu,
|
|
2483
2454
|
{
|
|
2484
2455
|
open: isMenuOpen,
|
|
2485
2456
|
onClose: () => setIsMenuOpen(false),
|
|
@@ -2496,22 +2467,22 @@ var SplitButtonGroup = ({
|
|
|
2496
2467
|
mt: 0.5
|
|
2497
2468
|
}
|
|
2498
2469
|
},
|
|
2499
|
-
items2.map(({ label, value: buttonValue }) => /* @__PURE__ */
|
|
2500
|
-
|
|
2470
|
+
items2.map(({ label, value: buttonValue }) => /* @__PURE__ */ React51.createElement(
|
|
2471
|
+
import_ui38.MenuItem,
|
|
2501
2472
|
{
|
|
2502
2473
|
key: buttonValue,
|
|
2503
2474
|
selected: buttonValue === value,
|
|
2504
2475
|
onClick: () => onMenuItemClick(buttonValue)
|
|
2505
2476
|
},
|
|
2506
|
-
/* @__PURE__ */
|
|
2477
|
+
/* @__PURE__ */ React51.createElement(import_ui38.ListItemText, null, /* @__PURE__ */ React51.createElement(import_ui38.Typography, { sx: { fontSize: "14px" } }, label))
|
|
2507
2478
|
))
|
|
2508
2479
|
));
|
|
2509
2480
|
};
|
|
2510
2481
|
var usePreviewButton = (items2, value) => {
|
|
2511
|
-
const [previewButton, setPreviewButton] = (0,
|
|
2482
|
+
const [previewButton, setPreviewButton] = (0, import_react26.useState)(
|
|
2512
2483
|
items2.find((item) => item.value === value) ?? items2[0]
|
|
2513
2484
|
);
|
|
2514
|
-
(0,
|
|
2485
|
+
(0, import_react26.useEffect)(() => {
|
|
2515
2486
|
const selectedButton = items2.find((item) => item.value === value);
|
|
2516
2487
|
if (selectedButton) {
|
|
2517
2488
|
setPreviewButton(selectedButton);
|
|
@@ -2521,7 +2492,7 @@ var usePreviewButton = (items2, value) => {
|
|
|
2521
2492
|
};
|
|
2522
2493
|
|
|
2523
2494
|
// src/utils/convert-toggle-options-to-atomic.tsx
|
|
2524
|
-
var
|
|
2495
|
+
var React52 = __toESM(require("react"));
|
|
2525
2496
|
var Icons = __toESM(require("@elementor/icons"));
|
|
2526
2497
|
var convertToggleOptionsToAtomic = (options) => {
|
|
2527
2498
|
return options.map((option) => {
|
|
@@ -2532,7 +2503,7 @@ var convertToggleOptionsToAtomic = (options) => {
|
|
|
2532
2503
|
label: option.label,
|
|
2533
2504
|
renderContent: ({ size }) => {
|
|
2534
2505
|
if (IconComponent) {
|
|
2535
|
-
return /* @__PURE__ */
|
|
2506
|
+
return /* @__PURE__ */ React52.createElement(IconComponent, { fontSize: size });
|
|
2536
2507
|
}
|
|
2537
2508
|
return option.label;
|
|
2538
2509
|
},
|
|
@@ -2568,7 +2539,7 @@ var ToggleControl = createControl(
|
|
|
2568
2539
|
size,
|
|
2569
2540
|
placeholder
|
|
2570
2541
|
};
|
|
2571
|
-
return exclusive ? /* @__PURE__ */
|
|
2542
|
+
return exclusive ? /* @__PURE__ */ React53.createElement(
|
|
2572
2543
|
ControlToggleButtonGroup,
|
|
2573
2544
|
{
|
|
2574
2545
|
...toggleButtonGroupProps,
|
|
@@ -2577,7 +2548,7 @@ var ToggleControl = createControl(
|
|
|
2577
2548
|
disabled,
|
|
2578
2549
|
exclusive: true
|
|
2579
2550
|
}
|
|
2580
|
-
) : /* @__PURE__ */
|
|
2551
|
+
) : /* @__PURE__ */ React53.createElement(
|
|
2581
2552
|
ControlToggleButtonGroup,
|
|
2582
2553
|
{
|
|
2583
2554
|
...toggleButtonGroupProps,
|
|
@@ -2591,9 +2562,9 @@ var ToggleControl = createControl(
|
|
|
2591
2562
|
);
|
|
2592
2563
|
|
|
2593
2564
|
// src/controls/number-control.tsx
|
|
2594
|
-
var
|
|
2565
|
+
var React54 = __toESM(require("react"));
|
|
2595
2566
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
2596
|
-
var
|
|
2567
|
+
var import_ui39 = require("@elementor/ui");
|
|
2597
2568
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
2598
2569
|
var NumberControl = createControl(
|
|
2599
2570
|
({
|
|
@@ -2622,7 +2593,7 @@ var NumberControl = createControl(
|
|
|
2622
2593
|
}
|
|
2623
2594
|
setValue(updatedValue, void 0, { validation: () => isInputValid });
|
|
2624
2595
|
};
|
|
2625
|
-
return /* @__PURE__ */
|
|
2596
|
+
return /* @__PURE__ */ React54.createElement(ControlActions, null, /* @__PURE__ */ React54.createElement(
|
|
2626
2597
|
NumberInput,
|
|
2627
2598
|
{
|
|
2628
2599
|
size: "tiny",
|
|
@@ -2635,7 +2606,7 @@ var NumberControl = createControl(
|
|
|
2635
2606
|
placeholder: labelPlaceholder ?? (isEmptyOrNaN(placeholder) ? "" : String(placeholder)),
|
|
2636
2607
|
inputProps: { step, min },
|
|
2637
2608
|
InputProps: {
|
|
2638
|
-
startAdornment: startIcon ? /* @__PURE__ */
|
|
2609
|
+
startAdornment: startIcon ? /* @__PURE__ */ React54.createElement(import_ui39.InputAdornment, { position: "start", disabled }, startIcon) : void 0
|
|
2639
2610
|
}
|
|
2640
2611
|
}
|
|
2641
2612
|
));
|
|
@@ -2643,9 +2614,9 @@ var NumberControl = createControl(
|
|
|
2643
2614
|
);
|
|
2644
2615
|
|
|
2645
2616
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
2646
|
-
var
|
|
2647
|
-
var
|
|
2648
|
-
var
|
|
2617
|
+
var React55 = __toESM(require("react"));
|
|
2618
|
+
var import_react27 = require("react");
|
|
2619
|
+
var import_ui40 = require("@elementor/ui");
|
|
2649
2620
|
var import_i18n17 = require("@wordpress/i18n");
|
|
2650
2621
|
function EqualUnequalSizesControl({
|
|
2651
2622
|
label,
|
|
@@ -2654,9 +2625,9 @@ function EqualUnequalSizesControl({
|
|
|
2654
2625
|
items: items2,
|
|
2655
2626
|
multiSizePropTypeUtil
|
|
2656
2627
|
}) {
|
|
2657
|
-
const popupId = (0,
|
|
2658
|
-
const popupState = (0,
|
|
2659
|
-
const rowRefs = [(0,
|
|
2628
|
+
const popupId = (0, import_react27.useId)();
|
|
2629
|
+
const popupState = (0, import_ui40.usePopupState)({ variant: "popover", popupId });
|
|
2630
|
+
const rowRefs = [(0, import_react27.useRef)(null), (0, import_react27.useRef)(null)];
|
|
2660
2631
|
const { propType: multiSizePropType, disabled: multiSizeDisabled } = useBoundProp(multiSizePropTypeUtil);
|
|
2661
2632
|
const { value: masterValue, setValue: setMasterValue, placeholder: masterPlaceholder } = useBoundProp();
|
|
2662
2633
|
const getMultiSizeValues = (sourceValue) => {
|
|
@@ -2694,27 +2665,27 @@ function EqualUnequalSizesControl({
|
|
|
2694
2665
|
}
|
|
2695
2666
|
setMasterValue(Object.values(newValue)?.pop() ?? null);
|
|
2696
2667
|
};
|
|
2697
|
-
return /* @__PURE__ */
|
|
2668
|
+
return /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React55.createElement(import_ui40.Grid, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React55.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React55.createElement(ControlLabel, null, label)), /* @__PURE__ */ React55.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_ui40.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React55.createElement(import_ui40.Box, { flexGrow: 1 }, /* @__PURE__ */ React55.createElement(
|
|
2698
2669
|
SizeControl,
|
|
2699
2670
|
{
|
|
2700
2671
|
placeholder: isMixed ? (0, import_i18n17.__)("Mixed", "elementor") : void 0,
|
|
2701
2672
|
enablePropTypeUnits: !isMixed || !isMixedPlaceholder,
|
|
2702
2673
|
anchorRef: rowRefs[0]
|
|
2703
2674
|
}
|
|
2704
|
-
)), /* @__PURE__ */
|
|
2675
|
+
)), /* @__PURE__ */ React55.createElement(import_ui40.Tooltip, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React55.createElement(
|
|
2705
2676
|
StyledToggleButton,
|
|
2706
2677
|
{
|
|
2707
2678
|
size: "tiny",
|
|
2708
2679
|
value: "check",
|
|
2709
2680
|
sx: { marginLeft: "auto" },
|
|
2710
|
-
...(0,
|
|
2681
|
+
...(0, import_ui40.bindToggle)(popupState),
|
|
2711
2682
|
selected: popupState.isOpen,
|
|
2712
2683
|
isPlaceholder: isMixedPlaceholder,
|
|
2713
2684
|
"aria-label": tooltipLabel
|
|
2714
2685
|
},
|
|
2715
2686
|
icon
|
|
2716
|
-
))))), /* @__PURE__ */
|
|
2717
|
-
|
|
2687
|
+
))))), /* @__PURE__ */ React55.createElement(
|
|
2688
|
+
import_ui40.Popover,
|
|
2718
2689
|
{
|
|
2719
2690
|
disablePortal: true,
|
|
2720
2691
|
disableScrollLock: true,
|
|
@@ -2726,12 +2697,12 @@ function EqualUnequalSizesControl({
|
|
|
2726
2697
|
vertical: "top",
|
|
2727
2698
|
horizontal: "right"
|
|
2728
2699
|
},
|
|
2729
|
-
...(0,
|
|
2700
|
+
...(0, import_ui40.bindPopover)(popupState),
|
|
2730
2701
|
slotProps: {
|
|
2731
2702
|
paper: { sx: { mt: 0.5, width: rowRefs[0].current?.getBoundingClientRect().width } }
|
|
2732
2703
|
}
|
|
2733
2704
|
},
|
|
2734
|
-
/* @__PURE__ */
|
|
2705
|
+
/* @__PURE__ */ React55.createElement(
|
|
2735
2706
|
PropProvider,
|
|
2736
2707
|
{
|
|
2737
2708
|
propType: multiSizePropType,
|
|
@@ -2740,25 +2711,25 @@ function EqualUnequalSizesControl({
|
|
|
2740
2711
|
setValue: applyMultiSizeValue,
|
|
2741
2712
|
isDisabled: () => multiSizeDisabled
|
|
2742
2713
|
},
|
|
2743
|
-
/* @__PURE__ */
|
|
2714
|
+
/* @__PURE__ */ React55.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React55.createElement(PopoverGridContainer, { ref: rowRefs[1] }, /* @__PURE__ */ React55.createElement(MultiSizeValueControl, { item: items2[0], rowRef: rowRefs[1] }), /* @__PURE__ */ React55.createElement(MultiSizeValueControl, { item: items2[1], rowRef: rowRefs[1] })), /* @__PURE__ */ React55.createElement(PopoverGridContainer, { ref: rowRefs[2] }, /* @__PURE__ */ React55.createElement(MultiSizeValueControl, { item: items2[2], rowRef: rowRefs[2] }), /* @__PURE__ */ React55.createElement(MultiSizeValueControl, { item: items2[3], rowRef: rowRefs[2] })))
|
|
2744
2715
|
)
|
|
2745
2716
|
));
|
|
2746
2717
|
}
|
|
2747
2718
|
var MultiSizeValueControl = ({ item, rowRef }) => {
|
|
2748
2719
|
const { bind, label, icon, ariaLabel } = item;
|
|
2749
|
-
return /* @__PURE__ */
|
|
2720
|
+
return /* @__PURE__ */ React55.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React55.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_ui40.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React55.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, label)), /* @__PURE__ */ React55.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(SizeControl, { startIcon: icon, ariaLabel, anchorRef: rowRef })))));
|
|
2750
2721
|
};
|
|
2751
2722
|
|
|
2752
2723
|
// src/controls/linked-dimensions-control.tsx
|
|
2753
|
-
var
|
|
2754
|
-
var
|
|
2724
|
+
var React56 = __toESM(require("react"));
|
|
2725
|
+
var import_react28 = require("react");
|
|
2755
2726
|
var import_editor_props18 = require("@elementor/editor-props");
|
|
2756
2727
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
2757
2728
|
var import_icons10 = require("@elementor/icons");
|
|
2758
|
-
var
|
|
2729
|
+
var import_ui41 = require("@elementor/ui");
|
|
2759
2730
|
var import_i18n18 = require("@wordpress/i18n");
|
|
2760
2731
|
var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min }) => {
|
|
2761
|
-
const gridRowRefs = [(0,
|
|
2732
|
+
const gridRowRefs = [(0, import_react28.useRef)(null), (0, import_react28.useRef)(null)];
|
|
2762
2733
|
const { disabled: sizeDisabled } = useBoundProp(import_editor_props18.sizePropTypeUtil);
|
|
2763
2734
|
const {
|
|
2764
2735
|
value: dimensionsValue,
|
|
@@ -2777,9 +2748,9 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
|
|
|
2777
2748
|
}
|
|
2778
2749
|
return true;
|
|
2779
2750
|
};
|
|
2780
|
-
const [isLinked, setIsLinked] = (0,
|
|
2751
|
+
const [isLinked, setIsLinked] = (0, import_react28.useState)(() => inferIsLinked());
|
|
2781
2752
|
const activeBreakpoint = (0, import_editor_responsive2.useActiveBreakpoint)();
|
|
2782
|
-
(0,
|
|
2753
|
+
(0, import_react28.useLayoutEffect)(() => {
|
|
2783
2754
|
setIsLinked(inferIsLinked);
|
|
2784
2755
|
}, [activeBreakpoint]);
|
|
2785
2756
|
const onLinkToggle = () => {
|
|
@@ -2820,7 +2791,7 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
|
|
|
2820
2791
|
isDisabled: () => dimensionsDisabled
|
|
2821
2792
|
};
|
|
2822
2793
|
const hasPlaceholders = !masterValue && (dimensionsPlaceholder || masterPlaceholder);
|
|
2823
|
-
return /* @__PURE__ */
|
|
2794
|
+
return /* @__PURE__ */ React56.createElement(PropProvider, { ...propProviderProps }, /* @__PURE__ */ React56.createElement(import_ui41.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(ControlFormLabel, null, label), /* @__PURE__ */ React56.createElement(import_ui41.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React56.createElement(
|
|
2824
2795
|
StyledToggleButton,
|
|
2825
2796
|
{
|
|
2826
2797
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -2832,8 +2803,8 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
|
|
|
2832
2803
|
disabled,
|
|
2833
2804
|
isPlaceholder: hasPlaceholders
|
|
2834
2805
|
},
|
|
2835
|
-
/* @__PURE__ */
|
|
2836
|
-
))), getCssDimensionProps(label, isSiteRtl).map((row, index) => /* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ React56.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2807
|
+
))), getCssDimensionProps(label, isSiteRtl).map((row, index) => /* @__PURE__ */ React56.createElement(import_ui41.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React56.createElement(import_ui41.Grid, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(Label, { ...props })), /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(
|
|
2837
2808
|
Control3,
|
|
2838
2809
|
{
|
|
2839
2810
|
bind: props.bind,
|
|
@@ -2856,7 +2827,7 @@ var Control3 = ({
|
|
|
2856
2827
|
min
|
|
2857
2828
|
}) => {
|
|
2858
2829
|
if (isLinked) {
|
|
2859
|
-
return /* @__PURE__ */
|
|
2830
|
+
return /* @__PURE__ */ React56.createElement(
|
|
2860
2831
|
SizeControl,
|
|
2861
2832
|
{
|
|
2862
2833
|
ariaLabel,
|
|
@@ -2867,7 +2838,7 @@ var Control3 = ({
|
|
|
2867
2838
|
}
|
|
2868
2839
|
);
|
|
2869
2840
|
}
|
|
2870
|
-
return /* @__PURE__ */
|
|
2841
|
+
return /* @__PURE__ */ React56.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React56.createElement(
|
|
2871
2842
|
SizeControl,
|
|
2872
2843
|
{
|
|
2873
2844
|
ariaLabel,
|
|
@@ -2879,7 +2850,7 @@ var Control3 = ({
|
|
|
2879
2850
|
));
|
|
2880
2851
|
};
|
|
2881
2852
|
var Label = ({ label, bind }) => {
|
|
2882
|
-
return /* @__PURE__ */
|
|
2853
|
+
return /* @__PURE__ */ React56.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React56.createElement(ControlLabel, null, label));
|
|
2883
2854
|
};
|
|
2884
2855
|
function getCssDimensionProps(label, isSiteRtl) {
|
|
2885
2856
|
return [
|
|
@@ -2889,7 +2860,7 @@ function getCssDimensionProps(label, isSiteRtl) {
|
|
|
2889
2860
|
label: (0, import_i18n18.__)("Top", "elementor"),
|
|
2890
2861
|
/* translators: %s is the name of the main group (margin or padding) */
|
|
2891
2862
|
ariaLabel: (0, import_i18n18.sprintf)((0, import_i18n18.__)("%s top", "elementor"), label),
|
|
2892
|
-
icon: /* @__PURE__ */
|
|
2863
|
+
icon: /* @__PURE__ */ React56.createElement(import_icons10.SideTopIcon, { fontSize: "tiny" })
|
|
2893
2864
|
},
|
|
2894
2865
|
{
|
|
2895
2866
|
bind: "inline-end",
|
|
@@ -2901,7 +2872,7 @@ function getCssDimensionProps(label, isSiteRtl) {
|
|
|
2901
2872
|
/* translators: %s is the name of the main group (margin or padding) */
|
|
2902
2873
|
(0, import_i18n18.sprintf)((0, import_i18n18.__)("%s right", "elementor"), label)
|
|
2903
2874
|
),
|
|
2904
|
-
icon: isSiteRtl ? /* @__PURE__ */
|
|
2875
|
+
icon: isSiteRtl ? /* @__PURE__ */ React56.createElement(import_icons10.SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React56.createElement(import_icons10.SideRightIcon, { fontSize: "tiny" })
|
|
2905
2876
|
}
|
|
2906
2877
|
],
|
|
2907
2878
|
[
|
|
@@ -2910,7 +2881,7 @@ function getCssDimensionProps(label, isSiteRtl) {
|
|
|
2910
2881
|
label: (0, import_i18n18.__)("Bottom", "elementor"),
|
|
2911
2882
|
/* translators: %s is the name of the main group (margin or padding) */
|
|
2912
2883
|
ariaLabel: (0, import_i18n18.sprintf)((0, import_i18n18.__)("%s bottom", "elementor"), label),
|
|
2913
|
-
icon: /* @__PURE__ */
|
|
2884
|
+
icon: /* @__PURE__ */ React56.createElement(import_icons10.SideBottomIcon, { fontSize: "tiny" })
|
|
2914
2885
|
},
|
|
2915
2886
|
{
|
|
2916
2887
|
bind: "inline-start",
|
|
@@ -2922,24 +2893,24 @@ function getCssDimensionProps(label, isSiteRtl) {
|
|
|
2922
2893
|
/* translators: %s is the name of the main group (margin or padding) */
|
|
2923
2894
|
(0, import_i18n18.sprintf)((0, import_i18n18.__)("%s left", "elementor"), label)
|
|
2924
2895
|
),
|
|
2925
|
-
icon: isSiteRtl ? /* @__PURE__ */
|
|
2896
|
+
icon: isSiteRtl ? /* @__PURE__ */ React56.createElement(import_icons10.SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React56.createElement(import_icons10.SideLeftIcon, { fontSize: "tiny" })
|
|
2926
2897
|
}
|
|
2927
2898
|
]
|
|
2928
2899
|
];
|
|
2929
2900
|
}
|
|
2930
2901
|
|
|
2931
2902
|
// src/controls/font-family-control/font-family-control.tsx
|
|
2932
|
-
var
|
|
2903
|
+
var React58 = __toESM(require("react"));
|
|
2933
2904
|
var import_editor_props19 = require("@elementor/editor-props");
|
|
2934
2905
|
var import_icons11 = require("@elementor/icons");
|
|
2935
|
-
var
|
|
2906
|
+
var import_ui43 = require("@elementor/ui");
|
|
2936
2907
|
var import_i18n20 = require("@wordpress/i18n");
|
|
2937
2908
|
|
|
2938
2909
|
// src/components/item-selector.tsx
|
|
2939
|
-
var
|
|
2940
|
-
var
|
|
2941
|
-
var
|
|
2942
|
-
var
|
|
2910
|
+
var React57 = __toESM(require("react"));
|
|
2911
|
+
var import_react29 = require("react");
|
|
2912
|
+
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
2913
|
+
var import_ui42 = require("@elementor/ui");
|
|
2943
2914
|
var import_utils3 = require("@elementor/utils");
|
|
2944
2915
|
var import_i18n19 = require("@wordpress/i18n");
|
|
2945
2916
|
|
|
@@ -2976,7 +2947,7 @@ var ItemSelector = ({
|
|
|
2976
2947
|
footer,
|
|
2977
2948
|
categoryItemContentTemplate
|
|
2978
2949
|
}) => {
|
|
2979
|
-
const [searchValue, setSearchValue] = (0,
|
|
2950
|
+
const [searchValue, setSearchValue] = (0, import_react29.useState)("");
|
|
2980
2951
|
const filteredItemsList = useFilteredItemsList(itemsList, searchValue, disabledItems);
|
|
2981
2952
|
const IconComponent = icon;
|
|
2982
2953
|
const handleSearch = (value) => {
|
|
@@ -2986,15 +2957,15 @@ var ItemSelector = ({
|
|
|
2986
2957
|
setSearchValue("");
|
|
2987
2958
|
onClose();
|
|
2988
2959
|
};
|
|
2989
|
-
return /* @__PURE__ */
|
|
2990
|
-
|
|
2960
|
+
return /* @__PURE__ */ React57.createElement(import_editor_ui5.PopoverBody, { width: sectionWidth, id }, /* @__PURE__ */ React57.createElement(import_editor_ui5.PopoverHeader, { title, onClose: handleClose, icon: /* @__PURE__ */ React57.createElement(IconComponent, { fontSize: "tiny" }) }), /* @__PURE__ */ React57.createElement(
|
|
2961
|
+
import_editor_ui5.SearchField,
|
|
2991
2962
|
{
|
|
2992
2963
|
value: searchValue,
|
|
2993
2964
|
onSearch: handleSearch,
|
|
2994
2965
|
placeholder: (0, import_i18n19.__)("Search", "elementor"),
|
|
2995
2966
|
id: id + "-search"
|
|
2996
2967
|
}
|
|
2997
|
-
), /* @__PURE__ */
|
|
2968
|
+
), /* @__PURE__ */ React57.createElement(import_ui42.Divider, null), /* @__PURE__ */ React57.createElement(import_ui42.Box, { sx: { flex: 1, overflow: "auto", minHeight: 0 } }, filteredItemsList.length > 0 ? /* @__PURE__ */ React57.createElement(
|
|
2998
2969
|
ItemList,
|
|
2999
2970
|
{
|
|
3000
2971
|
itemListItems: filteredItemsList,
|
|
@@ -3005,8 +2976,8 @@ var ItemSelector = ({
|
|
|
3005
2976
|
onDebounce,
|
|
3006
2977
|
categoryItemContentTemplate
|
|
3007
2978
|
}
|
|
3008
|
-
) : /* @__PURE__ */
|
|
3009
|
-
|
|
2979
|
+
) : /* @__PURE__ */ React57.createElement(
|
|
2980
|
+
import_ui42.Stack,
|
|
3010
2981
|
{
|
|
3011
2982
|
alignItems: "center",
|
|
3012
2983
|
justifyContent: "center",
|
|
@@ -3015,27 +2986,27 @@ var ItemSelector = ({
|
|
|
3015
2986
|
gap: 1.5,
|
|
3016
2987
|
overflow: "hidden"
|
|
3017
2988
|
},
|
|
3018
|
-
/* @__PURE__ */
|
|
3019
|
-
/* @__PURE__ */
|
|
3020
|
-
|
|
2989
|
+
/* @__PURE__ */ React57.createElement(IconComponent, { fontSize: "large" }),
|
|
2990
|
+
/* @__PURE__ */ React57.createElement(import_ui42.Box, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React57.createElement(import_ui42.Typography, { align: "center", variant: "subtitle2", color: "text.secondary" }, (0, import_i18n19.__)("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React57.createElement(
|
|
2991
|
+
import_ui42.Typography,
|
|
3021
2992
|
{
|
|
3022
2993
|
variant: "subtitle2",
|
|
3023
2994
|
color: "text.secondary",
|
|
3024
2995
|
sx: { display: "flex", width: "100%", justifyContent: "center" }
|
|
3025
2996
|
},
|
|
3026
|
-
/* @__PURE__ */
|
|
3027
|
-
/* @__PURE__ */
|
|
3028
|
-
|
|
2997
|
+
/* @__PURE__ */ React57.createElement("span", null, "\u201C"),
|
|
2998
|
+
/* @__PURE__ */ React57.createElement(
|
|
2999
|
+
import_ui42.Box,
|
|
3029
3000
|
{
|
|
3030
3001
|
component: "span",
|
|
3031
3002
|
sx: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" }
|
|
3032
3003
|
},
|
|
3033
3004
|
searchValue
|
|
3034
3005
|
),
|
|
3035
|
-
/* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ React57.createElement("span", null, "\u201D.")
|
|
3036
3007
|
)),
|
|
3037
|
-
/* @__PURE__ */
|
|
3038
|
-
|
|
3008
|
+
/* @__PURE__ */ React57.createElement(
|
|
3009
|
+
import_ui42.Typography,
|
|
3039
3010
|
{
|
|
3040
3011
|
align: "center",
|
|
3041
3012
|
variant: "caption",
|
|
@@ -3043,8 +3014,8 @@ var ItemSelector = ({
|
|
|
3043
3014
|
sx: { display: "flex", flexDirection: "column" }
|
|
3044
3015
|
},
|
|
3045
3016
|
(0, import_i18n19.__)("Try something else.", "elementor"),
|
|
3046
|
-
/* @__PURE__ */
|
|
3047
|
-
|
|
3017
|
+
/* @__PURE__ */ React57.createElement(
|
|
3018
|
+
import_ui42.Link,
|
|
3048
3019
|
{
|
|
3049
3020
|
color: "secondary",
|
|
3050
3021
|
variant: "caption",
|
|
@@ -3074,9 +3045,9 @@ var ItemList = ({
|
|
|
3074
3045
|
}
|
|
3075
3046
|
});
|
|
3076
3047
|
}, 100);
|
|
3077
|
-
const memoizedItemStyle = (0,
|
|
3078
|
-
return /* @__PURE__ */
|
|
3079
|
-
|
|
3048
|
+
const memoizedItemStyle = (0, import_react29.useCallback)((item) => itemStyle(item), [itemStyle]);
|
|
3049
|
+
return /* @__PURE__ */ React57.createElement(
|
|
3050
|
+
import_editor_ui5.PopoverMenuList,
|
|
3080
3051
|
{
|
|
3081
3052
|
items: itemListItems,
|
|
3082
3053
|
selectedValue: selectedItemFound?.value,
|
|
@@ -3090,8 +3061,8 @@ var ItemList = ({
|
|
|
3090
3061
|
);
|
|
3091
3062
|
};
|
|
3092
3063
|
var useDebounce = (fn, delay) => {
|
|
3093
|
-
const [debouncedFn] = (0,
|
|
3094
|
-
(0,
|
|
3064
|
+
const [debouncedFn] = (0, import_react29.useState)(() => (0, import_utils3.debounce)(fn, delay));
|
|
3065
|
+
(0, import_react29.useEffect)(() => () => debouncedFn.cancel(), [debouncedFn]);
|
|
3095
3066
|
return debouncedFn;
|
|
3096
3067
|
};
|
|
3097
3068
|
|
|
@@ -3110,22 +3081,22 @@ var FontFamilyControl = createControl(
|
|
|
3110
3081
|
disabled,
|
|
3111
3082
|
placeholder
|
|
3112
3083
|
} = useBoundProp(import_editor_props19.stringPropTypeUtil);
|
|
3113
|
-
const popoverState = (0,
|
|
3084
|
+
const popoverState = (0, import_ui43.usePopupState)({ variant: "popover" });
|
|
3114
3085
|
const isShowingPlaceholder = !fontFamily && placeholder;
|
|
3115
|
-
const mapFontSubs =
|
|
3086
|
+
const mapFontSubs = React58.useMemo(() => {
|
|
3116
3087
|
return fontFamilies.map(({ label, fonts }) => ({
|
|
3117
3088
|
label,
|
|
3118
3089
|
items: fonts
|
|
3119
3090
|
}));
|
|
3120
3091
|
}, [fontFamilies]);
|
|
3121
|
-
return /* @__PURE__ */
|
|
3122
|
-
|
|
3092
|
+
return /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(ControlActions, null, /* @__PURE__ */ React58.createElement(
|
|
3093
|
+
import_ui43.UnstableTag,
|
|
3123
3094
|
{
|
|
3124
3095
|
id: "font-family-control",
|
|
3125
3096
|
variant: "outlined",
|
|
3126
3097
|
label: fontFamily || placeholder,
|
|
3127
|
-
endIcon: /* @__PURE__ */
|
|
3128
|
-
...(0,
|
|
3098
|
+
endIcon: /* @__PURE__ */ React58.createElement(import_icons11.ChevronDownIcon, { fontSize: "tiny" }),
|
|
3099
|
+
...(0, import_ui43.bindTrigger)(popoverState),
|
|
3129
3100
|
fullWidth: true,
|
|
3130
3101
|
disabled,
|
|
3131
3102
|
"aria-label": ariaLabel,
|
|
@@ -3136,17 +3107,17 @@ var FontFamilyControl = createControl(
|
|
|
3136
3107
|
textTransform: "capitalize"
|
|
3137
3108
|
} : void 0
|
|
3138
3109
|
}
|
|
3139
|
-
)), /* @__PURE__ */
|
|
3140
|
-
|
|
3110
|
+
)), /* @__PURE__ */ React58.createElement(
|
|
3111
|
+
import_ui43.Popover,
|
|
3141
3112
|
{
|
|
3142
3113
|
disablePortal: true,
|
|
3143
3114
|
disableScrollLock: true,
|
|
3144
3115
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
3145
3116
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
3146
3117
|
sx: { my: 1.5 },
|
|
3147
|
-
...(0,
|
|
3118
|
+
...(0, import_ui43.bindPopover)(popoverState)
|
|
3148
3119
|
},
|
|
3149
|
-
/* @__PURE__ */
|
|
3120
|
+
/* @__PURE__ */ React58.createElement(
|
|
3150
3121
|
ItemSelector,
|
|
3151
3122
|
{
|
|
3152
3123
|
id: "font-family-selector",
|
|
@@ -3166,15 +3137,15 @@ var FontFamilyControl = createControl(
|
|
|
3166
3137
|
);
|
|
3167
3138
|
|
|
3168
3139
|
// src/controls/url-control.tsx
|
|
3169
|
-
var
|
|
3140
|
+
var React59 = __toESM(require("react"));
|
|
3170
3141
|
var import_editor_props20 = require("@elementor/editor-props");
|
|
3171
|
-
var
|
|
3142
|
+
var import_ui44 = require("@elementor/ui");
|
|
3172
3143
|
var UrlControl = createControl(
|
|
3173
3144
|
({ placeholder, ariaLabel }) => {
|
|
3174
3145
|
const { value, setValue, disabled } = useBoundProp(import_editor_props20.urlPropTypeUtil);
|
|
3175
3146
|
const handleChange = (event) => setValue(event.target.value);
|
|
3176
|
-
return /* @__PURE__ */
|
|
3177
|
-
|
|
3147
|
+
return /* @__PURE__ */ React59.createElement(ControlActions, null, /* @__PURE__ */ React59.createElement(
|
|
3148
|
+
import_ui44.TextField,
|
|
3178
3149
|
{
|
|
3179
3150
|
size: "tiny",
|
|
3180
3151
|
fullWidth: true,
|
|
@@ -3191,21 +3162,21 @@ var UrlControl = createControl(
|
|
|
3191
3162
|
);
|
|
3192
3163
|
|
|
3193
3164
|
// src/controls/link-control.tsx
|
|
3194
|
-
var
|
|
3195
|
-
var
|
|
3165
|
+
var React64 = __toESM(require("react"));
|
|
3166
|
+
var import_react32 = require("react");
|
|
3196
3167
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
3197
3168
|
var import_editor_props23 = require("@elementor/editor-props");
|
|
3198
3169
|
var import_icons15 = require("@elementor/icons");
|
|
3199
3170
|
var import_session = require("@elementor/session");
|
|
3200
|
-
var
|
|
3171
|
+
var import_ui48 = require("@elementor/ui");
|
|
3201
3172
|
var import_utils5 = require("@elementor/utils");
|
|
3202
3173
|
var import_i18n23 = require("@wordpress/i18n");
|
|
3203
3174
|
|
|
3204
3175
|
// src/components/restricted-link-infotip.tsx
|
|
3205
|
-
var
|
|
3176
|
+
var React60 = __toESM(require("react"));
|
|
3206
3177
|
var import_editor_elements = require("@elementor/editor-elements");
|
|
3207
3178
|
var import_icons12 = require("@elementor/icons");
|
|
3208
|
-
var
|
|
3179
|
+
var import_ui45 = require("@elementor/ui");
|
|
3209
3180
|
var import_i18n21 = require("@wordpress/i18n");
|
|
3210
3181
|
var learnMoreButton = {
|
|
3211
3182
|
label: (0, import_i18n21.__)("Learn More", "elementor"),
|
|
@@ -3232,13 +3203,13 @@ var RestrictedLinkInfotip = ({
|
|
|
3232
3203
|
(0, import_editor_elements.selectElement)(elementId);
|
|
3233
3204
|
}
|
|
3234
3205
|
};
|
|
3235
|
-
const content = /* @__PURE__ */
|
|
3236
|
-
|
|
3206
|
+
const content = /* @__PURE__ */ React60.createElement(
|
|
3207
|
+
import_ui45.Alert,
|
|
3237
3208
|
{
|
|
3238
3209
|
color: "secondary",
|
|
3239
|
-
icon: /* @__PURE__ */
|
|
3240
|
-
action: /* @__PURE__ */
|
|
3241
|
-
|
|
3210
|
+
icon: /* @__PURE__ */ React60.createElement(import_icons12.InfoCircleFilledIcon, null),
|
|
3211
|
+
action: /* @__PURE__ */ React60.createElement(
|
|
3212
|
+
import_ui45.AlertAction,
|
|
3242
3213
|
{
|
|
3243
3214
|
sx: { width: "fit-content" },
|
|
3244
3215
|
variant: "contained",
|
|
@@ -3248,24 +3219,24 @@ var RestrictedLinkInfotip = ({
|
|
|
3248
3219
|
(0, import_i18n21.__)("Take me there", "elementor")
|
|
3249
3220
|
)
|
|
3250
3221
|
},
|
|
3251
|
-
/* @__PURE__ */
|
|
3252
|
-
/* @__PURE__ */
|
|
3222
|
+
/* @__PURE__ */ React60.createElement(import_ui45.AlertTitle, null, (0, import_i18n21.__)("Nested links", "elementor")),
|
|
3223
|
+
/* @__PURE__ */ React60.createElement(import_ui45.Box, { component: "span" }, INFOTIP_CONTENT[reason ?? "descendant"], " ", /* @__PURE__ */ React60.createElement(import_ui45.Link, { href: learnMoreButton.href, target: "_blank", color: "info.main" }, learnMoreButton.label))
|
|
3253
3224
|
);
|
|
3254
|
-
return shouldRestrict && isVisible ? /* @__PURE__ */
|
|
3255
|
-
|
|
3225
|
+
return shouldRestrict && isVisible ? /* @__PURE__ */ React60.createElement(
|
|
3226
|
+
import_ui45.Infotip,
|
|
3256
3227
|
{
|
|
3257
3228
|
placement: "right",
|
|
3258
3229
|
content,
|
|
3259
3230
|
color: "secondary",
|
|
3260
3231
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
3261
3232
|
},
|
|
3262
|
-
/* @__PURE__ */
|
|
3263
|
-
) : /* @__PURE__ */
|
|
3233
|
+
/* @__PURE__ */ React60.createElement(import_ui45.Box, null, children)
|
|
3234
|
+
) : /* @__PURE__ */ React60.createElement(React60.Fragment, null, children);
|
|
3264
3235
|
};
|
|
3265
3236
|
|
|
3266
3237
|
// src/controls/query-control.tsx
|
|
3267
|
-
var
|
|
3268
|
-
var
|
|
3238
|
+
var React62 = __toESM(require("react"));
|
|
3239
|
+
var import_react31 = require("react");
|
|
3269
3240
|
var import_editor_props21 = require("@elementor/editor-props");
|
|
3270
3241
|
var import_http_client2 = require("@elementor/http-client");
|
|
3271
3242
|
var import_icons14 = require("@elementor/icons");
|
|
@@ -3273,11 +3244,11 @@ var import_utils4 = require("@elementor/utils");
|
|
|
3273
3244
|
var import_i18n22 = require("@wordpress/i18n");
|
|
3274
3245
|
|
|
3275
3246
|
// src/components/autocomplete.tsx
|
|
3276
|
-
var
|
|
3277
|
-
var
|
|
3247
|
+
var React61 = __toESM(require("react"));
|
|
3248
|
+
var import_react30 = require("react");
|
|
3278
3249
|
var import_icons13 = require("@elementor/icons");
|
|
3279
|
-
var
|
|
3280
|
-
var Autocomplete = (0,
|
|
3250
|
+
var import_ui46 = require("@elementor/ui");
|
|
3251
|
+
var Autocomplete = (0, import_react30.forwardRef)((props, ref) => {
|
|
3281
3252
|
const {
|
|
3282
3253
|
options,
|
|
3283
3254
|
onOptionChange,
|
|
@@ -3299,8 +3270,8 @@ var Autocomplete = (0, import_react31.forwardRef)((props, ref) => {
|
|
|
3299
3270
|
const valueLength = value?.toString()?.length ?? 0;
|
|
3300
3271
|
const meetsMinLength = valueLength >= minInputLength;
|
|
3301
3272
|
const shouldOpen = meetsMinLength && (allowCustomValues ? optionKeys.length > 0 : true);
|
|
3302
|
-
return /* @__PURE__ */
|
|
3303
|
-
|
|
3273
|
+
return /* @__PURE__ */ React61.createElement(
|
|
3274
|
+
import_ui46.Autocomplete,
|
|
3304
3275
|
{
|
|
3305
3276
|
...restProps,
|
|
3306
3277
|
ref,
|
|
@@ -3320,8 +3291,8 @@ var Autocomplete = (0, import_react31.forwardRef)((props, ref) => {
|
|
|
3320
3291
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
3321
3292
|
isOptionEqualToValue,
|
|
3322
3293
|
filterOptions: () => optionKeys,
|
|
3323
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
3324
|
-
renderInput: (params) => /* @__PURE__ */
|
|
3294
|
+
renderOption: (optionProps, optionId) => /* @__PURE__ */ React61.createElement(import_ui46.Box, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
|
|
3295
|
+
renderInput: (params) => /* @__PURE__ */ React61.createElement(
|
|
3325
3296
|
TextInput,
|
|
3326
3297
|
{
|
|
3327
3298
|
params,
|
|
@@ -3348,8 +3319,8 @@ var TextInput = ({
|
|
|
3348
3319
|
const onChange = (event) => {
|
|
3349
3320
|
handleChange(event.target.value);
|
|
3350
3321
|
};
|
|
3351
|
-
return /* @__PURE__ */
|
|
3352
|
-
|
|
3322
|
+
return /* @__PURE__ */ React61.createElement(
|
|
3323
|
+
import_ui46.TextField,
|
|
3353
3324
|
{
|
|
3354
3325
|
...params,
|
|
3355
3326
|
placeholder,
|
|
@@ -3362,8 +3333,8 @@ var TextInput = ({
|
|
|
3362
3333
|
},
|
|
3363
3334
|
InputProps: {
|
|
3364
3335
|
...params.InputProps,
|
|
3365
|
-
startAdornment: startAdornment ? /* @__PURE__ */
|
|
3366
|
-
endAdornment: /* @__PURE__ */
|
|
3336
|
+
startAdornment: startAdornment ? /* @__PURE__ */ React61.createElement(import_ui46.InputAdornment, { position: "start" }, startAdornment) : params.InputProps.startAdornment,
|
|
3337
|
+
endAdornment: /* @__PURE__ */ React61.createElement(ClearButton, { params, allowClear, handleChange })
|
|
3367
3338
|
}
|
|
3368
3339
|
}
|
|
3369
3340
|
);
|
|
@@ -3372,7 +3343,7 @@ var ClearButton = ({
|
|
|
3372
3343
|
allowClear,
|
|
3373
3344
|
handleChange,
|
|
3374
3345
|
params
|
|
3375
|
-
}) => /* @__PURE__ */
|
|
3346
|
+
}) => /* @__PURE__ */ React61.createElement(import_ui46.InputAdornment, { position: "end" }, allowClear && /* @__PURE__ */ React61.createElement(import_ui46.IconButton, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React61.createElement(import_icons13.XIcon, { fontSize: params.size })));
|
|
3376
3347
|
function findMatchingOption(options, optionId = null) {
|
|
3377
3348
|
const formattedOption = (optionId || "").toString();
|
|
3378
3349
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -3409,7 +3380,7 @@ var QueryControl = createControl((props) => {
|
|
|
3409
3380
|
ariaLabel
|
|
3410
3381
|
} = props || {};
|
|
3411
3382
|
const normalizedPlaceholder = placeholder || (0, import_i18n22.__)("Search", "elementor");
|
|
3412
|
-
const [options, setOptions] = (0,
|
|
3383
|
+
const [options, setOptions] = (0, import_react31.useState)(
|
|
3413
3384
|
generateFirstLoadedOption(value?.value)
|
|
3414
3385
|
);
|
|
3415
3386
|
const onOptionChange = (newValue) => {
|
|
@@ -3447,7 +3418,7 @@ var QueryControl = createControl((props) => {
|
|
|
3447
3418
|
}
|
|
3448
3419
|
debounceFetch({ ...params, term: newValue });
|
|
3449
3420
|
};
|
|
3450
|
-
const debounceFetch = (0,
|
|
3421
|
+
const debounceFetch = (0, import_react31.useMemo)(
|
|
3451
3422
|
() => (0, import_utils4.debounce)(
|
|
3452
3423
|
(queryParams) => fetchOptions(url, queryParams).then((newOptions) => {
|
|
3453
3424
|
setOptions(formatOptions(newOptions));
|
|
@@ -3456,13 +3427,13 @@ var QueryControl = createControl((props) => {
|
|
|
3456
3427
|
),
|
|
3457
3428
|
[url]
|
|
3458
3429
|
);
|
|
3459
|
-
return /* @__PURE__ */
|
|
3430
|
+
return /* @__PURE__ */ React62.createElement(ControlActions, null, /* @__PURE__ */ React62.createElement(
|
|
3460
3431
|
Autocomplete,
|
|
3461
3432
|
{
|
|
3462
3433
|
options,
|
|
3463
3434
|
allowCustomValues,
|
|
3464
3435
|
placeholder: normalizedPlaceholder,
|
|
3465
|
-
startAdornment: /* @__PURE__ */
|
|
3436
|
+
startAdornment: /* @__PURE__ */ React62.createElement(import_icons14.SearchIcon, { fontSize: "tiny" }),
|
|
3466
3437
|
value: value?.value?.id?.value || value?.value,
|
|
3467
3438
|
onOptionChange,
|
|
3468
3439
|
onTextChange,
|
|
@@ -3504,16 +3475,16 @@ function generateFirstLoadedOption(unionValue) {
|
|
|
3504
3475
|
}
|
|
3505
3476
|
|
|
3506
3477
|
// src/controls/switch-control.tsx
|
|
3507
|
-
var
|
|
3478
|
+
var React63 = __toESM(require("react"));
|
|
3508
3479
|
var import_editor_props22 = require("@elementor/editor-props");
|
|
3509
|
-
var
|
|
3480
|
+
var import_ui47 = require("@elementor/ui");
|
|
3510
3481
|
var SwitchControl = createControl(() => {
|
|
3511
3482
|
const { value, setValue, disabled } = useBoundProp(import_editor_props22.booleanPropTypeUtil);
|
|
3512
3483
|
const handleChange = (event) => {
|
|
3513
3484
|
setValue(event.target.checked);
|
|
3514
3485
|
};
|
|
3515
|
-
return /* @__PURE__ */
|
|
3516
|
-
|
|
3486
|
+
return /* @__PURE__ */ React63.createElement(import_ui47.Box, { sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React63.createElement(
|
|
3487
|
+
import_ui47.Switch,
|
|
3517
3488
|
{
|
|
3518
3489
|
checked: !!value,
|
|
3519
3490
|
onChange: handleChange,
|
|
@@ -3531,7 +3502,7 @@ var SIZE6 = "tiny";
|
|
|
3531
3502
|
var LinkControl = createControl((props) => {
|
|
3532
3503
|
const { value, path, setValue, ...propContext } = useBoundProp(import_editor_props23.linkPropTypeUtil);
|
|
3533
3504
|
const [linkSessionValue, setLinkSessionValue] = (0, import_session.useSessionStorage)(path.join("/"));
|
|
3534
|
-
const [isActive, setIsActive] = (0,
|
|
3505
|
+
const [isActive, setIsActive] = (0, import_react32.useState)(!!value);
|
|
3535
3506
|
const {
|
|
3536
3507
|
allowCustomValues = true,
|
|
3537
3508
|
queryOptions,
|
|
@@ -3541,11 +3512,11 @@ var LinkControl = createControl((props) => {
|
|
|
3541
3512
|
label = (0, import_i18n23.__)("Link", "elementor"),
|
|
3542
3513
|
ariaLabel
|
|
3543
3514
|
} = props || {};
|
|
3544
|
-
const [linkInLinkRestriction, setLinkInLinkRestriction] = (0,
|
|
3515
|
+
const [linkInLinkRestriction, setLinkInLinkRestriction] = (0, import_react32.useState)(
|
|
3545
3516
|
(0, import_editor_elements2.getLinkInLinkRestriction)(elementId, value)
|
|
3546
3517
|
);
|
|
3547
3518
|
const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
|
|
3548
|
-
const debouncedCheckRestriction = (0,
|
|
3519
|
+
const debouncedCheckRestriction = (0, import_react32.useMemo)(
|
|
3549
3520
|
() => (0, import_utils5.debounce)(() => {
|
|
3550
3521
|
const newRestriction = (0, import_editor_elements2.getLinkInLinkRestriction)(elementId, value);
|
|
3551
3522
|
if (newRestriction.shouldRestrict && isActive) {
|
|
@@ -3555,7 +3526,7 @@ var LinkControl = createControl((props) => {
|
|
|
3555
3526
|
}, 300),
|
|
3556
3527
|
[elementId, isActive, value]
|
|
3557
3528
|
);
|
|
3558
|
-
(0,
|
|
3529
|
+
(0, import_react32.useEffect)(() => {
|
|
3559
3530
|
debouncedCheckRestriction();
|
|
3560
3531
|
const handleInlineLinkChanged = (event) => {
|
|
3561
3532
|
const customEvent = event;
|
|
@@ -3594,8 +3565,8 @@ var LinkControl = createControl((props) => {
|
|
|
3594
3565
|
} : null;
|
|
3595
3566
|
setLinkSessionValue({ ...linkSessionValue, value: valueToSave });
|
|
3596
3567
|
};
|
|
3597
|
-
return /* @__PURE__ */
|
|
3598
|
-
|
|
3568
|
+
return /* @__PURE__ */ React64.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React64.createElement(import_ui48.Stack, { gap: 1.5 }, /* @__PURE__ */ React64.createElement(
|
|
3569
|
+
import_ui48.Stack,
|
|
3599
3570
|
{
|
|
3600
3571
|
direction: "row",
|
|
3601
3572
|
sx: {
|
|
@@ -3604,8 +3575,8 @@ var LinkControl = createControl((props) => {
|
|
|
3604
3575
|
marginInlineEnd: -0.75
|
|
3605
3576
|
}
|
|
3606
3577
|
},
|
|
3607
|
-
/* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3578
|
+
/* @__PURE__ */ React64.createElement(ControlLabel, null, label),
|
|
3579
|
+
/* @__PURE__ */ React64.createElement(RestrictedLinkInfotip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React64.createElement(
|
|
3609
3580
|
ToggleIconControl,
|
|
3610
3581
|
{
|
|
3611
3582
|
disabled: shouldDisableAddingLink,
|
|
@@ -3614,7 +3585,7 @@ var LinkControl = createControl((props) => {
|
|
|
3614
3585
|
label: (0, import_i18n23.__)("Toggle link", "elementor")
|
|
3615
3586
|
}
|
|
3616
3587
|
))
|
|
3617
|
-
), /* @__PURE__ */
|
|
3588
|
+
), /* @__PURE__ */ React64.createElement(import_ui48.Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React64.createElement(import_ui48.Stack, { gap: 1.5 }, /* @__PURE__ */ React64.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React64.createElement(
|
|
3618
3589
|
QueryControl,
|
|
3619
3590
|
{
|
|
3620
3591
|
queryOptions,
|
|
@@ -3624,33 +3595,33 @@ var LinkControl = createControl((props) => {
|
|
|
3624
3595
|
onSetValue: onSaveValueToSession,
|
|
3625
3596
|
ariaLabel: ariaLabel || label
|
|
3626
3597
|
}
|
|
3627
|
-
)), /* @__PURE__ */
|
|
3598
|
+
)), /* @__PURE__ */ React64.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React64.createElement(import_ui48.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React64.createElement(import_ui48.Grid, { item: true }, /* @__PURE__ */ React64.createElement(ControlFormLabel, null, (0, import_i18n23.__)("Open in a new tab", "elementor"))), /* @__PURE__ */ React64.createElement(import_ui48.Grid, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React64.createElement(SwitchControl, null))))))));
|
|
3628
3599
|
});
|
|
3629
3600
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
3630
|
-
return /* @__PURE__ */
|
|
3601
|
+
return /* @__PURE__ */ React64.createElement(import_ui48.IconButton, { size: SIZE6, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React64.createElement(import_icons15.MinusIcon, { fontSize: SIZE6 }) : /* @__PURE__ */ React64.createElement(import_icons15.PlusIcon, { fontSize: SIZE6 }));
|
|
3631
3602
|
};
|
|
3632
3603
|
|
|
3633
3604
|
// src/controls/html-tag-control.tsx
|
|
3634
|
-
var
|
|
3605
|
+
var React66 = __toESM(require("react"));
|
|
3635
3606
|
var import_editor_elements3 = require("@elementor/editor-elements");
|
|
3636
3607
|
var import_editor_props24 = require("@elementor/editor-props");
|
|
3637
|
-
var
|
|
3638
|
-
var
|
|
3608
|
+
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
3609
|
+
var import_ui51 = require("@elementor/ui");
|
|
3639
3610
|
var import_i18n24 = require("@wordpress/i18n");
|
|
3640
3611
|
|
|
3641
3612
|
// src/components/conditional-control-infotip.tsx
|
|
3642
|
-
var
|
|
3643
|
-
var
|
|
3613
|
+
var React65 = __toESM(require("react"));
|
|
3614
|
+
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
3615
|
+
var import_ui49 = require("@elementor/ui");
|
|
3644
3616
|
var import_ui50 = require("@elementor/ui");
|
|
3645
|
-
var import_ui51 = require("@elementor/ui");
|
|
3646
3617
|
var DEFAULT_COLOR = "secondary";
|
|
3647
|
-
var ConditionalControlInfotip =
|
|
3618
|
+
var ConditionalControlInfotip = React65.forwardRef(
|
|
3648
3619
|
({ children, title, description, alertProps, infotipProps, ...props }, ref) => {
|
|
3649
|
-
const theme = (0,
|
|
3620
|
+
const theme = (0, import_ui49.useTheme)();
|
|
3650
3621
|
const isUiRtl = "rtl" === theme.direction;
|
|
3651
3622
|
const isEnabled = props.isEnabled && (title || description);
|
|
3652
|
-
return /* @__PURE__ */
|
|
3653
|
-
|
|
3623
|
+
return /* @__PURE__ */ React65.createElement(import_ui49.Box, { ref }, isEnabled ? /* @__PURE__ */ React65.createElement(import_ui50.DirectionProvider, { rtl: isUiRtl }, /* @__PURE__ */ React65.createElement(
|
|
3624
|
+
import_ui49.Infotip,
|
|
3654
3625
|
{
|
|
3655
3626
|
placement: "right",
|
|
3656
3627
|
color: DEFAULT_COLOR,
|
|
@@ -3667,14 +3638,14 @@ var ConditionalControlInfotip = React66.forwardRef(
|
|
|
3667
3638
|
}
|
|
3668
3639
|
},
|
|
3669
3640
|
...infotipProps,
|
|
3670
|
-
content: /* @__PURE__ */
|
|
3671
|
-
|
|
3641
|
+
content: /* @__PURE__ */ React65.createElement(
|
|
3642
|
+
import_editor_ui6.InfoAlert,
|
|
3672
3643
|
{
|
|
3673
3644
|
color: DEFAULT_COLOR,
|
|
3674
3645
|
sx: { width: 300, px: 1.5, py: 2 },
|
|
3675
3646
|
...alertProps
|
|
3676
3647
|
},
|
|
3677
|
-
/* @__PURE__ */
|
|
3648
|
+
/* @__PURE__ */ React65.createElement(import_ui49.Box, { sx: { flexDirection: "column", display: "flex", gap: 0.5 } }, /* @__PURE__ */ React65.createElement(import_ui49.AlertTitle, null, title), /* @__PURE__ */ React65.createElement(import_ui49.Box, null, description))
|
|
3678
3649
|
)
|
|
3679
3650
|
},
|
|
3680
3651
|
children
|
|
@@ -3683,7 +3654,7 @@ var ConditionalControlInfotip = React66.forwardRef(
|
|
|
3683
3654
|
);
|
|
3684
3655
|
|
|
3685
3656
|
// src/controls/html-tag-control.tsx
|
|
3686
|
-
var StyledSelect = (0,
|
|
3657
|
+
var StyledSelect = (0, import_ui51.styled)(import_ui51.Select)(() => ({ ".MuiSelect-select.Mui-disabled": { cursor: "not-allowed" } }));
|
|
3687
3658
|
var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} }) => {
|
|
3688
3659
|
const { value, setValue, disabled, placeholder } = useBoundProp(import_editor_props24.stringPropTypeUtil);
|
|
3689
3660
|
const handleChange = (event) => {
|
|
@@ -3710,10 +3681,10 @@ var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} })
|
|
|
3710
3681
|
}
|
|
3711
3682
|
const placeholderOption = findOptionByValue(placeholder);
|
|
3712
3683
|
const displayText = placeholderOption?.label || placeholder;
|
|
3713
|
-
return /* @__PURE__ */
|
|
3684
|
+
return /* @__PURE__ */ React66.createElement(import_ui51.Typography, { component: "span", variant: "caption", color: "text.tertiary" }, displayText);
|
|
3714
3685
|
};
|
|
3715
3686
|
const findOptionByValue = (searchValue) => options.find((opt) => opt.value === searchValue);
|
|
3716
|
-
return /* @__PURE__ */
|
|
3687
|
+
return /* @__PURE__ */ React66.createElement(ControlActions, null, /* @__PURE__ */ React66.createElement(ConditionalControlInfotip, { ...infoTipProps }, /* @__PURE__ */ React66.createElement(
|
|
3717
3688
|
StyledSelect,
|
|
3718
3689
|
{
|
|
3719
3690
|
sx: { overflow: "hidden", cursor: disabled ? "not-allowed" : void 0 },
|
|
@@ -3725,20 +3696,20 @@ var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} })
|
|
|
3725
3696
|
disabled,
|
|
3726
3697
|
fullWidth: true
|
|
3727
3698
|
},
|
|
3728
|
-
options.map(({ label, ...props }) => /* @__PURE__ */
|
|
3699
|
+
options.map(({ label, ...props }) => /* @__PURE__ */ React66.createElement(import_editor_ui7.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, label))
|
|
3729
3700
|
)));
|
|
3730
3701
|
});
|
|
3731
3702
|
|
|
3732
3703
|
// src/controls/gap-control.tsx
|
|
3733
|
-
var
|
|
3734
|
-
var
|
|
3704
|
+
var React67 = __toESM(require("react"));
|
|
3705
|
+
var import_react33 = require("react");
|
|
3735
3706
|
var import_editor_props25 = require("@elementor/editor-props");
|
|
3736
3707
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
3737
3708
|
var import_icons16 = require("@elementor/icons");
|
|
3738
|
-
var
|
|
3709
|
+
var import_ui52 = require("@elementor/ui");
|
|
3739
3710
|
var import_i18n25 = require("@wordpress/i18n");
|
|
3740
3711
|
var GapControl = ({ label }) => {
|
|
3741
|
-
const stackRef = (0,
|
|
3712
|
+
const stackRef = (0, import_react33.useRef)(null);
|
|
3742
3713
|
const { disabled: sizeDisabled } = useBoundProp(import_editor_props25.sizePropTypeUtil);
|
|
3743
3714
|
const {
|
|
3744
3715
|
value: directionValue,
|
|
@@ -3757,9 +3728,9 @@ var GapControl = ({ label }) => {
|
|
|
3757
3728
|
}
|
|
3758
3729
|
return true;
|
|
3759
3730
|
};
|
|
3760
|
-
const [isLinked, setIsLinked] = (0,
|
|
3731
|
+
const [isLinked, setIsLinked] = (0, import_react33.useState)(() => inferIsLinked());
|
|
3761
3732
|
const activeBreakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
3762
|
-
(0,
|
|
3733
|
+
(0, import_react33.useLayoutEffect)(() => {
|
|
3763
3734
|
setIsLinked(inferIsLinked());
|
|
3764
3735
|
}, [activeBreakpoint]);
|
|
3765
3736
|
const onLinkToggle = () => {
|
|
@@ -3793,7 +3764,7 @@ var GapControl = ({ label }) => {
|
|
|
3793
3764
|
placeholder: directionPlaceholder
|
|
3794
3765
|
};
|
|
3795
3766
|
const hasPlaceholders = !masterValue && (directionPlaceholder || masterPlaceholder);
|
|
3796
|
-
return /* @__PURE__ */
|
|
3767
|
+
return /* @__PURE__ */ React67.createElement(PropProvider, { ...propProviderProps }, /* @__PURE__ */ React67.createElement(import_ui52.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React67.createElement(ControlLabel, null, label), /* @__PURE__ */ React67.createElement(import_ui52.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React67.createElement(
|
|
3797
3768
|
StyledToggleButton,
|
|
3798
3769
|
{
|
|
3799
3770
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -3805,8 +3776,8 @@ var GapControl = ({ label }) => {
|
|
|
3805
3776
|
disabled,
|
|
3806
3777
|
isPlaceholder: hasPlaceholders
|
|
3807
3778
|
},
|
|
3808
|
-
/* @__PURE__ */
|
|
3809
|
-
))), /* @__PURE__ */
|
|
3779
|
+
/* @__PURE__ */ React67.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
3780
|
+
))), /* @__PURE__ */ React67.createElement(import_ui52.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React67.createElement(import_ui52.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React67.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React67.createElement(ControlFormLabel, null, (0, import_i18n25.__)("Column", "elementor"))), /* @__PURE__ */ React67.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React67.createElement(
|
|
3810
3781
|
Control4,
|
|
3811
3782
|
{
|
|
3812
3783
|
bind: "column",
|
|
@@ -3814,7 +3785,7 @@ var GapControl = ({ label }) => {
|
|
|
3814
3785
|
isLinked,
|
|
3815
3786
|
anchorRef: stackRef
|
|
3816
3787
|
}
|
|
3817
|
-
))), /* @__PURE__ */
|
|
3788
|
+
))), /* @__PURE__ */ React67.createElement(import_ui52.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React67.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React67.createElement(ControlFormLabel, null, (0, import_i18n25.__)("Row", "elementor"))), /* @__PURE__ */ React67.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React67.createElement(
|
|
3818
3789
|
Control4,
|
|
3819
3790
|
{
|
|
3820
3791
|
bind: "row",
|
|
@@ -3831,18 +3802,18 @@ var Control4 = ({
|
|
|
3831
3802
|
anchorRef
|
|
3832
3803
|
}) => {
|
|
3833
3804
|
if (isLinked) {
|
|
3834
|
-
return /* @__PURE__ */
|
|
3805
|
+
return /* @__PURE__ */ React67.createElement(SizeControl, { anchorRef, ariaLabel });
|
|
3835
3806
|
}
|
|
3836
|
-
return /* @__PURE__ */
|
|
3807
|
+
return /* @__PURE__ */ React67.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React67.createElement(SizeControl, { anchorRef, ariaLabel }));
|
|
3837
3808
|
};
|
|
3838
3809
|
|
|
3839
3810
|
// src/controls/aspect-ratio-control.tsx
|
|
3840
|
-
var
|
|
3841
|
-
var
|
|
3811
|
+
var React68 = __toESM(require("react"));
|
|
3812
|
+
var import_react34 = require("react");
|
|
3842
3813
|
var import_editor_props26 = require("@elementor/editor-props");
|
|
3843
|
-
var
|
|
3814
|
+
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
3844
3815
|
var import_icons17 = require("@elementor/icons");
|
|
3845
|
-
var
|
|
3816
|
+
var import_ui53 = require("@elementor/ui");
|
|
3846
3817
|
var import_i18n26 = require("@wordpress/i18n");
|
|
3847
3818
|
var RATIO_OPTIONS = [
|
|
3848
3819
|
{ label: (0, import_i18n26.__)("Auto", "elementor"), value: "auto" },
|
|
@@ -3859,13 +3830,13 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3859
3830
|
const { value: aspectRatioValue, setValue: setAspectRatioValue, disabled } = useBoundProp(import_editor_props26.stringPropTypeUtil);
|
|
3860
3831
|
const isCustomSelected = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
3861
3832
|
const [initialWidth, initialHeight] = isCustomSelected ? aspectRatioValue.split("/") : ["", ""];
|
|
3862
|
-
const [isCustom, setIsCustom] = (0,
|
|
3863
|
-
const [customWidth, setCustomWidth] = (0,
|
|
3864
|
-
const [customHeight, setCustomHeight] = (0,
|
|
3865
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
3833
|
+
const [isCustom, setIsCustom] = (0, import_react34.useState)(isCustomSelected);
|
|
3834
|
+
const [customWidth, setCustomWidth] = (0, import_react34.useState)(initialWidth);
|
|
3835
|
+
const [customHeight, setCustomHeight] = (0, import_react34.useState)(initialHeight);
|
|
3836
|
+
const [selectedValue, setSelectedValue] = (0, import_react34.useState)(
|
|
3866
3837
|
isCustomSelected ? CUSTOM_RATIO : aspectRatioValue || ""
|
|
3867
3838
|
);
|
|
3868
|
-
(0,
|
|
3839
|
+
(0, import_react34.useEffect)(() => {
|
|
3869
3840
|
const isCustomValue = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
3870
3841
|
if (isCustomValue) {
|
|
3871
3842
|
const [width, height] = aspectRatioValue.split("/");
|
|
@@ -3904,8 +3875,8 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3904
3875
|
setAspectRatioValue(`${customWidth}/${newHeight}`);
|
|
3905
3876
|
}
|
|
3906
3877
|
};
|
|
3907
|
-
return /* @__PURE__ */
|
|
3908
|
-
|
|
3878
|
+
return /* @__PURE__ */ React68.createElement(ControlActions, null, /* @__PURE__ */ React68.createElement(import_ui53.Stack, { direction: "column", gap: 2 }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(ControlLabel, null, label)), /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(
|
|
3879
|
+
import_ui53.Select,
|
|
3909
3880
|
{
|
|
3910
3881
|
size: "tiny",
|
|
3911
3882
|
displayEmpty: true,
|
|
@@ -3916,10 +3887,10 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3916
3887
|
fullWidth: true
|
|
3917
3888
|
},
|
|
3918
3889
|
[...RATIO_OPTIONS, { label: (0, import_i18n26.__)("Custom", "elementor"), value: CUSTOM_RATIO }].map(
|
|
3919
|
-
({ label: optionLabel, ...props }) => /* @__PURE__ */
|
|
3890
|
+
({ label: optionLabel, ...props }) => /* @__PURE__ */ React68.createElement(import_editor_ui8.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
|
|
3920
3891
|
)
|
|
3921
|
-
))), isCustom && /* @__PURE__ */
|
|
3922
|
-
|
|
3892
|
+
))), isCustom && /* @__PURE__ */ React68.createElement(import_ui53.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(
|
|
3893
|
+
import_ui53.TextField,
|
|
3923
3894
|
{
|
|
3924
3895
|
size: "tiny",
|
|
3925
3896
|
type: "number",
|
|
@@ -3928,11 +3899,11 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3928
3899
|
value: customWidth,
|
|
3929
3900
|
onChange: handleCustomWidthChange,
|
|
3930
3901
|
InputProps: {
|
|
3931
|
-
startAdornment: /* @__PURE__ */
|
|
3902
|
+
startAdornment: /* @__PURE__ */ React68.createElement(import_icons17.ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
|
|
3932
3903
|
}
|
|
3933
3904
|
}
|
|
3934
|
-
)), /* @__PURE__ */
|
|
3935
|
-
|
|
3905
|
+
)), /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(
|
|
3906
|
+
import_ui53.TextField,
|
|
3936
3907
|
{
|
|
3937
3908
|
size: "tiny",
|
|
3938
3909
|
type: "number",
|
|
@@ -3941,26 +3912,26 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3941
3912
|
value: customHeight,
|
|
3942
3913
|
onChange: handleCustomHeightChange,
|
|
3943
3914
|
InputProps: {
|
|
3944
|
-
startAdornment: /* @__PURE__ */
|
|
3915
|
+
startAdornment: /* @__PURE__ */ React68.createElement(import_icons17.ArrowsMoveVerticalIcon, { fontSize: "tiny" })
|
|
3945
3916
|
}
|
|
3946
3917
|
}
|
|
3947
3918
|
)))));
|
|
3948
3919
|
});
|
|
3949
3920
|
|
|
3950
3921
|
// src/controls/svg-media-control.tsx
|
|
3951
|
-
var
|
|
3952
|
-
var
|
|
3922
|
+
var React70 = __toESM(require("react"));
|
|
3923
|
+
var import_react36 = require("react");
|
|
3953
3924
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
3954
3925
|
var import_editor_props27 = require("@elementor/editor-props");
|
|
3955
3926
|
var import_icons18 = require("@elementor/icons");
|
|
3956
|
-
var
|
|
3927
|
+
var import_ui55 = require("@elementor/ui");
|
|
3957
3928
|
var import_wp_media2 = require("@elementor/wp-media");
|
|
3958
3929
|
var import_i18n28 = require("@wordpress/i18n");
|
|
3959
3930
|
|
|
3960
3931
|
// src/components/enable-unfiltered-modal.tsx
|
|
3961
|
-
var
|
|
3962
|
-
var
|
|
3963
|
-
var
|
|
3932
|
+
var React69 = __toESM(require("react"));
|
|
3933
|
+
var import_react35 = require("react");
|
|
3934
|
+
var import_ui54 = require("@elementor/ui");
|
|
3964
3935
|
var import_i18n27 = require("@wordpress/i18n");
|
|
3965
3936
|
var ADMIN_TITLE_TEXT = (0, import_i18n27.__)("Enable Unfiltered Uploads", "elementor");
|
|
3966
3937
|
var ADMIN_CONTENT_TEXT = (0, import_i18n27.__)(
|
|
@@ -3975,7 +3946,7 @@ var ADMIN_FAILED_CONTENT_TEXT_PT2 = (0, import_i18n27.__)(
|
|
|
3975
3946
|
var WAIT_FOR_CLOSE_TIMEOUT_MS = 300;
|
|
3976
3947
|
var EnableUnfilteredModal = (props) => {
|
|
3977
3948
|
const { mutateAsync, isPending } = useUpdateUnfilteredFilesUpload();
|
|
3978
|
-
const [isError, setIsError] = (0,
|
|
3949
|
+
const [isError, setIsError] = (0, import_react35.useState)(false);
|
|
3979
3950
|
const onClose = (enabled) => {
|
|
3980
3951
|
props.onClose(enabled);
|
|
3981
3952
|
setTimeout(() => setIsError(false), WAIT_FOR_CLOSE_TIMEOUT_MS);
|
|
@@ -3993,10 +3964,10 @@ var EnableUnfilteredModal = (props) => {
|
|
|
3993
3964
|
}
|
|
3994
3965
|
};
|
|
3995
3966
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
3996
|
-
return /* @__PURE__ */
|
|
3967
|
+
return /* @__PURE__ */ React69.createElement(AdminDialog, { ...dialogProps });
|
|
3997
3968
|
};
|
|
3998
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
3999
|
-
|
|
3969
|
+
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React69.createElement(import_ui54.Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React69.createElement(import_ui54.DialogHeader, { logo: false }, /* @__PURE__ */ React69.createElement(import_ui54.DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React69.createElement(import_ui54.Divider, null), /* @__PURE__ */ React69.createElement(import_ui54.DialogContent, null, /* @__PURE__ */ React69.createElement(import_ui54.DialogContentText, null, isError ? /* @__PURE__ */ React69.createElement(React69.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React69.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React69.createElement(import_ui54.DialogActions, null, /* @__PURE__ */ React69.createElement(import_ui54.Button, { size: "medium", color: "secondary", onClick: () => onClose(false) }, (0, import_i18n27.__)("Cancel", "elementor")), /* @__PURE__ */ React69.createElement(
|
|
3970
|
+
import_ui54.Button,
|
|
4000
3971
|
{
|
|
4001
3972
|
size: "medium",
|
|
4002
3973
|
onClick: () => handleEnable(),
|
|
@@ -4004,7 +3975,7 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
4004
3975
|
color: "primary",
|
|
4005
3976
|
disabled: isPending
|
|
4006
3977
|
},
|
|
4007
|
-
isPending ? /* @__PURE__ */
|
|
3978
|
+
isPending ? /* @__PURE__ */ React69.createElement(import_ui54.CircularProgress, { size: 24 }) : (0, import_i18n27.__)("Enable", "elementor")
|
|
4008
3979
|
)));
|
|
4009
3980
|
|
|
4010
3981
|
// src/controls/svg-media-control.tsx
|
|
@@ -4012,7 +3983,7 @@ var TILE_SIZE = 8;
|
|
|
4012
3983
|
var TILE_WHITE = "transparent";
|
|
4013
3984
|
var TILE_BLACK = "#c1c1c1";
|
|
4014
3985
|
var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
|
|
4015
|
-
var StyledCard = (0,
|
|
3986
|
+
var StyledCard = (0, import_ui55.styled)(import_ui55.Card)`
|
|
4016
3987
|
background-color: white;
|
|
4017
3988
|
background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
|
|
4018
3989
|
background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
|
|
@@ -4021,7 +3992,7 @@ var StyledCard = (0, import_ui56.styled)(import_ui56.Card)`
|
|
|
4021
3992
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
4022
3993
|
border: none;
|
|
4023
3994
|
`;
|
|
4024
|
-
var StyledCardMediaContainer = (0,
|
|
3995
|
+
var StyledCardMediaContainer = (0, import_ui55.styled)(import_ui55.Stack)`
|
|
4025
3996
|
position: relative;
|
|
4026
3997
|
height: 140px;
|
|
4027
3998
|
object-fit: contain;
|
|
@@ -4038,7 +4009,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
4038
4009
|
const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
|
|
4039
4010
|
const src = attachment?.url ?? url?.value ?? null;
|
|
4040
4011
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
4041
|
-
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0,
|
|
4012
|
+
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0, import_react36.useState)(false);
|
|
4042
4013
|
const { isAdmin } = (0, import_editor_current_user.useCurrentUserCapabilities)();
|
|
4043
4014
|
const { open } = (0, import_wp_media2.useWpMediaFrame)({
|
|
4044
4015
|
mediaTypes: ["svg"],
|
|
@@ -4069,19 +4040,19 @@ var SvgMediaControl = createControl(() => {
|
|
|
4069
4040
|
};
|
|
4070
4041
|
const infotipProps = {
|
|
4071
4042
|
title: (0, import_i18n28.__)("Sorry, you can't upload that file yet.", "elementor"),
|
|
4072
|
-
description: /* @__PURE__ */
|
|
4043
|
+
description: /* @__PURE__ */ React70.createElement(React70.Fragment, null, (0, import_i18n28.__)("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React70.createElement("br", null), (0, import_i18n28.__)("file uploads.", "elementor")),
|
|
4073
4044
|
isEnabled: !isAdmin
|
|
4074
4045
|
};
|
|
4075
|
-
return /* @__PURE__ */
|
|
4076
|
-
|
|
4046
|
+
return /* @__PURE__ */ React70.createElement(import_ui55.Stack, { gap: 1, "aria-label": "SVG Control" }, /* @__PURE__ */ React70.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React70.createElement(ControlActions, null, /* @__PURE__ */ React70.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React70.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React70.createElement(import_ui55.CircularProgress, { role: "progressbar" }) : /* @__PURE__ */ React70.createElement(
|
|
4047
|
+
import_ui55.CardMedia,
|
|
4077
4048
|
{
|
|
4078
4049
|
component: "img",
|
|
4079
4050
|
image: src,
|
|
4080
4051
|
alt: (0, import_i18n28.__)("Preview SVG", "elementor"),
|
|
4081
4052
|
sx: { maxHeight: "140px", width: "50px" }
|
|
4082
4053
|
}
|
|
4083
|
-
)), /* @__PURE__ */
|
|
4084
|
-
|
|
4054
|
+
)), /* @__PURE__ */ React70.createElement(
|
|
4055
|
+
import_ui55.CardOverlay,
|
|
4085
4056
|
{
|
|
4086
4057
|
sx: {
|
|
4087
4058
|
"&:hover": {
|
|
@@ -4089,8 +4060,8 @@ var SvgMediaControl = createControl(() => {
|
|
|
4089
4060
|
}
|
|
4090
4061
|
}
|
|
4091
4062
|
},
|
|
4092
|
-
/* @__PURE__ */
|
|
4093
|
-
|
|
4063
|
+
/* @__PURE__ */ React70.createElement(import_ui55.Stack, { gap: 1 }, /* @__PURE__ */ React70.createElement(
|
|
4064
|
+
import_ui55.Button,
|
|
4094
4065
|
{
|
|
4095
4066
|
size: "tiny",
|
|
4096
4067
|
color: "inherit",
|
|
@@ -4099,13 +4070,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
4099
4070
|
"aria-label": "Select SVG"
|
|
4100
4071
|
},
|
|
4101
4072
|
(0, import_i18n28.__)("Select SVG", "elementor")
|
|
4102
|
-
), /* @__PURE__ */
|
|
4103
|
-
|
|
4073
|
+
), /* @__PURE__ */ React70.createElement(ConditionalControlInfotip, { ...infotipProps }, /* @__PURE__ */ React70.createElement("span", null, /* @__PURE__ */ React70.createElement(import_ui55.ThemeProvider, { colorScheme: isAdmin ? "light" : "dark" }, /* @__PURE__ */ React70.createElement(
|
|
4074
|
+
import_ui55.Button,
|
|
4104
4075
|
{
|
|
4105
4076
|
size: "tiny",
|
|
4106
4077
|
variant: "text",
|
|
4107
4078
|
color: "inherit",
|
|
4108
|
-
startIcon: /* @__PURE__ */
|
|
4079
|
+
startIcon: /* @__PURE__ */ React70.createElement(import_icons18.UploadIcon, null),
|
|
4109
4080
|
disabled: !isAdmin,
|
|
4110
4081
|
onClick: () => isAdmin && handleClick(MODE_UPLOAD),
|
|
4111
4082
|
"aria-label": "Upload SVG"
|
|
@@ -4116,15 +4087,15 @@ var SvgMediaControl = createControl(() => {
|
|
|
4116
4087
|
});
|
|
4117
4088
|
|
|
4118
4089
|
// src/controls/background-control/background-control.tsx
|
|
4119
|
-
var
|
|
4090
|
+
var React77 = __toESM(require("react"));
|
|
4120
4091
|
var import_editor_props33 = require("@elementor/editor-props");
|
|
4121
|
-
var
|
|
4092
|
+
var import_ui63 = require("@elementor/ui");
|
|
4122
4093
|
var import_i18n34 = require("@wordpress/i18n");
|
|
4123
4094
|
|
|
4124
4095
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
4125
|
-
var
|
|
4096
|
+
var React76 = __toESM(require("react"));
|
|
4126
4097
|
var import_editor_props32 = require("@elementor/editor-props");
|
|
4127
|
-
var
|
|
4098
|
+
var import_ui62 = require("@elementor/ui");
|
|
4128
4099
|
var import_wp_media3 = require("@elementor/wp-media");
|
|
4129
4100
|
var import_i18n33 = require("@wordpress/i18n");
|
|
4130
4101
|
|
|
@@ -4133,9 +4104,9 @@ var import_env = require("@elementor/env");
|
|
|
4133
4104
|
var { env } = (0, import_env.parseEnv)("@elementor/editor-controls");
|
|
4134
4105
|
|
|
4135
4106
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
4136
|
-
var
|
|
4107
|
+
var React71 = __toESM(require("react"));
|
|
4137
4108
|
var import_editor_props28 = require("@elementor/editor-props");
|
|
4138
|
-
var
|
|
4109
|
+
var import_ui56 = require("@elementor/ui");
|
|
4139
4110
|
var BackgroundGradientColorControl = createControl(() => {
|
|
4140
4111
|
const { value, setValue } = useBoundProp(import_editor_props28.backgroundGradientOverlayPropTypeUtil);
|
|
4141
4112
|
const handleChange = (newValue) => {
|
|
@@ -4173,8 +4144,8 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
4173
4144
|
positions: positions?.value.split(" ")
|
|
4174
4145
|
};
|
|
4175
4146
|
};
|
|
4176
|
-
return /* @__PURE__ */
|
|
4177
|
-
|
|
4147
|
+
return /* @__PURE__ */ React71.createElement(
|
|
4148
|
+
import_ui56.UnstableGradientBox,
|
|
4178
4149
|
{
|
|
4179
4150
|
sx: { width: "auto", padding: 1.5 },
|
|
4180
4151
|
value: normalizeValue(),
|
|
@@ -4198,35 +4169,35 @@ var initialBackgroundGradientOverlay = import_editor_props28.backgroundGradientO
|
|
|
4198
4169
|
});
|
|
4199
4170
|
|
|
4200
4171
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
4201
|
-
var
|
|
4172
|
+
var React72 = __toESM(require("react"));
|
|
4202
4173
|
var import_icons19 = require("@elementor/icons");
|
|
4203
|
-
var
|
|
4174
|
+
var import_ui57 = require("@elementor/ui");
|
|
4204
4175
|
var import_i18n29 = require("@wordpress/i18n");
|
|
4205
4176
|
var attachmentControlOptions = [
|
|
4206
4177
|
{
|
|
4207
4178
|
value: "fixed",
|
|
4208
4179
|
label: (0, import_i18n29.__)("Fixed", "elementor"),
|
|
4209
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4180
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(import_icons19.PinIcon, { fontSize: size }),
|
|
4210
4181
|
showTooltip: true
|
|
4211
4182
|
},
|
|
4212
4183
|
{
|
|
4213
4184
|
value: "scroll",
|
|
4214
4185
|
label: (0, import_i18n29.__)("Scroll", "elementor"),
|
|
4215
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4186
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(import_icons19.PinnedOffIcon, { fontSize: size }),
|
|
4216
4187
|
showTooltip: true
|
|
4217
4188
|
}
|
|
4218
4189
|
];
|
|
4219
4190
|
var BackgroundImageOverlayAttachment = () => {
|
|
4220
|
-
return /* @__PURE__ */
|
|
4191
|
+
return /* @__PURE__ */ React72.createElement(PopoverGridContainer, null, /* @__PURE__ */ React72.createElement(import_ui57.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlFormLabel, null, (0, import_i18n29.__)("Attachment", "elementor"))), /* @__PURE__ */ React72.createElement(import_ui57.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React72.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
4221
4192
|
};
|
|
4222
4193
|
|
|
4223
4194
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
4224
|
-
var
|
|
4225
|
-
var
|
|
4195
|
+
var React73 = __toESM(require("react"));
|
|
4196
|
+
var import_react37 = require("react");
|
|
4226
4197
|
var import_editor_props29 = require("@elementor/editor-props");
|
|
4227
|
-
var
|
|
4198
|
+
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
4228
4199
|
var import_icons20 = require("@elementor/icons");
|
|
4229
|
-
var
|
|
4200
|
+
var import_ui58 = require("@elementor/ui");
|
|
4230
4201
|
var import_i18n30 = require("@wordpress/i18n");
|
|
4231
4202
|
var backgroundPositionOptions = [
|
|
4232
4203
|
{ label: (0, import_i18n30.__)("Center center", "elementor"), value: "center center" },
|
|
@@ -4244,7 +4215,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4244
4215
|
const backgroundImageOffsetContext = useBoundProp(import_editor_props29.backgroundImagePositionOffsetPropTypeUtil);
|
|
4245
4216
|
const stringPropContext = useBoundProp(import_editor_props29.stringPropTypeUtil);
|
|
4246
4217
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
4247
|
-
const rowRef = (0,
|
|
4218
|
+
const rowRef = (0, import_react37.useRef)(null);
|
|
4248
4219
|
const handlePositionChange = (event) => {
|
|
4249
4220
|
const value = event.target.value || null;
|
|
4250
4221
|
if (value === "custom") {
|
|
@@ -4253,8 +4224,8 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4253
4224
|
stringPropContext.setValue(value);
|
|
4254
4225
|
}
|
|
4255
4226
|
};
|
|
4256
|
-
return /* @__PURE__ */
|
|
4257
|
-
|
|
4227
|
+
return /* @__PURE__ */ React73.createElement(import_ui58.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React73.createElement(import_ui58.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React73.createElement(PopoverGridContainer, null, /* @__PURE__ */ React73.createElement(import_ui58.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(ControlFormLabel, null, (0, import_i18n30.__)("Position", "elementor"))), /* @__PURE__ */ React73.createElement(import_ui58.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React73.createElement(ControlActions, null, /* @__PURE__ */ React73.createElement(
|
|
4228
|
+
import_ui58.Select,
|
|
4258
4229
|
{
|
|
4259
4230
|
fullWidth: true,
|
|
4260
4231
|
size: "tiny",
|
|
@@ -4262,18 +4233,18 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4262
4233
|
disabled: stringPropContext.disabled,
|
|
4263
4234
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
4264
4235
|
},
|
|
4265
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
4266
|
-
))))), isCustom ? /* @__PURE__ */
|
|
4236
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React73.createElement(import_editor_ui9.MenuListItem, { key: value, value: value ?? "" }, label))
|
|
4237
|
+
))))), isCustom ? /* @__PURE__ */ React73.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React73.createElement(import_ui58.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React73.createElement(import_ui58.Grid, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React73.createElement(import_ui58.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React73.createElement(
|
|
4267
4238
|
SizeControl,
|
|
4268
4239
|
{
|
|
4269
|
-
startIcon: /* @__PURE__ */
|
|
4240
|
+
startIcon: /* @__PURE__ */ React73.createElement(import_icons20.LetterXIcon, { fontSize: "tiny" }),
|
|
4270
4241
|
anchorRef: rowRef,
|
|
4271
4242
|
min: -Number.MAX_SAFE_INTEGER
|
|
4272
4243
|
}
|
|
4273
|
-
))), /* @__PURE__ */
|
|
4244
|
+
))), /* @__PURE__ */ React73.createElement(import_ui58.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React73.createElement(
|
|
4274
4245
|
SizeControl,
|
|
4275
4246
|
{
|
|
4276
|
-
startIcon: /* @__PURE__ */
|
|
4247
|
+
startIcon: /* @__PURE__ */ React73.createElement(import_icons20.LetterYIcon, { fontSize: "tiny" }),
|
|
4277
4248
|
anchorRef: rowRef,
|
|
4278
4249
|
min: -Number.MAX_SAFE_INTEGER
|
|
4279
4250
|
}
|
|
@@ -4281,70 +4252,70 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4281
4252
|
};
|
|
4282
4253
|
|
|
4283
4254
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
4284
|
-
var
|
|
4255
|
+
var React74 = __toESM(require("react"));
|
|
4285
4256
|
var import_icons21 = require("@elementor/icons");
|
|
4286
|
-
var
|
|
4257
|
+
var import_ui59 = require("@elementor/ui");
|
|
4287
4258
|
var import_i18n31 = require("@wordpress/i18n");
|
|
4288
4259
|
var repeatControlOptions = [
|
|
4289
4260
|
{
|
|
4290
4261
|
value: "repeat",
|
|
4291
4262
|
label: (0, import_i18n31.__)("Repeat", "elementor"),
|
|
4292
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4263
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(import_icons21.GridDotsIcon, { fontSize: size }),
|
|
4293
4264
|
showTooltip: true
|
|
4294
4265
|
},
|
|
4295
4266
|
{
|
|
4296
4267
|
value: "repeat-x",
|
|
4297
4268
|
label: (0, import_i18n31.__)("Repeat-x", "elementor"),
|
|
4298
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4269
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(import_icons21.DotsHorizontalIcon, { fontSize: size }),
|
|
4299
4270
|
showTooltip: true
|
|
4300
4271
|
},
|
|
4301
4272
|
{
|
|
4302
4273
|
value: "repeat-y",
|
|
4303
4274
|
label: (0, import_i18n31.__)("Repeat-y", "elementor"),
|
|
4304
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4275
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(import_icons21.DotsVerticalIcon, { fontSize: size }),
|
|
4305
4276
|
showTooltip: true
|
|
4306
4277
|
},
|
|
4307
4278
|
{
|
|
4308
4279
|
value: "no-repeat",
|
|
4309
4280
|
label: (0, import_i18n31.__)("No-repeat", "elementor"),
|
|
4310
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4281
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(import_icons21.XIcon, { fontSize: size }),
|
|
4311
4282
|
showTooltip: true
|
|
4312
4283
|
}
|
|
4313
4284
|
];
|
|
4314
4285
|
var BackgroundImageOverlayRepeat = () => {
|
|
4315
|
-
return /* @__PURE__ */
|
|
4286
|
+
return /* @__PURE__ */ React74.createElement(PopoverGridContainer, null, /* @__PURE__ */ React74.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(ControlFormLabel, null, (0, import_i18n31.__)("Repeat", "elementor"))), /* @__PURE__ */ React74.createElement(import_ui59.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React74.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
4316
4287
|
};
|
|
4317
4288
|
|
|
4318
4289
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
4319
|
-
var
|
|
4320
|
-
var
|
|
4290
|
+
var React75 = __toESM(require("react"));
|
|
4291
|
+
var import_react38 = require("react");
|
|
4321
4292
|
var import_editor_props30 = require("@elementor/editor-props");
|
|
4322
4293
|
var import_icons22 = require("@elementor/icons");
|
|
4323
|
-
var
|
|
4294
|
+
var import_ui60 = require("@elementor/ui");
|
|
4324
4295
|
var import_i18n32 = require("@wordpress/i18n");
|
|
4325
4296
|
var sizeControlOptions = [
|
|
4326
4297
|
{
|
|
4327
4298
|
value: "auto",
|
|
4328
4299
|
label: (0, import_i18n32.__)("Auto", "elementor"),
|
|
4329
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4300
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons22.LetterAIcon, { fontSize: size }),
|
|
4330
4301
|
showTooltip: true
|
|
4331
4302
|
},
|
|
4332
4303
|
{
|
|
4333
4304
|
value: "cover",
|
|
4334
4305
|
label: (0, import_i18n32.__)("Cover", "elementor"),
|
|
4335
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4306
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons22.ArrowsMaximizeIcon, { fontSize: size }),
|
|
4336
4307
|
showTooltip: true
|
|
4337
4308
|
},
|
|
4338
4309
|
{
|
|
4339
4310
|
value: "contain",
|
|
4340
4311
|
label: (0, import_i18n32.__)("Contain", "elementor"),
|
|
4341
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4312
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons22.ArrowBarBothIcon, { fontSize: size }),
|
|
4342
4313
|
showTooltip: true
|
|
4343
4314
|
},
|
|
4344
4315
|
{
|
|
4345
4316
|
value: "custom",
|
|
4346
4317
|
label: (0, import_i18n32.__)("Custom", "elementor"),
|
|
4347
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4318
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons22.PencilIcon, { fontSize: size }),
|
|
4348
4319
|
showTooltip: true
|
|
4349
4320
|
}
|
|
4350
4321
|
];
|
|
@@ -4352,7 +4323,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4352
4323
|
const backgroundImageScaleContext = useBoundProp(import_editor_props30.backgroundImageSizeScalePropTypeUtil);
|
|
4353
4324
|
const stringPropContext = useBoundProp(import_editor_props30.stringPropTypeUtil);
|
|
4354
4325
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
4355
|
-
const rowRef = (0,
|
|
4326
|
+
const rowRef = (0, import_react38.useRef)(null);
|
|
4356
4327
|
const handleSizeChange = (size) => {
|
|
4357
4328
|
if (size === "custom") {
|
|
4358
4329
|
backgroundImageScaleContext.setValue({ width: null, height: null });
|
|
@@ -4360,7 +4331,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4360
4331
|
stringPropContext.setValue(size);
|
|
4361
4332
|
}
|
|
4362
4333
|
};
|
|
4363
|
-
return /* @__PURE__ */
|
|
4334
|
+
return /* @__PURE__ */ React75.createElement(import_ui60.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React75.createElement(import_ui60.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React75.createElement(PopoverGridContainer, null, /* @__PURE__ */ React75.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlFormLabel, null, (0, import_i18n32.__)("Size", "elementor"))), /* @__PURE__ */ React75.createElement(import_ui60.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React75.createElement(
|
|
4364
4335
|
ControlToggleButtonGroup,
|
|
4365
4336
|
{
|
|
4366
4337
|
exclusive: true,
|
|
@@ -4369,17 +4340,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4369
4340
|
disabled: stringPropContext.disabled,
|
|
4370
4341
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
4371
4342
|
}
|
|
4372
|
-
)))), isCustom ? /* @__PURE__ */
|
|
4343
|
+
)))), isCustom ? /* @__PURE__ */ React75.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React75.createElement(import_ui60.Grid, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React75.createElement(PopoverGridContainer, null, /* @__PURE__ */ React75.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React75.createElement(
|
|
4373
4344
|
SizeControl,
|
|
4374
4345
|
{
|
|
4375
|
-
startIcon: /* @__PURE__ */
|
|
4346
|
+
startIcon: /* @__PURE__ */ React75.createElement(import_icons22.ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
|
|
4376
4347
|
extendedOptions: ["auto"],
|
|
4377
4348
|
anchorRef: rowRef
|
|
4378
4349
|
}
|
|
4379
|
-
))), /* @__PURE__ */
|
|
4350
|
+
))), /* @__PURE__ */ React75.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React75.createElement(
|
|
4380
4351
|
SizeControl,
|
|
4381
4352
|
{
|
|
4382
|
-
startIcon: /* @__PURE__ */
|
|
4353
|
+
startIcon: /* @__PURE__ */ React75.createElement(import_icons22.ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
|
|
4383
4354
|
extendedOptions: ["auto"],
|
|
4384
4355
|
anchorRef: rowRef
|
|
4385
4356
|
}
|
|
@@ -4387,9 +4358,9 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4387
4358
|
};
|
|
4388
4359
|
|
|
4389
4360
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
4390
|
-
var
|
|
4361
|
+
var import_react39 = require("react");
|
|
4391
4362
|
var import_editor_props31 = require("@elementor/editor-props");
|
|
4392
|
-
var
|
|
4363
|
+
var import_ui61 = require("@elementor/ui");
|
|
4393
4364
|
var useBackgroundTabsHistory = ({
|
|
4394
4365
|
color: initialBackgroundColorOverlay2,
|
|
4395
4366
|
image: initialBackgroundImageOverlay,
|
|
@@ -4407,8 +4378,8 @@ var useBackgroundTabsHistory = ({
|
|
|
4407
4378
|
}
|
|
4408
4379
|
return "image";
|
|
4409
4380
|
};
|
|
4410
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
4411
|
-
const valuesHistory = (0,
|
|
4381
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui61.useTabs)(getCurrentOverlayType());
|
|
4382
|
+
const valuesHistory = (0, import_react39.useRef)({
|
|
4412
4383
|
image: initialBackgroundImageOverlay,
|
|
4413
4384
|
color: initialBackgroundColorOverlay2,
|
|
4414
4385
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -4483,22 +4454,22 @@ var backgroundResolutionOptions = [
|
|
|
4483
4454
|
];
|
|
4484
4455
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
4485
4456
|
const { propType, value: overlayValues, setValue } = useBoundProp(import_editor_props32.backgroundOverlayPropTypeUtil);
|
|
4486
|
-
return /* @__PURE__ */
|
|
4457
|
+
return /* @__PURE__ */ React76.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React76.createElement(
|
|
4487
4458
|
ControlRepeater,
|
|
4488
4459
|
{
|
|
4489
4460
|
initial: getInitialBackgroundOverlay(),
|
|
4490
4461
|
propTypeUtil: import_editor_props32.backgroundOverlayPropTypeUtil
|
|
4491
4462
|
},
|
|
4492
|
-
/* @__PURE__ */
|
|
4493
|
-
/* @__PURE__ */
|
|
4463
|
+
/* @__PURE__ */ React76.createElement(RepeaterHeader, { label: (0, import_i18n33.__)("Overlay", "elementor") }, /* @__PURE__ */ React76.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
4464
|
+
/* @__PURE__ */ React76.createElement(ItemsContainer, null, /* @__PURE__ */ React76.createElement(
|
|
4494
4465
|
Item,
|
|
4495
4466
|
{
|
|
4496
4467
|
Icon: ItemIcon2,
|
|
4497
4468
|
Label: ItemLabel2,
|
|
4498
|
-
actions: /* @__PURE__ */
|
|
4469
|
+
actions: /* @__PURE__ */ React76.createElement(React76.Fragment, null, /* @__PURE__ */ React76.createElement(DuplicateItemAction, null), /* @__PURE__ */ React76.createElement(DisableItemAction, null), /* @__PURE__ */ React76.createElement(RemoveItemAction, null))
|
|
4499
4470
|
}
|
|
4500
4471
|
)),
|
|
4501
|
-
/* @__PURE__ */
|
|
4472
|
+
/* @__PURE__ */ React76.createElement(EditItemPopover, null, /* @__PURE__ */ React76.createElement(ItemContent, null))
|
|
4502
4473
|
));
|
|
4503
4474
|
});
|
|
4504
4475
|
var ItemContent = () => {
|
|
@@ -4508,27 +4479,27 @@ var ItemContent = () => {
|
|
|
4508
4479
|
gradient: initialBackgroundGradientOverlay.value
|
|
4509
4480
|
});
|
|
4510
4481
|
const { rowRef } = useRepeaterContext();
|
|
4511
|
-
return /* @__PURE__ */
|
|
4512
|
-
|
|
4482
|
+
return /* @__PURE__ */ React76.createElement(import_ui62.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React76.createElement(import_ui62.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React76.createElement(
|
|
4483
|
+
import_ui62.Tabs,
|
|
4513
4484
|
{
|
|
4514
4485
|
size: "small",
|
|
4515
4486
|
variant: "fullWidth",
|
|
4516
4487
|
...getTabsProps(),
|
|
4517
4488
|
"aria-label": (0, import_i18n33.__)("Background Overlay", "elementor")
|
|
4518
4489
|
},
|
|
4519
|
-
/* @__PURE__ */
|
|
4520
|
-
/* @__PURE__ */
|
|
4521
|
-
/* @__PURE__ */
|
|
4522
|
-
)), /* @__PURE__ */
|
|
4490
|
+
/* @__PURE__ */ React76.createElement(import_ui62.Tab, { label: (0, import_i18n33.__)("Image", "elementor"), ...getTabProps("image") }),
|
|
4491
|
+
/* @__PURE__ */ React76.createElement(import_ui62.Tab, { label: (0, import_i18n33.__)("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
4492
|
+
/* @__PURE__ */ React76.createElement(import_ui62.Tab, { label: (0, import_i18n33.__)("Color", "elementor"), ...getTabProps("color") })
|
|
4493
|
+
)), /* @__PURE__ */ React76.createElement(import_ui62.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React76.createElement(PopoverContent, null, /* @__PURE__ */ React76.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React76.createElement(import_ui62.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React76.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React76.createElement(import_ui62.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React76.createElement(PopoverContent, null, /* @__PURE__ */ React76.createElement(ColorOverlayContent, { anchorEl: rowRef }))));
|
|
4523
4494
|
};
|
|
4524
4495
|
var ItemIcon2 = ({ value }) => {
|
|
4525
4496
|
switch (value.$$type) {
|
|
4526
4497
|
case "background-image-overlay":
|
|
4527
|
-
return /* @__PURE__ */
|
|
4498
|
+
return /* @__PURE__ */ React76.createElement(ItemIconImage, { value });
|
|
4528
4499
|
case "background-color-overlay":
|
|
4529
|
-
return /* @__PURE__ */
|
|
4500
|
+
return /* @__PURE__ */ React76.createElement(ItemIconColor, { value });
|
|
4530
4501
|
case "background-gradient-overlay":
|
|
4531
|
-
return /* @__PURE__ */
|
|
4502
|
+
return /* @__PURE__ */ React76.createElement(ItemIconGradient, { value });
|
|
4532
4503
|
default:
|
|
4533
4504
|
return null;
|
|
4534
4505
|
}
|
|
@@ -4541,12 +4512,12 @@ var extractColorFrom = (prop) => {
|
|
|
4541
4512
|
};
|
|
4542
4513
|
var ItemIconColor = ({ value: prop }) => {
|
|
4543
4514
|
const color = extractColorFrom(prop);
|
|
4544
|
-
return /* @__PURE__ */
|
|
4515
|
+
return /* @__PURE__ */ React76.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: color });
|
|
4545
4516
|
};
|
|
4546
4517
|
var ItemIconImage = ({ value }) => {
|
|
4547
4518
|
const { imageUrl } = useImage(value);
|
|
4548
|
-
return /* @__PURE__ */
|
|
4549
|
-
|
|
4519
|
+
return /* @__PURE__ */ React76.createElement(
|
|
4520
|
+
import_ui62.CardMedia,
|
|
4550
4521
|
{
|
|
4551
4522
|
image: imageUrl,
|
|
4552
4523
|
sx: (theme) => ({
|
|
@@ -4560,43 +4531,43 @@ var ItemIconImage = ({ value }) => {
|
|
|
4560
4531
|
};
|
|
4561
4532
|
var ItemIconGradient = ({ value }) => {
|
|
4562
4533
|
const gradient = getGradientValue(value);
|
|
4563
|
-
return /* @__PURE__ */
|
|
4534
|
+
return /* @__PURE__ */ React76.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: gradient });
|
|
4564
4535
|
};
|
|
4565
4536
|
var ItemLabel2 = ({ value }) => {
|
|
4566
4537
|
switch (value.$$type) {
|
|
4567
4538
|
case "background-image-overlay":
|
|
4568
|
-
return /* @__PURE__ */
|
|
4539
|
+
return /* @__PURE__ */ React76.createElement(ItemLabelImage, { value });
|
|
4569
4540
|
case "background-color-overlay":
|
|
4570
|
-
return /* @__PURE__ */
|
|
4541
|
+
return /* @__PURE__ */ React76.createElement(ItemLabelColor, { value });
|
|
4571
4542
|
case "background-gradient-overlay":
|
|
4572
|
-
return /* @__PURE__ */
|
|
4543
|
+
return /* @__PURE__ */ React76.createElement(ItemLabelGradient, { value });
|
|
4573
4544
|
default:
|
|
4574
4545
|
return null;
|
|
4575
4546
|
}
|
|
4576
4547
|
};
|
|
4577
4548
|
var ItemLabelColor = ({ value: prop }) => {
|
|
4578
4549
|
const color = extractColorFrom(prop);
|
|
4579
|
-
return /* @__PURE__ */
|
|
4550
|
+
return /* @__PURE__ */ React76.createElement("span", null, color);
|
|
4580
4551
|
};
|
|
4581
4552
|
var ItemLabelImage = ({ value }) => {
|
|
4582
4553
|
const { imageTitle } = useImage(value);
|
|
4583
|
-
return /* @__PURE__ */
|
|
4554
|
+
return /* @__PURE__ */ React76.createElement("span", null, imageTitle);
|
|
4584
4555
|
};
|
|
4585
4556
|
var ItemLabelGradient = ({ value }) => {
|
|
4586
4557
|
if (value.value.type.value === "linear") {
|
|
4587
|
-
return /* @__PURE__ */
|
|
4558
|
+
return /* @__PURE__ */ React76.createElement("span", null, (0, import_i18n33.__)("Linear Gradient", "elementor"));
|
|
4588
4559
|
}
|
|
4589
|
-
return /* @__PURE__ */
|
|
4560
|
+
return /* @__PURE__ */ React76.createElement("span", null, (0, import_i18n33.__)("Radial Gradient", "elementor"));
|
|
4590
4561
|
};
|
|
4591
4562
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
4592
4563
|
const propContext = useBoundProp(import_editor_props32.backgroundColorOverlayPropTypeUtil);
|
|
4593
|
-
return /* @__PURE__ */
|
|
4564
|
+
return /* @__PURE__ */ React76.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React76.createElement(ColorControl, { anchorEl })));
|
|
4594
4565
|
};
|
|
4595
4566
|
var ImageOverlayContent = () => {
|
|
4596
4567
|
const propContext = useBoundProp(import_editor_props32.backgroundImageOverlayPropTypeUtil);
|
|
4597
|
-
return /* @__PURE__ */
|
|
4568
|
+
return /* @__PURE__ */ React76.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React76.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React76.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React76.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React76.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React76.createElement(BackgroundImageOverlayAttachment, null)));
|
|
4598
4569
|
};
|
|
4599
|
-
var StyledUnstableColorIndicator3 = (0,
|
|
4570
|
+
var StyledUnstableColorIndicator3 = (0, import_ui62.styled)(import_ui62.UnstableColorIndicator)(({ theme }) => ({
|
|
4600
4571
|
height: "1rem",
|
|
4601
4572
|
width: "1rem",
|
|
4602
4573
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -4642,20 +4613,20 @@ var colorLabel = (0, import_i18n34.__)("Color", "elementor");
|
|
|
4642
4613
|
var clipLabel = (0, import_i18n34.__)("Clipping", "elementor");
|
|
4643
4614
|
var BackgroundControl = createControl(() => {
|
|
4644
4615
|
const propContext = useBoundProp(import_editor_props33.backgroundPropTypeUtil);
|
|
4645
|
-
return /* @__PURE__ */
|
|
4616
|
+
return /* @__PURE__ */ React77.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React77.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React77.createElement(BackgroundColorField, null), /* @__PURE__ */ React77.createElement(BackgroundClipField, null));
|
|
4646
4617
|
});
|
|
4647
4618
|
var BackgroundColorField = () => {
|
|
4648
|
-
return /* @__PURE__ */
|
|
4619
|
+
return /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React77.createElement(import_ui63.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React77.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(ControlLabel, null, colorLabel)), /* @__PURE__ */ React77.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(ColorControl, null))));
|
|
4649
4620
|
};
|
|
4650
4621
|
var BackgroundClipField = () => {
|
|
4651
|
-
return /* @__PURE__ */
|
|
4622
|
+
return /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "clip" }, /* @__PURE__ */ React77.createElement(import_ui63.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React77.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(ControlLabel, null, clipLabel)), /* @__PURE__ */ React77.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(SelectControl, { options: clipOptions }))));
|
|
4652
4623
|
};
|
|
4653
4624
|
|
|
4654
4625
|
// src/controls/repeatable-control.tsx
|
|
4655
|
-
var
|
|
4656
|
-
var
|
|
4626
|
+
var React78 = __toESM(require("react"));
|
|
4627
|
+
var import_react40 = require("react");
|
|
4657
4628
|
var import_editor_props34 = require("@elementor/editor-props");
|
|
4658
|
-
var
|
|
4629
|
+
var import_ui64 = require("@elementor/ui");
|
|
4659
4630
|
var PLACEHOLDER_REGEX = /\$\{([^}]+)\}/g;
|
|
4660
4631
|
var RepeatableControl = createControl(
|
|
4661
4632
|
({
|
|
@@ -4673,11 +4644,11 @@ var RepeatableControl = createControl(
|
|
|
4673
4644
|
if (!childPropTypeUtil) {
|
|
4674
4645
|
return null;
|
|
4675
4646
|
}
|
|
4676
|
-
const childArrayPropTypeUtil2 = (0,
|
|
4647
|
+
const childArrayPropTypeUtil2 = (0, import_react40.useMemo)(
|
|
4677
4648
|
() => (0, import_editor_props34.createArrayPropUtils)(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
|
|
4678
4649
|
[childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
|
|
4679
4650
|
);
|
|
4680
|
-
const contextValue = (0,
|
|
4651
|
+
const contextValue = (0, import_react40.useMemo)(
|
|
4681
4652
|
() => ({
|
|
4682
4653
|
...childControlConfig,
|
|
4683
4654
|
placeholder: placeholder || "",
|
|
@@ -4686,14 +4657,14 @@ var RepeatableControl = createControl(
|
|
|
4686
4657
|
[childControlConfig, placeholder, patternLabel]
|
|
4687
4658
|
);
|
|
4688
4659
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil2);
|
|
4689
|
-
return /* @__PURE__ */
|
|
4660
|
+
return /* @__PURE__ */ React78.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React78.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React78.createElement(
|
|
4690
4661
|
ControlRepeater,
|
|
4691
4662
|
{
|
|
4692
4663
|
initial: childPropTypeUtil.create(initialValues || null),
|
|
4693
4664
|
propTypeUtil: childArrayPropTypeUtil2,
|
|
4694
4665
|
isItemDisabled: isItemDisabled2
|
|
4695
4666
|
},
|
|
4696
|
-
/* @__PURE__ */
|
|
4667
|
+
/* @__PURE__ */ React78.createElement(RepeaterHeader, { label: repeaterLabel }, /* @__PURE__ */ React78.createElement(
|
|
4697
4668
|
TooltipAddItemAction,
|
|
4698
4669
|
{
|
|
4699
4670
|
...addItemTooltipProps,
|
|
@@ -4701,22 +4672,22 @@ var RepeatableControl = createControl(
|
|
|
4701
4672
|
ariaLabel: repeaterLabel
|
|
4702
4673
|
}
|
|
4703
4674
|
)),
|
|
4704
|
-
/* @__PURE__ */
|
|
4675
|
+
/* @__PURE__ */ React78.createElement(ItemsContainer, { isSortable: false }, /* @__PURE__ */ React78.createElement(
|
|
4705
4676
|
Item,
|
|
4706
4677
|
{
|
|
4707
4678
|
Icon: ItemIcon3,
|
|
4708
4679
|
Label: ItemLabel3,
|
|
4709
|
-
actions: /* @__PURE__ */
|
|
4680
|
+
actions: /* @__PURE__ */ React78.createElement(React78.Fragment, null, showDuplicate && /* @__PURE__ */ React78.createElement(DuplicateItemAction, null), showToggle && /* @__PURE__ */ React78.createElement(DisableItemAction, null), /* @__PURE__ */ React78.createElement(RemoveItemAction, null))
|
|
4710
4681
|
}
|
|
4711
4682
|
)),
|
|
4712
|
-
/* @__PURE__ */
|
|
4683
|
+
/* @__PURE__ */ React78.createElement(EditItemPopover, null, /* @__PURE__ */ React78.createElement(Content2, null))
|
|
4713
4684
|
)));
|
|
4714
4685
|
}
|
|
4715
4686
|
);
|
|
4716
|
-
var ItemIcon3 = () => /* @__PURE__ */
|
|
4687
|
+
var ItemIcon3 = () => /* @__PURE__ */ React78.createElement(React78.Fragment, null);
|
|
4717
4688
|
var Content2 = () => {
|
|
4718
4689
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
4719
|
-
return /* @__PURE__ */
|
|
4690
|
+
return /* @__PURE__ */ React78.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React78.createElement(PopoverGridContainer, null, /* @__PURE__ */ React78.createElement(ChildControl, { ...props })));
|
|
4720
4691
|
};
|
|
4721
4692
|
var interpolate = (template, data) => {
|
|
4722
4693
|
if (!data) {
|
|
@@ -4799,7 +4770,7 @@ var ItemLabel3 = ({ value }) => {
|
|
|
4799
4770
|
const label = showPlaceholder ? placeholder : interpolate(patternLabel, value);
|
|
4800
4771
|
const isReadOnly = !!childProps?.readOnly;
|
|
4801
4772
|
const color = getTextColor(isReadOnly, showPlaceholder);
|
|
4802
|
-
return /* @__PURE__ */
|
|
4773
|
+
return /* @__PURE__ */ React78.createElement(import_ui64.Box, { component: "span", color }, label);
|
|
4803
4774
|
};
|
|
4804
4775
|
var getAllProperties = (pattern) => {
|
|
4805
4776
|
const properties = pattern.match(PLACEHOLDER_REGEX)?.map((match) => match.slice(2, -1)) || [];
|
|
@@ -4807,10 +4778,10 @@ var getAllProperties = (pattern) => {
|
|
|
4807
4778
|
};
|
|
4808
4779
|
|
|
4809
4780
|
// src/controls/key-value-control.tsx
|
|
4810
|
-
var
|
|
4811
|
-
var
|
|
4781
|
+
var React79 = __toESM(require("react"));
|
|
4782
|
+
var import_react41 = require("react");
|
|
4812
4783
|
var import_editor_props35 = require("@elementor/editor-props");
|
|
4813
|
-
var
|
|
4784
|
+
var import_ui65 = require("@elementor/ui");
|
|
4814
4785
|
var import_i18n35 = require("@wordpress/i18n");
|
|
4815
4786
|
|
|
4816
4787
|
// src/utils/escape-html-attr.ts
|
|
@@ -4835,9 +4806,9 @@ var getInitialFieldValue = (fieldValue) => {
|
|
|
4835
4806
|
};
|
|
4836
4807
|
var KeyValueControl = createControl((props = {}) => {
|
|
4837
4808
|
const { value, setValue, ...propContext } = useBoundProp(import_editor_props35.keyValuePropTypeUtil);
|
|
4838
|
-
const [keyError, setKeyError] = (0,
|
|
4839
|
-
const [valueError, setValueError] = (0,
|
|
4840
|
-
const [sessionState, setSessionState] = (0,
|
|
4809
|
+
const [keyError, setKeyError] = (0, import_react41.useState)("");
|
|
4810
|
+
const [valueError, setValueError] = (0, import_react41.useState)("");
|
|
4811
|
+
const [sessionState, setSessionState] = (0, import_react41.useState)({
|
|
4841
4812
|
key: getInitialFieldValue(value?.key),
|
|
4842
4813
|
value: getInitialFieldValue(value?.value)
|
|
4843
4814
|
});
|
|
@@ -4847,7 +4818,7 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4847
4818
|
keyHelper: void 0,
|
|
4848
4819
|
valueHelper: void 0
|
|
4849
4820
|
};
|
|
4850
|
-
const [keyRegex, valueRegex, errMsg] = (0,
|
|
4821
|
+
const [keyRegex, valueRegex, errMsg] = (0, import_react41.useMemo)(
|
|
4851
4822
|
() => [
|
|
4852
4823
|
props.regexKey ? new RegExp(props.regexKey) : void 0,
|
|
4853
4824
|
props.regexValue ? new RegExp(props.regexValue) : void 0,
|
|
@@ -4900,14 +4871,14 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4900
4871
|
});
|
|
4901
4872
|
}
|
|
4902
4873
|
};
|
|
4903
|
-
return /* @__PURE__ */
|
|
4874
|
+
return /* @__PURE__ */ React79.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React79.createElement(import_ui65.Grid, { container: true, gap: 1.5 }, /* @__PURE__ */ React79.createElement(import_ui65.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React79.createElement(import_ui65.FormLabel, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React79.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React79.createElement(
|
|
4904
4875
|
TextControl,
|
|
4905
4876
|
{
|
|
4906
4877
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.key) : sessionState.key,
|
|
4907
4878
|
error: !!keyError,
|
|
4908
4879
|
helperText: keyHelper
|
|
4909
4880
|
}
|
|
4910
|
-
)), !!keyError && /* @__PURE__ */
|
|
4881
|
+
)), !!keyError && /* @__PURE__ */ React79.createElement(import_ui65.FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React79.createElement(import_ui65.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React79.createElement(import_ui65.FormLabel, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React79.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React79.createElement(
|
|
4911
4882
|
TextControl,
|
|
4912
4883
|
{
|
|
4913
4884
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.value) : sessionState.value,
|
|
@@ -4915,15 +4886,15 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4915
4886
|
inputDisabled: !!keyError,
|
|
4916
4887
|
helperText: valueHelper
|
|
4917
4888
|
}
|
|
4918
|
-
)), !!valueError && /* @__PURE__ */
|
|
4889
|
+
)), !!valueError && /* @__PURE__ */ React79.createElement(import_ui65.FormHelperText, { error: true }, valueError))));
|
|
4919
4890
|
});
|
|
4920
4891
|
|
|
4921
4892
|
// src/controls/position-control.tsx
|
|
4922
|
-
var
|
|
4893
|
+
var React80 = __toESM(require("react"));
|
|
4923
4894
|
var import_editor_props36 = require("@elementor/editor-props");
|
|
4924
|
-
var
|
|
4895
|
+
var import_editor_ui10 = require("@elementor/editor-ui");
|
|
4925
4896
|
var import_icons23 = require("@elementor/icons");
|
|
4926
|
-
var
|
|
4897
|
+
var import_ui66 = require("@elementor/ui");
|
|
4927
4898
|
var import_i18n36 = require("@wordpress/i18n");
|
|
4928
4899
|
var positionOptions = [
|
|
4929
4900
|
{ label: (0, import_i18n36.__)("Center center", "elementor"), value: "center center" },
|
|
@@ -4949,8 +4920,8 @@ var PositionControl = () => {
|
|
|
4949
4920
|
stringPropContext.setValue(value);
|
|
4950
4921
|
}
|
|
4951
4922
|
};
|
|
4952
|
-
return /* @__PURE__ */
|
|
4953
|
-
|
|
4923
|
+
return /* @__PURE__ */ React80.createElement(import_ui66.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(ControlFormLabel, null, (0, import_i18n36.__)("Object position", "elementor"))), /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React80.createElement(
|
|
4924
|
+
import_ui66.Select,
|
|
4954
4925
|
{
|
|
4955
4926
|
size: "tiny",
|
|
4956
4927
|
disabled: stringPropContext.disabled,
|
|
@@ -4958,37 +4929,37 @@ var PositionControl = () => {
|
|
|
4958
4929
|
onChange: handlePositionChange,
|
|
4959
4930
|
fullWidth: true
|
|
4960
4931
|
},
|
|
4961
|
-
positionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
4962
|
-
)))), isCustom && /* @__PURE__ */
|
|
4932
|
+
positionOptions.map(({ label, value }) => /* @__PURE__ */ React80.createElement(import_editor_ui10.MenuListItem, { key: value, value: value ?? "" }, label))
|
|
4933
|
+
)))), isCustom && /* @__PURE__ */ React80.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React80.createElement(
|
|
4963
4934
|
SizeControl,
|
|
4964
4935
|
{
|
|
4965
|
-
startIcon: /* @__PURE__ */
|
|
4936
|
+
startIcon: /* @__PURE__ */ React80.createElement(import_icons23.LetterXIcon, { fontSize: "tiny" }),
|
|
4966
4937
|
min: -Number.MAX_SAFE_INTEGER
|
|
4967
4938
|
}
|
|
4968
|
-
))), /* @__PURE__ */
|
|
4939
|
+
))), /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React80.createElement(
|
|
4969
4940
|
SizeControl,
|
|
4970
4941
|
{
|
|
4971
|
-
startIcon: /* @__PURE__ */
|
|
4942
|
+
startIcon: /* @__PURE__ */ React80.createElement(import_icons23.LetterYIcon, { fontSize: "tiny" }),
|
|
4972
4943
|
min: -Number.MAX_SAFE_INTEGER
|
|
4973
4944
|
}
|
|
4974
4945
|
)))))));
|
|
4975
4946
|
};
|
|
4976
4947
|
|
|
4977
4948
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
4978
|
-
var
|
|
4979
|
-
var
|
|
4949
|
+
var React93 = __toESM(require("react"));
|
|
4950
|
+
var import_react48 = require("react");
|
|
4980
4951
|
var import_editor_props45 = require("@elementor/editor-props");
|
|
4981
4952
|
var import_icons30 = require("@elementor/icons");
|
|
4982
|
-
var
|
|
4953
|
+
var import_ui79 = require("@elementor/ui");
|
|
4983
4954
|
var import_i18n46 = require("@wordpress/i18n");
|
|
4984
4955
|
|
|
4985
4956
|
// src/hooks/use-element-can-have-children.ts
|
|
4986
|
-
var
|
|
4957
|
+
var import_react42 = require("react");
|
|
4987
4958
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
4988
4959
|
var useElementCanHaveChildren = () => {
|
|
4989
4960
|
const { element } = (0, import_editor_elements4.useSelectedElement)();
|
|
4990
4961
|
const elementId = element?.id || "";
|
|
4991
|
-
return (0,
|
|
4962
|
+
return (0, import_react42.useMemo)(() => {
|
|
4992
4963
|
const container = (0, import_editor_elements4.getContainer)(elementId);
|
|
4993
4964
|
if (!container) {
|
|
4994
4965
|
return false;
|
|
@@ -5044,24 +5015,24 @@ var initialSkewValue = import_editor_props37.skewTransformPropTypeUtil.create({
|
|
|
5044
5015
|
});
|
|
5045
5016
|
|
|
5046
5017
|
// src/controls/transform-control/transform-content.tsx
|
|
5047
|
-
var
|
|
5048
|
-
var
|
|
5018
|
+
var React87 = __toESM(require("react"));
|
|
5019
|
+
var import_ui74 = require("@elementor/ui");
|
|
5049
5020
|
var import_i18n41 = require("@wordpress/i18n");
|
|
5050
5021
|
|
|
5051
5022
|
// src/controls/transform-control/functions/move.tsx
|
|
5052
|
-
var
|
|
5053
|
-
var
|
|
5023
|
+
var React82 = __toESM(require("react"));
|
|
5024
|
+
var import_react43 = require("react");
|
|
5054
5025
|
var import_editor_props38 = require("@elementor/editor-props");
|
|
5055
5026
|
var import_icons24 = require("@elementor/icons");
|
|
5056
|
-
var
|
|
5027
|
+
var import_ui68 = require("@elementor/ui");
|
|
5057
5028
|
var import_i18n37 = require("@wordpress/i18n");
|
|
5058
5029
|
|
|
5059
5030
|
// src/controls/transform-control/functions/axis-row.tsx
|
|
5060
|
-
var
|
|
5061
|
-
var
|
|
5031
|
+
var React81 = __toESM(require("react"));
|
|
5032
|
+
var import_ui67 = require("@elementor/ui");
|
|
5062
5033
|
var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "angle" }) => {
|
|
5063
5034
|
const safeId = label.replace(/\s+/g, "-").toLowerCase();
|
|
5064
|
-
return /* @__PURE__ */
|
|
5035
|
+
return /* @__PURE__ */ React81.createElement(import_ui67.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React81.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React81.createElement(import_ui67.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React81.createElement(ControlLabel, { htmlFor: safeId }, label)), /* @__PURE__ */ React81.createElement(import_ui67.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React81.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React81.createElement(
|
|
5065
5036
|
SizeControl,
|
|
5066
5037
|
{
|
|
5067
5038
|
anchorRef,
|
|
@@ -5079,26 +5050,26 @@ var moveAxisControls = [
|
|
|
5079
5050
|
{
|
|
5080
5051
|
label: (0, import_i18n37.__)("Move X", "elementor"),
|
|
5081
5052
|
bind: "x",
|
|
5082
|
-
startIcon: /* @__PURE__ */
|
|
5053
|
+
startIcon: /* @__PURE__ */ React82.createElement(import_icons24.ArrowRightIcon, { fontSize: "tiny" }),
|
|
5083
5054
|
units: ["px", "%", "em", "rem", "vw"]
|
|
5084
5055
|
},
|
|
5085
5056
|
{
|
|
5086
5057
|
label: (0, import_i18n37.__)("Move Y", "elementor"),
|
|
5087
5058
|
bind: "y",
|
|
5088
|
-
startIcon: /* @__PURE__ */
|
|
5059
|
+
startIcon: /* @__PURE__ */ React82.createElement(import_icons24.ArrowDownSmallIcon, { fontSize: "tiny" }),
|
|
5089
5060
|
units: ["px", "%", "em", "rem", "vh"]
|
|
5090
5061
|
},
|
|
5091
5062
|
{
|
|
5092
5063
|
label: (0, import_i18n37.__)("Move Z", "elementor"),
|
|
5093
5064
|
bind: "z",
|
|
5094
|
-
startIcon: /* @__PURE__ */
|
|
5065
|
+
startIcon: /* @__PURE__ */ React82.createElement(import_icons24.ArrowDownLeftIcon, { fontSize: "tiny" }),
|
|
5095
5066
|
units: ["px", "%", "em", "rem", "vw", "vh"]
|
|
5096
5067
|
}
|
|
5097
5068
|
];
|
|
5098
5069
|
var Move = () => {
|
|
5099
5070
|
const context = useBoundProp(import_editor_props38.moveTransformPropTypeUtil);
|
|
5100
|
-
const rowRefs = [(0,
|
|
5101
|
-
return /* @__PURE__ */
|
|
5071
|
+
const rowRefs = [(0, import_react43.useRef)(null), (0, import_react43.useRef)(null), (0, import_react43.useRef)(null)];
|
|
5072
|
+
return /* @__PURE__ */ React82.createElement(import_ui68.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React82.createElement(PropProvider, { ...context }, /* @__PURE__ */ React82.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React82.createElement(
|
|
5102
5073
|
AxisRow,
|
|
5103
5074
|
{
|
|
5104
5075
|
key: control.bind,
|
|
@@ -5111,34 +5082,34 @@ var Move = () => {
|
|
|
5111
5082
|
};
|
|
5112
5083
|
|
|
5113
5084
|
// src/controls/transform-control/functions/rotate.tsx
|
|
5114
|
-
var
|
|
5115
|
-
var
|
|
5085
|
+
var React83 = __toESM(require("react"));
|
|
5086
|
+
var import_react44 = require("react");
|
|
5116
5087
|
var import_editor_props39 = require("@elementor/editor-props");
|
|
5117
5088
|
var import_icons25 = require("@elementor/icons");
|
|
5118
|
-
var
|
|
5089
|
+
var import_ui69 = require("@elementor/ui");
|
|
5119
5090
|
var import_i18n38 = require("@wordpress/i18n");
|
|
5120
5091
|
var rotateAxisControls = [
|
|
5121
5092
|
{
|
|
5122
5093
|
label: (0, import_i18n38.__)("Rotate X", "elementor"),
|
|
5123
5094
|
bind: "x",
|
|
5124
|
-
startIcon: /* @__PURE__ */
|
|
5095
|
+
startIcon: /* @__PURE__ */ React83.createElement(import_icons25.Arrow360Icon, { fontSize: "tiny" })
|
|
5125
5096
|
},
|
|
5126
5097
|
{
|
|
5127
5098
|
label: (0, import_i18n38.__)("Rotate Y", "elementor"),
|
|
5128
5099
|
bind: "y",
|
|
5129
|
-
startIcon: /* @__PURE__ */
|
|
5100
|
+
startIcon: /* @__PURE__ */ React83.createElement(import_icons25.Arrow360Icon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
5130
5101
|
},
|
|
5131
5102
|
{
|
|
5132
5103
|
label: (0, import_i18n38.__)("Rotate Z", "elementor"),
|
|
5133
5104
|
bind: "z",
|
|
5134
|
-
startIcon: /* @__PURE__ */
|
|
5105
|
+
startIcon: /* @__PURE__ */ React83.createElement(import_icons25.RotateClockwiseIcon, { fontSize: "tiny" })
|
|
5135
5106
|
}
|
|
5136
5107
|
];
|
|
5137
5108
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
5138
5109
|
var Rotate = () => {
|
|
5139
5110
|
const context = useBoundProp(import_editor_props39.rotateTransformPropTypeUtil);
|
|
5140
|
-
const rowRefs = [(0,
|
|
5141
|
-
return /* @__PURE__ */
|
|
5111
|
+
const rowRefs = [(0, import_react44.useRef)(null), (0, import_react44.useRef)(null), (0, import_react44.useRef)(null)];
|
|
5112
|
+
return /* @__PURE__ */ React83.createElement(import_ui69.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React83.createElement(PropProvider, { ...context }, /* @__PURE__ */ React83.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React83.createElement(
|
|
5142
5113
|
AxisRow,
|
|
5143
5114
|
{
|
|
5144
5115
|
key: control.bind,
|
|
@@ -5150,18 +5121,18 @@ var Rotate = () => {
|
|
|
5150
5121
|
};
|
|
5151
5122
|
|
|
5152
5123
|
// src/controls/transform-control/functions/scale.tsx
|
|
5153
|
-
var
|
|
5154
|
-
var
|
|
5124
|
+
var React85 = __toESM(require("react"));
|
|
5125
|
+
var import_react45 = require("react");
|
|
5155
5126
|
var import_editor_props40 = require("@elementor/editor-props");
|
|
5156
5127
|
var import_icons26 = require("@elementor/icons");
|
|
5157
|
-
var
|
|
5128
|
+
var import_ui71 = require("@elementor/ui");
|
|
5158
5129
|
var import_i18n39 = require("@wordpress/i18n");
|
|
5159
5130
|
|
|
5160
5131
|
// src/controls/transform-control/functions/scale-axis-row.tsx
|
|
5161
|
-
var
|
|
5162
|
-
var
|
|
5132
|
+
var React84 = __toESM(require("react"));
|
|
5133
|
+
var import_ui70 = require("@elementor/ui");
|
|
5163
5134
|
var ScaleAxisRow = ({ label, bind, startIcon, anchorRef }) => {
|
|
5164
|
-
return /* @__PURE__ */
|
|
5135
|
+
return /* @__PURE__ */ React84.createElement(import_ui70.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React84.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React84.createElement(import_ui70.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React84.createElement(ControlLabel, null, label)), /* @__PURE__ */ React84.createElement(import_ui70.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React84.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React84.createElement(NumberControl, { step: 0.1, placeholder: "1", startIcon })))));
|
|
5165
5136
|
};
|
|
5166
5137
|
|
|
5167
5138
|
// src/controls/transform-control/functions/scale.tsx
|
|
@@ -5169,49 +5140,49 @@ var scaleAxisControls = [
|
|
|
5169
5140
|
{
|
|
5170
5141
|
label: (0, import_i18n39.__)("Scale X", "elementor"),
|
|
5171
5142
|
bind: "x",
|
|
5172
|
-
startIcon: /* @__PURE__ */
|
|
5143
|
+
startIcon: /* @__PURE__ */ React85.createElement(import_icons26.ArrowRightIcon, { fontSize: "tiny" })
|
|
5173
5144
|
},
|
|
5174
5145
|
{
|
|
5175
5146
|
label: (0, import_i18n39.__)("Scale Y", "elementor"),
|
|
5176
5147
|
bind: "y",
|
|
5177
|
-
startIcon: /* @__PURE__ */
|
|
5148
|
+
startIcon: /* @__PURE__ */ React85.createElement(import_icons26.ArrowDownSmallIcon, { fontSize: "tiny" })
|
|
5178
5149
|
},
|
|
5179
5150
|
{
|
|
5180
5151
|
label: (0, import_i18n39.__)("Scale Z", "elementor"),
|
|
5181
5152
|
bind: "z",
|
|
5182
|
-
startIcon: /* @__PURE__ */
|
|
5153
|
+
startIcon: /* @__PURE__ */ React85.createElement(import_icons26.ArrowDownLeftIcon, { fontSize: "tiny" })
|
|
5183
5154
|
}
|
|
5184
5155
|
];
|
|
5185
5156
|
var Scale = () => {
|
|
5186
5157
|
const context = useBoundProp(import_editor_props40.scaleTransformPropTypeUtil);
|
|
5187
|
-
const rowRefs = [(0,
|
|
5188
|
-
return /* @__PURE__ */
|
|
5158
|
+
const rowRefs = [(0, import_react45.useRef)(null), (0, import_react45.useRef)(null), (0, import_react45.useRef)(null)];
|
|
5159
|
+
return /* @__PURE__ */ React85.createElement(import_ui71.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React85.createElement(PropProvider, { ...context }, /* @__PURE__ */ React85.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React85.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
5189
5160
|
};
|
|
5190
5161
|
|
|
5191
5162
|
// src/controls/transform-control/functions/skew.tsx
|
|
5192
|
-
var
|
|
5193
|
-
var
|
|
5163
|
+
var React86 = __toESM(require("react"));
|
|
5164
|
+
var import_react46 = require("react");
|
|
5194
5165
|
var import_editor_props41 = require("@elementor/editor-props");
|
|
5195
5166
|
var import_icons27 = require("@elementor/icons");
|
|
5196
|
-
var
|
|
5167
|
+
var import_ui72 = require("@elementor/ui");
|
|
5197
5168
|
var import_i18n40 = require("@wordpress/i18n");
|
|
5198
5169
|
var skewAxisControls = [
|
|
5199
5170
|
{
|
|
5200
5171
|
label: (0, import_i18n40.__)("Skew X", "elementor"),
|
|
5201
5172
|
bind: "x",
|
|
5202
|
-
startIcon: /* @__PURE__ */
|
|
5173
|
+
startIcon: /* @__PURE__ */ React86.createElement(import_icons27.ArrowRightIcon, { fontSize: "tiny" })
|
|
5203
5174
|
},
|
|
5204
5175
|
{
|
|
5205
5176
|
label: (0, import_i18n40.__)("Skew Y", "elementor"),
|
|
5206
5177
|
bind: "y",
|
|
5207
|
-
startIcon: /* @__PURE__ */
|
|
5178
|
+
startIcon: /* @__PURE__ */ React86.createElement(import_icons27.ArrowLeftIcon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
5208
5179
|
}
|
|
5209
5180
|
];
|
|
5210
5181
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
5211
5182
|
var Skew = () => {
|
|
5212
5183
|
const context = useBoundProp(import_editor_props41.skewTransformPropTypeUtil);
|
|
5213
|
-
const rowRefs = [(0,
|
|
5214
|
-
return /* @__PURE__ */
|
|
5184
|
+
const rowRefs = [(0, import_react46.useRef)(null), (0, import_react46.useRef)(null), (0, import_react46.useRef)(null)];
|
|
5185
|
+
return /* @__PURE__ */ React86.createElement(import_ui72.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React86.createElement(PropProvider, { ...context }, /* @__PURE__ */ React86.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React86.createElement(
|
|
5215
5186
|
AxisRow,
|
|
5216
5187
|
{
|
|
5217
5188
|
key: control.bind,
|
|
@@ -5223,9 +5194,9 @@ var Skew = () => {
|
|
|
5223
5194
|
};
|
|
5224
5195
|
|
|
5225
5196
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
5226
|
-
var
|
|
5197
|
+
var import_react47 = require("react");
|
|
5227
5198
|
var import_editor_props42 = require("@elementor/editor-props");
|
|
5228
|
-
var
|
|
5199
|
+
var import_ui73 = require("@elementor/ui");
|
|
5229
5200
|
var useTransformTabsHistory = ({
|
|
5230
5201
|
move: initialMove,
|
|
5231
5202
|
scale: initialScale,
|
|
@@ -5249,8 +5220,8 @@ var useTransformTabsHistory = ({
|
|
|
5249
5220
|
return TransformFunctionKeys.move;
|
|
5250
5221
|
}
|
|
5251
5222
|
};
|
|
5252
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
5253
|
-
const valuesHistory = (0,
|
|
5223
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui73.useTabs)(getCurrentTransformType());
|
|
5224
|
+
const valuesHistory = (0, import_react47.useRef)({
|
|
5254
5225
|
move: initialMove,
|
|
5255
5226
|
scale: initialScale,
|
|
5256
5227
|
rotate: initialRotate,
|
|
@@ -5311,8 +5282,8 @@ var TransformContent = () => {
|
|
|
5311
5282
|
rotate: initialRotateValue.value,
|
|
5312
5283
|
skew: initialSkewValue.value
|
|
5313
5284
|
});
|
|
5314
|
-
return /* @__PURE__ */
|
|
5315
|
-
|
|
5285
|
+
return /* @__PURE__ */ React87.createElement(PopoverContent, null, /* @__PURE__ */ React87.createElement(import_ui74.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React87.createElement(import_ui74.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React87.createElement(
|
|
5286
|
+
import_ui74.Tabs,
|
|
5316
5287
|
{
|
|
5317
5288
|
size: "small",
|
|
5318
5289
|
variant: "fullWidth",
|
|
@@ -5324,34 +5295,34 @@ var TransformContent = () => {
|
|
|
5324
5295
|
...getTabsProps(),
|
|
5325
5296
|
"aria-label": (0, import_i18n41.__)("Transform", "elementor")
|
|
5326
5297
|
},
|
|
5327
|
-
/* @__PURE__ */
|
|
5328
|
-
/* @__PURE__ */
|
|
5329
|
-
/* @__PURE__ */
|
|
5330
|
-
/* @__PURE__ */
|
|
5331
|
-
)), /* @__PURE__ */
|
|
5298
|
+
/* @__PURE__ */ React87.createElement(import_ui74.Tab, { label: (0, import_i18n41.__)("Move", "elementor"), ...getTabProps(TransformFunctionKeys.move) }),
|
|
5299
|
+
/* @__PURE__ */ React87.createElement(import_ui74.Tab, { label: (0, import_i18n41.__)("Scale", "elementor"), ...getTabProps(TransformFunctionKeys.scale) }),
|
|
5300
|
+
/* @__PURE__ */ React87.createElement(import_ui74.Tab, { label: (0, import_i18n41.__)("Rotate", "elementor"), ...getTabProps(TransformFunctionKeys.rotate) }),
|
|
5301
|
+
/* @__PURE__ */ React87.createElement(import_ui74.Tab, { label: (0, import_i18n41.__)("Skew", "elementor"), ...getTabProps(TransformFunctionKeys.skew) })
|
|
5302
|
+
)), /* @__PURE__ */ React87.createElement(import_ui74.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.move) }, /* @__PURE__ */ React87.createElement(Move, null)), /* @__PURE__ */ React87.createElement(import_ui74.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.scale) }, /* @__PURE__ */ React87.createElement(Scale, null)), /* @__PURE__ */ React87.createElement(import_ui74.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.rotate) }, /* @__PURE__ */ React87.createElement(Rotate, null)), /* @__PURE__ */ React87.createElement(import_ui74.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.skew) }, /* @__PURE__ */ React87.createElement(Skew, null))));
|
|
5332
5303
|
};
|
|
5333
5304
|
|
|
5334
5305
|
// src/controls/transform-control/transform-icon.tsx
|
|
5335
|
-
var
|
|
5306
|
+
var React88 = __toESM(require("react"));
|
|
5336
5307
|
var import_icons28 = require("@elementor/icons");
|
|
5337
5308
|
var TransformIcon = ({ value }) => {
|
|
5338
5309
|
switch (value.$$type) {
|
|
5339
5310
|
case TransformFunctionKeys.move:
|
|
5340
|
-
return /* @__PURE__ */
|
|
5311
|
+
return /* @__PURE__ */ React88.createElement(import_icons28.ArrowsMaximizeIcon, { fontSize: "tiny" });
|
|
5341
5312
|
case TransformFunctionKeys.scale:
|
|
5342
|
-
return /* @__PURE__ */
|
|
5313
|
+
return /* @__PURE__ */ React88.createElement(import_icons28.ArrowAutofitHeightIcon, { fontSize: "tiny" });
|
|
5343
5314
|
case TransformFunctionKeys.rotate:
|
|
5344
|
-
return /* @__PURE__ */
|
|
5315
|
+
return /* @__PURE__ */ React88.createElement(import_icons28.RotateClockwise2Icon, { fontSize: "tiny" });
|
|
5345
5316
|
case TransformFunctionKeys.skew:
|
|
5346
|
-
return /* @__PURE__ */
|
|
5317
|
+
return /* @__PURE__ */ React88.createElement(import_icons28.SkewXIcon, { fontSize: "tiny" });
|
|
5347
5318
|
default:
|
|
5348
5319
|
return null;
|
|
5349
5320
|
}
|
|
5350
5321
|
};
|
|
5351
5322
|
|
|
5352
5323
|
// src/controls/transform-control/transform-label.tsx
|
|
5353
|
-
var
|
|
5354
|
-
var
|
|
5324
|
+
var React89 = __toESM(require("react"));
|
|
5325
|
+
var import_ui75 = require("@elementor/ui");
|
|
5355
5326
|
var import_i18n42 = require("@wordpress/i18n");
|
|
5356
5327
|
var orderedAxis = ["x", "y", "z"];
|
|
5357
5328
|
var formatLabel = (value, functionType) => {
|
|
@@ -5370,32 +5341,32 @@ var TransformLabel = (props) => {
|
|
|
5370
5341
|
const { $$type, value } = props.value;
|
|
5371
5342
|
switch ($$type) {
|
|
5372
5343
|
case TransformFunctionKeys.move:
|
|
5373
|
-
return /* @__PURE__ */
|
|
5344
|
+
return /* @__PURE__ */ React89.createElement(Label2, { label: (0, import_i18n42.__)("Move", "elementor"), value: formatLabel(value, "move") });
|
|
5374
5345
|
case TransformFunctionKeys.scale:
|
|
5375
|
-
return /* @__PURE__ */
|
|
5346
|
+
return /* @__PURE__ */ React89.createElement(Label2, { label: (0, import_i18n42.__)("Scale", "elementor"), value: formatLabel(value, "scale") });
|
|
5376
5347
|
case TransformFunctionKeys.rotate:
|
|
5377
|
-
return /* @__PURE__ */
|
|
5348
|
+
return /* @__PURE__ */ React89.createElement(Label2, { label: (0, import_i18n42.__)("Rotate", "elementor"), value: formatLabel(value, "rotate") });
|
|
5378
5349
|
case TransformFunctionKeys.skew:
|
|
5379
|
-
return /* @__PURE__ */
|
|
5350
|
+
return /* @__PURE__ */ React89.createElement(Label2, { label: (0, import_i18n42.__)("Skew", "elementor"), value: formatLabel(value, "skew") });
|
|
5380
5351
|
default:
|
|
5381
5352
|
return "";
|
|
5382
5353
|
}
|
|
5383
5354
|
};
|
|
5384
5355
|
var Label2 = ({ label, value }) => {
|
|
5385
|
-
return /* @__PURE__ */
|
|
5356
|
+
return /* @__PURE__ */ React89.createElement(import_ui75.Box, { component: "span" }, label, ": ", value);
|
|
5386
5357
|
};
|
|
5387
5358
|
|
|
5388
5359
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
5389
|
-
var
|
|
5390
|
-
var
|
|
5360
|
+
var React92 = __toESM(require("react"));
|
|
5361
|
+
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
5391
5362
|
var import_icons29 = require("@elementor/icons");
|
|
5392
|
-
var
|
|
5363
|
+
var import_ui78 = require("@elementor/ui");
|
|
5393
5364
|
var import_i18n45 = require("@wordpress/i18n");
|
|
5394
5365
|
|
|
5395
5366
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
5396
|
-
var
|
|
5367
|
+
var React90 = __toESM(require("react"));
|
|
5397
5368
|
var import_editor_props43 = require("@elementor/editor-props");
|
|
5398
|
-
var
|
|
5369
|
+
var import_ui76 = require("@elementor/ui");
|
|
5399
5370
|
var import_i18n43 = require("@wordpress/i18n");
|
|
5400
5371
|
var ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
5401
5372
|
var PERSPECTIVE_CONTROL_FIELD = {
|
|
@@ -5416,23 +5387,23 @@ var CHILDREN_PERSPECTIVE_FIELDS = [
|
|
|
5416
5387
|
}
|
|
5417
5388
|
];
|
|
5418
5389
|
var ChildrenPerspectiveControl = () => {
|
|
5419
|
-
return /* @__PURE__ */
|
|
5390
|
+
return /* @__PURE__ */ React90.createElement(import_ui76.Stack, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React90.createElement(ControlFormLabel, null, (0, import_i18n43.__)("Children perspective", "elementor")), /* @__PURE__ */ React90.createElement(PerspectiveControl, null), /* @__PURE__ */ React90.createElement(PerspectiveOriginControl, null));
|
|
5420
5391
|
};
|
|
5421
|
-
var PerspectiveControl = () => /* @__PURE__ */
|
|
5422
|
-
var PerspectiveOriginControl = () => /* @__PURE__ */
|
|
5392
|
+
var PerspectiveControl = () => /* @__PURE__ */ React90.createElement(PropKeyProvider, { bind: "perspective" }, /* @__PURE__ */ React90.createElement(ControlFields, { control: PERSPECTIVE_CONTROL_FIELD, key: PERSPECTIVE_CONTROL_FIELD.bind }));
|
|
5393
|
+
var PerspectiveOriginControl = () => /* @__PURE__ */ React90.createElement(PropKeyProvider, { bind: "perspective-origin" }, /* @__PURE__ */ React90.createElement(PerspectiveOriginControlProvider, null));
|
|
5423
5394
|
var PerspectiveOriginControlProvider = () => {
|
|
5424
5395
|
const context = useBoundProp(import_editor_props43.perspectiveOriginPropTypeUtil);
|
|
5425
|
-
return /* @__PURE__ */
|
|
5396
|
+
return /* @__PURE__ */ React90.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React90.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React90.createElement(ControlFields, { control }))));
|
|
5426
5397
|
};
|
|
5427
5398
|
var ControlFields = ({ control }) => {
|
|
5428
|
-
const rowRef =
|
|
5429
|
-
return /* @__PURE__ */
|
|
5399
|
+
const rowRef = React90.useRef(null);
|
|
5400
|
+
return /* @__PURE__ */ React90.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React90.createElement(import_ui76.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React90.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React90.createElement(import_ui76.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React90.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
|
|
5430
5401
|
};
|
|
5431
5402
|
|
|
5432
5403
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
5433
|
-
var
|
|
5404
|
+
var React91 = __toESM(require("react"));
|
|
5434
5405
|
var import_editor_props44 = require("@elementor/editor-props");
|
|
5435
|
-
var
|
|
5406
|
+
var import_ui77 = require("@elementor/ui");
|
|
5436
5407
|
var import_i18n44 = require("@wordpress/i18n");
|
|
5437
5408
|
var TRANSFORM_ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
5438
5409
|
var TRANSFORM_ORIGIN_UNITS_Z_AXIS = TRANSFORM_ORIGIN_UNITS.filter((unit) => unit !== "%");
|
|
@@ -5454,12 +5425,12 @@ var TRANSFORM_ORIGIN_FIELDS = [
|
|
|
5454
5425
|
}
|
|
5455
5426
|
];
|
|
5456
5427
|
var TransformOriginControl = () => {
|
|
5457
|
-
return /* @__PURE__ */
|
|
5428
|
+
return /* @__PURE__ */ React91.createElement(import_ui77.Stack, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, (0, import_i18n44.__)("Transform", "elementor")), TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React91.createElement(ControlFields2, { control, key: control.bind })));
|
|
5458
5429
|
};
|
|
5459
5430
|
var ControlFields2 = ({ control }) => {
|
|
5460
5431
|
const context = useBoundProp(import_editor_props44.transformOriginPropTypeUtil);
|
|
5461
|
-
const rowRef =
|
|
5462
|
-
return /* @__PURE__ */
|
|
5432
|
+
const rowRef = React91.useRef(null);
|
|
5433
|
+
return /* @__PURE__ */ React91.createElement(PropProvider, { ...context }, /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React91.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React91.createElement(import_ui77.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React91.createElement(import_ui77.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })))));
|
|
5463
5434
|
};
|
|
5464
5435
|
|
|
5465
5436
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
@@ -5469,12 +5440,12 @@ var TransformSettingsControl = ({
|
|
|
5469
5440
|
anchorRef,
|
|
5470
5441
|
showChildrenPerspective
|
|
5471
5442
|
}) => {
|
|
5472
|
-
const popupProps = (0,
|
|
5443
|
+
const popupProps = (0, import_ui78.bindPopover)({
|
|
5473
5444
|
...popupState,
|
|
5474
5445
|
anchorEl: anchorRef.current ?? void 0
|
|
5475
5446
|
});
|
|
5476
|
-
return /* @__PURE__ */
|
|
5477
|
-
|
|
5447
|
+
return /* @__PURE__ */ React92.createElement(
|
|
5448
|
+
import_ui78.Popover,
|
|
5478
5449
|
{
|
|
5479
5450
|
disablePortal: true,
|
|
5480
5451
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
@@ -5488,16 +5459,16 @@ var TransformSettingsControl = ({
|
|
|
5488
5459
|
},
|
|
5489
5460
|
...popupProps
|
|
5490
5461
|
},
|
|
5491
|
-
/* @__PURE__ */
|
|
5492
|
-
|
|
5462
|
+
/* @__PURE__ */ React92.createElement(
|
|
5463
|
+
import_editor_ui11.PopoverHeader,
|
|
5493
5464
|
{
|
|
5494
5465
|
title: (0, import_i18n45.__)("Transform settings", "elementor"),
|
|
5495
5466
|
onClose: popupState.close,
|
|
5496
|
-
icon: /* @__PURE__ */
|
|
5467
|
+
icon: /* @__PURE__ */ React92.createElement(import_icons29.AdjustmentsIcon, { fontSize: SIZE7 })
|
|
5497
5468
|
}
|
|
5498
5469
|
),
|
|
5499
|
-
/* @__PURE__ */
|
|
5500
|
-
/* @__PURE__ */
|
|
5470
|
+
/* @__PURE__ */ React92.createElement(import_ui78.Divider, null),
|
|
5471
|
+
/* @__PURE__ */ React92.createElement(PopoverContent, { sx: { px: 2, py: 1.5 } }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "transform-origin" }, /* @__PURE__ */ React92.createElement(TransformOriginControl, null)), showChildrenPerspective && /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(import_ui78.Box, { sx: { my: 0.5 } }, /* @__PURE__ */ React92.createElement(import_ui78.Divider, null)), /* @__PURE__ */ React92.createElement(ChildrenPerspectiveControl, null)))
|
|
5501
5472
|
);
|
|
5502
5473
|
};
|
|
5503
5474
|
|
|
@@ -5505,27 +5476,27 @@ var TransformSettingsControl = ({
|
|
|
5505
5476
|
var SIZE8 = "tiny";
|
|
5506
5477
|
var TransformRepeaterControl = createControl(() => {
|
|
5507
5478
|
const context = useBoundProp(import_editor_props45.transformPropTypeUtil);
|
|
5508
|
-
const headerRef = (0,
|
|
5509
|
-
const popupState = (0,
|
|
5479
|
+
const headerRef = (0, import_react48.useRef)(null);
|
|
5480
|
+
const popupState = (0, import_ui79.usePopupState)({ variant: "popover" });
|
|
5510
5481
|
const showChildrenPerspective = useElementCanHaveChildren();
|
|
5511
|
-
return /* @__PURE__ */
|
|
5482
|
+
return /* @__PURE__ */ React93.createElement(PropProvider, { ...context }, /* @__PURE__ */ React93.createElement(
|
|
5512
5483
|
TransformSettingsControl,
|
|
5513
5484
|
{
|
|
5514
5485
|
popupState,
|
|
5515
5486
|
anchorRef: headerRef,
|
|
5516
5487
|
showChildrenPerspective
|
|
5517
5488
|
}
|
|
5518
|
-
), /* @__PURE__ */
|
|
5489
|
+
), /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React93.createElement(Repeater2, { headerRef, propType: context.propType, popupState })));
|
|
5519
5490
|
});
|
|
5520
|
-
var ToolTip = /* @__PURE__ */
|
|
5521
|
-
|
|
5491
|
+
var ToolTip = /* @__PURE__ */ React93.createElement(
|
|
5492
|
+
import_ui79.Box,
|
|
5522
5493
|
{
|
|
5523
5494
|
component: "span",
|
|
5524
5495
|
"aria-label": void 0,
|
|
5525
5496
|
sx: { display: "flex", gap: 0.5, p: 2, width: 320, borderRadius: 1 }
|
|
5526
5497
|
},
|
|
5527
|
-
/* @__PURE__ */
|
|
5528
|
-
/* @__PURE__ */
|
|
5498
|
+
/* @__PURE__ */ React93.createElement(import_icons30.InfoCircleFilledIcon, { sx: { color: "secondary.main" } }),
|
|
5499
|
+
/* @__PURE__ */ React93.createElement(import_ui79.Typography, { variant: "body2", color: "text.secondary", fontSize: "14px" }, (0, import_i18n46.__)("You can use each kind of transform only once per element.", "elementor"))
|
|
5529
5500
|
);
|
|
5530
5501
|
var Repeater2 = ({
|
|
5531
5502
|
headerRef,
|
|
@@ -5539,21 +5510,21 @@ var Repeater2 = ({
|
|
|
5539
5510
|
return availableValues.find((value) => !transformValues?.some((item) => item.$$type === value.$$type));
|
|
5540
5511
|
};
|
|
5541
5512
|
const shouldDisableAddItem = !getInitialValue2();
|
|
5542
|
-
return /* @__PURE__ */
|
|
5513
|
+
return /* @__PURE__ */ React93.createElement(PropProvider, { ...transformFunctionsContext }, /* @__PURE__ */ React93.createElement(
|
|
5543
5514
|
ControlRepeater,
|
|
5544
5515
|
{
|
|
5545
5516
|
initial: getInitialValue2() ?? initialTransformValue,
|
|
5546
5517
|
propTypeUtil: import_editor_props45.transformFunctionsPropTypeUtil
|
|
5547
5518
|
},
|
|
5548
|
-
/* @__PURE__ */
|
|
5519
|
+
/* @__PURE__ */ React93.createElement(
|
|
5549
5520
|
RepeaterHeader,
|
|
5550
5521
|
{
|
|
5551
5522
|
label: (0, import_i18n46.__)("Transform", "elementor"),
|
|
5552
|
-
adornment: () => /* @__PURE__ */
|
|
5523
|
+
adornment: () => /* @__PURE__ */ React93.createElement(ControlAdornments, { customContext: { path: ["transform"], propType } }),
|
|
5553
5524
|
ref: headerRef
|
|
5554
5525
|
},
|
|
5555
|
-
/* @__PURE__ */
|
|
5556
|
-
/* @__PURE__ */
|
|
5526
|
+
/* @__PURE__ */ React93.createElement(TransformBasePopoverTrigger, { popupState, repeaterBindKey: bind }),
|
|
5527
|
+
/* @__PURE__ */ React93.createElement(
|
|
5557
5528
|
TooltipAddItemAction,
|
|
5558
5529
|
{
|
|
5559
5530
|
disabled: shouldDisableAddItem,
|
|
@@ -5563,15 +5534,15 @@ var Repeater2 = ({
|
|
|
5563
5534
|
}
|
|
5564
5535
|
)
|
|
5565
5536
|
),
|
|
5566
|
-
/* @__PURE__ */
|
|
5537
|
+
/* @__PURE__ */ React93.createElement(ItemsContainer, null, /* @__PURE__ */ React93.createElement(
|
|
5567
5538
|
Item,
|
|
5568
5539
|
{
|
|
5569
5540
|
Icon: TransformIcon,
|
|
5570
5541
|
Label: TransformLabel,
|
|
5571
|
-
actions: /* @__PURE__ */
|
|
5542
|
+
actions: /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DisableItemAction, null), /* @__PURE__ */ React93.createElement(RemoveItemAction, null))
|
|
5572
5543
|
}
|
|
5573
5544
|
)),
|
|
5574
|
-
/* @__PURE__ */
|
|
5545
|
+
/* @__PURE__ */ React93.createElement(EditItemPopover, null, /* @__PURE__ */ React93.createElement(TransformContent, null))
|
|
5575
5546
|
));
|
|
5576
5547
|
};
|
|
5577
5548
|
var TransformBasePopoverTrigger = ({
|
|
@@ -5580,28 +5551,28 @@ var TransformBasePopoverTrigger = ({
|
|
|
5580
5551
|
}) => {
|
|
5581
5552
|
const { bind } = useBoundProp();
|
|
5582
5553
|
const titleLabel = (0, import_i18n46.__)("Transform settings", "elementor");
|
|
5583
|
-
return bind !== repeaterBindKey ? null : /* @__PURE__ */
|
|
5554
|
+
return bind !== repeaterBindKey ? null : /* @__PURE__ */ React93.createElement(import_ui79.Tooltip, { title: titleLabel, placement: "top" }, /* @__PURE__ */ React93.createElement(import_ui79.IconButton, { size: SIZE8, "aria-label": titleLabel, ...(0, import_ui79.bindTrigger)(popupState) }, /* @__PURE__ */ React93.createElement(import_icons30.AdjustmentsIcon, { fontSize: SIZE8 })));
|
|
5584
5555
|
};
|
|
5585
5556
|
|
|
5586
5557
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
5587
|
-
var
|
|
5588
|
-
var
|
|
5558
|
+
var React96 = __toESM(require("react"));
|
|
5559
|
+
var import_react51 = require("react");
|
|
5589
5560
|
var import_editor_props48 = require("@elementor/editor-props");
|
|
5590
5561
|
var import_icons32 = require("@elementor/icons");
|
|
5591
|
-
var
|
|
5562
|
+
var import_ui82 = require("@elementor/ui");
|
|
5592
5563
|
var import_i18n49 = require("@wordpress/i18n");
|
|
5593
5564
|
|
|
5594
5565
|
// src/controls/selection-size-control.tsx
|
|
5595
|
-
var
|
|
5596
|
-
var
|
|
5566
|
+
var React94 = __toESM(require("react"));
|
|
5567
|
+
var import_react49 = require("react");
|
|
5597
5568
|
var import_editor_props46 = require("@elementor/editor-props");
|
|
5598
|
-
var
|
|
5569
|
+
var import_ui80 = require("@elementor/ui");
|
|
5599
5570
|
var SelectionSizeControl = createControl(
|
|
5600
5571
|
({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
|
|
5601
5572
|
const { value, setValue, propType } = useBoundProp(import_editor_props46.selectionSizePropTypeUtil);
|
|
5602
|
-
const rowRef = (0,
|
|
5573
|
+
const rowRef = (0, import_react49.useRef)(null);
|
|
5603
5574
|
const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
|
|
5604
|
-
const currentSizeConfig = (0,
|
|
5575
|
+
const currentSizeConfig = (0, import_react49.useMemo)(() => {
|
|
5605
5576
|
switch (value.selection.$$type) {
|
|
5606
5577
|
case "key-value":
|
|
5607
5578
|
return sizeConfigMap[value?.selection?.value.value.value || ""];
|
|
@@ -5612,7 +5583,7 @@ var SelectionSizeControl = createControl(
|
|
|
5612
5583
|
}
|
|
5613
5584
|
}, [value, sizeConfigMap]);
|
|
5614
5585
|
const SelectionComponent = selectionConfig.component;
|
|
5615
|
-
return /* @__PURE__ */
|
|
5586
|
+
return /* @__PURE__ */ React94.createElement(PropProvider, { value, setValue, propType }, /* @__PURE__ */ React94.createElement(import_ui80.Grid, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React94.createElement(import_ui80.Grid, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React94.createElement(ControlFormLabel, null, selectionLabel)), /* @__PURE__ */ React94.createElement(import_ui80.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: "selection" }, /* @__PURE__ */ React94.createElement(SelectionComponent, { ...selectionConfig.props }))), currentSizeConfig && /* @__PURE__ */ React94.createElement(React94.Fragment, null, /* @__PURE__ */ React94.createElement(import_ui80.Grid, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React94.createElement(ControlFormLabel, { htmlFor: sizeFieldId }, sizeLabel)), /* @__PURE__ */ React94.createElement(import_ui80.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React94.createElement(
|
|
5616
5587
|
SizeControl,
|
|
5617
5588
|
{
|
|
5618
5589
|
anchorRef: rowRef,
|
|
@@ -5814,12 +5785,12 @@ function subscribeToTransitionEvent() {
|
|
|
5814
5785
|
}
|
|
5815
5786
|
|
|
5816
5787
|
// src/controls/transition-control/transition-selector.tsx
|
|
5817
|
-
var
|
|
5818
|
-
var
|
|
5788
|
+
var React95 = __toESM(require("react"));
|
|
5789
|
+
var import_react50 = require("react");
|
|
5819
5790
|
var import_editor_props47 = require("@elementor/editor-props");
|
|
5820
|
-
var
|
|
5791
|
+
var import_editor_ui12 = require("@elementor/editor-ui");
|
|
5821
5792
|
var import_icons31 = require("@elementor/icons");
|
|
5822
|
-
var
|
|
5793
|
+
var import_ui81 = require("@elementor/ui");
|
|
5823
5794
|
var import_i18n48 = require("@wordpress/i18n");
|
|
5824
5795
|
var toTransitionSelectorValue = (label) => {
|
|
5825
5796
|
for (const category of transitionProperties) {
|
|
@@ -5861,9 +5832,9 @@ var TransitionSelector = ({
|
|
|
5861
5832
|
const {
|
|
5862
5833
|
key: { value: transitionLabel }
|
|
5863
5834
|
} = value;
|
|
5864
|
-
const defaultRef = (0,
|
|
5865
|
-
const popoverState = (0,
|
|
5866
|
-
const disabledCategories = (0,
|
|
5835
|
+
const defaultRef = (0, import_react50.useRef)(null);
|
|
5836
|
+
const popoverState = (0, import_ui81.usePopupState)({ variant: "popover" });
|
|
5837
|
+
const disabledCategories = (0, import_react50.useMemo)(() => {
|
|
5867
5838
|
return new Set(
|
|
5868
5839
|
transitionProperties.filter((cat) => cat.properties.some((prop) => prop.isDisabled)).map((cat) => cat.label)
|
|
5869
5840
|
);
|
|
@@ -5907,27 +5878,27 @@ var TransitionSelector = ({
|
|
|
5907
5878
|
left: rect.right + 36
|
|
5908
5879
|
};
|
|
5909
5880
|
};
|
|
5910
|
-
return /* @__PURE__ */
|
|
5911
|
-
|
|
5881
|
+
return /* @__PURE__ */ React95.createElement(import_ui81.Box, { ref: defaultRef }, /* @__PURE__ */ React95.createElement(ControlActions, null, /* @__PURE__ */ React95.createElement(
|
|
5882
|
+
import_ui81.UnstableTag,
|
|
5912
5883
|
{
|
|
5913
5884
|
variant: "outlined",
|
|
5914
5885
|
label: transitionLabel,
|
|
5915
|
-
endIcon: /* @__PURE__ */
|
|
5916
|
-
...(0,
|
|
5886
|
+
endIcon: /* @__PURE__ */ React95.createElement(import_icons31.ChevronDownIcon, { fontSize: "tiny" }),
|
|
5887
|
+
...(0, import_ui81.bindTrigger)(popoverState),
|
|
5917
5888
|
fullWidth: true
|
|
5918
5889
|
}
|
|
5919
|
-
)), /* @__PURE__ */
|
|
5920
|
-
|
|
5890
|
+
)), /* @__PURE__ */ React95.createElement(
|
|
5891
|
+
import_ui81.Popover,
|
|
5921
5892
|
{
|
|
5922
5893
|
disablePortal: true,
|
|
5923
5894
|
disableScrollLock: true,
|
|
5924
|
-
...(0,
|
|
5895
|
+
...(0, import_ui81.bindPopover)(popoverState),
|
|
5925
5896
|
anchorReference: "anchorPosition",
|
|
5926
5897
|
anchorPosition: getAnchorPosition(),
|
|
5927
5898
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
5928
5899
|
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
5929
5900
|
},
|
|
5930
|
-
/* @__PURE__ */
|
|
5901
|
+
/* @__PURE__ */ React95.createElement(
|
|
5931
5902
|
ItemSelector,
|
|
5932
5903
|
{
|
|
5933
5904
|
itemsList: getItemList(),
|
|
@@ -5938,8 +5909,8 @@ var TransitionSelector = ({
|
|
|
5938
5909
|
title: (0, import_i18n48.__)("Transition Property", "elementor"),
|
|
5939
5910
|
icon: import_icons31.VariationsIcon,
|
|
5940
5911
|
disabledItems: includeCurrentValueInOptions(value, disabledItems),
|
|
5941
|
-
categoryItemContentTemplate: (item) => /* @__PURE__ */
|
|
5942
|
-
|
|
5912
|
+
categoryItemContentTemplate: (item) => /* @__PURE__ */ React95.createElement(
|
|
5913
|
+
import_ui81.Box,
|
|
5943
5914
|
{
|
|
5944
5915
|
sx: {
|
|
5945
5916
|
display: "flex",
|
|
@@ -5948,11 +5919,11 @@ var TransitionSelector = ({
|
|
|
5948
5919
|
width: "100%"
|
|
5949
5920
|
}
|
|
5950
5921
|
},
|
|
5951
|
-
/* @__PURE__ */
|
|
5952
|
-
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */
|
|
5922
|
+
/* @__PURE__ */ React95.createElement("span", null, item.value),
|
|
5923
|
+
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */ React95.createElement(import_editor_ui12.PromotionChip, null)
|
|
5953
5924
|
),
|
|
5954
|
-
footer: showPromotion ? /* @__PURE__ */
|
|
5955
|
-
|
|
5925
|
+
footer: showPromotion ? /* @__PURE__ */ React95.createElement(
|
|
5926
|
+
import_ui81.Alert,
|
|
5956
5927
|
{
|
|
5957
5928
|
variant: "standard",
|
|
5958
5929
|
color: "promotion",
|
|
@@ -5963,8 +5934,8 @@ var TransitionSelector = ({
|
|
|
5963
5934
|
sx: { m: 1.5, mt: 0 }
|
|
5964
5935
|
},
|
|
5965
5936
|
(0, import_i18n48.__)("Upgrade to customize transition properties and control effects.", "elementor"),
|
|
5966
|
-
/* @__PURE__ */
|
|
5967
|
-
|
|
5937
|
+
/* @__PURE__ */ React95.createElement(
|
|
5938
|
+
import_ui81.Box,
|
|
5968
5939
|
{
|
|
5969
5940
|
component: "a",
|
|
5970
5941
|
href: PRO_UPGRADE_URL,
|
|
@@ -5977,7 +5948,7 @@ var TransitionSelector = ({
|
|
|
5977
5948
|
color: "promotion.main"
|
|
5978
5949
|
}
|
|
5979
5950
|
},
|
|
5980
|
-
/* @__PURE__ */
|
|
5951
|
+
/* @__PURE__ */ React95.createElement(import_icons31.CrownFilledIcon, { fontSize: "tiny" }),
|
|
5981
5952
|
(0, import_i18n48.__)("Upgrade now", "elementor")
|
|
5982
5953
|
)
|
|
5983
5954
|
) : null
|
|
@@ -6086,18 +6057,18 @@ var getInitialValue = (values = []) => {
|
|
|
6086
6057
|
}
|
|
6087
6058
|
return initialTransitionValue;
|
|
6088
6059
|
};
|
|
6089
|
-
var disableAddItemTooltipContent = /* @__PURE__ */
|
|
6090
|
-
|
|
6060
|
+
var disableAddItemTooltipContent = /* @__PURE__ */ React96.createElement(
|
|
6061
|
+
import_ui82.Alert,
|
|
6091
6062
|
{
|
|
6092
6063
|
sx: {
|
|
6093
6064
|
width: 280,
|
|
6094
6065
|
gap: 0.5
|
|
6095
6066
|
},
|
|
6096
6067
|
color: "secondary",
|
|
6097
|
-
icon: /* @__PURE__ */
|
|
6068
|
+
icon: /* @__PURE__ */ React96.createElement(import_icons32.InfoCircleFilledIcon, null)
|
|
6098
6069
|
},
|
|
6099
|
-
/* @__PURE__ */
|
|
6100
|
-
/* @__PURE__ */
|
|
6070
|
+
/* @__PURE__ */ React96.createElement(import_ui82.AlertTitle, null, (0, import_i18n49.__)("Transitions", "elementor")),
|
|
6071
|
+
/* @__PURE__ */ React96.createElement(import_ui82.Box, { component: "span" }, /* @__PURE__ */ React96.createElement(import_ui82.Typography, { variant: "body2" }, (0, import_i18n49.__)("Switch to 'Normal' state to add a transition.", "elementor")))
|
|
6101
6072
|
);
|
|
6102
6073
|
var TransitionRepeaterControl = createControl(
|
|
6103
6074
|
({
|
|
@@ -6105,20 +6076,20 @@ var TransitionRepeaterControl = createControl(
|
|
|
6105
6076
|
currentStyleState
|
|
6106
6077
|
}) => {
|
|
6107
6078
|
const currentStyleIsNormal = currentStyleState === null;
|
|
6108
|
-
const [recentlyUsedList, setRecentlyUsedList] = (0,
|
|
6079
|
+
const [recentlyUsedList, setRecentlyUsedList] = (0, import_react51.useState)([]);
|
|
6109
6080
|
const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
6110
|
-
const { allDisabled: disabledItems, proDisabled: proDisabledItems } = (0,
|
|
6081
|
+
const { allDisabled: disabledItems, proDisabled: proDisabledItems } = (0, import_react51.useMemo)(
|
|
6111
6082
|
() => getDisabledItemLabels(value),
|
|
6112
6083
|
[value]
|
|
6113
6084
|
);
|
|
6114
|
-
const allowedTransitionSet = (0,
|
|
6085
|
+
const allowedTransitionSet = (0, import_react51.useMemo)(() => {
|
|
6115
6086
|
const set = /* @__PURE__ */ new Set();
|
|
6116
6087
|
transitionProperties.forEach((category) => {
|
|
6117
6088
|
category.properties.forEach((prop) => set.add(prop.value));
|
|
6118
6089
|
});
|
|
6119
6090
|
return set;
|
|
6120
6091
|
}, []);
|
|
6121
|
-
(0,
|
|
6092
|
+
(0, import_react51.useEffect)(() => {
|
|
6122
6093
|
if (!value || value.length === 0) {
|
|
6123
6094
|
return;
|
|
6124
6095
|
}
|
|
@@ -6130,12 +6101,12 @@ var TransitionRepeaterControl = createControl(
|
|
|
6130
6101
|
setValue(sanitized);
|
|
6131
6102
|
}
|
|
6132
6103
|
}, [allowedTransitionSet]);
|
|
6133
|
-
(0,
|
|
6104
|
+
(0, import_react51.useEffect)(() => {
|
|
6134
6105
|
recentlyUsedListGetter().then(setRecentlyUsedList);
|
|
6135
6106
|
}, [recentlyUsedListGetter]);
|
|
6136
|
-
const allPropertiesUsed = (0,
|
|
6107
|
+
const allPropertiesUsed = (0, import_react51.useMemo)(() => areAllPropertiesUsed(value), [value]);
|
|
6137
6108
|
const isAddItemDisabled = !currentStyleIsNormal || allPropertiesUsed;
|
|
6138
|
-
return /* @__PURE__ */
|
|
6109
|
+
return /* @__PURE__ */ React96.createElement(
|
|
6139
6110
|
RepeatableControl,
|
|
6140
6111
|
{
|
|
6141
6112
|
label: (0, import_i18n49.__)("Transitions", "elementor"),
|
|
@@ -6162,11 +6133,11 @@ var TransitionRepeaterControl = createControl(
|
|
|
6162
6133
|
);
|
|
6163
6134
|
|
|
6164
6135
|
// src/controls/date-time-control.tsx
|
|
6165
|
-
var
|
|
6136
|
+
var React97 = __toESM(require("react"));
|
|
6166
6137
|
var dayjs = __toESM(require("dayjs"));
|
|
6167
6138
|
var import_editor_props49 = require("@elementor/editor-props");
|
|
6168
6139
|
var import_editor_props50 = require("@elementor/editor-props");
|
|
6169
|
-
var
|
|
6140
|
+
var import_ui83 = require("@elementor/ui");
|
|
6170
6141
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
6171
6142
|
var TIME_FORMAT = "HH:mm";
|
|
6172
6143
|
var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
@@ -6210,8 +6181,8 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
6210
6181
|
const base = dayjs.default();
|
|
6211
6182
|
return base.hour(h).minute(m).second(0).millisecond(0);
|
|
6212
6183
|
};
|
|
6213
|
-
return /* @__PURE__ */
|
|
6214
|
-
|
|
6184
|
+
return /* @__PURE__ */ React97.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React97.createElement(ControlActions, null, /* @__PURE__ */ React97.createElement(import_ui83.LocalizationProvider, null, /* @__PURE__ */ React97.createElement(import_ui83.Box, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React97.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React97.createElement(
|
|
6185
|
+
import_ui83.DatePicker,
|
|
6215
6186
|
{
|
|
6216
6187
|
value: parseDateValue(import_editor_props49.stringPropTypeUtil.extract(value?.date)),
|
|
6217
6188
|
onChange: (v) => handleChange({ date: v }, { bind: "date" }),
|
|
@@ -6222,8 +6193,8 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
6222
6193
|
openPickerIcon: { fontSize: "tiny" }
|
|
6223
6194
|
}
|
|
6224
6195
|
}
|
|
6225
|
-
)), /* @__PURE__ */
|
|
6226
|
-
|
|
6196
|
+
)), /* @__PURE__ */ React97.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React97.createElement(
|
|
6197
|
+
import_ui83.TimePicker,
|
|
6227
6198
|
{
|
|
6228
6199
|
value: parseTimeValue(import_editor_props49.stringPropTypeUtil.extract(value?.time)),
|
|
6229
6200
|
onChange: (v) => handleChange({ time: v }, { bind: "time" }),
|
|
@@ -6238,14 +6209,14 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
6238
6209
|
});
|
|
6239
6210
|
|
|
6240
6211
|
// src/controls/inline-editing-control.tsx
|
|
6241
|
-
var
|
|
6212
|
+
var React101 = __toESM(require("react"));
|
|
6242
6213
|
var import_editor_props51 = require("@elementor/editor-props");
|
|
6243
|
-
var
|
|
6214
|
+
var import_ui87 = require("@elementor/ui");
|
|
6244
6215
|
|
|
6245
6216
|
// src/components/inline-editor.tsx
|
|
6246
|
-
var
|
|
6247
|
-
var
|
|
6248
|
-
var
|
|
6217
|
+
var React100 = __toESM(require("react"));
|
|
6218
|
+
var import_react55 = require("react");
|
|
6219
|
+
var import_ui86 = require("@elementor/ui");
|
|
6249
6220
|
var import_extension_bold = __toESM(require("@tiptap/extension-bold"));
|
|
6250
6221
|
var import_extension_document = __toESM(require("@tiptap/extension-document"));
|
|
6251
6222
|
var import_extension_hard_break = __toESM(require("@tiptap/extension-hard-break"));
|
|
@@ -6258,7 +6229,7 @@ var import_extension_subscript = __toESM(require("@tiptap/extension-subscript"))
|
|
|
6258
6229
|
var import_extension_superscript = __toESM(require("@tiptap/extension-superscript"));
|
|
6259
6230
|
var import_extension_text = __toESM(require("@tiptap/extension-text"));
|
|
6260
6231
|
var import_extension_underline = __toESM(require("@tiptap/extension-underline"));
|
|
6261
|
-
var
|
|
6232
|
+
var import_react56 = require("@tiptap/react");
|
|
6262
6233
|
|
|
6263
6234
|
// src/utils/inline-editing.ts
|
|
6264
6235
|
function isEmpty(value = "") {
|
|
@@ -6271,19 +6242,19 @@ function isEmpty(value = "") {
|
|
|
6271
6242
|
}
|
|
6272
6243
|
|
|
6273
6244
|
// src/components/inline-editor-toolbar.tsx
|
|
6274
|
-
var
|
|
6275
|
-
var
|
|
6245
|
+
var React99 = __toESM(require("react"));
|
|
6246
|
+
var import_react53 = require("react");
|
|
6276
6247
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
6277
6248
|
var import_icons34 = require("@elementor/icons");
|
|
6278
|
-
var
|
|
6279
|
-
var
|
|
6249
|
+
var import_ui85 = require("@elementor/ui");
|
|
6250
|
+
var import_react54 = require("@tiptap/react");
|
|
6280
6251
|
var import_i18n51 = require("@wordpress/i18n");
|
|
6281
6252
|
|
|
6282
6253
|
// src/components/url-popover.tsx
|
|
6283
|
-
var
|
|
6284
|
-
var
|
|
6254
|
+
var React98 = __toESM(require("react"));
|
|
6255
|
+
var import_react52 = require("react");
|
|
6285
6256
|
var import_icons33 = require("@elementor/icons");
|
|
6286
|
-
var
|
|
6257
|
+
var import_ui84 = require("@elementor/ui");
|
|
6287
6258
|
var import_i18n50 = require("@wordpress/i18n");
|
|
6288
6259
|
var UrlPopover = ({
|
|
6289
6260
|
popupState,
|
|
@@ -6294,8 +6265,8 @@ var UrlPopover = ({
|
|
|
6294
6265
|
openInNewTab,
|
|
6295
6266
|
onToggleNewTab
|
|
6296
6267
|
}) => {
|
|
6297
|
-
const inputRef = (0,
|
|
6298
|
-
(0,
|
|
6268
|
+
const inputRef = (0, import_react52.useRef)(null);
|
|
6269
|
+
(0, import_react52.useEffect)(() => {
|
|
6299
6270
|
if (popupState.isOpen) {
|
|
6300
6271
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
6301
6272
|
}
|
|
@@ -6304,19 +6275,19 @@ var UrlPopover = ({
|
|
|
6304
6275
|
restoreValue();
|
|
6305
6276
|
popupState.close();
|
|
6306
6277
|
};
|
|
6307
|
-
return /* @__PURE__ */
|
|
6308
|
-
|
|
6278
|
+
return /* @__PURE__ */ React98.createElement(
|
|
6279
|
+
import_ui84.Popover,
|
|
6309
6280
|
{
|
|
6310
6281
|
slotProps: {
|
|
6311
6282
|
paper: { sx: { borderRadius: "16px", width: anchorRef.current?.offsetWidth + "px", marginTop: -1 } }
|
|
6312
6283
|
},
|
|
6313
|
-
...(0,
|
|
6284
|
+
...(0, import_ui84.bindPopover)(popupState),
|
|
6314
6285
|
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
6315
6286
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
6316
6287
|
onClose: handleClose
|
|
6317
6288
|
},
|
|
6318
|
-
/* @__PURE__ */
|
|
6319
|
-
|
|
6289
|
+
/* @__PURE__ */ React98.createElement(import_ui84.Stack, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React98.createElement(
|
|
6290
|
+
import_ui84.TextField,
|
|
6320
6291
|
{
|
|
6321
6292
|
value,
|
|
6322
6293
|
onChange,
|
|
@@ -6328,8 +6299,8 @@ var UrlPopover = ({
|
|
|
6328
6299
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
6329
6300
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
6330
6301
|
}
|
|
6331
|
-
), /* @__PURE__ */
|
|
6332
|
-
|
|
6302
|
+
), /* @__PURE__ */ React98.createElement(import_ui84.Tooltip, { title: (0, import_i18n50.__)("Open in a new tab", "elementor") }, /* @__PURE__ */ React98.createElement(
|
|
6303
|
+
import_ui84.ToggleButton,
|
|
6333
6304
|
{
|
|
6334
6305
|
size: "tiny",
|
|
6335
6306
|
value: "newTab",
|
|
@@ -6338,7 +6309,7 @@ var UrlPopover = ({
|
|
|
6338
6309
|
"aria-label": (0, import_i18n50.__)("Open in a new tab", "elementor"),
|
|
6339
6310
|
sx: { borderRadius: "8px" }
|
|
6340
6311
|
},
|
|
6341
|
-
/* @__PURE__ */
|
|
6312
|
+
/* @__PURE__ */ React98.createElement(import_icons33.ExternalLinkIcon, { fontSize: "tiny" })
|
|
6342
6313
|
)))
|
|
6343
6314
|
);
|
|
6344
6315
|
};
|
|
@@ -6348,7 +6319,7 @@ var checkIfElementHasLink = (elementId) => !!(0, import_editor_elements6.getElem
|
|
|
6348
6319
|
var toolbarButtons = {
|
|
6349
6320
|
clear: {
|
|
6350
6321
|
label: (0, import_i18n51.__)("Clear", "elementor"),
|
|
6351
|
-
icon: /* @__PURE__ */
|
|
6322
|
+
icon: /* @__PURE__ */ React99.createElement(import_icons34.MinusIcon, { fontSize: "tiny" }),
|
|
6352
6323
|
action: "clear",
|
|
6353
6324
|
method: (editor) => {
|
|
6354
6325
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
@@ -6356,7 +6327,7 @@ var toolbarButtons = {
|
|
|
6356
6327
|
},
|
|
6357
6328
|
bold: {
|
|
6358
6329
|
label: (0, import_i18n51.__)("Bold", "elementor"),
|
|
6359
|
-
icon: /* @__PURE__ */
|
|
6330
|
+
icon: /* @__PURE__ */ React99.createElement(import_icons34.BoldIcon, { fontSize: "tiny" }),
|
|
6360
6331
|
action: "bold",
|
|
6361
6332
|
method: (editor) => {
|
|
6362
6333
|
editor.chain().focus().toggleBold().run();
|
|
@@ -6364,7 +6335,7 @@ var toolbarButtons = {
|
|
|
6364
6335
|
},
|
|
6365
6336
|
italic: {
|
|
6366
6337
|
label: (0, import_i18n51.__)("Italic", "elementor"),
|
|
6367
|
-
icon: /* @__PURE__ */
|
|
6338
|
+
icon: /* @__PURE__ */ React99.createElement(import_icons34.ItalicIcon, { fontSize: "tiny" }),
|
|
6368
6339
|
action: "italic",
|
|
6369
6340
|
method: (editor) => {
|
|
6370
6341
|
editor.chain().focus().toggleItalic().run();
|
|
@@ -6372,7 +6343,7 @@ var toolbarButtons = {
|
|
|
6372
6343
|
},
|
|
6373
6344
|
underline: {
|
|
6374
6345
|
label: (0, import_i18n51.__)("Underline", "elementor"),
|
|
6375
|
-
icon: /* @__PURE__ */
|
|
6346
|
+
icon: /* @__PURE__ */ React99.createElement(import_icons34.UnderlineIcon, { fontSize: "tiny" }),
|
|
6376
6347
|
action: "underline",
|
|
6377
6348
|
method: (editor) => {
|
|
6378
6349
|
editor.chain().focus().toggleUnderline().run();
|
|
@@ -6380,7 +6351,7 @@ var toolbarButtons = {
|
|
|
6380
6351
|
},
|
|
6381
6352
|
strike: {
|
|
6382
6353
|
label: (0, import_i18n51.__)("Strikethrough", "elementor"),
|
|
6383
|
-
icon: /* @__PURE__ */
|
|
6354
|
+
icon: /* @__PURE__ */ React99.createElement(import_icons34.StrikethroughIcon, { fontSize: "tiny" }),
|
|
6384
6355
|
action: "strike",
|
|
6385
6356
|
method: (editor) => {
|
|
6386
6357
|
editor.chain().focus().toggleStrike().run();
|
|
@@ -6388,7 +6359,7 @@ var toolbarButtons = {
|
|
|
6388
6359
|
},
|
|
6389
6360
|
superscript: {
|
|
6390
6361
|
label: (0, import_i18n51.__)("Superscript", "elementor"),
|
|
6391
|
-
icon: /* @__PURE__ */
|
|
6362
|
+
icon: /* @__PURE__ */ React99.createElement(import_icons34.SuperscriptIcon, { fontSize: "tiny" }),
|
|
6392
6363
|
action: "superscript",
|
|
6393
6364
|
method: (editor) => {
|
|
6394
6365
|
editor.chain().focus().toggleSuperscript().run();
|
|
@@ -6396,7 +6367,7 @@ var toolbarButtons = {
|
|
|
6396
6367
|
},
|
|
6397
6368
|
subscript: {
|
|
6398
6369
|
label: (0, import_i18n51.__)("Subscript", "elementor"),
|
|
6399
|
-
icon: /* @__PURE__ */
|
|
6370
|
+
icon: /* @__PURE__ */ React99.createElement(import_icons34.SubscriptIcon, { fontSize: "tiny" }),
|
|
6400
6371
|
action: "subscript",
|
|
6401
6372
|
method: (editor) => {
|
|
6402
6373
|
editor.chain().focus().toggleSubscript().run();
|
|
@@ -6404,7 +6375,7 @@ var toolbarButtons = {
|
|
|
6404
6375
|
},
|
|
6405
6376
|
link: {
|
|
6406
6377
|
label: (0, import_i18n51.__)("Link", "elementor"),
|
|
6407
|
-
icon: /* @__PURE__ */
|
|
6378
|
+
icon: /* @__PURE__ */ React99.createElement(import_icons34.LinkIcon, { fontSize: "tiny" }),
|
|
6408
6379
|
action: "link",
|
|
6409
6380
|
method: null
|
|
6410
6381
|
}
|
|
@@ -6412,16 +6383,16 @@ var toolbarButtons = {
|
|
|
6412
6383
|
var { clear: clearButton, ...formatButtons } = toolbarButtons;
|
|
6413
6384
|
var possibleFormats = Object.keys(formatButtons);
|
|
6414
6385
|
var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
6415
|
-
const [urlValue, setUrlValue] = (0,
|
|
6416
|
-
const [openInNewTab, setOpenInNewTab] = (0,
|
|
6417
|
-
const toolbarRef = (0,
|
|
6418
|
-
const linkPopupState = (0,
|
|
6386
|
+
const [urlValue, setUrlValue] = (0, import_react53.useState)("");
|
|
6387
|
+
const [openInNewTab, setOpenInNewTab] = (0, import_react53.useState)(false);
|
|
6388
|
+
const toolbarRef = (0, import_react53.useRef)(null);
|
|
6389
|
+
const linkPopupState = (0, import_ui85.usePopupState)({ variant: "popover" });
|
|
6419
6390
|
const hasLinkOnElement = elementId ? checkIfElementHasLink(elementId) : false;
|
|
6420
|
-
const editorState = (0,
|
|
6391
|
+
const editorState = (0, import_react54.useEditorState)({
|
|
6421
6392
|
editor,
|
|
6422
6393
|
selector: (ctx) => possibleFormats.filter((format) => ctx.editor.isActive(format))
|
|
6423
6394
|
});
|
|
6424
|
-
const formatButtonsList = (0,
|
|
6395
|
+
const formatButtonsList = (0, import_react53.useMemo)(() => {
|
|
6425
6396
|
const buttons = Object.values(formatButtons);
|
|
6426
6397
|
if (hasLinkOnElement) {
|
|
6427
6398
|
return buttons.filter((button) => button.action !== "link");
|
|
@@ -6458,11 +6429,11 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6458
6429
|
}
|
|
6459
6430
|
linkPopupState.close();
|
|
6460
6431
|
};
|
|
6461
|
-
|
|
6432
|
+
React99.useEffect(() => {
|
|
6462
6433
|
editor?.commands?.focus();
|
|
6463
6434
|
}, [editor]);
|
|
6464
|
-
return /* @__PURE__ */
|
|
6465
|
-
|
|
6435
|
+
return /* @__PURE__ */ React99.createElement(
|
|
6436
|
+
import_ui85.Box,
|
|
6466
6437
|
{
|
|
6467
6438
|
ref: toolbarRef,
|
|
6468
6439
|
sx: {
|
|
@@ -6477,9 +6448,9 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6477
6448
|
pointerEvents: linkPopupState.isOpen ? "none" : "all"
|
|
6478
6449
|
}
|
|
6479
6450
|
},
|
|
6480
|
-
/* @__PURE__ */
|
|
6481
|
-
/* @__PURE__ */
|
|
6482
|
-
|
|
6451
|
+
/* @__PURE__ */ React99.createElement(import_ui85.Tooltip, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React99.createElement(import_ui85.IconButton, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
6452
|
+
/* @__PURE__ */ React99.createElement(
|
|
6453
|
+
import_ui85.ToggleButtonGroup,
|
|
6483
6454
|
{
|
|
6484
6455
|
value: editorState,
|
|
6485
6456
|
size: "tiny",
|
|
@@ -6487,7 +6458,7 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6487
6458
|
display: "flex",
|
|
6488
6459
|
gap: 0.5,
|
|
6489
6460
|
border: "none",
|
|
6490
|
-
[`& .${
|
|
6461
|
+
[`& .${import_ui85.toggleButtonGroupClasses.firstButton}, & .${import_ui85.toggleButtonGroupClasses.middleButton}, & .${import_ui85.toggleButtonGroupClasses.lastButton}`]: {
|
|
6491
6462
|
borderRadius: "8px",
|
|
6492
6463
|
border: "none",
|
|
6493
6464
|
marginLeft: 0,
|
|
@@ -6500,8 +6471,8 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6500
6471
|
}
|
|
6501
6472
|
}
|
|
6502
6473
|
},
|
|
6503
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
6504
|
-
|
|
6474
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React99.createElement(import_ui85.Tooltip, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React99.createElement(
|
|
6475
|
+
import_ui85.ToggleButton,
|
|
6505
6476
|
{
|
|
6506
6477
|
value: button.action,
|
|
6507
6478
|
"aria-label": button.label,
|
|
@@ -6518,7 +6489,7 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6518
6489
|
button.icon
|
|
6519
6490
|
)))
|
|
6520
6491
|
),
|
|
6521
|
-
/* @__PURE__ */
|
|
6492
|
+
/* @__PURE__ */ React99.createElement(
|
|
6522
6493
|
UrlPopover,
|
|
6523
6494
|
{
|
|
6524
6495
|
popupState: linkPopupState,
|
|
@@ -6539,8 +6510,8 @@ var BOLD_KEYBOARD_SHORTCUT = "b";
|
|
|
6539
6510
|
var UNDERLINE_KEYBOARD_SHORTCUT = "u";
|
|
6540
6511
|
var INLINE_EDITOR_RESET_CLASS = "elementor-inline-editor-reset";
|
|
6541
6512
|
var useOnUpdate = (callback, dependencies) => {
|
|
6542
|
-
const hasMounted = (0,
|
|
6543
|
-
(0,
|
|
6513
|
+
const hasMounted = (0, import_react55.useRef)(false);
|
|
6514
|
+
(0, import_react55.useEffect)(() => {
|
|
6544
6515
|
if (hasMounted.current) {
|
|
6545
6516
|
callback();
|
|
6546
6517
|
} else {
|
|
@@ -6560,9 +6531,9 @@ var calcSelectionCenter = (view, container) => {
|
|
|
6560
6531
|
return { left, top };
|
|
6561
6532
|
};
|
|
6562
6533
|
var Wrapper = ({ children, containerRef, editor, sx, onBlur }) => {
|
|
6563
|
-
const wrappedChildren = /* @__PURE__ */
|
|
6564
|
-
return onBlur ? /* @__PURE__ */
|
|
6565
|
-
|
|
6534
|
+
const wrappedChildren = /* @__PURE__ */ React100.createElement(import_ui86.Box, { ref: containerRef, ...sx }, children);
|
|
6535
|
+
return onBlur ? /* @__PURE__ */ React100.createElement(
|
|
6536
|
+
import_ui86.ClickAwayListener,
|
|
6566
6537
|
{
|
|
6567
6538
|
onClickAway: (event) => {
|
|
6568
6539
|
if (containerRef.current?.contains(event.target) || editor.view.dom.contains(event.target)) {
|
|
@@ -6572,9 +6543,9 @@ var Wrapper = ({ children, containerRef, editor, sx, onBlur }) => {
|
|
|
6572
6543
|
}
|
|
6573
6544
|
},
|
|
6574
6545
|
wrappedChildren
|
|
6575
|
-
) : /* @__PURE__ */
|
|
6546
|
+
) : /* @__PURE__ */ React100.createElement(React100.Fragment, null, wrappedChildren);
|
|
6576
6547
|
};
|
|
6577
|
-
var InlineEditor = (0,
|
|
6548
|
+
var InlineEditor = (0, import_react55.forwardRef)(
|
|
6578
6549
|
({
|
|
6579
6550
|
value,
|
|
6580
6551
|
setValue,
|
|
@@ -6588,11 +6559,11 @@ var InlineEditor = (0, import_react56.forwardRef)(
|
|
|
6588
6559
|
expectedTag = null,
|
|
6589
6560
|
elementId = void 0
|
|
6590
6561
|
}, ref) => {
|
|
6591
|
-
const containerRef = (0,
|
|
6592
|
-
const popupState = (0,
|
|
6593
|
-
const [hasSelectedContent, setHasSelectedContent] = (0,
|
|
6562
|
+
const containerRef = (0, import_react55.useRef)(null);
|
|
6563
|
+
const popupState = (0, import_ui86.usePopupState)({ variant: "popover", disableAutoFocus: true });
|
|
6564
|
+
const [hasSelectedContent, setHasSelectedContent] = (0, import_react55.useState)(false);
|
|
6594
6565
|
const documentContentSettings = !!expectedTag ? "block+" : "inline*";
|
|
6595
|
-
const [selectionRect, setSelectionRect] = (0,
|
|
6566
|
+
const [selectionRect, setSelectionRect] = (0, import_react55.useState)(null);
|
|
6596
6567
|
const onSelectionEnd = (view) => {
|
|
6597
6568
|
const hasSelection = !view.state.selection.empty;
|
|
6598
6569
|
setHasSelectedContent(hasSelection);
|
|
@@ -6625,7 +6596,7 @@ var InlineEditor = (0, import_react56.forwardRef)(
|
|
|
6625
6596
|
setValue(isEmpty(newValue) ? null : newValue);
|
|
6626
6597
|
};
|
|
6627
6598
|
const classes = `${INLINE_EDITOR_RESET_CLASS} ${elementClasses}`;
|
|
6628
|
-
const editor = (0,
|
|
6599
|
+
const editor = (0, import_react56.useEditor)({
|
|
6629
6600
|
extensions: [
|
|
6630
6601
|
import_extension_document.default.extend({
|
|
6631
6602
|
content: documentContentSettings
|
|
@@ -6700,8 +6671,8 @@ var InlineEditor = (0, import_react56.forwardRef)(
|
|
|
6700
6671
|
top: container.top + selectionRect.top + initial.top
|
|
6701
6672
|
};
|
|
6702
6673
|
};
|
|
6703
|
-
return /* @__PURE__ */
|
|
6704
|
-
|
|
6674
|
+
return /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(Wrapper, { containerRef, editor, sx, onBlur }, /* @__PURE__ */ React100.createElement(import_react56.EditorContent, { ref, editor })), showToolbar && containerRef.current && /* @__PURE__ */ React100.createElement(
|
|
6675
|
+
import_ui86.Popover,
|
|
6705
6676
|
{
|
|
6706
6677
|
slotProps: {
|
|
6707
6678
|
root: {
|
|
@@ -6710,14 +6681,14 @@ var InlineEditor = (0, import_react56.forwardRef)(
|
|
|
6710
6681
|
}
|
|
6711
6682
|
}
|
|
6712
6683
|
},
|
|
6713
|
-
...(0,
|
|
6684
|
+
...(0, import_ui86.bindPopover)(popupState),
|
|
6714
6685
|
open: hasSelectedContent && selectionRect !== null,
|
|
6715
6686
|
anchorReference: "anchorPosition",
|
|
6716
6687
|
anchorPosition: computePopupPosition(),
|
|
6717
6688
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
6718
6689
|
transformOrigin: { vertical: "bottom", horizontal: "center" }
|
|
6719
6690
|
},
|
|
6720
|
-
/* @__PURE__ */
|
|
6691
|
+
/* @__PURE__ */ React100.createElement(InlineEditorToolbar, { editor, elementId })
|
|
6721
6692
|
));
|
|
6722
6693
|
}
|
|
6723
6694
|
);
|
|
@@ -6731,8 +6702,8 @@ var InlineEditingControl = createControl(
|
|
|
6731
6702
|
}) => {
|
|
6732
6703
|
const { value, setValue } = useBoundProp(import_editor_props51.htmlPropTypeUtil);
|
|
6733
6704
|
const handleChange = (newValue) => setValue(newValue);
|
|
6734
|
-
return /* @__PURE__ */
|
|
6735
|
-
|
|
6705
|
+
return /* @__PURE__ */ React101.createElement(ControlActions, null, /* @__PURE__ */ React101.createElement(
|
|
6706
|
+
import_ui87.Box,
|
|
6736
6707
|
{
|
|
6737
6708
|
sx: {
|
|
6738
6709
|
p: 0.8,
|
|
@@ -6769,26 +6740,26 @@ var InlineEditingControl = createControl(
|
|
|
6769
6740
|
...attributes,
|
|
6770
6741
|
...props
|
|
6771
6742
|
},
|
|
6772
|
-
/* @__PURE__ */
|
|
6743
|
+
/* @__PURE__ */ React101.createElement(InlineEditor, { value: value || "", setValue: handleChange })
|
|
6773
6744
|
));
|
|
6774
6745
|
}
|
|
6775
6746
|
);
|
|
6776
6747
|
|
|
6777
6748
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
6778
|
-
var
|
|
6749
|
+
var React102 = __toESM(require("react"));
|
|
6779
6750
|
var import_icons35 = require("@elementor/icons");
|
|
6780
|
-
var
|
|
6781
|
-
var CustomIconButton = (0,
|
|
6751
|
+
var import_ui88 = require("@elementor/ui");
|
|
6752
|
+
var CustomIconButton = (0, import_ui88.styled)(import_ui88.IconButton)(({ theme }) => ({
|
|
6782
6753
|
width: theme.spacing(2.5),
|
|
6783
6754
|
height: theme.spacing(2.5)
|
|
6784
6755
|
}));
|
|
6785
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
6756
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React102.createElement(import_ui88.Tooltip, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React102.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React102.createElement(import_icons35.BrushBigIcon, { fontSize: size })));
|
|
6786
6757
|
|
|
6787
6758
|
// src/components/repeater/repeater.tsx
|
|
6788
|
-
var
|
|
6789
|
-
var
|
|
6759
|
+
var React103 = __toESM(require("react"));
|
|
6760
|
+
var import_react57 = require("react");
|
|
6790
6761
|
var import_icons36 = require("@elementor/icons");
|
|
6791
|
-
var
|
|
6762
|
+
var import_ui89 = require("@elementor/ui");
|
|
6792
6763
|
var import_i18n52 = require("@wordpress/i18n");
|
|
6793
6764
|
var SIZE9 = "tiny";
|
|
6794
6765
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
@@ -6807,7 +6778,7 @@ var Repeater3 = ({
|
|
|
6807
6778
|
openItem: initialOpenItem = EMPTY_OPEN_ITEM2,
|
|
6808
6779
|
isSortable = true
|
|
6809
6780
|
}) => {
|
|
6810
|
-
const [openItem, setOpenItem] = (0,
|
|
6781
|
+
const [openItem, setOpenItem] = (0, import_react57.useState)(initialOpenItem);
|
|
6811
6782
|
const uniqueKeys = items2.map(
|
|
6812
6783
|
(item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
|
|
6813
6784
|
);
|
|
@@ -6870,8 +6841,8 @@ var Repeater3 = ({
|
|
|
6870
6841
|
};
|
|
6871
6842
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
6872
6843
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
6873
|
-
const addButton = /* @__PURE__ */
|
|
6874
|
-
|
|
6844
|
+
const addButton = /* @__PURE__ */ React103.createElement(
|
|
6845
|
+
import_ui89.IconButton,
|
|
6875
6846
|
{
|
|
6876
6847
|
size: SIZE9,
|
|
6877
6848
|
sx: {
|
|
@@ -6881,30 +6852,30 @@ var Repeater3 = ({
|
|
|
6881
6852
|
onClick: addRepeaterItem,
|
|
6882
6853
|
"aria-label": (0, import_i18n52.__)("Add item", "elementor")
|
|
6883
6854
|
},
|
|
6884
|
-
/* @__PURE__ */
|
|
6855
|
+
/* @__PURE__ */ React103.createElement(import_icons36.PlusIcon, { fontSize: SIZE9 })
|
|
6885
6856
|
);
|
|
6886
|
-
return /* @__PURE__ */
|
|
6887
|
-
|
|
6857
|
+
return /* @__PURE__ */ React103.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React103.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React103.createElement(
|
|
6858
|
+
import_ui89.Infotip,
|
|
6888
6859
|
{
|
|
6889
6860
|
placement: "right",
|
|
6890
6861
|
content: addButtonInfotipContent,
|
|
6891
6862
|
color: "secondary",
|
|
6892
6863
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
6893
6864
|
},
|
|
6894
|
-
/* @__PURE__ */
|
|
6895
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
6865
|
+
/* @__PURE__ */ React103.createElement(import_ui89.Box, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
6866
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React103.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
6896
6867
|
const index = uniqueKeys.indexOf(key);
|
|
6897
6868
|
const value = items2[index];
|
|
6898
6869
|
if (!value) {
|
|
6899
6870
|
return null;
|
|
6900
6871
|
}
|
|
6901
|
-
return /* @__PURE__ */
|
|
6872
|
+
return /* @__PURE__ */ React103.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React103.createElement(
|
|
6902
6873
|
RepeaterItem,
|
|
6903
6874
|
{
|
|
6904
6875
|
disabled,
|
|
6905
6876
|
propDisabled: value?.disabled,
|
|
6906
|
-
label: /* @__PURE__ */
|
|
6907
|
-
startIcon: /* @__PURE__ */
|
|
6877
|
+
label: /* @__PURE__ */ React103.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React103.createElement(itemSettings.Label, { value, index })),
|
|
6878
|
+
startIcon: /* @__PURE__ */ React103.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React103.createElement(itemSettings.Icon, { value })),
|
|
6908
6879
|
removeItem: () => removeRepeaterItem(index),
|
|
6909
6880
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
6910
6881
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -6916,7 +6887,7 @@ var Repeater3 = ({
|
|
|
6916
6887
|
actions: itemSettings.actions,
|
|
6917
6888
|
value
|
|
6918
6889
|
},
|
|
6919
|
-
(props) => /* @__PURE__ */
|
|
6890
|
+
(props) => /* @__PURE__ */ React103.createElement(
|
|
6920
6891
|
itemSettings.Content,
|
|
6921
6892
|
{
|
|
6922
6893
|
...props,
|
|
@@ -6949,24 +6920,24 @@ var RepeaterItem = ({
|
|
|
6949
6920
|
const duplicateLabel = (0, import_i18n52.__)("Duplicate", "elementor");
|
|
6950
6921
|
const toggleLabel = propDisabled ? (0, import_i18n52.__)("Show", "elementor") : (0, import_i18n52.__)("Hide", "elementor");
|
|
6951
6922
|
const removeLabel = (0, import_i18n52.__)("Remove", "elementor");
|
|
6952
|
-
return /* @__PURE__ */
|
|
6923
|
+
return /* @__PURE__ */ React103.createElement(React103.Fragment, null, /* @__PURE__ */ React103.createElement(
|
|
6953
6924
|
RepeaterTag,
|
|
6954
6925
|
{
|
|
6955
6926
|
disabled,
|
|
6956
6927
|
label,
|
|
6957
6928
|
ref: setRef,
|
|
6958
6929
|
"aria-label": (0, import_i18n52.__)("Open item", "elementor"),
|
|
6959
|
-
...(0,
|
|
6930
|
+
...(0, import_ui89.bindTrigger)(popoverState),
|
|
6960
6931
|
startIcon,
|
|
6961
|
-
actions: /* @__PURE__ */
|
|
6932
|
+
actions: /* @__PURE__ */ React103.createElement(React103.Fragment, null, showDuplicate && /* @__PURE__ */ React103.createElement(import_ui89.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React103.createElement(import_ui89.IconButton, { size: SIZE9, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React103.createElement(import_icons36.CopyIcon, { fontSize: SIZE9 }))), showToggle && /* @__PURE__ */ React103.createElement(import_ui89.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React103.createElement(import_ui89.IconButton, { size: SIZE9, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React103.createElement(import_icons36.EyeOffIcon, { fontSize: SIZE9 }) : /* @__PURE__ */ React103.createElement(import_icons36.EyeIcon, { fontSize: SIZE9 }))), actions?.(value), showRemove && /* @__PURE__ */ React103.createElement(import_ui89.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React103.createElement(import_ui89.IconButton, { size: SIZE9, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React103.createElement(import_icons36.XIcon, { fontSize: SIZE9 }))))
|
|
6962
6933
|
}
|
|
6963
|
-
), /* @__PURE__ */
|
|
6934
|
+
), /* @__PURE__ */ React103.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React103.createElement(import_ui89.Box, null, children({ anchorEl: ref }))));
|
|
6964
6935
|
};
|
|
6965
6936
|
var usePopover = (openOnMount, onOpen) => {
|
|
6966
|
-
const [ref, setRef] = (0,
|
|
6967
|
-
const popoverState = (0,
|
|
6968
|
-
const popoverProps = (0,
|
|
6969
|
-
(0,
|
|
6937
|
+
const [ref, setRef] = (0, import_react57.useState)(null);
|
|
6938
|
+
const popoverState = (0, import_ui89.usePopupState)({ variant: "popover" });
|
|
6939
|
+
const popoverProps = (0, import_ui89.bindPopover)(popoverState);
|
|
6940
|
+
(0, import_react57.useEffect)(() => {
|
|
6970
6941
|
if (openOnMount && ref) {
|
|
6971
6942
|
popoverState.open(ref);
|
|
6972
6943
|
onOpen?.();
|
|
@@ -6981,8 +6952,8 @@ var usePopover = (openOnMount, onOpen) => {
|
|
|
6981
6952
|
};
|
|
6982
6953
|
|
|
6983
6954
|
// src/components/size/unstable-size-field.tsx
|
|
6984
|
-
var
|
|
6985
|
-
var
|
|
6955
|
+
var React106 = __toESM(require("react"));
|
|
6956
|
+
var import_ui91 = require("@elementor/ui");
|
|
6986
6957
|
|
|
6987
6958
|
// src/hooks/use-size-value.ts
|
|
6988
6959
|
var useSizeValue = (externalValue, onChange, defaultValue) => {
|
|
@@ -7022,26 +6993,26 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
7022
6993
|
};
|
|
7023
6994
|
|
|
7024
6995
|
// src/components/size/unit-select.tsx
|
|
7025
|
-
var
|
|
7026
|
-
var
|
|
7027
|
-
var
|
|
7028
|
-
var
|
|
6996
|
+
var React104 = __toESM(require("react"));
|
|
6997
|
+
var import_react58 = require("react");
|
|
6998
|
+
var import_editor_ui13 = require("@elementor/editor-ui");
|
|
6999
|
+
var import_ui90 = require("@elementor/ui");
|
|
7029
7000
|
var menuItemContentStyles = {
|
|
7030
7001
|
display: "flex",
|
|
7031
7002
|
flexDirection: "column",
|
|
7032
7003
|
justifyContent: "center"
|
|
7033
7004
|
};
|
|
7034
7005
|
var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
7035
|
-
const popupState = (0,
|
|
7006
|
+
const popupState = (0, import_ui90.usePopupState)({
|
|
7036
7007
|
variant: "popover",
|
|
7037
|
-
popupId: (0,
|
|
7008
|
+
popupId: (0, import_react58.useId)()
|
|
7038
7009
|
});
|
|
7039
7010
|
const handleMenuItemClick = (index) => {
|
|
7040
7011
|
onClick(options[index]);
|
|
7041
7012
|
popupState.close();
|
|
7042
7013
|
};
|
|
7043
|
-
return /* @__PURE__ */
|
|
7044
|
-
|
|
7014
|
+
return /* @__PURE__ */ React104.createElement(React104.Fragment, null, /* @__PURE__ */ React104.createElement(StyledButton2, { isPrimaryColor: showPrimaryColor, size: "small", ...(0, import_ui90.bindTrigger)(popupState) }, value), /* @__PURE__ */ React104.createElement(import_ui90.Menu, { MenuListProps: { dense: true }, ...(0, import_ui90.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React104.createElement(
|
|
7015
|
+
import_editor_ui13.MenuListItem,
|
|
7045
7016
|
{
|
|
7046
7017
|
key: option,
|
|
7047
7018
|
onClick: () => handleMenuItemClick(index),
|
|
@@ -7059,7 +7030,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
7059
7030
|
option.toUpperCase()
|
|
7060
7031
|
))));
|
|
7061
7032
|
};
|
|
7062
|
-
var StyledButton2 = (0,
|
|
7033
|
+
var StyledButton2 = (0, import_ui90.styled)(import_ui90.Button, {
|
|
7063
7034
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
7064
7035
|
})(({ isPrimaryColor, theme }) => ({
|
|
7065
7036
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -7069,11 +7040,11 @@ var StyledButton2 = (0, import_ui91.styled)(import_ui91.Button, {
|
|
|
7069
7040
|
}));
|
|
7070
7041
|
|
|
7071
7042
|
// src/components/size/unstable-size-input.tsx
|
|
7072
|
-
var
|
|
7073
|
-
var
|
|
7074
|
-
var UnstableSizeInput = (0,
|
|
7043
|
+
var React105 = __toESM(require("react"));
|
|
7044
|
+
var import_react59 = require("react");
|
|
7045
|
+
var UnstableSizeInput = (0, import_react59.forwardRef)(
|
|
7075
7046
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
7076
|
-
return /* @__PURE__ */
|
|
7047
|
+
return /* @__PURE__ */ React105.createElement(
|
|
7077
7048
|
NumberInput,
|
|
7078
7049
|
{
|
|
7079
7050
|
ref,
|
|
@@ -7116,7 +7087,7 @@ var UnstableSizeField = ({
|
|
|
7116
7087
|
const shouldHighlightUnit = () => {
|
|
7117
7088
|
return hasValue(size);
|
|
7118
7089
|
};
|
|
7119
|
-
return /* @__PURE__ */
|
|
7090
|
+
return /* @__PURE__ */ React106.createElement(
|
|
7120
7091
|
UnstableSizeInput,
|
|
7121
7092
|
{
|
|
7122
7093
|
type: "number",
|
|
@@ -7124,7 +7095,7 @@ var UnstableSizeField = ({
|
|
|
7124
7095
|
onBlur,
|
|
7125
7096
|
onChange: (event) => setSize(event.target.value),
|
|
7126
7097
|
InputProps: {
|
|
7127
|
-
endAdornment: /* @__PURE__ */
|
|
7098
|
+
endAdornment: /* @__PURE__ */ React106.createElement(import_ui91.InputAdornment, { position: "end" }, /* @__PURE__ */ React106.createElement(
|
|
7128
7099
|
UnitSelect,
|
|
7129
7100
|
{
|
|
7130
7101
|
options: units2,
|
|
@@ -7156,7 +7127,6 @@ var hasValue = (value) => {
|
|
|
7156
7127
|
DateTimeControl,
|
|
7157
7128
|
EqualUnequalSizesControl,
|
|
7158
7129
|
FilterRepeaterControl,
|
|
7159
|
-
FloatingActionsBar,
|
|
7160
7130
|
FontFamilyControl,
|
|
7161
7131
|
GapControl,
|
|
7162
7132
|
HtmlTagControl,
|
|
@@ -7204,7 +7174,6 @@ var hasValue = (value) => {
|
|
|
7204
7174
|
useControlActions,
|
|
7205
7175
|
useControlReplacement,
|
|
7206
7176
|
useElementCanHaveChildren,
|
|
7207
|
-
useFloatingActionsBar,
|
|
7208
7177
|
useSyncExternalState
|
|
7209
7178
|
});
|
|
7210
7179
|
//# sourceMappingURL=index.js.map
|