@elementor/editor-editing-panel 1.11.0 → 1.12.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.js +483 -473
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +425 -415
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/components/css-classes/css-class-item.tsx +2 -0
- package/src/components/css-classes/css-class-selector.tsx +2 -7
- package/src/components/panel-divider.tsx +4 -0
- package/src/components/style-sections/border-section/border-color-field.tsx +1 -1
- package/src/components/style-sections/border-section/border-radius-field.tsx +33 -15
- package/src/components/style-sections/border-section/border-section.tsx +3 -2
- package/src/components/style-sections/border-section/border-style-field.tsx +2 -2
- package/src/components/style-sections/border-section/border-width-field.tsx +1 -1
- package/src/components/style-sections/layout-section/layout-section.tsx +4 -3
- package/src/components/style-sections/position-section/position-field.tsx +1 -1
- package/src/components/style-sections/size-section/size-section.tsx +7 -6
- package/src/components/style-sections/spacing-section/spacing-section.tsx +3 -2
- package/src/components/style-sections/typography-section/font-family-field.tsx +2 -2
- package/src/components/style-sections/typography-section/font-size-field.tsx +1 -1
- package/src/components/style-sections/typography-section/font-style-field.tsx +36 -0
- package/src/components/style-sections/typography-section/font-weight-field.tsx +2 -2
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +1 -1
- package/src/components/style-sections/typography-section/line-height-field.tsx +1 -1
- package/src/components/style-sections/typography-section/text-color-field.tsx +1 -1
- package/src/components/style-sections/typography-section/{text-style-field.tsx → text-decoration-field.tsx} +3 -24
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +3 -3
- package/src/components/style-sections/typography-section/transform-field.tsx +1 -1
- package/src/components/style-sections/typography-section/typography-section.tsx +8 -5
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +1 -1
- package/src/controls-registry/settings-field.tsx +1 -7
package/dist/index.mjs
CHANGED
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
function MultiCombobox({
|
|
110
110
|
actions = [],
|
|
111
111
|
selected,
|
|
112
|
-
options:
|
|
112
|
+
options: options11,
|
|
113
113
|
onSelect,
|
|
114
114
|
...props
|
|
115
115
|
}) {
|
|
@@ -127,14 +127,14 @@ function MultiCombobox({
|
|
|
127
127
|
handleHomeEndKeys: true,
|
|
128
128
|
disabled: loading,
|
|
129
129
|
value: selected,
|
|
130
|
-
options:
|
|
130
|
+
options: options11,
|
|
131
131
|
renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
|
|
132
132
|
renderInput: (params) => /* @__PURE__ */ React4.createElement(TextField, { ...params }),
|
|
133
133
|
onChange: (_, selectedOrInputValue, reason) => {
|
|
134
134
|
const inputValue = selectedOrInputValue.find((option) => typeof option === "string");
|
|
135
135
|
const optionsAndActions = selectedOrInputValue.filter((option) => typeof option !== "string");
|
|
136
136
|
if (reason === "createOption") {
|
|
137
|
-
const [firstAction] = filterActions(actions, { options:
|
|
137
|
+
const [firstAction] = filterActions(actions, { options: options11, inputValue: inputValue ?? "" });
|
|
138
138
|
if (firstAction) {
|
|
139
139
|
return run(firstAction.apply, firstAction.value);
|
|
140
140
|
}
|
|
@@ -143,7 +143,7 @@ function MultiCombobox({
|
|
|
143
143
|
if (reason === "selectOption" && action) {
|
|
144
144
|
return run(action.apply, action.value);
|
|
145
145
|
}
|
|
146
|
-
const fixedValues =
|
|
146
|
+
const fixedValues = options11.filter((option) => !!option.fixed);
|
|
147
147
|
onSelect?.([.../* @__PURE__ */ new Set([...optionsAndActions, ...fixedValues])]);
|
|
148
148
|
},
|
|
149
149
|
getOptionLabel: (option) => typeof option === "string" ? option : option.label,
|
|
@@ -200,8 +200,8 @@ function useActionRunner() {
|
|
|
200
200
|
};
|
|
201
201
|
return { run, loading };
|
|
202
202
|
}
|
|
203
|
-
function filterActions(actions, { options:
|
|
204
|
-
return actions.filter((action) => action.condition(
|
|
203
|
+
function filterActions(actions, { options: options11, inputValue }) {
|
|
204
|
+
return actions.filter((action) => action.condition(options11, inputValue)).map((action, index) => ({
|
|
205
205
|
label: action.label(inputValue),
|
|
206
206
|
value: inputValue,
|
|
207
207
|
group: action.group,
|
|
@@ -437,6 +437,7 @@ var validateLabel = (newLabel) => {
|
|
|
437
437
|
if (stylesRepository3.isLabelExist(newLabel)) {
|
|
438
438
|
return __2("Existing name", "elementor");
|
|
439
439
|
}
|
|
440
|
+
return null;
|
|
440
441
|
};
|
|
441
442
|
|
|
442
443
|
// src/components/css-classes/css-class-selector.tsx
|
|
@@ -451,19 +452,19 @@ var EMPTY_OPTION = {
|
|
|
451
452
|
};
|
|
452
453
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = createLocation();
|
|
453
454
|
function CssClassSelector() {
|
|
454
|
-
const
|
|
455
|
+
const options11 = useOptions();
|
|
455
456
|
const { value: appliedIds, setValue: setAppliedIds, pushValue: pushAppliedId } = useAppliedClassesIds();
|
|
456
457
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
457
458
|
const actions = useCreateActions({ pushAppliedId, setActiveId });
|
|
458
459
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
459
|
-
const applied = useAppliedOptions(
|
|
460
|
+
const applied = useAppliedOptions(options11, appliedIds);
|
|
460
461
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
461
462
|
return /* @__PURE__ */ React7.createElement(Stack2, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(Typography2, { component: "label", variant: "caption", htmlFor: ID }, __3("CSS Classes", "elementor")), /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
462
463
|
MultiCombobox,
|
|
463
464
|
{
|
|
464
465
|
id: ID,
|
|
465
466
|
size: "tiny",
|
|
466
|
-
options:
|
|
467
|
+
options: options11,
|
|
467
468
|
selected: applied,
|
|
468
469
|
onSelect: handleApply,
|
|
469
470
|
limitTags: TAGS_LIMIT,
|
|
@@ -538,19 +539,14 @@ function useCreateActions({
|
|
|
538
539
|
pushAppliedId(createdId);
|
|
539
540
|
setActiveId(createdId);
|
|
540
541
|
},
|
|
541
|
-
condition: (
|
|
542
|
-
const isUniqueLabel = !options10.some(
|
|
543
|
-
(option) => option.label.toLowerCase() === inputValue.toLowerCase()
|
|
544
|
-
);
|
|
545
|
-
return !!inputValue && isUniqueLabel;
|
|
546
|
-
},
|
|
542
|
+
condition: (_, inputValue) => stylesRepository4.isLabelValid(inputValue) && !stylesRepository4.isLabelExist(inputValue),
|
|
547
543
|
// translators: %s is the singular label of css class provider (e.g "Global CSS Class").
|
|
548
544
|
group: __3("Create New %s", "elementor").replace("%s", provider.labels?.singular ?? "")
|
|
549
545
|
};
|
|
550
546
|
});
|
|
551
547
|
}
|
|
552
|
-
function useAppliedOptions(
|
|
553
|
-
const applied =
|
|
548
|
+
function useAppliedOptions(options11, appliedIds) {
|
|
549
|
+
const applied = options11.filter((option) => appliedIds.includes(option.value));
|
|
554
550
|
const hasElementsProviderStyleApplied = applied.some(
|
|
555
551
|
(option) => option.provider === ELEMENTS_STYLES_PROVIDER_KEY
|
|
556
552
|
);
|
|
@@ -606,13 +602,13 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
606
602
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
607
603
|
|
|
608
604
|
// src/components/editing-panel.tsx
|
|
609
|
-
import * as
|
|
605
|
+
import * as React62 from "react";
|
|
610
606
|
import { ControlActionsProvider, ControlReplacementProvider } from "@elementor/editor-controls";
|
|
611
607
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
612
608
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
613
609
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
614
610
|
import { ErrorBoundary } from "@elementor/ui";
|
|
615
|
-
import { __ as
|
|
611
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
616
612
|
|
|
617
613
|
// src/controls-actions.ts
|
|
618
614
|
import { createMenu } from "@elementor/menus";
|
|
@@ -668,10 +664,10 @@ function EditorPanelErrorFallback() {
|
|
|
668
664
|
}
|
|
669
665
|
|
|
670
666
|
// src/components/editing-panel-tabs.tsx
|
|
671
|
-
import * as
|
|
667
|
+
import * as React61 from "react";
|
|
672
668
|
import { Fragment as Fragment8 } from "react";
|
|
673
|
-
import { Divider as
|
|
674
|
-
import { __ as
|
|
669
|
+
import { Divider as Divider5, Stack as Stack20, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
670
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
675
671
|
|
|
676
672
|
// src/components/settings-tab.tsx
|
|
677
673
|
import * as React15 from "react";
|
|
@@ -763,12 +759,8 @@ var createTopLevelOjectType = ({ schema }) => {
|
|
|
763
759
|
var SettingsField = ({ bind, children }) => {
|
|
764
760
|
const { element, elementType } = useElement();
|
|
765
761
|
const settingsValue = useElementSetting3(element.id, bind);
|
|
766
|
-
const linkValue = useElementSetting3(element.id, "link");
|
|
767
762
|
const value = { [bind]: settingsValue };
|
|
768
763
|
const propType = createTopLevelOjectType({ schema: elementType.propsSchema });
|
|
769
|
-
if (bind === "tag" && linkValue?.value && "div-block" === elementType.key) {
|
|
770
|
-
return null;
|
|
771
|
-
}
|
|
772
764
|
const setValue = (newValue) => {
|
|
773
765
|
updateElementSettings3({
|
|
774
766
|
id: element.id,
|
|
@@ -846,13 +838,13 @@ var Control2 = ({ control }) => {
|
|
|
846
838
|
};
|
|
847
839
|
|
|
848
840
|
// src/components/style-tab.tsx
|
|
849
|
-
import * as
|
|
841
|
+
import * as React60 from "react";
|
|
850
842
|
import { useState as useState7 } from "react";
|
|
851
843
|
import { useElementSetting as useElementSetting4, useElementStyles } from "@elementor/editor-elements";
|
|
852
844
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
853
845
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
854
|
-
import { Divider as
|
|
855
|
-
import { __ as
|
|
846
|
+
import { Divider as Divider4 } from "@elementor/ui";
|
|
847
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
856
848
|
|
|
857
849
|
// src/components/style-sections/background-section/background-section.tsx
|
|
858
850
|
import * as React17 from "react";
|
|
@@ -1022,21 +1014,26 @@ var BackgroundSection = () => {
|
|
|
1022
1014
|
};
|
|
1023
1015
|
|
|
1024
1016
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1025
|
-
import * as
|
|
1026
|
-
import {
|
|
1017
|
+
import * as React26 from "react";
|
|
1018
|
+
import { Stack as Stack6 } from "@elementor/ui";
|
|
1019
|
+
|
|
1020
|
+
// src/components/panel-divider.tsx
|
|
1021
|
+
import * as React18 from "react";
|
|
1022
|
+
import { Divider as Divider3 } from "@elementor/ui";
|
|
1023
|
+
var PanelDivider = () => /* @__PURE__ */ React18.createElement(Divider3, { sx: { my: 0.5 } });
|
|
1027
1024
|
|
|
1028
1025
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1029
|
-
import * as
|
|
1026
|
+
import * as React23 from "react";
|
|
1030
1027
|
import { __ as __8 } from "@wordpress/i18n";
|
|
1031
1028
|
|
|
1032
1029
|
// src/components/add-or-remove-content.tsx
|
|
1033
|
-
import * as
|
|
1030
|
+
import * as React19 from "react";
|
|
1034
1031
|
import { ControlLabel as ControlLabel2 } from "@elementor/editor-controls";
|
|
1035
1032
|
import { MinusIcon, PlusIcon } from "@elementor/icons";
|
|
1036
1033
|
import { Collapse as Collapse2, IconButton as IconButton2, Stack as Stack5 } from "@elementor/ui";
|
|
1037
1034
|
var SIZE2 = "tiny";
|
|
1038
1035
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
1039
|
-
return /* @__PURE__ */
|
|
1036
|
+
return /* @__PURE__ */ React19.createElement(Stack5, { gap: 1.5 }, /* @__PURE__ */ React19.createElement(
|
|
1040
1037
|
Stack5,
|
|
1041
1038
|
{
|
|
1042
1039
|
direction: "row",
|
|
@@ -1045,22 +1042,22 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1045
1042
|
alignItems: "center"
|
|
1046
1043
|
}
|
|
1047
1044
|
},
|
|
1048
|
-
/* @__PURE__ */
|
|
1049
|
-
isAdded ? /* @__PURE__ */
|
|
1050
|
-
), /* @__PURE__ */
|
|
1045
|
+
/* @__PURE__ */ React19.createElement(ControlLabel2, null, label),
|
|
1046
|
+
isAdded ? /* @__PURE__ */ React19.createElement(IconButton2, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React19.createElement(MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React19.createElement(IconButton2, { size: SIZE2, onClick: onAdd, "aria-label": "Add" }, /* @__PURE__ */ React19.createElement(PlusIcon, { fontSize: SIZE2 }))
|
|
1047
|
+
), /* @__PURE__ */ React19.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React19.createElement(Stack5, { gap: 1.5 }, children)));
|
|
1051
1048
|
};
|
|
1052
1049
|
|
|
1053
1050
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
1054
|
-
import * as
|
|
1051
|
+
import * as React20 from "react";
|
|
1055
1052
|
import { ColorControl, ControlLabel as ControlLabel3 } from "@elementor/editor-controls";
|
|
1056
1053
|
import { Grid } from "@elementor/ui";
|
|
1057
1054
|
import { __ as __5 } from "@wordpress/i18n";
|
|
1058
1055
|
var BorderColorField = () => {
|
|
1059
|
-
return /* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React20.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(ControlLabel3, null, __5("Border color", "elementor"))), /* @__PURE__ */ React20.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(ColorControl, null))));
|
|
1060
1057
|
};
|
|
1061
1058
|
|
|
1062
1059
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1063
|
-
import * as
|
|
1060
|
+
import * as React21 from "react";
|
|
1064
1061
|
import { ControlLabel as ControlLabel4, SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
1065
1062
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
1066
1063
|
import { __ as __6 } from "@wordpress/i18n";
|
|
@@ -1076,11 +1073,11 @@ var borderStyles = [
|
|
|
1076
1073
|
{ value: "outset", label: __6("Outset", "elementor") }
|
|
1077
1074
|
];
|
|
1078
1075
|
var BorderStyleField = () => {
|
|
1079
|
-
return /* @__PURE__ */
|
|
1076
|
+
return /* @__PURE__ */ React21.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React21.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React21.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(ControlLabel4, null, __6("Border type", "elementor"))), /* @__PURE__ */ React21.createElement(Grid2, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React21.createElement(SelectControl2, { options: borderStyles }))));
|
|
1080
1077
|
};
|
|
1081
1078
|
|
|
1082
1079
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1083
|
-
import * as
|
|
1080
|
+
import * as React22 from "react";
|
|
1084
1081
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
1085
1082
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
1086
1083
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
@@ -1088,32 +1085,32 @@ import { __ as __7 } from "@wordpress/i18n";
|
|
|
1088
1085
|
var edges = [
|
|
1089
1086
|
{
|
|
1090
1087
|
label: __7("Top", "elementor"),
|
|
1091
|
-
icon: /* @__PURE__ */
|
|
1088
|
+
icon: /* @__PURE__ */ React22.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
1092
1089
|
bind: "top"
|
|
1093
1090
|
},
|
|
1094
1091
|
{
|
|
1095
1092
|
label: __7("Right", "elementor"),
|
|
1096
|
-
icon: /* @__PURE__ */
|
|
1093
|
+
icon: /* @__PURE__ */ React22.createElement(SideRightIcon, { fontSize: "tiny" }),
|
|
1097
1094
|
bind: "right"
|
|
1098
1095
|
},
|
|
1099
1096
|
{
|
|
1100
1097
|
label: __7("Bottom", "elementor"),
|
|
1101
|
-
icon: /* @__PURE__ */
|
|
1098
|
+
icon: /* @__PURE__ */ React22.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
1102
1099
|
bind: "bottom"
|
|
1103
1100
|
},
|
|
1104
1101
|
{
|
|
1105
1102
|
label: __7("Left", "elementor"),
|
|
1106
|
-
icon: /* @__PURE__ */
|
|
1103
|
+
icon: /* @__PURE__ */ React22.createElement(SideLeftIcon, { fontSize: "tiny" }),
|
|
1107
1104
|
bind: "left"
|
|
1108
1105
|
}
|
|
1109
1106
|
];
|
|
1110
1107
|
var BorderWidthField = () => {
|
|
1111
|
-
return /* @__PURE__ */
|
|
1108
|
+
return /* @__PURE__ */ React22.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React22.createElement(
|
|
1112
1109
|
EqualUnequalSizesControl,
|
|
1113
1110
|
{
|
|
1114
1111
|
items: edges,
|
|
1115
|
-
label: __7("Border
|
|
1116
|
-
icon: /* @__PURE__ */
|
|
1112
|
+
label: __7("Border width", "elementor"),
|
|
1113
|
+
icon: /* @__PURE__ */ React22.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
1117
1114
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
1118
1115
|
}
|
|
1119
1116
|
));
|
|
@@ -1138,7 +1135,7 @@ var BorderField = () => {
|
|
|
1138
1135
|
});
|
|
1139
1136
|
};
|
|
1140
1137
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
1141
|
-
return /* @__PURE__ */
|
|
1138
|
+
return /* @__PURE__ */ React23.createElement(
|
|
1142
1139
|
AddOrRemoveContent,
|
|
1143
1140
|
{
|
|
1144
1141
|
label: __8("Border", "elementor"),
|
|
@@ -1146,14 +1143,14 @@ var BorderField = () => {
|
|
|
1146
1143
|
onAdd: addBorder,
|
|
1147
1144
|
onRemove: removeBorder
|
|
1148
1145
|
},
|
|
1149
|
-
/* @__PURE__ */
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
/* @__PURE__ */
|
|
1146
|
+
/* @__PURE__ */ React23.createElement(BorderWidthField, null),
|
|
1147
|
+
/* @__PURE__ */ React23.createElement(BorderColorField, null),
|
|
1148
|
+
/* @__PURE__ */ React23.createElement(BorderStyleField, null)
|
|
1152
1149
|
);
|
|
1153
1150
|
};
|
|
1154
1151
|
|
|
1155
1152
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1156
|
-
import * as
|
|
1153
|
+
import * as React25 from "react";
|
|
1157
1154
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
1158
1155
|
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
1159
1156
|
import {
|
|
@@ -1163,57 +1160,110 @@ import {
|
|
|
1163
1160
|
RadiusTopLeftIcon,
|
|
1164
1161
|
RadiusTopRightIcon
|
|
1165
1162
|
} from "@elementor/icons";
|
|
1163
|
+
import { withDirection } from "@elementor/ui";
|
|
1166
1164
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1167
|
-
|
|
1165
|
+
|
|
1166
|
+
// src/hooks/use-direction.ts
|
|
1167
|
+
import { useTheme } from "@elementor/ui";
|
|
1168
|
+
function useDirection() {
|
|
1169
|
+
const theme = useTheme(), extendedWindow = window;
|
|
1170
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
1171
|
+
return { isSiteRtl, isUiRtl };
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1175
|
+
import * as React24 from "react";
|
|
1176
|
+
import { useRef } from "react";
|
|
1177
|
+
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1178
|
+
var CLOCKWISE_ANGLES = {
|
|
1179
|
+
row: 0,
|
|
1180
|
+
column: 90,
|
|
1181
|
+
"row-reverse": 180,
|
|
1182
|
+
"column-reverse": 270
|
|
1183
|
+
};
|
|
1184
|
+
var COUNTER_CLOCKWISE_ANGLES = {
|
|
1185
|
+
row: 0,
|
|
1186
|
+
column: -90,
|
|
1187
|
+
"row-reverse": -180,
|
|
1188
|
+
"column-reverse": -270
|
|
1189
|
+
};
|
|
1190
|
+
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1191
|
+
const rotate = useRef(useGetTargetAngle(isClockwise, offset));
|
|
1192
|
+
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1193
|
+
return /* @__PURE__ */ React24.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1194
|
+
};
|
|
1195
|
+
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1196
|
+
const [direction] = useStylesField("flex-direction");
|
|
1197
|
+
const isRtl = "rtl" === useTheme2().direction;
|
|
1198
|
+
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1199
|
+
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1200
|
+
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
1201
|
+
const targetAngle = angleMap[direction?.value || "row"] + offset;
|
|
1202
|
+
const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
|
|
1203
|
+
const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
|
|
1204
|
+
return (currentAngle + formattedDiff) * rotationMultiplier;
|
|
1205
|
+
};
|
|
1206
|
+
|
|
1207
|
+
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1208
|
+
var StartStartIcon = withDirection(RadiusTopLeftIcon);
|
|
1209
|
+
var StartEndIcon = withDirection(RadiusTopRightIcon);
|
|
1210
|
+
var EndStartIcon = withDirection(RadiusBottomLeftIcon);
|
|
1211
|
+
var EndEndIcon = withDirection(RadiusBottomRightIcon);
|
|
1212
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? __9("Top right", "elementor") : __9("Top left", "elementor");
|
|
1213
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? __9("Top left", "elementor") : __9("Top right", "elementor");
|
|
1214
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? __9("Bottom right", "elementor") : __9("Bottom left", "elementor");
|
|
1215
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? __9("Bottom left", "elementor") : __9("Bottom right", "elementor");
|
|
1216
|
+
var getCorners = (isSiteRtl) => [
|
|
1168
1217
|
{
|
|
1169
|
-
label:
|
|
1170
|
-
icon: /* @__PURE__ */
|
|
1171
|
-
bind: "
|
|
1218
|
+
label: getStartStartLabel(isSiteRtl),
|
|
1219
|
+
icon: /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: StartStartIcon, size: "tiny" }),
|
|
1220
|
+
bind: "start-start"
|
|
1172
1221
|
},
|
|
1173
1222
|
{
|
|
1174
|
-
label:
|
|
1175
|
-
icon: /* @__PURE__ */
|
|
1176
|
-
bind: "
|
|
1223
|
+
label: getStartEndLabel(isSiteRtl),
|
|
1224
|
+
icon: /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: StartEndIcon, size: "tiny" }),
|
|
1225
|
+
bind: "start-end"
|
|
1177
1226
|
},
|
|
1178
1227
|
{
|
|
1179
|
-
label:
|
|
1180
|
-
icon: /* @__PURE__ */
|
|
1181
|
-
bind: "
|
|
1228
|
+
label: getEndEndLabel(isSiteRtl),
|
|
1229
|
+
icon: /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: EndEndIcon, size: "tiny" }),
|
|
1230
|
+
bind: "end-end"
|
|
1182
1231
|
},
|
|
1183
1232
|
{
|
|
1184
|
-
label:
|
|
1185
|
-
icon: /* @__PURE__ */
|
|
1186
|
-
bind: "
|
|
1233
|
+
label: getEndStartLabel(isSiteRtl),
|
|
1234
|
+
icon: /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: EndStartIcon, size: "tiny" }),
|
|
1235
|
+
bind: "end-start"
|
|
1187
1236
|
}
|
|
1188
1237
|
];
|
|
1189
1238
|
var BorderRadiusField = () => {
|
|
1190
|
-
|
|
1239
|
+
const { isSiteRtl } = useDirection();
|
|
1240
|
+
return /* @__PURE__ */ React25.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React25.createElement(
|
|
1191
1241
|
EqualUnequalSizesControl2,
|
|
1192
1242
|
{
|
|
1193
|
-
items:
|
|
1194
|
-
label: __9("Border
|
|
1195
|
-
icon: /* @__PURE__ */
|
|
1243
|
+
items: getCorners(isSiteRtl),
|
|
1244
|
+
label: __9("Border radius", "elementor"),
|
|
1245
|
+
icon: /* @__PURE__ */ React25.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
1196
1246
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
1197
1247
|
}
|
|
1198
1248
|
));
|
|
1199
1249
|
};
|
|
1200
1250
|
|
|
1201
1251
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1202
|
-
var BorderSection = () => /* @__PURE__ */
|
|
1252
|
+
var BorderSection = () => /* @__PURE__ */ React26.createElement(Stack6, { gap: 1.5 }, /* @__PURE__ */ React26.createElement(BorderRadiusField, null), /* @__PURE__ */ React26.createElement(PanelDivider, null), /* @__PURE__ */ React26.createElement(BorderField, null));
|
|
1203
1253
|
|
|
1204
1254
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
1205
|
-
import * as
|
|
1255
|
+
import * as React27 from "react";
|
|
1206
1256
|
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
1207
1257
|
import { Stack as Stack7 } from "@elementor/ui";
|
|
1208
1258
|
var EffectsSection = () => {
|
|
1209
|
-
return /* @__PURE__ */
|
|
1259
|
+
return /* @__PURE__ */ React27.createElement(Stack7, { gap: 1.5 }, /* @__PURE__ */ React27.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React27.createElement(BoxShadowRepeaterControl, null)));
|
|
1210
1260
|
};
|
|
1211
1261
|
|
|
1212
1262
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1213
|
-
import * as
|
|
1263
|
+
import * as React37 from "react";
|
|
1214
1264
|
import { ControlLabel as ControlLabel13 } from "@elementor/editor-controls";
|
|
1215
1265
|
import { useParentElement } from "@elementor/editor-elements";
|
|
1216
|
-
import {
|
|
1266
|
+
import { Stack as Stack13 } from "@elementor/ui";
|
|
1217
1267
|
import { __ as __19 } from "@wordpress/i18n";
|
|
1218
1268
|
|
|
1219
1269
|
// src/hooks/use-computed-style.ts
|
|
@@ -1242,7 +1292,7 @@ function useComputedStyle(elementId) {
|
|
|
1242
1292
|
}
|
|
1243
1293
|
|
|
1244
1294
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1245
|
-
import * as
|
|
1295
|
+
import * as React28 from "react";
|
|
1246
1296
|
import { ControlLabel as ControlLabel5, ToggleControl } from "@elementor/editor-controls";
|
|
1247
1297
|
import {
|
|
1248
1298
|
LayoutAlignCenterIcon as CenterIcon,
|
|
@@ -1250,53 +1300,10 @@ import {
|
|
|
1250
1300
|
LayoutAlignRightIcon,
|
|
1251
1301
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
1252
1302
|
} from "@elementor/icons";
|
|
1253
|
-
import { DirectionProvider, Grid as Grid3, ThemeProvider, withDirection } from "@elementor/ui";
|
|
1303
|
+
import { DirectionProvider, Grid as Grid3, ThemeProvider, withDirection as withDirection2 } from "@elementor/ui";
|
|
1254
1304
|
import { __ as __10 } from "@wordpress/i18n";
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
import { useTheme } from "@elementor/ui";
|
|
1258
|
-
function useDirection() {
|
|
1259
|
-
const theme = useTheme(), extendedWindow = window;
|
|
1260
|
-
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
1261
|
-
return { isSiteRtl, isUiRtl };
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1265
|
-
import * as React26 from "react";
|
|
1266
|
-
import { useRef } from "react";
|
|
1267
|
-
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1268
|
-
var CLOCKWISE_ANGLES = {
|
|
1269
|
-
row: 0,
|
|
1270
|
-
column: 90,
|
|
1271
|
-
"row-reverse": 180,
|
|
1272
|
-
"column-reverse": 270
|
|
1273
|
-
};
|
|
1274
|
-
var COUNTER_CLOCKWISE_ANGLES = {
|
|
1275
|
-
row: 0,
|
|
1276
|
-
column: -90,
|
|
1277
|
-
"row-reverse": -180,
|
|
1278
|
-
"column-reverse": -270
|
|
1279
|
-
};
|
|
1280
|
-
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1281
|
-
const rotate = useRef(useGetTargetAngle(isClockwise, offset));
|
|
1282
|
-
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1283
|
-
return /* @__PURE__ */ React26.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1284
|
-
};
|
|
1285
|
-
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1286
|
-
const [direction] = useStylesField("flex-direction");
|
|
1287
|
-
const isRtl = "rtl" === useTheme2().direction;
|
|
1288
|
-
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1289
|
-
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1290
|
-
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
1291
|
-
const targetAngle = angleMap[direction?.value || "row"] + offset;
|
|
1292
|
-
const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
|
|
1293
|
-
const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
|
|
1294
|
-
return (currentAngle + formattedDiff) * rotationMultiplier;
|
|
1295
|
-
};
|
|
1296
|
-
|
|
1297
|
-
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1298
|
-
var StartIcon = withDirection(LayoutAlignLeftIcon);
|
|
1299
|
-
var EndIcon = withDirection(LayoutAlignRightIcon);
|
|
1305
|
+
var StartIcon = withDirection2(LayoutAlignLeftIcon);
|
|
1306
|
+
var EndIcon = withDirection2(LayoutAlignRightIcon);
|
|
1300
1307
|
var iconProps = {
|
|
1301
1308
|
isClockwise: false,
|
|
1302
1309
|
offset: 90
|
|
@@ -1305,35 +1312,35 @@ var options = [
|
|
|
1305
1312
|
{
|
|
1306
1313
|
value: "start",
|
|
1307
1314
|
label: __10("Start", "elementor"),
|
|
1308
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1315
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1309
1316
|
showTooltip: true
|
|
1310
1317
|
},
|
|
1311
1318
|
{
|
|
1312
1319
|
value: "center",
|
|
1313
1320
|
label: __10("Center", "elementor"),
|
|
1314
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1321
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
1315
1322
|
showTooltip: true
|
|
1316
1323
|
},
|
|
1317
1324
|
{
|
|
1318
1325
|
value: "end",
|
|
1319
1326
|
label: __10("End", "elementor"),
|
|
1320
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1327
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1321
1328
|
showTooltip: true
|
|
1322
1329
|
},
|
|
1323
1330
|
{
|
|
1324
1331
|
value: "stretch",
|
|
1325
1332
|
label: __10("Stretch", "elementor"),
|
|
1326
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1333
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps }),
|
|
1327
1334
|
showTooltip: true
|
|
1328
1335
|
}
|
|
1329
1336
|
];
|
|
1330
1337
|
var AlignItemsField = () => {
|
|
1331
1338
|
const { isSiteRtl } = useDirection();
|
|
1332
|
-
return /* @__PURE__ */
|
|
1339
|
+
return /* @__PURE__ */ React28.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React28.createElement(ThemeProvider, null, /* @__PURE__ */ React28.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React28.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel5, null, __10("Align items", "elementor"))), /* @__PURE__ */ React28.createElement(Grid3, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React28.createElement(ToggleControl, { options }))))));
|
|
1333
1340
|
};
|
|
1334
1341
|
|
|
1335
1342
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
1336
|
-
import * as
|
|
1343
|
+
import * as React29 from "react";
|
|
1337
1344
|
import { ControlLabel as ControlLabel6, ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
1338
1345
|
import {
|
|
1339
1346
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
@@ -1341,10 +1348,10 @@ import {
|
|
|
1341
1348
|
LayoutAlignRightIcon as LayoutAlignRightIcon2,
|
|
1342
1349
|
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
1343
1350
|
} from "@elementor/icons";
|
|
1344
|
-
import { DirectionProvider as DirectionProvider2, Grid as Grid4, ThemeProvider as ThemeProvider2, withDirection as
|
|
1351
|
+
import { DirectionProvider as DirectionProvider2, Grid as Grid4, ThemeProvider as ThemeProvider2, withDirection as withDirection3 } from "@elementor/ui";
|
|
1345
1352
|
import { __ as __11 } from "@wordpress/i18n";
|
|
1346
|
-
var StartIcon2 =
|
|
1347
|
-
var EndIcon2 =
|
|
1353
|
+
var StartIcon2 = withDirection3(LayoutAlignLeftIcon2);
|
|
1354
|
+
var EndIcon2 = withDirection3(LayoutAlignRightIcon2);
|
|
1348
1355
|
var iconProps2 = {
|
|
1349
1356
|
isClockwise: false,
|
|
1350
1357
|
offset: 90
|
|
@@ -1353,40 +1360,40 @@ var options2 = [
|
|
|
1353
1360
|
{
|
|
1354
1361
|
value: "start",
|
|
1355
1362
|
label: __11("Start", "elementor"),
|
|
1356
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1363
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
1357
1364
|
showTooltip: true
|
|
1358
1365
|
},
|
|
1359
1366
|
{
|
|
1360
1367
|
value: "center",
|
|
1361
1368
|
label: __11("Center", "elementor"),
|
|
1362
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1369
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
1363
1370
|
showTooltip: true
|
|
1364
1371
|
},
|
|
1365
1372
|
{
|
|
1366
1373
|
value: "end",
|
|
1367
1374
|
label: __11("End", "elementor"),
|
|
1368
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1375
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
1369
1376
|
showTooltip: true
|
|
1370
1377
|
},
|
|
1371
1378
|
{
|
|
1372
1379
|
value: "stretch",
|
|
1373
1380
|
label: __11("Stretch", "elementor"),
|
|
1374
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1381
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: JustifyIcon2, size, ...iconProps2 }),
|
|
1375
1382
|
showTooltip: true
|
|
1376
1383
|
}
|
|
1377
1384
|
];
|
|
1378
1385
|
var AlignSelfChild = () => {
|
|
1379
1386
|
const { isSiteRtl } = useDirection();
|
|
1380
|
-
return /* @__PURE__ */
|
|
1387
|
+
return /* @__PURE__ */ React29.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React29.createElement(ThemeProvider2, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React29.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React29.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(ControlLabel6, null, __11("Align self", "elementor"))), /* @__PURE__ */ React29.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React29.createElement(ToggleControl2, { options: options2 }))))));
|
|
1381
1388
|
};
|
|
1382
1389
|
|
|
1383
1390
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
1384
|
-
import * as
|
|
1391
|
+
import * as React30 from "react";
|
|
1385
1392
|
import { ControlLabel as ControlLabel7, ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
1386
1393
|
import { Stack as Stack8 } from "@elementor/ui";
|
|
1387
1394
|
import { __ as __12 } from "@wordpress/i18n";
|
|
1388
1395
|
var DisplayField = () => {
|
|
1389
|
-
const
|
|
1396
|
+
const options11 = [
|
|
1390
1397
|
{
|
|
1391
1398
|
value: "block",
|
|
1392
1399
|
renderContent: () => __12("Block", "elementor"),
|
|
@@ -1406,54 +1413,54 @@ var DisplayField = () => {
|
|
|
1406
1413
|
showTooltip: true
|
|
1407
1414
|
}
|
|
1408
1415
|
];
|
|
1409
|
-
return /* @__PURE__ */
|
|
1416
|
+
return /* @__PURE__ */ React30.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React30.createElement(Stack8, { gap: 1 }, /* @__PURE__ */ React30.createElement(ControlLabel7, null, __12("Display", "elementor")), /* @__PURE__ */ React30.createElement(ToggleControl3, { options: options11, fullWidth: true })));
|
|
1410
1417
|
};
|
|
1411
1418
|
|
|
1412
1419
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1413
|
-
import * as
|
|
1420
|
+
import * as React31 from "react";
|
|
1414
1421
|
import { ControlLabel as ControlLabel8, ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
1415
1422
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
1416
|
-
import { DirectionProvider as DirectionProvider3, Grid as Grid5, ThemeProvider as ThemeProvider3, withDirection as
|
|
1423
|
+
import { DirectionProvider as DirectionProvider3, Grid as Grid5, ThemeProvider as ThemeProvider3, withDirection as withDirection4 } from "@elementor/ui";
|
|
1417
1424
|
import { __ as __13 } from "@wordpress/i18n";
|
|
1418
1425
|
var options3 = [
|
|
1419
1426
|
{
|
|
1420
1427
|
value: "row",
|
|
1421
1428
|
label: __13("Row", "elementor"),
|
|
1422
1429
|
renderContent: ({ size }) => {
|
|
1423
|
-
const StartIcon5 =
|
|
1424
|
-
return /* @__PURE__ */
|
|
1430
|
+
const StartIcon5 = withDirection4(ArrowRightIcon);
|
|
1431
|
+
return /* @__PURE__ */ React31.createElement(StartIcon5, { fontSize: size });
|
|
1425
1432
|
},
|
|
1426
1433
|
showTooltip: true
|
|
1427
1434
|
},
|
|
1428
1435
|
{
|
|
1429
1436
|
value: "column",
|
|
1430
1437
|
label: __13("Column", "elementor"),
|
|
1431
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1438
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
1432
1439
|
showTooltip: true
|
|
1433
1440
|
},
|
|
1434
1441
|
{
|
|
1435
1442
|
value: "row-reverse",
|
|
1436
1443
|
label: __13("Reversed row", "elementor"),
|
|
1437
1444
|
renderContent: ({ size }) => {
|
|
1438
|
-
const EndIcon5 =
|
|
1439
|
-
return /* @__PURE__ */
|
|
1445
|
+
const EndIcon5 = withDirection4(ArrowLeftIcon);
|
|
1446
|
+
return /* @__PURE__ */ React31.createElement(EndIcon5, { fontSize: size });
|
|
1440
1447
|
},
|
|
1441
1448
|
showTooltip: true
|
|
1442
1449
|
},
|
|
1443
1450
|
{
|
|
1444
1451
|
value: "column-reverse",
|
|
1445
1452
|
label: __13("Reversed column", "elementor"),
|
|
1446
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1453
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
1447
1454
|
showTooltip: true
|
|
1448
1455
|
}
|
|
1449
1456
|
];
|
|
1450
1457
|
var FlexDirectionField = () => {
|
|
1451
1458
|
const { isSiteRtl } = useDirection();
|
|
1452
|
-
return /* @__PURE__ */
|
|
1459
|
+
return /* @__PURE__ */ React31.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(ThemeProvider3, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React31.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel8, null, __13("Direction", "elementor"))), /* @__PURE__ */ React31.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(ToggleControl4, { options: options3 }))))));
|
|
1453
1460
|
};
|
|
1454
1461
|
|
|
1455
1462
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1456
|
-
import * as
|
|
1463
|
+
import * as React32 from "react";
|
|
1457
1464
|
import { useState as useState4 } from "react";
|
|
1458
1465
|
import {
|
|
1459
1466
|
ControlLabel as ControlLabel9,
|
|
@@ -1476,19 +1483,19 @@ var items = [
|
|
|
1476
1483
|
{
|
|
1477
1484
|
value: FIRST,
|
|
1478
1485
|
label: __14("First", "elementor"),
|
|
1479
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1486
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
1480
1487
|
showTooltip: true
|
|
1481
1488
|
},
|
|
1482
1489
|
{
|
|
1483
1490
|
value: LAST,
|
|
1484
1491
|
label: __14("Last", "elementor"),
|
|
1485
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1492
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
1486
1493
|
showTooltip: true
|
|
1487
1494
|
},
|
|
1488
1495
|
{
|
|
1489
1496
|
value: CUSTOM,
|
|
1490
1497
|
label: __14("Custom", "elementor"),
|
|
1491
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1498
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(PencilIcon, { fontSize: size }),
|
|
1492
1499
|
showTooltip: true
|
|
1493
1500
|
}
|
|
1494
1501
|
];
|
|
@@ -1503,7 +1510,7 @@ var FlexOrderField = () => {
|
|
|
1503
1510
|
}
|
|
1504
1511
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1505
1512
|
};
|
|
1506
|
-
return /* @__PURE__ */
|
|
1513
|
+
return /* @__PURE__ */ React32.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(ThemeProvider4, null, /* @__PURE__ */ React32.createElement(Stack9, { gap: 2 }, /* @__PURE__ */ React32.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel9, null, __14("Order", "elementor"))), /* @__PURE__ */ React32.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(
|
|
1507
1514
|
ControlToggleButtonGroup,
|
|
1508
1515
|
{
|
|
1509
1516
|
items,
|
|
@@ -1511,7 +1518,7 @@ var FlexOrderField = () => {
|
|
|
1511
1518
|
onChange: handleToggleButtonChange,
|
|
1512
1519
|
exclusive: true
|
|
1513
1520
|
}
|
|
1514
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
1521
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React32.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React32.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel9, null, __14("Custom order", "elementor"))), /* @__PURE__ */ React32.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(
|
|
1515
1522
|
NumberControl,
|
|
1516
1523
|
{
|
|
1517
1524
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -1531,7 +1538,7 @@ var getGroupControlValue = (order) => {
|
|
|
1531
1538
|
};
|
|
1532
1539
|
|
|
1533
1540
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1534
|
-
import * as
|
|
1541
|
+
import * as React33 from "react";
|
|
1535
1542
|
import { useMemo as useMemo2, useState as useState5 } from "react";
|
|
1536
1543
|
import {
|
|
1537
1544
|
ControlLabel as ControlLabel10,
|
|
@@ -1547,19 +1554,19 @@ var items2 = [
|
|
|
1547
1554
|
{
|
|
1548
1555
|
value: "flex-grow",
|
|
1549
1556
|
label: __15("Grow", "elementor"),
|
|
1550
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1557
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(ExpandIcon, { fontSize: size }),
|
|
1551
1558
|
showTooltip: true
|
|
1552
1559
|
},
|
|
1553
1560
|
{
|
|
1554
1561
|
value: "flex-shrink",
|
|
1555
1562
|
label: __15("Shrink", "elementor"),
|
|
1556
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1563
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(ShrinkIcon, { fontSize: size }),
|
|
1557
1564
|
showTooltip: true
|
|
1558
1565
|
},
|
|
1559
1566
|
{
|
|
1560
1567
|
value: "custom",
|
|
1561
1568
|
label: __15("Custom", "elementor"),
|
|
1562
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1569
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(PencilIcon2, { fontSize: size }),
|
|
1563
1570
|
showTooltip: true
|
|
1564
1571
|
}
|
|
1565
1572
|
];
|
|
@@ -1583,7 +1590,7 @@ var FlexSizeField = () => {
|
|
|
1583
1590
|
setGrowField(null);
|
|
1584
1591
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1585
1592
|
};
|
|
1586
|
-
return /* @__PURE__ */
|
|
1593
|
+
return /* @__PURE__ */ React33.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React33.createElement(ThemeProvider5, null, /* @__PURE__ */ React33.createElement(Stack10, { gap: 2 }, /* @__PURE__ */ React33.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel10, null, __15("Size", "elementor"))), /* @__PURE__ */ React33.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React33.createElement(
|
|
1587
1594
|
ControlToggleButtonGroup2,
|
|
1588
1595
|
{
|
|
1589
1596
|
value: activeGroup,
|
|
@@ -1591,9 +1598,9 @@ var FlexSizeField = () => {
|
|
|
1591
1598
|
items: items2,
|
|
1592
1599
|
exclusive: true
|
|
1593
1600
|
}
|
|
1594
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
1601
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React33.createElement(FlexCustomField, null))));
|
|
1595
1602
|
};
|
|
1596
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
1603
|
+
var FlexCustomField = () => /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React33.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel10, null, __15("Grow", "elementor"))), /* @__PURE__ */ React33.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React33.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React33.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React33.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel10, null, __15("Shrink", "elementor"))), /* @__PURE__ */ React33.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React33.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React33.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React33.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel10, null, __15("Basis", "elementor"))), /* @__PURE__ */ React33.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React33.createElement(SizeControl2, null)))));
|
|
1597
1604
|
var getActiveGroup = ({
|
|
1598
1605
|
grow,
|
|
1599
1606
|
shrink,
|
|
@@ -1615,16 +1622,16 @@ var getActiveGroup = ({
|
|
|
1615
1622
|
};
|
|
1616
1623
|
|
|
1617
1624
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1618
|
-
import * as
|
|
1625
|
+
import * as React34 from "react";
|
|
1619
1626
|
import { GapControl } from "@elementor/editor-controls";
|
|
1620
1627
|
import { Stack as Stack11 } from "@elementor/ui";
|
|
1621
1628
|
import { __ as __16 } from "@wordpress/i18n";
|
|
1622
1629
|
var GapControlField = () => {
|
|
1623
|
-
return /* @__PURE__ */
|
|
1630
|
+
return /* @__PURE__ */ React34.createElement(Stack11, { gap: 1 }, /* @__PURE__ */ React34.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React34.createElement(GapControl, { label: __16("Gaps", "elementor") })));
|
|
1624
1631
|
};
|
|
1625
1632
|
|
|
1626
1633
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
1627
|
-
import * as
|
|
1634
|
+
import * as React35 from "react";
|
|
1628
1635
|
import { ControlLabel as ControlLabel11, ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
1629
1636
|
import {
|
|
1630
1637
|
JustifyBottomIcon,
|
|
@@ -1634,10 +1641,10 @@ import {
|
|
|
1634
1641
|
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
1635
1642
|
JustifyTopIcon
|
|
1636
1643
|
} from "@elementor/icons";
|
|
1637
|
-
import { DirectionProvider as DirectionProvider6, Stack as Stack12, ThemeProvider as ThemeProvider6, withDirection as
|
|
1644
|
+
import { DirectionProvider as DirectionProvider6, Stack as Stack12, ThemeProvider as ThemeProvider6, withDirection as withDirection5 } from "@elementor/ui";
|
|
1638
1645
|
import { __ as __17 } from "@wordpress/i18n";
|
|
1639
|
-
var StartIcon3 =
|
|
1640
|
-
var EndIcon3 =
|
|
1646
|
+
var StartIcon3 = withDirection5(JustifyTopIcon);
|
|
1647
|
+
var EndIcon3 = withDirection5(JustifyBottomIcon);
|
|
1641
1648
|
var iconProps3 = {
|
|
1642
1649
|
isClockwise: true,
|
|
1643
1650
|
offset: -90
|
|
@@ -1646,47 +1653,47 @@ var options4 = [
|
|
|
1646
1653
|
{
|
|
1647
1654
|
value: "start",
|
|
1648
1655
|
label: __17("Start", "elementor"),
|
|
1649
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1656
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1650
1657
|
showTooltip: true
|
|
1651
1658
|
},
|
|
1652
1659
|
{
|
|
1653
1660
|
value: "center",
|
|
1654
1661
|
label: __17("Center", "elementor"),
|
|
1655
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1662
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: CenterIcon3, size, ...iconProps3 }),
|
|
1656
1663
|
showTooltip: true
|
|
1657
1664
|
},
|
|
1658
1665
|
{
|
|
1659
1666
|
value: "end",
|
|
1660
1667
|
label: __17("End", "elementor"),
|
|
1661
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1668
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1662
1669
|
showTooltip: true
|
|
1663
1670
|
},
|
|
1664
1671
|
{
|
|
1665
1672
|
value: "space-between",
|
|
1666
1673
|
label: __17("Space between", "elementor"),
|
|
1667
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1674
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps3 }),
|
|
1668
1675
|
showTooltip: true
|
|
1669
1676
|
},
|
|
1670
1677
|
{
|
|
1671
1678
|
value: "space-around",
|
|
1672
1679
|
label: __17("Space around", "elementor"),
|
|
1673
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1680
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps3 }),
|
|
1674
1681
|
showTooltip: true
|
|
1675
1682
|
},
|
|
1676
1683
|
{
|
|
1677
1684
|
value: "space-evenly",
|
|
1678
1685
|
label: __17("Space evenly", "elementor"),
|
|
1679
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1686
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps3 }),
|
|
1680
1687
|
showTooltip: true
|
|
1681
1688
|
}
|
|
1682
1689
|
];
|
|
1683
1690
|
var JustifyContentField = () => {
|
|
1684
1691
|
const { isSiteRtl } = useDirection();
|
|
1685
|
-
return /* @__PURE__ */
|
|
1692
|
+
return /* @__PURE__ */ React35.createElement(DirectionProvider6, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(ThemeProvider6, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React35.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React35.createElement(ControlLabel11, null, __17("Justify content", "elementor")), /* @__PURE__ */ React35.createElement(ToggleControl5, { options: options4, fullWidth: true })))));
|
|
1686
1693
|
};
|
|
1687
1694
|
|
|
1688
1695
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1689
|
-
import * as
|
|
1696
|
+
import * as React36 from "react";
|
|
1690
1697
|
import { ControlLabel as ControlLabel12, ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
1691
1698
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
1692
1699
|
import { DirectionProvider as DirectionProvider7, Grid as Grid8, ThemeProvider as ThemeProvider7 } from "@elementor/ui";
|
|
@@ -1695,25 +1702,25 @@ var options5 = [
|
|
|
1695
1702
|
{
|
|
1696
1703
|
value: "nowrap",
|
|
1697
1704
|
label: __18("No wrap", "elementor"),
|
|
1698
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1705
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
1699
1706
|
showTooltip: true
|
|
1700
1707
|
},
|
|
1701
1708
|
{
|
|
1702
1709
|
value: "wrap",
|
|
1703
1710
|
label: __18("Wrap", "elementor"),
|
|
1704
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1711
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ArrowBackIcon, { fontSize: size }),
|
|
1705
1712
|
showTooltip: true
|
|
1706
1713
|
},
|
|
1707
1714
|
{
|
|
1708
1715
|
value: "wrap-reverse",
|
|
1709
1716
|
label: __18("Reversed wrap", "elementor"),
|
|
1710
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1717
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
1711
1718
|
showTooltip: true
|
|
1712
1719
|
}
|
|
1713
1720
|
];
|
|
1714
1721
|
var WrapField = () => {
|
|
1715
1722
|
const { isSiteRtl } = useDirection();
|
|
1716
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ React36.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(ThemeProvider7, null, /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React36.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel12, null, __18("Wrap", "elementor"))), /* @__PURE__ */ React36.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React36.createElement(ToggleControl6, { options: options5 }))))));
|
|
1717
1724
|
};
|
|
1718
1725
|
|
|
1719
1726
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -1722,37 +1729,37 @@ var LayoutSection = () => {
|
|
|
1722
1729
|
const { element } = useElement();
|
|
1723
1730
|
const parent = useParentElement(element.id);
|
|
1724
1731
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
1725
|
-
return /* @__PURE__ */
|
|
1732
|
+
return /* @__PURE__ */ React37.createElement(Stack13, { gap: 2 }, /* @__PURE__ */ React37.createElement(DisplayField, null), "flex" === display?.value && /* @__PURE__ */ React37.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React37.createElement(FlexChildFields, null));
|
|
1726
1733
|
};
|
|
1727
|
-
var FlexFields = () => /* @__PURE__ */
|
|
1728
|
-
var FlexChildFields = () => /* @__PURE__ */
|
|
1734
|
+
var FlexFields = () => /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(FlexDirectionField, null), /* @__PURE__ */ React37.createElement(JustifyContentField, null), /* @__PURE__ */ React37.createElement(AlignItemsField, null), /* @__PURE__ */ React37.createElement(PanelDivider, null), /* @__PURE__ */ React37.createElement(GapControlField, null), /* @__PURE__ */ React37.createElement(WrapField, null));
|
|
1735
|
+
var FlexChildFields = () => /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(PanelDivider, null), /* @__PURE__ */ React37.createElement(ControlLabel13, null, __19("Flex child", "elementor")), /* @__PURE__ */ React37.createElement(AlignSelfChild, null), /* @__PURE__ */ React37.createElement(FlexOrderField, null), /* @__PURE__ */ React37.createElement(FlexSizeField, null));
|
|
1729
1736
|
|
|
1730
1737
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1731
|
-
import * as
|
|
1738
|
+
import * as React41 from "react";
|
|
1732
1739
|
import { useSessionStorage } from "@elementor/session";
|
|
1733
1740
|
import { Stack as Stack15 } from "@elementor/ui";
|
|
1734
1741
|
|
|
1735
1742
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1736
|
-
import * as
|
|
1743
|
+
import * as React38 from "react";
|
|
1737
1744
|
import { ControlLabel as ControlLabel14, SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
1738
1745
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
1739
1746
|
import { Grid as Grid9, Stack as Stack14 } from "@elementor/ui";
|
|
1740
1747
|
import { __ as __20 } from "@wordpress/i18n";
|
|
1741
1748
|
var sideIcons = {
|
|
1742
|
-
left: /* @__PURE__ */
|
|
1743
|
-
right: /* @__PURE__ */
|
|
1744
|
-
top: /* @__PURE__ */
|
|
1745
|
-
bottom: /* @__PURE__ */
|
|
1749
|
+
left: /* @__PURE__ */ React38.createElement(SideLeftIcon2, { fontSize: "tiny" }),
|
|
1750
|
+
right: /* @__PURE__ */ React38.createElement(SideRightIcon2, { fontSize: "tiny" }),
|
|
1751
|
+
top: /* @__PURE__ */ React38.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
1752
|
+
bottom: /* @__PURE__ */ React38.createElement(SideBottomIcon2, { fontSize: "tiny" })
|
|
1746
1753
|
};
|
|
1747
1754
|
var DimensionsField = () => {
|
|
1748
|
-
return /* @__PURE__ */
|
|
1755
|
+
return /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(Stack14, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(DimensionField, { side: "top", label: __20("Top", "elementor") }), /* @__PURE__ */ React38.createElement(DimensionField, { side: "right", label: __20("Right", "elementor") })), /* @__PURE__ */ React38.createElement(Stack14, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(DimensionField, { side: "bottom", label: __20("Bottom", "elementor") }), /* @__PURE__ */ React38.createElement(DimensionField, { side: "left", label: __20("Left", "elementor") })));
|
|
1749
1756
|
};
|
|
1750
1757
|
var DimensionField = ({ side, label }) => {
|
|
1751
|
-
return /* @__PURE__ */
|
|
1758
|
+
return /* @__PURE__ */ React38.createElement(Grid9, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React38.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(ControlLabel14, null, label)), /* @__PURE__ */ React38.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(StylesField, { bind: side }, /* @__PURE__ */ React38.createElement(SizeControl3, { startIcon: sideIcons[side] }))));
|
|
1752
1759
|
};
|
|
1753
1760
|
|
|
1754
1761
|
// src/components/style-sections/position-section/position-field.tsx
|
|
1755
|
-
import * as
|
|
1762
|
+
import * as React39 from "react";
|
|
1756
1763
|
import { ControlLabel as ControlLabel15, SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
1757
1764
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
1758
1765
|
import { __ as __21 } from "@wordpress/i18n";
|
|
@@ -1764,16 +1771,16 @@ var positionOptions = [
|
|
|
1764
1771
|
{ label: __21("Sticky", "elementor"), value: "sticky" }
|
|
1765
1772
|
];
|
|
1766
1773
|
var PositionField = ({ onChange }) => {
|
|
1767
|
-
return /* @__PURE__ */
|
|
1774
|
+
return /* @__PURE__ */ React39.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React39.createElement(Grid10, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel15, null, __21("Position", "elementor"))), /* @__PURE__ */ React39.createElement(Grid10, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React39.createElement(SelectControl3, { options: positionOptions, onChange }))));
|
|
1768
1775
|
};
|
|
1769
1776
|
|
|
1770
1777
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1771
|
-
import * as
|
|
1778
|
+
import * as React40 from "react";
|
|
1772
1779
|
import { ControlLabel as ControlLabel16, NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
1773
1780
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
1774
1781
|
import { __ as __22 } from "@wordpress/i18n";
|
|
1775
1782
|
var ZIndexField = () => {
|
|
1776
|
-
return /* @__PURE__ */
|
|
1783
|
+
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React40.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel16, null, __22("Z-Index", "elementor"))), /* @__PURE__ */ React40.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(NumberControl3, null))));
|
|
1777
1784
|
};
|
|
1778
1785
|
|
|
1779
1786
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1805,7 +1812,7 @@ var PositionSection = () => {
|
|
|
1805
1812
|
}
|
|
1806
1813
|
};
|
|
1807
1814
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
1808
|
-
return /* @__PURE__ */
|
|
1815
|
+
return /* @__PURE__ */ React41.createElement(Stack15, { gap: 1.5 }, /* @__PURE__ */ React41.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(DimensionsField, null), /* @__PURE__ */ React41.createElement(ZIndexField, null)) : null);
|
|
1809
1816
|
};
|
|
1810
1817
|
var usePersistDimensions = () => {
|
|
1811
1818
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -1815,13 +1822,13 @@ var usePersistDimensions = () => {
|
|
|
1815
1822
|
};
|
|
1816
1823
|
|
|
1817
1824
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1818
|
-
import * as
|
|
1825
|
+
import * as React43 from "react";
|
|
1819
1826
|
import { ControlLabel as ControlLabel18, SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
1820
|
-
import {
|
|
1827
|
+
import { Grid as Grid13, Stack as Stack16 } from "@elementor/ui";
|
|
1821
1828
|
import { __ as __24 } from "@wordpress/i18n";
|
|
1822
1829
|
|
|
1823
1830
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1824
|
-
import * as
|
|
1831
|
+
import * as React42 from "react";
|
|
1825
1832
|
import { ControlLabel as ControlLabel17, ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
1826
1833
|
import { ExpandBottomIcon, EyeIcon, EyeOffIcon } from "@elementor/icons";
|
|
1827
1834
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
@@ -1830,49 +1837,49 @@ var options6 = [
|
|
|
1830
1837
|
{
|
|
1831
1838
|
value: "visible",
|
|
1832
1839
|
label: __23("Visible", "elementor"),
|
|
1833
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1840
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(EyeIcon, { fontSize: size }),
|
|
1834
1841
|
showTooltip: true
|
|
1835
1842
|
},
|
|
1836
1843
|
{
|
|
1837
1844
|
value: "hidden",
|
|
1838
1845
|
label: __23("Hidden", "elementor"),
|
|
1839
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1846
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(EyeOffIcon, { fontSize: size }),
|
|
1840
1847
|
showTooltip: true
|
|
1841
1848
|
},
|
|
1842
1849
|
{
|
|
1843
1850
|
value: "auto",
|
|
1844
1851
|
label: __23("Auto", "elementor"),
|
|
1845
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1852
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(ExpandBottomIcon, { fontSize: size }),
|
|
1846
1853
|
showTooltip: true
|
|
1847
1854
|
}
|
|
1848
1855
|
];
|
|
1849
1856
|
var OverflowField = () => {
|
|
1850
|
-
return /* @__PURE__ */
|
|
1857
|
+
return /* @__PURE__ */ React42.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React42.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlLabel17, null, __23("Overflow", "elementor"))), /* @__PURE__ */ React42.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React42.createElement(ToggleControl7, { options: options6 }))));
|
|
1851
1858
|
};
|
|
1852
1859
|
|
|
1853
1860
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1854
1861
|
var SizeSection = () => {
|
|
1855
|
-
return /* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ React43.createElement(Stack16, { gap: 1.5 }, /* @__PURE__ */ React43.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(SizeField, { bind: "width", label: __24("Width", "elementor") })), /* @__PURE__ */ React43.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(SizeField, { bind: "height", label: __24("Height", "elementor") }))), /* @__PURE__ */ React43.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(SizeField, { bind: "min-width", label: __24("Min. width", "elementor") })), /* @__PURE__ */ React43.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(SizeField, { bind: "min-height", label: __24("Min. height", "elementor") }))), /* @__PURE__ */ React43.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(SizeField, { bind: "max-width", label: __24("Max. width", "elementor") })), /* @__PURE__ */ React43.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(SizeField, { bind: "max-height", label: __24("Max. height", "elementor") }))), /* @__PURE__ */ React43.createElement(PanelDivider, null), /* @__PURE__ */ React43.createElement(Stack16, null, /* @__PURE__ */ React43.createElement(OverflowField, null)));
|
|
1856
1863
|
};
|
|
1857
1864
|
var SizeField = ({ label, bind }) => {
|
|
1858
|
-
return /* @__PURE__ */
|
|
1865
|
+
return /* @__PURE__ */ React43.createElement(StylesField, { bind }, /* @__PURE__ */ React43.createElement(Grid13, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React43.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(ControlLabel18, null, label)), /* @__PURE__ */ React43.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(SizeControl4, null))));
|
|
1859
1866
|
};
|
|
1860
1867
|
|
|
1861
1868
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
1862
|
-
import * as
|
|
1869
|
+
import * as React44 from "react";
|
|
1863
1870
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
1864
|
-
import {
|
|
1871
|
+
import { Stack as Stack17 } from "@elementor/ui";
|
|
1865
1872
|
import { __ as __25 } from "@wordpress/i18n";
|
|
1866
1873
|
var SpacingSection = () => {
|
|
1867
|
-
return /* @__PURE__ */
|
|
1874
|
+
return /* @__PURE__ */ React44.createElement(Stack17, { gap: 1.5 }, /* @__PURE__ */ React44.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React44.createElement(LinkedDimensionsControl, { label: __25("Padding", "elementor") })), /* @__PURE__ */ React44.createElement(PanelDivider, null), /* @__PURE__ */ React44.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React44.createElement(LinkedDimensionsControl, { label: __25("Margin", "elementor") })));
|
|
1868
1875
|
};
|
|
1869
1876
|
|
|
1870
1877
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1871
|
-
import * as
|
|
1872
|
-
import {
|
|
1878
|
+
import * as React59 from "react";
|
|
1879
|
+
import { Stack as Stack19 } from "@elementor/ui";
|
|
1873
1880
|
|
|
1874
1881
|
// src/components/collapsible-content.tsx
|
|
1875
|
-
import * as
|
|
1882
|
+
import * as React45 from "react";
|
|
1876
1883
|
import { useState as useState6 } from "react";
|
|
1877
1884
|
import { Button, Collapse as Collapse3, Stack as Stack18 } from "@elementor/ui";
|
|
1878
1885
|
import { __ as __26 } from "@wordpress/i18n";
|
|
@@ -1881,7 +1888,7 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1881
1888
|
const handleToggle = () => {
|
|
1882
1889
|
setOpen((prevOpen) => !prevOpen);
|
|
1883
1890
|
};
|
|
1884
|
-
return /* @__PURE__ */
|
|
1891
|
+
return /* @__PURE__ */ React45.createElement(Stack18, { sx: { py: 0.5 } }, /* @__PURE__ */ React45.createElement(
|
|
1885
1892
|
Button,
|
|
1886
1893
|
{
|
|
1887
1894
|
fullWidth: true,
|
|
@@ -1889,14 +1896,14 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1889
1896
|
color: "secondary",
|
|
1890
1897
|
variant: "outlined",
|
|
1891
1898
|
onClick: handleToggle,
|
|
1892
|
-
endIcon: /* @__PURE__ */
|
|
1899
|
+
endIcon: /* @__PURE__ */ React45.createElement(CollapseIcon, { open })
|
|
1893
1900
|
},
|
|
1894
1901
|
open ? __26("Show less", "elementor") : __26("Show more", "elementor")
|
|
1895
|
-
), /* @__PURE__ */
|
|
1902
|
+
), /* @__PURE__ */ React45.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1896
1903
|
};
|
|
1897
1904
|
|
|
1898
1905
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1899
|
-
import * as
|
|
1906
|
+
import * as React46 from "react";
|
|
1900
1907
|
import { ControlLabel as ControlLabel19, FontFamilyControl } from "@elementor/editor-controls";
|
|
1901
1908
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
1902
1909
|
import { __ as __27 } from "@wordpress/i18n";
|
|
@@ -1913,194 +1920,143 @@ var FontFamilyField = () => {
|
|
|
1913
1920
|
if (!fontFamilies) {
|
|
1914
1921
|
return null;
|
|
1915
1922
|
}
|
|
1916
|
-
return /* @__PURE__ */
|
|
1923
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React46.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel19, null, __27("Font family", "elementor"))), /* @__PURE__ */ React46.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React46.createElement(FontFamilyControl, { fontFamilies }))));
|
|
1917
1924
|
};
|
|
1918
1925
|
var getFontFamilies = () => {
|
|
1919
1926
|
const { controls } = getElementorConfig();
|
|
1920
|
-
const
|
|
1921
|
-
if (!
|
|
1927
|
+
const options11 = controls?.font?.options;
|
|
1928
|
+
if (!options11) {
|
|
1922
1929
|
return null;
|
|
1923
1930
|
}
|
|
1924
|
-
return
|
|
1931
|
+
return options11;
|
|
1925
1932
|
};
|
|
1926
1933
|
|
|
1927
1934
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
1928
|
-
import * as
|
|
1935
|
+
import * as React47 from "react";
|
|
1929
1936
|
import { ControlLabel as ControlLabel20, SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
1930
1937
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
1931
1938
|
import { __ as __28 } from "@wordpress/i18n";
|
|
1932
1939
|
var FontSizeField = () => {
|
|
1933
|
-
return /* @__PURE__ */
|
|
1940
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React47.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel20, null, __28("Font size", "elementor"))), /* @__PURE__ */ React47.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(SizeControl5, null))));
|
|
1934
1941
|
};
|
|
1935
1942
|
|
|
1936
|
-
// src/components/style-sections/typography-section/font-
|
|
1937
|
-
import * as
|
|
1938
|
-
import { ControlLabel as ControlLabel21,
|
|
1943
|
+
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
1944
|
+
import * as React48 from "react";
|
|
1945
|
+
import { ControlLabel as ControlLabel21, ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
1946
|
+
import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
1939
1947
|
import { Grid as Grid16 } from "@elementor/ui";
|
|
1940
1948
|
import { __ as __29 } from "@wordpress/i18n";
|
|
1949
|
+
var options7 = [
|
|
1950
|
+
{
|
|
1951
|
+
value: "normal",
|
|
1952
|
+
label: __29("Normal", "elementor"),
|
|
1953
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(MinusIcon2, { fontSize: size }),
|
|
1954
|
+
showTooltip: true
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
value: "italic",
|
|
1958
|
+
label: __29("Italic", "elementor"),
|
|
1959
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(ItalicIcon, { fontSize: size }),
|
|
1960
|
+
showTooltip: true
|
|
1961
|
+
}
|
|
1962
|
+
];
|
|
1963
|
+
var FontStyleField = () => /* @__PURE__ */ React48.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React48.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel21, null, __29("Font Style", "elementor"))), /* @__PURE__ */ React48.createElement(Grid16, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React48.createElement(ToggleControl8, { options: options7 }))));
|
|
1964
|
+
|
|
1965
|
+
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
1966
|
+
import * as React49 from "react";
|
|
1967
|
+
import { ControlLabel as ControlLabel22, SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
1968
|
+
import { Grid as Grid17 } from "@elementor/ui";
|
|
1969
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
1941
1970
|
var fontWeightOptions = [
|
|
1942
|
-
{ value: "100", label:
|
|
1943
|
-
{ value: "200", label:
|
|
1944
|
-
{ value: "300", label:
|
|
1945
|
-
{ value: "400", label:
|
|
1946
|
-
{ value: "500", label:
|
|
1947
|
-
{ value: "600", label:
|
|
1948
|
-
{ value: "700", label:
|
|
1949
|
-
{ value: "800", label:
|
|
1950
|
-
{ value: "900", label:
|
|
1971
|
+
{ value: "100", label: __30("100 - Thin", "elementor") },
|
|
1972
|
+
{ value: "200", label: __30("200 - Extra Light", "elementor") },
|
|
1973
|
+
{ value: "300", label: __30("300 - Light", "elementor") },
|
|
1974
|
+
{ value: "400", label: __30("400 - Normal", "elementor") },
|
|
1975
|
+
{ value: "500", label: __30("500 - Medium", "elementor") },
|
|
1976
|
+
{ value: "600", label: __30("600 - Semi Bold", "elementor") },
|
|
1977
|
+
{ value: "700", label: __30("700 - Bold", "elementor") },
|
|
1978
|
+
{ value: "800", label: __30("800 - Extra Bold", "elementor") },
|
|
1979
|
+
{ value: "900", label: __30("900 - Black", "elementor") }
|
|
1951
1980
|
];
|
|
1952
1981
|
var FontWeightField = () => {
|
|
1953
|
-
return /* @__PURE__ */
|
|
1982
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React49.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel22, null, __30("Font weight", "elementor"))), /* @__PURE__ */ React49.createElement(Grid17, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React49.createElement(SelectControl4, { options: fontWeightOptions }))));
|
|
1954
1983
|
};
|
|
1955
1984
|
|
|
1956
1985
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
1957
|
-
import * as
|
|
1958
|
-
import { ControlLabel as
|
|
1959
|
-
import { Grid as
|
|
1960
|
-
import { __ as
|
|
1986
|
+
import * as React50 from "react";
|
|
1987
|
+
import { ControlLabel as ControlLabel23, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
1988
|
+
import { Grid as Grid18 } from "@elementor/ui";
|
|
1989
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
1961
1990
|
var LetterSpacingField = () => {
|
|
1962
|
-
return /* @__PURE__ */
|
|
1991
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React50.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ControlLabel23, null, __31("Letter spacing", "elementor"))), /* @__PURE__ */ React50.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeControl6, null))));
|
|
1963
1992
|
};
|
|
1964
1993
|
|
|
1965
1994
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
1966
|
-
import * as
|
|
1967
|
-
import { ControlLabel as
|
|
1968
|
-
import { Grid as
|
|
1969
|
-
import { __ as
|
|
1995
|
+
import * as React51 from "react";
|
|
1996
|
+
import { ControlLabel as ControlLabel24, SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
1997
|
+
import { Grid as Grid19 } from "@elementor/ui";
|
|
1998
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
1970
1999
|
var LineHeightField = () => {
|
|
1971
|
-
return /* @__PURE__ */
|
|
2000
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React51.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel24, null, __32("Line height", "elementor"))), /* @__PURE__ */ React51.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(SizeControl7, null))));
|
|
1972
2001
|
};
|
|
1973
2002
|
|
|
1974
2003
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
1975
|
-
import * as
|
|
1976
|
-
import { ControlLabel as
|
|
2004
|
+
import * as React52 from "react";
|
|
2005
|
+
import { ControlLabel as ControlLabel25, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
1977
2006
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
1978
|
-
import { Grid as
|
|
1979
|
-
import { __ as
|
|
1980
|
-
var StartIcon4 =
|
|
1981
|
-
var EndIcon4 =
|
|
1982
|
-
var
|
|
2007
|
+
import { Grid as Grid20, withDirection as withDirection6 } from "@elementor/ui";
|
|
2008
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
2009
|
+
var StartIcon4 = withDirection6(AlignLeftIcon);
|
|
2010
|
+
var EndIcon4 = withDirection6(AlignRightIcon);
|
|
2011
|
+
var options8 = [
|
|
1983
2012
|
{
|
|
1984
2013
|
value: "start",
|
|
1985
|
-
label:
|
|
1986
|
-
renderContent: () => /* @__PURE__ */
|
|
2014
|
+
label: __33("Start", "elementor"),
|
|
2015
|
+
renderContent: () => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: StartIcon4, size: "tiny" }),
|
|
1987
2016
|
showTooltip: true
|
|
1988
2017
|
},
|
|
1989
2018
|
{
|
|
1990
2019
|
value: "center",
|
|
1991
|
-
label:
|
|
1992
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2020
|
+
label: __33("Center", "elementor"),
|
|
2021
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(AlignCenterIcon, { fontSize: size }),
|
|
1993
2022
|
showTooltip: true
|
|
1994
2023
|
},
|
|
1995
2024
|
{
|
|
1996
2025
|
value: "end",
|
|
1997
|
-
label:
|
|
1998
|
-
renderContent: () => /* @__PURE__ */
|
|
2026
|
+
label: __33("End", "elementor"),
|
|
2027
|
+
renderContent: () => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: EndIcon4, size: "tiny" }),
|
|
1999
2028
|
showTooltip: true
|
|
2000
2029
|
},
|
|
2001
2030
|
{
|
|
2002
2031
|
value: "justify",
|
|
2003
|
-
label:
|
|
2004
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2032
|
+
label: __33("Justify", "elementor"),
|
|
2033
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
2005
2034
|
showTooltip: true
|
|
2006
2035
|
}
|
|
2007
2036
|
];
|
|
2008
2037
|
var TextAlignmentField = () => {
|
|
2009
|
-
return /* @__PURE__ */
|
|
2038
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React52.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel25, null, __33("Alignment", "elementor"))), /* @__PURE__ */ React52.createElement(Grid20, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React52.createElement(ToggleControl9, { options: options8 }))));
|
|
2010
2039
|
};
|
|
2011
2040
|
|
|
2012
2041
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2013
|
-
import * as
|
|
2014
|
-
import { ColorControl as ColorControl2, ControlLabel as
|
|
2015
|
-
import { Grid as Grid20 } from "@elementor/ui";
|
|
2016
|
-
import { __ as __33 } from "@wordpress/i18n";
|
|
2017
|
-
var TextColorField = () => {
|
|
2018
|
-
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React51.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel25, null, __33("Text Color", "elementor"))), /* @__PURE__ */ React51.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ColorControl2, null))));
|
|
2019
|
-
};
|
|
2020
|
-
|
|
2021
|
-
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2022
|
-
import * as React52 from "react";
|
|
2023
|
-
import { ControlLabel as ControlLabel26, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
2024
|
-
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
2042
|
+
import * as React53 from "react";
|
|
2043
|
+
import { ColorControl as ColorControl2, ControlLabel as ControlLabel26 } from "@elementor/editor-controls";
|
|
2025
2044
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
2026
2045
|
import { __ as __34 } from "@wordpress/i18n";
|
|
2027
|
-
var
|
|
2028
|
-
{
|
|
2029
|
-
value: "ltr",
|
|
2030
|
-
label: __34("Left to Right", "elementor"),
|
|
2031
|
-
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(TextDirectionLtrIcon, { fontSize: size })
|
|
2032
|
-
},
|
|
2033
|
-
{
|
|
2034
|
-
value: "rtl",
|
|
2035
|
-
label: __34("Right to Left", "elementor"),
|
|
2036
|
-
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(TextDirectionRtlIcon, { fontSize: size })
|
|
2037
|
-
}
|
|
2038
|
-
];
|
|
2039
|
-
var TextDirectionField = () => {
|
|
2040
|
-
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React52.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel26, null, __34("Direction", "elementor"))), /* @__PURE__ */ React52.createElement(Grid21, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React52.createElement(ToggleControl9, { options: options8 }))));
|
|
2041
|
-
};
|
|
2042
|
-
|
|
2043
|
-
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2044
|
-
import * as React53 from "react";
|
|
2045
|
-
import { StrokeControl } from "@elementor/editor-controls";
|
|
2046
|
-
import { __ as __35 } from "@wordpress/i18n";
|
|
2047
|
-
var initTextStroke = {
|
|
2048
|
-
$$type: "stroke",
|
|
2049
|
-
value: {
|
|
2050
|
-
color: {
|
|
2051
|
-
$$type: "color",
|
|
2052
|
-
value: "#000000"
|
|
2053
|
-
},
|
|
2054
|
-
width: {
|
|
2055
|
-
$$type: "size",
|
|
2056
|
-
value: {
|
|
2057
|
-
unit: "px",
|
|
2058
|
-
size: 1
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
}
|
|
2062
|
-
};
|
|
2063
|
-
var TextStrokeField = () => {
|
|
2064
|
-
const [textStroke, setTextStroke] = useStylesField("-webkit-text-stroke");
|
|
2065
|
-
const addTextStroke = () => {
|
|
2066
|
-
setTextStroke(initTextStroke);
|
|
2067
|
-
};
|
|
2068
|
-
const removeTextStroke = () => {
|
|
2069
|
-
setTextStroke(null);
|
|
2070
|
-
};
|
|
2071
|
-
const hasTextStroke = Boolean(textStroke);
|
|
2072
|
-
return /* @__PURE__ */ React53.createElement(
|
|
2073
|
-
AddOrRemoveContent,
|
|
2074
|
-
{
|
|
2075
|
-
label: __35("Text Stroke", "elementor"),
|
|
2076
|
-
isAdded: hasTextStroke,
|
|
2077
|
-
onAdd: addTextStroke,
|
|
2078
|
-
onRemove: removeTextStroke
|
|
2079
|
-
},
|
|
2080
|
-
/* @__PURE__ */ React53.createElement(StylesField, { bind: "-webkit-text-stroke" }, /* @__PURE__ */ React53.createElement(StrokeControl, null))
|
|
2081
|
-
);
|
|
2046
|
+
var TextColorField = () => {
|
|
2047
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React53.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel26, null, __34("Text color", "elementor"))), /* @__PURE__ */ React53.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ColorControl2, null))));
|
|
2082
2048
|
};
|
|
2083
2049
|
|
|
2084
|
-
// src/components/style-sections/typography-section/text-
|
|
2050
|
+
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
2085
2051
|
import * as React54 from "react";
|
|
2086
2052
|
import { ControlLabel as ControlLabel27 } from "@elementor/editor-controls";
|
|
2087
|
-
import {
|
|
2053
|
+
import { StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
2088
2054
|
import { Grid as Grid22, ToggleButton as ToggleButtonBase, ToggleButtonGroup } from "@elementor/ui";
|
|
2089
|
-
import { __ as
|
|
2055
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
2090
2056
|
var buttonSize = "tiny";
|
|
2091
|
-
var
|
|
2092
|
-
const [fontStyle, setFontStyle] = useStylesField("font-style");
|
|
2057
|
+
var TextDecorationField = () => {
|
|
2093
2058
|
const [textDecoration, setTextDecoration] = useStylesField("text-decoration");
|
|
2094
|
-
const formats = [
|
|
2095
|
-
const handleSetFontStyle = (newValue) => {
|
|
2096
|
-
if (newValue === null) {
|
|
2097
|
-
return setFontStyle(null);
|
|
2098
|
-
}
|
|
2099
|
-
setFontStyle({
|
|
2100
|
-
$$type: "string",
|
|
2101
|
-
value: newValue
|
|
2102
|
-
});
|
|
2103
|
-
};
|
|
2059
|
+
const formats = [...(textDecoration?.value || "").split(" ")];
|
|
2104
2060
|
const handleSetTextDecoration = (newValue) => {
|
|
2105
2061
|
if (newValue === null) {
|
|
2106
2062
|
return setTextDecoration(null);
|
|
@@ -2110,16 +2066,7 @@ var TextStyleField = () => {
|
|
|
2110
2066
|
value: newValue
|
|
2111
2067
|
});
|
|
2112
2068
|
};
|
|
2113
|
-
return /* @__PURE__ */ React54.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel27, null,
|
|
2114
|
-
ToggleButton,
|
|
2115
|
-
{
|
|
2116
|
-
value: "italic",
|
|
2117
|
-
onChange: (v) => handleSetFontStyle(fontStyle?.value === v ? null : v),
|
|
2118
|
-
"aria-label": "italic",
|
|
2119
|
-
sx: { marginLeft: "auto" }
|
|
2120
|
-
},
|
|
2121
|
-
/* @__PURE__ */ React54.createElement(ItalicIcon, { fontSize: buttonSize })
|
|
2122
|
-
), /* @__PURE__ */ React54.createElement(
|
|
2069
|
+
return /* @__PURE__ */ React54.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel27, null, __35("Style", "elementor"))), /* @__PURE__ */ React54.createElement(Grid22, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React54.createElement(ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React54.createElement(
|
|
2123
2070
|
ShorthandControl,
|
|
2124
2071
|
{
|
|
2125
2072
|
value: "line-through",
|
|
@@ -2164,52 +2111,115 @@ var ToggleButton = ({ onChange, ...props }) => {
|
|
|
2164
2111
|
return /* @__PURE__ */ React54.createElement(ToggleButtonBase, { ...props, onChange: handleChange, size: buttonSize });
|
|
2165
2112
|
};
|
|
2166
2113
|
|
|
2167
|
-
// src/components/style-sections/typography-section/
|
|
2114
|
+
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2168
2115
|
import * as React55 from "react";
|
|
2169
2116
|
import { ControlLabel as ControlLabel28, ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
2170
|
-
import {
|
|
2117
|
+
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
2171
2118
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
2172
|
-
import { __ as
|
|
2119
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
2173
2120
|
var options9 = [
|
|
2121
|
+
{
|
|
2122
|
+
value: "ltr",
|
|
2123
|
+
label: __36("Left to Right", "elementor"),
|
|
2124
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(TextDirectionLtrIcon, { fontSize: size })
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
value: "rtl",
|
|
2128
|
+
label: __36("Right to Left", "elementor"),
|
|
2129
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(TextDirectionRtlIcon, { fontSize: size })
|
|
2130
|
+
}
|
|
2131
|
+
];
|
|
2132
|
+
var TextDirectionField = () => {
|
|
2133
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React55.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel28, null, __36("Direction", "elementor"))), /* @__PURE__ */ React55.createElement(Grid23, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React55.createElement(ToggleControl10, { options: options9 }))));
|
|
2134
|
+
};
|
|
2135
|
+
|
|
2136
|
+
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2137
|
+
import * as React56 from "react";
|
|
2138
|
+
import { StrokeControl } from "@elementor/editor-controls";
|
|
2139
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
2140
|
+
var initTextStroke = {
|
|
2141
|
+
$$type: "stroke",
|
|
2142
|
+
value: {
|
|
2143
|
+
color: {
|
|
2144
|
+
$$type: "color",
|
|
2145
|
+
value: "#000000"
|
|
2146
|
+
},
|
|
2147
|
+
width: {
|
|
2148
|
+
$$type: "size",
|
|
2149
|
+
value: {
|
|
2150
|
+
unit: "px",
|
|
2151
|
+
size: 1
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
};
|
|
2156
|
+
var TextStrokeField = () => {
|
|
2157
|
+
const [textStroke, setTextStroke] = useStylesField("stroke");
|
|
2158
|
+
const addTextStroke = () => {
|
|
2159
|
+
setTextStroke(initTextStroke);
|
|
2160
|
+
};
|
|
2161
|
+
const removeTextStroke = () => {
|
|
2162
|
+
setTextStroke(null);
|
|
2163
|
+
};
|
|
2164
|
+
const hasTextStroke = Boolean(textStroke);
|
|
2165
|
+
return /* @__PURE__ */ React56.createElement(
|
|
2166
|
+
AddOrRemoveContent,
|
|
2167
|
+
{
|
|
2168
|
+
label: __37("Text stroke", "elementor"),
|
|
2169
|
+
isAdded: hasTextStroke,
|
|
2170
|
+
onAdd: addTextStroke,
|
|
2171
|
+
onRemove: removeTextStroke
|
|
2172
|
+
},
|
|
2173
|
+
/* @__PURE__ */ React56.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React56.createElement(StrokeControl, null))
|
|
2174
|
+
);
|
|
2175
|
+
};
|
|
2176
|
+
|
|
2177
|
+
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2178
|
+
import * as React57 from "react";
|
|
2179
|
+
import { ControlLabel as ControlLabel29, ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
2180
|
+
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon3 } from "@elementor/icons";
|
|
2181
|
+
import { Grid as Grid24 } from "@elementor/ui";
|
|
2182
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
2183
|
+
var options10 = [
|
|
2174
2184
|
{
|
|
2175
2185
|
value: "none",
|
|
2176
|
-
label:
|
|
2177
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2186
|
+
label: __38("None", "elementor"),
|
|
2187
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(MinusIcon3, { fontSize: size }),
|
|
2178
2188
|
showTooltip: true
|
|
2179
2189
|
},
|
|
2180
2190
|
{
|
|
2181
2191
|
value: "capitalize",
|
|
2182
|
-
label:
|
|
2183
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2192
|
+
label: __38("Capitalize", "elementor"),
|
|
2193
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(LetterCaseIcon, { fontSize: size }),
|
|
2184
2194
|
showTooltip: true
|
|
2185
2195
|
},
|
|
2186
2196
|
{
|
|
2187
2197
|
value: "uppercase",
|
|
2188
|
-
label:
|
|
2189
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2198
|
+
label: __38("Uppercase", "elementor"),
|
|
2199
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
2190
2200
|
showTooltip: true
|
|
2191
2201
|
},
|
|
2192
2202
|
{
|
|
2193
2203
|
value: "lowercase",
|
|
2194
|
-
label:
|
|
2195
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2204
|
+
label: __38("Lowercase", "elementor"),
|
|
2205
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
2196
2206
|
showTooltip: true
|
|
2197
2207
|
}
|
|
2198
2208
|
];
|
|
2199
|
-
var TransformField = () => /* @__PURE__ */
|
|
2209
|
+
var TransformField = () => /* @__PURE__ */ React57.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React57.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel29, null, __38("Text transform", "elementor"))), /* @__PURE__ */ React57.createElement(Grid24, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React57.createElement(ToggleControl11, { options: options10 }))));
|
|
2200
2210
|
|
|
2201
2211
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2202
|
-
import * as
|
|
2203
|
-
import { ControlLabel as
|
|
2204
|
-
import { Grid as
|
|
2205
|
-
import { __ as
|
|
2212
|
+
import * as React58 from "react";
|
|
2213
|
+
import { ControlLabel as ControlLabel30, SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
2214
|
+
import { Grid as Grid25 } from "@elementor/ui";
|
|
2215
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
2206
2216
|
var WordSpacingField = () => {
|
|
2207
|
-
return /* @__PURE__ */
|
|
2217
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React58.createElement(Grid25, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ControlLabel30, null, __39("Word spacing", "elementor"))), /* @__PURE__ */ React58.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(SizeControl8, null))));
|
|
2208
2218
|
};
|
|
2209
2219
|
|
|
2210
2220
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2211
2221
|
var TypographySection = () => {
|
|
2212
|
-
return /* @__PURE__ */
|
|
2222
|
+
return /* @__PURE__ */ React59.createElement(Stack19, { gap: 1.5 }, /* @__PURE__ */ React59.createElement(FontFamilyField, null), /* @__PURE__ */ React59.createElement(FontWeightField, null), /* @__PURE__ */ React59.createElement(FontSizeField, null), /* @__PURE__ */ React59.createElement(PanelDivider, null), /* @__PURE__ */ React59.createElement(TextAlignmentField, null), /* @__PURE__ */ React59.createElement(TextColorField, null), /* @__PURE__ */ React59.createElement(CollapsibleContent, null, /* @__PURE__ */ React59.createElement(Stack19, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React59.createElement(LineHeightField, null), /* @__PURE__ */ React59.createElement(LetterSpacingField, null), /* @__PURE__ */ React59.createElement(WordSpacingField, null), /* @__PURE__ */ React59.createElement(PanelDivider, null), /* @__PURE__ */ React59.createElement(TextDecorationField, null), /* @__PURE__ */ React59.createElement(TransformField, null), /* @__PURE__ */ React59.createElement(TextDirectionField, null), /* @__PURE__ */ React59.createElement(FontStyleField, null), /* @__PURE__ */ React59.createElement(TextStrokeField, null))));
|
|
2213
2223
|
};
|
|
2214
2224
|
|
|
2215
2225
|
// src/components/style-tab.tsx
|
|
@@ -2219,7 +2229,7 @@ var StyleTab = () => {
|
|
|
2219
2229
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2220
2230
|
const [activeStyleState, setActiveStyleState] = useState7(null);
|
|
2221
2231
|
const breakpoint = useActiveBreakpoint();
|
|
2222
|
-
return /* @__PURE__ */
|
|
2232
|
+
return /* @__PURE__ */ React60.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React60.createElement(
|
|
2223
2233
|
StyleProvider,
|
|
2224
2234
|
{
|
|
2225
2235
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -2230,7 +2240,7 @@ var StyleTab = () => {
|
|
|
2230
2240
|
},
|
|
2231
2241
|
setMetaState: setActiveStyleState
|
|
2232
2242
|
},
|
|
2233
|
-
/* @__PURE__ */
|
|
2243
|
+
/* @__PURE__ */ React60.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React60.createElement(CssClassSelector, null), /* @__PURE__ */ React60.createElement(Divider4, null), /* @__PURE__ */ React60.createElement(SectionsList, null, /* @__PURE__ */ React60.createElement(Section, { title: __40("Layout", "elementor") }, /* @__PURE__ */ React60.createElement(LayoutSection, null)), /* @__PURE__ */ React60.createElement(Section, { title: __40("Spacing", "elementor") }, /* @__PURE__ */ React60.createElement(SpacingSection, null)), /* @__PURE__ */ React60.createElement(Section, { title: __40("Size", "elementor") }, /* @__PURE__ */ React60.createElement(SizeSection, null)), /* @__PURE__ */ React60.createElement(Section, { title: __40("Position", "elementor") }, /* @__PURE__ */ React60.createElement(PositionSection, null)), /* @__PURE__ */ React60.createElement(Section, { title: __40("Typography", "elementor") }, /* @__PURE__ */ React60.createElement(TypographySection, null)), /* @__PURE__ */ React60.createElement(Section, { title: __40("Background", "elementor") }, /* @__PURE__ */ React60.createElement(BackgroundSection, null)), /* @__PURE__ */ React60.createElement(Section, { title: __40("Border", "elementor") }, /* @__PURE__ */ React60.createElement(BorderSection, null)), /* @__PURE__ */ React60.createElement(Section, { title: __40("Effects", "elementor") }, /* @__PURE__ */ React60.createElement(EffectsSection, null))))
|
|
2234
2244
|
));
|
|
2235
2245
|
};
|
|
2236
2246
|
function useActiveStyleDefId(currentClassesProp) {
|
|
@@ -2262,7 +2272,7 @@ var EditingPanelTabs = () => {
|
|
|
2262
2272
|
return (
|
|
2263
2273
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2264
2274
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2265
|
-
/* @__PURE__ */
|
|
2275
|
+
/* @__PURE__ */ React61.createElement(Fragment8, { key: element.id }, /* @__PURE__ */ React61.createElement(Stack20, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React61.createElement(Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React61.createElement(Tab, { label: __41("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React61.createElement(Tab, { label: __41("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React61.createElement(Divider5, null), /* @__PURE__ */ React61.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React61.createElement(SettingsTab, null)), /* @__PURE__ */ React61.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React61.createElement(StyleTab, null))))
|
|
2266
2276
|
);
|
|
2267
2277
|
};
|
|
2268
2278
|
|
|
@@ -2275,8 +2285,8 @@ var EditingPanel = () => {
|
|
|
2275
2285
|
if (!element || !elementType) {
|
|
2276
2286
|
return null;
|
|
2277
2287
|
}
|
|
2278
|
-
const panelTitle =
|
|
2279
|
-
return /* @__PURE__ */
|
|
2288
|
+
const panelTitle = __42("Edit %s", "elementor").replace("%s", elementType.title);
|
|
2289
|
+
return /* @__PURE__ */ React62.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React62.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React62.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React62.createElement(Panel, null, /* @__PURE__ */ React62.createElement(PanelHeader, null, /* @__PURE__ */ React62.createElement(PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React62.createElement(PanelBody, null, /* @__PURE__ */ React62.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React62.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React62.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React62.createElement(EditingPanelTabs, null))))))));
|
|
2280
2290
|
};
|
|
2281
2291
|
|
|
2282
2292
|
// src/panel.ts
|
|
@@ -2343,15 +2353,15 @@ var EditingPanelHooks = () => {
|
|
|
2343
2353
|
};
|
|
2344
2354
|
|
|
2345
2355
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2346
|
-
import * as
|
|
2356
|
+
import * as React65 from "react";
|
|
2347
2357
|
import { useId as useId4 } from "react";
|
|
2348
|
-
import { ControlLabel as
|
|
2358
|
+
import { ControlLabel as ControlLabel31, useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
2349
2359
|
import { DatabaseIcon, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
2350
2360
|
import {
|
|
2351
2361
|
bindPopover as bindPopover2,
|
|
2352
2362
|
bindTrigger as bindTrigger2,
|
|
2353
2363
|
Box as Box5,
|
|
2354
|
-
Divider as
|
|
2364
|
+
Divider as Divider7,
|
|
2355
2365
|
IconButton as IconButton3,
|
|
2356
2366
|
Paper,
|
|
2357
2367
|
Popover as Popover2,
|
|
@@ -2364,7 +2374,7 @@ import {
|
|
|
2364
2374
|
usePopupState as usePopupState3,
|
|
2365
2375
|
useTabs as useTabs2
|
|
2366
2376
|
} from "@elementor/ui";
|
|
2367
|
-
import { __ as
|
|
2377
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
2368
2378
|
|
|
2369
2379
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2370
2380
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -2375,7 +2385,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
2375
2385
|
};
|
|
2376
2386
|
|
|
2377
2387
|
// src/dynamics/dynamic-control.tsx
|
|
2378
|
-
import * as
|
|
2388
|
+
import * as React63 from "react";
|
|
2379
2389
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
2380
2390
|
|
|
2381
2391
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
@@ -2477,17 +2487,17 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2477
2487
|
});
|
|
2478
2488
|
};
|
|
2479
2489
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
2480
|
-
return /* @__PURE__ */
|
|
2490
|
+
return /* @__PURE__ */ React63.createElement(PropProvider3, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React63.createElement(PropKeyProvider3, { bind }, children));
|
|
2481
2491
|
};
|
|
2482
2492
|
|
|
2483
2493
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2484
|
-
import * as
|
|
2494
|
+
import * as React64 from "react";
|
|
2485
2495
|
import { Fragment as Fragment9, useState as useState8 } from "react";
|
|
2486
2496
|
import { useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
2487
2497
|
import { PhotoIcon, SearchIcon } from "@elementor/icons";
|
|
2488
2498
|
import {
|
|
2489
2499
|
Box as Box4,
|
|
2490
|
-
Divider as
|
|
2500
|
+
Divider as Divider6,
|
|
2491
2501
|
InputAdornment,
|
|
2492
2502
|
Link,
|
|
2493
2503
|
ListSubheader as ListSubheader2,
|
|
@@ -2497,7 +2507,7 @@ import {
|
|
|
2497
2507
|
TextField as TextField2,
|
|
2498
2508
|
Typography as Typography4
|
|
2499
2509
|
} from "@elementor/ui";
|
|
2500
|
-
import { __ as
|
|
2510
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
2501
2511
|
var SIZE3 = "tiny";
|
|
2502
2512
|
var DynamicSelection = ({ onSelect }) => {
|
|
2503
2513
|
const [searchValue, setSearchValue] = useState8("");
|
|
@@ -2506,7 +2516,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2506
2516
|
const { bind, value: dynamicValue, setValue } = useBoundProp3(dynamicPropTypeUtil);
|
|
2507
2517
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
2508
2518
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
2509
|
-
const
|
|
2519
|
+
const options11 = useFilteredOptions(searchValue);
|
|
2510
2520
|
const handleSearch = (event) => {
|
|
2511
2521
|
setSearchValue(event.target.value);
|
|
2512
2522
|
};
|
|
@@ -2517,21 +2527,21 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2517
2527
|
setValue({ name: value, settings: {} });
|
|
2518
2528
|
onSelect?.();
|
|
2519
2529
|
};
|
|
2520
|
-
return /* @__PURE__ */
|
|
2530
|
+
return /* @__PURE__ */ React64.createElement(Stack21, null, /* @__PURE__ */ React64.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React64.createElement(
|
|
2521
2531
|
TextField2,
|
|
2522
2532
|
{
|
|
2523
2533
|
fullWidth: true,
|
|
2524
2534
|
size: SIZE3,
|
|
2525
2535
|
value: searchValue,
|
|
2526
2536
|
onChange: handleSearch,
|
|
2527
|
-
placeholder:
|
|
2537
|
+
placeholder: __43("Search dynamic tag", "elementor"),
|
|
2528
2538
|
InputProps: {
|
|
2529
|
-
startAdornment: /* @__PURE__ */
|
|
2539
|
+
startAdornment: /* @__PURE__ */ React64.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React64.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
2530
2540
|
}
|
|
2531
2541
|
}
|
|
2532
|
-
)), /* @__PURE__ */
|
|
2542
|
+
)), /* @__PURE__ */ React64.createElement(Divider6, null), /* @__PURE__ */ React64.createElement(Box4, { sx: { overflowY: "auto", height: 260, width: 220 } }, options11.length > 0 ? /* @__PURE__ */ React64.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options11.map(([category, items3], index) => /* @__PURE__ */ React64.createElement(Fragment9, { key: index }, /* @__PURE__ */ React64.createElement(ListSubheader2, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items3.map(({ value, label: tagLabel }) => {
|
|
2533
2543
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
2534
|
-
return /* @__PURE__ */
|
|
2544
|
+
return /* @__PURE__ */ React64.createElement(
|
|
2535
2545
|
MenuItem2,
|
|
2536
2546
|
{
|
|
2537
2547
|
key: value,
|
|
@@ -2542,7 +2552,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2542
2552
|
},
|
|
2543
2553
|
tagLabel
|
|
2544
2554
|
);
|
|
2545
|
-
})))) : /* @__PURE__ */
|
|
2555
|
+
})))) : /* @__PURE__ */ React64.createElement(Stack21, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React64.createElement(PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React64.createElement(Typography4, { align: "center", variant: "caption", color: "text.secondary" }, __43("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React64.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React64.createElement(Typography4, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React64.createElement(
|
|
2546
2556
|
Link,
|
|
2547
2557
|
{
|
|
2548
2558
|
color: "secondary",
|
|
@@ -2550,12 +2560,12 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2550
2560
|
component: "button",
|
|
2551
2561
|
onClick: () => setSearchValue("")
|
|
2552
2562
|
},
|
|
2553
|
-
|
|
2554
|
-
), "\xA0",
|
|
2563
|
+
__43("Clear the filters", "elementor")
|
|
2564
|
+
), "\xA0", __43("and try again.", "elementor")))));
|
|
2555
2565
|
};
|
|
2556
2566
|
var useFilteredOptions = (searchValue) => {
|
|
2557
2567
|
const dynamicTags = usePropDynamicTags();
|
|
2558
|
-
const
|
|
2568
|
+
const options11 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
2559
2569
|
const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
2560
2570
|
if (!isVisible) {
|
|
2561
2571
|
return categories;
|
|
@@ -2566,7 +2576,7 @@ var useFilteredOptions = (searchValue) => {
|
|
|
2566
2576
|
categories.get(group)?.push({ label, value: name });
|
|
2567
2577
|
return categories;
|
|
2568
2578
|
}, /* @__PURE__ */ new Map());
|
|
2569
|
-
return [...
|
|
2579
|
+
return [...options11];
|
|
2570
2580
|
};
|
|
2571
2581
|
|
|
2572
2582
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
@@ -2585,25 +2595,25 @@ var DynamicSelectionControl = () => {
|
|
|
2585
2595
|
if (!dynamicTag) {
|
|
2586
2596
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
2587
2597
|
}
|
|
2588
|
-
return /* @__PURE__ */
|
|
2598
|
+
return /* @__PURE__ */ React65.createElement(Box5, null, /* @__PURE__ */ React65.createElement(
|
|
2589
2599
|
Tag,
|
|
2590
2600
|
{
|
|
2591
2601
|
fullWidth: true,
|
|
2592
2602
|
showActionsOnHover: true,
|
|
2593
2603
|
label: dynamicTag.label,
|
|
2594
|
-
startIcon: /* @__PURE__ */
|
|
2604
|
+
startIcon: /* @__PURE__ */ React65.createElement(DatabaseIcon, { fontSize: SIZE4 }),
|
|
2595
2605
|
...bindTrigger2(selectionPopoverState),
|
|
2596
|
-
actions: /* @__PURE__ */
|
|
2606
|
+
actions: /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React65.createElement(
|
|
2597
2607
|
IconButton3,
|
|
2598
2608
|
{
|
|
2599
2609
|
size: SIZE4,
|
|
2600
2610
|
onClick: removeDynamicTag,
|
|
2601
|
-
"aria-label":
|
|
2611
|
+
"aria-label": __44("Remove dynamic value", "elementor")
|
|
2602
2612
|
},
|
|
2603
|
-
/* @__PURE__ */
|
|
2613
|
+
/* @__PURE__ */ React65.createElement(XIcon2, { fontSize: SIZE4 })
|
|
2604
2614
|
))
|
|
2605
2615
|
}
|
|
2606
|
-
), /* @__PURE__ */
|
|
2616
|
+
), /* @__PURE__ */ React65.createElement(
|
|
2607
2617
|
Popover2,
|
|
2608
2618
|
{
|
|
2609
2619
|
disablePortal: true,
|
|
@@ -2611,7 +2621,7 @@ var DynamicSelectionControl = () => {
|
|
|
2611
2621
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2612
2622
|
...bindPopover2(selectionPopoverState)
|
|
2613
2623
|
},
|
|
2614
|
-
/* @__PURE__ */
|
|
2624
|
+
/* @__PURE__ */ React65.createElement(Stack22, null, /* @__PURE__ */ React65.createElement(Stack22, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React65.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React65.createElement(Typography5, { variant: "subtitle2" }, __44("Dynamic Tags", "elementor")), /* @__PURE__ */ React65.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React65.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React65.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2615
2625
|
));
|
|
2616
2626
|
};
|
|
2617
2627
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -2621,22 +2631,22 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
2621
2631
|
if (!hasDynamicSettings) {
|
|
2622
2632
|
return null;
|
|
2623
2633
|
}
|
|
2624
|
-
return /* @__PURE__ */
|
|
2634
|
+
return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
|
|
2625
2635
|
IconButton3,
|
|
2626
2636
|
{
|
|
2627
2637
|
size: SIZE4,
|
|
2628
2638
|
...bindTrigger2(settingsPopupState),
|
|
2629
|
-
"aria-label":
|
|
2639
|
+
"aria-label": __44("Settings", "elementor")
|
|
2630
2640
|
},
|
|
2631
|
-
/* @__PURE__ */
|
|
2632
|
-
), /* @__PURE__ */
|
|
2641
|
+
/* @__PURE__ */ React65.createElement(SettingsIcon, { fontSize: SIZE4 })
|
|
2642
|
+
), /* @__PURE__ */ React65.createElement(
|
|
2633
2643
|
Popover2,
|
|
2634
2644
|
{
|
|
2635
2645
|
disableScrollLock: true,
|
|
2636
2646
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2637
2647
|
...bindPopover2(settingsPopupState)
|
|
2638
2648
|
},
|
|
2639
|
-
/* @__PURE__ */
|
|
2649
|
+
/* @__PURE__ */ React65.createElement(Paper, { component: Stack22, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React65.createElement(Stack22, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React65.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React65.createElement(Typography5, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React65.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React65.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React65.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2640
2650
|
));
|
|
2641
2651
|
};
|
|
2642
2652
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -2645,10 +2655,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
2645
2655
|
if (!tabs.length) {
|
|
2646
2656
|
return null;
|
|
2647
2657
|
}
|
|
2648
|
-
return /* @__PURE__ */
|
|
2649
|
-
return /* @__PURE__ */
|
|
2658
|
+
return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(Tabs2, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React65.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React65.createElement(Divider7, null), tabs.map(({ value }, index) => {
|
|
2659
|
+
return /* @__PURE__ */ React65.createElement(TabPanel2, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React65.createElement(Stack22, { gap: 1, px: 2 }, value.items.map((item) => {
|
|
2650
2660
|
if (item.type === "control") {
|
|
2651
|
-
return /* @__PURE__ */
|
|
2661
|
+
return /* @__PURE__ */ React65.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
2652
2662
|
}
|
|
2653
2663
|
return null;
|
|
2654
2664
|
})));
|
|
@@ -2658,22 +2668,22 @@ var Control3 = ({ control }) => {
|
|
|
2658
2668
|
if (!getControlByType(control.type)) {
|
|
2659
2669
|
return null;
|
|
2660
2670
|
}
|
|
2661
|
-
return /* @__PURE__ */
|
|
2671
|
+
return /* @__PURE__ */ React65.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React65.createElement(ControlLabel31, null, control.label) : null, /* @__PURE__ */ React65.createElement(Control, { type: control.type, props: control.props }));
|
|
2662
2672
|
};
|
|
2663
2673
|
|
|
2664
2674
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2665
|
-
import * as
|
|
2675
|
+
import * as React66 from "react";
|
|
2666
2676
|
import { useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
2667
2677
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
2668
|
-
import { __ as
|
|
2678
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
2669
2679
|
var usePropDynamicAction = () => {
|
|
2670
2680
|
const { propType } = useBoundProp5();
|
|
2671
2681
|
const visible = !!propType && supportsDynamic(propType);
|
|
2672
2682
|
return {
|
|
2673
2683
|
visible,
|
|
2674
2684
|
icon: DatabaseIcon2,
|
|
2675
|
-
title:
|
|
2676
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
2685
|
+
title: __45("Dynamic Tags", "elementor"),
|
|
2686
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React66.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2677
2687
|
};
|
|
2678
2688
|
};
|
|
2679
2689
|
|