@elementor/editor-controls 0.34.2 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +363 -312
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +316 -272
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/control-form-label.tsx +3 -3
- package/src/components/control-label.tsx +1 -1
- package/src/components/font-family-selector.tsx +282 -0
- package/src/components/repeater.tsx +2 -4
- package/src/components/sortable.tsx +4 -2
- package/src/controls/aspect-ratio-control.tsx +51 -48
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx +3 -2
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx +2 -1
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +1 -1
- package/src/controls/box-shadow-repeater-control.tsx +3 -3
- package/src/controls/equal-unequal-sizes-control.tsx +14 -4
- package/src/controls/font-family-control/font-family-control.tsx +12 -273
- package/src/controls/gap-control.tsx +3 -1
- package/src/controls/image-control.tsx +2 -2
- package/src/controls/link-control.tsx +1 -1
- package/src/controls/linked-dimensions-control.tsx +11 -4
- package/src/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -187,8 +187,8 @@ var resolveUnionPropType = (propType, key) => {
|
|
|
187
187
|
// src/components/control-form-label.tsx
|
|
188
188
|
import * as React3 from "react";
|
|
189
189
|
import { FormLabel } from "@elementor/ui";
|
|
190
|
-
var ControlFormLabel = (
|
|
191
|
-
return /* @__PURE__ */ React3.createElement(FormLabel, { size: "tiny" }
|
|
190
|
+
var ControlFormLabel = (props) => {
|
|
191
|
+
return /* @__PURE__ */ React3.createElement(FormLabel, { size: "tiny", ...props });
|
|
192
192
|
};
|
|
193
193
|
|
|
194
194
|
// src/create-control.tsx
|
|
@@ -393,7 +393,7 @@ var ImageControl = createControl(
|
|
|
393
393
|
const propContext = useBoundProp(imagePropTypeUtil);
|
|
394
394
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
395
395
|
const mediaTypes = allowSvgUpload ? ["image", "svg"] : ["image"];
|
|
396
|
-
return /* @__PURE__ */ React10.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React10.createElement(Stack2, { gap: 1.5 }, ["all", "media"].includes(showMode) ? /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React10.createElement(ControlFormLabel, null,
|
|
396
|
+
return /* @__PURE__ */ React10.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React10.createElement(Stack2, { gap: 1.5 }, ["all", "media"].includes(showMode) ? /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React10.createElement(ControlFormLabel, null, __2("Image", "elementor")), /* @__PURE__ */ React10.createElement(ImageMediaControl, { mediaTypes })) : null, ["all", "sizes"].includes(showMode) ? /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React10.createElement(Grid, { container: true, gap: 1.5, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React10.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React10.createElement(ControlFormLabel, null, resolutionLabel)), /* @__PURE__ */ React10.createElement(Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React10.createElement(SelectControl, { options: sizes })))) : null));
|
|
397
397
|
}
|
|
398
398
|
);
|
|
399
399
|
|
|
@@ -805,11 +805,12 @@ import {
|
|
|
805
805
|
var SortableProvider = (props) => {
|
|
806
806
|
return /* @__PURE__ */ React22.createElement(List, { sx: { p: 0, my: -0.5, mx: 0 } }, /* @__PURE__ */ React22.createElement(UnstableSortableProvider, { restrictAxis: true, disableDragOverlay: false, variant: "static", ...props }));
|
|
807
807
|
};
|
|
808
|
-
var SortableItem = ({ id, children }) => {
|
|
808
|
+
var SortableItem = ({ id, children, disabled }) => {
|
|
809
809
|
return /* @__PURE__ */ React22.createElement(
|
|
810
810
|
UnstableSortableItem,
|
|
811
811
|
{
|
|
812
812
|
id,
|
|
813
|
+
disabled,
|
|
813
814
|
render: ({
|
|
814
815
|
itemProps,
|
|
815
816
|
triggerProps,
|
|
@@ -818,7 +819,7 @@ var SortableItem = ({ id, children }) => {
|
|
|
818
819
|
showDropIndication,
|
|
819
820
|
dropIndicationStyle
|
|
820
821
|
}) => {
|
|
821
|
-
return /* @__PURE__ */ React22.createElement(StyledListItem, { ...itemProps, style: itemStyle }, /* @__PURE__ */ React22.createElement(SortableTrigger, { ...triggerProps, style: triggerStyle }), children, showDropIndication && /* @__PURE__ */ React22.createElement(StyledDivider, { style: dropIndicationStyle }));
|
|
822
|
+
return /* @__PURE__ */ React22.createElement(StyledListItem, { ...itemProps, style: itemStyle }, !disabled && /* @__PURE__ */ React22.createElement(SortableTrigger, { ...triggerProps, style: triggerStyle }), children, showDropIndication && /* @__PURE__ */ React22.createElement(StyledDivider, { style: dropIndicationStyle }));
|
|
822
823
|
}
|
|
823
824
|
}
|
|
824
825
|
);
|
|
@@ -946,7 +947,6 @@ var Repeater = ({
|
|
|
946
947
|
});
|
|
947
948
|
});
|
|
948
949
|
};
|
|
949
|
-
const ItemWrapper = disabled ? React23.Fragment : SortableItem;
|
|
950
950
|
return /* @__PURE__ */ React23.createElement(SectionContent, null, /* @__PURE__ */ React23.createElement(
|
|
951
951
|
Stack5,
|
|
952
952
|
{
|
|
@@ -974,7 +974,7 @@ var Repeater = ({
|
|
|
974
974
|
if (!value) {
|
|
975
975
|
return null;
|
|
976
976
|
}
|
|
977
|
-
return /* @__PURE__ */ React23.createElement(
|
|
977
|
+
return /* @__PURE__ */ React23.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled }, /* @__PURE__ */ React23.createElement(
|
|
978
978
|
RepeaterItem,
|
|
979
979
|
{
|
|
980
980
|
disabled,
|
|
@@ -1060,7 +1060,7 @@ var usePopover = (openOnMount, onOpen) => {
|
|
|
1060
1060
|
// src/controls/box-shadow-repeater-control.tsx
|
|
1061
1061
|
var BoxShadowRepeaterControl = createControl(() => {
|
|
1062
1062
|
const { propType, value, setValue, disabled } = useBoundProp(boxShadowPropTypeUtil);
|
|
1063
|
-
return /* @__PURE__ */ React24.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React24.createElement(
|
|
1063
|
+
return /* @__PURE__ */ React24.createElement(PropProvider, { propType, value, setValue, disabled }, /* @__PURE__ */ React24.createElement(
|
|
1064
1064
|
Repeater,
|
|
1065
1065
|
{
|
|
1066
1066
|
openOnAdd: true,
|
|
@@ -1082,8 +1082,8 @@ var ItemContent = ({ anchorEl, bind }) => {
|
|
|
1082
1082
|
return /* @__PURE__ */ React24.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React24.createElement(Content, { anchorEl }));
|
|
1083
1083
|
};
|
|
1084
1084
|
var Content = ({ anchorEl }) => {
|
|
1085
|
-
const
|
|
1086
|
-
return /* @__PURE__ */ React24.createElement(PropProvider, {
|
|
1085
|
+
const context = useBoundProp(shadowPropTypeUtil);
|
|
1086
|
+
return /* @__PURE__ */ React24.createElement(PropProvider, { ...context }, /* @__PURE__ */ React24.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React24.createElement(PopoverGridContainer, null, /* @__PURE__ */ React24.createElement(Control2, { bind: "color", label: __5("Color", "elementor") }, /* @__PURE__ */ React24.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React24.createElement(Control2, { bind: "position", label: __5("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React24.createElement(
|
|
1087
1087
|
SelectControl,
|
|
1088
1088
|
{
|
|
1089
1089
|
options: [
|
|
@@ -1439,7 +1439,7 @@ import { __ as __6 } from "@wordpress/i18n";
|
|
|
1439
1439
|
import * as React29 from "react";
|
|
1440
1440
|
import { Stack as Stack6 } from "@elementor/ui";
|
|
1441
1441
|
var ControlLabel = ({ children }) => {
|
|
1442
|
-
return /* @__PURE__ */ React29.createElement(Stack6, { direction: "row", alignItems: "center", justifyItems: "start", gap:
|
|
1442
|
+
return /* @__PURE__ */ React29.createElement(Stack6, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React29.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React29.createElement(ControlAdornments, null));
|
|
1443
1443
|
};
|
|
1444
1444
|
|
|
1445
1445
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
@@ -1469,7 +1469,7 @@ function EqualUnequalSizesControl({
|
|
|
1469
1469
|
setValue: setMultiSizeValue,
|
|
1470
1470
|
disabled: multiSizeDisabled
|
|
1471
1471
|
} = useBoundProp(multiSizePropTypeUtil);
|
|
1472
|
-
const { value: sizeValue, setValue: setSizeValue
|
|
1472
|
+
const { value: sizeValue, setValue: setSizeValue } = useBoundProp(sizePropTypeUtil2);
|
|
1473
1473
|
const splitEqualValue = () => {
|
|
1474
1474
|
if (!sizeValue) {
|
|
1475
1475
|
return null;
|
|
@@ -1496,8 +1496,9 @@ function EqualUnequalSizesControl({
|
|
|
1496
1496
|
}
|
|
1497
1497
|
return splitEqualValue() ?? null;
|
|
1498
1498
|
};
|
|
1499
|
+
const isShowingGeneralIndicator = !isExperimentActive("e_v_3_30") || !popupState.isOpen;
|
|
1499
1500
|
const isMixed = !!multiSizeValue;
|
|
1500
|
-
return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: controlRef }, /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(ControlLabel, null, label)), /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(Stack7, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React30.createElement(SizeControl, { placeholder: isMixed ? __6("Mixed", "elementor") : void 0 }), /* @__PURE__ */ React30.createElement(Tooltip3, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React30.createElement(
|
|
1501
|
+
return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: controlRef }, /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React30.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React30.createElement(ControlLabel, null, label)), /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(Stack7, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React30.createElement(SizeControl, { placeholder: isMixed ? __6("Mixed", "elementor") : void 0 }), /* @__PURE__ */ React30.createElement(Tooltip3, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React30.createElement(
|
|
1501
1502
|
ToggleButton2,
|
|
1502
1503
|
{
|
|
1503
1504
|
size: "tiny",
|
|
@@ -1505,8 +1506,7 @@ function EqualUnequalSizesControl({
|
|
|
1505
1506
|
sx: { marginLeft: "auto" },
|
|
1506
1507
|
...bindToggle(popupState),
|
|
1507
1508
|
selected: popupState.isOpen,
|
|
1508
|
-
"aria-label": tooltipLabel
|
|
1509
|
-
disabled: multiSizeDisabled || sizeDisabled
|
|
1509
|
+
"aria-label": tooltipLabel
|
|
1510
1510
|
},
|
|
1511
1511
|
icon
|
|
1512
1512
|
))))), /* @__PURE__ */ React30.createElement(
|
|
@@ -1527,7 +1527,16 @@ function EqualUnequalSizesControl({
|
|
|
1527
1527
|
paper: { sx: { mt: 0.5, width: controlRef.current?.getBoundingClientRect().width } }
|
|
1528
1528
|
}
|
|
1529
1529
|
},
|
|
1530
|
-
/* @__PURE__ */ React30.createElement(
|
|
1530
|
+
/* @__PURE__ */ React30.createElement(
|
|
1531
|
+
PropProvider,
|
|
1532
|
+
{
|
|
1533
|
+
propType: multiSizePropType,
|
|
1534
|
+
value: getMultiSizeValues(),
|
|
1535
|
+
setValue: setNestedProp,
|
|
1536
|
+
disabled: multiSizeDisabled
|
|
1537
|
+
},
|
|
1538
|
+
/* @__PURE__ */ React30.createElement(PopoverContent, { p: 1.5, pt: 2.5, pb: 3 }, /* @__PURE__ */ React30.createElement(PopoverGridContainer, null, /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[0] }), /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[1] })), /* @__PURE__ */ React30.createElement(PopoverGridContainer, null, /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[2] }), /* @__PURE__ */ React30.createElement(MultiSizeValueControl, { item: items[3] })))
|
|
1539
|
+
)
|
|
1531
1540
|
));
|
|
1532
1541
|
}
|
|
1533
1542
|
var MultiSizeValueControl = ({ item }) => {
|
|
@@ -1574,63 +1583,75 @@ var LinkedDimensionsControl = createControl(
|
|
|
1574
1583
|
const LinkedIcon = isLinked ? LinkIcon : DetachIcon;
|
|
1575
1584
|
const linkedLabel = __7("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1576
1585
|
const unlinkedLabel = __7("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1577
|
-
|
|
1578
|
-
|
|
1586
|
+
const disabled = sizeDisabled || dimensionsDisabled;
|
|
1587
|
+
return /* @__PURE__ */ React31.createElement(
|
|
1588
|
+
PropProvider,
|
|
1579
1589
|
{
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
sx: { marginLeft: "auto" },
|
|
1585
|
-
onChange: onLinkToggle,
|
|
1586
|
-
disabled: sizeDisabled || dimensionsDisabled
|
|
1590
|
+
propType,
|
|
1591
|
+
value: dimensionsValue,
|
|
1592
|
+
setValue: setDimensionsValue,
|
|
1593
|
+
disabled
|
|
1587
1594
|
},
|
|
1588
|
-
/* @__PURE__ */ React31.createElement(
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1595
|
+
/* @__PURE__ */ React31.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, isUsingNestedProps ? /* @__PURE__ */ React31.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React31.createElement(ControlLabel, null, label), /* @__PURE__ */ React31.createElement(Tooltip4, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React31.createElement(
|
|
1596
|
+
ToggleButton3,
|
|
1597
|
+
{
|
|
1598
|
+
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
1599
|
+
size: "tiny",
|
|
1600
|
+
value: "check",
|
|
1601
|
+
selected: isLinked,
|
|
1602
|
+
sx: { marginLeft: "auto" },
|
|
1603
|
+
onChange: onLinkToggle,
|
|
1604
|
+
disabled
|
|
1605
|
+
},
|
|
1606
|
+
/* @__PURE__ */ React31.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1607
|
+
))),
|
|
1608
|
+
/* @__PURE__ */ React31.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(Label, { bind: "block-start", label: __7("Top", "elementor") })), /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
|
|
1609
|
+
Control3,
|
|
1610
|
+
{
|
|
1611
|
+
bind: "block-start",
|
|
1612
|
+
startIcon: /* @__PURE__ */ React31.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
1613
|
+
isLinked,
|
|
1614
|
+
extendedValues
|
|
1615
|
+
}
|
|
1616
|
+
))), /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
|
|
1617
|
+
Label,
|
|
1618
|
+
{
|
|
1619
|
+
bind: "inline-end",
|
|
1620
|
+
label: isSiteRtl ? __7("Left", "elementor") : __7("Right", "elementor")
|
|
1621
|
+
}
|
|
1622
|
+
)), /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
|
|
1623
|
+
Control3,
|
|
1624
|
+
{
|
|
1625
|
+
bind: "inline-end",
|
|
1626
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React31.createElement(SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React31.createElement(SideRightIcon, { fontSize: "tiny" }),
|
|
1627
|
+
isLinked,
|
|
1628
|
+
extendedValues
|
|
1629
|
+
}
|
|
1630
|
+
)))),
|
|
1631
|
+
/* @__PURE__ */ React31.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(Label, { bind: "block-end", label: __7("Bottom", "elementor") })), /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
|
|
1632
|
+
Control3,
|
|
1633
|
+
{
|
|
1634
|
+
bind: "block-end",
|
|
1635
|
+
startIcon: /* @__PURE__ */ React31.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
1636
|
+
isLinked,
|
|
1637
|
+
extendedValues
|
|
1638
|
+
}
|
|
1639
|
+
))), /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
|
|
1640
|
+
Label,
|
|
1641
|
+
{
|
|
1642
|
+
bind: "inline-start",
|
|
1643
|
+
label: isSiteRtl ? __7("Right", "elementor") : __7("Left", "elementor")
|
|
1644
|
+
}
|
|
1645
|
+
)), /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React31.createElement(
|
|
1646
|
+
Control3,
|
|
1647
|
+
{
|
|
1648
|
+
bind: "inline-start",
|
|
1649
|
+
isLinked,
|
|
1650
|
+
extendedValues,
|
|
1651
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React31.createElement(SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React31.createElement(SideLeftIcon, { fontSize: "tiny" })
|
|
1652
|
+
}
|
|
1653
|
+
))))
|
|
1654
|
+
);
|
|
1634
1655
|
}
|
|
1635
1656
|
);
|
|
1636
1657
|
var Control3 = ({
|
|
@@ -1653,32 +1674,38 @@ var Label = ({ label, bind }) => {
|
|
|
1653
1674
|
};
|
|
1654
1675
|
|
|
1655
1676
|
// src/controls/font-family-control/font-family-control.tsx
|
|
1656
|
-
import * as
|
|
1657
|
-
import { useEffect as useEffect4, useRef as useRef4, useState as useState5 } from "react";
|
|
1677
|
+
import * as React33 from "react";
|
|
1658
1678
|
import { stringPropTypeUtil as stringPropTypeUtil6 } from "@elementor/editor-props";
|
|
1659
|
-
import { ChevronDownIcon as ChevronDownIcon2
|
|
1679
|
+
import { ChevronDownIcon as ChevronDownIcon2 } from "@elementor/icons";
|
|
1680
|
+
import { bindPopover as bindPopover3, bindTrigger as bindTrigger3, Popover as Popover3, UnstableTag as UnstableTag2, usePopupState as usePopupState4 } from "@elementor/ui";
|
|
1681
|
+
|
|
1682
|
+
// src/components/font-family-selector.tsx
|
|
1683
|
+
import { useEffect as useEffect4, useRef as useRef4, useState as useState5 } from "react";
|
|
1684
|
+
import * as React32 from "react";
|
|
1685
|
+
import { PopoverHeader } from "@elementor/editor-ui";
|
|
1686
|
+
import { SearchIcon, TextIcon } from "@elementor/icons";
|
|
1660
1687
|
import {
|
|
1661
|
-
bindPopover as bindPopover3,
|
|
1662
|
-
bindTrigger as bindTrigger3,
|
|
1663
1688
|
Box as Box3,
|
|
1664
1689
|
Divider as Divider2,
|
|
1665
|
-
IconButton as IconButton2,
|
|
1666
1690
|
InputAdornment as InputAdornment3,
|
|
1667
1691
|
Link,
|
|
1668
1692
|
MenuList,
|
|
1669
1693
|
MenuSubheader,
|
|
1670
|
-
Popover as Popover3,
|
|
1671
1694
|
Stack as Stack9,
|
|
1672
1695
|
styled as styled4,
|
|
1673
1696
|
TextField as TextField5,
|
|
1674
|
-
Typography as Typography3
|
|
1675
|
-
UnstableTag as UnstableTag2,
|
|
1676
|
-
usePopupState as usePopupState4
|
|
1697
|
+
Typography as Typography3
|
|
1677
1698
|
} from "@elementor/ui";
|
|
1678
1699
|
import { debounce } from "@elementor/utils";
|
|
1679
1700
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
1680
1701
|
import { __ as __8 } from "@wordpress/i18n";
|
|
1681
1702
|
|
|
1703
|
+
// src/controls/font-family-control/enqueue-font.tsx
|
|
1704
|
+
var enqueueFont = (fontFamily, context = "editor") => {
|
|
1705
|
+
const extendedWindow = window;
|
|
1706
|
+
return extendedWindow.elementor?.helpers?.enqueueFont?.(fontFamily, context) ?? null;
|
|
1707
|
+
};
|
|
1708
|
+
|
|
1682
1709
|
// src/hooks/use-filtered-font-families.ts
|
|
1683
1710
|
var useFilteredFontFamilies = (fontFamilies, searchValue) => {
|
|
1684
1711
|
return fontFamilies.reduce((acc, category) => {
|
|
@@ -1695,98 +1722,76 @@ var useFilteredFontFamilies = (fontFamilies, searchValue) => {
|
|
|
1695
1722
|
}, []);
|
|
1696
1723
|
};
|
|
1697
1724
|
|
|
1698
|
-
// src/
|
|
1699
|
-
var enqueueFont = (fontFamily, context = "editor") => {
|
|
1700
|
-
const extendedWindow = window;
|
|
1701
|
-
return extendedWindow.elementor?.helpers?.enqueueFont?.(fontFamily, context) ?? null;
|
|
1702
|
-
};
|
|
1703
|
-
|
|
1704
|
-
// src/controls/font-family-control/font-family-control.tsx
|
|
1725
|
+
// src/components/font-family-selector.tsx
|
|
1705
1726
|
var SIZE2 = "tiny";
|
|
1706
|
-
var
|
|
1727
|
+
var FontFamilySelector = ({
|
|
1728
|
+
fontFamilies,
|
|
1729
|
+
fontFamily,
|
|
1730
|
+
onFontFamilyChange,
|
|
1731
|
+
onClose
|
|
1732
|
+
}) => {
|
|
1707
1733
|
const [searchValue, setSearchValue] = useState5("");
|
|
1708
|
-
const { value: fontFamily, setValue: setFontFamily, disabled } = useBoundProp(stringPropTypeUtil6);
|
|
1709
|
-
const popoverState = usePopupState4({ variant: "popover" });
|
|
1710
1734
|
const filteredFontFamilies = useFilteredFontFamilies(fontFamilies, searchValue);
|
|
1711
1735
|
const handleSearch = (event) => {
|
|
1712
1736
|
setSearchValue(event.target.value);
|
|
1713
1737
|
};
|
|
1714
1738
|
const handleClose = () => {
|
|
1715
1739
|
setSearchValue("");
|
|
1716
|
-
|
|
1740
|
+
onClose();
|
|
1717
1741
|
};
|
|
1718
|
-
return /* @__PURE__ */ React32.createElement(
|
|
1719
|
-
|
|
1742
|
+
return /* @__PURE__ */ React32.createElement(Stack9, null, /* @__PURE__ */ React32.createElement(
|
|
1743
|
+
PopoverHeader,
|
|
1720
1744
|
{
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
...bindTrigger3(popoverState),
|
|
1725
|
-
fullWidth: true,
|
|
1726
|
-
disabled
|
|
1745
|
+
title: __8("Font Family", "elementor"),
|
|
1746
|
+
onClose: handleClose,
|
|
1747
|
+
icon: /* @__PURE__ */ React32.createElement(TextIcon, { fontSize: SIZE2 })
|
|
1727
1748
|
}
|
|
1728
|
-
)
|
|
1729
|
-
|
|
1749
|
+
), /* @__PURE__ */ React32.createElement(Box3, { px: 1.5, pb: 1 }, /* @__PURE__ */ React32.createElement(
|
|
1750
|
+
TextField5,
|
|
1730
1751
|
{
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
{
|
|
1740
|
-
autoFocus: true,
|
|
1741
|
-
fullWidth: true,
|
|
1742
|
-
size: SIZE2,
|
|
1743
|
-
value: searchValue,
|
|
1744
|
-
placeholder: __8("Search", "elementor"),
|
|
1745
|
-
onChange: handleSearch,
|
|
1746
|
-
InputProps: {
|
|
1747
|
-
startAdornment: /* @__PURE__ */ React32.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React32.createElement(SearchIcon, { fontSize: SIZE2 }))
|
|
1748
|
-
}
|
|
1752
|
+
autoFocus: true,
|
|
1753
|
+
fullWidth: true,
|
|
1754
|
+
size: SIZE2,
|
|
1755
|
+
value: searchValue,
|
|
1756
|
+
placeholder: __8("Search", "elementor"),
|
|
1757
|
+
onChange: handleSearch,
|
|
1758
|
+
InputProps: {
|
|
1759
|
+
startAdornment: /* @__PURE__ */ React32.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React32.createElement(SearchIcon, { fontSize: SIZE2 }))
|
|
1749
1760
|
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1761
|
+
}
|
|
1762
|
+
)), /* @__PURE__ */ React32.createElement(Divider2, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React32.createElement(
|
|
1763
|
+
FontList,
|
|
1764
|
+
{
|
|
1765
|
+
fontListItems: filteredFontFamilies,
|
|
1766
|
+
setFontFamily: onFontFamilyChange,
|
|
1767
|
+
handleClose,
|
|
1768
|
+
fontFamily
|
|
1769
|
+
}
|
|
1770
|
+
) : /* @__PURE__ */ React32.createElement(Box3, { sx: { overflowY: "auto", height: 260, width: 220 } }, /* @__PURE__ */ React32.createElement(Stack9, { alignItems: "center", p: 2.5, gap: 1.5, overflow: "hidden" }, /* @__PURE__ */ React32.createElement(TextIcon, { fontSize: "large" }), /* @__PURE__ */ React32.createElement(Box3, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React32.createElement(Typography3, { align: "center", variant: "subtitle2", color: "text.secondary" }, __8("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React32.createElement(
|
|
1771
|
+
Typography3,
|
|
1772
|
+
{
|
|
1773
|
+
variant: "subtitle2",
|
|
1774
|
+
color: "text.secondary",
|
|
1775
|
+
sx: {
|
|
1776
|
+
display: "flex",
|
|
1777
|
+
width: "100%",
|
|
1778
|
+
justifyContent: "center"
|
|
1757
1779
|
}
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" }
|
|
1774
|
-
},
|
|
1775
|
-
searchValue
|
|
1776
|
-
),
|
|
1777
|
-
/* @__PURE__ */ React32.createElement("span", null, "\u201D.")
|
|
1778
|
-
)), /* @__PURE__ */ React32.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __8("Try something else.", "elementor"), /* @__PURE__ */ React32.createElement(
|
|
1779
|
-
Link,
|
|
1780
|
-
{
|
|
1781
|
-
color: "secondary",
|
|
1782
|
-
variant: "caption",
|
|
1783
|
-
component: "button",
|
|
1784
|
-
onClick: () => setSearchValue("")
|
|
1785
|
-
},
|
|
1786
|
-
__8("Clear & try again", "elementor")
|
|
1787
|
-
)))))
|
|
1788
|
-
));
|
|
1789
|
-
});
|
|
1780
|
+
},
|
|
1781
|
+
/* @__PURE__ */ React32.createElement("span", null, "\u201C"),
|
|
1782
|
+
/* @__PURE__ */ React32.createElement("span", { style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" } }, searchValue),
|
|
1783
|
+
/* @__PURE__ */ React32.createElement("span", null, "\u201D.")
|
|
1784
|
+
)), /* @__PURE__ */ React32.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __8("Try something else.", "elementor"), /* @__PURE__ */ React32.createElement(
|
|
1785
|
+
Link,
|
|
1786
|
+
{
|
|
1787
|
+
color: "secondary",
|
|
1788
|
+
variant: "caption",
|
|
1789
|
+
component: "button",
|
|
1790
|
+
onClick: () => setSearchValue("")
|
|
1791
|
+
},
|
|
1792
|
+
__8("Clear & try again", "elementor")
|
|
1793
|
+
)))));
|
|
1794
|
+
};
|
|
1790
1795
|
var LIST_ITEM_HEIGHT = 36;
|
|
1791
1796
|
var LIST_ITEMS_BUFFER = 6;
|
|
1792
1797
|
var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
@@ -1920,14 +1925,49 @@ var useDebounce = (fn, delay) => {
|
|
|
1920
1925
|
return debouncedFn;
|
|
1921
1926
|
};
|
|
1922
1927
|
|
|
1928
|
+
// src/controls/font-family-control/font-family-control.tsx
|
|
1929
|
+
var SIZE3 = "tiny";
|
|
1930
|
+
var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
1931
|
+
const { value: fontFamily, setValue: setFontFamily, disabled } = useBoundProp(stringPropTypeUtil6);
|
|
1932
|
+
const popoverState = usePopupState4({ variant: "popover" });
|
|
1933
|
+
return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(ControlActions, null, /* @__PURE__ */ React33.createElement(
|
|
1934
|
+
UnstableTag2,
|
|
1935
|
+
{
|
|
1936
|
+
variant: "outlined",
|
|
1937
|
+
label: fontFamily,
|
|
1938
|
+
endIcon: /* @__PURE__ */ React33.createElement(ChevronDownIcon2, { fontSize: SIZE3 }),
|
|
1939
|
+
...bindTrigger3(popoverState),
|
|
1940
|
+
fullWidth: true,
|
|
1941
|
+
disabled
|
|
1942
|
+
}
|
|
1943
|
+
)), /* @__PURE__ */ React33.createElement(
|
|
1944
|
+
Popover3,
|
|
1945
|
+
{
|
|
1946
|
+
disablePortal: true,
|
|
1947
|
+
disableScrollLock: true,
|
|
1948
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
1949
|
+
...bindPopover3(popoverState)
|
|
1950
|
+
},
|
|
1951
|
+
/* @__PURE__ */ React33.createElement(
|
|
1952
|
+
FontFamilySelector,
|
|
1953
|
+
{
|
|
1954
|
+
fontFamilies,
|
|
1955
|
+
fontFamily,
|
|
1956
|
+
onFontFamilyChange: setFontFamily,
|
|
1957
|
+
onClose: popoverState.close
|
|
1958
|
+
}
|
|
1959
|
+
)
|
|
1960
|
+
));
|
|
1961
|
+
});
|
|
1962
|
+
|
|
1923
1963
|
// src/controls/url-control.tsx
|
|
1924
|
-
import * as
|
|
1964
|
+
import * as React34 from "react";
|
|
1925
1965
|
import { urlPropTypeUtil } from "@elementor/editor-props";
|
|
1926
1966
|
import { TextField as TextField6 } from "@elementor/ui";
|
|
1927
1967
|
var UrlControl = createControl(({ placeholder }) => {
|
|
1928
1968
|
const { value, setValue, disabled } = useBoundProp(urlPropTypeUtil);
|
|
1929
1969
|
const handleChange = (event) => setValue(event.target.value);
|
|
1930
|
-
return /* @__PURE__ */
|
|
1970
|
+
return /* @__PURE__ */ React34.createElement(ControlActions, null, /* @__PURE__ */ React34.createElement(
|
|
1931
1971
|
TextField6,
|
|
1932
1972
|
{
|
|
1933
1973
|
size: "tiny",
|
|
@@ -1941,7 +1981,7 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1941
1981
|
});
|
|
1942
1982
|
|
|
1943
1983
|
// src/controls/link-control.tsx
|
|
1944
|
-
import * as
|
|
1984
|
+
import * as React36 from "react";
|
|
1945
1985
|
import { useMemo as useMemo2, useState as useState6 } from "react";
|
|
1946
1986
|
import { getLinkInLinkRestriction, selectElement } from "@elementor/editor-elements";
|
|
1947
1987
|
import {
|
|
@@ -1955,18 +1995,18 @@ import { InfoTipCard } from "@elementor/editor-ui";
|
|
|
1955
1995
|
import { httpService as httpService2 } from "@elementor/http-client";
|
|
1956
1996
|
import { AlertTriangleIcon, MinusIcon, PlusIcon as PlusIcon2 } from "@elementor/icons";
|
|
1957
1997
|
import { useSessionStorage } from "@elementor/session";
|
|
1958
|
-
import { Box as Box5, Collapse, Grid as Grid7, IconButton as
|
|
1998
|
+
import { Box as Box5, Collapse, Grid as Grid7, IconButton as IconButton3, Infotip, Stack as Stack10, Switch } from "@elementor/ui";
|
|
1959
1999
|
import { debounce as debounce2 } from "@elementor/utils";
|
|
1960
2000
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1961
2001
|
|
|
1962
2002
|
// src/components/autocomplete.tsx
|
|
1963
|
-
import * as
|
|
2003
|
+
import * as React35 from "react";
|
|
1964
2004
|
import { forwardRef as forwardRef2 } from "react";
|
|
1965
|
-
import { XIcon as
|
|
2005
|
+
import { XIcon as XIcon2 } from "@elementor/icons";
|
|
1966
2006
|
import {
|
|
1967
2007
|
Autocomplete as AutocompleteBase,
|
|
1968
2008
|
Box as Box4,
|
|
1969
|
-
IconButton as
|
|
2009
|
+
IconButton as IconButton2,
|
|
1970
2010
|
InputAdornment as InputAdornment4,
|
|
1971
2011
|
TextField as TextField7
|
|
1972
2012
|
} from "@elementor/ui";
|
|
@@ -1986,7 +2026,7 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
1986
2026
|
const muiWarningPreventer = allowCustomValues || !!value?.toString()?.length;
|
|
1987
2027
|
const isOptionEqualToValue = muiWarningPreventer ? void 0 : () => true;
|
|
1988
2028
|
const isValueFromOptions = typeof value === "number" && !!findMatchingOption(options, value);
|
|
1989
|
-
return /* @__PURE__ */
|
|
2029
|
+
return /* @__PURE__ */ React35.createElement(
|
|
1990
2030
|
AutocompleteBase,
|
|
1991
2031
|
{
|
|
1992
2032
|
...restProps,
|
|
@@ -2004,8 +2044,8 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
2004
2044
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
2005
2045
|
isOptionEqualToValue,
|
|
2006
2046
|
filterOptions: () => optionKeys,
|
|
2007
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
2008
|
-
renderInput: (params) => /* @__PURE__ */
|
|
2047
|
+
renderOption: (optionProps, optionId) => /* @__PURE__ */ React35.createElement(Box4, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
|
|
2048
|
+
renderInput: (params) => /* @__PURE__ */ React35.createElement(
|
|
2009
2049
|
TextInput,
|
|
2010
2050
|
{
|
|
2011
2051
|
params,
|
|
@@ -2028,7 +2068,7 @@ var TextInput = ({
|
|
|
2028
2068
|
const onChange = (event) => {
|
|
2029
2069
|
handleChange(event.target.value);
|
|
2030
2070
|
};
|
|
2031
|
-
return /* @__PURE__ */
|
|
2071
|
+
return /* @__PURE__ */ React35.createElement(
|
|
2032
2072
|
TextField7,
|
|
2033
2073
|
{
|
|
2034
2074
|
...params,
|
|
@@ -2041,7 +2081,7 @@ var TextInput = ({
|
|
|
2041
2081
|
},
|
|
2042
2082
|
InputProps: {
|
|
2043
2083
|
...params.InputProps,
|
|
2044
|
-
endAdornment: /* @__PURE__ */
|
|
2084
|
+
endAdornment: /* @__PURE__ */ React35.createElement(ClearButton, { params, allowClear, handleChange })
|
|
2045
2085
|
}
|
|
2046
2086
|
}
|
|
2047
2087
|
);
|
|
@@ -2050,7 +2090,7 @@ var ClearButton = ({
|
|
|
2050
2090
|
allowClear,
|
|
2051
2091
|
handleChange,
|
|
2052
2092
|
params
|
|
2053
|
-
}) => /* @__PURE__ */
|
|
2093
|
+
}) => /* @__PURE__ */ React35.createElement(InputAdornment4, { position: "end" }, allowClear && /* @__PURE__ */ React35.createElement(IconButton2, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React35.createElement(XIcon2, { fontSize: params.size })));
|
|
2054
2094
|
function findMatchingOption(options, optionId = null) {
|
|
2055
2095
|
const formattedOption = (optionId || "").toString();
|
|
2056
2096
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -2072,7 +2112,7 @@ function _factoryFilter(newValue, options, minInputLength) {
|
|
|
2072
2112
|
}
|
|
2073
2113
|
|
|
2074
2114
|
// src/controls/link-control.tsx
|
|
2075
|
-
var
|
|
2115
|
+
var SIZE4 = "tiny";
|
|
2076
2116
|
var learnMoreButton = {
|
|
2077
2117
|
label: __9("Learn More", "elementor"),
|
|
2078
2118
|
href: "https://go.elementor.com/element-link-inside-link-infotip"
|
|
@@ -2149,7 +2189,7 @@ var LinkControl = createControl((props) => {
|
|
|
2149
2189
|
),
|
|
2150
2190
|
[endpoint]
|
|
2151
2191
|
);
|
|
2152
|
-
return /* @__PURE__ */
|
|
2192
|
+
return /* @__PURE__ */ React36.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React36.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React36.createElement(
|
|
2153
2193
|
Stack10,
|
|
2154
2194
|
{
|
|
2155
2195
|
direction: "row",
|
|
@@ -2159,8 +2199,8 @@ var LinkControl = createControl((props) => {
|
|
|
2159
2199
|
marginInlineEnd: -0.75
|
|
2160
2200
|
}
|
|
2161
2201
|
},
|
|
2162
|
-
/* @__PURE__ */
|
|
2163
|
-
/* @__PURE__ */
|
|
2202
|
+
/* @__PURE__ */ React36.createElement(ControlFormLabel, null, __9("Link", "elementor")),
|
|
2203
|
+
/* @__PURE__ */ React36.createElement(ConditionalInfoTip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React36.createElement(
|
|
2164
2204
|
ToggleIconControl,
|
|
2165
2205
|
{
|
|
2166
2206
|
disabled: shouldDisableAddingLink,
|
|
@@ -2169,7 +2209,7 @@ var LinkControl = createControl((props) => {
|
|
|
2169
2209
|
label: __9("Toggle link", "elementor")
|
|
2170
2210
|
}
|
|
2171
2211
|
))
|
|
2172
|
-
), /* @__PURE__ */
|
|
2212
|
+
), /* @__PURE__ */ React36.createElement(Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React36.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React36.createElement(ControlActions, null, /* @__PURE__ */ React36.createElement(
|
|
2173
2213
|
Autocomplete,
|
|
2174
2214
|
{
|
|
2175
2215
|
options,
|
|
@@ -2180,10 +2220,10 @@ var LinkControl = createControl((props) => {
|
|
|
2180
2220
|
onTextChange,
|
|
2181
2221
|
minInputLength
|
|
2182
2222
|
}
|
|
2183
|
-
))), /* @__PURE__ */
|
|
2223
|
+
))), /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React36.createElement(SwitchControl, { disabled: propContext.disabled || !value }))))));
|
|
2184
2224
|
});
|
|
2185
2225
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
2186
|
-
return /* @__PURE__ */
|
|
2226
|
+
return /* @__PURE__ */ React36.createElement(IconButton3, { size: SIZE4, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React36.createElement(MinusIcon, { fontSize: SIZE4 }) : /* @__PURE__ */ React36.createElement(PlusIcon2, { fontSize: SIZE4 }));
|
|
2187
2227
|
};
|
|
2188
2228
|
var SwitchControl = ({ disabled }) => {
|
|
2189
2229
|
const { value = false, setValue } = useBoundProp(booleanPropTypeUtil);
|
|
@@ -2195,7 +2235,7 @@ var SwitchControl = ({ disabled }) => {
|
|
|
2195
2235
|
opacity: 0
|
|
2196
2236
|
}
|
|
2197
2237
|
} : {};
|
|
2198
|
-
return /* @__PURE__ */
|
|
2238
|
+
return /* @__PURE__ */ React36.createElement(Grid7, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React36.createElement(Grid7, { item: true }, /* @__PURE__ */ React36.createElement(ControlFormLabel, null, __9("Open in a new tab", "elementor"))), /* @__PURE__ */ React36.createElement(Grid7, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React36.createElement(Switch, { checked: value, onClick, disabled, inputProps })));
|
|
2199
2239
|
};
|
|
2200
2240
|
async function fetchOptions(ajaxUrl, params) {
|
|
2201
2241
|
if (!params || !ajaxUrl) {
|
|
@@ -2232,15 +2272,15 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2232
2272
|
selectElement(elementId);
|
|
2233
2273
|
}
|
|
2234
2274
|
};
|
|
2235
|
-
return shouldRestrict && isVisible ? /* @__PURE__ */
|
|
2275
|
+
return shouldRestrict && isVisible ? /* @__PURE__ */ React36.createElement(
|
|
2236
2276
|
Infotip,
|
|
2237
2277
|
{
|
|
2238
2278
|
placement: "right",
|
|
2239
|
-
content: /* @__PURE__ */
|
|
2279
|
+
content: /* @__PURE__ */ React36.createElement(
|
|
2240
2280
|
InfoTipCard,
|
|
2241
2281
|
{
|
|
2242
2282
|
content: INFOTIP_CONTENT[reason],
|
|
2243
|
-
svgIcon: /* @__PURE__ */
|
|
2283
|
+
svgIcon: /* @__PURE__ */ React36.createElement(AlertTriangleIcon, null),
|
|
2244
2284
|
learnMoreButton,
|
|
2245
2285
|
ctaButton: {
|
|
2246
2286
|
label: __9("Take me there", "elementor"),
|
|
@@ -2249,16 +2289,16 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2249
2289
|
}
|
|
2250
2290
|
)
|
|
2251
2291
|
},
|
|
2252
|
-
/* @__PURE__ */
|
|
2253
|
-
) : /* @__PURE__ */
|
|
2292
|
+
/* @__PURE__ */ React36.createElement(Box5, null, children)
|
|
2293
|
+
) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, children);
|
|
2254
2294
|
};
|
|
2255
2295
|
var INFOTIP_CONTENT = {
|
|
2256
|
-
descendant: /* @__PURE__ */
|
|
2257
|
-
ancestor: /* @__PURE__ */
|
|
2296
|
+
descendant: /* @__PURE__ */ React36.createElement(React36.Fragment, null, __9("To add a link to this container,", "elementor"), /* @__PURE__ */ React36.createElement("br", null), __9("first remove the link from the elements inside of it.", "elementor")),
|
|
2297
|
+
ancestor: /* @__PURE__ */ React36.createElement(React36.Fragment, null, __9("To add a link to this element,", "elementor"), /* @__PURE__ */ React36.createElement("br", null), __9("first remove the link from its parent container.", "elementor"))
|
|
2258
2298
|
};
|
|
2259
2299
|
|
|
2260
2300
|
// src/controls/gap-control.tsx
|
|
2261
|
-
import * as
|
|
2301
|
+
import * as React37 from "react";
|
|
2262
2302
|
import { layoutDirectionPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
|
|
2263
2303
|
import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
|
|
2264
2304
|
import { Grid as Grid8, Stack as Stack11, ToggleButton as ToggleButton4, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
@@ -2287,7 +2327,8 @@ var GapControl = createControl(({ label }) => {
|
|
|
2287
2327
|
const LinkedIcon = isLinked ? LinkIcon2 : DetachIcon2;
|
|
2288
2328
|
const linkedLabel = __10("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
2289
2329
|
const unlinkedLabel = __10("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
2290
|
-
|
|
2330
|
+
const disabled = sizeDisabled || directionDisabled;
|
|
2331
|
+
return /* @__PURE__ */ React37.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React37.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(ControlLabel, null, label), /* @__PURE__ */ React37.createElement(Tooltip5, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React37.createElement(
|
|
2291
2332
|
ToggleButton4,
|
|
2292
2333
|
{
|
|
2293
2334
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -2296,20 +2337,20 @@ var GapControl = createControl(({ label }) => {
|
|
|
2296
2337
|
selected: isLinked,
|
|
2297
2338
|
sx: { marginLeft: "auto" },
|
|
2298
2339
|
onChange: onLinkToggle,
|
|
2299
|
-
disabled
|
|
2340
|
+
disabled
|
|
2300
2341
|
},
|
|
2301
|
-
/* @__PURE__ */
|
|
2302
|
-
))), /* @__PURE__ */
|
|
2342
|
+
/* @__PURE__ */ React37.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2343
|
+
))), /* @__PURE__ */ React37.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React37.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(ControlFormLabel, null, __10("Column", "elementor"))), /* @__PURE__ */ React37.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(Control4, { bind: "column", isLinked }))), /* @__PURE__ */ React37.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React37.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(ControlFormLabel, null, __10("Row", "elementor"))), /* @__PURE__ */ React37.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(Control4, { bind: "row", isLinked })))));
|
|
2303
2344
|
});
|
|
2304
2345
|
var Control4 = ({ bind, isLinked }) => {
|
|
2305
2346
|
if (isLinked) {
|
|
2306
|
-
return /* @__PURE__ */
|
|
2347
|
+
return /* @__PURE__ */ React37.createElement(SizeControl, null);
|
|
2307
2348
|
}
|
|
2308
|
-
return /* @__PURE__ */
|
|
2349
|
+
return /* @__PURE__ */ React37.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React37.createElement(SizeControl, null));
|
|
2309
2350
|
};
|
|
2310
2351
|
|
|
2311
2352
|
// src/controls/aspect-ratio-control.tsx
|
|
2312
|
-
import * as
|
|
2353
|
+
import * as React38 from "react";
|
|
2313
2354
|
import { useState as useState7 } from "react";
|
|
2314
2355
|
import { stringPropTypeUtil as stringPropTypeUtil8 } from "@elementor/editor-props";
|
|
2315
2356
|
import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
|
|
@@ -2361,7 +2402,7 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2361
2402
|
setAspectRatioValue(`${customWidth}/${newHeight}`);
|
|
2362
2403
|
}
|
|
2363
2404
|
};
|
|
2364
|
-
return /* @__PURE__ */
|
|
2405
|
+
return /* @__PURE__ */ React38.createElement(ControlActions, null, /* @__PURE__ */ React38.createElement(Stack12, { direction: "column", pt: 2, gap: 2 }, /* @__PURE__ */ React38.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, label)), /* @__PURE__ */ React38.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(
|
|
2365
2406
|
Select2,
|
|
2366
2407
|
{
|
|
2367
2408
|
size: "tiny",
|
|
@@ -2373,9 +2414,9 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2373
2414
|
fullWidth: true
|
|
2374
2415
|
},
|
|
2375
2416
|
[...RATIO_OPTIONS, { label: __11("Custom", "elementor"), value: CUSTOM_RATIO }].map(
|
|
2376
|
-
({ label: optionLabel, ...props }) => /* @__PURE__ */
|
|
2417
|
+
({ label: optionLabel, ...props }) => /* @__PURE__ */ React38.createElement(MenuListItem3, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
|
|
2377
2418
|
)
|
|
2378
|
-
))), isCustom && /* @__PURE__ */
|
|
2419
|
+
))), isCustom && /* @__PURE__ */ React38.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(
|
|
2379
2420
|
TextField8,
|
|
2380
2421
|
{
|
|
2381
2422
|
size: "tiny",
|
|
@@ -2385,10 +2426,10 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2385
2426
|
value: customWidth,
|
|
2386
2427
|
onChange: handleCustomWidthChange,
|
|
2387
2428
|
InputProps: {
|
|
2388
|
-
startAdornment: /* @__PURE__ */
|
|
2429
|
+
startAdornment: /* @__PURE__ */ React38.createElement(ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
|
|
2389
2430
|
}
|
|
2390
2431
|
}
|
|
2391
|
-
)), /* @__PURE__ */
|
|
2432
|
+
)), /* @__PURE__ */ React38.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(
|
|
2392
2433
|
TextField8,
|
|
2393
2434
|
{
|
|
2394
2435
|
size: "tiny",
|
|
@@ -2398,14 +2439,14 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2398
2439
|
value: customHeight,
|
|
2399
2440
|
onChange: handleCustomHeightChange,
|
|
2400
2441
|
InputProps: {
|
|
2401
|
-
startAdornment: /* @__PURE__ */
|
|
2442
|
+
startAdornment: /* @__PURE__ */ React38.createElement(ArrowsMoveVerticalIcon, { fontSize: "tiny" })
|
|
2402
2443
|
}
|
|
2403
2444
|
}
|
|
2404
|
-
))));
|
|
2445
|
+
)))));
|
|
2405
2446
|
});
|
|
2406
2447
|
|
|
2407
2448
|
// src/controls/svg-media-control.tsx
|
|
2408
|
-
import * as
|
|
2449
|
+
import * as React40 from "react";
|
|
2409
2450
|
import { useState as useState9 } from "react";
|
|
2410
2451
|
import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
|
|
2411
2452
|
import { UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
@@ -2414,7 +2455,7 @@ import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWp
|
|
|
2414
2455
|
import { __ as __13 } from "@wordpress/i18n";
|
|
2415
2456
|
|
|
2416
2457
|
// src/components/enable-unfiltered-modal.tsx
|
|
2417
|
-
import * as
|
|
2458
|
+
import * as React39 from "react";
|
|
2418
2459
|
import { useState as useState8 } from "react";
|
|
2419
2460
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
2420
2461
|
import {
|
|
@@ -2467,9 +2508,9 @@ var EnableUnfilteredModal = (props) => {
|
|
|
2467
2508
|
}
|
|
2468
2509
|
};
|
|
2469
2510
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
2470
|
-
return canManageOptions ? /* @__PURE__ */
|
|
2511
|
+
return canManageOptions ? /* @__PURE__ */ React39.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React39.createElement(NonAdminDialog, { ...dialogProps });
|
|
2471
2512
|
};
|
|
2472
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
2513
|
+
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React39.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React39.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React39.createElement(DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React39.createElement(Divider3, null), /* @__PURE__ */ React39.createElement(DialogContent, null, /* @__PURE__ */ React39.createElement(DialogContentText, null, isError ? /* @__PURE__ */ React39.createElement(React39.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React39.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React39.createElement(DialogActions, null, /* @__PURE__ */ React39.createElement(Button3, { size: "medium", color: "secondary", onClick: () => onClose(false) }, __12("Cancel", "elementor")), /* @__PURE__ */ React39.createElement(
|
|
2473
2514
|
Button3,
|
|
2474
2515
|
{
|
|
2475
2516
|
size: "medium",
|
|
@@ -2478,9 +2519,9 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
2478
2519
|
color: "primary",
|
|
2479
2520
|
disabled: isPending
|
|
2480
2521
|
},
|
|
2481
|
-
isPending ? /* @__PURE__ */
|
|
2522
|
+
isPending ? /* @__PURE__ */ React39.createElement(CircularProgress2, { size: 24 }) : __12("Enable", "elementor")
|
|
2482
2523
|
)));
|
|
2483
|
-
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */
|
|
2524
|
+
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */ React39.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React39.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React39.createElement(DialogTitle, null, NON_ADMIN_TITLE_TEXT)), /* @__PURE__ */ React39.createElement(Divider3, null), /* @__PURE__ */ React39.createElement(DialogContent, null, /* @__PURE__ */ React39.createElement(DialogContentText, null, NON_ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React39.createElement(DialogActions, null, /* @__PURE__ */ React39.createElement(Button3, { size: "medium", onClick: () => onClose(false), variant: "contained", color: "primary" }, __12("Got it", "elementor"))));
|
|
2484
2525
|
|
|
2485
2526
|
// src/controls/svg-media-control.tsx
|
|
2486
2527
|
var TILE_SIZE = 8;
|
|
@@ -2541,7 +2582,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2541
2582
|
open(openOptions);
|
|
2542
2583
|
}
|
|
2543
2584
|
};
|
|
2544
|
-
return /* @__PURE__ */
|
|
2585
|
+
return /* @__PURE__ */ React40.createElement(Stack13, { gap: 1 }, /* @__PURE__ */ React40.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React40.createElement(ControlFormLabel, null, " ", __13("SVG", "elementor"), " "), /* @__PURE__ */ React40.createElement(ControlActions, null, /* @__PURE__ */ React40.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React40.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React40.createElement(CircularProgress3, { role: "progressbar" }) : /* @__PURE__ */ React40.createElement(
|
|
2545
2586
|
CardMedia2,
|
|
2546
2587
|
{
|
|
2547
2588
|
component: "img",
|
|
@@ -2549,7 +2590,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2549
2590
|
alt: __13("Preview SVG", "elementor"),
|
|
2550
2591
|
sx: { maxHeight: "140px", width: "50px" }
|
|
2551
2592
|
}
|
|
2552
|
-
)), /* @__PURE__ */
|
|
2593
|
+
)), /* @__PURE__ */ React40.createElement(
|
|
2553
2594
|
CardOverlay2,
|
|
2554
2595
|
{
|
|
2555
2596
|
sx: {
|
|
@@ -2558,7 +2599,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2558
2599
|
}
|
|
2559
2600
|
}
|
|
2560
2601
|
},
|
|
2561
|
-
/* @__PURE__ */
|
|
2602
|
+
/* @__PURE__ */ React40.createElement(Stack13, { gap: 1 }, /* @__PURE__ */ React40.createElement(
|
|
2562
2603
|
Button4,
|
|
2563
2604
|
{
|
|
2564
2605
|
size: "tiny",
|
|
@@ -2567,13 +2608,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
2567
2608
|
onClick: () => handleClick(MODE_BROWSE)
|
|
2568
2609
|
},
|
|
2569
2610
|
__13("Select SVG", "elementor")
|
|
2570
|
-
), /* @__PURE__ */
|
|
2611
|
+
), /* @__PURE__ */ React40.createElement(
|
|
2571
2612
|
Button4,
|
|
2572
2613
|
{
|
|
2573
2614
|
size: "tiny",
|
|
2574
2615
|
variant: "text",
|
|
2575
2616
|
color: "inherit",
|
|
2576
|
-
startIcon: /* @__PURE__ */
|
|
2617
|
+
startIcon: /* @__PURE__ */ React40.createElement(UploadIcon2, null),
|
|
2577
2618
|
onClick: () => handleClick(MODE_UPLOAD)
|
|
2578
2619
|
},
|
|
2579
2620
|
__13("Upload", "elementor")
|
|
@@ -2582,14 +2623,14 @@ var SvgMediaControl = createControl(() => {
|
|
|
2582
2623
|
});
|
|
2583
2624
|
|
|
2584
2625
|
// src/controls/background-control/background-control.tsx
|
|
2585
|
-
import * as
|
|
2626
|
+
import * as React47 from "react";
|
|
2586
2627
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
2587
2628
|
import { isExperimentActive as isExperimentActive3 } from "@elementor/editor-v1-adapters";
|
|
2588
2629
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
2589
2630
|
import { __ as __19 } from "@wordpress/i18n";
|
|
2590
2631
|
|
|
2591
2632
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
2592
|
-
import * as
|
|
2633
|
+
import * as React46 from "react";
|
|
2593
2634
|
import {
|
|
2594
2635
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
2595
2636
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
@@ -2605,7 +2646,7 @@ import { parseEnv } from "@elementor/env";
|
|
|
2605
2646
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
2606
2647
|
|
|
2607
2648
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
2608
|
-
import * as
|
|
2649
|
+
import * as React41 from "react";
|
|
2609
2650
|
import {
|
|
2610
2651
|
backgroundGradientOverlayPropTypeUtil,
|
|
2611
2652
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -2652,7 +2693,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
2652
2693
|
positions: positions?.value.split(" ")
|
|
2653
2694
|
};
|
|
2654
2695
|
};
|
|
2655
|
-
return /* @__PURE__ */
|
|
2696
|
+
return /* @__PURE__ */ React41.createElement(ControlActions, null, /* @__PURE__ */ React41.createElement(
|
|
2656
2697
|
UnstableGradientBox,
|
|
2657
2698
|
{
|
|
2658
2699
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -2677,7 +2718,7 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
2677
2718
|
});
|
|
2678
2719
|
|
|
2679
2720
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
2680
|
-
import * as
|
|
2721
|
+
import * as React42 from "react";
|
|
2681
2722
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
2682
2723
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
2683
2724
|
import { __ as __14 } from "@wordpress/i18n";
|
|
@@ -2685,22 +2726,22 @@ var attachmentControlOptions = [
|
|
|
2685
2726
|
{
|
|
2686
2727
|
value: "fixed",
|
|
2687
2728
|
label: __14("Fixed", "elementor"),
|
|
2688
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2729
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(PinIcon, { fontSize: size }),
|
|
2689
2730
|
showTooltip: true
|
|
2690
2731
|
},
|
|
2691
2732
|
{
|
|
2692
2733
|
value: "scroll",
|
|
2693
2734
|
label: __14("Scroll", "elementor"),
|
|
2694
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2735
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(PinnedOffIcon, { fontSize: size }),
|
|
2695
2736
|
showTooltip: true
|
|
2696
2737
|
}
|
|
2697
2738
|
];
|
|
2698
2739
|
var BackgroundImageOverlayAttachment = () => {
|
|
2699
|
-
return /* @__PURE__ */
|
|
2740
|
+
return /* @__PURE__ */ React42.createElement(PopoverGridContainer, null, /* @__PURE__ */ React42.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlFormLabel, null, __14("Attachment", "elementor"))), /* @__PURE__ */ React42.createElement(Grid10, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React42.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
2700
2741
|
};
|
|
2701
2742
|
|
|
2702
2743
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
2703
|
-
import * as
|
|
2744
|
+
import * as React43 from "react";
|
|
2704
2745
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil10 } from "@elementor/editor-props";
|
|
2705
2746
|
import { MenuListItem as MenuListItem4 } from "@elementor/editor-ui";
|
|
2706
2747
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
@@ -2730,55 +2771,56 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2730
2771
|
stringPropContext.setValue(value);
|
|
2731
2772
|
}
|
|
2732
2773
|
};
|
|
2733
|
-
return /* @__PURE__ */
|
|
2774
|
+
return /* @__PURE__ */ React43.createElement(Grid11, { container: true, spacing: 1.5 }, /* @__PURE__ */ React43.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(PopoverGridContainer, null, /* @__PURE__ */ React43.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlFormLabel, null, __15("Position", "elementor"))), /* @__PURE__ */ React43.createElement(Grid11, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React43.createElement(
|
|
2734
2775
|
Select3,
|
|
2735
2776
|
{
|
|
2777
|
+
fullWidth: true,
|
|
2736
2778
|
size: "tiny",
|
|
2737
|
-
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? "",
|
|
2738
2779
|
onChange: handlePositionChange,
|
|
2739
|
-
|
|
2780
|
+
disabled: stringPropContext.disabled,
|
|
2781
|
+
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
2740
2782
|
},
|
|
2741
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
2742
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2783
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React43.createElement(MenuListItem4, { key: value, value: value ?? "" }, label))
|
|
2784
|
+
)))), isCustom ? /* @__PURE__ */ React43.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React43.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(Grid11, { container: true, spacing: 1.5 }, /* @__PURE__ */ React43.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React43.createElement(SizeControl, { startIcon: /* @__PURE__ */ React43.createElement(LetterXIcon, { fontSize: "tiny" }) }))), /* @__PURE__ */ React43.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React43.createElement(SizeControl, { startIcon: /* @__PURE__ */ React43.createElement(LetterYIcon, { fontSize: "tiny" }) })))))) : null);
|
|
2743
2785
|
};
|
|
2744
2786
|
|
|
2745
2787
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
2746
|
-
import * as
|
|
2747
|
-
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as
|
|
2788
|
+
import * as React44 from "react";
|
|
2789
|
+
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon3 } from "@elementor/icons";
|
|
2748
2790
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
2749
2791
|
import { __ as __16 } from "@wordpress/i18n";
|
|
2750
2792
|
var repeatControlOptions = [
|
|
2751
2793
|
{
|
|
2752
2794
|
value: "repeat",
|
|
2753
2795
|
label: __16("Repeat", "elementor"),
|
|
2754
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2796
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(GridDotsIcon, { fontSize: size }),
|
|
2755
2797
|
showTooltip: true
|
|
2756
2798
|
},
|
|
2757
2799
|
{
|
|
2758
2800
|
value: "repeat-x",
|
|
2759
2801
|
label: __16("Repeat-x", "elementor"),
|
|
2760
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2802
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
2761
2803
|
showTooltip: true
|
|
2762
2804
|
},
|
|
2763
2805
|
{
|
|
2764
2806
|
value: "repeat-y",
|
|
2765
2807
|
label: __16("Repeat-y", "elementor"),
|
|
2766
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2808
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
2767
2809
|
showTooltip: true
|
|
2768
2810
|
},
|
|
2769
2811
|
{
|
|
2770
2812
|
value: "no-repeat",
|
|
2771
2813
|
label: __16("No-repeat", "elementor"),
|
|
2772
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2814
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(XIcon3, { fontSize: size }),
|
|
2773
2815
|
showTooltip: true
|
|
2774
2816
|
}
|
|
2775
2817
|
];
|
|
2776
2818
|
var BackgroundImageOverlayRepeat = () => {
|
|
2777
|
-
return /* @__PURE__ */
|
|
2819
|
+
return /* @__PURE__ */ React44.createElement(PopoverGridContainer, null, /* @__PURE__ */ React44.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlFormLabel, null, __16("Repeat", "elementor"))), /* @__PURE__ */ React44.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React44.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
2778
2820
|
};
|
|
2779
2821
|
|
|
2780
2822
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
2781
|
-
import * as
|
|
2823
|
+
import * as React45 from "react";
|
|
2782
2824
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil11 } from "@elementor/editor-props";
|
|
2783
2825
|
import {
|
|
2784
2826
|
ArrowBarBothIcon,
|
|
@@ -2794,25 +2836,25 @@ var sizeControlOptions = [
|
|
|
2794
2836
|
{
|
|
2795
2837
|
value: "auto",
|
|
2796
2838
|
label: __17("Auto", "elementor"),
|
|
2797
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2839
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(LetterAIcon, { fontSize: size }),
|
|
2798
2840
|
showTooltip: true
|
|
2799
2841
|
},
|
|
2800
2842
|
{
|
|
2801
2843
|
value: "cover",
|
|
2802
2844
|
label: __17("Cover", "elementor"),
|
|
2803
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2845
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
2804
2846
|
showTooltip: true
|
|
2805
2847
|
},
|
|
2806
2848
|
{
|
|
2807
2849
|
value: "contain",
|
|
2808
2850
|
label: __17("Contain", "elementor"),
|
|
2809
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2851
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
2810
2852
|
showTooltip: true
|
|
2811
2853
|
},
|
|
2812
2854
|
{
|
|
2813
2855
|
value: "custom",
|
|
2814
2856
|
label: __17("Custom", "elementor"),
|
|
2815
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2857
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(PencilIcon, { fontSize: size }),
|
|
2816
2858
|
showTooltip: true
|
|
2817
2859
|
}
|
|
2818
2860
|
];
|
|
@@ -2827,24 +2869,25 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2827
2869
|
stringPropContext.setValue(size);
|
|
2828
2870
|
}
|
|
2829
2871
|
};
|
|
2830
|
-
return /* @__PURE__ */
|
|
2872
|
+
return /* @__PURE__ */ React45.createElement(Grid13, { container: true, spacing: 1.5 }, /* @__PURE__ */ React45.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React45.createElement(PopoverGridContainer, null, /* @__PURE__ */ React45.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlFormLabel, null, __17("Size", "elementor"))), /* @__PURE__ */ React45.createElement(Grid13, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React45.createElement(
|
|
2831
2873
|
ControlToggleButtonGroup,
|
|
2832
2874
|
{
|
|
2833
2875
|
exclusive: true,
|
|
2834
2876
|
items: sizeControlOptions,
|
|
2835
|
-
|
|
2836
|
-
|
|
2877
|
+
onChange: handleSizeChange,
|
|
2878
|
+
disabled: stringPropContext.disabled,
|
|
2879
|
+
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
2837
2880
|
}
|
|
2838
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2881
|
+
)))), isCustom ? /* @__PURE__ */ React45.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React45.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React45.createElement(PopoverGridContainer, null, /* @__PURE__ */ React45.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React45.createElement(
|
|
2839
2882
|
SizeControl,
|
|
2840
2883
|
{
|
|
2841
|
-
startIcon: /* @__PURE__ */
|
|
2884
|
+
startIcon: /* @__PURE__ */ React45.createElement(ArrowsMoveHorizontalIcon2, { fontSize: "tiny" }),
|
|
2842
2885
|
extendedValues: ["auto"]
|
|
2843
2886
|
}
|
|
2844
|
-
))), /* @__PURE__ */
|
|
2887
|
+
))), /* @__PURE__ */ React45.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React45.createElement(
|
|
2845
2888
|
SizeControl,
|
|
2846
2889
|
{
|
|
2847
|
-
startIcon: /* @__PURE__ */
|
|
2890
|
+
startIcon: /* @__PURE__ */ React45.createElement(ArrowsMoveVerticalIcon2, { fontSize: "tiny" }),
|
|
2848
2891
|
extendedValues: ["auto"]
|
|
2849
2892
|
}
|
|
2850
2893
|
)))))) : null);
|
|
@@ -2951,7 +2994,7 @@ var backgroundResolutionOptions = [
|
|
|
2951
2994
|
];
|
|
2952
2995
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
2953
2996
|
const { propType, value: overlayValues, setValue, disabled } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
2954
|
-
return /* @__PURE__ */
|
|
2997
|
+
return /* @__PURE__ */ React46.createElement(PropProvider, { propType, value: overlayValues, setValue, disabled }, /* @__PURE__ */ React46.createElement(
|
|
2955
2998
|
Repeater,
|
|
2956
2999
|
{
|
|
2957
3000
|
openOnAdd: true,
|
|
@@ -2969,7 +3012,7 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
|
2969
3012
|
));
|
|
2970
3013
|
});
|
|
2971
3014
|
var ItemContent2 = ({ anchorEl = null, bind }) => {
|
|
2972
|
-
return /* @__PURE__ */
|
|
3015
|
+
return /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React46.createElement(Content2, { anchorEl }));
|
|
2973
3016
|
};
|
|
2974
3017
|
var Content2 = ({ anchorEl }) => {
|
|
2975
3018
|
const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
|
|
@@ -2977,7 +3020,7 @@ var Content2 = ({ anchorEl }) => {
|
|
|
2977
3020
|
color: initialBackgroundColorOverlay.value,
|
|
2978
3021
|
gradient: initialBackgroundGradientOverlay.value
|
|
2979
3022
|
});
|
|
2980
|
-
return /* @__PURE__ */
|
|
3023
|
+
return /* @__PURE__ */ React46.createElement(Box6, { sx: { width: "100%" } }, /* @__PURE__ */ React46.createElement(Box6, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React46.createElement(
|
|
2981
3024
|
Tabs,
|
|
2982
3025
|
{
|
|
2983
3026
|
size: "small",
|
|
@@ -2985,19 +3028,19 @@ var Content2 = ({ anchorEl }) => {
|
|
|
2985
3028
|
...getTabsProps(),
|
|
2986
3029
|
"aria-label": __18("Background Overlay", "elementor")
|
|
2987
3030
|
},
|
|
2988
|
-
/* @__PURE__ */
|
|
2989
|
-
/* @__PURE__ */
|
|
2990
|
-
/* @__PURE__ */
|
|
2991
|
-
)), /* @__PURE__ */
|
|
3031
|
+
/* @__PURE__ */ React46.createElement(Tab, { label: __18("Image", "elementor"), ...getTabProps("image") }),
|
|
3032
|
+
/* @__PURE__ */ React46.createElement(Tab, { label: __18("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
3033
|
+
/* @__PURE__ */ React46.createElement(Tab, { label: __18("Color", "elementor"), ...getTabProps("color") })
|
|
3034
|
+
)), /* @__PURE__ */ React46.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React46.createElement(PopoverContent, null, /* @__PURE__ */ React46.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React46.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React46.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React46.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React46.createElement(PopoverContent, null, /* @__PURE__ */ React46.createElement(ColorOverlayContent, { anchorEl }))));
|
|
2992
3035
|
};
|
|
2993
3036
|
var ItemIcon2 = ({ value }) => {
|
|
2994
3037
|
switch (value.$$type) {
|
|
2995
3038
|
case "background-image-overlay":
|
|
2996
|
-
return /* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ React46.createElement(ItemIconImage, { value });
|
|
2997
3040
|
case "background-color-overlay":
|
|
2998
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ React46.createElement(ItemIconColor, { value });
|
|
2999
3042
|
case "background-gradient-overlay":
|
|
3000
|
-
return /* @__PURE__ */
|
|
3043
|
+
return /* @__PURE__ */ React46.createElement(ItemIconGradient, { value });
|
|
3001
3044
|
default:
|
|
3002
3045
|
return null;
|
|
3003
3046
|
}
|
|
@@ -3010,11 +3053,11 @@ var extractColorFrom = (prop) => {
|
|
|
3010
3053
|
};
|
|
3011
3054
|
var ItemIconColor = ({ value: prop }) => {
|
|
3012
3055
|
const color = extractColorFrom(prop);
|
|
3013
|
-
return /* @__PURE__ */
|
|
3056
|
+
return /* @__PURE__ */ React46.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
3014
3057
|
};
|
|
3015
3058
|
var ItemIconImage = ({ value }) => {
|
|
3016
3059
|
const { imageUrl } = useImage(value);
|
|
3017
|
-
return /* @__PURE__ */
|
|
3060
|
+
return /* @__PURE__ */ React46.createElement(
|
|
3018
3061
|
CardMedia3,
|
|
3019
3062
|
{
|
|
3020
3063
|
image: imageUrl,
|
|
@@ -3029,47 +3072,47 @@ var ItemIconImage = ({ value }) => {
|
|
|
3029
3072
|
};
|
|
3030
3073
|
var ItemIconGradient = ({ value }) => {
|
|
3031
3074
|
const gradient = getGradientValue(value);
|
|
3032
|
-
return /* @__PURE__ */
|
|
3075
|
+
return /* @__PURE__ */ React46.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
3033
3076
|
};
|
|
3034
3077
|
var ItemLabel2 = ({ value }) => {
|
|
3035
3078
|
switch (value.$$type) {
|
|
3036
3079
|
case "background-image-overlay":
|
|
3037
|
-
return /* @__PURE__ */
|
|
3080
|
+
return /* @__PURE__ */ React46.createElement(ItemLabelImage, { value });
|
|
3038
3081
|
case "background-color-overlay":
|
|
3039
|
-
return /* @__PURE__ */
|
|
3082
|
+
return /* @__PURE__ */ React46.createElement(ItemLabelColor, { value });
|
|
3040
3083
|
case "background-gradient-overlay":
|
|
3041
|
-
return /* @__PURE__ */
|
|
3084
|
+
return /* @__PURE__ */ React46.createElement(ItemLabelGradient, { value });
|
|
3042
3085
|
default:
|
|
3043
3086
|
return null;
|
|
3044
3087
|
}
|
|
3045
3088
|
};
|
|
3046
3089
|
var ItemLabelColor = ({ value: prop }) => {
|
|
3047
3090
|
const color = extractColorFrom(prop);
|
|
3048
|
-
return /* @__PURE__ */
|
|
3091
|
+
return /* @__PURE__ */ React46.createElement("span", null, color);
|
|
3049
3092
|
};
|
|
3050
3093
|
var ItemLabelImage = ({ value }) => {
|
|
3051
3094
|
const { imageTitle } = useImage(value);
|
|
3052
|
-
return /* @__PURE__ */
|
|
3095
|
+
return /* @__PURE__ */ React46.createElement("span", null, imageTitle);
|
|
3053
3096
|
};
|
|
3054
3097
|
var ItemLabelGradient = ({ value }) => {
|
|
3055
3098
|
if (value.value.type.value === "linear") {
|
|
3056
|
-
return /* @__PURE__ */
|
|
3099
|
+
return /* @__PURE__ */ React46.createElement("span", null, __18("Linear Gradient", "elementor"));
|
|
3057
3100
|
}
|
|
3058
|
-
return /* @__PURE__ */
|
|
3101
|
+
return /* @__PURE__ */ React46.createElement("span", null, __18("Radial Gradient", "elementor"));
|
|
3059
3102
|
};
|
|
3060
3103
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
3061
3104
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
3062
|
-
return /* @__PURE__ */
|
|
3105
|
+
return /* @__PURE__ */ React46.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React46.createElement(ColorControl, { anchorEl })));
|
|
3063
3106
|
};
|
|
3064
3107
|
var ImageOverlayContent = () => {
|
|
3065
3108
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
3066
|
-
return /* @__PURE__ */
|
|
3109
|
+
return /* @__PURE__ */ React46.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React46.createElement(Grid14, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React46.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(
|
|
3067
3110
|
ImageControl,
|
|
3068
3111
|
{
|
|
3069
3112
|
resolutionLabel: __18("Resolution", "elementor"),
|
|
3070
3113
|
sizes: backgroundResolutionOptions
|
|
3071
3114
|
}
|
|
3072
|
-
)))), /* @__PURE__ */
|
|
3115
|
+
)))), /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React46.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React46.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React46.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React46.createElement(BackgroundImageOverlayAttachment, null)));
|
|
3073
3116
|
};
|
|
3074
3117
|
var StyledUnstableColorIndicator = styled6(UnstableColorIndicator2)(({ theme }) => ({
|
|
3075
3118
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -3109,11 +3152,11 @@ var BackgroundControl = createControl(() => {
|
|
|
3109
3152
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
3110
3153
|
const isUsingNestedProps = isExperimentActive3("e_v_3_30");
|
|
3111
3154
|
const colorLabel = __19("Color", "elementor");
|
|
3112
|
-
return /* @__PURE__ */
|
|
3155
|
+
return /* @__PURE__ */ React47.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React47.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React47.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React47.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React47.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid15, { item: true, xs: 6 }, isUsingNestedProps ? /* @__PURE__ */ React47.createElement(ControlLabel, null, colorLabel) : /* @__PURE__ */ React47.createElement(ControlFormLabel, null, colorLabel)), /* @__PURE__ */ React47.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ColorControl, null)))));
|
|
3113
3156
|
});
|
|
3114
3157
|
|
|
3115
3158
|
// src/controls/switch-control.tsx
|
|
3116
|
-
import * as
|
|
3159
|
+
import * as React48 from "react";
|
|
3117
3160
|
import { booleanPropTypeUtil as booleanPropTypeUtil2 } from "@elementor/editor-props";
|
|
3118
3161
|
import { Switch as Switch2 } from "@elementor/ui";
|
|
3119
3162
|
var SwitchControl2 = createControl(() => {
|
|
@@ -3121,7 +3164,7 @@ var SwitchControl2 = createControl(() => {
|
|
|
3121
3164
|
const handleChange = (event) => {
|
|
3122
3165
|
setValue(event.target.checked);
|
|
3123
3166
|
};
|
|
3124
|
-
return /* @__PURE__ */
|
|
3167
|
+
return /* @__PURE__ */ React48.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React48.createElement(Switch2, { checked: !!value, onChange: handleChange, size: "small", disabled }));
|
|
3125
3168
|
});
|
|
3126
3169
|
export {
|
|
3127
3170
|
AspectRatioControl,
|
|
@@ -3136,6 +3179,7 @@ export {
|
|
|
3136
3179
|
ControlToggleButtonGroup,
|
|
3137
3180
|
EqualUnequalSizesControl,
|
|
3138
3181
|
FontFamilyControl,
|
|
3182
|
+
FontFamilySelector,
|
|
3139
3183
|
GapControl,
|
|
3140
3184
|
ImageControl,
|
|
3141
3185
|
LinkControl,
|