@elementor/editor-editing-panel 4.5.0-1217 → 4.5.0-1219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +96 -75
- package/dist/index.d.ts +96 -75
- package/dist/index.js +1026 -934
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +681 -595
- package/dist/index.mjs.map +1 -1
- package/package.json +25 -25
- package/src/components/editing-panel-tabs.tsx +8 -4
- package/src/components/style-sections/border-section/border-color-field.tsx +4 -4
- package/src/components/style-sections/border-section/border-radius-field.tsx +4 -4
- package/src/components/style-sections/border-section/border-style-field.tsx +4 -4
- package/src/components/style-sections/border-section/border-width-field.tsx +4 -4
- package/src/components/style-sections/effects-section/blend-mode-field.tsx +4 -4
- package/src/components/style-sections/effects-section/opacity-control-field.tsx +4 -4
- package/src/components/style-sections/layout-section/align-content-field.tsx +4 -4
- package/src/components/style-sections/layout-section/align-items-field.tsx +4 -4
- package/src/components/style-sections/layout-section/display-field.tsx +4 -4
- package/src/components/style-sections/layout-section/flex-direction-field.tsx +4 -4
- package/src/components/style-sections/layout-section/gap-control-field.tsx +4 -4
- package/src/components/style-sections/layout-section/grid-justify-items-field.tsx +4 -4
- package/src/components/style-sections/layout-section/justify-content-field.tsx +4 -4
- package/src/components/style-sections/layout-section/wrap-field.tsx +4 -4
- package/src/components/style-sections/position-section/offset-field.tsx +4 -4
- package/src/components/style-sections/position-section/position-field.tsx +4 -4
- package/src/components/style-sections/position-section/z-index-field.tsx +4 -4
- package/src/components/style-sections/size-section/object-fit-field.tsx +4 -4
- package/src/components/style-sections/size-section/overflow-field.tsx +4 -4
- package/src/components/style-sections/typography-section/column-count-field.tsx +4 -4
- package/src/components/style-sections/typography-section/column-gap-field.tsx +4 -4
- package/src/components/style-sections/typography-section/font-family-field.tsx +5 -9
- package/src/components/style-sections/typography-section/font-size-field.tsx +5 -5
- package/src/components/style-sections/typography-section/font-style-field.tsx +4 -4
- package/src/components/style-sections/typography-section/font-weight-field.tsx +4 -4
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +4 -4
- package/src/components/style-sections/typography-section/line-height-field.tsx +4 -4
- package/src/components/style-sections/typography-section/text-alignment-field.tsx +4 -4
- package/src/components/style-sections/typography-section/text-color-field.tsx +4 -4
- package/src/components/style-sections/typography-section/text-decoration-field.tsx +4 -4
- package/src/components/style-sections/typography-section/text-direction-field.tsx +4 -4
- package/src/components/style-sections/typography-section/transform-field.tsx +4 -4
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +4 -4
- package/src/contexts/styles-field-targets-context.tsx +17 -0
- package/src/controls-registry/styles-field.tsx +4 -0
- package/src/hooks/use-styles-fields.ts +89 -56
- package/src/index.ts +5 -2
- package/src/styles-field-registry.ts +79 -0
- package/src/utils/element-local-style.ts +30 -0
package/dist/index.mjs
CHANGED
|
@@ -1594,7 +1594,7 @@ function useHandleSelect() {
|
|
|
1594
1594
|
}
|
|
1595
1595
|
|
|
1596
1596
|
// src/components/custom-css-indicator.tsx
|
|
1597
|
-
import * as
|
|
1597
|
+
import * as React15 from "react";
|
|
1598
1598
|
import { useMemo as useMemo6 } from "react";
|
|
1599
1599
|
import { getBreakpointsTree } from "@elementor/editor-responsive";
|
|
1600
1600
|
import { getVariantByMeta as getVariantByMeta3 } from "@elementor/editor-styles";
|
|
@@ -1623,11 +1623,41 @@ import {
|
|
|
1623
1623
|
shouldCreateNewLocalStyle
|
|
1624
1624
|
} from "@elementor/editor-elements";
|
|
1625
1625
|
import { getVariantByMeta } from "@elementor/editor-styles";
|
|
1626
|
-
import { isElementsStylesProvider as
|
|
1626
|
+
import { isElementsStylesProvider as isElementsStylesProvider6 } from "@elementor/editor-styles-repository";
|
|
1627
1627
|
import { ELEMENTS_STYLES_RESERVED_LABEL } from "@elementor/editor-styles-repository";
|
|
1628
1628
|
import { undoable as undoable2 } from "@elementor/editor-v1-adapters";
|
|
1629
1629
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1630
1630
|
|
|
1631
|
+
// src/contexts/styles-field-targets-context.tsx
|
|
1632
|
+
import * as React14 from "react";
|
|
1633
|
+
import { createContext as createContext5, useContext as useContext5 } from "react";
|
|
1634
|
+
var Context4 = createContext5(null);
|
|
1635
|
+
function StylesFieldTargetsProvider({ children, elementIds }) {
|
|
1636
|
+
return /* @__PURE__ */ React14.createElement(Context4.Provider, { value: elementIds }, children);
|
|
1637
|
+
}
|
|
1638
|
+
function useStylesFieldTargets() {
|
|
1639
|
+
return useContext5(Context4);
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
// src/utils/element-local-style.ts
|
|
1643
|
+
import { getContainer, getElementType } from "@elementor/editor-elements";
|
|
1644
|
+
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
1645
|
+
import { isElementsStylesProvider as isElementsStylesProvider5, stylesRepository as stylesRepository8 } from "@elementor/editor-styles-repository";
|
|
1646
|
+
function getElementLocalStyle(elementId) {
|
|
1647
|
+
const provider = stylesRepository8.getProviders().find((stylesProvider) => isElementsStylesProvider5(stylesProvider.getKey()));
|
|
1648
|
+
const [style] = provider?.actions.all({ elementId }) ?? [];
|
|
1649
|
+
return provider && style ? { styleId: style.id, provider } : null;
|
|
1650
|
+
}
|
|
1651
|
+
function getElementClassesProp(elementId) {
|
|
1652
|
+
const container = getContainer(elementId);
|
|
1653
|
+
const type = container?.model.get("widgetType") || container?.model.get("elType");
|
|
1654
|
+
const propsSchema = type ? getElementType(type)?.propsSchema : null;
|
|
1655
|
+
const classesEntry = Object.entries(propsSchema ?? {}).find(
|
|
1656
|
+
([, propType]) => propType.kind === "plain" && propType.key === CLASSES_PROP_KEY
|
|
1657
|
+
);
|
|
1658
|
+
return classesEntry?.[0] ?? null;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1631
1661
|
// src/hooks/use-styles-rerender.ts
|
|
1632
1662
|
import { useEffect as useEffect2, useReducer } from "react";
|
|
1633
1663
|
var useStylesRerender = () => {
|
|
@@ -1643,18 +1673,37 @@ function useStylesFields(propNames) {
|
|
|
1643
1673
|
element: { id: elementId }
|
|
1644
1674
|
} = useElement();
|
|
1645
1675
|
const { id: styleId, meta, provider, canEdit } = useStyle();
|
|
1646
|
-
const
|
|
1676
|
+
const classesProp = useClassesProp();
|
|
1677
|
+
const targetElementIds = useStylesFieldTargets();
|
|
1678
|
+
const undoableUpdateStyle = useUndoableActions({ meta });
|
|
1647
1679
|
useStylesRerender();
|
|
1648
1680
|
const values = getProps({ elementId, styleId, provider, meta, propNames });
|
|
1649
1681
|
const setValues = (props, { history: { propDisplayName } }) => {
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
undoableUpdateStyle({ styleId, provider, props, propDisplayName });
|
|
1682
|
+
const targets = targetElementIds ? getLocalStyleTargets(targetElementIds) : [{ elementId, classesProp, styleId, provider }];
|
|
1683
|
+
if (!targets.length) {
|
|
1684
|
+
return;
|
|
1654
1685
|
}
|
|
1686
|
+
undoableUpdateStyle({ targets, props, propDisplayName });
|
|
1655
1687
|
};
|
|
1656
1688
|
return { values, setValues, canEdit };
|
|
1657
1689
|
}
|
|
1690
|
+
function getLocalStyleTargets(elementIds) {
|
|
1691
|
+
return elementIds.flatMap((elementId) => {
|
|
1692
|
+
const classesProp = getElementClassesProp(elementId);
|
|
1693
|
+
if (!classesProp) {
|
|
1694
|
+
return [];
|
|
1695
|
+
}
|
|
1696
|
+
const localStyle = getElementLocalStyle(elementId);
|
|
1697
|
+
return [
|
|
1698
|
+
{
|
|
1699
|
+
elementId,
|
|
1700
|
+
classesProp,
|
|
1701
|
+
styleId: localStyle?.styleId ?? null,
|
|
1702
|
+
provider: localStyle?.provider ?? null
|
|
1703
|
+
}
|
|
1704
|
+
];
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1658
1707
|
function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
1659
1708
|
if (!provider || !styleId) {
|
|
1660
1709
|
return null;
|
|
@@ -1668,51 +1717,48 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
|
1668
1717
|
propNames.map((key) => [key, variant?.props[key] ?? null])
|
|
1669
1718
|
);
|
|
1670
1719
|
}
|
|
1671
|
-
function useUndoableActions({
|
|
1672
|
-
elementId,
|
|
1673
|
-
meta: { breakpoint, state }
|
|
1674
|
-
}) {
|
|
1675
|
-
const classesProp = useClassesProp();
|
|
1720
|
+
function useUndoableActions({ meta: { breakpoint, state } }) {
|
|
1676
1721
|
return useMemo4(() => {
|
|
1677
1722
|
const meta = { breakpoint, state };
|
|
1678
|
-
const createStyleArgs = { elementId, classesProp, meta, label: ELEMENTS_STYLES_RESERVED_LABEL };
|
|
1679
1723
|
return undoable2(
|
|
1680
1724
|
{
|
|
1681
|
-
do: (
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
}
|
|
1692
|
-
return undo(payload, doReturn);
|
|
1725
|
+
do: ({ targets, props }) => targets.map(
|
|
1726
|
+
(target) => shouldCreateNewLocalStyle(target) ? create(target, props) : update(target, props)
|
|
1727
|
+
),
|
|
1728
|
+
undo: ({ targets }, doReturn) => {
|
|
1729
|
+
targets.forEach((target, index) => {
|
|
1730
|
+
if (shouldCreateNewLocalStyle(target)) {
|
|
1731
|
+
undoCreate(target, doReturn[index]);
|
|
1732
|
+
} else {
|
|
1733
|
+
undo(target, doReturn[index]);
|
|
1734
|
+
}
|
|
1735
|
+
});
|
|
1693
1736
|
},
|
|
1694
|
-
redo: (
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
return create(payload, doReturn);
|
|
1698
|
-
}
|
|
1699
|
-
return update(payload);
|
|
1700
|
-
}
|
|
1737
|
+
redo: ({ targets, props }, doReturn) => targets.map(
|
|
1738
|
+
(target, index) => shouldCreateNewLocalStyle(target) ? create(target, props, doReturn[index]) : update(target, props)
|
|
1739
|
+
)
|
|
1701
1740
|
},
|
|
1702
1741
|
{
|
|
1703
|
-
title: ({ provider, styleId }) => getTitle({ provider, styleId, elementId }),
|
|
1704
|
-
subtitle: ({ provider, styleId, propDisplayName }) => getSubtitle({ provider, styleId, elementId, propDisplayName }),
|
|
1742
|
+
title: ({ targets: [{ provider, styleId, elementId }] }) => getTitle({ provider, styleId, elementId }),
|
|
1743
|
+
subtitle: ({ targets: [{ provider, styleId, elementId }], propDisplayName }) => getSubtitle({ provider, styleId, elementId, propDisplayName }),
|
|
1705
1744
|
debounce: { wait: HISTORY_DEBOUNCE_WAIT }
|
|
1706
1745
|
}
|
|
1707
1746
|
);
|
|
1708
|
-
function create({
|
|
1709
|
-
const createdStyle = createElementStyle({
|
|
1747
|
+
function create({ elementId, classesProp }, props, redoArgs) {
|
|
1748
|
+
const createdStyle = createElementStyle({
|
|
1749
|
+
elementId,
|
|
1750
|
+
classesProp,
|
|
1751
|
+
meta,
|
|
1752
|
+
label: ELEMENTS_STYLES_RESERVED_LABEL,
|
|
1753
|
+
props,
|
|
1754
|
+
styleId: redoArgs?.createdStyleId
|
|
1755
|
+
});
|
|
1710
1756
|
return { createdStyleId: createdStyle };
|
|
1711
1757
|
}
|
|
1712
|
-
function undoCreate(
|
|
1758
|
+
function undoCreate({ elementId }, { createdStyleId }) {
|
|
1713
1759
|
deleteElementStyle2(elementId, createdStyleId);
|
|
1714
1760
|
}
|
|
1715
|
-
function update({ provider, styleId, props
|
|
1761
|
+
function update({ elementId, provider, styleId }, props) {
|
|
1716
1762
|
if (!provider.actions.updateProps) {
|
|
1717
1763
|
throw new StylesProviderCannotUpdatePropsError({
|
|
1718
1764
|
context: { providerKey: provider.getKey() }
|
|
@@ -1723,10 +1769,10 @@ function useUndoableActions({
|
|
|
1723
1769
|
provider.actions.updateProps({ id: styleId, meta, props }, { elementId });
|
|
1724
1770
|
return { styleId, provider, prevProps };
|
|
1725
1771
|
}
|
|
1726
|
-
function undo(
|
|
1772
|
+
function undo({ elementId }, { styleId, provider, prevProps }) {
|
|
1727
1773
|
provider.actions.updateProps?.({ id: styleId, meta, props: prevProps, mode: "replace" }, { elementId });
|
|
1728
1774
|
}
|
|
1729
|
-
}, [
|
|
1775
|
+
}, [breakpoint, state]);
|
|
1730
1776
|
}
|
|
1731
1777
|
function getCurrentProps(style, meta) {
|
|
1732
1778
|
if (!style) {
|
|
@@ -1759,7 +1805,7 @@ var localStyleHistoryTitles = {
|
|
|
1759
1805
|
function capitalize(str) {
|
|
1760
1806
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
1761
1807
|
}
|
|
1762
|
-
var isLocalStyle = (provider, styleId) => !provider || !styleId ||
|
|
1808
|
+
var isLocalStyle = (provider, styleId) => !provider || !styleId || isElementsStylesProvider6(provider.getKey());
|
|
1763
1809
|
var getTitle = ({ provider, styleId, elementId }) => {
|
|
1764
1810
|
const isLocal = isLocalStyle(provider, styleId);
|
|
1765
1811
|
if (isLocal) {
|
|
@@ -1904,11 +1950,11 @@ var CustomCssIndicator = () => {
|
|
|
1904
1950
|
}, [hasContent, style, meta]);
|
|
1905
1951
|
if (!hasContent) {
|
|
1906
1952
|
if (hasInheritedContent) {
|
|
1907
|
-
return /* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ React15.createElement(StyleIndicator, null);
|
|
1908
1954
|
}
|
|
1909
1955
|
return null;
|
|
1910
1956
|
}
|
|
1911
|
-
return /* @__PURE__ */
|
|
1957
|
+
return /* @__PURE__ */ React15.createElement(StyleIndicator, { getColor: provider ? getStylesProviderThemeColor(provider.getKey()) : void 0 });
|
|
1912
1958
|
};
|
|
1913
1959
|
var hasInheritedCustomCss = (style, meta) => {
|
|
1914
1960
|
if (!style || !meta) {
|
|
@@ -1942,7 +1988,7 @@ var hasInheritedCustomCss = (style, meta) => {
|
|
|
1942
1988
|
};
|
|
1943
1989
|
|
|
1944
1990
|
// src/components/editing-panel.tsx
|
|
1945
|
-
import * as
|
|
1991
|
+
import * as React94 from "react";
|
|
1946
1992
|
import {
|
|
1947
1993
|
ControlActionsProvider,
|
|
1948
1994
|
ControlReplacementsProvider,
|
|
@@ -1971,14 +2017,14 @@ var registerEditingPanelReplacement = ({
|
|
|
1971
2017
|
var getEditingPanelReplacement = (element, elementType) => Array.from(registry.values()).filter(({ condition }) => condition(element, elementType)).sort((a, b) => a.priority - b.priority)?.[0] ?? null;
|
|
1972
2018
|
|
|
1973
2019
|
// src/components/editing-panel-error-fallback.tsx
|
|
1974
|
-
import * as
|
|
2020
|
+
import * as React16 from "react";
|
|
1975
2021
|
import { Alert as Alert2, Box as Box3 } from "@elementor/ui";
|
|
1976
2022
|
function EditorPanelErrorFallback() {
|
|
1977
|
-
return /* @__PURE__ */
|
|
2023
|
+
return /* @__PURE__ */ React16.createElement(Box3, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React16.createElement(Alert2, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React16.createElement("strong", null, "Something went wrong")));
|
|
1978
2024
|
}
|
|
1979
2025
|
|
|
1980
2026
|
// src/components/editing-panel-sticky-promotion.tsx
|
|
1981
|
-
import * as
|
|
2027
|
+
import * as React17 from "react";
|
|
1982
2028
|
function getStickyPromotion() {
|
|
1983
2029
|
return window.elementor?.config?.editingPanelStickyPromotion;
|
|
1984
2030
|
}
|
|
@@ -1987,12 +2033,12 @@ var EditingPanelStickyPromotion = () => {
|
|
|
1987
2033
|
if (!promotion) {
|
|
1988
2034
|
return null;
|
|
1989
2035
|
}
|
|
1990
|
-
return /* @__PURE__ */
|
|
2036
|
+
return /* @__PURE__ */ React17.createElement("div", { className: "elementor-panel-editor-sticky-promotion" }, /* @__PURE__ */ React17.createElement("div", { className: "elementor-get-pro-sticky-message" }, promotion.message, " ", /* @__PURE__ */ React17.createElement("a", { target: "_blank", rel: "noreferrer", href: promotion.url }, promotion.button_text)));
|
|
1991
2037
|
};
|
|
1992
2038
|
|
|
1993
2039
|
// src/components/editing-panel-tabs.tsx
|
|
1994
2040
|
import { Fragment as Fragment10 } from "react";
|
|
1995
|
-
import * as
|
|
2041
|
+
import * as React93 from "react";
|
|
1996
2042
|
import { useHasContentOnlyAccess } from "@elementor/editor-current-user";
|
|
1997
2043
|
import { getWidgetsCache as getWidgetsCache3 } from "@elementor/editor-elements";
|
|
1998
2044
|
import { createReplaceableLocation } from "@elementor/locations";
|
|
@@ -2000,10 +2046,10 @@ import { Divider as Divider6, Stack as Stack14, Tab, TabPanel, Tabs, useTabs } f
|
|
|
2000
2046
|
import { __ as __65 } from "@wordpress/i18n";
|
|
2001
2047
|
|
|
2002
2048
|
// src/contexts/scroll-context.tsx
|
|
2003
|
-
import * as
|
|
2004
|
-
import { createContext as
|
|
2049
|
+
import * as React18 from "react";
|
|
2050
|
+
import { createContext as createContext6, useContext as useContext6, useEffect as useEffect3, useRef as useRef2, useState as useState5 } from "react";
|
|
2005
2051
|
import { styled as styled3 } from "@elementor/ui";
|
|
2006
|
-
var ScrollContext =
|
|
2052
|
+
var ScrollContext = createContext6(void 0);
|
|
2007
2053
|
var ScrollPanel = styled3("div")`
|
|
2008
2054
|
height: 100%;
|
|
2009
2055
|
overflow-y: auto;
|
|
@@ -2032,10 +2078,10 @@ function ScrollProvider({ children }) {
|
|
|
2032
2078
|
scrollElement.removeEventListener("scroll", handleScroll);
|
|
2033
2079
|
};
|
|
2034
2080
|
});
|
|
2035
|
-
return /* @__PURE__ */
|
|
2081
|
+
return /* @__PURE__ */ React18.createElement(ScrollContext.Provider, { value: { direction } }, /* @__PURE__ */ React18.createElement(ScrollPanel, { ref }, children));
|
|
2036
2082
|
}
|
|
2037
2083
|
function useScrollDirection() {
|
|
2038
|
-
return
|
|
2084
|
+
return useContext6(ScrollContext)?.direction ?? DEFAULT_SCROLL_DIRECTION;
|
|
2039
2085
|
}
|
|
2040
2086
|
|
|
2041
2087
|
// src/hooks/use-default-panel-settings.ts
|
|
@@ -2088,7 +2134,7 @@ var useStateByElement = (key, initialValue) => {
|
|
|
2088
2134
|
};
|
|
2089
2135
|
|
|
2090
2136
|
// src/components/content-only-infotip.tsx
|
|
2091
|
-
import * as
|
|
2137
|
+
import * as React19 from "react";
|
|
2092
2138
|
import { useState as useState7 } from "react";
|
|
2093
2139
|
import { InfoCircleFilledIcon } from "@elementor/icons";
|
|
2094
2140
|
import { Alert as Alert3, AlertTitle as AlertTitle2, Box as Box4, Infotip, Link as Link2 } from "@elementor/ui";
|
|
@@ -2097,13 +2143,13 @@ var LEARN_MORE_URL = "https://go.elementor.com/content-only-access-infotip";
|
|
|
2097
2143
|
var INFOTIP_WIDTH = 300;
|
|
2098
2144
|
var ContentOnlyInfotip = ({ children }) => {
|
|
2099
2145
|
const [isOpen, setIsOpen] = useState7(false);
|
|
2100
|
-
return /* @__PURE__ */
|
|
2146
|
+
return /* @__PURE__ */ React19.createElement(
|
|
2101
2147
|
Infotip,
|
|
2102
2148
|
{
|
|
2103
2149
|
open: isOpen,
|
|
2104
2150
|
placement: "bottom",
|
|
2105
2151
|
color: "secondary",
|
|
2106
|
-
content: /* @__PURE__ */
|
|
2152
|
+
content: /* @__PURE__ */ React19.createElement(Alert3, { color: "secondary", icon: /* @__PURE__ */ React19.createElement(InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React19.createElement(AlertTitle2, null, __10("Content-only access", "elementor")), /* @__PURE__ */ React19.createElement(Box4, { component: "span" }, __10("Your Site Admin has limited this role to content editing.", "elementor"), " ", /* @__PURE__ */ React19.createElement(Link2, { href: LEARN_MORE_URL, target: "_blank", rel: "noreferrer", color: "info.main" }, __10("Learn More", "elementor")))),
|
|
2107
2153
|
slotProps: {
|
|
2108
2154
|
popper: {
|
|
2109
2155
|
sx: { width: INFOTIP_WIDTH },
|
|
@@ -2114,7 +2160,7 @@ var ContentOnlyInfotip = ({ children }) => {
|
|
|
2114
2160
|
}
|
|
2115
2161
|
}
|
|
2116
2162
|
},
|
|
2117
|
-
/* @__PURE__ */
|
|
2163
|
+
/* @__PURE__ */ React19.createElement(
|
|
2118
2164
|
Box4,
|
|
2119
2165
|
{
|
|
2120
2166
|
component: "span",
|
|
@@ -2128,28 +2174,28 @@ var ContentOnlyInfotip = ({ children }) => {
|
|
|
2128
2174
|
};
|
|
2129
2175
|
|
|
2130
2176
|
// src/components/interactions-tab.tsx
|
|
2131
|
-
import * as
|
|
2177
|
+
import * as React21 from "react";
|
|
2132
2178
|
import { InteractionsTab as InteractionsTabContent } from "@elementor/editor-interactions";
|
|
2133
2179
|
|
|
2134
2180
|
// src/components/sections-list.tsx
|
|
2135
|
-
import * as
|
|
2181
|
+
import * as React20 from "react";
|
|
2136
2182
|
import { List } from "@elementor/ui";
|
|
2137
2183
|
function SectionsList(props) {
|
|
2138
|
-
return /* @__PURE__ */
|
|
2184
|
+
return /* @__PURE__ */ React20.createElement(List, { disablePadding: true, component: "div", ...props });
|
|
2139
2185
|
}
|
|
2140
2186
|
|
|
2141
2187
|
// src/components/interactions-tab.tsx
|
|
2142
2188
|
var InteractionsTab = () => {
|
|
2143
2189
|
const { element } = useElement();
|
|
2144
|
-
return /* @__PURE__ */
|
|
2190
|
+
return /* @__PURE__ */ React21.createElement(SectionsList, null, /* @__PURE__ */ React21.createElement(InteractionsTabContent, { elementId: element.id }));
|
|
2145
2191
|
};
|
|
2146
2192
|
|
|
2147
2193
|
// src/components/settings-tab.tsx
|
|
2148
|
-
import * as
|
|
2194
|
+
import * as React27 from "react";
|
|
2149
2195
|
import { SessionStorageProvider } from "@elementor/session";
|
|
2150
2196
|
|
|
2151
2197
|
// src/utils/ancestor-dependency-utils.ts
|
|
2152
|
-
import { findClosestContainer, getContainer, getWidgetsCache } from "@elementor/editor-elements";
|
|
2198
|
+
import { findClosestContainer, getContainer as getContainer2, getWidgetsCache } from "@elementor/editor-elements";
|
|
2153
2199
|
|
|
2154
2200
|
// src/utils/prop-dependency-utils.ts
|
|
2155
2201
|
import {
|
|
@@ -2380,7 +2426,7 @@ function isHiddenByAncestor(elementId, propType) {
|
|
|
2380
2426
|
return false;
|
|
2381
2427
|
}
|
|
2382
2428
|
const ancestor = findClosestContainer(
|
|
2383
|
-
|
|
2429
|
+
getContainer2(elementId)?.parent,
|
|
2384
2430
|
(container) => container.model.get("elType") === ancestorDependency.element_type
|
|
2385
2431
|
);
|
|
2386
2432
|
if (!ancestor) {
|
|
@@ -2393,7 +2439,7 @@ function isHiddenByAncestor(elementId, propType) {
|
|
|
2393
2439
|
}
|
|
2394
2440
|
|
|
2395
2441
|
// src/components/section.tsx
|
|
2396
|
-
import * as
|
|
2442
|
+
import * as React22 from "react";
|
|
2397
2443
|
import { useId as useId2, useRef as useRef3 } from "react";
|
|
2398
2444
|
import { CollapseIcon, getCollapsibleValue, SectionRefContext } from "@elementor/editor-ui";
|
|
2399
2445
|
import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as Stack5 } from "@elementor/ui";
|
|
@@ -2419,7 +2465,7 @@ function Section({
|
|
|
2419
2465
|
const id = useId2();
|
|
2420
2466
|
const labelId = `label-${id}`;
|
|
2421
2467
|
const contentId = `content-${id}`;
|
|
2422
|
-
return /* @__PURE__ */
|
|
2468
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(
|
|
2423
2469
|
ListItemButton,
|
|
2424
2470
|
{
|
|
2425
2471
|
id: labelId,
|
|
@@ -2428,14 +2474,14 @@ function Section({
|
|
|
2428
2474
|
onClick: handleClick,
|
|
2429
2475
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
2430
2476
|
},
|
|
2431
|
-
/* @__PURE__ */
|
|
2477
|
+
/* @__PURE__ */ React22.createElement(Stack5, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React22.createElement(
|
|
2432
2478
|
ListItemText,
|
|
2433
2479
|
{
|
|
2434
2480
|
secondary: title,
|
|
2435
2481
|
secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" },
|
|
2436
2482
|
sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
|
|
2437
2483
|
}
|
|
2438
|
-
), getCollapsibleValue(titleEnd, isOpen), titleActions && /* @__PURE__ */
|
|
2484
|
+
), getCollapsibleValue(titleEnd, isOpen), titleActions && /* @__PURE__ */ React22.createElement(
|
|
2439
2485
|
Stack5,
|
|
2440
2486
|
{
|
|
2441
2487
|
direction: "row",
|
|
@@ -2445,7 +2491,7 @@ function Section({
|
|
|
2445
2491
|
titleActions
|
|
2446
2492
|
)),
|
|
2447
2493
|
action?.component,
|
|
2448
|
-
/* @__PURE__ */
|
|
2494
|
+
/* @__PURE__ */ React22.createElement(
|
|
2449
2495
|
CollapseIcon,
|
|
2450
2496
|
{
|
|
2451
2497
|
open: isOpen,
|
|
@@ -2455,7 +2501,7 @@ function Section({
|
|
|
2455
2501
|
sx: { ml: 1 }
|
|
2456
2502
|
}
|
|
2457
2503
|
)
|
|
2458
|
-
), /* @__PURE__ */
|
|
2504
|
+
), /* @__PURE__ */ React22.createElement(
|
|
2459
2505
|
Collapse,
|
|
2460
2506
|
{
|
|
2461
2507
|
id: contentId,
|
|
@@ -2464,17 +2510,17 @@ function Section({
|
|
|
2464
2510
|
timeout: "auto",
|
|
2465
2511
|
unmountOnExit
|
|
2466
2512
|
},
|
|
2467
|
-
/* @__PURE__ */
|
|
2468
|
-
), /* @__PURE__ */
|
|
2513
|
+
/* @__PURE__ */ React22.createElement(SectionRefContext.Provider, { value: ref }, /* @__PURE__ */ React22.createElement(Stack5, { ref, gap: 2.5, p: 2, "aria-label": `${title} section content` }, children))
|
|
2514
|
+
), /* @__PURE__ */ React22.createElement(Divider2, null));
|
|
2469
2515
|
}
|
|
2470
2516
|
|
|
2471
2517
|
// src/components/settings-control.tsx
|
|
2472
|
-
import * as
|
|
2518
|
+
import * as React26 from "react";
|
|
2473
2519
|
import { ControlAdornmentsProvider } from "@elementor/editor-controls";
|
|
2474
2520
|
import { Divider as Divider3, styled as styled5 } from "@elementor/ui";
|
|
2475
2521
|
|
|
2476
2522
|
// src/controls-registry/control.tsx
|
|
2477
|
-
import * as
|
|
2523
|
+
import * as React23 from "react";
|
|
2478
2524
|
|
|
2479
2525
|
// src/controls-registry/controls-registry.tsx
|
|
2480
2526
|
import {
|
|
@@ -2609,17 +2655,17 @@ var Control = ({ props, type }) => {
|
|
|
2609
2655
|
context: { controlType: type }
|
|
2610
2656
|
});
|
|
2611
2657
|
}
|
|
2612
|
-
return /* @__PURE__ */
|
|
2658
|
+
return /* @__PURE__ */ React23.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
2613
2659
|
};
|
|
2614
2660
|
|
|
2615
2661
|
// src/controls-registry/control-type-container.tsx
|
|
2616
|
-
import * as
|
|
2662
|
+
import * as React24 from "react";
|
|
2617
2663
|
import { Box as Box5, styled as styled4 } from "@elementor/ui";
|
|
2618
2664
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
2619
2665
|
if (layout === "custom") {
|
|
2620
2666
|
return children;
|
|
2621
2667
|
}
|
|
2622
|
-
return /* @__PURE__ */
|
|
2668
|
+
return /* @__PURE__ */ React24.createElement(StyledContainer, { layout }, children);
|
|
2623
2669
|
};
|
|
2624
2670
|
var StyledContainer = styled4(Box5, {
|
|
2625
2671
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
@@ -2647,7 +2693,7 @@ var getStyleByLayout = (layout) => {
|
|
|
2647
2693
|
};
|
|
2648
2694
|
|
|
2649
2695
|
// src/controls-registry/settings-field.tsx
|
|
2650
|
-
import * as
|
|
2696
|
+
import * as React25 from "react";
|
|
2651
2697
|
import { useMemo as useMemo7 } from "react";
|
|
2652
2698
|
import { PropKeyProvider, PropProvider, useBoundProp } from "@elementor/editor-controls";
|
|
2653
2699
|
import { setDocumentModifiedStatus as setDocumentModifiedStatus2 } from "@elementor/editor-documents";
|
|
@@ -2741,14 +2787,14 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
2741
2787
|
updateElementSettings3({ id: elementId, props: settings, withHistory: false });
|
|
2742
2788
|
}
|
|
2743
2789
|
};
|
|
2744
|
-
return /* @__PURE__ */
|
|
2790
|
+
return /* @__PURE__ */ React25.createElement(PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React25.createElement(PropKeyProvider, { bind }, isResponsivePropType(propsSchema[bind]) ? /* @__PURE__ */ React25.createElement(ResponsiveBinding, null, children) : children));
|
|
2745
2791
|
};
|
|
2746
2792
|
var ResponsiveBinding = ({ children }) => {
|
|
2747
2793
|
const { value, setValue, propType, disabled } = useBoundProp(responsivePropTypeUtil);
|
|
2748
2794
|
const breakpoint = useActiveBreakpoint() ?? DESKTOP_BREAKPOINT;
|
|
2749
2795
|
const activeBreakpoints = (useBreakpoints() ?? []).map(({ id }) => id);
|
|
2750
2796
|
const inherited = responsiveFallbackChain(breakpoint).filter((key) => key !== breakpoint && activeBreakpoints.includes(key)).map((key) => value?.[key]).find((entry) => entry !== null && entry !== void 0);
|
|
2751
|
-
return /* @__PURE__ */
|
|
2797
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2752
2798
|
PropProvider,
|
|
2753
2799
|
{
|
|
2754
2800
|
propType,
|
|
@@ -2757,7 +2803,7 @@ var ResponsiveBinding = ({ children }) => {
|
|
|
2757
2803
|
placeholder: { [breakpoint]: inherited },
|
|
2758
2804
|
isDisabled: () => disabled
|
|
2759
2805
|
},
|
|
2760
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ React25.createElement(PropKeyProvider, { bind: breakpoint }, children)
|
|
2761
2807
|
);
|
|
2762
2808
|
};
|
|
2763
2809
|
function useUndoableUpdateElementProp({
|
|
@@ -2821,9 +2867,9 @@ var SettingsControl = ({ control: { value, type } }) => {
|
|
|
2821
2867
|
controlProps.label = value.label;
|
|
2822
2868
|
}
|
|
2823
2869
|
if (type === "element-control") {
|
|
2824
|
-
return /* @__PURE__ */
|
|
2870
|
+
return /* @__PURE__ */ React26.createElement(ControlLayout, { control: value, layout, controlProps });
|
|
2825
2871
|
}
|
|
2826
|
-
return /* @__PURE__ */
|
|
2872
|
+
return /* @__PURE__ */ React26.createElement(SettingsField, { bind: value.bind, propDisplayName: value.label || value.bind }, /* @__PURE__ */ React26.createElement(ControlLayout, { control: value, layout, controlProps }));
|
|
2827
2873
|
};
|
|
2828
2874
|
var ControlLayout = ({
|
|
2829
2875
|
control,
|
|
@@ -2831,7 +2877,7 @@ var ControlLayout = ({
|
|
|
2831
2877
|
controlProps
|
|
2832
2878
|
}) => {
|
|
2833
2879
|
const controlType = control.type;
|
|
2834
|
-
return /* @__PURE__ */
|
|
2880
|
+
return /* @__PURE__ */ React26.createElement(ControlAdornmentsProvider, { items: getFieldIndicators("settings") }, control.meta?.topDivider && /* @__PURE__ */ React26.createElement(Divider3, null), /* @__PURE__ */ React26.createElement(Wrapper, { "data-type": "settings-field" }, /* @__PURE__ */ React26.createElement(ControlTypeContainer, { layout }, control.label && layout !== "custom" ? /* @__PURE__ */ React26.createElement(ControlLabel, null, control.label) : null, /* @__PURE__ */ React26.createElement(Control, { type: controlType, props: controlProps }))));
|
|
2835
2881
|
};
|
|
2836
2882
|
function populateChildControlProps(props) {
|
|
2837
2883
|
if (props.childControlType) {
|
|
@@ -2855,9 +2901,9 @@ var SettingsTab = () => {
|
|
|
2855
2901
|
const settingsDefault = useDefaultPanelSettings();
|
|
2856
2902
|
const currentSettings = settings;
|
|
2857
2903
|
const isDefaultExpanded = (sectionId) => !!sectionId && settingsDefault.defaultSectionsExpanded.settings?.includes(sectionId);
|
|
2858
|
-
return /* @__PURE__ */
|
|
2904
|
+
return /* @__PURE__ */ React27.createElement(SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React27.createElement(SectionsList, null, elementType.controls.map((control, index) => {
|
|
2859
2905
|
if (isControl(control)) {
|
|
2860
|
-
return /* @__PURE__ */
|
|
2906
|
+
return /* @__PURE__ */ React27.createElement(SettingsControl, { key: getKey(control, element), control });
|
|
2861
2907
|
}
|
|
2862
2908
|
const { type, value } = control;
|
|
2863
2909
|
if (type === "section") {
|
|
@@ -2870,7 +2916,7 @@ var SettingsTab = () => {
|
|
|
2870
2916
|
if (!sectionItems.length) {
|
|
2871
2917
|
return null;
|
|
2872
2918
|
}
|
|
2873
|
-
return /* @__PURE__ */
|
|
2919
|
+
return /* @__PURE__ */ React27.createElement(
|
|
2874
2920
|
Section,
|
|
2875
2921
|
{
|
|
2876
2922
|
title: value.label,
|
|
@@ -2905,7 +2951,7 @@ function renderSectionItems({
|
|
|
2905
2951
|
if (item.type === "control" && isControlHiddenByDependencies(item, propsSchema, settings, element.id)) {
|
|
2906
2952
|
return [];
|
|
2907
2953
|
}
|
|
2908
|
-
return [/* @__PURE__ */
|
|
2954
|
+
return [/* @__PURE__ */ React27.createElement(SettingsControl, { key: getKey(item, element), control: item })];
|
|
2909
2955
|
}) ?? [];
|
|
2910
2956
|
}
|
|
2911
2957
|
function isControlHiddenByDependencies(control, propsSchema, settings, elementId) {
|
|
@@ -2915,22 +2961,22 @@ function isControlHiddenByDependencies(control, propsSchema, settings, elementId
|
|
|
2915
2961
|
}
|
|
2916
2962
|
|
|
2917
2963
|
// src/components/style-tab.tsx
|
|
2918
|
-
import * as
|
|
2964
|
+
import * as React92 from "react";
|
|
2919
2965
|
import { useState as useState10 } from "react";
|
|
2920
|
-
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
2966
|
+
import { CLASSES_PROP_KEY as CLASSES_PROP_KEY2 } from "@elementor/editor-props";
|
|
2921
2967
|
import { useActiveBreakpoint as useActiveBreakpoint2 } from "@elementor/editor-responsive";
|
|
2922
2968
|
import { createLocation as createLocation6 } from "@elementor/locations";
|
|
2923
2969
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
2924
2970
|
import { Box as Box8, Divider as Divider5, Stack as Stack13 } from "@elementor/ui";
|
|
2925
2971
|
|
|
2926
2972
|
// src/contexts/styles-inheritance-context.tsx
|
|
2927
|
-
import * as
|
|
2928
|
-
import { createContext as
|
|
2973
|
+
import * as React28 from "react";
|
|
2974
|
+
import { createContext as createContext7, useContext as useContext7, useMemo as useMemo8 } from "react";
|
|
2929
2975
|
import { getWidgetsCache as getWidgetsCache2 } from "@elementor/editor-elements";
|
|
2930
2976
|
import { classesPropTypeUtil as classesPropTypeUtil3 } from "@elementor/editor-props";
|
|
2931
2977
|
import { getBreakpointsTree as getBreakpointsTree2 } from "@elementor/editor-responsive";
|
|
2932
2978
|
import { getStylesSchema } from "@elementor/editor-styles";
|
|
2933
|
-
import { stylesRepository as
|
|
2979
|
+
import { stylesRepository as stylesRepository9 } from "@elementor/editor-styles-repository";
|
|
2934
2980
|
|
|
2935
2981
|
// src/hooks/use-default-style-tag-from-preview.ts
|
|
2936
2982
|
import { getDefaultStyleTagFromPreviewElement } from "@elementor/editor-elements";
|
|
@@ -3175,15 +3221,15 @@ var getFilterPropType = (propType, path) => {
|
|
|
3175
3221
|
};
|
|
3176
3222
|
|
|
3177
3223
|
// src/contexts/styles-inheritance-context.tsx
|
|
3178
|
-
var
|
|
3224
|
+
var Context5 = createContext7(null);
|
|
3179
3225
|
function StyleInheritanceProvider({ children }) {
|
|
3180
3226
|
const styleDefs = useAppliedStyles();
|
|
3181
3227
|
const breakpointsTree = getBreakpointsTree2();
|
|
3182
3228
|
const { getSnapshot, getInheritanceChain } = createStylesInheritance(styleDefs, breakpointsTree);
|
|
3183
|
-
return /* @__PURE__ */
|
|
3229
|
+
return /* @__PURE__ */ React28.createElement(Context5.Provider, { value: { getSnapshot, getInheritanceChain } }, children);
|
|
3184
3230
|
}
|
|
3185
3231
|
function useStylesInheritanceSnapshot() {
|
|
3186
|
-
const context =
|
|
3232
|
+
const context = useContext7(Context5);
|
|
3187
3233
|
const { meta } = useStyle();
|
|
3188
3234
|
if (!context) {
|
|
3189
3235
|
throw new Error("useStylesInheritanceSnapshot must be used within a StyleInheritanceProvider");
|
|
@@ -3194,7 +3240,7 @@ function useStylesInheritanceSnapshot() {
|
|
|
3194
3240
|
return context.getSnapshot(meta) ?? null;
|
|
3195
3241
|
}
|
|
3196
3242
|
function useStylesInheritanceChain(path) {
|
|
3197
|
-
const context =
|
|
3243
|
+
const context = useContext7(Context5);
|
|
3198
3244
|
if (!context) {
|
|
3199
3245
|
throw new Error("useStylesInheritanceChain must be used within a StyleInheritanceProvider");
|
|
3200
3246
|
}
|
|
@@ -3230,7 +3276,7 @@ var useAppliedStyles = () => {
|
|
|
3230
3276
|
...defaultTagStyleId ? [defaultTagStyleId] : [],
|
|
3231
3277
|
...activeStyleId ? [activeStyleId] : []
|
|
3232
3278
|
];
|
|
3233
|
-
return
|
|
3279
|
+
return stylesRepository9.all().filter((style) => applicableIds.includes(style.id));
|
|
3234
3280
|
};
|
|
3235
3281
|
var useBaseStyles = () => {
|
|
3236
3282
|
const { elementType } = useElement();
|
|
@@ -3289,18 +3335,18 @@ function useBroadcastStyleState(state) {
|
|
|
3289
3335
|
}
|
|
3290
3336
|
|
|
3291
3337
|
// src/components/style-sections.tsx
|
|
3292
|
-
import * as
|
|
3338
|
+
import * as React91 from "react";
|
|
3293
3339
|
|
|
3294
3340
|
// src/components/style-sections-definition.ts
|
|
3295
3341
|
import { __ as __64 } from "@wordpress/i18n";
|
|
3296
3342
|
|
|
3297
3343
|
// src/components/style-sections/background-section/background-section.tsx
|
|
3298
|
-
import * as
|
|
3344
|
+
import * as React31 from "react";
|
|
3299
3345
|
import { BackgroundControl } from "@elementor/editor-controls";
|
|
3300
3346
|
import { __ as __12 } from "@wordpress/i18n";
|
|
3301
3347
|
|
|
3302
3348
|
// src/controls-registry/styles-field.tsx
|
|
3303
|
-
import * as
|
|
3349
|
+
import * as React29 from "react";
|
|
3304
3350
|
import { ControlAdornmentsProvider as ControlAdornmentsProvider2, PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2 } from "@elementor/editor-controls";
|
|
3305
3351
|
import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil2 } from "@elementor/editor-props";
|
|
3306
3352
|
import { getStylesSchema as getStylesSchema2 } from "@elementor/editor-styles";
|
|
@@ -3445,7 +3491,7 @@ var StylesField = ({ bind, propDisplayName, children }) => {
|
|
|
3445
3491
|
const setValue = (newValue) => {
|
|
3446
3492
|
fields.setValue(newValue[bind]);
|
|
3447
3493
|
};
|
|
3448
|
-
return /* @__PURE__ */
|
|
3494
|
+
return /* @__PURE__ */ React29.createElement(ControlAdornmentsProvider2, { items: getFieldIndicators("styles") }, /* @__PURE__ */ React29.createElement(
|
|
3449
3495
|
PropProvider2,
|
|
3450
3496
|
{
|
|
3451
3497
|
propType,
|
|
@@ -3454,12 +3500,12 @@ var StylesField = ({ bind, propDisplayName, children }) => {
|
|
|
3454
3500
|
placeholder: placeholderValues,
|
|
3455
3501
|
isDisabled: () => !canEdit
|
|
3456
3502
|
},
|
|
3457
|
-
/* @__PURE__ */
|
|
3503
|
+
/* @__PURE__ */ React29.createElement(PropKeyProvider2, { bind }, /* @__PURE__ */ React29.createElement(ConditionalField, null, children))
|
|
3458
3504
|
));
|
|
3459
3505
|
};
|
|
3460
3506
|
|
|
3461
3507
|
// src/components/section-content.tsx
|
|
3462
|
-
import * as
|
|
3508
|
+
import * as React30 from "react";
|
|
3463
3509
|
import { Stack as Stack6 } from "@elementor/ui";
|
|
3464
3510
|
var SectionContent = ({
|
|
3465
3511
|
gap = 2,
|
|
@@ -3467,32 +3513,32 @@ var SectionContent = ({
|
|
|
3467
3513
|
children,
|
|
3468
3514
|
"aria-label": ariaLabel,
|
|
3469
3515
|
className
|
|
3470
|
-
}) => /* @__PURE__ */
|
|
3516
|
+
}) => /* @__PURE__ */ React30.createElement(Stack6, { gap, sx: { ...sx }, "aria-label": ariaLabel, className }, children);
|
|
3471
3517
|
|
|
3472
3518
|
// src/components/style-sections/background-section/background-section.tsx
|
|
3473
3519
|
var BACKGROUND_LABEL = __12("Background", "elementor");
|
|
3474
3520
|
var BackgroundSection = () => {
|
|
3475
|
-
return /* @__PURE__ */
|
|
3521
|
+
return /* @__PURE__ */ React31.createElement(SectionContent, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "background", propDisplayName: BACKGROUND_LABEL }, /* @__PURE__ */ React31.createElement(BackgroundControl, null)));
|
|
3476
3522
|
};
|
|
3477
3523
|
|
|
3478
3524
|
// src/components/style-sections/border-section/border-section.tsx
|
|
3479
|
-
import * as
|
|
3525
|
+
import * as React38 from "react";
|
|
3480
3526
|
|
|
3481
3527
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
3482
|
-
import * as
|
|
3528
|
+
import * as React33 from "react";
|
|
3483
3529
|
import { ColorControl } from "@elementor/editor-controls";
|
|
3484
3530
|
import { __ as __13 } from "@wordpress/i18n";
|
|
3485
3531
|
|
|
3486
3532
|
// src/components/styles-field-layout.tsx
|
|
3487
|
-
import * as
|
|
3533
|
+
import * as React32 from "react";
|
|
3488
3534
|
import { Grid, Stack as Stack7 } from "@elementor/ui";
|
|
3489
|
-
var StylesFieldLayout =
|
|
3535
|
+
var StylesFieldLayout = React32.forwardRef((props, ref) => {
|
|
3490
3536
|
const { direction = "row", children, label, infoTooltip } = props;
|
|
3491
3537
|
const LayoutComponent = direction === "row" ? Row : Column;
|
|
3492
|
-
return /* @__PURE__ */
|
|
3538
|
+
return /* @__PURE__ */ React32.createElement(LayoutComponent, { label, infoTooltip, ref, children });
|
|
3493
3539
|
});
|
|
3494
|
-
var Row =
|
|
3495
|
-
return /* @__PURE__ */
|
|
3540
|
+
var Row = React32.forwardRef(({ label, children, infoTooltip }, ref) => {
|
|
3541
|
+
return /* @__PURE__ */ React32.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref, "aria-label": `${label} control` }, /* @__PURE__ */ React32.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel, { infoTooltip }, label)), /* @__PURE__ */ React32.createElement(
|
|
3496
3542
|
Grid,
|
|
3497
3543
|
{
|
|
3498
3544
|
item: true,
|
|
@@ -3504,16 +3550,16 @@ var Row = React31.forwardRef(({ label, children, infoTooltip }, ref) => {
|
|
|
3504
3550
|
children
|
|
3505
3551
|
));
|
|
3506
3552
|
});
|
|
3507
|
-
var Column =
|
|
3508
|
-
return /* @__PURE__ */
|
|
3553
|
+
var Column = React32.forwardRef(({ label, children, infoTooltip }, ref) => {
|
|
3554
|
+
return /* @__PURE__ */ React32.createElement(Stack7, { gap: 0.75, ref }, /* @__PURE__ */ React32.createElement(ControlLabel, { infoTooltip }, label), children);
|
|
3509
3555
|
});
|
|
3510
3556
|
|
|
3511
3557
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
3512
3558
|
var BORDER_COLOR_LABEL = __13("Border color", "elementor");
|
|
3513
|
-
var BorderColorField = () => /* @__PURE__ */
|
|
3559
|
+
var BorderColorField = ({ label = BORDER_COLOR_LABEL }) => /* @__PURE__ */ React33.createElement(StylesField, { bind: "border-color", propDisplayName: label }, /* @__PURE__ */ React33.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React33.createElement(ColorControl, null)));
|
|
3514
3560
|
|
|
3515
3561
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
3516
|
-
import * as
|
|
3562
|
+
import * as React35 from "react";
|
|
3517
3563
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
3518
3564
|
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
3519
3565
|
import {
|
|
@@ -3536,12 +3582,12 @@ function useDirection() {
|
|
|
3536
3582
|
}
|
|
3537
3583
|
|
|
3538
3584
|
// src/styles-inheritance/components/ui-providers.tsx
|
|
3539
|
-
import * as
|
|
3585
|
+
import * as React34 from "react";
|
|
3540
3586
|
import { ThemeProvider as ThemeProvider2 } from "@elementor/editor-ui";
|
|
3541
3587
|
import { DirectionProvider } from "@elementor/ui";
|
|
3542
3588
|
var UiProviders = ({ children }) => {
|
|
3543
3589
|
const { isSiteRtl } = useDirection();
|
|
3544
|
-
return /* @__PURE__ */
|
|
3590
|
+
return /* @__PURE__ */ React34.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(ThemeProvider2, null, children));
|
|
3545
3591
|
};
|
|
3546
3592
|
|
|
3547
3593
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
@@ -3562,36 +3608,36 @@ var getCorners = (isSiteRtl) => [
|
|
|
3562
3608
|
{
|
|
3563
3609
|
label: getStartStartLabel(isSiteRtl),
|
|
3564
3610
|
ariaLabel: getStartStartAriaLabel(isSiteRtl),
|
|
3565
|
-
icon: /* @__PURE__ */
|
|
3611
|
+
icon: /* @__PURE__ */ React35.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
3566
3612
|
bind: "start-start"
|
|
3567
3613
|
},
|
|
3568
3614
|
{
|
|
3569
3615
|
label: getStartEndLabel(isSiteRtl),
|
|
3570
3616
|
ariaLabel: getStartEndAriaLabel(isSiteRtl),
|
|
3571
|
-
icon: /* @__PURE__ */
|
|
3617
|
+
icon: /* @__PURE__ */ React35.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
3572
3618
|
bind: "start-end"
|
|
3573
3619
|
},
|
|
3574
3620
|
{
|
|
3575
3621
|
label: getEndStartLabel(isSiteRtl),
|
|
3576
3622
|
ariaLabel: getEndStartAriaLabel(isSiteRtl),
|
|
3577
|
-
icon: /* @__PURE__ */
|
|
3623
|
+
icon: /* @__PURE__ */ React35.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
3578
3624
|
bind: "end-start"
|
|
3579
3625
|
},
|
|
3580
3626
|
{
|
|
3581
3627
|
label: getEndEndLabel(isSiteRtl),
|
|
3582
3628
|
ariaLabel: getEndEndAriaLabel(isSiteRtl),
|
|
3583
|
-
icon: /* @__PURE__ */
|
|
3629
|
+
icon: /* @__PURE__ */ React35.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
3584
3630
|
bind: "end-end"
|
|
3585
3631
|
}
|
|
3586
3632
|
];
|
|
3587
|
-
var BorderRadiusField = () => {
|
|
3633
|
+
var BorderRadiusField = ({ label = BORDER_RADIUS_LABEL }) => {
|
|
3588
3634
|
const { isSiteRtl } = useDirection();
|
|
3589
|
-
return /* @__PURE__ */
|
|
3635
|
+
return /* @__PURE__ */ React35.createElement(UiProviders, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "border-radius", propDisplayName: label }, /* @__PURE__ */ React35.createElement(
|
|
3590
3636
|
EqualUnequalSizesControl,
|
|
3591
3637
|
{
|
|
3592
3638
|
items: getCorners(isSiteRtl),
|
|
3593
|
-
label
|
|
3594
|
-
icon: /* @__PURE__ */
|
|
3639
|
+
label,
|
|
3640
|
+
icon: /* @__PURE__ */ React35.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
3595
3641
|
tooltipLabel: __14("Adjust corners", "elementor"),
|
|
3596
3642
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
3597
3643
|
}
|
|
@@ -3599,7 +3645,7 @@ var BorderRadiusField = () => {
|
|
|
3599
3645
|
};
|
|
3600
3646
|
|
|
3601
3647
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
3602
|
-
import * as
|
|
3648
|
+
import * as React36 from "react";
|
|
3603
3649
|
import { SelectControl } from "@elementor/editor-controls";
|
|
3604
3650
|
import { __ as __15 } from "@wordpress/i18n";
|
|
3605
3651
|
var BORDER_TYPE_LABEL = __15("Border type", "elementor");
|
|
@@ -3614,10 +3660,10 @@ var borderStyles = [
|
|
|
3614
3660
|
{ value: "inset", label: __15("Inset", "elementor") },
|
|
3615
3661
|
{ value: "outset", label: __15("Outset", "elementor") }
|
|
3616
3662
|
];
|
|
3617
|
-
var BorderStyleField = () => /* @__PURE__ */
|
|
3663
|
+
var BorderStyleField = ({ label = BORDER_TYPE_LABEL }) => /* @__PURE__ */ React36.createElement(StylesField, { bind: "border-style", propDisplayName: label }, /* @__PURE__ */ React36.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React36.createElement(SelectControl, { options: borderStyles })));
|
|
3618
3664
|
|
|
3619
3665
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
3620
|
-
import * as
|
|
3666
|
+
import * as React37 from "react";
|
|
3621
3667
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
3622
3668
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
3623
3669
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
@@ -3630,36 +3676,36 @@ var getEdges = (isSiteRtl) => [
|
|
|
3630
3676
|
{
|
|
3631
3677
|
label: __16("Top", "elementor"),
|
|
3632
3678
|
ariaLabel: __16("Border top width", "elementor"),
|
|
3633
|
-
icon: /* @__PURE__ */
|
|
3679
|
+
icon: /* @__PURE__ */ React37.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
3634
3680
|
bind: "block-start"
|
|
3635
3681
|
},
|
|
3636
3682
|
{
|
|
3637
3683
|
label: isSiteRtl ? __16("Left", "elementor") : __16("Right", "elementor"),
|
|
3638
3684
|
ariaLabel: isSiteRtl ? __16("Border left width", "elementor") : __16("Border right width", "elementor"),
|
|
3639
|
-
icon: /* @__PURE__ */
|
|
3685
|
+
icon: /* @__PURE__ */ React37.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
3640
3686
|
bind: "inline-end"
|
|
3641
3687
|
},
|
|
3642
3688
|
{
|
|
3643
3689
|
label: __16("Bottom", "elementor"),
|
|
3644
3690
|
ariaLabel: __16("Border bottom width", "elementor"),
|
|
3645
|
-
icon: /* @__PURE__ */
|
|
3691
|
+
icon: /* @__PURE__ */ React37.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
3646
3692
|
bind: "block-end"
|
|
3647
3693
|
},
|
|
3648
3694
|
{
|
|
3649
3695
|
label: isSiteRtl ? __16("Right", "elementor") : __16("Left", "elementor"),
|
|
3650
3696
|
ariaLabel: isSiteRtl ? __16("Border right width", "elementor") : __16("Border left width", "elementor"),
|
|
3651
|
-
icon: /* @__PURE__ */
|
|
3697
|
+
icon: /* @__PURE__ */ React37.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
3652
3698
|
bind: "inline-start"
|
|
3653
3699
|
}
|
|
3654
3700
|
];
|
|
3655
|
-
var BorderWidthField = () => {
|
|
3701
|
+
var BorderWidthField = ({ label = BORDER_WIDTH_LABEL }) => {
|
|
3656
3702
|
const { isSiteRtl } = useDirection();
|
|
3657
|
-
return /* @__PURE__ */
|
|
3703
|
+
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "border-width", propDisplayName: label }, /* @__PURE__ */ React37.createElement(
|
|
3658
3704
|
EqualUnequalSizesControl2,
|
|
3659
3705
|
{
|
|
3660
3706
|
items: getEdges(isSiteRtl),
|
|
3661
|
-
label
|
|
3662
|
-
icon: /* @__PURE__ */
|
|
3707
|
+
label,
|
|
3708
|
+
icon: /* @__PURE__ */ React37.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
3663
3709
|
tooltipLabel: __16("Adjust borders", "elementor"),
|
|
3664
3710
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
3665
3711
|
}
|
|
@@ -3667,10 +3713,10 @@ var BorderWidthField = () => {
|
|
|
3667
3713
|
};
|
|
3668
3714
|
|
|
3669
3715
|
// src/components/style-sections/border-section/border-section.tsx
|
|
3670
|
-
var BorderSection = () => /* @__PURE__ */
|
|
3716
|
+
var BorderSection = () => /* @__PURE__ */ React38.createElement(SectionContent, null, /* @__PURE__ */ React38.createElement(BorderWidthField, null), /* @__PURE__ */ React38.createElement(BorderColorField, null), /* @__PURE__ */ React38.createElement(BorderStyleField, null), /* @__PURE__ */ React38.createElement(BorderRadiusField, null));
|
|
3671
3717
|
|
|
3672
3718
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
3673
|
-
import * as
|
|
3719
|
+
import * as React42 from "react";
|
|
3674
3720
|
import {
|
|
3675
3721
|
BoxShadowRepeaterControl,
|
|
3676
3722
|
FilterRepeaterControl,
|
|
@@ -3680,9 +3726,9 @@ import {
|
|
|
3680
3726
|
import { __ as __19 } from "@wordpress/i18n";
|
|
3681
3727
|
|
|
3682
3728
|
// src/utils/can-element-have-children.ts
|
|
3683
|
-
import { getContainer as
|
|
3729
|
+
import { getContainer as getContainer3 } from "@elementor/editor-elements";
|
|
3684
3730
|
var canElementHaveChildren = (elementId) => {
|
|
3685
|
-
const container =
|
|
3731
|
+
const container = getContainer3(elementId);
|
|
3686
3732
|
if (!container) {
|
|
3687
3733
|
return false;
|
|
3688
3734
|
}
|
|
@@ -3718,12 +3764,12 @@ var getRecentlyUsedList = async (elementId) => {
|
|
|
3718
3764
|
};
|
|
3719
3765
|
|
|
3720
3766
|
// src/components/panel-divider.tsx
|
|
3721
|
-
import * as
|
|
3767
|
+
import * as React39 from "react";
|
|
3722
3768
|
import { Divider as Divider4 } from "@elementor/ui";
|
|
3723
|
-
var PanelDivider = () => /* @__PURE__ */
|
|
3769
|
+
var PanelDivider = () => /* @__PURE__ */ React39.createElement(Divider4, { sx: { my: 0.5 } });
|
|
3724
3770
|
|
|
3725
3771
|
// src/components/style-sections/effects-section/blend-mode-field.tsx
|
|
3726
|
-
import * as
|
|
3772
|
+
import * as React40 from "react";
|
|
3727
3773
|
import { SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
3728
3774
|
import { __ as __17 } from "@wordpress/i18n";
|
|
3729
3775
|
var BLEND_MODE_LABEL = __17("Blend mode", "elementor");
|
|
@@ -3745,19 +3791,19 @@ var blendModeOptions = [
|
|
|
3745
3791
|
{ label: __17("Soft light", "elementor"), value: "soft-light" },
|
|
3746
3792
|
{ label: __17("Hard light", "elementor"), value: "hard-light" }
|
|
3747
3793
|
];
|
|
3748
|
-
var BlendModeField = () => {
|
|
3749
|
-
return /* @__PURE__ */
|
|
3794
|
+
var BlendModeField = ({ label = BLEND_MODE_LABEL }) => {
|
|
3795
|
+
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "mix-blend-mode", propDisplayName: label }, /* @__PURE__ */ React40.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React40.createElement(SelectControl2, { options: blendModeOptions })));
|
|
3750
3796
|
};
|
|
3751
3797
|
|
|
3752
3798
|
// src/components/style-sections/effects-section/opacity-control-field.tsx
|
|
3753
|
-
import * as
|
|
3799
|
+
import * as React41 from "react";
|
|
3754
3800
|
import { useRef as useRef5 } from "react";
|
|
3755
3801
|
import { SizeControl as SizeControl2 } from "@elementor/editor-controls";
|
|
3756
3802
|
import { __ as __18 } from "@wordpress/i18n";
|
|
3757
3803
|
var OPACITY_LABEL = __18("Opacity", "elementor");
|
|
3758
|
-
var OpacityControlField = () => {
|
|
3804
|
+
var OpacityControlField = ({ label = OPACITY_LABEL }) => {
|
|
3759
3805
|
const rowRef = useRef5(null);
|
|
3760
|
-
return /* @__PURE__ */
|
|
3806
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "opacity", propDisplayName: label }, /* @__PURE__ */ React41.createElement(StylesFieldLayout, { ref: rowRef, label }, /* @__PURE__ */ React41.createElement(SizeControl2, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
|
|
3761
3807
|
};
|
|
3762
3808
|
|
|
3763
3809
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
@@ -3770,17 +3816,17 @@ var EffectsSection = () => {
|
|
|
3770
3816
|
const { element } = useElement();
|
|
3771
3817
|
const { meta } = useStyle();
|
|
3772
3818
|
const canHaveChildren = canElementHaveChildren(element?.id ?? "");
|
|
3773
|
-
return /* @__PURE__ */
|
|
3819
|
+
return /* @__PURE__ */ React42.createElement(SectionContent, { gap: 1 }, /* @__PURE__ */ React42.createElement(BlendModeField, null), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(OpacityControlField, null), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "box-shadow", propDisplayName: BOX_SHADOW_LABEL }, /* @__PURE__ */ React42.createElement(BoxShadowRepeaterControl, null)), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "transform", propDisplayName: TRANSFORM_LABEL }, /* @__PURE__ */ React42.createElement(TransformRepeaterControl, { showChildrenPerspective: canHaveChildren })), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "transition", propDisplayName: TRANSITIONS_LABEL }, /* @__PURE__ */ React42.createElement(
|
|
3774
3820
|
TransitionRepeaterControl,
|
|
3775
3821
|
{
|
|
3776
3822
|
currentStyleState: meta.state,
|
|
3777
3823
|
recentlyUsedListGetter: () => getRecentlyUsedList(element?.id ?? "")
|
|
3778
3824
|
}
|
|
3779
|
-
)), /* @__PURE__ */
|
|
3825
|
+
)), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "filter", propDisplayName: FILTER_LABEL }, /* @__PURE__ */ React42.createElement(FilterRepeaterControl, null)), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "backdrop-filter", propDisplayName: BACKDROP_FILTER_LABEL }, /* @__PURE__ */ React42.createElement(FilterRepeaterControl, { filterPropName: "backdrop-filter" })));
|
|
3780
3826
|
};
|
|
3781
3827
|
|
|
3782
3828
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3783
|
-
import * as
|
|
3829
|
+
import * as React63 from "react";
|
|
3784
3830
|
import { ControlFormLabel as ControlFormLabel2 } from "@elementor/editor-controls";
|
|
3785
3831
|
import { useParentElement } from "@elementor/editor-elements";
|
|
3786
3832
|
import { createLocation as createLocation4 } from "@elementor/locations";
|
|
@@ -3811,19 +3857,19 @@ function useComputedStyle(elementId) {
|
|
|
3811
3857
|
}
|
|
3812
3858
|
|
|
3813
3859
|
// src/components/style-tab-collapsible-content.tsx
|
|
3814
|
-
import * as
|
|
3860
|
+
import * as React44 from "react";
|
|
3815
3861
|
import { CollapsibleContent } from "@elementor/editor-ui";
|
|
3816
3862
|
|
|
3817
3863
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
3818
|
-
import * as
|
|
3819
|
-
import { isElementsStylesProvider as
|
|
3864
|
+
import * as React43 from "react";
|
|
3865
|
+
import { isElementsStylesProvider as isElementsStylesProvider7 } from "@elementor/editor-styles-repository";
|
|
3820
3866
|
import { Stack as Stack8, Tooltip as Tooltip2 } from "@elementor/ui";
|
|
3821
3867
|
import { __ as __20 } from "@wordpress/i18n";
|
|
3822
3868
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
3823
3869
|
const { id, meta, provider } = useStyle();
|
|
3824
3870
|
const snapshot = useStylesInheritanceSnapshot();
|
|
3825
3871
|
if (fields.includes("custom_css")) {
|
|
3826
|
-
return /* @__PURE__ */
|
|
3872
|
+
return /* @__PURE__ */ React43.createElement(CustomCssIndicator, null);
|
|
3827
3873
|
}
|
|
3828
3874
|
const snapshotFields = Object.fromEntries(
|
|
3829
3875
|
Object.entries(snapshot ?? {}).filter(([key]) => fields.includes(key))
|
|
@@ -3834,15 +3880,15 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
3834
3880
|
}
|
|
3835
3881
|
const hasValueLabel = __20("Has effective styles", "elementor");
|
|
3836
3882
|
const hasOverridesLabel = __20("Has overridden styles", "elementor");
|
|
3837
|
-
return /* @__PURE__ */
|
|
3883
|
+
return /* @__PURE__ */ React43.createElement(Tooltip2, { title: __20("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React43.createElement(Stack8, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React43.createElement(
|
|
3838
3884
|
StyleIndicator,
|
|
3839
3885
|
{
|
|
3840
3886
|
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
3841
|
-
"data-variant":
|
|
3887
|
+
"data-variant": isElementsStylesProvider7(provider.getKey()) ? "local" : "global",
|
|
3842
3888
|
role: "listitem",
|
|
3843
3889
|
"aria-label": hasValueLabel
|
|
3844
3890
|
}
|
|
3845
|
-
), hasOverrides && /* @__PURE__ */
|
|
3891
|
+
), hasOverrides && /* @__PURE__ */ React43.createElement(
|
|
3846
3892
|
StyleIndicator,
|
|
3847
3893
|
{
|
|
3848
3894
|
isOverridden: true,
|
|
@@ -3882,17 +3928,17 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
3882
3928
|
|
|
3883
3929
|
// src/components/style-tab-collapsible-content.tsx
|
|
3884
3930
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
3885
|
-
return /* @__PURE__ */
|
|
3931
|
+
return /* @__PURE__ */ React44.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
3886
3932
|
};
|
|
3887
3933
|
function getStylesInheritanceIndicators(fields) {
|
|
3888
3934
|
if (fields.length === 0) {
|
|
3889
3935
|
return null;
|
|
3890
3936
|
}
|
|
3891
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
3937
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React44.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
3892
3938
|
}
|
|
3893
3939
|
|
|
3894
3940
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
3895
|
-
import * as
|
|
3941
|
+
import * as React46 from "react";
|
|
3896
3942
|
import { ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
3897
3943
|
import {
|
|
3898
3944
|
JustifyBottomIcon,
|
|
@@ -3906,7 +3952,7 @@ import { withDirection as withDirection3 } from "@elementor/ui";
|
|
|
3906
3952
|
import { __ as __22 } from "@wordpress/i18n";
|
|
3907
3953
|
|
|
3908
3954
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
3909
|
-
import * as
|
|
3955
|
+
import * as React45 from "react";
|
|
3910
3956
|
import { useRef as useRef6 } from "react";
|
|
3911
3957
|
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
3912
3958
|
import { __ as __21 } from "@wordpress/i18n";
|
|
@@ -3932,7 +3978,7 @@ var RotatedIcon = ({
|
|
|
3932
3978
|
}) => {
|
|
3933
3979
|
const rotate = useRef6(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
3934
3980
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
3935
|
-
return /* @__PURE__ */
|
|
3981
|
+
return /* @__PURE__ */ React45.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
3936
3982
|
};
|
|
3937
3983
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
3938
3984
|
const { value: direction } = useStylesField("flex-direction", {
|
|
@@ -3965,44 +4011,44 @@ var options = [
|
|
|
3965
4011
|
{
|
|
3966
4012
|
value: "start",
|
|
3967
4013
|
label: __22("Start", "elementor"),
|
|
3968
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4014
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
3969
4015
|
showTooltip: true
|
|
3970
4016
|
},
|
|
3971
4017
|
{
|
|
3972
4018
|
value: "center",
|
|
3973
4019
|
label: __22("Center", "elementor"),
|
|
3974
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4020
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
3975
4021
|
showTooltip: true
|
|
3976
4022
|
},
|
|
3977
4023
|
{
|
|
3978
4024
|
value: "end",
|
|
3979
4025
|
label: __22("End", "elementor"),
|
|
3980
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4026
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
3981
4027
|
showTooltip: true
|
|
3982
4028
|
},
|
|
3983
4029
|
{
|
|
3984
4030
|
value: "space-between",
|
|
3985
4031
|
label: __22("Space between", "elementor"),
|
|
3986
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4032
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps }),
|
|
3987
4033
|
showTooltip: true
|
|
3988
4034
|
},
|
|
3989
4035
|
{
|
|
3990
4036
|
value: "space-around",
|
|
3991
4037
|
label: __22("Space around", "elementor"),
|
|
3992
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4038
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps }),
|
|
3993
4039
|
showTooltip: true
|
|
3994
4040
|
},
|
|
3995
4041
|
{
|
|
3996
4042
|
value: "space-evenly",
|
|
3997
4043
|
label: __22("Space evenly", "elementor"),
|
|
3998
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4044
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps }),
|
|
3999
4045
|
showTooltip: true
|
|
4000
4046
|
}
|
|
4001
4047
|
];
|
|
4002
|
-
var AlignContentField = () => /* @__PURE__ */
|
|
4048
|
+
var AlignContentField = ({ label = ALIGN_CONTENT_LABEL }) => /* @__PURE__ */ React46.createElement(StylesField, { bind: "align-content", propDisplayName: label }, /* @__PURE__ */ React46.createElement(UiProviders, null, /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React46.createElement(ToggleControl2, { options, fullWidth: true }))));
|
|
4003
4049
|
|
|
4004
4050
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
4005
|
-
import * as
|
|
4051
|
+
import * as React47 from "react";
|
|
4006
4052
|
import { ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
4007
4053
|
import {
|
|
4008
4054
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
@@ -4023,34 +4069,34 @@ var options2 = [
|
|
|
4023
4069
|
{
|
|
4024
4070
|
value: "start",
|
|
4025
4071
|
label: __23("Start", "elementor"),
|
|
4026
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4072
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
4027
4073
|
showTooltip: true
|
|
4028
4074
|
},
|
|
4029
4075
|
{
|
|
4030
4076
|
value: "center",
|
|
4031
4077
|
label: __23("Center", "elementor"),
|
|
4032
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4078
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
4033
4079
|
showTooltip: true
|
|
4034
4080
|
},
|
|
4035
4081
|
{
|
|
4036
4082
|
value: "end",
|
|
4037
4083
|
label: __23("End", "elementor"),
|
|
4038
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4084
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
4039
4085
|
showTooltip: true
|
|
4040
4086
|
},
|
|
4041
4087
|
{
|
|
4042
4088
|
value: "stretch",
|
|
4043
4089
|
label: __23("Stretch", "elementor"),
|
|
4044
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4090
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps2 }),
|
|
4045
4091
|
showTooltip: true
|
|
4046
4092
|
}
|
|
4047
4093
|
];
|
|
4048
|
-
var AlignItemsField = () => {
|
|
4049
|
-
return /* @__PURE__ */
|
|
4094
|
+
var AlignItemsField = ({ label = ALIGN_ITEMS_LABEL }) => {
|
|
4095
|
+
return /* @__PURE__ */ React47.createElement(UiProviders, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "align-items", propDisplayName: label }, /* @__PURE__ */ React47.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React47.createElement(ToggleControl3, { options: options2 }))));
|
|
4050
4096
|
};
|
|
4051
4097
|
|
|
4052
4098
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
4053
|
-
import * as
|
|
4099
|
+
import * as React48 from "react";
|
|
4054
4100
|
import { ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
4055
4101
|
import {
|
|
4056
4102
|
LayoutAlignCenterIcon as CenterIcon3,
|
|
@@ -4076,7 +4122,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
4076
4122
|
{
|
|
4077
4123
|
value: "start",
|
|
4078
4124
|
label: __24("Start", "elementor"),
|
|
4079
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4125
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(
|
|
4080
4126
|
RotatedIcon,
|
|
4081
4127
|
{
|
|
4082
4128
|
icon: StartIcon3,
|
|
@@ -4090,7 +4136,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
4090
4136
|
{
|
|
4091
4137
|
value: "center",
|
|
4092
4138
|
label: __24("Center", "elementor"),
|
|
4093
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4139
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(
|
|
4094
4140
|
RotatedIcon,
|
|
4095
4141
|
{
|
|
4096
4142
|
icon: CenterIcon3,
|
|
@@ -4104,7 +4150,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
4104
4150
|
{
|
|
4105
4151
|
value: "end",
|
|
4106
4152
|
label: __24("End", "elementor"),
|
|
4107
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4153
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(
|
|
4108
4154
|
RotatedIcon,
|
|
4109
4155
|
{
|
|
4110
4156
|
icon: EndIcon3,
|
|
@@ -4118,7 +4164,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
4118
4164
|
{
|
|
4119
4165
|
value: "stretch",
|
|
4120
4166
|
label: __24("Stretch", "elementor"),
|
|
4121
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4167
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(
|
|
4122
4168
|
RotatedIcon,
|
|
4123
4169
|
{
|
|
4124
4170
|
icon: JustifyIcon2,
|
|
@@ -4130,10 +4176,10 @@ var getOptions = (parentStyleDirection) => [
|
|
|
4130
4176
|
showTooltip: true
|
|
4131
4177
|
}
|
|
4132
4178
|
];
|
|
4133
|
-
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
4179
|
+
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React48.createElement(StylesField, { bind: "align-self", propDisplayName: ALIGN_SELF_LABEL }, /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(StylesFieldLayout, { label: ALIGN_SELF_LABEL }, /* @__PURE__ */ React48.createElement(ToggleControl4, { options: getOptions(parentStyleDirection) }))));
|
|
4134
4180
|
|
|
4135
4181
|
// src/components/style-sections/layout-section/align-self-grid-child-field.tsx
|
|
4136
|
-
import * as
|
|
4182
|
+
import * as React49 from "react";
|
|
4137
4183
|
import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
4138
4184
|
import {
|
|
4139
4185
|
JustifyBottomIcon as JustifyBottomIcon2,
|
|
@@ -4147,44 +4193,44 @@ var ALIGN_SELF_CHILD_OFFSET_MAP2 = {
|
|
|
4147
4193
|
row: 0,
|
|
4148
4194
|
column: -90
|
|
4149
4195
|
};
|
|
4150
|
-
var AlignSelfGridChild = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
4196
|
+
var AlignSelfGridChild = ({ parentStyleDirection }) => /* @__PURE__ */ React49.createElement(StylesField, { bind: "align-self", propDisplayName: ALIGN_SELF_LABEL2 }, /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(StylesFieldLayout, { label: ALIGN_SELF_LABEL2 }, /* @__PURE__ */ React49.createElement(ToggleControl5, { options: getOptions2(parentStyleDirection ?? "row") }))));
|
|
4151
4197
|
var RotatedIcon2 = ({
|
|
4152
4198
|
icon: Icon,
|
|
4153
4199
|
size,
|
|
4154
4200
|
offset
|
|
4155
|
-
}) => /* @__PURE__ */
|
|
4201
|
+
}) => /* @__PURE__ */ React49.createElement(Icon, { fontSize: size, sx: { rotate: `${offset}deg` } });
|
|
4156
4202
|
var getOptions2 = (parentStyleDirection) => {
|
|
4157
4203
|
const offset = ALIGN_SELF_CHILD_OFFSET_MAP2[parentStyleDirection.replace("dense", "").trim()];
|
|
4158
4204
|
return [
|
|
4159
4205
|
{
|
|
4160
4206
|
value: "start",
|
|
4161
4207
|
label: __25("Start", "elementor"),
|
|
4162
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4208
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(RotatedIcon2, { icon: JustifyTopIcon2, size, offset }),
|
|
4163
4209
|
showTooltip: true
|
|
4164
4210
|
},
|
|
4165
4211
|
{
|
|
4166
4212
|
value: "center",
|
|
4167
4213
|
label: __25("Center", "elementor"),
|
|
4168
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4214
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(RotatedIcon2, { icon: JustifyCenterIcon, size, offset }),
|
|
4169
4215
|
showTooltip: true
|
|
4170
4216
|
},
|
|
4171
4217
|
{
|
|
4172
4218
|
value: "end",
|
|
4173
4219
|
label: __25("End", "elementor"),
|
|
4174
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4220
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(RotatedIcon2, { icon: JustifyBottomIcon2, size, offset }),
|
|
4175
4221
|
showTooltip: true
|
|
4176
4222
|
},
|
|
4177
4223
|
{
|
|
4178
4224
|
value: "stretch",
|
|
4179
4225
|
label: __25("Stretch", "elementor"),
|
|
4180
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4226
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(RotatedIcon2, { icon: JustifyIcon3, size, offset }),
|
|
4181
4227
|
showTooltip: true
|
|
4182
4228
|
}
|
|
4183
4229
|
];
|
|
4184
4230
|
};
|
|
4185
4231
|
|
|
4186
4232
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
4187
|
-
import * as
|
|
4233
|
+
import * as React50 from "react";
|
|
4188
4234
|
import { ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
4189
4235
|
import { __ as __26 } from "@wordpress/i18n";
|
|
4190
4236
|
var DISPLAY_LABEL = __26("Display", "elementor");
|
|
@@ -4226,14 +4272,14 @@ var displayFieldItems = [
|
|
|
4226
4272
|
showTooltip: true
|
|
4227
4273
|
}
|
|
4228
4274
|
];
|
|
4229
|
-
var DisplayField = () => {
|
|
4275
|
+
var DisplayField = ({ label = DISPLAY_LABEL }) => {
|
|
4230
4276
|
const placeholder = useDisplayPlaceholderValue();
|
|
4231
|
-
return /* @__PURE__ */
|
|
4277
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "display", propDisplayName: label, placeholder }, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React50.createElement(ToggleControl6, { options: displayFieldItems, maxItems: 4, fullWidth: true })));
|
|
4232
4278
|
};
|
|
4233
4279
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
4234
4280
|
|
|
4235
4281
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
4236
|
-
import * as
|
|
4282
|
+
import * as React51 from "react";
|
|
4237
4283
|
import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
4238
4284
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
4239
4285
|
import { withDirection as withDirection6 } from "@elementor/ui";
|
|
@@ -4245,14 +4291,14 @@ var options3 = [
|
|
|
4245
4291
|
label: __27("Row", "elementor"),
|
|
4246
4292
|
renderContent: ({ size }) => {
|
|
4247
4293
|
const StartIcon7 = withDirection6(ArrowRightIcon);
|
|
4248
|
-
return /* @__PURE__ */
|
|
4294
|
+
return /* @__PURE__ */ React51.createElement(StartIcon7, { fontSize: size });
|
|
4249
4295
|
},
|
|
4250
4296
|
showTooltip: true
|
|
4251
4297
|
},
|
|
4252
4298
|
{
|
|
4253
4299
|
value: "column",
|
|
4254
4300
|
label: __27("Column", "elementor"),
|
|
4255
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4301
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
4256
4302
|
showTooltip: true
|
|
4257
4303
|
},
|
|
4258
4304
|
{
|
|
@@ -4260,23 +4306,23 @@ var options3 = [
|
|
|
4260
4306
|
label: __27("Reversed row", "elementor"),
|
|
4261
4307
|
renderContent: ({ size }) => {
|
|
4262
4308
|
const EndIcon6 = withDirection6(ArrowLeftIcon);
|
|
4263
|
-
return /* @__PURE__ */
|
|
4309
|
+
return /* @__PURE__ */ React51.createElement(EndIcon6, { fontSize: size });
|
|
4264
4310
|
},
|
|
4265
4311
|
showTooltip: true
|
|
4266
4312
|
},
|
|
4267
4313
|
{
|
|
4268
4314
|
value: "column-reverse",
|
|
4269
4315
|
label: __27("Reversed column", "elementor"),
|
|
4270
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4316
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
4271
4317
|
showTooltip: true
|
|
4272
4318
|
}
|
|
4273
4319
|
];
|
|
4274
|
-
var FlexDirectionField = () => {
|
|
4275
|
-
return /* @__PURE__ */
|
|
4320
|
+
var FlexDirectionField = ({ label = FLEX_DIRECTION_LABEL2 }) => {
|
|
4321
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "flex-direction", propDisplayName: label }, /* @__PURE__ */ React51.createElement(UiProviders, null, /* @__PURE__ */ React51.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React51.createElement(ToggleControl7, { options: options3 }))));
|
|
4276
4322
|
};
|
|
4277
4323
|
|
|
4278
4324
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
4279
|
-
import * as
|
|
4325
|
+
import * as React52 from "react";
|
|
4280
4326
|
import { useEffect as useEffect6, useMemo as useMemo9, useState as useState8 } from "react";
|
|
4281
4327
|
import {
|
|
4282
4328
|
ControlToggleButtonGroup,
|
|
@@ -4300,24 +4346,24 @@ var items = [
|
|
|
4300
4346
|
{
|
|
4301
4347
|
value: FIRST,
|
|
4302
4348
|
label: __28("First", "elementor"),
|
|
4303
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4349
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
4304
4350
|
showTooltip: true
|
|
4305
4351
|
},
|
|
4306
4352
|
{
|
|
4307
4353
|
value: LAST,
|
|
4308
4354
|
label: __28("Last", "elementor"),
|
|
4309
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4355
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
4310
4356
|
showTooltip: true
|
|
4311
4357
|
},
|
|
4312
4358
|
{
|
|
4313
4359
|
value: CUSTOM,
|
|
4314
4360
|
label: __28("Custom", "elementor"),
|
|
4315
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4361
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(PencilIcon, { fontSize: size }),
|
|
4316
4362
|
showTooltip: true
|
|
4317
4363
|
}
|
|
4318
4364
|
];
|
|
4319
4365
|
var FlexOrderField = () => {
|
|
4320
|
-
return /* @__PURE__ */
|
|
4366
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "order", propDisplayName: ORDER_LABEL }, /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(SectionContent, null, /* @__PURE__ */ React52.createElement(FlexOrderFieldContent, null))));
|
|
4321
4367
|
};
|
|
4322
4368
|
function FlexOrderFieldContent() {
|
|
4323
4369
|
const {
|
|
@@ -4362,7 +4408,7 @@ function FlexOrderFieldContent() {
|
|
|
4362
4408
|
};
|
|
4363
4409
|
const isCustomVisible = CUSTOM === activeGroup || CUSTOM === groupPlaceholder;
|
|
4364
4410
|
const orderPlaceholder = CUSTOM === groupPlaceholder ? String(placeholderValue?.value ?? null) : "";
|
|
4365
|
-
return /* @__PURE__ */
|
|
4411
|
+
return /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: ORDER_LABEL }, /* @__PURE__ */ React52.createElement(
|
|
4366
4412
|
ControlToggleButtonGroup,
|
|
4367
4413
|
{
|
|
4368
4414
|
items,
|
|
@@ -4372,7 +4418,7 @@ function FlexOrderFieldContent() {
|
|
|
4372
4418
|
placeholder: groupPlaceholder,
|
|
4373
4419
|
disabled: !canEdit
|
|
4374
4420
|
}
|
|
4375
|
-
)), isCustomVisible && /* @__PURE__ */
|
|
4421
|
+
)), isCustomVisible && /* @__PURE__ */ React52.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, __28("Custom order", "elementor"))), /* @__PURE__ */ React52.createElement(Grid2, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React52.createElement(
|
|
4376
4422
|
NumberControl2,
|
|
4377
4423
|
{
|
|
4378
4424
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -4396,7 +4442,7 @@ var getGroupControlValue = (order) => {
|
|
|
4396
4442
|
};
|
|
4397
4443
|
|
|
4398
4444
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
4399
|
-
import * as
|
|
4445
|
+
import * as React53 from "react";
|
|
4400
4446
|
import { useEffect as useEffect7, useMemo as useMemo10, useRef as useRef7, useState as useState9 } from "react";
|
|
4401
4447
|
import {
|
|
4402
4448
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
@@ -4415,24 +4461,24 @@ var items2 = [
|
|
|
4415
4461
|
{
|
|
4416
4462
|
value: "flex-grow",
|
|
4417
4463
|
label: __29("Grow", "elementor"),
|
|
4418
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4464
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(ExpandIcon, { fontSize: size }),
|
|
4419
4465
|
showTooltip: true
|
|
4420
4466
|
},
|
|
4421
4467
|
{
|
|
4422
4468
|
value: "flex-shrink",
|
|
4423
4469
|
label: __29("Shrink", "elementor"),
|
|
4424
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4470
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(ShrinkIcon, { fontSize: size }),
|
|
4425
4471
|
showTooltip: true
|
|
4426
4472
|
},
|
|
4427
4473
|
{
|
|
4428
4474
|
value: "custom",
|
|
4429
4475
|
label: __29("Custom", "elementor"),
|
|
4430
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4476
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(PencilIcon2, { fontSize: size }),
|
|
4431
4477
|
showTooltip: true
|
|
4432
4478
|
}
|
|
4433
4479
|
];
|
|
4434
4480
|
var FlexSizeField = () => {
|
|
4435
|
-
return /* @__PURE__ */
|
|
4481
|
+
return /* @__PURE__ */ React53.createElement(UiProviders, null, /* @__PURE__ */ React53.createElement(SectionContent, null, /* @__PURE__ */ React53.createElement(StylesField, { bind: "flex", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React53.createElement(FlexSizeFieldContent, null))));
|
|
4436
4482
|
};
|
|
4437
4483
|
var FlexSizeFieldContent = () => {
|
|
4438
4484
|
const { value, setValue, canEdit } = useStylesField("flex", {
|
|
@@ -4461,7 +4507,7 @@ var FlexSizeFieldContent = () => {
|
|
|
4461
4507
|
};
|
|
4462
4508
|
const groupPlaceholder = getActiveGroup(extractFlexValues(placeholder));
|
|
4463
4509
|
const isCustomVisible = "custom" === activeGroup || "custom" === groupPlaceholder;
|
|
4464
|
-
return /* @__PURE__ */
|
|
4510
|
+
return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: FLEX_SIZE_LABEL }, /* @__PURE__ */ React53.createElement(
|
|
4465
4511
|
ControlToggleButtonGroup2,
|
|
4466
4512
|
{
|
|
4467
4513
|
value: activeGroup ?? null,
|
|
@@ -4471,7 +4517,7 @@ var FlexSizeFieldContent = () => {
|
|
|
4471
4517
|
items: items2,
|
|
4472
4518
|
exclusive: true
|
|
4473
4519
|
}
|
|
4474
|
-
)), isCustomVisible && /* @__PURE__ */
|
|
4520
|
+
)), isCustomVisible && /* @__PURE__ */ React53.createElement(FlexCustomField, null));
|
|
4475
4521
|
};
|
|
4476
4522
|
function extractFlexValues(source) {
|
|
4477
4523
|
return {
|
|
@@ -4513,7 +4559,7 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
4513
4559
|
var FlexCustomField = () => {
|
|
4514
4560
|
const flexBasisRowRef = useRef7(null);
|
|
4515
4561
|
const context = useBoundProp4(flexPropTypeUtil);
|
|
4516
|
-
return /* @__PURE__ */
|
|
4562
|
+
return /* @__PURE__ */ React53.createElement(PropProvider3, { ...context }, /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: __29("Grow", "elementor") }, /* @__PURE__ */ React53.createElement(PropKeyProvider3, { bind: "flexGrow" }, /* @__PURE__ */ React53.createElement(NumberControl3, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: __29("Shrink", "elementor") }, /* @__PURE__ */ React53.createElement(PropKeyProvider3, { bind: "flexShrink" }, /* @__PURE__ */ React53.createElement(NumberControl3, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: __29("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React53.createElement(PropKeyProvider3, { bind: "flexBasis" }, /* @__PURE__ */ React53.createElement(SizeControl3, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
4517
4563
|
};
|
|
4518
4564
|
var getActiveGroup = ({
|
|
4519
4565
|
grow,
|
|
@@ -4537,16 +4583,16 @@ var getActiveGroup = ({
|
|
|
4537
4583
|
};
|
|
4538
4584
|
|
|
4539
4585
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
4540
|
-
import * as
|
|
4586
|
+
import * as React54 from "react";
|
|
4541
4587
|
import { GapControl } from "@elementor/editor-controls";
|
|
4542
4588
|
import { __ as __30 } from "@wordpress/i18n";
|
|
4543
4589
|
var GAPS_LABEL = __30("Gaps", "elementor");
|
|
4544
|
-
var GapControlField = () => {
|
|
4545
|
-
return /* @__PURE__ */
|
|
4590
|
+
var GapControlField = ({ label = GAPS_LABEL }) => {
|
|
4591
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "gap", propDisplayName: label }, /* @__PURE__ */ React54.createElement(GapControl, { label }));
|
|
4546
4592
|
};
|
|
4547
4593
|
|
|
4548
4594
|
// src/components/style-sections/layout-section/grid-auto-flow-field.tsx
|
|
4549
|
-
import * as
|
|
4595
|
+
import * as React55 from "react";
|
|
4550
4596
|
import { ControlToggleButtonGroup as ControlToggleButtonGroup3, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
4551
4597
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon3, ArrowRightIcon as ArrowRightIcon2, LayoutDashboardIcon } from "@elementor/icons";
|
|
4552
4598
|
import { Grid as Grid3, ToggleButton, Tooltip as Tooltip3, withDirection as withDirection7 } from "@elementor/ui";
|
|
@@ -4558,13 +4604,13 @@ var directionOptions = [
|
|
|
4558
4604
|
{
|
|
4559
4605
|
value: "row",
|
|
4560
4606
|
label: __31("Row", "elementor"),
|
|
4561
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4607
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(StartIcon4, { fontSize: size }),
|
|
4562
4608
|
showTooltip: true
|
|
4563
4609
|
},
|
|
4564
4610
|
{
|
|
4565
4611
|
value: "column",
|
|
4566
4612
|
label: __31("Column", "elementor"),
|
|
4567
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4613
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(ArrowDownSmallIcon3, { fontSize: size }),
|
|
4568
4614
|
showTooltip: true
|
|
4569
4615
|
}
|
|
4570
4616
|
];
|
|
@@ -4597,7 +4643,7 @@ var GridAutoFlowFieldContent = () => {
|
|
|
4597
4643
|
const nextDirection = direction ?? "row";
|
|
4598
4644
|
setValue({ $$type: "string", value: composeAutoFlow(nextDirection, !dense) });
|
|
4599
4645
|
};
|
|
4600
|
-
return /* @__PURE__ */
|
|
4646
|
+
return /* @__PURE__ */ React55.createElement(StylesFieldLayout, { label: AUTO_FLOW_LABEL }, /* @__PURE__ */ React55.createElement(Grid3, { container: true, gap: 1, flexWrap: "nowrap", alignItems: "center", justifyContent: "flex-end" }, /* @__PURE__ */ React55.createElement(Grid3, { item: true, sx: { width: 64, maxWidth: "100%" } }, /* @__PURE__ */ React55.createElement(
|
|
4601
4647
|
ControlToggleButtonGroup3,
|
|
4602
4648
|
{
|
|
4603
4649
|
items: directionOptions,
|
|
@@ -4608,7 +4654,7 @@ var GridAutoFlowFieldContent = () => {
|
|
|
4608
4654
|
fullWidth: true,
|
|
4609
4655
|
disabled: !canEdit
|
|
4610
4656
|
}
|
|
4611
|
-
)), /* @__PURE__ */
|
|
4657
|
+
)), /* @__PURE__ */ React55.createElement(Grid3, { item: true }, /* @__PURE__ */ React55.createElement(Tooltip3, { title: DENSE_LABEL, placement: "top" }, /* @__PURE__ */ React55.createElement(
|
|
4612
4658
|
ToggleButton,
|
|
4613
4659
|
{
|
|
4614
4660
|
value: "dense",
|
|
@@ -4618,13 +4664,13 @@ var GridAutoFlowFieldContent = () => {
|
|
|
4618
4664
|
"aria-label": DENSE_LABEL,
|
|
4619
4665
|
disabled: !canEdit
|
|
4620
4666
|
},
|
|
4621
|
-
/* @__PURE__ */
|
|
4667
|
+
/* @__PURE__ */ React55.createElement(LayoutDashboardIcon, { fontSize: "tiny" })
|
|
4622
4668
|
)))));
|
|
4623
4669
|
};
|
|
4624
|
-
var GridAutoFlowField = () => /* @__PURE__ */
|
|
4670
|
+
var GridAutoFlowField = () => /* @__PURE__ */ React55.createElement(StylesField, { bind: "grid-auto-flow", propDisplayName: AUTO_FLOW_LABEL }, /* @__PURE__ */ React55.createElement(UiProviders, null, /* @__PURE__ */ React55.createElement(GridAutoFlowFieldContent, null)));
|
|
4625
4671
|
|
|
4626
4672
|
// src/components/style-sections/layout-section/grid-auto-track-fields.tsx
|
|
4627
|
-
import * as
|
|
4673
|
+
import * as React56 from "react";
|
|
4628
4674
|
import { useRef as useRef8 } from "react";
|
|
4629
4675
|
import { SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
4630
4676
|
import { Stack as Stack9 } from "@elementor/ui";
|
|
@@ -4640,7 +4686,7 @@ var AUTO_COLUMNS_TOOLTIP = __32(
|
|
|
4640
4686
|
"Set the size for new columns created automatically when content exceeds the defined grid.",
|
|
4641
4687
|
"elementor"
|
|
4642
4688
|
);
|
|
4643
|
-
var GridAutoTrackField = ({ bind, infoTooltip, label, rowRef }) => /* @__PURE__ */
|
|
4689
|
+
var GridAutoTrackField = ({ bind, infoTooltip, label, rowRef }) => /* @__PURE__ */ React56.createElement(StylesField, { bind, propDisplayName: label }, /* @__PURE__ */ React56.createElement(StylesFieldLayout, { infoTooltip, label, ref: rowRef }, /* @__PURE__ */ React56.createElement(
|
|
4644
4690
|
SizeControl4,
|
|
4645
4691
|
{
|
|
4646
4692
|
enablePropTypeUnits: true,
|
|
@@ -4650,7 +4696,7 @@ var GridAutoTrackField = ({ bind, infoTooltip, label, rowRef }) => /* @__PURE__
|
|
|
4650
4696
|
)));
|
|
4651
4697
|
var GridAutoTrackFields = () => {
|
|
4652
4698
|
const rowRef = useRef8(null);
|
|
4653
|
-
return /* @__PURE__ */
|
|
4699
|
+
return /* @__PURE__ */ React56.createElement(Stack9, { gap: 2, pt: 2, ref: rowRef }, /* @__PURE__ */ React56.createElement(
|
|
4654
4700
|
GridAutoTrackField,
|
|
4655
4701
|
{
|
|
4656
4702
|
bind: "grid-auto-rows",
|
|
@@ -4658,7 +4704,7 @@ var GridAutoTrackFields = () => {
|
|
|
4658
4704
|
label: AUTO_ROWS_LABEL,
|
|
4659
4705
|
rowRef
|
|
4660
4706
|
}
|
|
4661
|
-
), /* @__PURE__ */
|
|
4707
|
+
), /* @__PURE__ */ React56.createElement(
|
|
4662
4708
|
GridAutoTrackField,
|
|
4663
4709
|
{
|
|
4664
4710
|
bind: "grid-auto-columns",
|
|
@@ -4670,7 +4716,7 @@ var GridAutoTrackFields = () => {
|
|
|
4670
4716
|
};
|
|
4671
4717
|
|
|
4672
4718
|
// src/components/style-sections/layout-section/grid-justify-items-field.tsx
|
|
4673
|
-
import * as
|
|
4719
|
+
import * as React57 from "react";
|
|
4674
4720
|
import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
4675
4721
|
import {
|
|
4676
4722
|
LayoutAlignCenterIcon as CenterIcon4,
|
|
@@ -4687,32 +4733,32 @@ var options4 = [
|
|
|
4687
4733
|
{
|
|
4688
4734
|
value: "start",
|
|
4689
4735
|
label: __33("Start", "elementor"),
|
|
4690
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4736
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(StartIcon5, { fontSize: size }),
|
|
4691
4737
|
showTooltip: true
|
|
4692
4738
|
},
|
|
4693
4739
|
{
|
|
4694
4740
|
value: "center",
|
|
4695
4741
|
label: __33("Center", "elementor"),
|
|
4696
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4742
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(CenterIcon4, { fontSize: size }),
|
|
4697
4743
|
showTooltip: true
|
|
4698
4744
|
},
|
|
4699
4745
|
{
|
|
4700
4746
|
value: "end",
|
|
4701
4747
|
label: __33("End", "elementor"),
|
|
4702
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4748
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(EndIcon4, { fontSize: size }),
|
|
4703
4749
|
showTooltip: true
|
|
4704
4750
|
},
|
|
4705
4751
|
{
|
|
4706
4752
|
value: "stretch",
|
|
4707
4753
|
label: __33("Stretch", "elementor"),
|
|
4708
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4754
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(StretchIcon, { fontSize: size }),
|
|
4709
4755
|
showTooltip: true
|
|
4710
4756
|
}
|
|
4711
4757
|
];
|
|
4712
|
-
var GridJustifyItemsField = () => /* @__PURE__ */
|
|
4758
|
+
var GridJustifyItemsField = ({ label = JUSTIFY_ITEMS_LABEL }) => /* @__PURE__ */ React57.createElement(StylesField, { bind: "justify-items", propDisplayName: label }, /* @__PURE__ */ React57.createElement(UiProviders, null, /* @__PURE__ */ React57.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React57.createElement(ToggleControl8, { options: options4 }))));
|
|
4713
4759
|
|
|
4714
4760
|
// src/components/style-sections/layout-section/grid-outline-field.tsx
|
|
4715
|
-
import * as
|
|
4761
|
+
import * as React58 from "react";
|
|
4716
4762
|
import { updateElementEditorSettings, useElementEditorSettings } from "@elementor/editor-elements";
|
|
4717
4763
|
import { Box as Box6, Switch } from "@elementor/ui";
|
|
4718
4764
|
import { __ as __34 } from "@wordpress/i18n";
|
|
@@ -4721,7 +4767,7 @@ var GridOutlineField = () => {
|
|
|
4721
4767
|
const { element } = useElement();
|
|
4722
4768
|
const settings = useElementEditorSettings(element.id);
|
|
4723
4769
|
const value = settings?.grid_outline ?? true;
|
|
4724
|
-
return /* @__PURE__ */
|
|
4770
|
+
return /* @__PURE__ */ React58.createElement(StylesFieldLayout, { label: GRID_OUTLINE_LABEL }, /* @__PURE__ */ React58.createElement(Box6, { sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React58.createElement(
|
|
4725
4771
|
Switch,
|
|
4726
4772
|
{
|
|
4727
4773
|
"aria-label": GRID_OUTLINE_LABEL,
|
|
@@ -4738,7 +4784,7 @@ var GridOutlineField = () => {
|
|
|
4738
4784
|
};
|
|
4739
4785
|
|
|
4740
4786
|
// src/components/style-sections/layout-section/grid-size-field.tsx
|
|
4741
|
-
import * as
|
|
4787
|
+
import * as React59 from "react";
|
|
4742
4788
|
import { useRef as useRef9 } from "react";
|
|
4743
4789
|
import { ControlActions, createControl, SizeComponent, useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
4744
4790
|
import { Grid as Grid4 } from "@elementor/ui";
|
|
@@ -4839,8 +4885,8 @@ var unitOf = (v, fallback = FR) => {
|
|
|
4839
4885
|
};
|
|
4840
4886
|
|
|
4841
4887
|
// src/components/style-sections/layout-section/grid-size-field.tsx
|
|
4842
|
-
var SizeFieldWrapper = ({ children }) => /* @__PURE__ */
|
|
4843
|
-
var GridTrackSizeInput = createControl((props) => /* @__PURE__ */
|
|
4888
|
+
var SizeFieldWrapper = ({ children }) => /* @__PURE__ */ React59.createElement(ControlActions, null, children);
|
|
4889
|
+
var GridTrackSizeInput = createControl((props) => /* @__PURE__ */ React59.createElement(
|
|
4844
4890
|
SizeComponent,
|
|
4845
4891
|
{
|
|
4846
4892
|
units: UNITS,
|
|
@@ -4872,7 +4918,7 @@ var GridTrackFieldContent = ({ cssProp, label }) => {
|
|
|
4872
4918
|
}
|
|
4873
4919
|
setValue(toPropValue(next));
|
|
4874
4920
|
};
|
|
4875
|
-
return /* @__PURE__ */
|
|
4921
|
+
return /* @__PURE__ */ React59.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React59.createElement("div", { ref: anchorRef }, /* @__PURE__ */ React59.createElement(
|
|
4876
4922
|
GridTrackSizeInput,
|
|
4877
4923
|
{
|
|
4878
4924
|
value: displayValue,
|
|
@@ -4882,22 +4928,22 @@ var GridTrackFieldContent = ({ cssProp, label }) => {
|
|
|
4882
4928
|
}
|
|
4883
4929
|
)));
|
|
4884
4930
|
};
|
|
4885
|
-
var GridTrackField = ({ cssProp, label }) => /* @__PURE__ */
|
|
4886
|
-
var GridSizeFields = () => /* @__PURE__ */
|
|
4931
|
+
var GridTrackField = ({ cssProp, label }) => /* @__PURE__ */ React59.createElement(UiProviders, null, /* @__PURE__ */ React59.createElement(StylesField, { bind: cssProp, propDisplayName: label }, /* @__PURE__ */ React59.createElement(GridTrackFieldContent, { cssProp, label })));
|
|
4932
|
+
var GridSizeFields = () => /* @__PURE__ */ React59.createElement(Grid4, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(GridTrackField, { cssProp: "grid-template-columns", label: __35("Columns", "elementor") })), /* @__PURE__ */ React59.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(GridTrackField, { cssProp: "grid-template-rows", label: __35("Rows", "elementor") })));
|
|
4887
4933
|
|
|
4888
4934
|
// src/components/style-sections/layout-section/grid-span-field.tsx
|
|
4889
|
-
import * as
|
|
4935
|
+
import * as React60 from "react";
|
|
4890
4936
|
import { GridSpanControl } from "@elementor/editor-controls";
|
|
4891
4937
|
import { Grid as Grid5 } from "@elementor/ui";
|
|
4892
4938
|
import { __ as __36 } from "@wordpress/i18n";
|
|
4893
4939
|
var GridSpanFieldContent = ({ label }) => {
|
|
4894
|
-
return /* @__PURE__ */
|
|
4940
|
+
return /* @__PURE__ */ React60.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React60.createElement(GridSpanControl, null));
|
|
4895
4941
|
};
|
|
4896
|
-
var GridSpanField = ({ cssProp, label }) => /* @__PURE__ */
|
|
4897
|
-
var GridSpanFields = () => /* @__PURE__ */
|
|
4942
|
+
var GridSpanField = ({ cssProp, label }) => /* @__PURE__ */ React60.createElement(StylesField, { bind: cssProp, propDisplayName: label }, /* @__PURE__ */ React60.createElement(UiProviders, null, /* @__PURE__ */ React60.createElement(GridSpanFieldContent, { cssProp, label })));
|
|
4943
|
+
var GridSpanFields = () => /* @__PURE__ */ React60.createElement(Grid5, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(GridSpanField, { cssProp: "grid-column", label: __36("Grid column", "elementor") })), /* @__PURE__ */ React60.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(GridSpanField, { cssProp: "grid-row", label: __36("Grid row", "elementor") })));
|
|
4898
4944
|
|
|
4899
4945
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
4900
|
-
import * as
|
|
4946
|
+
import * as React61 from "react";
|
|
4901
4947
|
import { ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
4902
4948
|
import {
|
|
4903
4949
|
JustifyBottomIcon as JustifyBottomIcon3,
|
|
@@ -4920,44 +4966,44 @@ var options5 = [
|
|
|
4920
4966
|
{
|
|
4921
4967
|
value: "flex-start",
|
|
4922
4968
|
label: __37("Start", "elementor"),
|
|
4923
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4969
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(RotatedIcon, { icon: StartIcon6, size, ...iconProps4 }),
|
|
4924
4970
|
showTooltip: true
|
|
4925
4971
|
},
|
|
4926
4972
|
{
|
|
4927
4973
|
value: "center",
|
|
4928
4974
|
label: __37("Center", "elementor"),
|
|
4929
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4975
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(RotatedIcon, { icon: CenterIcon5, size, ...iconProps4 }),
|
|
4930
4976
|
showTooltip: true
|
|
4931
4977
|
},
|
|
4932
4978
|
{
|
|
4933
4979
|
value: "flex-end",
|
|
4934
4980
|
label: __37("End", "elementor"),
|
|
4935
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4981
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(RotatedIcon, { icon: EndIcon5, size, ...iconProps4 }),
|
|
4936
4982
|
showTooltip: true
|
|
4937
4983
|
},
|
|
4938
4984
|
{
|
|
4939
4985
|
value: "space-between",
|
|
4940
4986
|
label: __37("Space between", "elementor"),
|
|
4941
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4987
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(RotatedIcon, { icon: BetweenIcon2, size, ...iconProps4 }),
|
|
4942
4988
|
showTooltip: true
|
|
4943
4989
|
},
|
|
4944
4990
|
{
|
|
4945
4991
|
value: "space-around",
|
|
4946
4992
|
label: __37("Space around", "elementor"),
|
|
4947
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4993
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(RotatedIcon, { icon: AroundIcon2, size, ...iconProps4 }),
|
|
4948
4994
|
showTooltip: true
|
|
4949
4995
|
},
|
|
4950
4996
|
{
|
|
4951
4997
|
value: "space-evenly",
|
|
4952
4998
|
label: __37("Space evenly", "elementor"),
|
|
4953
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4999
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(RotatedIcon, { icon: EvenlyIcon2, size, ...iconProps4 }),
|
|
4954
5000
|
showTooltip: true
|
|
4955
5001
|
}
|
|
4956
5002
|
];
|
|
4957
|
-
var JustifyContentField = () => /* @__PURE__ */
|
|
5003
|
+
var JustifyContentField = ({ label = JUSTIFY_CONTENT_LABEL }) => /* @__PURE__ */ React61.createElement(StylesField, { bind: "justify-content", propDisplayName: label }, /* @__PURE__ */ React61.createElement(UiProviders, null, /* @__PURE__ */ React61.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React61.createElement(ToggleControl9, { options: options5, fullWidth: true }))));
|
|
4958
5004
|
|
|
4959
5005
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
4960
|
-
import * as
|
|
5006
|
+
import * as React62 from "react";
|
|
4961
5007
|
import { ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
4962
5008
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon3 } from "@elementor/icons";
|
|
4963
5009
|
import { __ as __38 } from "@wordpress/i18n";
|
|
@@ -4966,24 +5012,24 @@ var options6 = [
|
|
|
4966
5012
|
{
|
|
4967
5013
|
value: "nowrap",
|
|
4968
5014
|
label: __38("No wrap", "elementor"),
|
|
4969
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5015
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(ArrowRightIcon3, { fontSize: size }),
|
|
4970
5016
|
showTooltip: true
|
|
4971
5017
|
},
|
|
4972
5018
|
{
|
|
4973
5019
|
value: "wrap",
|
|
4974
5020
|
label: __38("Wrap", "elementor"),
|
|
4975
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5021
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(ArrowBackIcon, { fontSize: size }),
|
|
4976
5022
|
showTooltip: true
|
|
4977
5023
|
},
|
|
4978
5024
|
{
|
|
4979
5025
|
value: "wrap-reverse",
|
|
4980
5026
|
label: __38("Reversed wrap", "elementor"),
|
|
4981
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5027
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
4982
5028
|
showTooltip: true
|
|
4983
5029
|
}
|
|
4984
5030
|
];
|
|
4985
|
-
var WrapField = () => {
|
|
4986
|
-
return /* @__PURE__ */
|
|
5031
|
+
var WrapField = ({ label = FLEX_WRAP_LABEL }) => {
|
|
5032
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "flex-wrap", propDisplayName: label }, /* @__PURE__ */ React62.createElement(UiProviders, null, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React62.createElement(ToggleControl10, { options: options6 }))));
|
|
4987
5033
|
};
|
|
4988
5034
|
|
|
4989
5035
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -5010,17 +5056,17 @@ var LayoutSection = () => {
|
|
|
5010
5056
|
}
|
|
5011
5057
|
return DEFAULT_PARENT_FLOW_DIRECTION;
|
|
5012
5058
|
};
|
|
5013
|
-
return /* @__PURE__ */
|
|
5059
|
+
return /* @__PURE__ */ React63.createElement(SectionContent, null, /* @__PURE__ */ React63.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React63.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React63.createElement(FlexChildFields, { parentStyleDirection: getParentStyleDirection() }), isDisplayGrid && /* @__PURE__ */ React63.createElement(GridFields, null), "grid" === parentStyle?.display && /* @__PURE__ */ React63.createElement(GridChildFields, { parentStyleDirection: getParentStyleDirection() }));
|
|
5014
5060
|
};
|
|
5015
5061
|
var FlexFields = () => {
|
|
5016
5062
|
const { value: flexWrap } = useStylesField("flex-wrap", {
|
|
5017
5063
|
history: { propDisplayName: FLEX_WRAP_LABEL2 }
|
|
5018
5064
|
});
|
|
5019
|
-
return /* @__PURE__ */
|
|
5065
|
+
return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(FlexDirectionField, null), /* @__PURE__ */ React63.createElement(JustifyContentField, null), /* @__PURE__ */ React63.createElement(AlignItemsField, null), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(GapControlField, null), /* @__PURE__ */ React63.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React63.createElement(AlignContentField, null));
|
|
5020
5066
|
};
|
|
5021
|
-
var GridFields = () => /* @__PURE__ */
|
|
5022
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
5023
|
-
var GridChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
5067
|
+
var GridFields = () => /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(GridOutlineField, null), /* @__PURE__ */ React63.createElement(GridSizeFields, null), /* @__PURE__ */ React63.createElement(GridAutoFlowField, null), /* @__PURE__ */ React63.createElement(GridFieldsSlot, null), /* @__PURE__ */ React63.createElement(StyleTabCollapsibleContent, { fields: ["grid-auto-rows", "grid-auto-columns"] }, /* @__PURE__ */ React63.createElement(GridAutoTrackFields, null)), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(GapControlField, null), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(GridJustifyItemsField, null), /* @__PURE__ */ React63.createElement(AlignItemsField, null));
|
|
5068
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(ControlFormLabel2, null, __39("Flex child", "elementor")), /* @__PURE__ */ React63.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React63.createElement(FlexOrderField, null), /* @__PURE__ */ React63.createElement(FlexSizeField, null));
|
|
5069
|
+
var GridChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(ControlFormLabel2, null, __39("Grid child", "elementor")), /* @__PURE__ */ React63.createElement(GridSpanFields, null), /* @__PURE__ */ React63.createElement(AlignSelfGridChild, { parentStyleDirection }), /* @__PURE__ */ React63.createElement(FlexOrderField, null));
|
|
5024
5070
|
var shouldDisplayFlexFields = (display, local) => {
|
|
5025
5071
|
const value = display?.value ?? local?.value;
|
|
5026
5072
|
if (!value) {
|
|
@@ -5030,14 +5076,14 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
5030
5076
|
};
|
|
5031
5077
|
|
|
5032
5078
|
// src/components/style-sections/position-section/position-section.tsx
|
|
5033
|
-
import * as
|
|
5079
|
+
import * as React68 from "react";
|
|
5034
5080
|
import { useEffect as useEffect8, useRef as useRef12 } from "react";
|
|
5035
5081
|
import { useSessionStorage as useSessionStorage4 } from "@elementor/session";
|
|
5036
5082
|
import { styled as styled6 } from "@elementor/ui";
|
|
5037
5083
|
import { __ as __44 } from "@wordpress/i18n";
|
|
5038
5084
|
|
|
5039
5085
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
5040
|
-
import * as
|
|
5086
|
+
import * as React64 from "react";
|
|
5041
5087
|
import { useRef as useRef10 } from "react";
|
|
5042
5088
|
import { SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
5043
5089
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
@@ -5046,24 +5092,24 @@ import { __ as __40 } from "@wordpress/i18n";
|
|
|
5046
5092
|
var InlineStartIcon2 = withDirection10(SideLeftIcon2);
|
|
5047
5093
|
var InlineEndIcon2 = withDirection10(SideRightIcon2);
|
|
5048
5094
|
var sideIcons = {
|
|
5049
|
-
"inset-block-start": /* @__PURE__ */
|
|
5050
|
-
"inset-block-end": /* @__PURE__ */
|
|
5051
|
-
"inset-inline-start": /* @__PURE__ */
|
|
5052
|
-
"inset-inline-end": /* @__PURE__ */
|
|
5095
|
+
"inset-block-start": /* @__PURE__ */ React64.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
5096
|
+
"inset-block-end": /* @__PURE__ */ React64.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
5097
|
+
"inset-inline-start": /* @__PURE__ */ React64.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
5098
|
+
"inset-inline-end": /* @__PURE__ */ React64.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
5053
5099
|
};
|
|
5054
5100
|
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __40("Right", "elementor") : __40("Left", "elementor");
|
|
5055
5101
|
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __40("Left", "elementor") : __40("Right", "elementor");
|
|
5056
5102
|
var DimensionsField = () => {
|
|
5057
5103
|
const { isSiteRtl } = useDirection();
|
|
5058
5104
|
const rowRefs = [useRef10(null), useRef10(null)];
|
|
5059
|
-
return /* @__PURE__ */
|
|
5105
|
+
return /* @__PURE__ */ React64.createElement(UiProviders, null, /* @__PURE__ */ React64.createElement(Stack10, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React64.createElement(DimensionField, { side: "inset-block-start", label: __40("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React64.createElement(
|
|
5060
5106
|
DimensionField,
|
|
5061
5107
|
{
|
|
5062
5108
|
side: "inset-inline-end",
|
|
5063
5109
|
label: getInlineEndLabel(isSiteRtl),
|
|
5064
5110
|
rowRef: rowRefs[0]
|
|
5065
5111
|
}
|
|
5066
|
-
)), /* @__PURE__ */
|
|
5112
|
+
)), /* @__PURE__ */ React64.createElement(Stack10, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React64.createElement(DimensionField, { side: "inset-block-end", label: __40("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React64.createElement(
|
|
5067
5113
|
DimensionField,
|
|
5068
5114
|
{
|
|
5069
5115
|
side: "inset-inline-start",
|
|
@@ -5076,7 +5122,7 @@ var DimensionField = ({
|
|
|
5076
5122
|
side,
|
|
5077
5123
|
label,
|
|
5078
5124
|
rowRef
|
|
5079
|
-
}) => /* @__PURE__ */
|
|
5125
|
+
}) => /* @__PURE__ */ React64.createElement(StylesField, { bind: side, propDisplayName: label }, /* @__PURE__ */ React64.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React64.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React64.createElement(ControlLabel, null, label)), /* @__PURE__ */ React64.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React64.createElement(
|
|
5080
5126
|
SizeControl5,
|
|
5081
5127
|
{
|
|
5082
5128
|
startIcon: sideIcons[side],
|
|
@@ -5087,19 +5133,19 @@ var DimensionField = ({
|
|
|
5087
5133
|
))));
|
|
5088
5134
|
|
|
5089
5135
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
5090
|
-
import * as
|
|
5136
|
+
import * as React65 from "react";
|
|
5091
5137
|
import { useRef as useRef11 } from "react";
|
|
5092
5138
|
import { SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
5093
5139
|
import { __ as __41 } from "@wordpress/i18n";
|
|
5094
5140
|
var OFFSET_LABEL = __41("Anchor offset", "elementor");
|
|
5095
5141
|
var UNITS2 = ["px", "em", "rem", "vw", "vh"];
|
|
5096
|
-
var OffsetField = () => {
|
|
5142
|
+
var OffsetField = ({ label = OFFSET_LABEL }) => {
|
|
5097
5143
|
const rowRef = useRef11(null);
|
|
5098
|
-
return /* @__PURE__ */
|
|
5144
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: label }, /* @__PURE__ */ React65.createElement(StylesFieldLayout, { label, ref: rowRef }, /* @__PURE__ */ React65.createElement(SizeControl6, { units: UNITS2, anchorRef: rowRef })));
|
|
5099
5145
|
};
|
|
5100
5146
|
|
|
5101
5147
|
// src/components/style-sections/position-section/position-field.tsx
|
|
5102
|
-
import * as
|
|
5148
|
+
import * as React66 from "react";
|
|
5103
5149
|
import { SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
5104
5150
|
import { __ as __42 } from "@wordpress/i18n";
|
|
5105
5151
|
var POSITION_LABEL = __42("Position", "elementor");
|
|
@@ -5110,24 +5156,24 @@ var positionOptions = [
|
|
|
5110
5156
|
{ label: __42("Fixed", "elementor"), value: "fixed" },
|
|
5111
5157
|
{ label: __42("Sticky", "elementor"), value: "sticky" }
|
|
5112
5158
|
];
|
|
5113
|
-
var PositionField = () => {
|
|
5114
|
-
return /* @__PURE__ */
|
|
5159
|
+
var PositionField = ({ label = POSITION_LABEL }) => {
|
|
5160
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "position", propDisplayName: label }, /* @__PURE__ */ React66.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React66.createElement(SelectControl3, { options: positionOptions })));
|
|
5115
5161
|
};
|
|
5116
5162
|
|
|
5117
5163
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
5118
|
-
import * as
|
|
5164
|
+
import * as React67 from "react";
|
|
5119
5165
|
import { NumberControl as NumberControl4 } from "@elementor/editor-controls";
|
|
5120
5166
|
import { InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
|
|
5121
5167
|
import { Alert as Alert4, AlertTitle as AlertTitle3, Box as Box7, Infotip as Infotip2 } from "@elementor/ui";
|
|
5122
5168
|
import { __ as __43 } from "@wordpress/i18n";
|
|
5123
5169
|
var Z_INDEX_LABEL = __43("Z-index", "elementor");
|
|
5124
|
-
var ZIndexField = ({ disabled }) => {
|
|
5125
|
-
const StyleField = /* @__PURE__ */
|
|
5126
|
-
const content = /* @__PURE__ */
|
|
5170
|
+
var ZIndexField = ({ disabled, label = Z_INDEX_LABEL }) => {
|
|
5171
|
+
const StyleField = /* @__PURE__ */ React67.createElement(StylesField, { bind: "z-index", propDisplayName: label }, /* @__PURE__ */ React67.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React67.createElement(NumberControl4, { disabled })));
|
|
5172
|
+
const content = /* @__PURE__ */ React67.createElement(Alert4, { color: "secondary", icon: /* @__PURE__ */ React67.createElement(InfoCircleFilledIcon2, null), size: "small" }, /* @__PURE__ */ React67.createElement(AlertTitle3, null, __43("Z-index", "elementor")), /* @__PURE__ */ React67.createElement(Box7, { component: "span" }, __43(
|
|
5127
5173
|
"z-index only works on positioned elements. Change position to relative, absolute, or fixed to enable layering.",
|
|
5128
5174
|
"elementor"
|
|
5129
5175
|
)));
|
|
5130
|
-
return disabled ? /* @__PURE__ */
|
|
5176
|
+
return disabled ? /* @__PURE__ */ React67.createElement(
|
|
5131
5177
|
Infotip2,
|
|
5132
5178
|
{
|
|
5133
5179
|
placement: "right",
|
|
@@ -5135,8 +5181,8 @@ var ZIndexField = ({ disabled }) => {
|
|
|
5135
5181
|
color: "secondary",
|
|
5136
5182
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
5137
5183
|
},
|
|
5138
|
-
/* @__PURE__ */
|
|
5139
|
-
) : /* @__PURE__ */
|
|
5184
|
+
/* @__PURE__ */ React67.createElement(Box7, null, StyleField)
|
|
5185
|
+
) : /* @__PURE__ */ React67.createElement(React67.Fragment, null, StyleField);
|
|
5140
5186
|
};
|
|
5141
5187
|
|
|
5142
5188
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -5171,7 +5217,7 @@ var PositionSection = () => {
|
|
|
5171
5217
|
}
|
|
5172
5218
|
positionPrevRef.current = position;
|
|
5173
5219
|
}, [position?.value, isPositionUnsetOrStatic]);
|
|
5174
|
-
return /* @__PURE__ */
|
|
5220
|
+
return /* @__PURE__ */ React68.createElement(StyledSectionContent, null, /* @__PURE__ */ React68.createElement(PositionField, null), /* @__PURE__ */ React68.createElement(DimensionsField, null), /* @__PURE__ */ React68.createElement(ZIndexField, { disabled: isPositionUnsetOrStatic }), /* @__PURE__ */ React68.createElement(PanelDivider, null), /* @__PURE__ */ React68.createElement(OffsetField, null));
|
|
5175
5221
|
};
|
|
5176
5222
|
var usePersistDimensions = () => {
|
|
5177
5223
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -5221,14 +5267,14 @@ var StyledSectionContent = styled6(SectionContent, {
|
|
|
5221
5267
|
}));
|
|
5222
5268
|
|
|
5223
5269
|
// src/components/style-sections/size-section/size-section.tsx
|
|
5224
|
-
import * as
|
|
5270
|
+
import * as React71 from "react";
|
|
5225
5271
|
import { useRef as useRef13 } from "react";
|
|
5226
5272
|
import { AspectRatioControl, PositionControl, SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
5227
5273
|
import { Grid as Grid7, Stack as Stack11 } from "@elementor/ui";
|
|
5228
5274
|
import { __ as __47 } from "@wordpress/i18n";
|
|
5229
5275
|
|
|
5230
5276
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
5231
|
-
import * as
|
|
5277
|
+
import * as React69 from "react";
|
|
5232
5278
|
import { SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
5233
5279
|
import { __ as __45 } from "@wordpress/i18n";
|
|
5234
5280
|
var OBJECT_FIT_LABEL = __45("Object fit", "elementor");
|
|
@@ -5239,12 +5285,12 @@ var positionOptions2 = [
|
|
|
5239
5285
|
{ label: __45("None", "elementor"), value: "none" },
|
|
5240
5286
|
{ label: __45("Scale down", "elementor"), value: "scale-down" }
|
|
5241
5287
|
];
|
|
5242
|
-
var ObjectFitField = () => {
|
|
5243
|
-
return /* @__PURE__ */
|
|
5288
|
+
var ObjectFitField = ({ label = OBJECT_FIT_LABEL }) => {
|
|
5289
|
+
return /* @__PURE__ */ React69.createElement(StylesField, { bind: "object-fit", propDisplayName: label }, /* @__PURE__ */ React69.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React69.createElement(SelectControl4, { options: positionOptions2 })));
|
|
5244
5290
|
};
|
|
5245
5291
|
|
|
5246
5292
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
5247
|
-
import * as
|
|
5293
|
+
import * as React70 from "react";
|
|
5248
5294
|
import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
5249
5295
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
5250
5296
|
import { __ as __46 } from "@wordpress/i18n";
|
|
@@ -5253,24 +5299,24 @@ var options7 = [
|
|
|
5253
5299
|
{
|
|
5254
5300
|
value: "visible",
|
|
5255
5301
|
label: __46("Visible", "elementor"),
|
|
5256
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5302
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(EyeIcon, { fontSize: size }),
|
|
5257
5303
|
showTooltip: true
|
|
5258
5304
|
},
|
|
5259
5305
|
{
|
|
5260
5306
|
value: "hidden",
|
|
5261
5307
|
label: __46("Hidden", "elementor"),
|
|
5262
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5308
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(EyeOffIcon, { fontSize: size }),
|
|
5263
5309
|
showTooltip: true
|
|
5264
5310
|
},
|
|
5265
5311
|
{
|
|
5266
5312
|
value: "auto",
|
|
5267
5313
|
label: __46("Auto", "elementor"),
|
|
5268
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5314
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(LetterAIcon, { fontSize: size }),
|
|
5269
5315
|
showTooltip: true
|
|
5270
5316
|
}
|
|
5271
5317
|
];
|
|
5272
|
-
var OverflowField = () => {
|
|
5273
|
-
return /* @__PURE__ */
|
|
5318
|
+
var OverflowField = ({ label = OVERFLOW_LABEL }) => {
|
|
5319
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "overflow", propDisplayName: label }, /* @__PURE__ */ React70.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React70.createElement(ToggleControl11, { options: options7 })));
|
|
5274
5320
|
};
|
|
5275
5321
|
|
|
5276
5322
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -5309,88 +5355,81 @@ var CssSizeProps = [
|
|
|
5309
5355
|
var ASPECT_RATIO_LABEL = __47("Aspect Ratio", "elementor");
|
|
5310
5356
|
var SizeSection = () => {
|
|
5311
5357
|
const gridRowRefs = [useRef13(null), useRef13(null), useRef13(null)];
|
|
5312
|
-
return /* @__PURE__ */
|
|
5358
|
+
return /* @__PURE__ */ React71.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React71.createElement(Grid7, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React71.createElement(Grid7, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React71.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React71.createElement(PanelDivider, null), /* @__PURE__ */ React71.createElement(Stack11, null, /* @__PURE__ */ React71.createElement(OverflowField, null)), /* @__PURE__ */ React71.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React71.createElement(Stack11, { gap: 2, pt: 2 }, /* @__PURE__ */ React71.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React71.createElement(AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React71.createElement(PanelDivider, null), /* @__PURE__ */ React71.createElement(ObjectFitField, null), /* @__PURE__ */ React71.createElement(StylesField, { bind: "object-position", propDisplayName: __47("Object position", "elementor") }, /* @__PURE__ */ React71.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React71.createElement(PositionControl, null))))));
|
|
5313
5359
|
};
|
|
5314
5360
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
5315
|
-
return /* @__PURE__ */
|
|
5361
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind, propDisplayName: label }, /* @__PURE__ */ React71.createElement(Grid7, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React71.createElement(Grid7, { item: true, xs: 12 }, /* @__PURE__ */ React71.createElement(ControlLabel, null, label)), /* @__PURE__ */ React71.createElement(Grid7, { item: true, xs: 12 }, /* @__PURE__ */ React71.createElement(SizeControl7, { extendedOptions, anchorRef: rowRef }))));
|
|
5316
5362
|
};
|
|
5317
5363
|
|
|
5318
5364
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
5319
|
-
import * as
|
|
5365
|
+
import * as React72 from "react";
|
|
5320
5366
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
5321
5367
|
import { __ as __48 } from "@wordpress/i18n";
|
|
5322
5368
|
var MARGIN_LABEL = __48("Margin", "elementor");
|
|
5323
5369
|
var PADDING_LABEL = __48("Padding", "elementor");
|
|
5324
5370
|
var SpacingSection = () => {
|
|
5325
5371
|
const { isSiteRtl } = useDirection();
|
|
5326
|
-
return /* @__PURE__ */
|
|
5372
|
+
return /* @__PURE__ */ React72.createElement(SectionContent, null, /* @__PURE__ */ React72.createElement(StylesField, { bind: "margin", propDisplayName: MARGIN_LABEL }, /* @__PURE__ */ React72.createElement(
|
|
5327
5373
|
LinkedDimensionsControl,
|
|
5328
5374
|
{
|
|
5329
5375
|
label: MARGIN_LABEL,
|
|
5330
5376
|
isSiteRtl,
|
|
5331
5377
|
min: -Number.MAX_SAFE_INTEGER
|
|
5332
5378
|
}
|
|
5333
|
-
)), /* @__PURE__ */
|
|
5379
|
+
)), /* @__PURE__ */ React72.createElement(PanelDivider, null), /* @__PURE__ */ React72.createElement(StylesField, { bind: "padding", propDisplayName: PADDING_LABEL }, /* @__PURE__ */ React72.createElement(LinkedDimensionsControl, { label: PADDING_LABEL, isSiteRtl })));
|
|
5334
5380
|
};
|
|
5335
5381
|
|
|
5336
5382
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
5337
|
-
import * as
|
|
5383
|
+
import * as React89 from "react";
|
|
5338
5384
|
|
|
5339
5385
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
5340
|
-
import * as
|
|
5386
|
+
import * as React73 from "react";
|
|
5341
5387
|
import { NumberControl as NumberControl5 } from "@elementor/editor-controls";
|
|
5342
5388
|
import { __ as __49 } from "@wordpress/i18n";
|
|
5343
5389
|
var COLUMN_COUNT_LABEL = __49("Columns", "elementor");
|
|
5344
|
-
var ColumnCountField = () => {
|
|
5345
|
-
return /* @__PURE__ */
|
|
5390
|
+
var ColumnCountField = ({ label = COLUMN_COUNT_LABEL }) => {
|
|
5391
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "column-count", propDisplayName: label }, /* @__PURE__ */ React73.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React73.createElement(NumberControl5, { shouldForceInt: true, min: 0, step: 1 })));
|
|
5346
5392
|
};
|
|
5347
5393
|
|
|
5348
5394
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
5349
|
-
import * as
|
|
5395
|
+
import * as React74 from "react";
|
|
5350
5396
|
import { useRef as useRef14 } from "react";
|
|
5351
5397
|
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
5352
5398
|
import { __ as __50 } from "@wordpress/i18n";
|
|
5353
5399
|
var COLUMN_GAP_LABEL = __50("Column gap", "elementor");
|
|
5354
|
-
var ColumnGapField = () => {
|
|
5400
|
+
var ColumnGapField = ({ label = COLUMN_GAP_LABEL }) => {
|
|
5355
5401
|
const rowRef = useRef14(null);
|
|
5356
|
-
return /* @__PURE__ */
|
|
5402
|
+
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "column-gap", propDisplayName: label }, /* @__PURE__ */ React74.createElement(StylesFieldLayout, { label, ref: rowRef }, /* @__PURE__ */ React74.createElement(SizeControl8, { anchorRef: rowRef })));
|
|
5357
5403
|
};
|
|
5358
5404
|
|
|
5359
5405
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
5360
|
-
import * as
|
|
5406
|
+
import * as React75 from "react";
|
|
5361
5407
|
import { FontFamilyControl, useFontFamilies } from "@elementor/editor-controls";
|
|
5362
5408
|
import { useSectionWidth } from "@elementor/editor-ui";
|
|
5363
5409
|
import { __ as __51 } from "@wordpress/i18n";
|
|
5364
5410
|
var FONT_FAMILY_LABEL = __51("Font family", "elementor");
|
|
5365
|
-
var FontFamilyField = () => {
|
|
5411
|
+
var FontFamilyField = ({ label = FONT_FAMILY_LABEL }) => {
|
|
5366
5412
|
const fontFamilies = useFontFamilies();
|
|
5367
5413
|
const sectionWidth = useSectionWidth();
|
|
5368
5414
|
if (fontFamilies.length === 0) {
|
|
5369
5415
|
return null;
|
|
5370
5416
|
}
|
|
5371
|
-
return /* @__PURE__ */
|
|
5372
|
-
FontFamilyControl,
|
|
5373
|
-
{
|
|
5374
|
-
fontFamilies,
|
|
5375
|
-
sectionWidth,
|
|
5376
|
-
ariaLabel: FONT_FAMILY_LABEL
|
|
5377
|
-
}
|
|
5378
|
-
)));
|
|
5417
|
+
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "font-family", propDisplayName: label }, /* @__PURE__ */ React75.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React75.createElement(FontFamilyControl, { fontFamilies, sectionWidth, ariaLabel: label })));
|
|
5379
5418
|
};
|
|
5380
5419
|
|
|
5381
5420
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
5382
|
-
import * as
|
|
5421
|
+
import * as React76 from "react";
|
|
5383
5422
|
import { useRef as useRef15 } from "react";
|
|
5384
5423
|
import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
|
|
5385
5424
|
import { __ as __52 } from "@wordpress/i18n";
|
|
5386
5425
|
var FONT_SIZE_LABEL = __52("Font size", "elementor");
|
|
5387
|
-
var FontSizeField = () => {
|
|
5426
|
+
var FontSizeField = ({ label = FONT_SIZE_LABEL }) => {
|
|
5388
5427
|
const rowRef = useRef15(null);
|
|
5389
|
-
return /* @__PURE__ */
|
|
5428
|
+
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "font-size", propDisplayName: label }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label, ref: rowRef }, /* @__PURE__ */ React76.createElement(SizeControl9, { anchorRef: rowRef, ariaLabel: label })));
|
|
5390
5429
|
};
|
|
5391
5430
|
|
|
5392
5431
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
5393
|
-
import * as
|
|
5432
|
+
import * as React77 from "react";
|
|
5394
5433
|
import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
5395
5434
|
import { ItalicIcon, MinusIcon } from "@elementor/icons";
|
|
5396
5435
|
import { __ as __53 } from "@wordpress/i18n";
|
|
@@ -5399,22 +5438,22 @@ var options8 = [
|
|
|
5399
5438
|
{
|
|
5400
5439
|
value: "normal",
|
|
5401
5440
|
label: __53("Normal", "elementor"),
|
|
5402
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5441
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(MinusIcon, { fontSize: size }),
|
|
5403
5442
|
showTooltip: true
|
|
5404
5443
|
},
|
|
5405
5444
|
{
|
|
5406
5445
|
value: "italic",
|
|
5407
5446
|
label: __53("Italic", "elementor"),
|
|
5408
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5447
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(ItalicIcon, { fontSize: size }),
|
|
5409
5448
|
showTooltip: true
|
|
5410
5449
|
}
|
|
5411
5450
|
];
|
|
5412
|
-
var FontStyleField = () => {
|
|
5413
|
-
return /* @__PURE__ */
|
|
5451
|
+
var FontStyleField = ({ label = FONT_STYLE_LABEL }) => {
|
|
5452
|
+
return /* @__PURE__ */ React77.createElement(StylesField, { bind: "font-style", propDisplayName: label }, /* @__PURE__ */ React77.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React77.createElement(ToggleControl12, { options: options8 })));
|
|
5414
5453
|
};
|
|
5415
5454
|
|
|
5416
5455
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
5417
|
-
import * as
|
|
5456
|
+
import * as React78 from "react";
|
|
5418
5457
|
import { SelectControl as SelectControl5 } from "@elementor/editor-controls";
|
|
5419
5458
|
import { __ as __54 } from "@wordpress/i18n";
|
|
5420
5459
|
var FONT_WEIGHT_LABEL = __54("Font weight", "elementor");
|
|
@@ -5429,34 +5468,34 @@ var fontWeightOptions = [
|
|
|
5429
5468
|
{ value: "800", label: __54("800 - Extra bold", "elementor") },
|
|
5430
5469
|
{ value: "900", label: __54("900 - Black", "elementor") }
|
|
5431
5470
|
];
|
|
5432
|
-
var FontWeightField = () => {
|
|
5433
|
-
return /* @__PURE__ */
|
|
5471
|
+
var FontWeightField = ({ label = FONT_WEIGHT_LABEL }) => {
|
|
5472
|
+
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "font-weight", propDisplayName: label }, /* @__PURE__ */ React78.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React78.createElement(SelectControl5, { options: fontWeightOptions })));
|
|
5434
5473
|
};
|
|
5435
5474
|
|
|
5436
5475
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
5437
|
-
import * as
|
|
5476
|
+
import * as React79 from "react";
|
|
5438
5477
|
import { useRef as useRef16 } from "react";
|
|
5439
5478
|
import { SizeControl as SizeControl10 } from "@elementor/editor-controls";
|
|
5440
5479
|
import { __ as __55 } from "@wordpress/i18n";
|
|
5441
5480
|
var LETTER_SPACING_LABEL = __55("Letter spacing", "elementor");
|
|
5442
|
-
var LetterSpacingField = () => {
|
|
5481
|
+
var LetterSpacingField = ({ label = LETTER_SPACING_LABEL }) => {
|
|
5443
5482
|
const rowRef = useRef16(null);
|
|
5444
|
-
return /* @__PURE__ */
|
|
5483
|
+
return /* @__PURE__ */ React79.createElement(StylesField, { bind: "letter-spacing", propDisplayName: label }, /* @__PURE__ */ React79.createElement(StylesFieldLayout, { label, ref: rowRef }, /* @__PURE__ */ React79.createElement(SizeControl10, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
5445
5484
|
};
|
|
5446
5485
|
|
|
5447
5486
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
5448
|
-
import * as
|
|
5487
|
+
import * as React80 from "react";
|
|
5449
5488
|
import { useRef as useRef17 } from "react";
|
|
5450
5489
|
import { SizeControl as SizeControl11 } from "@elementor/editor-controls";
|
|
5451
5490
|
import { __ as __56 } from "@wordpress/i18n";
|
|
5452
5491
|
var LINE_HEIGHT_LABEL = __56("Line height", "elementor");
|
|
5453
|
-
var LineHeightField = () => {
|
|
5492
|
+
var LineHeightField = ({ label = LINE_HEIGHT_LABEL }) => {
|
|
5454
5493
|
const rowRef = useRef17(null);
|
|
5455
|
-
return /* @__PURE__ */
|
|
5494
|
+
return /* @__PURE__ */ React80.createElement(StylesField, { bind: "line-height", propDisplayName: label }, /* @__PURE__ */ React80.createElement(StylesFieldLayout, { label, ref: rowRef }, /* @__PURE__ */ React80.createElement(SizeControl11, { anchorRef: rowRef })));
|
|
5456
5495
|
};
|
|
5457
5496
|
|
|
5458
5497
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
5459
|
-
import * as
|
|
5498
|
+
import * as React81 from "react";
|
|
5460
5499
|
import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
5461
5500
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
5462
5501
|
import { withDirection as withDirection11 } from "@elementor/ui";
|
|
@@ -5468,43 +5507,43 @@ var options9 = [
|
|
|
5468
5507
|
{
|
|
5469
5508
|
value: "start",
|
|
5470
5509
|
label: __57("Start", "elementor"),
|
|
5471
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5510
|
+
renderContent: ({ size }) => /* @__PURE__ */ React81.createElement(AlignStartIcon, { fontSize: size }),
|
|
5472
5511
|
showTooltip: true
|
|
5473
5512
|
},
|
|
5474
5513
|
{
|
|
5475
5514
|
value: "center",
|
|
5476
5515
|
label: __57("Center", "elementor"),
|
|
5477
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5516
|
+
renderContent: ({ size }) => /* @__PURE__ */ React81.createElement(AlignCenterIcon, { fontSize: size }),
|
|
5478
5517
|
showTooltip: true
|
|
5479
5518
|
},
|
|
5480
5519
|
{
|
|
5481
5520
|
value: "end",
|
|
5482
5521
|
label: __57("End", "elementor"),
|
|
5483
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5522
|
+
renderContent: ({ size }) => /* @__PURE__ */ React81.createElement(AlignEndIcon, { fontSize: size }),
|
|
5484
5523
|
showTooltip: true
|
|
5485
5524
|
},
|
|
5486
5525
|
{
|
|
5487
5526
|
value: "justify",
|
|
5488
5527
|
label: __57("Justify", "elementor"),
|
|
5489
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5528
|
+
renderContent: ({ size }) => /* @__PURE__ */ React81.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
5490
5529
|
showTooltip: true
|
|
5491
5530
|
}
|
|
5492
5531
|
];
|
|
5493
|
-
var TextAlignmentField = () => {
|
|
5494
|
-
return /* @__PURE__ */
|
|
5532
|
+
var TextAlignmentField = ({ label = TEXT_ALIGNMENT_LABEL }) => {
|
|
5533
|
+
return /* @__PURE__ */ React81.createElement(StylesField, { bind: "text-align", propDisplayName: label }, /* @__PURE__ */ React81.createElement(UiProviders, null, /* @__PURE__ */ React81.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React81.createElement(ToggleControl13, { options: options9 }))));
|
|
5495
5534
|
};
|
|
5496
5535
|
|
|
5497
5536
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
5498
|
-
import * as
|
|
5537
|
+
import * as React82 from "react";
|
|
5499
5538
|
import { ColorControl as ColorControl2 } from "@elementor/editor-controls";
|
|
5500
5539
|
import { __ as __58 } from "@wordpress/i18n";
|
|
5501
5540
|
var TEXT_COLOR_LABEL = __58("Text color", "elementor");
|
|
5502
|
-
var TextColorField = () => {
|
|
5503
|
-
return /* @__PURE__ */
|
|
5541
|
+
var TextColorField = ({ label = TEXT_COLOR_LABEL }) => {
|
|
5542
|
+
return /* @__PURE__ */ React82.createElement(StylesField, { bind: "color", propDisplayName: label }, /* @__PURE__ */ React82.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React82.createElement(ColorControl2, { id: "text-color-control" })));
|
|
5504
5543
|
};
|
|
5505
5544
|
|
|
5506
5545
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
5507
|
-
import * as
|
|
5546
|
+
import * as React83 from "react";
|
|
5508
5547
|
import { ToggleControl as ToggleControl14 } from "@elementor/editor-controls";
|
|
5509
5548
|
import { MinusIcon as MinusIcon2, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
5510
5549
|
import { __ as __59 } from "@wordpress/i18n";
|
|
@@ -5513,33 +5552,33 @@ var options10 = [
|
|
|
5513
5552
|
{
|
|
5514
5553
|
value: "none",
|
|
5515
5554
|
label: __59("None", "elementor"),
|
|
5516
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5555
|
+
renderContent: ({ size }) => /* @__PURE__ */ React83.createElement(MinusIcon2, { fontSize: size }),
|
|
5517
5556
|
showTooltip: true,
|
|
5518
5557
|
exclusive: true
|
|
5519
5558
|
},
|
|
5520
5559
|
{
|
|
5521
5560
|
value: "underline",
|
|
5522
5561
|
label: __59("Underline", "elementor"),
|
|
5523
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5562
|
+
renderContent: ({ size }) => /* @__PURE__ */ React83.createElement(UnderlineIcon, { fontSize: size }),
|
|
5524
5563
|
showTooltip: true
|
|
5525
5564
|
},
|
|
5526
5565
|
{
|
|
5527
5566
|
value: "line-through",
|
|
5528
5567
|
label: __59("Line-through", "elementor"),
|
|
5529
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5568
|
+
renderContent: ({ size }) => /* @__PURE__ */ React83.createElement(StrikethroughIcon, { fontSize: size }),
|
|
5530
5569
|
showTooltip: true
|
|
5531
5570
|
},
|
|
5532
5571
|
{
|
|
5533
5572
|
value: "overline",
|
|
5534
5573
|
label: __59("Overline", "elementor"),
|
|
5535
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5574
|
+
renderContent: ({ size }) => /* @__PURE__ */ React83.createElement(OverlineIcon, { fontSize: size }),
|
|
5536
5575
|
showTooltip: true
|
|
5537
5576
|
}
|
|
5538
5577
|
];
|
|
5539
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
5578
|
+
var TextDecorationField = ({ label = TEXT_DECORATION_LABEL }) => /* @__PURE__ */ React83.createElement(StylesField, { bind: "text-decoration", propDisplayName: label }, /* @__PURE__ */ React83.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React83.createElement(ToggleControl14, { options: options10, exclusive: false })));
|
|
5540
5579
|
|
|
5541
5580
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
5542
|
-
import * as
|
|
5581
|
+
import * as React84 from "react";
|
|
5543
5582
|
import { ToggleControl as ToggleControl15 } from "@elementor/editor-controls";
|
|
5544
5583
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
5545
5584
|
import { __ as __60 } from "@wordpress/i18n";
|
|
@@ -5548,27 +5587,27 @@ var options11 = [
|
|
|
5548
5587
|
{
|
|
5549
5588
|
value: "ltr",
|
|
5550
5589
|
label: __60("Left to right", "elementor"),
|
|
5551
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5590
|
+
renderContent: ({ size }) => /* @__PURE__ */ React84.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
5552
5591
|
showTooltip: true
|
|
5553
5592
|
},
|
|
5554
5593
|
{
|
|
5555
5594
|
value: "rtl",
|
|
5556
5595
|
label: __60("Right to left", "elementor"),
|
|
5557
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5596
|
+
renderContent: ({ size }) => /* @__PURE__ */ React84.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
5558
5597
|
showTooltip: true
|
|
5559
5598
|
}
|
|
5560
5599
|
];
|
|
5561
|
-
var TextDirectionField = () => {
|
|
5562
|
-
return /* @__PURE__ */
|
|
5600
|
+
var TextDirectionField = ({ label = TEXT_DIRECTION_LABEL }) => {
|
|
5601
|
+
return /* @__PURE__ */ React84.createElement(StylesField, { bind: "direction", propDisplayName: label }, /* @__PURE__ */ React84.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React84.createElement(ToggleControl15, { options: options11 })));
|
|
5563
5602
|
};
|
|
5564
5603
|
|
|
5565
5604
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
5566
|
-
import * as
|
|
5605
|
+
import * as React86 from "react";
|
|
5567
5606
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
5568
5607
|
import { __ as __61 } from "@wordpress/i18n";
|
|
5569
5608
|
|
|
5570
5609
|
// src/components/add-or-remove-content.tsx
|
|
5571
|
-
import * as
|
|
5610
|
+
import * as React85 from "react";
|
|
5572
5611
|
import { MinusIcon as MinusIcon3, PlusIcon } from "@elementor/icons";
|
|
5573
5612
|
import { Collapse as Collapse2, IconButton, Stack as Stack12 } from "@elementor/ui";
|
|
5574
5613
|
var SIZE = "tiny";
|
|
@@ -5580,7 +5619,7 @@ var AddOrRemoveContent = ({
|
|
|
5580
5619
|
disabled,
|
|
5581
5620
|
renderLabel
|
|
5582
5621
|
}) => {
|
|
5583
|
-
return /* @__PURE__ */
|
|
5622
|
+
return /* @__PURE__ */ React85.createElement(SectionContent, null, /* @__PURE__ */ React85.createElement(
|
|
5584
5623
|
Stack12,
|
|
5585
5624
|
{
|
|
5586
5625
|
direction: "row",
|
|
@@ -5591,8 +5630,8 @@ var AddOrRemoveContent = ({
|
|
|
5591
5630
|
}
|
|
5592
5631
|
},
|
|
5593
5632
|
renderLabel(),
|
|
5594
|
-
isAdded ? /* @__PURE__ */
|
|
5595
|
-
), /* @__PURE__ */
|
|
5633
|
+
isAdded ? /* @__PURE__ */ React85.createElement(IconButton, { size: SIZE, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React85.createElement(MinusIcon3, { fontSize: SIZE })) : /* @__PURE__ */ React85.createElement(IconButton, { size: SIZE, onClick: onAdd, "aria-label": "Add", disabled }, /* @__PURE__ */ React85.createElement(PlusIcon, { fontSize: SIZE }))
|
|
5634
|
+
), /* @__PURE__ */ React85.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React85.createElement(SectionContent, null, children)));
|
|
5596
5635
|
};
|
|
5597
5636
|
|
|
5598
5637
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
@@ -5624,21 +5663,21 @@ var TextStrokeField = () => {
|
|
|
5624
5663
|
setValue(null);
|
|
5625
5664
|
};
|
|
5626
5665
|
const hasTextStroke = Boolean(value);
|
|
5627
|
-
return /* @__PURE__ */
|
|
5666
|
+
return /* @__PURE__ */ React86.createElement(StylesField, { bind: "stroke", propDisplayName: TEXT_STROKE_LABEL }, /* @__PURE__ */ React86.createElement(
|
|
5628
5667
|
AddOrRemoveContent,
|
|
5629
5668
|
{
|
|
5630
5669
|
isAdded: hasTextStroke,
|
|
5631
5670
|
onAdd: addTextStroke,
|
|
5632
5671
|
onRemove: removeTextStroke,
|
|
5633
5672
|
disabled: !canEdit,
|
|
5634
|
-
renderLabel: () => /* @__PURE__ */
|
|
5673
|
+
renderLabel: () => /* @__PURE__ */ React86.createElement(ControlLabel, null, TEXT_STROKE_LABEL)
|
|
5635
5674
|
},
|
|
5636
|
-
/* @__PURE__ */
|
|
5675
|
+
/* @__PURE__ */ React86.createElement(StrokeControl, null)
|
|
5637
5676
|
));
|
|
5638
5677
|
};
|
|
5639
5678
|
|
|
5640
5679
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
5641
|
-
import * as
|
|
5680
|
+
import * as React87 from "react";
|
|
5642
5681
|
import { ToggleControl as ToggleControl16 } from "@elementor/editor-controls";
|
|
5643
5682
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
5644
5683
|
import { __ as __62 } from "@wordpress/i18n";
|
|
@@ -5647,44 +5686,44 @@ var options12 = [
|
|
|
5647
5686
|
{
|
|
5648
5687
|
value: "none",
|
|
5649
5688
|
label: __62("None", "elementor"),
|
|
5650
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5689
|
+
renderContent: ({ size }) => /* @__PURE__ */ React87.createElement(MinusIcon4, { fontSize: size }),
|
|
5651
5690
|
showTooltip: true
|
|
5652
5691
|
},
|
|
5653
5692
|
{
|
|
5654
5693
|
value: "capitalize",
|
|
5655
5694
|
label: __62("Capitalize", "elementor"),
|
|
5656
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5695
|
+
renderContent: ({ size }) => /* @__PURE__ */ React87.createElement(LetterCaseIcon, { fontSize: size }),
|
|
5657
5696
|
showTooltip: true
|
|
5658
5697
|
},
|
|
5659
5698
|
{
|
|
5660
5699
|
value: "uppercase",
|
|
5661
5700
|
label: __62("Uppercase", "elementor"),
|
|
5662
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5701
|
+
renderContent: ({ size }) => /* @__PURE__ */ React87.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
5663
5702
|
showTooltip: true
|
|
5664
5703
|
},
|
|
5665
5704
|
{
|
|
5666
5705
|
value: "lowercase",
|
|
5667
5706
|
label: __62("Lowercase", "elementor"),
|
|
5668
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5707
|
+
renderContent: ({ size }) => /* @__PURE__ */ React87.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
5669
5708
|
showTooltip: true
|
|
5670
5709
|
}
|
|
5671
5710
|
];
|
|
5672
|
-
var TransformField = () => /* @__PURE__ */
|
|
5711
|
+
var TransformField = ({ label = TEXT_TRANSFORM_LABEL }) => /* @__PURE__ */ React87.createElement(StylesField, { bind: "text-transform", propDisplayName: label }, /* @__PURE__ */ React87.createElement(StylesFieldLayout, { label }, /* @__PURE__ */ React87.createElement(ToggleControl16, { options: options12 })));
|
|
5673
5712
|
|
|
5674
5713
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
5675
|
-
import * as
|
|
5714
|
+
import * as React88 from "react";
|
|
5676
5715
|
import { useRef as useRef18 } from "react";
|
|
5677
5716
|
import { SizeControl as SizeControl12 } from "@elementor/editor-controls";
|
|
5678
5717
|
import { __ as __63 } from "@wordpress/i18n";
|
|
5679
5718
|
var WORD_SPACING_LABEL = __63("Word spacing", "elementor");
|
|
5680
|
-
var WordSpacingField = () => {
|
|
5719
|
+
var WordSpacingField = ({ label = WORD_SPACING_LABEL }) => {
|
|
5681
5720
|
const rowRef = useRef18(null);
|
|
5682
|
-
return /* @__PURE__ */
|
|
5721
|
+
return /* @__PURE__ */ React88.createElement(StylesField, { bind: "word-spacing", propDisplayName: label }, /* @__PURE__ */ React88.createElement(StylesFieldLayout, { label, ref: rowRef }, /* @__PURE__ */ React88.createElement(SizeControl12, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
5683
5722
|
};
|
|
5684
5723
|
|
|
5685
5724
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
5686
5725
|
var TypographySection = () => {
|
|
5687
|
-
return /* @__PURE__ */
|
|
5726
|
+
return /* @__PURE__ */ React89.createElement(SectionContent, null, /* @__PURE__ */ React89.createElement(FontFamilyField, null), /* @__PURE__ */ React89.createElement(FontWeightField, null), /* @__PURE__ */ React89.createElement(FontSizeField, null), /* @__PURE__ */ React89.createElement(PanelDivider, null), /* @__PURE__ */ React89.createElement(TextAlignmentField, null), /* @__PURE__ */ React89.createElement(TextColorField, null), /* @__PURE__ */ React89.createElement(
|
|
5688
5727
|
StyleTabCollapsibleContent,
|
|
5689
5728
|
{
|
|
5690
5729
|
fields: [
|
|
@@ -5699,7 +5738,7 @@ var TypographySection = () => {
|
|
|
5699
5738
|
"stroke"
|
|
5700
5739
|
]
|
|
5701
5740
|
},
|
|
5702
|
-
/* @__PURE__ */
|
|
5741
|
+
/* @__PURE__ */ React89.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React89.createElement(LineHeightField, null), /* @__PURE__ */ React89.createElement(LetterSpacingField, null), /* @__PURE__ */ React89.createElement(WordSpacingField, null), /* @__PURE__ */ React89.createElement(ColumnCountField, null), /* @__PURE__ */ React89.createElement(ColumnGapField, null), /* @__PURE__ */ React89.createElement(PanelDivider, null), /* @__PURE__ */ React89.createElement(TextDecorationField, null), /* @__PURE__ */ React89.createElement(TransformField, null), /* @__PURE__ */ React89.createElement(TextDirectionField, null), /* @__PURE__ */ React89.createElement(FontStyleField, null), /* @__PURE__ */ React89.createElement(TextStrokeField, null))
|
|
5703
5742
|
));
|
|
5704
5743
|
};
|
|
5705
5744
|
|
|
@@ -5805,10 +5844,10 @@ var STYLE_SECTIONS = [
|
|
|
5805
5844
|
var STYLE_SECTION_NAMES = STYLE_SECTIONS.map((section) => section.name);
|
|
5806
5845
|
|
|
5807
5846
|
// src/components/style-tab-section.tsx
|
|
5808
|
-
import * as
|
|
5847
|
+
import * as React90 from "react";
|
|
5809
5848
|
|
|
5810
5849
|
// src/components/style-section-header-location.tsx
|
|
5811
|
-
import { createElement as
|
|
5850
|
+
import { createElement as createElement90 } from "react";
|
|
5812
5851
|
import { createLocation as createLocation5 } from "@elementor/locations";
|
|
5813
5852
|
var { Slot: StyleSectionHeaderSlot, inject: injectStyleSectionHeader } = createLocation5();
|
|
5814
5853
|
var injectIntoStyleSectionHeader = ({ id, component, sections, options: options13 }) => {
|
|
@@ -5816,7 +5855,7 @@ var injectIntoStyleSectionHeader = ({ id, component, sections, options: options1
|
|
|
5816
5855
|
if (sections && !sections.includes(props.sectionName)) {
|
|
5817
5856
|
return null;
|
|
5818
5857
|
}
|
|
5819
|
-
return
|
|
5858
|
+
return createElement90(component, props);
|
|
5820
5859
|
};
|
|
5821
5860
|
injectStyleSectionHeader({ id, component: filteredComponent, options: options13 });
|
|
5822
5861
|
};
|
|
@@ -5826,25 +5865,25 @@ var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
|
5826
5865
|
const { component, name, title, action } = section;
|
|
5827
5866
|
const { element } = useElement();
|
|
5828
5867
|
const tabDefaults = useDefaultPanelSettings();
|
|
5829
|
-
const SectionComponent = component || (() => /* @__PURE__ */
|
|
5868
|
+
const SectionComponent = component || (() => /* @__PURE__ */ React90.createElement(React90.Fragment, null));
|
|
5830
5869
|
const isExpanded = tabDefaults.defaultSectionsExpanded.style?.includes(name);
|
|
5831
|
-
return /* @__PURE__ */
|
|
5870
|
+
return /* @__PURE__ */ React90.createElement(
|
|
5832
5871
|
Section,
|
|
5833
5872
|
{
|
|
5834
5873
|
title,
|
|
5835
5874
|
defaultExpanded: isExpanded,
|
|
5836
5875
|
titleEnd: getStylesInheritanceIndicators(fields),
|
|
5837
|
-
titleActions: element ? /* @__PURE__ */
|
|
5876
|
+
titleActions: element ? /* @__PURE__ */ React90.createElement(StyleSectionHeaderSlot, { elementId: element.id, sectionName: name }) : void 0,
|
|
5838
5877
|
unmountOnExit,
|
|
5839
5878
|
action
|
|
5840
5879
|
},
|
|
5841
|
-
/* @__PURE__ */
|
|
5880
|
+
/* @__PURE__ */ React90.createElement(SectionComponent, null)
|
|
5842
5881
|
);
|
|
5843
5882
|
};
|
|
5844
5883
|
|
|
5845
5884
|
// src/components/style-sections.tsx
|
|
5846
5885
|
var StyleSections = () => {
|
|
5847
|
-
return /* @__PURE__ */
|
|
5886
|
+
return /* @__PURE__ */ React91.createElement(React91.Fragment, null, STYLE_SECTIONS.map((section) => /* @__PURE__ */ React91.createElement(
|
|
5848
5887
|
StyleTabSection,
|
|
5849
5888
|
{
|
|
5850
5889
|
key: section.name,
|
|
@@ -5877,7 +5916,7 @@ var StyleTab = () => {
|
|
|
5877
5916
|
if (!currentClassesProp) {
|
|
5878
5917
|
return null;
|
|
5879
5918
|
}
|
|
5880
|
-
return /* @__PURE__ */
|
|
5919
|
+
return /* @__PURE__ */ React92.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React92.createElement(
|
|
5881
5920
|
StyleProvider,
|
|
5882
5921
|
{
|
|
5883
5922
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -5888,12 +5927,12 @@ var StyleTab = () => {
|
|
|
5888
5927
|
},
|
|
5889
5928
|
setMetaState: setActiveStyleState
|
|
5890
5929
|
},
|
|
5891
|
-
/* @__PURE__ */
|
|
5930
|
+
/* @__PURE__ */ React92.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React92.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React92.createElement(ClassesHeader, null, /* @__PURE__ */ React92.createElement(CssClassSelector, null), /* @__PURE__ */ React92.createElement(Divider5, null)), /* @__PURE__ */ React92.createElement(SectionsList, null, /* @__PURE__ */ React92.createElement(StyleSections, null), /* @__PURE__ */ React92.createElement(StyleTabSlot, null)), /* @__PURE__ */ React92.createElement(Box8, { sx: { height: "150px" } })))
|
|
5892
5931
|
));
|
|
5893
5932
|
};
|
|
5894
5933
|
function ClassesHeader({ children }) {
|
|
5895
5934
|
const scrollDirection = useScrollDirection();
|
|
5896
|
-
return /* @__PURE__ */
|
|
5935
|
+
return /* @__PURE__ */ React92.createElement(
|
|
5897
5936
|
Stack13,
|
|
5898
5937
|
{
|
|
5899
5938
|
sx: {
|
|
@@ -5907,7 +5946,7 @@ function ClassesHeader({ children }) {
|
|
|
5907
5946
|
function useCurrentClassesProp() {
|
|
5908
5947
|
const { elementType } = useElement();
|
|
5909
5948
|
const prop = Object.entries(elementType.propsSchema).find(
|
|
5910
|
-
([, propType]) => propType.kind === "plain" && propType.key ===
|
|
5949
|
+
([, propType]) => propType.kind === "plain" && propType.key === CLASSES_PROP_KEY2
|
|
5911
5950
|
);
|
|
5912
5951
|
if (!prop) {
|
|
5913
5952
|
return null;
|
|
@@ -5919,12 +5958,13 @@ function useCurrentClassesProp() {
|
|
|
5919
5958
|
var CONTENT_ONLY_TAB = "settings";
|
|
5920
5959
|
var DESIGN_TABS = ["style", "interactions"];
|
|
5921
5960
|
var { Slot: SettingsTabSlot, inject: injectIntoSettingsTab } = createReplaceableLocation();
|
|
5961
|
+
var { Slot: StyleTabContentSlot, inject: injectIntoStyleTabContent } = createReplaceableLocation();
|
|
5922
5962
|
var EditingPanelTabs = () => {
|
|
5923
5963
|
const { element } = useElement();
|
|
5924
5964
|
return (
|
|
5925
5965
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
5926
5966
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
5927
|
-
/* @__PURE__ */
|
|
5967
|
+
/* @__PURE__ */ React93.createElement(Fragment10, { key: element.id }, /* @__PURE__ */ React93.createElement(PanelTabContent, null))
|
|
5928
5968
|
);
|
|
5929
5969
|
};
|
|
5930
5970
|
var PanelTabContent = () => {
|
|
@@ -5944,8 +5984,8 @@ var PanelTabContent = () => {
|
|
|
5944
5984
|
disabled: areDesignTabsRestricted,
|
|
5945
5985
|
sx: areDesignTabsRestricted ? { pointerEvents: "auto" } : void 0
|
|
5946
5986
|
});
|
|
5947
|
-
const withRestrictionInfotip = (label) => areDesignTabsRestricted ? /* @__PURE__ */
|
|
5948
|
-
return /* @__PURE__ */
|
|
5987
|
+
const withRestrictionInfotip = (label) => areDesignTabsRestricted ? /* @__PURE__ */ React93.createElement(ContentOnlyInfotip, null, label) : label;
|
|
5988
|
+
return /* @__PURE__ */ React93.createElement(ScrollProvider, null, /* @__PURE__ */ React93.createElement(Stack14, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React93.createElement(Stack14, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React93.createElement(
|
|
5949
5989
|
Tabs,
|
|
5950
5990
|
{
|
|
5951
5991
|
variant: "fullWidth",
|
|
@@ -5960,22 +6000,22 @@ var PanelTabContent = () => {
|
|
|
5960
6000
|
setCurrentTab(newValue);
|
|
5961
6001
|
}
|
|
5962
6002
|
},
|
|
5963
|
-
!isPromotedElement && /* @__PURE__ */
|
|
5964
|
-
hasDesignTabs && /* @__PURE__ */
|
|
6003
|
+
!isPromotedElement && /* @__PURE__ */ React93.createElement(Tab, { label: __65("General", "elementor"), ...getTabProps("settings") }),
|
|
6004
|
+
hasDesignTabs && /* @__PURE__ */ React93.createElement(
|
|
5965
6005
|
Tab,
|
|
5966
6006
|
{
|
|
5967
6007
|
label: withRestrictionInfotip(__65("Style", "elementor")),
|
|
5968
6008
|
...getDesignTabProps("style")
|
|
5969
6009
|
}
|
|
5970
6010
|
),
|
|
5971
|
-
hasDesignTabs && /* @__PURE__ */
|
|
6011
|
+
hasDesignTabs && /* @__PURE__ */ React93.createElement(
|
|
5972
6012
|
Tab,
|
|
5973
6013
|
{
|
|
5974
6014
|
label: withRestrictionInfotip(__65("Interactions", "elementor")),
|
|
5975
6015
|
...getDesignTabProps("interactions")
|
|
5976
6016
|
}
|
|
5977
6017
|
)
|
|
5978
|
-
), /* @__PURE__ */
|
|
6018
|
+
), /* @__PURE__ */ React93.createElement(Divider6, null)), !isPromotedElement && /* @__PURE__ */ React93.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React93.createElement(SettingsTabSlot, { element, elementType }, /* @__PURE__ */ React93.createElement(SettingsTab, null))), hasDesignTabs && !areDesignTabsRestricted && /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React93.createElement(StyleTabContentSlot, { element, elementType }, /* @__PURE__ */ React93.createElement(StyleTab, null))), /* @__PURE__ */ React93.createElement(TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React93.createElement(InteractionsTab, null)))));
|
|
5979
6019
|
};
|
|
5980
6020
|
var resolveCurrentTab = ({
|
|
5981
6021
|
storedTab,
|
|
@@ -6004,20 +6044,20 @@ var EditingPanel = () => {
|
|
|
6004
6044
|
}
|
|
6005
6045
|
const panelTitle = __66("Edit %s", "elementor").replace("%s", elementType.title);
|
|
6006
6046
|
const { component: ReplacementComponent } = getEditingPanelReplacement(element, elementType) ?? {};
|
|
6007
|
-
let panelContent = /* @__PURE__ */
|
|
6047
|
+
let panelContent = /* @__PURE__ */ React94.createElement(React94.Fragment, null, /* @__PURE__ */ React94.createElement(PanelHeader, null, /* @__PURE__ */ React94.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React94.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React94.createElement(PanelBody, { sx: { height: "auto", flex: 1, minHeight: 0 } }, /* @__PURE__ */ React94.createElement(EditingPanelTabs, null)), /* @__PURE__ */ React94.createElement(EditingPanelStickyPromotion, null));
|
|
6008
6048
|
if (ReplacementComponent) {
|
|
6009
|
-
panelContent = /* @__PURE__ */
|
|
6049
|
+
panelContent = /* @__PURE__ */ React94.createElement(ReplacementComponent, null);
|
|
6010
6050
|
}
|
|
6011
|
-
return /* @__PURE__ */
|
|
6051
|
+
return /* @__PURE__ */ React94.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React94.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React94.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React94.createElement(ThemeProvider3, null, /* @__PURE__ */ React94.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React94.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React94.createElement(ElementProvider, { element, elementType, settings }, /* @__PURE__ */ React94.createElement(Panel, null, /* @__PURE__ */ React94.createElement(PanelHeaderTopSlot, null), panelContent)))))));
|
|
6012
6052
|
};
|
|
6013
6053
|
|
|
6014
6054
|
// src/components/style-states/pseudo-state-menu-items.tsx
|
|
6015
|
-
import * as
|
|
6055
|
+
import * as React95 from "react";
|
|
6016
6056
|
import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
|
|
6017
6057
|
import { MenuSubheader as MenuSubheader3 } from "@elementor/ui";
|
|
6018
6058
|
import { __ as __67 } from "@wordpress/i18n";
|
|
6019
6059
|
function PseudoStateMenuItems({ states, activeState, onSelectState, onClose }) {
|
|
6020
|
-
return /* @__PURE__ */
|
|
6060
|
+
return /* @__PURE__ */ React95.createElement(React95.Fragment, null, /* @__PURE__ */ React95.createElement(
|
|
6021
6061
|
MenuSubheader3,
|
|
6022
6062
|
{
|
|
6023
6063
|
sx: {
|
|
@@ -6028,7 +6068,7 @@ function PseudoStateMenuItems({ states, activeState, onSelectState, onClose }) {
|
|
|
6028
6068
|
}
|
|
6029
6069
|
},
|
|
6030
6070
|
__67("States", "elementor")
|
|
6031
|
-
), states.map((state) => /* @__PURE__ */
|
|
6071
|
+
), states.map((state) => /* @__PURE__ */ React95.createElement(
|
|
6032
6072
|
MenuListItem3,
|
|
6033
6073
|
{
|
|
6034
6074
|
key: state.key,
|
|
@@ -6052,9 +6092,9 @@ var {
|
|
|
6052
6092
|
} = createLocation8();
|
|
6053
6093
|
|
|
6054
6094
|
// src/hooks/use-controls-by-widget-type.ts
|
|
6055
|
-
import { getElementType } from "@elementor/editor-elements";
|
|
6095
|
+
import { getElementType as getElementType2 } from "@elementor/editor-elements";
|
|
6056
6096
|
function useControlsByWidgetType(type) {
|
|
6057
|
-
const elementType =
|
|
6097
|
+
const elementType = getElementType2(type);
|
|
6058
6098
|
if (!elementType) {
|
|
6059
6099
|
return {};
|
|
6060
6100
|
}
|
|
@@ -6132,21 +6172,21 @@ var EditingPanelHooks = () => {
|
|
|
6132
6172
|
import { AttributesControl, DisplayConditionsControl } from "@elementor/editor-controls";
|
|
6133
6173
|
|
|
6134
6174
|
// src/components/promotions/custom-css.tsx
|
|
6135
|
-
import * as
|
|
6175
|
+
import * as React96 from "react";
|
|
6136
6176
|
import { useRef as useRef19 } from "react";
|
|
6137
6177
|
import { PromotionTrigger } from "@elementor/editor-controls";
|
|
6138
6178
|
import { __ as __68 } from "@wordpress/i18n";
|
|
6139
6179
|
var TRACKING_DATA = { target_name: "custom_css", location_l2: "style" };
|
|
6140
6180
|
var CustomCssSection = () => {
|
|
6141
6181
|
const triggerRef = useRef19(null);
|
|
6142
|
-
return /* @__PURE__ */
|
|
6182
|
+
return /* @__PURE__ */ React96.createElement(
|
|
6143
6183
|
StyleTabSection,
|
|
6144
6184
|
{
|
|
6145
6185
|
section: {
|
|
6146
6186
|
name: "Custom CSS",
|
|
6147
6187
|
title: __68("Custom CSS", "elementor"),
|
|
6148
6188
|
action: {
|
|
6149
|
-
component: /* @__PURE__ */
|
|
6189
|
+
component: /* @__PURE__ */ React96.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "customCss", trackingData: TRACKING_DATA }),
|
|
6150
6190
|
onClick: () => triggerRef.current?.toggle()
|
|
6151
6191
|
}
|
|
6152
6192
|
}
|
|
@@ -6168,7 +6208,7 @@ var init = () => {
|
|
|
6168
6208
|
};
|
|
6169
6209
|
|
|
6170
6210
|
// src/controls-registry/element-controls/accordion-items-control/accordion-items-control.tsx
|
|
6171
|
-
import * as
|
|
6211
|
+
import * as React97 from "react";
|
|
6172
6212
|
import { ControlFormLabel as ControlFormLabel3, Repeater } from "@elementor/editor-controls";
|
|
6173
6213
|
import { updateElementEditorSettings as updateElementEditorSettings2, useElementChildren, useElementEditorSettings as useElementEditorSettings2 } from "@elementor/editor-elements";
|
|
6174
6214
|
import { booleanPropTypeUtil as booleanPropTypeUtil4 } from "@elementor/editor-props";
|
|
@@ -6180,7 +6220,7 @@ import {
|
|
|
6180
6220
|
createElements,
|
|
6181
6221
|
duplicateElements,
|
|
6182
6222
|
generateElementId,
|
|
6183
|
-
getContainer as
|
|
6223
|
+
getContainer as getContainer4,
|
|
6184
6224
|
moveElements,
|
|
6185
6225
|
removeElements
|
|
6186
6226
|
} from "@elementor/editor-elements";
|
|
@@ -6278,7 +6318,7 @@ var useActions = () => {
|
|
|
6278
6318
|
showIcon,
|
|
6279
6319
|
differentOpenIcon = false
|
|
6280
6320
|
}) => {
|
|
6281
|
-
const accordion =
|
|
6321
|
+
const accordion = getContainer4(accordionId);
|
|
6282
6322
|
if (!accordion) {
|
|
6283
6323
|
throw new Error("Accordion container not found");
|
|
6284
6324
|
}
|
|
@@ -6326,8 +6366,8 @@ var useActions = () => {
|
|
|
6326
6366
|
movedElementId,
|
|
6327
6367
|
toIndex
|
|
6328
6368
|
}) => {
|
|
6329
|
-
const accordion =
|
|
6330
|
-
const movedElement =
|
|
6369
|
+
const accordion = getContainer4(accordionId);
|
|
6370
|
+
const movedElement = getContainer4(movedElementId);
|
|
6331
6371
|
if (!accordion || !movedElement) {
|
|
6332
6372
|
throw new Error("Accordion item or container not found");
|
|
6333
6373
|
}
|
|
@@ -6352,7 +6392,7 @@ var useActions = () => {
|
|
|
6352
6392
|
|
|
6353
6393
|
// src/controls-registry/element-controls/accordion-items-control/use-show-icon-write-through.ts
|
|
6354
6394
|
import { useEffect as useEffect10, useRef as useRef20 } from "react";
|
|
6355
|
-
import { getContainer as
|
|
6395
|
+
import { getContainer as getContainer5, getElementSettings as getElementSettings2, updateElementSettings as updateElementSettings4 } from "@elementor/editor-elements";
|
|
6356
6396
|
import { booleanPropTypeUtil as booleanPropTypeUtil3 } from "@elementor/editor-props";
|
|
6357
6397
|
import { undoable as undoable5 } from "@elementor/editor-v1-adapters";
|
|
6358
6398
|
import { __ as __70 } from "@wordpress/i18n";
|
|
@@ -6408,7 +6448,7 @@ var cascadeShowIconToHeaders = undoable5(
|
|
|
6408
6448
|
}
|
|
6409
6449
|
);
|
|
6410
6450
|
function getAccordionHeaderIds(accordionId) {
|
|
6411
|
-
const accordion =
|
|
6451
|
+
const accordion = getContainer5(accordionId);
|
|
6412
6452
|
const itemContainers = (accordion?.children ?? []).filter(
|
|
6413
6453
|
(child) => child.model.get("elType") === ACCORDION_ITEM_ELEMENT_TYPE
|
|
6414
6454
|
);
|
|
@@ -6526,7 +6566,7 @@ var AccordionItemsControl = ({ label }) => {
|
|
|
6526
6566
|
});
|
|
6527
6567
|
}
|
|
6528
6568
|
};
|
|
6529
|
-
return /* @__PURE__ */
|
|
6569
|
+
return /* @__PURE__ */ React97.createElement(
|
|
6530
6570
|
Repeater,
|
|
6531
6571
|
{
|
|
6532
6572
|
showToggle: false,
|
|
@@ -6546,23 +6586,23 @@ var AccordionItemsControl = ({ label }) => {
|
|
|
6546
6586
|
);
|
|
6547
6587
|
};
|
|
6548
6588
|
var ItemLabel = ({ value }) => {
|
|
6549
|
-
return /* @__PURE__ */
|
|
6589
|
+
return /* @__PURE__ */ React97.createElement(Stack15, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, value.id ? /* @__PURE__ */ React97.createElement(AccordionItemRepeaterLabel, { elementId: value.id, fallbackTitle: value.title }) : /* @__PURE__ */ React97.createElement("span", null, value?.title));
|
|
6550
6590
|
};
|
|
6551
6591
|
var AccordionItemRepeaterLabel = ({ elementId, fallbackTitle }) => {
|
|
6552
6592
|
const editorSettings = useElementEditorSettings2(elementId);
|
|
6553
6593
|
const label = editorSettings?.title ?? fallbackTitle ?? "";
|
|
6554
|
-
return /* @__PURE__ */
|
|
6594
|
+
return /* @__PURE__ */ React97.createElement("span", null, label);
|
|
6555
6595
|
};
|
|
6556
6596
|
var ItemContent = ({ value }) => {
|
|
6557
6597
|
if (!value.id) {
|
|
6558
6598
|
return null;
|
|
6559
6599
|
}
|
|
6560
|
-
return /* @__PURE__ */
|
|
6600
|
+
return /* @__PURE__ */ React97.createElement(Stack15, { p: 2, gap: 1.5 }, /* @__PURE__ */ React97.createElement(ItemNameControl, { elementId: value.id }));
|
|
6561
6601
|
};
|
|
6562
6602
|
var ItemNameControl = ({ elementId }) => {
|
|
6563
6603
|
const editorSettings = useElementEditorSettings2(elementId);
|
|
6564
6604
|
const label = editorSettings?.title ?? "";
|
|
6565
|
-
return /* @__PURE__ */
|
|
6605
|
+
return /* @__PURE__ */ React97.createElement(Stack15, { gap: 1 }, /* @__PURE__ */ React97.createElement(ControlFormLabel3, null, __71("Name", "elementor")), /* @__PURE__ */ React97.createElement(
|
|
6566
6606
|
TextField2,
|
|
6567
6607
|
{
|
|
6568
6608
|
size: "tiny",
|
|
@@ -6578,7 +6618,7 @@ var ItemNameControl = ({ elementId }) => {
|
|
|
6578
6618
|
};
|
|
6579
6619
|
|
|
6580
6620
|
// src/controls-registry/element-controls/list-items-control/list-items-control.tsx
|
|
6581
|
-
import * as
|
|
6621
|
+
import * as React98 from "react";
|
|
6582
6622
|
import { ControlFormLabel as ControlFormLabel4, Repeater as Repeater2 } from "@elementor/editor-controls";
|
|
6583
6623
|
import { updateElementEditorSettings as updateElementEditorSettings3, useElementChildren as useElementChildren2, useElementEditorSettings as useElementEditorSettings3 } from "@elementor/editor-elements";
|
|
6584
6624
|
import { booleanPropTypeUtil as booleanPropTypeUtil7 } from "@elementor/editor-props";
|
|
@@ -6590,7 +6630,7 @@ import {
|
|
|
6590
6630
|
createElements as createElements2,
|
|
6591
6631
|
duplicateElements as duplicateElements2,
|
|
6592
6632
|
generateElementId as generateElementId2,
|
|
6593
|
-
getContainer as
|
|
6633
|
+
getContainer as getContainer6,
|
|
6594
6634
|
moveElements as moveElements2,
|
|
6595
6635
|
removeElements as removeElements2
|
|
6596
6636
|
} from "@elementor/editor-elements";
|
|
@@ -6669,8 +6709,8 @@ var moveItem = ({
|
|
|
6669
6709
|
listContainerId,
|
|
6670
6710
|
movedElementId
|
|
6671
6711
|
}) => {
|
|
6672
|
-
const movedElement =
|
|
6673
|
-
const listContainer =
|
|
6712
|
+
const movedElement = getContainer6(movedElementId);
|
|
6713
|
+
const listContainer = getContainer6(listContainerId);
|
|
6674
6714
|
if (!movedElement || !listContainer) {
|
|
6675
6715
|
throw new Error("List item or list container not found");
|
|
6676
6716
|
}
|
|
@@ -6697,7 +6737,7 @@ var addItem = ({
|
|
|
6697
6737
|
items: items3,
|
|
6698
6738
|
showMarkers
|
|
6699
6739
|
}) => {
|
|
6700
|
-
const listContainer =
|
|
6740
|
+
const listContainer = getContainer6(listContainerId);
|
|
6701
6741
|
if (!listContainer) {
|
|
6702
6742
|
throw new Error("List container not found");
|
|
6703
6743
|
}
|
|
@@ -6720,7 +6760,7 @@ var addItem = ({
|
|
|
6720
6760
|
|
|
6721
6761
|
// src/controls-registry/element-controls/list-items-control/use-show-markers-write-through.ts
|
|
6722
6762
|
import { useEffect as useEffect11, useRef as useRef21 } from "react";
|
|
6723
|
-
import { getContainer as
|
|
6763
|
+
import { getContainer as getContainer7, getElementSettings as getElementSettings3, updateElementSettings as updateElementSettings5 } from "@elementor/editor-elements";
|
|
6724
6764
|
import { booleanPropTypeUtil as booleanPropTypeUtil6 } from "@elementor/editor-props";
|
|
6725
6765
|
import { undoable as undoable6 } from "@elementor/editor-v1-adapters";
|
|
6726
6766
|
import { __ as __73 } from "@wordpress/i18n";
|
|
@@ -6764,7 +6804,7 @@ var cascadeShowMarkersToItems = undoable6(
|
|
|
6764
6804
|
}
|
|
6765
6805
|
);
|
|
6766
6806
|
function getListItemIds(listId) {
|
|
6767
|
-
const list =
|
|
6807
|
+
const list = getContainer7(listId);
|
|
6768
6808
|
const itemContainers = (list?.children ?? []).filter(
|
|
6769
6809
|
(child) => child.model.get("elType") === LIST_ITEM_ELEMENT_TYPE
|
|
6770
6810
|
);
|
|
@@ -6791,7 +6831,7 @@ var getDefaultListItemLabel = (index) => {
|
|
|
6791
6831
|
return `List item ${index + 1}`;
|
|
6792
6832
|
};
|
|
6793
6833
|
var ListItemsControl = ({ label }) => {
|
|
6794
|
-
return /* @__PURE__ */
|
|
6834
|
+
return /* @__PURE__ */ React98.createElement(ListItemsControlContent, { label });
|
|
6795
6835
|
};
|
|
6796
6836
|
var ListItemsControlContent = ({ label }) => {
|
|
6797
6837
|
const { element, settings } = useElement();
|
|
@@ -6831,7 +6871,7 @@ var ListItemsControlContent = ({ label }) => {
|
|
|
6831
6871
|
});
|
|
6832
6872
|
}
|
|
6833
6873
|
};
|
|
6834
|
-
return /* @__PURE__ */
|
|
6874
|
+
return /* @__PURE__ */ React98.createElement(
|
|
6835
6875
|
Repeater2,
|
|
6836
6876
|
{
|
|
6837
6877
|
showToggle: false,
|
|
@@ -6852,23 +6892,23 @@ var ListItemsControlContent = ({ label }) => {
|
|
|
6852
6892
|
};
|
|
6853
6893
|
var ItemLabel2 = ({ value, index }) => {
|
|
6854
6894
|
const fallbackLabel = value.title ?? getDefaultListItemLabel(index);
|
|
6855
|
-
return /* @__PURE__ */
|
|
6895
|
+
return /* @__PURE__ */ React98.createElement(Stack16, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, value.id ? /* @__PURE__ */ React98.createElement(ListItemRepeaterLabel, { elementId: value.id, fallbackLabel }) : /* @__PURE__ */ React98.createElement("span", null, fallbackLabel));
|
|
6856
6896
|
};
|
|
6857
6897
|
var ItemContent2 = ({ value }) => {
|
|
6858
6898
|
if (!value.id) {
|
|
6859
6899
|
return null;
|
|
6860
6900
|
}
|
|
6861
|
-
return /* @__PURE__ */
|
|
6901
|
+
return /* @__PURE__ */ React98.createElement(Stack16, { p: 2, gap: 1.5 }, /* @__PURE__ */ React98.createElement(ListItemLabelControl, { elementId: value.id, fallbackLabel: value.title ?? "" }));
|
|
6862
6902
|
};
|
|
6863
6903
|
var ListItemRepeaterLabel = ({ elementId, fallbackLabel }) => {
|
|
6864
6904
|
const editorSettings = useElementEditorSettings3(elementId);
|
|
6865
6905
|
const label = getEffectiveListItemLabel(editorSettings?.title, fallbackLabel);
|
|
6866
|
-
return /* @__PURE__ */
|
|
6906
|
+
return /* @__PURE__ */ React98.createElement("span", null, label);
|
|
6867
6907
|
};
|
|
6868
6908
|
var ListItemLabelControl = ({ elementId, fallbackLabel }) => {
|
|
6869
6909
|
const editorSettings = useElementEditorSettings3(elementId);
|
|
6870
6910
|
const label = getEffectiveListItemLabel(editorSettings?.title, fallbackLabel);
|
|
6871
|
-
return /* @__PURE__ */
|
|
6911
|
+
return /* @__PURE__ */ React98.createElement(Stack16, { gap: 1 }, /* @__PURE__ */ React98.createElement(ControlFormLabel4, null, __74("Item name", "elementor")), /* @__PURE__ */ React98.createElement(
|
|
6872
6912
|
TextField3,
|
|
6873
6913
|
{
|
|
6874
6914
|
size: "tiny",
|
|
@@ -6884,11 +6924,11 @@ var ListItemLabelControl = ({ elementId, fallbackLabel }) => {
|
|
|
6884
6924
|
};
|
|
6885
6925
|
|
|
6886
6926
|
// src/controls-registry/element-controls/menu-items-control/menu-items-control.tsx
|
|
6887
|
-
import * as
|
|
6927
|
+
import * as React100 from "react";
|
|
6888
6928
|
import { useId as useId3 } from "react";
|
|
6889
6929
|
import { ControlFormLabel as ControlFormLabel6, Repeater as Repeater3 } from "@elementor/editor-controls";
|
|
6890
6930
|
import {
|
|
6891
|
-
getElementType as
|
|
6931
|
+
getElementType as getElementType4,
|
|
6892
6932
|
updateElementEditorSettings as updateElementEditorSettings4,
|
|
6893
6933
|
useElementChildren as useElementChildren3,
|
|
6894
6934
|
useElementEditorSettings as useElementEditorSettings4
|
|
@@ -6898,9 +6938,9 @@ import { Stack as Stack18, TextField as TextField4 } from "@elementor/ui";
|
|
|
6898
6938
|
import { __ as __77 } from "@wordpress/i18n";
|
|
6899
6939
|
|
|
6900
6940
|
// src/controls-registry/element-controls/get-element-by-type.ts
|
|
6901
|
-
import { getContainer as
|
|
6941
|
+
import { getContainer as getContainer8 } from "@elementor/editor-elements";
|
|
6902
6942
|
var getElementByType = (elementId, type) => {
|
|
6903
|
-
const currentElement =
|
|
6943
|
+
const currentElement = getContainer8(elementId);
|
|
6904
6944
|
if (!currentElement) {
|
|
6905
6945
|
return null;
|
|
6906
6946
|
}
|
|
@@ -6911,7 +6951,7 @@ var getElementByType = (elementId, type) => {
|
|
|
6911
6951
|
};
|
|
6912
6952
|
|
|
6913
6953
|
// src/controls-registry/element-controls/menu-items-control/submenu-toggle.tsx
|
|
6914
|
-
import * as
|
|
6954
|
+
import * as React99 from "react";
|
|
6915
6955
|
import { useRef as useRef22, useState as useState11 } from "react";
|
|
6916
6956
|
import { ControlFormLabel as ControlFormLabel5 } from "@elementor/editor-controls";
|
|
6917
6957
|
import { PromotionChip, PromotionPopover } from "@elementor/editor-ui";
|
|
@@ -6919,14 +6959,14 @@ import { Box as Box9, Stack as Stack17, Switch as Switch2 } from "@elementor/ui"
|
|
|
6919
6959
|
import { __ as __76 } from "@wordpress/i18n";
|
|
6920
6960
|
|
|
6921
6961
|
// src/controls-registry/element-controls/menu-items-control/use-submenu.ts
|
|
6922
|
-
import { getContainer as
|
|
6962
|
+
import { getContainer as getContainer10, getWidgetsCache as getWidgetsCache5 } from "@elementor/editor-elements";
|
|
6923
6963
|
|
|
6924
6964
|
// src/controls-registry/element-controls/menu-items-control/use-actions.ts
|
|
6925
6965
|
import {
|
|
6926
6966
|
createElements as createElements3,
|
|
6927
6967
|
duplicateElements as duplicateElements3,
|
|
6928
6968
|
generateElementId as generateElementId3,
|
|
6929
|
-
getContainer as
|
|
6969
|
+
getContainer as getContainer9,
|
|
6930
6970
|
moveElements as moveElements3,
|
|
6931
6971
|
removeElements as removeElements3
|
|
6932
6972
|
} from "@elementor/editor-elements";
|
|
@@ -6963,7 +7003,7 @@ var buildEntryModel = (title) => ({
|
|
|
6963
7003
|
});
|
|
6964
7004
|
var useActions2 = () => {
|
|
6965
7005
|
const addItem2 = ({ menuItemsId, items: items3 }) => {
|
|
6966
|
-
const menuItems =
|
|
7006
|
+
const menuItems = getContainer9(menuItemsId);
|
|
6967
7007
|
if (!menuItems) {
|
|
6968
7008
|
throw new Error("Menu items container not found");
|
|
6969
7009
|
}
|
|
@@ -6980,7 +7020,7 @@ var useActions2 = () => {
|
|
|
6980
7020
|
});
|
|
6981
7021
|
};
|
|
6982
7022
|
const removeItem2 = ({ menuItemsId, items: items3 }) => {
|
|
6983
|
-
const entriesCount =
|
|
7023
|
+
const entriesCount = getContainer9(menuItemsId)?.children?.filter(
|
|
6984
7024
|
(child) => child.model.get("elType") === MENU_ENTRY_ELEMENT_TYPE
|
|
6985
7025
|
).length ?? 0;
|
|
6986
7026
|
const removableCount = Math.max(0, Math.min(items3.length, entriesCount - MIN_ENTRIES));
|
|
@@ -7003,8 +7043,8 @@ var useActions2 = () => {
|
|
|
7003
7043
|
movedElementId,
|
|
7004
7044
|
toIndex
|
|
7005
7045
|
}) => {
|
|
7006
|
-
const menuItems =
|
|
7007
|
-
const movedElement =
|
|
7046
|
+
const menuItems = getContainer9(menuItemsId);
|
|
7047
|
+
const movedElement = getContainer9(movedElementId);
|
|
7008
7048
|
if (!menuItems || !movedElement) {
|
|
7009
7049
|
throw new Error("Menu item or container not found");
|
|
7010
7050
|
}
|
|
@@ -7028,7 +7068,7 @@ var getSubmenuPromotion = () => {
|
|
|
7028
7068
|
return entitlement?.locked ? entitlement.promotion : null;
|
|
7029
7069
|
};
|
|
7030
7070
|
var getParentEntryId = (elementId) => {
|
|
7031
|
-
const parent =
|
|
7071
|
+
const parent = getContainer10(elementId)?.parent;
|
|
7032
7072
|
return parent?.model.get("elType") === MENU_ENTRY_ELEMENT_TYPE ? parent.id : null;
|
|
7033
7073
|
};
|
|
7034
7074
|
|
|
@@ -7040,7 +7080,7 @@ var SubmenuToggle = ({ entryId }) => {
|
|
|
7040
7080
|
if (!entryId || !promotion) {
|
|
7041
7081
|
return null;
|
|
7042
7082
|
}
|
|
7043
|
-
return /* @__PURE__ */
|
|
7083
|
+
return /* @__PURE__ */ React99.createElement(
|
|
7044
7084
|
Stack17,
|
|
7045
7085
|
{
|
|
7046
7086
|
direction: "row",
|
|
@@ -7049,7 +7089,7 @@ var SubmenuToggle = ({ entryId }) => {
|
|
|
7049
7089
|
ref: anchorRef,
|
|
7050
7090
|
"data-testid": "submenu-toggle-row"
|
|
7051
7091
|
},
|
|
7052
|
-
/* @__PURE__ */
|
|
7092
|
+
/* @__PURE__ */ React99.createElement(Stack17, { direction: "row", alignItems: "center" }, /* @__PURE__ */ React99.createElement(ControlFormLabel5, null, __76("Enable Submenu", "elementor")), /* @__PURE__ */ React99.createElement(
|
|
7053
7093
|
PromotionPopover,
|
|
7054
7094
|
{
|
|
7055
7095
|
open: isPromotionOpen,
|
|
@@ -7060,7 +7100,7 @@ var SubmenuToggle = ({ entryId }) => {
|
|
|
7060
7100
|
onClose: () => setIsPromotionOpen(false),
|
|
7061
7101
|
anchorRef
|
|
7062
7102
|
},
|
|
7063
|
-
/* @__PURE__ */
|
|
7103
|
+
/* @__PURE__ */ React99.createElement(
|
|
7064
7104
|
Box9,
|
|
7065
7105
|
{
|
|
7066
7106
|
component: "span",
|
|
@@ -7068,10 +7108,10 @@ var SubmenuToggle = ({ entryId }) => {
|
|
|
7068
7108
|
onClick: () => setIsPromotionOpen((open) => !open),
|
|
7069
7109
|
sx: { display: "inline-flex", cursor: "pointer" }
|
|
7070
7110
|
},
|
|
7071
|
-
/* @__PURE__ */
|
|
7111
|
+
/* @__PURE__ */ React99.createElement(PromotionChip, null)
|
|
7072
7112
|
)
|
|
7073
7113
|
)),
|
|
7074
|
-
/* @__PURE__ */
|
|
7114
|
+
/* @__PURE__ */ React99.createElement(Box9, { sx: { marginInlineEnd: -1 }, onMouseDown: (e) => e.stopPropagation() }, /* @__PURE__ */ React99.createElement(
|
|
7075
7115
|
Switch2,
|
|
7076
7116
|
{
|
|
7077
7117
|
size: "small",
|
|
@@ -7097,13 +7137,13 @@ var registerSubmenuToggle = (component) => {
|
|
|
7097
7137
|
var getSubmenuToggle = () => submenuToggle;
|
|
7098
7138
|
|
|
7099
7139
|
// src/controls-registry/element-controls/menu-items-control/use-entry-item.ts
|
|
7100
|
-
import { getContainer as
|
|
7140
|
+
import { getContainer as getContainer11, getElementSettings as getElementSettings4, getElementType as getElementType3 } from "@elementor/editor-elements";
|
|
7101
7141
|
import { __privateUseListenTo as useListenTo4, commandEndEvent as commandEndEvent4 } from "@elementor/editor-v1-adapters";
|
|
7102
7142
|
var useEntryItem = (entryId) => {
|
|
7103
7143
|
return useListenTo4(
|
|
7104
7144
|
[commandEndEvent4("document/elements/set-settings"), commandEndEvent4("document/elements/settings")],
|
|
7105
7145
|
() => {
|
|
7106
|
-
const item =
|
|
7146
|
+
const item = getContainer11(entryId)?.children?.find(
|
|
7107
7147
|
(child) => child.model.get("elType") === MENU_ITEM_ELEMENT_TYPE
|
|
7108
7148
|
);
|
|
7109
7149
|
return {
|
|
@@ -7115,7 +7155,7 @@ var useEntryItem = (entryId) => {
|
|
|
7115
7155
|
);
|
|
7116
7156
|
};
|
|
7117
7157
|
var getEntrySettings = (itemId) => {
|
|
7118
|
-
const propsSchema =
|
|
7158
|
+
const propsSchema = getElementType3(MENU_ITEM_ELEMENT_TYPE)?.propsSchema ?? {};
|
|
7119
7159
|
return getElementSettings4(itemId, Object.keys(propsSchema));
|
|
7120
7160
|
};
|
|
7121
7161
|
|
|
@@ -7158,7 +7198,7 @@ var MenuItemsControl = ({ label }) => {
|
|
|
7158
7198
|
});
|
|
7159
7199
|
}
|
|
7160
7200
|
};
|
|
7161
|
-
return /* @__PURE__ */
|
|
7201
|
+
return /* @__PURE__ */ React100.createElement(
|
|
7162
7202
|
Repeater3,
|
|
7163
7203
|
{
|
|
7164
7204
|
showToggle: false,
|
|
@@ -7177,21 +7217,21 @@ var MenuItemsControl = ({ label }) => {
|
|
|
7177
7217
|
}
|
|
7178
7218
|
);
|
|
7179
7219
|
};
|
|
7180
|
-
var ItemLabel3 = ({ value }) => /* @__PURE__ */
|
|
7220
|
+
var ItemLabel3 = ({ value }) => /* @__PURE__ */ React100.createElement(Stack18, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, value.id ? /* @__PURE__ */ React100.createElement(EntryLabel, { elementId: value.id, fallbackTitle: value.title }) : /* @__PURE__ */ React100.createElement("span", null, value?.title));
|
|
7181
7221
|
var EntryLabel = ({ elementId, fallbackTitle }) => {
|
|
7182
7222
|
const editorSettings = useElementEditorSettings4(elementId);
|
|
7183
|
-
return /* @__PURE__ */
|
|
7223
|
+
return /* @__PURE__ */ React100.createElement("span", null, editorSettings?.title ?? fallbackTitle ?? "");
|
|
7184
7224
|
};
|
|
7185
7225
|
var ItemContent3 = ({ value }) => {
|
|
7186
7226
|
if (!value.id) {
|
|
7187
7227
|
return null;
|
|
7188
7228
|
}
|
|
7189
|
-
return /* @__PURE__ */
|
|
7229
|
+
return /* @__PURE__ */ React100.createElement(Stack18, { p: 2, gap: 1.5 }, /* @__PURE__ */ React100.createElement(ItemNameControl2, { elementId: value.id }), /* @__PURE__ */ React100.createElement(ItemLinkControl, { entryId: value.id }), /* @__PURE__ */ React100.createElement(SubmenuToggleSlot, { entryId: value.id }));
|
|
7190
7230
|
};
|
|
7191
7231
|
var ItemNameControl2 = ({ elementId }) => {
|
|
7192
7232
|
const editorSettings = useElementEditorSettings4(elementId);
|
|
7193
7233
|
const inputId = useId3();
|
|
7194
|
-
return /* @__PURE__ */
|
|
7234
|
+
return /* @__PURE__ */ React100.createElement(Stack18, { gap: 1 }, /* @__PURE__ */ React100.createElement(ControlFormLabel6, { htmlFor: inputId }, __77("Item name", "elementor")), /* @__PURE__ */ React100.createElement(
|
|
7195
7235
|
TextField4,
|
|
7196
7236
|
{
|
|
7197
7237
|
id: inputId,
|
|
@@ -7205,19 +7245,19 @@ var ItemNameControl2 = ({ elementId }) => {
|
|
|
7205
7245
|
};
|
|
7206
7246
|
var ItemLinkControl = ({ entryId }) => {
|
|
7207
7247
|
const { itemId, settings } = useEntryItem(entryId);
|
|
7208
|
-
const elementType = itemId ?
|
|
7248
|
+
const elementType = itemId ? getElementType4(MENU_ITEM_ELEMENT_TYPE) : null;
|
|
7209
7249
|
const linkControl = elementType ? findControlByBind(elementType.controls, LINK_BIND) : null;
|
|
7210
7250
|
if (!itemId || !elementType || !linkControl) {
|
|
7211
7251
|
return null;
|
|
7212
7252
|
}
|
|
7213
|
-
return /* @__PURE__ */
|
|
7253
|
+
return /* @__PURE__ */ React100.createElement(
|
|
7214
7254
|
ElementProvider,
|
|
7215
7255
|
{
|
|
7216
7256
|
element: { id: itemId, type: MENU_ITEM_ELEMENT_TYPE },
|
|
7217
7257
|
elementType,
|
|
7218
7258
|
settings
|
|
7219
7259
|
},
|
|
7220
|
-
/* @__PURE__ */
|
|
7260
|
+
/* @__PURE__ */ React100.createElement(SessionStorageProvider4, { prefix: itemId }, /* @__PURE__ */ React100.createElement(SettingsControl, { control: linkControl }))
|
|
7221
7261
|
);
|
|
7222
7262
|
};
|
|
7223
7263
|
var findControlByBind = (items3, bind) => {
|
|
@@ -7236,19 +7276,19 @@ var findControlByBind = (items3, bind) => {
|
|
|
7236
7276
|
};
|
|
7237
7277
|
var SubmenuToggleSlot = ({ entryId }) => {
|
|
7238
7278
|
const Toggle = getSubmenuToggle();
|
|
7239
|
-
return /* @__PURE__ */
|
|
7279
|
+
return /* @__PURE__ */ React100.createElement(Toggle, { entryId });
|
|
7240
7280
|
};
|
|
7241
7281
|
|
|
7242
7282
|
// src/controls-registry/element-controls/submenu-toggle-control/submenu-toggle-control.tsx
|
|
7243
|
-
import * as
|
|
7283
|
+
import * as React101 from "react";
|
|
7244
7284
|
var SubmenuToggleControl = () => {
|
|
7245
7285
|
const { element } = useElement();
|
|
7246
7286
|
const Toggle = getSubmenuToggle();
|
|
7247
|
-
return /* @__PURE__ */
|
|
7287
|
+
return /* @__PURE__ */ React101.createElement(Toggle, { entryId: getParentEntryId(element.id) });
|
|
7248
7288
|
};
|
|
7249
7289
|
|
|
7250
7290
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
7251
|
-
import * as
|
|
7291
|
+
import * as React102 from "react";
|
|
7252
7292
|
import {
|
|
7253
7293
|
ControlFormLabel as ControlFormLabel7,
|
|
7254
7294
|
Repeater as Repeater4,
|
|
@@ -7269,7 +7309,7 @@ import { useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
|
7269
7309
|
import {
|
|
7270
7310
|
createElements as createElements4,
|
|
7271
7311
|
duplicateElements as duplicateElements4,
|
|
7272
|
-
getContainer as
|
|
7312
|
+
getContainer as getContainer12,
|
|
7273
7313
|
moveElements as moveElements4,
|
|
7274
7314
|
removeElements as removeElements4
|
|
7275
7315
|
} from "@elementor/editor-elements";
|
|
@@ -7290,7 +7330,7 @@ var useActions3 = () => {
|
|
|
7290
7330
|
});
|
|
7291
7331
|
items3.forEach(({ item, index }) => {
|
|
7292
7332
|
const tabId = item.id;
|
|
7293
|
-
const tabContentAreaContainer =
|
|
7333
|
+
const tabContentAreaContainer = getContainer12(tabContentAreaId);
|
|
7294
7334
|
const tabContentId = tabContentAreaContainer?.children?.[index]?.id;
|
|
7295
7335
|
if (!tabContentId) {
|
|
7296
7336
|
throw new Error("Original content ID is required for duplication");
|
|
@@ -7318,10 +7358,10 @@ var useActions3 = () => {
|
|
|
7318
7358
|
movedElementId,
|
|
7319
7359
|
movedElementIndex
|
|
7320
7360
|
}) => {
|
|
7321
|
-
const tabContentContainer =
|
|
7361
|
+
const tabContentContainer = getContainer12(tabContentAreaId);
|
|
7322
7362
|
const tabContent = tabContentContainer?.children?.[movedElementIndex];
|
|
7323
|
-
const movedElement =
|
|
7324
|
-
const tabsMenu =
|
|
7363
|
+
const movedElement = getContainer12(movedElementId);
|
|
7364
|
+
const tabsMenu = getContainer12(tabsMenuId);
|
|
7325
7365
|
if (!tabContent) {
|
|
7326
7366
|
throw new Error("Content element is required");
|
|
7327
7367
|
}
|
|
@@ -7371,7 +7411,7 @@ var useActions3 = () => {
|
|
|
7371
7411
|
title: __78("Tabs", "elementor"),
|
|
7372
7412
|
elementIds: items3.flatMap(({ item, index }) => {
|
|
7373
7413
|
const tabId = item.id;
|
|
7374
|
-
const tabContentContainer =
|
|
7414
|
+
const tabContentContainer = getContainer12(tabContentAreaId);
|
|
7375
7415
|
const tabContentId = tabContentContainer?.children?.[index]?.id;
|
|
7376
7416
|
if (!tabContentId) {
|
|
7377
7417
|
throw new Error("Content ID is required");
|
|
@@ -7395,8 +7435,8 @@ var useActions3 = () => {
|
|
|
7395
7435
|
tabsMenuId,
|
|
7396
7436
|
items: items3
|
|
7397
7437
|
}) => {
|
|
7398
|
-
const tabContentArea =
|
|
7399
|
-
const tabsMenu =
|
|
7438
|
+
const tabContentArea = getContainer12(tabContentAreaId);
|
|
7439
|
+
const tabsMenu = getContainer12(tabsMenuId);
|
|
7400
7440
|
if (!tabContentArea || !tabsMenu) {
|
|
7401
7441
|
throw new Error("Tab containers not found");
|
|
7402
7442
|
}
|
|
@@ -7472,7 +7512,7 @@ var calculateDefaultOnDuplicate = ({
|
|
|
7472
7512
|
var TAB_MENU_ELEMENT_TYPE = "e-tabs-menu";
|
|
7473
7513
|
var TAB_CONTENT_AREA_ELEMENT_TYPE = "e-tabs-content-area";
|
|
7474
7514
|
var TabsControl = ({ label }) => {
|
|
7475
|
-
return /* @__PURE__ */
|
|
7515
|
+
return /* @__PURE__ */ React102.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __79("Tabs", "elementor") }, /* @__PURE__ */ React102.createElement(TabsControlContent, { label }));
|
|
7476
7516
|
};
|
|
7477
7517
|
var TabsControlContent = ({ label }) => {
|
|
7478
7518
|
const { element } = useElement();
|
|
@@ -7516,7 +7556,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
7516
7556
|
});
|
|
7517
7557
|
}
|
|
7518
7558
|
};
|
|
7519
|
-
return /* @__PURE__ */
|
|
7559
|
+
return /* @__PURE__ */ React102.createElement(
|
|
7520
7560
|
Repeater4,
|
|
7521
7561
|
{
|
|
7522
7562
|
showToggle: false,
|
|
@@ -7535,12 +7575,12 @@ var TabsControlContent = ({ label }) => {
|
|
|
7535
7575
|
);
|
|
7536
7576
|
};
|
|
7537
7577
|
var ItemLabel4 = ({ value, index }) => {
|
|
7538
|
-
return /* @__PURE__ */
|
|
7578
|
+
return /* @__PURE__ */ React102.createElement(Stack19, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, value.id ? /* @__PURE__ */ React102.createElement(TabRepeaterLabel, { elementId: value.id, fallbackTitle: value.title }) : /* @__PURE__ */ React102.createElement("span", null, value?.title), /* @__PURE__ */ React102.createElement(ItemDefaultTab, { index }));
|
|
7539
7579
|
};
|
|
7540
7580
|
var TabRepeaterLabel = ({ elementId, fallbackTitle }) => {
|
|
7541
7581
|
const editorSettings = useElementEditorSettings5(elementId);
|
|
7542
7582
|
const label = editorSettings?.title ?? fallbackTitle ?? "";
|
|
7543
|
-
return /* @__PURE__ */
|
|
7583
|
+
return /* @__PURE__ */ React102.createElement("span", null, label);
|
|
7544
7584
|
};
|
|
7545
7585
|
var ItemDefaultTab = ({ index }) => {
|
|
7546
7586
|
const { value: defaultItem } = useBoundProp8(numberPropTypeUtil4);
|
|
@@ -7548,18 +7588,18 @@ var ItemDefaultTab = ({ index }) => {
|
|
|
7548
7588
|
if (!isDefault) {
|
|
7549
7589
|
return null;
|
|
7550
7590
|
}
|
|
7551
|
-
return /* @__PURE__ */
|
|
7591
|
+
return /* @__PURE__ */ React102.createElement(Chip4, { size: "tiny", shape: "rounded", label: __79("Default", "elementor") });
|
|
7552
7592
|
};
|
|
7553
7593
|
var ItemContent4 = ({ value, index }) => {
|
|
7554
7594
|
if (!value.id) {
|
|
7555
7595
|
return null;
|
|
7556
7596
|
}
|
|
7557
|
-
return /* @__PURE__ */
|
|
7597
|
+
return /* @__PURE__ */ React102.createElement(Stack19, { p: 2, gap: 1.5 }, /* @__PURE__ */ React102.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React102.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __79("Tabs", "elementor") }, /* @__PURE__ */ React102.createElement(DefaultTabControl, { tabIndex: index })));
|
|
7558
7598
|
};
|
|
7559
7599
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
7560
7600
|
const { value, setValue } = useBoundProp8(numberPropTypeUtil4);
|
|
7561
7601
|
const isDefault = value === tabIndex;
|
|
7562
|
-
return /* @__PURE__ */
|
|
7602
|
+
return /* @__PURE__ */ React102.createElement(Stack19, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React102.createElement(ControlFormLabel7, null, __79("Set as default tab", "elementor")), /* @__PURE__ */ React102.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React102.createElement(
|
|
7563
7603
|
Switch3,
|
|
7564
7604
|
{
|
|
7565
7605
|
size: "small",
|
|
@@ -7577,7 +7617,7 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
7577
7617
|
var TabLabelControl = ({ elementId }) => {
|
|
7578
7618
|
const editorSettings = useElementEditorSettings5(elementId);
|
|
7579
7619
|
const label = editorSettings?.title ?? "";
|
|
7580
|
-
return /* @__PURE__ */
|
|
7620
|
+
return /* @__PURE__ */ React102.createElement(Stack19, { gap: 1 }, /* @__PURE__ */ React102.createElement(ControlFormLabel7, null, __79("Tab name", "elementor")), /* @__PURE__ */ React102.createElement(
|
|
7581
7621
|
TextField5,
|
|
7582
7622
|
{
|
|
7583
7623
|
size: "tiny",
|
|
@@ -7598,22 +7638,22 @@ var ConditionalTooltip = ({
|
|
|
7598
7638
|
if (!showTooltip) {
|
|
7599
7639
|
return children;
|
|
7600
7640
|
}
|
|
7601
|
-
return /* @__PURE__ */
|
|
7641
|
+
return /* @__PURE__ */ React102.createElement(
|
|
7602
7642
|
Infotip3,
|
|
7603
7643
|
{
|
|
7604
7644
|
arrow: false,
|
|
7605
|
-
content: /* @__PURE__ */
|
|
7645
|
+
content: /* @__PURE__ */ React102.createElement(
|
|
7606
7646
|
Alert5,
|
|
7607
7647
|
{
|
|
7608
7648
|
color: "secondary",
|
|
7609
|
-
icon: /* @__PURE__ */
|
|
7649
|
+
icon: /* @__PURE__ */ React102.createElement(InfoCircleFilledIcon3, { fontSize: "tiny" }),
|
|
7610
7650
|
size: "small",
|
|
7611
7651
|
sx: { width: 288 }
|
|
7612
7652
|
},
|
|
7613
|
-
/* @__PURE__ */
|
|
7653
|
+
/* @__PURE__ */ React102.createElement(Typography5, { variant: "body2" }, __79("To change the default tab, simply set another tab as default.", "elementor"))
|
|
7614
7654
|
)
|
|
7615
7655
|
},
|
|
7616
|
-
/* @__PURE__ */
|
|
7656
|
+
/* @__PURE__ */ React102.createElement("span", null, children)
|
|
7617
7657
|
);
|
|
7618
7658
|
};
|
|
7619
7659
|
|
|
@@ -7643,7 +7683,7 @@ import {
|
|
|
7643
7683
|
import { controlActionsMenu as controlActionsMenu2 } from "@elementor/menus";
|
|
7644
7684
|
|
|
7645
7685
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
7646
|
-
import * as
|
|
7686
|
+
import * as React103 from "react";
|
|
7647
7687
|
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp10 } from "@elementor/editor-controls";
|
|
7648
7688
|
import {
|
|
7649
7689
|
backgroundImageOverlayPropTypeUtil
|
|
@@ -7786,24 +7826,24 @@ var useDynamicTag = (tagName) => {
|
|
|
7786
7826
|
};
|
|
7787
7827
|
|
|
7788
7828
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
7789
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
7829
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React103.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
7790
7830
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
7791
7831
|
const context = useBoundProp10(backgroundImageOverlayPropTypeUtil);
|
|
7792
|
-
return /* @__PURE__ */
|
|
7832
|
+
return /* @__PURE__ */ React103.createElement(PropProvider4, { ...context, value: value.value }, /* @__PURE__ */ React103.createElement(PropKeyProvider4, { bind: "image" }, /* @__PURE__ */ React103.createElement(Wrapper2, { rawValue: value.value })));
|
|
7793
7833
|
};
|
|
7794
7834
|
var Wrapper2 = ({ rawValue }) => {
|
|
7795
7835
|
const { propType } = useBoundProp10();
|
|
7796
7836
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
7797
|
-
return /* @__PURE__ */
|
|
7837
|
+
return /* @__PURE__ */ React103.createElement(PropProvider4, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React103.createElement(PropKeyProvider4, { bind: "src" }, /* @__PURE__ */ React103.createElement(Content, { rawValue: rawValue.image })));
|
|
7798
7838
|
};
|
|
7799
7839
|
var Content = ({ rawValue }) => {
|
|
7800
7840
|
const src = rawValue.value.src;
|
|
7801
7841
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
7802
|
-
return /* @__PURE__ */
|
|
7842
|
+
return /* @__PURE__ */ React103.createElement(React103.Fragment, null, dynamicTag?.label);
|
|
7803
7843
|
};
|
|
7804
7844
|
|
|
7805
7845
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
7806
|
-
import * as
|
|
7846
|
+
import * as React107 from "react";
|
|
7807
7847
|
import {
|
|
7808
7848
|
ControlFormLabel as ControlFormLabel8,
|
|
7809
7849
|
PropKeyProvider as PropKeyProvider6,
|
|
@@ -7839,11 +7879,11 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
7839
7879
|
};
|
|
7840
7880
|
|
|
7841
7881
|
// src/dynamics/dynamic-control.tsx
|
|
7842
|
-
import * as
|
|
7882
|
+
import * as React105 from "react";
|
|
7843
7883
|
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as useBoundProp11 } from "@elementor/editor-controls";
|
|
7844
7884
|
|
|
7845
7885
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
7846
|
-
import * as
|
|
7886
|
+
import * as React104 from "react";
|
|
7847
7887
|
import { useMemo as useMemo13 } from "react";
|
|
7848
7888
|
import { isDependencyMet as isDependencyMet3 } from "@elementor/editor-props";
|
|
7849
7889
|
var DynamicConditionalControl = ({
|
|
@@ -7885,10 +7925,10 @@ var DynamicConditionalControl = ({
|
|
|
7885
7925
|
return { ...defaults, ...convertedSettings };
|
|
7886
7926
|
}, [defaults, convertedSettings]);
|
|
7887
7927
|
if (!propType?.dependencies?.terms.length) {
|
|
7888
|
-
return /* @__PURE__ */
|
|
7928
|
+
return /* @__PURE__ */ React104.createElement(React104.Fragment, null, children);
|
|
7889
7929
|
}
|
|
7890
7930
|
const isHidden = !isDependencyMet3(propType?.dependencies, effectiveSettings).isMet;
|
|
7891
|
-
return isHidden ? null : /* @__PURE__ */
|
|
7931
|
+
return isHidden ? null : /* @__PURE__ */ React104.createElement(React104.Fragment, null, children);
|
|
7892
7932
|
};
|
|
7893
7933
|
|
|
7894
7934
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -7913,7 +7953,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
7913
7953
|
});
|
|
7914
7954
|
};
|
|
7915
7955
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
7916
|
-
return /* @__PURE__ */
|
|
7956
|
+
return /* @__PURE__ */ React105.createElement(PropProvider5, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React105.createElement(PropKeyProvider5, { bind }, /* @__PURE__ */ React105.createElement(
|
|
7917
7957
|
DynamicConditionalControl,
|
|
7918
7958
|
{
|
|
7919
7959
|
propType: dynamicPropType,
|
|
@@ -7925,7 +7965,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
7925
7965
|
};
|
|
7926
7966
|
|
|
7927
7967
|
// src/dynamics/components/dynamic-selection.tsx
|
|
7928
|
-
import * as
|
|
7968
|
+
import * as React106 from "react";
|
|
7929
7969
|
import { Fragment as Fragment17, useEffect as useEffect12, useState as useState12 } from "react";
|
|
7930
7970
|
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as useBoundProp12 } from "@elementor/editor-controls";
|
|
7931
7971
|
import { CtaButton, PopoverHeader, PopoverMenuList, SearchField, SectionPopoverBody } from "@elementor/editor-ui";
|
|
@@ -7978,19 +8018,19 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
7978
8018
|
]);
|
|
7979
8019
|
const getPopOverContent = () => {
|
|
7980
8020
|
if (hasNoDynamicTags) {
|
|
7981
|
-
return /* @__PURE__ */
|
|
8021
|
+
return /* @__PURE__ */ React106.createElement(NoDynamicTags, null);
|
|
7982
8022
|
}
|
|
7983
8023
|
if (expired) {
|
|
7984
|
-
return /* @__PURE__ */
|
|
8024
|
+
return /* @__PURE__ */ React106.createElement(ExpiredDynamicTags, null);
|
|
7985
8025
|
}
|
|
7986
|
-
return /* @__PURE__ */
|
|
8026
|
+
return /* @__PURE__ */ React106.createElement(Fragment17, null, /* @__PURE__ */ React106.createElement(
|
|
7987
8027
|
SearchField,
|
|
7988
8028
|
{
|
|
7989
8029
|
value: searchValue,
|
|
7990
8030
|
onSearch: handleSearch,
|
|
7991
8031
|
placeholder: __80("Search dynamic tags\u2026", "elementor")
|
|
7992
8032
|
}
|
|
7993
|
-
), /* @__PURE__ */
|
|
8033
|
+
), /* @__PURE__ */ React106.createElement(Divider7, null), /* @__PURE__ */ React106.createElement(
|
|
7994
8034
|
PopoverMenuList,
|
|
7995
8035
|
{
|
|
7996
8036
|
items: virtualizedItems,
|
|
@@ -7998,20 +8038,20 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
7998
8038
|
onClose: closePopover,
|
|
7999
8039
|
selectedValue: dynamicValue?.name,
|
|
8000
8040
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
8001
|
-
noResultsComponent: /* @__PURE__ */
|
|
8041
|
+
noResultsComponent: /* @__PURE__ */ React106.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
8002
8042
|
}
|
|
8003
8043
|
));
|
|
8004
8044
|
};
|
|
8005
|
-
return /* @__PURE__ */
|
|
8045
|
+
return /* @__PURE__ */ React106.createElement(SectionPopoverBody, { "aria-label": __80("Dynamic tags", "elementor") }, /* @__PURE__ */ React106.createElement(
|
|
8006
8046
|
PopoverHeader,
|
|
8007
8047
|
{
|
|
8008
8048
|
title: __80("Dynamic tags", "elementor"),
|
|
8009
8049
|
onClose: closePopover,
|
|
8010
|
-
icon: /* @__PURE__ */
|
|
8050
|
+
icon: /* @__PURE__ */ React106.createElement(DatabaseIcon2, { fontSize: SIZE2 })
|
|
8011
8051
|
}
|
|
8012
8052
|
), getPopOverContent());
|
|
8013
8053
|
};
|
|
8014
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
8054
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React106.createElement(
|
|
8015
8055
|
Stack20,
|
|
8016
8056
|
{
|
|
8017
8057
|
gap: 1,
|
|
@@ -8022,11 +8062,11 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React105.createEle
|
|
|
8022
8062
|
color: "text.secondary",
|
|
8023
8063
|
sx: { pb: 3.5 }
|
|
8024
8064
|
},
|
|
8025
|
-
/* @__PURE__ */
|
|
8026
|
-
/* @__PURE__ */
|
|
8027
|
-
/* @__PURE__ */
|
|
8065
|
+
/* @__PURE__ */ React106.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
8066
|
+
/* @__PURE__ */ React106.createElement(Typography6, { align: "center", variant: "subtitle2" }, __80("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React106.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
8067
|
+
/* @__PURE__ */ React106.createElement(Typography6, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, __80("Try something else.", "elementor"), /* @__PURE__ */ React106.createElement(Link3, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __80("Clear & try again", "elementor")))
|
|
8028
8068
|
);
|
|
8029
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
8069
|
+
var NoDynamicTags = () => /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Divider7, null), /* @__PURE__ */ React106.createElement(
|
|
8030
8070
|
Stack20,
|
|
8031
8071
|
{
|
|
8032
8072
|
gap: 1,
|
|
@@ -8037,10 +8077,10 @@ var NoDynamicTags = () => /* @__PURE__ */ React105.createElement(React105.Fragme
|
|
|
8037
8077
|
color: "text.secondary",
|
|
8038
8078
|
sx: { pb: 3.5 }
|
|
8039
8079
|
},
|
|
8040
|
-
/* @__PURE__ */
|
|
8041
|
-
/* @__PURE__ */
|
|
8042
|
-
/* @__PURE__ */
|
|
8043
|
-
/* @__PURE__ */
|
|
8080
|
+
/* @__PURE__ */ React106.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
8081
|
+
/* @__PURE__ */ React106.createElement(Typography6, { align: "center", variant: "subtitle2" }, __80("Streamline your workflow with dynamic tags", "elementor")),
|
|
8082
|
+
/* @__PURE__ */ React106.createElement(Typography6, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, __80("Upgrade now to display your content dynamically.", "elementor")),
|
|
8083
|
+
/* @__PURE__ */ React106.createElement(
|
|
8044
8084
|
CtaButton,
|
|
8045
8085
|
{
|
|
8046
8086
|
size: "small",
|
|
@@ -8049,7 +8089,7 @@ var NoDynamicTags = () => /* @__PURE__ */ React105.createElement(React105.Fragme
|
|
|
8049
8089
|
}
|
|
8050
8090
|
)
|
|
8051
8091
|
));
|
|
8052
|
-
var ExpiredDynamicTags = () => /* @__PURE__ */
|
|
8092
|
+
var ExpiredDynamicTags = () => /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Divider7, null), /* @__PURE__ */ React106.createElement(
|
|
8053
8093
|
Stack20,
|
|
8054
8094
|
{
|
|
8055
8095
|
gap: 1,
|
|
@@ -8060,10 +8100,10 @@ var ExpiredDynamicTags = () => /* @__PURE__ */ React105.createElement(React105.F
|
|
|
8060
8100
|
color: "text.secondary",
|
|
8061
8101
|
sx: { pb: 3.5 }
|
|
8062
8102
|
},
|
|
8063
|
-
/* @__PURE__ */
|
|
8064
|
-
/* @__PURE__ */
|
|
8065
|
-
/* @__PURE__ */
|
|
8066
|
-
/* @__PURE__ */
|
|
8103
|
+
/* @__PURE__ */ React106.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
8104
|
+
/* @__PURE__ */ React106.createElement(Typography6, { align: "center", variant: "subtitle2" }, __80("Unlock your Dynamic tags again", "elementor")),
|
|
8105
|
+
/* @__PURE__ */ React106.createElement(Typography6, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, __80("Dynamic tags need Elementor Pro. Renew now to keep them active.", "elementor")),
|
|
8106
|
+
/* @__PURE__ */ React106.createElement(
|
|
8067
8107
|
CtaButton,
|
|
8068
8108
|
{
|
|
8069
8109
|
size: "small",
|
|
@@ -8106,7 +8146,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
8106
8146
|
const { name: tagName = "" } = value;
|
|
8107
8147
|
const dynamicTag = useDynamicTag(tagName);
|
|
8108
8148
|
if (!isDynamicTagSupported(tagName) && OriginalControl) {
|
|
8109
|
-
return /* @__PURE__ */
|
|
8149
|
+
return /* @__PURE__ */ React107.createElement(PropProvider6, { propType: originalPropType, value: { [bind]: null }, setValue: setAnyValue }, /* @__PURE__ */ React107.createElement(PropKeyProvider6, { bind }, /* @__PURE__ */ React107.createElement(OriginalControl, { ...props })));
|
|
8110
8150
|
}
|
|
8111
8151
|
const removeDynamicTag = () => {
|
|
8112
8152
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -8114,25 +8154,25 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
8114
8154
|
if (!dynamicTag) {
|
|
8115
8155
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
8116
8156
|
}
|
|
8117
|
-
return /* @__PURE__ */
|
|
8157
|
+
return /* @__PURE__ */ React107.createElement(Box10, null, /* @__PURE__ */ React107.createElement(
|
|
8118
8158
|
Tag,
|
|
8119
8159
|
{
|
|
8120
8160
|
fullWidth: true,
|
|
8121
8161
|
showActionsOnHover: true,
|
|
8122
8162
|
label: dynamicTag.label,
|
|
8123
|
-
startIcon: /* @__PURE__ */
|
|
8163
|
+
startIcon: /* @__PURE__ */ React107.createElement(DatabaseIcon3, { fontSize: SIZE3 }),
|
|
8124
8164
|
...bindTrigger2(selectionPopoverState),
|
|
8125
|
-
actions: /* @__PURE__ */
|
|
8165
|
+
actions: /* @__PURE__ */ React107.createElement(React107.Fragment, null, /* @__PURE__ */ React107.createElement(DynamicSettingsPopover, { dynamicTag, disabled: readonly }), /* @__PURE__ */ React107.createElement(
|
|
8126
8166
|
IconButton2,
|
|
8127
8167
|
{
|
|
8128
8168
|
size: SIZE3,
|
|
8129
8169
|
onClick: removeDynamicTag,
|
|
8130
8170
|
"aria-label": __81("Remove dynamic value", "elementor")
|
|
8131
8171
|
},
|
|
8132
|
-
/* @__PURE__ */
|
|
8172
|
+
/* @__PURE__ */ React107.createElement(XIcon, { fontSize: SIZE3 })
|
|
8133
8173
|
))
|
|
8134
8174
|
}
|
|
8135
|
-
), /* @__PURE__ */
|
|
8175
|
+
), /* @__PURE__ */ React107.createElement(
|
|
8136
8176
|
Popover,
|
|
8137
8177
|
{
|
|
8138
8178
|
disablePortal: true,
|
|
@@ -8144,7 +8184,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
8144
8184
|
},
|
|
8145
8185
|
...bindPopover(selectionPopoverState)
|
|
8146
8186
|
},
|
|
8147
|
-
/* @__PURE__ */
|
|
8187
|
+
/* @__PURE__ */ React107.createElement(SectionPopoverBody2, { "aria-label": __81("Dynamic tags", "elementor") }, /* @__PURE__ */ React107.createElement(DynamicSelection, { close: selectionPopoverState.close, expired: readonly }))
|
|
8148
8188
|
));
|
|
8149
8189
|
};
|
|
8150
8190
|
var DynamicSettingsPopover = ({
|
|
@@ -8156,7 +8196,7 @@ var DynamicSettingsPopover = ({
|
|
|
8156
8196
|
if (!hasDynamicSettings) {
|
|
8157
8197
|
return null;
|
|
8158
8198
|
}
|
|
8159
|
-
return /* @__PURE__ */
|
|
8199
|
+
return /* @__PURE__ */ React107.createElement(React107.Fragment, null, /* @__PURE__ */ React107.createElement(
|
|
8160
8200
|
IconButton2,
|
|
8161
8201
|
{
|
|
8162
8202
|
size: SIZE3,
|
|
@@ -8164,8 +8204,8 @@ var DynamicSettingsPopover = ({
|
|
|
8164
8204
|
...!disabled && bindTrigger2(popupState),
|
|
8165
8205
|
"aria-label": __81("Dynamic settings", "elementor")
|
|
8166
8206
|
},
|
|
8167
|
-
/* @__PURE__ */
|
|
8168
|
-
), /* @__PURE__ */
|
|
8207
|
+
/* @__PURE__ */ React107.createElement(SettingsIcon, { fontSize: SIZE3 })
|
|
8208
|
+
), /* @__PURE__ */ React107.createElement(
|
|
8169
8209
|
Popover,
|
|
8170
8210
|
{
|
|
8171
8211
|
disablePortal: true,
|
|
@@ -8177,14 +8217,14 @@ var DynamicSettingsPopover = ({
|
|
|
8177
8217
|
},
|
|
8178
8218
|
...bindPopover(popupState)
|
|
8179
8219
|
},
|
|
8180
|
-
/* @__PURE__ */
|
|
8220
|
+
/* @__PURE__ */ React107.createElement(SectionPopoverBody2, { "aria-label": __81("Dynamic settings", "elementor") }, /* @__PURE__ */ React107.createElement(
|
|
8181
8221
|
PopoverHeader2,
|
|
8182
8222
|
{
|
|
8183
8223
|
title: dynamicTag.label,
|
|
8184
8224
|
onClose: popupState.close,
|
|
8185
|
-
icon: /* @__PURE__ */
|
|
8225
|
+
icon: /* @__PURE__ */ React107.createElement(DatabaseIcon3, { fontSize: SIZE3 })
|
|
8186
8226
|
}
|
|
8187
|
-
), /* @__PURE__ */
|
|
8227
|
+
), /* @__PURE__ */ React107.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls, tagName: dynamicTag.name }))
|
|
8188
8228
|
));
|
|
8189
8229
|
};
|
|
8190
8230
|
var DynamicSettings = ({ controls, tagName }) => {
|
|
@@ -8195,9 +8235,9 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
8195
8235
|
}
|
|
8196
8236
|
if (tagsWithoutTabs.includes(tagName)) {
|
|
8197
8237
|
const singleTab = tabs[0];
|
|
8198
|
-
return /* @__PURE__ */
|
|
8238
|
+
return /* @__PURE__ */ React107.createElement(React107.Fragment, null, /* @__PURE__ */ React107.createElement(Divider8, null), /* @__PURE__ */ React107.createElement(ControlsItemsStack, { items: singleTab.value.items }));
|
|
8199
8239
|
}
|
|
8200
|
-
return /* @__PURE__ */
|
|
8240
|
+
return /* @__PURE__ */ React107.createElement(React107.Fragment, null, tabs.length > 1 && /* @__PURE__ */ React107.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React107.createElement(
|
|
8201
8241
|
Tab2,
|
|
8202
8242
|
{
|
|
8203
8243
|
key: index,
|
|
@@ -8205,15 +8245,15 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
8205
8245
|
sx: { px: 1, py: 0.5 },
|
|
8206
8246
|
...getTabProps(index)
|
|
8207
8247
|
}
|
|
8208
|
-
))), /* @__PURE__ */
|
|
8209
|
-
return /* @__PURE__ */
|
|
8248
|
+
))), /* @__PURE__ */ React107.createElement(Divider8, null), tabs.map(({ value }, index) => {
|
|
8249
|
+
return /* @__PURE__ */ React107.createElement(
|
|
8210
8250
|
TabPanel2,
|
|
8211
8251
|
{
|
|
8212
8252
|
key: index,
|
|
8213
8253
|
sx: { flexGrow: 1, py: 0, overflowY: "auto" },
|
|
8214
8254
|
...getTabPanelProps(index)
|
|
8215
8255
|
},
|
|
8216
|
-
/* @__PURE__ */
|
|
8256
|
+
/* @__PURE__ */ React107.createElement(ControlsItemsStack, { items: value.items })
|
|
8217
8257
|
);
|
|
8218
8258
|
}));
|
|
8219
8259
|
};
|
|
@@ -8255,11 +8295,11 @@ var Control2 = ({ control }) => {
|
|
|
8255
8295
|
display: "grid",
|
|
8256
8296
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
8257
8297
|
} : {};
|
|
8258
|
-
return /* @__PURE__ */
|
|
8298
|
+
return /* @__PURE__ */ React107.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React107.createElement(Grid8, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React107.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React107.createElement(ControlFormLabel8, null, control.label)) : null, /* @__PURE__ */ React107.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React107.createElement(Control, { type: control.type, props: controlProps }))));
|
|
8259
8299
|
};
|
|
8260
8300
|
function ControlsItemsStack({ items: items3 }) {
|
|
8261
|
-
return /* @__PURE__ */
|
|
8262
|
-
(item) => item.type === "control" ? /* @__PURE__ */
|
|
8301
|
+
return /* @__PURE__ */ React107.createElement(Stack21, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
8302
|
+
(item) => item.type === "control" ? /* @__PURE__ */ React107.createElement(Control2, { key: item.value.bind, control: item.value }) : null
|
|
8263
8303
|
));
|
|
8264
8304
|
}
|
|
8265
8305
|
|
|
@@ -8316,7 +8356,7 @@ function getDynamicValue(name, settings, renderPostId) {
|
|
|
8316
8356
|
}
|
|
8317
8357
|
|
|
8318
8358
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
8319
|
-
import * as
|
|
8359
|
+
import * as React108 from "react";
|
|
8320
8360
|
import { useBoundProp as useBoundProp14 } from "@elementor/editor-controls";
|
|
8321
8361
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
8322
8362
|
import { __ as __82 } from "@wordpress/i18n";
|
|
@@ -8327,7 +8367,7 @@ var usePropDynamicAction = () => {
|
|
|
8327
8367
|
visible,
|
|
8328
8368
|
icon: DatabaseIcon4,
|
|
8329
8369
|
title: __82("Dynamic tags", "elementor"),
|
|
8330
|
-
content: ({ close }) => /* @__PURE__ */
|
|
8370
|
+
content: ({ close }) => /* @__PURE__ */ React108.createElement(DynamicSelection, { close })
|
|
8331
8371
|
};
|
|
8332
8372
|
};
|
|
8333
8373
|
|
|
@@ -8445,14 +8485,14 @@ function useResetStyleValueProps() {
|
|
|
8445
8485
|
}
|
|
8446
8486
|
|
|
8447
8487
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
8448
|
-
import * as
|
|
8488
|
+
import * as React114 from "react";
|
|
8449
8489
|
import { useBoundProp as useBoundProp16 } from "@elementor/editor-controls";
|
|
8450
8490
|
import { isEmpty as isEmpty3 } from "@elementor/editor-props";
|
|
8451
8491
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
8452
8492
|
import { __ as __87 } from "@wordpress/i18n";
|
|
8453
8493
|
|
|
8454
8494
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
8455
|
-
import * as
|
|
8495
|
+
import * as React113 from "react";
|
|
8456
8496
|
import { useMemo as useMemo14, useRef as useRef23, useState as useState14 } from "react";
|
|
8457
8497
|
import {
|
|
8458
8498
|
createPropsResolver as createPropsResolver2,
|
|
@@ -8548,7 +8588,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
8548
8588
|
};
|
|
8549
8589
|
|
|
8550
8590
|
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
8551
|
-
import * as
|
|
8591
|
+
import * as React109 from "react";
|
|
8552
8592
|
import { useBreakpoints as useBreakpoints2 } from "@elementor/editor-responsive";
|
|
8553
8593
|
import {
|
|
8554
8594
|
DesktopIcon,
|
|
@@ -8579,11 +8619,11 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
8579
8619
|
return null;
|
|
8580
8620
|
}
|
|
8581
8621
|
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
8582
|
-
return /* @__PURE__ */
|
|
8622
|
+
return /* @__PURE__ */ React109.createElement(Tooltip4, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React109.createElement(IconComponent, { fontSize: SIZE4, sx: { mt: "2px" } }));
|
|
8583
8623
|
};
|
|
8584
8624
|
|
|
8585
8625
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
8586
|
-
import * as
|
|
8626
|
+
import * as React110 from "react";
|
|
8587
8627
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY3 } from "@elementor/editor-styles-repository";
|
|
8588
8628
|
import { InfoCircleIcon as InfoCircleIcon2 } from "@elementor/icons";
|
|
8589
8629
|
import { Chip as Chip5, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
@@ -8591,8 +8631,8 @@ import { __ as __85 } from "@wordpress/i18n";
|
|
|
8591
8631
|
var SIZE5 = "tiny";
|
|
8592
8632
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
8593
8633
|
const isBaseStyle = provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY3;
|
|
8594
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */
|
|
8595
|
-
return /* @__PURE__ */
|
|
8634
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React110.createElement(Tooltip5, { title: __85("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React110.createElement(InfoCircleIcon2, { fontSize: SIZE5 })) : void 0;
|
|
8635
|
+
return /* @__PURE__ */ React110.createElement(
|
|
8596
8636
|
Chip5,
|
|
8597
8637
|
{
|
|
8598
8638
|
label: displayLabel,
|
|
@@ -8618,10 +8658,10 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
8618
8658
|
};
|
|
8619
8659
|
|
|
8620
8660
|
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
8621
|
-
import * as
|
|
8661
|
+
import * as React111 from "react";
|
|
8622
8662
|
import { Tooltip as Tooltip6, Typography as Typography7 } from "@elementor/ui";
|
|
8623
8663
|
var ValueComponent = ({ index, value }) => {
|
|
8624
|
-
return /* @__PURE__ */
|
|
8664
|
+
return /* @__PURE__ */ React111.createElement(Tooltip6, { title: value, placement: "top" }, /* @__PURE__ */ React111.createElement(
|
|
8625
8665
|
Typography7,
|
|
8626
8666
|
{
|
|
8627
8667
|
variant: "caption",
|
|
@@ -8643,9 +8683,9 @@ var ValueComponent = ({ index, value }) => {
|
|
|
8643
8683
|
};
|
|
8644
8684
|
|
|
8645
8685
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
8646
|
-
import * as
|
|
8686
|
+
import * as React112 from "react";
|
|
8647
8687
|
import { Box as Box11 } from "@elementor/ui";
|
|
8648
|
-
var ActionIcons = () => /* @__PURE__ */
|
|
8688
|
+
var ActionIcons = () => /* @__PURE__ */ React112.createElement(Box11, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
8649
8689
|
|
|
8650
8690
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
8651
8691
|
var SECTION_PADDING_INLINE = 32;
|
|
@@ -8681,7 +8721,7 @@ var StylesInheritanceInfotip = ({
|
|
|
8681
8721
|
});
|
|
8682
8722
|
}, [key, propType]);
|
|
8683
8723
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
8684
|
-
const infotipContent = /* @__PURE__ */
|
|
8724
|
+
const infotipContent = /* @__PURE__ */ React113.createElement(ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React113.createElement(
|
|
8685
8725
|
Card,
|
|
8686
8726
|
{
|
|
8687
8727
|
elevation: 0,
|
|
@@ -8694,7 +8734,7 @@ var StylesInheritanceInfotip = ({
|
|
|
8694
8734
|
flexDirection: "column"
|
|
8695
8735
|
}
|
|
8696
8736
|
},
|
|
8697
|
-
/* @__PURE__ */
|
|
8737
|
+
/* @__PURE__ */ React113.createElement(
|
|
8698
8738
|
Box12,
|
|
8699
8739
|
{
|
|
8700
8740
|
sx: {
|
|
@@ -8704,9 +8744,9 @@ var StylesInheritanceInfotip = ({
|
|
|
8704
8744
|
backgroundColor: "background.paper"
|
|
8705
8745
|
}
|
|
8706
8746
|
},
|
|
8707
|
-
/* @__PURE__ */
|
|
8747
|
+
/* @__PURE__ */ React113.createElement(PopoverHeader3, { title: __86("Style origin", "elementor"), onClose: closeInfotip })
|
|
8708
8748
|
),
|
|
8709
|
-
/* @__PURE__ */
|
|
8749
|
+
/* @__PURE__ */ React113.createElement(
|
|
8710
8750
|
CardContent,
|
|
8711
8751
|
{
|
|
8712
8752
|
sx: {
|
|
@@ -8720,8 +8760,8 @@ var StylesInheritanceInfotip = ({
|
|
|
8720
8760
|
}
|
|
8721
8761
|
}
|
|
8722
8762
|
},
|
|
8723
|
-
/* @__PURE__ */
|
|
8724
|
-
return /* @__PURE__ */
|
|
8763
|
+
/* @__PURE__ */ React113.createElement(Stack22, { gap: 1.5, sx: { pl: 2, pr: 1, pt: 1.5, pb: 1.5 }, role: "list" }, items3.map((item, index) => {
|
|
8764
|
+
return /* @__PURE__ */ React113.createElement(
|
|
8725
8765
|
Box12,
|
|
8726
8766
|
{
|
|
8727
8767
|
key: item.id,
|
|
@@ -8733,26 +8773,26 @@ var StylesInheritanceInfotip = ({
|
|
|
8733
8773
|
item.displayLabel
|
|
8734
8774
|
)
|
|
8735
8775
|
},
|
|
8736
|
-
/* @__PURE__ */
|
|
8776
|
+
/* @__PURE__ */ React113.createElement(
|
|
8737
8777
|
Box12,
|
|
8738
8778
|
{
|
|
8739
8779
|
display: "flex",
|
|
8740
8780
|
gap: 0.5,
|
|
8741
8781
|
sx: { flexWrap: "wrap", width: "100%", alignItems: "flex-start" }
|
|
8742
8782
|
},
|
|
8743
|
-
/* @__PURE__ */
|
|
8744
|
-
/* @__PURE__ */
|
|
8745
|
-
/* @__PURE__ */
|
|
8783
|
+
/* @__PURE__ */ React113.createElement(BreakpointIcon, { breakpoint: item.breakpoint }),
|
|
8784
|
+
/* @__PURE__ */ React113.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }),
|
|
8785
|
+
/* @__PURE__ */ React113.createElement(ValueComponent, { index, value: item.value })
|
|
8746
8786
|
),
|
|
8747
|
-
/* @__PURE__ */
|
|
8787
|
+
/* @__PURE__ */ React113.createElement(ActionIcons, null)
|
|
8748
8788
|
);
|
|
8749
8789
|
}))
|
|
8750
8790
|
)
|
|
8751
8791
|
));
|
|
8752
8792
|
if (isDisabled) {
|
|
8753
|
-
return /* @__PURE__ */
|
|
8793
|
+
return /* @__PURE__ */ React113.createElement(Box12, { sx: { display: "inline-flex" } }, children);
|
|
8754
8794
|
}
|
|
8755
|
-
return /* @__PURE__ */
|
|
8795
|
+
return /* @__PURE__ */ React113.createElement(Box12, { ref: triggerRef, sx: { display: "inline-flex" } }, /* @__PURE__ */ React113.createElement(
|
|
8756
8796
|
TooltipOrInfotip,
|
|
8757
8797
|
{
|
|
8758
8798
|
showInfotip,
|
|
@@ -8760,7 +8800,7 @@ var StylesInheritanceInfotip = ({
|
|
|
8760
8800
|
infotipContent,
|
|
8761
8801
|
isDisabled
|
|
8762
8802
|
},
|
|
8763
|
-
/* @__PURE__ */
|
|
8803
|
+
/* @__PURE__ */ React113.createElement(
|
|
8764
8804
|
IconButton3,
|
|
8765
8805
|
{
|
|
8766
8806
|
onClick: toggleInfotip,
|
|
@@ -8780,10 +8820,10 @@ function TooltipOrInfotip({
|
|
|
8780
8820
|
isDisabled
|
|
8781
8821
|
}) {
|
|
8782
8822
|
if (isDisabled) {
|
|
8783
|
-
return /* @__PURE__ */
|
|
8823
|
+
return /* @__PURE__ */ React113.createElement(Box12, { sx: { display: "inline-flex" } }, children);
|
|
8784
8824
|
}
|
|
8785
8825
|
if (showInfotip) {
|
|
8786
|
-
return /* @__PURE__ */
|
|
8826
|
+
return /* @__PURE__ */ React113.createElement(React113.Fragment, null, /* @__PURE__ */ React113.createElement(
|
|
8787
8827
|
Backdrop,
|
|
8788
8828
|
{
|
|
8789
8829
|
open: showInfotip,
|
|
@@ -8793,7 +8833,7 @@ function TooltipOrInfotip({
|
|
|
8793
8833
|
zIndex: (theme) => theme.zIndex.modal - 1
|
|
8794
8834
|
}
|
|
8795
8835
|
}
|
|
8796
|
-
), /* @__PURE__ */
|
|
8836
|
+
), /* @__PURE__ */ React113.createElement(
|
|
8797
8837
|
Infotip4,
|
|
8798
8838
|
{
|
|
8799
8839
|
placement: "top-end",
|
|
@@ -8805,7 +8845,7 @@ function TooltipOrInfotip({
|
|
|
8805
8845
|
children
|
|
8806
8846
|
));
|
|
8807
8847
|
}
|
|
8808
|
-
return /* @__PURE__ */
|
|
8848
|
+
return /* @__PURE__ */ React113.createElement(Tooltip7, { title: __86("Style origin", "elementor"), placement: "top" }, children);
|
|
8809
8849
|
}
|
|
8810
8850
|
|
|
8811
8851
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
@@ -8818,7 +8858,7 @@ var StylesInheritanceIndicator = ({
|
|
|
8818
8858
|
if (!path || !inheritanceChain.length) {
|
|
8819
8859
|
return null;
|
|
8820
8860
|
}
|
|
8821
|
-
return /* @__PURE__ */
|
|
8861
|
+
return /* @__PURE__ */ React114.createElement(Indicator, { inheritanceChain, path, propType });
|
|
8822
8862
|
};
|
|
8823
8863
|
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
8824
8864
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
@@ -8834,7 +8874,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
8834
8874
|
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
8835
8875
|
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
8836
8876
|
};
|
|
8837
|
-
return /* @__PURE__ */
|
|
8877
|
+
return /* @__PURE__ */ React114.createElement(
|
|
8838
8878
|
StylesInheritanceInfotip,
|
|
8839
8879
|
{
|
|
8840
8880
|
inheritanceChain,
|
|
@@ -8843,7 +8883,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
8843
8883
|
label,
|
|
8844
8884
|
isDisabled
|
|
8845
8885
|
},
|
|
8846
|
-
/* @__PURE__ */
|
|
8886
|
+
/* @__PURE__ */ React114.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
8847
8887
|
);
|
|
8848
8888
|
};
|
|
8849
8889
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
@@ -8878,7 +8918,7 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
8878
8918
|
]);
|
|
8879
8919
|
|
|
8880
8920
|
// src/styles-inheritance/transformers/array-transformer.tsx
|
|
8881
|
-
import * as
|
|
8921
|
+
import * as React115 from "react";
|
|
8882
8922
|
import { createTransformer as createTransformer2 } from "@elementor/editor-canvas";
|
|
8883
8923
|
var arrayTransformer = createTransformer2((values) => {
|
|
8884
8924
|
if (!values || values.length === 0) {
|
|
@@ -8888,16 +8928,16 @@ var arrayTransformer = createTransformer2((values) => {
|
|
|
8888
8928
|
if (allStrings) {
|
|
8889
8929
|
return values.join(" ");
|
|
8890
8930
|
}
|
|
8891
|
-
return /* @__PURE__ */
|
|
8931
|
+
return /* @__PURE__ */ React115.createElement(React115.Fragment, null, values.map((item, index) => /* @__PURE__ */ React115.createElement(React115.Fragment, { key: index }, index > 0 && " ", item)));
|
|
8892
8932
|
});
|
|
8893
8933
|
|
|
8894
8934
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
8895
|
-
import * as
|
|
8935
|
+
import * as React116 from "react";
|
|
8896
8936
|
import { createTransformer as createTransformer3 } from "@elementor/editor-canvas";
|
|
8897
8937
|
import { Stack as Stack23, styled as styled7, UnstableColorIndicator } from "@elementor/ui";
|
|
8898
|
-
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */
|
|
8938
|
+
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React116.createElement(Stack23, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React116.createElement(ItemLabelColor, { value })));
|
|
8899
8939
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
8900
|
-
return /* @__PURE__ */
|
|
8940
|
+
return /* @__PURE__ */ React116.createElement("span", null, color);
|
|
8901
8941
|
};
|
|
8902
8942
|
var StyledUnstableColorIndicator = styled7(UnstableColorIndicator)(({ theme }) => ({
|
|
8903
8943
|
width: "1em",
|
|
@@ -8908,20 +8948,20 @@ var StyledUnstableColorIndicator = styled7(UnstableColorIndicator)(({ theme }) =
|
|
|
8908
8948
|
}));
|
|
8909
8949
|
|
|
8910
8950
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
8911
|
-
import * as
|
|
8951
|
+
import * as React117 from "react";
|
|
8912
8952
|
import { createTransformer as createTransformer4 } from "@elementor/editor-canvas";
|
|
8913
8953
|
import { Stack as Stack24 } from "@elementor/ui";
|
|
8914
8954
|
import { __ as __88 } from "@wordpress/i18n";
|
|
8915
|
-
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */
|
|
8955
|
+
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React117.createElement(Stack24, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React117.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React117.createElement(ItemLabelGradient, { value })));
|
|
8916
8956
|
var ItemIconGradient = ({ value }) => {
|
|
8917
8957
|
const gradient = getGradientValue(value);
|
|
8918
|
-
return /* @__PURE__ */
|
|
8958
|
+
return /* @__PURE__ */ React117.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
8919
8959
|
};
|
|
8920
8960
|
var ItemLabelGradient = ({ value }) => {
|
|
8921
8961
|
if (value.type === "linear") {
|
|
8922
|
-
return /* @__PURE__ */
|
|
8962
|
+
return /* @__PURE__ */ React117.createElement("span", null, __88("Linear gradient", "elementor"));
|
|
8923
8963
|
}
|
|
8924
|
-
return /* @__PURE__ */
|
|
8964
|
+
return /* @__PURE__ */ React117.createElement("span", null, __88("Radial gradient", "elementor"));
|
|
8925
8965
|
};
|
|
8926
8966
|
var getGradientValue = (gradient) => {
|
|
8927
8967
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -8935,15 +8975,15 @@ var getGradientValue = (gradient) => {
|
|
|
8935
8975
|
};
|
|
8936
8976
|
|
|
8937
8977
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
8938
|
-
import * as
|
|
8978
|
+
import * as React118 from "react";
|
|
8939
8979
|
import { createTransformer as createTransformer5 } from "@elementor/editor-canvas";
|
|
8940
8980
|
import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
|
|
8941
8981
|
import { CardMedia, Stack as Stack25 } from "@elementor/ui";
|
|
8942
8982
|
import { useWpMediaAttachment } from "@elementor/wp-media";
|
|
8943
|
-
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */
|
|
8983
|
+
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */ React118.createElement(Stack25, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React118.createElement(ItemIconImage, { value }), /* @__PURE__ */ React118.createElement(ItemLabelImage, { value })));
|
|
8944
8984
|
var ItemIconImage = ({ value }) => {
|
|
8945
8985
|
const { imageUrl } = useImage(value);
|
|
8946
|
-
return /* @__PURE__ */
|
|
8986
|
+
return /* @__PURE__ */ React118.createElement(
|
|
8947
8987
|
CardMedia,
|
|
8948
8988
|
{
|
|
8949
8989
|
image: imageUrl,
|
|
@@ -8959,7 +8999,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
8959
8999
|
};
|
|
8960
9000
|
var ItemLabelImage = ({ value }) => {
|
|
8961
9001
|
const { imageTitle } = useImage(value);
|
|
8962
|
-
return /* @__PURE__ */
|
|
9002
|
+
return /* @__PURE__ */ React118.createElement(EllipsisWithTooltip2, { title: imageTitle }, /* @__PURE__ */ React118.createElement("span", null, imageTitle));
|
|
8963
9003
|
};
|
|
8964
9004
|
var useImage = (image) => {
|
|
8965
9005
|
let imageTitle, imageUrl = null;
|
|
@@ -8984,7 +9024,7 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
8984
9024
|
};
|
|
8985
9025
|
|
|
8986
9026
|
// src/styles-inheritance/transformers/box-shadow-transformer.tsx
|
|
8987
|
-
import * as
|
|
9027
|
+
import * as React119 from "react";
|
|
8988
9028
|
import { createTransformer as createTransformer6 } from "@elementor/editor-canvas";
|
|
8989
9029
|
var boxShadowTransformer = createTransformer6((value) => {
|
|
8990
9030
|
if (!value) {
|
|
@@ -8994,11 +9034,11 @@ var boxShadowTransformer = createTransformer6((value) => {
|
|
|
8994
9034
|
const colorValue = color || "#000000";
|
|
8995
9035
|
const sizes = [hOffset || "0px", vOffset || "0px", blur || "10px", spread || "0px"].join(" ");
|
|
8996
9036
|
const positionValue = position || "outset";
|
|
8997
|
-
return /* @__PURE__ */
|
|
9037
|
+
return /* @__PURE__ */ React119.createElement(React119.Fragment, null, colorValue, " ", positionValue, ", ", sizes);
|
|
8998
9038
|
});
|
|
8999
9039
|
|
|
9000
9040
|
// src/styles-inheritance/transformers/color-transformer.tsx
|
|
9001
|
-
import * as
|
|
9041
|
+
import * as React120 from "react";
|
|
9002
9042
|
import { createTransformer as createTransformer7 } from "@elementor/editor-canvas";
|
|
9003
9043
|
import { Stack as Stack26, styled as styled8, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
9004
9044
|
function isValidCSSColor(value) {
|
|
@@ -9018,7 +9058,7 @@ var colorTransformer = createTransformer7((value) => {
|
|
|
9018
9058
|
if (!isValidCSSColor(value)) {
|
|
9019
9059
|
return value;
|
|
9020
9060
|
}
|
|
9021
|
-
return /* @__PURE__ */
|
|
9061
|
+
return /* @__PURE__ */ React120.createElement(Stack26, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React120.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React120.createElement("span", null, value));
|
|
9022
9062
|
});
|
|
9023
9063
|
|
|
9024
9064
|
// src/styles-inheritance/transformers/repeater-to-items-transformer.tsx
|
|
@@ -9107,6 +9147,46 @@ var blockV1Panel = () => {
|
|
|
9107
9147
|
condition: isAtomicWidgetSelected
|
|
9108
9148
|
});
|
|
9109
9149
|
};
|
|
9150
|
+
|
|
9151
|
+
// src/styles-field-registry.ts
|
|
9152
|
+
var stylesFields = {
|
|
9153
|
+
display: DisplayField,
|
|
9154
|
+
"flex-direction": FlexDirectionField,
|
|
9155
|
+
"justify-content": JustifyContentField,
|
|
9156
|
+
"align-items": AlignItemsField,
|
|
9157
|
+
"align-content": AlignContentField,
|
|
9158
|
+
"flex-wrap": WrapField,
|
|
9159
|
+
gap: GapControlField,
|
|
9160
|
+
"justify-items": GridJustifyItemsField,
|
|
9161
|
+
overflow: OverflowField,
|
|
9162
|
+
"object-fit": ObjectFitField,
|
|
9163
|
+
position: PositionField,
|
|
9164
|
+
"z-index": ZIndexField,
|
|
9165
|
+
"scroll-margin-top": OffsetField,
|
|
9166
|
+
"font-family": FontFamilyField,
|
|
9167
|
+
"font-weight": FontWeightField,
|
|
9168
|
+
"font-size": FontSizeField,
|
|
9169
|
+
"text-align": TextAlignmentField,
|
|
9170
|
+
color: TextColorField,
|
|
9171
|
+
"line-height": LineHeightField,
|
|
9172
|
+
"letter-spacing": LetterSpacingField,
|
|
9173
|
+
"word-spacing": WordSpacingField,
|
|
9174
|
+
"column-count": ColumnCountField,
|
|
9175
|
+
"column-gap": ColumnGapField,
|
|
9176
|
+
"text-decoration": TextDecorationField,
|
|
9177
|
+
"text-transform": TransformField,
|
|
9178
|
+
direction: TextDirectionField,
|
|
9179
|
+
"font-style": FontStyleField,
|
|
9180
|
+
"border-radius": BorderRadiusField,
|
|
9181
|
+
"border-width": BorderWidthField,
|
|
9182
|
+
"border-color": BorderColorField,
|
|
9183
|
+
"border-style": BorderStyleField,
|
|
9184
|
+
"mix-blend-mode": BlendModeField,
|
|
9185
|
+
opacity: OpacityControlField
|
|
9186
|
+
};
|
|
9187
|
+
function getStylesFieldComponent(propKey) {
|
|
9188
|
+
return stylesFields[propKey] ?? null;
|
|
9189
|
+
}
|
|
9110
9190
|
export {
|
|
9111
9191
|
Control as BaseControl,
|
|
9112
9192
|
ClassesPropProvider,
|
|
@@ -9133,8 +9213,10 @@ export {
|
|
|
9133
9213
|
StyleInheritanceProvider,
|
|
9134
9214
|
StyleProvider,
|
|
9135
9215
|
StyleSections,
|
|
9216
|
+
StyleTab,
|
|
9136
9217
|
StyleTabSection,
|
|
9137
9218
|
StyleTabSlot,
|
|
9219
|
+
StylesFieldTargetsProvider,
|
|
9138
9220
|
StylesProviderCannotUpdatePropsError,
|
|
9139
9221
|
SubmenuToggle,
|
|
9140
9222
|
controlsRegistry,
|
|
@@ -9144,8 +9226,11 @@ export {
|
|
|
9144
9226
|
doUnapplyClass,
|
|
9145
9227
|
extractDependencyEffect,
|
|
9146
9228
|
extractOrderedDependencies,
|
|
9229
|
+
getElementClassesProp,
|
|
9230
|
+
getElementLocalStyle,
|
|
9147
9231
|
getElementSettingsWithDefaults,
|
|
9148
9232
|
getFieldIndicators,
|
|
9233
|
+
getStylesFieldComponent,
|
|
9149
9234
|
getSubmenuPromotion,
|
|
9150
9235
|
getSubtitle,
|
|
9151
9236
|
getTitle,
|
|
@@ -9159,6 +9244,7 @@ export {
|
|
|
9159
9244
|
injectIntoSettingsTab,
|
|
9160
9245
|
injectIntoStyleSectionHeader,
|
|
9161
9246
|
injectIntoStyleTab,
|
|
9247
|
+
injectIntoStyleTabContent,
|
|
9162
9248
|
injectIntoStyleTabHeader,
|
|
9163
9249
|
isDynamicPropValue,
|
|
9164
9250
|
registerEditingPanelReplacement,
|