@elementor/editor-editing-panel 1.11.1 → 1.13.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 +45 -0
- package/dist/index.js +431 -426
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +383 -378
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/components/add-or-remove-content.tsx +5 -3
- package/src/components/collapsible-content.tsx +2 -1
- 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/popover-content.tsx +15 -0
- package/src/components/section-content.tsx +16 -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 +5 -4
- 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/effects-section/effects-section.tsx +3 -3
- package/src/components/style-sections/layout-section/flex-order-field.tsx +4 -3
- package/src/components/style-sections/layout-section/flex-size-field.tsx +4 -3
- package/src/components/style-sections/layout-section/layout-section.tsx +6 -5
- package/src/components/style-sections/position-section/position-field.tsx +1 -1
- package/src/components/style-sections/position-section/position-section.tsx +3 -3
- package/src/components/style-sections/size-section/overflow-field.tsx +2 -2
- package/src/components/style-sections/size-section/size-section.tsx +10 -8
- package/src/components/style-sections/spacing-section/spacing-section.tsx +5 -4
- 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 +12 -9
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +1 -1
- package/src/controls-registry/settings-field.tsx +1 -7
- package/src/dynamics/components/dynamic-selection-control.tsx +4 -3
- package/src/dynamics/components/dynamic-selection.tsx +5 -4
package/dist/index.js
CHANGED
|
@@ -32,12 +32,12 @@ var index_exports = {};
|
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
34
34
|
replaceControl: () => replaceControl,
|
|
35
|
-
useBoundProp: () =>
|
|
35
|
+
useBoundProp: () => import_editor_controls48.useBoundProp,
|
|
36
36
|
usePanelActions: () => usePanelActions,
|
|
37
37
|
usePanelStatus: () => usePanelStatus
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(index_exports);
|
|
40
|
-
var
|
|
40
|
+
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
41
41
|
|
|
42
42
|
// src/control-replacement.tsx
|
|
43
43
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
@@ -136,7 +136,7 @@ var import_ui = require("@elementor/ui");
|
|
|
136
136
|
function MultiCombobox({
|
|
137
137
|
actions = [],
|
|
138
138
|
selected,
|
|
139
|
-
options:
|
|
139
|
+
options: options11,
|
|
140
140
|
onSelect,
|
|
141
141
|
...props
|
|
142
142
|
}) {
|
|
@@ -154,14 +154,14 @@ function MultiCombobox({
|
|
|
154
154
|
handleHomeEndKeys: true,
|
|
155
155
|
disabled: loading,
|
|
156
156
|
value: selected,
|
|
157
|
-
options:
|
|
157
|
+
options: options11,
|
|
158
158
|
renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
|
|
159
159
|
renderInput: (params) => /* @__PURE__ */ React4.createElement(import_ui.TextField, { ...params }),
|
|
160
160
|
onChange: (_, selectedOrInputValue, reason) => {
|
|
161
161
|
const inputValue = selectedOrInputValue.find((option) => typeof option === "string");
|
|
162
162
|
const optionsAndActions = selectedOrInputValue.filter((option) => typeof option !== "string");
|
|
163
163
|
if (reason === "createOption") {
|
|
164
|
-
const [firstAction] = filterActions(actions, { options:
|
|
164
|
+
const [firstAction] = filterActions(actions, { options: options11, inputValue: inputValue ?? "" });
|
|
165
165
|
if (firstAction) {
|
|
166
166
|
return run(firstAction.apply, firstAction.value);
|
|
167
167
|
}
|
|
@@ -170,7 +170,7 @@ function MultiCombobox({
|
|
|
170
170
|
if (reason === "selectOption" && action) {
|
|
171
171
|
return run(action.apply, action.value);
|
|
172
172
|
}
|
|
173
|
-
const fixedValues =
|
|
173
|
+
const fixedValues = options11.filter((option) => !!option.fixed);
|
|
174
174
|
onSelect?.([.../* @__PURE__ */ new Set([...optionsAndActions, ...fixedValues])]);
|
|
175
175
|
},
|
|
176
176
|
getOptionLabel: (option) => typeof option === "string" ? option : option.label,
|
|
@@ -227,8 +227,8 @@ function useActionRunner() {
|
|
|
227
227
|
};
|
|
228
228
|
return { run, loading };
|
|
229
229
|
}
|
|
230
|
-
function filterActions(actions, { options:
|
|
231
|
-
return actions.filter((action) => action.condition(
|
|
230
|
+
function filterActions(actions, { options: options11, inputValue }) {
|
|
231
|
+
return actions.filter((action) => action.condition(options11, inputValue)).map((action, index) => ({
|
|
232
232
|
label: action.label(inputValue),
|
|
233
233
|
value: inputValue,
|
|
234
234
|
group: action.group,
|
|
@@ -457,6 +457,7 @@ var validateLabel = (newLabel) => {
|
|
|
457
457
|
if (import_editor_styles_repository3.stylesRepository.isLabelExist(newLabel)) {
|
|
458
458
|
return (0, import_i18n2.__)("Existing name", "elementor");
|
|
459
459
|
}
|
|
460
|
+
return null;
|
|
460
461
|
};
|
|
461
462
|
|
|
462
463
|
// src/components/css-classes/css-class-selector.tsx
|
|
@@ -471,19 +472,19 @@ var EMPTY_OPTION = {
|
|
|
471
472
|
};
|
|
472
473
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = (0, import_locations.createLocation)();
|
|
473
474
|
function CssClassSelector() {
|
|
474
|
-
const
|
|
475
|
+
const options11 = useOptions();
|
|
475
476
|
const { value: appliedIds, setValue: setAppliedIds, pushValue: pushAppliedId } = useAppliedClassesIds();
|
|
476
477
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
477
478
|
const actions = useCreateActions({ pushAppliedId, setActiveId });
|
|
478
479
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
479
|
-
const applied = useAppliedOptions(
|
|
480
|
+
const applied = useAppliedOptions(options11, appliedIds);
|
|
480
481
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
481
482
|
return /* @__PURE__ */ React7.createElement(import_ui4.Stack, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(import_ui4.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(import_ui4.Typography, { component: "label", variant: "caption", htmlFor: ID }, (0, import_i18n3.__)("CSS Classes", "elementor")), /* @__PURE__ */ React7.createElement(import_ui4.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
482
483
|
MultiCombobox,
|
|
483
484
|
{
|
|
484
485
|
id: ID,
|
|
485
486
|
size: "tiny",
|
|
486
|
-
options:
|
|
487
|
+
options: options11,
|
|
487
488
|
selected: applied,
|
|
488
489
|
onSelect: handleApply,
|
|
489
490
|
limitTags: TAGS_LIMIT,
|
|
@@ -558,19 +559,14 @@ function useCreateActions({
|
|
|
558
559
|
pushAppliedId(createdId);
|
|
559
560
|
setActiveId(createdId);
|
|
560
561
|
},
|
|
561
|
-
condition: (
|
|
562
|
-
const isUniqueLabel = !options10.some(
|
|
563
|
-
(option) => option.label.toLowerCase() === inputValue.toLowerCase()
|
|
564
|
-
);
|
|
565
|
-
return !!inputValue && isUniqueLabel;
|
|
566
|
-
},
|
|
562
|
+
condition: (_, inputValue) => import_editor_styles_repository4.stylesRepository.isLabelValid(inputValue) && !import_editor_styles_repository4.stylesRepository.isLabelExist(inputValue),
|
|
567
563
|
// translators: %s is the singular label of css class provider (e.g "Global CSS Class").
|
|
568
564
|
group: (0, import_i18n3.__)("Create New %s", "elementor").replace("%s", provider.labels?.singular ?? "")
|
|
569
565
|
};
|
|
570
566
|
});
|
|
571
567
|
}
|
|
572
|
-
function useAppliedOptions(
|
|
573
|
-
const applied =
|
|
568
|
+
function useAppliedOptions(options11, appliedIds) {
|
|
569
|
+
const applied = options11.filter((option) => appliedIds.includes(option.value));
|
|
574
570
|
const hasElementsProviderStyleApplied = applied.some(
|
|
575
571
|
(option) => option.provider === import_editor_styles_repository4.ELEMENTS_STYLES_PROVIDER_KEY
|
|
576
572
|
);
|
|
@@ -626,13 +622,13 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
626
622
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
627
623
|
|
|
628
624
|
// src/components/editing-panel.tsx
|
|
629
|
-
var
|
|
630
|
-
var
|
|
625
|
+
var React63 = __toESM(require("react"));
|
|
626
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
631
627
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
632
628
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
633
629
|
var import_session4 = require("@elementor/session");
|
|
634
|
-
var
|
|
635
|
-
var
|
|
630
|
+
var import_ui48 = require("@elementor/ui");
|
|
631
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
636
632
|
|
|
637
633
|
// src/controls-actions.ts
|
|
638
634
|
var import_menus = require("@elementor/menus");
|
|
@@ -647,7 +643,7 @@ function PopoverAction({
|
|
|
647
643
|
title,
|
|
648
644
|
visible = true,
|
|
649
645
|
icon: Icon,
|
|
650
|
-
popoverContent:
|
|
646
|
+
popoverContent: PopoverContent2
|
|
651
647
|
}) {
|
|
652
648
|
const id = (0, import_react6.useId)();
|
|
653
649
|
const popupState = (0, import_ui5.usePopupState)({
|
|
@@ -669,7 +665,7 @@ function PopoverAction({
|
|
|
669
665
|
...(0, import_ui5.bindPopover)(popupState)
|
|
670
666
|
},
|
|
671
667
|
/* @__PURE__ */ React8.createElement(import_ui5.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React8.createElement(Icon, { fontSize: SIZE, sx: { mr: 0.5 } }), /* @__PURE__ */ React8.createElement(import_ui5.Typography, { variant: "subtitle2" }, title), /* @__PURE__ */ React8.createElement(import_ui5.IconButton, { sx: { ml: "auto" }, size: SIZE, onClick: popupState.close }, /* @__PURE__ */ React8.createElement(import_icons2.XIcon, { fontSize: SIZE }))),
|
|
672
|
-
/* @__PURE__ */ React8.createElement(
|
|
668
|
+
/* @__PURE__ */ React8.createElement(PopoverContent2, { closePopover: popupState.close })
|
|
673
669
|
));
|
|
674
670
|
}
|
|
675
671
|
|
|
@@ -688,10 +684,10 @@ function EditorPanelErrorFallback() {
|
|
|
688
684
|
}
|
|
689
685
|
|
|
690
686
|
// src/components/editing-panel-tabs.tsx
|
|
691
|
-
var
|
|
687
|
+
var React62 = __toESM(require("react"));
|
|
692
688
|
var import_react14 = require("react");
|
|
693
|
-
var
|
|
694
|
-
var
|
|
689
|
+
var import_ui47 = require("@elementor/ui");
|
|
690
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
695
691
|
|
|
696
692
|
// src/components/settings-tab.tsx
|
|
697
693
|
var React15 = __toESM(require("react"));
|
|
@@ -774,12 +770,8 @@ var createTopLevelOjectType = ({ schema }) => {
|
|
|
774
770
|
var SettingsField = ({ bind, children }) => {
|
|
775
771
|
const { element, elementType } = useElement();
|
|
776
772
|
const settingsValue = (0, import_editor_elements3.useElementSetting)(element.id, bind);
|
|
777
|
-
const linkValue = (0, import_editor_elements3.useElementSetting)(element.id, "link");
|
|
778
773
|
const value = { [bind]: settingsValue };
|
|
779
774
|
const propType = createTopLevelOjectType({ schema: elementType.propsSchema });
|
|
780
|
-
if (bind === "tag" && linkValue?.value && "div-block" === elementType.key) {
|
|
781
|
-
return null;
|
|
782
|
-
}
|
|
783
775
|
const setValue = (newValue) => {
|
|
784
776
|
(0, import_editor_elements3.updateElementSettings)({
|
|
785
777
|
id: element.id,
|
|
@@ -857,13 +849,13 @@ var Control2 = ({ control }) => {
|
|
|
857
849
|
};
|
|
858
850
|
|
|
859
851
|
// src/components/style-tab.tsx
|
|
860
|
-
var
|
|
852
|
+
var React61 = __toESM(require("react"));
|
|
861
853
|
var import_react13 = require("react");
|
|
862
854
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
863
855
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
864
856
|
var import_session3 = require("@elementor/session");
|
|
865
|
-
var
|
|
866
|
-
var
|
|
857
|
+
var import_ui46 = require("@elementor/ui");
|
|
858
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
867
859
|
|
|
868
860
|
// src/components/style-sections/background-section/background-section.tsx
|
|
869
861
|
var React17 = __toESM(require("react"));
|
|
@@ -1029,22 +1021,31 @@ var BackgroundSection = () => {
|
|
|
1029
1021
|
};
|
|
1030
1022
|
|
|
1031
1023
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1032
|
-
var
|
|
1033
|
-
|
|
1024
|
+
var React27 = __toESM(require("react"));
|
|
1025
|
+
|
|
1026
|
+
// src/components/panel-divider.tsx
|
|
1027
|
+
var React18 = __toESM(require("react"));
|
|
1028
|
+
var import_ui11 = require("@elementor/ui");
|
|
1029
|
+
var PanelDivider = () => /* @__PURE__ */ React18.createElement(import_ui11.Divider, { sx: { my: 0.5 } });
|
|
1030
|
+
|
|
1031
|
+
// src/components/section-content.tsx
|
|
1032
|
+
var React19 = __toESM(require("react"));
|
|
1033
|
+
var import_ui12 = require("@elementor/ui");
|
|
1034
|
+
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React19.createElement(import_ui12.Stack, { gap, sx: { ...sx } }, children);
|
|
1034
1035
|
|
|
1035
1036
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1036
|
-
var
|
|
1037
|
+
var React24 = __toESM(require("react"));
|
|
1037
1038
|
var import_i18n8 = require("@wordpress/i18n");
|
|
1038
1039
|
|
|
1039
1040
|
// src/components/add-or-remove-content.tsx
|
|
1040
|
-
var
|
|
1041
|
+
var React20 = __toESM(require("react"));
|
|
1041
1042
|
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
1042
1043
|
var import_icons4 = require("@elementor/icons");
|
|
1043
|
-
var
|
|
1044
|
+
var import_ui13 = require("@elementor/ui");
|
|
1044
1045
|
var SIZE2 = "tiny";
|
|
1045
1046
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
1046
|
-
return /* @__PURE__ */
|
|
1047
|
-
|
|
1047
|
+
return /* @__PURE__ */ React20.createElement(SectionContent, null, /* @__PURE__ */ React20.createElement(
|
|
1048
|
+
import_ui13.Stack,
|
|
1048
1049
|
{
|
|
1049
1050
|
direction: "row",
|
|
1050
1051
|
sx: {
|
|
@@ -1052,24 +1053,24 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1052
1053
|
alignItems: "center"
|
|
1053
1054
|
}
|
|
1054
1055
|
},
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
isAdded ? /* @__PURE__ */
|
|
1057
|
-
), /* @__PURE__ */
|
|
1056
|
+
/* @__PURE__ */ React20.createElement(import_editor_controls7.ControlLabel, null, label),
|
|
1057
|
+
isAdded ? /* @__PURE__ */ React20.createElement(import_ui13.IconButton, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React20.createElement(import_icons4.MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React20.createElement(import_ui13.IconButton, { size: SIZE2, onClick: onAdd, "aria-label": "Add" }, /* @__PURE__ */ React20.createElement(import_icons4.PlusIcon, { fontSize: SIZE2 }))
|
|
1058
|
+
), /* @__PURE__ */ React20.createElement(import_ui13.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React20.createElement(SectionContent, null, children)));
|
|
1058
1059
|
};
|
|
1059
1060
|
|
|
1060
1061
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
1061
|
-
var
|
|
1062
|
+
var React21 = __toESM(require("react"));
|
|
1062
1063
|
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
1063
|
-
var
|
|
1064
|
+
var import_ui14 = require("@elementor/ui");
|
|
1064
1065
|
var import_i18n5 = require("@wordpress/i18n");
|
|
1065
1066
|
var BorderColorField = () => {
|
|
1066
|
-
return /* @__PURE__ */
|
|
1067
|
+
return /* @__PURE__ */ React21.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React21.createElement(import_ui14.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React21.createElement(import_ui14.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(import_editor_controls8.ControlLabel, null, (0, import_i18n5.__)("Border color", "elementor"))), /* @__PURE__ */ React21.createElement(import_ui14.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(import_editor_controls8.ColorControl, null))));
|
|
1067
1068
|
};
|
|
1068
1069
|
|
|
1069
1070
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1070
|
-
var
|
|
1071
|
+
var React22 = __toESM(require("react"));
|
|
1071
1072
|
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
1072
|
-
var
|
|
1073
|
+
var import_ui15 = require("@elementor/ui");
|
|
1073
1074
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1074
1075
|
var borderStyles = [
|
|
1075
1076
|
{ value: "none", label: (0, import_i18n6.__)("None", "elementor") },
|
|
@@ -1083,11 +1084,11 @@ var borderStyles = [
|
|
|
1083
1084
|
{ value: "outset", label: (0, import_i18n6.__)("Outset", "elementor") }
|
|
1084
1085
|
];
|
|
1085
1086
|
var BorderStyleField = () => {
|
|
1086
|
-
return /* @__PURE__ */
|
|
1087
|
+
return /* @__PURE__ */ React22.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React22.createElement(import_ui15.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(import_ui15.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React22.createElement(import_editor_controls9.ControlLabel, null, (0, import_i18n6.__)("Border type", "elementor"))), /* @__PURE__ */ React22.createElement(import_ui15.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React22.createElement(import_editor_controls9.SelectControl, { options: borderStyles }))));
|
|
1087
1088
|
};
|
|
1088
1089
|
|
|
1089
1090
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1090
|
-
var
|
|
1091
|
+
var React23 = __toESM(require("react"));
|
|
1091
1092
|
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
1092
1093
|
var import_editor_props2 = require("@elementor/editor-props");
|
|
1093
1094
|
var import_icons5 = require("@elementor/icons");
|
|
@@ -1095,32 +1096,32 @@ var import_i18n7 = require("@wordpress/i18n");
|
|
|
1095
1096
|
var edges = [
|
|
1096
1097
|
{
|
|
1097
1098
|
label: (0, import_i18n7.__)("Top", "elementor"),
|
|
1098
|
-
icon: /* @__PURE__ */
|
|
1099
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons5.SideTopIcon, { fontSize: "tiny" }),
|
|
1099
1100
|
bind: "top"
|
|
1100
1101
|
},
|
|
1101
1102
|
{
|
|
1102
1103
|
label: (0, import_i18n7.__)("Right", "elementor"),
|
|
1103
|
-
icon: /* @__PURE__ */
|
|
1104
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons5.SideRightIcon, { fontSize: "tiny" }),
|
|
1104
1105
|
bind: "right"
|
|
1105
1106
|
},
|
|
1106
1107
|
{
|
|
1107
1108
|
label: (0, import_i18n7.__)("Bottom", "elementor"),
|
|
1108
|
-
icon: /* @__PURE__ */
|
|
1109
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons5.SideBottomIcon, { fontSize: "tiny" }),
|
|
1109
1110
|
bind: "bottom"
|
|
1110
1111
|
},
|
|
1111
1112
|
{
|
|
1112
1113
|
label: (0, import_i18n7.__)("Left", "elementor"),
|
|
1113
|
-
icon: /* @__PURE__ */
|
|
1114
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons5.SideLeftIcon, { fontSize: "tiny" }),
|
|
1114
1115
|
bind: "left"
|
|
1115
1116
|
}
|
|
1116
1117
|
];
|
|
1117
1118
|
var BorderWidthField = () => {
|
|
1118
|
-
return /* @__PURE__ */
|
|
1119
|
+
return /* @__PURE__ */ React23.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React23.createElement(
|
|
1119
1120
|
import_editor_controls10.EqualUnequalSizesControl,
|
|
1120
1121
|
{
|
|
1121
1122
|
items: edges,
|
|
1122
|
-
label: (0, import_i18n7.__)("Border
|
|
1123
|
-
icon: /* @__PURE__ */
|
|
1123
|
+
label: (0, import_i18n7.__)("Border width", "elementor"),
|
|
1124
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons5.SideAllIcon, { fontSize: "tiny" }),
|
|
1124
1125
|
multiSizePropTypeUtil: import_editor_props2.borderWidthPropTypeUtil
|
|
1125
1126
|
}
|
|
1126
1127
|
));
|
|
@@ -1145,7 +1146,7 @@ var BorderField = () => {
|
|
|
1145
1146
|
});
|
|
1146
1147
|
};
|
|
1147
1148
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
1148
|
-
return /* @__PURE__ */
|
|
1149
|
+
return /* @__PURE__ */ React24.createElement(
|
|
1149
1150
|
AddOrRemoveContent,
|
|
1150
1151
|
{
|
|
1151
1152
|
label: (0, import_i18n8.__)("Border", "elementor"),
|
|
@@ -1153,32 +1154,32 @@ var BorderField = () => {
|
|
|
1153
1154
|
onAdd: addBorder,
|
|
1154
1155
|
onRemove: removeBorder
|
|
1155
1156
|
},
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
/* @__PURE__ */
|
|
1158
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ React24.createElement(BorderWidthField, null),
|
|
1158
|
+
/* @__PURE__ */ React24.createElement(BorderColorField, null),
|
|
1159
|
+
/* @__PURE__ */ React24.createElement(BorderStyleField, null)
|
|
1159
1160
|
);
|
|
1160
1161
|
};
|
|
1161
1162
|
|
|
1162
1163
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1163
|
-
var
|
|
1164
|
+
var React26 = __toESM(require("react"));
|
|
1164
1165
|
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
1165
1166
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
1166
1167
|
var import_icons6 = require("@elementor/icons");
|
|
1167
|
-
var
|
|
1168
|
+
var import_ui18 = require("@elementor/ui");
|
|
1168
1169
|
var import_i18n9 = require("@wordpress/i18n");
|
|
1169
1170
|
|
|
1170
1171
|
// src/hooks/use-direction.ts
|
|
1171
|
-
var
|
|
1172
|
+
var import_ui16 = require("@elementor/ui");
|
|
1172
1173
|
function useDirection() {
|
|
1173
|
-
const theme = (0,
|
|
1174
|
+
const theme = (0, import_ui16.useTheme)(), extendedWindow = window;
|
|
1174
1175
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
1175
1176
|
return { isSiteRtl, isUiRtl };
|
|
1176
1177
|
}
|
|
1177
1178
|
|
|
1178
1179
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1179
|
-
var
|
|
1180
|
+
var React25 = __toESM(require("react"));
|
|
1180
1181
|
var import_react9 = require("react");
|
|
1181
|
-
var
|
|
1182
|
+
var import_ui17 = require("@elementor/ui");
|
|
1182
1183
|
var CLOCKWISE_ANGLES = {
|
|
1183
1184
|
row: 0,
|
|
1184
1185
|
column: 90,
|
|
@@ -1194,11 +1195,11 @@ var COUNTER_CLOCKWISE_ANGLES = {
|
|
|
1194
1195
|
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1195
1196
|
const rotate = (0, import_react9.useRef)(useGetTargetAngle(isClockwise, offset));
|
|
1196
1197
|
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1197
|
-
return /* @__PURE__ */
|
|
1198
|
+
return /* @__PURE__ */ React25.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1198
1199
|
};
|
|
1199
1200
|
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1200
1201
|
const [direction] = useStylesField("flex-direction");
|
|
1201
|
-
const isRtl = "rtl" === (0,
|
|
1202
|
+
const isRtl = "rtl" === (0, import_ui17.useTheme)().direction;
|
|
1202
1203
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1203
1204
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1204
1205
|
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
@@ -1209,65 +1210,63 @@ var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
|
1209
1210
|
};
|
|
1210
1211
|
|
|
1211
1212
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1212
|
-
var StartStartIcon = (0,
|
|
1213
|
-
var StartEndIcon = (0,
|
|
1214
|
-
var EndStartIcon = (0,
|
|
1215
|
-
var EndEndIcon = (0,
|
|
1216
|
-
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n9.__)("Top
|
|
1217
|
-
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n9.__)("Top
|
|
1218
|
-
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n9.__)("Bottom
|
|
1219
|
-
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n9.__)("Bottom
|
|
1213
|
+
var StartStartIcon = (0, import_ui18.withDirection)(import_icons6.RadiusTopLeftIcon);
|
|
1214
|
+
var StartEndIcon = (0, import_ui18.withDirection)(import_icons6.RadiusTopRightIcon);
|
|
1215
|
+
var EndStartIcon = (0, import_ui18.withDirection)(import_icons6.RadiusBottomLeftIcon);
|
|
1216
|
+
var EndEndIcon = (0, import_ui18.withDirection)(import_icons6.RadiusBottomRightIcon);
|
|
1217
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n9.__)("Top right", "elementor") : (0, import_i18n9.__)("Top left", "elementor");
|
|
1218
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n9.__)("Top left", "elementor") : (0, import_i18n9.__)("Top right", "elementor");
|
|
1219
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n9.__)("Bottom right", "elementor") : (0, import_i18n9.__)("Bottom left", "elementor");
|
|
1220
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n9.__)("Bottom left", "elementor") : (0, import_i18n9.__)("Bottom right", "elementor");
|
|
1220
1221
|
var getCorners = (isSiteRtl) => [
|
|
1221
1222
|
{
|
|
1222
1223
|
label: getStartStartLabel(isSiteRtl),
|
|
1223
|
-
icon: /* @__PURE__ */
|
|
1224
|
+
icon: /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: StartStartIcon, size: "tiny" }),
|
|
1224
1225
|
bind: "start-start"
|
|
1225
1226
|
},
|
|
1226
1227
|
{
|
|
1227
1228
|
label: getStartEndLabel(isSiteRtl),
|
|
1228
|
-
icon: /* @__PURE__ */
|
|
1229
|
+
icon: /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: StartEndIcon, size: "tiny" }),
|
|
1229
1230
|
bind: "start-end"
|
|
1230
1231
|
},
|
|
1231
1232
|
{
|
|
1232
1233
|
label: getEndEndLabel(isSiteRtl),
|
|
1233
|
-
icon: /* @__PURE__ */
|
|
1234
|
+
icon: /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: EndEndIcon, size: "tiny" }),
|
|
1234
1235
|
bind: "end-end"
|
|
1235
1236
|
},
|
|
1236
1237
|
{
|
|
1237
1238
|
label: getEndStartLabel(isSiteRtl),
|
|
1238
|
-
icon: /* @__PURE__ */
|
|
1239
|
+
icon: /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: EndStartIcon, size: "tiny" }),
|
|
1239
1240
|
bind: "end-start"
|
|
1240
1241
|
}
|
|
1241
1242
|
];
|
|
1242
1243
|
var BorderRadiusField = () => {
|
|
1243
1244
|
const { isSiteRtl } = useDirection();
|
|
1244
|
-
return /* @__PURE__ */
|
|
1245
|
+
return /* @__PURE__ */ React26.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React26.createElement(
|
|
1245
1246
|
import_editor_controls11.EqualUnequalSizesControl,
|
|
1246
1247
|
{
|
|
1247
1248
|
items: getCorners(isSiteRtl),
|
|
1248
|
-
label: (0, import_i18n9.__)("Border
|
|
1249
|
-
icon: /* @__PURE__ */
|
|
1249
|
+
label: (0, import_i18n9.__)("Border radius", "elementor"),
|
|
1250
|
+
icon: /* @__PURE__ */ React26.createElement(import_icons6.BorderCornersIcon, { fontSize: "tiny" }),
|
|
1250
1251
|
multiSizePropTypeUtil: import_editor_props3.borderRadiusPropTypeUtil
|
|
1251
1252
|
}
|
|
1252
1253
|
));
|
|
1253
1254
|
};
|
|
1254
1255
|
|
|
1255
1256
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1256
|
-
var BorderSection = () => /* @__PURE__ */
|
|
1257
|
+
var BorderSection = () => /* @__PURE__ */ React27.createElement(SectionContent, null, /* @__PURE__ */ React27.createElement(BorderRadiusField, null), /* @__PURE__ */ React27.createElement(PanelDivider, null), /* @__PURE__ */ React27.createElement(BorderField, null));
|
|
1257
1258
|
|
|
1258
1259
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
1259
|
-
var
|
|
1260
|
+
var React28 = __toESM(require("react"));
|
|
1260
1261
|
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
1261
|
-
var import_ui18 = require("@elementor/ui");
|
|
1262
1262
|
var EffectsSection = () => {
|
|
1263
|
-
return /* @__PURE__ */
|
|
1263
|
+
return /* @__PURE__ */ React28.createElement(SectionContent, null, /* @__PURE__ */ React28.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React28.createElement(import_editor_controls12.BoxShadowRepeaterControl, null)));
|
|
1264
1264
|
};
|
|
1265
1265
|
|
|
1266
1266
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1267
|
-
var
|
|
1267
|
+
var React38 = __toESM(require("react"));
|
|
1268
1268
|
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
1269
1269
|
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
1270
|
-
var import_ui28 = require("@elementor/ui");
|
|
1271
1270
|
var import_i18n19 = require("@wordpress/i18n");
|
|
1272
1271
|
|
|
1273
1272
|
// src/hooks/use-computed-style.ts
|
|
@@ -1296,7 +1295,7 @@ function useComputedStyle(elementId) {
|
|
|
1296
1295
|
}
|
|
1297
1296
|
|
|
1298
1297
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1299
|
-
var
|
|
1298
|
+
var React29 = __toESM(require("react"));
|
|
1300
1299
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
1301
1300
|
var import_icons7 = require("@elementor/icons");
|
|
1302
1301
|
var import_ui19 = require("@elementor/ui");
|
|
@@ -1311,35 +1310,35 @@ var options = [
|
|
|
1311
1310
|
{
|
|
1312
1311
|
value: "start",
|
|
1313
1312
|
label: (0, import_i18n10.__)("Start", "elementor"),
|
|
1314
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1313
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1315
1314
|
showTooltip: true
|
|
1316
1315
|
},
|
|
1317
1316
|
{
|
|
1318
1317
|
value: "center",
|
|
1319
1318
|
label: (0, import_i18n10.__)("Center", "elementor"),
|
|
1320
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1319
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: import_icons7.LayoutAlignCenterIcon, size, ...iconProps }),
|
|
1321
1320
|
showTooltip: true
|
|
1322
1321
|
},
|
|
1323
1322
|
{
|
|
1324
1323
|
value: "end",
|
|
1325
1324
|
label: (0, import_i18n10.__)("End", "elementor"),
|
|
1326
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1325
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1327
1326
|
showTooltip: true
|
|
1328
1327
|
},
|
|
1329
1328
|
{
|
|
1330
1329
|
value: "stretch",
|
|
1331
1330
|
label: (0, import_i18n10.__)("Stretch", "elementor"),
|
|
1332
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1331
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: import_icons7.LayoutDistributeVerticalIcon, size, ...iconProps }),
|
|
1333
1332
|
showTooltip: true
|
|
1334
1333
|
}
|
|
1335
1334
|
];
|
|
1336
1335
|
var AlignItemsField = () => {
|
|
1337
1336
|
const { isSiteRtl } = useDirection();
|
|
1338
|
-
return /* @__PURE__ */
|
|
1337
|
+
return /* @__PURE__ */ React29.createElement(import_ui19.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React29.createElement(import_ui19.ThemeProvider, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React29.createElement(import_ui19.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React29.createElement(import_ui19.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(import_editor_controls13.ControlLabel, null, (0, import_i18n10.__)("Align items", "elementor"))), /* @__PURE__ */ React29.createElement(import_ui19.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React29.createElement(import_editor_controls13.ToggleControl, { options }))))));
|
|
1339
1338
|
};
|
|
1340
1339
|
|
|
1341
1340
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
1342
|
-
var
|
|
1341
|
+
var React30 = __toESM(require("react"));
|
|
1343
1342
|
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
1344
1343
|
var import_icons8 = require("@elementor/icons");
|
|
1345
1344
|
var import_ui20 = require("@elementor/ui");
|
|
@@ -1354,40 +1353,40 @@ var options2 = [
|
|
|
1354
1353
|
{
|
|
1355
1354
|
value: "start",
|
|
1356
1355
|
label: (0, import_i18n11.__)("Start", "elementor"),
|
|
1357
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1356
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
1358
1357
|
showTooltip: true
|
|
1359
1358
|
},
|
|
1360
1359
|
{
|
|
1361
1360
|
value: "center",
|
|
1362
1361
|
label: (0, import_i18n11.__)("Center", "elementor"),
|
|
1363
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1362
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(RotatedIcon, { icon: import_icons8.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
1364
1363
|
showTooltip: true
|
|
1365
1364
|
},
|
|
1366
1365
|
{
|
|
1367
1366
|
value: "end",
|
|
1368
1367
|
label: (0, import_i18n11.__)("End", "elementor"),
|
|
1369
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1368
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
1370
1369
|
showTooltip: true
|
|
1371
1370
|
},
|
|
1372
1371
|
{
|
|
1373
1372
|
value: "stretch",
|
|
1374
1373
|
label: (0, import_i18n11.__)("Stretch", "elementor"),
|
|
1375
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1374
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(RotatedIcon, { icon: import_icons8.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
1376
1375
|
showTooltip: true
|
|
1377
1376
|
}
|
|
1378
1377
|
];
|
|
1379
1378
|
var AlignSelfChild = () => {
|
|
1380
1379
|
const { isSiteRtl } = useDirection();
|
|
1381
|
-
return /* @__PURE__ */
|
|
1380
|
+
return /* @__PURE__ */ React30.createElement(import_ui20.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(import_ui20.ThemeProvider, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React30.createElement(import_ui20.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(import_ui20.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_editor_controls14.ControlLabel, null, (0, import_i18n11.__)("Align self", "elementor"))), /* @__PURE__ */ React30.createElement(import_ui20.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React30.createElement(import_editor_controls14.ToggleControl, { options: options2 }))))));
|
|
1382
1381
|
};
|
|
1383
1382
|
|
|
1384
1383
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
1385
|
-
var
|
|
1384
|
+
var React31 = __toESM(require("react"));
|
|
1386
1385
|
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
1387
1386
|
var import_ui21 = require("@elementor/ui");
|
|
1388
1387
|
var import_i18n12 = require("@wordpress/i18n");
|
|
1389
1388
|
var DisplayField = () => {
|
|
1390
|
-
const
|
|
1389
|
+
const options11 = [
|
|
1391
1390
|
{
|
|
1392
1391
|
value: "block",
|
|
1393
1392
|
renderContent: () => (0, import_i18n12.__)("Block", "elementor"),
|
|
@@ -1407,11 +1406,11 @@ var DisplayField = () => {
|
|
|
1407
1406
|
showTooltip: true
|
|
1408
1407
|
}
|
|
1409
1408
|
];
|
|
1410
|
-
return /* @__PURE__ */
|
|
1409
|
+
return /* @__PURE__ */ React31.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React31.createElement(import_ui21.Stack, { gap: 1 }, /* @__PURE__ */ React31.createElement(import_editor_controls15.ControlLabel, null, (0, import_i18n12.__)("Display", "elementor")), /* @__PURE__ */ React31.createElement(import_editor_controls15.ToggleControl, { options: options11, fullWidth: true })));
|
|
1411
1410
|
};
|
|
1412
1411
|
|
|
1413
1412
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1414
|
-
var
|
|
1413
|
+
var React32 = __toESM(require("react"));
|
|
1415
1414
|
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
1416
1415
|
var import_icons9 = require("@elementor/icons");
|
|
1417
1416
|
var import_ui22 = require("@elementor/ui");
|
|
@@ -1422,14 +1421,14 @@ var options3 = [
|
|
|
1422
1421
|
label: (0, import_i18n13.__)("Row", "elementor"),
|
|
1423
1422
|
renderContent: ({ size }) => {
|
|
1424
1423
|
const StartIcon5 = (0, import_ui22.withDirection)(import_icons9.ArrowRightIcon);
|
|
1425
|
-
return /* @__PURE__ */
|
|
1424
|
+
return /* @__PURE__ */ React32.createElement(StartIcon5, { fontSize: size });
|
|
1426
1425
|
},
|
|
1427
1426
|
showTooltip: true
|
|
1428
1427
|
},
|
|
1429
1428
|
{
|
|
1430
1429
|
value: "column",
|
|
1431
1430
|
label: (0, import_i18n13.__)("Column", "elementor"),
|
|
1432
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1431
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons9.ArrowDownSmallIcon, { fontSize: size }),
|
|
1433
1432
|
showTooltip: true
|
|
1434
1433
|
},
|
|
1435
1434
|
{
|
|
@@ -1437,24 +1436,24 @@ var options3 = [
|
|
|
1437
1436
|
label: (0, import_i18n13.__)("Reversed row", "elementor"),
|
|
1438
1437
|
renderContent: ({ size }) => {
|
|
1439
1438
|
const EndIcon5 = (0, import_ui22.withDirection)(import_icons9.ArrowLeftIcon);
|
|
1440
|
-
return /* @__PURE__ */
|
|
1439
|
+
return /* @__PURE__ */ React32.createElement(EndIcon5, { fontSize: size });
|
|
1441
1440
|
},
|
|
1442
1441
|
showTooltip: true
|
|
1443
1442
|
},
|
|
1444
1443
|
{
|
|
1445
1444
|
value: "column-reverse",
|
|
1446
1445
|
label: (0, import_i18n13.__)("Reversed column", "elementor"),
|
|
1447
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1446
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons9.ArrowUpSmallIcon, { fontSize: size }),
|
|
1448
1447
|
showTooltip: true
|
|
1449
1448
|
}
|
|
1450
1449
|
];
|
|
1451
1450
|
var FlexDirectionField = () => {
|
|
1452
1451
|
const { isSiteRtl } = useDirection();
|
|
1453
|
-
return /* @__PURE__ */
|
|
1452
|
+
return /* @__PURE__ */ React32.createElement(import_ui22.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(import_ui22.ThemeProvider, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React32.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls16.ControlLabel, null, (0, import_i18n13.__)("Direction", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui22.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(import_editor_controls16.ToggleControl, { options: options3 }))))));
|
|
1454
1453
|
};
|
|
1455
1454
|
|
|
1456
1455
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1457
|
-
var
|
|
1456
|
+
var React33 = __toESM(require("react"));
|
|
1458
1457
|
var import_react10 = require("react");
|
|
1459
1458
|
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
1460
1459
|
var import_icons10 = require("@elementor/icons");
|
|
@@ -1473,19 +1472,19 @@ var items = [
|
|
|
1473
1472
|
{
|
|
1474
1473
|
value: FIRST,
|
|
1475
1474
|
label: (0, import_i18n14.__)("First", "elementor"),
|
|
1476
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1475
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(import_icons10.ArrowUpSmallIcon, { fontSize: size }),
|
|
1477
1476
|
showTooltip: true
|
|
1478
1477
|
},
|
|
1479
1478
|
{
|
|
1480
1479
|
value: LAST,
|
|
1481
1480
|
label: (0, import_i18n14.__)("Last", "elementor"),
|
|
1482
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1481
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(import_icons10.ArrowDownSmallIcon, { fontSize: size }),
|
|
1483
1482
|
showTooltip: true
|
|
1484
1483
|
},
|
|
1485
1484
|
{
|
|
1486
1485
|
value: CUSTOM,
|
|
1487
1486
|
label: (0, import_i18n14.__)("Custom", "elementor"),
|
|
1488
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1487
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(import_icons10.PencilIcon, { fontSize: size }),
|
|
1489
1488
|
showTooltip: true
|
|
1490
1489
|
}
|
|
1491
1490
|
];
|
|
@@ -1500,7 +1499,7 @@ var FlexOrderField = () => {
|
|
|
1500
1499
|
}
|
|
1501
1500
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1502
1501
|
};
|
|
1503
|
-
return /* @__PURE__ */
|
|
1502
|
+
return /* @__PURE__ */ React33.createElement(import_ui23.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React33.createElement(import_ui23.ThemeProvider, null, /* @__PURE__ */ React33.createElement(SectionContent, null, /* @__PURE__ */ React33.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(import_editor_controls17.ControlLabel, null, (0, import_i18n14.__)("Order", "elementor"))), /* @__PURE__ */ React33.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React33.createElement(
|
|
1504
1503
|
import_editor_controls17.ControlToggleButtonGroup,
|
|
1505
1504
|
{
|
|
1506
1505
|
items,
|
|
@@ -1508,7 +1507,7 @@ var FlexOrderField = () => {
|
|
|
1508
1507
|
onChange: handleToggleButtonChange,
|
|
1509
1508
|
exclusive: true
|
|
1510
1509
|
}
|
|
1511
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
1510
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React33.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React33.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(import_editor_controls17.ControlLabel, null, (0, import_i18n14.__)("Custom order", "elementor"))), /* @__PURE__ */ React33.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React33.createElement(
|
|
1512
1511
|
import_editor_controls17.NumberControl,
|
|
1513
1512
|
{
|
|
1514
1513
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -1528,7 +1527,7 @@ var getGroupControlValue = (order) => {
|
|
|
1528
1527
|
};
|
|
1529
1528
|
|
|
1530
1529
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1531
|
-
var
|
|
1530
|
+
var React34 = __toESM(require("react"));
|
|
1532
1531
|
var import_react11 = require("react");
|
|
1533
1532
|
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
1534
1533
|
var import_icons11 = require("@elementor/icons");
|
|
@@ -1539,19 +1538,19 @@ var items2 = [
|
|
|
1539
1538
|
{
|
|
1540
1539
|
value: "flex-grow",
|
|
1541
1540
|
label: (0, import_i18n15.__)("Grow", "elementor"),
|
|
1542
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1541
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(import_icons11.ExpandIcon, { fontSize: size }),
|
|
1543
1542
|
showTooltip: true
|
|
1544
1543
|
},
|
|
1545
1544
|
{
|
|
1546
1545
|
value: "flex-shrink",
|
|
1547
1546
|
label: (0, import_i18n15.__)("Shrink", "elementor"),
|
|
1548
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1547
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(import_icons11.ShrinkIcon, { fontSize: size }),
|
|
1549
1548
|
showTooltip: true
|
|
1550
1549
|
},
|
|
1551
1550
|
{
|
|
1552
1551
|
value: "custom",
|
|
1553
1552
|
label: (0, import_i18n15.__)("Custom", "elementor"),
|
|
1554
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1553
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(import_icons11.PencilIcon, { fontSize: size }),
|
|
1555
1554
|
showTooltip: true
|
|
1556
1555
|
}
|
|
1557
1556
|
];
|
|
@@ -1575,7 +1574,7 @@ var FlexSizeField = () => {
|
|
|
1575
1574
|
setGrowField(null);
|
|
1576
1575
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1577
1576
|
};
|
|
1578
|
-
return /* @__PURE__ */
|
|
1577
|
+
return /* @__PURE__ */ React34.createElement(import_ui24.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(import_ui24.ThemeProvider, null, /* @__PURE__ */ React34.createElement(SectionContent, null, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n15.__)("Size", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(
|
|
1579
1578
|
import_editor_controls18.ControlToggleButtonGroup,
|
|
1580
1579
|
{
|
|
1581
1580
|
value: activeGroup,
|
|
@@ -1583,9 +1582,9 @@ var FlexSizeField = () => {
|
|
|
1583
1582
|
items: items2,
|
|
1584
1583
|
exclusive: true
|
|
1585
1584
|
}
|
|
1586
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
1585
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React34.createElement(FlexCustomField, null))));
|
|
1587
1586
|
};
|
|
1588
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
1587
|
+
var FlexCustomField = () => /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n15.__)("Grow", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(import_editor_controls18.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n15.__)("Shrink", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(import_editor_controls18.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n15.__)("Basis", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(import_editor_controls18.SizeControl, null)))));
|
|
1589
1588
|
var getActiveGroup = ({
|
|
1590
1589
|
grow,
|
|
1591
1590
|
shrink,
|
|
@@ -1607,16 +1606,16 @@ var getActiveGroup = ({
|
|
|
1607
1606
|
};
|
|
1608
1607
|
|
|
1609
1608
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1610
|
-
var
|
|
1609
|
+
var React35 = __toESM(require("react"));
|
|
1611
1610
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
1612
1611
|
var import_ui25 = require("@elementor/ui");
|
|
1613
1612
|
var import_i18n16 = require("@wordpress/i18n");
|
|
1614
1613
|
var GapControlField = () => {
|
|
1615
|
-
return /* @__PURE__ */
|
|
1614
|
+
return /* @__PURE__ */ React35.createElement(import_ui25.Stack, { gap: 1 }, /* @__PURE__ */ React35.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React35.createElement(import_editor_controls19.GapControl, { label: (0, import_i18n16.__)("Gaps", "elementor") })));
|
|
1616
1615
|
};
|
|
1617
1616
|
|
|
1618
1617
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
1619
|
-
var
|
|
1618
|
+
var React36 = __toESM(require("react"));
|
|
1620
1619
|
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
1621
1620
|
var import_icons12 = require("@elementor/icons");
|
|
1622
1621
|
var import_ui26 = require("@elementor/ui");
|
|
@@ -1631,47 +1630,47 @@ var options4 = [
|
|
|
1631
1630
|
{
|
|
1632
1631
|
value: "start",
|
|
1633
1632
|
label: (0, import_i18n17.__)("Start", "elementor"),
|
|
1634
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1633
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1635
1634
|
showTooltip: true
|
|
1636
1635
|
},
|
|
1637
1636
|
{
|
|
1638
1637
|
value: "center",
|
|
1639
1638
|
label: (0, import_i18n17.__)("Center", "elementor"),
|
|
1640
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1639
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(RotatedIcon, { icon: import_icons12.JustifyCenterIcon, size, ...iconProps3 }),
|
|
1641
1640
|
showTooltip: true
|
|
1642
1641
|
},
|
|
1643
1642
|
{
|
|
1644
1643
|
value: "end",
|
|
1645
1644
|
label: (0, import_i18n17.__)("End", "elementor"),
|
|
1646
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1645
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1647
1646
|
showTooltip: true
|
|
1648
1647
|
},
|
|
1649
1648
|
{
|
|
1650
1649
|
value: "space-between",
|
|
1651
1650
|
label: (0, import_i18n17.__)("Space between", "elementor"),
|
|
1652
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1651
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(RotatedIcon, { icon: import_icons12.JustifySpaceBetweenVerticalIcon, size, ...iconProps3 }),
|
|
1653
1652
|
showTooltip: true
|
|
1654
1653
|
},
|
|
1655
1654
|
{
|
|
1656
1655
|
value: "space-around",
|
|
1657
1656
|
label: (0, import_i18n17.__)("Space around", "elementor"),
|
|
1658
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1657
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(RotatedIcon, { icon: import_icons12.JustifySpaceAroundVerticalIcon, size, ...iconProps3 }),
|
|
1659
1658
|
showTooltip: true
|
|
1660
1659
|
},
|
|
1661
1660
|
{
|
|
1662
1661
|
value: "space-evenly",
|
|
1663
1662
|
label: (0, import_i18n17.__)("Space evenly", "elementor"),
|
|
1664
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1663
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(RotatedIcon, { icon: import_icons12.JustifyDistributeVerticalIcon, size, ...iconProps3 }),
|
|
1665
1664
|
showTooltip: true
|
|
1666
1665
|
}
|
|
1667
1666
|
];
|
|
1668
1667
|
var JustifyContentField = () => {
|
|
1669
1668
|
const { isSiteRtl } = useDirection();
|
|
1670
|
-
return /* @__PURE__ */
|
|
1669
|
+
return /* @__PURE__ */ React36.createElement(import_ui26.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(import_ui26.ThemeProvider, null, /* @__PURE__ */ React36.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React36.createElement(import_ui26.Stack, { gap: 1 }, /* @__PURE__ */ React36.createElement(import_editor_controls20.ControlLabel, null, (0, import_i18n17.__)("Justify content", "elementor")), /* @__PURE__ */ React36.createElement(import_editor_controls20.ToggleControl, { options: options4, fullWidth: true })))));
|
|
1671
1670
|
};
|
|
1672
1671
|
|
|
1673
1672
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1674
|
-
var
|
|
1673
|
+
var React37 = __toESM(require("react"));
|
|
1675
1674
|
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
1676
1675
|
var import_icons13 = require("@elementor/icons");
|
|
1677
1676
|
var import_ui27 = require("@elementor/ui");
|
|
@@ -1680,25 +1679,25 @@ var options5 = [
|
|
|
1680
1679
|
{
|
|
1681
1680
|
value: "nowrap",
|
|
1682
1681
|
label: (0, import_i18n18.__)("No wrap", "elementor"),
|
|
1683
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1682
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons13.ArrowRightIcon, { fontSize: size }),
|
|
1684
1683
|
showTooltip: true
|
|
1685
1684
|
},
|
|
1686
1685
|
{
|
|
1687
1686
|
value: "wrap",
|
|
1688
1687
|
label: (0, import_i18n18.__)("Wrap", "elementor"),
|
|
1689
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1688
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons13.ArrowBackIcon, { fontSize: size }),
|
|
1690
1689
|
showTooltip: true
|
|
1691
1690
|
},
|
|
1692
1691
|
{
|
|
1693
1692
|
value: "wrap-reverse",
|
|
1694
1693
|
label: (0, import_i18n18.__)("Reversed wrap", "elementor"),
|
|
1695
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1694
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons13.ArrowForwardIcon, { fontSize: size }),
|
|
1696
1695
|
showTooltip: true
|
|
1697
1696
|
}
|
|
1698
1697
|
];
|
|
1699
1698
|
var WrapField = () => {
|
|
1700
1699
|
const { isSiteRtl } = useDirection();
|
|
1701
|
-
return /* @__PURE__ */
|
|
1700
|
+
return /* @__PURE__ */ React37.createElement(import_ui27.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React37.createElement(import_ui27.ThemeProvider, null, /* @__PURE__ */ React37.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React37.createElement(import_ui27.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(import_ui27.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(import_editor_controls21.ControlLabel, null, (0, import_i18n18.__)("Wrap", "elementor"))), /* @__PURE__ */ React37.createElement(import_ui27.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React37.createElement(import_editor_controls21.ToggleControl, { options: options5 }))))));
|
|
1702
1701
|
};
|
|
1703
1702
|
|
|
1704
1703
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -1707,39 +1706,38 @@ var LayoutSection = () => {
|
|
|
1707
1706
|
const { element } = useElement();
|
|
1708
1707
|
const parent = (0, import_editor_elements5.useParentElement)(element.id);
|
|
1709
1708
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
1710
|
-
return /* @__PURE__ */
|
|
1709
|
+
return /* @__PURE__ */ React38.createElement(SectionContent, null, /* @__PURE__ */ React38.createElement(DisplayField, null), "flex" === display?.value && /* @__PURE__ */ React38.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React38.createElement(FlexChildFields, null));
|
|
1711
1710
|
};
|
|
1712
|
-
var FlexFields = () => /* @__PURE__ */
|
|
1713
|
-
var FlexChildFields = () => /* @__PURE__ */
|
|
1711
|
+
var FlexFields = () => /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(FlexDirectionField, null), /* @__PURE__ */ React38.createElement(JustifyContentField, null), /* @__PURE__ */ React38.createElement(AlignItemsField, null), /* @__PURE__ */ React38.createElement(PanelDivider, null), /* @__PURE__ */ React38.createElement(GapControlField, null), /* @__PURE__ */ React38.createElement(WrapField, null));
|
|
1712
|
+
var FlexChildFields = () => /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(PanelDivider, null), /* @__PURE__ */ React38.createElement(import_editor_controls22.ControlLabel, null, (0, import_i18n19.__)("Flex child", "elementor")), /* @__PURE__ */ React38.createElement(AlignSelfChild, null), /* @__PURE__ */ React38.createElement(FlexOrderField, null), /* @__PURE__ */ React38.createElement(FlexSizeField, null));
|
|
1714
1713
|
|
|
1715
1714
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1716
|
-
var
|
|
1715
|
+
var React42 = __toESM(require("react"));
|
|
1717
1716
|
var import_session2 = require("@elementor/session");
|
|
1718
|
-
var import_ui32 = require("@elementor/ui");
|
|
1719
1717
|
|
|
1720
1718
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1721
|
-
var
|
|
1719
|
+
var React39 = __toESM(require("react"));
|
|
1722
1720
|
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
1723
1721
|
var import_icons14 = require("@elementor/icons");
|
|
1724
|
-
var
|
|
1722
|
+
var import_ui28 = require("@elementor/ui");
|
|
1725
1723
|
var import_i18n20 = require("@wordpress/i18n");
|
|
1726
1724
|
var sideIcons = {
|
|
1727
|
-
left: /* @__PURE__ */
|
|
1728
|
-
right: /* @__PURE__ */
|
|
1729
|
-
top: /* @__PURE__ */
|
|
1730
|
-
bottom: /* @__PURE__ */
|
|
1725
|
+
left: /* @__PURE__ */ React39.createElement(import_icons14.SideLeftIcon, { fontSize: "tiny" }),
|
|
1726
|
+
right: /* @__PURE__ */ React39.createElement(import_icons14.SideRightIcon, { fontSize: "tiny" }),
|
|
1727
|
+
top: /* @__PURE__ */ React39.createElement(import_icons14.SideTopIcon, { fontSize: "tiny" }),
|
|
1728
|
+
bottom: /* @__PURE__ */ React39.createElement(import_icons14.SideBottomIcon, { fontSize: "tiny" })
|
|
1731
1729
|
};
|
|
1732
1730
|
var DimensionsField = () => {
|
|
1733
|
-
return /* @__PURE__ */
|
|
1731
|
+
return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(import_ui28.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(DimensionField, { side: "top", label: (0, import_i18n20.__)("Top", "elementor") }), /* @__PURE__ */ React39.createElement(DimensionField, { side: "right", label: (0, import_i18n20.__)("Right", "elementor") })), /* @__PURE__ */ React39.createElement(import_ui28.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(DimensionField, { side: "bottom", label: (0, import_i18n20.__)("Bottom", "elementor") }), /* @__PURE__ */ React39.createElement(DimensionField, { side: "left", label: (0, import_i18n20.__)("Left", "elementor") })));
|
|
1734
1732
|
};
|
|
1735
1733
|
var DimensionField = ({ side, label }) => {
|
|
1736
|
-
return /* @__PURE__ */
|
|
1734
|
+
return /* @__PURE__ */ React39.createElement(import_ui28.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React39.createElement(import_ui28.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(import_editor_controls23.ControlLabel, null, label)), /* @__PURE__ */ React39.createElement(import_ui28.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(StylesField, { bind: side }, /* @__PURE__ */ React39.createElement(import_editor_controls23.SizeControl, { startIcon: sideIcons[side] }))));
|
|
1737
1735
|
};
|
|
1738
1736
|
|
|
1739
1737
|
// src/components/style-sections/position-section/position-field.tsx
|
|
1740
|
-
var
|
|
1738
|
+
var React40 = __toESM(require("react"));
|
|
1741
1739
|
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
1742
|
-
var
|
|
1740
|
+
var import_ui29 = require("@elementor/ui");
|
|
1743
1741
|
var import_i18n21 = require("@wordpress/i18n");
|
|
1744
1742
|
var positionOptions = [
|
|
1745
1743
|
{ label: (0, import_i18n21.__)("Static", "elementor"), value: "static" },
|
|
@@ -1749,16 +1747,16 @@ var positionOptions = [
|
|
|
1749
1747
|
{ label: (0, import_i18n21.__)("Sticky", "elementor"), value: "sticky" }
|
|
1750
1748
|
];
|
|
1751
1749
|
var PositionField = ({ onChange }) => {
|
|
1752
|
-
return /* @__PURE__ */
|
|
1750
|
+
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React40.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(import_editor_controls24.ControlLabel, null, (0, import_i18n21.__)("Position", "elementor"))), /* @__PURE__ */ React40.createElement(import_ui29.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React40.createElement(import_editor_controls24.SelectControl, { options: positionOptions, onChange }))));
|
|
1753
1751
|
};
|
|
1754
1752
|
|
|
1755
1753
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1756
|
-
var
|
|
1754
|
+
var React41 = __toESM(require("react"));
|
|
1757
1755
|
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
1758
|
-
var
|
|
1756
|
+
var import_ui30 = require("@elementor/ui");
|
|
1759
1757
|
var import_i18n22 = require("@wordpress/i18n");
|
|
1760
1758
|
var ZIndexField = () => {
|
|
1761
|
-
return /* @__PURE__ */
|
|
1759
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React41.createElement(import_ui30.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(import_editor_controls25.ControlLabel, null, (0, import_i18n22.__)("Z-Index", "elementor"))), /* @__PURE__ */ React41.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(import_editor_controls25.NumberControl, null))));
|
|
1762
1760
|
};
|
|
1763
1761
|
|
|
1764
1762
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1790,7 +1788,7 @@ var PositionSection = () => {
|
|
|
1790
1788
|
}
|
|
1791
1789
|
};
|
|
1792
1790
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
1793
|
-
return /* @__PURE__ */
|
|
1791
|
+
return /* @__PURE__ */ React42.createElement(SectionContent, null, /* @__PURE__ */ React42.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(DimensionsField, null), /* @__PURE__ */ React42.createElement(ZIndexField, null)) : null);
|
|
1794
1792
|
};
|
|
1795
1793
|
var usePersistDimensions = () => {
|
|
1796
1794
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -1800,90 +1798,89 @@ var usePersistDimensions = () => {
|
|
|
1800
1798
|
};
|
|
1801
1799
|
|
|
1802
1800
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1803
|
-
var
|
|
1801
|
+
var React44 = __toESM(require("react"));
|
|
1804
1802
|
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
1805
|
-
var
|
|
1803
|
+
var import_ui32 = require("@elementor/ui");
|
|
1806
1804
|
var import_i18n24 = require("@wordpress/i18n");
|
|
1807
1805
|
|
|
1808
1806
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1809
|
-
var
|
|
1807
|
+
var React43 = __toESM(require("react"));
|
|
1810
1808
|
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
1811
1809
|
var import_icons15 = require("@elementor/icons");
|
|
1812
|
-
var
|
|
1810
|
+
var import_ui31 = require("@elementor/ui");
|
|
1813
1811
|
var import_i18n23 = require("@wordpress/i18n");
|
|
1814
1812
|
var options6 = [
|
|
1815
1813
|
{
|
|
1816
1814
|
value: "visible",
|
|
1817
1815
|
label: (0, import_i18n23.__)("Visible", "elementor"),
|
|
1818
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1816
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(import_icons15.EyeIcon, { fontSize: size }),
|
|
1819
1817
|
showTooltip: true
|
|
1820
1818
|
},
|
|
1821
1819
|
{
|
|
1822
1820
|
value: "hidden",
|
|
1823
1821
|
label: (0, import_i18n23.__)("Hidden", "elementor"),
|
|
1824
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1822
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(import_icons15.EyeOffIcon, { fontSize: size }),
|
|
1825
1823
|
showTooltip: true
|
|
1826
1824
|
},
|
|
1827
1825
|
{
|
|
1828
1826
|
value: "auto",
|
|
1829
1827
|
label: (0, import_i18n23.__)("Auto", "elementor"),
|
|
1830
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1828
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(import_icons15.LetterAIcon, { fontSize: size }),
|
|
1831
1829
|
showTooltip: true
|
|
1832
1830
|
}
|
|
1833
1831
|
];
|
|
1834
1832
|
var OverflowField = () => {
|
|
1835
|
-
return /* @__PURE__ */
|
|
1833
|
+
return /* @__PURE__ */ React43.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React43.createElement(import_ui31.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(import_editor_controls26.ControlLabel, null, (0, import_i18n23.__)("Overflow", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui31.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React43.createElement(import_editor_controls26.ToggleControl, { options: options6 }))));
|
|
1836
1834
|
};
|
|
1837
1835
|
|
|
1838
1836
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1839
1837
|
var SizeSection = () => {
|
|
1840
|
-
return /* @__PURE__ */
|
|
1838
|
+
return /* @__PURE__ */ React44.createElement(SectionContent, null, /* @__PURE__ */ React44.createElement(import_ui32.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "width", label: (0, import_i18n24.__)("Width", "elementor") })), /* @__PURE__ */ React44.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "height", label: (0, import_i18n24.__)("Height", "elementor") }))), /* @__PURE__ */ React44.createElement(import_ui32.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "min-width", label: (0, import_i18n24.__)("Min. width", "elementor") })), /* @__PURE__ */ React44.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "min-height", label: (0, import_i18n24.__)("Min. height", "elementor") }))), /* @__PURE__ */ React44.createElement(import_ui32.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "max-width", label: (0, import_i18n24.__)("Max. width", "elementor") })), /* @__PURE__ */ React44.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(SizeField, { bind: "max-height", label: (0, import_i18n24.__)("Max. height", "elementor") }))), /* @__PURE__ */ React44.createElement(PanelDivider, null), /* @__PURE__ */ React44.createElement(import_ui32.Stack, null, /* @__PURE__ */ React44.createElement(OverflowField, null)));
|
|
1841
1839
|
};
|
|
1842
1840
|
var SizeField = ({ label, bind }) => {
|
|
1843
|
-
return /* @__PURE__ */
|
|
1841
|
+
return /* @__PURE__ */ React44.createElement(StylesField, { bind }, /* @__PURE__ */ React44.createElement(import_ui32.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React44.createElement(import_ui32.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(import_editor_controls27.ControlLabel, null, label)), /* @__PURE__ */ React44.createElement(import_ui32.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(import_editor_controls27.SizeControl, null))));
|
|
1844
1842
|
};
|
|
1845
1843
|
|
|
1846
1844
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
1847
|
-
var
|
|
1845
|
+
var React45 = __toESM(require("react"));
|
|
1848
1846
|
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
1849
|
-
var import_ui35 = require("@elementor/ui");
|
|
1850
1847
|
var import_i18n25 = require("@wordpress/i18n");
|
|
1851
1848
|
var SpacingSection = () => {
|
|
1852
|
-
return /* @__PURE__ */
|
|
1849
|
+
return /* @__PURE__ */ React45.createElement(SectionContent, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React45.createElement(import_editor_controls28.LinkedDimensionsControl, { label: (0, import_i18n25.__)("Padding", "elementor") })), /* @__PURE__ */ React45.createElement(PanelDivider, null), /* @__PURE__ */ React45.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React45.createElement(import_editor_controls28.LinkedDimensionsControl, { label: (0, import_i18n25.__)("Margin", "elementor") })));
|
|
1853
1850
|
};
|
|
1854
1851
|
|
|
1855
1852
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1856
|
-
var
|
|
1857
|
-
var import_ui48 = require("@elementor/ui");
|
|
1853
|
+
var React60 = __toESM(require("react"));
|
|
1858
1854
|
|
|
1859
1855
|
// src/components/collapsible-content.tsx
|
|
1860
|
-
var
|
|
1856
|
+
var React46 = __toESM(require("react"));
|
|
1861
1857
|
var import_react12 = require("react");
|
|
1862
|
-
var
|
|
1858
|
+
var import_ui33 = require("@elementor/ui");
|
|
1863
1859
|
var import_i18n26 = require("@wordpress/i18n");
|
|
1864
1860
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
1865
1861
|
const [open, setOpen] = (0, import_react12.useState)(defaultOpen);
|
|
1866
1862
|
const handleToggle = () => {
|
|
1867
1863
|
setOpen((prevOpen) => !prevOpen);
|
|
1868
1864
|
};
|
|
1869
|
-
return /* @__PURE__ */
|
|
1870
|
-
|
|
1865
|
+
return /* @__PURE__ */ React46.createElement(import_ui33.Stack, null, /* @__PURE__ */ React46.createElement(
|
|
1866
|
+
import_ui33.Button,
|
|
1871
1867
|
{
|
|
1872
1868
|
fullWidth: true,
|
|
1873
1869
|
size: "small",
|
|
1874
1870
|
color: "secondary",
|
|
1875
1871
|
variant: "outlined",
|
|
1876
1872
|
onClick: handleToggle,
|
|
1877
|
-
endIcon: /* @__PURE__ */
|
|
1873
|
+
endIcon: /* @__PURE__ */ React46.createElement(CollapseIcon, { open }),
|
|
1874
|
+
sx: { my: 0.5 }
|
|
1878
1875
|
},
|
|
1879
1876
|
open ? (0, import_i18n26.__)("Show less", "elementor") : (0, import_i18n26.__)("Show more", "elementor")
|
|
1880
|
-
), /* @__PURE__ */
|
|
1877
|
+
), /* @__PURE__ */ React46.createElement(import_ui33.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1881
1878
|
};
|
|
1882
1879
|
|
|
1883
1880
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1884
|
-
var
|
|
1881
|
+
var React47 = __toESM(require("react"));
|
|
1885
1882
|
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
1886
|
-
var
|
|
1883
|
+
var import_ui34 = require("@elementor/ui");
|
|
1887
1884
|
var import_i18n27 = require("@wordpress/i18n");
|
|
1888
1885
|
|
|
1889
1886
|
// src/sync/get-elementor-config.ts
|
|
@@ -1898,194 +1895,143 @@ var FontFamilyField = () => {
|
|
|
1898
1895
|
if (!fontFamilies) {
|
|
1899
1896
|
return null;
|
|
1900
1897
|
}
|
|
1901
|
-
return /* @__PURE__ */
|
|
1898
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React47.createElement(import_ui34.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls29.ControlLabel, null, (0, import_i18n27.__)("Font family", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui34.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React47.createElement(import_editor_controls29.FontFamilyControl, { fontFamilies }))));
|
|
1902
1899
|
};
|
|
1903
1900
|
var getFontFamilies = () => {
|
|
1904
1901
|
const { controls } = getElementorConfig();
|
|
1905
|
-
const
|
|
1906
|
-
if (!
|
|
1902
|
+
const options11 = controls?.font?.options;
|
|
1903
|
+
if (!options11) {
|
|
1907
1904
|
return null;
|
|
1908
1905
|
}
|
|
1909
|
-
return
|
|
1906
|
+
return options11;
|
|
1910
1907
|
};
|
|
1911
1908
|
|
|
1912
1909
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
1913
|
-
var
|
|
1910
|
+
var React48 = __toESM(require("react"));
|
|
1914
1911
|
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
1915
|
-
var
|
|
1912
|
+
var import_ui35 = require("@elementor/ui");
|
|
1916
1913
|
var import_i18n28 = require("@wordpress/i18n");
|
|
1917
1914
|
var FontSizeField = () => {
|
|
1918
|
-
return /* @__PURE__ */
|
|
1915
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React48.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls30.ControlLabel, null, (0, import_i18n28.__)("Font size", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls30.SizeControl, null))));
|
|
1919
1916
|
};
|
|
1920
1917
|
|
|
1921
|
-
// src/components/style-sections/typography-section/font-
|
|
1922
|
-
var
|
|
1918
|
+
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
1919
|
+
var React49 = __toESM(require("react"));
|
|
1923
1920
|
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
1924
|
-
var
|
|
1921
|
+
var import_icons16 = require("@elementor/icons");
|
|
1922
|
+
var import_ui36 = require("@elementor/ui");
|
|
1925
1923
|
var import_i18n29 = require("@wordpress/i18n");
|
|
1924
|
+
var options7 = [
|
|
1925
|
+
{
|
|
1926
|
+
value: "normal",
|
|
1927
|
+
label: (0, import_i18n29.__)("Normal", "elementor"),
|
|
1928
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons16.MinusIcon, { fontSize: size }),
|
|
1929
|
+
showTooltip: true
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
value: "italic",
|
|
1933
|
+
label: (0, import_i18n29.__)("Italic", "elementor"),
|
|
1934
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons16.ItalicIcon, { fontSize: size }),
|
|
1935
|
+
showTooltip: true
|
|
1936
|
+
}
|
|
1937
|
+
];
|
|
1938
|
+
var FontStyleField = () => /* @__PURE__ */ React49.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React49.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(import_editor_controls31.ControlLabel, null, (0, import_i18n29.__)("Font Style", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui36.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React49.createElement(import_editor_controls31.ToggleControl, { options: options7 }))));
|
|
1939
|
+
|
|
1940
|
+
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
1941
|
+
var React50 = __toESM(require("react"));
|
|
1942
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
1943
|
+
var import_ui37 = require("@elementor/ui");
|
|
1944
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
1926
1945
|
var fontWeightOptions = [
|
|
1927
|
-
{ value: "100", label: (0,
|
|
1928
|
-
{ value: "200", label: (0,
|
|
1929
|
-
{ value: "300", label: (0,
|
|
1930
|
-
{ value: "400", label: (0,
|
|
1931
|
-
{ value: "500", label: (0,
|
|
1932
|
-
{ value: "600", label: (0,
|
|
1933
|
-
{ value: "700", label: (0,
|
|
1934
|
-
{ value: "800", label: (0,
|
|
1935
|
-
{ value: "900", label: (0,
|
|
1946
|
+
{ value: "100", label: (0, import_i18n30.__)("100 - Thin", "elementor") },
|
|
1947
|
+
{ value: "200", label: (0, import_i18n30.__)("200 - Extra Light", "elementor") },
|
|
1948
|
+
{ value: "300", label: (0, import_i18n30.__)("300 - Light", "elementor") },
|
|
1949
|
+
{ value: "400", label: (0, import_i18n30.__)("400 - Normal", "elementor") },
|
|
1950
|
+
{ value: "500", label: (0, import_i18n30.__)("500 - Medium", "elementor") },
|
|
1951
|
+
{ value: "600", label: (0, import_i18n30.__)("600 - Semi Bold", "elementor") },
|
|
1952
|
+
{ value: "700", label: (0, import_i18n30.__)("700 - Bold", "elementor") },
|
|
1953
|
+
{ value: "800", label: (0, import_i18n30.__)("800 - Extra Bold", "elementor") },
|
|
1954
|
+
{ value: "900", label: (0, import_i18n30.__)("900 - Black", "elementor") }
|
|
1936
1955
|
];
|
|
1937
1956
|
var FontWeightField = () => {
|
|
1938
|
-
return /* @__PURE__ */
|
|
1957
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React50.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(import_editor_controls32.ControlLabel, null, (0, import_i18n30.__)("Font weight", "elementor"))), /* @__PURE__ */ React50.createElement(import_ui37.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React50.createElement(import_editor_controls32.SelectControl, { options: fontWeightOptions }))));
|
|
1939
1958
|
};
|
|
1940
1959
|
|
|
1941
1960
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
1942
|
-
var
|
|
1943
|
-
var
|
|
1944
|
-
var
|
|
1945
|
-
var
|
|
1961
|
+
var React51 = __toESM(require("react"));
|
|
1962
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
1963
|
+
var import_ui38 = require("@elementor/ui");
|
|
1964
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
1946
1965
|
var LetterSpacingField = () => {
|
|
1947
|
-
return /* @__PURE__ */
|
|
1966
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React51.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls33.ControlLabel, null, (0, import_i18n31.__)("Letter spacing", "elementor"))), /* @__PURE__ */ React51.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls33.SizeControl, null))));
|
|
1948
1967
|
};
|
|
1949
1968
|
|
|
1950
1969
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
1951
|
-
var
|
|
1952
|
-
var
|
|
1953
|
-
var
|
|
1954
|
-
var
|
|
1970
|
+
var React52 = __toESM(require("react"));
|
|
1971
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
1972
|
+
var import_ui39 = require("@elementor/ui");
|
|
1973
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
1955
1974
|
var LineHeightField = () => {
|
|
1956
|
-
return /* @__PURE__ */
|
|
1975
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React52.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(import_editor_controls34.ControlLabel, null, (0, import_i18n32.__)("Line height", "elementor"))), /* @__PURE__ */ React52.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(import_editor_controls34.SizeControl, null))));
|
|
1957
1976
|
};
|
|
1958
1977
|
|
|
1959
1978
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
1960
|
-
var
|
|
1961
|
-
var
|
|
1962
|
-
var
|
|
1963
|
-
var
|
|
1964
|
-
var
|
|
1965
|
-
var StartIcon4 = (0,
|
|
1966
|
-
var EndIcon4 = (0,
|
|
1967
|
-
var
|
|
1979
|
+
var React53 = __toESM(require("react"));
|
|
1980
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
1981
|
+
var import_icons17 = require("@elementor/icons");
|
|
1982
|
+
var import_ui40 = require("@elementor/ui");
|
|
1983
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
1984
|
+
var StartIcon4 = (0, import_ui40.withDirection)(import_icons17.AlignLeftIcon);
|
|
1985
|
+
var EndIcon4 = (0, import_ui40.withDirection)(import_icons17.AlignRightIcon);
|
|
1986
|
+
var options8 = [
|
|
1968
1987
|
{
|
|
1969
1988
|
value: "start",
|
|
1970
|
-
label: (0,
|
|
1971
|
-
renderContent: () => /* @__PURE__ */
|
|
1989
|
+
label: (0, import_i18n33.__)("Start", "elementor"),
|
|
1990
|
+
renderContent: () => /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: StartIcon4, size: "tiny" }),
|
|
1972
1991
|
showTooltip: true
|
|
1973
1992
|
},
|
|
1974
1993
|
{
|
|
1975
1994
|
value: "center",
|
|
1976
|
-
label: (0,
|
|
1977
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1995
|
+
label: (0, import_i18n33.__)("Center", "elementor"),
|
|
1996
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons17.AlignCenterIcon, { fontSize: size }),
|
|
1978
1997
|
showTooltip: true
|
|
1979
1998
|
},
|
|
1980
1999
|
{
|
|
1981
2000
|
value: "end",
|
|
1982
|
-
label: (0,
|
|
1983
|
-
renderContent: () => /* @__PURE__ */
|
|
2001
|
+
label: (0, import_i18n33.__)("End", "elementor"),
|
|
2002
|
+
renderContent: () => /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: EndIcon4, size: "tiny" }),
|
|
1984
2003
|
showTooltip: true
|
|
1985
2004
|
},
|
|
1986
2005
|
{
|
|
1987
2006
|
value: "justify",
|
|
1988
|
-
label: (0,
|
|
1989
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2007
|
+
label: (0, import_i18n33.__)("Justify", "elementor"),
|
|
2008
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons17.AlignJustifiedIcon, { fontSize: size }),
|
|
1990
2009
|
showTooltip: true
|
|
1991
2010
|
}
|
|
1992
2011
|
];
|
|
1993
2012
|
var TextAlignmentField = () => {
|
|
1994
|
-
return /* @__PURE__ */
|
|
2013
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React53.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(import_editor_controls35.ControlLabel, null, (0, import_i18n33.__)("Alignment", "elementor"))), /* @__PURE__ */ React53.createElement(import_ui40.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React53.createElement(import_editor_controls35.ToggleControl, { options: options8 }))));
|
|
1995
2014
|
};
|
|
1996
2015
|
|
|
1997
2016
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
1998
|
-
var
|
|
1999
|
-
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
2000
|
-
var import_ui43 = require("@elementor/ui");
|
|
2001
|
-
var import_i18n33 = require("@wordpress/i18n");
|
|
2002
|
-
var TextColorField = () => {
|
|
2003
|
-
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React51.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls35.ControlLabel, null, (0, import_i18n33.__)("Text Color", "elementor"))), /* @__PURE__ */ React51.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls35.ColorControl, null))));
|
|
2004
|
-
};
|
|
2005
|
-
|
|
2006
|
-
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2007
|
-
var React52 = __toESM(require("react"));
|
|
2017
|
+
var React54 = __toESM(require("react"));
|
|
2008
2018
|
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
2009
|
-
var
|
|
2010
|
-
var import_ui44 = require("@elementor/ui");
|
|
2019
|
+
var import_ui41 = require("@elementor/ui");
|
|
2011
2020
|
var import_i18n34 = require("@wordpress/i18n");
|
|
2012
|
-
var
|
|
2013
|
-
{
|
|
2014
|
-
value: "ltr",
|
|
2015
|
-
label: (0, import_i18n34.__)("Left to Right", "elementor"),
|
|
2016
|
-
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons17.TextDirectionLtrIcon, { fontSize: size })
|
|
2017
|
-
},
|
|
2018
|
-
{
|
|
2019
|
-
value: "rtl",
|
|
2020
|
-
label: (0, import_i18n34.__)("Right to Left", "elementor"),
|
|
2021
|
-
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons17.TextDirectionRtlIcon, { fontSize: size })
|
|
2022
|
-
}
|
|
2023
|
-
];
|
|
2024
|
-
var TextDirectionField = () => {
|
|
2025
|
-
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React52.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(import_editor_controls36.ControlLabel, null, (0, import_i18n34.__)("Direction", "elementor"))), /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React52.createElement(import_editor_controls36.ToggleControl, { options: options8 }))));
|
|
2021
|
+
var TextColorField = () => {
|
|
2022
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React54.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls36.ControlLabel, null, (0, import_i18n34.__)("Text color", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls36.ColorControl, null))));
|
|
2026
2023
|
};
|
|
2027
2024
|
|
|
2028
|
-
// src/components/style-sections/typography-section/text-
|
|
2029
|
-
var
|
|
2025
|
+
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
2026
|
+
var React55 = __toESM(require("react"));
|
|
2030
2027
|
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
2031
|
-
var import_i18n35 = require("@wordpress/i18n");
|
|
2032
|
-
var initTextStroke = {
|
|
2033
|
-
$$type: "stroke",
|
|
2034
|
-
value: {
|
|
2035
|
-
color: {
|
|
2036
|
-
$$type: "color",
|
|
2037
|
-
value: "#000000"
|
|
2038
|
-
},
|
|
2039
|
-
width: {
|
|
2040
|
-
$$type: "size",
|
|
2041
|
-
value: {
|
|
2042
|
-
unit: "px",
|
|
2043
|
-
size: 1
|
|
2044
|
-
}
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
};
|
|
2048
|
-
var TextStrokeField = () => {
|
|
2049
|
-
const [textStroke, setTextStroke] = useStylesField("stroke");
|
|
2050
|
-
const addTextStroke = () => {
|
|
2051
|
-
setTextStroke(initTextStroke);
|
|
2052
|
-
};
|
|
2053
|
-
const removeTextStroke = () => {
|
|
2054
|
-
setTextStroke(null);
|
|
2055
|
-
};
|
|
2056
|
-
const hasTextStroke = Boolean(textStroke);
|
|
2057
|
-
return /* @__PURE__ */ React53.createElement(
|
|
2058
|
-
AddOrRemoveContent,
|
|
2059
|
-
{
|
|
2060
|
-
label: (0, import_i18n35.__)("Text Stroke", "elementor"),
|
|
2061
|
-
isAdded: hasTextStroke,
|
|
2062
|
-
onAdd: addTextStroke,
|
|
2063
|
-
onRemove: removeTextStroke
|
|
2064
|
-
},
|
|
2065
|
-
/* @__PURE__ */ React53.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React53.createElement(import_editor_controls37.StrokeControl, null))
|
|
2066
|
-
);
|
|
2067
|
-
};
|
|
2068
|
-
|
|
2069
|
-
// src/components/style-sections/typography-section/text-style-field.tsx
|
|
2070
|
-
var React54 = __toESM(require("react"));
|
|
2071
|
-
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
2072
2028
|
var import_icons18 = require("@elementor/icons");
|
|
2073
|
-
var
|
|
2074
|
-
var
|
|
2029
|
+
var import_ui42 = require("@elementor/ui");
|
|
2030
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
2075
2031
|
var buttonSize = "tiny";
|
|
2076
|
-
var
|
|
2077
|
-
const [fontStyle, setFontStyle] = useStylesField("font-style");
|
|
2032
|
+
var TextDecorationField = () => {
|
|
2078
2033
|
const [textDecoration, setTextDecoration] = useStylesField("text-decoration");
|
|
2079
|
-
const formats = [
|
|
2080
|
-
const handleSetFontStyle = (newValue) => {
|
|
2081
|
-
if (newValue === null) {
|
|
2082
|
-
return setFontStyle(null);
|
|
2083
|
-
}
|
|
2084
|
-
setFontStyle({
|
|
2085
|
-
$$type: "string",
|
|
2086
|
-
value: newValue
|
|
2087
|
-
});
|
|
2088
|
-
};
|
|
2034
|
+
const formats = [...(textDecoration?.value || "").split(" ")];
|
|
2089
2035
|
const handleSetTextDecoration = (newValue) => {
|
|
2090
2036
|
if (newValue === null) {
|
|
2091
2037
|
return setTextDecoration(null);
|
|
@@ -2095,16 +2041,7 @@ var TextStyleField = () => {
|
|
|
2095
2041
|
value: newValue
|
|
2096
2042
|
});
|
|
2097
2043
|
};
|
|
2098
|
-
return /* @__PURE__ */
|
|
2099
|
-
ToggleButton,
|
|
2100
|
-
{
|
|
2101
|
-
value: "italic",
|
|
2102
|
-
onChange: (v) => handleSetFontStyle(fontStyle?.value === v ? null : v),
|
|
2103
|
-
"aria-label": "italic",
|
|
2104
|
-
sx: { marginLeft: "auto" }
|
|
2105
|
-
},
|
|
2106
|
-
/* @__PURE__ */ React54.createElement(import_icons18.ItalicIcon, { fontSize: buttonSize })
|
|
2107
|
-
), /* @__PURE__ */ React54.createElement(
|
|
2044
|
+
return /* @__PURE__ */ React55.createElement(import_ui42.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls37.ControlLabel, null, (0, import_i18n35.__)("Style", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui42.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React55.createElement(import_ui42.ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React55.createElement(
|
|
2108
2045
|
ShorthandControl,
|
|
2109
2046
|
{
|
|
2110
2047
|
value: "line-through",
|
|
@@ -2112,8 +2049,8 @@ var TextStyleField = () => {
|
|
|
2112
2049
|
updateValues: handleSetTextDecoration,
|
|
2113
2050
|
"aria-label": "line-through"
|
|
2114
2051
|
},
|
|
2115
|
-
/* @__PURE__ */
|
|
2116
|
-
), /* @__PURE__ */
|
|
2052
|
+
/* @__PURE__ */ React55.createElement(import_icons18.StrikethroughIcon, { fontSize: buttonSize })
|
|
2053
|
+
), /* @__PURE__ */ React55.createElement(
|
|
2117
2054
|
ShorthandControl,
|
|
2118
2055
|
{
|
|
2119
2056
|
value: "underline",
|
|
@@ -2121,7 +2058,7 @@ var TextStyleField = () => {
|
|
|
2121
2058
|
updateValues: handleSetTextDecoration,
|
|
2122
2059
|
"aria-label": "underline"
|
|
2123
2060
|
},
|
|
2124
|
-
/* @__PURE__ */
|
|
2061
|
+
/* @__PURE__ */ React55.createElement(import_icons18.UnderlineIcon, { fontSize: buttonSize })
|
|
2125
2062
|
))));
|
|
2126
2063
|
};
|
|
2127
2064
|
var ShorthandControl = ({
|
|
@@ -2140,61 +2077,124 @@ var ShorthandControl = ({
|
|
|
2140
2077
|
updateValues([...valuesArr, newValue].join(" "));
|
|
2141
2078
|
}
|
|
2142
2079
|
};
|
|
2143
|
-
return /* @__PURE__ */
|
|
2080
|
+
return /* @__PURE__ */ React55.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
|
|
2144
2081
|
};
|
|
2145
2082
|
var ToggleButton = ({ onChange, ...props }) => {
|
|
2146
2083
|
const handleChange = (_e, newValue) => {
|
|
2147
2084
|
onChange(newValue);
|
|
2148
2085
|
};
|
|
2149
|
-
return /* @__PURE__ */
|
|
2086
|
+
return /* @__PURE__ */ React55.createElement(import_ui42.ToggleButton, { ...props, onChange: handleChange, size: buttonSize });
|
|
2150
2087
|
};
|
|
2151
2088
|
|
|
2152
|
-
// src/components/style-sections/typography-section/
|
|
2153
|
-
var
|
|
2154
|
-
var
|
|
2089
|
+
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2090
|
+
var React56 = __toESM(require("react"));
|
|
2091
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
2155
2092
|
var import_icons19 = require("@elementor/icons");
|
|
2156
|
-
var
|
|
2157
|
-
var
|
|
2093
|
+
var import_ui43 = require("@elementor/ui");
|
|
2094
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
2158
2095
|
var options9 = [
|
|
2096
|
+
{
|
|
2097
|
+
value: "ltr",
|
|
2098
|
+
label: (0, import_i18n36.__)("Left to Right", "elementor"),
|
|
2099
|
+
renderContent: ({ size }) => /* @__PURE__ */ React56.createElement(import_icons19.TextDirectionLtrIcon, { fontSize: size })
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
value: "rtl",
|
|
2103
|
+
label: (0, import_i18n36.__)("Right to Left", "elementor"),
|
|
2104
|
+
renderContent: ({ size }) => /* @__PURE__ */ React56.createElement(import_icons19.TextDirectionRtlIcon, { fontSize: size })
|
|
2105
|
+
}
|
|
2106
|
+
];
|
|
2107
|
+
var TextDirectionField = () => {
|
|
2108
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React56.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls38.ControlLabel, null, (0, import_i18n36.__)("Direction", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui43.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React56.createElement(import_editor_controls38.ToggleControl, { options: options9 }))));
|
|
2109
|
+
};
|
|
2110
|
+
|
|
2111
|
+
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2112
|
+
var React57 = __toESM(require("react"));
|
|
2113
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
2114
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
2115
|
+
var initTextStroke = {
|
|
2116
|
+
$$type: "stroke",
|
|
2117
|
+
value: {
|
|
2118
|
+
color: {
|
|
2119
|
+
$$type: "color",
|
|
2120
|
+
value: "#000000"
|
|
2121
|
+
},
|
|
2122
|
+
width: {
|
|
2123
|
+
$$type: "size",
|
|
2124
|
+
value: {
|
|
2125
|
+
unit: "px",
|
|
2126
|
+
size: 1
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2130
|
+
};
|
|
2131
|
+
var TextStrokeField = () => {
|
|
2132
|
+
const [textStroke, setTextStroke] = useStylesField("stroke");
|
|
2133
|
+
const addTextStroke = () => {
|
|
2134
|
+
setTextStroke(initTextStroke);
|
|
2135
|
+
};
|
|
2136
|
+
const removeTextStroke = () => {
|
|
2137
|
+
setTextStroke(null);
|
|
2138
|
+
};
|
|
2139
|
+
const hasTextStroke = Boolean(textStroke);
|
|
2140
|
+
return /* @__PURE__ */ React57.createElement(
|
|
2141
|
+
AddOrRemoveContent,
|
|
2142
|
+
{
|
|
2143
|
+
label: (0, import_i18n37.__)("Text stroke", "elementor"),
|
|
2144
|
+
isAdded: hasTextStroke,
|
|
2145
|
+
onAdd: addTextStroke,
|
|
2146
|
+
onRemove: removeTextStroke
|
|
2147
|
+
},
|
|
2148
|
+
/* @__PURE__ */ React57.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React57.createElement(import_editor_controls39.StrokeControl, null))
|
|
2149
|
+
);
|
|
2150
|
+
};
|
|
2151
|
+
|
|
2152
|
+
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2153
|
+
var React58 = __toESM(require("react"));
|
|
2154
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
2155
|
+
var import_icons20 = require("@elementor/icons");
|
|
2156
|
+
var import_ui44 = require("@elementor/ui");
|
|
2157
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
2158
|
+
var options10 = [
|
|
2159
2159
|
{
|
|
2160
2160
|
value: "none",
|
|
2161
|
-
label: (0,
|
|
2162
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2161
|
+
label: (0, import_i18n38.__)("None", "elementor"),
|
|
2162
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(import_icons20.MinusIcon, { fontSize: size }),
|
|
2163
2163
|
showTooltip: true
|
|
2164
2164
|
},
|
|
2165
2165
|
{
|
|
2166
2166
|
value: "capitalize",
|
|
2167
|
-
label: (0,
|
|
2168
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2167
|
+
label: (0, import_i18n38.__)("Capitalize", "elementor"),
|
|
2168
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(import_icons20.LetterCaseIcon, { fontSize: size }),
|
|
2169
2169
|
showTooltip: true
|
|
2170
2170
|
},
|
|
2171
2171
|
{
|
|
2172
2172
|
value: "uppercase",
|
|
2173
|
-
label: (0,
|
|
2174
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2173
|
+
label: (0, import_i18n38.__)("Uppercase", "elementor"),
|
|
2174
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(import_icons20.LetterCaseUpperIcon, { fontSize: size }),
|
|
2175
2175
|
showTooltip: true
|
|
2176
2176
|
},
|
|
2177
2177
|
{
|
|
2178
2178
|
value: "lowercase",
|
|
2179
|
-
label: (0,
|
|
2180
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2179
|
+
label: (0, import_i18n38.__)("Lowercase", "elementor"),
|
|
2180
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(import_icons20.LetterCaseLowerIcon, { fontSize: size }),
|
|
2181
2181
|
showTooltip: true
|
|
2182
2182
|
}
|
|
2183
2183
|
];
|
|
2184
|
-
var TransformField = () => /* @__PURE__ */
|
|
2184
|
+
var TransformField = () => /* @__PURE__ */ React58.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React58.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(import_editor_controls40.ControlLabel, null, (0, import_i18n38.__)("Text transform", "elementor"))), /* @__PURE__ */ React58.createElement(import_ui44.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React58.createElement(import_editor_controls40.ToggleControl, { options: options10 }))));
|
|
2185
2185
|
|
|
2186
2186
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2187
|
-
var
|
|
2188
|
-
var
|
|
2189
|
-
var
|
|
2190
|
-
var
|
|
2187
|
+
var React59 = __toESM(require("react"));
|
|
2188
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
2189
|
+
var import_ui45 = require("@elementor/ui");
|
|
2190
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
2191
2191
|
var WordSpacingField = () => {
|
|
2192
|
-
return /* @__PURE__ */
|
|
2192
|
+
return /* @__PURE__ */ React59.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React59.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(import_editor_controls41.ControlLabel, null, (0, import_i18n39.__)("Word spacing", "elementor"))), /* @__PURE__ */ React59.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(import_editor_controls41.SizeControl, null))));
|
|
2193
2193
|
};
|
|
2194
2194
|
|
|
2195
2195
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2196
2196
|
var TypographySection = () => {
|
|
2197
|
-
return /* @__PURE__ */
|
|
2197
|
+
return /* @__PURE__ */ React60.createElement(SectionContent, null, /* @__PURE__ */ React60.createElement(FontFamilyField, null), /* @__PURE__ */ React60.createElement(FontWeightField, null), /* @__PURE__ */ React60.createElement(FontSizeField, null), /* @__PURE__ */ React60.createElement(PanelDivider, null), /* @__PURE__ */ React60.createElement(TextAlignmentField, null), /* @__PURE__ */ React60.createElement(TextColorField, null), /* @__PURE__ */ React60.createElement(CollapsibleContent, null, /* @__PURE__ */ React60.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React60.createElement(LineHeightField, null), /* @__PURE__ */ React60.createElement(LetterSpacingField, null), /* @__PURE__ */ React60.createElement(WordSpacingField, null), /* @__PURE__ */ React60.createElement(PanelDivider, null), /* @__PURE__ */ React60.createElement(TextDecorationField, null), /* @__PURE__ */ React60.createElement(TransformField, null), /* @__PURE__ */ React60.createElement(TextDirectionField, null), /* @__PURE__ */ React60.createElement(FontStyleField, null), /* @__PURE__ */ React60.createElement(TextStrokeField, null))));
|
|
2198
2198
|
};
|
|
2199
2199
|
|
|
2200
2200
|
// src/components/style-tab.tsx
|
|
@@ -2204,7 +2204,7 @@ var StyleTab = () => {
|
|
|
2204
2204
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2205
2205
|
const [activeStyleState, setActiveStyleState] = (0, import_react13.useState)(null);
|
|
2206
2206
|
const breakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
|
|
2207
|
-
return /* @__PURE__ */
|
|
2207
|
+
return /* @__PURE__ */ React61.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React61.createElement(
|
|
2208
2208
|
StyleProvider,
|
|
2209
2209
|
{
|
|
2210
2210
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -2215,7 +2215,7 @@ var StyleTab = () => {
|
|
|
2215
2215
|
},
|
|
2216
2216
|
setMetaState: setActiveStyleState
|
|
2217
2217
|
},
|
|
2218
|
-
/* @__PURE__ */
|
|
2218
|
+
/* @__PURE__ */ React61.createElement(import_session3.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React61.createElement(CssClassSelector, null), /* @__PURE__ */ React61.createElement(import_ui46.Divider, null), /* @__PURE__ */ React61.createElement(SectionsList, null, /* @__PURE__ */ React61.createElement(Section, { title: (0, import_i18n40.__)("Layout", "elementor") }, /* @__PURE__ */ React61.createElement(LayoutSection, null)), /* @__PURE__ */ React61.createElement(Section, { title: (0, import_i18n40.__)("Spacing", "elementor") }, /* @__PURE__ */ React61.createElement(SpacingSection, null)), /* @__PURE__ */ React61.createElement(Section, { title: (0, import_i18n40.__)("Size", "elementor") }, /* @__PURE__ */ React61.createElement(SizeSection, null)), /* @__PURE__ */ React61.createElement(Section, { title: (0, import_i18n40.__)("Position", "elementor") }, /* @__PURE__ */ React61.createElement(PositionSection, null)), /* @__PURE__ */ React61.createElement(Section, { title: (0, import_i18n40.__)("Typography", "elementor") }, /* @__PURE__ */ React61.createElement(TypographySection, null)), /* @__PURE__ */ React61.createElement(Section, { title: (0, import_i18n40.__)("Background", "elementor") }, /* @__PURE__ */ React61.createElement(BackgroundSection, null)), /* @__PURE__ */ React61.createElement(Section, { title: (0, import_i18n40.__)("Border", "elementor") }, /* @__PURE__ */ React61.createElement(BorderSection, null)), /* @__PURE__ */ React61.createElement(Section, { title: (0, import_i18n40.__)("Effects", "elementor") }, /* @__PURE__ */ React61.createElement(EffectsSection, null))))
|
|
2219
2219
|
));
|
|
2220
2220
|
};
|
|
2221
2221
|
function useActiveStyleDefId(currentClassesProp) {
|
|
@@ -2243,11 +2243,11 @@ function useCurrentClassesProp() {
|
|
|
2243
2243
|
// src/components/editing-panel-tabs.tsx
|
|
2244
2244
|
var EditingPanelTabs = () => {
|
|
2245
2245
|
const { element } = useElement();
|
|
2246
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
2246
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui47.useTabs)("settings");
|
|
2247
2247
|
return (
|
|
2248
2248
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2249
2249
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2250
|
-
/* @__PURE__ */
|
|
2250
|
+
/* @__PURE__ */ React62.createElement(import_react14.Fragment, { key: element.id }, /* @__PURE__ */ React62.createElement(import_ui47.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React62.createElement(import_ui47.Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React62.createElement(import_ui47.Tab, { label: (0, import_i18n41.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React62.createElement(import_ui47.Tab, { label: (0, import_i18n41.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React62.createElement(import_ui47.Divider, null), /* @__PURE__ */ React62.createElement(import_ui47.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React62.createElement(SettingsTab, null)), /* @__PURE__ */ React62.createElement(import_ui47.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React62.createElement(StyleTab, null))))
|
|
2251
2251
|
);
|
|
2252
2252
|
};
|
|
2253
2253
|
|
|
@@ -2260,8 +2260,8 @@ var EditingPanel = () => {
|
|
|
2260
2260
|
if (!element || !elementType) {
|
|
2261
2261
|
return null;
|
|
2262
2262
|
}
|
|
2263
|
-
const panelTitle = (0,
|
|
2264
|
-
return /* @__PURE__ */
|
|
2263
|
+
const panelTitle = (0, import_i18n42.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
2264
|
+
return /* @__PURE__ */ React63.createElement(import_ui48.ErrorBoundary, { fallback: /* @__PURE__ */ React63.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React63.createElement(import_session4.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React63.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React63.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React63.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React63.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React63.createElement(import_editor_controls42.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React63.createElement(import_editor_controls42.ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React63.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React63.createElement(EditingPanelTabs, null))))))));
|
|
2265
2265
|
};
|
|
2266
2266
|
|
|
2267
2267
|
// src/panel.ts
|
|
@@ -2328,12 +2328,17 @@ var EditingPanelHooks = () => {
|
|
|
2328
2328
|
};
|
|
2329
2329
|
|
|
2330
2330
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2331
|
-
var
|
|
2331
|
+
var React67 = __toESM(require("react"));
|
|
2332
2332
|
var import_react20 = require("react");
|
|
2333
|
-
var
|
|
2334
|
-
var
|
|
2335
|
-
var
|
|
2336
|
-
var
|
|
2333
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
2334
|
+
var import_icons22 = require("@elementor/icons");
|
|
2335
|
+
var import_ui51 = require("@elementor/ui");
|
|
2336
|
+
var import_i18n44 = require("@wordpress/i18n");
|
|
2337
|
+
|
|
2338
|
+
// src/components/popover-content.tsx
|
|
2339
|
+
var React64 = __toESM(require("react"));
|
|
2340
|
+
var import_ui49 = require("@elementor/ui");
|
|
2341
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React64.createElement(import_ui49.Stack, { alignItems, gap, p }, children);
|
|
2337
2342
|
|
|
2338
2343
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2339
2344
|
var import_session5 = require("@elementor/session");
|
|
@@ -2344,15 +2349,15 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
2344
2349
|
};
|
|
2345
2350
|
|
|
2346
2351
|
// src/dynamics/dynamic-control.tsx
|
|
2347
|
-
var
|
|
2348
|
-
var
|
|
2352
|
+
var React65 = __toESM(require("react"));
|
|
2353
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
2349
2354
|
|
|
2350
2355
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2351
2356
|
var import_react18 = require("react");
|
|
2352
2357
|
|
|
2353
2358
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2354
2359
|
var import_react17 = require("react");
|
|
2355
|
-
var
|
|
2360
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
2356
2361
|
|
|
2357
2362
|
// src/dynamics/sync/get-elementor-config.ts
|
|
2358
2363
|
var getElementorConfig2 = () => {
|
|
@@ -2398,7 +2403,7 @@ var dynamicPropTypeUtil = (0, import_editor_props4.createPropUtils)(
|
|
|
2398
2403
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2399
2404
|
var usePropDynamicTags = () => {
|
|
2400
2405
|
let categories = [];
|
|
2401
|
-
const { propType } = (0,
|
|
2406
|
+
const { propType } = (0, import_editor_controls43.useBoundProp)();
|
|
2402
2407
|
if (propType) {
|
|
2403
2408
|
const propDynamicType = getDynamicPropType(propType);
|
|
2404
2409
|
categories = propDynamicType?.settings.categories || [];
|
|
@@ -2424,7 +2429,7 @@ var useDynamicTag = (tagName) => {
|
|
|
2424
2429
|
|
|
2425
2430
|
// src/dynamics/dynamic-control.tsx
|
|
2426
2431
|
var DynamicControl = ({ bind, children }) => {
|
|
2427
|
-
const { value, setValue } = (0,
|
|
2432
|
+
const { value, setValue } = (0, import_editor_controls44.useBoundProp)(dynamicPropTypeUtil);
|
|
2428
2433
|
const { name = "", settings } = value ?? {};
|
|
2429
2434
|
const dynamicTag = useDynamicTag(name);
|
|
2430
2435
|
if (!dynamicTag) {
|
|
@@ -2443,25 +2448,25 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2443
2448
|
});
|
|
2444
2449
|
};
|
|
2445
2450
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
2446
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ React65.createElement(import_editor_controls44.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React65.createElement(import_editor_controls44.PropKeyProvider, { bind }, children));
|
|
2447
2452
|
};
|
|
2448
2453
|
|
|
2449
2454
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2450
|
-
var
|
|
2455
|
+
var React66 = __toESM(require("react"));
|
|
2451
2456
|
var import_react19 = require("react");
|
|
2452
|
-
var
|
|
2453
|
-
var
|
|
2454
|
-
var
|
|
2455
|
-
var
|
|
2457
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
2458
|
+
var import_icons21 = require("@elementor/icons");
|
|
2459
|
+
var import_ui50 = require("@elementor/ui");
|
|
2460
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
2456
2461
|
var SIZE3 = "tiny";
|
|
2457
2462
|
var DynamicSelection = ({ onSelect }) => {
|
|
2458
2463
|
const [searchValue, setSearchValue] = (0, import_react19.useState)("");
|
|
2459
2464
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
2460
|
-
const { value: anyValue } = (0,
|
|
2461
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
2465
|
+
const { value: anyValue } = (0, import_editor_controls45.useBoundProp)();
|
|
2466
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls45.useBoundProp)(dynamicPropTypeUtil);
|
|
2462
2467
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
2463
2468
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
2464
|
-
const
|
|
2469
|
+
const options11 = useFilteredOptions(searchValue);
|
|
2465
2470
|
const handleSearch = (event) => {
|
|
2466
2471
|
setSearchValue(event.target.value);
|
|
2467
2472
|
};
|
|
@@ -2472,45 +2477,45 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2472
2477
|
setValue({ name: value, settings: {} });
|
|
2473
2478
|
onSelect?.();
|
|
2474
2479
|
};
|
|
2475
|
-
return /* @__PURE__ */
|
|
2476
|
-
|
|
2480
|
+
return /* @__PURE__ */ React66.createElement(import_ui50.Stack, null, /* @__PURE__ */ React66.createElement(import_ui50.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React66.createElement(
|
|
2481
|
+
import_ui50.TextField,
|
|
2477
2482
|
{
|
|
2478
2483
|
fullWidth: true,
|
|
2479
2484
|
size: SIZE3,
|
|
2480
2485
|
value: searchValue,
|
|
2481
2486
|
onChange: handleSearch,
|
|
2482
|
-
placeholder: (0,
|
|
2487
|
+
placeholder: (0, import_i18n43.__)("Search dynamic tag", "elementor"),
|
|
2483
2488
|
InputProps: {
|
|
2484
|
-
startAdornment: /* @__PURE__ */
|
|
2489
|
+
startAdornment: /* @__PURE__ */ React66.createElement(import_ui50.InputAdornment, { position: "start" }, /* @__PURE__ */ React66.createElement(import_icons21.SearchIcon, { fontSize: SIZE3 }))
|
|
2485
2490
|
}
|
|
2486
2491
|
}
|
|
2487
|
-
)), /* @__PURE__ */
|
|
2492
|
+
)), /* @__PURE__ */ React66.createElement(import_ui50.Divider, null), /* @__PURE__ */ React66.createElement(import_ui50.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options11.length > 0 ? /* @__PURE__ */ React66.createElement(import_ui50.MenuList, { role: "listbox", tabIndex: 0 }, options11.map(([category, items3], index) => /* @__PURE__ */ React66.createElement(import_react19.Fragment, { key: index }, /* @__PURE__ */ React66.createElement(import_ui50.ListSubheader, { sx: { px: 1.5, typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items3.map(({ value, label: tagLabel }) => {
|
|
2488
2493
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
2489
|
-
return /* @__PURE__ */
|
|
2490
|
-
|
|
2494
|
+
return /* @__PURE__ */ React66.createElement(
|
|
2495
|
+
import_ui50.MenuItem,
|
|
2491
2496
|
{
|
|
2492
2497
|
key: value,
|
|
2493
2498
|
selected: isSelected,
|
|
2494
2499
|
autoFocus: isSelected,
|
|
2495
|
-
sx: { typography: "caption" },
|
|
2500
|
+
sx: { px: 1.5, typography: "caption" },
|
|
2496
2501
|
onClick: () => handleSetDynamicTag(value)
|
|
2497
2502
|
},
|
|
2498
2503
|
tagLabel
|
|
2499
2504
|
);
|
|
2500
|
-
})))) : /* @__PURE__ */
|
|
2501
|
-
|
|
2505
|
+
})))) : /* @__PURE__ */ React66.createElement(PopoverContent, { alignItems: "center", p: 2.5 }, /* @__PURE__ */ React66.createElement(import_icons21.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React66.createElement(import_ui50.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n43.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React66.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React66.createElement(import_ui50.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React66.createElement(
|
|
2506
|
+
import_ui50.Link,
|
|
2502
2507
|
{
|
|
2503
2508
|
color: "secondary",
|
|
2504
2509
|
variant: "caption",
|
|
2505
2510
|
component: "button",
|
|
2506
2511
|
onClick: () => setSearchValue("")
|
|
2507
2512
|
},
|
|
2508
|
-
(0,
|
|
2509
|
-
), "\xA0", (0,
|
|
2513
|
+
(0, import_i18n43.__)("Clear the filters", "elementor")
|
|
2514
|
+
), "\xA0", (0, import_i18n43.__)("and try again.", "elementor")))));
|
|
2510
2515
|
};
|
|
2511
2516
|
var useFilteredOptions = (searchValue) => {
|
|
2512
2517
|
const dynamicTags = usePropDynamicTags();
|
|
2513
|
-
const
|
|
2518
|
+
const options11 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
2514
2519
|
const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
2515
2520
|
if (!isVisible) {
|
|
2516
2521
|
return categories;
|
|
@@ -2521,18 +2526,18 @@ var useFilteredOptions = (searchValue) => {
|
|
|
2521
2526
|
categories.get(group)?.push({ label, value: name });
|
|
2522
2527
|
return categories;
|
|
2523
2528
|
}, /* @__PURE__ */ new Map());
|
|
2524
|
-
return [...
|
|
2529
|
+
return [...options11];
|
|
2525
2530
|
};
|
|
2526
2531
|
|
|
2527
2532
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2528
2533
|
var SIZE4 = "tiny";
|
|
2529
2534
|
var DynamicSelectionControl = () => {
|
|
2530
|
-
const { setValue: setAnyValue } = (0,
|
|
2531
|
-
const { bind, value } = (0,
|
|
2535
|
+
const { setValue: setAnyValue } = (0, import_editor_controls46.useBoundProp)();
|
|
2536
|
+
const { bind, value } = (0, import_editor_controls46.useBoundProp)(dynamicPropTypeUtil);
|
|
2532
2537
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
2533
2538
|
const { name: tagName = "" } = value;
|
|
2534
2539
|
const selectionPopoverId = (0, import_react20.useId)();
|
|
2535
|
-
const selectionPopoverState = (0,
|
|
2540
|
+
const selectionPopoverState = (0, import_ui51.usePopupState)({ variant: "popover", popupId: selectionPopoverId });
|
|
2536
2541
|
const dynamicTag = useDynamicTag(tagName);
|
|
2537
2542
|
const removeDynamicTag = () => {
|
|
2538
2543
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -2540,70 +2545,70 @@ var DynamicSelectionControl = () => {
|
|
|
2540
2545
|
if (!dynamicTag) {
|
|
2541
2546
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
2542
2547
|
}
|
|
2543
|
-
return /* @__PURE__ */
|
|
2544
|
-
|
|
2548
|
+
return /* @__PURE__ */ React67.createElement(import_ui51.Box, null, /* @__PURE__ */ React67.createElement(
|
|
2549
|
+
import_ui51.UnstableTag,
|
|
2545
2550
|
{
|
|
2546
2551
|
fullWidth: true,
|
|
2547
2552
|
showActionsOnHover: true,
|
|
2548
2553
|
label: dynamicTag.label,
|
|
2549
|
-
startIcon: /* @__PURE__ */
|
|
2550
|
-
...(0,
|
|
2551
|
-
actions: /* @__PURE__ */
|
|
2552
|
-
|
|
2554
|
+
startIcon: /* @__PURE__ */ React67.createElement(import_icons22.DatabaseIcon, { fontSize: SIZE4 }),
|
|
2555
|
+
...(0, import_ui51.bindTrigger)(selectionPopoverState),
|
|
2556
|
+
actions: /* @__PURE__ */ React67.createElement(React67.Fragment, null, /* @__PURE__ */ React67.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React67.createElement(
|
|
2557
|
+
import_ui51.IconButton,
|
|
2553
2558
|
{
|
|
2554
2559
|
size: SIZE4,
|
|
2555
2560
|
onClick: removeDynamicTag,
|
|
2556
|
-
"aria-label": (0,
|
|
2561
|
+
"aria-label": (0, import_i18n44.__)("Remove dynamic value", "elementor")
|
|
2557
2562
|
},
|
|
2558
|
-
/* @__PURE__ */
|
|
2563
|
+
/* @__PURE__ */ React67.createElement(import_icons22.XIcon, { fontSize: SIZE4 })
|
|
2559
2564
|
))
|
|
2560
2565
|
}
|
|
2561
|
-
), /* @__PURE__ */
|
|
2562
|
-
|
|
2566
|
+
), /* @__PURE__ */ React67.createElement(
|
|
2567
|
+
import_ui51.Popover,
|
|
2563
2568
|
{
|
|
2564
2569
|
disablePortal: true,
|
|
2565
2570
|
disableScrollLock: true,
|
|
2566
2571
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2567
|
-
...(0,
|
|
2572
|
+
...(0, import_ui51.bindPopover)(selectionPopoverState)
|
|
2568
2573
|
},
|
|
2569
|
-
/* @__PURE__ */
|
|
2574
|
+
/* @__PURE__ */ React67.createElement(import_ui51.Stack, null, /* @__PURE__ */ React67.createElement(import_ui51.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React67.createElement(import_icons22.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React67.createElement(import_ui51.Typography, { variant: "subtitle2" }, (0, import_i18n44.__)("Dynamic Tags", "elementor")), /* @__PURE__ */ React67.createElement(import_ui51.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React67.createElement(import_icons22.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React67.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2570
2575
|
));
|
|
2571
2576
|
};
|
|
2572
2577
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
2573
2578
|
const popupId = (0, import_react20.useId)();
|
|
2574
|
-
const settingsPopupState = (0,
|
|
2579
|
+
const settingsPopupState = (0, import_ui51.usePopupState)({ variant: "popover", popupId });
|
|
2575
2580
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
2576
2581
|
if (!hasDynamicSettings) {
|
|
2577
2582
|
return null;
|
|
2578
2583
|
}
|
|
2579
|
-
return /* @__PURE__ */
|
|
2580
|
-
|
|
2584
|
+
return /* @__PURE__ */ React67.createElement(React67.Fragment, null, /* @__PURE__ */ React67.createElement(
|
|
2585
|
+
import_ui51.IconButton,
|
|
2581
2586
|
{
|
|
2582
2587
|
size: SIZE4,
|
|
2583
|
-
...(0,
|
|
2584
|
-
"aria-label": (0,
|
|
2588
|
+
...(0, import_ui51.bindTrigger)(settingsPopupState),
|
|
2589
|
+
"aria-label": (0, import_i18n44.__)("Settings", "elementor")
|
|
2585
2590
|
},
|
|
2586
|
-
/* @__PURE__ */
|
|
2587
|
-
), /* @__PURE__ */
|
|
2588
|
-
|
|
2591
|
+
/* @__PURE__ */ React67.createElement(import_icons22.SettingsIcon, { fontSize: SIZE4 })
|
|
2592
|
+
), /* @__PURE__ */ React67.createElement(
|
|
2593
|
+
import_ui51.Popover,
|
|
2589
2594
|
{
|
|
2590
2595
|
disableScrollLock: true,
|
|
2591
2596
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2592
|
-
...(0,
|
|
2597
|
+
...(0, import_ui51.bindPopover)(settingsPopupState)
|
|
2593
2598
|
},
|
|
2594
|
-
/* @__PURE__ */
|
|
2599
|
+
/* @__PURE__ */ React67.createElement(import_ui51.Paper, { component: import_ui51.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React67.createElement(import_ui51.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React67.createElement(import_icons22.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React67.createElement(import_ui51.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React67.createElement(import_ui51.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React67.createElement(import_icons22.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React67.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2595
2600
|
));
|
|
2596
2601
|
};
|
|
2597
2602
|
var DynamicSettings = ({ controls }) => {
|
|
2598
2603
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
2599
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
2604
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui51.useTabs)(0);
|
|
2600
2605
|
if (!tabs.length) {
|
|
2601
2606
|
return null;
|
|
2602
2607
|
}
|
|
2603
|
-
return /* @__PURE__ */
|
|
2604
|
-
return /* @__PURE__ */
|
|
2608
|
+
return /* @__PURE__ */ React67.createElement(React67.Fragment, null, /* @__PURE__ */ React67.createElement(import_ui51.Tabs, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React67.createElement(import_ui51.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React67.createElement(import_ui51.Divider, null), tabs.map(({ value }, index) => {
|
|
2609
|
+
return /* @__PURE__ */ React67.createElement(import_ui51.TabPanel, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React67.createElement(PopoverContent, { p: 1.5 }, value.items.map((item) => {
|
|
2605
2610
|
if (item.type === "control") {
|
|
2606
|
-
return /* @__PURE__ */
|
|
2611
|
+
return /* @__PURE__ */ React67.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
2607
2612
|
}
|
|
2608
2613
|
return null;
|
|
2609
2614
|
})));
|
|
@@ -2613,22 +2618,22 @@ var Control3 = ({ control }) => {
|
|
|
2613
2618
|
if (!getControlByType(control.type)) {
|
|
2614
2619
|
return null;
|
|
2615
2620
|
}
|
|
2616
|
-
return /* @__PURE__ */
|
|
2621
|
+
return /* @__PURE__ */ React67.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React67.createElement(import_editor_controls46.ControlLabel, null, control.label) : null, /* @__PURE__ */ React67.createElement(Control, { type: control.type, props: control.props }));
|
|
2617
2622
|
};
|
|
2618
2623
|
|
|
2619
2624
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2620
|
-
var
|
|
2621
|
-
var
|
|
2622
|
-
var
|
|
2623
|
-
var
|
|
2625
|
+
var React68 = __toESM(require("react"));
|
|
2626
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
2627
|
+
var import_icons23 = require("@elementor/icons");
|
|
2628
|
+
var import_i18n45 = require("@wordpress/i18n");
|
|
2624
2629
|
var usePropDynamicAction = () => {
|
|
2625
|
-
const { propType } = (0,
|
|
2630
|
+
const { propType } = (0, import_editor_controls47.useBoundProp)();
|
|
2626
2631
|
const visible = !!propType && supportsDynamic(propType);
|
|
2627
2632
|
return {
|
|
2628
2633
|
visible,
|
|
2629
|
-
icon:
|
|
2630
|
-
title: (0,
|
|
2631
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
2634
|
+
icon: import_icons23.DatabaseIcon,
|
|
2635
|
+
title: (0, import_i18n45.__)("Dynamic Tags", "elementor"),
|
|
2636
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React68.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2632
2637
|
};
|
|
2633
2638
|
};
|
|
2634
2639
|
|