@elementor/editor-editing-panel 1.45.0 → 1.46.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 +42 -0
- package/dist/index.d.mts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +702 -688
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +587 -573
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -13
- package/src/components/css-classes/css-class-menu.tsx +6 -8
- package/src/components/css-classes/css-class-selector.tsx +17 -11
- package/src/components/settings-tab.tsx +25 -2
- package/src/components/style-indicator.tsx +19 -15
- package/src/components/style-sections/border-section/border-field.tsx +4 -6
- package/src/components/style-sections/effects-section/effects-section.tsx +6 -0
- package/src/components/style-sections/layout-section/flex-order-field.tsx +1 -3
- package/src/components/style-sections/layout-section/flex-size-field.tsx +7 -10
- package/src/components/style-sections/layout-section/layout-section.tsx +2 -2
- package/src/components/style-sections/layout-section/opacity-control-field.tsx +25 -0
- package/src/components/style-sections/layout-section/utils/rotated-icon.tsx +1 -1
- package/src/components/style-sections/position-section/position-section.tsx +6 -6
- package/src/components/style-sections/size-section/object-position-field.tsx +2 -24
- package/src/components/style-sections/size-section/size-section.tsx +1 -1
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +4 -6
- package/src/components/style-sections/typography-section/typography-section.tsx +4 -2
- package/src/controls-registry/controls-registry.tsx +30 -10
- package/src/controls-registry/styles-field.tsx +1 -3
- package/src/dynamics/components/dynamic-selection-control.tsx +10 -18
- package/src/dynamics/components/dynamic-selection.tsx +58 -77
- package/src/dynamics/hooks/use-prop-dynamic-action.tsx +1 -1
- package/src/hooks/use-styles-field.ts +9 -3
- package/src/hooks/use-styles-fields.ts +4 -4
- package/src/index.ts +1 -0
- package/src/popover-action.tsx +3 -5
- package/src/provider-colors-registry.ts +20 -0
- package/src/styles-inheritance/components/infotip/label-chip.tsx +4 -5
- package/src/styles-inheritance/components/styles-inheritance-indicator.tsx +32 -40
- package/src/styles-inheritance/components/styles-inheritance-infotip.tsx +1 -5
- package/src/styles-inheritance/components/styles-inheritance-section-indicators.tsx +29 -44
- package/src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx +1 -17
- package/src/styles-inheritance/types.ts +0 -2
- package/src/styles-inheritance/utils.ts +17 -1
- package/src/utils/get-styles-provider-color.ts +28 -0
package/dist/index.mjs
CHANGED
|
@@ -5,6 +5,17 @@ import { useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
|
5
5
|
import { createControlReplacementsRegistry } from "@elementor/editor-controls";
|
|
6
6
|
var { registerControlReplacement, getControlReplacements } = createControlReplacementsRegistry();
|
|
7
7
|
|
|
8
|
+
// src/provider-colors-registry.ts
|
|
9
|
+
var DEFAULT_COLORS = {
|
|
10
|
+
name: "default",
|
|
11
|
+
getThemeColor: null
|
|
12
|
+
};
|
|
13
|
+
var providerColorsRegistry = /* @__PURE__ */ new Map();
|
|
14
|
+
var registerStyleProviderToColors = (provider, colors) => {
|
|
15
|
+
providerColorsRegistry.set(provider, colors);
|
|
16
|
+
};
|
|
17
|
+
var getStyleProviderColors = (provider) => providerColorsRegistry.get(provider) ?? DEFAULT_COLORS;
|
|
18
|
+
|
|
8
19
|
// src/components/css-classes/css-class-selector.tsx
|
|
9
20
|
import * as React8 from "react";
|
|
10
21
|
import { useRef, useState as useState4 } from "react";
|
|
@@ -19,7 +30,14 @@ import {
|
|
|
19
30
|
import { InfoAlert, WarningInfotip } from "@elementor/editor-ui";
|
|
20
31
|
import { ColorSwatchIcon, MapPinIcon } from "@elementor/icons";
|
|
21
32
|
import { createLocation } from "@elementor/locations";
|
|
22
|
-
import {
|
|
33
|
+
import {
|
|
34
|
+
Box as Box2,
|
|
35
|
+
Chip as Chip3,
|
|
36
|
+
FormLabel,
|
|
37
|
+
Link,
|
|
38
|
+
Stack as Stack3,
|
|
39
|
+
Typography as Typography3
|
|
40
|
+
} from "@elementor/ui";
|
|
23
41
|
import { __ as __4 } from "@wordpress/i18n";
|
|
24
42
|
|
|
25
43
|
// src/contexts/classes-prop-context.tsx
|
|
@@ -104,6 +122,27 @@ function useIsStyle() {
|
|
|
104
122
|
return !!useContext3(Context3);
|
|
105
123
|
}
|
|
106
124
|
|
|
125
|
+
// src/utils/get-styles-provider-color.ts
|
|
126
|
+
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY, isElementsStylesProvider } from "@elementor/editor-styles-repository";
|
|
127
|
+
var getStylesProviderColorName = (provider) => {
|
|
128
|
+
if (!provider || provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
129
|
+
return "default";
|
|
130
|
+
}
|
|
131
|
+
if (isElementsStylesProvider(provider)) {
|
|
132
|
+
return "accent";
|
|
133
|
+
}
|
|
134
|
+
return getStyleProviderColors(provider).name;
|
|
135
|
+
};
|
|
136
|
+
var getStylesProviderThemeColor = (provider) => {
|
|
137
|
+
if (!provider || provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
if (isElementsStylesProvider(provider)) {
|
|
141
|
+
return (theme) => theme.palette.accent.main;
|
|
142
|
+
}
|
|
143
|
+
return getStyleProviderColors(provider).getThemeColor;
|
|
144
|
+
};
|
|
145
|
+
|
|
107
146
|
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
108
147
|
import * as React4 from "react";
|
|
109
148
|
import { useId, useMemo } from "react";
|
|
@@ -470,11 +509,7 @@ function CssClassProvider({ children, ...contextValue }) {
|
|
|
470
509
|
|
|
471
510
|
// src/components/css-classes/css-class-menu.tsx
|
|
472
511
|
import * as React6 from "react";
|
|
473
|
-
import {
|
|
474
|
-
isElementsStylesProvider,
|
|
475
|
-
stylesRepository as stylesRepository2,
|
|
476
|
-
useUserStylesCapability as useUserStylesCapability2
|
|
477
|
-
} from "@elementor/editor-styles-repository";
|
|
512
|
+
import { stylesRepository as stylesRepository2, useUserStylesCapability as useUserStylesCapability2 } from "@elementor/editor-styles-repository";
|
|
478
513
|
import { MenuItemInfotip, MenuListItem } from "@elementor/editor-ui";
|
|
479
514
|
import { bindMenu, Divider, Menu, MenuSubheader, Stack } from "@elementor/ui";
|
|
480
515
|
import { __ as __2 } from "@wordpress/i18n";
|
|
@@ -482,22 +517,17 @@ import { __ as __2 } from "@wordpress/i18n";
|
|
|
482
517
|
// src/components/style-indicator.tsx
|
|
483
518
|
import { styled as styled2 } from "@elementor/ui";
|
|
484
519
|
var StyleIndicator = styled2("div", {
|
|
485
|
-
shouldForwardProp: (prop) =>
|
|
520
|
+
shouldForwardProp: (prop) => !["isOverridden", "getColor"].includes(prop)
|
|
486
521
|
})`
|
|
487
522
|
width: 5px;
|
|
488
523
|
height: 5px;
|
|
489
524
|
border-radius: 50%;
|
|
490
|
-
background-color: ${({ theme,
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
return theme.palette.warning.light;
|
|
494
|
-
case "global":
|
|
495
|
-
return theme.palette.global.dark;
|
|
496
|
-
case "local":
|
|
497
|
-
return theme.palette.accent.main;
|
|
498
|
-
default:
|
|
499
|
-
return theme.palette.text.disabled;
|
|
525
|
+
background-color: ${({ theme, isOverridden, getColor }) => {
|
|
526
|
+
if (isOverridden) {
|
|
527
|
+
return theme.palette.warning.light;
|
|
500
528
|
}
|
|
529
|
+
const providerColor = getColor?.(theme);
|
|
530
|
+
return providerColor ?? theme.palette.text.disabled;
|
|
501
531
|
}};
|
|
502
532
|
`;
|
|
503
533
|
|
|
@@ -775,7 +805,6 @@ function StateMenuItem({ state, closeMenu, ...props }) {
|
|
|
775
805
|
const { userCan } = useUserStylesCapability2();
|
|
776
806
|
const modifiedStates = useModifiedStates(styleId);
|
|
777
807
|
const isUpdateAllowed = !state || userCan(provider ?? "").updateProps;
|
|
778
|
-
const indicatorVariant = !provider || isElementsStylesProvider(provider) ? "local" : "global";
|
|
779
808
|
const isStyled = modifiedStates[state ?? "normal"] ?? false;
|
|
780
809
|
const disabled = !isUpdateAllowed && !isStyled;
|
|
781
810
|
const isActive = styleId === activeId;
|
|
@@ -801,7 +830,13 @@ function StateMenuItem({ state, closeMenu, ...props }) {
|
|
|
801
830
|
showInfoTip: disabled,
|
|
802
831
|
content: __2("With your current role, you can only use existing states.", "elementor")
|
|
803
832
|
},
|
|
804
|
-
/* @__PURE__ */ React6.createElement(Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React6.createElement(
|
|
833
|
+
/* @__PURE__ */ React6.createElement(Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React6.createElement(
|
|
834
|
+
StyleIndicator,
|
|
835
|
+
{
|
|
836
|
+
"aria-label": __2("Has style", "elementor"),
|
|
837
|
+
getColor: getStylesProviderThemeColor(provider ?? "")
|
|
838
|
+
}
|
|
839
|
+
), state ?? "normal")
|
|
805
840
|
)
|
|
806
841
|
);
|
|
807
842
|
}
|
|
@@ -1025,16 +1060,7 @@ function CssClassSelector() {
|
|
|
1025
1060
|
})
|
|
1026
1061
|
}
|
|
1027
1062
|
)
|
|
1028
|
-
), !canEdit && /* @__PURE__ */ React8.createElement(
|
|
1029
|
-
InfoAlert,
|
|
1030
|
-
{
|
|
1031
|
-
content: __4(
|
|
1032
|
-
"With your current role, you can use existing classes but can\u2019t modify them.",
|
|
1033
|
-
"elementor"
|
|
1034
|
-
),
|
|
1035
|
-
sx: { mt: 1 }
|
|
1036
|
-
}
|
|
1037
|
-
));
|
|
1063
|
+
), !canEdit && /* @__PURE__ */ React8.createElement(InfoAlert, { sx: { mt: 1 } }, __4("With your current role, you can use existing classes but can\u2019t modify them.", "elementor")));
|
|
1038
1064
|
}
|
|
1039
1065
|
var EmptyState = ({ searchValue, onClear }) => /* @__PURE__ */ React8.createElement(Box2, { sx: { py: 4 } }, /* @__PURE__ */ React8.createElement(
|
|
1040
1066
|
Stack3,
|
|
@@ -1074,7 +1100,7 @@ function useOptions() {
|
|
|
1074
1100
|
label: styleDef.label,
|
|
1075
1101
|
value: styleDef.id,
|
|
1076
1102
|
fixed: isElements,
|
|
1077
|
-
color:
|
|
1103
|
+
color: getStylesProviderColorName(provider.getKey()),
|
|
1078
1104
|
icon: isElements ? /* @__PURE__ */ React8.createElement(MapPinIcon, null) : null,
|
|
1079
1105
|
provider: provider.getKey()
|
|
1080
1106
|
};
|
|
@@ -1142,7 +1168,7 @@ function useHandleSelect() {
|
|
|
1142
1168
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
1143
1169
|
|
|
1144
1170
|
// src/components/editing-panel.tsx
|
|
1145
|
-
import * as
|
|
1171
|
+
import * as React85 from "react";
|
|
1146
1172
|
import { ControlActionsProvider, ControlReplacementsProvider } from "@elementor/editor-controls";
|
|
1147
1173
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
1148
1174
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
@@ -1169,14 +1195,13 @@ function Action({ title, visible = true, icon: Icon, onClick }) {
|
|
|
1169
1195
|
// src/popover-action.tsx
|
|
1170
1196
|
import * as React10 from "react";
|
|
1171
1197
|
import { useId as useId2 } from "react";
|
|
1172
|
-
import { PopoverHeader } from "@elementor/editor-ui";
|
|
1173
1198
|
import { bindPopover, bindToggle, IconButton as IconButton2, Popover, Tooltip as Tooltip2, usePopupState as usePopupState2 } from "@elementor/ui";
|
|
1174
1199
|
var SIZE2 = "tiny";
|
|
1175
1200
|
function PopoverAction({
|
|
1176
1201
|
title,
|
|
1177
1202
|
visible = true,
|
|
1178
1203
|
icon: Icon,
|
|
1179
|
-
|
|
1204
|
+
content: PopoverContent2
|
|
1180
1205
|
}) {
|
|
1181
1206
|
const id = useId2();
|
|
1182
1207
|
const popupState = usePopupState2({
|
|
@@ -1197,8 +1222,7 @@ function PopoverAction({
|
|
|
1197
1222
|
},
|
|
1198
1223
|
...bindPopover(popupState)
|
|
1199
1224
|
},
|
|
1200
|
-
/* @__PURE__ */ React10.createElement(
|
|
1201
|
-
/* @__PURE__ */ React10.createElement(PopoverContent2, { closePopover: popupState.close })
|
|
1225
|
+
/* @__PURE__ */ React10.createElement(PopoverContent2, { close: popupState.close })
|
|
1202
1226
|
));
|
|
1203
1227
|
}
|
|
1204
1228
|
|
|
@@ -1218,7 +1242,7 @@ function EditorPanelErrorFallback() {
|
|
|
1218
1242
|
}
|
|
1219
1243
|
|
|
1220
1244
|
// src/components/editing-panel-tabs.tsx
|
|
1221
|
-
import * as
|
|
1245
|
+
import * as React84 from "react";
|
|
1222
1246
|
import { Fragment as Fragment9 } from "react";
|
|
1223
1247
|
import { isExperimentActive as isExperimentActive13 } from "@elementor/editor-v1-adapters";
|
|
1224
1248
|
import { Divider as Divider6, Stack as Stack18, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
@@ -1318,7 +1342,9 @@ import * as React13 from "react";
|
|
|
1318
1342
|
// src/controls-registry/controls-registry.tsx
|
|
1319
1343
|
import {
|
|
1320
1344
|
ImageControl,
|
|
1345
|
+
KeyValueControl,
|
|
1321
1346
|
LinkControl,
|
|
1347
|
+
RepeatableControl,
|
|
1322
1348
|
SelectControl,
|
|
1323
1349
|
SizeControl,
|
|
1324
1350
|
SvgMediaControl,
|
|
@@ -1327,19 +1353,31 @@ import {
|
|
|
1327
1353
|
TextControl,
|
|
1328
1354
|
UrlControl
|
|
1329
1355
|
} from "@elementor/editor-controls";
|
|
1356
|
+
import {
|
|
1357
|
+
booleanPropTypeUtil,
|
|
1358
|
+
imagePropTypeUtil,
|
|
1359
|
+
imageSrcPropTypeUtil,
|
|
1360
|
+
keyValuePropTypeUtil,
|
|
1361
|
+
linkPropTypeUtil,
|
|
1362
|
+
sizePropTypeUtil,
|
|
1363
|
+
stringPropTypeUtil
|
|
1364
|
+
} from "@elementor/editor-props";
|
|
1330
1365
|
var controlTypes = {
|
|
1331
|
-
image: { component: ImageControl, layout: "full" },
|
|
1332
|
-
"svg-media": { component: SvgMediaControl, layout: "full" },
|
|
1333
|
-
text: { component: TextControl, layout: "full" },
|
|
1334
|
-
textarea: { component: TextAreaControl, layout: "full" },
|
|
1335
|
-
size: { component: SizeControl, layout: "two-columns" },
|
|
1336
|
-
select: { component: SelectControl, layout: "two-columns" },
|
|
1337
|
-
link: { component: LinkControl, layout: "full" },
|
|
1338
|
-
url: { component: UrlControl, layout: "full" },
|
|
1339
|
-
switch: { component: SwitchControl, layout: "two-columns" }
|
|
1366
|
+
image: { component: ImageControl, layout: "full", propTypeUtil: imagePropTypeUtil },
|
|
1367
|
+
"svg-media": { component: SvgMediaControl, layout: "full", propTypeUtil: imageSrcPropTypeUtil },
|
|
1368
|
+
text: { component: TextControl, layout: "full", propTypeUtil: stringPropTypeUtil },
|
|
1369
|
+
textarea: { component: TextAreaControl, layout: "full", propTypeUtil: stringPropTypeUtil },
|
|
1370
|
+
size: { component: SizeControl, layout: "two-columns", propTypeUtil: sizePropTypeUtil },
|
|
1371
|
+
select: { component: SelectControl, layout: "two-columns", propTypeUtil: stringPropTypeUtil },
|
|
1372
|
+
link: { component: LinkControl, layout: "full", propTypeUtil: linkPropTypeUtil },
|
|
1373
|
+
url: { component: UrlControl, layout: "full", propTypeUtil: stringPropTypeUtil },
|
|
1374
|
+
switch: { component: SwitchControl, layout: "two-columns", propTypeUtil: booleanPropTypeUtil },
|
|
1375
|
+
repeatable: { component: RepeatableControl, layout: "full", propTypeUtil: void 0 },
|
|
1376
|
+
"key-value": { component: KeyValueControl, layout: "full", propTypeUtil: keyValuePropTypeUtil }
|
|
1340
1377
|
};
|
|
1341
1378
|
var getControl = (type) => controlTypes[type]?.component;
|
|
1342
1379
|
var getDefaultLayout = (type) => controlTypes[type].layout;
|
|
1380
|
+
var getPropTypeUtil = (type) => controlTypes[type]?.propTypeUtil;
|
|
1343
1381
|
|
|
1344
1382
|
// src/controls-registry/control.tsx
|
|
1345
1383
|
var Control = ({ props, type }) => {
|
|
@@ -1536,11 +1574,27 @@ var Control2 = ({ control }) => {
|
|
|
1536
1574
|
return null;
|
|
1537
1575
|
}
|
|
1538
1576
|
const layout = control.meta?.layout || getDefaultLayout(control.type);
|
|
1539
|
-
|
|
1540
|
-
};
|
|
1577
|
+
const controlProps = populateChildControlProps(control.props);
|
|
1578
|
+
return /* @__PURE__ */ React19.createElement(SettingsField, { bind: control.bind }, control.meta?.topDivider && /* @__PURE__ */ React19.createElement(Divider3, null), /* @__PURE__ */ React19.createElement(ControlTypeContainer, { layout }, control.label ? /* @__PURE__ */ React19.createElement(ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React19.createElement(Control, { type: control.type, props: controlProps })));
|
|
1579
|
+
};
|
|
1580
|
+
function populateChildControlProps(props) {
|
|
1581
|
+
if (props.childControlType) {
|
|
1582
|
+
const childComponent = getControl(props.childControlType);
|
|
1583
|
+
const childPropType = getPropTypeUtil(props.childControlType);
|
|
1584
|
+
props = {
|
|
1585
|
+
...props,
|
|
1586
|
+
childControlConfig: {
|
|
1587
|
+
component: childComponent,
|
|
1588
|
+
props: props.childControlProps || {},
|
|
1589
|
+
propTypeUtil: childPropType
|
|
1590
|
+
}
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
return props;
|
|
1594
|
+
}
|
|
1541
1595
|
|
|
1542
1596
|
// src/components/style-tab.tsx
|
|
1543
|
-
import * as
|
|
1597
|
+
import * as React83 from "react";
|
|
1544
1598
|
import { useState as useState12 } from "react";
|
|
1545
1599
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
1546
1600
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
@@ -1579,6 +1633,14 @@ var DEFAULT_STATE = "normal";
|
|
|
1579
1633
|
var DEFAULT_BREAKPOINT = "desktop";
|
|
1580
1634
|
var getStateKey = (state) => state ?? DEFAULT_STATE;
|
|
1581
1635
|
var getBreakpointKey = (breakpoint) => breakpoint ?? DEFAULT_BREAKPOINT;
|
|
1636
|
+
var getValueFromInheritanceChain = (inheritanceChain, styleId, meta) => inheritanceChain.find(
|
|
1637
|
+
({
|
|
1638
|
+
style,
|
|
1639
|
+
variant: {
|
|
1640
|
+
meta: { breakpoint, state }
|
|
1641
|
+
}
|
|
1642
|
+
}) => style.id === styleId && breakpoint === meta.breakpoint && state === meta.state
|
|
1643
|
+
);
|
|
1582
1644
|
|
|
1583
1645
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
1584
1646
|
function createSnapshotsManager(getStylesByMeta, breakpointsRoot) {
|
|
@@ -1878,19 +1940,19 @@ import { undoable as undoable2 } from "@elementor/editor-v1-adapters";
|
|
|
1878
1940
|
import { __ as __6 } from "@wordpress/i18n";
|
|
1879
1941
|
function useStylesFields(propNames) {
|
|
1880
1942
|
const { element } = useElement();
|
|
1881
|
-
const { id, meta, provider } = useStyle();
|
|
1943
|
+
const { id, meta, provider, canEdit } = useStyle();
|
|
1882
1944
|
const classesProp = useClassesProp();
|
|
1883
1945
|
const undoableUpdateStyle = useUndoableUpdateStyle();
|
|
1884
1946
|
const undoableCreateElementStyle = useUndoableCreateElementStyle();
|
|
1885
1947
|
useStylesRerender();
|
|
1886
|
-
const
|
|
1948
|
+
const values = getProps({
|
|
1887
1949
|
elementId: element.id,
|
|
1888
1950
|
styleId: id,
|
|
1889
1951
|
provider,
|
|
1890
1952
|
meta,
|
|
1891
1953
|
propNames
|
|
1892
1954
|
});
|
|
1893
|
-
const
|
|
1955
|
+
const setValues = (props) => {
|
|
1894
1956
|
if (id === null) {
|
|
1895
1957
|
undoableCreateElementStyle({
|
|
1896
1958
|
elementId: element.id,
|
|
@@ -1908,7 +1970,7 @@ function useStylesFields(propNames) {
|
|
|
1908
1970
|
props
|
|
1909
1971
|
});
|
|
1910
1972
|
};
|
|
1911
|
-
return
|
|
1973
|
+
return { values, setValues, canEdit };
|
|
1912
1974
|
}
|
|
1913
1975
|
function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
1914
1976
|
if (!provider || !styleId) {
|
|
@@ -1995,21 +2057,21 @@ function getCurrentProps(style, meta) {
|
|
|
1995
2057
|
|
|
1996
2058
|
// src/hooks/use-styles-field.ts
|
|
1997
2059
|
function useStylesField(propName) {
|
|
1998
|
-
const
|
|
2060
|
+
const { values, setValues, canEdit } = useStylesFields([propName]);
|
|
1999
2061
|
const value = values?.[propName] ?? null;
|
|
2000
2062
|
const setValue = (newValue) => {
|
|
2001
2063
|
setValues({
|
|
2002
2064
|
[propName]: newValue
|
|
2003
2065
|
});
|
|
2004
2066
|
};
|
|
2005
|
-
return
|
|
2067
|
+
return { value, setValue, canEdit };
|
|
2006
2068
|
}
|
|
2007
2069
|
|
|
2008
2070
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2009
2071
|
import * as React27 from "react";
|
|
2010
2072
|
import { useBoundProp } from "@elementor/editor-controls";
|
|
2011
2073
|
import { isEmpty as isEmpty2 } from "@elementor/editor-props";
|
|
2012
|
-
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as
|
|
2074
|
+
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
2013
2075
|
import { isExperimentActive as isExperimentActive6 } from "@elementor/editor-v1-adapters";
|
|
2014
2076
|
import { Tooltip as Tooltip6 } from "@elementor/ui";
|
|
2015
2077
|
import { __ as __10 } from "@wordpress/i18n";
|
|
@@ -2082,7 +2144,7 @@ function useDirection() {
|
|
|
2082
2144
|
|
|
2083
2145
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
2084
2146
|
import { isValidElement, useEffect as useEffect3, useState as useState8 } from "react";
|
|
2085
|
-
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY } from "@elementor/editor-styles-repository";
|
|
2147
|
+
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY2 } from "@elementor/editor-styles-repository";
|
|
2086
2148
|
import { __ as __7 } from "@wordpress/i18n";
|
|
2087
2149
|
var MAXIMUM_ITEMS = 2;
|
|
2088
2150
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
@@ -2094,7 +2156,7 @@ var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
|
2094
2156
|
);
|
|
2095
2157
|
const validItems = normalizedItems.map((item) => ({
|
|
2096
2158
|
...item,
|
|
2097
|
-
displayLabel:
|
|
2159
|
+
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel : __7("Base", "elementor")
|
|
2098
2160
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
2099
2161
|
setItems(validItems);
|
|
2100
2162
|
})();
|
|
@@ -2115,8 +2177,7 @@ var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
|
2115
2177
|
provider: item.provider || "",
|
|
2116
2178
|
breakpoint: breakpoint ?? DEFAULT_BREAKPOINT2,
|
|
2117
2179
|
displayLabel,
|
|
2118
|
-
value: await getTransformedValue(item, bind, resolve)
|
|
2119
|
-
chipColor: getChipColor(item)
|
|
2180
|
+
value: await getTransformedValue(item, bind, resolve)
|
|
2120
2181
|
};
|
|
2121
2182
|
};
|
|
2122
2183
|
var getTransformedValue = async (item, bind, resolve) => {
|
|
@@ -2138,16 +2199,6 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
2138
2199
|
return "";
|
|
2139
2200
|
}
|
|
2140
2201
|
};
|
|
2141
|
-
var getChipColor = (item) => {
|
|
2142
|
-
const { provider = "", style } = item;
|
|
2143
|
-
if (provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
2144
|
-
return "default";
|
|
2145
|
-
}
|
|
2146
|
-
if (style?.label === "local") {
|
|
2147
|
-
return "accent";
|
|
2148
|
-
}
|
|
2149
|
-
return "global";
|
|
2150
|
-
};
|
|
2151
2202
|
|
|
2152
2203
|
// src/styles-inheritance/styles-inheritance-transformers-registry.tsx
|
|
2153
2204
|
import { createTransformersRegistry } from "@elementor/editor-canvas";
|
|
@@ -2190,20 +2241,20 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
2190
2241
|
|
|
2191
2242
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
2192
2243
|
import * as React23 from "react";
|
|
2193
|
-
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as
|
|
2244
|
+
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY3 } from "@elementor/editor-styles-repository";
|
|
2194
2245
|
import { InfoCircleIcon } from "@elementor/icons";
|
|
2195
2246
|
import { Chip as Chip4, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
2196
2247
|
import { __ as __8 } from "@wordpress/i18n";
|
|
2197
2248
|
var SIZE4 = "tiny";
|
|
2198
|
-
var LabelChip = ({ displayLabel, provider
|
|
2199
|
-
const isBaseStyle = provider ===
|
|
2249
|
+
var LabelChip = ({ displayLabel, provider }) => {
|
|
2250
|
+
const isBaseStyle = provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY3;
|
|
2200
2251
|
const chipIcon = isBaseStyle ? /* @__PURE__ */ React23.createElement(Tooltip4, { title: __8("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React23.createElement(InfoCircleIcon, { fontSize: SIZE4 })) : void 0;
|
|
2201
2252
|
return /* @__PURE__ */ React23.createElement(
|
|
2202
2253
|
Chip4,
|
|
2203
2254
|
{
|
|
2204
2255
|
label: displayLabel,
|
|
2205
2256
|
size: SIZE4,
|
|
2206
|
-
color:
|
|
2257
|
+
color: getStylesProviderColorName(provider),
|
|
2207
2258
|
variant: "standard",
|
|
2208
2259
|
state: "enabled",
|
|
2209
2260
|
icon: chipIcon,
|
|
@@ -2316,14 +2367,7 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2316
2367
|
item.displayLabel
|
|
2317
2368
|
)
|
|
2318
2369
|
},
|
|
2319
|
-
/* @__PURE__ */ React26.createElement(Box6, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React26.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React26.createElement(
|
|
2320
|
-
LabelChip,
|
|
2321
|
-
{
|
|
2322
|
-
displayLabel: item.displayLabel,
|
|
2323
|
-
provider: item.provider,
|
|
2324
|
-
chipColor: item.chipColor
|
|
2325
|
-
}
|
|
2326
|
-
), /* @__PURE__ */ React26.createElement(ValueComponent, { index, value: item.value })),
|
|
2370
|
+
/* @__PURE__ */ React26.createElement(Box6, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React26.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React26.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }), /* @__PURE__ */ React26.createElement(ValueComponent, { index, value: item.value })),
|
|
2327
2371
|
/* @__PURE__ */ React26.createElement(ActionIcons, null)
|
|
2328
2372
|
);
|
|
2329
2373
|
})
|
|
@@ -2384,41 +2428,40 @@ function TooltipOrInfotip({
|
|
|
2384
2428
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2385
2429
|
var StylesInheritanceIndicator = () => {
|
|
2386
2430
|
const { path, propType } = useBoundProp();
|
|
2387
|
-
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2388
2431
|
const isUsingNestedProps = isExperimentActive6(EXPERIMENTAL_FEATURES.V_3_30);
|
|
2389
2432
|
const finalPath = isUsingNestedProps ? path : path.slice(0, 1);
|
|
2390
2433
|
const inheritanceChain = useStylesInheritanceChain(finalPath);
|
|
2391
2434
|
if (!inheritanceChain.length) {
|
|
2392
2435
|
return null;
|
|
2393
2436
|
}
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
}
|
|
2400
|
-
}) => style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state
|
|
2401
|
-
);
|
|
2437
|
+
return /* @__PURE__ */ React27.createElement(Indicator, { inheritanceChain, path: finalPath, propType });
|
|
2438
|
+
};
|
|
2439
|
+
var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
2440
|
+
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2441
|
+
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
2402
2442
|
const hasValue = !isEmpty2(currentItem?.value);
|
|
2403
2443
|
const [actualStyle] = inheritanceChain;
|
|
2404
|
-
if (actualStyle.provider ===
|
|
2444
|
+
if (actualStyle.provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY4) {
|
|
2405
2445
|
return null;
|
|
2406
2446
|
}
|
|
2407
2447
|
const isFinalValue = currentItem === actualStyle;
|
|
2408
2448
|
const label = getLabel({ isFinalValue, hasValue });
|
|
2409
|
-
const
|
|
2449
|
+
const styleIndicatorProps = {
|
|
2450
|
+
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
2451
|
+
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
2452
|
+
};
|
|
2410
2453
|
if (!isUsingIndicatorPopover()) {
|
|
2411
|
-
return /* @__PURE__ */ React27.createElement(Tooltip6, { title: __10("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React27.createElement(StyleIndicator, {
|
|
2454
|
+
return /* @__PURE__ */ React27.createElement(Tooltip6, { title: __10("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React27.createElement(StyleIndicator, { ...styleIndicatorProps, "aria-label": label }));
|
|
2412
2455
|
}
|
|
2413
2456
|
return /* @__PURE__ */ React27.createElement(
|
|
2414
2457
|
StylesInheritanceInfotip,
|
|
2415
2458
|
{
|
|
2416
2459
|
inheritanceChain,
|
|
2417
|
-
path
|
|
2460
|
+
path,
|
|
2418
2461
|
propType,
|
|
2419
2462
|
label
|
|
2420
2463
|
},
|
|
2421
|
-
/* @__PURE__ */ React27.createElement(StyleIndicator, {
|
|
2464
|
+
/* @__PURE__ */ React27.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
2422
2465
|
);
|
|
2423
2466
|
};
|
|
2424
2467
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
@@ -2430,24 +2473,10 @@ var getLabel = ({ isFinalValue, hasValue }) => {
|
|
|
2430
2473
|
}
|
|
2431
2474
|
return __10("This has value from another style", "elementor");
|
|
2432
2475
|
};
|
|
2433
|
-
var getVariant = ({
|
|
2434
|
-
isFinalValue,
|
|
2435
|
-
hasValue,
|
|
2436
|
-
currentStyleProvider
|
|
2437
|
-
}) => {
|
|
2438
|
-
if (isFinalValue) {
|
|
2439
|
-
return isElementsStylesProvider3(currentStyleProvider?.getKey?.()) ? "local" : "global";
|
|
2440
|
-
}
|
|
2441
|
-
if (hasValue) {
|
|
2442
|
-
return "overridden";
|
|
2443
|
-
}
|
|
2444
|
-
return void 0;
|
|
2445
|
-
};
|
|
2446
2476
|
|
|
2447
2477
|
// src/controls-registry/styles-field.tsx
|
|
2448
2478
|
var StylesField = ({ bind, placeholder, children }) => {
|
|
2449
|
-
const
|
|
2450
|
-
const { canEdit } = useStyle();
|
|
2479
|
+
const { value, setValue, canEdit } = useStylesField(bind);
|
|
2451
2480
|
const stylesSchema = getStylesSchema2();
|
|
2452
2481
|
const propType = createTopLevelOjectType({ schema: stylesSchema });
|
|
2453
2482
|
const values = { [bind]: value };
|
|
@@ -2616,19 +2645,18 @@ var initialBorder = {
|
|
|
2616
2645
|
"border-style": { $$type: "string", value: "solid" }
|
|
2617
2646
|
};
|
|
2618
2647
|
var BorderField = () => {
|
|
2619
|
-
const { canEdit } =
|
|
2620
|
-
const [border, setBorder] = useStylesFields(Object.keys(initialBorder));
|
|
2648
|
+
const { values, setValues, canEdit } = useStylesFields(Object.keys(initialBorder));
|
|
2621
2649
|
const addBorder = () => {
|
|
2622
|
-
|
|
2650
|
+
setValues(initialBorder);
|
|
2623
2651
|
};
|
|
2624
2652
|
const removeBorder = () => {
|
|
2625
|
-
|
|
2653
|
+
setValues({
|
|
2626
2654
|
"border-width": null,
|
|
2627
2655
|
"border-color": null,
|
|
2628
2656
|
"border-style": null
|
|
2629
2657
|
});
|
|
2630
2658
|
};
|
|
2631
|
-
const hasBorder = Object.values(
|
|
2659
|
+
const hasBorder = Object.values(values ?? {}).some(Boolean);
|
|
2632
2660
|
return /* @__PURE__ */ React36.createElement(
|
|
2633
2661
|
AddOrRemoveContent,
|
|
2634
2662
|
{
|
|
@@ -2715,17 +2743,30 @@ var BorderRadiusField = () => {
|
|
|
2715
2743
|
var BorderSection = () => /* @__PURE__ */ React39.createElement(SectionContent, null, /* @__PURE__ */ React39.createElement(BorderRadiusField, null), /* @__PURE__ */ React39.createElement(PanelDivider, null), /* @__PURE__ */ React39.createElement(BorderField, null));
|
|
2716
2744
|
|
|
2717
2745
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2718
|
-
import * as
|
|
2746
|
+
import * as React41 from "react";
|
|
2719
2747
|
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
2748
|
+
|
|
2749
|
+
// src/components/style-sections/layout-section/opacity-control-field.tsx
|
|
2750
|
+
import * as React40 from "react";
|
|
2751
|
+
import { useRef as useRef4 } from "react";
|
|
2752
|
+
import { SizeControl as SizeControl2 } from "@elementor/editor-controls";
|
|
2753
|
+
import { Grid as Grid3 } from "@elementor/ui";
|
|
2754
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
2755
|
+
var OpacityControlField = () => {
|
|
2756
|
+
const rowRef = useRef4();
|
|
2757
|
+
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "opacity" }, /* @__PURE__ */ React40.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React40.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, __16("Opacity", "elementor"))), /* @__PURE__ */ React40.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(SizeControl2, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" }))));
|
|
2758
|
+
};
|
|
2759
|
+
|
|
2760
|
+
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2720
2761
|
var EffectsSection = () => {
|
|
2721
|
-
return /* @__PURE__ */
|
|
2762
|
+
return /* @__PURE__ */ React41.createElement(SectionContent, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "opacity" }, /* @__PURE__ */ React41.createElement(OpacityControlField, null)), /* @__PURE__ */ React41.createElement(PanelDivider, null), /* @__PURE__ */ React41.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React41.createElement(BoxShadowRepeaterControl, null)));
|
|
2722
2763
|
};
|
|
2723
2764
|
|
|
2724
2765
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
2725
|
-
import * as
|
|
2766
|
+
import * as React53 from "react";
|
|
2726
2767
|
import { ControlFormLabel as ControlFormLabel4 } from "@elementor/editor-controls";
|
|
2727
2768
|
import { useParentElement } from "@elementor/editor-elements";
|
|
2728
|
-
import { __ as
|
|
2769
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
2729
2770
|
|
|
2730
2771
|
// src/hooks/use-computed-style.ts
|
|
2731
2772
|
import { __privateUseListenTo as useListenTo, commandEndEvent, windowEvent } from "@elementor/editor-v1-adapters";
|
|
@@ -2753,7 +2794,7 @@ function useComputedStyle(elementId) {
|
|
|
2753
2794
|
}
|
|
2754
2795
|
|
|
2755
2796
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2756
|
-
import * as
|
|
2797
|
+
import * as React43 from "react";
|
|
2757
2798
|
import { ToggleControl } from "@elementor/editor-controls";
|
|
2758
2799
|
import {
|
|
2759
2800
|
JustifyBottomIcon,
|
|
@@ -2764,11 +2805,11 @@ import {
|
|
|
2764
2805
|
JustifyTopIcon
|
|
2765
2806
|
} from "@elementor/icons";
|
|
2766
2807
|
import { Stack as Stack10, withDirection as withDirection3 } from "@elementor/ui";
|
|
2767
|
-
import { __ as
|
|
2808
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
2768
2809
|
|
|
2769
2810
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2770
|
-
import * as
|
|
2771
|
-
import { useRef as
|
|
2811
|
+
import * as React42 from "react";
|
|
2812
|
+
import { useRef as useRef5 } from "react";
|
|
2772
2813
|
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
2773
2814
|
var CLOCKWISE_ANGLES = {
|
|
2774
2815
|
row: 0,
|
|
@@ -2789,12 +2830,12 @@ var RotatedIcon = ({
|
|
|
2789
2830
|
offset = 0,
|
|
2790
2831
|
disableRotationForReversed = false
|
|
2791
2832
|
}) => {
|
|
2792
|
-
const rotate =
|
|
2833
|
+
const rotate = useRef5(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2793
2834
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2794
|
-
return /* @__PURE__ */
|
|
2835
|
+
return /* @__PURE__ */ React42.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2795
2836
|
};
|
|
2796
2837
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
2797
|
-
const
|
|
2838
|
+
const { value: direction } = useStylesField("flex-direction");
|
|
2798
2839
|
const isRtl = "rtl" === useTheme2().direction;
|
|
2799
2840
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
2800
2841
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
@@ -2820,47 +2861,47 @@ var iconProps = {
|
|
|
2820
2861
|
var options = [
|
|
2821
2862
|
{
|
|
2822
2863
|
value: "start",
|
|
2823
|
-
label:
|
|
2824
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2864
|
+
label: __17("Start", "elementor"),
|
|
2865
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
2825
2866
|
showTooltip: true
|
|
2826
2867
|
},
|
|
2827
2868
|
{
|
|
2828
2869
|
value: "center",
|
|
2829
|
-
label:
|
|
2830
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2870
|
+
label: __17("Center", "elementor"),
|
|
2871
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
2831
2872
|
showTooltip: true
|
|
2832
2873
|
},
|
|
2833
2874
|
{
|
|
2834
2875
|
value: "end",
|
|
2835
|
-
label:
|
|
2836
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2876
|
+
label: __17("End", "elementor"),
|
|
2877
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
2837
2878
|
showTooltip: true
|
|
2838
2879
|
},
|
|
2839
2880
|
{
|
|
2840
2881
|
value: "space-between",
|
|
2841
|
-
label:
|
|
2842
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2882
|
+
label: __17("Space between", "elementor"),
|
|
2883
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps }),
|
|
2843
2884
|
showTooltip: true
|
|
2844
2885
|
},
|
|
2845
2886
|
{
|
|
2846
2887
|
value: "space-around",
|
|
2847
|
-
label:
|
|
2848
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2888
|
+
label: __17("Space around", "elementor"),
|
|
2889
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps }),
|
|
2849
2890
|
showTooltip: true
|
|
2850
2891
|
},
|
|
2851
2892
|
{
|
|
2852
2893
|
value: "space-evenly",
|
|
2853
|
-
label:
|
|
2854
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2894
|
+
label: __17("Space evenly", "elementor"),
|
|
2895
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps }),
|
|
2855
2896
|
showTooltip: true
|
|
2856
2897
|
}
|
|
2857
2898
|
];
|
|
2858
2899
|
var AlignContentField = () => {
|
|
2859
|
-
return /* @__PURE__ */
|
|
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 }))));
|
|
2860
2901
|
};
|
|
2861
2902
|
|
|
2862
2903
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
2863
|
-
import * as
|
|
2904
|
+
import * as React44 from "react";
|
|
2864
2905
|
import { ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
2865
2906
|
import {
|
|
2866
2907
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
@@ -2868,8 +2909,8 @@ import {
|
|
|
2868
2909
|
LayoutAlignRightIcon,
|
|
2869
2910
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
2870
2911
|
} from "@elementor/icons";
|
|
2871
|
-
import { Grid as
|
|
2872
|
-
import { __ as
|
|
2912
|
+
import { Grid as Grid4, withDirection as withDirection4 } from "@elementor/ui";
|
|
2913
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
2873
2914
|
var StartIcon2 = withDirection4(LayoutAlignLeftIcon);
|
|
2874
2915
|
var EndIcon2 = withDirection4(LayoutAlignRightIcon);
|
|
2875
2916
|
var iconProps2 = {
|
|
@@ -2879,35 +2920,35 @@ var iconProps2 = {
|
|
|
2879
2920
|
var options2 = [
|
|
2880
2921
|
{
|
|
2881
2922
|
value: "start",
|
|
2882
|
-
label:
|
|
2883
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2923
|
+
label: __18("Start", "elementor"),
|
|
2924
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
2884
2925
|
showTooltip: true
|
|
2885
2926
|
},
|
|
2886
2927
|
{
|
|
2887
2928
|
value: "center",
|
|
2888
|
-
label:
|
|
2889
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2929
|
+
label: __18("Center", "elementor"),
|
|
2930
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
2890
2931
|
showTooltip: true
|
|
2891
2932
|
},
|
|
2892
2933
|
{
|
|
2893
2934
|
value: "end",
|
|
2894
|
-
label:
|
|
2895
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2935
|
+
label: __18("End", "elementor"),
|
|
2936
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
2896
2937
|
showTooltip: true
|
|
2897
2938
|
},
|
|
2898
2939
|
{
|
|
2899
2940
|
value: "stretch",
|
|
2900
|
-
label:
|
|
2901
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2941
|
+
label: __18("Stretch", "elementor"),
|
|
2942
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps2 }),
|
|
2902
2943
|
showTooltip: true
|
|
2903
2944
|
}
|
|
2904
2945
|
];
|
|
2905
2946
|
var AlignItemsField = () => {
|
|
2906
|
-
return /* @__PURE__ */
|
|
2947
|
+
return /* @__PURE__ */ React44.createElement(UiProviders, null, /* @__PURE__ */ React44.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React44.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlLabel, null, __18("Align items", "elementor"))), /* @__PURE__ */ React44.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React44.createElement(ToggleControl2, { options: options2 })))));
|
|
2907
2948
|
};
|
|
2908
2949
|
|
|
2909
2950
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
2910
|
-
import * as
|
|
2951
|
+
import * as React45 from "react";
|
|
2911
2952
|
import { ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
2912
2953
|
import {
|
|
2913
2954
|
LayoutAlignCenterIcon as CenterIcon3,
|
|
@@ -2915,8 +2956,8 @@ import {
|
|
|
2915
2956
|
LayoutAlignRightIcon as LayoutAlignRightIcon2,
|
|
2916
2957
|
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
2917
2958
|
} from "@elementor/icons";
|
|
2918
|
-
import { Grid as
|
|
2919
|
-
import { __ as
|
|
2959
|
+
import { Grid as Grid5, withDirection as withDirection5 } from "@elementor/ui";
|
|
2960
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
2920
2961
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
2921
2962
|
row: 90,
|
|
2922
2963
|
"row-reverse": 90,
|
|
@@ -2931,8 +2972,8 @@ var iconProps3 = {
|
|
|
2931
2972
|
var getOptions = (parentStyleDirection) => [
|
|
2932
2973
|
{
|
|
2933
2974
|
value: "start",
|
|
2934
|
-
label:
|
|
2935
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2975
|
+
label: __19("Start", "elementor"),
|
|
2976
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2936
2977
|
RotatedIcon,
|
|
2937
2978
|
{
|
|
2938
2979
|
icon: StartIcon3,
|
|
@@ -2945,8 +2986,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2945
2986
|
},
|
|
2946
2987
|
{
|
|
2947
2988
|
value: "center",
|
|
2948
|
-
label:
|
|
2949
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2989
|
+
label: __19("Center", "elementor"),
|
|
2990
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2950
2991
|
RotatedIcon,
|
|
2951
2992
|
{
|
|
2952
2993
|
icon: CenterIcon3,
|
|
@@ -2959,8 +3000,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2959
3000
|
},
|
|
2960
3001
|
{
|
|
2961
3002
|
value: "end",
|
|
2962
|
-
label:
|
|
2963
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3003
|
+
label: __19("End", "elementor"),
|
|
3004
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2964
3005
|
RotatedIcon,
|
|
2965
3006
|
{
|
|
2966
3007
|
icon: EndIcon3,
|
|
@@ -2973,8 +3014,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2973
3014
|
},
|
|
2974
3015
|
{
|
|
2975
3016
|
value: "stretch",
|
|
2976
|
-
label:
|
|
2977
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3017
|
+
label: __19("Stretch", "elementor"),
|
|
3018
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2978
3019
|
RotatedIcon,
|
|
2979
3020
|
{
|
|
2980
3021
|
icon: JustifyIcon2,
|
|
@@ -2987,32 +3028,32 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2987
3028
|
}
|
|
2988
3029
|
];
|
|
2989
3030
|
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
2990
|
-
return /* @__PURE__ */
|
|
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) })))));
|
|
2991
3032
|
};
|
|
2992
3033
|
|
|
2993
3034
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
2994
|
-
import * as
|
|
3035
|
+
import * as React46 from "react";
|
|
2995
3036
|
import { ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
2996
3037
|
import { isExperimentActive as isExperimentActive7 } from "@elementor/editor-v1-adapters";
|
|
2997
3038
|
import { Stack as Stack11 } from "@elementor/ui";
|
|
2998
|
-
import { __ as
|
|
3039
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
2999
3040
|
var displayFieldItems = [
|
|
3000
3041
|
{
|
|
3001
3042
|
value: "block",
|
|
3002
|
-
renderContent: () =>
|
|
3003
|
-
label:
|
|
3043
|
+
renderContent: () => __20("Block", "elementor"),
|
|
3044
|
+
label: __20("Block", "elementor"),
|
|
3004
3045
|
showTooltip: true
|
|
3005
3046
|
},
|
|
3006
3047
|
{
|
|
3007
3048
|
value: "flex",
|
|
3008
|
-
renderContent: () =>
|
|
3009
|
-
label:
|
|
3049
|
+
renderContent: () => __20("Flex", "elementor"),
|
|
3050
|
+
label: __20("Flex", "elementor"),
|
|
3010
3051
|
showTooltip: true
|
|
3011
3052
|
},
|
|
3012
3053
|
{
|
|
3013
3054
|
value: "inline-block",
|
|
3014
|
-
renderContent: () =>
|
|
3015
|
-
label:
|
|
3055
|
+
renderContent: () => __20("In-blk", "elementor"),
|
|
3056
|
+
label: __20("Inline-block", "elementor"),
|
|
3016
3057
|
showTooltip: true
|
|
3017
3058
|
}
|
|
3018
3059
|
];
|
|
@@ -3022,71 +3063,71 @@ var DisplayField = () => {
|
|
|
3022
3063
|
if (isDisplayNoneFeatureActive) {
|
|
3023
3064
|
items3.push({
|
|
3024
3065
|
value: "none",
|
|
3025
|
-
renderContent: () =>
|
|
3026
|
-
label:
|
|
3066
|
+
renderContent: () => __20("None", "elementor"),
|
|
3067
|
+
label: __20("None", "elementor"),
|
|
3027
3068
|
showTooltip: true
|
|
3028
3069
|
});
|
|
3029
3070
|
}
|
|
3030
3071
|
items3.push({
|
|
3031
3072
|
value: "inline-flex",
|
|
3032
|
-
renderContent: () =>
|
|
3033
|
-
label:
|
|
3073
|
+
renderContent: () => __20("In-flx", "elementor"),
|
|
3074
|
+
label: __20("Inline-flex", "elementor"),
|
|
3034
3075
|
showTooltip: true
|
|
3035
3076
|
});
|
|
3036
3077
|
const placeholder = useDisplayPlaceholderValue();
|
|
3037
|
-
return /* @__PURE__ */
|
|
3078
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React46.createElement(Stack11, { gap: 0.75 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, __20("Display", "elementor")), /* @__PURE__ */ React46.createElement(ToggleControl4, { options: items3, maxItems: 4, fullWidth: true })));
|
|
3038
3079
|
};
|
|
3039
3080
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
3040
3081
|
|
|
3041
3082
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
3042
|
-
import * as
|
|
3083
|
+
import * as React47 from "react";
|
|
3043
3084
|
import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
3044
3085
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
3045
|
-
import { Grid as
|
|
3046
|
-
import { __ as
|
|
3086
|
+
import { Grid as Grid6, withDirection as withDirection6 } from "@elementor/ui";
|
|
3087
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
3047
3088
|
var options3 = [
|
|
3048
3089
|
{
|
|
3049
3090
|
value: "row",
|
|
3050
|
-
label:
|
|
3091
|
+
label: __21("Row", "elementor"),
|
|
3051
3092
|
renderContent: ({ size }) => {
|
|
3052
3093
|
const StartIcon5 = withDirection6(ArrowRightIcon);
|
|
3053
|
-
return /* @__PURE__ */
|
|
3094
|
+
return /* @__PURE__ */ React47.createElement(StartIcon5, { fontSize: size });
|
|
3054
3095
|
},
|
|
3055
3096
|
showTooltip: true
|
|
3056
3097
|
},
|
|
3057
3098
|
{
|
|
3058
3099
|
value: "column",
|
|
3059
|
-
label:
|
|
3060
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3100
|
+
label: __21("Column", "elementor"),
|
|
3101
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
3061
3102
|
showTooltip: true
|
|
3062
3103
|
},
|
|
3063
3104
|
{
|
|
3064
3105
|
value: "row-reverse",
|
|
3065
|
-
label:
|
|
3106
|
+
label: __21("Reversed row", "elementor"),
|
|
3066
3107
|
renderContent: ({ size }) => {
|
|
3067
3108
|
const EndIcon5 = withDirection6(ArrowLeftIcon);
|
|
3068
|
-
return /* @__PURE__ */
|
|
3109
|
+
return /* @__PURE__ */ React47.createElement(EndIcon5, { fontSize: size });
|
|
3069
3110
|
},
|
|
3070
3111
|
showTooltip: true
|
|
3071
3112
|
},
|
|
3072
3113
|
{
|
|
3073
3114
|
value: "column-reverse",
|
|
3074
|
-
label:
|
|
3075
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3115
|
+
label: __21("Reversed column", "elementor"),
|
|
3116
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
3076
3117
|
showTooltip: true
|
|
3077
3118
|
}
|
|
3078
3119
|
];
|
|
3079
3120
|
var FlexDirectionField = () => {
|
|
3080
|
-
return /* @__PURE__ */
|
|
3121
|
+
return /* @__PURE__ */ React47.createElement(UiProviders, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React47.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, __21("Direction", "elementor"))), /* @__PURE__ */ React47.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(ToggleControl5, { options: options3 })))));
|
|
3081
3122
|
};
|
|
3082
3123
|
|
|
3083
3124
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3084
|
-
import * as
|
|
3125
|
+
import * as React48 from "react";
|
|
3085
3126
|
import { useState as useState10 } from "react";
|
|
3086
3127
|
import { ControlToggleButtonGroup, NumberControl } from "@elementor/editor-controls";
|
|
3087
3128
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
3088
|
-
import { Grid as
|
|
3089
|
-
import { __ as
|
|
3129
|
+
import { Grid as Grid7 } from "@elementor/ui";
|
|
3130
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
3090
3131
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
3091
3132
|
var LAST_DEFAULT_VALUE = 99999;
|
|
3092
3133
|
var FIRST = "first";
|
|
@@ -3099,26 +3140,25 @@ var orderValueMap = {
|
|
|
3099
3140
|
var items = [
|
|
3100
3141
|
{
|
|
3101
3142
|
value: FIRST,
|
|
3102
|
-
label:
|
|
3103
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3143
|
+
label: __22("First", "elementor"),
|
|
3144
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
3104
3145
|
showTooltip: true
|
|
3105
3146
|
},
|
|
3106
3147
|
{
|
|
3107
3148
|
value: LAST,
|
|
3108
|
-
label:
|
|
3109
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3149
|
+
label: __22("Last", "elementor"),
|
|
3150
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
3110
3151
|
showTooltip: true
|
|
3111
3152
|
},
|
|
3112
3153
|
{
|
|
3113
3154
|
value: CUSTOM,
|
|
3114
|
-
label:
|
|
3115
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3155
|
+
label: __22("Custom", "elementor"),
|
|
3156
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(PencilIcon, { fontSize: size }),
|
|
3116
3157
|
showTooltip: true
|
|
3117
3158
|
}
|
|
3118
3159
|
];
|
|
3119
3160
|
var FlexOrderField = () => {
|
|
3120
|
-
const
|
|
3121
|
-
const { canEdit } = useStyle();
|
|
3161
|
+
const { value: order, setValue: setOrder, canEdit } = useStylesField("order");
|
|
3122
3162
|
const [groupControlValue, setGroupControlValue] = useState10(getGroupControlValue(order?.value || null));
|
|
3123
3163
|
const handleToggleButtonChange = (group) => {
|
|
3124
3164
|
setGroupControlValue(group);
|
|
@@ -3128,7 +3168,7 @@ var FlexOrderField = () => {
|
|
|
3128
3168
|
}
|
|
3129
3169
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
3130
3170
|
};
|
|
3131
|
-
return /* @__PURE__ */
|
|
3171
|
+
return /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React48.createElement(SectionContent, null, /* @__PURE__ */ React48.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, __22("Order", "elementor"))), /* @__PURE__ */ React48.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(
|
|
3132
3172
|
ControlToggleButtonGroup,
|
|
3133
3173
|
{
|
|
3134
3174
|
items,
|
|
@@ -3137,7 +3177,7 @@ var FlexOrderField = () => {
|
|
|
3137
3177
|
exclusive: true,
|
|
3138
3178
|
disabled: !canEdit
|
|
3139
3179
|
}
|
|
3140
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
3180
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React48.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, __22("Custom order", "elementor"))), /* @__PURE__ */ React48.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(
|
|
3141
3181
|
NumberControl,
|
|
3142
3182
|
{
|
|
3143
3183
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -3157,49 +3197,48 @@ var getGroupControlValue = (order) => {
|
|
|
3157
3197
|
};
|
|
3158
3198
|
|
|
3159
3199
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3160
|
-
import * as
|
|
3161
|
-
import { useMemo as useMemo5, useRef as
|
|
3200
|
+
import * as React49 from "react";
|
|
3201
|
+
import { useMemo as useMemo5, useRef as useRef6, useState as useState11 } from "react";
|
|
3162
3202
|
import {
|
|
3163
3203
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
3164
3204
|
NumberControl as NumberControl2,
|
|
3165
|
-
SizeControl as
|
|
3205
|
+
SizeControl as SizeControl3
|
|
3166
3206
|
} from "@elementor/editor-controls";
|
|
3167
3207
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
3168
3208
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
3169
|
-
import { Grid as
|
|
3170
|
-
import { __ as
|
|
3209
|
+
import { Grid as Grid8 } from "@elementor/ui";
|
|
3210
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
3171
3211
|
var DEFAULT = 1;
|
|
3172
3212
|
var items2 = [
|
|
3173
3213
|
{
|
|
3174
3214
|
value: "flex-grow",
|
|
3175
|
-
label:
|
|
3176
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3215
|
+
label: __23("Grow", "elementor"),
|
|
3216
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ExpandIcon, { fontSize: size }),
|
|
3177
3217
|
showTooltip: true
|
|
3178
3218
|
},
|
|
3179
3219
|
{
|
|
3180
3220
|
value: "flex-shrink",
|
|
3181
|
-
label:
|
|
3182
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3221
|
+
label: __23("Shrink", "elementor"),
|
|
3222
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(ShrinkIcon, { fontSize: size }),
|
|
3183
3223
|
showTooltip: true
|
|
3184
3224
|
},
|
|
3185
3225
|
{
|
|
3186
3226
|
value: "custom",
|
|
3187
|
-
label:
|
|
3188
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3227
|
+
label: __23("Custom", "elementor"),
|
|
3228
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(PencilIcon2, { fontSize: size }),
|
|
3189
3229
|
showTooltip: true
|
|
3190
3230
|
}
|
|
3191
3231
|
];
|
|
3192
3232
|
var FlexSizeField = () => {
|
|
3193
|
-
const { canEdit } =
|
|
3194
|
-
const
|
|
3195
|
-
const
|
|
3196
|
-
const
|
|
3197
|
-
const basis = fields?.["flex-basis"]?.value || null;
|
|
3233
|
+
const { values, setValues, canEdit } = useStylesFields(["flex-grow", "flex-shrink", "flex-basis"]);
|
|
3234
|
+
const grow = values?.["flex-grow"]?.value || null;
|
|
3235
|
+
const shrink = values?.["flex-shrink"]?.value || null;
|
|
3236
|
+
const basis = values?.["flex-basis"]?.value || null;
|
|
3198
3237
|
const currentGroup = useMemo5(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = useState11(currentGroup);
|
|
3199
3238
|
const onChangeGroup = (group = null) => {
|
|
3200
3239
|
setActiveGroup(group);
|
|
3201
3240
|
if (!group || group === "custom") {
|
|
3202
|
-
|
|
3241
|
+
setValues({
|
|
3203
3242
|
"flex-basis": null,
|
|
3204
3243
|
"flex-grow": null,
|
|
3205
3244
|
"flex-shrink": null
|
|
@@ -3207,20 +3246,20 @@ var FlexSizeField = () => {
|
|
|
3207
3246
|
return;
|
|
3208
3247
|
}
|
|
3209
3248
|
if (group === "flex-grow") {
|
|
3210
|
-
|
|
3249
|
+
setValues({
|
|
3211
3250
|
"flex-basis": null,
|
|
3212
3251
|
"flex-grow": numberPropTypeUtil.create(DEFAULT),
|
|
3213
3252
|
"flex-shrink": null
|
|
3214
3253
|
});
|
|
3215
3254
|
return;
|
|
3216
3255
|
}
|
|
3217
|
-
|
|
3256
|
+
setValues({
|
|
3218
3257
|
"flex-basis": null,
|
|
3219
3258
|
"flex-grow": null,
|
|
3220
3259
|
"flex-shrink": numberPropTypeUtil.create(DEFAULT)
|
|
3221
3260
|
});
|
|
3222
3261
|
};
|
|
3223
|
-
return /* @__PURE__ */
|
|
3262
|
+
return /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React49.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __23("Size", "elementor"))), /* @__PURE__ */ React49.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(
|
|
3224
3263
|
ControlToggleButtonGroup2,
|
|
3225
3264
|
{
|
|
3226
3265
|
value: activeGroup,
|
|
@@ -3229,11 +3268,11 @@ var FlexSizeField = () => {
|
|
|
3229
3268
|
items: items2,
|
|
3230
3269
|
exclusive: true
|
|
3231
3270
|
}
|
|
3232
|
-
)))), "custom" === activeGroup && /* @__PURE__ */
|
|
3271
|
+
)))), "custom" === activeGroup && /* @__PURE__ */ React49.createElement(FlexCustomField, null)));
|
|
3233
3272
|
};
|
|
3234
3273
|
var FlexCustomField = () => {
|
|
3235
|
-
const flexBasisRowRef =
|
|
3236
|
-
return /* @__PURE__ */
|
|
3274
|
+
const flexBasisRowRef = useRef6();
|
|
3275
|
+
return /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React49.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __23("Grow", "elementor"))), /* @__PURE__ */ React49.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React49.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __23("Shrink", "elementor"))), /* @__PURE__ */ React49.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React49.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: flexBasisRowRef }, /* @__PURE__ */ React49.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __23("Basis", "elementor"))), /* @__PURE__ */ React49.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(SizeControl3, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3237
3276
|
};
|
|
3238
3277
|
var getActiveGroup = ({
|
|
3239
3278
|
grow,
|
|
@@ -3256,16 +3295,16 @@ var getActiveGroup = ({
|
|
|
3256
3295
|
};
|
|
3257
3296
|
|
|
3258
3297
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3259
|
-
import * as
|
|
3298
|
+
import * as React50 from "react";
|
|
3260
3299
|
import { GapControl } from "@elementor/editor-controls";
|
|
3261
3300
|
import { Stack as Stack12 } from "@elementor/ui";
|
|
3262
|
-
import { __ as
|
|
3301
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
3263
3302
|
var GapControlField = () => {
|
|
3264
|
-
return /* @__PURE__ */
|
|
3303
|
+
return /* @__PURE__ */ React50.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React50.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React50.createElement(GapControl, { label: __24("Gaps", "elementor") })));
|
|
3265
3304
|
};
|
|
3266
3305
|
|
|
3267
3306
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3268
|
-
import * as
|
|
3307
|
+
import * as React51 from "react";
|
|
3269
3308
|
import { ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
3270
3309
|
import {
|
|
3271
3310
|
JustifyBottomIcon as JustifyBottomIcon2,
|
|
@@ -3276,7 +3315,7 @@ import {
|
|
|
3276
3315
|
JustifyTopIcon as JustifyTopIcon2
|
|
3277
3316
|
} from "@elementor/icons";
|
|
3278
3317
|
import { Stack as Stack13, withDirection as withDirection7 } from "@elementor/ui";
|
|
3279
|
-
import { __ as
|
|
3318
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
3280
3319
|
var StartIcon4 = withDirection7(JustifyTopIcon2);
|
|
3281
3320
|
var EndIcon4 = withDirection7(JustifyBottomIcon2);
|
|
3282
3321
|
var iconProps4 = {
|
|
@@ -3286,91 +3325,91 @@ var iconProps4 = {
|
|
|
3286
3325
|
var options4 = [
|
|
3287
3326
|
{
|
|
3288
3327
|
value: "flex-start",
|
|
3289
|
-
label:
|
|
3290
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3328
|
+
label: __25("Start", "elementor"),
|
|
3329
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
3291
3330
|
showTooltip: true
|
|
3292
3331
|
},
|
|
3293
3332
|
{
|
|
3294
3333
|
value: "center",
|
|
3295
|
-
label:
|
|
3296
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3334
|
+
label: __25("Center", "elementor"),
|
|
3335
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: CenterIcon4, size, ...iconProps4 }),
|
|
3297
3336
|
showTooltip: true
|
|
3298
3337
|
},
|
|
3299
3338
|
{
|
|
3300
3339
|
value: "flex-end",
|
|
3301
|
-
label:
|
|
3302
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3340
|
+
label: __25("End", "elementor"),
|
|
3341
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
3303
3342
|
showTooltip: true
|
|
3304
3343
|
},
|
|
3305
3344
|
{
|
|
3306
3345
|
value: "space-between",
|
|
3307
|
-
label:
|
|
3308
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3346
|
+
label: __25("Space between", "elementor"),
|
|
3347
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: BetweenIcon2, size, ...iconProps4 }),
|
|
3309
3348
|
showTooltip: true
|
|
3310
3349
|
},
|
|
3311
3350
|
{
|
|
3312
3351
|
value: "space-around",
|
|
3313
|
-
label:
|
|
3314
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3352
|
+
label: __25("Space around", "elementor"),
|
|
3353
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: AroundIcon2, size, ...iconProps4 }),
|
|
3315
3354
|
showTooltip: true
|
|
3316
3355
|
},
|
|
3317
3356
|
{
|
|
3318
3357
|
value: "space-evenly",
|
|
3319
|
-
label:
|
|
3320
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3358
|
+
label: __25("Space evenly", "elementor"),
|
|
3359
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: EvenlyIcon2, size, ...iconProps4 }),
|
|
3321
3360
|
showTooltip: true
|
|
3322
3361
|
}
|
|
3323
3362
|
];
|
|
3324
3363
|
var JustifyContentField = () => {
|
|
3325
|
-
return /* @__PURE__ */
|
|
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 }))));
|
|
3326
3365
|
};
|
|
3327
3366
|
|
|
3328
3367
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3329
|
-
import * as
|
|
3368
|
+
import * as React52 from "react";
|
|
3330
3369
|
import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
3331
3370
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
3332
|
-
import { Grid as
|
|
3333
|
-
import { __ as
|
|
3371
|
+
import { Grid as Grid9 } from "@elementor/ui";
|
|
3372
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
3334
3373
|
var options5 = [
|
|
3335
3374
|
{
|
|
3336
3375
|
value: "nowrap",
|
|
3337
|
-
label:
|
|
3338
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3376
|
+
label: __26("No wrap", "elementor"),
|
|
3377
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
3339
3378
|
showTooltip: true
|
|
3340
3379
|
},
|
|
3341
3380
|
{
|
|
3342
3381
|
value: "wrap",
|
|
3343
|
-
label:
|
|
3344
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3382
|
+
label: __26("Wrap", "elementor"),
|
|
3383
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(ArrowBackIcon, { fontSize: size }),
|
|
3345
3384
|
showTooltip: true
|
|
3346
3385
|
},
|
|
3347
3386
|
{
|
|
3348
3387
|
value: "wrap-reverse",
|
|
3349
|
-
label:
|
|
3350
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3388
|
+
label: __26("Reversed wrap", "elementor"),
|
|
3389
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
3351
3390
|
showTooltip: true
|
|
3352
3391
|
}
|
|
3353
3392
|
];
|
|
3354
3393
|
var WrapField = () => {
|
|
3355
|
-
return /* @__PURE__ */
|
|
3394
|
+
return /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React52.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, __26("Wrap", "elementor"))), /* @__PURE__ */ React52.createElement(Grid9, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React52.createElement(ToggleControl7, { options: options5 })))));
|
|
3356
3395
|
};
|
|
3357
3396
|
|
|
3358
3397
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3359
3398
|
var LayoutSection = () => {
|
|
3360
|
-
const
|
|
3399
|
+
const { value: display } = useStylesField("display");
|
|
3361
3400
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
3362
3401
|
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
3363
3402
|
const { element } = useElement();
|
|
3364
3403
|
const parent = useParentElement(element.id);
|
|
3365
3404
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3366
3405
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
3367
|
-
return /* @__PURE__ */
|
|
3406
|
+
return /* @__PURE__ */ React53.createElement(SectionContent, null, /* @__PURE__ */ React53.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React53.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React53.createElement(FlexChildFields, { parentStyleDirection }));
|
|
3368
3407
|
};
|
|
3369
3408
|
var FlexFields = () => {
|
|
3370
|
-
const
|
|
3371
|
-
return /* @__PURE__ */
|
|
3409
|
+
const { value: flexWrap } = useStylesField("flex-wrap");
|
|
3410
|
+
return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(FlexDirectionField, null), /* @__PURE__ */ React53.createElement(JustifyContentField, null), /* @__PURE__ */ React53.createElement(AlignItemsField, null), /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(GapControlField, null), /* @__PURE__ */ React53.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React53.createElement(AlignContentField, null));
|
|
3372
3411
|
};
|
|
3373
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3412
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(ControlFormLabel4, null, __27("Flex child", "elementor")), /* @__PURE__ */ React53.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React53.createElement(FlexOrderField, null), /* @__PURE__ */ React53.createElement(FlexSizeField, null));
|
|
3374
3413
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3375
3414
|
const value = display?.value ?? local?.value;
|
|
3376
3415
|
if (!value) {
|
|
@@ -3380,38 +3419,38 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3380
3419
|
};
|
|
3381
3420
|
|
|
3382
3421
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3383
|
-
import * as
|
|
3422
|
+
import * as React58 from "react";
|
|
3384
3423
|
import { isExperimentActive as isExperimentActive8 } from "@elementor/editor-v1-adapters";
|
|
3385
3424
|
import { useSessionStorage } from "@elementor/session";
|
|
3386
3425
|
|
|
3387
3426
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3388
|
-
import * as
|
|
3389
|
-
import { useRef as
|
|
3390
|
-
import { SizeControl as
|
|
3427
|
+
import * as React54 from "react";
|
|
3428
|
+
import { useRef as useRef7 } from "react";
|
|
3429
|
+
import { SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
3391
3430
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
3392
|
-
import { Grid as
|
|
3393
|
-
import { __ as
|
|
3431
|
+
import { Grid as Grid10, Stack as Stack14, withDirection as withDirection8 } from "@elementor/ui";
|
|
3432
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
3394
3433
|
var InlineStartIcon2 = withDirection8(SideLeftIcon2);
|
|
3395
3434
|
var InlineEndIcon2 = withDirection8(SideRightIcon2);
|
|
3396
3435
|
var sideIcons = {
|
|
3397
|
-
"inset-block-start": /* @__PURE__ */
|
|
3398
|
-
"inset-block-end": /* @__PURE__ */
|
|
3399
|
-
"inset-inline-start": /* @__PURE__ */
|
|
3400
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3436
|
+
"inset-block-start": /* @__PURE__ */ React54.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
3437
|
+
"inset-block-end": /* @__PURE__ */ React54.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
3438
|
+
"inset-inline-start": /* @__PURE__ */ React54.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
3439
|
+
"inset-inline-end": /* @__PURE__ */ React54.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
3401
3440
|
};
|
|
3402
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
3403
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
3441
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __28("Right", "elementor") : __28("Left", "elementor");
|
|
3442
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __28("Left", "elementor") : __28("Right", "elementor");
|
|
3404
3443
|
var DimensionsField = () => {
|
|
3405
3444
|
const { isSiteRtl } = useDirection();
|
|
3406
|
-
const rowRefs = [
|
|
3407
|
-
return /* @__PURE__ */
|
|
3445
|
+
const rowRefs = [useRef7(), useRef7()];
|
|
3446
|
+
return /* @__PURE__ */ React54.createElement(UiProviders, null, /* @__PURE__ */ React54.createElement(Stack14, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React54.createElement(DimensionField, { side: "inset-block-start", label: __28("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React54.createElement(
|
|
3408
3447
|
DimensionField,
|
|
3409
3448
|
{
|
|
3410
3449
|
side: "inset-inline-end",
|
|
3411
3450
|
label: getInlineEndLabel(isSiteRtl),
|
|
3412
3451
|
rowRef: rowRefs[0]
|
|
3413
3452
|
}
|
|
3414
|
-
)), /* @__PURE__ */
|
|
3453
|
+
)), /* @__PURE__ */ React54.createElement(Stack14, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React54.createElement(DimensionField, { side: "inset-block-end", label: __28("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React54.createElement(
|
|
3415
3454
|
DimensionField,
|
|
3416
3455
|
{
|
|
3417
3456
|
side: "inset-inline-start",
|
|
@@ -3424,48 +3463,48 @@ var DimensionField = ({
|
|
|
3424
3463
|
side,
|
|
3425
3464
|
label,
|
|
3426
3465
|
rowRef
|
|
3427
|
-
}) => /* @__PURE__ */
|
|
3466
|
+
}) => /* @__PURE__ */ React54.createElement(StylesField, { bind: side }, /* @__PURE__ */ React54.createElement(Grid10, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React54.createElement(Grid10, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, label)), /* @__PURE__ */ React54.createElement(Grid10, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(SizeControl4, { startIcon: sideIcons[side], extendedOptions: ["auto"], anchorRef: rowRef }))));
|
|
3428
3467
|
|
|
3429
3468
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3430
|
-
import * as
|
|
3431
|
-
import { useRef as
|
|
3432
|
-
import { SizeControl as
|
|
3433
|
-
import { Grid as
|
|
3434
|
-
import { __ as
|
|
3469
|
+
import * as React55 from "react";
|
|
3470
|
+
import { useRef as useRef8 } from "react";
|
|
3471
|
+
import { SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
3472
|
+
import { Grid as Grid11 } from "@elementor/ui";
|
|
3473
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
3435
3474
|
var OffsetField = () => {
|
|
3436
|
-
const rowRef =
|
|
3437
|
-
return /* @__PURE__ */
|
|
3475
|
+
const rowRef = useRef8();
|
|
3476
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "scroll-margin-top" }, /* @__PURE__ */ React55.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React55.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, __29("Anchor offset", "elementor"))), /* @__PURE__ */ React55.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(SizeControl5, { units: ["px", "em", "rem", "vw", "vh"], anchorRef: rowRef }))));
|
|
3438
3477
|
};
|
|
3439
3478
|
|
|
3440
3479
|
// src/components/style-sections/position-section/position-field.tsx
|
|
3441
|
-
import * as
|
|
3480
|
+
import * as React56 from "react";
|
|
3442
3481
|
import { SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
3443
|
-
import { Grid as
|
|
3444
|
-
import { __ as
|
|
3482
|
+
import { Grid as Grid12 } from "@elementor/ui";
|
|
3483
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
3445
3484
|
var positionOptions = [
|
|
3446
|
-
{ label:
|
|
3447
|
-
{ label:
|
|
3448
|
-
{ label:
|
|
3449
|
-
{ label:
|
|
3450
|
-
{ label:
|
|
3485
|
+
{ label: __30("Static", "elementor"), value: "static" },
|
|
3486
|
+
{ label: __30("Relative", "elementor"), value: "relative" },
|
|
3487
|
+
{ label: __30("Absolute", "elementor"), value: "absolute" },
|
|
3488
|
+
{ label: __30("Fixed", "elementor"), value: "fixed" },
|
|
3489
|
+
{ label: __30("Sticky", "elementor"), value: "sticky" }
|
|
3451
3490
|
];
|
|
3452
3491
|
var PositionField = ({ onChange }) => {
|
|
3453
|
-
return /* @__PURE__ */
|
|
3492
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React56.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, __30("Position", "elementor"))), /* @__PURE__ */ React56.createElement(Grid12, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React56.createElement(SelectControl3, { options: positionOptions, onChange }))));
|
|
3454
3493
|
};
|
|
3455
3494
|
|
|
3456
3495
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
3457
|
-
import * as
|
|
3496
|
+
import * as React57 from "react";
|
|
3458
3497
|
import { NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
3459
|
-
import { Grid as
|
|
3460
|
-
import { __ as
|
|
3498
|
+
import { Grid as Grid13 } from "@elementor/ui";
|
|
3499
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
3461
3500
|
var ZIndexField = () => {
|
|
3462
|
-
return /* @__PURE__ */
|
|
3501
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React57.createElement(Grid13, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, __31("Z-index", "elementor"))), /* @__PURE__ */ React57.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(NumberControl3, null))));
|
|
3463
3502
|
};
|
|
3464
3503
|
|
|
3465
3504
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3466
3505
|
var PositionSection = () => {
|
|
3467
|
-
const
|
|
3468
|
-
const
|
|
3506
|
+
const { value: positionValue } = useStylesField("position");
|
|
3507
|
+
const { values: dimensions, setValues: setDimensions } = useStylesFields([
|
|
3469
3508
|
"inset-block-start",
|
|
3470
3509
|
"inset-block-end",
|
|
3471
3510
|
"inset-inline-start",
|
|
@@ -3475,9 +3514,9 @@ var PositionSection = () => {
|
|
|
3475
3514
|
const isCssIdFeatureActive = isExperimentActive8("e_v_3_30");
|
|
3476
3515
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
3477
3516
|
if (newPosition === "static") {
|
|
3478
|
-
if (
|
|
3479
|
-
updateDimensionsHistory(
|
|
3480
|
-
|
|
3517
|
+
if (dimensions) {
|
|
3518
|
+
updateDimensionsHistory(dimensions);
|
|
3519
|
+
setDimensions({
|
|
3481
3520
|
"inset-block-start": void 0,
|
|
3482
3521
|
"inset-block-end": void 0,
|
|
3483
3522
|
"inset-inline-start": void 0,
|
|
@@ -3486,13 +3525,13 @@ var PositionSection = () => {
|
|
|
3486
3525
|
}
|
|
3487
3526
|
} else if (previousPosition === "static") {
|
|
3488
3527
|
if (dimensionsValuesFromHistory) {
|
|
3489
|
-
|
|
3528
|
+
setDimensions(dimensionsValuesFromHistory);
|
|
3490
3529
|
clearDimensionsHistory();
|
|
3491
3530
|
}
|
|
3492
3531
|
}
|
|
3493
3532
|
};
|
|
3494
3533
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
3495
|
-
return /* @__PURE__ */
|
|
3534
|
+
return /* @__PURE__ */ React58.createElement(SectionContent, null, /* @__PURE__ */ React58.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(DimensionsField, null), /* @__PURE__ */ React58.createElement(ZIndexField, null)) : null, isCssIdFeatureActive && /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(PanelDivider, null), /* @__PURE__ */ React58.createElement(OffsetField, null)));
|
|
3496
3535
|
};
|
|
3497
3536
|
var usePersistDimensions = () => {
|
|
3498
3537
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -3502,50 +3541,55 @@ var usePersistDimensions = () => {
|
|
|
3502
3541
|
};
|
|
3503
3542
|
|
|
3504
3543
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3505
|
-
import * as
|
|
3506
|
-
import { useRef as
|
|
3507
|
-
import { AspectRatioControl, SizeControl as
|
|
3544
|
+
import * as React64 from "react";
|
|
3545
|
+
import { useRef as useRef9 } from "react";
|
|
3546
|
+
import { AspectRatioControl, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
3508
3547
|
import { isExperimentActive as isExperimentActive10 } from "@elementor/editor-v1-adapters";
|
|
3509
3548
|
import { Grid as Grid16, Stack as Stack16 } from "@elementor/ui";
|
|
3510
3549
|
import { __ as __35 } from "@wordpress/i18n";
|
|
3511
3550
|
|
|
3512
3551
|
// src/components/style-tab-collapsible-content.tsx
|
|
3513
|
-
import * as
|
|
3552
|
+
import * as React60 from "react";
|
|
3514
3553
|
import { isExperimentActive as isExperimentActive9 } from "@elementor/editor-v1-adapters";
|
|
3515
3554
|
|
|
3516
3555
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
3517
|
-
import * as
|
|
3518
|
-
import {
|
|
3556
|
+
import * as React59 from "react";
|
|
3557
|
+
import { isElementsStylesProvider as isElementsStylesProvider3 } from "@elementor/editor-styles-repository";
|
|
3519
3558
|
import { Stack as Stack15, Tooltip as Tooltip7 } from "@elementor/ui";
|
|
3520
|
-
import { __ as
|
|
3521
|
-
var orderedVariants = ["global", "local", "overridden"];
|
|
3559
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
3522
3560
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
3523
|
-
const { id, meta } = useStyle();
|
|
3561
|
+
const { id, meta, provider } = useStyle();
|
|
3524
3562
|
const snapshot = useStylesInheritanceSnapshot();
|
|
3525
3563
|
const snapshotFields = Object.fromEntries(
|
|
3526
3564
|
Object.entries(snapshot ?? {}).filter(([key]) => fields.includes(key))
|
|
3527
3565
|
);
|
|
3528
|
-
const
|
|
3529
|
-
if (
|
|
3566
|
+
const { hasValues, hasOverrides } = getIndicators(snapshotFields, id ?? "", meta);
|
|
3567
|
+
if (!hasValues && !hasOverrides) {
|
|
3530
3568
|
return null;
|
|
3531
3569
|
}
|
|
3532
|
-
const
|
|
3533
|
-
const
|
|
3534
|
-
return /* @__PURE__ */
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3570
|
+
const hasValueLabel = __32("Has effective styles", "elementor");
|
|
3571
|
+
const hasOverridesLabel = __32("Has overridden styles", "elementor");
|
|
3572
|
+
return /* @__PURE__ */ React59.createElement(Tooltip7, { title: __32("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React59.createElement(Stack15, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React59.createElement(
|
|
3573
|
+
StyleIndicator,
|
|
3574
|
+
{
|
|
3575
|
+
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
3576
|
+
"data-variant": isElementsStylesProvider3(provider.getKey()) ? "local" : "global",
|
|
3577
|
+
role: "listitem",
|
|
3578
|
+
"aria-label": hasValueLabel
|
|
3579
|
+
}
|
|
3580
|
+
), hasOverrides && /* @__PURE__ */ React59.createElement(
|
|
3581
|
+
StyleIndicator,
|
|
3582
|
+
{
|
|
3583
|
+
isOverridden: true,
|
|
3584
|
+
"data-variant": "overridden",
|
|
3585
|
+
role: "listitem",
|
|
3586
|
+
"aria-label": hasOverridesLabel
|
|
3587
|
+
}
|
|
3545
3588
|
)));
|
|
3546
3589
|
};
|
|
3547
3590
|
function getIndicators(snapshotFields, styleId, meta) {
|
|
3548
|
-
|
|
3591
|
+
let hasValues = false;
|
|
3592
|
+
let hasOverrides = false;
|
|
3549
3593
|
Object.values(snapshotFields).forEach((inheritanceChain) => {
|
|
3550
3594
|
const currentStyle = getCurrentStyleFromChain(inheritanceChain, styleId, meta);
|
|
3551
3595
|
if (!currentStyle) {
|
|
@@ -3553,19 +3597,12 @@ function getIndicators(snapshotFields, styleId, meta) {
|
|
|
3553
3597
|
}
|
|
3554
3598
|
const [actualStyle] = inheritanceChain;
|
|
3555
3599
|
if (currentStyle === actualStyle) {
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
return;
|
|
3560
|
-
}
|
|
3561
|
-
if (providerKey !== ELEMENTS_BASE_STYLES_PROVIDER_KEY4) {
|
|
3562
|
-
indicators.global = true;
|
|
3563
|
-
}
|
|
3564
|
-
return;
|
|
3600
|
+
hasValues = true;
|
|
3601
|
+
} else {
|
|
3602
|
+
hasOverrides = true;
|
|
3565
3603
|
}
|
|
3566
|
-
indicators.overridden = true;
|
|
3567
3604
|
});
|
|
3568
|
-
return
|
|
3605
|
+
return { hasValues, hasOverrides };
|
|
3569
3606
|
}
|
|
3570
3607
|
function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
3571
3608
|
return chain.find(
|
|
@@ -3580,54 +3617,41 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
3580
3617
|
|
|
3581
3618
|
// src/components/style-tab-collapsible-content.tsx
|
|
3582
3619
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
3583
|
-
return /* @__PURE__ */
|
|
3620
|
+
return /* @__PURE__ */ React60.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
3584
3621
|
};
|
|
3585
3622
|
function getStylesInheritanceIndicators(fields) {
|
|
3586
3623
|
const isUsingFieldsIndicators = isExperimentActive9(EXPERIMENTAL_FEATURES.V_3_30);
|
|
3587
3624
|
if (fields.length === 0 || !isUsingFieldsIndicators) {
|
|
3588
3625
|
return null;
|
|
3589
3626
|
}
|
|
3590
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
3627
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React60.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
3591
3628
|
}
|
|
3592
3629
|
|
|
3593
3630
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
3594
|
-
import * as
|
|
3631
|
+
import * as React61 from "react";
|
|
3595
3632
|
import { SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
3596
|
-
import { Grid as
|
|
3597
|
-
import { __ as
|
|
3633
|
+
import { Grid as Grid14 } from "@elementor/ui";
|
|
3634
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
3598
3635
|
var positionOptions2 = [
|
|
3599
|
-
{ label:
|
|
3600
|
-
{ label:
|
|
3601
|
-
{ label:
|
|
3602
|
-
{ label:
|
|
3603
|
-
{ label:
|
|
3636
|
+
{ label: __33("Fill", "elementor"), value: "fill" },
|
|
3637
|
+
{ label: __33("Cover", "elementor"), value: "cover" },
|
|
3638
|
+
{ label: __33("Contain", "elementor"), value: "contain" },
|
|
3639
|
+
{ label: __33("None", "elementor"), value: "none" },
|
|
3640
|
+
{ label: __33("Scale down", "elementor"), value: "scale-down" }
|
|
3604
3641
|
];
|
|
3605
3642
|
var ObjectFitField = () => {
|
|
3606
|
-
return /* @__PURE__ */
|
|
3643
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "object-fit" }, /* @__PURE__ */ React61.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel, null, __33("Object fit", "elementor"))), /* @__PURE__ */ React61.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React61.createElement(SelectControl4, { options: positionOptions2 }))));
|
|
3607
3644
|
};
|
|
3608
3645
|
|
|
3609
3646
|
// src/components/style-sections/size-section/object-position-field.tsx
|
|
3610
|
-
import * as
|
|
3611
|
-
import {
|
|
3612
|
-
import { Grid as Grid14 } from "@elementor/ui";
|
|
3613
|
-
import { __ as __33 } from "@wordpress/i18n";
|
|
3614
|
-
var positionOptions3 = [
|
|
3615
|
-
{ label: __33("Center center", "elementor"), value: "center center" },
|
|
3616
|
-
{ label: __33("Center left", "elementor"), value: "center left" },
|
|
3617
|
-
{ label: __33("Center right", "elementor"), value: "center right" },
|
|
3618
|
-
{ label: __33("Top center", "elementor"), value: "top center" },
|
|
3619
|
-
{ label: __33("Top left", "elementor"), value: "top left" },
|
|
3620
|
-
{ label: __33("Top right", "elementor"), value: "top right" },
|
|
3621
|
-
{ label: __33("Bottom center", "elementor"), value: "bottom center" },
|
|
3622
|
-
{ label: __33("Bottom left", "elementor"), value: "bottom left" },
|
|
3623
|
-
{ label: __33("Bottom right", "elementor"), value: "bottom right" }
|
|
3624
|
-
];
|
|
3647
|
+
import * as React62 from "react";
|
|
3648
|
+
import { PositionControl } from "@elementor/editor-controls";
|
|
3625
3649
|
var ObjectPositionField = () => {
|
|
3626
|
-
return /* @__PURE__ */
|
|
3650
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "object-position" }, /* @__PURE__ */ React62.createElement(PositionControl, null));
|
|
3627
3651
|
};
|
|
3628
3652
|
|
|
3629
3653
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
3630
|
-
import * as
|
|
3654
|
+
import * as React63 from "react";
|
|
3631
3655
|
import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
3632
3656
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
3633
3657
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
@@ -3636,24 +3660,24 @@ var options6 = [
|
|
|
3636
3660
|
{
|
|
3637
3661
|
value: "visible",
|
|
3638
3662
|
label: __34("Visible", "elementor"),
|
|
3639
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3663
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(EyeIcon, { fontSize: size }),
|
|
3640
3664
|
showTooltip: true
|
|
3641
3665
|
},
|
|
3642
3666
|
{
|
|
3643
3667
|
value: "hidden",
|
|
3644
3668
|
label: __34("Hidden", "elementor"),
|
|
3645
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3669
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(EyeOffIcon, { fontSize: size }),
|
|
3646
3670
|
showTooltip: true
|
|
3647
3671
|
},
|
|
3648
3672
|
{
|
|
3649
3673
|
value: "auto",
|
|
3650
3674
|
label: __34("Auto", "elementor"),
|
|
3651
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3675
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(LetterAIcon, { fontSize: size }),
|
|
3652
3676
|
showTooltip: true
|
|
3653
3677
|
}
|
|
3654
3678
|
];
|
|
3655
3679
|
var OverflowField = () => {
|
|
3656
|
-
return /* @__PURE__ */
|
|
3680
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React63.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React63.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, __34("Overflow", "elementor"))), /* @__PURE__ */ React63.createElement(Grid15, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React63.createElement(ToggleControl8, { options: options6 }))));
|
|
3657
3681
|
};
|
|
3658
3682
|
|
|
3659
3683
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -3691,58 +3715,58 @@ var CssSizeProps = [
|
|
|
3691
3715
|
]
|
|
3692
3716
|
];
|
|
3693
3717
|
var SizeSection = () => {
|
|
3694
|
-
const
|
|
3718
|
+
const { value: fitValue } = useStylesField("object-fit");
|
|
3695
3719
|
const isNotFill = fitValue && fitValue?.value !== "fill";
|
|
3696
|
-
const gridRowRefs = [
|
|
3720
|
+
const gridRowRefs = [useRef9(), useRef9(), useRef9()];
|
|
3697
3721
|
const isVersion330Active = isExperimentActive10(EXPERIMENT_ID);
|
|
3698
|
-
return /* @__PURE__ */
|
|
3722
|
+
return /* @__PURE__ */ React64.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React64.createElement(Grid16, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React64.createElement(Grid16, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React64.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(Stack16, null, /* @__PURE__ */ React64.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React64.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React64.createElement(Stack16, { gap: 2 }, /* @__PURE__ */ React64.createElement(StylesField, { bind: "aspect-ratio" }, /* @__PURE__ */ React64.createElement(AspectRatioControl, { label: __35("Aspect Ratio", "elementor") })), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(ObjectFitField, null), isNotFill && /* @__PURE__ */ React64.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React64.createElement(ObjectPositionField, null)))));
|
|
3699
3723
|
};
|
|
3700
3724
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
3701
|
-
return /* @__PURE__ */
|
|
3725
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind }, /* @__PURE__ */ React64.createElement(Grid16, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React64.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React64.createElement(ControlLabel, null, label)), /* @__PURE__ */ React64.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React64.createElement(SizeControl6, { extendedOptions, anchorRef: rowRef }))));
|
|
3702
3726
|
};
|
|
3703
3727
|
|
|
3704
3728
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
3705
|
-
import * as
|
|
3729
|
+
import * as React65 from "react";
|
|
3706
3730
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
3707
3731
|
import { __ as __36 } from "@wordpress/i18n";
|
|
3708
3732
|
var SpacingSection = () => {
|
|
3709
3733
|
const { isSiteRtl } = useDirection();
|
|
3710
|
-
return /* @__PURE__ */
|
|
3734
|
+
return /* @__PURE__ */ React65.createElement(SectionContent, null, /* @__PURE__ */ React65.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React65.createElement(
|
|
3711
3735
|
LinkedDimensionsControl,
|
|
3712
3736
|
{
|
|
3713
3737
|
label: __36("Margin", "elementor"),
|
|
3714
3738
|
isSiteRtl,
|
|
3715
3739
|
extendedOptions: ["auto"]
|
|
3716
3740
|
}
|
|
3717
|
-
)), /* @__PURE__ */
|
|
3741
|
+
)), /* @__PURE__ */ React65.createElement(PanelDivider, null), /* @__PURE__ */ React65.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React65.createElement(LinkedDimensionsControl, { label: __36("Padding", "elementor"), isSiteRtl })));
|
|
3718
3742
|
};
|
|
3719
3743
|
|
|
3720
3744
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3721
|
-
import * as
|
|
3745
|
+
import * as React81 from "react";
|
|
3722
3746
|
import { isExperimentActive as isExperimentActive11 } from "@elementor/editor-v1-adapters";
|
|
3723
3747
|
|
|
3724
3748
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
3725
|
-
import * as
|
|
3749
|
+
import * as React66 from "react";
|
|
3726
3750
|
import { NumberControl as NumberControl4 } from "@elementor/editor-controls";
|
|
3727
3751
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
3728
3752
|
import { __ as __37 } from "@wordpress/i18n";
|
|
3729
3753
|
var ColumnCountField = () => {
|
|
3730
|
-
return /* @__PURE__ */
|
|
3754
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "column-count" }, /* @__PURE__ */ React66.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React66.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(ControlLabel, null, __37("Columns", "elementor"))), /* @__PURE__ */ React66.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(NumberControl4, { shouldForceInt: true, min: 0, step: 1 }))));
|
|
3731
3755
|
};
|
|
3732
3756
|
|
|
3733
3757
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
3734
|
-
import * as
|
|
3735
|
-
import { useRef as
|
|
3736
|
-
import { SizeControl as
|
|
3758
|
+
import * as React67 from "react";
|
|
3759
|
+
import { useRef as useRef10 } from "react";
|
|
3760
|
+
import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
3737
3761
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
3738
3762
|
import { __ as __38 } from "@wordpress/i18n";
|
|
3739
3763
|
var ColumnGapField = () => {
|
|
3740
|
-
const rowRef =
|
|
3741
|
-
return /* @__PURE__ */
|
|
3764
|
+
const rowRef = useRef10();
|
|
3765
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "column-gap" }, /* @__PURE__ */ React67.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React67.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(ControlLabel, null, __38("Column gap", "elementor"))), /* @__PURE__ */ React67.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(SizeControl7, { anchorRef: rowRef }))));
|
|
3742
3766
|
};
|
|
3743
3767
|
|
|
3744
3768
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3745
|
-
import * as
|
|
3769
|
+
import * as React68 from "react";
|
|
3746
3770
|
import { FontFamilyControl } from "@elementor/editor-controls";
|
|
3747
3771
|
import { Grid as Grid19 } from "@elementor/ui";
|
|
3748
3772
|
import { __ as __40 } from "@wordpress/i18n";
|
|
@@ -3790,22 +3814,22 @@ var FontFamilyField = () => {
|
|
|
3790
3814
|
if (fontFamilies.length === 0) {
|
|
3791
3815
|
return null;
|
|
3792
3816
|
}
|
|
3793
|
-
return /* @__PURE__ */
|
|
3817
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React68.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React68.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(ControlLabel, null, __40("Font family", "elementor"))), /* @__PURE__ */ React68.createElement(Grid19, { item: true, xs: 6, sx: { minWidth: 0 } }, /* @__PURE__ */ React68.createElement(FontFamilyControl, { fontFamilies }))));
|
|
3794
3818
|
};
|
|
3795
3819
|
|
|
3796
3820
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
3797
|
-
import * as
|
|
3798
|
-
import { useRef as
|
|
3799
|
-
import { SizeControl as
|
|
3821
|
+
import * as React69 from "react";
|
|
3822
|
+
import { useRef as useRef11 } from "react";
|
|
3823
|
+
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
3800
3824
|
import { Grid as Grid20 } from "@elementor/ui";
|
|
3801
3825
|
import { __ as __41 } from "@wordpress/i18n";
|
|
3802
3826
|
var FontSizeField = () => {
|
|
3803
|
-
const rowRef =
|
|
3804
|
-
return /* @__PURE__ */
|
|
3827
|
+
const rowRef = useRef11();
|
|
3828
|
+
return /* @__PURE__ */ React69.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React69.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React69.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(ControlLabel, null, __41("Font size", "elementor"))), /* @__PURE__ */ React69.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(SizeControl8, { anchorRef: rowRef }))));
|
|
3805
3829
|
};
|
|
3806
3830
|
|
|
3807
3831
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
3808
|
-
import * as
|
|
3832
|
+
import * as React70 from "react";
|
|
3809
3833
|
import { ControlFormLabel as ControlFormLabel5, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
3810
3834
|
import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
3811
3835
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
@@ -3814,21 +3838,21 @@ var options7 = [
|
|
|
3814
3838
|
{
|
|
3815
3839
|
value: "normal",
|
|
3816
3840
|
label: __42("Normal", "elementor"),
|
|
3817
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3841
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(MinusIcon2, { fontSize: size }),
|
|
3818
3842
|
showTooltip: true
|
|
3819
3843
|
},
|
|
3820
3844
|
{
|
|
3821
3845
|
value: "italic",
|
|
3822
3846
|
label: __42("Italic", "elementor"),
|
|
3823
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3847
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(ItalicIcon, { fontSize: size }),
|
|
3824
3848
|
showTooltip: true
|
|
3825
3849
|
}
|
|
3826
3850
|
];
|
|
3827
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
3851
|
+
var FontStyleField = () => /* @__PURE__ */ React70.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React70.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React70.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React70.createElement(ControlFormLabel5, null, __42("Font style", "elementor"))), /* @__PURE__ */ React70.createElement(Grid21, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React70.createElement(ToggleControl9, { options: options7 }))));
|
|
3828
3852
|
|
|
3829
3853
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
3830
|
-
import * as
|
|
3831
|
-
import { SelectControl as
|
|
3854
|
+
import * as React71 from "react";
|
|
3855
|
+
import { SelectControl as SelectControl5 } from "@elementor/editor-controls";
|
|
3832
3856
|
import { Grid as Grid22 } from "@elementor/ui";
|
|
3833
3857
|
import { __ as __43 } from "@wordpress/i18n";
|
|
3834
3858
|
var fontWeightOptions = [
|
|
@@ -3843,33 +3867,33 @@ var fontWeightOptions = [
|
|
|
3843
3867
|
{ value: "900", label: __43("900 - Black", "elementor") }
|
|
3844
3868
|
];
|
|
3845
3869
|
var FontWeightField = () => {
|
|
3846
|
-
return /* @__PURE__ */
|
|
3870
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React71.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React71.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React71.createElement(ControlLabel, null, __43("Font weight", "elementor"))), /* @__PURE__ */ React71.createElement(Grid22, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React71.createElement(SelectControl5, { options: fontWeightOptions }))));
|
|
3847
3871
|
};
|
|
3848
3872
|
|
|
3849
3873
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
3850
|
-
import * as
|
|
3851
|
-
import { useRef as
|
|
3852
|
-
import { SizeControl as
|
|
3874
|
+
import * as React72 from "react";
|
|
3875
|
+
import { useRef as useRef12 } from "react";
|
|
3876
|
+
import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
|
|
3853
3877
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
3854
3878
|
import { __ as __44 } from "@wordpress/i18n";
|
|
3855
3879
|
var LetterSpacingField = () => {
|
|
3856
|
-
const rowRef =
|
|
3857
|
-
return /* @__PURE__ */
|
|
3880
|
+
const rowRef = useRef12();
|
|
3881
|
+
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React72.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React72.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlLabel, null, __44("Letter spacing", "elementor"))), /* @__PURE__ */ React72.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(SizeControl9, { anchorRef: rowRef }))));
|
|
3858
3882
|
};
|
|
3859
3883
|
|
|
3860
3884
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
3861
|
-
import * as
|
|
3862
|
-
import { useRef as
|
|
3863
|
-
import { SizeControl as
|
|
3885
|
+
import * as React73 from "react";
|
|
3886
|
+
import { useRef as useRef13 } from "react";
|
|
3887
|
+
import { SizeControl as SizeControl10 } from "@elementor/editor-controls";
|
|
3864
3888
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
3865
3889
|
import { __ as __45 } from "@wordpress/i18n";
|
|
3866
3890
|
var LineHeightField = () => {
|
|
3867
|
-
const rowRef =
|
|
3868
|
-
return /* @__PURE__ */
|
|
3891
|
+
const rowRef = useRef13();
|
|
3892
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React73.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React73.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(ControlLabel, null, __45("Line height", "elementor"))), /* @__PURE__ */ React73.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(SizeControl10, { anchorRef: rowRef }))));
|
|
3869
3893
|
};
|
|
3870
3894
|
|
|
3871
3895
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
3872
|
-
import * as
|
|
3896
|
+
import * as React74 from "react";
|
|
3873
3897
|
import { ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
3874
3898
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
3875
3899
|
import { Grid as Grid25, withDirection as withDirection9 } from "@elementor/ui";
|
|
@@ -3880,43 +3904,43 @@ var options8 = [
|
|
|
3880
3904
|
{
|
|
3881
3905
|
value: "start",
|
|
3882
3906
|
label: __46("Start", "elementor"),
|
|
3883
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3907
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(AlignStartIcon, { fontSize: size }),
|
|
3884
3908
|
showTooltip: true
|
|
3885
3909
|
},
|
|
3886
3910
|
{
|
|
3887
3911
|
value: "center",
|
|
3888
3912
|
label: __46("Center", "elementor"),
|
|
3889
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3913
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(AlignCenterIcon, { fontSize: size }),
|
|
3890
3914
|
showTooltip: true
|
|
3891
3915
|
},
|
|
3892
3916
|
{
|
|
3893
3917
|
value: "end",
|
|
3894
3918
|
label: __46("End", "elementor"),
|
|
3895
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3919
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(AlignEndIcon, { fontSize: size }),
|
|
3896
3920
|
showTooltip: true
|
|
3897
3921
|
},
|
|
3898
3922
|
{
|
|
3899
3923
|
value: "justify",
|
|
3900
3924
|
label: __46("Justify", "elementor"),
|
|
3901
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3925
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
3902
3926
|
showTooltip: true
|
|
3903
3927
|
}
|
|
3904
3928
|
];
|
|
3905
3929
|
var TextAlignmentField = () => {
|
|
3906
|
-
return /* @__PURE__ */
|
|
3930
|
+
return /* @__PURE__ */ React74.createElement(UiProviders, null, /* @__PURE__ */ React74.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React74.createElement(Grid25, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React74.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(ControlLabel, null, __46("Text align", "elementor"))), /* @__PURE__ */ React74.createElement(Grid25, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React74.createElement(ToggleControl10, { options: options8 })))));
|
|
3907
3931
|
};
|
|
3908
3932
|
|
|
3909
3933
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3910
|
-
import * as
|
|
3934
|
+
import * as React75 from "react";
|
|
3911
3935
|
import { ColorControl as ColorControl2 } from "@elementor/editor-controls";
|
|
3912
3936
|
import { Grid as Grid26 } from "@elementor/ui";
|
|
3913
3937
|
import { __ as __47 } from "@wordpress/i18n";
|
|
3914
3938
|
var TextColorField = () => {
|
|
3915
|
-
return /* @__PURE__ */
|
|
3939
|
+
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React75.createElement(Grid26, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React75.createElement(Grid26, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlLabel, null, __47("Text color", "elementor"))), /* @__PURE__ */ React75.createElement(Grid26, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ColorControl2, null))));
|
|
3916
3940
|
};
|
|
3917
3941
|
|
|
3918
3942
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3919
|
-
import * as
|
|
3943
|
+
import * as React76 from "react";
|
|
3920
3944
|
import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
3921
3945
|
import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
3922
3946
|
import { Grid as Grid27 } from "@elementor/ui";
|
|
@@ -3925,33 +3949,33 @@ var options9 = [
|
|
|
3925
3949
|
{
|
|
3926
3950
|
value: "none",
|
|
3927
3951
|
label: __48("None", "elementor"),
|
|
3928
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3952
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(MinusIcon3, { fontSize: size }),
|
|
3929
3953
|
showTooltip: true,
|
|
3930
3954
|
exclusive: true
|
|
3931
3955
|
},
|
|
3932
3956
|
{
|
|
3933
3957
|
value: "underline",
|
|
3934
3958
|
label: __48("Underline", "elementor"),
|
|
3935
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3959
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(UnderlineIcon, { fontSize: size }),
|
|
3936
3960
|
showTooltip: true
|
|
3937
3961
|
},
|
|
3938
3962
|
{
|
|
3939
3963
|
value: "line-through",
|
|
3940
3964
|
label: __48("Line-through", "elementor"),
|
|
3941
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3965
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(StrikethroughIcon, { fontSize: size }),
|
|
3942
3966
|
showTooltip: true
|
|
3943
3967
|
},
|
|
3944
3968
|
{
|
|
3945
3969
|
value: "overline",
|
|
3946
3970
|
label: __48("Overline", "elementor"),
|
|
3947
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3971
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(OverlineIcon, { fontSize: size }),
|
|
3948
3972
|
showTooltip: true
|
|
3949
3973
|
}
|
|
3950
3974
|
];
|
|
3951
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3975
|
+
var TextDecorationField = () => /* @__PURE__ */ React76.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React76.createElement(Grid27, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React76.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(ControlLabel, null, __48("Line decoration", "elementor"))), /* @__PURE__ */ React76.createElement(Grid27, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React76.createElement(ToggleControl11, { options: options9, exclusive: false }))));
|
|
3952
3976
|
|
|
3953
3977
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3954
|
-
import * as
|
|
3978
|
+
import * as React77 from "react";
|
|
3955
3979
|
import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
3956
3980
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
3957
3981
|
import { Grid as Grid28 } from "@elementor/ui";
|
|
@@ -3960,22 +3984,22 @@ var options10 = [
|
|
|
3960
3984
|
{
|
|
3961
3985
|
value: "ltr",
|
|
3962
3986
|
label: __49("Left to right", "elementor"),
|
|
3963
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3987
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
3964
3988
|
showTooltip: true
|
|
3965
3989
|
},
|
|
3966
3990
|
{
|
|
3967
3991
|
value: "rtl",
|
|
3968
3992
|
label: __49("Right to left", "elementor"),
|
|
3969
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3993
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
3970
3994
|
showTooltip: true
|
|
3971
3995
|
}
|
|
3972
3996
|
];
|
|
3973
3997
|
var TextDirectionField = () => {
|
|
3974
|
-
return /* @__PURE__ */
|
|
3998
|
+
return /* @__PURE__ */ React77.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React77.createElement(Grid28, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React77.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(ControlLabel, null, __49("Direction", "elementor"))), /* @__PURE__ */ React77.createElement(Grid28, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React77.createElement(ToggleControl12, { options: options10 }))));
|
|
3975
3999
|
};
|
|
3976
4000
|
|
|
3977
4001
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
3978
|
-
import * as
|
|
4002
|
+
import * as React78 from "react";
|
|
3979
4003
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
3980
4004
|
import { __ as __50 } from "@wordpress/i18n";
|
|
3981
4005
|
var initTextStroke = {
|
|
@@ -3995,30 +4019,29 @@ var initTextStroke = {
|
|
|
3995
4019
|
}
|
|
3996
4020
|
};
|
|
3997
4021
|
var TextStrokeField = () => {
|
|
3998
|
-
const { canEdit } =
|
|
3999
|
-
const [textStroke, setTextStroke] = useStylesField("stroke");
|
|
4022
|
+
const { value, setValue, canEdit } = useStylesField("stroke");
|
|
4000
4023
|
const addTextStroke = () => {
|
|
4001
|
-
|
|
4024
|
+
setValue(initTextStroke);
|
|
4002
4025
|
};
|
|
4003
4026
|
const removeTextStroke = () => {
|
|
4004
|
-
|
|
4027
|
+
setValue(null);
|
|
4005
4028
|
};
|
|
4006
|
-
const hasTextStroke = Boolean(
|
|
4007
|
-
return /* @__PURE__ */
|
|
4029
|
+
const hasTextStroke = Boolean(value);
|
|
4030
|
+
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React78.createElement(
|
|
4008
4031
|
AddOrRemoveContent,
|
|
4009
4032
|
{
|
|
4010
4033
|
isAdded: hasTextStroke,
|
|
4011
4034
|
onAdd: addTextStroke,
|
|
4012
4035
|
onRemove: removeTextStroke,
|
|
4013
4036
|
disabled: !canEdit,
|
|
4014
|
-
renderLabel: () => /* @__PURE__ */
|
|
4037
|
+
renderLabel: () => /* @__PURE__ */ React78.createElement(ControlLabel, null, __50("Text stroke", "elementor"))
|
|
4015
4038
|
},
|
|
4016
|
-
/* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ React78.createElement(StrokeControl, null)
|
|
4017
4040
|
));
|
|
4018
4041
|
};
|
|
4019
4042
|
|
|
4020
4043
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
4021
|
-
import * as
|
|
4044
|
+
import * as React79 from "react";
|
|
4022
4045
|
import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
4023
4046
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
4024
4047
|
import { Grid as Grid29 } from "@elementor/ui";
|
|
@@ -4027,47 +4050,47 @@ var options11 = [
|
|
|
4027
4050
|
{
|
|
4028
4051
|
value: "none",
|
|
4029
4052
|
label: __51("None", "elementor"),
|
|
4030
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4053
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(MinusIcon4, { fontSize: size }),
|
|
4031
4054
|
showTooltip: true
|
|
4032
4055
|
},
|
|
4033
4056
|
{
|
|
4034
4057
|
value: "capitalize",
|
|
4035
4058
|
label: __51("Capitalize", "elementor"),
|
|
4036
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4059
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(LetterCaseIcon, { fontSize: size }),
|
|
4037
4060
|
showTooltip: true
|
|
4038
4061
|
},
|
|
4039
4062
|
{
|
|
4040
4063
|
value: "uppercase",
|
|
4041
4064
|
label: __51("Uppercase", "elementor"),
|
|
4042
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4065
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
4043
4066
|
showTooltip: true
|
|
4044
4067
|
},
|
|
4045
4068
|
{
|
|
4046
4069
|
value: "lowercase",
|
|
4047
4070
|
label: __51("Lowercase", "elementor"),
|
|
4048
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4071
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
4049
4072
|
showTooltip: true
|
|
4050
4073
|
}
|
|
4051
4074
|
];
|
|
4052
|
-
var TransformField = () => /* @__PURE__ */
|
|
4075
|
+
var TransformField = () => /* @__PURE__ */ React79.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React79.createElement(Grid29, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React79.createElement(Grid29, { item: true, xs: 6 }, /* @__PURE__ */ React79.createElement(ControlLabel, null, __51("Text transform", "elementor"))), /* @__PURE__ */ React79.createElement(Grid29, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React79.createElement(ToggleControl13, { options: options11 }))));
|
|
4053
4076
|
|
|
4054
4077
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4055
|
-
import * as
|
|
4056
|
-
import { useRef as
|
|
4057
|
-
import { SizeControl as
|
|
4078
|
+
import * as React80 from "react";
|
|
4079
|
+
import { useRef as useRef14 } from "react";
|
|
4080
|
+
import { SizeControl as SizeControl11 } from "@elementor/editor-controls";
|
|
4058
4081
|
import { Grid as Grid30 } from "@elementor/ui";
|
|
4059
4082
|
import { __ as __52 } from "@wordpress/i18n";
|
|
4060
4083
|
var WordSpacingField = () => {
|
|
4061
|
-
const rowRef =
|
|
4062
|
-
return /* @__PURE__ */
|
|
4084
|
+
const rowRef = useRef14();
|
|
4085
|
+
return /* @__PURE__ */ React80.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React80.createElement(Grid30, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React80.createElement(Grid30, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(ControlLabel, null, __52("Word spacing", "elementor"))), /* @__PURE__ */ React80.createElement(Grid30, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(SizeControl11, { anchorRef: rowRef }))));
|
|
4063
4086
|
};
|
|
4064
4087
|
|
|
4065
4088
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4066
4089
|
var TypographySection = () => {
|
|
4067
|
-
const
|
|
4068
|
-
const isVersion330Active = isExperimentActive11("e_v_3_30");
|
|
4090
|
+
const { value: columnCount } = useStylesField("column-count");
|
|
4069
4091
|
const hasMultiColumns = !!(columnCount?.value && columnCount?.value > 1);
|
|
4070
|
-
|
|
4092
|
+
const isVersion330Active = isExperimentActive11("e_v_3_30");
|
|
4093
|
+
return /* @__PURE__ */ React81.createElement(SectionContent, null, /* @__PURE__ */ React81.createElement(FontFamilyField, null), /* @__PURE__ */ React81.createElement(FontWeightField, null), /* @__PURE__ */ React81.createElement(FontSizeField, null), /* @__PURE__ */ React81.createElement(PanelDivider, null), /* @__PURE__ */ React81.createElement(TextAlignmentField, null), /* @__PURE__ */ React81.createElement(TextColorField, null), /* @__PURE__ */ React81.createElement(
|
|
4071
4094
|
StyleTabCollapsibleContent,
|
|
4072
4095
|
{
|
|
4073
4096
|
fields: [
|
|
@@ -4082,19 +4105,19 @@ var TypographySection = () => {
|
|
|
4082
4105
|
"stroke"
|
|
4083
4106
|
]
|
|
4084
4107
|
},
|
|
4085
|
-
/* @__PURE__ */
|
|
4108
|
+
/* @__PURE__ */ React81.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React81.createElement(LineHeightField, null), /* @__PURE__ */ React81.createElement(LetterSpacingField, null), /* @__PURE__ */ React81.createElement(WordSpacingField, null), isVersion330Active && /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(ColumnCountField, null), hasMultiColumns && /* @__PURE__ */ React81.createElement(ColumnGapField, null)), /* @__PURE__ */ React81.createElement(PanelDivider, null), /* @__PURE__ */ React81.createElement(TextDecorationField, null), /* @__PURE__ */ React81.createElement(TransformField, null), /* @__PURE__ */ React81.createElement(TextDirectionField, null), /* @__PURE__ */ React81.createElement(FontStyleField, null), /* @__PURE__ */ React81.createElement(TextStrokeField, null))
|
|
4086
4109
|
));
|
|
4087
4110
|
};
|
|
4088
4111
|
|
|
4089
4112
|
// src/components/style-tab-section.tsx
|
|
4090
|
-
import * as
|
|
4113
|
+
import * as React82 from "react";
|
|
4091
4114
|
import { isExperimentActive as isExperimentActive12 } from "@elementor/editor-v1-adapters";
|
|
4092
4115
|
var StyleTabSection = ({ section, fields = [] }) => {
|
|
4093
4116
|
const { component, name, title } = section;
|
|
4094
4117
|
const tabDefaults = useDefaultPanelSettings();
|
|
4095
4118
|
const SectionComponent = component;
|
|
4096
4119
|
const isExpanded = isExperimentActive12(EXPERIMENTAL_FEATURES.V_3_30) ? tabDefaults.defaultSectionsExpanded.style?.includes(name) : false;
|
|
4097
|
-
return /* @__PURE__ */
|
|
4120
|
+
return /* @__PURE__ */ React82.createElement(Section, { title, defaultExpanded: isExpanded, titleEnd: getStylesInheritanceIndicators(fields) }, /* @__PURE__ */ React82.createElement(SectionComponent, null));
|
|
4098
4121
|
};
|
|
4099
4122
|
|
|
4100
4123
|
// src/components/style-tab.tsx
|
|
@@ -4111,7 +4134,7 @@ var StyleTab = () => {
|
|
|
4111
4134
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
4112
4135
|
const [activeStyleState, setActiveStyleState] = useState12(null);
|
|
4113
4136
|
const breakpoint = useActiveBreakpoint();
|
|
4114
|
-
return /* @__PURE__ */
|
|
4137
|
+
return /* @__PURE__ */ React83.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React83.createElement(
|
|
4115
4138
|
StyleProvider,
|
|
4116
4139
|
{
|
|
4117
4140
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -4122,7 +4145,7 @@ var StyleTab = () => {
|
|
|
4122
4145
|
},
|
|
4123
4146
|
setMetaState: setActiveStyleState
|
|
4124
4147
|
},
|
|
4125
|
-
/* @__PURE__ */
|
|
4148
|
+
/* @__PURE__ */ React83.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React83.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React83.createElement(ClassesHeader, null, /* @__PURE__ */ React83.createElement(CssClassSelector, null), /* @__PURE__ */ React83.createElement(Divider5, null)), /* @__PURE__ */ React83.createElement(SectionsList, null, /* @__PURE__ */ React83.createElement(
|
|
4126
4149
|
StyleTabSection,
|
|
4127
4150
|
{
|
|
4128
4151
|
section: {
|
|
@@ -4141,7 +4164,7 @@ var StyleTab = () => {
|
|
|
4141
4164
|
"gap"
|
|
4142
4165
|
]
|
|
4143
4166
|
}
|
|
4144
|
-
), /* @__PURE__ */
|
|
4167
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4145
4168
|
StyleTabSection,
|
|
4146
4169
|
{
|
|
4147
4170
|
section: {
|
|
@@ -4151,7 +4174,7 @@ var StyleTab = () => {
|
|
|
4151
4174
|
},
|
|
4152
4175
|
fields: ["margin", "padding"]
|
|
4153
4176
|
}
|
|
4154
|
-
), /* @__PURE__ */
|
|
4177
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4155
4178
|
StyleTabSection,
|
|
4156
4179
|
{
|
|
4157
4180
|
section: {
|
|
@@ -4171,7 +4194,7 @@ var StyleTab = () => {
|
|
|
4171
4194
|
"object-fit"
|
|
4172
4195
|
]
|
|
4173
4196
|
}
|
|
4174
|
-
), /* @__PURE__ */
|
|
4197
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4175
4198
|
StyleTabSection,
|
|
4176
4199
|
{
|
|
4177
4200
|
section: {
|
|
@@ -4181,7 +4204,7 @@ var StyleTab = () => {
|
|
|
4181
4204
|
},
|
|
4182
4205
|
fields: ["position", "z-index", "scroll-margin-top"]
|
|
4183
4206
|
}
|
|
4184
|
-
), /* @__PURE__ */
|
|
4207
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4185
4208
|
StyleTabSection,
|
|
4186
4209
|
{
|
|
4187
4210
|
section: {
|
|
@@ -4206,7 +4229,7 @@ var StyleTab = () => {
|
|
|
4206
4229
|
"stroke"
|
|
4207
4230
|
]
|
|
4208
4231
|
}
|
|
4209
|
-
), /* @__PURE__ */
|
|
4232
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4210
4233
|
StyleTabSection,
|
|
4211
4234
|
{
|
|
4212
4235
|
section: {
|
|
@@ -4216,7 +4239,7 @@ var StyleTab = () => {
|
|
|
4216
4239
|
},
|
|
4217
4240
|
fields: ["background"]
|
|
4218
4241
|
}
|
|
4219
|
-
), /* @__PURE__ */
|
|
4242
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4220
4243
|
StyleTabSection,
|
|
4221
4244
|
{
|
|
4222
4245
|
section: {
|
|
@@ -4226,7 +4249,7 @@ var StyleTab = () => {
|
|
|
4226
4249
|
},
|
|
4227
4250
|
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
4228
4251
|
}
|
|
4229
|
-
), /* @__PURE__ */
|
|
4252
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4230
4253
|
StyleTabSection,
|
|
4231
4254
|
{
|
|
4232
4255
|
section: {
|
|
@@ -4241,7 +4264,7 @@ var StyleTab = () => {
|
|
|
4241
4264
|
};
|
|
4242
4265
|
function ClassesHeader({ children }) {
|
|
4243
4266
|
const scrollDirection = useScrollDirection();
|
|
4244
|
-
return /* @__PURE__ */
|
|
4267
|
+
return /* @__PURE__ */ React83.createElement(Stack17, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4245
4268
|
}
|
|
4246
4269
|
function useCurrentClassesProp() {
|
|
4247
4270
|
const { elementType } = useElement();
|
|
@@ -4260,7 +4283,7 @@ var EditingPanelTabs = () => {
|
|
|
4260
4283
|
return (
|
|
4261
4284
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4262
4285
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4263
|
-
/* @__PURE__ */
|
|
4286
|
+
/* @__PURE__ */ React84.createElement(Fragment9, { key: element.id }, /* @__PURE__ */ React84.createElement(PanelTabContent, null))
|
|
4264
4287
|
);
|
|
4265
4288
|
};
|
|
4266
4289
|
var PanelTabContent = () => {
|
|
@@ -4268,7 +4291,7 @@ var PanelTabContent = () => {
|
|
|
4268
4291
|
const defaultComponentTab = isExperimentActive13(EXPERIMENTAL_FEATURES.V_3_30) ? editorDefaults.defaultTab : "settings";
|
|
4269
4292
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4270
4293
|
const { getTabProps, getTabPanelProps, getTabsProps } = useTabs(currentTab);
|
|
4271
|
-
return /* @__PURE__ */
|
|
4294
|
+
return /* @__PURE__ */ React84.createElement(ScrollProvider, null, /* @__PURE__ */ React84.createElement(Stack18, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React84.createElement(Stack18, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React84.createElement(
|
|
4272
4295
|
Tabs,
|
|
4273
4296
|
{
|
|
4274
4297
|
variant: "fullWidth",
|
|
@@ -4280,9 +4303,9 @@ var PanelTabContent = () => {
|
|
|
4280
4303
|
setCurrentTab(newValue);
|
|
4281
4304
|
}
|
|
4282
4305
|
},
|
|
4283
|
-
/* @__PURE__ */
|
|
4284
|
-
/* @__PURE__ */
|
|
4285
|
-
), /* @__PURE__ */
|
|
4306
|
+
/* @__PURE__ */ React84.createElement(Tab, { label: __54("General", "elementor"), ...getTabProps("settings") }),
|
|
4307
|
+
/* @__PURE__ */ React84.createElement(Tab, { label: __54("Style", "elementor"), ...getTabProps("style") })
|
|
4308
|
+
), /* @__PURE__ */ React84.createElement(Divider6, null)), /* @__PURE__ */ React84.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React84.createElement(SettingsTab, null)), /* @__PURE__ */ React84.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React84.createElement(StyleTab, null))));
|
|
4286
4309
|
};
|
|
4287
4310
|
|
|
4288
4311
|
// src/components/editing-panel.tsx
|
|
@@ -4295,7 +4318,7 @@ var EditingPanel = () => {
|
|
|
4295
4318
|
return null;
|
|
4296
4319
|
}
|
|
4297
4320
|
const panelTitle = __55("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4298
|
-
return /* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ React85.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React85.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React85.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React85.createElement(ThemeProvider2, null, /* @__PURE__ */ React85.createElement(Panel, null, /* @__PURE__ */ React85.createElement(PanelHeader, null, /* @__PURE__ */ React85.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React85.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React85.createElement(PanelBody, null, /* @__PURE__ */ React85.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React85.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React85.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React85.createElement(EditingPanelTabs, null)))))))));
|
|
4299
4322
|
};
|
|
4300
4323
|
|
|
4301
4324
|
// src/panel.ts
|
|
@@ -4348,7 +4371,7 @@ import { settingsTransformersRegistry, styleTransformersRegistry } from "@elemen
|
|
|
4348
4371
|
import { injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel } from "@elementor/editor-controls";
|
|
4349
4372
|
|
|
4350
4373
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4351
|
-
import * as
|
|
4374
|
+
import * as React86 from "react";
|
|
4352
4375
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
4353
4376
|
import {
|
|
4354
4377
|
backgroundImageOverlayPropTypeUtil
|
|
@@ -4434,26 +4457,26 @@ var useDynamicTag = (tagName) => {
|
|
|
4434
4457
|
};
|
|
4435
4458
|
|
|
4436
4459
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4437
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
4460
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React86.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
4438
4461
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
4439
4462
|
const context = useBoundProp3(backgroundImageOverlayPropTypeUtil);
|
|
4440
|
-
return /* @__PURE__ */
|
|
4463
|
+
return /* @__PURE__ */ React86.createElement(PropProvider3, { ...context, value: value.value }, /* @__PURE__ */ React86.createElement(PropKeyProvider3, { bind: "image" }, /* @__PURE__ */ React86.createElement(Wrapper, { rawValue: value.value })));
|
|
4441
4464
|
};
|
|
4442
4465
|
var Wrapper = ({ rawValue }) => {
|
|
4443
4466
|
const { propType } = useBoundProp3();
|
|
4444
4467
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
4445
|
-
return /* @__PURE__ */
|
|
4468
|
+
return /* @__PURE__ */ React86.createElement(PropProvider3, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React86.createElement(PropKeyProvider3, { bind: "src" }, /* @__PURE__ */ React86.createElement(Content, { rawValue: rawValue.image })));
|
|
4446
4469
|
};
|
|
4447
4470
|
var Content = ({ rawValue }) => {
|
|
4448
4471
|
const src = rawValue.value.src;
|
|
4449
4472
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
4450
|
-
return /* @__PURE__ */
|
|
4473
|
+
return /* @__PURE__ */ React86.createElement(React86.Fragment, null, dynamicTag?.label);
|
|
4451
4474
|
};
|
|
4452
4475
|
|
|
4453
4476
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4454
|
-
import * as
|
|
4477
|
+
import * as React90 from "react";
|
|
4455
4478
|
import { ControlFormLabel as ControlFormLabel6, useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
4456
|
-
import { PopoverHeader as PopoverHeader2 } from "@elementor/editor-ui";
|
|
4479
|
+
import { PopoverHeader as PopoverHeader2, PopoverScrollableContent } from "@elementor/editor-ui";
|
|
4457
4480
|
import { DatabaseIcon as DatabaseIcon3, SettingsIcon, XIcon } from "@elementor/icons";
|
|
4458
4481
|
import {
|
|
4459
4482
|
bindPopover as bindPopover2,
|
|
@@ -4462,7 +4485,6 @@ import {
|
|
|
4462
4485
|
Divider as Divider8,
|
|
4463
4486
|
Grid as Grid31,
|
|
4464
4487
|
IconButton as IconButton5,
|
|
4465
|
-
Paper,
|
|
4466
4488
|
Popover as Popover2,
|
|
4467
4489
|
Stack as Stack21,
|
|
4468
4490
|
Tab as Tab2,
|
|
@@ -4475,9 +4497,9 @@ import {
|
|
|
4475
4497
|
import { __ as __57 } from "@wordpress/i18n";
|
|
4476
4498
|
|
|
4477
4499
|
// src/components/popover-content.tsx
|
|
4478
|
-
import * as
|
|
4500
|
+
import * as React87 from "react";
|
|
4479
4501
|
import { Stack as Stack19 } from "@elementor/ui";
|
|
4480
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
4502
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React87.createElement(Stack19, { alignItems, gap, p }, children);
|
|
4481
4503
|
|
|
4482
4504
|
// src/hooks/use-persist-dynamic-value.ts
|
|
4483
4505
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -4488,7 +4510,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
4488
4510
|
};
|
|
4489
4511
|
|
|
4490
4512
|
// src/dynamics/dynamic-control.tsx
|
|
4491
|
-
import * as
|
|
4513
|
+
import * as React88 from "react";
|
|
4492
4514
|
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
4493
4515
|
var DynamicControl = ({ bind, children }) => {
|
|
4494
4516
|
const { value, setValue } = useBoundProp4(dynamicPropTypeUtil);
|
|
@@ -4510,81 +4532,78 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
4510
4532
|
});
|
|
4511
4533
|
};
|
|
4512
4534
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
4513
|
-
return /* @__PURE__ */
|
|
4535
|
+
return /* @__PURE__ */ React88.createElement(PropProvider4, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React88.createElement(PropKeyProvider4, { bind }, children));
|
|
4514
4536
|
};
|
|
4515
4537
|
|
|
4516
4538
|
// src/dynamics/components/dynamic-selection.tsx
|
|
4517
|
-
import * as React88 from "react";
|
|
4518
4539
|
import { Fragment as Fragment11, useState as useState13 } from "react";
|
|
4540
|
+
import * as React89 from "react";
|
|
4519
4541
|
import { useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
4520
|
-
import {
|
|
4521
|
-
import {
|
|
4522
|
-
|
|
4523
|
-
Divider as Divider7,
|
|
4524
|
-
InputAdornment,
|
|
4525
|
-
Link as Link2,
|
|
4526
|
-
MenuItem,
|
|
4527
|
-
MenuList,
|
|
4528
|
-
MenuSubheader as MenuSubheader2,
|
|
4529
|
-
Stack as Stack20,
|
|
4530
|
-
TextField as TextField2,
|
|
4531
|
-
Typography as Typography6
|
|
4532
|
-
} from "@elementor/ui";
|
|
4542
|
+
import { PopoverHeader, PopoverMenuList, PopoverSearch } from "@elementor/editor-ui";
|
|
4543
|
+
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
4544
|
+
import { Box as Box7, Divider as Divider7, Link as Link2, Stack as Stack20, Typography as Typography6, useTheme as useTheme3 } from "@elementor/ui";
|
|
4533
4545
|
import { __ as __56 } from "@wordpress/i18n";
|
|
4534
4546
|
var SIZE7 = "tiny";
|
|
4535
|
-
var DynamicSelection = ({
|
|
4547
|
+
var DynamicSelection = ({ close: closePopover }) => {
|
|
4536
4548
|
const [searchValue, setSearchValue] = useState13("");
|
|
4537
4549
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
4550
|
+
const theme = useTheme3();
|
|
4538
4551
|
const { value: anyValue } = useBoundProp5();
|
|
4539
4552
|
const { bind, value: dynamicValue, setValue } = useBoundProp5(dynamicPropTypeUtil);
|
|
4540
4553
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
4541
4554
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
4542
4555
|
const options12 = useFilteredOptions(searchValue);
|
|
4543
4556
|
const hasNoDynamicTags = !options12.length && !searchValue.trim();
|
|
4544
|
-
const handleSearch = (
|
|
4545
|
-
setSearchValue(
|
|
4557
|
+
const handleSearch = (value) => {
|
|
4558
|
+
setSearchValue(value);
|
|
4546
4559
|
};
|
|
4547
|
-
const handleSetDynamicTag = (value
|
|
4560
|
+
const handleSetDynamicTag = (value) => {
|
|
4548
4561
|
if (!isCurrentValueDynamic) {
|
|
4549
4562
|
updatePropValueHistory(anyValue);
|
|
4550
4563
|
}
|
|
4551
|
-
|
|
4552
|
-
|
|
4564
|
+
const selectedOption = options12.flatMap(([, items3]) => items3).find((item) => item.value === value);
|
|
4565
|
+
setValue({ name: value, settings: { label: selectedOption?.label } });
|
|
4566
|
+
closePopover();
|
|
4553
4567
|
};
|
|
4554
|
-
|
|
4555
|
-
|
|
4568
|
+
const virtualizedItems = options12.flatMap(([category, items3]) => [
|
|
4569
|
+
{
|
|
4570
|
+
type: "category",
|
|
4571
|
+
value: category,
|
|
4572
|
+
label: dynamicGroups?.[category]?.title || category
|
|
4573
|
+
},
|
|
4574
|
+
...items3.map((item) => ({
|
|
4575
|
+
type: "item",
|
|
4576
|
+
value: item.value,
|
|
4577
|
+
label: item.label
|
|
4578
|
+
}))
|
|
4579
|
+
]);
|
|
4580
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(
|
|
4581
|
+
PopoverHeader,
|
|
4582
|
+
{
|
|
4583
|
+
title: __56("Dynamic tags", "elementor"),
|
|
4584
|
+
onClose: closePopover,
|
|
4585
|
+
icon: /* @__PURE__ */ React89.createElement(DatabaseIcon2, { fontSize: SIZE7 })
|
|
4586
|
+
}
|
|
4587
|
+
), /* @__PURE__ */ React89.createElement(Stack20, null, hasNoDynamicTags ? /* @__PURE__ */ React89.createElement(NoDynamicTags, null) : /* @__PURE__ */ React89.createElement(Fragment11, null, /* @__PURE__ */ React89.createElement(
|
|
4588
|
+
PopoverSearch,
|
|
4556
4589
|
{
|
|
4557
|
-
fullWidth: true,
|
|
4558
|
-
size: SIZE7,
|
|
4559
4590
|
value: searchValue,
|
|
4560
|
-
|
|
4561
|
-
placeholder: __56("Search dynamic tags\u2026", "elementor")
|
|
4562
|
-
InputProps: {
|
|
4563
|
-
startAdornment: /* @__PURE__ */ React88.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React88.createElement(SearchIcon, { fontSize: SIZE7 }))
|
|
4564
|
-
}
|
|
4591
|
+
onSearch: handleSearch,
|
|
4592
|
+
placeholder: __56("Search dynamic tags\u2026", "elementor")
|
|
4565
4593
|
}
|
|
4566
|
-
)
|
|
4567
|
-
|
|
4594
|
+
), /* @__PURE__ */ React89.createElement(Divider7, null), /* @__PURE__ */ React89.createElement(
|
|
4595
|
+
PopoverMenuList,
|
|
4568
4596
|
{
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
key: value,
|
|
4578
|
-
selected: isSelected,
|
|
4579
|
-
autoFocus: isSelected,
|
|
4580
|
-
sx: { px: 3.5, typography: "caption" },
|
|
4581
|
-
onClick: () => handleSetDynamicTag(value, tagLabel)
|
|
4582
|
-
},
|
|
4583
|
-
tagLabel
|
|
4584
|
-
);
|
|
4585
|
-
})))) : /* @__PURE__ */ React88.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
4597
|
+
items: virtualizedItems,
|
|
4598
|
+
onSelect: handleSetDynamicTag,
|
|
4599
|
+
onClose: closePopover,
|
|
4600
|
+
selectedValue: dynamicValue?.name,
|
|
4601
|
+
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
4602
|
+
noResultsComponent: /* @__PURE__ */ React89.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
4603
|
+
}
|
|
4604
|
+
))));
|
|
4586
4605
|
};
|
|
4587
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
4606
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React89.createElement(
|
|
4588
4607
|
Stack20,
|
|
4589
4608
|
{
|
|
4590
4609
|
gap: 1,
|
|
@@ -4595,11 +4614,11 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React88.createElem
|
|
|
4595
4614
|
color: "text.secondary",
|
|
4596
4615
|
sx: { pb: 3.5 }
|
|
4597
4616
|
},
|
|
4598
|
-
/* @__PURE__ */
|
|
4599
|
-
/* @__PURE__ */
|
|
4600
|
-
/* @__PURE__ */
|
|
4617
|
+
/* @__PURE__ */ React89.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
4618
|
+
/* @__PURE__ */ React89.createElement(Typography6, { align: "center", variant: "subtitle2" }, __56("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React89.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
4619
|
+
/* @__PURE__ */ React89.createElement(Typography6, { align: "center", variant: "caption" }, __56("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React89.createElement(Link2, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __56("Clear & try again", "elementor")))
|
|
4601
4620
|
);
|
|
4602
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
4621
|
+
var NoDynamicTags = () => /* @__PURE__ */ React89.createElement(Box7, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React89.createElement(Divider7, null), /* @__PURE__ */ React89.createElement(
|
|
4603
4622
|
Stack20,
|
|
4604
4623
|
{
|
|
4605
4624
|
gap: 1,
|
|
@@ -4610,9 +4629,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React88.createElement(Box7, { sx: { ov
|
|
|
4610
4629
|
color: "text.secondary",
|
|
4611
4630
|
sx: { pb: 3.5 }
|
|
4612
4631
|
},
|
|
4613
|
-
/* @__PURE__ */
|
|
4614
|
-
/* @__PURE__ */
|
|
4615
|
-
/* @__PURE__ */
|
|
4632
|
+
/* @__PURE__ */ React89.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
4633
|
+
/* @__PURE__ */ React89.createElement(Typography6, { align: "center", variant: "subtitle2" }, __56("Streamline your workflow with dynamic tags", "elementor")),
|
|
4634
|
+
/* @__PURE__ */ React89.createElement(Typography6, { align: "center", variant: "caption" }, __56("You'll need Elementor Pro to use this feature.", "elementor"))
|
|
4616
4635
|
));
|
|
4617
4636
|
var useFilteredOptions = (searchValue) => {
|
|
4618
4637
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -4645,25 +4664,25 @@ var DynamicSelectionControl = () => {
|
|
|
4645
4664
|
if (!dynamicTag) {
|
|
4646
4665
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
4647
4666
|
}
|
|
4648
|
-
return /* @__PURE__ */
|
|
4667
|
+
return /* @__PURE__ */ React90.createElement(Box8, null, /* @__PURE__ */ React90.createElement(
|
|
4649
4668
|
Tag,
|
|
4650
4669
|
{
|
|
4651
4670
|
fullWidth: true,
|
|
4652
4671
|
showActionsOnHover: true,
|
|
4653
4672
|
label: dynamicTag.label,
|
|
4654
|
-
startIcon: /* @__PURE__ */
|
|
4673
|
+
startIcon: /* @__PURE__ */ React90.createElement(DatabaseIcon3, { fontSize: SIZE8 }),
|
|
4655
4674
|
...bindTrigger2(selectionPopoverState),
|
|
4656
|
-
actions: /* @__PURE__ */
|
|
4675
|
+
actions: /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React90.createElement(
|
|
4657
4676
|
IconButton5,
|
|
4658
4677
|
{
|
|
4659
4678
|
size: SIZE8,
|
|
4660
4679
|
onClick: removeDynamicTag,
|
|
4661
4680
|
"aria-label": __57("Remove dynamic value", "elementor")
|
|
4662
4681
|
},
|
|
4663
|
-
/* @__PURE__ */
|
|
4682
|
+
/* @__PURE__ */ React90.createElement(XIcon, { fontSize: SIZE8 })
|
|
4664
4683
|
))
|
|
4665
4684
|
}
|
|
4666
|
-
), /* @__PURE__ */
|
|
4685
|
+
), /* @__PURE__ */ React90.createElement(
|
|
4667
4686
|
Popover2,
|
|
4668
4687
|
{
|
|
4669
4688
|
disablePortal: true,
|
|
@@ -4671,14 +4690,7 @@ var DynamicSelectionControl = () => {
|
|
|
4671
4690
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
4672
4691
|
...bindPopover2(selectionPopoverState)
|
|
4673
4692
|
},
|
|
4674
|
-
/* @__PURE__ */
|
|
4675
|
-
PopoverHeader2,
|
|
4676
|
-
{
|
|
4677
|
-
title: __57("Dynamic tags", "elementor"),
|
|
4678
|
-
onClose: selectionPopoverState.close,
|
|
4679
|
-
icon: /* @__PURE__ */ React89.createElement(DatabaseIcon3, { fontSize: SIZE8 })
|
|
4680
|
-
}
|
|
4681
|
-
), /* @__PURE__ */ React89.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
4693
|
+
/* @__PURE__ */ React90.createElement(Stack21, null, /* @__PURE__ */ React90.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
4682
4694
|
));
|
|
4683
4695
|
};
|
|
4684
4696
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -4687,7 +4699,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
4687
4699
|
if (!hasDynamicSettings) {
|
|
4688
4700
|
return null;
|
|
4689
4701
|
}
|
|
4690
|
-
return /* @__PURE__ */
|
|
4702
|
+
return /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(IconButton5, { size: SIZE8, ...bindTrigger2(popupState), "aria-label": __57("Settings", "elementor") }, /* @__PURE__ */ React90.createElement(SettingsIcon, { fontSize: SIZE8 })), /* @__PURE__ */ React90.createElement(
|
|
4691
4703
|
Popover2,
|
|
4692
4704
|
{
|
|
4693
4705
|
disablePortal: true,
|
|
@@ -4695,14 +4707,15 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
4695
4707
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
4696
4708
|
...bindPopover2(popupState)
|
|
4697
4709
|
},
|
|
4698
|
-
/* @__PURE__ */
|
|
4710
|
+
/* @__PURE__ */ React90.createElement(
|
|
4699
4711
|
PopoverHeader2,
|
|
4700
4712
|
{
|
|
4701
4713
|
title: dynamicTag.label,
|
|
4702
4714
|
onClose: popupState.close,
|
|
4703
|
-
icon: /* @__PURE__ */
|
|
4715
|
+
icon: /* @__PURE__ */ React90.createElement(DatabaseIcon3, { fontSize: SIZE8 })
|
|
4704
4716
|
}
|
|
4705
|
-
),
|
|
4717
|
+
),
|
|
4718
|
+
/* @__PURE__ */ React90.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls })
|
|
4706
4719
|
));
|
|
4707
4720
|
};
|
|
4708
4721
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -4711,10 +4724,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
4711
4724
|
if (!tabs.length) {
|
|
4712
4725
|
return null;
|
|
4713
4726
|
}
|
|
4714
|
-
return /* @__PURE__ */
|
|
4715
|
-
return /* @__PURE__ */
|
|
4727
|
+
return /* @__PURE__ */ React90.createElement(PopoverScrollableContent, null, /* @__PURE__ */ React90.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React90.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React90.createElement(Divider8, null), tabs.map(({ value }, index) => {
|
|
4728
|
+
return /* @__PURE__ */ React90.createElement(TabPanel2, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React90.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
4716
4729
|
if (item.type === "control") {
|
|
4717
|
-
return /* @__PURE__ */
|
|
4730
|
+
return /* @__PURE__ */ React90.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
4718
4731
|
}
|
|
4719
4732
|
return null;
|
|
4720
4733
|
})));
|
|
@@ -4724,7 +4737,7 @@ var Control3 = ({ control }) => {
|
|
|
4724
4737
|
if (!getControl(control.type)) {
|
|
4725
4738
|
return null;
|
|
4726
4739
|
}
|
|
4727
|
-
return /* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ React90.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React90.createElement(Grid31, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React90.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React90.createElement(ControlFormLabel6, null, control.label)) : null, /* @__PURE__ */ React90.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React90.createElement(Control, { type: control.type, props: control.props }))));
|
|
4728
4741
|
};
|
|
4729
4742
|
|
|
4730
4743
|
// src/dynamics/dynamic-transformer.ts
|
|
@@ -4777,7 +4790,7 @@ function getDynamicValue(name, settings) {
|
|
|
4777
4790
|
}
|
|
4778
4791
|
|
|
4779
4792
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
4780
|
-
import * as
|
|
4793
|
+
import * as React91 from "react";
|
|
4781
4794
|
import { useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
4782
4795
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
4783
4796
|
import { __ as __58 } from "@wordpress/i18n";
|
|
@@ -4788,7 +4801,7 @@ var usePropDynamicAction = () => {
|
|
|
4788
4801
|
visible,
|
|
4789
4802
|
icon: DatabaseIcon4,
|
|
4790
4803
|
title: __58("Dynamic tags", "elementor"),
|
|
4791
|
-
|
|
4804
|
+
content: ({ close }) => /* @__PURE__ */ React91.createElement(DynamicSelection, { close })
|
|
4792
4805
|
};
|
|
4793
4806
|
};
|
|
4794
4807
|
|
|
@@ -4844,36 +4857,36 @@ function useResetStyleValueProps() {
|
|
|
4844
4857
|
import { createTransformer as createTransformer6, styleTransformersRegistry as styleTransformersRegistry2 } from "@elementor/editor-canvas";
|
|
4845
4858
|
|
|
4846
4859
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
4847
|
-
import * as
|
|
4860
|
+
import * as React92 from "react";
|
|
4848
4861
|
import { createTransformer as createTransformer2 } from "@elementor/editor-canvas";
|
|
4849
4862
|
import { Stack as Stack22, styled as styled7, UnstableColorIndicator } from "@elementor/ui";
|
|
4850
|
-
var backgroundColorOverlayTransformer = createTransformer2((value) => /* @__PURE__ */
|
|
4863
|
+
var backgroundColorOverlayTransformer = createTransformer2((value) => /* @__PURE__ */ React92.createElement(Stack22, { direction: "row", gap: 10 }, /* @__PURE__ */ React92.createElement(ItemIconColor, { value }), /* @__PURE__ */ React92.createElement(ItemLabelColor, { value })));
|
|
4851
4864
|
var ItemIconColor = ({ value }) => {
|
|
4852
4865
|
const { color } = value;
|
|
4853
|
-
return /* @__PURE__ */
|
|
4866
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
4854
4867
|
};
|
|
4855
4868
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
4856
|
-
return /* @__PURE__ */
|
|
4869
|
+
return /* @__PURE__ */ React92.createElement("span", null, color);
|
|
4857
4870
|
};
|
|
4858
4871
|
var StyledUnstableColorIndicator = styled7(UnstableColorIndicator)(({ theme }) => ({
|
|
4859
4872
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
4860
4873
|
}));
|
|
4861
4874
|
|
|
4862
4875
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
4863
|
-
import * as
|
|
4876
|
+
import * as React93 from "react";
|
|
4864
4877
|
import { createTransformer as createTransformer3 } from "@elementor/editor-canvas";
|
|
4865
4878
|
import { Stack as Stack23 } from "@elementor/ui";
|
|
4866
4879
|
import { __ as __60 } from "@wordpress/i18n";
|
|
4867
|
-
var backgroundGradientOverlayTransformer = createTransformer3((value) => /* @__PURE__ */
|
|
4880
|
+
var backgroundGradientOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React93.createElement(Stack23, { direction: "row", gap: 10 }, /* @__PURE__ */ React93.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React93.createElement(ItemLabelGradient, { value })));
|
|
4868
4881
|
var ItemIconGradient = ({ value }) => {
|
|
4869
4882
|
const gradient = getGradientValue(value);
|
|
4870
|
-
return /* @__PURE__ */
|
|
4883
|
+
return /* @__PURE__ */ React93.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
4871
4884
|
};
|
|
4872
4885
|
var ItemLabelGradient = ({ value }) => {
|
|
4873
4886
|
if (value.type === "linear") {
|
|
4874
|
-
return /* @__PURE__ */
|
|
4887
|
+
return /* @__PURE__ */ React93.createElement("span", null, __60("Linear Gradient", "elementor"));
|
|
4875
4888
|
}
|
|
4876
|
-
return /* @__PURE__ */
|
|
4889
|
+
return /* @__PURE__ */ React93.createElement("span", null, __60("Radial Gradient", "elementor"));
|
|
4877
4890
|
};
|
|
4878
4891
|
var getGradientValue = (gradient) => {
|
|
4879
4892
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -4884,15 +4897,15 @@ var getGradientValue = (gradient) => {
|
|
|
4884
4897
|
};
|
|
4885
4898
|
|
|
4886
4899
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
4887
|
-
import * as
|
|
4900
|
+
import * as React94 from "react";
|
|
4888
4901
|
import { createTransformer as createTransformer4 } from "@elementor/editor-canvas";
|
|
4889
4902
|
import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
|
|
4890
4903
|
import { CardMedia, Stack as Stack24 } from "@elementor/ui";
|
|
4891
4904
|
import { useWpMediaAttachment } from "@elementor/wp-media";
|
|
4892
|
-
var backgroundImageOverlayTransformer = createTransformer4((value) => /* @__PURE__ */
|
|
4905
|
+
var backgroundImageOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React94.createElement(Stack24, { direction: "row", gap: 10 }, /* @__PURE__ */ React94.createElement(ItemIconImage, { value }), /* @__PURE__ */ React94.createElement(ItemLabelImage, { value })));
|
|
4893
4906
|
var ItemIconImage = ({ value }) => {
|
|
4894
4907
|
const { imageUrl } = useImage(value);
|
|
4895
|
-
return /* @__PURE__ */
|
|
4908
|
+
return /* @__PURE__ */ React94.createElement(
|
|
4896
4909
|
CardMedia,
|
|
4897
4910
|
{
|
|
4898
4911
|
image: imageUrl,
|
|
@@ -4907,7 +4920,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
4907
4920
|
};
|
|
4908
4921
|
var ItemLabelImage = ({ value }) => {
|
|
4909
4922
|
const { imageTitle } = useImage(value);
|
|
4910
|
-
return /* @__PURE__ */
|
|
4923
|
+
return /* @__PURE__ */ React94.createElement(EllipsisWithTooltip2, { title: imageTitle }, /* @__PURE__ */ React94.createElement("span", null, imageTitle));
|
|
4911
4924
|
};
|
|
4912
4925
|
var useImage = (image) => {
|
|
4913
4926
|
let imageTitle, imageUrl = null;
|
|
@@ -4932,14 +4945,14 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
4932
4945
|
};
|
|
4933
4946
|
|
|
4934
4947
|
// src/styles-inheritance/transformers/background-overlay-transformer.tsx
|
|
4935
|
-
import * as
|
|
4948
|
+
import * as React95 from "react";
|
|
4936
4949
|
import { createTransformer as createTransformer5 } from "@elementor/editor-canvas";
|
|
4937
4950
|
import { Stack as Stack25 } from "@elementor/ui";
|
|
4938
4951
|
var backgroundOverlayTransformer = createTransformer5((values) => {
|
|
4939
4952
|
if (!values || values.length === 0) {
|
|
4940
4953
|
return null;
|
|
4941
4954
|
}
|
|
4942
|
-
return /* @__PURE__ */
|
|
4955
|
+
return /* @__PURE__ */ React95.createElement(Stack25, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React95.createElement(Stack25, { key: index }, item)));
|
|
4943
4956
|
});
|
|
4944
4957
|
|
|
4945
4958
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -5004,6 +5017,7 @@ export {
|
|
|
5004
5017
|
init3 as init,
|
|
5005
5018
|
injectIntoClassSelectorActions,
|
|
5006
5019
|
registerControlReplacement,
|
|
5020
|
+
registerStyleProviderToColors,
|
|
5007
5021
|
useBoundProp9 as useBoundProp,
|
|
5008
5022
|
useFontFamilies,
|
|
5009
5023
|
usePanelActions,
|