@elementor/editor-controls 0.35.0 → 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 +14 -0
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +123 -88
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +123 -90
- 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 +8 -10
- package/src/components/repeater.tsx +2 -4
- package/src/components/sortable.tsx +4 -2
- 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 +3 -1
- 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 = ({
|
|
@@ -1661,11 +1682,11 @@ import { bindPopover as bindPopover3, bindTrigger as bindTrigger3, Popover as Po
|
|
|
1661
1682
|
// src/components/font-family-selector.tsx
|
|
1662
1683
|
import { useEffect as useEffect4, useRef as useRef4, useState as useState5 } from "react";
|
|
1663
1684
|
import * as React32 from "react";
|
|
1664
|
-
import {
|
|
1685
|
+
import { PopoverHeader } from "@elementor/editor-ui";
|
|
1686
|
+
import { SearchIcon, TextIcon } from "@elementor/icons";
|
|
1665
1687
|
import {
|
|
1666
1688
|
Box as Box3,
|
|
1667
1689
|
Divider as Divider2,
|
|
1668
|
-
IconButton as IconButton2,
|
|
1669
1690
|
InputAdornment as InputAdornment3,
|
|
1670
1691
|
Link,
|
|
1671
1692
|
MenuList,
|
|
@@ -1718,7 +1739,14 @@ var FontFamilySelector = ({
|
|
|
1718
1739
|
setSearchValue("");
|
|
1719
1740
|
onClose();
|
|
1720
1741
|
};
|
|
1721
|
-
return /* @__PURE__ */ React32.createElement(Stack9, null, /* @__PURE__ */ React32.createElement(
|
|
1742
|
+
return /* @__PURE__ */ React32.createElement(Stack9, null, /* @__PURE__ */ React32.createElement(
|
|
1743
|
+
PopoverHeader,
|
|
1744
|
+
{
|
|
1745
|
+
title: __8("Font Family", "elementor"),
|
|
1746
|
+
onClose: handleClose,
|
|
1747
|
+
icon: /* @__PURE__ */ React32.createElement(TextIcon, { fontSize: SIZE2 })
|
|
1748
|
+
}
|
|
1749
|
+
), /* @__PURE__ */ React32.createElement(Box3, { px: 1.5, pb: 1 }, /* @__PURE__ */ React32.createElement(
|
|
1722
1750
|
TextField5,
|
|
1723
1751
|
{
|
|
1724
1752
|
autoFocus: true,
|
|
@@ -1898,6 +1926,7 @@ var useDebounce = (fn, delay) => {
|
|
|
1898
1926
|
};
|
|
1899
1927
|
|
|
1900
1928
|
// src/controls/font-family-control/font-family-control.tsx
|
|
1929
|
+
var SIZE3 = "tiny";
|
|
1901
1930
|
var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
1902
1931
|
const { value: fontFamily, setValue: setFontFamily, disabled } = useBoundProp(stringPropTypeUtil6);
|
|
1903
1932
|
const popoverState = usePopupState4({ variant: "popover" });
|
|
@@ -1906,7 +1935,7 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1906
1935
|
{
|
|
1907
1936
|
variant: "outlined",
|
|
1908
1937
|
label: fontFamily,
|
|
1909
|
-
endIcon: /* @__PURE__ */ React33.createElement(ChevronDownIcon2, { fontSize:
|
|
1938
|
+
endIcon: /* @__PURE__ */ React33.createElement(ChevronDownIcon2, { fontSize: SIZE3 }),
|
|
1910
1939
|
...bindTrigger3(popoverState),
|
|
1911
1940
|
fullWidth: true,
|
|
1912
1941
|
disabled
|
|
@@ -1966,18 +1995,18 @@ import { InfoTipCard } from "@elementor/editor-ui";
|
|
|
1966
1995
|
import { httpService as httpService2 } from "@elementor/http-client";
|
|
1967
1996
|
import { AlertTriangleIcon, MinusIcon, PlusIcon as PlusIcon2 } from "@elementor/icons";
|
|
1968
1997
|
import { useSessionStorage } from "@elementor/session";
|
|
1969
|
-
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";
|
|
1970
1999
|
import { debounce as debounce2 } from "@elementor/utils";
|
|
1971
2000
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1972
2001
|
|
|
1973
2002
|
// src/components/autocomplete.tsx
|
|
1974
2003
|
import * as React35 from "react";
|
|
1975
2004
|
import { forwardRef as forwardRef2 } from "react";
|
|
1976
|
-
import { XIcon as
|
|
2005
|
+
import { XIcon as XIcon2 } from "@elementor/icons";
|
|
1977
2006
|
import {
|
|
1978
2007
|
Autocomplete as AutocompleteBase,
|
|
1979
2008
|
Box as Box4,
|
|
1980
|
-
IconButton as
|
|
2009
|
+
IconButton as IconButton2,
|
|
1981
2010
|
InputAdornment as InputAdornment4,
|
|
1982
2011
|
TextField as TextField7
|
|
1983
2012
|
} from "@elementor/ui";
|
|
@@ -2061,7 +2090,7 @@ var ClearButton = ({
|
|
|
2061
2090
|
allowClear,
|
|
2062
2091
|
handleChange,
|
|
2063
2092
|
params
|
|
2064
|
-
}) => /* @__PURE__ */ React35.createElement(InputAdornment4, { position: "end" }, allowClear && /* @__PURE__ */ React35.createElement(
|
|
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 })));
|
|
2065
2094
|
function findMatchingOption(options, optionId = null) {
|
|
2066
2095
|
const formattedOption = (optionId || "").toString();
|
|
2067
2096
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -2083,7 +2112,7 @@ function _factoryFilter(newValue, options, minInputLength) {
|
|
|
2083
2112
|
}
|
|
2084
2113
|
|
|
2085
2114
|
// src/controls/link-control.tsx
|
|
2086
|
-
var
|
|
2115
|
+
var SIZE4 = "tiny";
|
|
2087
2116
|
var learnMoreButton = {
|
|
2088
2117
|
label: __9("Learn More", "elementor"),
|
|
2089
2118
|
href: "https://go.elementor.com/element-link-inside-link-infotip"
|
|
@@ -2191,10 +2220,10 @@ var LinkControl = createControl((props) => {
|
|
|
2191
2220
|
onTextChange,
|
|
2192
2221
|
minInputLength
|
|
2193
2222
|
}
|
|
2194
|
-
))), /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React36.createElement(SwitchControl, { disabled: !value }))))));
|
|
2223
|
+
))), /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React36.createElement(SwitchControl, { disabled: propContext.disabled || !value }))))));
|
|
2195
2224
|
});
|
|
2196
2225
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
2197
|
-
return /* @__PURE__ */ React36.createElement(
|
|
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 }));
|
|
2198
2227
|
};
|
|
2199
2228
|
var SwitchControl = ({ disabled }) => {
|
|
2200
2229
|
const { value = false, setValue } = useBoundProp(booleanPropTypeUtil);
|
|
@@ -2298,6 +2327,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
2298
2327
|
const LinkedIcon = isLinked ? LinkIcon2 : DetachIcon2;
|
|
2299
2328
|
const linkedLabel = __10("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
2300
2329
|
const unlinkedLabel = __10("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
2330
|
+
const disabled = sizeDisabled || directionDisabled;
|
|
2301
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(
|
|
2302
2332
|
ToggleButton4,
|
|
2303
2333
|
{
|
|
@@ -2307,7 +2337,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
2307
2337
|
selected: isLinked,
|
|
2308
2338
|
sx: { marginLeft: "auto" },
|
|
2309
2339
|
onChange: onLinkToggle,
|
|
2310
|
-
disabled
|
|
2340
|
+
disabled
|
|
2311
2341
|
},
|
|
2312
2342
|
/* @__PURE__ */ React37.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2313
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 })))));
|
|
@@ -2744,10 +2774,11 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2744
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(
|
|
2745
2775
|
Select3,
|
|
2746
2776
|
{
|
|
2777
|
+
fullWidth: true,
|
|
2747
2778
|
size: "tiny",
|
|
2748
|
-
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? "",
|
|
2749
2779
|
onChange: handlePositionChange,
|
|
2750
|
-
|
|
2780
|
+
disabled: stringPropContext.disabled,
|
|
2781
|
+
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
2751
2782
|
},
|
|
2752
2783
|
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React43.createElement(MenuListItem4, { key: value, value: value ?? "" }, label))
|
|
2753
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);
|
|
@@ -2755,7 +2786,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2755
2786
|
|
|
2756
2787
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
2757
2788
|
import * as React44 from "react";
|
|
2758
|
-
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as
|
|
2789
|
+
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon3 } from "@elementor/icons";
|
|
2759
2790
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
2760
2791
|
import { __ as __16 } from "@wordpress/i18n";
|
|
2761
2792
|
var repeatControlOptions = [
|
|
@@ -2780,7 +2811,7 @@ var repeatControlOptions = [
|
|
|
2780
2811
|
{
|
|
2781
2812
|
value: "no-repeat",
|
|
2782
2813
|
label: __16("No-repeat", "elementor"),
|
|
2783
|
-
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(
|
|
2814
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(XIcon3, { fontSize: size }),
|
|
2784
2815
|
showTooltip: true
|
|
2785
2816
|
}
|
|
2786
2817
|
];
|
|
@@ -2843,8 +2874,9 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2843
2874
|
{
|
|
2844
2875
|
exclusive: true,
|
|
2845
2876
|
items: sizeControlOptions,
|
|
2846
|
-
|
|
2847
|
-
|
|
2877
|
+
onChange: handleSizeChange,
|
|
2878
|
+
disabled: stringPropContext.disabled,
|
|
2879
|
+
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
2848
2880
|
}
|
|
2849
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(
|
|
2850
2882
|
SizeControl,
|
|
@@ -2962,7 +2994,7 @@ var backgroundResolutionOptions = [
|
|
|
2962
2994
|
];
|
|
2963
2995
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
2964
2996
|
const { propType, value: overlayValues, setValue, disabled } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
2965
|
-
return /* @__PURE__ */ React46.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React46.createElement(
|
|
2997
|
+
return /* @__PURE__ */ React46.createElement(PropProvider, { propType, value: overlayValues, setValue, disabled }, /* @__PURE__ */ React46.createElement(
|
|
2966
2998
|
Repeater,
|
|
2967
2999
|
{
|
|
2968
3000
|
openOnAdd: true,
|
|
@@ -3147,6 +3179,7 @@ export {
|
|
|
3147
3179
|
ControlToggleButtonGroup,
|
|
3148
3180
|
EqualUnequalSizesControl,
|
|
3149
3181
|
FontFamilyControl,
|
|
3182
|
+
FontFamilySelector,
|
|
3150
3183
|
GapControl,
|
|
3151
3184
|
ImageControl,
|
|
3152
3185
|
LinkControl,
|