@elementor/editor-controls 0.34.2 → 0.35.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 +7 -0
- package/dist/index.js +247 -231
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +201 -190
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/font-family-selector.tsx +284 -0
- package/src/controls/aspect-ratio-control.tsx +51 -48
- package/src/controls/font-family-control/font-family-control.tsx +9 -272
package/dist/index.mjs
CHANGED
|
@@ -1653,13 +1653,16 @@ var Label = ({ label, bind }) => {
|
|
|
1653
1653
|
};
|
|
1654
1654
|
|
|
1655
1655
|
// 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";
|
|
1656
|
+
import * as React33 from "react";
|
|
1658
1657
|
import { stringPropTypeUtil as stringPropTypeUtil6 } from "@elementor/editor-props";
|
|
1659
|
-
import { ChevronDownIcon as ChevronDownIcon2
|
|
1658
|
+
import { ChevronDownIcon as ChevronDownIcon2 } from "@elementor/icons";
|
|
1659
|
+
import { bindPopover as bindPopover3, bindTrigger as bindTrigger3, Popover as Popover3, UnstableTag as UnstableTag2, usePopupState as usePopupState4 } from "@elementor/ui";
|
|
1660
|
+
|
|
1661
|
+
// src/components/font-family-selector.tsx
|
|
1662
|
+
import { useEffect as useEffect4, useRef as useRef4, useState as useState5 } from "react";
|
|
1663
|
+
import * as React32 from "react";
|
|
1664
|
+
import { SearchIcon, TextIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
1660
1665
|
import {
|
|
1661
|
-
bindPopover as bindPopover3,
|
|
1662
|
-
bindTrigger as bindTrigger3,
|
|
1663
1666
|
Box as Box3,
|
|
1664
1667
|
Divider as Divider2,
|
|
1665
1668
|
IconButton as IconButton2,
|
|
@@ -1667,18 +1670,21 @@ import {
|
|
|
1667
1670
|
Link,
|
|
1668
1671
|
MenuList,
|
|
1669
1672
|
MenuSubheader,
|
|
1670
|
-
Popover as Popover3,
|
|
1671
1673
|
Stack as Stack9,
|
|
1672
1674
|
styled as styled4,
|
|
1673
1675
|
TextField as TextField5,
|
|
1674
|
-
Typography as Typography3
|
|
1675
|
-
UnstableTag as UnstableTag2,
|
|
1676
|
-
usePopupState as usePopupState4
|
|
1676
|
+
Typography as Typography3
|
|
1677
1677
|
} from "@elementor/ui";
|
|
1678
1678
|
import { debounce } from "@elementor/utils";
|
|
1679
1679
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
1680
1680
|
import { __ as __8 } from "@wordpress/i18n";
|
|
1681
1681
|
|
|
1682
|
+
// src/controls/font-family-control/enqueue-font.tsx
|
|
1683
|
+
var enqueueFont = (fontFamily, context = "editor") => {
|
|
1684
|
+
const extendedWindow = window;
|
|
1685
|
+
return extendedWindow.elementor?.helpers?.enqueueFont?.(fontFamily, context) ?? null;
|
|
1686
|
+
};
|
|
1687
|
+
|
|
1682
1688
|
// src/hooks/use-filtered-font-families.ts
|
|
1683
1689
|
var useFilteredFontFamilies = (fontFamilies, searchValue) => {
|
|
1684
1690
|
return fontFamilies.reduce((acc, category) => {
|
|
@@ -1695,98 +1701,69 @@ var useFilteredFontFamilies = (fontFamilies, searchValue) => {
|
|
|
1695
1701
|
}, []);
|
|
1696
1702
|
};
|
|
1697
1703
|
|
|
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
|
|
1704
|
+
// src/components/font-family-selector.tsx
|
|
1705
1705
|
var SIZE2 = "tiny";
|
|
1706
|
-
var
|
|
1706
|
+
var FontFamilySelector = ({
|
|
1707
|
+
fontFamilies,
|
|
1708
|
+
fontFamily,
|
|
1709
|
+
onFontFamilyChange,
|
|
1710
|
+
onClose
|
|
1711
|
+
}) => {
|
|
1707
1712
|
const [searchValue, setSearchValue] = useState5("");
|
|
1708
|
-
const { value: fontFamily, setValue: setFontFamily, disabled } = useBoundProp(stringPropTypeUtil6);
|
|
1709
|
-
const popoverState = usePopupState4({ variant: "popover" });
|
|
1710
1713
|
const filteredFontFamilies = useFilteredFontFamilies(fontFamilies, searchValue);
|
|
1711
1714
|
const handleSearch = (event) => {
|
|
1712
1715
|
setSearchValue(event.target.value);
|
|
1713
1716
|
};
|
|
1714
1717
|
const handleClose = () => {
|
|
1715
1718
|
setSearchValue("");
|
|
1716
|
-
|
|
1719
|
+
onClose();
|
|
1717
1720
|
};
|
|
1718
|
-
return /* @__PURE__ */ React32.createElement(React32.
|
|
1719
|
-
|
|
1721
|
+
return /* @__PURE__ */ React32.createElement(Stack9, null, /* @__PURE__ */ React32.createElement(Stack9, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React32.createElement(TextIcon, { fontSize: SIZE2, sx: { mr: 0.5 } }), /* @__PURE__ */ React32.createElement(Typography3, { variant: "subtitle2" }, __8("Font Family", "elementor")), /* @__PURE__ */ React32.createElement(IconButton2, { size: SIZE2, sx: { ml: "auto" }, onClick: handleClose }, /* @__PURE__ */ React32.createElement(XIcon2, { fontSize: SIZE2 }))), /* @__PURE__ */ React32.createElement(Box3, { px: 1.5, pb: 1 }, /* @__PURE__ */ React32.createElement(
|
|
1722
|
+
TextField5,
|
|
1720
1723
|
{
|
|
1721
|
-
|
|
1722
|
-
label: fontFamily,
|
|
1723
|
-
endIcon: /* @__PURE__ */ React32.createElement(ChevronDownIcon2, { fontSize: "tiny" }),
|
|
1724
|
-
...bindTrigger3(popoverState),
|
|
1724
|
+
autoFocus: true,
|
|
1725
1725
|
fullWidth: true,
|
|
1726
|
-
|
|
1726
|
+
size: SIZE2,
|
|
1727
|
+
value: searchValue,
|
|
1728
|
+
placeholder: __8("Search", "elementor"),
|
|
1729
|
+
onChange: handleSearch,
|
|
1730
|
+
InputProps: {
|
|
1731
|
+
startAdornment: /* @__PURE__ */ React32.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React32.createElement(SearchIcon, { fontSize: SIZE2 }))
|
|
1732
|
+
}
|
|
1727
1733
|
}
|
|
1728
|
-
)), /* @__PURE__ */ React32.createElement(
|
|
1729
|
-
|
|
1734
|
+
)), /* @__PURE__ */ React32.createElement(Divider2, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React32.createElement(
|
|
1735
|
+
FontList,
|
|
1730
1736
|
{
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
onChange: handleSearch,
|
|
1746
|
-
InputProps: {
|
|
1747
|
-
startAdornment: /* @__PURE__ */ React32.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React32.createElement(SearchIcon, { fontSize: SIZE2 }))
|
|
1748
|
-
}
|
|
1749
|
-
}
|
|
1750
|
-
)), /* @__PURE__ */ React32.createElement(Divider2, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React32.createElement(
|
|
1751
|
-
FontList,
|
|
1752
|
-
{
|
|
1753
|
-
fontListItems: filteredFontFamilies,
|
|
1754
|
-
setFontFamily,
|
|
1755
|
-
handleClose,
|
|
1756
|
-
fontFamily
|
|
1737
|
+
fontListItems: filteredFontFamilies,
|
|
1738
|
+
setFontFamily: onFontFamilyChange,
|
|
1739
|
+
handleClose,
|
|
1740
|
+
fontFamily
|
|
1741
|
+
}
|
|
1742
|
+
) : /* @__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(
|
|
1743
|
+
Typography3,
|
|
1744
|
+
{
|
|
1745
|
+
variant: "subtitle2",
|
|
1746
|
+
color: "text.secondary",
|
|
1747
|
+
sx: {
|
|
1748
|
+
display: "flex",
|
|
1749
|
+
width: "100%",
|
|
1750
|
+
justifyContent: "center"
|
|
1757
1751
|
}
|
|
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
|
-
});
|
|
1752
|
+
},
|
|
1753
|
+
/* @__PURE__ */ React32.createElement("span", null, "\u201C"),
|
|
1754
|
+
/* @__PURE__ */ React32.createElement("span", { style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" } }, searchValue),
|
|
1755
|
+
/* @__PURE__ */ React32.createElement("span", null, "\u201D.")
|
|
1756
|
+
)), /* @__PURE__ */ React32.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __8("Try something else.", "elementor"), /* @__PURE__ */ React32.createElement(
|
|
1757
|
+
Link,
|
|
1758
|
+
{
|
|
1759
|
+
color: "secondary",
|
|
1760
|
+
variant: "caption",
|
|
1761
|
+
component: "button",
|
|
1762
|
+
onClick: () => setSearchValue("")
|
|
1763
|
+
},
|
|
1764
|
+
__8("Clear & try again", "elementor")
|
|
1765
|
+
)))));
|
|
1766
|
+
};
|
|
1790
1767
|
var LIST_ITEM_HEIGHT = 36;
|
|
1791
1768
|
var LIST_ITEMS_BUFFER = 6;
|
|
1792
1769
|
var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
@@ -1920,14 +1897,48 @@ var useDebounce = (fn, delay) => {
|
|
|
1920
1897
|
return debouncedFn;
|
|
1921
1898
|
};
|
|
1922
1899
|
|
|
1900
|
+
// src/controls/font-family-control/font-family-control.tsx
|
|
1901
|
+
var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
1902
|
+
const { value: fontFamily, setValue: setFontFamily, disabled } = useBoundProp(stringPropTypeUtil6);
|
|
1903
|
+
const popoverState = usePopupState4({ variant: "popover" });
|
|
1904
|
+
return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(ControlActions, null, /* @__PURE__ */ React33.createElement(
|
|
1905
|
+
UnstableTag2,
|
|
1906
|
+
{
|
|
1907
|
+
variant: "outlined",
|
|
1908
|
+
label: fontFamily,
|
|
1909
|
+
endIcon: /* @__PURE__ */ React33.createElement(ChevronDownIcon2, { fontSize: "tiny" }),
|
|
1910
|
+
...bindTrigger3(popoverState),
|
|
1911
|
+
fullWidth: true,
|
|
1912
|
+
disabled
|
|
1913
|
+
}
|
|
1914
|
+
)), /* @__PURE__ */ React33.createElement(
|
|
1915
|
+
Popover3,
|
|
1916
|
+
{
|
|
1917
|
+
disablePortal: true,
|
|
1918
|
+
disableScrollLock: true,
|
|
1919
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
1920
|
+
...bindPopover3(popoverState)
|
|
1921
|
+
},
|
|
1922
|
+
/* @__PURE__ */ React33.createElement(
|
|
1923
|
+
FontFamilySelector,
|
|
1924
|
+
{
|
|
1925
|
+
fontFamilies,
|
|
1926
|
+
fontFamily,
|
|
1927
|
+
onFontFamilyChange: setFontFamily,
|
|
1928
|
+
onClose: popoverState.close
|
|
1929
|
+
}
|
|
1930
|
+
)
|
|
1931
|
+
));
|
|
1932
|
+
});
|
|
1933
|
+
|
|
1923
1934
|
// src/controls/url-control.tsx
|
|
1924
|
-
import * as
|
|
1935
|
+
import * as React34 from "react";
|
|
1925
1936
|
import { urlPropTypeUtil } from "@elementor/editor-props";
|
|
1926
1937
|
import { TextField as TextField6 } from "@elementor/ui";
|
|
1927
1938
|
var UrlControl = createControl(({ placeholder }) => {
|
|
1928
1939
|
const { value, setValue, disabled } = useBoundProp(urlPropTypeUtil);
|
|
1929
1940
|
const handleChange = (event) => setValue(event.target.value);
|
|
1930
|
-
return /* @__PURE__ */
|
|
1941
|
+
return /* @__PURE__ */ React34.createElement(ControlActions, null, /* @__PURE__ */ React34.createElement(
|
|
1931
1942
|
TextField6,
|
|
1932
1943
|
{
|
|
1933
1944
|
size: "tiny",
|
|
@@ -1941,7 +1952,7 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1941
1952
|
});
|
|
1942
1953
|
|
|
1943
1954
|
// src/controls/link-control.tsx
|
|
1944
|
-
import * as
|
|
1955
|
+
import * as React36 from "react";
|
|
1945
1956
|
import { useMemo as useMemo2, useState as useState6 } from "react";
|
|
1946
1957
|
import { getLinkInLinkRestriction, selectElement } from "@elementor/editor-elements";
|
|
1947
1958
|
import {
|
|
@@ -1960,7 +1971,7 @@ import { debounce as debounce2 } from "@elementor/utils";
|
|
|
1960
1971
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1961
1972
|
|
|
1962
1973
|
// src/components/autocomplete.tsx
|
|
1963
|
-
import * as
|
|
1974
|
+
import * as React35 from "react";
|
|
1964
1975
|
import { forwardRef as forwardRef2 } from "react";
|
|
1965
1976
|
import { XIcon as XIcon3 } from "@elementor/icons";
|
|
1966
1977
|
import {
|
|
@@ -1986,7 +1997,7 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
1986
1997
|
const muiWarningPreventer = allowCustomValues || !!value?.toString()?.length;
|
|
1987
1998
|
const isOptionEqualToValue = muiWarningPreventer ? void 0 : () => true;
|
|
1988
1999
|
const isValueFromOptions = typeof value === "number" && !!findMatchingOption(options, value);
|
|
1989
|
-
return /* @__PURE__ */
|
|
2000
|
+
return /* @__PURE__ */ React35.createElement(
|
|
1990
2001
|
AutocompleteBase,
|
|
1991
2002
|
{
|
|
1992
2003
|
...restProps,
|
|
@@ -2004,8 +2015,8 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
2004
2015
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
2005
2016
|
isOptionEqualToValue,
|
|
2006
2017
|
filterOptions: () => optionKeys,
|
|
2007
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
2008
|
-
renderInput: (params) => /* @__PURE__ */
|
|
2018
|
+
renderOption: (optionProps, optionId) => /* @__PURE__ */ React35.createElement(Box4, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
|
|
2019
|
+
renderInput: (params) => /* @__PURE__ */ React35.createElement(
|
|
2009
2020
|
TextInput,
|
|
2010
2021
|
{
|
|
2011
2022
|
params,
|
|
@@ -2028,7 +2039,7 @@ var TextInput = ({
|
|
|
2028
2039
|
const onChange = (event) => {
|
|
2029
2040
|
handleChange(event.target.value);
|
|
2030
2041
|
};
|
|
2031
|
-
return /* @__PURE__ */
|
|
2042
|
+
return /* @__PURE__ */ React35.createElement(
|
|
2032
2043
|
TextField7,
|
|
2033
2044
|
{
|
|
2034
2045
|
...params,
|
|
@@ -2041,7 +2052,7 @@ var TextInput = ({
|
|
|
2041
2052
|
},
|
|
2042
2053
|
InputProps: {
|
|
2043
2054
|
...params.InputProps,
|
|
2044
|
-
endAdornment: /* @__PURE__ */
|
|
2055
|
+
endAdornment: /* @__PURE__ */ React35.createElement(ClearButton, { params, allowClear, handleChange })
|
|
2045
2056
|
}
|
|
2046
2057
|
}
|
|
2047
2058
|
);
|
|
@@ -2050,7 +2061,7 @@ var ClearButton = ({
|
|
|
2050
2061
|
allowClear,
|
|
2051
2062
|
handleChange,
|
|
2052
2063
|
params
|
|
2053
|
-
}) => /* @__PURE__ */
|
|
2064
|
+
}) => /* @__PURE__ */ React35.createElement(InputAdornment4, { position: "end" }, allowClear && /* @__PURE__ */ React35.createElement(IconButton3, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React35.createElement(XIcon3, { fontSize: params.size })));
|
|
2054
2065
|
function findMatchingOption(options, optionId = null) {
|
|
2055
2066
|
const formattedOption = (optionId || "").toString();
|
|
2056
2067
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -2149,7 +2160,7 @@ var LinkControl = createControl((props) => {
|
|
|
2149
2160
|
),
|
|
2150
2161
|
[endpoint]
|
|
2151
2162
|
);
|
|
2152
|
-
return /* @__PURE__ */
|
|
2163
|
+
return /* @__PURE__ */ React36.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React36.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React36.createElement(
|
|
2153
2164
|
Stack10,
|
|
2154
2165
|
{
|
|
2155
2166
|
direction: "row",
|
|
@@ -2159,8 +2170,8 @@ var LinkControl = createControl((props) => {
|
|
|
2159
2170
|
marginInlineEnd: -0.75
|
|
2160
2171
|
}
|
|
2161
2172
|
},
|
|
2162
|
-
/* @__PURE__ */
|
|
2163
|
-
/* @__PURE__ */
|
|
2173
|
+
/* @__PURE__ */ React36.createElement(ControlFormLabel, null, __9("Link", "elementor")),
|
|
2174
|
+
/* @__PURE__ */ React36.createElement(ConditionalInfoTip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React36.createElement(
|
|
2164
2175
|
ToggleIconControl,
|
|
2165
2176
|
{
|
|
2166
2177
|
disabled: shouldDisableAddingLink,
|
|
@@ -2169,7 +2180,7 @@ var LinkControl = createControl((props) => {
|
|
|
2169
2180
|
label: __9("Toggle link", "elementor")
|
|
2170
2181
|
}
|
|
2171
2182
|
))
|
|
2172
|
-
), /* @__PURE__ */
|
|
2183
|
+
), /* @__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
2184
|
Autocomplete,
|
|
2174
2185
|
{
|
|
2175
2186
|
options,
|
|
@@ -2180,10 +2191,10 @@ var LinkControl = createControl((props) => {
|
|
|
2180
2191
|
onTextChange,
|
|
2181
2192
|
minInputLength
|
|
2182
2193
|
}
|
|
2183
|
-
))), /* @__PURE__ */
|
|
2194
|
+
))), /* @__PURE__ */ React36.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React36.createElement(SwitchControl, { disabled: !value }))))));
|
|
2184
2195
|
});
|
|
2185
2196
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
2186
|
-
return /* @__PURE__ */
|
|
2197
|
+
return /* @__PURE__ */ React36.createElement(IconButton4, { size: SIZE3, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React36.createElement(MinusIcon, { fontSize: SIZE3 }) : /* @__PURE__ */ React36.createElement(PlusIcon2, { fontSize: SIZE3 }));
|
|
2187
2198
|
};
|
|
2188
2199
|
var SwitchControl = ({ disabled }) => {
|
|
2189
2200
|
const { value = false, setValue } = useBoundProp(booleanPropTypeUtil);
|
|
@@ -2195,7 +2206,7 @@ var SwitchControl = ({ disabled }) => {
|
|
|
2195
2206
|
opacity: 0
|
|
2196
2207
|
}
|
|
2197
2208
|
} : {};
|
|
2198
|
-
return /* @__PURE__ */
|
|
2209
|
+
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
2210
|
};
|
|
2200
2211
|
async function fetchOptions(ajaxUrl, params) {
|
|
2201
2212
|
if (!params || !ajaxUrl) {
|
|
@@ -2232,15 +2243,15 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2232
2243
|
selectElement(elementId);
|
|
2233
2244
|
}
|
|
2234
2245
|
};
|
|
2235
|
-
return shouldRestrict && isVisible ? /* @__PURE__ */
|
|
2246
|
+
return shouldRestrict && isVisible ? /* @__PURE__ */ React36.createElement(
|
|
2236
2247
|
Infotip,
|
|
2237
2248
|
{
|
|
2238
2249
|
placement: "right",
|
|
2239
|
-
content: /* @__PURE__ */
|
|
2250
|
+
content: /* @__PURE__ */ React36.createElement(
|
|
2240
2251
|
InfoTipCard,
|
|
2241
2252
|
{
|
|
2242
2253
|
content: INFOTIP_CONTENT[reason],
|
|
2243
|
-
svgIcon: /* @__PURE__ */
|
|
2254
|
+
svgIcon: /* @__PURE__ */ React36.createElement(AlertTriangleIcon, null),
|
|
2244
2255
|
learnMoreButton,
|
|
2245
2256
|
ctaButton: {
|
|
2246
2257
|
label: __9("Take me there", "elementor"),
|
|
@@ -2249,16 +2260,16 @@ var ConditionalInfoTip = ({ linkInLinkRestriction, isVisible, children }) => {
|
|
|
2249
2260
|
}
|
|
2250
2261
|
)
|
|
2251
2262
|
},
|
|
2252
|
-
/* @__PURE__ */
|
|
2253
|
-
) : /* @__PURE__ */
|
|
2263
|
+
/* @__PURE__ */ React36.createElement(Box5, null, children)
|
|
2264
|
+
) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, children);
|
|
2254
2265
|
};
|
|
2255
2266
|
var INFOTIP_CONTENT = {
|
|
2256
|
-
descendant: /* @__PURE__ */
|
|
2257
|
-
ancestor: /* @__PURE__ */
|
|
2267
|
+
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")),
|
|
2268
|
+
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
2269
|
};
|
|
2259
2270
|
|
|
2260
2271
|
// src/controls/gap-control.tsx
|
|
2261
|
-
import * as
|
|
2272
|
+
import * as React37 from "react";
|
|
2262
2273
|
import { layoutDirectionPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
|
|
2263
2274
|
import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
|
|
2264
2275
|
import { Grid as Grid8, Stack as Stack11, ToggleButton as ToggleButton4, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
@@ -2287,7 +2298,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
2287
2298
|
const LinkedIcon = isLinked ? LinkIcon2 : DetachIcon2;
|
|
2288
2299
|
const linkedLabel = __10("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
2289
2300
|
const unlinkedLabel = __10("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
2290
|
-
return /* @__PURE__ */
|
|
2301
|
+
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
2302
|
ToggleButton4,
|
|
2292
2303
|
{
|
|
2293
2304
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -2298,18 +2309,18 @@ var GapControl = createControl(({ label }) => {
|
|
|
2298
2309
|
onChange: onLinkToggle,
|
|
2299
2310
|
disabled: sizeDisabled || directionDisabled
|
|
2300
2311
|
},
|
|
2301
|
-
/* @__PURE__ */
|
|
2302
|
-
))), /* @__PURE__ */
|
|
2312
|
+
/* @__PURE__ */ React37.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2313
|
+
))), /* @__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
2314
|
});
|
|
2304
2315
|
var Control4 = ({ bind, isLinked }) => {
|
|
2305
2316
|
if (isLinked) {
|
|
2306
|
-
return /* @__PURE__ */
|
|
2317
|
+
return /* @__PURE__ */ React37.createElement(SizeControl, null);
|
|
2307
2318
|
}
|
|
2308
|
-
return /* @__PURE__ */
|
|
2319
|
+
return /* @__PURE__ */ React37.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React37.createElement(SizeControl, null));
|
|
2309
2320
|
};
|
|
2310
2321
|
|
|
2311
2322
|
// src/controls/aspect-ratio-control.tsx
|
|
2312
|
-
import * as
|
|
2323
|
+
import * as React38 from "react";
|
|
2313
2324
|
import { useState as useState7 } from "react";
|
|
2314
2325
|
import { stringPropTypeUtil as stringPropTypeUtil8 } from "@elementor/editor-props";
|
|
2315
2326
|
import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
|
|
@@ -2361,7 +2372,7 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2361
2372
|
setAspectRatioValue(`${customWidth}/${newHeight}`);
|
|
2362
2373
|
}
|
|
2363
2374
|
};
|
|
2364
|
-
return /* @__PURE__ */
|
|
2375
|
+
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
2376
|
Select2,
|
|
2366
2377
|
{
|
|
2367
2378
|
size: "tiny",
|
|
@@ -2373,9 +2384,9 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2373
2384
|
fullWidth: true
|
|
2374
2385
|
},
|
|
2375
2386
|
[...RATIO_OPTIONS, { label: __11("Custom", "elementor"), value: CUSTOM_RATIO }].map(
|
|
2376
|
-
({ label: optionLabel, ...props }) => /* @__PURE__ */
|
|
2387
|
+
({ label: optionLabel, ...props }) => /* @__PURE__ */ React38.createElement(MenuListItem3, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
|
|
2377
2388
|
)
|
|
2378
|
-
))), isCustom && /* @__PURE__ */
|
|
2389
|
+
))), 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
2390
|
TextField8,
|
|
2380
2391
|
{
|
|
2381
2392
|
size: "tiny",
|
|
@@ -2385,10 +2396,10 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2385
2396
|
value: customWidth,
|
|
2386
2397
|
onChange: handleCustomWidthChange,
|
|
2387
2398
|
InputProps: {
|
|
2388
|
-
startAdornment: /* @__PURE__ */
|
|
2399
|
+
startAdornment: /* @__PURE__ */ React38.createElement(ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
|
|
2389
2400
|
}
|
|
2390
2401
|
}
|
|
2391
|
-
)), /* @__PURE__ */
|
|
2402
|
+
)), /* @__PURE__ */ React38.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(
|
|
2392
2403
|
TextField8,
|
|
2393
2404
|
{
|
|
2394
2405
|
size: "tiny",
|
|
@@ -2398,14 +2409,14 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
2398
2409
|
value: customHeight,
|
|
2399
2410
|
onChange: handleCustomHeightChange,
|
|
2400
2411
|
InputProps: {
|
|
2401
|
-
startAdornment: /* @__PURE__ */
|
|
2412
|
+
startAdornment: /* @__PURE__ */ React38.createElement(ArrowsMoveVerticalIcon, { fontSize: "tiny" })
|
|
2402
2413
|
}
|
|
2403
2414
|
}
|
|
2404
|
-
))));
|
|
2415
|
+
)))));
|
|
2405
2416
|
});
|
|
2406
2417
|
|
|
2407
2418
|
// src/controls/svg-media-control.tsx
|
|
2408
|
-
import * as
|
|
2419
|
+
import * as React40 from "react";
|
|
2409
2420
|
import { useState as useState9 } from "react";
|
|
2410
2421
|
import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
|
|
2411
2422
|
import { UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
@@ -2414,7 +2425,7 @@ import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWp
|
|
|
2414
2425
|
import { __ as __13 } from "@wordpress/i18n";
|
|
2415
2426
|
|
|
2416
2427
|
// src/components/enable-unfiltered-modal.tsx
|
|
2417
|
-
import * as
|
|
2428
|
+
import * as React39 from "react";
|
|
2418
2429
|
import { useState as useState8 } from "react";
|
|
2419
2430
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
2420
2431
|
import {
|
|
@@ -2467,9 +2478,9 @@ var EnableUnfilteredModal = (props) => {
|
|
|
2467
2478
|
}
|
|
2468
2479
|
};
|
|
2469
2480
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
2470
|
-
return canManageOptions ? /* @__PURE__ */
|
|
2481
|
+
return canManageOptions ? /* @__PURE__ */ React39.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React39.createElement(NonAdminDialog, { ...dialogProps });
|
|
2471
2482
|
};
|
|
2472
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
2483
|
+
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
2484
|
Button3,
|
|
2474
2485
|
{
|
|
2475
2486
|
size: "medium",
|
|
@@ -2478,9 +2489,9 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
2478
2489
|
color: "primary",
|
|
2479
2490
|
disabled: isPending
|
|
2480
2491
|
},
|
|
2481
|
-
isPending ? /* @__PURE__ */
|
|
2492
|
+
isPending ? /* @__PURE__ */ React39.createElement(CircularProgress2, { size: 24 }) : __12("Enable", "elementor")
|
|
2482
2493
|
)));
|
|
2483
|
-
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */
|
|
2494
|
+
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
2495
|
|
|
2485
2496
|
// src/controls/svg-media-control.tsx
|
|
2486
2497
|
var TILE_SIZE = 8;
|
|
@@ -2541,7 +2552,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2541
2552
|
open(openOptions);
|
|
2542
2553
|
}
|
|
2543
2554
|
};
|
|
2544
|
-
return /* @__PURE__ */
|
|
2555
|
+
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
2556
|
CardMedia2,
|
|
2546
2557
|
{
|
|
2547
2558
|
component: "img",
|
|
@@ -2549,7 +2560,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2549
2560
|
alt: __13("Preview SVG", "elementor"),
|
|
2550
2561
|
sx: { maxHeight: "140px", width: "50px" }
|
|
2551
2562
|
}
|
|
2552
|
-
)), /* @__PURE__ */
|
|
2563
|
+
)), /* @__PURE__ */ React40.createElement(
|
|
2553
2564
|
CardOverlay2,
|
|
2554
2565
|
{
|
|
2555
2566
|
sx: {
|
|
@@ -2558,7 +2569,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2558
2569
|
}
|
|
2559
2570
|
}
|
|
2560
2571
|
},
|
|
2561
|
-
/* @__PURE__ */
|
|
2572
|
+
/* @__PURE__ */ React40.createElement(Stack13, { gap: 1 }, /* @__PURE__ */ React40.createElement(
|
|
2562
2573
|
Button4,
|
|
2563
2574
|
{
|
|
2564
2575
|
size: "tiny",
|
|
@@ -2567,13 +2578,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
2567
2578
|
onClick: () => handleClick(MODE_BROWSE)
|
|
2568
2579
|
},
|
|
2569
2580
|
__13("Select SVG", "elementor")
|
|
2570
|
-
), /* @__PURE__ */
|
|
2581
|
+
), /* @__PURE__ */ React40.createElement(
|
|
2571
2582
|
Button4,
|
|
2572
2583
|
{
|
|
2573
2584
|
size: "tiny",
|
|
2574
2585
|
variant: "text",
|
|
2575
2586
|
color: "inherit",
|
|
2576
|
-
startIcon: /* @__PURE__ */
|
|
2587
|
+
startIcon: /* @__PURE__ */ React40.createElement(UploadIcon2, null),
|
|
2577
2588
|
onClick: () => handleClick(MODE_UPLOAD)
|
|
2578
2589
|
},
|
|
2579
2590
|
__13("Upload", "elementor")
|
|
@@ -2582,14 +2593,14 @@ var SvgMediaControl = createControl(() => {
|
|
|
2582
2593
|
});
|
|
2583
2594
|
|
|
2584
2595
|
// src/controls/background-control/background-control.tsx
|
|
2585
|
-
import * as
|
|
2596
|
+
import * as React47 from "react";
|
|
2586
2597
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
2587
2598
|
import { isExperimentActive as isExperimentActive3 } from "@elementor/editor-v1-adapters";
|
|
2588
2599
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
2589
2600
|
import { __ as __19 } from "@wordpress/i18n";
|
|
2590
2601
|
|
|
2591
2602
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
2592
|
-
import * as
|
|
2603
|
+
import * as React46 from "react";
|
|
2593
2604
|
import {
|
|
2594
2605
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
2595
2606
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
@@ -2605,7 +2616,7 @@ import { parseEnv } from "@elementor/env";
|
|
|
2605
2616
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
2606
2617
|
|
|
2607
2618
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
2608
|
-
import * as
|
|
2619
|
+
import * as React41 from "react";
|
|
2609
2620
|
import {
|
|
2610
2621
|
backgroundGradientOverlayPropTypeUtil,
|
|
2611
2622
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -2652,7 +2663,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
2652
2663
|
positions: positions?.value.split(" ")
|
|
2653
2664
|
};
|
|
2654
2665
|
};
|
|
2655
|
-
return /* @__PURE__ */
|
|
2666
|
+
return /* @__PURE__ */ React41.createElement(ControlActions, null, /* @__PURE__ */ React41.createElement(
|
|
2656
2667
|
UnstableGradientBox,
|
|
2657
2668
|
{
|
|
2658
2669
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -2677,7 +2688,7 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
2677
2688
|
});
|
|
2678
2689
|
|
|
2679
2690
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
2680
|
-
import * as
|
|
2691
|
+
import * as React42 from "react";
|
|
2681
2692
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
2682
2693
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
2683
2694
|
import { __ as __14 } from "@wordpress/i18n";
|
|
@@ -2685,22 +2696,22 @@ var attachmentControlOptions = [
|
|
|
2685
2696
|
{
|
|
2686
2697
|
value: "fixed",
|
|
2687
2698
|
label: __14("Fixed", "elementor"),
|
|
2688
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2699
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(PinIcon, { fontSize: size }),
|
|
2689
2700
|
showTooltip: true
|
|
2690
2701
|
},
|
|
2691
2702
|
{
|
|
2692
2703
|
value: "scroll",
|
|
2693
2704
|
label: __14("Scroll", "elementor"),
|
|
2694
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2705
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(PinnedOffIcon, { fontSize: size }),
|
|
2695
2706
|
showTooltip: true
|
|
2696
2707
|
}
|
|
2697
2708
|
];
|
|
2698
2709
|
var BackgroundImageOverlayAttachment = () => {
|
|
2699
|
-
return /* @__PURE__ */
|
|
2710
|
+
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
2711
|
};
|
|
2701
2712
|
|
|
2702
2713
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
2703
|
-
import * as
|
|
2714
|
+
import * as React43 from "react";
|
|
2704
2715
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil10 } from "@elementor/editor-props";
|
|
2705
2716
|
import { MenuListItem as MenuListItem4 } from "@elementor/editor-ui";
|
|
2706
2717
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
@@ -2730,7 +2741,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2730
2741
|
stringPropContext.setValue(value);
|
|
2731
2742
|
}
|
|
2732
2743
|
};
|
|
2733
|
-
return /* @__PURE__ */
|
|
2744
|
+
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
2745
|
Select3,
|
|
2735
2746
|
{
|
|
2736
2747
|
size: "tiny",
|
|
@@ -2738,12 +2749,12 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2738
2749
|
onChange: handlePositionChange,
|
|
2739
2750
|
fullWidth: true
|
|
2740
2751
|
},
|
|
2741
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
2742
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2752
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React43.createElement(MenuListItem4, { key: value, value: value ?? "" }, label))
|
|
2753
|
+
)))), 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
2754
|
};
|
|
2744
2755
|
|
|
2745
2756
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
2746
|
-
import * as
|
|
2757
|
+
import * as React44 from "react";
|
|
2747
2758
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon4 } from "@elementor/icons";
|
|
2748
2759
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
2749
2760
|
import { __ as __16 } from "@wordpress/i18n";
|
|
@@ -2751,34 +2762,34 @@ var repeatControlOptions = [
|
|
|
2751
2762
|
{
|
|
2752
2763
|
value: "repeat",
|
|
2753
2764
|
label: __16("Repeat", "elementor"),
|
|
2754
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2765
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(GridDotsIcon, { fontSize: size }),
|
|
2755
2766
|
showTooltip: true
|
|
2756
2767
|
},
|
|
2757
2768
|
{
|
|
2758
2769
|
value: "repeat-x",
|
|
2759
2770
|
label: __16("Repeat-x", "elementor"),
|
|
2760
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2771
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
2761
2772
|
showTooltip: true
|
|
2762
2773
|
},
|
|
2763
2774
|
{
|
|
2764
2775
|
value: "repeat-y",
|
|
2765
2776
|
label: __16("Repeat-y", "elementor"),
|
|
2766
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2777
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
2767
2778
|
showTooltip: true
|
|
2768
2779
|
},
|
|
2769
2780
|
{
|
|
2770
2781
|
value: "no-repeat",
|
|
2771
2782
|
label: __16("No-repeat", "elementor"),
|
|
2772
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2783
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(XIcon4, { fontSize: size }),
|
|
2773
2784
|
showTooltip: true
|
|
2774
2785
|
}
|
|
2775
2786
|
];
|
|
2776
2787
|
var BackgroundImageOverlayRepeat = () => {
|
|
2777
|
-
return /* @__PURE__ */
|
|
2788
|
+
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
2789
|
};
|
|
2779
2790
|
|
|
2780
2791
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
2781
|
-
import * as
|
|
2792
|
+
import * as React45 from "react";
|
|
2782
2793
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil11 } from "@elementor/editor-props";
|
|
2783
2794
|
import {
|
|
2784
2795
|
ArrowBarBothIcon,
|
|
@@ -2794,25 +2805,25 @@ var sizeControlOptions = [
|
|
|
2794
2805
|
{
|
|
2795
2806
|
value: "auto",
|
|
2796
2807
|
label: __17("Auto", "elementor"),
|
|
2797
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2808
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(LetterAIcon, { fontSize: size }),
|
|
2798
2809
|
showTooltip: true
|
|
2799
2810
|
},
|
|
2800
2811
|
{
|
|
2801
2812
|
value: "cover",
|
|
2802
2813
|
label: __17("Cover", "elementor"),
|
|
2803
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2814
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
2804
2815
|
showTooltip: true
|
|
2805
2816
|
},
|
|
2806
2817
|
{
|
|
2807
2818
|
value: "contain",
|
|
2808
2819
|
label: __17("Contain", "elementor"),
|
|
2809
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2820
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
2810
2821
|
showTooltip: true
|
|
2811
2822
|
},
|
|
2812
2823
|
{
|
|
2813
2824
|
value: "custom",
|
|
2814
2825
|
label: __17("Custom", "elementor"),
|
|
2815
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2826
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(PencilIcon, { fontSize: size }),
|
|
2816
2827
|
showTooltip: true
|
|
2817
2828
|
}
|
|
2818
2829
|
];
|
|
@@ -2827,7 +2838,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2827
2838
|
stringPropContext.setValue(size);
|
|
2828
2839
|
}
|
|
2829
2840
|
};
|
|
2830
|
-
return /* @__PURE__ */
|
|
2841
|
+
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
2842
|
ControlToggleButtonGroup,
|
|
2832
2843
|
{
|
|
2833
2844
|
exclusive: true,
|
|
@@ -2835,16 +2846,16 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2835
2846
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value,
|
|
2836
2847
|
onChange: handleSizeChange
|
|
2837
2848
|
}
|
|
2838
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2849
|
+
)))), 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
2850
|
SizeControl,
|
|
2840
2851
|
{
|
|
2841
|
-
startIcon: /* @__PURE__ */
|
|
2852
|
+
startIcon: /* @__PURE__ */ React45.createElement(ArrowsMoveHorizontalIcon2, { fontSize: "tiny" }),
|
|
2842
2853
|
extendedValues: ["auto"]
|
|
2843
2854
|
}
|
|
2844
|
-
))), /* @__PURE__ */
|
|
2855
|
+
))), /* @__PURE__ */ React45.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React45.createElement(
|
|
2845
2856
|
SizeControl,
|
|
2846
2857
|
{
|
|
2847
|
-
startIcon: /* @__PURE__ */
|
|
2858
|
+
startIcon: /* @__PURE__ */ React45.createElement(ArrowsMoveVerticalIcon2, { fontSize: "tiny" }),
|
|
2848
2859
|
extendedValues: ["auto"]
|
|
2849
2860
|
}
|
|
2850
2861
|
)))))) : null);
|
|
@@ -2951,7 +2962,7 @@ var backgroundResolutionOptions = [
|
|
|
2951
2962
|
];
|
|
2952
2963
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
2953
2964
|
const { propType, value: overlayValues, setValue, disabled } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
2954
|
-
return /* @__PURE__ */
|
|
2965
|
+
return /* @__PURE__ */ React46.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React46.createElement(
|
|
2955
2966
|
Repeater,
|
|
2956
2967
|
{
|
|
2957
2968
|
openOnAdd: true,
|
|
@@ -2969,7 +2980,7 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
|
2969
2980
|
));
|
|
2970
2981
|
});
|
|
2971
2982
|
var ItemContent2 = ({ anchorEl = null, bind }) => {
|
|
2972
|
-
return /* @__PURE__ */
|
|
2983
|
+
return /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React46.createElement(Content2, { anchorEl }));
|
|
2973
2984
|
};
|
|
2974
2985
|
var Content2 = ({ anchorEl }) => {
|
|
2975
2986
|
const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
|
|
@@ -2977,7 +2988,7 @@ var Content2 = ({ anchorEl }) => {
|
|
|
2977
2988
|
color: initialBackgroundColorOverlay.value,
|
|
2978
2989
|
gradient: initialBackgroundGradientOverlay.value
|
|
2979
2990
|
});
|
|
2980
|
-
return /* @__PURE__ */
|
|
2991
|
+
return /* @__PURE__ */ React46.createElement(Box6, { sx: { width: "100%" } }, /* @__PURE__ */ React46.createElement(Box6, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React46.createElement(
|
|
2981
2992
|
Tabs,
|
|
2982
2993
|
{
|
|
2983
2994
|
size: "small",
|
|
@@ -2985,19 +2996,19 @@ var Content2 = ({ anchorEl }) => {
|
|
|
2985
2996
|
...getTabsProps(),
|
|
2986
2997
|
"aria-label": __18("Background Overlay", "elementor")
|
|
2987
2998
|
},
|
|
2988
|
-
/* @__PURE__ */
|
|
2989
|
-
/* @__PURE__ */
|
|
2990
|
-
/* @__PURE__ */
|
|
2991
|
-
)), /* @__PURE__ */
|
|
2999
|
+
/* @__PURE__ */ React46.createElement(Tab, { label: __18("Image", "elementor"), ...getTabProps("image") }),
|
|
3000
|
+
/* @__PURE__ */ React46.createElement(Tab, { label: __18("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
3001
|
+
/* @__PURE__ */ React46.createElement(Tab, { label: __18("Color", "elementor"), ...getTabProps("color") })
|
|
3002
|
+
)), /* @__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
3003
|
};
|
|
2993
3004
|
var ItemIcon2 = ({ value }) => {
|
|
2994
3005
|
switch (value.$$type) {
|
|
2995
3006
|
case "background-image-overlay":
|
|
2996
|
-
return /* @__PURE__ */
|
|
3007
|
+
return /* @__PURE__ */ React46.createElement(ItemIconImage, { value });
|
|
2997
3008
|
case "background-color-overlay":
|
|
2998
|
-
return /* @__PURE__ */
|
|
3009
|
+
return /* @__PURE__ */ React46.createElement(ItemIconColor, { value });
|
|
2999
3010
|
case "background-gradient-overlay":
|
|
3000
|
-
return /* @__PURE__ */
|
|
3011
|
+
return /* @__PURE__ */ React46.createElement(ItemIconGradient, { value });
|
|
3001
3012
|
default:
|
|
3002
3013
|
return null;
|
|
3003
3014
|
}
|
|
@@ -3010,11 +3021,11 @@ var extractColorFrom = (prop) => {
|
|
|
3010
3021
|
};
|
|
3011
3022
|
var ItemIconColor = ({ value: prop }) => {
|
|
3012
3023
|
const color = extractColorFrom(prop);
|
|
3013
|
-
return /* @__PURE__ */
|
|
3024
|
+
return /* @__PURE__ */ React46.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
3014
3025
|
};
|
|
3015
3026
|
var ItemIconImage = ({ value }) => {
|
|
3016
3027
|
const { imageUrl } = useImage(value);
|
|
3017
|
-
return /* @__PURE__ */
|
|
3028
|
+
return /* @__PURE__ */ React46.createElement(
|
|
3018
3029
|
CardMedia3,
|
|
3019
3030
|
{
|
|
3020
3031
|
image: imageUrl,
|
|
@@ -3029,47 +3040,47 @@ var ItemIconImage = ({ value }) => {
|
|
|
3029
3040
|
};
|
|
3030
3041
|
var ItemIconGradient = ({ value }) => {
|
|
3031
3042
|
const gradient = getGradientValue(value);
|
|
3032
|
-
return /* @__PURE__ */
|
|
3043
|
+
return /* @__PURE__ */ React46.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
3033
3044
|
};
|
|
3034
3045
|
var ItemLabel2 = ({ value }) => {
|
|
3035
3046
|
switch (value.$$type) {
|
|
3036
3047
|
case "background-image-overlay":
|
|
3037
|
-
return /* @__PURE__ */
|
|
3048
|
+
return /* @__PURE__ */ React46.createElement(ItemLabelImage, { value });
|
|
3038
3049
|
case "background-color-overlay":
|
|
3039
|
-
return /* @__PURE__ */
|
|
3050
|
+
return /* @__PURE__ */ React46.createElement(ItemLabelColor, { value });
|
|
3040
3051
|
case "background-gradient-overlay":
|
|
3041
|
-
return /* @__PURE__ */
|
|
3052
|
+
return /* @__PURE__ */ React46.createElement(ItemLabelGradient, { value });
|
|
3042
3053
|
default:
|
|
3043
3054
|
return null;
|
|
3044
3055
|
}
|
|
3045
3056
|
};
|
|
3046
3057
|
var ItemLabelColor = ({ value: prop }) => {
|
|
3047
3058
|
const color = extractColorFrom(prop);
|
|
3048
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ React46.createElement("span", null, color);
|
|
3049
3060
|
};
|
|
3050
3061
|
var ItemLabelImage = ({ value }) => {
|
|
3051
3062
|
const { imageTitle } = useImage(value);
|
|
3052
|
-
return /* @__PURE__ */
|
|
3063
|
+
return /* @__PURE__ */ React46.createElement("span", null, imageTitle);
|
|
3053
3064
|
};
|
|
3054
3065
|
var ItemLabelGradient = ({ value }) => {
|
|
3055
3066
|
if (value.value.type.value === "linear") {
|
|
3056
|
-
return /* @__PURE__ */
|
|
3067
|
+
return /* @__PURE__ */ React46.createElement("span", null, __18("Linear Gradient", "elementor"));
|
|
3057
3068
|
}
|
|
3058
|
-
return /* @__PURE__ */
|
|
3069
|
+
return /* @__PURE__ */ React46.createElement("span", null, __18("Radial Gradient", "elementor"));
|
|
3059
3070
|
};
|
|
3060
3071
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
3061
3072
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
3062
|
-
return /* @__PURE__ */
|
|
3073
|
+
return /* @__PURE__ */ React46.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React46.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React46.createElement(ColorControl, { anchorEl })));
|
|
3063
3074
|
};
|
|
3064
3075
|
var ImageOverlayContent = () => {
|
|
3065
3076
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
3066
|
-
return /* @__PURE__ */
|
|
3077
|
+
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
3078
|
ImageControl,
|
|
3068
3079
|
{
|
|
3069
3080
|
resolutionLabel: __18("Resolution", "elementor"),
|
|
3070
3081
|
sizes: backgroundResolutionOptions
|
|
3071
3082
|
}
|
|
3072
|
-
)))), /* @__PURE__ */
|
|
3083
|
+
)))), /* @__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
3084
|
};
|
|
3074
3085
|
var StyledUnstableColorIndicator = styled6(UnstableColorIndicator2)(({ theme }) => ({
|
|
3075
3086
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -3109,11 +3120,11 @@ var BackgroundControl = createControl(() => {
|
|
|
3109
3120
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
3110
3121
|
const isUsingNestedProps = isExperimentActive3("e_v_3_30");
|
|
3111
3122
|
const colorLabel = __19("Color", "elementor");
|
|
3112
|
-
return /* @__PURE__ */
|
|
3123
|
+
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
3124
|
});
|
|
3114
3125
|
|
|
3115
3126
|
// src/controls/switch-control.tsx
|
|
3116
|
-
import * as
|
|
3127
|
+
import * as React48 from "react";
|
|
3117
3128
|
import { booleanPropTypeUtil as booleanPropTypeUtil2 } from "@elementor/editor-props";
|
|
3118
3129
|
import { Switch as Switch2 } from "@elementor/ui";
|
|
3119
3130
|
var SwitchControl2 = createControl(() => {
|
|
@@ -3121,7 +3132,7 @@ var SwitchControl2 = createControl(() => {
|
|
|
3121
3132
|
const handleChange = (event) => {
|
|
3122
3133
|
setValue(event.target.checked);
|
|
3123
3134
|
};
|
|
3124
|
-
return /* @__PURE__ */
|
|
3135
|
+
return /* @__PURE__ */ React48.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React48.createElement(Switch2, { checked: !!value, onChange: handleChange, size: "small", disabled }));
|
|
3125
3136
|
});
|
|
3126
3137
|
export {
|
|
3127
3138
|
AspectRatioControl,
|