@elementor/editor-editing-panel 1.11.1 → 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 +26 -0
- package/dist/index.js +435 -435
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +354 -354
- 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 +5 -6
- 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 +1 -1
- 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 {
|
|
@@ -1175,7 +1172,7 @@ function useDirection() {
|
|
|
1175
1172
|
}
|
|
1176
1173
|
|
|
1177
1174
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1178
|
-
import * as
|
|
1175
|
+
import * as React24 from "react";
|
|
1179
1176
|
import { useRef } from "react";
|
|
1180
1177
|
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1181
1178
|
var CLOCKWISE_ANGLES = {
|
|
@@ -1193,7 +1190,7 @@ var COUNTER_CLOCKWISE_ANGLES = {
|
|
|
1193
1190
|
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1194
1191
|
const rotate = useRef(useGetTargetAngle(isClockwise, offset));
|
|
1195
1192
|
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1196
|
-
return /* @__PURE__ */
|
|
1193
|
+
return /* @__PURE__ */ React24.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1197
1194
|
};
|
|
1198
1195
|
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1199
1196
|
const [direction] = useStylesField("flex-direction");
|
|
@@ -1212,61 +1209,61 @@ var StartStartIcon = withDirection(RadiusTopLeftIcon);
|
|
|
1212
1209
|
var StartEndIcon = withDirection(RadiusTopRightIcon);
|
|
1213
1210
|
var EndStartIcon = withDirection(RadiusBottomLeftIcon);
|
|
1214
1211
|
var EndEndIcon = withDirection(RadiusBottomRightIcon);
|
|
1215
|
-
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? __9("Top
|
|
1216
|
-
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? __9("Top
|
|
1217
|
-
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? __9("Bottom
|
|
1218
|
-
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? __9("Bottom
|
|
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");
|
|
1219
1216
|
var getCorners = (isSiteRtl) => [
|
|
1220
1217
|
{
|
|
1221
1218
|
label: getStartStartLabel(isSiteRtl),
|
|
1222
|
-
icon: /* @__PURE__ */
|
|
1219
|
+
icon: /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: StartStartIcon, size: "tiny" }),
|
|
1223
1220
|
bind: "start-start"
|
|
1224
1221
|
},
|
|
1225
1222
|
{
|
|
1226
1223
|
label: getStartEndLabel(isSiteRtl),
|
|
1227
|
-
icon: /* @__PURE__ */
|
|
1224
|
+
icon: /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: StartEndIcon, size: "tiny" }),
|
|
1228
1225
|
bind: "start-end"
|
|
1229
1226
|
},
|
|
1230
1227
|
{
|
|
1231
1228
|
label: getEndEndLabel(isSiteRtl),
|
|
1232
|
-
icon: /* @__PURE__ */
|
|
1229
|
+
icon: /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: EndEndIcon, size: "tiny" }),
|
|
1233
1230
|
bind: "end-end"
|
|
1234
1231
|
},
|
|
1235
1232
|
{
|
|
1236
1233
|
label: getEndStartLabel(isSiteRtl),
|
|
1237
|
-
icon: /* @__PURE__ */
|
|
1234
|
+
icon: /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: EndStartIcon, size: "tiny" }),
|
|
1238
1235
|
bind: "end-start"
|
|
1239
1236
|
}
|
|
1240
1237
|
];
|
|
1241
1238
|
var BorderRadiusField = () => {
|
|
1242
1239
|
const { isSiteRtl } = useDirection();
|
|
1243
|
-
return /* @__PURE__ */
|
|
1240
|
+
return /* @__PURE__ */ React25.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React25.createElement(
|
|
1244
1241
|
EqualUnequalSizesControl2,
|
|
1245
1242
|
{
|
|
1246
1243
|
items: getCorners(isSiteRtl),
|
|
1247
|
-
label: __9("Border
|
|
1248
|
-
icon: /* @__PURE__ */
|
|
1244
|
+
label: __9("Border radius", "elementor"),
|
|
1245
|
+
icon: /* @__PURE__ */ React25.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
1249
1246
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
1250
1247
|
}
|
|
1251
1248
|
));
|
|
1252
1249
|
};
|
|
1253
1250
|
|
|
1254
1251
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1255
|
-
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));
|
|
1256
1253
|
|
|
1257
1254
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
1258
|
-
import * as
|
|
1255
|
+
import * as React27 from "react";
|
|
1259
1256
|
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
1260
1257
|
import { Stack as Stack7 } from "@elementor/ui";
|
|
1261
1258
|
var EffectsSection = () => {
|
|
1262
|
-
return /* @__PURE__ */
|
|
1259
|
+
return /* @__PURE__ */ React27.createElement(Stack7, { gap: 1.5 }, /* @__PURE__ */ React27.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React27.createElement(BoxShadowRepeaterControl, null)));
|
|
1263
1260
|
};
|
|
1264
1261
|
|
|
1265
1262
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1266
|
-
import * as
|
|
1263
|
+
import * as React37 from "react";
|
|
1267
1264
|
import { ControlLabel as ControlLabel13 } from "@elementor/editor-controls";
|
|
1268
1265
|
import { useParentElement } from "@elementor/editor-elements";
|
|
1269
|
-
import {
|
|
1266
|
+
import { Stack as Stack13 } from "@elementor/ui";
|
|
1270
1267
|
import { __ as __19 } from "@wordpress/i18n";
|
|
1271
1268
|
|
|
1272
1269
|
// src/hooks/use-computed-style.ts
|
|
@@ -1295,7 +1292,7 @@ function useComputedStyle(elementId) {
|
|
|
1295
1292
|
}
|
|
1296
1293
|
|
|
1297
1294
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1298
|
-
import * as
|
|
1295
|
+
import * as React28 from "react";
|
|
1299
1296
|
import { ControlLabel as ControlLabel5, ToggleControl } from "@elementor/editor-controls";
|
|
1300
1297
|
import {
|
|
1301
1298
|
LayoutAlignCenterIcon as CenterIcon,
|
|
@@ -1315,35 +1312,35 @@ var options = [
|
|
|
1315
1312
|
{
|
|
1316
1313
|
value: "start",
|
|
1317
1314
|
label: __10("Start", "elementor"),
|
|
1318
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1315
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1319
1316
|
showTooltip: true
|
|
1320
1317
|
},
|
|
1321
1318
|
{
|
|
1322
1319
|
value: "center",
|
|
1323
1320
|
label: __10("Center", "elementor"),
|
|
1324
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1321
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
1325
1322
|
showTooltip: true
|
|
1326
1323
|
},
|
|
1327
1324
|
{
|
|
1328
1325
|
value: "end",
|
|
1329
1326
|
label: __10("End", "elementor"),
|
|
1330
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1327
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1331
1328
|
showTooltip: true
|
|
1332
1329
|
},
|
|
1333
1330
|
{
|
|
1334
1331
|
value: "stretch",
|
|
1335
1332
|
label: __10("Stretch", "elementor"),
|
|
1336
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1333
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps }),
|
|
1337
1334
|
showTooltip: true
|
|
1338
1335
|
}
|
|
1339
1336
|
];
|
|
1340
1337
|
var AlignItemsField = () => {
|
|
1341
1338
|
const { isSiteRtl } = useDirection();
|
|
1342
|
-
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 }))))));
|
|
1343
1340
|
};
|
|
1344
1341
|
|
|
1345
1342
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
1346
|
-
import * as
|
|
1343
|
+
import * as React29 from "react";
|
|
1347
1344
|
import { ControlLabel as ControlLabel6, ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
1348
1345
|
import {
|
|
1349
1346
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
@@ -1363,40 +1360,40 @@ var options2 = [
|
|
|
1363
1360
|
{
|
|
1364
1361
|
value: "start",
|
|
1365
1362
|
label: __11("Start", "elementor"),
|
|
1366
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1363
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
1367
1364
|
showTooltip: true
|
|
1368
1365
|
},
|
|
1369
1366
|
{
|
|
1370
1367
|
value: "center",
|
|
1371
1368
|
label: __11("Center", "elementor"),
|
|
1372
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1369
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
1373
1370
|
showTooltip: true
|
|
1374
1371
|
},
|
|
1375
1372
|
{
|
|
1376
1373
|
value: "end",
|
|
1377
1374
|
label: __11("End", "elementor"),
|
|
1378
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1375
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
1379
1376
|
showTooltip: true
|
|
1380
1377
|
},
|
|
1381
1378
|
{
|
|
1382
1379
|
value: "stretch",
|
|
1383
1380
|
label: __11("Stretch", "elementor"),
|
|
1384
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1381
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: JustifyIcon2, size, ...iconProps2 }),
|
|
1385
1382
|
showTooltip: true
|
|
1386
1383
|
}
|
|
1387
1384
|
];
|
|
1388
1385
|
var AlignSelfChild = () => {
|
|
1389
1386
|
const { isSiteRtl } = useDirection();
|
|
1390
|
-
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 }))))));
|
|
1391
1388
|
};
|
|
1392
1389
|
|
|
1393
1390
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
1394
|
-
import * as
|
|
1391
|
+
import * as React30 from "react";
|
|
1395
1392
|
import { ControlLabel as ControlLabel7, ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
1396
1393
|
import { Stack as Stack8 } from "@elementor/ui";
|
|
1397
1394
|
import { __ as __12 } from "@wordpress/i18n";
|
|
1398
1395
|
var DisplayField = () => {
|
|
1399
|
-
const
|
|
1396
|
+
const options11 = [
|
|
1400
1397
|
{
|
|
1401
1398
|
value: "block",
|
|
1402
1399
|
renderContent: () => __12("Block", "elementor"),
|
|
@@ -1416,11 +1413,11 @@ var DisplayField = () => {
|
|
|
1416
1413
|
showTooltip: true
|
|
1417
1414
|
}
|
|
1418
1415
|
];
|
|
1419
|
-
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 })));
|
|
1420
1417
|
};
|
|
1421
1418
|
|
|
1422
1419
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1423
|
-
import * as
|
|
1420
|
+
import * as React31 from "react";
|
|
1424
1421
|
import { ControlLabel as ControlLabel8, ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
1425
1422
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
1426
1423
|
import { DirectionProvider as DirectionProvider3, Grid as Grid5, ThemeProvider as ThemeProvider3, withDirection as withDirection4 } from "@elementor/ui";
|
|
@@ -1431,14 +1428,14 @@ var options3 = [
|
|
|
1431
1428
|
label: __13("Row", "elementor"),
|
|
1432
1429
|
renderContent: ({ size }) => {
|
|
1433
1430
|
const StartIcon5 = withDirection4(ArrowRightIcon);
|
|
1434
|
-
return /* @__PURE__ */
|
|
1431
|
+
return /* @__PURE__ */ React31.createElement(StartIcon5, { fontSize: size });
|
|
1435
1432
|
},
|
|
1436
1433
|
showTooltip: true
|
|
1437
1434
|
},
|
|
1438
1435
|
{
|
|
1439
1436
|
value: "column",
|
|
1440
1437
|
label: __13("Column", "elementor"),
|
|
1441
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1438
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
1442
1439
|
showTooltip: true
|
|
1443
1440
|
},
|
|
1444
1441
|
{
|
|
@@ -1446,24 +1443,24 @@ var options3 = [
|
|
|
1446
1443
|
label: __13("Reversed row", "elementor"),
|
|
1447
1444
|
renderContent: ({ size }) => {
|
|
1448
1445
|
const EndIcon5 = withDirection4(ArrowLeftIcon);
|
|
1449
|
-
return /* @__PURE__ */
|
|
1446
|
+
return /* @__PURE__ */ React31.createElement(EndIcon5, { fontSize: size });
|
|
1450
1447
|
},
|
|
1451
1448
|
showTooltip: true
|
|
1452
1449
|
},
|
|
1453
1450
|
{
|
|
1454
1451
|
value: "column-reverse",
|
|
1455
1452
|
label: __13("Reversed column", "elementor"),
|
|
1456
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1453
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
1457
1454
|
showTooltip: true
|
|
1458
1455
|
}
|
|
1459
1456
|
];
|
|
1460
1457
|
var FlexDirectionField = () => {
|
|
1461
1458
|
const { isSiteRtl } = useDirection();
|
|
1462
|
-
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 }))))));
|
|
1463
1460
|
};
|
|
1464
1461
|
|
|
1465
1462
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1466
|
-
import * as
|
|
1463
|
+
import * as React32 from "react";
|
|
1467
1464
|
import { useState as useState4 } from "react";
|
|
1468
1465
|
import {
|
|
1469
1466
|
ControlLabel as ControlLabel9,
|
|
@@ -1486,19 +1483,19 @@ var items = [
|
|
|
1486
1483
|
{
|
|
1487
1484
|
value: FIRST,
|
|
1488
1485
|
label: __14("First", "elementor"),
|
|
1489
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1486
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
1490
1487
|
showTooltip: true
|
|
1491
1488
|
},
|
|
1492
1489
|
{
|
|
1493
1490
|
value: LAST,
|
|
1494
1491
|
label: __14("Last", "elementor"),
|
|
1495
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1492
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
1496
1493
|
showTooltip: true
|
|
1497
1494
|
},
|
|
1498
1495
|
{
|
|
1499
1496
|
value: CUSTOM,
|
|
1500
1497
|
label: __14("Custom", "elementor"),
|
|
1501
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1498
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(PencilIcon, { fontSize: size }),
|
|
1502
1499
|
showTooltip: true
|
|
1503
1500
|
}
|
|
1504
1501
|
];
|
|
@@ -1513,7 +1510,7 @@ var FlexOrderField = () => {
|
|
|
1513
1510
|
}
|
|
1514
1511
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1515
1512
|
};
|
|
1516
|
-
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(
|
|
1517
1514
|
ControlToggleButtonGroup,
|
|
1518
1515
|
{
|
|
1519
1516
|
items,
|
|
@@ -1521,7 +1518,7 @@ var FlexOrderField = () => {
|
|
|
1521
1518
|
onChange: handleToggleButtonChange,
|
|
1522
1519
|
exclusive: true
|
|
1523
1520
|
}
|
|
1524
|
-
))), 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(
|
|
1525
1522
|
NumberControl,
|
|
1526
1523
|
{
|
|
1527
1524
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -1541,7 +1538,7 @@ var getGroupControlValue = (order) => {
|
|
|
1541
1538
|
};
|
|
1542
1539
|
|
|
1543
1540
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1544
|
-
import * as
|
|
1541
|
+
import * as React33 from "react";
|
|
1545
1542
|
import { useMemo as useMemo2, useState as useState5 } from "react";
|
|
1546
1543
|
import {
|
|
1547
1544
|
ControlLabel as ControlLabel10,
|
|
@@ -1557,19 +1554,19 @@ var items2 = [
|
|
|
1557
1554
|
{
|
|
1558
1555
|
value: "flex-grow",
|
|
1559
1556
|
label: __15("Grow", "elementor"),
|
|
1560
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1557
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(ExpandIcon, { fontSize: size }),
|
|
1561
1558
|
showTooltip: true
|
|
1562
1559
|
},
|
|
1563
1560
|
{
|
|
1564
1561
|
value: "flex-shrink",
|
|
1565
1562
|
label: __15("Shrink", "elementor"),
|
|
1566
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1563
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(ShrinkIcon, { fontSize: size }),
|
|
1567
1564
|
showTooltip: true
|
|
1568
1565
|
},
|
|
1569
1566
|
{
|
|
1570
1567
|
value: "custom",
|
|
1571
1568
|
label: __15("Custom", "elementor"),
|
|
1572
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1569
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(PencilIcon2, { fontSize: size }),
|
|
1573
1570
|
showTooltip: true
|
|
1574
1571
|
}
|
|
1575
1572
|
];
|
|
@@ -1593,7 +1590,7 @@ var FlexSizeField = () => {
|
|
|
1593
1590
|
setGrowField(null);
|
|
1594
1591
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1595
1592
|
};
|
|
1596
|
-
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(
|
|
1597
1594
|
ControlToggleButtonGroup2,
|
|
1598
1595
|
{
|
|
1599
1596
|
value: activeGroup,
|
|
@@ -1601,9 +1598,9 @@ var FlexSizeField = () => {
|
|
|
1601
1598
|
items: items2,
|
|
1602
1599
|
exclusive: true
|
|
1603
1600
|
}
|
|
1604
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
1601
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React33.createElement(FlexCustomField, null))));
|
|
1605
1602
|
};
|
|
1606
|
-
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)))));
|
|
1607
1604
|
var getActiveGroup = ({
|
|
1608
1605
|
grow,
|
|
1609
1606
|
shrink,
|
|
@@ -1625,16 +1622,16 @@ var getActiveGroup = ({
|
|
|
1625
1622
|
};
|
|
1626
1623
|
|
|
1627
1624
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1628
|
-
import * as
|
|
1625
|
+
import * as React34 from "react";
|
|
1629
1626
|
import { GapControl } from "@elementor/editor-controls";
|
|
1630
1627
|
import { Stack as Stack11 } from "@elementor/ui";
|
|
1631
1628
|
import { __ as __16 } from "@wordpress/i18n";
|
|
1632
1629
|
var GapControlField = () => {
|
|
1633
|
-
return /* @__PURE__ */
|
|
1630
|
+
return /* @__PURE__ */ React34.createElement(Stack11, { gap: 1 }, /* @__PURE__ */ React34.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React34.createElement(GapControl, { label: __16("Gaps", "elementor") })));
|
|
1634
1631
|
};
|
|
1635
1632
|
|
|
1636
1633
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
1637
|
-
import * as
|
|
1634
|
+
import * as React35 from "react";
|
|
1638
1635
|
import { ControlLabel as ControlLabel11, ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
1639
1636
|
import {
|
|
1640
1637
|
JustifyBottomIcon,
|
|
@@ -1656,47 +1653,47 @@ var options4 = [
|
|
|
1656
1653
|
{
|
|
1657
1654
|
value: "start",
|
|
1658
1655
|
label: __17("Start", "elementor"),
|
|
1659
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1656
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1660
1657
|
showTooltip: true
|
|
1661
1658
|
},
|
|
1662
1659
|
{
|
|
1663
1660
|
value: "center",
|
|
1664
1661
|
label: __17("Center", "elementor"),
|
|
1665
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1662
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: CenterIcon3, size, ...iconProps3 }),
|
|
1666
1663
|
showTooltip: true
|
|
1667
1664
|
},
|
|
1668
1665
|
{
|
|
1669
1666
|
value: "end",
|
|
1670
1667
|
label: __17("End", "elementor"),
|
|
1671
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1668
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1672
1669
|
showTooltip: true
|
|
1673
1670
|
},
|
|
1674
1671
|
{
|
|
1675
1672
|
value: "space-between",
|
|
1676
1673
|
label: __17("Space between", "elementor"),
|
|
1677
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1674
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps3 }),
|
|
1678
1675
|
showTooltip: true
|
|
1679
1676
|
},
|
|
1680
1677
|
{
|
|
1681
1678
|
value: "space-around",
|
|
1682
1679
|
label: __17("Space around", "elementor"),
|
|
1683
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1680
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps3 }),
|
|
1684
1681
|
showTooltip: true
|
|
1685
1682
|
},
|
|
1686
1683
|
{
|
|
1687
1684
|
value: "space-evenly",
|
|
1688
1685
|
label: __17("Space evenly", "elementor"),
|
|
1689
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1686
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps3 }),
|
|
1690
1687
|
showTooltip: true
|
|
1691
1688
|
}
|
|
1692
1689
|
];
|
|
1693
1690
|
var JustifyContentField = () => {
|
|
1694
1691
|
const { isSiteRtl } = useDirection();
|
|
1695
|
-
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 })))));
|
|
1696
1693
|
};
|
|
1697
1694
|
|
|
1698
1695
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1699
|
-
import * as
|
|
1696
|
+
import * as React36 from "react";
|
|
1700
1697
|
import { ControlLabel as ControlLabel12, ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
1701
1698
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
1702
1699
|
import { DirectionProvider as DirectionProvider7, Grid as Grid8, ThemeProvider as ThemeProvider7 } from "@elementor/ui";
|
|
@@ -1705,25 +1702,25 @@ var options5 = [
|
|
|
1705
1702
|
{
|
|
1706
1703
|
value: "nowrap",
|
|
1707
1704
|
label: __18("No wrap", "elementor"),
|
|
1708
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1705
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
1709
1706
|
showTooltip: true
|
|
1710
1707
|
},
|
|
1711
1708
|
{
|
|
1712
1709
|
value: "wrap",
|
|
1713
1710
|
label: __18("Wrap", "elementor"),
|
|
1714
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1711
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ArrowBackIcon, { fontSize: size }),
|
|
1715
1712
|
showTooltip: true
|
|
1716
1713
|
},
|
|
1717
1714
|
{
|
|
1718
1715
|
value: "wrap-reverse",
|
|
1719
1716
|
label: __18("Reversed wrap", "elementor"),
|
|
1720
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1717
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
1721
1718
|
showTooltip: true
|
|
1722
1719
|
}
|
|
1723
1720
|
];
|
|
1724
1721
|
var WrapField = () => {
|
|
1725
1722
|
const { isSiteRtl } = useDirection();
|
|
1726
|
-
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 }))))));
|
|
1727
1724
|
};
|
|
1728
1725
|
|
|
1729
1726
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -1732,37 +1729,37 @@ var LayoutSection = () => {
|
|
|
1732
1729
|
const { element } = useElement();
|
|
1733
1730
|
const parent = useParentElement(element.id);
|
|
1734
1731
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
1735
|
-
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));
|
|
1736
1733
|
};
|
|
1737
|
-
var FlexFields = () => /* @__PURE__ */
|
|
1738
|
-
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));
|
|
1739
1736
|
|
|
1740
1737
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1741
|
-
import * as
|
|
1738
|
+
import * as React41 from "react";
|
|
1742
1739
|
import { useSessionStorage } from "@elementor/session";
|
|
1743
1740
|
import { Stack as Stack15 } from "@elementor/ui";
|
|
1744
1741
|
|
|
1745
1742
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1746
|
-
import * as
|
|
1743
|
+
import * as React38 from "react";
|
|
1747
1744
|
import { ControlLabel as ControlLabel14, SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
1748
1745
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
1749
1746
|
import { Grid as Grid9, Stack as Stack14 } from "@elementor/ui";
|
|
1750
1747
|
import { __ as __20 } from "@wordpress/i18n";
|
|
1751
1748
|
var sideIcons = {
|
|
1752
|
-
left: /* @__PURE__ */
|
|
1753
|
-
right: /* @__PURE__ */
|
|
1754
|
-
top: /* @__PURE__ */
|
|
1755
|
-
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" })
|
|
1756
1753
|
};
|
|
1757
1754
|
var DimensionsField = () => {
|
|
1758
|
-
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") })));
|
|
1759
1756
|
};
|
|
1760
1757
|
var DimensionField = ({ side, label }) => {
|
|
1761
|
-
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] }))));
|
|
1762
1759
|
};
|
|
1763
1760
|
|
|
1764
1761
|
// src/components/style-sections/position-section/position-field.tsx
|
|
1765
|
-
import * as
|
|
1762
|
+
import * as React39 from "react";
|
|
1766
1763
|
import { ControlLabel as ControlLabel15, SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
1767
1764
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
1768
1765
|
import { __ as __21 } from "@wordpress/i18n";
|
|
@@ -1774,16 +1771,16 @@ var positionOptions = [
|
|
|
1774
1771
|
{ label: __21("Sticky", "elementor"), value: "sticky" }
|
|
1775
1772
|
];
|
|
1776
1773
|
var PositionField = ({ onChange }) => {
|
|
1777
|
-
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 }))));
|
|
1778
1775
|
};
|
|
1779
1776
|
|
|
1780
1777
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1781
|
-
import * as
|
|
1778
|
+
import * as React40 from "react";
|
|
1782
1779
|
import { ControlLabel as ControlLabel16, NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
1783
1780
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
1784
1781
|
import { __ as __22 } from "@wordpress/i18n";
|
|
1785
1782
|
var ZIndexField = () => {
|
|
1786
|
-
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))));
|
|
1787
1784
|
};
|
|
1788
1785
|
|
|
1789
1786
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1815,7 +1812,7 @@ var PositionSection = () => {
|
|
|
1815
1812
|
}
|
|
1816
1813
|
};
|
|
1817
1814
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
1818
|
-
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);
|
|
1819
1816
|
};
|
|
1820
1817
|
var usePersistDimensions = () => {
|
|
1821
1818
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -1825,13 +1822,13 @@ var usePersistDimensions = () => {
|
|
|
1825
1822
|
};
|
|
1826
1823
|
|
|
1827
1824
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1828
|
-
import * as
|
|
1825
|
+
import * as React43 from "react";
|
|
1829
1826
|
import { ControlLabel as ControlLabel18, SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
1830
|
-
import {
|
|
1827
|
+
import { Grid as Grid13, Stack as Stack16 } from "@elementor/ui";
|
|
1831
1828
|
import { __ as __24 } from "@wordpress/i18n";
|
|
1832
1829
|
|
|
1833
1830
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1834
|
-
import * as
|
|
1831
|
+
import * as React42 from "react";
|
|
1835
1832
|
import { ControlLabel as ControlLabel17, ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
1836
1833
|
import { ExpandBottomIcon, EyeIcon, EyeOffIcon } from "@elementor/icons";
|
|
1837
1834
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
@@ -1840,49 +1837,49 @@ var options6 = [
|
|
|
1840
1837
|
{
|
|
1841
1838
|
value: "visible",
|
|
1842
1839
|
label: __23("Visible", "elementor"),
|
|
1843
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1840
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(EyeIcon, { fontSize: size }),
|
|
1844
1841
|
showTooltip: true
|
|
1845
1842
|
},
|
|
1846
1843
|
{
|
|
1847
1844
|
value: "hidden",
|
|
1848
1845
|
label: __23("Hidden", "elementor"),
|
|
1849
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1846
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(EyeOffIcon, { fontSize: size }),
|
|
1850
1847
|
showTooltip: true
|
|
1851
1848
|
},
|
|
1852
1849
|
{
|
|
1853
1850
|
value: "auto",
|
|
1854
1851
|
label: __23("Auto", "elementor"),
|
|
1855
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1852
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(ExpandBottomIcon, { fontSize: size }),
|
|
1856
1853
|
showTooltip: true
|
|
1857
1854
|
}
|
|
1858
1855
|
];
|
|
1859
1856
|
var OverflowField = () => {
|
|
1860
|
-
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 }))));
|
|
1861
1858
|
};
|
|
1862
1859
|
|
|
1863
1860
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1864
1861
|
var SizeSection = () => {
|
|
1865
|
-
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)));
|
|
1866
1863
|
};
|
|
1867
1864
|
var SizeField = ({ label, bind }) => {
|
|
1868
|
-
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))));
|
|
1869
1866
|
};
|
|
1870
1867
|
|
|
1871
1868
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
1872
|
-
import * as
|
|
1869
|
+
import * as React44 from "react";
|
|
1873
1870
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
1874
|
-
import {
|
|
1871
|
+
import { Stack as Stack17 } from "@elementor/ui";
|
|
1875
1872
|
import { __ as __25 } from "@wordpress/i18n";
|
|
1876
1873
|
var SpacingSection = () => {
|
|
1877
|
-
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") })));
|
|
1878
1875
|
};
|
|
1879
1876
|
|
|
1880
1877
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1881
|
-
import * as
|
|
1882
|
-
import {
|
|
1878
|
+
import * as React59 from "react";
|
|
1879
|
+
import { Stack as Stack19 } from "@elementor/ui";
|
|
1883
1880
|
|
|
1884
1881
|
// src/components/collapsible-content.tsx
|
|
1885
|
-
import * as
|
|
1882
|
+
import * as React45 from "react";
|
|
1886
1883
|
import { useState as useState6 } from "react";
|
|
1887
1884
|
import { Button, Collapse as Collapse3, Stack as Stack18 } from "@elementor/ui";
|
|
1888
1885
|
import { __ as __26 } from "@wordpress/i18n";
|
|
@@ -1891,7 +1888,7 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1891
1888
|
const handleToggle = () => {
|
|
1892
1889
|
setOpen((prevOpen) => !prevOpen);
|
|
1893
1890
|
};
|
|
1894
|
-
return /* @__PURE__ */
|
|
1891
|
+
return /* @__PURE__ */ React45.createElement(Stack18, { sx: { py: 0.5 } }, /* @__PURE__ */ React45.createElement(
|
|
1895
1892
|
Button,
|
|
1896
1893
|
{
|
|
1897
1894
|
fullWidth: true,
|
|
@@ -1899,14 +1896,14 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1899
1896
|
color: "secondary",
|
|
1900
1897
|
variant: "outlined",
|
|
1901
1898
|
onClick: handleToggle,
|
|
1902
|
-
endIcon: /* @__PURE__ */
|
|
1899
|
+
endIcon: /* @__PURE__ */ React45.createElement(CollapseIcon, { open })
|
|
1903
1900
|
},
|
|
1904
1901
|
open ? __26("Show less", "elementor") : __26("Show more", "elementor")
|
|
1905
|
-
), /* @__PURE__ */
|
|
1902
|
+
), /* @__PURE__ */ React45.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1906
1903
|
};
|
|
1907
1904
|
|
|
1908
1905
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1909
|
-
import * as
|
|
1906
|
+
import * as React46 from "react";
|
|
1910
1907
|
import { ControlLabel as ControlLabel19, FontFamilyControl } from "@elementor/editor-controls";
|
|
1911
1908
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
1912
1909
|
import { __ as __27 } from "@wordpress/i18n";
|
|
@@ -1923,194 +1920,143 @@ var FontFamilyField = () => {
|
|
|
1923
1920
|
if (!fontFamilies) {
|
|
1924
1921
|
return null;
|
|
1925
1922
|
}
|
|
1926
|
-
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 }))));
|
|
1927
1924
|
};
|
|
1928
1925
|
var getFontFamilies = () => {
|
|
1929
1926
|
const { controls } = getElementorConfig();
|
|
1930
|
-
const
|
|
1931
|
-
if (!
|
|
1927
|
+
const options11 = controls?.font?.options;
|
|
1928
|
+
if (!options11) {
|
|
1932
1929
|
return null;
|
|
1933
1930
|
}
|
|
1934
|
-
return
|
|
1931
|
+
return options11;
|
|
1935
1932
|
};
|
|
1936
1933
|
|
|
1937
1934
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
1938
|
-
import * as
|
|
1935
|
+
import * as React47 from "react";
|
|
1939
1936
|
import { ControlLabel as ControlLabel20, SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
1940
1937
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
1941
1938
|
import { __ as __28 } from "@wordpress/i18n";
|
|
1942
1939
|
var FontSizeField = () => {
|
|
1943
|
-
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))));
|
|
1944
1941
|
};
|
|
1945
1942
|
|
|
1946
|
-
// src/components/style-sections/typography-section/font-
|
|
1947
|
-
import * as
|
|
1948
|
-
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";
|
|
1949
1947
|
import { Grid as Grid16 } from "@elementor/ui";
|
|
1950
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";
|
|
1951
1970
|
var fontWeightOptions = [
|
|
1952
|
-
{ value: "100", label:
|
|
1953
|
-
{ value: "200", label:
|
|
1954
|
-
{ value: "300", label:
|
|
1955
|
-
{ value: "400", label:
|
|
1956
|
-
{ value: "500", label:
|
|
1957
|
-
{ value: "600", label:
|
|
1958
|
-
{ value: "700", label:
|
|
1959
|
-
{ value: "800", label:
|
|
1960
|
-
{ 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") }
|
|
1961
1980
|
];
|
|
1962
1981
|
var FontWeightField = () => {
|
|
1963
|
-
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 }))));
|
|
1964
1983
|
};
|
|
1965
1984
|
|
|
1966
1985
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
1967
|
-
import * as
|
|
1968
|
-
import { ControlLabel as
|
|
1969
|
-
import { Grid as
|
|
1970
|
-
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";
|
|
1971
1990
|
var LetterSpacingField = () => {
|
|
1972
|
-
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))));
|
|
1973
1992
|
};
|
|
1974
1993
|
|
|
1975
1994
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
1976
|
-
import * as
|
|
1977
|
-
import { ControlLabel as
|
|
1978
|
-
import { Grid as
|
|
1979
|
-
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";
|
|
1980
1999
|
var LineHeightField = () => {
|
|
1981
|
-
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))));
|
|
1982
2001
|
};
|
|
1983
2002
|
|
|
1984
2003
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
1985
|
-
import * as
|
|
1986
|
-
import { ControlLabel as
|
|
2004
|
+
import * as React52 from "react";
|
|
2005
|
+
import { ControlLabel as ControlLabel25, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
1987
2006
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
1988
|
-
import { Grid as
|
|
1989
|
-
import { __ as
|
|
2007
|
+
import { Grid as Grid20, withDirection as withDirection6 } from "@elementor/ui";
|
|
2008
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
1990
2009
|
var StartIcon4 = withDirection6(AlignLeftIcon);
|
|
1991
2010
|
var EndIcon4 = withDirection6(AlignRightIcon);
|
|
1992
|
-
var
|
|
2011
|
+
var options8 = [
|
|
1993
2012
|
{
|
|
1994
2013
|
value: "start",
|
|
1995
|
-
label:
|
|
1996
|
-
renderContent: () => /* @__PURE__ */
|
|
2014
|
+
label: __33("Start", "elementor"),
|
|
2015
|
+
renderContent: () => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: StartIcon4, size: "tiny" }),
|
|
1997
2016
|
showTooltip: true
|
|
1998
2017
|
},
|
|
1999
2018
|
{
|
|
2000
2019
|
value: "center",
|
|
2001
|
-
label:
|
|
2002
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2020
|
+
label: __33("Center", "elementor"),
|
|
2021
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(AlignCenterIcon, { fontSize: size }),
|
|
2003
2022
|
showTooltip: true
|
|
2004
2023
|
},
|
|
2005
2024
|
{
|
|
2006
2025
|
value: "end",
|
|
2007
|
-
label:
|
|
2008
|
-
renderContent: () => /* @__PURE__ */
|
|
2026
|
+
label: __33("End", "elementor"),
|
|
2027
|
+
renderContent: () => /* @__PURE__ */ React52.createElement(RotatedIcon, { icon: EndIcon4, size: "tiny" }),
|
|
2009
2028
|
showTooltip: true
|
|
2010
2029
|
},
|
|
2011
2030
|
{
|
|
2012
2031
|
value: "justify",
|
|
2013
|
-
label:
|
|
2014
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2032
|
+
label: __33("Justify", "elementor"),
|
|
2033
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
2015
2034
|
showTooltip: true
|
|
2016
2035
|
}
|
|
2017
2036
|
];
|
|
2018
2037
|
var TextAlignmentField = () => {
|
|
2019
|
-
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 }))));
|
|
2020
2039
|
};
|
|
2021
2040
|
|
|
2022
2041
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2023
|
-
import * as
|
|
2024
|
-
import { ColorControl as ColorControl2, ControlLabel as
|
|
2025
|
-
import { Grid as Grid20 } from "@elementor/ui";
|
|
2026
|
-
import { __ as __33 } from "@wordpress/i18n";
|
|
2027
|
-
var TextColorField = () => {
|
|
2028
|
-
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))));
|
|
2029
|
-
};
|
|
2030
|
-
|
|
2031
|
-
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2032
|
-
import * as React52 from "react";
|
|
2033
|
-
import { ControlLabel as ControlLabel26, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
2034
|
-
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
2042
|
+
import * as React53 from "react";
|
|
2043
|
+
import { ColorControl as ColorControl2, ControlLabel as ControlLabel26 } from "@elementor/editor-controls";
|
|
2035
2044
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
2036
2045
|
import { __ as __34 } from "@wordpress/i18n";
|
|
2037
|
-
var
|
|
2038
|
-
{
|
|
2039
|
-
value: "ltr",
|
|
2040
|
-
label: __34("Left to Right", "elementor"),
|
|
2041
|
-
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(TextDirectionLtrIcon, { fontSize: size })
|
|
2042
|
-
},
|
|
2043
|
-
{
|
|
2044
|
-
value: "rtl",
|
|
2045
|
-
label: __34("Right to Left", "elementor"),
|
|
2046
|
-
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(TextDirectionRtlIcon, { fontSize: size })
|
|
2047
|
-
}
|
|
2048
|
-
];
|
|
2049
|
-
var TextDirectionField = () => {
|
|
2050
|
-
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 }))));
|
|
2051
|
-
};
|
|
2052
|
-
|
|
2053
|
-
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2054
|
-
import * as React53 from "react";
|
|
2055
|
-
import { StrokeControl } from "@elementor/editor-controls";
|
|
2056
|
-
import { __ as __35 } from "@wordpress/i18n";
|
|
2057
|
-
var initTextStroke = {
|
|
2058
|
-
$$type: "stroke",
|
|
2059
|
-
value: {
|
|
2060
|
-
color: {
|
|
2061
|
-
$$type: "color",
|
|
2062
|
-
value: "#000000"
|
|
2063
|
-
},
|
|
2064
|
-
width: {
|
|
2065
|
-
$$type: "size",
|
|
2066
|
-
value: {
|
|
2067
|
-
unit: "px",
|
|
2068
|
-
size: 1
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
};
|
|
2073
|
-
var TextStrokeField = () => {
|
|
2074
|
-
const [textStroke, setTextStroke] = useStylesField("stroke");
|
|
2075
|
-
const addTextStroke = () => {
|
|
2076
|
-
setTextStroke(initTextStroke);
|
|
2077
|
-
};
|
|
2078
|
-
const removeTextStroke = () => {
|
|
2079
|
-
setTextStroke(null);
|
|
2080
|
-
};
|
|
2081
|
-
const hasTextStroke = Boolean(textStroke);
|
|
2082
|
-
return /* @__PURE__ */ React53.createElement(
|
|
2083
|
-
AddOrRemoveContent,
|
|
2084
|
-
{
|
|
2085
|
-
label: __35("Text Stroke", "elementor"),
|
|
2086
|
-
isAdded: hasTextStroke,
|
|
2087
|
-
onAdd: addTextStroke,
|
|
2088
|
-
onRemove: removeTextStroke
|
|
2089
|
-
},
|
|
2090
|
-
/* @__PURE__ */ React53.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React53.createElement(StrokeControl, null))
|
|
2091
|
-
);
|
|
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))));
|
|
2092
2048
|
};
|
|
2093
2049
|
|
|
2094
|
-
// src/components/style-sections/typography-section/text-
|
|
2050
|
+
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
2095
2051
|
import * as React54 from "react";
|
|
2096
2052
|
import { ControlLabel as ControlLabel27 } from "@elementor/editor-controls";
|
|
2097
|
-
import {
|
|
2053
|
+
import { StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
2098
2054
|
import { Grid as Grid22, ToggleButton as ToggleButtonBase, ToggleButtonGroup } from "@elementor/ui";
|
|
2099
|
-
import { __ as
|
|
2055
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
2100
2056
|
var buttonSize = "tiny";
|
|
2101
|
-
var
|
|
2102
|
-
const [fontStyle, setFontStyle] = useStylesField("font-style");
|
|
2057
|
+
var TextDecorationField = () => {
|
|
2103
2058
|
const [textDecoration, setTextDecoration] = useStylesField("text-decoration");
|
|
2104
|
-
const formats = [
|
|
2105
|
-
const handleSetFontStyle = (newValue) => {
|
|
2106
|
-
if (newValue === null) {
|
|
2107
|
-
return setFontStyle(null);
|
|
2108
|
-
}
|
|
2109
|
-
setFontStyle({
|
|
2110
|
-
$$type: "string",
|
|
2111
|
-
value: newValue
|
|
2112
|
-
});
|
|
2113
|
-
};
|
|
2059
|
+
const formats = [...(textDecoration?.value || "").split(" ")];
|
|
2114
2060
|
const handleSetTextDecoration = (newValue) => {
|
|
2115
2061
|
if (newValue === null) {
|
|
2116
2062
|
return setTextDecoration(null);
|
|
@@ -2120,16 +2066,7 @@ var TextStyleField = () => {
|
|
|
2120
2066
|
value: newValue
|
|
2121
2067
|
});
|
|
2122
2068
|
};
|
|
2123
|
-
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,
|
|
2124
|
-
ToggleButton,
|
|
2125
|
-
{
|
|
2126
|
-
value: "italic",
|
|
2127
|
-
onChange: (v) => handleSetFontStyle(fontStyle?.value === v ? null : v),
|
|
2128
|
-
"aria-label": "italic",
|
|
2129
|
-
sx: { marginLeft: "auto" }
|
|
2130
|
-
},
|
|
2131
|
-
/* @__PURE__ */ React54.createElement(ItalicIcon, { fontSize: buttonSize })
|
|
2132
|
-
), /* @__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(
|
|
2133
2070
|
ShorthandControl,
|
|
2134
2071
|
{
|
|
2135
2072
|
value: "line-through",
|
|
@@ -2174,52 +2111,115 @@ var ToggleButton = ({ onChange, ...props }) => {
|
|
|
2174
2111
|
return /* @__PURE__ */ React54.createElement(ToggleButtonBase, { ...props, onChange: handleChange, size: buttonSize });
|
|
2175
2112
|
};
|
|
2176
2113
|
|
|
2177
|
-
// src/components/style-sections/typography-section/
|
|
2114
|
+
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2178
2115
|
import * as React55 from "react";
|
|
2179
2116
|
import { ControlLabel as ControlLabel28, ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
2180
|
-
import {
|
|
2117
|
+
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
2181
2118
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
2182
|
-
import { __ as
|
|
2119
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
2183
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 = [
|
|
2184
2184
|
{
|
|
2185
2185
|
value: "none",
|
|
2186
|
-
label:
|
|
2187
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2186
|
+
label: __38("None", "elementor"),
|
|
2187
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(MinusIcon3, { fontSize: size }),
|
|
2188
2188
|
showTooltip: true
|
|
2189
2189
|
},
|
|
2190
2190
|
{
|
|
2191
2191
|
value: "capitalize",
|
|
2192
|
-
label:
|
|
2193
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2192
|
+
label: __38("Capitalize", "elementor"),
|
|
2193
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(LetterCaseIcon, { fontSize: size }),
|
|
2194
2194
|
showTooltip: true
|
|
2195
2195
|
},
|
|
2196
2196
|
{
|
|
2197
2197
|
value: "uppercase",
|
|
2198
|
-
label:
|
|
2199
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2198
|
+
label: __38("Uppercase", "elementor"),
|
|
2199
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
2200
2200
|
showTooltip: true
|
|
2201
2201
|
},
|
|
2202
2202
|
{
|
|
2203
2203
|
value: "lowercase",
|
|
2204
|
-
label:
|
|
2205
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2204
|
+
label: __38("Lowercase", "elementor"),
|
|
2205
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
2206
2206
|
showTooltip: true
|
|
2207
2207
|
}
|
|
2208
2208
|
];
|
|
2209
|
-
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 }))));
|
|
2210
2210
|
|
|
2211
2211
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2212
|
-
import * as
|
|
2213
|
-
import { ControlLabel as
|
|
2214
|
-
import { Grid as
|
|
2215
|
-
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";
|
|
2216
2216
|
var WordSpacingField = () => {
|
|
2217
|
-
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))));
|
|
2218
2218
|
};
|
|
2219
2219
|
|
|
2220
2220
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2221
2221
|
var TypographySection = () => {
|
|
2222
|
-
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))));
|
|
2223
2223
|
};
|
|
2224
2224
|
|
|
2225
2225
|
// src/components/style-tab.tsx
|
|
@@ -2229,7 +2229,7 @@ var StyleTab = () => {
|
|
|
2229
2229
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2230
2230
|
const [activeStyleState, setActiveStyleState] = useState7(null);
|
|
2231
2231
|
const breakpoint = useActiveBreakpoint();
|
|
2232
|
-
return /* @__PURE__ */
|
|
2232
|
+
return /* @__PURE__ */ React60.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React60.createElement(
|
|
2233
2233
|
StyleProvider,
|
|
2234
2234
|
{
|
|
2235
2235
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -2240,7 +2240,7 @@ var StyleTab = () => {
|
|
|
2240
2240
|
},
|
|
2241
2241
|
setMetaState: setActiveStyleState
|
|
2242
2242
|
},
|
|
2243
|
-
/* @__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))))
|
|
2244
2244
|
));
|
|
2245
2245
|
};
|
|
2246
2246
|
function useActiveStyleDefId(currentClassesProp) {
|
|
@@ -2272,7 +2272,7 @@ var EditingPanelTabs = () => {
|
|
|
2272
2272
|
return (
|
|
2273
2273
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2274
2274
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2275
|
-
/* @__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))))
|
|
2276
2276
|
);
|
|
2277
2277
|
};
|
|
2278
2278
|
|
|
@@ -2285,8 +2285,8 @@ var EditingPanel = () => {
|
|
|
2285
2285
|
if (!element || !elementType) {
|
|
2286
2286
|
return null;
|
|
2287
2287
|
}
|
|
2288
|
-
const panelTitle =
|
|
2289
|
-
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))))))));
|
|
2290
2290
|
};
|
|
2291
2291
|
|
|
2292
2292
|
// src/panel.ts
|
|
@@ -2353,15 +2353,15 @@ var EditingPanelHooks = () => {
|
|
|
2353
2353
|
};
|
|
2354
2354
|
|
|
2355
2355
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2356
|
-
import * as
|
|
2356
|
+
import * as React65 from "react";
|
|
2357
2357
|
import { useId as useId4 } from "react";
|
|
2358
|
-
import { ControlLabel as
|
|
2358
|
+
import { ControlLabel as ControlLabel31, useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
2359
2359
|
import { DatabaseIcon, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
2360
2360
|
import {
|
|
2361
2361
|
bindPopover as bindPopover2,
|
|
2362
2362
|
bindTrigger as bindTrigger2,
|
|
2363
2363
|
Box as Box5,
|
|
2364
|
-
Divider as
|
|
2364
|
+
Divider as Divider7,
|
|
2365
2365
|
IconButton as IconButton3,
|
|
2366
2366
|
Paper,
|
|
2367
2367
|
Popover as Popover2,
|
|
@@ -2374,7 +2374,7 @@ import {
|
|
|
2374
2374
|
usePopupState as usePopupState3,
|
|
2375
2375
|
useTabs as useTabs2
|
|
2376
2376
|
} from "@elementor/ui";
|
|
2377
|
-
import { __ as
|
|
2377
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
2378
2378
|
|
|
2379
2379
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2380
2380
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -2385,7 +2385,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
2385
2385
|
};
|
|
2386
2386
|
|
|
2387
2387
|
// src/dynamics/dynamic-control.tsx
|
|
2388
|
-
import * as
|
|
2388
|
+
import * as React63 from "react";
|
|
2389
2389
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
2390
2390
|
|
|
2391
2391
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
@@ -2487,17 +2487,17 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2487
2487
|
});
|
|
2488
2488
|
};
|
|
2489
2489
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
2490
|
-
return /* @__PURE__ */
|
|
2490
|
+
return /* @__PURE__ */ React63.createElement(PropProvider3, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React63.createElement(PropKeyProvider3, { bind }, children));
|
|
2491
2491
|
};
|
|
2492
2492
|
|
|
2493
2493
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2494
|
-
import * as
|
|
2494
|
+
import * as React64 from "react";
|
|
2495
2495
|
import { Fragment as Fragment9, useState as useState8 } from "react";
|
|
2496
2496
|
import { useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
2497
2497
|
import { PhotoIcon, SearchIcon } from "@elementor/icons";
|
|
2498
2498
|
import {
|
|
2499
2499
|
Box as Box4,
|
|
2500
|
-
Divider as
|
|
2500
|
+
Divider as Divider6,
|
|
2501
2501
|
InputAdornment,
|
|
2502
2502
|
Link,
|
|
2503
2503
|
ListSubheader as ListSubheader2,
|
|
@@ -2507,7 +2507,7 @@ import {
|
|
|
2507
2507
|
TextField as TextField2,
|
|
2508
2508
|
Typography as Typography4
|
|
2509
2509
|
} from "@elementor/ui";
|
|
2510
|
-
import { __ as
|
|
2510
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
2511
2511
|
var SIZE3 = "tiny";
|
|
2512
2512
|
var DynamicSelection = ({ onSelect }) => {
|
|
2513
2513
|
const [searchValue, setSearchValue] = useState8("");
|
|
@@ -2516,7 +2516,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2516
2516
|
const { bind, value: dynamicValue, setValue } = useBoundProp3(dynamicPropTypeUtil);
|
|
2517
2517
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
2518
2518
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
2519
|
-
const
|
|
2519
|
+
const options11 = useFilteredOptions(searchValue);
|
|
2520
2520
|
const handleSearch = (event) => {
|
|
2521
2521
|
setSearchValue(event.target.value);
|
|
2522
2522
|
};
|
|
@@ -2527,21 +2527,21 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2527
2527
|
setValue({ name: value, settings: {} });
|
|
2528
2528
|
onSelect?.();
|
|
2529
2529
|
};
|
|
2530
|
-
return /* @__PURE__ */
|
|
2530
|
+
return /* @__PURE__ */ React64.createElement(Stack21, null, /* @__PURE__ */ React64.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React64.createElement(
|
|
2531
2531
|
TextField2,
|
|
2532
2532
|
{
|
|
2533
2533
|
fullWidth: true,
|
|
2534
2534
|
size: SIZE3,
|
|
2535
2535
|
value: searchValue,
|
|
2536
2536
|
onChange: handleSearch,
|
|
2537
|
-
placeholder:
|
|
2537
|
+
placeholder: __43("Search dynamic tag", "elementor"),
|
|
2538
2538
|
InputProps: {
|
|
2539
|
-
startAdornment: /* @__PURE__ */
|
|
2539
|
+
startAdornment: /* @__PURE__ */ React64.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React64.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
2540
2540
|
}
|
|
2541
2541
|
}
|
|
2542
|
-
)), /* @__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 }) => {
|
|
2543
2543
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
2544
|
-
return /* @__PURE__ */
|
|
2544
|
+
return /* @__PURE__ */ React64.createElement(
|
|
2545
2545
|
MenuItem2,
|
|
2546
2546
|
{
|
|
2547
2547
|
key: value,
|
|
@@ -2552,7 +2552,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2552
2552
|
},
|
|
2553
2553
|
tagLabel
|
|
2554
2554
|
);
|
|
2555
|
-
})))) : /* @__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(
|
|
2556
2556
|
Link,
|
|
2557
2557
|
{
|
|
2558
2558
|
color: "secondary",
|
|
@@ -2560,12 +2560,12 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2560
2560
|
component: "button",
|
|
2561
2561
|
onClick: () => setSearchValue("")
|
|
2562
2562
|
},
|
|
2563
|
-
|
|
2564
|
-
), "\xA0",
|
|
2563
|
+
__43("Clear the filters", "elementor")
|
|
2564
|
+
), "\xA0", __43("and try again.", "elementor")))));
|
|
2565
2565
|
};
|
|
2566
2566
|
var useFilteredOptions = (searchValue) => {
|
|
2567
2567
|
const dynamicTags = usePropDynamicTags();
|
|
2568
|
-
const
|
|
2568
|
+
const options11 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
2569
2569
|
const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
2570
2570
|
if (!isVisible) {
|
|
2571
2571
|
return categories;
|
|
@@ -2576,7 +2576,7 @@ var useFilteredOptions = (searchValue) => {
|
|
|
2576
2576
|
categories.get(group)?.push({ label, value: name });
|
|
2577
2577
|
return categories;
|
|
2578
2578
|
}, /* @__PURE__ */ new Map());
|
|
2579
|
-
return [...
|
|
2579
|
+
return [...options11];
|
|
2580
2580
|
};
|
|
2581
2581
|
|
|
2582
2582
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
@@ -2595,25 +2595,25 @@ var DynamicSelectionControl = () => {
|
|
|
2595
2595
|
if (!dynamicTag) {
|
|
2596
2596
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
2597
2597
|
}
|
|
2598
|
-
return /* @__PURE__ */
|
|
2598
|
+
return /* @__PURE__ */ React65.createElement(Box5, null, /* @__PURE__ */ React65.createElement(
|
|
2599
2599
|
Tag,
|
|
2600
2600
|
{
|
|
2601
2601
|
fullWidth: true,
|
|
2602
2602
|
showActionsOnHover: true,
|
|
2603
2603
|
label: dynamicTag.label,
|
|
2604
|
-
startIcon: /* @__PURE__ */
|
|
2604
|
+
startIcon: /* @__PURE__ */ React65.createElement(DatabaseIcon, { fontSize: SIZE4 }),
|
|
2605
2605
|
...bindTrigger2(selectionPopoverState),
|
|
2606
|
-
actions: /* @__PURE__ */
|
|
2606
|
+
actions: /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React65.createElement(
|
|
2607
2607
|
IconButton3,
|
|
2608
2608
|
{
|
|
2609
2609
|
size: SIZE4,
|
|
2610
2610
|
onClick: removeDynamicTag,
|
|
2611
|
-
"aria-label":
|
|
2611
|
+
"aria-label": __44("Remove dynamic value", "elementor")
|
|
2612
2612
|
},
|
|
2613
|
-
/* @__PURE__ */
|
|
2613
|
+
/* @__PURE__ */ React65.createElement(XIcon2, { fontSize: SIZE4 })
|
|
2614
2614
|
))
|
|
2615
2615
|
}
|
|
2616
|
-
), /* @__PURE__ */
|
|
2616
|
+
), /* @__PURE__ */ React65.createElement(
|
|
2617
2617
|
Popover2,
|
|
2618
2618
|
{
|
|
2619
2619
|
disablePortal: true,
|
|
@@ -2621,7 +2621,7 @@ var DynamicSelectionControl = () => {
|
|
|
2621
2621
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2622
2622
|
...bindPopover2(selectionPopoverState)
|
|
2623
2623
|
},
|
|
2624
|
-
/* @__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 }))
|
|
2625
2625
|
));
|
|
2626
2626
|
};
|
|
2627
2627
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -2631,22 +2631,22 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
2631
2631
|
if (!hasDynamicSettings) {
|
|
2632
2632
|
return null;
|
|
2633
2633
|
}
|
|
2634
|
-
return /* @__PURE__ */
|
|
2634
|
+
return /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
|
|
2635
2635
|
IconButton3,
|
|
2636
2636
|
{
|
|
2637
2637
|
size: SIZE4,
|
|
2638
2638
|
...bindTrigger2(settingsPopupState),
|
|
2639
|
-
"aria-label":
|
|
2639
|
+
"aria-label": __44("Settings", "elementor")
|
|
2640
2640
|
},
|
|
2641
|
-
/* @__PURE__ */
|
|
2642
|
-
), /* @__PURE__ */
|
|
2641
|
+
/* @__PURE__ */ React65.createElement(SettingsIcon, { fontSize: SIZE4 })
|
|
2642
|
+
), /* @__PURE__ */ React65.createElement(
|
|
2643
2643
|
Popover2,
|
|
2644
2644
|
{
|
|
2645
2645
|
disableScrollLock: true,
|
|
2646
2646
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2647
2647
|
...bindPopover2(settingsPopupState)
|
|
2648
2648
|
},
|
|
2649
|
-
/* @__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 }))
|
|
2650
2650
|
));
|
|
2651
2651
|
};
|
|
2652
2652
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -2655,10 +2655,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
2655
2655
|
if (!tabs.length) {
|
|
2656
2656
|
return null;
|
|
2657
2657
|
}
|
|
2658
|
-
return /* @__PURE__ */
|
|
2659
|
-
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) => {
|
|
2660
2660
|
if (item.type === "control") {
|
|
2661
|
-
return /* @__PURE__ */
|
|
2661
|
+
return /* @__PURE__ */ React65.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
2662
2662
|
}
|
|
2663
2663
|
return null;
|
|
2664
2664
|
})));
|
|
@@ -2668,22 +2668,22 @@ var Control3 = ({ control }) => {
|
|
|
2668
2668
|
if (!getControlByType(control.type)) {
|
|
2669
2669
|
return null;
|
|
2670
2670
|
}
|
|
2671
|
-
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 }));
|
|
2672
2672
|
};
|
|
2673
2673
|
|
|
2674
2674
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2675
|
-
import * as
|
|
2675
|
+
import * as React66 from "react";
|
|
2676
2676
|
import { useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
2677
2677
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
2678
|
-
import { __ as
|
|
2678
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
2679
2679
|
var usePropDynamicAction = () => {
|
|
2680
2680
|
const { propType } = useBoundProp5();
|
|
2681
2681
|
const visible = !!propType && supportsDynamic(propType);
|
|
2682
2682
|
return {
|
|
2683
2683
|
visible,
|
|
2684
2684
|
icon: DatabaseIcon2,
|
|
2685
|
-
title:
|
|
2686
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
2685
|
+
title: __45("Dynamic Tags", "elementor"),
|
|
2686
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React66.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2687
2687
|
};
|
|
2688
2688
|
};
|
|
2689
2689
|
|