@elementor/editor-editing-panel 1.37.0 → 1.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/index.js +311 -251
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +251 -191
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/components/style-sections/layout-section/display-field.tsx +2 -2
- package/src/components/style-sections/typography-section/column-count-field.tsx +22 -0
- package/src/components/style-sections/typography-section/column-gap-field.tsx +22 -0
- package/src/components/style-sections/typography-section/typography-section.tsx +14 -0
- package/src/contexts/styles-inheritance-context.tsx +25 -20
- package/src/hooks/use-normalized-inheritance-chain-items.tsx +10 -3
- package/src/styles-inheritance/create-styles-inheritance.ts +49 -3
- package/src/styles-inheritance/styles-inheritance-indicator.tsx +14 -9
- package/src/styles-inheritance/styles-inheritance-infotip.tsx +8 -15
- package/src/styles-inheritance/types.ts +5 -0
package/dist/index.mjs
CHANGED
|
@@ -929,7 +929,7 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
929
929
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
930
930
|
|
|
931
931
|
// src/components/editing-panel.tsx
|
|
932
|
-
import * as
|
|
932
|
+
import * as React74 from "react";
|
|
933
933
|
import { ControlActionsProvider, ControlReplacementsProvider } from "@elementor/editor-controls";
|
|
934
934
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
935
935
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
@@ -937,7 +937,7 @@ import { ThemeProvider as ThemeProvider9 } from "@elementor/editor-ui";
|
|
|
937
937
|
import { AtomIcon } from "@elementor/icons";
|
|
938
938
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
939
939
|
import { ErrorBoundary } from "@elementor/ui";
|
|
940
|
-
import { __ as
|
|
940
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
941
941
|
|
|
942
942
|
// src/controls-actions.ts
|
|
943
943
|
import { createMenu } from "@elementor/menus";
|
|
@@ -993,10 +993,10 @@ function EditorPanelErrorFallback() {
|
|
|
993
993
|
}
|
|
994
994
|
|
|
995
995
|
// src/components/editing-panel-tabs.tsx
|
|
996
|
-
import * as
|
|
997
|
-
import { Fragment as
|
|
996
|
+
import * as React73 from "react";
|
|
997
|
+
import { Fragment as Fragment9 } from "react";
|
|
998
998
|
import { Divider as Divider6, Stack as Stack17, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
999
|
-
import { __ as
|
|
999
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
1000
1000
|
|
|
1001
1001
|
// src/contexts/scroll-context.tsx
|
|
1002
1002
|
import * as React10 from "react";
|
|
@@ -1229,13 +1229,13 @@ var Control2 = ({ control }) => {
|
|
|
1229
1229
|
};
|
|
1230
1230
|
|
|
1231
1231
|
// src/components/style-tab.tsx
|
|
1232
|
-
import * as
|
|
1232
|
+
import * as React72 from "react";
|
|
1233
1233
|
import { useState as useState13 } from "react";
|
|
1234
1234
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
1235
1235
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
1236
1236
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
1237
1237
|
import { Divider as Divider5, Stack as Stack16 } from "@elementor/ui";
|
|
1238
|
-
import { __ as
|
|
1238
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
1239
1239
|
|
|
1240
1240
|
// src/contexts/styles-inheritance-context.tsx
|
|
1241
1241
|
import * as React17 from "react";
|
|
@@ -1253,6 +1253,9 @@ var useStylesRerender = () => {
|
|
|
1253
1253
|
useEffect2(() => provider?.subscribe(reRender), [provider]);
|
|
1254
1254
|
};
|
|
1255
1255
|
|
|
1256
|
+
// src/styles-inheritance/create-styles-inheritance.ts
|
|
1257
|
+
import { isEmpty, isTransformable } from "@elementor/editor-props";
|
|
1258
|
+
|
|
1256
1259
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
1257
1260
|
import { filterEmptyValues } from "@elementor/editor-props";
|
|
1258
1261
|
|
|
@@ -1382,7 +1385,20 @@ function mergeSnapshots(snapshots) {
|
|
|
1382
1385
|
function createStylesInheritance(styleDefs, breakpointsRoot) {
|
|
1383
1386
|
const styleVariantsByMeta = buildStyleVariantsByMetaMapping(styleDefs);
|
|
1384
1387
|
const getStyles = ({ breakpoint, state }) => styleVariantsByMeta?.[getBreakpointKey(breakpoint)]?.[getStateKey(state)] ?? [];
|
|
1385
|
-
return
|
|
1388
|
+
return {
|
|
1389
|
+
getSnapshot: createSnapshotsManager(getStyles, breakpointsRoot),
|
|
1390
|
+
getInheritanceChain: (snapshot, path) => {
|
|
1391
|
+
const [field, ...nextFields] = path;
|
|
1392
|
+
let inheritanceChain = snapshot[field] ?? [];
|
|
1393
|
+
if (nextFields.length > 0) {
|
|
1394
|
+
inheritanceChain = inheritanceChain.map(({ value: styleValue, ...rest }) => ({
|
|
1395
|
+
...rest,
|
|
1396
|
+
value: getValueByPath(styleValue, nextFields)
|
|
1397
|
+
})).filter(({ value: styleValue }) => !isEmpty(styleValue));
|
|
1398
|
+
}
|
|
1399
|
+
return inheritanceChain;
|
|
1400
|
+
}
|
|
1401
|
+
};
|
|
1386
1402
|
}
|
|
1387
1403
|
function buildStyleVariantsByMetaMapping(styleDefs) {
|
|
1388
1404
|
const breakpointStateSlots = {};
|
|
@@ -1409,32 +1425,53 @@ function buildStyleVariantsByMetaMapping(styleDefs) {
|
|
|
1409
1425
|
});
|
|
1410
1426
|
return breakpointStateSlots;
|
|
1411
1427
|
}
|
|
1428
|
+
function getValueByPath(value, path) {
|
|
1429
|
+
if (!value || typeof value !== "object") {
|
|
1430
|
+
return null;
|
|
1431
|
+
}
|
|
1432
|
+
return path.reduce((currentScope, key) => {
|
|
1433
|
+
if (!currentScope) {
|
|
1434
|
+
return null;
|
|
1435
|
+
}
|
|
1436
|
+
if (isTransformable(currentScope)) {
|
|
1437
|
+
return currentScope.value?.[key];
|
|
1438
|
+
}
|
|
1439
|
+
if (typeof currentScope === "object") {
|
|
1440
|
+
return currentScope[key];
|
|
1441
|
+
}
|
|
1442
|
+
return null;
|
|
1443
|
+
}, value);
|
|
1444
|
+
}
|
|
1412
1445
|
|
|
1413
1446
|
// src/contexts/styles-inheritance-context.tsx
|
|
1414
1447
|
var Context4 = createContext5(null);
|
|
1415
1448
|
function StyleInheritanceProvider({ children }) {
|
|
1416
1449
|
const styleDefs = useAppliedStyles();
|
|
1417
1450
|
const breakpointsTree = getBreakpointsTree();
|
|
1418
|
-
const getSnapshot = createStylesInheritance(styleDefs, breakpointsTree);
|
|
1419
|
-
return /* @__PURE__ */ React17.createElement(Context4.Provider, { value: { getSnapshot } }, children);
|
|
1451
|
+
const { getSnapshot, getInheritanceChain } = createStylesInheritance(styleDefs, breakpointsTree);
|
|
1452
|
+
return /* @__PURE__ */ React17.createElement(Context4.Provider, { value: { getSnapshot, getInheritanceChain } }, children);
|
|
1420
1453
|
}
|
|
1421
|
-
function
|
|
1454
|
+
function useStylesInheritanceSnapshot() {
|
|
1422
1455
|
const context = useContext5(Context4);
|
|
1423
1456
|
const { meta } = useStyle();
|
|
1424
1457
|
if (!context) {
|
|
1425
|
-
throw new Error("
|
|
1458
|
+
throw new Error("useStylesInheritanceSnapshot must be used within a StyleInheritanceProvider");
|
|
1426
1459
|
}
|
|
1427
1460
|
if (!meta) {
|
|
1428
1461
|
return null;
|
|
1429
1462
|
}
|
|
1430
|
-
|
|
1431
|
-
return fields.reduce(
|
|
1432
|
-
(acc, key) => ({ ...acc, [key]: snapshot?.[key] ?? [] }),
|
|
1433
|
-
{}
|
|
1434
|
-
);
|
|
1463
|
+
return context.getSnapshot(meta) ?? null;
|
|
1435
1464
|
}
|
|
1436
|
-
function
|
|
1437
|
-
|
|
1465
|
+
function useStylesInheritanceChain(path) {
|
|
1466
|
+
const context = useContext5(Context4);
|
|
1467
|
+
if (!context) {
|
|
1468
|
+
throw new Error("useStylesInheritanceChain must be used within a StyleInheritanceProvider");
|
|
1469
|
+
}
|
|
1470
|
+
const snapshot = useStylesInheritanceSnapshot();
|
|
1471
|
+
if (!snapshot) {
|
|
1472
|
+
return [];
|
|
1473
|
+
}
|
|
1474
|
+
return context.getInheritanceChain(snapshot, path);
|
|
1438
1475
|
}
|
|
1439
1476
|
var useAppliedStyles = () => {
|
|
1440
1477
|
const { element } = useElement();
|
|
@@ -1483,7 +1520,7 @@ import { BackgroundControl } from "@elementor/editor-controls";
|
|
|
1483
1520
|
// src/controls-registry/styles-field.tsx
|
|
1484
1521
|
import * as React20 from "react";
|
|
1485
1522
|
import { ControlAdornmentsProvider, PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2 } from "@elementor/editor-controls";
|
|
1486
|
-
import { getStylesSchema
|
|
1523
|
+
import { getStylesSchema } from "@elementor/editor-styles";
|
|
1487
1524
|
|
|
1488
1525
|
// src/hooks/use-styles-fields.ts
|
|
1489
1526
|
import { useMemo as useMemo2 } from "react";
|
|
@@ -1629,6 +1666,7 @@ function useStylesField(propName) {
|
|
|
1629
1666
|
import * as React19 from "react";
|
|
1630
1667
|
import { useState as useState9 } from "react";
|
|
1631
1668
|
import { useBoundProp } from "@elementor/editor-controls";
|
|
1669
|
+
import { isEmpty as isEmpty2 } from "@elementor/editor-props";
|
|
1632
1670
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY, isElementsStylesProvider as isElementsStylesProvider3 } from "@elementor/editor-styles-repository";
|
|
1633
1671
|
import { isExperimentActive as isExperimentActive2 } from "@elementor/editor-v1-adapters";
|
|
1634
1672
|
import { IconButton as IconButton2, Infotip } from "@elementor/ui";
|
|
@@ -1638,7 +1676,6 @@ import { __ as __5 } from "@wordpress/i18n";
|
|
|
1638
1676
|
import * as React18 from "react";
|
|
1639
1677
|
import { useMemo as useMemo3 } from "react";
|
|
1640
1678
|
import { createPropsResolver, styleTransformersRegistry } from "@elementor/editor-canvas";
|
|
1641
|
-
import { getStylesSchema } from "@elementor/editor-styles";
|
|
1642
1679
|
import { Card, CardContent, List as List2, ListItem, ListItemText as ListItemText2 } from "@elementor/ui";
|
|
1643
1680
|
|
|
1644
1681
|
// src/hooks/use-normalized-inheritance-chain-items.tsx
|
|
@@ -1682,15 +1719,15 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
1682
1719
|
};
|
|
1683
1720
|
|
|
1684
1721
|
// src/styles-inheritance/styles-inheritance-infotip.tsx
|
|
1685
|
-
var StyleIndicatorInfotip = ({ inheritanceChain,
|
|
1722
|
+
var StyleIndicatorInfotip = ({ inheritanceChain, propType, path }) => {
|
|
1723
|
+
const key = path.join(".");
|
|
1686
1724
|
const resolve = useMemo3(() => {
|
|
1687
|
-
const stylesSchema = getStylesSchema();
|
|
1688
1725
|
return createPropsResolver({
|
|
1689
1726
|
transformers: styleTransformersRegistry,
|
|
1690
|
-
schema: { [
|
|
1727
|
+
schema: { [key]: propType }
|
|
1691
1728
|
});
|
|
1692
|
-
}, [
|
|
1693
|
-
const items3 = useNormalizedInheritanceChainItems(inheritanceChain,
|
|
1729
|
+
}, [key, propType]);
|
|
1730
|
+
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
1694
1731
|
return /* @__PURE__ */ React18.createElement(Card, { elevation: 0, sx: { maxWidth: 320 } }, /* @__PURE__ */ React18.createElement(CardContent, { sx: { p: 1.5, pb: 2.5 } }, /* @__PURE__ */ React18.createElement(List2, null, items3.map((item) => /* @__PURE__ */ React18.createElement(ListItem, { key: item.id }, /* @__PURE__ */ React18.createElement(
|
|
1695
1732
|
ListItemText2,
|
|
1696
1733
|
{
|
|
@@ -1702,10 +1739,11 @@ var StyleIndicatorInfotip = ({ inheritanceChain, bind }) => {
|
|
|
1702
1739
|
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1703
1740
|
var StylesInheritanceIndicator = () => {
|
|
1704
1741
|
const [open, setOpen] = useState9(false);
|
|
1705
|
-
const { value, path } = useBoundProp();
|
|
1742
|
+
const { value, path, propType } = useBoundProp();
|
|
1706
1743
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
1707
|
-
const
|
|
1708
|
-
const
|
|
1744
|
+
const isUsingNestedProps = isExperimentActive2("e_v_3_30");
|
|
1745
|
+
const finalPath = isUsingNestedProps ? path : path.slice(0, 1);
|
|
1746
|
+
const inheritanceChain = useStylesInheritanceChain(finalPath);
|
|
1709
1747
|
if (!inheritanceChain.length) {
|
|
1710
1748
|
return null;
|
|
1711
1749
|
}
|
|
@@ -1715,7 +1753,7 @@ var StylesInheritanceIndicator = () => {
|
|
|
1715
1753
|
}
|
|
1716
1754
|
const { breakpoint, state } = variant.meta;
|
|
1717
1755
|
const isFinalValue = style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state;
|
|
1718
|
-
const hasValue = value
|
|
1756
|
+
const hasValue = !isEmpty2(value);
|
|
1719
1757
|
const label = getLabel({ isFinalValue, hasValue });
|
|
1720
1758
|
const variantType = getVariant({ isFinalValue, hasValue, currentStyleProvider });
|
|
1721
1759
|
const eIndicationsPopover = isExperimentActive2("e_indications_popover");
|
|
@@ -1727,7 +1765,7 @@ var StylesInheritanceIndicator = () => {
|
|
|
1727
1765
|
Infotip,
|
|
1728
1766
|
{
|
|
1729
1767
|
placement: "top",
|
|
1730
|
-
content: /* @__PURE__ */ React19.createElement(StyleIndicatorInfotip, { inheritanceChain,
|
|
1768
|
+
content: /* @__PURE__ */ React19.createElement(StyleIndicatorInfotip, { inheritanceChain, path: finalPath, propType }),
|
|
1731
1769
|
open,
|
|
1732
1770
|
onClose: () => setOpen(false),
|
|
1733
1771
|
trigger: "manual"
|
|
@@ -1761,7 +1799,7 @@ var getVariant = ({
|
|
|
1761
1799
|
// src/controls-registry/styles-field.tsx
|
|
1762
1800
|
var StylesField = ({ bind, placeholder, children }) => {
|
|
1763
1801
|
const [value, setValue] = useStylesField(bind);
|
|
1764
|
-
const stylesSchema =
|
|
1802
|
+
const stylesSchema = getStylesSchema();
|
|
1765
1803
|
const propType = createTopLevelOjectType({ schema: stylesSchema });
|
|
1766
1804
|
const values = { [bind]: value };
|
|
1767
1805
|
const placeholderValues = { [bind]: placeholder };
|
|
@@ -2358,7 +2396,7 @@ var DisplayField = () => {
|
|
|
2358
2396
|
const placeholder = useDisplayPlaceholderValue();
|
|
2359
2397
|
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React37.createElement(Stack10, { gap: 0.75 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, __14("Display", "elementor")), /* @__PURE__ */ React37.createElement(ToggleControl4, { options: items3, maxItems: 4, fullWidth: true })));
|
|
2360
2398
|
};
|
|
2361
|
-
var useDisplayPlaceholderValue = () =>
|
|
2399
|
+
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
2362
2400
|
|
|
2363
2401
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
2364
2402
|
import * as React38 from "react";
|
|
@@ -2948,21 +2986,40 @@ var SpacingSection = () => {
|
|
|
2948
2986
|
};
|
|
2949
2987
|
|
|
2950
2988
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2951
|
-
import * as
|
|
2989
|
+
import * as React71 from "react";
|
|
2990
|
+
import { isExperimentActive as isExperimentActive6 } from "@elementor/editor-v1-adapters";
|
|
2952
2991
|
|
|
2953
|
-
// src/components/style-sections/typography-section/
|
|
2992
|
+
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
2954
2993
|
import * as React56 from "react";
|
|
2955
|
-
import {
|
|
2994
|
+
import { NumberControl as NumberControl4 } from "@elementor/editor-controls";
|
|
2956
2995
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
2996
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
2997
|
+
var ColumnCountField = () => {
|
|
2998
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "column-count" }, /* @__PURE__ */ React56.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, __32("Columns", "elementor"))), /* @__PURE__ */ React56.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(NumberControl4, { shouldForceInt: true, min: 0, step: 1 }))));
|
|
2999
|
+
};
|
|
3000
|
+
|
|
3001
|
+
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
3002
|
+
import * as React57 from "react";
|
|
3003
|
+
import { SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
3004
|
+
import { Grid as Grid18 } from "@elementor/ui";
|
|
2957
3005
|
import { __ as __33 } from "@wordpress/i18n";
|
|
3006
|
+
var ColumnGapField = () => {
|
|
3007
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "column-gap" }, /* @__PURE__ */ React57.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, __33("Column gap", "elementor"))), /* @__PURE__ */ React57.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(SizeControl6, null))));
|
|
3008
|
+
};
|
|
3009
|
+
|
|
3010
|
+
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3011
|
+
import * as React58 from "react";
|
|
3012
|
+
import { FontFamilyControl } from "@elementor/editor-controls";
|
|
3013
|
+
import { Grid as Grid19 } from "@elementor/ui";
|
|
3014
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
2958
3015
|
|
|
2959
3016
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2960
3017
|
import { useMemo as useMemo5 } from "react";
|
|
2961
|
-
import { __ as
|
|
3018
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
2962
3019
|
var supportedCategories = {
|
|
2963
|
-
system:
|
|
2964
|
-
custom:
|
|
2965
|
-
googlefonts:
|
|
3020
|
+
system: __34("System", "elementor"),
|
|
3021
|
+
custom: __34("Custom Fonts", "elementor"),
|
|
3022
|
+
googlefonts: __34("Google Fonts", "elementor")
|
|
2966
3023
|
};
|
|
2967
3024
|
var getFontFamilies = () => {
|
|
2968
3025
|
const { controls } = getElementorConfig();
|
|
@@ -2999,188 +3056,188 @@ var FontFamilyField = () => {
|
|
|
2999
3056
|
if (fontFamilies.length === 0) {
|
|
3000
3057
|
return null;
|
|
3001
3058
|
}
|
|
3002
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React58.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ControlLabel, null, __35("Font family", "elementor"))), /* @__PURE__ */ React58.createElement(Grid19, { item: true, xs: 6, sx: { minWidth: 0 } }, /* @__PURE__ */ React58.createElement(FontFamilyControl, { fontFamilies }))));
|
|
3003
3060
|
};
|
|
3004
3061
|
|
|
3005
3062
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
3006
|
-
import * as
|
|
3007
|
-
import { SizeControl as
|
|
3008
|
-
import { Grid as
|
|
3009
|
-
import { __ as
|
|
3063
|
+
import * as React59 from "react";
|
|
3064
|
+
import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
3065
|
+
import { Grid as Grid20 } from "@elementor/ui";
|
|
3066
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
3010
3067
|
var FontSizeField = () => {
|
|
3011
|
-
return /* @__PURE__ */
|
|
3068
|
+
return /* @__PURE__ */ React59.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React59.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, __36("Font size", "elementor"))), /* @__PURE__ */ React59.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(SizeControl7, null))));
|
|
3012
3069
|
};
|
|
3013
3070
|
|
|
3014
3071
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
3015
|
-
import * as
|
|
3072
|
+
import * as React60 from "react";
|
|
3016
3073
|
import { ControlFormLabel as ControlFormLabel4, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
3017
3074
|
import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
3018
|
-
import { Grid as
|
|
3019
|
-
import { __ as
|
|
3075
|
+
import { Grid as Grid21 } from "@elementor/ui";
|
|
3076
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
3020
3077
|
var options7 = [
|
|
3021
3078
|
{
|
|
3022
3079
|
value: "normal",
|
|
3023
|
-
label:
|
|
3024
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3080
|
+
label: __37("Normal", "elementor"),
|
|
3081
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(MinusIcon2, { fontSize: size }),
|
|
3025
3082
|
showTooltip: true
|
|
3026
3083
|
},
|
|
3027
3084
|
{
|
|
3028
3085
|
value: "italic",
|
|
3029
|
-
label:
|
|
3030
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3086
|
+
label: __37("Italic", "elementor"),
|
|
3087
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(ItalicIcon, { fontSize: size }),
|
|
3031
3088
|
showTooltip: true
|
|
3032
3089
|
}
|
|
3033
3090
|
];
|
|
3034
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
3091
|
+
var FontStyleField = () => /* @__PURE__ */ React60.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React60.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlFormLabel4, null, __37("Font style", "elementor"))), /* @__PURE__ */ React60.createElement(Grid21, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React60.createElement(ToggleControl9, { options: options7 }))));
|
|
3035
3092
|
|
|
3036
3093
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
3037
|
-
import * as
|
|
3094
|
+
import * as React61 from "react";
|
|
3038
3095
|
import { SelectControl as SelectControl6 } from "@elementor/editor-controls";
|
|
3039
|
-
import { Grid as
|
|
3040
|
-
import { __ as
|
|
3096
|
+
import { Grid as Grid22 } from "@elementor/ui";
|
|
3097
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
3041
3098
|
var fontWeightOptions = [
|
|
3042
|
-
{ value: "100", label:
|
|
3043
|
-
{ value: "200", label:
|
|
3044
|
-
{ value: "300", label:
|
|
3045
|
-
{ value: "400", label:
|
|
3046
|
-
{ value: "500", label:
|
|
3047
|
-
{ value: "600", label:
|
|
3048
|
-
{ value: "700", label:
|
|
3049
|
-
{ value: "800", label:
|
|
3050
|
-
{ value: "900", label:
|
|
3099
|
+
{ value: "100", label: __38("100 - Thin", "elementor") },
|
|
3100
|
+
{ value: "200", label: __38("200 - Extra light", "elementor") },
|
|
3101
|
+
{ value: "300", label: __38("300 - Light", "elementor") },
|
|
3102
|
+
{ value: "400", label: __38("400 - Normal", "elementor") },
|
|
3103
|
+
{ value: "500", label: __38("500 - Medium", "elementor") },
|
|
3104
|
+
{ value: "600", label: __38("600 - Semi bold", "elementor") },
|
|
3105
|
+
{ value: "700", label: __38("700 - Bold", "elementor") },
|
|
3106
|
+
{ value: "800", label: __38("800 - Extra bold", "elementor") },
|
|
3107
|
+
{ value: "900", label: __38("900 - Black", "elementor") }
|
|
3051
3108
|
];
|
|
3052
3109
|
var FontWeightField = () => {
|
|
3053
|
-
return /* @__PURE__ */
|
|
3110
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React61.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel, null, __38("Font weight", "elementor"))), /* @__PURE__ */ React61.createElement(Grid22, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React61.createElement(SelectControl6, { options: fontWeightOptions }))));
|
|
3054
3111
|
};
|
|
3055
3112
|
|
|
3056
3113
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
3057
|
-
import * as
|
|
3058
|
-
import { SizeControl as
|
|
3059
|
-
import { Grid as
|
|
3060
|
-
import { __ as
|
|
3114
|
+
import * as React62 from "react";
|
|
3115
|
+
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
3116
|
+
import { Grid as Grid23 } from "@elementor/ui";
|
|
3117
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
3061
3118
|
var LetterSpacingField = () => {
|
|
3062
|
-
return /* @__PURE__ */
|
|
3119
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React62.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, __39("Letter spacing", "elementor"))), /* @__PURE__ */ React62.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(SizeControl8, null))));
|
|
3063
3120
|
};
|
|
3064
3121
|
|
|
3065
3122
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
3066
|
-
import * as
|
|
3067
|
-
import { SizeControl as
|
|
3068
|
-
import { Grid as
|
|
3069
|
-
import { __ as
|
|
3123
|
+
import * as React63 from "react";
|
|
3124
|
+
import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
|
|
3125
|
+
import { Grid as Grid24 } from "@elementor/ui";
|
|
3126
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
3070
3127
|
var LineHeightField = () => {
|
|
3071
|
-
return /* @__PURE__ */
|
|
3128
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React63.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React63.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, __40("Line height", "elementor"))), /* @__PURE__ */ React63.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(SizeControl9, null))));
|
|
3072
3129
|
};
|
|
3073
3130
|
|
|
3074
3131
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
3075
|
-
import * as
|
|
3132
|
+
import * as React64 from "react";
|
|
3076
3133
|
import { ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
3077
3134
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
3078
|
-
import { Grid as
|
|
3079
|
-
import { __ as
|
|
3135
|
+
import { Grid as Grid25, withDirection as withDirection9 } from "@elementor/ui";
|
|
3136
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
3080
3137
|
var AlignStartIcon = withDirection9(AlignLeftIcon);
|
|
3081
3138
|
var AlignEndIcon = withDirection9(AlignRightIcon);
|
|
3082
3139
|
var options8 = [
|
|
3083
3140
|
{
|
|
3084
3141
|
value: "start",
|
|
3085
|
-
label:
|
|
3086
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3142
|
+
label: __41("Start", "elementor"),
|
|
3143
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(AlignStartIcon, { fontSize: size }),
|
|
3087
3144
|
showTooltip: true
|
|
3088
3145
|
},
|
|
3089
3146
|
{
|
|
3090
3147
|
value: "center",
|
|
3091
|
-
label:
|
|
3092
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3148
|
+
label: __41("Center", "elementor"),
|
|
3149
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(AlignCenterIcon, { fontSize: size }),
|
|
3093
3150
|
showTooltip: true
|
|
3094
3151
|
},
|
|
3095
3152
|
{
|
|
3096
3153
|
value: "end",
|
|
3097
|
-
label:
|
|
3098
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3154
|
+
label: __41("End", "elementor"),
|
|
3155
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(AlignEndIcon, { fontSize: size }),
|
|
3099
3156
|
showTooltip: true
|
|
3100
3157
|
},
|
|
3101
3158
|
{
|
|
3102
3159
|
value: "justify",
|
|
3103
|
-
label:
|
|
3104
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3160
|
+
label: __41("Justify", "elementor"),
|
|
3161
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
3105
3162
|
showTooltip: true
|
|
3106
3163
|
}
|
|
3107
3164
|
];
|
|
3108
3165
|
var TextAlignmentField = () => {
|
|
3109
|
-
return /* @__PURE__ */
|
|
3166
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React64.createElement(Grid25, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React64.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React64.createElement(ControlLabel, null, __41("Text align", "elementor"))), /* @__PURE__ */ React64.createElement(Grid25, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React64.createElement(ToggleControl10, { options: options8 }))));
|
|
3110
3167
|
};
|
|
3111
3168
|
|
|
3112
3169
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3113
|
-
import * as
|
|
3170
|
+
import * as React65 from "react";
|
|
3114
3171
|
import { ColorControl as ColorControl2 } from "@elementor/editor-controls";
|
|
3115
|
-
import { Grid as
|
|
3116
|
-
import { __ as
|
|
3172
|
+
import { Grid as Grid26 } from "@elementor/ui";
|
|
3173
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
3117
3174
|
var TextColorField = () => {
|
|
3118
|
-
return /* @__PURE__ */
|
|
3175
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React65.createElement(Grid26, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React65.createElement(Grid26, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, __42("Text color", "elementor"))), /* @__PURE__ */ React65.createElement(Grid26, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ColorControl2, null))));
|
|
3119
3176
|
};
|
|
3120
3177
|
|
|
3121
3178
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3122
|
-
import * as
|
|
3179
|
+
import * as React66 from "react";
|
|
3123
3180
|
import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
3124
3181
|
import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
3125
|
-
import { Grid as
|
|
3126
|
-
import { __ as
|
|
3182
|
+
import { Grid as Grid27 } from "@elementor/ui";
|
|
3183
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
3127
3184
|
var options9 = [
|
|
3128
3185
|
{
|
|
3129
3186
|
value: "none",
|
|
3130
|
-
label:
|
|
3131
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3187
|
+
label: __43("None", "elementor"),
|
|
3188
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(MinusIcon3, { fontSize: size }),
|
|
3132
3189
|
showTooltip: true,
|
|
3133
3190
|
exclusive: true
|
|
3134
3191
|
},
|
|
3135
3192
|
{
|
|
3136
3193
|
value: "underline",
|
|
3137
|
-
label:
|
|
3138
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3194
|
+
label: __43("Underline", "elementor"),
|
|
3195
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(UnderlineIcon, { fontSize: size }),
|
|
3139
3196
|
showTooltip: true
|
|
3140
3197
|
},
|
|
3141
3198
|
{
|
|
3142
3199
|
value: "line-through",
|
|
3143
|
-
label:
|
|
3144
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3200
|
+
label: __43("Line-through", "elementor"),
|
|
3201
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(StrikethroughIcon, { fontSize: size }),
|
|
3145
3202
|
showTooltip: true
|
|
3146
3203
|
},
|
|
3147
3204
|
{
|
|
3148
3205
|
value: "overline",
|
|
3149
|
-
label:
|
|
3150
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3206
|
+
label: __43("Overline", "elementor"),
|
|
3207
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(OverlineIcon, { fontSize: size }),
|
|
3151
3208
|
showTooltip: true
|
|
3152
3209
|
}
|
|
3153
3210
|
];
|
|
3154
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3211
|
+
var TextDecorationField = () => /* @__PURE__ */ React66.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React66.createElement(Grid27, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React66.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(ControlLabel, null, __43("Line decoration", "elementor"))), /* @__PURE__ */ React66.createElement(Grid27, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React66.createElement(ToggleControl11, { options: options9, exclusive: false }))));
|
|
3155
3212
|
|
|
3156
3213
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3157
|
-
import * as
|
|
3214
|
+
import * as React67 from "react";
|
|
3158
3215
|
import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
3159
3216
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
3160
|
-
import { Grid as
|
|
3161
|
-
import { __ as
|
|
3217
|
+
import { Grid as Grid28 } from "@elementor/ui";
|
|
3218
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
3162
3219
|
var options10 = [
|
|
3163
3220
|
{
|
|
3164
3221
|
value: "ltr",
|
|
3165
|
-
label:
|
|
3166
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3222
|
+
label: __44("Left to right", "elementor"),
|
|
3223
|
+
renderContent: ({ size }) => /* @__PURE__ */ React67.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
3167
3224
|
showTooltip: true
|
|
3168
3225
|
},
|
|
3169
3226
|
{
|
|
3170
3227
|
value: "rtl",
|
|
3171
|
-
label:
|
|
3172
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3228
|
+
label: __44("Right to left", "elementor"),
|
|
3229
|
+
renderContent: ({ size }) => /* @__PURE__ */ React67.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
3173
3230
|
showTooltip: true
|
|
3174
3231
|
}
|
|
3175
3232
|
];
|
|
3176
3233
|
var TextDirectionField = () => {
|
|
3177
|
-
return /* @__PURE__ */
|
|
3234
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React67.createElement(Grid28, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React67.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(ControlLabel, null, __44("Direction", "elementor"))), /* @__PURE__ */ React67.createElement(Grid28, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React67.createElement(ToggleControl12, { options: options10 }))));
|
|
3178
3235
|
};
|
|
3179
3236
|
|
|
3180
3237
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
3181
|
-
import * as
|
|
3238
|
+
import * as React68 from "react";
|
|
3182
3239
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
3183
|
-
import { __ as
|
|
3240
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
3184
3241
|
var initTextStroke = {
|
|
3185
3242
|
$$type: "stroke",
|
|
3186
3243
|
value: {
|
|
@@ -3206,64 +3263,67 @@ var TextStrokeField = () => {
|
|
|
3206
3263
|
setTextStroke(null);
|
|
3207
3264
|
};
|
|
3208
3265
|
const hasTextStroke = Boolean(textStroke);
|
|
3209
|
-
return /* @__PURE__ */
|
|
3266
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React68.createElement(
|
|
3210
3267
|
AddOrRemoveContent,
|
|
3211
3268
|
{
|
|
3212
|
-
label:
|
|
3269
|
+
label: __45("Text stroke", "elementor"),
|
|
3213
3270
|
isAdded: hasTextStroke,
|
|
3214
3271
|
onAdd: addTextStroke,
|
|
3215
3272
|
onRemove: removeTextStroke
|
|
3216
3273
|
},
|
|
3217
|
-
/* @__PURE__ */
|
|
3274
|
+
/* @__PURE__ */ React68.createElement(StrokeControl, null)
|
|
3218
3275
|
));
|
|
3219
3276
|
};
|
|
3220
3277
|
|
|
3221
3278
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
3222
|
-
import * as
|
|
3279
|
+
import * as React69 from "react";
|
|
3223
3280
|
import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
3224
3281
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
3225
|
-
import { Grid as
|
|
3226
|
-
import { __ as
|
|
3282
|
+
import { Grid as Grid29 } from "@elementor/ui";
|
|
3283
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
3227
3284
|
var options11 = [
|
|
3228
3285
|
{
|
|
3229
3286
|
value: "none",
|
|
3230
|
-
label:
|
|
3231
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3287
|
+
label: __46("None", "elementor"),
|
|
3288
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(MinusIcon4, { fontSize: size }),
|
|
3232
3289
|
showTooltip: true
|
|
3233
3290
|
},
|
|
3234
3291
|
{
|
|
3235
3292
|
value: "capitalize",
|
|
3236
|
-
label:
|
|
3237
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3293
|
+
label: __46("Capitalize", "elementor"),
|
|
3294
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(LetterCaseIcon, { fontSize: size }),
|
|
3238
3295
|
showTooltip: true
|
|
3239
3296
|
},
|
|
3240
3297
|
{
|
|
3241
3298
|
value: "uppercase",
|
|
3242
|
-
label:
|
|
3243
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3299
|
+
label: __46("Uppercase", "elementor"),
|
|
3300
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
3244
3301
|
showTooltip: true
|
|
3245
3302
|
},
|
|
3246
3303
|
{
|
|
3247
3304
|
value: "lowercase",
|
|
3248
|
-
label:
|
|
3249
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3305
|
+
label: __46("Lowercase", "elementor"),
|
|
3306
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
3250
3307
|
showTooltip: true
|
|
3251
3308
|
}
|
|
3252
3309
|
];
|
|
3253
|
-
var TransformField = () => /* @__PURE__ */
|
|
3310
|
+
var TransformField = () => /* @__PURE__ */ React69.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React69.createElement(Grid29, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React69.createElement(Grid29, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(ControlLabel, null, __46("Text transform", "elementor"))), /* @__PURE__ */ React69.createElement(Grid29, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React69.createElement(ToggleControl13, { options: options11 }))));
|
|
3254
3311
|
|
|
3255
3312
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
3256
|
-
import * as
|
|
3257
|
-
import { SizeControl as
|
|
3258
|
-
import { Grid as
|
|
3259
|
-
import { __ as
|
|
3313
|
+
import * as React70 from "react";
|
|
3314
|
+
import { SizeControl as SizeControl10 } from "@elementor/editor-controls";
|
|
3315
|
+
import { Grid as Grid30 } from "@elementor/ui";
|
|
3316
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
3260
3317
|
var WordSpacingField = () => {
|
|
3261
|
-
return /* @__PURE__ */
|
|
3318
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React70.createElement(Grid30, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React70.createElement(Grid30, { item: true, xs: 6 }, /* @__PURE__ */ React70.createElement(ControlLabel, null, __47("Word spacing", "elementor"))), /* @__PURE__ */ React70.createElement(Grid30, { item: true, xs: 6 }, /* @__PURE__ */ React70.createElement(SizeControl10, null))));
|
|
3262
3319
|
};
|
|
3263
3320
|
|
|
3264
3321
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3265
3322
|
var TypographySection = () => {
|
|
3266
|
-
|
|
3323
|
+
const [columnCount] = useStylesField("column-count");
|
|
3324
|
+
const isVersion330Active = isExperimentActive6("e_v_3_30");
|
|
3325
|
+
const hasMultiColumns = columnCount?.value && columnCount?.value > 1;
|
|
3326
|
+
return /* @__PURE__ */ React71.createElement(SectionContent, null, /* @__PURE__ */ React71.createElement(FontFamilyField, null), /* @__PURE__ */ React71.createElement(FontWeightField, null), /* @__PURE__ */ React71.createElement(FontSizeField, null), /* @__PURE__ */ React71.createElement(PanelDivider, null), /* @__PURE__ */ React71.createElement(TextAlignmentField, null), /* @__PURE__ */ React71.createElement(TextColorField, null), /* @__PURE__ */ React71.createElement(CollapsibleContent, null, /* @__PURE__ */ React71.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React71.createElement(LineHeightField, null), /* @__PURE__ */ React71.createElement(LetterSpacingField, null), /* @__PURE__ */ React71.createElement(WordSpacingField, null), isVersion330Active && /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(ColumnCountField, null), hasMultiColumns && /* @__PURE__ */ React71.createElement(ColumnGapField, null)), /* @__PURE__ */ React71.createElement(PanelDivider, null), /* @__PURE__ */ React71.createElement(TextDecorationField, null), /* @__PURE__ */ React71.createElement(TransformField, null), /* @__PURE__ */ React71.createElement(TextDirectionField, null), /* @__PURE__ */ React71.createElement(FontStyleField, null), /* @__PURE__ */ React71.createElement(TextStrokeField, null))));
|
|
3267
3327
|
};
|
|
3268
3328
|
|
|
3269
3329
|
// src/components/style-tab.tsx
|
|
@@ -3280,7 +3340,7 @@ var StyleTab = () => {
|
|
|
3280
3340
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
3281
3341
|
const [activeStyleState, setActiveStyleState] = useState13(null);
|
|
3282
3342
|
const breakpoint = useActiveBreakpoint();
|
|
3283
|
-
return /* @__PURE__ */
|
|
3343
|
+
return /* @__PURE__ */ React72.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React72.createElement(
|
|
3284
3344
|
StyleProvider,
|
|
3285
3345
|
{
|
|
3286
3346
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -3291,12 +3351,12 @@ var StyleTab = () => {
|
|
|
3291
3351
|
},
|
|
3292
3352
|
setMetaState: setActiveStyleState
|
|
3293
3353
|
},
|
|
3294
|
-
/* @__PURE__ */
|
|
3354
|
+
/* @__PURE__ */ React72.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React72.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React72.createElement(ClassesHeader, null, /* @__PURE__ */ React72.createElement(CssClassSelector, null), /* @__PURE__ */ React72.createElement(Divider5, null)), /* @__PURE__ */ React72.createElement(SectionsList, null, /* @__PURE__ */ React72.createElement(Section, { title: __48("Layout", "elementor") }, /* @__PURE__ */ React72.createElement(LayoutSection, null)), /* @__PURE__ */ React72.createElement(Section, { title: __48("Spacing", "elementor") }, /* @__PURE__ */ React72.createElement(SpacingSection, null)), /* @__PURE__ */ React72.createElement(Section, { title: __48("Size", "elementor") }, /* @__PURE__ */ React72.createElement(SizeSection, null)), /* @__PURE__ */ React72.createElement(Section, { title: __48("Position", "elementor") }, /* @__PURE__ */ React72.createElement(PositionSection, null)), /* @__PURE__ */ React72.createElement(Section, { title: __48("Typography", "elementor") }, /* @__PURE__ */ React72.createElement(TypographySection, null)), /* @__PURE__ */ React72.createElement(Section, { title: __48("Background", "elementor") }, /* @__PURE__ */ React72.createElement(BackgroundSection, null)), /* @__PURE__ */ React72.createElement(Section, { title: __48("Border", "elementor") }, /* @__PURE__ */ React72.createElement(BorderSection, null)), /* @__PURE__ */ React72.createElement(Section, { title: __48("Effects", "elementor") }, /* @__PURE__ */ React72.createElement(EffectsSection, null)))))
|
|
3295
3355
|
));
|
|
3296
3356
|
};
|
|
3297
3357
|
function ClassesHeader({ children }) {
|
|
3298
3358
|
const scrollDirection = useScrollDirection();
|
|
3299
|
-
return /* @__PURE__ */
|
|
3359
|
+
return /* @__PURE__ */ React72.createElement(Stack16, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
3300
3360
|
}
|
|
3301
3361
|
function useCurrentClassesProp() {
|
|
3302
3362
|
const { elementType } = useElement();
|
|
@@ -3315,14 +3375,14 @@ var EditingPanelTabs = () => {
|
|
|
3315
3375
|
return (
|
|
3316
3376
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
3317
3377
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
3318
|
-
/* @__PURE__ */
|
|
3378
|
+
/* @__PURE__ */ React73.createElement(Fragment9, { key: element.id }, /* @__PURE__ */ React73.createElement(PanelTabContent, null))
|
|
3319
3379
|
);
|
|
3320
3380
|
};
|
|
3321
3381
|
var PanelTabContent = () => {
|
|
3322
3382
|
const defaultComponentTab = "settings";
|
|
3323
3383
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
3324
3384
|
const { getTabProps, getTabPanelProps, getTabsProps } = useTabs(currentTab);
|
|
3325
|
-
return /* @__PURE__ */
|
|
3385
|
+
return /* @__PURE__ */ React73.createElement(ScrollProvider, null, /* @__PURE__ */ React73.createElement(Stack17, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React73.createElement(Stack17, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React73.createElement(
|
|
3326
3386
|
Tabs,
|
|
3327
3387
|
{
|
|
3328
3388
|
variant: "fullWidth",
|
|
@@ -3334,9 +3394,9 @@ var PanelTabContent = () => {
|
|
|
3334
3394
|
setCurrentTab(newValue);
|
|
3335
3395
|
}
|
|
3336
3396
|
},
|
|
3337
|
-
/* @__PURE__ */
|
|
3338
|
-
/* @__PURE__ */
|
|
3339
|
-
), /* @__PURE__ */
|
|
3397
|
+
/* @__PURE__ */ React73.createElement(Tab, { label: __49("General", "elementor"), ...getTabProps("settings") }),
|
|
3398
|
+
/* @__PURE__ */ React73.createElement(Tab, { label: __49("Style", "elementor"), ...getTabProps("style") })
|
|
3399
|
+
), /* @__PURE__ */ React73.createElement(Divider6, null)), /* @__PURE__ */ React73.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React73.createElement(SettingsTab, null)), /* @__PURE__ */ React73.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React73.createElement(StyleTab, null))));
|
|
3340
3400
|
};
|
|
3341
3401
|
|
|
3342
3402
|
// src/components/editing-panel.tsx
|
|
@@ -3348,8 +3408,8 @@ var EditingPanel = () => {
|
|
|
3348
3408
|
if (!element || !elementType) {
|
|
3349
3409
|
return null;
|
|
3350
3410
|
}
|
|
3351
|
-
const panelTitle =
|
|
3352
|
-
return /* @__PURE__ */
|
|
3411
|
+
const panelTitle = __50("Edit %s", "elementor").replace("%s", elementType.title);
|
|
3412
|
+
return /* @__PURE__ */ React74.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React74.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React74.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React74.createElement(ThemeProvider9, null, /* @__PURE__ */ React74.createElement(Panel, null, /* @__PURE__ */ React74.createElement(PanelHeader, null, /* @__PURE__ */ React74.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React74.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React74.createElement(PanelBody, null, /* @__PURE__ */ React74.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React74.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React74.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React74.createElement(EditingPanelTabs, null)))))))));
|
|
3353
3413
|
};
|
|
3354
3414
|
|
|
3355
3415
|
// src/panel.ts
|
|
@@ -3401,7 +3461,7 @@ var EditingPanelHooks = () => {
|
|
|
3401
3461
|
import { settingsTransformersRegistry, styleTransformersRegistry as styleTransformersRegistry2 } from "@elementor/editor-canvas";
|
|
3402
3462
|
|
|
3403
3463
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
3404
|
-
import * as
|
|
3464
|
+
import * as React78 from "react";
|
|
3405
3465
|
import { ControlFormLabel as ControlFormLabel5, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
3406
3466
|
import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
3407
3467
|
import {
|
|
@@ -3409,7 +3469,7 @@ import {
|
|
|
3409
3469
|
bindTrigger as bindTrigger2,
|
|
3410
3470
|
Box as Box5,
|
|
3411
3471
|
Divider as Divider8,
|
|
3412
|
-
Grid as
|
|
3472
|
+
Grid as Grid31,
|
|
3413
3473
|
IconButton as IconButton4,
|
|
3414
3474
|
Paper,
|
|
3415
3475
|
Popover as Popover2,
|
|
@@ -3422,12 +3482,12 @@ import {
|
|
|
3422
3482
|
usePopupState as usePopupState3,
|
|
3423
3483
|
useTabs as useTabs2
|
|
3424
3484
|
} from "@elementor/ui";
|
|
3425
|
-
import { __ as
|
|
3485
|
+
import { __ as __52 } from "@wordpress/i18n";
|
|
3426
3486
|
|
|
3427
3487
|
// src/components/popover-content.tsx
|
|
3428
|
-
import * as
|
|
3488
|
+
import * as React75 from "react";
|
|
3429
3489
|
import { Stack as Stack18 } from "@elementor/ui";
|
|
3430
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
3490
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React75.createElement(Stack18, { alignItems, gap, p }, children);
|
|
3431
3491
|
|
|
3432
3492
|
// src/hooks/use-persist-dynamic-value.ts
|
|
3433
3493
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -3438,7 +3498,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
3438
3498
|
};
|
|
3439
3499
|
|
|
3440
3500
|
// src/dynamics/dynamic-control.tsx
|
|
3441
|
-
import * as
|
|
3501
|
+
import * as React76 from "react";
|
|
3442
3502
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
3443
3503
|
|
|
3444
3504
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
@@ -3469,7 +3529,7 @@ var getAtomicDynamicTags = () => {
|
|
|
3469
3529
|
// src/dynamics/utils.ts
|
|
3470
3530
|
import {
|
|
3471
3531
|
createPropUtils,
|
|
3472
|
-
isTransformable
|
|
3532
|
+
isTransformable as isTransformable2
|
|
3473
3533
|
} from "@elementor/editor-props";
|
|
3474
3534
|
import { z } from "@elementor/schema";
|
|
3475
3535
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
@@ -3479,7 +3539,7 @@ var getDynamicPropType = (propType) => {
|
|
|
3479
3539
|
return dynamicPropType && isDynamicPropType(dynamicPropType) ? dynamicPropType : null;
|
|
3480
3540
|
};
|
|
3481
3541
|
var isDynamicPropValue = (prop) => {
|
|
3482
|
-
return
|
|
3542
|
+
return isTransformable2(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
|
|
3483
3543
|
};
|
|
3484
3544
|
var supportsDynamic = (propType) => {
|
|
3485
3545
|
return !!getDynamicPropType(propType);
|
|
@@ -3540,12 +3600,12 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
3540
3600
|
});
|
|
3541
3601
|
};
|
|
3542
3602
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
3543
|
-
return /* @__PURE__ */
|
|
3603
|
+
return /* @__PURE__ */ React76.createElement(PropProvider3, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React76.createElement(PropKeyProvider3, { bind }, children));
|
|
3544
3604
|
};
|
|
3545
3605
|
|
|
3546
3606
|
// src/dynamics/components/dynamic-selection.tsx
|
|
3547
|
-
import * as
|
|
3548
|
-
import { Fragment as
|
|
3607
|
+
import * as React77 from "react";
|
|
3608
|
+
import { Fragment as Fragment10, useState as useState14 } from "react";
|
|
3549
3609
|
import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
3550
3610
|
import { DatabaseIcon, SearchIcon } from "@elementor/icons";
|
|
3551
3611
|
import {
|
|
@@ -3560,7 +3620,7 @@ import {
|
|
|
3560
3620
|
TextField as TextField2,
|
|
3561
3621
|
Typography as Typography4
|
|
3562
3622
|
} from "@elementor/ui";
|
|
3563
|
-
import { __ as
|
|
3623
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
3564
3624
|
var SIZE3 = "tiny";
|
|
3565
3625
|
var DynamicSelection = ({ onSelect }) => {
|
|
3566
3626
|
const [searchValue, setSearchValue] = useState14("");
|
|
@@ -3581,19 +3641,19 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3581
3641
|
setValue({ name: value, settings: { label } });
|
|
3582
3642
|
onSelect?.();
|
|
3583
3643
|
};
|
|
3584
|
-
return /* @__PURE__ */
|
|
3644
|
+
return /* @__PURE__ */ React77.createElement(Stack19, null, hasNoDynamicTags ? /* @__PURE__ */ React77.createElement(NoDynamicTags, null) : /* @__PURE__ */ React77.createElement(Fragment10, null, /* @__PURE__ */ React77.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React77.createElement(
|
|
3585
3645
|
TextField2,
|
|
3586
3646
|
{
|
|
3587
3647
|
fullWidth: true,
|
|
3588
3648
|
size: SIZE3,
|
|
3589
3649
|
value: searchValue,
|
|
3590
3650
|
onChange: handleSearch,
|
|
3591
|
-
placeholder:
|
|
3651
|
+
placeholder: __51("Search dynamic tags\u2026", "elementor"),
|
|
3592
3652
|
InputProps: {
|
|
3593
|
-
startAdornment: /* @__PURE__ */
|
|
3653
|
+
startAdornment: /* @__PURE__ */ React77.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React77.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
3594
3654
|
}
|
|
3595
3655
|
}
|
|
3596
|
-
)), /* @__PURE__ */
|
|
3656
|
+
)), /* @__PURE__ */ React77.createElement(Divider7, null), /* @__PURE__ */ React77.createElement(Box4, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React77.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React77.createElement(Fragment10, { key: index }, /* @__PURE__ */ React77.createElement(
|
|
3597
3657
|
MenuSubheader2,
|
|
3598
3658
|
{
|
|
3599
3659
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
@@ -3601,7 +3661,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3601
3661
|
dynamicGroups?.[category]?.title || category
|
|
3602
3662
|
), items3.map(({ value, label: tagLabel }) => {
|
|
3603
3663
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
3604
|
-
return /* @__PURE__ */
|
|
3664
|
+
return /* @__PURE__ */ React77.createElement(
|
|
3605
3665
|
MenuItem,
|
|
3606
3666
|
{
|
|
3607
3667
|
key: value,
|
|
@@ -3612,9 +3672,9 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3612
3672
|
},
|
|
3613
3673
|
tagLabel
|
|
3614
3674
|
);
|
|
3615
|
-
})))) : /* @__PURE__ */
|
|
3675
|
+
})))) : /* @__PURE__ */ React77.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
3616
3676
|
};
|
|
3617
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
3677
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React77.createElement(
|
|
3618
3678
|
Stack19,
|
|
3619
3679
|
{
|
|
3620
3680
|
gap: 1,
|
|
@@ -3625,11 +3685,11 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React75.createElem
|
|
|
3625
3685
|
color: "text.secondary",
|
|
3626
3686
|
sx: { pb: 3.5 }
|
|
3627
3687
|
},
|
|
3628
|
-
/* @__PURE__ */
|
|
3629
|
-
/* @__PURE__ */
|
|
3630
|
-
/* @__PURE__ */
|
|
3688
|
+
/* @__PURE__ */ React77.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
3689
|
+
/* @__PURE__ */ React77.createElement(Typography4, { align: "center", variant: "subtitle2" }, __51("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React77.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
3690
|
+
/* @__PURE__ */ React77.createElement(Typography4, { align: "center", variant: "caption" }, __51("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React77.createElement(Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __51("Clear & try again", "elementor")))
|
|
3631
3691
|
);
|
|
3632
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
3692
|
+
var NoDynamicTags = () => /* @__PURE__ */ React77.createElement(Box4, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React77.createElement(Divider7, null), /* @__PURE__ */ React77.createElement(
|
|
3633
3693
|
Stack19,
|
|
3634
3694
|
{
|
|
3635
3695
|
gap: 1,
|
|
@@ -3640,9 +3700,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React75.createElement(Box4, { sx: { ov
|
|
|
3640
3700
|
color: "text.secondary",
|
|
3641
3701
|
sx: { pb: 3.5 }
|
|
3642
3702
|
},
|
|
3643
|
-
/* @__PURE__ */
|
|
3644
|
-
/* @__PURE__ */
|
|
3645
|
-
/* @__PURE__ */
|
|
3703
|
+
/* @__PURE__ */ React77.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
3704
|
+
/* @__PURE__ */ React77.createElement(Typography4, { align: "center", variant: "subtitle2" }, __51("Streamline your workflow with dynamic tags", "elementor")),
|
|
3705
|
+
/* @__PURE__ */ React77.createElement(Typography4, { align: "center", variant: "caption" }, __51("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
3646
3706
|
));
|
|
3647
3707
|
var useFilteredOptions = (searchValue) => {
|
|
3648
3708
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -3675,25 +3735,25 @@ var DynamicSelectionControl = () => {
|
|
|
3675
3735
|
if (!dynamicTag) {
|
|
3676
3736
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
3677
3737
|
}
|
|
3678
|
-
return /* @__PURE__ */
|
|
3738
|
+
return /* @__PURE__ */ React78.createElement(Box5, null, /* @__PURE__ */ React78.createElement(
|
|
3679
3739
|
Tag,
|
|
3680
3740
|
{
|
|
3681
3741
|
fullWidth: true,
|
|
3682
3742
|
showActionsOnHover: true,
|
|
3683
3743
|
label: dynamicTag.label,
|
|
3684
|
-
startIcon: /* @__PURE__ */
|
|
3744
|
+
startIcon: /* @__PURE__ */ React78.createElement(DatabaseIcon2, { fontSize: SIZE4 }),
|
|
3685
3745
|
...bindTrigger2(selectionPopoverState),
|
|
3686
|
-
actions: /* @__PURE__ */
|
|
3746
|
+
actions: /* @__PURE__ */ React78.createElement(React78.Fragment, null, /* @__PURE__ */ React78.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React78.createElement(
|
|
3687
3747
|
IconButton4,
|
|
3688
3748
|
{
|
|
3689
3749
|
size: SIZE4,
|
|
3690
3750
|
onClick: removeDynamicTag,
|
|
3691
|
-
"aria-label":
|
|
3751
|
+
"aria-label": __52("Remove dynamic value", "elementor")
|
|
3692
3752
|
},
|
|
3693
|
-
/* @__PURE__ */
|
|
3753
|
+
/* @__PURE__ */ React78.createElement(XIcon2, { fontSize: SIZE4 })
|
|
3694
3754
|
))
|
|
3695
3755
|
}
|
|
3696
|
-
), /* @__PURE__ */
|
|
3756
|
+
), /* @__PURE__ */ React78.createElement(
|
|
3697
3757
|
Popover2,
|
|
3698
3758
|
{
|
|
3699
3759
|
disablePortal: true,
|
|
@@ -3701,7 +3761,7 @@ var DynamicSelectionControl = () => {
|
|
|
3701
3761
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
3702
3762
|
...bindPopover2(selectionPopoverState)
|
|
3703
3763
|
},
|
|
3704
|
-
/* @__PURE__ */
|
|
3764
|
+
/* @__PURE__ */ React78.createElement(Stack20, null, /* @__PURE__ */ React78.createElement(Stack20, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React78.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React78.createElement(Typography5, { variant: "subtitle2" }, __52("Dynamic tags", "elementor")), /* @__PURE__ */ React78.createElement(IconButton4, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React78.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React78.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
3705
3765
|
));
|
|
3706
3766
|
};
|
|
3707
3767
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -3710,7 +3770,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
3710
3770
|
if (!hasDynamicSettings) {
|
|
3711
3771
|
return null;
|
|
3712
3772
|
}
|
|
3713
|
-
return /* @__PURE__ */
|
|
3773
|
+
return /* @__PURE__ */ React78.createElement(React78.Fragment, null, /* @__PURE__ */ React78.createElement(IconButton4, { size: SIZE4, ...bindTrigger2(popupState), "aria-label": __52("Settings", "elementor") }, /* @__PURE__ */ React78.createElement(SettingsIcon, { fontSize: SIZE4 })), /* @__PURE__ */ React78.createElement(
|
|
3714
3774
|
Popover2,
|
|
3715
3775
|
{
|
|
3716
3776
|
disablePortal: true,
|
|
@@ -3718,7 +3778,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
3718
3778
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
3719
3779
|
...bindPopover2(popupState)
|
|
3720
3780
|
},
|
|
3721
|
-
/* @__PURE__ */
|
|
3781
|
+
/* @__PURE__ */ React78.createElement(Paper, { component: Stack20, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React78.createElement(Stack20, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React78.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React78.createElement(Typography5, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React78.createElement(IconButton4, { sx: { ml: "auto" }, size: SIZE4, onClick: popupState.close }, /* @__PURE__ */ React78.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React78.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
3722
3782
|
));
|
|
3723
3783
|
};
|
|
3724
3784
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -3727,10 +3787,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
3727
3787
|
if (!tabs.length) {
|
|
3728
3788
|
return null;
|
|
3729
3789
|
}
|
|
3730
|
-
return /* @__PURE__ */
|
|
3731
|
-
return /* @__PURE__ */
|
|
3790
|
+
return /* @__PURE__ */ React78.createElement(React78.Fragment, null, /* @__PURE__ */ React78.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React78.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React78.createElement(Divider8, null), tabs.map(({ value }, index) => {
|
|
3791
|
+
return /* @__PURE__ */ React78.createElement(TabPanel2, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React78.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
3732
3792
|
if (item.type === "control") {
|
|
3733
|
-
return /* @__PURE__ */
|
|
3793
|
+
return /* @__PURE__ */ React78.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
3734
3794
|
}
|
|
3735
3795
|
return null;
|
|
3736
3796
|
})));
|
|
@@ -3740,12 +3800,12 @@ var Control3 = ({ control }) => {
|
|
|
3740
3800
|
if (!getControl(control.type)) {
|
|
3741
3801
|
return null;
|
|
3742
3802
|
}
|
|
3743
|
-
return /* @__PURE__ */
|
|
3803
|
+
return /* @__PURE__ */ React78.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React78.createElement(Grid31, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React78.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React78.createElement(ControlFormLabel5, null, control.label)) : null, /* @__PURE__ */ React78.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React78.createElement(Control, { type: control.type, props: control.props }))));
|
|
3744
3804
|
};
|
|
3745
3805
|
|
|
3746
3806
|
// src/dynamics/dynamic-transformer.ts
|
|
3747
3807
|
import { createTransformer } from "@elementor/editor-canvas";
|
|
3748
|
-
import { isTransformable as
|
|
3808
|
+
import { isTransformable as isTransformable3 } from "@elementor/editor-props";
|
|
3749
3809
|
|
|
3750
3810
|
// src/dynamics/errors.ts
|
|
3751
3811
|
import { createError as createError2 } from "@elementor/utils";
|
|
@@ -3763,7 +3823,7 @@ var dynamicTransformer = createTransformer((value) => {
|
|
|
3763
3823
|
});
|
|
3764
3824
|
function simpleTransform(props) {
|
|
3765
3825
|
const transformed = Object.entries(props).map(([settingKey, settingValue]) => {
|
|
3766
|
-
const value =
|
|
3826
|
+
const value = isTransformable3(settingValue) ? settingValue.value : settingValue;
|
|
3767
3827
|
return [settingKey, value];
|
|
3768
3828
|
});
|
|
3769
3829
|
return Object.fromEntries(transformed);
|
|
@@ -3793,18 +3853,18 @@ function getDynamicValue(name, settings) {
|
|
|
3793
3853
|
}
|
|
3794
3854
|
|
|
3795
3855
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
3796
|
-
import * as
|
|
3856
|
+
import * as React79 from "react";
|
|
3797
3857
|
import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
3798
3858
|
import { DatabaseIcon as DatabaseIcon3 } from "@elementor/icons";
|
|
3799
|
-
import { __ as
|
|
3859
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
3800
3860
|
var usePropDynamicAction = () => {
|
|
3801
3861
|
const { propType } = useBoundProp6();
|
|
3802
3862
|
const visible = !!propType && supportsDynamic(propType);
|
|
3803
3863
|
return {
|
|
3804
3864
|
visible,
|
|
3805
3865
|
icon: DatabaseIcon3,
|
|
3806
|
-
title:
|
|
3807
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
3866
|
+
title: __53("Dynamic tags", "elementor"),
|
|
3867
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React79.createElement(DynamicSelection, { onSelect: closePopover })
|
|
3808
3868
|
};
|
|
3809
3869
|
};
|
|
3810
3870
|
|