@elementor/editor-editing-panel 1.35.0 → 1.37.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 +29 -0
- package/dist/index.js +472 -394
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +377 -299
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
- package/src/components/creatable-autocomplete/creatable-autocomplete.tsx +27 -15
- package/src/components/creatable-autocomplete/use-autocomplete-states.ts +15 -1
- package/src/components/css-classes/css-class-item.tsx +4 -1
- package/src/components/css-classes/css-class-selector.tsx +58 -44
- package/src/components/style-sections/layout-section/display-field.tsx +1 -1
- package/src/components/style-sections/position-section/position-section.tsx +1 -1
- package/src/components/style-sections/size-section/object-fit-field.tsx +34 -0
- package/src/components/style-sections/size-section/object-position-field.tsx +38 -0
- package/src/components/style-sections/size-section/size-section.tsx +26 -0
- package/src/hooks/use-state-by-element.ts +3 -1
- package/src/styles-inheritance/styles-inheritance-indicator.tsx +1 -1
- package/src/sync/get-elementor-globals.ts +0 -6
- package/src/sync/is-experiment-active.ts +0 -7
package/dist/index.js
CHANGED
|
@@ -34,12 +34,12 @@ __export(index_exports, {
|
|
|
34
34
|
init: () => init2,
|
|
35
35
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
36
36
|
registerControlReplacement: () => registerControlReplacement,
|
|
37
|
-
useBoundProp: () =>
|
|
37
|
+
useBoundProp: () => import_editor_controls53.useBoundProp,
|
|
38
38
|
usePanelActions: () => usePanelActions,
|
|
39
39
|
usePanelStatus: () => usePanelStatus
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(index_exports);
|
|
42
|
-
var
|
|
42
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
43
43
|
|
|
44
44
|
// src/control-replacement.tsx
|
|
45
45
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
@@ -47,9 +47,11 @@ var { registerControlReplacement, getControlReplacements } = (0, import_editor_c
|
|
|
47
47
|
|
|
48
48
|
// src/components/css-classes/css-class-selector.tsx
|
|
49
49
|
var React7 = __toESM(require("react"));
|
|
50
|
+
var import_react8 = require("react");
|
|
50
51
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
51
52
|
var import_editor_props = require("@elementor/editor-props");
|
|
52
53
|
var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
|
|
54
|
+
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
53
55
|
var import_icons2 = require("@elementor/icons");
|
|
54
56
|
var import_locations = require("@elementor/locations");
|
|
55
57
|
var import_ui6 = require("@elementor/ui");
|
|
@@ -213,7 +215,20 @@ function useInputState(validate) {
|
|
|
213
215
|
setError(errorMessage);
|
|
214
216
|
}
|
|
215
217
|
};
|
|
216
|
-
|
|
218
|
+
const handleInputBlur = () => {
|
|
219
|
+
setInputValue("");
|
|
220
|
+
setError(null);
|
|
221
|
+
};
|
|
222
|
+
return {
|
|
223
|
+
inputValue,
|
|
224
|
+
setInputValue,
|
|
225
|
+
error,
|
|
226
|
+
setError,
|
|
227
|
+
inputHandlers: {
|
|
228
|
+
onChange: handleInputChange,
|
|
229
|
+
onBlur: handleInputBlur
|
|
230
|
+
}
|
|
231
|
+
};
|
|
217
232
|
}
|
|
218
233
|
function useOpenState(initialOpen = false) {
|
|
219
234
|
const [open, setOpen] = (0, import_react4.useState)(initialOpen);
|
|
@@ -280,7 +295,8 @@ function useFilterOptions(parameters) {
|
|
|
280
295
|
}
|
|
281
296
|
|
|
282
297
|
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
283
|
-
|
|
298
|
+
var CreatableAutocomplete = React4.forwardRef(CreatableAutocompleteInner);
|
|
299
|
+
function CreatableAutocompleteInner({
|
|
284
300
|
selected,
|
|
285
301
|
options: options12,
|
|
286
302
|
entityName,
|
|
@@ -289,8 +305,8 @@ function CreatableAutocomplete({
|
|
|
289
305
|
onCreate,
|
|
290
306
|
validate,
|
|
291
307
|
...props
|
|
292
|
-
}) {
|
|
293
|
-
const { inputValue, setInputValue, error, setError,
|
|
308
|
+
}, ref) {
|
|
309
|
+
const { inputValue, setInputValue, error, setError, inputHandlers } = useInputState(validate);
|
|
294
310
|
const { open, openDropdown, closeDropdown } = useOpenState(props.open);
|
|
295
311
|
const { createOption, loading } = useCreateOption({ onCreate, validate, setInputValue, setError, closeDropdown });
|
|
296
312
|
const [internalOptions, internalSelected] = (0, import_react6.useMemo)(
|
|
@@ -320,6 +336,7 @@ function CreatableAutocomplete({
|
|
|
320
336
|
));
|
|
321
337
|
},
|
|
322
338
|
...props,
|
|
339
|
+
ref,
|
|
323
340
|
freeSolo: true,
|
|
324
341
|
multiple: true,
|
|
325
342
|
clearOnBlur: true,
|
|
@@ -333,7 +350,7 @@ function CreatableAutocomplete({
|
|
|
333
350
|
disableCloseOnSelect: true,
|
|
334
351
|
value: internalSelected,
|
|
335
352
|
options: internalOptions,
|
|
336
|
-
ListboxComponent: error ? React4.forwardRef((_,
|
|
353
|
+
ListboxComponent: error ? React4.forwardRef((_, errorTextRef) => /* @__PURE__ */ React4.createElement(ErrorText, { ref: errorTextRef, error })) : void 0,
|
|
337
354
|
renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
|
|
338
355
|
inputValue,
|
|
339
356
|
renderInput: (params) => {
|
|
@@ -343,7 +360,7 @@ function CreatableAutocomplete({
|
|
|
343
360
|
...params,
|
|
344
361
|
placeholder,
|
|
345
362
|
error: Boolean(error),
|
|
346
|
-
|
|
363
|
+
...inputHandlers,
|
|
347
364
|
sx: (theme) => ({
|
|
348
365
|
".MuiAutocomplete-inputRoot.MuiInputBase-adornedStart": {
|
|
349
366
|
paddingLeft: theme.spacing(0.25),
|
|
@@ -391,7 +408,7 @@ var ErrorText = React4.forwardRef(({ error = "error" }, ref) => {
|
|
|
391
408
|
padding: theme.spacing(2)
|
|
392
409
|
})
|
|
393
410
|
},
|
|
394
|
-
/* @__PURE__ */ React4.createElement(import_ui2.Typography, { variant: "caption", sx: { color: "error.main" } }, error)
|
|
411
|
+
/* @__PURE__ */ React4.createElement(import_ui2.Typography, { variant: "caption", sx: { color: "error.main", display: "inline-block" } }, error)
|
|
395
412
|
);
|
|
396
413
|
});
|
|
397
414
|
var StyledGroup = (0, import_ui2.styled)("li")`
|
|
@@ -633,7 +650,8 @@ function CssClassItem({
|
|
|
633
650
|
icon,
|
|
634
651
|
chipProps,
|
|
635
652
|
onClickActive,
|
|
636
|
-
renameLabel
|
|
653
|
+
renameLabel,
|
|
654
|
+
setError
|
|
637
655
|
}) {
|
|
638
656
|
const { meta, setMetaState } = useStyle();
|
|
639
657
|
const popupState = (0, import_ui5.usePopupState)({ variant: "popover" });
|
|
@@ -648,7 +666,8 @@ function CssClassItem({
|
|
|
648
666
|
} = (0, import_editor_ui2.useEditable)({
|
|
649
667
|
value: label,
|
|
650
668
|
onSubmit: renameLabel,
|
|
651
|
-
validation: validateLabel
|
|
669
|
+
validation: validateLabel,
|
|
670
|
+
onError: setError
|
|
652
671
|
});
|
|
653
672
|
const color = error ? "error" : colorProp;
|
|
654
673
|
const providerActions = provider ? import_editor_styles_repository3.stylesRepository.getProviderByKey(provider)?.actions : null;
|
|
@@ -669,7 +688,7 @@ function CssClassItem({
|
|
|
669
688
|
import_ui5.Chip,
|
|
670
689
|
{
|
|
671
690
|
size: CHIP_SIZE,
|
|
672
|
-
label: isEditing ? /* @__PURE__ */ React6.createElement(import_editor_ui2.EditableField, { ref,
|
|
691
|
+
label: isEditing ? /* @__PURE__ */ React6.createElement(import_editor_ui2.EditableField, { ref, ...getEditableProps() }) : /* @__PURE__ */ React6.createElement(import_editor_ui2.EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
|
|
673
692
|
variant: isActive && !meta.state && !isEditing ? "filled" : "standard",
|
|
674
693
|
shape: "rounded",
|
|
675
694
|
icon,
|
|
@@ -750,51 +769,65 @@ function CssClassSelector() {
|
|
|
750
769
|
const options12 = useOptions();
|
|
751
770
|
const { value: appliedIds, setValue: setAppliedIds, pushValue: pushAppliedId } = useAppliedClassesIds();
|
|
752
771
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
772
|
+
const autocompleteRef = (0, import_react8.useRef)(null);
|
|
773
|
+
const [renameError, setRenameError] = (0, import_react8.useState)(null);
|
|
753
774
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
754
775
|
const { create, validate, entityName } = useCreateAction({ pushAppliedId, setActiveId });
|
|
755
776
|
const applied = useAppliedOptions(options12, appliedIds);
|
|
756
777
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
757
778
|
const showPlaceholder = applied.every(({ fixed }) => fixed);
|
|
758
779
|
return /* @__PURE__ */ React7.createElement(import_ui6.Stack, { p: 2 }, /* @__PURE__ */ React7.createElement(import_ui6.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(import_ui6.FormLabel, { htmlFor: ID, size: "small" }, (0, import_i18n3.__)("Classes", "elementor")), /* @__PURE__ */ React7.createElement(import_ui6.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
759
|
-
|
|
780
|
+
import_editor_ui3.WarningInfotip,
|
|
760
781
|
{
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
{
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
782
|
+
open: Boolean(renameError),
|
|
783
|
+
text: renameError ?? "",
|
|
784
|
+
placement: "bottom",
|
|
785
|
+
width: autocompleteRef.current?.getBoundingClientRect().width,
|
|
786
|
+
offset: [0, -15]
|
|
787
|
+
},
|
|
788
|
+
/* @__PURE__ */ React7.createElement(
|
|
789
|
+
CreatableAutocomplete,
|
|
790
|
+
{
|
|
791
|
+
id: ID,
|
|
792
|
+
ref: autocompleteRef,
|
|
793
|
+
size: "tiny",
|
|
794
|
+
placeholder: showPlaceholder ? (0, import_i18n3.__)("Type class name", "elementor") : void 0,
|
|
795
|
+
options: options12,
|
|
796
|
+
selected: applied,
|
|
797
|
+
entityName,
|
|
798
|
+
onSelect: handleApply,
|
|
799
|
+
onCreate: create ?? void 0,
|
|
800
|
+
validate: validate ?? void 0,
|
|
801
|
+
limitTags: TAGS_LIMIT,
|
|
802
|
+
getLimitTagsText: (more) => /* @__PURE__ */ React7.createElement(import_ui6.Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
803
|
+
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
804
|
+
const chipProps = getTagProps({ index });
|
|
805
|
+
const isActive = value.value === active?.value;
|
|
806
|
+
const renameLabel = (newLabel) => {
|
|
807
|
+
if (!value.value) {
|
|
808
|
+
throw new Error(`Cannot rename a class without style id`);
|
|
809
|
+
}
|
|
810
|
+
return updateClassByProvider(value.provider, { label: newLabel, id: value.value });
|
|
811
|
+
};
|
|
812
|
+
return /* @__PURE__ */ React7.createElement(
|
|
813
|
+
CssClassItem,
|
|
814
|
+
{
|
|
815
|
+
key: chipProps.key,
|
|
816
|
+
label: value.label,
|
|
817
|
+
provider: value.provider,
|
|
818
|
+
id: value.value,
|
|
819
|
+
isActive,
|
|
820
|
+
color: isActive && value.color ? value.color : "default",
|
|
821
|
+
icon: value.icon,
|
|
822
|
+
chipProps,
|
|
823
|
+
onClickActive: () => setActiveId(value.value),
|
|
824
|
+
renameLabel,
|
|
825
|
+
setError: setRenameError
|
|
826
|
+
}
|
|
827
|
+
);
|
|
828
|
+
})
|
|
829
|
+
}
|
|
830
|
+
)
|
|
798
831
|
));
|
|
799
832
|
}
|
|
800
833
|
var updateClassByProvider = (provider, data) => {
|
|
@@ -916,22 +949,22 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
916
949
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
917
950
|
|
|
918
951
|
// src/components/editing-panel.tsx
|
|
919
|
-
var
|
|
920
|
-
var
|
|
952
|
+
var React72 = __toESM(require("react"));
|
|
953
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
921
954
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
922
955
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
923
|
-
var
|
|
956
|
+
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
924
957
|
var import_icons23 = require("@elementor/icons");
|
|
925
958
|
var import_session5 = require("@elementor/session");
|
|
926
|
-
var
|
|
927
|
-
var
|
|
959
|
+
var import_ui60 = require("@elementor/ui");
|
|
960
|
+
var import_i18n48 = require("@wordpress/i18n");
|
|
928
961
|
|
|
929
962
|
// src/controls-actions.ts
|
|
930
963
|
var import_menus = require("@elementor/menus");
|
|
931
964
|
|
|
932
965
|
// src/popover-action.tsx
|
|
933
966
|
var React8 = __toESM(require("react"));
|
|
934
|
-
var
|
|
967
|
+
var import_react9 = require("react");
|
|
935
968
|
var import_icons3 = require("@elementor/icons");
|
|
936
969
|
var import_ui7 = require("@elementor/ui");
|
|
937
970
|
var SIZE = "tiny";
|
|
@@ -941,7 +974,7 @@ function PopoverAction({
|
|
|
941
974
|
icon: Icon,
|
|
942
975
|
popoverContent: PopoverContent2
|
|
943
976
|
}) {
|
|
944
|
-
const id = (0,
|
|
977
|
+
const id = (0, import_react9.useId)();
|
|
945
978
|
const popupState = (0, import_ui7.usePopupState)({
|
|
946
979
|
variant: "popover",
|
|
947
980
|
popupId: `elementor-popover-action-${id}`
|
|
@@ -980,26 +1013,26 @@ function EditorPanelErrorFallback() {
|
|
|
980
1013
|
}
|
|
981
1014
|
|
|
982
1015
|
// src/components/editing-panel-tabs.tsx
|
|
983
|
-
var
|
|
984
|
-
var
|
|
985
|
-
var
|
|
986
|
-
var
|
|
1016
|
+
var React71 = __toESM(require("react"));
|
|
1017
|
+
var import_react26 = require("react");
|
|
1018
|
+
var import_ui59 = require("@elementor/ui");
|
|
1019
|
+
var import_i18n47 = require("@wordpress/i18n");
|
|
987
1020
|
|
|
988
1021
|
// src/contexts/scroll-context.tsx
|
|
989
1022
|
var React10 = __toESM(require("react"));
|
|
990
|
-
var
|
|
1023
|
+
var import_react10 = require("react");
|
|
991
1024
|
var import_ui9 = require("@elementor/ui");
|
|
992
|
-
var ScrollContext = (0,
|
|
1025
|
+
var ScrollContext = (0, import_react10.createContext)(void 0);
|
|
993
1026
|
var ScrollPanel = (0, import_ui9.styled)("div")`
|
|
994
1027
|
height: 100%;
|
|
995
1028
|
overflow-y: auto;
|
|
996
1029
|
`;
|
|
997
1030
|
var DEFAULT_SCROLL_DIRECTION = "up";
|
|
998
1031
|
function ScrollProvider({ children }) {
|
|
999
|
-
const [direction, setDirection] = (0,
|
|
1000
|
-
const ref = (0,
|
|
1001
|
-
const scrollPos = (0,
|
|
1002
|
-
(0,
|
|
1032
|
+
const [direction, setDirection] = (0, import_react10.useState)(DEFAULT_SCROLL_DIRECTION);
|
|
1033
|
+
const ref = (0, import_react10.useRef)(null);
|
|
1034
|
+
const scrollPos = (0, import_react10.useRef)(0);
|
|
1035
|
+
(0, import_react10.useEffect)(() => {
|
|
1003
1036
|
const scrollElement = ref.current;
|
|
1004
1037
|
if (!scrollElement) {
|
|
1005
1038
|
return;
|
|
@@ -1021,17 +1054,19 @@ function ScrollProvider({ children }) {
|
|
|
1021
1054
|
return /* @__PURE__ */ React10.createElement(ScrollContext.Provider, { value: { direction } }, /* @__PURE__ */ React10.createElement(ScrollPanel, { ref }, children));
|
|
1022
1055
|
}
|
|
1023
1056
|
function useScrollDirection() {
|
|
1024
|
-
return (0,
|
|
1057
|
+
return (0, import_react10.useContext)(ScrollContext)?.direction ?? DEFAULT_SCROLL_DIRECTION;
|
|
1025
1058
|
}
|
|
1026
1059
|
|
|
1027
1060
|
// src/hooks/use-state-by-element.ts
|
|
1028
|
-
var
|
|
1061
|
+
var import_react11 = require("react");
|
|
1062
|
+
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
1029
1063
|
var import_session = require("@elementor/session");
|
|
1030
1064
|
var useStateByElement = (key, initialValue) => {
|
|
1031
1065
|
const { element } = useElement();
|
|
1066
|
+
const isFeatureActive = (0, import_editor_v1_adapters.isExperimentActive)("e_v_3_30");
|
|
1032
1067
|
const lookup = `elementor/editor-state/${element.id}/${key}`;
|
|
1033
|
-
const storedValue = (0, import_session.getSessionStorageItem)(lookup);
|
|
1034
|
-
const [value, setValue] = (0,
|
|
1068
|
+
const storedValue = isFeatureActive ? (0, import_session.getSessionStorageItem)(lookup) : initialValue;
|
|
1069
|
+
const [value, setValue] = (0, import_react11.useState)(storedValue ?? initialValue);
|
|
1035
1070
|
const doUpdate = (newValue) => {
|
|
1036
1071
|
(0, import_session.setSessionStorageItem)(lookup, newValue);
|
|
1037
1072
|
setValue(newValue);
|
|
@@ -1131,7 +1166,7 @@ var SettingsField = ({ bind, children }) => {
|
|
|
1131
1166
|
|
|
1132
1167
|
// src/components/section.tsx
|
|
1133
1168
|
var React14 = __toESM(require("react"));
|
|
1134
|
-
var
|
|
1169
|
+
var import_react12 = require("react");
|
|
1135
1170
|
var import_ui12 = require("@elementor/ui");
|
|
1136
1171
|
|
|
1137
1172
|
// src/components/collapse-icon.tsx
|
|
@@ -1149,7 +1184,7 @@ var CollapseIcon = (0, import_ui11.styled)(import_icons4.ChevronDownIcon, {
|
|
|
1149
1184
|
// src/components/section.tsx
|
|
1150
1185
|
function Section({ title, children, defaultExpanded = false }) {
|
|
1151
1186
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
1152
|
-
const id = (0,
|
|
1187
|
+
const id = (0, import_react12.useId)();
|
|
1153
1188
|
const labelId = `label-${id}`;
|
|
1154
1189
|
const contentId = `content-${id}`;
|
|
1155
1190
|
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(
|
|
@@ -1205,28 +1240,28 @@ var Control2 = ({ control }) => {
|
|
|
1205
1240
|
};
|
|
1206
1241
|
|
|
1207
1242
|
// src/components/style-tab.tsx
|
|
1208
|
-
var
|
|
1209
|
-
var
|
|
1243
|
+
var React70 = __toESM(require("react"));
|
|
1244
|
+
var import_react25 = require("react");
|
|
1210
1245
|
var import_editor_props7 = require("@elementor/editor-props");
|
|
1211
1246
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
1212
1247
|
var import_session4 = require("@elementor/session");
|
|
1213
|
-
var
|
|
1214
|
-
var
|
|
1248
|
+
var import_ui58 = require("@elementor/ui");
|
|
1249
|
+
var import_i18n46 = require("@wordpress/i18n");
|
|
1215
1250
|
|
|
1216
1251
|
// src/contexts/styles-inheritance-context.tsx
|
|
1217
1252
|
var React17 = __toESM(require("react"));
|
|
1218
|
-
var
|
|
1253
|
+
var import_react14 = require("react");
|
|
1219
1254
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
1220
1255
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
1221
1256
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
1222
1257
|
var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
|
|
1223
1258
|
|
|
1224
1259
|
// src/hooks/use-styles-rerender.ts
|
|
1225
|
-
var
|
|
1260
|
+
var import_react13 = require("react");
|
|
1226
1261
|
var useStylesRerender = () => {
|
|
1227
1262
|
const { provider } = useStyle();
|
|
1228
|
-
const [, reRender] = (0,
|
|
1229
|
-
(0,
|
|
1263
|
+
const [, reRender] = (0, import_react13.useReducer)((p) => !p, false);
|
|
1264
|
+
(0, import_react13.useEffect)(() => provider?.subscribe(reRender), [provider]);
|
|
1230
1265
|
};
|
|
1231
1266
|
|
|
1232
1267
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
@@ -1387,7 +1422,7 @@ function buildStyleVariantsByMetaMapping(styleDefs) {
|
|
|
1387
1422
|
}
|
|
1388
1423
|
|
|
1389
1424
|
// src/contexts/styles-inheritance-context.tsx
|
|
1390
|
-
var Context4 = (0,
|
|
1425
|
+
var Context4 = (0, import_react14.createContext)(null);
|
|
1391
1426
|
function StyleInheritanceProvider({ children }) {
|
|
1392
1427
|
const styleDefs = useAppliedStyles();
|
|
1393
1428
|
const breakpointsTree = (0, import_editor_responsive.getBreakpointsTree)();
|
|
@@ -1395,7 +1430,7 @@ function StyleInheritanceProvider({ children }) {
|
|
|
1395
1430
|
return /* @__PURE__ */ React17.createElement(Context4.Provider, { value: { getSnapshot } }, children);
|
|
1396
1431
|
}
|
|
1397
1432
|
function useStylesInheritanceFields(fields) {
|
|
1398
|
-
const context = (0,
|
|
1433
|
+
const context = (0, import_react14.useContext)(Context4);
|
|
1399
1434
|
const { meta } = useStyle();
|
|
1400
1435
|
if (!context) {
|
|
1401
1436
|
throw new Error("useStylesInheritanceFields must be used within a StyleInheritanceProvider");
|
|
@@ -1429,10 +1464,10 @@ var useBaseStyles = () => {
|
|
|
1429
1464
|
};
|
|
1430
1465
|
|
|
1431
1466
|
// src/hooks/use-active-style-def-id.ts
|
|
1432
|
-
var
|
|
1467
|
+
var import_react15 = require("react");
|
|
1433
1468
|
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
1434
1469
|
function useActiveStyleDefId(classProp) {
|
|
1435
|
-
const [activeStyledDefId, setActiveStyledDefId] = (0,
|
|
1470
|
+
const [activeStyledDefId, setActiveStyledDefId] = (0, import_react15.useState)(null);
|
|
1436
1471
|
const appliedClassesIds = useAppliedClassesIds2(classProp)?.value || [];
|
|
1437
1472
|
const fallback = useFirstAppliedClass(appliedClassesIds);
|
|
1438
1473
|
const activeAndAppliedClassId = useActiveAndAppliedClassId(activeStyledDefId, appliedClassesIds);
|
|
@@ -1462,11 +1497,11 @@ var import_editor_controls6 = require("@elementor/editor-controls");
|
|
|
1462
1497
|
var import_editor_styles3 = require("@elementor/editor-styles");
|
|
1463
1498
|
|
|
1464
1499
|
// src/hooks/use-styles-fields.ts
|
|
1465
|
-
var
|
|
1500
|
+
var import_react16 = require("react");
|
|
1466
1501
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
1467
1502
|
var import_editor_styles = require("@elementor/editor-styles");
|
|
1468
1503
|
var import_editor_styles_repository6 = require("@elementor/editor-styles-repository");
|
|
1469
|
-
var
|
|
1504
|
+
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
1470
1505
|
var import_i18n4 = require("@wordpress/i18n");
|
|
1471
1506
|
function useStylesFields(propNames) {
|
|
1472
1507
|
const { element } = useElement();
|
|
@@ -1516,8 +1551,8 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
|
1516
1551
|
);
|
|
1517
1552
|
}
|
|
1518
1553
|
function useUndoableCreateElementStyle() {
|
|
1519
|
-
return (0,
|
|
1520
|
-
return (0,
|
|
1554
|
+
return (0, import_react16.useMemo)(() => {
|
|
1555
|
+
return (0, import_editor_v1_adapters2.undoable)(
|
|
1521
1556
|
{
|
|
1522
1557
|
do: (payload) => {
|
|
1523
1558
|
return (0, import_editor_elements6.createElementStyle)({
|
|
@@ -1544,8 +1579,8 @@ function useUndoableCreateElementStyle() {
|
|
|
1544
1579
|
}, []);
|
|
1545
1580
|
}
|
|
1546
1581
|
function useUndoableUpdateStyle() {
|
|
1547
|
-
return (0,
|
|
1548
|
-
return (0,
|
|
1582
|
+
return (0, import_react16.useMemo)(() => {
|
|
1583
|
+
return (0, import_editor_v1_adapters2.undoable)(
|
|
1549
1584
|
{
|
|
1550
1585
|
do: ({ elementId, styleId, provider, meta, props }) => {
|
|
1551
1586
|
if (!provider.actions.updateProps) {
|
|
@@ -1599,45 +1634,26 @@ function useStylesField(propName) {
|
|
|
1599
1634
|
|
|
1600
1635
|
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1601
1636
|
var React19 = __toESM(require("react"));
|
|
1602
|
-
var
|
|
1637
|
+
var import_react19 = require("react");
|
|
1603
1638
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
1604
1639
|
var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
|
|
1640
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
1605
1641
|
var import_ui16 = require("@elementor/ui");
|
|
1606
1642
|
var import_i18n5 = require("@wordpress/i18n");
|
|
1607
1643
|
|
|
1608
|
-
// src/sync/get-elementor-globals.ts
|
|
1609
|
-
var getElementorConfig = () => {
|
|
1610
|
-
const extendedWindow = window;
|
|
1611
|
-
return extendedWindow.elementor?.config ?? {};
|
|
1612
|
-
};
|
|
1613
|
-
var getElementorFrontendConfig = () => {
|
|
1614
|
-
const extendedWindow = window;
|
|
1615
|
-
return extendedWindow.elementorFrontend?.config ?? {};
|
|
1616
|
-
};
|
|
1617
|
-
var getElementorCommonConfig = () => {
|
|
1618
|
-
const extendedWindow = window;
|
|
1619
|
-
return extendedWindow.elementorCommon?.config ?? {};
|
|
1620
|
-
};
|
|
1621
|
-
|
|
1622
|
-
// src/sync/is-experiment-active.ts
|
|
1623
|
-
var isExperimentActive = (experiment) => {
|
|
1624
|
-
const allFeatures = getElementorCommonConfig()?.experimentalFeatures ?? {};
|
|
1625
|
-
return !!allFeatures?.[experiment];
|
|
1626
|
-
};
|
|
1627
|
-
|
|
1628
1644
|
// src/styles-inheritance/styles-inheritance-infotip.tsx
|
|
1629
1645
|
var React18 = __toESM(require("react"));
|
|
1630
|
-
var
|
|
1646
|
+
var import_react18 = require("react");
|
|
1631
1647
|
var import_editor_canvas = require("@elementor/editor-canvas");
|
|
1632
1648
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1633
1649
|
var import_ui15 = require("@elementor/ui");
|
|
1634
1650
|
|
|
1635
1651
|
// src/hooks/use-normalized-inheritance-chain-items.tsx
|
|
1636
|
-
var
|
|
1652
|
+
var import_react17 = require("react");
|
|
1637
1653
|
var MAXIMUM_ITEMS = 2;
|
|
1638
1654
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
1639
|
-
const [items3, setItems] = (0,
|
|
1640
|
-
(0,
|
|
1655
|
+
const [items3, setItems] = (0, import_react17.useState)([]);
|
|
1656
|
+
(0, import_react17.useEffect)(() => {
|
|
1641
1657
|
(async () => {
|
|
1642
1658
|
const normalizedItems = await Promise.all(
|
|
1643
1659
|
inheritanceChain.filter((item) => item.style?.label).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
@@ -1674,7 +1690,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
1674
1690
|
|
|
1675
1691
|
// src/styles-inheritance/styles-inheritance-infotip.tsx
|
|
1676
1692
|
var StyleIndicatorInfotip = ({ inheritanceChain, bind }) => {
|
|
1677
|
-
const resolve = (0,
|
|
1693
|
+
const resolve = (0, import_react18.useMemo)(() => {
|
|
1678
1694
|
const stylesSchema = (0, import_editor_styles2.getStylesSchema)();
|
|
1679
1695
|
return (0, import_editor_canvas.createPropsResolver)({
|
|
1680
1696
|
transformers: import_editor_canvas.styleTransformersRegistry,
|
|
@@ -1692,7 +1708,7 @@ var StyleIndicatorInfotip = ({ inheritanceChain, bind }) => {
|
|
|
1692
1708
|
|
|
1693
1709
|
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1694
1710
|
var StylesInheritanceIndicator = () => {
|
|
1695
|
-
const [open, setOpen] = (0,
|
|
1711
|
+
const [open, setOpen] = (0, import_react19.useState)(false);
|
|
1696
1712
|
const { value, path } = (0, import_editor_controls5.useBoundProp)();
|
|
1697
1713
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
1698
1714
|
const [bind] = path;
|
|
@@ -1709,7 +1725,7 @@ var StylesInheritanceIndicator = () => {
|
|
|
1709
1725
|
const hasValue = value !== null && value !== void 0;
|
|
1710
1726
|
const label = getLabel({ isFinalValue, hasValue });
|
|
1711
1727
|
const variantType = getVariant({ isFinalValue, hasValue, currentStyleProvider });
|
|
1712
|
-
const eIndicationsPopover = isExperimentActive("e_indications_popover");
|
|
1728
|
+
const eIndicationsPopover = (0, import_editor_v1_adapters3.isExperimentActive)("e_indications_popover");
|
|
1713
1729
|
if (!eIndicationsPopover) {
|
|
1714
1730
|
return /* @__PURE__ */ React19.createElement(StyleIndicator, { variant: variantType, "aria-label": label });
|
|
1715
1731
|
}
|
|
@@ -1874,6 +1890,18 @@ var import_i18n8 = require("@wordpress/i18n");
|
|
|
1874
1890
|
|
|
1875
1891
|
// src/hooks/use-direction.ts
|
|
1876
1892
|
var import_ui23 = require("@elementor/ui");
|
|
1893
|
+
|
|
1894
|
+
// src/sync/get-elementor-globals.ts
|
|
1895
|
+
var getElementorConfig = () => {
|
|
1896
|
+
const extendedWindow = window;
|
|
1897
|
+
return extendedWindow.elementor?.config ?? {};
|
|
1898
|
+
};
|
|
1899
|
+
var getElementorFrontendConfig = () => {
|
|
1900
|
+
const extendedWindow = window;
|
|
1901
|
+
return extendedWindow.elementorFrontend?.config ?? {};
|
|
1902
|
+
};
|
|
1903
|
+
|
|
1904
|
+
// src/hooks/use-direction.ts
|
|
1877
1905
|
function useDirection() {
|
|
1878
1906
|
const theme = (0, import_ui23.useTheme)();
|
|
1879
1907
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
|
|
@@ -2020,14 +2048,14 @@ var import_editor_elements7 = require("@elementor/editor-elements");
|
|
|
2020
2048
|
var import_i18n21 = require("@wordpress/i18n");
|
|
2021
2049
|
|
|
2022
2050
|
// src/hooks/use-computed-style.ts
|
|
2023
|
-
var
|
|
2051
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
2024
2052
|
function useComputedStyle(elementId) {
|
|
2025
|
-
return (0,
|
|
2053
|
+
return (0, import_editor_v1_adapters4.__privateUseListenTo)(
|
|
2026
2054
|
[
|
|
2027
|
-
(0,
|
|
2028
|
-
(0,
|
|
2029
|
-
(0,
|
|
2030
|
-
(0,
|
|
2055
|
+
(0, import_editor_v1_adapters4.windowEvent)("elementor/device-mode/change"),
|
|
2056
|
+
(0, import_editor_v1_adapters4.commandEndEvent)("document/elements/reset-style"),
|
|
2057
|
+
(0, import_editor_v1_adapters4.commandEndEvent)("document/elements/settings"),
|
|
2058
|
+
(0, import_editor_v1_adapters4.commandEndEvent)("document/elements/paste-style")
|
|
2031
2059
|
],
|
|
2032
2060
|
() => {
|
|
2033
2061
|
if (!elementId) {
|
|
@@ -2053,7 +2081,7 @@ var import_i18n11 = require("@wordpress/i18n");
|
|
|
2053
2081
|
|
|
2054
2082
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2055
2083
|
var React33 = __toESM(require("react"));
|
|
2056
|
-
var
|
|
2084
|
+
var import_react20 = require("react");
|
|
2057
2085
|
var import_ui26 = require("@elementor/ui");
|
|
2058
2086
|
var CLOCKWISE_ANGLES = {
|
|
2059
2087
|
row: 0,
|
|
@@ -2074,7 +2102,7 @@ var RotatedIcon = ({
|
|
|
2074
2102
|
offset = 0,
|
|
2075
2103
|
disableRotationForReversed = false
|
|
2076
2104
|
}) => {
|
|
2077
|
-
const rotate = (0,
|
|
2105
|
+
const rotate = (0, import_react20.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2078
2106
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2079
2107
|
return /* @__PURE__ */ React33.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2080
2108
|
};
|
|
@@ -2271,6 +2299,7 @@ var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
|
2271
2299
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
2272
2300
|
var React37 = __toESM(require("react"));
|
|
2273
2301
|
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
2302
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
2274
2303
|
var import_ui30 = require("@elementor/ui");
|
|
2275
2304
|
var import_i18n14 = require("@wordpress/i18n");
|
|
2276
2305
|
var displayFieldItems = [
|
|
@@ -2294,7 +2323,7 @@ var displayFieldItems = [
|
|
|
2294
2323
|
}
|
|
2295
2324
|
];
|
|
2296
2325
|
var DisplayField = () => {
|
|
2297
|
-
const isDisplayNoneFeatureActive = isExperimentActive("e_v_3_30");
|
|
2326
|
+
const isDisplayNoneFeatureActive = (0, import_editor_v1_adapters5.isExperimentActive)("e_v_3_30");
|
|
2298
2327
|
const items3 = [...displayFieldItems];
|
|
2299
2328
|
if (isDisplayNoneFeatureActive) {
|
|
2300
2329
|
items3.push({
|
|
@@ -2360,7 +2389,7 @@ var FlexDirectionField = () => {
|
|
|
2360
2389
|
|
|
2361
2390
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
2362
2391
|
var React39 = __toESM(require("react"));
|
|
2363
|
-
var
|
|
2392
|
+
var import_react21 = require("react");
|
|
2364
2393
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
2365
2394
|
var import_icons12 = require("@elementor/icons");
|
|
2366
2395
|
var import_ui32 = require("@elementor/ui");
|
|
@@ -2396,7 +2425,7 @@ var items = [
|
|
|
2396
2425
|
];
|
|
2397
2426
|
var FlexOrderField = () => {
|
|
2398
2427
|
const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
|
|
2399
|
-
const [groupControlValue, setGroupControlValue] = (0,
|
|
2428
|
+
const [groupControlValue, setGroupControlValue] = (0, import_react21.useState)(getGroupControlValue(order?.value || null));
|
|
2400
2429
|
const handleToggleButtonChange = (group) => {
|
|
2401
2430
|
setGroupControlValue(group);
|
|
2402
2431
|
if (!group || group === CUSTOM) {
|
|
@@ -2434,7 +2463,7 @@ var getGroupControlValue = (order) => {
|
|
|
2434
2463
|
|
|
2435
2464
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
2436
2465
|
var React40 = __toESM(require("react"));
|
|
2437
|
-
var
|
|
2466
|
+
var import_react22 = require("react");
|
|
2438
2467
|
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
2439
2468
|
var import_editor_props6 = require("@elementor/editor-props");
|
|
2440
2469
|
var import_icons13 = require("@elementor/icons");
|
|
@@ -2467,7 +2496,7 @@ var FlexSizeField = () => {
|
|
|
2467
2496
|
const grow = fields?.["flex-grow"]?.value || null;
|
|
2468
2497
|
const shrink = fields?.["flex-shrink"]?.value || null;
|
|
2469
2498
|
const basis = fields?.["flex-basis"]?.value || null;
|
|
2470
|
-
const currentGroup = (0,
|
|
2499
|
+
const currentGroup = (0, import_react22.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react22.useState)(currentGroup);
|
|
2471
2500
|
const onChangeGroup = (group = null) => {
|
|
2472
2501
|
setActiveGroup(group);
|
|
2473
2502
|
if (!group || group === "custom") {
|
|
@@ -2644,6 +2673,7 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
2644
2673
|
|
|
2645
2674
|
// src/components/style-sections/position-section/position-section.tsx
|
|
2646
2675
|
var React49 = __toESM(require("react"));
|
|
2676
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
2647
2677
|
var import_session3 = require("@elementor/session");
|
|
2648
2678
|
|
|
2649
2679
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
@@ -2714,7 +2744,7 @@ var PositionSection = () => {
|
|
|
2714
2744
|
"inset-inline-end"
|
|
2715
2745
|
]);
|
|
2716
2746
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
2717
|
-
const isCssIdFeatureActive = isExperimentActive("e_v_3_30");
|
|
2747
|
+
const isCssIdFeatureActive = (0, import_editor_v1_adapters6.isExperimentActive)("e_v_3_30");
|
|
2718
2748
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
2719
2749
|
if (newPosition === "static") {
|
|
2720
2750
|
if (dimensionsValues) {
|
|
@@ -2744,120 +2774,168 @@ var usePersistDimensions = () => {
|
|
|
2744
2774
|
};
|
|
2745
2775
|
|
|
2746
2776
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2777
|
+
var React54 = __toESM(require("react"));
|
|
2778
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
2779
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
2780
|
+
var import_ui45 = require("@elementor/ui");
|
|
2781
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
2782
|
+
|
|
2783
|
+
// src/components/collapsible-content.tsx
|
|
2784
|
+
var React50 = __toESM(require("react"));
|
|
2785
|
+
var import_react23 = require("react");
|
|
2786
|
+
var import_ui41 = require("@elementor/ui");
|
|
2787
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
2788
|
+
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
2789
|
+
const [open, setOpen] = (0, import_react23.useState)(defaultOpen);
|
|
2790
|
+
const handleToggle = () => {
|
|
2791
|
+
setOpen((prevOpen) => !prevOpen);
|
|
2792
|
+
};
|
|
2793
|
+
return /* @__PURE__ */ React50.createElement(import_ui41.Stack, null, /* @__PURE__ */ React50.createElement(
|
|
2794
|
+
import_ui41.Button,
|
|
2795
|
+
{
|
|
2796
|
+
fullWidth: true,
|
|
2797
|
+
size: "small",
|
|
2798
|
+
color: "secondary",
|
|
2799
|
+
variant: "outlined",
|
|
2800
|
+
onClick: handleToggle,
|
|
2801
|
+
endIcon: /* @__PURE__ */ React50.createElement(CollapseIcon, { open }),
|
|
2802
|
+
sx: { my: 0.5 }
|
|
2803
|
+
},
|
|
2804
|
+
open ? (0, import_i18n26.__)("Show less", "elementor") : (0, import_i18n26.__)("Show more", "elementor")
|
|
2805
|
+
), /* @__PURE__ */ React50.createElement(import_ui41.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
2806
|
+
};
|
|
2807
|
+
|
|
2808
|
+
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
2747
2809
|
var React51 = __toESM(require("react"));
|
|
2748
|
-
var
|
|
2810
|
+
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
2749
2811
|
var import_ui42 = require("@elementor/ui");
|
|
2750
2812
|
var import_i18n27 = require("@wordpress/i18n");
|
|
2813
|
+
var positionOptions2 = [
|
|
2814
|
+
{ label: (0, import_i18n27.__)("Fill", "elementor"), value: "fill" },
|
|
2815
|
+
{ label: (0, import_i18n27.__)("Cover", "elementor"), value: "cover" },
|
|
2816
|
+
{ label: (0, import_i18n27.__)("Contain", "elementor"), value: "contain" },
|
|
2817
|
+
{ label: (0, import_i18n27.__)("None", "elementor"), value: "none" },
|
|
2818
|
+
{ label: (0, import_i18n27.__)("Scale down", "elementor"), value: "scale-down" }
|
|
2819
|
+
];
|
|
2820
|
+
var ObjectFitField = ({ onChange }) => {
|
|
2821
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "object-fit" }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { container: true, pt: 2, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel, null, (0, import_i18n27.__)("Object fit", "elementor"))), /* @__PURE__ */ React51.createElement(import_ui42.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React51.createElement(import_editor_controls29.SelectControl, { options: positionOptions2, onChange }))));
|
|
2822
|
+
};
|
|
2823
|
+
|
|
2824
|
+
// src/components/style-sections/size-section/object-position-field.tsx
|
|
2825
|
+
var React52 = __toESM(require("react"));
|
|
2826
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
2827
|
+
var import_ui43 = require("@elementor/ui");
|
|
2828
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
2829
|
+
var positionOptions3 = [
|
|
2830
|
+
{ label: (0, import_i18n28.__)("Center center", "elementor"), value: "center center" },
|
|
2831
|
+
{ label: (0, import_i18n28.__)("Center left", "elementor"), value: "center left" },
|
|
2832
|
+
{ label: (0, import_i18n28.__)("Center right", "elementor"), value: "center right" },
|
|
2833
|
+
{ label: (0, import_i18n28.__)("Top center", "elementor"), value: "top center" },
|
|
2834
|
+
{ label: (0, import_i18n28.__)("Top left", "elementor"), value: "top left" },
|
|
2835
|
+
{ label: (0, import_i18n28.__)("Top right", "elementor"), value: "top right" },
|
|
2836
|
+
{ label: (0, import_i18n28.__)("Bottom center", "elementor"), value: "bottom center" },
|
|
2837
|
+
{ label: (0, import_i18n28.__)("Bottom left", "elementor"), value: "bottom left" },
|
|
2838
|
+
{ label: (0, import_i18n28.__)("Bottom right", "elementor"), value: "bottom right" }
|
|
2839
|
+
];
|
|
2840
|
+
var ObjectPositionField = ({ onChange }) => {
|
|
2841
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "object-position" }, /* @__PURE__ */ React52.createElement(import_ui43.Grid, { container: true, pt: 2, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, (0, import_i18n28.__)("Object position", "elementor"))), /* @__PURE__ */ React52.createElement(import_ui43.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React52.createElement(import_editor_controls30.SelectControl, { options: positionOptions3, onChange }))));
|
|
2842
|
+
};
|
|
2751
2843
|
|
|
2752
2844
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
2753
|
-
var
|
|
2754
|
-
var
|
|
2845
|
+
var React53 = __toESM(require("react"));
|
|
2846
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
2755
2847
|
var import_icons17 = require("@elementor/icons");
|
|
2756
|
-
var
|
|
2757
|
-
var
|
|
2848
|
+
var import_ui44 = require("@elementor/ui");
|
|
2849
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
2758
2850
|
var options6 = [
|
|
2759
2851
|
{
|
|
2760
2852
|
value: "visible",
|
|
2761
|
-
label: (0,
|
|
2762
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2853
|
+
label: (0, import_i18n29.__)("Visible", "elementor"),
|
|
2854
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons17.EyeIcon, { fontSize: size }),
|
|
2763
2855
|
showTooltip: true
|
|
2764
2856
|
},
|
|
2765
2857
|
{
|
|
2766
2858
|
value: "hidden",
|
|
2767
|
-
label: (0,
|
|
2768
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2859
|
+
label: (0, import_i18n29.__)("Hidden", "elementor"),
|
|
2860
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons17.EyeOffIcon, { fontSize: size }),
|
|
2769
2861
|
showTooltip: true
|
|
2770
2862
|
},
|
|
2771
2863
|
{
|
|
2772
2864
|
value: "auto",
|
|
2773
|
-
label: (0,
|
|
2774
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2865
|
+
label: (0, import_i18n29.__)("Auto", "elementor"),
|
|
2866
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons17.LetterAIcon, { fontSize: size }),
|
|
2775
2867
|
showTooltip: true
|
|
2776
2868
|
}
|
|
2777
2869
|
];
|
|
2778
2870
|
var OverflowField = () => {
|
|
2779
|
-
return /* @__PURE__ */
|
|
2871
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React53.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, (0, import_i18n29.__)("Overflow", "elementor"))), /* @__PURE__ */ React53.createElement(import_ui44.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React53.createElement(import_editor_controls31.ToggleControl, { options: options6 }))));
|
|
2780
2872
|
};
|
|
2781
2873
|
|
|
2782
2874
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2783
2875
|
var SizeSection = () => {
|
|
2784
|
-
|
|
2876
|
+
const [fitValue, setFitValue] = useStylesField("object-fit");
|
|
2877
|
+
const isNotFill = fitValue && fitValue?.value !== "fill";
|
|
2878
|
+
const onFitChange = (newFit, previousValue) => {
|
|
2879
|
+
if (newFit && newFit !== previousValue) {
|
|
2880
|
+
setFitValue({
|
|
2881
|
+
value: newFit,
|
|
2882
|
+
$$type: "string"
|
|
2883
|
+
});
|
|
2884
|
+
}
|
|
2885
|
+
};
|
|
2886
|
+
const isVersion330Active = (0, import_editor_v1_adapters7.isExperimentActive)("e_v_3_30");
|
|
2887
|
+
return /* @__PURE__ */ React54.createElement(SectionContent, null, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(SizeField, { bind: "width", label: (0, import_i18n30.__)("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(SizeField, { bind: "height", label: (0, import_i18n30.__)("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(
|
|
2785
2888
|
SizeField,
|
|
2786
2889
|
{
|
|
2787
2890
|
bind: "min-width",
|
|
2788
|
-
label: (0,
|
|
2891
|
+
label: (0, import_i18n30.__)("Min width", "elementor"),
|
|
2789
2892
|
extendedValues: ["auto"]
|
|
2790
2893
|
}
|
|
2791
|
-
)), /* @__PURE__ */
|
|
2894
|
+
)), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(
|
|
2792
2895
|
SizeField,
|
|
2793
2896
|
{
|
|
2794
2897
|
bind: "min-height",
|
|
2795
|
-
label: (0,
|
|
2898
|
+
label: (0, import_i18n30.__)("Min height", "elementor"),
|
|
2796
2899
|
extendedValues: ["auto"]
|
|
2797
2900
|
}
|
|
2798
|
-
))), /* @__PURE__ */
|
|
2901
|
+
))), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(SizeField, { bind: "max-width", label: (0, import_i18n30.__)("Max width", "elementor") })), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(SizeField, { bind: "max-height", label: (0, import_i18n30.__)("Max height", "elementor") }))), /* @__PURE__ */ React54.createElement(PanelDivider, null), /* @__PURE__ */ React54.createElement(import_ui45.Stack, null, /* @__PURE__ */ React54.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React54.createElement(CollapsibleContent, null, /* @__PURE__ */ React54.createElement(ObjectFitField, { onChange: onFitChange }), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, isNotFill && /* @__PURE__ */ React54.createElement(ObjectPositionField, null))));
|
|
2799
2902
|
};
|
|
2800
2903
|
var SizeField = ({ label, bind, extendedValues }) => {
|
|
2801
|
-
return /* @__PURE__ */
|
|
2904
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, label)), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(import_editor_controls32.SizeControl, { extendedValues }))));
|
|
2802
2905
|
};
|
|
2803
2906
|
|
|
2804
2907
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
2805
|
-
var
|
|
2806
|
-
var
|
|
2807
|
-
var
|
|
2908
|
+
var React55 = __toESM(require("react"));
|
|
2909
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
2910
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
2808
2911
|
var SpacingSection = () => {
|
|
2809
2912
|
const { isSiteRtl } = useDirection();
|
|
2810
|
-
return /* @__PURE__ */
|
|
2811
|
-
|
|
2913
|
+
return /* @__PURE__ */ React55.createElement(SectionContent, null, /* @__PURE__ */ React55.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React55.createElement(
|
|
2914
|
+
import_editor_controls33.LinkedDimensionsControl,
|
|
2812
2915
|
{
|
|
2813
|
-
label: (0,
|
|
2916
|
+
label: (0, import_i18n31.__)("Margin", "elementor"),
|
|
2814
2917
|
isSiteRtl,
|
|
2815
2918
|
extendedValues: ["auto"]
|
|
2816
2919
|
}
|
|
2817
|
-
)), /* @__PURE__ */
|
|
2920
|
+
)), /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React55.createElement(import_editor_controls33.LinkedDimensionsControl, { label: (0, import_i18n31.__)("Padding", "elementor"), isSiteRtl })));
|
|
2818
2921
|
};
|
|
2819
2922
|
|
|
2820
2923
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2821
|
-
var
|
|
2822
|
-
|
|
2823
|
-
// src/components/collapsible-content.tsx
|
|
2824
|
-
var React53 = __toESM(require("react"));
|
|
2825
|
-
var import_react22 = require("react");
|
|
2826
|
-
var import_ui43 = require("@elementor/ui");
|
|
2827
|
-
var import_i18n29 = require("@wordpress/i18n");
|
|
2828
|
-
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
2829
|
-
const [open, setOpen] = (0, import_react22.useState)(defaultOpen);
|
|
2830
|
-
const handleToggle = () => {
|
|
2831
|
-
setOpen((prevOpen) => !prevOpen);
|
|
2832
|
-
};
|
|
2833
|
-
return /* @__PURE__ */ React53.createElement(import_ui43.Stack, null, /* @__PURE__ */ React53.createElement(
|
|
2834
|
-
import_ui43.Button,
|
|
2835
|
-
{
|
|
2836
|
-
fullWidth: true,
|
|
2837
|
-
size: "small",
|
|
2838
|
-
color: "secondary",
|
|
2839
|
-
variant: "outlined",
|
|
2840
|
-
onClick: handleToggle,
|
|
2841
|
-
endIcon: /* @__PURE__ */ React53.createElement(CollapseIcon, { open }),
|
|
2842
|
-
sx: { my: 0.5 }
|
|
2843
|
-
},
|
|
2844
|
-
open ? (0, import_i18n29.__)("Show less", "elementor") : (0, import_i18n29.__)("Show more", "elementor")
|
|
2845
|
-
), /* @__PURE__ */ React53.createElement(import_ui43.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
2846
|
-
};
|
|
2924
|
+
var React69 = __toESM(require("react"));
|
|
2847
2925
|
|
|
2848
2926
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
2849
|
-
var
|
|
2850
|
-
var
|
|
2851
|
-
var
|
|
2852
|
-
var
|
|
2927
|
+
var React56 = __toESM(require("react"));
|
|
2928
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
2929
|
+
var import_ui46 = require("@elementor/ui");
|
|
2930
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
2853
2931
|
|
|
2854
2932
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2855
|
-
var
|
|
2856
|
-
var
|
|
2933
|
+
var import_react24 = require("react");
|
|
2934
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
2857
2935
|
var supportedCategories = {
|
|
2858
|
-
system: (0,
|
|
2859
|
-
custom: (0,
|
|
2860
|
-
googlefonts: (0,
|
|
2936
|
+
system: (0, import_i18n32.__)("System", "elementor"),
|
|
2937
|
+
custom: (0, import_i18n32.__)("Custom Fonts", "elementor"),
|
|
2938
|
+
googlefonts: (0, import_i18n32.__)("Google Fonts", "elementor")
|
|
2861
2939
|
};
|
|
2862
2940
|
var getFontFamilies = () => {
|
|
2863
2941
|
const { controls } = getElementorConfig();
|
|
@@ -2869,7 +2947,7 @@ var getFontFamilies = () => {
|
|
|
2869
2947
|
};
|
|
2870
2948
|
var useFontFamilies = () => {
|
|
2871
2949
|
const fontFamilies = getFontFamilies();
|
|
2872
|
-
return (0,
|
|
2950
|
+
return (0, import_react24.useMemo)(() => {
|
|
2873
2951
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
2874
2952
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
2875
2953
|
if (!supportedCategories[category]) {
|
|
@@ -2894,188 +2972,188 @@ var FontFamilyField = () => {
|
|
|
2894
2972
|
if (fontFamilies.length === 0) {
|
|
2895
2973
|
return null;
|
|
2896
2974
|
}
|
|
2897
|
-
return /* @__PURE__ */
|
|
2975
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React56.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, (0, import_i18n33.__)("Font family", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui46.Grid, { item: true, xs: 6, sx: { minWidth: 0 } }, /* @__PURE__ */ React56.createElement(import_editor_controls34.FontFamilyControl, { fontFamilies }))));
|
|
2898
2976
|
};
|
|
2899
2977
|
|
|
2900
2978
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
2901
|
-
var
|
|
2902
|
-
var
|
|
2903
|
-
var
|
|
2904
|
-
var
|
|
2979
|
+
var React57 = __toESM(require("react"));
|
|
2980
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
2981
|
+
var import_ui47 = require("@elementor/ui");
|
|
2982
|
+
var import_i18n34 = require("@wordpress/i18n");
|
|
2905
2983
|
var FontSizeField = () => {
|
|
2906
|
-
return /* @__PURE__ */
|
|
2984
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React57.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, (0, import_i18n34.__)("Font size", "elementor"))), /* @__PURE__ */ React57.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(import_editor_controls35.SizeControl, null))));
|
|
2907
2985
|
};
|
|
2908
2986
|
|
|
2909
2987
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
2910
|
-
var
|
|
2911
|
-
var
|
|
2988
|
+
var React58 = __toESM(require("react"));
|
|
2989
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
2912
2990
|
var import_icons18 = require("@elementor/icons");
|
|
2913
|
-
var
|
|
2914
|
-
var
|
|
2991
|
+
var import_ui48 = require("@elementor/ui");
|
|
2992
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
2915
2993
|
var options7 = [
|
|
2916
2994
|
{
|
|
2917
2995
|
value: "normal",
|
|
2918
|
-
label: (0,
|
|
2919
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2996
|
+
label: (0, import_i18n35.__)("Normal", "elementor"),
|
|
2997
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(import_icons18.MinusIcon, { fontSize: size }),
|
|
2920
2998
|
showTooltip: true
|
|
2921
2999
|
},
|
|
2922
3000
|
{
|
|
2923
3001
|
value: "italic",
|
|
2924
|
-
label: (0,
|
|
2925
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3002
|
+
label: (0, import_i18n35.__)("Italic", "elementor"),
|
|
3003
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(import_icons18.ItalicIcon, { fontSize: size }),
|
|
2926
3004
|
showTooltip: true
|
|
2927
3005
|
}
|
|
2928
3006
|
];
|
|
2929
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
3007
|
+
var FontStyleField = () => /* @__PURE__ */ React58.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React58.createElement(import_ui48.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(import_editor_controls36.ControlFormLabel, null, (0, import_i18n35.__)("Font style", "elementor"))), /* @__PURE__ */ React58.createElement(import_ui48.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React58.createElement(import_editor_controls36.ToggleControl, { options: options7 }))));
|
|
2930
3008
|
|
|
2931
3009
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
2932
|
-
var
|
|
2933
|
-
var
|
|
2934
|
-
var
|
|
2935
|
-
var
|
|
3010
|
+
var React59 = __toESM(require("react"));
|
|
3011
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
3012
|
+
var import_ui49 = require("@elementor/ui");
|
|
3013
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
2936
3014
|
var fontWeightOptions = [
|
|
2937
|
-
{ value: "100", label: (0,
|
|
2938
|
-
{ value: "200", label: (0,
|
|
2939
|
-
{ value: "300", label: (0,
|
|
2940
|
-
{ value: "400", label: (0,
|
|
2941
|
-
{ value: "500", label: (0,
|
|
2942
|
-
{ value: "600", label: (0,
|
|
2943
|
-
{ value: "700", label: (0,
|
|
2944
|
-
{ value: "800", label: (0,
|
|
2945
|
-
{ value: "900", label: (0,
|
|
3015
|
+
{ value: "100", label: (0, import_i18n36.__)("100 - Thin", "elementor") },
|
|
3016
|
+
{ value: "200", label: (0, import_i18n36.__)("200 - Extra light", "elementor") },
|
|
3017
|
+
{ value: "300", label: (0, import_i18n36.__)("300 - Light", "elementor") },
|
|
3018
|
+
{ value: "400", label: (0, import_i18n36.__)("400 - Normal", "elementor") },
|
|
3019
|
+
{ value: "500", label: (0, import_i18n36.__)("500 - Medium", "elementor") },
|
|
3020
|
+
{ value: "600", label: (0, import_i18n36.__)("600 - Semi bold", "elementor") },
|
|
3021
|
+
{ value: "700", label: (0, import_i18n36.__)("700 - Bold", "elementor") },
|
|
3022
|
+
{ value: "800", label: (0, import_i18n36.__)("800 - Extra bold", "elementor") },
|
|
3023
|
+
{ value: "900", label: (0, import_i18n36.__)("900 - Black", "elementor") }
|
|
2946
3024
|
];
|
|
2947
3025
|
var FontWeightField = () => {
|
|
2948
|
-
return /* @__PURE__ */
|
|
3026
|
+
return /* @__PURE__ */ React59.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React59.createElement(import_ui49.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(import_ui49.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, (0, import_i18n36.__)("Font weight", "elementor"))), /* @__PURE__ */ React59.createElement(import_ui49.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React59.createElement(import_editor_controls37.SelectControl, { options: fontWeightOptions }))));
|
|
2949
3027
|
};
|
|
2950
3028
|
|
|
2951
3029
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
2952
|
-
var
|
|
2953
|
-
var
|
|
2954
|
-
var
|
|
2955
|
-
var
|
|
3030
|
+
var React60 = __toESM(require("react"));
|
|
3031
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
3032
|
+
var import_ui50 = require("@elementor/ui");
|
|
3033
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
2956
3034
|
var LetterSpacingField = () => {
|
|
2957
|
-
return /* @__PURE__ */
|
|
3035
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React60.createElement(import_ui50.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, (0, import_i18n37.__)("Letter spacing", "elementor"))), /* @__PURE__ */ React60.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(import_editor_controls38.SizeControl, null))));
|
|
2958
3036
|
};
|
|
2959
3037
|
|
|
2960
3038
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
2961
|
-
var
|
|
2962
|
-
var
|
|
2963
|
-
var
|
|
2964
|
-
var
|
|
3039
|
+
var React61 = __toESM(require("react"));
|
|
3040
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
3041
|
+
var import_ui51 = require("@elementor/ui");
|
|
3042
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
2965
3043
|
var LineHeightField = () => {
|
|
2966
|
-
return /* @__PURE__ */
|
|
3044
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React61.createElement(import_ui51.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel, null, (0, import_i18n38.__)("Line height", "elementor"))), /* @__PURE__ */ React61.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(import_editor_controls39.SizeControl, null))));
|
|
2967
3045
|
};
|
|
2968
3046
|
|
|
2969
3047
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
2970
|
-
var
|
|
2971
|
-
var
|
|
3048
|
+
var React62 = __toESM(require("react"));
|
|
3049
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
2972
3050
|
var import_icons19 = require("@elementor/icons");
|
|
2973
|
-
var
|
|
2974
|
-
var
|
|
2975
|
-
var AlignStartIcon = (0,
|
|
2976
|
-
var AlignEndIcon = (0,
|
|
3051
|
+
var import_ui52 = require("@elementor/ui");
|
|
3052
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
3053
|
+
var AlignStartIcon = (0, import_ui52.withDirection)(import_icons19.AlignLeftIcon);
|
|
3054
|
+
var AlignEndIcon = (0, import_ui52.withDirection)(import_icons19.AlignRightIcon);
|
|
2977
3055
|
var options8 = [
|
|
2978
3056
|
{
|
|
2979
3057
|
value: "start",
|
|
2980
|
-
label: (0,
|
|
2981
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3058
|
+
label: (0, import_i18n39.__)("Start", "elementor"),
|
|
3059
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(AlignStartIcon, { fontSize: size }),
|
|
2982
3060
|
showTooltip: true
|
|
2983
3061
|
},
|
|
2984
3062
|
{
|
|
2985
3063
|
value: "center",
|
|
2986
|
-
label: (0,
|
|
2987
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3064
|
+
label: (0, import_i18n39.__)("Center", "elementor"),
|
|
3065
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons19.AlignCenterIcon, { fontSize: size }),
|
|
2988
3066
|
showTooltip: true
|
|
2989
3067
|
},
|
|
2990
3068
|
{
|
|
2991
3069
|
value: "end",
|
|
2992
|
-
label: (0,
|
|
2993
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3070
|
+
label: (0, import_i18n39.__)("End", "elementor"),
|
|
3071
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(AlignEndIcon, { fontSize: size }),
|
|
2994
3072
|
showTooltip: true
|
|
2995
3073
|
},
|
|
2996
3074
|
{
|
|
2997
3075
|
value: "justify",
|
|
2998
|
-
label: (0,
|
|
2999
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3076
|
+
label: (0, import_i18n39.__)("Justify", "elementor"),
|
|
3077
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons19.AlignJustifiedIcon, { fontSize: size }),
|
|
3000
3078
|
showTooltip: true
|
|
3001
3079
|
}
|
|
3002
3080
|
];
|
|
3003
3081
|
var TextAlignmentField = () => {
|
|
3004
|
-
return /* @__PURE__ */
|
|
3082
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React62.createElement(import_ui52.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui52.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, (0, import_i18n39.__)("Text align", "elementor"))), /* @__PURE__ */ React62.createElement(import_ui52.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React62.createElement(import_editor_controls40.ToggleControl, { options: options8 }))));
|
|
3005
3083
|
};
|
|
3006
3084
|
|
|
3007
3085
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3008
|
-
var
|
|
3009
|
-
var
|
|
3010
|
-
var
|
|
3011
|
-
var
|
|
3086
|
+
var React63 = __toESM(require("react"));
|
|
3087
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
3088
|
+
var import_ui53 = require("@elementor/ui");
|
|
3089
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
3012
3090
|
var TextColorField = () => {
|
|
3013
|
-
return /* @__PURE__ */
|
|
3091
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React63.createElement(import_ui53.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React63.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, (0, import_i18n40.__)("Text color", "elementor"))), /* @__PURE__ */ React63.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(import_editor_controls41.ColorControl, null))));
|
|
3014
3092
|
};
|
|
3015
3093
|
|
|
3016
3094
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3017
|
-
var
|
|
3018
|
-
var
|
|
3095
|
+
var React64 = __toESM(require("react"));
|
|
3096
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
3019
3097
|
var import_icons20 = require("@elementor/icons");
|
|
3020
|
-
var
|
|
3021
|
-
var
|
|
3098
|
+
var import_ui54 = require("@elementor/ui");
|
|
3099
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
3022
3100
|
var options9 = [
|
|
3023
3101
|
{
|
|
3024
3102
|
value: "none",
|
|
3025
|
-
label: (0,
|
|
3026
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3103
|
+
label: (0, import_i18n41.__)("None", "elementor"),
|
|
3104
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons20.MinusIcon, { fontSize: size }),
|
|
3027
3105
|
showTooltip: true,
|
|
3028
3106
|
exclusive: true
|
|
3029
3107
|
},
|
|
3030
3108
|
{
|
|
3031
3109
|
value: "underline",
|
|
3032
|
-
label: (0,
|
|
3033
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3110
|
+
label: (0, import_i18n41.__)("Underline", "elementor"),
|
|
3111
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons20.UnderlineIcon, { fontSize: size }),
|
|
3034
3112
|
showTooltip: true
|
|
3035
3113
|
},
|
|
3036
3114
|
{
|
|
3037
3115
|
value: "line-through",
|
|
3038
|
-
label: (0,
|
|
3039
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3116
|
+
label: (0, import_i18n41.__)("Line-through", "elementor"),
|
|
3117
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons20.StrikethroughIcon, { fontSize: size }),
|
|
3040
3118
|
showTooltip: true
|
|
3041
3119
|
},
|
|
3042
3120
|
{
|
|
3043
3121
|
value: "overline",
|
|
3044
|
-
label: (0,
|
|
3045
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3122
|
+
label: (0, import_i18n41.__)("Overline", "elementor"),
|
|
3123
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons20.OverlineIcon, { fontSize: size }),
|
|
3046
3124
|
showTooltip: true
|
|
3047
3125
|
}
|
|
3048
3126
|
];
|
|
3049
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3127
|
+
var TextDecorationField = () => /* @__PURE__ */ React64.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React64.createElement(import_ui54.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React64.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React64.createElement(ControlLabel, null, (0, import_i18n41.__)("Line decoration", "elementor"))), /* @__PURE__ */ React64.createElement(import_ui54.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React64.createElement(import_editor_controls42.ToggleControl, { options: options9, exclusive: false }))));
|
|
3050
3128
|
|
|
3051
3129
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3052
|
-
var
|
|
3053
|
-
var
|
|
3130
|
+
var React65 = __toESM(require("react"));
|
|
3131
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
3054
3132
|
var import_icons21 = require("@elementor/icons");
|
|
3055
|
-
var
|
|
3056
|
-
var
|
|
3133
|
+
var import_ui55 = require("@elementor/ui");
|
|
3134
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
3057
3135
|
var options10 = [
|
|
3058
3136
|
{
|
|
3059
3137
|
value: "ltr",
|
|
3060
|
-
label: (0,
|
|
3061
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3138
|
+
label: (0, import_i18n42.__)("Left to right", "elementor"),
|
|
3139
|
+
renderContent: ({ size }) => /* @__PURE__ */ React65.createElement(import_icons21.TextDirectionLtrIcon, { fontSize: size }),
|
|
3062
3140
|
showTooltip: true
|
|
3063
3141
|
},
|
|
3064
3142
|
{
|
|
3065
3143
|
value: "rtl",
|
|
3066
|
-
label: (0,
|
|
3067
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3144
|
+
label: (0, import_i18n42.__)("Right to left", "elementor"),
|
|
3145
|
+
renderContent: ({ size }) => /* @__PURE__ */ React65.createElement(import_icons21.TextDirectionRtlIcon, { fontSize: size }),
|
|
3068
3146
|
showTooltip: true
|
|
3069
3147
|
}
|
|
3070
3148
|
];
|
|
3071
3149
|
var TextDirectionField = () => {
|
|
3072
|
-
return /* @__PURE__ */
|
|
3150
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React65.createElement(import_ui55.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React65.createElement(import_ui55.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, (0, import_i18n42.__)("Direction", "elementor"))), /* @__PURE__ */ React65.createElement(import_ui55.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React65.createElement(import_editor_controls43.ToggleControl, { options: options10 }))));
|
|
3073
3151
|
};
|
|
3074
3152
|
|
|
3075
3153
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
3076
|
-
var
|
|
3077
|
-
var
|
|
3078
|
-
var
|
|
3154
|
+
var React66 = __toESM(require("react"));
|
|
3155
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
3156
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
3079
3157
|
var initTextStroke = {
|
|
3080
3158
|
$$type: "stroke",
|
|
3081
3159
|
value: {
|
|
@@ -3101,64 +3179,64 @@ var TextStrokeField = () => {
|
|
|
3101
3179
|
setTextStroke(null);
|
|
3102
3180
|
};
|
|
3103
3181
|
const hasTextStroke = Boolean(textStroke);
|
|
3104
|
-
return /* @__PURE__ */
|
|
3182
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React66.createElement(
|
|
3105
3183
|
AddOrRemoveContent,
|
|
3106
3184
|
{
|
|
3107
|
-
label: (0,
|
|
3185
|
+
label: (0, import_i18n43.__)("Text stroke", "elementor"),
|
|
3108
3186
|
isAdded: hasTextStroke,
|
|
3109
3187
|
onAdd: addTextStroke,
|
|
3110
3188
|
onRemove: removeTextStroke
|
|
3111
3189
|
},
|
|
3112
|
-
/* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ React66.createElement(import_editor_controls44.StrokeControl, null)
|
|
3113
3191
|
));
|
|
3114
3192
|
};
|
|
3115
3193
|
|
|
3116
3194
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
3117
|
-
var
|
|
3118
|
-
var
|
|
3195
|
+
var React67 = __toESM(require("react"));
|
|
3196
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
3119
3197
|
var import_icons22 = require("@elementor/icons");
|
|
3120
|
-
var
|
|
3121
|
-
var
|
|
3198
|
+
var import_ui56 = require("@elementor/ui");
|
|
3199
|
+
var import_i18n44 = require("@wordpress/i18n");
|
|
3122
3200
|
var options11 = [
|
|
3123
3201
|
{
|
|
3124
3202
|
value: "none",
|
|
3125
|
-
label: (0,
|
|
3126
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3203
|
+
label: (0, import_i18n44.__)("None", "elementor"),
|
|
3204
|
+
renderContent: ({ size }) => /* @__PURE__ */ React67.createElement(import_icons22.MinusIcon, { fontSize: size }),
|
|
3127
3205
|
showTooltip: true
|
|
3128
3206
|
},
|
|
3129
3207
|
{
|
|
3130
3208
|
value: "capitalize",
|
|
3131
|
-
label: (0,
|
|
3132
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3209
|
+
label: (0, import_i18n44.__)("Capitalize", "elementor"),
|
|
3210
|
+
renderContent: ({ size }) => /* @__PURE__ */ React67.createElement(import_icons22.LetterCaseIcon, { fontSize: size }),
|
|
3133
3211
|
showTooltip: true
|
|
3134
3212
|
},
|
|
3135
3213
|
{
|
|
3136
3214
|
value: "uppercase",
|
|
3137
|
-
label: (0,
|
|
3138
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3215
|
+
label: (0, import_i18n44.__)("Uppercase", "elementor"),
|
|
3216
|
+
renderContent: ({ size }) => /* @__PURE__ */ React67.createElement(import_icons22.LetterCaseUpperIcon, { fontSize: size }),
|
|
3139
3217
|
showTooltip: true
|
|
3140
3218
|
},
|
|
3141
3219
|
{
|
|
3142
3220
|
value: "lowercase",
|
|
3143
|
-
label: (0,
|
|
3144
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3221
|
+
label: (0, import_i18n44.__)("Lowercase", "elementor"),
|
|
3222
|
+
renderContent: ({ size }) => /* @__PURE__ */ React67.createElement(import_icons22.LetterCaseLowerIcon, { fontSize: size }),
|
|
3145
3223
|
showTooltip: true
|
|
3146
3224
|
}
|
|
3147
3225
|
];
|
|
3148
|
-
var TransformField = () => /* @__PURE__ */
|
|
3226
|
+
var TransformField = () => /* @__PURE__ */ React67.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React67.createElement(import_ui56.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React67.createElement(import_ui56.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(ControlLabel, null, (0, import_i18n44.__)("Text transform", "elementor"))), /* @__PURE__ */ React67.createElement(import_ui56.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React67.createElement(import_editor_controls45.ToggleControl, { options: options11 }))));
|
|
3149
3227
|
|
|
3150
3228
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
3151
|
-
var
|
|
3152
|
-
var
|
|
3153
|
-
var
|
|
3154
|
-
var
|
|
3229
|
+
var React68 = __toESM(require("react"));
|
|
3230
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
3231
|
+
var import_ui57 = require("@elementor/ui");
|
|
3232
|
+
var import_i18n45 = require("@wordpress/i18n");
|
|
3155
3233
|
var WordSpacingField = () => {
|
|
3156
|
-
return /* @__PURE__ */
|
|
3234
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React68.createElement(import_ui57.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React68.createElement(import_ui57.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(ControlLabel, null, (0, import_i18n45.__)("Word spacing", "elementor"))), /* @__PURE__ */ React68.createElement(import_ui57.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(import_editor_controls46.SizeControl, null))));
|
|
3157
3235
|
};
|
|
3158
3236
|
|
|
3159
3237
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3160
3238
|
var TypographySection = () => {
|
|
3161
|
-
return /* @__PURE__ */
|
|
3239
|
+
return /* @__PURE__ */ React69.createElement(SectionContent, null, /* @__PURE__ */ React69.createElement(FontFamilyField, null), /* @__PURE__ */ React69.createElement(FontWeightField, null), /* @__PURE__ */ React69.createElement(FontSizeField, null), /* @__PURE__ */ React69.createElement(PanelDivider, null), /* @__PURE__ */ React69.createElement(TextAlignmentField, null), /* @__PURE__ */ React69.createElement(TextColorField, null), /* @__PURE__ */ React69.createElement(CollapsibleContent, null, /* @__PURE__ */ React69.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React69.createElement(LineHeightField, null), /* @__PURE__ */ React69.createElement(LetterSpacingField, null), /* @__PURE__ */ React69.createElement(WordSpacingField, null), /* @__PURE__ */ React69.createElement(PanelDivider, null), /* @__PURE__ */ React69.createElement(TextDecorationField, null), /* @__PURE__ */ React69.createElement(TransformField, null), /* @__PURE__ */ React69.createElement(TextDirectionField, null), /* @__PURE__ */ React69.createElement(FontStyleField, null), /* @__PURE__ */ React69.createElement(TextStrokeField, null))));
|
|
3162
3240
|
};
|
|
3163
3241
|
|
|
3164
3242
|
// src/components/style-tab.tsx
|
|
@@ -3173,9 +3251,9 @@ var stickyHeaderStyles = {
|
|
|
3173
3251
|
var StyleTab = () => {
|
|
3174
3252
|
const currentClassesProp = useCurrentClassesProp();
|
|
3175
3253
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
3176
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
3254
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react25.useState)(null);
|
|
3177
3255
|
const breakpoint = (0, import_editor_responsive2.useActiveBreakpoint)();
|
|
3178
|
-
return /* @__PURE__ */
|
|
3256
|
+
return /* @__PURE__ */ React70.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React70.createElement(
|
|
3179
3257
|
StyleProvider,
|
|
3180
3258
|
{
|
|
3181
3259
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -3186,12 +3264,12 @@ var StyleTab = () => {
|
|
|
3186
3264
|
},
|
|
3187
3265
|
setMetaState: setActiveStyleState
|
|
3188
3266
|
},
|
|
3189
|
-
/* @__PURE__ */
|
|
3267
|
+
/* @__PURE__ */ React70.createElement(import_session4.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React70.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React70.createElement(ClassesHeader, null, /* @__PURE__ */ React70.createElement(CssClassSelector, null), /* @__PURE__ */ React70.createElement(import_ui58.Divider, null)), /* @__PURE__ */ React70.createElement(SectionsList, null, /* @__PURE__ */ React70.createElement(Section, { title: (0, import_i18n46.__)("Layout", "elementor") }, /* @__PURE__ */ React70.createElement(LayoutSection, null)), /* @__PURE__ */ React70.createElement(Section, { title: (0, import_i18n46.__)("Spacing", "elementor") }, /* @__PURE__ */ React70.createElement(SpacingSection, null)), /* @__PURE__ */ React70.createElement(Section, { title: (0, import_i18n46.__)("Size", "elementor") }, /* @__PURE__ */ React70.createElement(SizeSection, null)), /* @__PURE__ */ React70.createElement(Section, { title: (0, import_i18n46.__)("Position", "elementor") }, /* @__PURE__ */ React70.createElement(PositionSection, null)), /* @__PURE__ */ React70.createElement(Section, { title: (0, import_i18n46.__)("Typography", "elementor") }, /* @__PURE__ */ React70.createElement(TypographySection, null)), /* @__PURE__ */ React70.createElement(Section, { title: (0, import_i18n46.__)("Background", "elementor") }, /* @__PURE__ */ React70.createElement(BackgroundSection, null)), /* @__PURE__ */ React70.createElement(Section, { title: (0, import_i18n46.__)("Border", "elementor") }, /* @__PURE__ */ React70.createElement(BorderSection, null)), /* @__PURE__ */ React70.createElement(Section, { title: (0, import_i18n46.__)("Effects", "elementor") }, /* @__PURE__ */ React70.createElement(EffectsSection, null)))))
|
|
3190
3268
|
));
|
|
3191
3269
|
};
|
|
3192
3270
|
function ClassesHeader({ children }) {
|
|
3193
3271
|
const scrollDirection = useScrollDirection();
|
|
3194
|
-
return /* @__PURE__ */
|
|
3272
|
+
return /* @__PURE__ */ React70.createElement(import_ui58.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
3195
3273
|
}
|
|
3196
3274
|
function useCurrentClassesProp() {
|
|
3197
3275
|
const { elementType } = useElement();
|
|
@@ -3210,15 +3288,15 @@ var EditingPanelTabs = () => {
|
|
|
3210
3288
|
return (
|
|
3211
3289
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
3212
3290
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
3213
|
-
/* @__PURE__ */
|
|
3291
|
+
/* @__PURE__ */ React71.createElement(import_react26.Fragment, { key: element.id }, /* @__PURE__ */ React71.createElement(PanelTabContent, null))
|
|
3214
3292
|
);
|
|
3215
3293
|
};
|
|
3216
3294
|
var PanelTabContent = () => {
|
|
3217
3295
|
const defaultComponentTab = "settings";
|
|
3218
3296
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
3219
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
3220
|
-
return /* @__PURE__ */
|
|
3221
|
-
|
|
3297
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui59.useTabs)(currentTab);
|
|
3298
|
+
return /* @__PURE__ */ React71.createElement(ScrollProvider, null, /* @__PURE__ */ React71.createElement(import_ui59.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React71.createElement(import_ui59.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React71.createElement(
|
|
3299
|
+
import_ui59.Tabs,
|
|
3222
3300
|
{
|
|
3223
3301
|
variant: "fullWidth",
|
|
3224
3302
|
size: "small",
|
|
@@ -3229,9 +3307,9 @@ var PanelTabContent = () => {
|
|
|
3229
3307
|
setCurrentTab(newValue);
|
|
3230
3308
|
}
|
|
3231
3309
|
},
|
|
3232
|
-
/* @__PURE__ */
|
|
3233
|
-
/* @__PURE__ */
|
|
3234
|
-
), /* @__PURE__ */
|
|
3310
|
+
/* @__PURE__ */ React71.createElement(import_ui59.Tab, { label: (0, import_i18n47.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
3311
|
+
/* @__PURE__ */ React71.createElement(import_ui59.Tab, { label: (0, import_i18n47.__)("Style", "elementor"), ...getTabProps("style") })
|
|
3312
|
+
), /* @__PURE__ */ React71.createElement(import_ui59.Divider, null)), /* @__PURE__ */ React71.createElement(import_ui59.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React71.createElement(SettingsTab, null)), /* @__PURE__ */ React71.createElement(import_ui59.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React71.createElement(StyleTab, null))));
|
|
3235
3313
|
};
|
|
3236
3314
|
|
|
3237
3315
|
// src/components/editing-panel.tsx
|
|
@@ -3243,8 +3321,8 @@ var EditingPanel = () => {
|
|
|
3243
3321
|
if (!element || !elementType) {
|
|
3244
3322
|
return null;
|
|
3245
3323
|
}
|
|
3246
|
-
const panelTitle = (0,
|
|
3247
|
-
return /* @__PURE__ */
|
|
3324
|
+
const panelTitle = (0, import_i18n48.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
3325
|
+
return /* @__PURE__ */ React72.createElement(import_ui60.ErrorBoundary, { fallback: /* @__PURE__ */ React72.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React72.createElement(import_session5.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React72.createElement(import_editor_ui4.ThemeProvider, null, /* @__PURE__ */ React72.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React72.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React72.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React72.createElement(import_icons23.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React72.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React72.createElement(import_editor_controls47.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React72.createElement(import_editor_controls47.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React72.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React72.createElement(EditingPanelTabs, null)))))))));
|
|
3248
3326
|
};
|
|
3249
3327
|
|
|
3250
3328
|
// src/panel.ts
|
|
@@ -3257,11 +3335,11 @@ var { panel, usePanelActions, usePanelStatus } = (0, import_editor_panels2.__cre
|
|
|
3257
3335
|
var import_editor = require("@elementor/editor");
|
|
3258
3336
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
3259
3337
|
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
3260
|
-
var
|
|
3338
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
3261
3339
|
|
|
3262
3340
|
// src/hooks/use-open-editor-panel.ts
|
|
3263
|
-
var
|
|
3264
|
-
var
|
|
3341
|
+
var import_react27 = require("react");
|
|
3342
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
3265
3343
|
|
|
3266
3344
|
// src/sync/is-atomic-widget-selected.ts
|
|
3267
3345
|
var import_editor_elements9 = require("@elementor/editor-elements");
|
|
@@ -3277,8 +3355,8 @@ var isAtomicWidgetSelected = () => {
|
|
|
3277
3355
|
// src/hooks/use-open-editor-panel.ts
|
|
3278
3356
|
var useOpenEditorPanel = () => {
|
|
3279
3357
|
const { open } = usePanelActions();
|
|
3280
|
-
(0,
|
|
3281
|
-
return (0,
|
|
3358
|
+
(0, import_react27.useEffect)(() => {
|
|
3359
|
+
return (0, import_editor_v1_adapters8.__privateListenTo)((0, import_editor_v1_adapters8.commandStartEvent)("panel/editor/open"), () => {
|
|
3282
3360
|
if (isAtomicWidgetSelected()) {
|
|
3283
3361
|
open();
|
|
3284
3362
|
}
|
|
@@ -3296,16 +3374,16 @@ var EditingPanelHooks = () => {
|
|
|
3296
3374
|
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
3297
3375
|
|
|
3298
3376
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
3299
|
-
var
|
|
3300
|
-
var
|
|
3377
|
+
var React76 = __toESM(require("react"));
|
|
3378
|
+
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
3301
3379
|
var import_icons25 = require("@elementor/icons");
|
|
3302
|
-
var
|
|
3303
|
-
var
|
|
3380
|
+
var import_ui63 = require("@elementor/ui");
|
|
3381
|
+
var import_i18n50 = require("@wordpress/i18n");
|
|
3304
3382
|
|
|
3305
3383
|
// src/components/popover-content.tsx
|
|
3306
|
-
var
|
|
3307
|
-
var
|
|
3308
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
3384
|
+
var React73 = __toESM(require("react"));
|
|
3385
|
+
var import_ui61 = require("@elementor/ui");
|
|
3386
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React73.createElement(import_ui61.Stack, { alignItems, gap, p }, children);
|
|
3309
3387
|
|
|
3310
3388
|
// src/hooks/use-persist-dynamic-value.ts
|
|
3311
3389
|
var import_session6 = require("@elementor/session");
|
|
@@ -3316,15 +3394,15 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
3316
3394
|
};
|
|
3317
3395
|
|
|
3318
3396
|
// src/dynamics/dynamic-control.tsx
|
|
3319
|
-
var
|
|
3320
|
-
var
|
|
3397
|
+
var React74 = __toESM(require("react"));
|
|
3398
|
+
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
3321
3399
|
|
|
3322
3400
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
3323
|
-
var
|
|
3401
|
+
var import_react29 = require("react");
|
|
3324
3402
|
|
|
3325
3403
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
3326
|
-
var
|
|
3327
|
-
var
|
|
3404
|
+
var import_react28 = require("react");
|
|
3405
|
+
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
3328
3406
|
|
|
3329
3407
|
// src/dynamics/sync/get-elementor-config.ts
|
|
3330
3408
|
var getElementorConfig2 = () => {
|
|
@@ -3370,12 +3448,12 @@ var dynamicPropTypeUtil = (0, import_editor_props8.createPropUtils)(
|
|
|
3370
3448
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
3371
3449
|
var usePropDynamicTags = () => {
|
|
3372
3450
|
let categories = [];
|
|
3373
|
-
const { propType } = (0,
|
|
3451
|
+
const { propType } = (0, import_editor_controls48.useBoundProp)();
|
|
3374
3452
|
if (propType) {
|
|
3375
3453
|
const propDynamicType = getDynamicPropType(propType);
|
|
3376
3454
|
categories = propDynamicType?.settings.categories || [];
|
|
3377
3455
|
}
|
|
3378
|
-
return (0,
|
|
3456
|
+
return (0, import_react28.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
3379
3457
|
};
|
|
3380
3458
|
var getDynamicTagsByCategories = (categories) => {
|
|
3381
3459
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -3391,12 +3469,12 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
3391
3469
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
3392
3470
|
var useDynamicTag = (tagName) => {
|
|
3393
3471
|
const dynamicTags = usePropDynamicTags();
|
|
3394
|
-
return (0,
|
|
3472
|
+
return (0, import_react29.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
3395
3473
|
};
|
|
3396
3474
|
|
|
3397
3475
|
// src/dynamics/dynamic-control.tsx
|
|
3398
3476
|
var DynamicControl = ({ bind, children }) => {
|
|
3399
|
-
const { value, setValue } = (0,
|
|
3477
|
+
const { value, setValue } = (0, import_editor_controls49.useBoundProp)(dynamicPropTypeUtil);
|
|
3400
3478
|
const { name = "", settings } = value ?? {};
|
|
3401
3479
|
const dynamicTag = useDynamicTag(name);
|
|
3402
3480
|
if (!dynamicTag) {
|
|
@@ -3415,22 +3493,22 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
3415
3493
|
});
|
|
3416
3494
|
};
|
|
3417
3495
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
3418
|
-
return /* @__PURE__ */
|
|
3496
|
+
return /* @__PURE__ */ React74.createElement(import_editor_controls49.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React74.createElement(import_editor_controls49.PropKeyProvider, { bind }, children));
|
|
3419
3497
|
};
|
|
3420
3498
|
|
|
3421
3499
|
// src/dynamics/components/dynamic-selection.tsx
|
|
3422
|
-
var
|
|
3423
|
-
var
|
|
3424
|
-
var
|
|
3500
|
+
var React75 = __toESM(require("react"));
|
|
3501
|
+
var import_react30 = require("react");
|
|
3502
|
+
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
3425
3503
|
var import_icons24 = require("@elementor/icons");
|
|
3426
|
-
var
|
|
3427
|
-
var
|
|
3504
|
+
var import_ui62 = require("@elementor/ui");
|
|
3505
|
+
var import_i18n49 = require("@wordpress/i18n");
|
|
3428
3506
|
var SIZE3 = "tiny";
|
|
3429
3507
|
var DynamicSelection = ({ onSelect }) => {
|
|
3430
|
-
const [searchValue, setSearchValue] = (0,
|
|
3508
|
+
const [searchValue, setSearchValue] = (0, import_react30.useState)("");
|
|
3431
3509
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
3432
|
-
const { value: anyValue } = (0,
|
|
3433
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
3510
|
+
const { value: anyValue } = (0, import_editor_controls50.useBoundProp)();
|
|
3511
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls50.useBoundProp)(dynamicPropTypeUtil);
|
|
3434
3512
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
3435
3513
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
3436
3514
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -3445,28 +3523,28 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3445
3523
|
setValue({ name: value, settings: { label } });
|
|
3446
3524
|
onSelect?.();
|
|
3447
3525
|
};
|
|
3448
|
-
return /* @__PURE__ */
|
|
3449
|
-
|
|
3526
|
+
return /* @__PURE__ */ React75.createElement(import_ui62.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React75.createElement(NoDynamicTags, null) : /* @__PURE__ */ React75.createElement(import_react30.Fragment, null, /* @__PURE__ */ React75.createElement(import_ui62.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React75.createElement(
|
|
3527
|
+
import_ui62.TextField,
|
|
3450
3528
|
{
|
|
3451
3529
|
fullWidth: true,
|
|
3452
3530
|
size: SIZE3,
|
|
3453
3531
|
value: searchValue,
|
|
3454
3532
|
onChange: handleSearch,
|
|
3455
|
-
placeholder: (0,
|
|
3533
|
+
placeholder: (0, import_i18n49.__)("Search dynamic tags\u2026", "elementor"),
|
|
3456
3534
|
InputProps: {
|
|
3457
|
-
startAdornment: /* @__PURE__ */
|
|
3535
|
+
startAdornment: /* @__PURE__ */ React75.createElement(import_ui62.InputAdornment, { position: "start" }, /* @__PURE__ */ React75.createElement(import_icons24.SearchIcon, { fontSize: SIZE3 }))
|
|
3458
3536
|
}
|
|
3459
3537
|
}
|
|
3460
|
-
)), /* @__PURE__ */
|
|
3461
|
-
|
|
3538
|
+
)), /* @__PURE__ */ React75.createElement(import_ui62.Divider, null), /* @__PURE__ */ React75.createElement(import_ui62.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React75.createElement(import_ui62.MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React75.createElement(import_react30.Fragment, { key: index }, /* @__PURE__ */ React75.createElement(
|
|
3539
|
+
import_ui62.MenuSubheader,
|
|
3462
3540
|
{
|
|
3463
3541
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
3464
3542
|
},
|
|
3465
3543
|
dynamicGroups?.[category]?.title || category
|
|
3466
3544
|
), items3.map(({ value, label: tagLabel }) => {
|
|
3467
3545
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
3468
|
-
return /* @__PURE__ */
|
|
3469
|
-
|
|
3546
|
+
return /* @__PURE__ */ React75.createElement(
|
|
3547
|
+
import_ui62.MenuItem,
|
|
3470
3548
|
{
|
|
3471
3549
|
key: value,
|
|
3472
3550
|
selected: isSelected,
|
|
@@ -3476,10 +3554,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3476
3554
|
},
|
|
3477
3555
|
tagLabel
|
|
3478
3556
|
);
|
|
3479
|
-
})))) : /* @__PURE__ */
|
|
3557
|
+
})))) : /* @__PURE__ */ React75.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
3480
3558
|
};
|
|
3481
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
3482
|
-
|
|
3559
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React75.createElement(
|
|
3560
|
+
import_ui62.Stack,
|
|
3483
3561
|
{
|
|
3484
3562
|
gap: 1,
|
|
3485
3563
|
alignItems: "center",
|
|
@@ -3489,12 +3567,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React73.createElem
|
|
|
3489
3567
|
color: "text.secondary",
|
|
3490
3568
|
sx: { pb: 3.5 }
|
|
3491
3569
|
},
|
|
3492
|
-
/* @__PURE__ */
|
|
3493
|
-
/* @__PURE__ */
|
|
3494
|
-
/* @__PURE__ */
|
|
3570
|
+
/* @__PURE__ */ React75.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
3571
|
+
/* @__PURE__ */ React75.createElement(import_ui62.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n49.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React75.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
3572
|
+
/* @__PURE__ */ React75.createElement(import_ui62.Typography, { align: "center", variant: "caption" }, (0, import_i18n49.__)("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React75.createElement(import_ui62.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n49.__)("Clear & try again", "elementor")))
|
|
3495
3573
|
);
|
|
3496
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
3497
|
-
|
|
3574
|
+
var NoDynamicTags = () => /* @__PURE__ */ React75.createElement(import_ui62.Box, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React75.createElement(import_ui62.Divider, null), /* @__PURE__ */ React75.createElement(
|
|
3575
|
+
import_ui62.Stack,
|
|
3498
3576
|
{
|
|
3499
3577
|
gap: 1,
|
|
3500
3578
|
alignItems: "center",
|
|
@@ -3504,9 +3582,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React73.createElement(import_ui60.Box,
|
|
|
3504
3582
|
color: "text.secondary",
|
|
3505
3583
|
sx: { pb: 3.5 }
|
|
3506
3584
|
},
|
|
3507
|
-
/* @__PURE__ */
|
|
3508
|
-
/* @__PURE__ */
|
|
3509
|
-
/* @__PURE__ */
|
|
3585
|
+
/* @__PURE__ */ React75.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
3586
|
+
/* @__PURE__ */ React75.createElement(import_ui62.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n49.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
3587
|
+
/* @__PURE__ */ React75.createElement(import_ui62.Typography, { align: "center", variant: "caption" }, (0, import_i18n49.__)("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
3510
3588
|
));
|
|
3511
3589
|
var useFilteredOptions = (searchValue) => {
|
|
3512
3590
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -3527,10 +3605,10 @@ var useFilteredOptions = (searchValue) => {
|
|
|
3527
3605
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
3528
3606
|
var SIZE4 = "tiny";
|
|
3529
3607
|
var DynamicSelectionControl = () => {
|
|
3530
|
-
const { setValue: setAnyValue } = (0,
|
|
3531
|
-
const { bind, value } = (0,
|
|
3608
|
+
const { setValue: setAnyValue } = (0, import_editor_controls51.useBoundProp)();
|
|
3609
|
+
const { bind, value } = (0, import_editor_controls51.useBoundProp)(dynamicPropTypeUtil);
|
|
3532
3610
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
3533
|
-
const selectionPopoverState = (0,
|
|
3611
|
+
const selectionPopoverState = (0, import_ui63.usePopupState)({ variant: "popover" });
|
|
3534
3612
|
const { name: tagName = "" } = value;
|
|
3535
3613
|
const dynamicTag = useDynamicTag(tagName);
|
|
3536
3614
|
const removeDynamicTag = () => {
|
|
@@ -3539,62 +3617,62 @@ var DynamicSelectionControl = () => {
|
|
|
3539
3617
|
if (!dynamicTag) {
|
|
3540
3618
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
3541
3619
|
}
|
|
3542
|
-
return /* @__PURE__ */
|
|
3543
|
-
|
|
3620
|
+
return /* @__PURE__ */ React76.createElement(import_ui63.Box, null, /* @__PURE__ */ React76.createElement(
|
|
3621
|
+
import_ui63.UnstableTag,
|
|
3544
3622
|
{
|
|
3545
3623
|
fullWidth: true,
|
|
3546
3624
|
showActionsOnHover: true,
|
|
3547
3625
|
label: dynamicTag.label,
|
|
3548
|
-
startIcon: /* @__PURE__ */
|
|
3549
|
-
...(0,
|
|
3550
|
-
actions: /* @__PURE__ */
|
|
3551
|
-
|
|
3626
|
+
startIcon: /* @__PURE__ */ React76.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4 }),
|
|
3627
|
+
...(0, import_ui63.bindTrigger)(selectionPopoverState),
|
|
3628
|
+
actions: /* @__PURE__ */ React76.createElement(React76.Fragment, null, /* @__PURE__ */ React76.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React76.createElement(
|
|
3629
|
+
import_ui63.IconButton,
|
|
3552
3630
|
{
|
|
3553
3631
|
size: SIZE4,
|
|
3554
3632
|
onClick: removeDynamicTag,
|
|
3555
|
-
"aria-label": (0,
|
|
3633
|
+
"aria-label": (0, import_i18n50.__)("Remove dynamic value", "elementor")
|
|
3556
3634
|
},
|
|
3557
|
-
/* @__PURE__ */
|
|
3635
|
+
/* @__PURE__ */ React76.createElement(import_icons25.XIcon, { fontSize: SIZE4 })
|
|
3558
3636
|
))
|
|
3559
3637
|
}
|
|
3560
|
-
), /* @__PURE__ */
|
|
3561
|
-
|
|
3638
|
+
), /* @__PURE__ */ React76.createElement(
|
|
3639
|
+
import_ui63.Popover,
|
|
3562
3640
|
{
|
|
3563
3641
|
disablePortal: true,
|
|
3564
3642
|
disableScrollLock: true,
|
|
3565
3643
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
3566
|
-
...(0,
|
|
3644
|
+
...(0, import_ui63.bindPopover)(selectionPopoverState)
|
|
3567
3645
|
},
|
|
3568
|
-
/* @__PURE__ */
|
|
3646
|
+
/* @__PURE__ */ React76.createElement(import_ui63.Stack, null, /* @__PURE__ */ React76.createElement(import_ui63.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React76.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React76.createElement(import_ui63.Typography, { variant: "subtitle2" }, (0, import_i18n50.__)("Dynamic tags", "elementor")), /* @__PURE__ */ React76.createElement(import_ui63.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React76.createElement(import_icons25.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React76.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
3569
3647
|
));
|
|
3570
3648
|
};
|
|
3571
3649
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
3572
|
-
const popupState = (0,
|
|
3650
|
+
const popupState = (0, import_ui63.usePopupState)({ variant: "popover" });
|
|
3573
3651
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
3574
3652
|
if (!hasDynamicSettings) {
|
|
3575
3653
|
return null;
|
|
3576
3654
|
}
|
|
3577
|
-
return /* @__PURE__ */
|
|
3578
|
-
|
|
3655
|
+
return /* @__PURE__ */ React76.createElement(React76.Fragment, null, /* @__PURE__ */ React76.createElement(import_ui63.IconButton, { size: SIZE4, ...(0, import_ui63.bindTrigger)(popupState), "aria-label": (0, import_i18n50.__)("Settings", "elementor") }, /* @__PURE__ */ React76.createElement(import_icons25.SettingsIcon, { fontSize: SIZE4 })), /* @__PURE__ */ React76.createElement(
|
|
3656
|
+
import_ui63.Popover,
|
|
3579
3657
|
{
|
|
3580
3658
|
disablePortal: true,
|
|
3581
3659
|
disableScrollLock: true,
|
|
3582
3660
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
3583
|
-
...(0,
|
|
3661
|
+
...(0, import_ui63.bindPopover)(popupState)
|
|
3584
3662
|
},
|
|
3585
|
-
/* @__PURE__ */
|
|
3663
|
+
/* @__PURE__ */ React76.createElement(import_ui63.Paper, { component: import_ui63.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React76.createElement(import_ui63.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React76.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React76.createElement(import_ui63.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React76.createElement(import_ui63.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: popupState.close }, /* @__PURE__ */ React76.createElement(import_icons25.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React76.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
3586
3664
|
));
|
|
3587
3665
|
};
|
|
3588
3666
|
var DynamicSettings = ({ controls }) => {
|
|
3589
3667
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
3590
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
3668
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui63.useTabs)(0);
|
|
3591
3669
|
if (!tabs.length) {
|
|
3592
3670
|
return null;
|
|
3593
3671
|
}
|
|
3594
|
-
return /* @__PURE__ */
|
|
3595
|
-
return /* @__PURE__ */
|
|
3672
|
+
return /* @__PURE__ */ React76.createElement(React76.Fragment, null, /* @__PURE__ */ React76.createElement(import_ui63.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React76.createElement(import_ui63.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React76.createElement(import_ui63.Divider, null), tabs.map(({ value }, index) => {
|
|
3673
|
+
return /* @__PURE__ */ React76.createElement(import_ui63.TabPanel, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React76.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
3596
3674
|
if (item.type === "control") {
|
|
3597
|
-
return /* @__PURE__ */
|
|
3675
|
+
return /* @__PURE__ */ React76.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
3598
3676
|
}
|
|
3599
3677
|
return null;
|
|
3600
3678
|
})));
|
|
@@ -3604,7 +3682,7 @@ var Control3 = ({ control }) => {
|
|
|
3604
3682
|
if (!getControl(control.type)) {
|
|
3605
3683
|
return null;
|
|
3606
3684
|
}
|
|
3607
|
-
return /* @__PURE__ */
|
|
3685
|
+
return /* @__PURE__ */ React76.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React76.createElement(import_ui63.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React76.createElement(import_ui63.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React76.createElement(import_editor_controls51.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React76.createElement(import_ui63.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React76.createElement(Control, { type: control.type, props: control.props }))));
|
|
3608
3686
|
};
|
|
3609
3687
|
|
|
3610
3688
|
// src/dynamics/dynamic-transformer.ts
|
|
@@ -3657,18 +3735,18 @@ function getDynamicValue(name, settings) {
|
|
|
3657
3735
|
}
|
|
3658
3736
|
|
|
3659
3737
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
3660
|
-
var
|
|
3661
|
-
var
|
|
3738
|
+
var React77 = __toESM(require("react"));
|
|
3739
|
+
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
3662
3740
|
var import_icons26 = require("@elementor/icons");
|
|
3663
|
-
var
|
|
3741
|
+
var import_i18n51 = require("@wordpress/i18n");
|
|
3664
3742
|
var usePropDynamicAction = () => {
|
|
3665
|
-
const { propType } = (0,
|
|
3743
|
+
const { propType } = (0, import_editor_controls52.useBoundProp)();
|
|
3666
3744
|
const visible = !!propType && supportsDynamic(propType);
|
|
3667
3745
|
return {
|
|
3668
3746
|
visible,
|
|
3669
3747
|
icon: import_icons26.DatabaseIcon,
|
|
3670
|
-
title: (0,
|
|
3671
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
3748
|
+
title: (0, import_i18n51.__)("Dynamic tags", "elementor"),
|
|
3749
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React77.createElement(DynamicSelection, { onSelect: closePopover })
|
|
3672
3750
|
};
|
|
3673
3751
|
};
|
|
3674
3752
|
|
|
@@ -3702,7 +3780,7 @@ function init2() {
|
|
|
3702
3780
|
init();
|
|
3703
3781
|
}
|
|
3704
3782
|
var blockV1Panel = () => {
|
|
3705
|
-
(0,
|
|
3783
|
+
(0, import_editor_v1_adapters9.blockCommand)({
|
|
3706
3784
|
command: "panel/editor/open",
|
|
3707
3785
|
condition: isAtomicWidgetSelected
|
|
3708
3786
|
});
|