@elementor/editor-editing-panel 1.46.0 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +85 -0
- package/dist/index.d.mts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +1094 -889
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +979 -780
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -18
- package/src/components/popover-scrollable-content.tsx +12 -0
- package/src/components/section-content.tsx +6 -16
- package/src/components/section.tsx +8 -4
- package/src/components/settings-tab.tsx +5 -2
- package/src/components/style-sections/background-section/background-section.tsx +4 -1
- package/src/components/style-sections/border-section/border-color-field.tsx +10 -16
- package/src/components/style-sections/border-section/border-field.tsx +14 -7
- package/src/components/style-sections/border-section/border-radius-field.tsx +4 -2
- package/src/components/style-sections/border-section/border-style-field.tsx +11 -16
- package/src/components/style-sections/border-section/border-width-field.tsx +4 -2
- package/src/components/style-sections/effects-section/effects-section.tsx +29 -6
- package/src/components/style-sections/layout-section/align-content-field.tsx +11 -12
- package/src/components/style-sections/layout-section/align-items-field.tsx +8 -11
- package/src/components/style-sections/layout-section/align-self-child-field.tsx +11 -16
- package/src/components/style-sections/layout-section/display-field.tsx +6 -6
- package/src/components/style-sections/layout-section/flex-direction-field.tsx +11 -14
- package/src/components/style-sections/layout-section/flex-order-field.tsx +23 -20
- package/src/components/style-sections/layout-section/flex-size-field.tsx +42 -64
- package/src/components/style-sections/layout-section/gap-control-field.tsx +5 -6
- package/src/components/style-sections/layout-section/justify-content-field.tsx +11 -12
- package/src/components/style-sections/layout-section/layout-section.tsx +9 -2
- package/src/components/style-sections/layout-section/opacity-control-field.tsx +9 -13
- package/src/components/style-sections/layout-section/utils/rotated-icon.tsx +6 -1
- package/src/components/style-sections/layout-section/wrap-field.tsx +10 -14
- package/src/components/style-sections/position-section/dimensions-field.tsx +4 -4
- package/src/components/style-sections/position-section/offset-field.tsx +12 -14
- package/src/components/style-sections/position-section/position-field.tsx +7 -11
- package/src/components/style-sections/position-section/position-section.tsx +19 -8
- package/src/components/style-sections/position-section/z-index-field.tsx +7 -11
- package/src/components/style-sections/size-section/object-fit-field.tsx +7 -11
- package/src/components/style-sections/size-section/object-position-field.tsx +4 -1
- package/src/components/style-sections/size-section/overflow-field.tsx +7 -11
- package/src/components/style-sections/size-section/size-section.tsx +13 -8
- package/src/components/style-sections/spacing-section/spacing-section.tsx +7 -4
- package/src/components/style-sections/typography-section/column-count-field.tsx +7 -11
- package/src/components/style-sections/typography-section/column-gap-field.tsx +9 -13
- package/src/components/style-sections/typography-section/font-family-field.tsx +9 -11
- package/src/components/style-sections/typography-section/font-size-field.tsx +9 -13
- package/src/components/style-sections/typography-section/font-style-field.tsx +13 -13
- package/src/components/style-sections/typography-section/font-weight-field.tsx +7 -11
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +9 -13
- package/src/components/style-sections/typography-section/line-height-field.tsx +9 -13
- package/src/components/style-sections/typography-section/text-alignment-field.tsx +11 -14
- package/src/components/style-sections/typography-section/text-color-field.tsx +7 -11
- package/src/components/style-sections/typography-section/text-decoration-field.tsx +7 -11
- package/src/components/style-sections/typography-section/text-direction-field.tsx +7 -11
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +7 -3
- package/src/components/style-sections/typography-section/transform-field.tsx +7 -11
- package/src/components/style-sections/typography-section/typography-section.tsx +6 -1
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +9 -13
- package/src/components/style-tab.tsx +1 -1
- package/src/components/styles-field-layout.tsx +50 -0
- package/src/contexts/section-context.tsx +14 -0
- package/src/controls-registry/control-type-container.tsx +6 -2
- package/src/controls-registry/controls-registry.tsx +1 -1
- package/src/controls-registry/settings-field.tsx +85 -10
- package/src/controls-registry/styles-field.tsx +15 -5
- package/src/dynamics/components/dynamic-selection-control.tsx +10 -4
- package/src/dynamics/components/dynamic-selection.tsx +18 -14
- package/src/hooks/use-default-panel-settings.ts +4 -0
- package/src/hooks/use-styles-field.ts +3 -4
- package/src/hooks/use-styles-fields.ts +141 -73
- package/src/index.ts +4 -0
- package/src/init.ts +0 -6
- package/src/popover-action.tsx +8 -1
- package/src/styles-inheritance/components/styles-inheritance-indicator.tsx +4 -1
- package/src/styles-inheritance/components/styles-inheritance-infotip.tsx +9 -19
- package/src/sync/experiments-flags.ts +1 -0
- package/src/components/popover-content.tsx +0 -15
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
// src/sync/experiments-flags.ts
|
|
2
|
+
var EXPERIMENTAL_FEATURES = {
|
|
3
|
+
V_3_30: "e_v_3_30",
|
|
4
|
+
V_3_31: "e_v_3_31"
|
|
5
|
+
};
|
|
6
|
+
|
|
1
7
|
// src/index.ts
|
|
2
8
|
import { useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
3
9
|
|
|
@@ -539,13 +545,6 @@ import { classesPropTypeUtil } from "@elementor/editor-props";
|
|
|
539
545
|
import { useGetStylesRepositoryCreateAction } from "@elementor/editor-styles-repository";
|
|
540
546
|
import { isExperimentActive, undoable } from "@elementor/editor-v1-adapters";
|
|
541
547
|
import { __ } from "@wordpress/i18n";
|
|
542
|
-
|
|
543
|
-
// src/sync/experiments-flags.ts
|
|
544
|
-
var EXPERIMENTAL_FEATURES = {
|
|
545
|
-
V_3_30: "e_v_3_30"
|
|
546
|
-
};
|
|
547
|
-
|
|
548
|
-
// src/components/css-classes/use-apply-and-unapply-class.ts
|
|
549
548
|
function useApplyClass() {
|
|
550
549
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
551
550
|
const { element } = useElement();
|
|
@@ -1168,7 +1167,7 @@ function useHandleSelect() {
|
|
|
1168
1167
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
1169
1168
|
|
|
1170
1169
|
// src/components/editing-panel.tsx
|
|
1171
|
-
import * as
|
|
1170
|
+
import * as React86 from "react";
|
|
1172
1171
|
import { ControlActionsProvider, ControlReplacementsProvider } from "@elementor/editor-controls";
|
|
1173
1172
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
1174
1173
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
@@ -1176,7 +1175,7 @@ import { ThemeProvider as ThemeProvider2 } from "@elementor/editor-ui";
|
|
|
1176
1175
|
import { AtomIcon } from "@elementor/icons";
|
|
1177
1176
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
1178
1177
|
import { ErrorBoundary } from "@elementor/ui";
|
|
1179
|
-
import { __ as
|
|
1178
|
+
import { __ as __62 } from "@wordpress/i18n";
|
|
1180
1179
|
|
|
1181
1180
|
// src/controls-actions.ts
|
|
1182
1181
|
import { createMenu } from "@elementor/menus";
|
|
@@ -1201,7 +1200,7 @@ function PopoverAction({
|
|
|
1201
1200
|
title,
|
|
1202
1201
|
visible = true,
|
|
1203
1202
|
icon: Icon,
|
|
1204
|
-
content:
|
|
1203
|
+
content: PopoverContent
|
|
1205
1204
|
}) {
|
|
1206
1205
|
const id = useId2();
|
|
1207
1206
|
const popupState = usePopupState2({
|
|
@@ -1218,11 +1217,18 @@ function PopoverAction({
|
|
|
1218
1217
|
disableScrollLock: true,
|
|
1219
1218
|
anchorOrigin: {
|
|
1220
1219
|
vertical: "bottom",
|
|
1221
|
-
horizontal: "
|
|
1220
|
+
horizontal: "right"
|
|
1221
|
+
},
|
|
1222
|
+
transformOrigin: {
|
|
1223
|
+
vertical: "top",
|
|
1224
|
+
horizontal: "right"
|
|
1225
|
+
},
|
|
1226
|
+
PaperProps: {
|
|
1227
|
+
sx: { my: 2.5 }
|
|
1222
1228
|
},
|
|
1223
1229
|
...bindPopover(popupState)
|
|
1224
1230
|
},
|
|
1225
|
-
/* @__PURE__ */ React10.createElement(
|
|
1231
|
+
/* @__PURE__ */ React10.createElement(PopoverContent, { close: popupState.close })
|
|
1226
1232
|
));
|
|
1227
1233
|
}
|
|
1228
1234
|
|
|
@@ -1242,11 +1248,11 @@ function EditorPanelErrorFallback() {
|
|
|
1242
1248
|
}
|
|
1243
1249
|
|
|
1244
1250
|
// src/components/editing-panel-tabs.tsx
|
|
1245
|
-
import * as
|
|
1246
|
-
import { Fragment as
|
|
1247
|
-
import { isExperimentActive as
|
|
1248
|
-
import { Divider as Divider6, Stack as
|
|
1249
|
-
import { __ as
|
|
1251
|
+
import * as React85 from "react";
|
|
1252
|
+
import { Fragment as Fragment10 } from "react";
|
|
1253
|
+
import { isExperimentActive as isExperimentActive17 } from "@elementor/editor-v1-adapters";
|
|
1254
|
+
import { Divider as Divider6, Stack as Stack15, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
1255
|
+
import { __ as __61 } from "@wordpress/i18n";
|
|
1250
1256
|
|
|
1251
1257
|
// src/contexts/scroll-context.tsx
|
|
1252
1258
|
import * as React12 from "react";
|
|
@@ -1304,6 +1310,10 @@ var defaultPanelSettingsContext = createContext6({
|
|
|
1304
1310
|
"e-flexbox": {
|
|
1305
1311
|
defaultSectionsExpanded: fallbackEditorSettings.defaultSectionsExpanded,
|
|
1306
1312
|
defaultTab: "style"
|
|
1313
|
+
},
|
|
1314
|
+
"e-divider": {
|
|
1315
|
+
defaultSectionsExpanded: fallbackEditorSettings.defaultSectionsExpanded,
|
|
1316
|
+
defaultTab: "style"
|
|
1307
1317
|
}
|
|
1308
1318
|
});
|
|
1309
1319
|
var useDefaultPanelSettings = () => {
|
|
@@ -1332,7 +1342,7 @@ var useStateByElement = (key, initialValue) => {
|
|
|
1332
1342
|
// src/components/settings-tab.tsx
|
|
1333
1343
|
import * as React19 from "react";
|
|
1334
1344
|
import { ControlFormLabel } from "@elementor/editor-controls";
|
|
1335
|
-
import { isExperimentActive as
|
|
1345
|
+
import { isExperimentActive as isExperimentActive5 } from "@elementor/editor-v1-adapters";
|
|
1336
1346
|
import { SessionStorageProvider } from "@elementor/session";
|
|
1337
1347
|
import { Divider as Divider3 } from "@elementor/ui";
|
|
1338
1348
|
|
|
@@ -1369,7 +1379,7 @@ var controlTypes = {
|
|
|
1369
1379
|
textarea: { component: TextAreaControl, layout: "full", propTypeUtil: stringPropTypeUtil },
|
|
1370
1380
|
size: { component: SizeControl, layout: "two-columns", propTypeUtil: sizePropTypeUtil },
|
|
1371
1381
|
select: { component: SelectControl, layout: "two-columns", propTypeUtil: stringPropTypeUtil },
|
|
1372
|
-
link: { component: LinkControl, layout: "
|
|
1382
|
+
link: { component: LinkControl, layout: "custom", propTypeUtil: linkPropTypeUtil },
|
|
1373
1383
|
url: { component: UrlControl, layout: "full", propTypeUtil: stringPropTypeUtil },
|
|
1374
1384
|
switch: { component: SwitchControl, layout: "two-columns", propTypeUtil: booleanPropTypeUtil },
|
|
1375
1385
|
repeatable: { component: RepeatableControl, layout: "full", propTypeUtil: void 0 },
|
|
@@ -1395,6 +1405,9 @@ var Control = ({ props, type }) => {
|
|
|
1395
1405
|
import * as React14 from "react";
|
|
1396
1406
|
import { Box as Box4, styled as styled4 } from "@elementor/ui";
|
|
1397
1407
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
1408
|
+
if (layout === "custom") {
|
|
1409
|
+
return children;
|
|
1410
|
+
}
|
|
1398
1411
|
return /* @__PURE__ */ React14.createElement(StyledContainer, { layout }, children);
|
|
1399
1412
|
};
|
|
1400
1413
|
var StyledContainer = styled4(Box4, {
|
|
@@ -1414,8 +1427,18 @@ var getGridLayout = (layout) => ({
|
|
|
1414
1427
|
|
|
1415
1428
|
// src/controls-registry/settings-field.tsx
|
|
1416
1429
|
import * as React15 from "react";
|
|
1430
|
+
import { useMemo as useMemo3 } from "react";
|
|
1417
1431
|
import { PropKeyProvider, PropProvider } from "@elementor/editor-controls";
|
|
1418
|
-
import {
|
|
1432
|
+
import { setDocumentModifiedStatus as setDocumentModifiedStatus2 } from "@elementor/editor-documents";
|
|
1433
|
+
import {
|
|
1434
|
+
getElementLabel as getElementLabel2,
|
|
1435
|
+
getElementSetting as getElementSetting2,
|
|
1436
|
+
updateElementSettings as updateElementSettings2,
|
|
1437
|
+
useElementSettings
|
|
1438
|
+
} from "@elementor/editor-elements";
|
|
1439
|
+
import { shouldApplyEffect } from "@elementor/editor-props";
|
|
1440
|
+
import { isExperimentActive as isExperimentActive3, undoable as undoable2 } from "@elementor/editor-v1-adapters";
|
|
1441
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
1419
1442
|
|
|
1420
1443
|
// src/controls-registry/create-top-level-object-type.ts
|
|
1421
1444
|
var createTopLevelOjectType = ({ schema }) => {
|
|
@@ -1431,26 +1454,80 @@ var createTopLevelOjectType = ({ schema }) => {
|
|
|
1431
1454
|
};
|
|
1432
1455
|
|
|
1433
1456
|
// src/controls-registry/settings-field.tsx
|
|
1434
|
-
var SettingsField = ({ bind, children }) => {
|
|
1457
|
+
var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
1435
1458
|
const { element, elementType } = useElement();
|
|
1436
|
-
const
|
|
1437
|
-
const value = { [bind]:
|
|
1459
|
+
const elementSettingValues = useElementSettings(element.id, Object.keys(elementType.propsSchema));
|
|
1460
|
+
const value = { [bind]: elementSettingValues?.[bind] };
|
|
1438
1461
|
const propType = createTopLevelOjectType({ schema: elementType.propsSchema });
|
|
1462
|
+
const undoableUpdateElementProp = useUndoableUpdateElementProp({
|
|
1463
|
+
propKey: bind,
|
|
1464
|
+
elementId: element.id,
|
|
1465
|
+
propDisplayName
|
|
1466
|
+
});
|
|
1439
1467
|
const setValue = (newValue) => {
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
}
|
|
1468
|
+
const isVersion331Active = isExperimentActive3(EXPERIMENTAL_FEATURES.V_3_31);
|
|
1469
|
+
if (isVersion331Active) {
|
|
1470
|
+
undoableUpdateElementProp({ newValue });
|
|
1471
|
+
} else {
|
|
1472
|
+
updateElementSettings2({ id: element.id, props: newValue });
|
|
1473
|
+
}
|
|
1444
1474
|
};
|
|
1445
|
-
|
|
1475
|
+
const isDisabled = (prop) => getDisableState(prop, elementSettingValues);
|
|
1476
|
+
return /* @__PURE__ */ React15.createElement(PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React15.createElement(PropKeyProvider, { bind }, children));
|
|
1446
1477
|
};
|
|
1478
|
+
function getDisableState(propType, elementValues) {
|
|
1479
|
+
const disablingDependencies = propType.dependencies?.filter(({ effect }) => effect === "disable") || [];
|
|
1480
|
+
if (!disablingDependencies.length) {
|
|
1481
|
+
return false;
|
|
1482
|
+
}
|
|
1483
|
+
if (disablingDependencies.length > 1) {
|
|
1484
|
+
throw new Error("Multiple disabling dependencies are not supported.");
|
|
1485
|
+
}
|
|
1486
|
+
return shouldApplyEffect(disablingDependencies[0], elementValues);
|
|
1487
|
+
}
|
|
1488
|
+
function useUndoableUpdateElementProp({
|
|
1489
|
+
propKey,
|
|
1490
|
+
elementId,
|
|
1491
|
+
propDisplayName
|
|
1492
|
+
}) {
|
|
1493
|
+
return useMemo3(() => {
|
|
1494
|
+
return undoable2(
|
|
1495
|
+
{
|
|
1496
|
+
do: ({ newValue }) => {
|
|
1497
|
+
const prevPropValue = getElementSetting2(elementId, propKey);
|
|
1498
|
+
updateElementSettings2({ id: elementId, props: { ...newValue }, withHistory: false });
|
|
1499
|
+
setDocumentModifiedStatus2(true);
|
|
1500
|
+
return { [propKey]: prevPropValue };
|
|
1501
|
+
},
|
|
1502
|
+
undo: ({}, prevProps) => {
|
|
1503
|
+
updateElementSettings2({ id: elementId, props: prevProps, withHistory: false });
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
title: getElementLabel2(elementId),
|
|
1508
|
+
// translators: %s is the name of the property that was edited.
|
|
1509
|
+
subtitle: __5("%s edited", "elementor").replace("%s", propDisplayName)
|
|
1510
|
+
}
|
|
1511
|
+
);
|
|
1512
|
+
}, [propKey, elementId, propDisplayName]);
|
|
1513
|
+
}
|
|
1447
1514
|
|
|
1448
1515
|
// src/components/section.tsx
|
|
1449
1516
|
import * as React17 from "react";
|
|
1450
|
-
import { useId as useId3 } from "react";
|
|
1451
|
-
import { isExperimentActive as
|
|
1517
|
+
import { useId as useId3, useRef as useRef3 } from "react";
|
|
1518
|
+
import { isExperimentActive as isExperimentActive4 } from "@elementor/editor-v1-adapters";
|
|
1452
1519
|
import { Collapse as Collapse2, Divider as Divider2, ListItemButton, ListItemText, Stack as Stack5 } from "@elementor/ui";
|
|
1453
1520
|
|
|
1521
|
+
// src/contexts/section-context.tsx
|
|
1522
|
+
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
1523
|
+
var FALLBACK_SECTION_WIDTH = 320;
|
|
1524
|
+
var SectionRefContext = createContext7(null);
|
|
1525
|
+
var useSectionRef = () => useContext7(SectionRefContext);
|
|
1526
|
+
var useSectionWidth = () => {
|
|
1527
|
+
const sectionRef = useSectionRef();
|
|
1528
|
+
return sectionRef?.current?.offsetWidth ?? FALLBACK_SECTION_WIDTH;
|
|
1529
|
+
};
|
|
1530
|
+
|
|
1454
1531
|
// src/components/collapse-icon.tsx
|
|
1455
1532
|
import { ChevronDownIcon } from "@elementor/icons";
|
|
1456
1533
|
import { styled as styled5 } from "@elementor/ui";
|
|
@@ -1467,7 +1544,7 @@ var CollapseIcon = styled5(ChevronDownIcon, {
|
|
|
1467
1544
|
import * as React16 from "react";
|
|
1468
1545
|
import { useState as useState7 } from "react";
|
|
1469
1546
|
import { Button, Collapse, Stack as Stack4, styled as styled6 } from "@elementor/ui";
|
|
1470
|
-
import { __ as
|
|
1547
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
1471
1548
|
var IndicatorsWrapper = styled6("div")`
|
|
1472
1549
|
position: absolute;
|
|
1473
1550
|
top: 0;
|
|
@@ -1494,7 +1571,7 @@ var CollapsibleContent = ({ children, defaultOpen = false, titleEnd = null }) =>
|
|
|
1494
1571
|
endIcon: /* @__PURE__ */ React16.createElement(CollapseIcon, { open }),
|
|
1495
1572
|
sx: { my: 0.5 }
|
|
1496
1573
|
},
|
|
1497
|
-
open ?
|
|
1574
|
+
open ? __6("Show less", "elementor") : __6("Show more", "elementor")
|
|
1498
1575
|
), titleEnd && /* @__PURE__ */ React16.createElement(IndicatorsWrapper, null, getCollapsibleValue(titleEnd, open))), /* @__PURE__ */ React16.createElement(Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1499
1576
|
};
|
|
1500
1577
|
function getCollapsibleValue(value, isOpen) {
|
|
@@ -1507,13 +1584,14 @@ function getCollapsibleValue(value, isOpen) {
|
|
|
1507
1584
|
// src/components/section.tsx
|
|
1508
1585
|
function Section({ title, children, defaultExpanded = false, titleEnd }) {
|
|
1509
1586
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
1587
|
+
const ref = useRef3(null);
|
|
1510
1588
|
const handleClick = () => {
|
|
1511
1589
|
setIsOpen(!isOpen);
|
|
1512
1590
|
};
|
|
1513
1591
|
const id = useId3();
|
|
1514
1592
|
const labelId = `label-${id}`;
|
|
1515
1593
|
const contentId = `content-${id}`;
|
|
1516
|
-
const isUsingTitleEnd =
|
|
1594
|
+
const isUsingTitleEnd = isExperimentActive4(EXPERIMENTAL_FEATURES.V_3_30);
|
|
1517
1595
|
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
1518
1596
|
ListItemButton,
|
|
1519
1597
|
{
|
|
@@ -1531,7 +1609,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd }) {
|
|
|
1531
1609
|
}
|
|
1532
1610
|
), isUsingTitleEnd ? getCollapsibleValue(titleEnd, isOpen) : null),
|
|
1533
1611
|
/* @__PURE__ */ React17.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
1534
|
-
), /* @__PURE__ */ React17.createElement(Collapse2, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React17.createElement(Stack5, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React17.createElement(Divider2, null));
|
|
1612
|
+
), /* @__PURE__ */ React17.createElement(Collapse2, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React17.createElement(SectionRefContext.Provider, { value: ref }, /* @__PURE__ */ React17.createElement(Stack5, { ref, gap: 2.5, p: 2 }, children))), /* @__PURE__ */ React17.createElement(Divider2, null));
|
|
1535
1613
|
}
|
|
1536
1614
|
|
|
1537
1615
|
// src/components/sections-list.tsx
|
|
@@ -1545,7 +1623,7 @@ function SectionsList(props) {
|
|
|
1545
1623
|
var SettingsTab = () => {
|
|
1546
1624
|
const { elementType, element } = useElement();
|
|
1547
1625
|
const settingsDefault = useDefaultPanelSettings();
|
|
1548
|
-
const isDefaultExpanded = (sectionId) =>
|
|
1626
|
+
const isDefaultExpanded = (sectionId) => isExperimentActive5(EXPERIMENTAL_FEATURES.V_3_30) ? settingsDefault.defaultSectionsExpanded.settings?.includes(sectionId) : true;
|
|
1549
1627
|
return /* @__PURE__ */ React19.createElement(SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React19.createElement(SectionsList, null, elementType.controls.map(({ type, value }, index) => {
|
|
1550
1628
|
if (type === "control") {
|
|
1551
1629
|
return /* @__PURE__ */ React19.createElement(Control2, { key: value.bind, control: value });
|
|
@@ -1575,7 +1653,10 @@ var Control2 = ({ control }) => {
|
|
|
1575
1653
|
}
|
|
1576
1654
|
const layout = control.meta?.layout || getDefaultLayout(control.type);
|
|
1577
1655
|
const controlProps = populateChildControlProps(control.props);
|
|
1578
|
-
|
|
1656
|
+
if (layout === "custom") {
|
|
1657
|
+
controlProps.label = control.label;
|
|
1658
|
+
}
|
|
1659
|
+
return /* @__PURE__ */ React19.createElement(SettingsField, { bind: control.bind, propDisplayName: control.label || control.bind }, control.meta?.topDivider && /* @__PURE__ */ React19.createElement(Divider3, null), /* @__PURE__ */ React19.createElement(ControlTypeContainer, { layout }, control.label && layout !== "custom" ? /* @__PURE__ */ React19.createElement(ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React19.createElement(Control, { type: control.type, props: controlProps })));
|
|
1579
1660
|
};
|
|
1580
1661
|
function populateChildControlProps(props) {
|
|
1581
1662
|
if (props.childControlType) {
|
|
@@ -1594,18 +1675,18 @@ function populateChildControlProps(props) {
|
|
|
1594
1675
|
}
|
|
1595
1676
|
|
|
1596
1677
|
// src/components/style-tab.tsx
|
|
1597
|
-
import * as
|
|
1678
|
+
import * as React84 from "react";
|
|
1598
1679
|
import { useState as useState12 } from "react";
|
|
1599
1680
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
1600
1681
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
1601
1682
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
1602
|
-
import { Divider as Divider5, Stack as
|
|
1603
|
-
import { __ as
|
|
1683
|
+
import { Divider as Divider5, Stack as Stack14 } from "@elementor/ui";
|
|
1684
|
+
import { __ as __60 } from "@wordpress/i18n";
|
|
1604
1685
|
|
|
1605
1686
|
// src/contexts/styles-inheritance-context.tsx
|
|
1606
1687
|
import * as React20 from "react";
|
|
1607
|
-
import { createContext as
|
|
1608
|
-
import { getWidgetsCache, useElementSetting as
|
|
1688
|
+
import { createContext as createContext8, useContext as useContext8 } from "react";
|
|
1689
|
+
import { getWidgetsCache, useElementSetting as useElementSetting2 } from "@elementor/editor-elements";
|
|
1609
1690
|
import { classesPropTypeUtil as classesPropTypeUtil2 } from "@elementor/editor-props";
|
|
1610
1691
|
import { getBreakpointsTree } from "@elementor/editor-responsive";
|
|
1611
1692
|
import { getStylesSchema } from "@elementor/editor-styles";
|
|
@@ -1845,7 +1926,7 @@ var getFilterPropType = (propType, path) => {
|
|
|
1845
1926
|
};
|
|
1846
1927
|
|
|
1847
1928
|
// src/contexts/styles-inheritance-context.tsx
|
|
1848
|
-
var Context4 =
|
|
1929
|
+
var Context4 = createContext8(null);
|
|
1849
1930
|
function StyleInheritanceProvider({ children }) {
|
|
1850
1931
|
const styleDefs = useAppliedStyles();
|
|
1851
1932
|
const breakpointsTree = getBreakpointsTree();
|
|
@@ -1853,7 +1934,7 @@ function StyleInheritanceProvider({ children }) {
|
|
|
1853
1934
|
return /* @__PURE__ */ React20.createElement(Context4.Provider, { value: { getSnapshot, getInheritanceChain } }, children);
|
|
1854
1935
|
}
|
|
1855
1936
|
function useStylesInheritanceSnapshot() {
|
|
1856
|
-
const context =
|
|
1937
|
+
const context = useContext8(Context4);
|
|
1857
1938
|
const { meta } = useStyle();
|
|
1858
1939
|
if (!context) {
|
|
1859
1940
|
throw new Error("useStylesInheritanceSnapshot must be used within a StyleInheritanceProvider");
|
|
@@ -1864,7 +1945,7 @@ function useStylesInheritanceSnapshot() {
|
|
|
1864
1945
|
return context.getSnapshot(meta) ?? null;
|
|
1865
1946
|
}
|
|
1866
1947
|
function useStylesInheritanceChain(path) {
|
|
1867
|
-
const context =
|
|
1948
|
+
const context = useContext8(Context4);
|
|
1868
1949
|
if (!context) {
|
|
1869
1950
|
throw new Error("useStylesInheritanceChain must be used within a StyleInheritanceProvider");
|
|
1870
1951
|
}
|
|
@@ -1881,7 +1962,7 @@ var useAppliedStyles = () => {
|
|
|
1881
1962
|
const currentClassesProp = useClassesProp();
|
|
1882
1963
|
const baseStyles = useBaseStyles();
|
|
1883
1964
|
useStylesRerender();
|
|
1884
|
-
const classesProp =
|
|
1965
|
+
const classesProp = useElementSetting2(element.id, currentClassesProp);
|
|
1885
1966
|
const appliedStyles = classesPropTypeUtil2.extract(classesProp) ?? [];
|
|
1886
1967
|
return stylesRepository5.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
1887
1968
|
};
|
|
@@ -1893,7 +1974,7 @@ var useBaseStyles = () => {
|
|
|
1893
1974
|
};
|
|
1894
1975
|
|
|
1895
1976
|
// src/hooks/use-active-style-def-id.ts
|
|
1896
|
-
import { getElementStyles, useElementSetting as
|
|
1977
|
+
import { getElementStyles, useElementSetting as useElementSetting3 } from "@elementor/editor-elements";
|
|
1897
1978
|
function useActiveStyleDefId(classProp) {
|
|
1898
1979
|
const [activeStyledDefId, setActiveStyledDefId] = useStateByElement(
|
|
1899
1980
|
"active-style-id",
|
|
@@ -1911,7 +1992,7 @@ function useFirstAppliedClass(appliedClassesIds) {
|
|
|
1911
1992
|
}
|
|
1912
1993
|
function useAppliedClassesIds(classProp) {
|
|
1913
1994
|
const { element } = useElement();
|
|
1914
|
-
return
|
|
1995
|
+
return useElementSetting3(element.id, classProp);
|
|
1915
1996
|
}
|
|
1916
1997
|
function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
1917
1998
|
const isClassApplied = !!id && appliedClassesIds.includes(id);
|
|
@@ -1921,54 +2002,37 @@ function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
|
1921
2002
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1922
2003
|
import * as React29 from "react";
|
|
1923
2004
|
import { BackgroundControl } from "@elementor/editor-controls";
|
|
2005
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
1924
2006
|
|
|
1925
2007
|
// src/controls-registry/styles-field.tsx
|
|
1926
|
-
import * as
|
|
2008
|
+
import * as React27 from "react";
|
|
1927
2009
|
import { ControlAdornmentsProvider, PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2 } from "@elementor/editor-controls";
|
|
1928
2010
|
import { getStylesSchema as getStylesSchema2 } from "@elementor/editor-styles";
|
|
2011
|
+
import { isExperimentActive as isExperimentActive9 } from "@elementor/editor-v1-adapters";
|
|
1929
2012
|
|
|
1930
2013
|
// src/hooks/use-styles-fields.ts
|
|
1931
|
-
import { useMemo as
|
|
1932
|
-
import {
|
|
1933
|
-
createElementStyle,
|
|
1934
|
-
deleteElementStyle,
|
|
1935
|
-
getElementLabel as getElementLabel2
|
|
1936
|
-
} from "@elementor/editor-elements";
|
|
2014
|
+
import { useMemo as useMemo4 } from "react";
|
|
2015
|
+
import { createElementStyle, deleteElementStyle, getElementLabel as getElementLabel3 } from "@elementor/editor-elements";
|
|
1937
2016
|
import { getVariantByMeta } from "@elementor/editor-styles";
|
|
2017
|
+
import { isElementsStylesProvider as isElementsStylesProvider3 } from "@elementor/editor-styles-repository";
|
|
1938
2018
|
import { ELEMENTS_STYLES_RESERVED_LABEL } from "@elementor/editor-styles-repository";
|
|
1939
|
-
import { undoable as
|
|
1940
|
-
import { __ as
|
|
2019
|
+
import { isExperimentActive as isExperimentActive6, undoable as undoable3 } from "@elementor/editor-v1-adapters";
|
|
2020
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
1941
2021
|
function useStylesFields(propNames) {
|
|
1942
|
-
const {
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
const
|
|
1946
|
-
const
|
|
2022
|
+
const {
|
|
2023
|
+
element: { id: elementId }
|
|
2024
|
+
} = useElement();
|
|
2025
|
+
const { id: styleId, meta, provider, canEdit } = useStyle();
|
|
2026
|
+
const undoableUpdateStyle = useUndoableUpdateStyle({ elementId, meta });
|
|
2027
|
+
const undoableCreateElementStyle = useUndoableCreateElementStyle({ elementId, meta });
|
|
1947
2028
|
useStylesRerender();
|
|
1948
|
-
const values = getProps({
|
|
1949
|
-
|
|
1950
|
-
styleId
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
});
|
|
1955
|
-
const setValues = (props) => {
|
|
1956
|
-
if (id === null) {
|
|
1957
|
-
undoableCreateElementStyle({
|
|
1958
|
-
elementId: element.id,
|
|
1959
|
-
classesProp,
|
|
1960
|
-
meta,
|
|
1961
|
-
props
|
|
1962
|
-
});
|
|
1963
|
-
return;
|
|
2029
|
+
const values = getProps({ elementId, styleId, provider, meta, propNames });
|
|
2030
|
+
const setValues = (props, { history: { propDisplayName } }) => {
|
|
2031
|
+
if (styleId === null) {
|
|
2032
|
+
undoableCreateElementStyle({ props, propDisplayName });
|
|
2033
|
+
} else {
|
|
2034
|
+
undoableUpdateStyle({ provider, styleId, props, propDisplayName });
|
|
1964
2035
|
}
|
|
1965
|
-
undoableUpdateStyle({
|
|
1966
|
-
elementId: element.id,
|
|
1967
|
-
styleId: id,
|
|
1968
|
-
provider,
|
|
1969
|
-
meta,
|
|
1970
|
-
props
|
|
1971
|
-
});
|
|
1972
2036
|
};
|
|
1973
2037
|
return { values, setValues, canEdit };
|
|
1974
2038
|
}
|
|
@@ -1985,39 +2049,52 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
|
1985
2049
|
propNames.map((key) => [key, variant?.props[key] ?? null])
|
|
1986
2050
|
);
|
|
1987
2051
|
}
|
|
1988
|
-
function useUndoableCreateElementStyle(
|
|
1989
|
-
|
|
1990
|
-
|
|
2052
|
+
function useUndoableCreateElementStyle({
|
|
2053
|
+
elementId,
|
|
2054
|
+
meta
|
|
2055
|
+
}) {
|
|
2056
|
+
const classesProp = useClassesProp();
|
|
2057
|
+
return useMemo4(() => {
|
|
2058
|
+
const isVersion331Active = isExperimentActive6(EXPERIMENTAL_FEATURES.V_3_31);
|
|
2059
|
+
const createStyleArgs = { elementId, classesProp, meta, label: ELEMENTS_STYLES_RESERVED_LABEL };
|
|
2060
|
+
return undoable3(
|
|
1991
2061
|
{
|
|
1992
|
-
do: (
|
|
1993
|
-
return createElementStyle({
|
|
1994
|
-
...payload,
|
|
1995
|
-
label: ELEMENTS_STYLES_RESERVED_LABEL
|
|
1996
|
-
});
|
|
2062
|
+
do: ({ props }) => {
|
|
2063
|
+
return createElementStyle({ ...createStyleArgs, props });
|
|
1997
2064
|
},
|
|
1998
|
-
undo: (
|
|
2065
|
+
undo: (_, styleId) => {
|
|
1999
2066
|
deleteElementStyle(elementId, styleId);
|
|
2000
2067
|
},
|
|
2001
|
-
redo: (
|
|
2002
|
-
return createElementStyle({
|
|
2003
|
-
...payload,
|
|
2004
|
-
styleId,
|
|
2005
|
-
label: ELEMENTS_STYLES_RESERVED_LABEL
|
|
2006
|
-
});
|
|
2068
|
+
redo: ({ props }, styleId) => {
|
|
2069
|
+
return createElementStyle({ ...createStyleArgs, props, styleId });
|
|
2007
2070
|
}
|
|
2008
2071
|
},
|
|
2009
2072
|
{
|
|
2010
|
-
title: (
|
|
2011
|
-
|
|
2073
|
+
title: () => {
|
|
2074
|
+
if (isVersion331Active) {
|
|
2075
|
+
return localStyleHistoryTitlesV331.title({ elementId });
|
|
2076
|
+
}
|
|
2077
|
+
return historyTitlesV330.title({ elementId });
|
|
2078
|
+
},
|
|
2079
|
+
subtitle: ({ propDisplayName }) => {
|
|
2080
|
+
if (isVersion331Active) {
|
|
2081
|
+
return localStyleHistoryTitlesV331.subtitle({ propDisplayName });
|
|
2082
|
+
}
|
|
2083
|
+
return historyTitlesV330.subtitle;
|
|
2084
|
+
}
|
|
2012
2085
|
}
|
|
2013
2086
|
);
|
|
2014
|
-
}, []);
|
|
2087
|
+
}, [classesProp, elementId, meta]);
|
|
2015
2088
|
}
|
|
2016
|
-
function useUndoableUpdateStyle(
|
|
2017
|
-
|
|
2018
|
-
|
|
2089
|
+
function useUndoableUpdateStyle({
|
|
2090
|
+
elementId,
|
|
2091
|
+
meta
|
|
2092
|
+
}) {
|
|
2093
|
+
return useMemo4(() => {
|
|
2094
|
+
const isVersion331Active = isExperimentActive6(EXPERIMENTAL_FEATURES.V_3_31);
|
|
2095
|
+
return undoable3(
|
|
2019
2096
|
{
|
|
2020
|
-
do: ({
|
|
2097
|
+
do: ({ provider, styleId, props }) => {
|
|
2021
2098
|
if (!provider.actions.updateProps) {
|
|
2022
2099
|
throw new StylesProviderCannotUpdatePropsError({
|
|
2023
2100
|
context: { providerKey: provider.getKey() }
|
|
@@ -2025,26 +2102,37 @@ function useUndoableUpdateStyle() {
|
|
|
2025
2102
|
}
|
|
2026
2103
|
const style = provider.actions.get(styleId, { elementId });
|
|
2027
2104
|
const prevProps = getCurrentProps(style, meta);
|
|
2028
|
-
provider.actions.updateProps(
|
|
2029
|
-
{
|
|
2030
|
-
id: styleId,
|
|
2031
|
-
meta,
|
|
2032
|
-
props
|
|
2033
|
-
},
|
|
2034
|
-
{ elementId }
|
|
2035
|
-
);
|
|
2105
|
+
provider.actions.updateProps({ id: styleId, meta, props }, { elementId });
|
|
2036
2106
|
return prevProps;
|
|
2037
2107
|
},
|
|
2038
|
-
undo: ({
|
|
2108
|
+
undo: ({ provider, styleId }, prevProps) => {
|
|
2039
2109
|
provider.actions.updateProps?.({ id: styleId, meta, props: prevProps }, { elementId });
|
|
2040
2110
|
}
|
|
2041
2111
|
},
|
|
2042
2112
|
{
|
|
2043
|
-
title: ({
|
|
2044
|
-
|
|
2113
|
+
title: ({ provider }) => {
|
|
2114
|
+
if (isVersion331Active) {
|
|
2115
|
+
const isLocal = isElementsStylesProvider3(provider.getKey());
|
|
2116
|
+
if (isLocal) {
|
|
2117
|
+
return localStyleHistoryTitlesV331.title({ elementId });
|
|
2118
|
+
}
|
|
2119
|
+
return defaultHistoryTitlesV331.title({ provider });
|
|
2120
|
+
}
|
|
2121
|
+
return historyTitlesV330.title({ elementId });
|
|
2122
|
+
},
|
|
2123
|
+
subtitle: ({ provider, styleId, propDisplayName }) => {
|
|
2124
|
+
if (isVersion331Active) {
|
|
2125
|
+
const isLocal = isElementsStylesProvider3(provider.getKey());
|
|
2126
|
+
if (isLocal) {
|
|
2127
|
+
return localStyleHistoryTitlesV331.subtitle({ propDisplayName });
|
|
2128
|
+
}
|
|
2129
|
+
return defaultHistoryTitlesV331.subtitle({ provider, styleId, elementId, propDisplayName });
|
|
2130
|
+
}
|
|
2131
|
+
return historyTitlesV330.subtitle;
|
|
2132
|
+
}
|
|
2045
2133
|
}
|
|
2046
2134
|
);
|
|
2047
|
-
}, []);
|
|
2135
|
+
}, [elementId, meta]);
|
|
2048
2136
|
}
|
|
2049
2137
|
function getCurrentProps(style, meta) {
|
|
2050
2138
|
if (!style) {
|
|
@@ -2054,30 +2142,55 @@ function getCurrentProps(style, meta) {
|
|
|
2054
2142
|
const props = variant?.props ?? {};
|
|
2055
2143
|
return structuredClone(props);
|
|
2056
2144
|
}
|
|
2145
|
+
var historyTitlesV330 = {
|
|
2146
|
+
title: ({ elementId }) => getElementLabel3(elementId),
|
|
2147
|
+
subtitle: __7("Style edited", "elementor")
|
|
2148
|
+
};
|
|
2149
|
+
var defaultHistoryTitlesV331 = {
|
|
2150
|
+
title: ({ provider }) => {
|
|
2151
|
+
const providerLabel = provider.labels?.singular;
|
|
2152
|
+
return providerLabel ? capitalize(providerLabel) : __7("Style", "elementor");
|
|
2153
|
+
},
|
|
2154
|
+
subtitle: ({ provider, styleId, elementId, propDisplayName }) => {
|
|
2155
|
+
const styleLabel = provider.actions.get(styleId, { elementId })?.label;
|
|
2156
|
+
if (!styleLabel) {
|
|
2157
|
+
throw new Error(`Style ${styleId} not found`);
|
|
2158
|
+
}
|
|
2159
|
+
return __7(`%s$1 %s$2 edited`, "elementor").replace("%s$1", styleLabel).replace("%s$2", propDisplayName);
|
|
2160
|
+
}
|
|
2161
|
+
};
|
|
2162
|
+
var localStyleHistoryTitlesV331 = {
|
|
2163
|
+
title: ({ elementId }) => getElementLabel3(elementId),
|
|
2164
|
+
subtitle: ({ propDisplayName }) => (
|
|
2165
|
+
// translators: %s is the name of the style property being edited
|
|
2166
|
+
__7(`%s edited`, "elementor").replace("%s", propDisplayName)
|
|
2167
|
+
)
|
|
2168
|
+
};
|
|
2169
|
+
function capitalize(str) {
|
|
2170
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
2171
|
+
}
|
|
2057
2172
|
|
|
2058
2173
|
// src/hooks/use-styles-field.ts
|
|
2059
|
-
function useStylesField(propName) {
|
|
2174
|
+
function useStylesField(propName, meta) {
|
|
2060
2175
|
const { values, setValues, canEdit } = useStylesFields([propName]);
|
|
2061
2176
|
const value = values?.[propName] ?? null;
|
|
2062
2177
|
const setValue = (newValue) => {
|
|
2063
|
-
setValues({
|
|
2064
|
-
[propName]: newValue
|
|
2065
|
-
});
|
|
2178
|
+
setValues({ [propName]: newValue }, meta);
|
|
2066
2179
|
};
|
|
2067
2180
|
return { value, setValue, canEdit };
|
|
2068
2181
|
}
|
|
2069
2182
|
|
|
2070
2183
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2071
|
-
import * as
|
|
2184
|
+
import * as React26 from "react";
|
|
2072
2185
|
import { useBoundProp } from "@elementor/editor-controls";
|
|
2073
2186
|
import { isEmpty as isEmpty2 } from "@elementor/editor-props";
|
|
2074
2187
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
2075
|
-
import { isExperimentActive as
|
|
2188
|
+
import { isExperimentActive as isExperimentActive8 } from "@elementor/editor-v1-adapters";
|
|
2076
2189
|
import { Tooltip as Tooltip6 } from "@elementor/ui";
|
|
2077
|
-
import { __ as
|
|
2190
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
2078
2191
|
|
|
2079
2192
|
// src/styles-inheritance/consts.ts
|
|
2080
|
-
import { isExperimentActive as
|
|
2193
|
+
import { isExperimentActive as isExperimentActive7 } from "@elementor/editor-v1-adapters";
|
|
2081
2194
|
var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
2082
2195
|
"background-color-overlay",
|
|
2083
2196
|
"background-image-overlay",
|
|
@@ -2090,37 +2203,25 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
2090
2203
|
"image",
|
|
2091
2204
|
"background-overlay"
|
|
2092
2205
|
]);
|
|
2093
|
-
var isUsingIndicatorPopover = () =>
|
|
2206
|
+
var isUsingIndicatorPopover = () => isExperimentActive7("e_v_3_30");
|
|
2094
2207
|
|
|
2095
2208
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
2096
|
-
import * as
|
|
2097
|
-
import { useMemo as
|
|
2209
|
+
import * as React25 from "react";
|
|
2210
|
+
import { useMemo as useMemo5, useState as useState9 } from "react";
|
|
2098
2211
|
import { createPropsResolver } from "@elementor/editor-canvas";
|
|
2212
|
+
import { PopoverHeader } from "@elementor/editor-ui";
|
|
2099
2213
|
import {
|
|
2100
2214
|
Backdrop,
|
|
2101
2215
|
Box as Box6,
|
|
2102
2216
|
Card,
|
|
2103
2217
|
CardContent,
|
|
2104
2218
|
ClickAwayListener,
|
|
2105
|
-
CloseButton,
|
|
2106
2219
|
IconButton as IconButton3,
|
|
2107
2220
|
Infotip,
|
|
2108
|
-
Stack as
|
|
2109
|
-
Tooltip as Tooltip5
|
|
2110
|
-
Typography as Typography5
|
|
2221
|
+
Stack as Stack6,
|
|
2222
|
+
Tooltip as Tooltip5
|
|
2111
2223
|
} from "@elementor/ui";
|
|
2112
|
-
import { __ as
|
|
2113
|
-
|
|
2114
|
-
// src/components/section-content.tsx
|
|
2115
|
-
import { createContext as createContext8, useContext as useContext8, useRef as useRef3 } from "react";
|
|
2116
|
-
import * as React21 from "react";
|
|
2117
|
-
import { Stack as Stack6 } from "@elementor/ui";
|
|
2118
|
-
var SectionContentRefContext = createContext8(null);
|
|
2119
|
-
var useSectionContentRef = () => useContext8(SectionContentRefContext);
|
|
2120
|
-
var SectionContent = ({ gap = 2, sx, children }) => {
|
|
2121
|
-
const ref = useRef3(null);
|
|
2122
|
-
return /* @__PURE__ */ React21.createElement(SectionContentRefContext.Provider, { value: ref }, /* @__PURE__ */ React21.createElement(Stack6, { gap, sx: { ...sx }, ref }, children));
|
|
2123
|
-
};
|
|
2224
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
2124
2225
|
|
|
2125
2226
|
// src/hooks/use-direction.ts
|
|
2126
2227
|
import { useTheme } from "@elementor/ui";
|
|
@@ -2145,7 +2246,7 @@ function useDirection() {
|
|
|
2145
2246
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
2146
2247
|
import { isValidElement, useEffect as useEffect3, useState as useState8 } from "react";
|
|
2147
2248
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY2 } from "@elementor/editor-styles-repository";
|
|
2148
|
-
import { __ as
|
|
2249
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
2149
2250
|
var MAXIMUM_ITEMS = 2;
|
|
2150
2251
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
2151
2252
|
const [items3, setItems] = useState8([]);
|
|
@@ -2156,7 +2257,7 @@ var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
|
2156
2257
|
);
|
|
2157
2258
|
const validItems = normalizedItems.map((item) => ({
|
|
2158
2259
|
...item,
|
|
2159
|
-
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel :
|
|
2260
|
+
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel : __8("Base", "elementor")
|
|
2160
2261
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
2161
2262
|
setItems(validItems);
|
|
2162
2263
|
})();
|
|
@@ -2205,7 +2306,7 @@ import { createTransformersRegistry } from "@elementor/editor-canvas";
|
|
|
2205
2306
|
var stylesInheritanceTransformersRegistry = createTransformersRegistry();
|
|
2206
2307
|
|
|
2207
2308
|
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
2208
|
-
import * as
|
|
2309
|
+
import * as React21 from "react";
|
|
2209
2310
|
import { useBreakpoints } from "@elementor/editor-responsive";
|
|
2210
2311
|
import {
|
|
2211
2312
|
DesktopIcon,
|
|
@@ -2236,20 +2337,20 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
2236
2337
|
return null;
|
|
2237
2338
|
}
|
|
2238
2339
|
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
2239
|
-
return /* @__PURE__ */
|
|
2340
|
+
return /* @__PURE__ */ React21.createElement(Tooltip3, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React21.createElement(IconComponent, { fontSize: SIZE3, sx: { mt: "2px" } }));
|
|
2240
2341
|
};
|
|
2241
2342
|
|
|
2242
2343
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
2243
|
-
import * as
|
|
2344
|
+
import * as React22 from "react";
|
|
2244
2345
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY3 } from "@elementor/editor-styles-repository";
|
|
2245
2346
|
import { InfoCircleIcon } from "@elementor/icons";
|
|
2246
2347
|
import { Chip as Chip4, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
2247
|
-
import { __ as
|
|
2348
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
2248
2349
|
var SIZE4 = "tiny";
|
|
2249
2350
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
2250
2351
|
const isBaseStyle = provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY3;
|
|
2251
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */
|
|
2252
|
-
return /* @__PURE__ */
|
|
2352
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React22.createElement(Tooltip4, { title: __9("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React22.createElement(InfoCircleIcon, { fontSize: SIZE4 })) : void 0;
|
|
2353
|
+
return /* @__PURE__ */ React22.createElement(
|
|
2253
2354
|
Chip4,
|
|
2254
2355
|
{
|
|
2255
2356
|
label: displayLabel,
|
|
@@ -2275,10 +2376,10 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
2275
2376
|
};
|
|
2276
2377
|
|
|
2277
2378
|
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
2278
|
-
import * as
|
|
2379
|
+
import * as React23 from "react";
|
|
2279
2380
|
import { Typography as Typography4 } from "@elementor/ui";
|
|
2280
2381
|
var ValueComponent = ({ index, value }) => {
|
|
2281
|
-
return /* @__PURE__ */
|
|
2382
|
+
return /* @__PURE__ */ React23.createElement(
|
|
2282
2383
|
Typography4,
|
|
2283
2384
|
{
|
|
2284
2385
|
variant: "caption",
|
|
@@ -2296,37 +2397,36 @@ var ValueComponent = ({ index, value }) => {
|
|
|
2296
2397
|
};
|
|
2297
2398
|
|
|
2298
2399
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
2299
|
-
import * as
|
|
2400
|
+
import * as React24 from "react";
|
|
2300
2401
|
import { Box as Box5 } from "@elementor/ui";
|
|
2301
|
-
var ActionIcons = () => /* @__PURE__ */
|
|
2402
|
+
var ActionIcons = () => /* @__PURE__ */ React24.createElement(Box5, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
2302
2403
|
|
|
2303
2404
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
2304
|
-
var
|
|
2405
|
+
var SECTION_PADDING_INLINE = 32;
|
|
2305
2406
|
var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, children }) => {
|
|
2306
2407
|
const [showInfotip, setShowInfotip] = useState9(false);
|
|
2307
2408
|
const toggleInfotip = () => setShowInfotip((prev) => !prev);
|
|
2308
2409
|
const closeInfotip = () => setShowInfotip(false);
|
|
2309
2410
|
const key = path.join(".");
|
|
2310
|
-
const
|
|
2311
|
-
const
|
|
2312
|
-
const resolve = useMemo4(() => {
|
|
2411
|
+
const sectionWidth = useSectionWidth() + SECTION_PADDING_INLINE;
|
|
2412
|
+
const resolve = useMemo5(() => {
|
|
2313
2413
|
return createPropsResolver({
|
|
2314
2414
|
transformers: stylesInheritanceTransformersRegistry,
|
|
2315
2415
|
schema: { [key]: propType }
|
|
2316
2416
|
});
|
|
2317
2417
|
}, [key, propType]);
|
|
2318
2418
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
2319
|
-
const infotipContent = /* @__PURE__ */
|
|
2419
|
+
const infotipContent = /* @__PURE__ */ React25.createElement(ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React25.createElement(
|
|
2320
2420
|
Card,
|
|
2321
2421
|
{
|
|
2322
2422
|
elevation: 0,
|
|
2323
2423
|
sx: {
|
|
2324
|
-
width: `${
|
|
2325
|
-
maxWidth:
|
|
2424
|
+
width: `${sectionWidth - SECTION_PADDING_INLINE}px`,
|
|
2425
|
+
maxWidth: 496,
|
|
2326
2426
|
overflowX: "hidden"
|
|
2327
2427
|
}
|
|
2328
2428
|
},
|
|
2329
|
-
/* @__PURE__ */
|
|
2429
|
+
/* @__PURE__ */ React25.createElement(
|
|
2330
2430
|
CardContent,
|
|
2331
2431
|
{
|
|
2332
2432
|
sx: {
|
|
@@ -2339,42 +2439,35 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2339
2439
|
}
|
|
2340
2440
|
}
|
|
2341
2441
|
},
|
|
2342
|
-
/* @__PURE__ */
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
slotProps: { icon: { fontSize: SIZE5 } },
|
|
2346
|
-
sx: { ml: "auto" },
|
|
2347
|
-
onClick: closeInfotip
|
|
2348
|
-
}
|
|
2349
|
-
)),
|
|
2350
|
-
/* @__PURE__ */ React26.createElement(
|
|
2351
|
-
Stack7,
|
|
2442
|
+
/* @__PURE__ */ React25.createElement(PopoverHeader, { title: __10("Style origin", "elementor"), onClose: closeInfotip }),
|
|
2443
|
+
/* @__PURE__ */ React25.createElement(
|
|
2444
|
+
Stack6,
|
|
2352
2445
|
{
|
|
2353
2446
|
gap: 1.5,
|
|
2354
2447
|
sx: { pl: 2, pr: 1, pb: 2, overflowX: "hidden", overflowY: "auto" },
|
|
2355
2448
|
role: "list"
|
|
2356
2449
|
},
|
|
2357
2450
|
items3.map((item, index) => {
|
|
2358
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2359
2452
|
Box6,
|
|
2360
2453
|
{
|
|
2361
2454
|
key: item.id,
|
|
2362
2455
|
display: "flex",
|
|
2363
2456
|
gap: 0.5,
|
|
2364
2457
|
role: "listitem",
|
|
2365
|
-
"aria-label":
|
|
2458
|
+
"aria-label": __10("Inheritance item: %s", "elementor").replace(
|
|
2366
2459
|
"%s",
|
|
2367
2460
|
item.displayLabel
|
|
2368
2461
|
)
|
|
2369
2462
|
},
|
|
2370
|
-
/* @__PURE__ */
|
|
2371
|
-
/* @__PURE__ */
|
|
2463
|
+
/* @__PURE__ */ React25.createElement(Box6, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React25.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React25.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }), /* @__PURE__ */ React25.createElement(ValueComponent, { index, value: item.value })),
|
|
2464
|
+
/* @__PURE__ */ React25.createElement(ActionIcons, null)
|
|
2372
2465
|
);
|
|
2373
2466
|
})
|
|
2374
2467
|
)
|
|
2375
2468
|
)
|
|
2376
2469
|
));
|
|
2377
|
-
return /* @__PURE__ */
|
|
2470
|
+
return /* @__PURE__ */ React25.createElement(TooltipOrInfotip, { showInfotip, onClose: closeInfotip, infotipContent }, /* @__PURE__ */ React25.createElement(IconButton3, { onClick: toggleInfotip, "aria-label": label, sx: { my: "-1px" } }, children));
|
|
2378
2471
|
};
|
|
2379
2472
|
function TooltipOrInfotip({
|
|
2380
2473
|
children,
|
|
@@ -2385,7 +2478,7 @@ function TooltipOrInfotip({
|
|
|
2385
2478
|
const { isSiteRtl } = useDirection();
|
|
2386
2479
|
const forceInfotipAlignLeft = isSiteRtl ? 9999999 : -9999999;
|
|
2387
2480
|
if (showInfotip) {
|
|
2388
|
-
return /* @__PURE__ */
|
|
2481
|
+
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
|
|
2389
2482
|
Backdrop,
|
|
2390
2483
|
{
|
|
2391
2484
|
open: showInfotip,
|
|
@@ -2395,7 +2488,7 @@ function TooltipOrInfotip({
|
|
|
2395
2488
|
zIndex: (theme) => theme.zIndex.modal - 1
|
|
2396
2489
|
}
|
|
2397
2490
|
}
|
|
2398
|
-
), /* @__PURE__ */
|
|
2491
|
+
), /* @__PURE__ */ React25.createElement(
|
|
2399
2492
|
Infotip,
|
|
2400
2493
|
{
|
|
2401
2494
|
placement: "top",
|
|
@@ -2422,26 +2515,26 @@ function TooltipOrInfotip({
|
|
|
2422
2515
|
children
|
|
2423
2516
|
));
|
|
2424
2517
|
}
|
|
2425
|
-
return /* @__PURE__ */
|
|
2518
|
+
return /* @__PURE__ */ React25.createElement(Tooltip5, { title: __10("Style origin", "elementor"), placement: "top" }, children);
|
|
2426
2519
|
}
|
|
2427
2520
|
|
|
2428
2521
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2429
2522
|
var StylesInheritanceIndicator = () => {
|
|
2430
2523
|
const { path, propType } = useBoundProp();
|
|
2431
|
-
const isUsingNestedProps =
|
|
2524
|
+
const isUsingNestedProps = isExperimentActive8(EXPERIMENTAL_FEATURES.V_3_30);
|
|
2432
2525
|
const finalPath = isUsingNestedProps ? path : path.slice(0, 1);
|
|
2433
2526
|
const inheritanceChain = useStylesInheritanceChain(finalPath);
|
|
2434
2527
|
if (!inheritanceChain.length) {
|
|
2435
2528
|
return null;
|
|
2436
2529
|
}
|
|
2437
|
-
return /* @__PURE__ */
|
|
2530
|
+
return /* @__PURE__ */ React26.createElement(Indicator, { inheritanceChain, path: finalPath, propType });
|
|
2438
2531
|
};
|
|
2439
2532
|
var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
2440
2533
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2441
2534
|
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
2442
2535
|
const hasValue = !isEmpty2(currentItem?.value);
|
|
2443
2536
|
const [actualStyle] = inheritanceChain;
|
|
2444
|
-
if (actualStyle.provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY4) {
|
|
2537
|
+
if (!isExperimentActive8(EXPERIMENTAL_FEATURES.V_3_31) && actualStyle.provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY4) {
|
|
2445
2538
|
return null;
|
|
2446
2539
|
}
|
|
2447
2540
|
const isFinalValue = currentItem === actualStyle;
|
|
@@ -2451,9 +2544,9 @@ var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
|
2451
2544
|
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
2452
2545
|
};
|
|
2453
2546
|
if (!isUsingIndicatorPopover()) {
|
|
2454
|
-
return /* @__PURE__ */
|
|
2547
|
+
return /* @__PURE__ */ React26.createElement(Tooltip6, { title: __11("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React26.createElement(StyleIndicator, { ...styleIndicatorProps, "aria-label": label }));
|
|
2455
2548
|
}
|
|
2456
|
-
return /* @__PURE__ */
|
|
2549
|
+
return /* @__PURE__ */ React26.createElement(
|
|
2457
2550
|
StylesInheritanceInfotip,
|
|
2458
2551
|
{
|
|
2459
2552
|
inheritanceChain,
|
|
@@ -2461,30 +2554,37 @@ var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
|
2461
2554
|
propType,
|
|
2462
2555
|
label
|
|
2463
2556
|
},
|
|
2464
|
-
/* @__PURE__ */
|
|
2557
|
+
/* @__PURE__ */ React26.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
2465
2558
|
);
|
|
2466
2559
|
};
|
|
2467
2560
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
2468
2561
|
if (isFinalValue) {
|
|
2469
|
-
return
|
|
2562
|
+
return __11("This is the final value", "elementor");
|
|
2470
2563
|
}
|
|
2471
2564
|
if (hasValue) {
|
|
2472
|
-
return
|
|
2565
|
+
return __11("This value is overridden by another style", "elementor");
|
|
2473
2566
|
}
|
|
2474
|
-
return
|
|
2567
|
+
return __11("This has value from another style", "elementor");
|
|
2475
2568
|
};
|
|
2476
2569
|
|
|
2477
2570
|
// src/controls-registry/styles-field.tsx
|
|
2478
|
-
var StylesField = ({ bind, placeholder, children }) => {
|
|
2479
|
-
const { value, setValue, canEdit } = useStylesField(bind
|
|
2571
|
+
var StylesField = ({ bind, placeholder, propDisplayName, children }) => {
|
|
2572
|
+
const { value, setValue, canEdit } = useStylesField(bind, {
|
|
2573
|
+
history: { propDisplayName }
|
|
2574
|
+
});
|
|
2575
|
+
const isVersion331Active = isExperimentActive9("e_v_3_31");
|
|
2576
|
+
const stylesInheritanceChain = useStylesInheritanceChain([bind]);
|
|
2480
2577
|
const stylesSchema = getStylesSchema2();
|
|
2481
2578
|
const propType = createTopLevelOjectType({ schema: stylesSchema });
|
|
2482
2579
|
const values = { [bind]: value };
|
|
2483
|
-
const
|
|
2580
|
+
const [actualValue] = stylesInheritanceChain;
|
|
2581
|
+
const placeholderValues = {
|
|
2582
|
+
[bind]: isVersion331Active ? actualValue?.value : placeholder
|
|
2583
|
+
};
|
|
2484
2584
|
const setValues = (newValue) => {
|
|
2485
2585
|
setValue(newValue[bind]);
|
|
2486
2586
|
};
|
|
2487
|
-
return /* @__PURE__ */
|
|
2587
|
+
return /* @__PURE__ */ React27.createElement(
|
|
2488
2588
|
ControlAdornmentsProvider,
|
|
2489
2589
|
{
|
|
2490
2590
|
items: [
|
|
@@ -2494,27 +2594,33 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
2494
2594
|
}
|
|
2495
2595
|
]
|
|
2496
2596
|
},
|
|
2497
|
-
/* @__PURE__ */
|
|
2597
|
+
/* @__PURE__ */ React27.createElement(
|
|
2498
2598
|
PropProvider2,
|
|
2499
2599
|
{
|
|
2500
2600
|
propType,
|
|
2501
2601
|
value: values,
|
|
2502
2602
|
setValue: setValues,
|
|
2503
2603
|
placeholder: placeholderValues,
|
|
2504
|
-
|
|
2604
|
+
isDisabled: () => !canEdit
|
|
2505
2605
|
},
|
|
2506
|
-
/* @__PURE__ */
|
|
2606
|
+
/* @__PURE__ */ React27.createElement(PropKeyProvider2, { bind }, children)
|
|
2507
2607
|
)
|
|
2508
2608
|
);
|
|
2509
2609
|
};
|
|
2510
2610
|
|
|
2611
|
+
// src/components/section-content.tsx
|
|
2612
|
+
import * as React28 from "react";
|
|
2613
|
+
import { Stack as Stack7 } from "@elementor/ui";
|
|
2614
|
+
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React28.createElement(Stack7, { gap, sx: { ...sx } }, children);
|
|
2615
|
+
|
|
2511
2616
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2617
|
+
var BACKGROUND_LABEL = __12("Background", "elementor");
|
|
2512
2618
|
var BackgroundSection = () => {
|
|
2513
|
-
return /* @__PURE__ */ React29.createElement(SectionContent, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React29.createElement(BackgroundControl, null)));
|
|
2619
|
+
return /* @__PURE__ */ React29.createElement(SectionContent, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "background", propDisplayName: BACKGROUND_LABEL }, /* @__PURE__ */ React29.createElement(BackgroundControl, null)));
|
|
2514
2620
|
};
|
|
2515
2621
|
|
|
2516
2622
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2517
|
-
import * as
|
|
2623
|
+
import * as React40 from "react";
|
|
2518
2624
|
|
|
2519
2625
|
// src/components/panel-divider.tsx
|
|
2520
2626
|
import * as React30 from "react";
|
|
@@ -2522,15 +2628,15 @@ import { Divider as Divider4 } from "@elementor/ui";
|
|
|
2522
2628
|
var PanelDivider = () => /* @__PURE__ */ React30.createElement(Divider4, { sx: { my: 0.5 } });
|
|
2523
2629
|
|
|
2524
2630
|
// src/components/style-sections/border-section/border-field.tsx
|
|
2525
|
-
import * as
|
|
2631
|
+
import * as React37 from "react";
|
|
2526
2632
|
import { ControlFormLabel as ControlFormLabel3 } from "@elementor/editor-controls";
|
|
2527
|
-
import { __ as
|
|
2633
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
2528
2634
|
|
|
2529
2635
|
// src/components/add-or-remove-content.tsx
|
|
2530
2636
|
import * as React31 from "react";
|
|
2531
2637
|
import { MinusIcon, PlusIcon } from "@elementor/icons";
|
|
2532
2638
|
import { Collapse as Collapse3, IconButton as IconButton4, Stack as Stack8 } from "@elementor/ui";
|
|
2533
|
-
var
|
|
2639
|
+
var SIZE5 = "tiny";
|
|
2534
2640
|
var AddOrRemoveContent = ({
|
|
2535
2641
|
isAdded,
|
|
2536
2642
|
onAdd,
|
|
@@ -2550,15 +2656,18 @@ var AddOrRemoveContent = ({
|
|
|
2550
2656
|
}
|
|
2551
2657
|
},
|
|
2552
2658
|
renderLabel(),
|
|
2553
|
-
isAdded ? /* @__PURE__ */ React31.createElement(IconButton4, { size:
|
|
2659
|
+
isAdded ? /* @__PURE__ */ React31.createElement(IconButton4, { size: SIZE5, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React31.createElement(MinusIcon, { fontSize: SIZE5 })) : /* @__PURE__ */ React31.createElement(IconButton4, { size: SIZE5, onClick: onAdd, "aria-label": "Add", disabled }, /* @__PURE__ */ React31.createElement(PlusIcon, { fontSize: SIZE5 }))
|
|
2554
2660
|
), /* @__PURE__ */ React31.createElement(Collapse3, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React31.createElement(SectionContent, null, children)));
|
|
2555
2661
|
};
|
|
2556
2662
|
|
|
2557
2663
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2558
|
-
import * as
|
|
2664
|
+
import * as React34 from "react";
|
|
2559
2665
|
import { ColorControl } from "@elementor/editor-controls";
|
|
2560
|
-
import {
|
|
2561
|
-
|
|
2666
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
2667
|
+
|
|
2668
|
+
// src/components/styles-field-layout.tsx
|
|
2669
|
+
import * as React33 from "react";
|
|
2670
|
+
import { Grid, Stack as Stack10 } from "@elementor/ui";
|
|
2562
2671
|
|
|
2563
2672
|
// src/components/control-label.tsx
|
|
2564
2673
|
import * as React32 from "react";
|
|
@@ -2568,77 +2677,103 @@ var ControlLabel = ({ children }) => {
|
|
|
2568
2677
|
return /* @__PURE__ */ React32.createElement(Stack9, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React32.createElement(ControlFormLabel2, null, children), /* @__PURE__ */ React32.createElement(ControlAdornments, null));
|
|
2569
2678
|
};
|
|
2570
2679
|
|
|
2680
|
+
// src/components/styles-field-layout.tsx
|
|
2681
|
+
var StylesFieldLayout = React33.forwardRef((props, ref) => {
|
|
2682
|
+
const { direction = "row", children, label } = props;
|
|
2683
|
+
const LayoutComponent = direction === "row" ? Row : Column;
|
|
2684
|
+
return /* @__PURE__ */ React33.createElement(LayoutComponent, { label, ref, children });
|
|
2685
|
+
});
|
|
2686
|
+
var Row = React33.forwardRef(
|
|
2687
|
+
({ label, children }, ref) => {
|
|
2688
|
+
return /* @__PURE__ */ React33.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React33.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel, null, label)), /* @__PURE__ */ React33.createElement(
|
|
2689
|
+
Grid,
|
|
2690
|
+
{
|
|
2691
|
+
item: true,
|
|
2692
|
+
xs: 6,
|
|
2693
|
+
sx: (theme) => ({
|
|
2694
|
+
width: `calc(50% - ${theme.spacing(2)})`
|
|
2695
|
+
})
|
|
2696
|
+
},
|
|
2697
|
+
children
|
|
2698
|
+
));
|
|
2699
|
+
}
|
|
2700
|
+
);
|
|
2701
|
+
var Column = React33.forwardRef(
|
|
2702
|
+
({ label, children }, ref) => {
|
|
2703
|
+
return /* @__PURE__ */ React33.createElement(Stack10, { gap: 0.75, ref }, /* @__PURE__ */ React33.createElement(ControlLabel, null, label), children);
|
|
2704
|
+
}
|
|
2705
|
+
);
|
|
2706
|
+
|
|
2571
2707
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2572
|
-
var
|
|
2573
|
-
|
|
2574
|
-
};
|
|
2708
|
+
var BORDER_COLOR_LABEL = __13("Border color", "elementor");
|
|
2709
|
+
var BorderColorField = () => /* @__PURE__ */ React34.createElement(StylesField, { bind: "border-color", propDisplayName: BORDER_COLOR_LABEL }, /* @__PURE__ */ React34.createElement(StylesFieldLayout, { label: BORDER_COLOR_LABEL }, /* @__PURE__ */ React34.createElement(ColorControl, null)));
|
|
2575
2710
|
|
|
2576
2711
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
2577
|
-
import * as
|
|
2712
|
+
import * as React35 from "react";
|
|
2578
2713
|
import { SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
2579
|
-
import {
|
|
2580
|
-
|
|
2714
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
2715
|
+
var BORDER_TYPE_LABEL = __14("Border type", "elementor");
|
|
2581
2716
|
var borderStyles = [
|
|
2582
|
-
{ value: "none", label:
|
|
2583
|
-
{ value: "solid", label:
|
|
2584
|
-
{ value: "dashed", label:
|
|
2585
|
-
{ value: "dotted", label:
|
|
2586
|
-
{ value: "double", label:
|
|
2587
|
-
{ value: "groove", label:
|
|
2588
|
-
{ value: "ridge", label:
|
|
2589
|
-
{ value: "inset", label:
|
|
2590
|
-
{ value: "outset", label:
|
|
2717
|
+
{ value: "none", label: __14("None", "elementor") },
|
|
2718
|
+
{ value: "solid", label: __14("Solid", "elementor") },
|
|
2719
|
+
{ value: "dashed", label: __14("Dashed", "elementor") },
|
|
2720
|
+
{ value: "dotted", label: __14("Dotted", "elementor") },
|
|
2721
|
+
{ value: "double", label: __14("Double", "elementor") },
|
|
2722
|
+
{ value: "groove", label: __14("Groove", "elementor") },
|
|
2723
|
+
{ value: "ridge", label: __14("Ridge", "elementor") },
|
|
2724
|
+
{ value: "inset", label: __14("Inset", "elementor") },
|
|
2725
|
+
{ value: "outset", label: __14("Outset", "elementor") }
|
|
2591
2726
|
];
|
|
2592
|
-
var BorderStyleField = () => {
|
|
2593
|
-
return /* @__PURE__ */ React34.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React34.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, __12("Border type", "elementor"))), /* @__PURE__ */ React34.createElement(Grid2, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React34.createElement(SelectControl2, { options: borderStyles }))));
|
|
2594
|
-
};
|
|
2727
|
+
var BorderStyleField = () => /* @__PURE__ */ React35.createElement(StylesField, { bind: "border-style", propDisplayName: BORDER_TYPE_LABEL }, /* @__PURE__ */ React35.createElement(StylesFieldLayout, { label: BORDER_TYPE_LABEL }, /* @__PURE__ */ React35.createElement(SelectControl2, { options: borderStyles })));
|
|
2595
2728
|
|
|
2596
2729
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
2597
|
-
import * as
|
|
2730
|
+
import * as React36 from "react";
|
|
2598
2731
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
2599
2732
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
2600
2733
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
2601
2734
|
import { withDirection } from "@elementor/ui";
|
|
2602
|
-
import { __ as
|
|
2735
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
2736
|
+
var BORDER_WIDTH_LABEL = __15("Border width", "elementor");
|
|
2603
2737
|
var InlineStartIcon = withDirection(SideRightIcon);
|
|
2604
2738
|
var InlineEndIcon = withDirection(SideLeftIcon);
|
|
2605
2739
|
var getEdges = (isSiteRtl) => [
|
|
2606
2740
|
{
|
|
2607
|
-
label:
|
|
2608
|
-
icon: /* @__PURE__ */
|
|
2741
|
+
label: __15("Top", "elementor"),
|
|
2742
|
+
icon: /* @__PURE__ */ React36.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
2609
2743
|
bind: "block-start"
|
|
2610
2744
|
},
|
|
2611
2745
|
{
|
|
2612
|
-
label: isSiteRtl ?
|
|
2613
|
-
icon: /* @__PURE__ */
|
|
2746
|
+
label: isSiteRtl ? __15("Left", "elementor") : __15("Right", "elementor"),
|
|
2747
|
+
icon: /* @__PURE__ */ React36.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
2614
2748
|
bind: "inline-end"
|
|
2615
2749
|
},
|
|
2616
2750
|
{
|
|
2617
|
-
label:
|
|
2618
|
-
icon: /* @__PURE__ */
|
|
2751
|
+
label: __15("Bottom", "elementor"),
|
|
2752
|
+
icon: /* @__PURE__ */ React36.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
2619
2753
|
bind: "block-end"
|
|
2620
2754
|
},
|
|
2621
2755
|
{
|
|
2622
|
-
label: isSiteRtl ?
|
|
2623
|
-
icon: /* @__PURE__ */
|
|
2756
|
+
label: isSiteRtl ? __15("Right", "elementor") : __15("Left", "elementor"),
|
|
2757
|
+
icon: /* @__PURE__ */ React36.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
2624
2758
|
bind: "inline-start"
|
|
2625
2759
|
}
|
|
2626
2760
|
];
|
|
2627
2761
|
var BorderWidthField = () => {
|
|
2628
2762
|
const { isSiteRtl } = useDirection();
|
|
2629
|
-
return /* @__PURE__ */
|
|
2763
|
+
return /* @__PURE__ */ React36.createElement(StylesField, { bind: "border-width", propDisplayName: BORDER_WIDTH_LABEL }, /* @__PURE__ */ React36.createElement(
|
|
2630
2764
|
EqualUnequalSizesControl,
|
|
2631
2765
|
{
|
|
2632
2766
|
items: getEdges(isSiteRtl),
|
|
2633
|
-
label:
|
|
2634
|
-
icon: /* @__PURE__ */
|
|
2635
|
-
tooltipLabel:
|
|
2767
|
+
label: BORDER_WIDTH_LABEL,
|
|
2768
|
+
icon: /* @__PURE__ */ React36.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
2769
|
+
tooltipLabel: __15("Adjust borders", "elementor"),
|
|
2636
2770
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
2637
2771
|
}
|
|
2638
2772
|
));
|
|
2639
2773
|
};
|
|
2640
2774
|
|
|
2641
2775
|
// src/components/style-sections/border-section/border-field.tsx
|
|
2776
|
+
var BORDER_LABEL = __16("Border", "elementor");
|
|
2642
2777
|
var initialBorder = {
|
|
2643
2778
|
"border-width": { $$type: "size", value: { size: 1, unit: "px" } },
|
|
2644
2779
|
"border-color": { $$type: "color", value: "#000000" },
|
|
@@ -2646,34 +2781,38 @@ var initialBorder = {
|
|
|
2646
2781
|
};
|
|
2647
2782
|
var BorderField = () => {
|
|
2648
2783
|
const { values, setValues, canEdit } = useStylesFields(Object.keys(initialBorder));
|
|
2784
|
+
const meta = { history: { propDisplayName: BORDER_LABEL } };
|
|
2649
2785
|
const addBorder = () => {
|
|
2650
|
-
setValues(initialBorder);
|
|
2786
|
+
setValues(initialBorder, meta);
|
|
2651
2787
|
};
|
|
2652
2788
|
const removeBorder = () => {
|
|
2653
|
-
setValues(
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2789
|
+
setValues(
|
|
2790
|
+
{
|
|
2791
|
+
"border-width": null,
|
|
2792
|
+
"border-color": null,
|
|
2793
|
+
"border-style": null
|
|
2794
|
+
},
|
|
2795
|
+
meta
|
|
2796
|
+
);
|
|
2658
2797
|
};
|
|
2659
2798
|
const hasBorder = Object.values(values ?? {}).some(Boolean);
|
|
2660
|
-
return /* @__PURE__ */
|
|
2799
|
+
return /* @__PURE__ */ React37.createElement(
|
|
2661
2800
|
AddOrRemoveContent,
|
|
2662
2801
|
{
|
|
2663
2802
|
isAdded: hasBorder,
|
|
2664
2803
|
onAdd: addBorder,
|
|
2665
2804
|
onRemove: removeBorder,
|
|
2666
2805
|
disabled: !canEdit,
|
|
2667
|
-
renderLabel: () => /* @__PURE__ */
|
|
2806
|
+
renderLabel: () => /* @__PURE__ */ React37.createElement(ControlFormLabel3, null, BORDER_LABEL)
|
|
2668
2807
|
},
|
|
2669
|
-
/* @__PURE__ */
|
|
2670
|
-
/* @__PURE__ */
|
|
2671
|
-
/* @__PURE__ */
|
|
2808
|
+
/* @__PURE__ */ React37.createElement(BorderWidthField, null),
|
|
2809
|
+
/* @__PURE__ */ React37.createElement(BorderColorField, null),
|
|
2810
|
+
/* @__PURE__ */ React37.createElement(BorderStyleField, null)
|
|
2672
2811
|
);
|
|
2673
2812
|
};
|
|
2674
2813
|
|
|
2675
2814
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2676
|
-
import * as
|
|
2815
|
+
import * as React39 from "react";
|
|
2677
2816
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
2678
2817
|
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
2679
2818
|
import {
|
|
@@ -2684,89 +2823,96 @@ import {
|
|
|
2684
2823
|
RadiusTopRightIcon
|
|
2685
2824
|
} from "@elementor/icons";
|
|
2686
2825
|
import { withDirection as withDirection2 } from "@elementor/ui";
|
|
2687
|
-
import { __ as
|
|
2826
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
2688
2827
|
|
|
2689
2828
|
// src/styles-inheritance/components/ui-providers.tsx
|
|
2690
|
-
import * as
|
|
2829
|
+
import * as React38 from "react";
|
|
2691
2830
|
import { DirectionProvider, ThemeProvider } from "@elementor/ui";
|
|
2692
2831
|
var UiProviders = ({ children }) => {
|
|
2693
2832
|
const { isSiteRtl } = useDirection();
|
|
2694
|
-
return /* @__PURE__ */
|
|
2833
|
+
return /* @__PURE__ */ React38.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React38.createElement(ThemeProvider, null, children));
|
|
2695
2834
|
};
|
|
2696
2835
|
|
|
2697
2836
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2837
|
+
var BORDER_RADIUS_LABEL = __17("Border radius", "elementor");
|
|
2698
2838
|
var StartStartIcon = withDirection2(RadiusTopLeftIcon);
|
|
2699
2839
|
var StartEndIcon = withDirection2(RadiusTopRightIcon);
|
|
2700
2840
|
var EndStartIcon = withDirection2(RadiusBottomLeftIcon);
|
|
2701
2841
|
var EndEndIcon = withDirection2(RadiusBottomRightIcon);
|
|
2702
|
-
var getStartStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2703
|
-
var getStartEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
2704
|
-
var getEndStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
2705
|
-
var getEndEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
2842
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? __17("Top right", "elementor") : __17("Top left", "elementor");
|
|
2843
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? __17("Top left", "elementor") : __17("Top right", "elementor");
|
|
2844
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? __17("Bottom right", "elementor") : __17("Bottom left", "elementor");
|
|
2845
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? __17("Bottom left", "elementor") : __17("Bottom right", "elementor");
|
|
2706
2846
|
var getCorners = (isSiteRtl) => [
|
|
2707
2847
|
{
|
|
2708
2848
|
label: getStartStartLabel(isSiteRtl),
|
|
2709
|
-
icon: /* @__PURE__ */
|
|
2849
|
+
icon: /* @__PURE__ */ React39.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
2710
2850
|
bind: "start-start"
|
|
2711
2851
|
},
|
|
2712
2852
|
{
|
|
2713
2853
|
label: getStartEndLabel(isSiteRtl),
|
|
2714
|
-
icon: /* @__PURE__ */
|
|
2854
|
+
icon: /* @__PURE__ */ React39.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
2715
2855
|
bind: "start-end"
|
|
2716
2856
|
},
|
|
2717
2857
|
{
|
|
2718
2858
|
label: getEndStartLabel(isSiteRtl),
|
|
2719
|
-
icon: /* @__PURE__ */
|
|
2859
|
+
icon: /* @__PURE__ */ React39.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
2720
2860
|
bind: "end-start"
|
|
2721
2861
|
},
|
|
2722
2862
|
{
|
|
2723
2863
|
label: getEndEndLabel(isSiteRtl),
|
|
2724
|
-
icon: /* @__PURE__ */
|
|
2864
|
+
icon: /* @__PURE__ */ React39.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
2725
2865
|
bind: "end-end"
|
|
2726
2866
|
}
|
|
2727
2867
|
];
|
|
2728
2868
|
var BorderRadiusField = () => {
|
|
2729
2869
|
const { isSiteRtl } = useDirection();
|
|
2730
|
-
return /* @__PURE__ */
|
|
2870
|
+
return /* @__PURE__ */ React39.createElement(UiProviders, null, /* @__PURE__ */ React39.createElement(StylesField, { bind: "border-radius", propDisplayName: BORDER_RADIUS_LABEL }, /* @__PURE__ */ React39.createElement(
|
|
2731
2871
|
EqualUnequalSizesControl2,
|
|
2732
2872
|
{
|
|
2733
2873
|
items: getCorners(isSiteRtl),
|
|
2734
|
-
label:
|
|
2735
|
-
icon: /* @__PURE__ */
|
|
2736
|
-
tooltipLabel:
|
|
2874
|
+
label: BORDER_RADIUS_LABEL,
|
|
2875
|
+
icon: /* @__PURE__ */ React39.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
2876
|
+
tooltipLabel: __17("Adjust corners", "elementor"),
|
|
2737
2877
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
2738
2878
|
}
|
|
2739
2879
|
)));
|
|
2740
2880
|
};
|
|
2741
2881
|
|
|
2742
2882
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2743
|
-
var BorderSection = () => /* @__PURE__ */
|
|
2883
|
+
var BorderSection = () => /* @__PURE__ */ React40.createElement(SectionContent, null, /* @__PURE__ */ React40.createElement(BorderRadiusField, null), /* @__PURE__ */ React40.createElement(PanelDivider, null), /* @__PURE__ */ React40.createElement(BorderField, null));
|
|
2744
2884
|
|
|
2745
2885
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2746
|
-
import * as
|
|
2747
|
-
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
2886
|
+
import * as React42 from "react";
|
|
2887
|
+
import { BoxShadowRepeaterControl, FilterRepeaterControl, TransformRepeaterControl } from "@elementor/editor-controls";
|
|
2888
|
+
import { isExperimentActive as isExperimentActive10 } from "@elementor/editor-v1-adapters";
|
|
2889
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
2748
2890
|
|
|
2749
2891
|
// src/components/style-sections/layout-section/opacity-control-field.tsx
|
|
2750
|
-
import * as
|
|
2892
|
+
import * as React41 from "react";
|
|
2751
2893
|
import { useRef as useRef4 } from "react";
|
|
2752
2894
|
import { SizeControl as SizeControl2 } from "@elementor/editor-controls";
|
|
2753
|
-
import {
|
|
2754
|
-
|
|
2895
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
2896
|
+
var OPACITY_LABEL = __18("Opacity", "elementor");
|
|
2755
2897
|
var OpacityControlField = () => {
|
|
2756
|
-
const rowRef = useRef4();
|
|
2757
|
-
return /* @__PURE__ */
|
|
2898
|
+
const rowRef = useRef4(null);
|
|
2899
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React41.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React41.createElement(SizeControl2, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
|
|
2758
2900
|
};
|
|
2759
2901
|
|
|
2760
2902
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2903
|
+
var BOX_SHADOW_LABEL = __19("Box shadow", "elementor");
|
|
2904
|
+
var FILTER_LABEL = __19("Filter", "elementor");
|
|
2905
|
+
var TRANSFORM_LABEL = __19("Transform", "elementor");
|
|
2761
2906
|
var EffectsSection = () => {
|
|
2762
|
-
|
|
2907
|
+
const isVersion331Active = isExperimentActive10(EXPERIMENTAL_FEATURES.V_3_31);
|
|
2908
|
+
return /* @__PURE__ */ React42.createElement(SectionContent, null, isVersion331Active && /* @__PURE__ */ React42.createElement(React42.Fragment, 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)), isVersion331Active && /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "transform", propDisplayName: TRANSFORM_LABEL }, /* @__PURE__ */ React42.createElement(TransformRepeaterControl, null)), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(StylesField, { bind: "filter", propDisplayName: FILTER_LABEL }, /* @__PURE__ */ React42.createElement(FilterRepeaterControl, null))));
|
|
2763
2909
|
};
|
|
2764
2910
|
|
|
2765
2911
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
2766
|
-
import * as
|
|
2912
|
+
import * as React54 from "react";
|
|
2767
2913
|
import { ControlFormLabel as ControlFormLabel4 } from "@elementor/editor-controls";
|
|
2768
2914
|
import { useParentElement } from "@elementor/editor-elements";
|
|
2769
|
-
import { __ as
|
|
2915
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
2770
2916
|
|
|
2771
2917
|
// src/hooks/use-computed-style.ts
|
|
2772
2918
|
import { __privateUseListenTo as useListenTo, commandEndEvent, windowEvent } from "@elementor/editor-v1-adapters";
|
|
@@ -2794,7 +2940,7 @@ function useComputedStyle(elementId) {
|
|
|
2794
2940
|
}
|
|
2795
2941
|
|
|
2796
2942
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2797
|
-
import * as
|
|
2943
|
+
import * as React44 from "react";
|
|
2798
2944
|
import { ToggleControl } from "@elementor/editor-controls";
|
|
2799
2945
|
import {
|
|
2800
2946
|
JustifyBottomIcon,
|
|
@@ -2804,13 +2950,15 @@ import {
|
|
|
2804
2950
|
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
2805
2951
|
JustifyTopIcon
|
|
2806
2952
|
} from "@elementor/icons";
|
|
2807
|
-
import {
|
|
2808
|
-
import { __ as
|
|
2953
|
+
import { withDirection as withDirection3 } from "@elementor/ui";
|
|
2954
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
2809
2955
|
|
|
2810
2956
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2811
|
-
import * as
|
|
2957
|
+
import * as React43 from "react";
|
|
2812
2958
|
import { useRef as useRef5 } from "react";
|
|
2813
2959
|
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
2960
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
2961
|
+
var FLEX_DIRECTION_LABEL = __20("Flex direction", "elementor");
|
|
2814
2962
|
var CLOCKWISE_ANGLES = {
|
|
2815
2963
|
row: 0,
|
|
2816
2964
|
column: 90,
|
|
@@ -2832,10 +2980,12 @@ var RotatedIcon = ({
|
|
|
2832
2980
|
}) => {
|
|
2833
2981
|
const rotate = useRef5(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2834
2982
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2835
|
-
return /* @__PURE__ */
|
|
2983
|
+
return /* @__PURE__ */ React43.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2836
2984
|
};
|
|
2837
2985
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
2838
|
-
const { value: direction } = useStylesField("flex-direction"
|
|
2986
|
+
const { value: direction } = useStylesField("flex-direction", {
|
|
2987
|
+
history: { propDisplayName: FLEX_DIRECTION_LABEL }
|
|
2988
|
+
});
|
|
2839
2989
|
const isRtl = "rtl" === useTheme2().direction;
|
|
2840
2990
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
2841
2991
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
@@ -2851,6 +3001,7 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
2851
3001
|
};
|
|
2852
3002
|
|
|
2853
3003
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
3004
|
+
var ALIGN_CONTENT_LABEL = __21("Align content", "elementor");
|
|
2854
3005
|
var StartIcon = withDirection3(JustifyTopIcon);
|
|
2855
3006
|
var EndIcon = withDirection3(JustifyBottomIcon);
|
|
2856
3007
|
var iconProps = {
|
|
@@ -2861,47 +3012,45 @@ var iconProps = {
|
|
|
2861
3012
|
var options = [
|
|
2862
3013
|
{
|
|
2863
3014
|
value: "start",
|
|
2864
|
-
label:
|
|
2865
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3015
|
+
label: __21("Start", "elementor"),
|
|
3016
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
2866
3017
|
showTooltip: true
|
|
2867
3018
|
},
|
|
2868
3019
|
{
|
|
2869
3020
|
value: "center",
|
|
2870
|
-
label:
|
|
2871
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3021
|
+
label: __21("Center", "elementor"),
|
|
3022
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
2872
3023
|
showTooltip: true
|
|
2873
3024
|
},
|
|
2874
3025
|
{
|
|
2875
3026
|
value: "end",
|
|
2876
|
-
label:
|
|
2877
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3027
|
+
label: __21("End", "elementor"),
|
|
3028
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
2878
3029
|
showTooltip: true
|
|
2879
3030
|
},
|
|
2880
3031
|
{
|
|
2881
3032
|
value: "space-between",
|
|
2882
|
-
label:
|
|
2883
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3033
|
+
label: __21("Space between", "elementor"),
|
|
3034
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps }),
|
|
2884
3035
|
showTooltip: true
|
|
2885
3036
|
},
|
|
2886
3037
|
{
|
|
2887
3038
|
value: "space-around",
|
|
2888
|
-
label:
|
|
2889
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3039
|
+
label: __21("Space around", "elementor"),
|
|
3040
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps }),
|
|
2890
3041
|
showTooltip: true
|
|
2891
3042
|
},
|
|
2892
3043
|
{
|
|
2893
3044
|
value: "space-evenly",
|
|
2894
|
-
label:
|
|
2895
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3045
|
+
label: __21("Space evenly", "elementor"),
|
|
3046
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps }),
|
|
2896
3047
|
showTooltip: true
|
|
2897
3048
|
}
|
|
2898
3049
|
];
|
|
2899
|
-
var AlignContentField = () => {
|
|
2900
|
-
return /* @__PURE__ */ React43.createElement(UiProviders, null, /* @__PURE__ */ React43.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React43.createElement(Stack10, { gap: 1 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, __17("Align content", "elementor")), /* @__PURE__ */ React43.createElement(ToggleControl, { options, fullWidth: true }))));
|
|
2901
|
-
};
|
|
3050
|
+
var AlignContentField = () => /* @__PURE__ */ React44.createElement(StylesField, { bind: "align-content", propDisplayName: ALIGN_CONTENT_LABEL }, /* @__PURE__ */ React44.createElement(UiProviders, null, /* @__PURE__ */ React44.createElement(StylesFieldLayout, { label: ALIGN_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React44.createElement(ToggleControl, { options, fullWidth: true }))));
|
|
2902
3051
|
|
|
2903
3052
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
2904
|
-
import * as
|
|
3053
|
+
import * as React45 from "react";
|
|
2905
3054
|
import { ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
2906
3055
|
import {
|
|
2907
3056
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
@@ -2909,8 +3058,9 @@ import {
|
|
|
2909
3058
|
LayoutAlignRightIcon,
|
|
2910
3059
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
2911
3060
|
} from "@elementor/icons";
|
|
2912
|
-
import {
|
|
2913
|
-
import { __ as
|
|
3061
|
+
import { withDirection as withDirection4 } from "@elementor/ui";
|
|
3062
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
3063
|
+
var ALIGN_ITEMS_LABEL = __22("Align items", "elementor");
|
|
2914
3064
|
var StartIcon2 = withDirection4(LayoutAlignLeftIcon);
|
|
2915
3065
|
var EndIcon2 = withDirection4(LayoutAlignRightIcon);
|
|
2916
3066
|
var iconProps2 = {
|
|
@@ -2920,35 +3070,35 @@ var iconProps2 = {
|
|
|
2920
3070
|
var options2 = [
|
|
2921
3071
|
{
|
|
2922
3072
|
value: "start",
|
|
2923
|
-
label:
|
|
2924
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3073
|
+
label: __22("Start", "elementor"),
|
|
3074
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
2925
3075
|
showTooltip: true
|
|
2926
3076
|
},
|
|
2927
3077
|
{
|
|
2928
3078
|
value: "center",
|
|
2929
|
-
label:
|
|
2930
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3079
|
+
label: __22("Center", "elementor"),
|
|
3080
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
2931
3081
|
showTooltip: true
|
|
2932
3082
|
},
|
|
2933
3083
|
{
|
|
2934
3084
|
value: "end",
|
|
2935
|
-
label:
|
|
2936
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3085
|
+
label: __22("End", "elementor"),
|
|
3086
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
2937
3087
|
showTooltip: true
|
|
2938
3088
|
},
|
|
2939
3089
|
{
|
|
2940
3090
|
value: "stretch",
|
|
2941
|
-
label:
|
|
2942
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3091
|
+
label: __22("Stretch", "elementor"),
|
|
3092
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps2 }),
|
|
2943
3093
|
showTooltip: true
|
|
2944
3094
|
}
|
|
2945
3095
|
];
|
|
2946
3096
|
var AlignItemsField = () => {
|
|
2947
|
-
return /* @__PURE__ */
|
|
3097
|
+
return /* @__PURE__ */ React45.createElement(UiProviders, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "align-items", propDisplayName: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React45.createElement(StylesFieldLayout, { label: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React45.createElement(ToggleControl2, { options: options2 }))));
|
|
2948
3098
|
};
|
|
2949
3099
|
|
|
2950
3100
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
2951
|
-
import * as
|
|
3101
|
+
import * as React46 from "react";
|
|
2952
3102
|
import { ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
2953
3103
|
import {
|
|
2954
3104
|
LayoutAlignCenterIcon as CenterIcon3,
|
|
@@ -2956,8 +3106,9 @@ import {
|
|
|
2956
3106
|
LayoutAlignRightIcon as LayoutAlignRightIcon2,
|
|
2957
3107
|
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
2958
3108
|
} from "@elementor/icons";
|
|
2959
|
-
import {
|
|
2960
|
-
import { __ as
|
|
3109
|
+
import { withDirection as withDirection5 } from "@elementor/ui";
|
|
3110
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
3111
|
+
var ALIGN_SELF_LABEL = __23("Align self", "elementor");
|
|
2961
3112
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
2962
3113
|
row: 90,
|
|
2963
3114
|
"row-reverse": 90,
|
|
@@ -2972,8 +3123,8 @@ var iconProps3 = {
|
|
|
2972
3123
|
var getOptions = (parentStyleDirection) => [
|
|
2973
3124
|
{
|
|
2974
3125
|
value: "start",
|
|
2975
|
-
label:
|
|
2976
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3126
|
+
label: __23("Start", "elementor"),
|
|
3127
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(
|
|
2977
3128
|
RotatedIcon,
|
|
2978
3129
|
{
|
|
2979
3130
|
icon: StartIcon3,
|
|
@@ -2986,8 +3137,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2986
3137
|
},
|
|
2987
3138
|
{
|
|
2988
3139
|
value: "center",
|
|
2989
|
-
label:
|
|
2990
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3140
|
+
label: __23("Center", "elementor"),
|
|
3141
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(
|
|
2991
3142
|
RotatedIcon,
|
|
2992
3143
|
{
|
|
2993
3144
|
icon: CenterIcon3,
|
|
@@ -3000,8 +3151,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3000
3151
|
},
|
|
3001
3152
|
{
|
|
3002
3153
|
value: "end",
|
|
3003
|
-
label:
|
|
3004
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3154
|
+
label: __23("End", "elementor"),
|
|
3155
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(
|
|
3005
3156
|
RotatedIcon,
|
|
3006
3157
|
{
|
|
3007
3158
|
icon: EndIcon3,
|
|
@@ -3014,8 +3165,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3014
3165
|
},
|
|
3015
3166
|
{
|
|
3016
3167
|
value: "stretch",
|
|
3017
|
-
label:
|
|
3018
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3168
|
+
label: __23("Stretch", "elementor"),
|
|
3169
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(
|
|
3019
3170
|
RotatedIcon,
|
|
3020
3171
|
{
|
|
3021
3172
|
icon: JustifyIcon2,
|
|
@@ -3027,107 +3178,107 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3027
3178
|
showTooltip: true
|
|
3028
3179
|
}
|
|
3029
3180
|
];
|
|
3030
|
-
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
3031
|
-
return /* @__PURE__ */ React45.createElement(UiProviders, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React45.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, __19("Align self", "elementor"))), /* @__PURE__ */ React45.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React45.createElement(ToggleControl3, { options: getOptions(parentStyleDirection) })))));
|
|
3032
|
-
};
|
|
3181
|
+
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React46.createElement(StylesField, { bind: "align-self", propDisplayName: ALIGN_SELF_LABEL }, /* @__PURE__ */ React46.createElement(UiProviders, null, /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: ALIGN_SELF_LABEL }, /* @__PURE__ */ React46.createElement(ToggleControl3, { options: getOptions(parentStyleDirection) }))));
|
|
3033
3182
|
|
|
3034
3183
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
3035
|
-
import * as
|
|
3184
|
+
import * as React47 from "react";
|
|
3036
3185
|
import { ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
3037
|
-
import { isExperimentActive as
|
|
3038
|
-
import {
|
|
3039
|
-
|
|
3186
|
+
import { isExperimentActive as isExperimentActive11 } from "@elementor/editor-v1-adapters";
|
|
3187
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
3188
|
+
var DISPLAY_LABEL = __24("Display", "elementor");
|
|
3040
3189
|
var displayFieldItems = [
|
|
3041
3190
|
{
|
|
3042
3191
|
value: "block",
|
|
3043
|
-
renderContent: () =>
|
|
3044
|
-
label:
|
|
3192
|
+
renderContent: () => __24("Block", "elementor"),
|
|
3193
|
+
label: __24("Block", "elementor"),
|
|
3045
3194
|
showTooltip: true
|
|
3046
3195
|
},
|
|
3047
3196
|
{
|
|
3048
3197
|
value: "flex",
|
|
3049
|
-
renderContent: () =>
|
|
3050
|
-
label:
|
|
3198
|
+
renderContent: () => __24("Flex", "elementor"),
|
|
3199
|
+
label: __24("Flex", "elementor"),
|
|
3051
3200
|
showTooltip: true
|
|
3052
3201
|
},
|
|
3053
3202
|
{
|
|
3054
3203
|
value: "inline-block",
|
|
3055
|
-
renderContent: () =>
|
|
3056
|
-
label:
|
|
3204
|
+
renderContent: () => __24("In-blk", "elementor"),
|
|
3205
|
+
label: __24("Inline-block", "elementor"),
|
|
3057
3206
|
showTooltip: true
|
|
3058
3207
|
}
|
|
3059
3208
|
];
|
|
3060
3209
|
var DisplayField = () => {
|
|
3061
|
-
const isDisplayNoneFeatureActive =
|
|
3210
|
+
const isDisplayNoneFeatureActive = isExperimentActive11(EXPERIMENTAL_FEATURES.V_3_30);
|
|
3062
3211
|
const items3 = [...displayFieldItems];
|
|
3063
3212
|
if (isDisplayNoneFeatureActive) {
|
|
3064
3213
|
items3.push({
|
|
3065
3214
|
value: "none",
|
|
3066
|
-
renderContent: () =>
|
|
3067
|
-
label:
|
|
3215
|
+
renderContent: () => __24("None", "elementor"),
|
|
3216
|
+
label: __24("None", "elementor"),
|
|
3068
3217
|
showTooltip: true
|
|
3069
3218
|
});
|
|
3070
3219
|
}
|
|
3071
3220
|
items3.push({
|
|
3072
3221
|
value: "inline-flex",
|
|
3073
|
-
renderContent: () =>
|
|
3074
|
-
label:
|
|
3222
|
+
renderContent: () => __24("In-flx", "elementor"),
|
|
3223
|
+
label: __24("Inline-flex", "elementor"),
|
|
3075
3224
|
showTooltip: true
|
|
3076
3225
|
});
|
|
3077
3226
|
const placeholder = useDisplayPlaceholderValue();
|
|
3078
|
-
return /* @__PURE__ */
|
|
3227
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "display", propDisplayName: DISPLAY_LABEL, placeholder }, /* @__PURE__ */ React47.createElement(StylesFieldLayout, { label: DISPLAY_LABEL, direction: "column" }, /* @__PURE__ */ React47.createElement(ToggleControl4, { options: items3, maxItems: 4, fullWidth: true })));
|
|
3079
3228
|
};
|
|
3080
3229
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
3081
3230
|
|
|
3082
3231
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
3083
|
-
import * as
|
|
3232
|
+
import * as React48 from "react";
|
|
3084
3233
|
import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
3085
3234
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
3086
|
-
import {
|
|
3087
|
-
import { __ as
|
|
3235
|
+
import { withDirection as withDirection6 } from "@elementor/ui";
|
|
3236
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
3237
|
+
var FLEX_DIRECTION_LABEL2 = __25("Direction", "elementor");
|
|
3088
3238
|
var options3 = [
|
|
3089
3239
|
{
|
|
3090
3240
|
value: "row",
|
|
3091
|
-
label:
|
|
3241
|
+
label: __25("Row", "elementor"),
|
|
3092
3242
|
renderContent: ({ size }) => {
|
|
3093
3243
|
const StartIcon5 = withDirection6(ArrowRightIcon);
|
|
3094
|
-
return /* @__PURE__ */
|
|
3244
|
+
return /* @__PURE__ */ React48.createElement(StartIcon5, { fontSize: size });
|
|
3095
3245
|
},
|
|
3096
3246
|
showTooltip: true
|
|
3097
3247
|
},
|
|
3098
3248
|
{
|
|
3099
3249
|
value: "column",
|
|
3100
|
-
label:
|
|
3101
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3250
|
+
label: __25("Column", "elementor"),
|
|
3251
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
3102
3252
|
showTooltip: true
|
|
3103
3253
|
},
|
|
3104
3254
|
{
|
|
3105
3255
|
value: "row-reverse",
|
|
3106
|
-
label:
|
|
3256
|
+
label: __25("Reversed row", "elementor"),
|
|
3107
3257
|
renderContent: ({ size }) => {
|
|
3108
3258
|
const EndIcon5 = withDirection6(ArrowLeftIcon);
|
|
3109
|
-
return /* @__PURE__ */
|
|
3259
|
+
return /* @__PURE__ */ React48.createElement(EndIcon5, { fontSize: size });
|
|
3110
3260
|
},
|
|
3111
3261
|
showTooltip: true
|
|
3112
3262
|
},
|
|
3113
3263
|
{
|
|
3114
3264
|
value: "column-reverse",
|
|
3115
|
-
label:
|
|
3116
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3265
|
+
label: __25("Reversed column", "elementor"),
|
|
3266
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
3117
3267
|
showTooltip: true
|
|
3118
3268
|
}
|
|
3119
3269
|
];
|
|
3120
3270
|
var FlexDirectionField = () => {
|
|
3121
|
-
return /* @__PURE__ */
|
|
3271
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "flex-direction", propDisplayName: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(StylesFieldLayout, { label: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React48.createElement(ToggleControl5, { options: options3 }))));
|
|
3122
3272
|
};
|
|
3123
3273
|
|
|
3124
3274
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3125
|
-
import * as
|
|
3275
|
+
import * as React49 from "react";
|
|
3126
3276
|
import { useState as useState10 } from "react";
|
|
3127
3277
|
import { ControlToggleButtonGroup, NumberControl } from "@elementor/editor-controls";
|
|
3128
3278
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
3129
|
-
import { Grid as
|
|
3130
|
-
import { __ as
|
|
3279
|
+
import { Grid as Grid2 } from "@elementor/ui";
|
|
3280
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
3281
|
+
var ORDER_LABEL = __26("Order", "elementor");
|
|
3131
3282
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
3132
3283
|
var LAST_DEFAULT_VALUE = 99999;
|
|
3133
3284
|
var FIRST = "first";
|
|
@@ -3140,25 +3291,31 @@ var orderValueMap = {
|
|
|
3140
3291
|
var items = [
|
|
3141
3292
|
{
|
|
3142
3293
|
value: FIRST,
|
|
3143
|
-
label:
|
|
3144
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3294
|
+
label: __26("First", "elementor"),
|
|
3295
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
3145
3296
|
showTooltip: true
|
|
3146
3297
|
},
|
|
3147
3298
|
{
|
|
3148
3299
|
value: LAST,
|
|
3149
|
-
label:
|
|
3150
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3300
|
+
label: __26("Last", "elementor"),
|
|
3301
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
3151
3302
|
showTooltip: true
|
|
3152
3303
|
},
|
|
3153
3304
|
{
|
|
3154
3305
|
value: CUSTOM,
|
|
3155
|
-
label:
|
|
3156
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3306
|
+
label: __26("Custom", "elementor"),
|
|
3307
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(PencilIcon, { fontSize: size }),
|
|
3157
3308
|
showTooltip: true
|
|
3158
3309
|
}
|
|
3159
3310
|
];
|
|
3160
3311
|
var FlexOrderField = () => {
|
|
3161
|
-
const {
|
|
3312
|
+
const {
|
|
3313
|
+
value: order,
|
|
3314
|
+
setValue: setOrder,
|
|
3315
|
+
canEdit
|
|
3316
|
+
} = useStylesField("order", {
|
|
3317
|
+
history: { propDisplayName: ORDER_LABEL }
|
|
3318
|
+
});
|
|
3162
3319
|
const [groupControlValue, setGroupControlValue] = useState10(getGroupControlValue(order?.value || null));
|
|
3163
3320
|
const handleToggleButtonChange = (group) => {
|
|
3164
3321
|
setGroupControlValue(group);
|
|
@@ -3168,7 +3325,7 @@ var FlexOrderField = () => {
|
|
|
3168
3325
|
}
|
|
3169
3326
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
3170
3327
|
};
|
|
3171
|
-
return /* @__PURE__ */
|
|
3328
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "order", propDisplayName: ORDER_LABEL }, /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(StylesFieldLayout, { label: ORDER_LABEL }, /* @__PURE__ */ React49.createElement(
|
|
3172
3329
|
ControlToggleButtonGroup,
|
|
3173
3330
|
{
|
|
3174
3331
|
items,
|
|
@@ -3177,7 +3334,7 @@ var FlexOrderField = () => {
|
|
|
3177
3334
|
exclusive: true,
|
|
3178
3335
|
disabled: !canEdit
|
|
3179
3336
|
}
|
|
3180
|
-
))
|
|
3337
|
+
)), CUSTOM === groupControlValue && /* @__PURE__ */ React49.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __26("Custom order", "elementor"))), /* @__PURE__ */ React49.createElement(Grid2, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(
|
|
3181
3338
|
NumberControl,
|
|
3182
3339
|
{
|
|
3183
3340
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -3197,8 +3354,8 @@ var getGroupControlValue = (order) => {
|
|
|
3197
3354
|
};
|
|
3198
3355
|
|
|
3199
3356
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3200
|
-
import * as
|
|
3201
|
-
import { useMemo as
|
|
3357
|
+
import * as React50 from "react";
|
|
3358
|
+
import { useMemo as useMemo6, useRef as useRef6, useState as useState11 } from "react";
|
|
3202
3359
|
import {
|
|
3203
3360
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
3204
3361
|
NumberControl as NumberControl2,
|
|
@@ -3206,26 +3363,26 @@ import {
|
|
|
3206
3363
|
} from "@elementor/editor-controls";
|
|
3207
3364
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
3208
3365
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
3209
|
-
import {
|
|
3210
|
-
|
|
3366
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
3367
|
+
var FLEX_SIZE_LABEL = __27("Flex Size", "elementor");
|
|
3211
3368
|
var DEFAULT = 1;
|
|
3212
3369
|
var items2 = [
|
|
3213
3370
|
{
|
|
3214
3371
|
value: "flex-grow",
|
|
3215
|
-
label:
|
|
3216
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3372
|
+
label: __27("Grow", "elementor"),
|
|
3373
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(ExpandIcon, { fontSize: size }),
|
|
3217
3374
|
showTooltip: true
|
|
3218
3375
|
},
|
|
3219
3376
|
{
|
|
3220
3377
|
value: "flex-shrink",
|
|
3221
|
-
label:
|
|
3222
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3378
|
+
label: __27("Shrink", "elementor"),
|
|
3379
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(ShrinkIcon, { fontSize: size }),
|
|
3223
3380
|
showTooltip: true
|
|
3224
3381
|
},
|
|
3225
3382
|
{
|
|
3226
3383
|
value: "custom",
|
|
3227
|
-
label:
|
|
3228
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3384
|
+
label: __27("Custom", "elementor"),
|
|
3385
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(PencilIcon2, { fontSize: size }),
|
|
3229
3386
|
showTooltip: true
|
|
3230
3387
|
}
|
|
3231
3388
|
];
|
|
@@ -3234,32 +3391,32 @@ var FlexSizeField = () => {
|
|
|
3234
3391
|
const grow = values?.["flex-grow"]?.value || null;
|
|
3235
3392
|
const shrink = values?.["flex-shrink"]?.value || null;
|
|
3236
3393
|
const basis = values?.["flex-basis"]?.value || null;
|
|
3237
|
-
const currentGroup =
|
|
3394
|
+
const currentGroup = useMemo6(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = useState11(currentGroup);
|
|
3238
3395
|
const onChangeGroup = (group = null) => {
|
|
3239
3396
|
setActiveGroup(group);
|
|
3397
|
+
let props;
|
|
3240
3398
|
if (!group || group === "custom") {
|
|
3241
|
-
|
|
3399
|
+
props = {
|
|
3242
3400
|
"flex-basis": null,
|
|
3243
3401
|
"flex-grow": null,
|
|
3244
3402
|
"flex-shrink": null
|
|
3245
|
-
}
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
if (group === "flex-grow") {
|
|
3249
|
-
setValues({
|
|
3403
|
+
};
|
|
3404
|
+
} else if (group === "flex-grow") {
|
|
3405
|
+
props = {
|
|
3250
3406
|
"flex-basis": null,
|
|
3251
3407
|
"flex-grow": numberPropTypeUtil.create(DEFAULT),
|
|
3252
3408
|
"flex-shrink": null
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3409
|
+
};
|
|
3410
|
+
} else {
|
|
3411
|
+
props = {
|
|
3412
|
+
"flex-basis": null,
|
|
3413
|
+
"flex-grow": null,
|
|
3414
|
+
"flex-shrink": numberPropTypeUtil.create(DEFAULT)
|
|
3415
|
+
};
|
|
3255
3416
|
}
|
|
3256
|
-
setValues({
|
|
3257
|
-
"flex-basis": null,
|
|
3258
|
-
"flex-grow": null,
|
|
3259
|
-
"flex-shrink": numberPropTypeUtil.create(DEFAULT)
|
|
3260
|
-
});
|
|
3417
|
+
setValues(props, { history: { propDisplayName: FLEX_SIZE_LABEL } });
|
|
3261
3418
|
};
|
|
3262
|
-
return /* @__PURE__ */
|
|
3419
|
+
return /* @__PURE__ */ React50.createElement(UiProviders, null, /* @__PURE__ */ React50.createElement(SectionContent, null, /* @__PURE__ */ React50.createElement(StylesField, { bind: activeGroup ?? "", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: FLEX_SIZE_LABEL }, /* @__PURE__ */ React50.createElement(
|
|
3263
3420
|
ControlToggleButtonGroup2,
|
|
3264
3421
|
{
|
|
3265
3422
|
value: activeGroup,
|
|
@@ -3268,11 +3425,11 @@ var FlexSizeField = () => {
|
|
|
3268
3425
|
items: items2,
|
|
3269
3426
|
exclusive: true
|
|
3270
3427
|
}
|
|
3271
|
-
)))
|
|
3428
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React50.createElement(FlexCustomField, null)));
|
|
3272
3429
|
};
|
|
3273
3430
|
var FlexCustomField = () => {
|
|
3274
|
-
const flexBasisRowRef = useRef6();
|
|
3275
|
-
return /* @__PURE__ */
|
|
3431
|
+
const flexBasisRowRef = useRef6(null);
|
|
3432
|
+
return /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(StylesField, { bind: "flex-grow", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: __27("Grow", "elementor") }, /* @__PURE__ */ React50.createElement(NumberControl2, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React50.createElement(StylesField, { bind: "flex-shrink", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: __27("Shrink", "elementor") }, /* @__PURE__ */ React50.createElement(NumberControl2, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React50.createElement(StylesField, { bind: "flex-basis", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: __27("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React50.createElement(SizeControl3, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef }))));
|
|
3276
3433
|
};
|
|
3277
3434
|
var getActiveGroup = ({
|
|
3278
3435
|
grow,
|
|
@@ -3295,16 +3452,16 @@ var getActiveGroup = ({
|
|
|
3295
3452
|
};
|
|
3296
3453
|
|
|
3297
3454
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3298
|
-
import * as
|
|
3455
|
+
import * as React51 from "react";
|
|
3299
3456
|
import { GapControl } from "@elementor/editor-controls";
|
|
3300
|
-
import {
|
|
3301
|
-
|
|
3457
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
3458
|
+
var GAPS_LABEL = __28("Gaps", "elementor");
|
|
3302
3459
|
var GapControlField = () => {
|
|
3303
|
-
return /* @__PURE__ */
|
|
3460
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "gap", propDisplayName: GAPS_LABEL }, /* @__PURE__ */ React51.createElement(GapControl, { label: GAPS_LABEL }));
|
|
3304
3461
|
};
|
|
3305
3462
|
|
|
3306
3463
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3307
|
-
import * as
|
|
3464
|
+
import * as React52 from "react";
|
|
3308
3465
|
import { ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
3309
3466
|
import {
|
|
3310
3467
|
JustifyBottomIcon as JustifyBottomIcon2,
|
|
@@ -3314,8 +3471,9 @@ import {
|
|
|
3314
3471
|
JustifySpaceBetweenVerticalIcon as BetweenIcon2,
|
|
3315
3472
|
JustifyTopIcon as JustifyTopIcon2
|
|
3316
3473
|
} from "@elementor/icons";
|
|
3317
|
-
import {
|
|
3318
|
-
import { __ as
|
|
3474
|
+
import { withDirection as withDirection7 } from "@elementor/ui";
|
|
3475
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
3476
|
+
var JUSTIFY_CONTENT_LABEL = __29("Justify content", "elementor");
|
|
3319
3477
|
var StartIcon4 = withDirection7(JustifyTopIcon2);
|
|
3320
3478
|
var EndIcon4 = withDirection7(JustifyBottomIcon2);
|
|
3321
3479
|
var iconProps4 = {
|
|
@@ -3325,91 +3483,95 @@ var iconProps4 = {
|
|
|
3325
3483
|
var options4 = [
|
|
3326
3484
|
{
|
|
3327
3485
|
value: "flex-start",
|
|
3328
|
-
label:
|
|
3329
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3486
|
+
label: __29("Start", "elementor"),
|
|
3487
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
3330
3488
|
showTooltip: true
|
|
3331
3489
|
},
|
|
3332
3490
|
{
|
|
3333
3491
|
value: "center",
|
|
3334
|
-
label:
|
|
3335
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3492
|
+
label: __29("Center", "elementor"),
|
|
3493
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: CenterIcon4, size, ...iconProps4 }),
|
|
3336
3494
|
showTooltip: true
|
|
3337
3495
|
},
|
|
3338
3496
|
{
|
|
3339
3497
|
value: "flex-end",
|
|
3340
|
-
label:
|
|
3341
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3498
|
+
label: __29("End", "elementor"),
|
|
3499
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
3342
3500
|
showTooltip: true
|
|
3343
3501
|
},
|
|
3344
3502
|
{
|
|
3345
3503
|
value: "space-between",
|
|
3346
|
-
label:
|
|
3347
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3504
|
+
label: __29("Space between", "elementor"),
|
|
3505
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: BetweenIcon2, size, ...iconProps4 }),
|
|
3348
3506
|
showTooltip: true
|
|
3349
3507
|
},
|
|
3350
3508
|
{
|
|
3351
3509
|
value: "space-around",
|
|
3352
|
-
label:
|
|
3353
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3510
|
+
label: __29("Space around", "elementor"),
|
|
3511
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: AroundIcon2, size, ...iconProps4 }),
|
|
3354
3512
|
showTooltip: true
|
|
3355
3513
|
},
|
|
3356
3514
|
{
|
|
3357
3515
|
value: "space-evenly",
|
|
3358
|
-
label:
|
|
3359
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3516
|
+
label: __29("Space evenly", "elementor"),
|
|
3517
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: EvenlyIcon2, size, ...iconProps4 }),
|
|
3360
3518
|
showTooltip: true
|
|
3361
3519
|
}
|
|
3362
3520
|
];
|
|
3363
|
-
var JustifyContentField = () => {
|
|
3364
|
-
return /* @__PURE__ */ React51.createElement(UiProviders, null, /* @__PURE__ */ React51.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React51.createElement(Stack13, { gap: 0.75 }, /* @__PURE__ */ React51.createElement(ControlLabel, null, __25("Justify content", "elementor")), /* @__PURE__ */ React51.createElement(ToggleControl6, { options: options4, fullWidth: true }))));
|
|
3365
|
-
};
|
|
3521
|
+
var JustifyContentField = () => /* @__PURE__ */ React52.createElement(StylesField, { bind: "justify-content", propDisplayName: JUSTIFY_CONTENT_LABEL }, /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: JUSTIFY_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React52.createElement(ToggleControl6, { options: options4, fullWidth: true }))));
|
|
3366
3522
|
|
|
3367
3523
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3368
|
-
import * as
|
|
3524
|
+
import * as React53 from "react";
|
|
3369
3525
|
import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
3370
3526
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
3371
|
-
import {
|
|
3372
|
-
|
|
3527
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
3528
|
+
var FLEX_WRAP_LABEL = __30("Wrap", "elementor");
|
|
3373
3529
|
var options5 = [
|
|
3374
3530
|
{
|
|
3375
3531
|
value: "nowrap",
|
|
3376
|
-
label:
|
|
3377
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3532
|
+
label: __30("No wrap", "elementor"),
|
|
3533
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
3378
3534
|
showTooltip: true
|
|
3379
3535
|
},
|
|
3380
3536
|
{
|
|
3381
3537
|
value: "wrap",
|
|
3382
|
-
label:
|
|
3383
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3538
|
+
label: __30("Wrap", "elementor"),
|
|
3539
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(ArrowBackIcon, { fontSize: size }),
|
|
3384
3540
|
showTooltip: true
|
|
3385
3541
|
},
|
|
3386
3542
|
{
|
|
3387
3543
|
value: "wrap-reverse",
|
|
3388
|
-
label:
|
|
3389
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3544
|
+
label: __30("Reversed wrap", "elementor"),
|
|
3545
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
3390
3546
|
showTooltip: true
|
|
3391
3547
|
}
|
|
3392
3548
|
];
|
|
3393
3549
|
var WrapField = () => {
|
|
3394
|
-
return /* @__PURE__ */
|
|
3550
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "flex-wrap", propDisplayName: FLEX_WRAP_LABEL }, /* @__PURE__ */ React53.createElement(UiProviders, null, /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: FLEX_WRAP_LABEL }, /* @__PURE__ */ React53.createElement(ToggleControl7, { options: options5 }))));
|
|
3395
3551
|
};
|
|
3396
3552
|
|
|
3397
3553
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3554
|
+
var DISPLAY_LABEL2 = __31("Display", "elementor");
|
|
3555
|
+
var FLEX_WRAP_LABEL2 = __31("Flex wrap", "elementor");
|
|
3398
3556
|
var LayoutSection = () => {
|
|
3399
|
-
const { value: display } = useStylesField("display"
|
|
3557
|
+
const { value: display } = useStylesField("display", {
|
|
3558
|
+
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
3559
|
+
});
|
|
3400
3560
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
3401
3561
|
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
3402
3562
|
const { element } = useElement();
|
|
3403
3563
|
const parent = useParentElement(element.id);
|
|
3404
3564
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3405
3565
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
3406
|
-
return /* @__PURE__ */
|
|
3566
|
+
return /* @__PURE__ */ React54.createElement(SectionContent, null, /* @__PURE__ */ React54.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React54.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React54.createElement(FlexChildFields, { parentStyleDirection }));
|
|
3407
3567
|
};
|
|
3408
3568
|
var FlexFields = () => {
|
|
3409
|
-
const { value: flexWrap } = useStylesField("flex-wrap"
|
|
3410
|
-
|
|
3569
|
+
const { value: flexWrap } = useStylesField("flex-wrap", {
|
|
3570
|
+
history: { propDisplayName: FLEX_WRAP_LABEL2 }
|
|
3571
|
+
});
|
|
3572
|
+
return /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(FlexDirectionField, null), /* @__PURE__ */ React54.createElement(JustifyContentField, null), /* @__PURE__ */ React54.createElement(AlignItemsField, null), /* @__PURE__ */ React54.createElement(PanelDivider, null), /* @__PURE__ */ React54.createElement(GapControlField, null), /* @__PURE__ */ React54.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React54.createElement(AlignContentField, null));
|
|
3411
3573
|
};
|
|
3412
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3574
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(PanelDivider, null), /* @__PURE__ */ React54.createElement(ControlFormLabel4, null, __31("Flex child", "elementor")), /* @__PURE__ */ React54.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React54.createElement(FlexOrderField, null), /* @__PURE__ */ React54.createElement(FlexSizeField, null));
|
|
3413
3575
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3414
3576
|
const value = display?.value ?? local?.value;
|
|
3415
3577
|
if (!value) {
|
|
@@ -3419,38 +3581,39 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3419
3581
|
};
|
|
3420
3582
|
|
|
3421
3583
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3422
|
-
import * as
|
|
3423
|
-
import { isExperimentActive as
|
|
3584
|
+
import * as React59 from "react";
|
|
3585
|
+
import { isExperimentActive as isExperimentActive12 } from "@elementor/editor-v1-adapters";
|
|
3424
3586
|
import { useSessionStorage } from "@elementor/session";
|
|
3587
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
3425
3588
|
|
|
3426
3589
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3427
|
-
import * as
|
|
3590
|
+
import * as React55 from "react";
|
|
3428
3591
|
import { useRef as useRef7 } from "react";
|
|
3429
3592
|
import { SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
3430
3593
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
3431
|
-
import { Grid as
|
|
3432
|
-
import { __ as
|
|
3594
|
+
import { Grid as Grid3, Stack as Stack11, withDirection as withDirection8 } from "@elementor/ui";
|
|
3595
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
3433
3596
|
var InlineStartIcon2 = withDirection8(SideLeftIcon2);
|
|
3434
3597
|
var InlineEndIcon2 = withDirection8(SideRightIcon2);
|
|
3435
3598
|
var sideIcons = {
|
|
3436
|
-
"inset-block-start": /* @__PURE__ */
|
|
3437
|
-
"inset-block-end": /* @__PURE__ */
|
|
3438
|
-
"inset-inline-start": /* @__PURE__ */
|
|
3439
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3599
|
+
"inset-block-start": /* @__PURE__ */ React55.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
3600
|
+
"inset-block-end": /* @__PURE__ */ React55.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
3601
|
+
"inset-inline-start": /* @__PURE__ */ React55.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
3602
|
+
"inset-inline-end": /* @__PURE__ */ React55.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
3440
3603
|
};
|
|
3441
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
3442
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
3604
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __32("Right", "elementor") : __32("Left", "elementor");
|
|
3605
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __32("Left", "elementor") : __32("Right", "elementor");
|
|
3443
3606
|
var DimensionsField = () => {
|
|
3444
3607
|
const { isSiteRtl } = useDirection();
|
|
3445
|
-
const rowRefs = [useRef7(), useRef7()];
|
|
3446
|
-
return /* @__PURE__ */
|
|
3608
|
+
const rowRefs = [useRef7(null), useRef7(null)];
|
|
3609
|
+
return /* @__PURE__ */ React55.createElement(UiProviders, null, /* @__PURE__ */ React55.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React55.createElement(DimensionField, { side: "inset-block-start", label: __32("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React55.createElement(
|
|
3447
3610
|
DimensionField,
|
|
3448
3611
|
{
|
|
3449
3612
|
side: "inset-inline-end",
|
|
3450
3613
|
label: getInlineEndLabel(isSiteRtl),
|
|
3451
3614
|
rowRef: rowRefs[0]
|
|
3452
3615
|
}
|
|
3453
|
-
)), /* @__PURE__ */
|
|
3616
|
+
)), /* @__PURE__ */ React55.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React55.createElement(DimensionField, { side: "inset-block-end", label: __32("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React55.createElement(
|
|
3454
3617
|
DimensionField,
|
|
3455
3618
|
{
|
|
3456
3619
|
side: "inset-inline-start",
|
|
@@ -3463,47 +3626,52 @@ var DimensionField = ({
|
|
|
3463
3626
|
side,
|
|
3464
3627
|
label,
|
|
3465
3628
|
rowRef
|
|
3466
|
-
}) => /* @__PURE__ */
|
|
3629
|
+
}) => /* @__PURE__ */ React55.createElement(StylesField, { bind: side, propDisplayName: label }, /* @__PURE__ */ React55.createElement(Grid3, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React55.createElement(Grid3, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, label)), /* @__PURE__ */ React55.createElement(Grid3, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(SizeControl4, { startIcon: sideIcons[side], extendedOptions: ["auto"], anchorRef: rowRef }))));
|
|
3467
3630
|
|
|
3468
3631
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3469
|
-
import * as
|
|
3632
|
+
import * as React56 from "react";
|
|
3470
3633
|
import { useRef as useRef8 } from "react";
|
|
3471
3634
|
import { SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
3472
|
-
import {
|
|
3473
|
-
|
|
3635
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
3636
|
+
var OFFSET_LABEL = __33("Anchor offset", "elementor");
|
|
3637
|
+
var UNITS = ["px", "em", "rem", "vw", "vh"];
|
|
3474
3638
|
var OffsetField = () => {
|
|
3475
|
-
const rowRef = useRef8();
|
|
3476
|
-
return /* @__PURE__ */
|
|
3639
|
+
const rowRef = useRef8(null);
|
|
3640
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React56.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React56.createElement(SizeControl5, { units: UNITS, anchorRef: rowRef })));
|
|
3477
3641
|
};
|
|
3478
3642
|
|
|
3479
3643
|
// src/components/style-sections/position-section/position-field.tsx
|
|
3480
|
-
import * as
|
|
3644
|
+
import * as React57 from "react";
|
|
3481
3645
|
import { SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
3482
|
-
import {
|
|
3483
|
-
|
|
3646
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
3647
|
+
var POSITION_LABEL = __34("Position", "elementor");
|
|
3484
3648
|
var positionOptions = [
|
|
3485
|
-
{ label:
|
|
3486
|
-
{ label:
|
|
3487
|
-
{ label:
|
|
3488
|
-
{ label:
|
|
3489
|
-
{ label:
|
|
3649
|
+
{ label: __34("Static", "elementor"), value: "static" },
|
|
3650
|
+
{ label: __34("Relative", "elementor"), value: "relative" },
|
|
3651
|
+
{ label: __34("Absolute", "elementor"), value: "absolute" },
|
|
3652
|
+
{ label: __34("Fixed", "elementor"), value: "fixed" },
|
|
3653
|
+
{ label: __34("Sticky", "elementor"), value: "sticky" }
|
|
3490
3654
|
];
|
|
3491
3655
|
var PositionField = ({ onChange }) => {
|
|
3492
|
-
return /* @__PURE__ */
|
|
3656
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "position", propDisplayName: POSITION_LABEL }, /* @__PURE__ */ React57.createElement(StylesFieldLayout, { label: POSITION_LABEL }, /* @__PURE__ */ React57.createElement(SelectControl3, { options: positionOptions, onChange })));
|
|
3493
3657
|
};
|
|
3494
3658
|
|
|
3495
3659
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
3496
|
-
import * as
|
|
3660
|
+
import * as React58 from "react";
|
|
3497
3661
|
import { NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
3498
|
-
import {
|
|
3499
|
-
|
|
3662
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
3663
|
+
var Z_INDEX_LABEL = __35("Z-index", "elementor");
|
|
3500
3664
|
var ZIndexField = () => {
|
|
3501
|
-
return /* @__PURE__ */
|
|
3665
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "z-index", propDisplayName: Z_INDEX_LABEL }, /* @__PURE__ */ React58.createElement(StylesFieldLayout, { label: Z_INDEX_LABEL }, /* @__PURE__ */ React58.createElement(NumberControl3, null)));
|
|
3502
3666
|
};
|
|
3503
3667
|
|
|
3504
3668
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3669
|
+
var POSITION_LABEL2 = __36("Position", "elementor");
|
|
3670
|
+
var DIMENSIONS_LABEL = __36("Dimensions", "elementor");
|
|
3505
3671
|
var PositionSection = () => {
|
|
3506
|
-
const { value: positionValue } = useStylesField("position"
|
|
3672
|
+
const { value: positionValue } = useStylesField("position", {
|
|
3673
|
+
history: { propDisplayName: POSITION_LABEL2 }
|
|
3674
|
+
});
|
|
3507
3675
|
const { values: dimensions, setValues: setDimensions } = useStylesFields([
|
|
3508
3676
|
"inset-block-start",
|
|
3509
3677
|
"inset-block-end",
|
|
@@ -3511,27 +3679,31 @@ var PositionSection = () => {
|
|
|
3511
3679
|
"inset-inline-end"
|
|
3512
3680
|
]);
|
|
3513
3681
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
3514
|
-
const isCssIdFeatureActive =
|
|
3682
|
+
const isCssIdFeatureActive = isExperimentActive12("e_v_3_30");
|
|
3515
3683
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
3684
|
+
const meta = { history: { propDisplayName: DIMENSIONS_LABEL } };
|
|
3516
3685
|
if (newPosition === "static") {
|
|
3517
3686
|
if (dimensions) {
|
|
3518
3687
|
updateDimensionsHistory(dimensions);
|
|
3519
|
-
setDimensions(
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3688
|
+
setDimensions(
|
|
3689
|
+
{
|
|
3690
|
+
"inset-block-start": void 0,
|
|
3691
|
+
"inset-block-end": void 0,
|
|
3692
|
+
"inset-inline-start": void 0,
|
|
3693
|
+
"inset-inline-end": void 0
|
|
3694
|
+
},
|
|
3695
|
+
meta
|
|
3696
|
+
);
|
|
3525
3697
|
}
|
|
3526
3698
|
} else if (previousPosition === "static") {
|
|
3527
3699
|
if (dimensionsValuesFromHistory) {
|
|
3528
|
-
setDimensions(dimensionsValuesFromHistory);
|
|
3700
|
+
setDimensions(dimensionsValuesFromHistory, meta);
|
|
3529
3701
|
clearDimensionsHistory();
|
|
3530
3702
|
}
|
|
3531
3703
|
}
|
|
3532
3704
|
};
|
|
3533
3705
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
3534
|
-
return /* @__PURE__ */
|
|
3706
|
+
return /* @__PURE__ */ React59.createElement(SectionContent, null, /* @__PURE__ */ React59.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(DimensionsField, null), /* @__PURE__ */ React59.createElement(ZIndexField, null)) : null, isCssIdFeatureActive && /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(PanelDivider, null), /* @__PURE__ */ React59.createElement(OffsetField, null)));
|
|
3535
3707
|
};
|
|
3536
3708
|
var usePersistDimensions = () => {
|
|
3537
3709
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -3541,22 +3713,22 @@ var usePersistDimensions = () => {
|
|
|
3541
3713
|
};
|
|
3542
3714
|
|
|
3543
3715
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3544
|
-
import * as
|
|
3716
|
+
import * as React65 from "react";
|
|
3545
3717
|
import { useRef as useRef9 } from "react";
|
|
3546
3718
|
import { AspectRatioControl, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
3547
|
-
import { isExperimentActive as
|
|
3548
|
-
import { Grid as
|
|
3549
|
-
import { __ as
|
|
3719
|
+
import { isExperimentActive as isExperimentActive14 } from "@elementor/editor-v1-adapters";
|
|
3720
|
+
import { Grid as Grid4, Stack as Stack13 } from "@elementor/ui";
|
|
3721
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
3550
3722
|
|
|
3551
3723
|
// src/components/style-tab-collapsible-content.tsx
|
|
3552
|
-
import * as
|
|
3553
|
-
import { isExperimentActive as
|
|
3724
|
+
import * as React61 from "react";
|
|
3725
|
+
import { isExperimentActive as isExperimentActive13 } from "@elementor/editor-v1-adapters";
|
|
3554
3726
|
|
|
3555
3727
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
3556
|
-
import * as
|
|
3557
|
-
import { isElementsStylesProvider as
|
|
3558
|
-
import { Stack as
|
|
3559
|
-
import { __ as
|
|
3728
|
+
import * as React60 from "react";
|
|
3729
|
+
import { isElementsStylesProvider as isElementsStylesProvider4 } from "@elementor/editor-styles-repository";
|
|
3730
|
+
import { Stack as Stack12, Tooltip as Tooltip7 } from "@elementor/ui";
|
|
3731
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
3560
3732
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
3561
3733
|
const { id, meta, provider } = useStyle();
|
|
3562
3734
|
const snapshot = useStylesInheritanceSnapshot();
|
|
@@ -3567,17 +3739,17 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
3567
3739
|
if (!hasValues && !hasOverrides) {
|
|
3568
3740
|
return null;
|
|
3569
3741
|
}
|
|
3570
|
-
const hasValueLabel =
|
|
3571
|
-
const hasOverridesLabel =
|
|
3572
|
-
return /* @__PURE__ */
|
|
3742
|
+
const hasValueLabel = __37("Has effective styles", "elementor");
|
|
3743
|
+
const hasOverridesLabel = __37("Has overridden styles", "elementor");
|
|
3744
|
+
return /* @__PURE__ */ React60.createElement(Tooltip7, { title: __37("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React60.createElement(Stack12, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React60.createElement(
|
|
3573
3745
|
StyleIndicator,
|
|
3574
3746
|
{
|
|
3575
3747
|
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
3576
|
-
"data-variant":
|
|
3748
|
+
"data-variant": isElementsStylesProvider4(provider.getKey()) ? "local" : "global",
|
|
3577
3749
|
role: "listitem",
|
|
3578
3750
|
"aria-label": hasValueLabel
|
|
3579
3751
|
}
|
|
3580
|
-
), hasOverrides && /* @__PURE__ */
|
|
3752
|
+
), hasOverrides && /* @__PURE__ */ React60.createElement(
|
|
3581
3753
|
StyleIndicator,
|
|
3582
3754
|
{
|
|
3583
3755
|
isOverridden: true,
|
|
@@ -3617,67 +3789,69 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
3617
3789
|
|
|
3618
3790
|
// src/components/style-tab-collapsible-content.tsx
|
|
3619
3791
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
3620
|
-
return /* @__PURE__ */
|
|
3792
|
+
return /* @__PURE__ */ React61.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
3621
3793
|
};
|
|
3622
3794
|
function getStylesInheritanceIndicators(fields) {
|
|
3623
|
-
const isUsingFieldsIndicators =
|
|
3795
|
+
const isUsingFieldsIndicators = isExperimentActive13(EXPERIMENTAL_FEATURES.V_3_30);
|
|
3624
3796
|
if (fields.length === 0 || !isUsingFieldsIndicators) {
|
|
3625
3797
|
return null;
|
|
3626
3798
|
}
|
|
3627
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
3799
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React61.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
3628
3800
|
}
|
|
3629
3801
|
|
|
3630
3802
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
3631
|
-
import * as
|
|
3803
|
+
import * as React62 from "react";
|
|
3632
3804
|
import { SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
3633
|
-
import {
|
|
3634
|
-
|
|
3805
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
3806
|
+
var OBJECT_FIT_LABEL = __38("Object fit", "elementor");
|
|
3635
3807
|
var positionOptions2 = [
|
|
3636
|
-
{ label:
|
|
3637
|
-
{ label:
|
|
3638
|
-
{ label:
|
|
3639
|
-
{ label:
|
|
3640
|
-
{ label:
|
|
3808
|
+
{ label: __38("Fill", "elementor"), value: "fill" },
|
|
3809
|
+
{ label: __38("Cover", "elementor"), value: "cover" },
|
|
3810
|
+
{ label: __38("Contain", "elementor"), value: "contain" },
|
|
3811
|
+
{ label: __38("None", "elementor"), value: "none" },
|
|
3812
|
+
{ label: __38("Scale down", "elementor"), value: "scale-down" }
|
|
3641
3813
|
];
|
|
3642
3814
|
var ObjectFitField = () => {
|
|
3643
|
-
return /* @__PURE__ */
|
|
3815
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "object-fit", propDisplayName: OBJECT_FIT_LABEL }, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label: OBJECT_FIT_LABEL }, /* @__PURE__ */ React62.createElement(SelectControl4, { options: positionOptions2 })));
|
|
3644
3816
|
};
|
|
3645
3817
|
|
|
3646
3818
|
// src/components/style-sections/size-section/object-position-field.tsx
|
|
3647
|
-
import * as
|
|
3819
|
+
import * as React63 from "react";
|
|
3648
3820
|
import { PositionControl } from "@elementor/editor-controls";
|
|
3821
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
3822
|
+
var OBJECT_POSITION_LABEL = __39("Object position", "elementor");
|
|
3649
3823
|
var ObjectPositionField = () => {
|
|
3650
|
-
return /* @__PURE__ */
|
|
3824
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "object-position", propDisplayName: OBJECT_POSITION_LABEL }, /* @__PURE__ */ React63.createElement(PositionControl, null));
|
|
3651
3825
|
};
|
|
3652
3826
|
|
|
3653
3827
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
3654
|
-
import * as
|
|
3828
|
+
import * as React64 from "react";
|
|
3655
3829
|
import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
3656
3830
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
3657
|
-
import {
|
|
3658
|
-
|
|
3831
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
3832
|
+
var OVERFLOW_LABEL = __40("Overflow", "elementor");
|
|
3659
3833
|
var options6 = [
|
|
3660
3834
|
{
|
|
3661
3835
|
value: "visible",
|
|
3662
|
-
label:
|
|
3663
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3836
|
+
label: __40("Visible", "elementor"),
|
|
3837
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(EyeIcon, { fontSize: size }),
|
|
3664
3838
|
showTooltip: true
|
|
3665
3839
|
},
|
|
3666
3840
|
{
|
|
3667
3841
|
value: "hidden",
|
|
3668
|
-
label:
|
|
3669
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3842
|
+
label: __40("Hidden", "elementor"),
|
|
3843
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(EyeOffIcon, { fontSize: size }),
|
|
3670
3844
|
showTooltip: true
|
|
3671
3845
|
},
|
|
3672
3846
|
{
|
|
3673
3847
|
value: "auto",
|
|
3674
|
-
label:
|
|
3675
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3848
|
+
label: __40("Auto", "elementor"),
|
|
3849
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(LetterAIcon, { fontSize: size }),
|
|
3676
3850
|
showTooltip: true
|
|
3677
3851
|
}
|
|
3678
3852
|
];
|
|
3679
3853
|
var OverflowField = () => {
|
|
3680
|
-
return /* @__PURE__ */
|
|
3854
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "overflow", propDisplayName: OVERFLOW_LABEL }, /* @__PURE__ */ React64.createElement(StylesFieldLayout, { label: OVERFLOW_LABEL }, /* @__PURE__ */ React64.createElement(ToggleControl8, { options: options6 })));
|
|
3681
3855
|
};
|
|
3682
3856
|
|
|
3683
3857
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -3686,98 +3860,104 @@ var CssSizeProps = [
|
|
|
3686
3860
|
[
|
|
3687
3861
|
{
|
|
3688
3862
|
bind: "width",
|
|
3689
|
-
label:
|
|
3863
|
+
label: __41("Width", "elementor")
|
|
3690
3864
|
},
|
|
3691
3865
|
{
|
|
3692
3866
|
bind: "height",
|
|
3693
|
-
label:
|
|
3867
|
+
label: __41("Height", "elementor")
|
|
3694
3868
|
}
|
|
3695
3869
|
],
|
|
3696
3870
|
[
|
|
3697
3871
|
{
|
|
3698
3872
|
bind: "min-width",
|
|
3699
|
-
label:
|
|
3873
|
+
label: __41("Min width", "elementor")
|
|
3700
3874
|
},
|
|
3701
3875
|
{
|
|
3702
3876
|
bind: "min-height",
|
|
3703
|
-
label:
|
|
3877
|
+
label: __41("Min height", "elementor")
|
|
3704
3878
|
}
|
|
3705
3879
|
],
|
|
3706
3880
|
[
|
|
3707
3881
|
{
|
|
3708
3882
|
bind: "max-width",
|
|
3709
|
-
label:
|
|
3883
|
+
label: __41("Max width", "elementor")
|
|
3710
3884
|
},
|
|
3711
3885
|
{
|
|
3712
3886
|
bind: "max-height",
|
|
3713
|
-
label:
|
|
3887
|
+
label: __41("Max height", "elementor")
|
|
3714
3888
|
}
|
|
3715
3889
|
]
|
|
3716
3890
|
];
|
|
3891
|
+
var ASPECT_RATIO_LABEL = __41("Aspect Ratio", "elementor");
|
|
3892
|
+
var OBJECT_FIT_LABEL2 = __41("Object fit", "elementor");
|
|
3717
3893
|
var SizeSection = () => {
|
|
3718
|
-
const { value: fitValue } = useStylesField("object-fit"
|
|
3894
|
+
const { value: fitValue } = useStylesField("object-fit", {
|
|
3895
|
+
history: { propDisplayName: OBJECT_FIT_LABEL2 }
|
|
3896
|
+
});
|
|
3719
3897
|
const isNotFill = fitValue && fitValue?.value !== "fill";
|
|
3720
|
-
const gridRowRefs = [useRef9(), useRef9(), useRef9()];
|
|
3721
|
-
const isVersion330Active =
|
|
3722
|
-
return /* @__PURE__ */
|
|
3898
|
+
const gridRowRefs = [useRef9(null), useRef9(null), useRef9(null)];
|
|
3899
|
+
const isVersion330Active = isExperimentActive14(EXPERIMENT_ID);
|
|
3900
|
+
return /* @__PURE__ */ React65.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React65.createElement(Grid4, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React65.createElement(Grid4, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React65.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React65.createElement(PanelDivider, null), /* @__PURE__ */ React65.createElement(Stack13, null, /* @__PURE__ */ React65.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React65.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React65.createElement(Stack13, { gap: 2, pt: 2 }, /* @__PURE__ */ React65.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React65.createElement(AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React65.createElement(PanelDivider, null), /* @__PURE__ */ React65.createElement(ObjectFitField, null), isNotFill && /* @__PURE__ */ React65.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ObjectPositionField, null)))));
|
|
3723
3901
|
};
|
|
3724
3902
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
3725
|
-
return /* @__PURE__ */
|
|
3903
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind, propDisplayName: label }, /* @__PURE__ */ React65.createElement(Grid4, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React65.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, label)), /* @__PURE__ */ React65.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React65.createElement(SizeControl6, { extendedOptions, anchorRef: rowRef }))));
|
|
3726
3904
|
};
|
|
3727
3905
|
|
|
3728
3906
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
3729
|
-
import * as
|
|
3907
|
+
import * as React66 from "react";
|
|
3730
3908
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
3731
|
-
import { __ as
|
|
3909
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
3910
|
+
var MARGIN_LABEL = __42("Margin", "elementor");
|
|
3911
|
+
var PADDING_LABEL = __42("Padding", "elementor");
|
|
3732
3912
|
var SpacingSection = () => {
|
|
3733
3913
|
const { isSiteRtl } = useDirection();
|
|
3734
|
-
return /* @__PURE__ */
|
|
3914
|
+
return /* @__PURE__ */ React66.createElement(SectionContent, null, /* @__PURE__ */ React66.createElement(StylesField, { bind: "margin", propDisplayName: MARGIN_LABEL }, /* @__PURE__ */ React66.createElement(
|
|
3735
3915
|
LinkedDimensionsControl,
|
|
3736
3916
|
{
|
|
3737
|
-
label:
|
|
3917
|
+
label: MARGIN_LABEL,
|
|
3738
3918
|
isSiteRtl,
|
|
3739
3919
|
extendedOptions: ["auto"]
|
|
3740
3920
|
}
|
|
3741
|
-
)), /* @__PURE__ */
|
|
3921
|
+
)), /* @__PURE__ */ React66.createElement(PanelDivider, null), /* @__PURE__ */ React66.createElement(StylesField, { bind: "padding", propDisplayName: PADDING_LABEL }, /* @__PURE__ */ React66.createElement(LinkedDimensionsControl, { label: PADDING_LABEL, isSiteRtl })));
|
|
3742
3922
|
};
|
|
3743
3923
|
|
|
3744
3924
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3745
|
-
import * as
|
|
3746
|
-
import { isExperimentActive as
|
|
3925
|
+
import * as React82 from "react";
|
|
3926
|
+
import { isExperimentActive as isExperimentActive15 } from "@elementor/editor-v1-adapters";
|
|
3927
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
3747
3928
|
|
|
3748
3929
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
3749
|
-
import * as
|
|
3930
|
+
import * as React67 from "react";
|
|
3750
3931
|
import { NumberControl as NumberControl4 } from "@elementor/editor-controls";
|
|
3751
|
-
import {
|
|
3752
|
-
|
|
3932
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
3933
|
+
var COLUMN_COUNT_LABEL = __43("Columns", "elementor");
|
|
3753
3934
|
var ColumnCountField = () => {
|
|
3754
|
-
return /* @__PURE__ */
|
|
3935
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "column-count", propDisplayName: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React67.createElement(StylesFieldLayout, { label: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React67.createElement(NumberControl4, { shouldForceInt: true, min: 0, step: 1 })));
|
|
3755
3936
|
};
|
|
3756
3937
|
|
|
3757
3938
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
3758
|
-
import * as
|
|
3939
|
+
import * as React68 from "react";
|
|
3759
3940
|
import { useRef as useRef10 } from "react";
|
|
3760
3941
|
import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
3761
|
-
import {
|
|
3762
|
-
|
|
3942
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
3943
|
+
var COLUMN_GAP_LABEL = __44("Column gap", "elementor");
|
|
3763
3944
|
var ColumnGapField = () => {
|
|
3764
|
-
const rowRef = useRef10();
|
|
3765
|
-
return /* @__PURE__ */
|
|
3945
|
+
const rowRef = useRef10(null);
|
|
3946
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React68.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React68.createElement(SizeControl7, { anchorRef: rowRef })));
|
|
3766
3947
|
};
|
|
3767
3948
|
|
|
3768
3949
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3769
|
-
import * as
|
|
3950
|
+
import * as React69 from "react";
|
|
3770
3951
|
import { FontFamilyControl } from "@elementor/editor-controls";
|
|
3771
|
-
import {
|
|
3772
|
-
import { __ as __40 } from "@wordpress/i18n";
|
|
3952
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
3773
3953
|
|
|
3774
3954
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
3775
|
-
import { useMemo as
|
|
3776
|
-
import { __ as
|
|
3955
|
+
import { useMemo as useMemo7 } from "react";
|
|
3956
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
3777
3957
|
var supportedCategories = {
|
|
3778
|
-
system:
|
|
3779
|
-
custom:
|
|
3780
|
-
googlefonts:
|
|
3958
|
+
system: __45("System", "elementor"),
|
|
3959
|
+
custom: __45("Custom Fonts", "elementor"),
|
|
3960
|
+
googlefonts: __45("Google Fonts", "elementor")
|
|
3781
3961
|
};
|
|
3782
3962
|
var getFontFamilies = () => {
|
|
3783
3963
|
const { controls } = getElementorConfig();
|
|
@@ -3789,7 +3969,7 @@ var getFontFamilies = () => {
|
|
|
3789
3969
|
};
|
|
3790
3970
|
var useFontFamilies = () => {
|
|
3791
3971
|
const fontFamilies = getFontFamilies();
|
|
3792
|
-
return
|
|
3972
|
+
return useMemo7(() => {
|
|
3793
3973
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
3794
3974
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
3795
3975
|
if (!supportedCategories[category]) {
|
|
@@ -3809,199 +3989,204 @@ var useFontFamilies = () => {
|
|
|
3809
3989
|
};
|
|
3810
3990
|
|
|
3811
3991
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3992
|
+
var FONT_FAMILY_LABEL = __46("Font family", "elementor");
|
|
3812
3993
|
var FontFamilyField = () => {
|
|
3813
3994
|
const fontFamilies = useFontFamilies();
|
|
3995
|
+
const sectionWidth = useSectionWidth();
|
|
3814
3996
|
if (fontFamilies.length === 0) {
|
|
3815
3997
|
return null;
|
|
3816
3998
|
}
|
|
3817
|
-
return /* @__PURE__ */
|
|
3999
|
+
return /* @__PURE__ */ React69.createElement(StylesField, { bind: "font-family", propDisplayName: FONT_FAMILY_LABEL }, /* @__PURE__ */ React69.createElement(StylesFieldLayout, { label: FONT_FAMILY_LABEL }, /* @__PURE__ */ React69.createElement(FontFamilyControl, { fontFamilies, sectionWidth })));
|
|
3818
4000
|
};
|
|
3819
4001
|
|
|
3820
4002
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
3821
|
-
import * as
|
|
4003
|
+
import * as React70 from "react";
|
|
3822
4004
|
import { useRef as useRef11 } from "react";
|
|
3823
4005
|
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
3824
|
-
import {
|
|
3825
|
-
|
|
4006
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
4007
|
+
var FONT_SIZE_LABEL = __47("Font size", "elementor");
|
|
3826
4008
|
var FontSizeField = () => {
|
|
3827
|
-
const rowRef = useRef11();
|
|
3828
|
-
return /* @__PURE__ */
|
|
4009
|
+
const rowRef = useRef11(null);
|
|
4010
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React70.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React70.createElement(SizeControl8, { anchorRef: rowRef })));
|
|
3829
4011
|
};
|
|
3830
4012
|
|
|
3831
4013
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
3832
|
-
import * as
|
|
3833
|
-
import {
|
|
4014
|
+
import * as React71 from "react";
|
|
4015
|
+
import { ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
3834
4016
|
import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
3835
|
-
import {
|
|
3836
|
-
|
|
4017
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
4018
|
+
var FONT_STYLE_LABEL = __48("Font style", "elementor");
|
|
3837
4019
|
var options7 = [
|
|
3838
4020
|
{
|
|
3839
4021
|
value: "normal",
|
|
3840
|
-
label:
|
|
3841
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4022
|
+
label: __48("Normal", "elementor"),
|
|
4023
|
+
renderContent: ({ size }) => /* @__PURE__ */ React71.createElement(MinusIcon2, { fontSize: size }),
|
|
3842
4024
|
showTooltip: true
|
|
3843
4025
|
},
|
|
3844
4026
|
{
|
|
3845
4027
|
value: "italic",
|
|
3846
|
-
label:
|
|
3847
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4028
|
+
label: __48("Italic", "elementor"),
|
|
4029
|
+
renderContent: ({ size }) => /* @__PURE__ */ React71.createElement(ItalicIcon, { fontSize: size }),
|
|
3848
4030
|
showTooltip: true
|
|
3849
4031
|
}
|
|
3850
4032
|
];
|
|
3851
|
-
var FontStyleField = () =>
|
|
4033
|
+
var FontStyleField = () => {
|
|
4034
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "font-style", propDisplayName: FONT_STYLE_LABEL }, /* @__PURE__ */ React71.createElement(StylesFieldLayout, { label: FONT_STYLE_LABEL }, /* @__PURE__ */ React71.createElement(ToggleControl9, { options: options7 })));
|
|
4035
|
+
};
|
|
3852
4036
|
|
|
3853
4037
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
3854
|
-
import * as
|
|
4038
|
+
import * as React72 from "react";
|
|
3855
4039
|
import { SelectControl as SelectControl5 } from "@elementor/editor-controls";
|
|
3856
|
-
import {
|
|
3857
|
-
|
|
4040
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
4041
|
+
var FONT_WEIGHT_LABEL = __49("Font weight", "elementor");
|
|
3858
4042
|
var fontWeightOptions = [
|
|
3859
|
-
{ value: "100", label:
|
|
3860
|
-
{ value: "200", label:
|
|
3861
|
-
{ value: "300", label:
|
|
3862
|
-
{ value: "400", label:
|
|
3863
|
-
{ value: "500", label:
|
|
3864
|
-
{ value: "600", label:
|
|
3865
|
-
{ value: "700", label:
|
|
3866
|
-
{ value: "800", label:
|
|
3867
|
-
{ value: "900", label:
|
|
4043
|
+
{ value: "100", label: __49("100 - Thin", "elementor") },
|
|
4044
|
+
{ value: "200", label: __49("200 - Extra light", "elementor") },
|
|
4045
|
+
{ value: "300", label: __49("300 - Light", "elementor") },
|
|
4046
|
+
{ value: "400", label: __49("400 - Normal", "elementor") },
|
|
4047
|
+
{ value: "500", label: __49("500 - Medium", "elementor") },
|
|
4048
|
+
{ value: "600", label: __49("600 - Semi bold", "elementor") },
|
|
4049
|
+
{ value: "700", label: __49("700 - Bold", "elementor") },
|
|
4050
|
+
{ value: "800", label: __49("800 - Extra bold", "elementor") },
|
|
4051
|
+
{ value: "900", label: __49("900 - Black", "elementor") }
|
|
3868
4052
|
];
|
|
3869
4053
|
var FontWeightField = () => {
|
|
3870
|
-
return /* @__PURE__ */
|
|
4054
|
+
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "font-weight", propDisplayName: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React72.createElement(StylesFieldLayout, { label: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React72.createElement(SelectControl5, { options: fontWeightOptions })));
|
|
3871
4055
|
};
|
|
3872
4056
|
|
|
3873
4057
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
3874
|
-
import * as
|
|
4058
|
+
import * as React73 from "react";
|
|
3875
4059
|
import { useRef as useRef12 } from "react";
|
|
3876
4060
|
import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
|
|
3877
|
-
import {
|
|
3878
|
-
|
|
4061
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
4062
|
+
var LETTER_SPACING_LABEL = __50("Letter spacing", "elementor");
|
|
3879
4063
|
var LetterSpacingField = () => {
|
|
3880
|
-
const rowRef = useRef12();
|
|
3881
|
-
return /* @__PURE__ */
|
|
4064
|
+
const rowRef = useRef12(null);
|
|
4065
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React73.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React73.createElement(SizeControl9, { anchorRef: rowRef })));
|
|
3882
4066
|
};
|
|
3883
4067
|
|
|
3884
4068
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
3885
|
-
import * as
|
|
4069
|
+
import * as React74 from "react";
|
|
3886
4070
|
import { useRef as useRef13 } from "react";
|
|
3887
4071
|
import { SizeControl as SizeControl10 } from "@elementor/editor-controls";
|
|
3888
|
-
import {
|
|
3889
|
-
|
|
4072
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
4073
|
+
var LINE_HEIGHT_LABEL = __51("Line height", "elementor");
|
|
3890
4074
|
var LineHeightField = () => {
|
|
3891
|
-
const rowRef = useRef13();
|
|
3892
|
-
return /* @__PURE__ */
|
|
4075
|
+
const rowRef = useRef13(null);
|
|
4076
|
+
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React74.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React74.createElement(SizeControl10, { anchorRef: rowRef })));
|
|
3893
4077
|
};
|
|
3894
4078
|
|
|
3895
4079
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
3896
|
-
import * as
|
|
4080
|
+
import * as React75 from "react";
|
|
3897
4081
|
import { ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
3898
4082
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
3899
|
-
import {
|
|
3900
|
-
import { __ as
|
|
4083
|
+
import { withDirection as withDirection9 } from "@elementor/ui";
|
|
4084
|
+
import { __ as __52 } from "@wordpress/i18n";
|
|
4085
|
+
var TEXT_ALIGNMENT_LABEL = __52("Text align", "elementor");
|
|
3901
4086
|
var AlignStartIcon = withDirection9(AlignLeftIcon);
|
|
3902
4087
|
var AlignEndIcon = withDirection9(AlignRightIcon);
|
|
3903
4088
|
var options8 = [
|
|
3904
4089
|
{
|
|
3905
4090
|
value: "start",
|
|
3906
|
-
label:
|
|
3907
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4091
|
+
label: __52("Start", "elementor"),
|
|
4092
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(AlignStartIcon, { fontSize: size }),
|
|
3908
4093
|
showTooltip: true
|
|
3909
4094
|
},
|
|
3910
4095
|
{
|
|
3911
4096
|
value: "center",
|
|
3912
|
-
label:
|
|
3913
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4097
|
+
label: __52("Center", "elementor"),
|
|
4098
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(AlignCenterIcon, { fontSize: size }),
|
|
3914
4099
|
showTooltip: true
|
|
3915
4100
|
},
|
|
3916
4101
|
{
|
|
3917
4102
|
value: "end",
|
|
3918
|
-
label:
|
|
3919
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4103
|
+
label: __52("End", "elementor"),
|
|
4104
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(AlignEndIcon, { fontSize: size }),
|
|
3920
4105
|
showTooltip: true
|
|
3921
4106
|
},
|
|
3922
4107
|
{
|
|
3923
4108
|
value: "justify",
|
|
3924
|
-
label:
|
|
3925
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4109
|
+
label: __52("Justify", "elementor"),
|
|
4110
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
3926
4111
|
showTooltip: true
|
|
3927
4112
|
}
|
|
3928
4113
|
];
|
|
3929
4114
|
var TextAlignmentField = () => {
|
|
3930
|
-
return /* @__PURE__ */
|
|
4115
|
+
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "text-align", propDisplayName: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React75.createElement(UiProviders, null, /* @__PURE__ */ React75.createElement(StylesFieldLayout, { label: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React75.createElement(ToggleControl10, { options: options8 }))));
|
|
3931
4116
|
};
|
|
3932
4117
|
|
|
3933
4118
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3934
|
-
import * as
|
|
4119
|
+
import * as React76 from "react";
|
|
3935
4120
|
import { ColorControl as ColorControl2 } from "@elementor/editor-controls";
|
|
3936
|
-
import {
|
|
3937
|
-
|
|
4121
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
4122
|
+
var TEXT_COLOR_LABEL = __53("Text color", "elementor");
|
|
3938
4123
|
var TextColorField = () => {
|
|
3939
|
-
return /* @__PURE__ */
|
|
4124
|
+
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "color", propDisplayName: TEXT_COLOR_LABEL }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label: TEXT_COLOR_LABEL }, /* @__PURE__ */ React76.createElement(ColorControl2, null)));
|
|
3940
4125
|
};
|
|
3941
4126
|
|
|
3942
4127
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3943
|
-
import * as
|
|
4128
|
+
import * as React77 from "react";
|
|
3944
4129
|
import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
3945
4130
|
import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
3946
|
-
import {
|
|
3947
|
-
|
|
4131
|
+
import { __ as __54 } from "@wordpress/i18n";
|
|
4132
|
+
var TEXT_DECORATION_LABEL = __54("Line decoration", "elementor");
|
|
3948
4133
|
var options9 = [
|
|
3949
4134
|
{
|
|
3950
4135
|
value: "none",
|
|
3951
|
-
label:
|
|
3952
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4136
|
+
label: __54("None", "elementor"),
|
|
4137
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(MinusIcon3, { fontSize: size }),
|
|
3953
4138
|
showTooltip: true,
|
|
3954
4139
|
exclusive: true
|
|
3955
4140
|
},
|
|
3956
4141
|
{
|
|
3957
4142
|
value: "underline",
|
|
3958
|
-
label:
|
|
3959
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4143
|
+
label: __54("Underline", "elementor"),
|
|
4144
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(UnderlineIcon, { fontSize: size }),
|
|
3960
4145
|
showTooltip: true
|
|
3961
4146
|
},
|
|
3962
4147
|
{
|
|
3963
4148
|
value: "line-through",
|
|
3964
|
-
label:
|
|
3965
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4149
|
+
label: __54("Line-through", "elementor"),
|
|
4150
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(StrikethroughIcon, { fontSize: size }),
|
|
3966
4151
|
showTooltip: true
|
|
3967
4152
|
},
|
|
3968
4153
|
{
|
|
3969
4154
|
value: "overline",
|
|
3970
|
-
label:
|
|
3971
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4155
|
+
label: __54("Overline", "elementor"),
|
|
4156
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(OverlineIcon, { fontSize: size }),
|
|
3972
4157
|
showTooltip: true
|
|
3973
4158
|
}
|
|
3974
4159
|
];
|
|
3975
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
4160
|
+
var TextDecorationField = () => /* @__PURE__ */ React77.createElement(StylesField, { bind: "text-decoration", propDisplayName: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React77.createElement(StylesFieldLayout, { label: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React77.createElement(ToggleControl11, { options: options9, exclusive: false })));
|
|
3976
4161
|
|
|
3977
4162
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3978
|
-
import * as
|
|
4163
|
+
import * as React78 from "react";
|
|
3979
4164
|
import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
3980
4165
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
3981
|
-
import {
|
|
3982
|
-
|
|
4166
|
+
import { __ as __55 } from "@wordpress/i18n";
|
|
4167
|
+
var TEXT_DIRECTION_LABEL = __55("Direction", "elementor");
|
|
3983
4168
|
var options10 = [
|
|
3984
4169
|
{
|
|
3985
4170
|
value: "ltr",
|
|
3986
|
-
label:
|
|
3987
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4171
|
+
label: __55("Left to right", "elementor"),
|
|
4172
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
3988
4173
|
showTooltip: true
|
|
3989
4174
|
},
|
|
3990
4175
|
{
|
|
3991
4176
|
value: "rtl",
|
|
3992
|
-
label:
|
|
3993
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4177
|
+
label: __55("Right to left", "elementor"),
|
|
4178
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
3994
4179
|
showTooltip: true
|
|
3995
4180
|
}
|
|
3996
4181
|
];
|
|
3997
4182
|
var TextDirectionField = () => {
|
|
3998
|
-
return /* @__PURE__ */
|
|
4183
|
+
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "direction", propDisplayName: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React78.createElement(StylesFieldLayout, { label: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React78.createElement(ToggleControl12, { options: options10 })));
|
|
3999
4184
|
};
|
|
4000
4185
|
|
|
4001
4186
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
4002
|
-
import * as
|
|
4187
|
+
import * as React79 from "react";
|
|
4003
4188
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
4004
|
-
import { __ as
|
|
4189
|
+
import { __ as __56 } from "@wordpress/i18n";
|
|
4005
4190
|
var initTextStroke = {
|
|
4006
4191
|
$$type: "stroke",
|
|
4007
4192
|
value: {
|
|
@@ -4018,8 +4203,11 @@ var initTextStroke = {
|
|
|
4018
4203
|
}
|
|
4019
4204
|
}
|
|
4020
4205
|
};
|
|
4206
|
+
var TEXT_STROKE_LABEL = __56("Text stroke", "elementor");
|
|
4021
4207
|
var TextStrokeField = () => {
|
|
4022
|
-
const { value, setValue, canEdit } = useStylesField("stroke"
|
|
4208
|
+
const { value, setValue, canEdit } = useStylesField("stroke", {
|
|
4209
|
+
history: { propDisplayName: TEXT_STROKE_LABEL }
|
|
4210
|
+
});
|
|
4023
4211
|
const addTextStroke = () => {
|
|
4024
4212
|
setValue(initTextStroke);
|
|
4025
4213
|
};
|
|
@@ -4027,70 +4215,73 @@ var TextStrokeField = () => {
|
|
|
4027
4215
|
setValue(null);
|
|
4028
4216
|
};
|
|
4029
4217
|
const hasTextStroke = Boolean(value);
|
|
4030
|
-
return /* @__PURE__ */
|
|
4218
|
+
return /* @__PURE__ */ React79.createElement(StylesField, { bind: "stroke", propDisplayName: TEXT_STROKE_LABEL }, /* @__PURE__ */ React79.createElement(
|
|
4031
4219
|
AddOrRemoveContent,
|
|
4032
4220
|
{
|
|
4033
4221
|
isAdded: hasTextStroke,
|
|
4034
4222
|
onAdd: addTextStroke,
|
|
4035
4223
|
onRemove: removeTextStroke,
|
|
4036
4224
|
disabled: !canEdit,
|
|
4037
|
-
renderLabel: () => /* @__PURE__ */
|
|
4225
|
+
renderLabel: () => /* @__PURE__ */ React79.createElement(ControlLabel, null, TEXT_STROKE_LABEL)
|
|
4038
4226
|
},
|
|
4039
|
-
/* @__PURE__ */
|
|
4227
|
+
/* @__PURE__ */ React79.createElement(StrokeControl, null)
|
|
4040
4228
|
));
|
|
4041
4229
|
};
|
|
4042
4230
|
|
|
4043
4231
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
4044
|
-
import * as
|
|
4232
|
+
import * as React80 from "react";
|
|
4045
4233
|
import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
4046
4234
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
4047
|
-
import {
|
|
4048
|
-
|
|
4235
|
+
import { __ as __57 } from "@wordpress/i18n";
|
|
4236
|
+
var TEXT_TRANSFORM_LABEL = __57("Text transform", "elementor");
|
|
4049
4237
|
var options11 = [
|
|
4050
4238
|
{
|
|
4051
4239
|
value: "none",
|
|
4052
|
-
label:
|
|
4053
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4240
|
+
label: __57("None", "elementor"),
|
|
4241
|
+
renderContent: ({ size }) => /* @__PURE__ */ React80.createElement(MinusIcon4, { fontSize: size }),
|
|
4054
4242
|
showTooltip: true
|
|
4055
4243
|
},
|
|
4056
4244
|
{
|
|
4057
4245
|
value: "capitalize",
|
|
4058
|
-
label:
|
|
4059
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4246
|
+
label: __57("Capitalize", "elementor"),
|
|
4247
|
+
renderContent: ({ size }) => /* @__PURE__ */ React80.createElement(LetterCaseIcon, { fontSize: size }),
|
|
4060
4248
|
showTooltip: true
|
|
4061
4249
|
},
|
|
4062
4250
|
{
|
|
4063
4251
|
value: "uppercase",
|
|
4064
|
-
label:
|
|
4065
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4252
|
+
label: __57("Uppercase", "elementor"),
|
|
4253
|
+
renderContent: ({ size }) => /* @__PURE__ */ React80.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
4066
4254
|
showTooltip: true
|
|
4067
4255
|
},
|
|
4068
4256
|
{
|
|
4069
4257
|
value: "lowercase",
|
|
4070
|
-
label:
|
|
4071
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4258
|
+
label: __57("Lowercase", "elementor"),
|
|
4259
|
+
renderContent: ({ size }) => /* @__PURE__ */ React80.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
4072
4260
|
showTooltip: true
|
|
4073
4261
|
}
|
|
4074
4262
|
];
|
|
4075
|
-
var TransformField = () => /* @__PURE__ */
|
|
4263
|
+
var TransformField = () => /* @__PURE__ */ React80.createElement(StylesField, { bind: "text-transform", propDisplayName: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React80.createElement(StylesFieldLayout, { label: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React80.createElement(ToggleControl13, { options: options11 })));
|
|
4076
4264
|
|
|
4077
4265
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4078
|
-
import * as
|
|
4266
|
+
import * as React81 from "react";
|
|
4079
4267
|
import { useRef as useRef14 } from "react";
|
|
4080
4268
|
import { SizeControl as SizeControl11 } from "@elementor/editor-controls";
|
|
4081
|
-
import {
|
|
4082
|
-
|
|
4269
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
4270
|
+
var WORD_SPACING_LABEL = __58("Word spacing", "elementor");
|
|
4083
4271
|
var WordSpacingField = () => {
|
|
4084
|
-
const rowRef = useRef14();
|
|
4085
|
-
return /* @__PURE__ */
|
|
4272
|
+
const rowRef = useRef14(null);
|
|
4273
|
+
return /* @__PURE__ */ React81.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React81.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React81.createElement(SizeControl11, { anchorRef: rowRef })));
|
|
4086
4274
|
};
|
|
4087
4275
|
|
|
4088
4276
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4277
|
+
var COLUMN_COUNT_LABEL2 = __59("Column count", "elementor");
|
|
4089
4278
|
var TypographySection = () => {
|
|
4090
|
-
const { value: columnCount } = useStylesField("column-count"
|
|
4279
|
+
const { value: columnCount } = useStylesField("column-count", {
|
|
4280
|
+
history: { propDisplayName: COLUMN_COUNT_LABEL2 }
|
|
4281
|
+
});
|
|
4091
4282
|
const hasMultiColumns = !!(columnCount?.value && columnCount?.value > 1);
|
|
4092
|
-
const isVersion330Active =
|
|
4093
|
-
return /* @__PURE__ */
|
|
4283
|
+
const isVersion330Active = isExperimentActive15("e_v_3_30");
|
|
4284
|
+
return /* @__PURE__ */ React82.createElement(SectionContent, null, /* @__PURE__ */ React82.createElement(FontFamilyField, null), /* @__PURE__ */ React82.createElement(FontWeightField, null), /* @__PURE__ */ React82.createElement(FontSizeField, null), /* @__PURE__ */ React82.createElement(PanelDivider, null), /* @__PURE__ */ React82.createElement(TextAlignmentField, null), /* @__PURE__ */ React82.createElement(TextColorField, null), /* @__PURE__ */ React82.createElement(
|
|
4094
4285
|
StyleTabCollapsibleContent,
|
|
4095
4286
|
{
|
|
4096
4287
|
fields: [
|
|
@@ -4105,26 +4296,26 @@ var TypographySection = () => {
|
|
|
4105
4296
|
"stroke"
|
|
4106
4297
|
]
|
|
4107
4298
|
},
|
|
4108
|
-
/* @__PURE__ */
|
|
4299
|
+
/* @__PURE__ */ React82.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React82.createElement(LineHeightField, null), /* @__PURE__ */ React82.createElement(LetterSpacingField, null), /* @__PURE__ */ React82.createElement(WordSpacingField, null), isVersion330Active && /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(ColumnCountField, null), hasMultiColumns && /* @__PURE__ */ React82.createElement(ColumnGapField, null)), /* @__PURE__ */ React82.createElement(PanelDivider, null), /* @__PURE__ */ React82.createElement(TextDecorationField, null), /* @__PURE__ */ React82.createElement(TransformField, null), /* @__PURE__ */ React82.createElement(TextDirectionField, null), /* @__PURE__ */ React82.createElement(FontStyleField, null), /* @__PURE__ */ React82.createElement(TextStrokeField, null))
|
|
4109
4300
|
));
|
|
4110
4301
|
};
|
|
4111
4302
|
|
|
4112
4303
|
// src/components/style-tab-section.tsx
|
|
4113
|
-
import * as
|
|
4114
|
-
import { isExperimentActive as
|
|
4304
|
+
import * as React83 from "react";
|
|
4305
|
+
import { isExperimentActive as isExperimentActive16 } from "@elementor/editor-v1-adapters";
|
|
4115
4306
|
var StyleTabSection = ({ section, fields = [] }) => {
|
|
4116
4307
|
const { component, name, title } = section;
|
|
4117
4308
|
const tabDefaults = useDefaultPanelSettings();
|
|
4118
4309
|
const SectionComponent = component;
|
|
4119
|
-
const isExpanded =
|
|
4120
|
-
return /* @__PURE__ */
|
|
4310
|
+
const isExpanded = isExperimentActive16(EXPERIMENTAL_FEATURES.V_3_30) ? tabDefaults.defaultSectionsExpanded.style?.includes(name) : false;
|
|
4311
|
+
return /* @__PURE__ */ React83.createElement(Section, { title, defaultExpanded: isExpanded, titleEnd: getStylesInheritanceIndicators(fields) }, /* @__PURE__ */ React83.createElement(SectionComponent, null));
|
|
4121
4312
|
};
|
|
4122
4313
|
|
|
4123
4314
|
// src/components/style-tab.tsx
|
|
4124
4315
|
var TABS_HEADER_HEIGHT = "37px";
|
|
4125
4316
|
var stickyHeaderStyles = {
|
|
4126
4317
|
position: "sticky",
|
|
4127
|
-
zIndex:
|
|
4318
|
+
zIndex: 1100,
|
|
4128
4319
|
opacity: 1,
|
|
4129
4320
|
backgroundColor: "background.default",
|
|
4130
4321
|
transition: "top 300ms ease"
|
|
@@ -4134,7 +4325,7 @@ var StyleTab = () => {
|
|
|
4134
4325
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
4135
4326
|
const [activeStyleState, setActiveStyleState] = useState12(null);
|
|
4136
4327
|
const breakpoint = useActiveBreakpoint();
|
|
4137
|
-
return /* @__PURE__ */
|
|
4328
|
+
return /* @__PURE__ */ React84.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React84.createElement(
|
|
4138
4329
|
StyleProvider,
|
|
4139
4330
|
{
|
|
4140
4331
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -4145,13 +4336,13 @@ var StyleTab = () => {
|
|
|
4145
4336
|
},
|
|
4146
4337
|
setMetaState: setActiveStyleState
|
|
4147
4338
|
},
|
|
4148
|
-
/* @__PURE__ */
|
|
4339
|
+
/* @__PURE__ */ React84.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React84.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React84.createElement(ClassesHeader, null, /* @__PURE__ */ React84.createElement(CssClassSelector, null), /* @__PURE__ */ React84.createElement(Divider5, null)), /* @__PURE__ */ React84.createElement(SectionsList, null, /* @__PURE__ */ React84.createElement(
|
|
4149
4340
|
StyleTabSection,
|
|
4150
4341
|
{
|
|
4151
4342
|
section: {
|
|
4152
4343
|
component: LayoutSection,
|
|
4153
4344
|
name: "Layout",
|
|
4154
|
-
title:
|
|
4345
|
+
title: __60("Layout", "elementor")
|
|
4155
4346
|
},
|
|
4156
4347
|
fields: [
|
|
4157
4348
|
"display",
|
|
@@ -4164,23 +4355,23 @@ var StyleTab = () => {
|
|
|
4164
4355
|
"gap"
|
|
4165
4356
|
]
|
|
4166
4357
|
}
|
|
4167
|
-
), /* @__PURE__ */
|
|
4358
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4168
4359
|
StyleTabSection,
|
|
4169
4360
|
{
|
|
4170
4361
|
section: {
|
|
4171
4362
|
component: SpacingSection,
|
|
4172
4363
|
name: "Spacing",
|
|
4173
|
-
title:
|
|
4364
|
+
title: __60("Spacing", "elementor")
|
|
4174
4365
|
},
|
|
4175
4366
|
fields: ["margin", "padding"]
|
|
4176
4367
|
}
|
|
4177
|
-
), /* @__PURE__ */
|
|
4368
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4178
4369
|
StyleTabSection,
|
|
4179
4370
|
{
|
|
4180
4371
|
section: {
|
|
4181
4372
|
component: SizeSection,
|
|
4182
4373
|
name: "Size",
|
|
4183
|
-
title:
|
|
4374
|
+
title: __60("Size", "elementor")
|
|
4184
4375
|
},
|
|
4185
4376
|
fields: [
|
|
4186
4377
|
"width",
|
|
@@ -4194,23 +4385,23 @@ var StyleTab = () => {
|
|
|
4194
4385
|
"object-fit"
|
|
4195
4386
|
]
|
|
4196
4387
|
}
|
|
4197
|
-
), /* @__PURE__ */
|
|
4388
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4198
4389
|
StyleTabSection,
|
|
4199
4390
|
{
|
|
4200
4391
|
section: {
|
|
4201
4392
|
component: PositionSection,
|
|
4202
4393
|
name: "Position",
|
|
4203
|
-
title:
|
|
4394
|
+
title: __60("Position", "elementor")
|
|
4204
4395
|
},
|
|
4205
4396
|
fields: ["position", "z-index", "scroll-margin-top"]
|
|
4206
4397
|
}
|
|
4207
|
-
), /* @__PURE__ */
|
|
4398
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4208
4399
|
StyleTabSection,
|
|
4209
4400
|
{
|
|
4210
4401
|
section: {
|
|
4211
4402
|
component: TypographySection,
|
|
4212
4403
|
name: "Typography",
|
|
4213
|
-
title:
|
|
4404
|
+
title: __60("Typography", "elementor")
|
|
4214
4405
|
},
|
|
4215
4406
|
fields: [
|
|
4216
4407
|
"font-family",
|
|
@@ -4229,33 +4420,33 @@ var StyleTab = () => {
|
|
|
4229
4420
|
"stroke"
|
|
4230
4421
|
]
|
|
4231
4422
|
}
|
|
4232
|
-
), /* @__PURE__ */
|
|
4423
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4233
4424
|
StyleTabSection,
|
|
4234
4425
|
{
|
|
4235
4426
|
section: {
|
|
4236
4427
|
component: BackgroundSection,
|
|
4237
4428
|
name: "Background",
|
|
4238
|
-
title:
|
|
4429
|
+
title: __60("Background", "elementor")
|
|
4239
4430
|
},
|
|
4240
4431
|
fields: ["background"]
|
|
4241
4432
|
}
|
|
4242
|
-
), /* @__PURE__ */
|
|
4433
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4243
4434
|
StyleTabSection,
|
|
4244
4435
|
{
|
|
4245
4436
|
section: {
|
|
4246
4437
|
component: BorderSection,
|
|
4247
4438
|
name: "Border",
|
|
4248
|
-
title:
|
|
4439
|
+
title: __60("Border", "elementor")
|
|
4249
4440
|
},
|
|
4250
4441
|
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
4251
4442
|
}
|
|
4252
|
-
), /* @__PURE__ */
|
|
4443
|
+
), /* @__PURE__ */ React84.createElement(
|
|
4253
4444
|
StyleTabSection,
|
|
4254
4445
|
{
|
|
4255
4446
|
section: {
|
|
4256
4447
|
component: EffectsSection,
|
|
4257
4448
|
name: "Effects",
|
|
4258
|
-
title:
|
|
4449
|
+
title: __60("Effects", "elementor")
|
|
4259
4450
|
},
|
|
4260
4451
|
fields: ["box-shadow"]
|
|
4261
4452
|
}
|
|
@@ -4264,7 +4455,7 @@ var StyleTab = () => {
|
|
|
4264
4455
|
};
|
|
4265
4456
|
function ClassesHeader({ children }) {
|
|
4266
4457
|
const scrollDirection = useScrollDirection();
|
|
4267
|
-
return /* @__PURE__ */
|
|
4458
|
+
return /* @__PURE__ */ React84.createElement(Stack14, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4268
4459
|
}
|
|
4269
4460
|
function useCurrentClassesProp() {
|
|
4270
4461
|
const { elementType } = useElement();
|
|
@@ -4283,15 +4474,15 @@ var EditingPanelTabs = () => {
|
|
|
4283
4474
|
return (
|
|
4284
4475
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4285
4476
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4286
|
-
/* @__PURE__ */
|
|
4477
|
+
/* @__PURE__ */ React85.createElement(Fragment10, { key: element.id }, /* @__PURE__ */ React85.createElement(PanelTabContent, null))
|
|
4287
4478
|
);
|
|
4288
4479
|
};
|
|
4289
4480
|
var PanelTabContent = () => {
|
|
4290
4481
|
const editorDefaults = useDefaultPanelSettings();
|
|
4291
|
-
const defaultComponentTab =
|
|
4482
|
+
const defaultComponentTab = isExperimentActive17(EXPERIMENTAL_FEATURES.V_3_30) ? editorDefaults.defaultTab : "settings";
|
|
4292
4483
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4293
4484
|
const { getTabProps, getTabPanelProps, getTabsProps } = useTabs(currentTab);
|
|
4294
|
-
return /* @__PURE__ */
|
|
4485
|
+
return /* @__PURE__ */ React85.createElement(ScrollProvider, null, /* @__PURE__ */ React85.createElement(Stack15, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React85.createElement(Stack15, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React85.createElement(
|
|
4295
4486
|
Tabs,
|
|
4296
4487
|
{
|
|
4297
4488
|
variant: "fullWidth",
|
|
@@ -4303,9 +4494,9 @@ var PanelTabContent = () => {
|
|
|
4303
4494
|
setCurrentTab(newValue);
|
|
4304
4495
|
}
|
|
4305
4496
|
},
|
|
4306
|
-
/* @__PURE__ */
|
|
4307
|
-
/* @__PURE__ */
|
|
4308
|
-
), /* @__PURE__ */
|
|
4497
|
+
/* @__PURE__ */ React85.createElement(Tab, { label: __61("General", "elementor"), ...getTabProps("settings") }),
|
|
4498
|
+
/* @__PURE__ */ React85.createElement(Tab, { label: __61("Style", "elementor"), ...getTabProps("style") })
|
|
4499
|
+
), /* @__PURE__ */ React85.createElement(Divider6, null)), /* @__PURE__ */ React85.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React85.createElement(SettingsTab, null)), /* @__PURE__ */ React85.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React85.createElement(StyleTab, null))));
|
|
4309
4500
|
};
|
|
4310
4501
|
|
|
4311
4502
|
// src/components/editing-panel.tsx
|
|
@@ -4317,8 +4508,8 @@ var EditingPanel = () => {
|
|
|
4317
4508
|
if (!element || !elementType) {
|
|
4318
4509
|
return null;
|
|
4319
4510
|
}
|
|
4320
|
-
const panelTitle =
|
|
4321
|
-
return /* @__PURE__ */
|
|
4511
|
+
const panelTitle = __62("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4512
|
+
return /* @__PURE__ */ React86.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React86.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React86.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React86.createElement(ThemeProvider2, null, /* @__PURE__ */ React86.createElement(Panel, null, /* @__PURE__ */ React86.createElement(PanelHeader, null, /* @__PURE__ */ React86.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React86.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React86.createElement(PanelBody, null, /* @__PURE__ */ React86.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React86.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React86.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React86.createElement(EditingPanelTabs, null)))))))));
|
|
4322
4513
|
};
|
|
4323
4514
|
|
|
4324
4515
|
// src/panel.ts
|
|
@@ -4327,11 +4518,18 @@ var { panel, usePanelActions, usePanelStatus } = createPanel({
|
|
|
4327
4518
|
component: EditingPanel
|
|
4328
4519
|
});
|
|
4329
4520
|
|
|
4521
|
+
// src/components/popover-scrollable-content.tsx
|
|
4522
|
+
import * as React87 from "react";
|
|
4523
|
+
import { PopoverScrollableContent as BasePopoverScrollableContent } from "@elementor/editor-ui";
|
|
4524
|
+
var PopoverScrollableContent = (props) => {
|
|
4525
|
+
const sectionWidth = useSectionWidth();
|
|
4526
|
+
return /* @__PURE__ */ React87.createElement(BasePopoverScrollableContent, { ...props, width: sectionWidth });
|
|
4527
|
+
};
|
|
4528
|
+
|
|
4330
4529
|
// src/init.ts
|
|
4331
4530
|
import { injectIntoLogic } from "@elementor/editor";
|
|
4332
|
-
import { PrefetchUserData } from "@elementor/editor-current-user";
|
|
4333
4531
|
import { __registerPanel as registerPanel } from "@elementor/editor-panels";
|
|
4334
|
-
import { blockCommand, isExperimentActive as
|
|
4532
|
+
import { blockCommand, isExperimentActive as isExperimentActive18 } from "@elementor/editor-v1-adapters";
|
|
4335
4533
|
|
|
4336
4534
|
// src/hooks/use-open-editor-panel.ts
|
|
4337
4535
|
import { useEffect as useEffect4 } from "react";
|
|
@@ -4371,7 +4569,7 @@ import { settingsTransformersRegistry, styleTransformersRegistry } from "@elemen
|
|
|
4371
4569
|
import { injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel } from "@elementor/editor-controls";
|
|
4372
4570
|
|
|
4373
4571
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4374
|
-
import * as
|
|
4572
|
+
import * as React88 from "react";
|
|
4375
4573
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
4376
4574
|
import {
|
|
4377
4575
|
backgroundImageOverlayPropTypeUtil
|
|
@@ -4379,10 +4577,10 @@ import {
|
|
|
4379
4577
|
import { DatabaseIcon } from "@elementor/icons";
|
|
4380
4578
|
|
|
4381
4579
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4382
|
-
import { useMemo as
|
|
4580
|
+
import { useMemo as useMemo9 } from "react";
|
|
4383
4581
|
|
|
4384
4582
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4385
|
-
import { useMemo as
|
|
4583
|
+
import { useMemo as useMemo8 } from "react";
|
|
4386
4584
|
import { useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
4387
4585
|
|
|
4388
4586
|
// src/dynamics/sync/get-elementor-config.ts
|
|
@@ -4437,7 +4635,7 @@ var usePropDynamicTags = () => {
|
|
|
4437
4635
|
const propDynamicType = getDynamicPropType(propType);
|
|
4438
4636
|
categories = propDynamicType?.settings.categories || [];
|
|
4439
4637
|
}
|
|
4440
|
-
return
|
|
4638
|
+
return useMemo8(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
4441
4639
|
};
|
|
4442
4640
|
var getDynamicTagsByCategories = (categories) => {
|
|
4443
4641
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -4453,40 +4651,40 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
4453
4651
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4454
4652
|
var useDynamicTag = (tagName) => {
|
|
4455
4653
|
const dynamicTags = usePropDynamicTags();
|
|
4456
|
-
return
|
|
4654
|
+
return useMemo9(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
4457
4655
|
};
|
|
4458
4656
|
|
|
4459
4657
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4460
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
4658
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React88.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
4461
4659
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
4462
4660
|
const context = useBoundProp3(backgroundImageOverlayPropTypeUtil);
|
|
4463
|
-
return /* @__PURE__ */
|
|
4661
|
+
return /* @__PURE__ */ React88.createElement(PropProvider3, { ...context, value: value.value }, /* @__PURE__ */ React88.createElement(PropKeyProvider3, { bind: "image" }, /* @__PURE__ */ React88.createElement(Wrapper, { rawValue: value.value })));
|
|
4464
4662
|
};
|
|
4465
4663
|
var Wrapper = ({ rawValue }) => {
|
|
4466
4664
|
const { propType } = useBoundProp3();
|
|
4467
4665
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
4468
|
-
return /* @__PURE__ */
|
|
4666
|
+
return /* @__PURE__ */ React88.createElement(PropProvider3, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React88.createElement(PropKeyProvider3, { bind: "src" }, /* @__PURE__ */ React88.createElement(Content, { rawValue: rawValue.image })));
|
|
4469
4667
|
};
|
|
4470
4668
|
var Content = ({ rawValue }) => {
|
|
4471
4669
|
const src = rawValue.value.src;
|
|
4472
4670
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
4473
|
-
return /* @__PURE__ */
|
|
4671
|
+
return /* @__PURE__ */ React88.createElement(React88.Fragment, null, dynamicTag?.label);
|
|
4474
4672
|
};
|
|
4475
4673
|
|
|
4476
4674
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4477
|
-
import * as
|
|
4478
|
-
import { ControlFormLabel as
|
|
4479
|
-
import { PopoverHeader as
|
|
4675
|
+
import * as React91 from "react";
|
|
4676
|
+
import { ControlFormLabel as ControlFormLabel5, useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
4677
|
+
import { PopoverHeader as PopoverHeader3, PopoverScrollableContent as PopoverScrollableContent2 } from "@elementor/editor-ui";
|
|
4480
4678
|
import { DatabaseIcon as DatabaseIcon3, SettingsIcon, XIcon } from "@elementor/icons";
|
|
4481
4679
|
import {
|
|
4482
4680
|
bindPopover as bindPopover2,
|
|
4483
4681
|
bindTrigger as bindTrigger2,
|
|
4484
4682
|
Box as Box8,
|
|
4485
4683
|
Divider as Divider8,
|
|
4486
|
-
Grid as
|
|
4684
|
+
Grid as Grid5,
|
|
4487
4685
|
IconButton as IconButton5,
|
|
4488
4686
|
Popover as Popover2,
|
|
4489
|
-
Stack as
|
|
4687
|
+
Stack as Stack17,
|
|
4490
4688
|
Tab as Tab2,
|
|
4491
4689
|
TabPanel as TabPanel2,
|
|
4492
4690
|
Tabs as Tabs2,
|
|
@@ -4494,12 +4692,7 @@ import {
|
|
|
4494
4692
|
usePopupState as usePopupState3,
|
|
4495
4693
|
useTabs as useTabs2
|
|
4496
4694
|
} from "@elementor/ui";
|
|
4497
|
-
import { __ as
|
|
4498
|
-
|
|
4499
|
-
// src/components/popover-content.tsx
|
|
4500
|
-
import * as React87 from "react";
|
|
4501
|
-
import { Stack as Stack19 } from "@elementor/ui";
|
|
4502
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React87.createElement(Stack19, { alignItems, gap, p }, children);
|
|
4695
|
+
import { __ as __64 } from "@wordpress/i18n";
|
|
4503
4696
|
|
|
4504
4697
|
// src/hooks/use-persist-dynamic-value.ts
|
|
4505
4698
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -4510,7 +4703,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
4510
4703
|
};
|
|
4511
4704
|
|
|
4512
4705
|
// src/dynamics/dynamic-control.tsx
|
|
4513
|
-
import * as
|
|
4706
|
+
import * as React89 from "react";
|
|
4514
4707
|
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
4515
4708
|
var DynamicControl = ({ bind, children }) => {
|
|
4516
4709
|
const { value, setValue } = useBoundProp4(dynamicPropTypeUtil);
|
|
@@ -4532,18 +4725,18 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
4532
4725
|
});
|
|
4533
4726
|
};
|
|
4534
4727
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
4535
|
-
return /* @__PURE__ */
|
|
4728
|
+
return /* @__PURE__ */ React89.createElement(PropProvider4, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React89.createElement(PropKeyProvider4, { bind }, children));
|
|
4536
4729
|
};
|
|
4537
4730
|
|
|
4538
4731
|
// src/dynamics/components/dynamic-selection.tsx
|
|
4539
|
-
import { Fragment as
|
|
4540
|
-
import * as
|
|
4732
|
+
import { Fragment as Fragment12, useState as useState13 } from "react";
|
|
4733
|
+
import * as React90 from "react";
|
|
4541
4734
|
import { useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
4542
|
-
import { PopoverHeader, PopoverMenuList, PopoverSearch } from "@elementor/editor-ui";
|
|
4735
|
+
import { PopoverHeader as PopoverHeader2, PopoverMenuList, PopoverSearch } from "@elementor/editor-ui";
|
|
4543
4736
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
4544
|
-
import { Box as Box7, Divider as Divider7, Link as Link2, Stack as
|
|
4545
|
-
import { __ as
|
|
4546
|
-
var
|
|
4737
|
+
import { Box as Box7, Divider as Divider7, Link as Link2, Stack as Stack16, Typography as Typography5, useTheme as useTheme3 } from "@elementor/ui";
|
|
4738
|
+
import { __ as __63 } from "@wordpress/i18n";
|
|
4739
|
+
var SIZE6 = "tiny";
|
|
4547
4740
|
var DynamicSelection = ({ close: closePopover }) => {
|
|
4548
4741
|
const [searchValue, setSearchValue] = useState13("");
|
|
4549
4742
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
@@ -4577,21 +4770,21 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
4577
4770
|
label: item.label
|
|
4578
4771
|
}))
|
|
4579
4772
|
]);
|
|
4580
|
-
return /* @__PURE__ */
|
|
4581
|
-
|
|
4773
|
+
return /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(
|
|
4774
|
+
PopoverHeader2,
|
|
4582
4775
|
{
|
|
4583
|
-
title:
|
|
4776
|
+
title: __63("Dynamic tags", "elementor"),
|
|
4584
4777
|
onClose: closePopover,
|
|
4585
|
-
icon: /* @__PURE__ */
|
|
4778
|
+
icon: /* @__PURE__ */ React90.createElement(DatabaseIcon2, { fontSize: SIZE6 })
|
|
4586
4779
|
}
|
|
4587
|
-
), /* @__PURE__ */
|
|
4780
|
+
), /* @__PURE__ */ React90.createElement(Stack16, null, hasNoDynamicTags ? /* @__PURE__ */ React90.createElement(NoDynamicTags, null) : /* @__PURE__ */ React90.createElement(Fragment12, null, /* @__PURE__ */ React90.createElement(
|
|
4588
4781
|
PopoverSearch,
|
|
4589
4782
|
{
|
|
4590
4783
|
value: searchValue,
|
|
4591
4784
|
onSearch: handleSearch,
|
|
4592
|
-
placeholder:
|
|
4785
|
+
placeholder: __63("Search dynamic tags\u2026", "elementor")
|
|
4593
4786
|
}
|
|
4594
|
-
), /* @__PURE__ */
|
|
4787
|
+
), /* @__PURE__ */ React90.createElement(Divider7, null), /* @__PURE__ */ React90.createElement(PopoverScrollableContent, null, /* @__PURE__ */ React90.createElement(
|
|
4595
4788
|
PopoverMenuList,
|
|
4596
4789
|
{
|
|
4597
4790
|
items: virtualizedItems,
|
|
@@ -4599,12 +4792,12 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
4599
4792
|
onClose: closePopover,
|
|
4600
4793
|
selectedValue: dynamicValue?.name,
|
|
4601
4794
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
4602
|
-
noResultsComponent: /* @__PURE__ */
|
|
4795
|
+
noResultsComponent: /* @__PURE__ */ React90.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
4603
4796
|
}
|
|
4604
|
-
))));
|
|
4797
|
+
)))));
|
|
4605
4798
|
};
|
|
4606
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
4607
|
-
|
|
4799
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React90.createElement(
|
|
4800
|
+
Stack16,
|
|
4608
4801
|
{
|
|
4609
4802
|
gap: 1,
|
|
4610
4803
|
alignItems: "center",
|
|
@@ -4614,12 +4807,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React89.createElem
|
|
|
4614
4807
|
color: "text.secondary",
|
|
4615
4808
|
sx: { pb: 3.5 }
|
|
4616
4809
|
},
|
|
4617
|
-
/* @__PURE__ */
|
|
4618
|
-
/* @__PURE__ */
|
|
4619
|
-
/* @__PURE__ */
|
|
4810
|
+
/* @__PURE__ */ React90.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
4811
|
+
/* @__PURE__ */ React90.createElement(Typography5, { align: "center", variant: "subtitle2" }, __63("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React90.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
4812
|
+
/* @__PURE__ */ React90.createElement(Typography5, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, __63("Try something else.", "elementor"), /* @__PURE__ */ React90.createElement(Link2, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __63("Clear & try again", "elementor")))
|
|
4620
4813
|
);
|
|
4621
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
4622
|
-
|
|
4814
|
+
var NoDynamicTags = () => /* @__PURE__ */ React90.createElement(Box7, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React90.createElement(Divider7, null), /* @__PURE__ */ React90.createElement(
|
|
4815
|
+
Stack16,
|
|
4623
4816
|
{
|
|
4624
4817
|
gap: 1,
|
|
4625
4818
|
alignItems: "center",
|
|
@@ -4629,9 +4822,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React89.createElement(Box7, { sx: { ov
|
|
|
4629
4822
|
color: "text.secondary",
|
|
4630
4823
|
sx: { pb: 3.5 }
|
|
4631
4824
|
},
|
|
4632
|
-
/* @__PURE__ */
|
|
4633
|
-
/* @__PURE__ */
|
|
4634
|
-
/* @__PURE__ */
|
|
4825
|
+
/* @__PURE__ */ React90.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
4826
|
+
/* @__PURE__ */ React90.createElement(Typography5, { align: "center", variant: "subtitle2" }, __63("Streamline your workflow with dynamic tags", "elementor")),
|
|
4827
|
+
/* @__PURE__ */ React90.createElement(Typography5, { align: "center", variant: "caption" }, __63("You'll need Elementor Pro to use this feature.", "elementor"))
|
|
4635
4828
|
));
|
|
4636
4829
|
var useFilteredOptions = (searchValue) => {
|
|
4637
4830
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -4650,7 +4843,7 @@ var useFilteredOptions = (searchValue) => {
|
|
|
4650
4843
|
};
|
|
4651
4844
|
|
|
4652
4845
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4653
|
-
var
|
|
4846
|
+
var SIZE7 = "tiny";
|
|
4654
4847
|
var DynamicSelectionControl = () => {
|
|
4655
4848
|
const { setValue: setAnyValue } = useBoundProp6();
|
|
4656
4849
|
const { bind, value } = useBoundProp6(dynamicPropTypeUtil);
|
|
@@ -4664,33 +4857,37 @@ var DynamicSelectionControl = () => {
|
|
|
4664
4857
|
if (!dynamicTag) {
|
|
4665
4858
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
4666
4859
|
}
|
|
4667
|
-
return /* @__PURE__ */
|
|
4860
|
+
return /* @__PURE__ */ React91.createElement(Box8, null, /* @__PURE__ */ React91.createElement(
|
|
4668
4861
|
Tag,
|
|
4669
4862
|
{
|
|
4670
4863
|
fullWidth: true,
|
|
4671
4864
|
showActionsOnHover: true,
|
|
4672
4865
|
label: dynamicTag.label,
|
|
4673
|
-
startIcon: /* @__PURE__ */
|
|
4866
|
+
startIcon: /* @__PURE__ */ React91.createElement(DatabaseIcon3, { fontSize: SIZE7 }),
|
|
4674
4867
|
...bindTrigger2(selectionPopoverState),
|
|
4675
|
-
actions: /* @__PURE__ */
|
|
4868
|
+
actions: /* @__PURE__ */ React91.createElement(React91.Fragment, null, /* @__PURE__ */ React91.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React91.createElement(
|
|
4676
4869
|
IconButton5,
|
|
4677
4870
|
{
|
|
4678
|
-
size:
|
|
4871
|
+
size: SIZE7,
|
|
4679
4872
|
onClick: removeDynamicTag,
|
|
4680
|
-
"aria-label":
|
|
4873
|
+
"aria-label": __64("Remove dynamic value", "elementor")
|
|
4681
4874
|
},
|
|
4682
|
-
/* @__PURE__ */
|
|
4875
|
+
/* @__PURE__ */ React91.createElement(XIcon, { fontSize: SIZE7 })
|
|
4683
4876
|
))
|
|
4684
4877
|
}
|
|
4685
|
-
), /* @__PURE__ */
|
|
4878
|
+
), /* @__PURE__ */ React91.createElement(
|
|
4686
4879
|
Popover2,
|
|
4687
4880
|
{
|
|
4688
4881
|
disablePortal: true,
|
|
4689
4882
|
disableScrollLock: true,
|
|
4690
|
-
anchorOrigin: { vertical: "bottom", horizontal: "
|
|
4883
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
4884
|
+
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
4885
|
+
PaperProps: {
|
|
4886
|
+
sx: { my: 1 }
|
|
4887
|
+
},
|
|
4691
4888
|
...bindPopover2(selectionPopoverState)
|
|
4692
4889
|
},
|
|
4693
|
-
/* @__PURE__ */
|
|
4890
|
+
/* @__PURE__ */ React91.createElement(Stack17, null, /* @__PURE__ */ React91.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
4694
4891
|
));
|
|
4695
4892
|
};
|
|
4696
4893
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -4699,23 +4896,26 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
4699
4896
|
if (!hasDynamicSettings) {
|
|
4700
4897
|
return null;
|
|
4701
4898
|
}
|
|
4702
|
-
return /* @__PURE__ */
|
|
4899
|
+
return /* @__PURE__ */ React91.createElement(React91.Fragment, null, /* @__PURE__ */ React91.createElement(IconButton5, { size: SIZE7, ...bindTrigger2(popupState), "aria-label": __64("Settings", "elementor") }, /* @__PURE__ */ React91.createElement(SettingsIcon, { fontSize: SIZE7 })), /* @__PURE__ */ React91.createElement(
|
|
4703
4900
|
Popover2,
|
|
4704
4901
|
{
|
|
4705
4902
|
disablePortal: true,
|
|
4706
4903
|
disableScrollLock: true,
|
|
4707
4904
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
4905
|
+
PaperProps: {
|
|
4906
|
+
sx: { my: 0.5 }
|
|
4907
|
+
},
|
|
4708
4908
|
...bindPopover2(popupState)
|
|
4709
4909
|
},
|
|
4710
|
-
/* @__PURE__ */
|
|
4711
|
-
|
|
4910
|
+
/* @__PURE__ */ React91.createElement(
|
|
4911
|
+
PopoverHeader3,
|
|
4712
4912
|
{
|
|
4713
4913
|
title: dynamicTag.label,
|
|
4714
4914
|
onClose: popupState.close,
|
|
4715
|
-
icon: /* @__PURE__ */
|
|
4915
|
+
icon: /* @__PURE__ */ React91.createElement(DatabaseIcon3, { fontSize: SIZE7 })
|
|
4716
4916
|
}
|
|
4717
4917
|
),
|
|
4718
|
-
/* @__PURE__ */
|
|
4918
|
+
/* @__PURE__ */ React91.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls })
|
|
4719
4919
|
));
|
|
4720
4920
|
};
|
|
4721
4921
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -4724,10 +4924,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
4724
4924
|
if (!tabs.length) {
|
|
4725
4925
|
return null;
|
|
4726
4926
|
}
|
|
4727
|
-
return /* @__PURE__ */
|
|
4728
|
-
return /* @__PURE__ */
|
|
4927
|
+
return /* @__PURE__ */ React91.createElement(PopoverScrollableContent2, null, /* @__PURE__ */ React91.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React91.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React91.createElement(Divider8, null), tabs.map(({ value }, index) => {
|
|
4928
|
+
return /* @__PURE__ */ React91.createElement(TabPanel2, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React91.createElement(Stack17, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
4729
4929
|
if (item.type === "control") {
|
|
4730
|
-
return /* @__PURE__ */
|
|
4930
|
+
return /* @__PURE__ */ React91.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
4731
4931
|
}
|
|
4732
4932
|
return null;
|
|
4733
4933
|
})));
|
|
@@ -4737,7 +4937,7 @@ var Control3 = ({ control }) => {
|
|
|
4737
4937
|
if (!getControl(control.type)) {
|
|
4738
4938
|
return null;
|
|
4739
4939
|
}
|
|
4740
|
-
return /* @__PURE__ */
|
|
4940
|
+
return /* @__PURE__ */ React91.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React91.createElement(Grid5, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React91.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React91.createElement(ControlFormLabel5, null, control.label)) : null, /* @__PURE__ */ React91.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React91.createElement(Control, { type: control.type, props: control.props }))));
|
|
4741
4941
|
};
|
|
4742
4942
|
|
|
4743
4943
|
// src/dynamics/dynamic-transformer.ts
|
|
@@ -4790,18 +4990,18 @@ function getDynamicValue(name, settings) {
|
|
|
4790
4990
|
}
|
|
4791
4991
|
|
|
4792
4992
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
4793
|
-
import * as
|
|
4993
|
+
import * as React92 from "react";
|
|
4794
4994
|
import { useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
4795
4995
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
4796
|
-
import { __ as
|
|
4996
|
+
import { __ as __65 } from "@wordpress/i18n";
|
|
4797
4997
|
var usePropDynamicAction = () => {
|
|
4798
4998
|
const { propType } = useBoundProp7();
|
|
4799
4999
|
const visible = !!propType && supportsDynamic(propType);
|
|
4800
5000
|
return {
|
|
4801
5001
|
visible,
|
|
4802
5002
|
icon: DatabaseIcon4,
|
|
4803
|
-
title:
|
|
4804
|
-
content: ({ close }) => /* @__PURE__ */
|
|
5003
|
+
title: __65("Dynamic tags", "elementor"),
|
|
5004
|
+
content: ({ close }) => /* @__PURE__ */ React92.createElement(DynamicSelection, { close })
|
|
4805
5005
|
};
|
|
4806
5006
|
};
|
|
4807
5007
|
|
|
@@ -4833,7 +5033,7 @@ var init = () => {
|
|
|
4833
5033
|
// src/reset-style-props.tsx
|
|
4834
5034
|
import { useBoundProp as useBoundProp8 } from "@elementor/editor-controls";
|
|
4835
5035
|
import { BrushBigIcon } from "@elementor/icons";
|
|
4836
|
-
import { __ as
|
|
5036
|
+
import { __ as __66 } from "@wordpress/i18n";
|
|
4837
5037
|
var { registerAction } = controlActionsMenu;
|
|
4838
5038
|
function initResetStyleProps() {
|
|
4839
5039
|
registerAction({
|
|
@@ -4847,7 +5047,7 @@ function useResetStyleValueProps() {
|
|
|
4847
5047
|
const { value, setValue, path, bind } = useBoundProp8();
|
|
4848
5048
|
return {
|
|
4849
5049
|
visible: isStyle && value !== null && value !== void 0 && path.length <= 2 && !EXCLUDED_BINDS.includes(bind),
|
|
4850
|
-
title:
|
|
5050
|
+
title: __66("Clear", "elementor"),
|
|
4851
5051
|
icon: BrushBigIcon,
|
|
4852
5052
|
onClick: () => setValue(null)
|
|
4853
5053
|
};
|
|
@@ -4857,36 +5057,36 @@ function useResetStyleValueProps() {
|
|
|
4857
5057
|
import { createTransformer as createTransformer6, styleTransformersRegistry as styleTransformersRegistry2 } from "@elementor/editor-canvas";
|
|
4858
5058
|
|
|
4859
5059
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
4860
|
-
import * as
|
|
5060
|
+
import * as React93 from "react";
|
|
4861
5061
|
import { createTransformer as createTransformer2 } from "@elementor/editor-canvas";
|
|
4862
|
-
import { Stack as
|
|
4863
|
-
var backgroundColorOverlayTransformer = createTransformer2((value) => /* @__PURE__ */
|
|
5062
|
+
import { Stack as Stack18, styled as styled7, UnstableColorIndicator } from "@elementor/ui";
|
|
5063
|
+
var backgroundColorOverlayTransformer = createTransformer2((value) => /* @__PURE__ */ React93.createElement(Stack18, { direction: "row", gap: 10 }, /* @__PURE__ */ React93.createElement(ItemIconColor, { value }), /* @__PURE__ */ React93.createElement(ItemLabelColor, { value })));
|
|
4864
5064
|
var ItemIconColor = ({ value }) => {
|
|
4865
5065
|
const { color } = value;
|
|
4866
|
-
return /* @__PURE__ */
|
|
5066
|
+
return /* @__PURE__ */ React93.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
4867
5067
|
};
|
|
4868
5068
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
4869
|
-
return /* @__PURE__ */
|
|
5069
|
+
return /* @__PURE__ */ React93.createElement("span", null, color);
|
|
4870
5070
|
};
|
|
4871
5071
|
var StyledUnstableColorIndicator = styled7(UnstableColorIndicator)(({ theme }) => ({
|
|
4872
5072
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
4873
5073
|
}));
|
|
4874
5074
|
|
|
4875
5075
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
4876
|
-
import * as
|
|
5076
|
+
import * as React94 from "react";
|
|
4877
5077
|
import { createTransformer as createTransformer3 } from "@elementor/editor-canvas";
|
|
4878
|
-
import { Stack as
|
|
4879
|
-
import { __ as
|
|
4880
|
-
var backgroundGradientOverlayTransformer = createTransformer3((value) => /* @__PURE__ */
|
|
5078
|
+
import { Stack as Stack19 } from "@elementor/ui";
|
|
5079
|
+
import { __ as __67 } from "@wordpress/i18n";
|
|
5080
|
+
var backgroundGradientOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React94.createElement(Stack19, { direction: "row", gap: 10 }, /* @__PURE__ */ React94.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React94.createElement(ItemLabelGradient, { value })));
|
|
4881
5081
|
var ItemIconGradient = ({ value }) => {
|
|
4882
5082
|
const gradient = getGradientValue(value);
|
|
4883
|
-
return /* @__PURE__ */
|
|
5083
|
+
return /* @__PURE__ */ React94.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
4884
5084
|
};
|
|
4885
5085
|
var ItemLabelGradient = ({ value }) => {
|
|
4886
5086
|
if (value.type === "linear") {
|
|
4887
|
-
return /* @__PURE__ */
|
|
5087
|
+
return /* @__PURE__ */ React94.createElement("span", null, __67("Linear Gradient", "elementor"));
|
|
4888
5088
|
}
|
|
4889
|
-
return /* @__PURE__ */
|
|
5089
|
+
return /* @__PURE__ */ React94.createElement("span", null, __67("Radial Gradient", "elementor"));
|
|
4890
5090
|
};
|
|
4891
5091
|
var getGradientValue = (gradient) => {
|
|
4892
5092
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -4897,15 +5097,15 @@ var getGradientValue = (gradient) => {
|
|
|
4897
5097
|
};
|
|
4898
5098
|
|
|
4899
5099
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
4900
|
-
import * as
|
|
5100
|
+
import * as React95 from "react";
|
|
4901
5101
|
import { createTransformer as createTransformer4 } from "@elementor/editor-canvas";
|
|
4902
5102
|
import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
|
|
4903
|
-
import { CardMedia, Stack as
|
|
5103
|
+
import { CardMedia, Stack as Stack20 } from "@elementor/ui";
|
|
4904
5104
|
import { useWpMediaAttachment } from "@elementor/wp-media";
|
|
4905
|
-
var backgroundImageOverlayTransformer = createTransformer4((value) => /* @__PURE__ */
|
|
5105
|
+
var backgroundImageOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React95.createElement(Stack20, { direction: "row", gap: 10 }, /* @__PURE__ */ React95.createElement(ItemIconImage, { value }), /* @__PURE__ */ React95.createElement(ItemLabelImage, { value })));
|
|
4906
5106
|
var ItemIconImage = ({ value }) => {
|
|
4907
5107
|
const { imageUrl } = useImage(value);
|
|
4908
|
-
return /* @__PURE__ */
|
|
5108
|
+
return /* @__PURE__ */ React95.createElement(
|
|
4909
5109
|
CardMedia,
|
|
4910
5110
|
{
|
|
4911
5111
|
image: imageUrl,
|
|
@@ -4920,7 +5120,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
4920
5120
|
};
|
|
4921
5121
|
var ItemLabelImage = ({ value }) => {
|
|
4922
5122
|
const { imageTitle } = useImage(value);
|
|
4923
|
-
return /* @__PURE__ */
|
|
5123
|
+
return /* @__PURE__ */ React95.createElement(EllipsisWithTooltip2, { title: imageTitle }, /* @__PURE__ */ React95.createElement("span", null, imageTitle));
|
|
4924
5124
|
};
|
|
4925
5125
|
var useImage = (image) => {
|
|
4926
5126
|
let imageTitle, imageUrl = null;
|
|
@@ -4945,14 +5145,14 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
4945
5145
|
};
|
|
4946
5146
|
|
|
4947
5147
|
// src/styles-inheritance/transformers/background-overlay-transformer.tsx
|
|
4948
|
-
import * as
|
|
5148
|
+
import * as React96 from "react";
|
|
4949
5149
|
import { createTransformer as createTransformer5 } from "@elementor/editor-canvas";
|
|
4950
|
-
import { Stack as
|
|
5150
|
+
import { Stack as Stack21 } from "@elementor/ui";
|
|
4951
5151
|
var backgroundOverlayTransformer = createTransformer5((values) => {
|
|
4952
5152
|
if (!values || values.length === 0) {
|
|
4953
5153
|
return null;
|
|
4954
5154
|
}
|
|
4955
|
-
return /* @__PURE__ */
|
|
5155
|
+
return /* @__PURE__ */ React96.createElement(Stack21, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React96.createElement(Stack21, { key: index }, item)));
|
|
4956
5156
|
});
|
|
4957
5157
|
|
|
4958
5158
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -4996,13 +5196,9 @@ function init3() {
|
|
|
4996
5196
|
id: "editing-panel-hooks",
|
|
4997
5197
|
component: EditingPanelHooks
|
|
4998
5198
|
});
|
|
4999
|
-
injectIntoLogic({
|
|
5000
|
-
id: "current-user-data",
|
|
5001
|
-
component: PrefetchUserData
|
|
5002
|
-
});
|
|
5003
5199
|
init();
|
|
5004
5200
|
init2();
|
|
5005
|
-
if (
|
|
5201
|
+
if (isExperimentActive18(EXPERIMENTAL_FEATURES.V_3_30)) {
|
|
5006
5202
|
initResetStyleProps();
|
|
5007
5203
|
}
|
|
5008
5204
|
}
|
|
@@ -5013,6 +5209,8 @@ var blockV1Panel = () => {
|
|
|
5013
5209
|
});
|
|
5014
5210
|
};
|
|
5015
5211
|
export {
|
|
5212
|
+
EXPERIMENTAL_FEATURES,
|
|
5213
|
+
PopoverScrollableContent,
|
|
5016
5214
|
controlActionsMenu,
|
|
5017
5215
|
init3 as init,
|
|
5018
5216
|
injectIntoClassSelectorActions,
|
|
@@ -5021,6 +5219,7 @@ export {
|
|
|
5021
5219
|
useBoundProp9 as useBoundProp,
|
|
5022
5220
|
useFontFamilies,
|
|
5023
5221
|
usePanelActions,
|
|
5024
|
-
usePanelStatus
|
|
5222
|
+
usePanelStatus,
|
|
5223
|
+
useSectionWidth
|
|
5025
5224
|
};
|
|
5026
5225
|
//# sourceMappingURL=index.mjs.map
|