@elementor/editor-editing-panel 4.2.0-911 → 4.2.0-913
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/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +175 -173
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +109 -108
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -147,8 +147,17 @@ var onConvert = (opts) => {
|
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
+
// src/components/control-label.tsx
|
|
151
|
+
import * as React5 from "react";
|
|
152
|
+
import { ControlAdornments, ControlFormLabel } from "@elementor/editor-controls";
|
|
153
|
+
import { InfoCircleIcon } from "@elementor/icons";
|
|
154
|
+
import { Stack, Tooltip } from "@elementor/ui";
|
|
155
|
+
var ControlLabel = ({ children, infoTooltip }) => {
|
|
156
|
+
return /* @__PURE__ */ React5.createElement(Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React5.createElement(ControlFormLabel, null, children), infoTooltip && /* @__PURE__ */ React5.createElement(Tooltip, { title: infoTooltip, placement: "top" }, /* @__PURE__ */ React5.createElement(InfoCircleIcon, { fontSize: "tiny" })), /* @__PURE__ */ React5.createElement(ControlAdornments, null));
|
|
157
|
+
};
|
|
158
|
+
|
|
150
159
|
// src/components/css-classes/css-class-selector.tsx
|
|
151
|
-
import * as
|
|
160
|
+
import * as React13 from "react";
|
|
152
161
|
import { useCallback as useCallback2, useRef, useState as useState4 } from "react";
|
|
153
162
|
import {
|
|
154
163
|
isElementsStylesProvider as isElementsStylesProvider4,
|
|
@@ -166,7 +175,7 @@ import {
|
|
|
166
175
|
Chip as Chip3,
|
|
167
176
|
FormLabel,
|
|
168
177
|
Link,
|
|
169
|
-
Stack as
|
|
178
|
+
Stack as Stack4,
|
|
170
179
|
Typography as Typography4
|
|
171
180
|
} from "@elementor/ui";
|
|
172
181
|
import { __ as __7 } from "@wordpress/i18n";
|
|
@@ -219,7 +228,7 @@ var trackStyles = (provider, event, data) => {
|
|
|
219
228
|
};
|
|
220
229
|
|
|
221
230
|
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
222
|
-
import * as
|
|
231
|
+
import * as React6 from "react";
|
|
223
232
|
import { useId, useMemo } from "react";
|
|
224
233
|
import {
|
|
225
234
|
Autocomplete,
|
|
@@ -408,7 +417,7 @@ function useFilterOptions(parameters) {
|
|
|
408
417
|
|
|
409
418
|
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
410
419
|
var MIN_INPUT_LENGTH = 2;
|
|
411
|
-
var CreatableAutocomplete =
|
|
420
|
+
var CreatableAutocomplete = React6.forwardRef(CreatableAutocompleteInner);
|
|
412
421
|
function CreatableAutocompleteInner({
|
|
413
422
|
selected,
|
|
414
423
|
options: options13,
|
|
@@ -437,11 +446,11 @@ function CreatableAutocompleteInner({
|
|
|
437
446
|
const filterOptions = useFilterOptions({ options: options13, selected, onCreate, entityName });
|
|
438
447
|
const isCreatable = Boolean(onCreate);
|
|
439
448
|
const freeSolo = isCreatable || inputValue.length < MIN_INPUT_LENGTH || void 0;
|
|
440
|
-
return /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ React6.createElement(
|
|
441
450
|
Autocomplete,
|
|
442
451
|
{
|
|
443
452
|
renderTags: (tagValue, getTagProps) => {
|
|
444
|
-
return tagValue.map((option, index) => /* @__PURE__ */
|
|
453
|
+
return tagValue.map((option, index) => /* @__PURE__ */ React6.createElement(
|
|
445
454
|
Chip,
|
|
446
455
|
{
|
|
447
456
|
size: "tiny",
|
|
@@ -467,11 +476,11 @@ function CreatableAutocompleteInner({
|
|
|
467
476
|
disableCloseOnSelect: true,
|
|
468
477
|
value: internalSelected,
|
|
469
478
|
options: internalOptions,
|
|
470
|
-
ListboxComponent: error ?
|
|
471
|
-
renderGroup: (params) => /* @__PURE__ */
|
|
479
|
+
ListboxComponent: error ? React6.forwardRef((_, errorTextRef) => /* @__PURE__ */ React6.createElement(ErrorText, { ref: errorTextRef, error })) : void 0,
|
|
480
|
+
renderGroup: (params) => /* @__PURE__ */ React6.createElement(Group, { ...params }),
|
|
472
481
|
inputValue,
|
|
473
482
|
renderInput: (params) => {
|
|
474
|
-
return /* @__PURE__ */
|
|
483
|
+
return /* @__PURE__ */ React6.createElement(
|
|
475
484
|
TextField,
|
|
476
485
|
{
|
|
477
486
|
...params,
|
|
@@ -499,7 +508,7 @@ function CreatableAutocompleteInner({
|
|
|
499
508
|
groupBy: (option) => option._group ?? "",
|
|
500
509
|
renderOption: (optionProps, option) => {
|
|
501
510
|
const { _group, label } = option;
|
|
502
|
-
return /* @__PURE__ */
|
|
511
|
+
return /* @__PURE__ */ React6.createElement(
|
|
503
512
|
"li",
|
|
504
513
|
{
|
|
505
514
|
...optionProps,
|
|
@@ -527,10 +536,10 @@ function CreatableAutocompleteInner({
|
|
|
527
536
|
}
|
|
528
537
|
var Group = (params) => {
|
|
529
538
|
const id = `combobox-group-${useId().replace(/:/g, "_")}`;
|
|
530
|
-
return /* @__PURE__ */
|
|
539
|
+
return /* @__PURE__ */ React6.createElement(StyledGroup, { role: "group", "aria-labelledby": id }, /* @__PURE__ */ React6.createElement(StyledGroupHeader, { id }, " ", params.group), /* @__PURE__ */ React6.createElement(StyledGroupItems, { role: "listbox" }, params.children));
|
|
531
540
|
};
|
|
532
|
-
var ErrorText =
|
|
533
|
-
return /* @__PURE__ */
|
|
541
|
+
var ErrorText = React6.forwardRef(({ error = "error" }, ref) => {
|
|
542
|
+
return /* @__PURE__ */ React6.createElement(
|
|
534
543
|
Box,
|
|
535
544
|
{
|
|
536
545
|
ref,
|
|
@@ -538,7 +547,7 @@ var ErrorText = React5.forwardRef(({ error = "error" }, ref) => {
|
|
|
538
547
|
padding: theme.spacing(2)
|
|
539
548
|
})
|
|
540
549
|
},
|
|
541
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ React6.createElement(Typography, { variant: "caption", sx: { color: "error.main", display: "inline-block" } }, error)
|
|
542
551
|
);
|
|
543
552
|
});
|
|
544
553
|
var StyledGroup = styled("li")`
|
|
@@ -558,7 +567,7 @@ var StyledGroupItems = styled("ul")`
|
|
|
558
567
|
`;
|
|
559
568
|
|
|
560
569
|
// src/components/css-classes/css-class-item.tsx
|
|
561
|
-
import * as
|
|
570
|
+
import * as React11 from "react";
|
|
562
571
|
import { useEffect, useMemo as useMemo3, useState as useState3 } from "react";
|
|
563
572
|
import { isClassState } from "@elementor/editor-styles";
|
|
564
573
|
import { stylesRepository as stylesRepository6, useUserStylesCapability as useUserStylesCapability4, validateStyleLabel } from "@elementor/editor-styles-repository";
|
|
@@ -568,7 +577,7 @@ import { useSessionStorage as useSessionStorage3 } from "@elementor/session";
|
|
|
568
577
|
import {
|
|
569
578
|
bindTrigger,
|
|
570
579
|
Chip as Chip2,
|
|
571
|
-
Stack as
|
|
580
|
+
Stack as Stack3,
|
|
572
581
|
ThemeProvider,
|
|
573
582
|
Typography as Typography2,
|
|
574
583
|
UnstableChipGroup,
|
|
@@ -577,7 +586,7 @@ import {
|
|
|
577
586
|
import { __ as __5 } from "@wordpress/i18n";
|
|
578
587
|
|
|
579
588
|
// src/components/css-classes/css-class-context.tsx
|
|
580
|
-
import * as
|
|
589
|
+
import * as React7 from "react";
|
|
581
590
|
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
582
591
|
var CssClassContext = createContext4(null);
|
|
583
592
|
var useCssClass = () => {
|
|
@@ -588,18 +597,18 @@ var useCssClass = () => {
|
|
|
588
597
|
return context;
|
|
589
598
|
};
|
|
590
599
|
function CssClassProvider({ children, ...contextValue }) {
|
|
591
|
-
return /* @__PURE__ */
|
|
600
|
+
return /* @__PURE__ */ React7.createElement(CssClassContext.Provider, { value: contextValue }, children);
|
|
592
601
|
}
|
|
593
602
|
|
|
594
603
|
// src/components/css-classes/css-class-menu.tsx
|
|
595
|
-
import * as
|
|
604
|
+
import * as React10 from "react";
|
|
596
605
|
import {
|
|
597
606
|
isElementsStylesProvider as isElementsStylesProvider3,
|
|
598
607
|
stylesRepository as stylesRepository5,
|
|
599
608
|
useUserStylesCapability as useUserStylesCapability3
|
|
600
609
|
} from "@elementor/editor-styles-repository";
|
|
601
610
|
import { MenuItemInfotip, MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
|
|
602
|
-
import { bindMenu, Divider, Menu, MenuSubheader as MenuSubheader2, Stack } from "@elementor/ui";
|
|
611
|
+
import { bindMenu, Divider, Menu, MenuSubheader as MenuSubheader2, Stack as Stack2 } from "@elementor/ui";
|
|
603
612
|
import { __ as __4 } from "@wordpress/i18n";
|
|
604
613
|
|
|
605
614
|
// src/components/style-indicator.tsx
|
|
@@ -620,7 +629,7 @@ var StyleIndicator = styled2("div", {
|
|
|
620
629
|
`;
|
|
621
630
|
|
|
622
631
|
// src/components/css-classes/duplicate-class-menu-item.tsx
|
|
623
|
-
import * as
|
|
632
|
+
import * as React8 from "react";
|
|
624
633
|
import { stylesRepository as stylesRepository4, useUserStylesCapability as useUserStylesCapability2 } from "@elementor/editor-styles-repository";
|
|
625
634
|
import { MenuListItem } from "@elementor/editor-ui";
|
|
626
635
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -872,11 +881,11 @@ function DuplicateClassMenuItem({ closeMenu }) {
|
|
|
872
881
|
}
|
|
873
882
|
closeMenu();
|
|
874
883
|
};
|
|
875
|
-
return /* @__PURE__ */
|
|
884
|
+
return /* @__PURE__ */ React8.createElement(MenuListItem, { onClick: handleDuplicate }, __2("Duplicate", "elementor"));
|
|
876
885
|
}
|
|
877
886
|
|
|
878
887
|
// src/components/css-classes/local-class-sub-menu.tsx
|
|
879
|
-
import * as
|
|
888
|
+
import * as React9 from "react";
|
|
880
889
|
import { MenuSubheader } from "@elementor/ui";
|
|
881
890
|
import { __ as __3 } from "@wordpress/i18n";
|
|
882
891
|
|
|
@@ -900,7 +909,7 @@ var useCanConvertLocalClassToGlobal = () => {
|
|
|
900
909
|
// src/components/css-classes/local-class-sub-menu.tsx
|
|
901
910
|
var LocalClassSubMenu = (props) => {
|
|
902
911
|
const { canConvert, styleDef } = useCanConvertLocalClassToGlobal();
|
|
903
|
-
return /* @__PURE__ */
|
|
912
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __3("Local Class", "elementor")), /* @__PURE__ */ React9.createElement(CssClassConvert, { canConvert, styleDef, closeMenu: props.popupState.close }));
|
|
904
913
|
};
|
|
905
914
|
|
|
906
915
|
// src/components/css-classes/css-class-menu.tsx
|
|
@@ -927,7 +936,7 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
927
936
|
const handleKeyDown = (e) => {
|
|
928
937
|
e.stopPropagation();
|
|
929
938
|
};
|
|
930
|
-
return /* @__PURE__ */
|
|
939
|
+
return /* @__PURE__ */ React10.createElement(
|
|
931
940
|
Menu,
|
|
932
941
|
{
|
|
933
942
|
MenuListProps: { dense: true, sx: { minWidth: "160px" } },
|
|
@@ -944,11 +953,11 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
944
953
|
onKeyDown: handleKeyDown,
|
|
945
954
|
disableAutoFocusItem: true
|
|
946
955
|
},
|
|
947
|
-
isLocalStyle2 && /* @__PURE__ */
|
|
956
|
+
isLocalStyle2 && /* @__PURE__ */ React10.createElement(LocalClassSubMenu, { popupState }),
|
|
948
957
|
getMenuItemsByProvider({ provider, closeMenu: popupState.close, fixed }),
|
|
949
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ React10.createElement(MenuSubheader2, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __4("States", "elementor")),
|
|
950
959
|
pseudoStates.map((state) => {
|
|
951
|
-
return /* @__PURE__ */
|
|
960
|
+
return /* @__PURE__ */ React10.createElement(
|
|
952
961
|
StateMenuItem,
|
|
953
962
|
{
|
|
954
963
|
key: state.key,
|
|
@@ -958,7 +967,7 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
958
967
|
}
|
|
959
968
|
);
|
|
960
969
|
}),
|
|
961
|
-
/* @__PURE__ */
|
|
970
|
+
/* @__PURE__ */ React10.createElement(ClassStatesMenu, { closeMenu: popupState.close })
|
|
962
971
|
);
|
|
963
972
|
}
|
|
964
973
|
function ClassStatesMenu({ closeMenu }) {
|
|
@@ -967,8 +976,8 @@ function ClassStatesMenu({ closeMenu }) {
|
|
|
967
976
|
return null;
|
|
968
977
|
}
|
|
969
978
|
const customTitle = __4("%s States", "elementor").replace("%s", elementTitle);
|
|
970
|
-
return /* @__PURE__ */
|
|
971
|
-
return /* @__PURE__ */
|
|
979
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Divider, null), /* @__PURE__ */ React10.createElement(MenuSubheader2, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, customTitle), elementStates.map((state) => {
|
|
980
|
+
return /* @__PURE__ */ React10.createElement(
|
|
972
981
|
StateMenuItem,
|
|
973
982
|
{
|
|
974
983
|
key: state.key,
|
|
@@ -1018,13 +1027,13 @@ function getMenuItemsByProvider({
|
|
|
1018
1027
|
const canDuplicate = providerActions?.create && providerActions?.get;
|
|
1019
1028
|
const canUnapply = !fixed;
|
|
1020
1029
|
const actions = [
|
|
1021
|
-
canUpdate && /* @__PURE__ */
|
|
1022
|
-
canDuplicate && /* @__PURE__ */
|
|
1023
|
-
canUnapply && /* @__PURE__ */
|
|
1030
|
+
canUpdate && /* @__PURE__ */ React10.createElement(RenameClassMenuItem, { key: "rename-class", closeMenu }),
|
|
1031
|
+
canDuplicate && /* @__PURE__ */ React10.createElement(DuplicateClassMenuItem, { key: "duplicate-class", closeMenu }),
|
|
1032
|
+
canUnapply && /* @__PURE__ */ React10.createElement(UnapplyClassMenuItem, { key: "unapply-class", closeMenu })
|
|
1024
1033
|
].filter(Boolean);
|
|
1025
1034
|
if (actions.length) {
|
|
1026
1035
|
actions.unshift(
|
|
1027
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ React10.createElement(
|
|
1028
1037
|
MenuSubheader2,
|
|
1029
1038
|
{
|
|
1030
1039
|
key: "provider-label",
|
|
@@ -1033,7 +1042,7 @@ function getMenuItemsByProvider({
|
|
|
1033
1042
|
providerInstance?.labels?.singular
|
|
1034
1043
|
)
|
|
1035
1044
|
);
|
|
1036
|
-
actions.push(/* @__PURE__ */
|
|
1045
|
+
actions.push(/* @__PURE__ */ React10.createElement(Divider, { key: "provider-actions-divider" }));
|
|
1037
1046
|
}
|
|
1038
1047
|
return actions;
|
|
1039
1048
|
}
|
|
@@ -1048,7 +1057,7 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
1048
1057
|
const disabled = !isUpdateAllowed && !isStyled;
|
|
1049
1058
|
const isActive = styleId === activeId;
|
|
1050
1059
|
const isSelected = state === activeState && isActive;
|
|
1051
|
-
return /* @__PURE__ */
|
|
1060
|
+
return /* @__PURE__ */ React10.createElement(
|
|
1052
1061
|
MenuListItem2,
|
|
1053
1062
|
{
|
|
1054
1063
|
...props,
|
|
@@ -1068,13 +1077,13 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
1068
1077
|
closeMenu();
|
|
1069
1078
|
}
|
|
1070
1079
|
},
|
|
1071
|
-
/* @__PURE__ */
|
|
1080
|
+
/* @__PURE__ */ React10.createElement(
|
|
1072
1081
|
MenuItemInfotip,
|
|
1073
1082
|
{
|
|
1074
1083
|
showInfoTip: disabled,
|
|
1075
1084
|
content: __4("With your current role, you can only use existing states.", "elementor")
|
|
1076
1085
|
},
|
|
1077
|
-
/* @__PURE__ */
|
|
1086
|
+
/* @__PURE__ */ React10.createElement(Stack2, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React10.createElement(
|
|
1078
1087
|
StyleIndicator,
|
|
1079
1088
|
{
|
|
1080
1089
|
"aria-label": __4("Has style", "elementor"),
|
|
@@ -1087,7 +1096,7 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
1087
1096
|
function UnapplyClassMenuItem({ closeMenu, ...props }) {
|
|
1088
1097
|
const { id: classId, label: classLabel, provider } = useCssClass();
|
|
1089
1098
|
const unapplyClass = useUndoableUnapplyClass();
|
|
1090
|
-
return classId ? /* @__PURE__ */
|
|
1099
|
+
return classId ? /* @__PURE__ */ React10.createElement(
|
|
1091
1100
|
MenuListItem2,
|
|
1092
1101
|
{
|
|
1093
1102
|
...props,
|
|
@@ -1111,7 +1120,7 @@ function RenameClassMenuItem({ closeMenu }) {
|
|
|
1111
1120
|
return null;
|
|
1112
1121
|
}
|
|
1113
1122
|
const isAllowed = userCan(provider).update;
|
|
1114
|
-
return /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ React10.createElement(
|
|
1115
1124
|
MenuListItem2,
|
|
1116
1125
|
{
|
|
1117
1126
|
disabled: !isAllowed,
|
|
@@ -1120,7 +1129,7 @@ function RenameClassMenuItem({ closeMenu }) {
|
|
|
1120
1129
|
handleRename();
|
|
1121
1130
|
}
|
|
1122
1131
|
},
|
|
1123
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ React10.createElement(
|
|
1124
1133
|
MenuItemInfotip,
|
|
1125
1134
|
{
|
|
1126
1135
|
showInfoTip: !isAllowed,
|
|
@@ -1177,7 +1186,7 @@ function CssClassItem(props) {
|
|
|
1177
1186
|
openEditMode();
|
|
1178
1187
|
}
|
|
1179
1188
|
}, [id, convertedFromLocalId]);
|
|
1180
|
-
return /* @__PURE__ */
|
|
1189
|
+
return /* @__PURE__ */ React11.createElement(ThemeProvider, { palette: "default" }, /* @__PURE__ */ React11.createElement(
|
|
1181
1190
|
UnstableChipGroup,
|
|
1182
1191
|
{
|
|
1183
1192
|
ref: setChipRef,
|
|
@@ -1188,11 +1197,11 @@ function CssClassItem(props) {
|
|
|
1188
1197
|
"&.MuiChipGroup-root.MuiAutocomplete-tag": { margin: theme.spacing(0.125) }
|
|
1189
1198
|
})
|
|
1190
1199
|
},
|
|
1191
|
-
/* @__PURE__ */
|
|
1200
|
+
/* @__PURE__ */ React11.createElement(
|
|
1192
1201
|
Chip2,
|
|
1193
1202
|
{
|
|
1194
1203
|
size: CHIP_SIZE,
|
|
1195
|
-
label: isEditing ? /* @__PURE__ */
|
|
1204
|
+
label: isEditing ? /* @__PURE__ */ React11.createElement(EditableField, { ref, ...getEditableProps() }) : /* @__PURE__ */ React11.createElement(EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
|
|
1196
1205
|
variant: isActive && !meta.state && !isEditing ? "filled" : "standard",
|
|
1197
1206
|
shape: "rounded",
|
|
1198
1207
|
icon,
|
|
@@ -1219,12 +1228,12 @@ function CssClassItem(props) {
|
|
|
1219
1228
|
})
|
|
1220
1229
|
}
|
|
1221
1230
|
),
|
|
1222
|
-
!isEditing && /* @__PURE__ */
|
|
1231
|
+
!isEditing && /* @__PURE__ */ React11.createElement(
|
|
1223
1232
|
Chip2,
|
|
1224
1233
|
{
|
|
1225
|
-
icon: isShowingState ? void 0 : /* @__PURE__ */
|
|
1234
|
+
icon: isShowingState ? void 0 : /* @__PURE__ */ React11.createElement(DotsVerticalIcon, { fontSize: "tiny" }),
|
|
1226
1235
|
size: CHIP_SIZE,
|
|
1227
|
-
label: isShowingState ? /* @__PURE__ */
|
|
1236
|
+
label: isShowingState ? /* @__PURE__ */ React11.createElement(Stack3, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React11.createElement(Typography2, { variant: "inherit" }, stateLabel), /* @__PURE__ */ React11.createElement(DotsVerticalIcon, { fontSize: "tiny" })) : void 0,
|
|
1228
1237
|
variant: "filled",
|
|
1229
1238
|
shape: "rounded",
|
|
1230
1239
|
color,
|
|
@@ -1238,7 +1247,7 @@ function CssClassItem(props) {
|
|
|
1238
1247
|
})
|
|
1239
1248
|
}
|
|
1240
1249
|
)
|
|
1241
|
-
), /* @__PURE__ */
|
|
1250
|
+
), /* @__PURE__ */ React11.createElement(CssClassProvider, { ...classProps, handleRename: openEditMode }, /* @__PURE__ */ React11.createElement(CssClassMenu, { popupState, anchorEl: chipRef, fixed })));
|
|
1242
1251
|
}
|
|
1243
1252
|
var validateLabel = (newLabel) => {
|
|
1244
1253
|
const result = validateStyleLabel(newLabel, "rename");
|
|
@@ -1249,22 +1258,22 @@ var validateLabel = (newLabel) => {
|
|
|
1249
1258
|
};
|
|
1250
1259
|
|
|
1251
1260
|
// src/components/css-classes/missing-classes-alert.tsx
|
|
1252
|
-
import * as
|
|
1261
|
+
import * as React12 from "react";
|
|
1253
1262
|
import { AlertTriangleFilledIcon } from "@elementor/icons";
|
|
1254
1263
|
import { Alert, AlertTitle, Typography as Typography3 } from "@elementor/ui";
|
|
1255
1264
|
import { __ as __6 } from "@wordpress/i18n";
|
|
1256
1265
|
function MissingClassesAlert({ onDismiss }) {
|
|
1257
|
-
return /* @__PURE__ */
|
|
1266
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1258
1267
|
Alert,
|
|
1259
1268
|
{
|
|
1260
1269
|
severity: "warning",
|
|
1261
1270
|
onClose: onDismiss,
|
|
1262
1271
|
size: "small",
|
|
1263
|
-
icon: /* @__PURE__ */
|
|
1272
|
+
icon: /* @__PURE__ */ React12.createElement(AlertTriangleFilledIcon, { fontSize: "tiny" }),
|
|
1264
1273
|
sx: { mt: 1 }
|
|
1265
1274
|
},
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
/* @__PURE__ */
|
|
1275
|
+
/* @__PURE__ */ React12.createElement(AlertTitle, null, __6("Some classes are missing", "elementor")),
|
|
1276
|
+
/* @__PURE__ */ React12.createElement(Typography3, { variant: "caption", textColor: "primary" }, __6("A class was removed from your site and is no longer active on this element", "elementor"))
|
|
1268
1277
|
);
|
|
1269
1278
|
}
|
|
1270
1279
|
|
|
@@ -1295,7 +1304,7 @@ var EMPTY_OPTION = {
|
|
|
1295
1304
|
value: null,
|
|
1296
1305
|
fixed: true,
|
|
1297
1306
|
color: getTempStylesProviderColorName("accent"),
|
|
1298
|
-
icon: /* @__PURE__ */
|
|
1307
|
+
icon: /* @__PURE__ */ React13.createElement(MapPinIcon, null),
|
|
1299
1308
|
provider: null
|
|
1300
1309
|
};
|
|
1301
1310
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = createLocation2();
|
|
@@ -1317,7 +1326,7 @@ function CssClassSelector() {
|
|
|
1317
1326
|
const clearMissingClasses = useCallback2(() => {
|
|
1318
1327
|
unapplyClasses(missingClassesIds);
|
|
1319
1328
|
}, [missingClassesIds, unapplyClasses]);
|
|
1320
|
-
return /* @__PURE__ */
|
|
1329
|
+
return /* @__PURE__ */ React13.createElement(Stack4, { p: 2 }, /* @__PURE__ */ React13.createElement(Stack4, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React13.createElement(FormLabel, { htmlFor: ID, size: "small" }, __7("Classes", "elementor")), /* @__PURE__ */ React13.createElement(Stack4, { direction: "row", gap: 1 }, /* @__PURE__ */ React13.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React13.createElement(
|
|
1321
1330
|
WarningInfotip,
|
|
1322
1331
|
{
|
|
1323
1332
|
open: Boolean(renameError),
|
|
@@ -1326,7 +1335,7 @@ function CssClassSelector() {
|
|
|
1326
1335
|
width: autocompleteRef.current?.getBoundingClientRect().width,
|
|
1327
1336
|
offset: [0, -15]
|
|
1328
1337
|
},
|
|
1329
|
-
/* @__PURE__ */
|
|
1338
|
+
/* @__PURE__ */ React13.createElement(
|
|
1330
1339
|
CreatableAutocomplete,
|
|
1331
1340
|
{
|
|
1332
1341
|
id: ID,
|
|
@@ -1340,8 +1349,8 @@ function CssClassSelector() {
|
|
|
1340
1349
|
onCreate: create ?? void 0,
|
|
1341
1350
|
validate: validate ?? void 0,
|
|
1342
1351
|
limitTags: TAGS_LIMIT,
|
|
1343
|
-
renderEmptyState: isAtLimit && typeof limitCount === "number" ? (props) => /* @__PURE__ */
|
|
1344
|
-
getLimitTagsText: (more) => /* @__PURE__ */
|
|
1352
|
+
renderEmptyState: isAtLimit && typeof limitCount === "number" ? (props) => /* @__PURE__ */ React13.createElement(LimitReachedEmptyState, { limitCount, onClear: props.onClear }) : EmptyState,
|
|
1353
|
+
getLimitTagsText: (more) => /* @__PURE__ */ React13.createElement(Chip3, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
1345
1354
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
1346
1355
|
const chipProps = getTagProps({ index });
|
|
1347
1356
|
const isActive = value.value === active?.value;
|
|
@@ -1357,7 +1366,7 @@ function CssClassSelector() {
|
|
|
1357
1366
|
});
|
|
1358
1367
|
return updateClassByProvider(value.provider, { label: newLabel, id: value.value });
|
|
1359
1368
|
};
|
|
1360
|
-
return /* @__PURE__ */
|
|
1369
|
+
return /* @__PURE__ */ React13.createElement(
|
|
1361
1370
|
CssClassItem,
|
|
1362
1371
|
{
|
|
1363
1372
|
key: chipProps.key,
|
|
@@ -1377,10 +1386,10 @@ function CssClassSelector() {
|
|
|
1377
1386
|
})
|
|
1378
1387
|
}
|
|
1379
1388
|
)
|
|
1380
|
-
), hasMissingClasses && /* @__PURE__ */
|
|
1389
|
+
), hasMissingClasses && /* @__PURE__ */ React13.createElement(MissingClassesAlert, { onDismiss: clearMissingClasses }), !canEdit && /* @__PURE__ */ React13.createElement(InfoAlert, { sx: { mt: 1 } }, __7("With your current role, you can use existing classes but can\u2019t modify them.", "elementor")));
|
|
1381
1390
|
}
|
|
1382
|
-
var EmptyStateLayout = ({ searchValue, onClear, children }) => /* @__PURE__ */
|
|
1383
|
-
|
|
1391
|
+
var EmptyStateLayout = ({ searchValue, onClear, children }) => /* @__PURE__ */ React13.createElement(Box2, { sx: { py: 4 } }, /* @__PURE__ */ React13.createElement(
|
|
1392
|
+
Stack4,
|
|
1384
1393
|
{
|
|
1385
1394
|
gap: 1,
|
|
1386
1395
|
alignItems: "center",
|
|
@@ -1388,17 +1397,17 @@ var EmptyStateLayout = ({ searchValue, onClear, children }) => /* @__PURE__ */ R
|
|
|
1388
1397
|
justifyContent: "center",
|
|
1389
1398
|
sx: { px: 2, m: "auto", maxWidth: "236px" }
|
|
1390
1399
|
},
|
|
1391
|
-
/* @__PURE__ */
|
|
1392
|
-
/* @__PURE__ */
|
|
1400
|
+
/* @__PURE__ */ React13.createElement(ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1401
|
+
/* @__PURE__ */ React13.createElement(Typography4, { align: "center", variant: "subtitle2" }, __7("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React13.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
1393
1402
|
children,
|
|
1394
|
-
/* @__PURE__ */
|
|
1403
|
+
/* @__PURE__ */ React13.createElement(Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __7("Clear & try again", "elementor"))
|
|
1395
1404
|
));
|
|
1396
|
-
var EmptyState = (props) => /* @__PURE__ */
|
|
1405
|
+
var EmptyState = (props) => /* @__PURE__ */ React13.createElement(EmptyStateLayout, { ...props }, /* @__PURE__ */ React13.createElement(Typography4, { align: "center", variant: "caption", sx: { mb: 2 } }, __7("With your current role,", "elementor"), /* @__PURE__ */ React13.createElement("br", null), __7("you can only use existing classes.", "elementor")));
|
|
1397
1406
|
var LimitReachedEmptyState = ({
|
|
1398
1407
|
limitCount,
|
|
1399
1408
|
onClear
|
|
1400
|
-
}) => /* @__PURE__ */
|
|
1401
|
-
|
|
1409
|
+
}) => /* @__PURE__ */ React13.createElement(Box2, { sx: { py: 4 } }, /* @__PURE__ */ React13.createElement(
|
|
1410
|
+
Stack4,
|
|
1402
1411
|
{
|
|
1403
1412
|
gap: 1,
|
|
1404
1413
|
alignItems: "center",
|
|
@@ -1406,14 +1415,14 @@ var LimitReachedEmptyState = ({
|
|
|
1406
1415
|
justifyContent: "center",
|
|
1407
1416
|
sx: { px: 1, m: "auto", maxWidth: "260px" }
|
|
1408
1417
|
},
|
|
1409
|
-
/* @__PURE__ */
|
|
1410
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ React13.createElement(ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1419
|
+
/* @__PURE__ */ React13.createElement(
|
|
1411
1420
|
Typography4,
|
|
1412
1421
|
{ align: "center", variant: "subtitle2" },
|
|
1413
1422
|
/* translators: %s is the maximum number of classes */
|
|
1414
1423
|
__7("Limit of %s classes reached", "elementor").replace("%s", String(limitCount))
|
|
1415
1424
|
),
|
|
1416
|
-
/* @__PURE__ */
|
|
1425
|
+
/* @__PURE__ */ React13.createElement(Typography4, { align: "center", variant: "caption", component: "div" }, __7("Remove a class to create a new one.", "elementor"), " ", /* @__PURE__ */ React13.createElement(
|
|
1417
1426
|
Link,
|
|
1418
1427
|
{
|
|
1419
1428
|
color: "inherit",
|
|
@@ -1424,7 +1433,7 @@ var LimitReachedEmptyState = ({
|
|
|
1424
1433
|
},
|
|
1425
1434
|
__7("Clear", "elementor")
|
|
1426
1435
|
)),
|
|
1427
|
-
/* @__PURE__ */
|
|
1436
|
+
/* @__PURE__ */ React13.createElement(
|
|
1428
1437
|
Button,
|
|
1429
1438
|
{
|
|
1430
1439
|
variant: "outlined",
|
|
@@ -1463,7 +1472,7 @@ function useOptions() {
|
|
|
1463
1472
|
value: styleDef.id,
|
|
1464
1473
|
fixed: isElements,
|
|
1465
1474
|
color: getTempStylesProviderColorName(getStylesProviderColorName(provider.getKey())),
|
|
1466
|
-
icon: isElements ? /* @__PURE__ */
|
|
1475
|
+
icon: isElements ? /* @__PURE__ */ React13.createElement(MapPinIcon, null) : null,
|
|
1467
1476
|
provider: provider.getKey()
|
|
1468
1477
|
};
|
|
1469
1478
|
});
|
|
@@ -1537,7 +1546,7 @@ function useHandleSelect() {
|
|
|
1537
1546
|
}
|
|
1538
1547
|
|
|
1539
1548
|
// src/components/custom-css-indicator.tsx
|
|
1540
|
-
import * as
|
|
1549
|
+
import * as React14 from "react";
|
|
1541
1550
|
import { useMemo as useMemo6 } from "react";
|
|
1542
1551
|
import { getBreakpointsTree } from "@elementor/editor-responsive";
|
|
1543
1552
|
import { getVariantByMeta as getVariantByMeta3 } from "@elementor/editor-styles";
|
|
@@ -1847,11 +1856,11 @@ var CustomCssIndicator = () => {
|
|
|
1847
1856
|
}, [hasContent, style, meta]);
|
|
1848
1857
|
if (!hasContent) {
|
|
1849
1858
|
if (hasInheritedContent) {
|
|
1850
|
-
return /* @__PURE__ */
|
|
1859
|
+
return /* @__PURE__ */ React14.createElement(StyleIndicator, null);
|
|
1851
1860
|
}
|
|
1852
1861
|
return null;
|
|
1853
1862
|
}
|
|
1854
|
-
return /* @__PURE__ */
|
|
1863
|
+
return /* @__PURE__ */ React14.createElement(StyleIndicator, { getColor: provider ? getStylesProviderThemeColor(provider.getKey()) : void 0 });
|
|
1855
1864
|
};
|
|
1856
1865
|
var hasInheritedCustomCss = (style, meta) => {
|
|
1857
1866
|
if (!style || !meta) {
|
|
@@ -1914,10 +1923,10 @@ var registerEditingPanelReplacement = ({
|
|
|
1914
1923
|
var getEditingPanelReplacement = (element, elementType) => Array.from(registry.values()).filter(({ condition }) => condition(element, elementType)).sort((a, b) => a.priority - b.priority)?.[0] ?? null;
|
|
1915
1924
|
|
|
1916
1925
|
// src/components/editing-panel-error-fallback.tsx
|
|
1917
|
-
import * as
|
|
1926
|
+
import * as React15 from "react";
|
|
1918
1927
|
import { Alert as Alert2, Box as Box3 } from "@elementor/ui";
|
|
1919
1928
|
function EditorPanelErrorFallback() {
|
|
1920
|
-
return /* @__PURE__ */
|
|
1929
|
+
return /* @__PURE__ */ React15.createElement(Box3, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React15.createElement(Alert2, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React15.createElement("strong", null, "Something went wrong")));
|
|
1921
1930
|
}
|
|
1922
1931
|
|
|
1923
1932
|
// src/components/editing-panel-tabs.tsx
|
|
@@ -1929,7 +1938,7 @@ import { Divider as Divider6, Stack as Stack14, Tab, TabPanel, Tabs, useTabs } f
|
|
|
1929
1938
|
import { __ as __63 } from "@wordpress/i18n";
|
|
1930
1939
|
|
|
1931
1940
|
// src/contexts/scroll-context.tsx
|
|
1932
|
-
import * as
|
|
1941
|
+
import * as React16 from "react";
|
|
1933
1942
|
import { createContext as createContext5, useContext as useContext5, useEffect as useEffect3, useRef as useRef2, useState as useState5 } from "react";
|
|
1934
1943
|
import { styled as styled3 } from "@elementor/ui";
|
|
1935
1944
|
var ScrollContext = createContext5(void 0);
|
|
@@ -1961,7 +1970,7 @@ function ScrollProvider({ children }) {
|
|
|
1961
1970
|
scrollElement.removeEventListener("scroll", handleScroll);
|
|
1962
1971
|
};
|
|
1963
1972
|
});
|
|
1964
|
-
return /* @__PURE__ */
|
|
1973
|
+
return /* @__PURE__ */ React16.createElement(ScrollContext.Provider, { value: { direction } }, /* @__PURE__ */ React16.createElement(ScrollPanel, { ref }, children));
|
|
1965
1974
|
}
|
|
1966
1975
|
function useScrollDirection() {
|
|
1967
1976
|
return useContext5(ScrollContext)?.direction ?? DEFAULT_SCROLL_DIRECTION;
|
|
@@ -2017,20 +2026,20 @@ var useStateByElement = (key, initialValue) => {
|
|
|
2017
2026
|
};
|
|
2018
2027
|
|
|
2019
2028
|
// src/components/interactions-tab.tsx
|
|
2020
|
-
import * as
|
|
2029
|
+
import * as React18 from "react";
|
|
2021
2030
|
import { InteractionsTab as InteractionsTabContent } from "@elementor/editor-interactions";
|
|
2022
2031
|
|
|
2023
2032
|
// src/components/sections-list.tsx
|
|
2024
|
-
import * as
|
|
2033
|
+
import * as React17 from "react";
|
|
2025
2034
|
import { List } from "@elementor/ui";
|
|
2026
2035
|
function SectionsList(props) {
|
|
2027
|
-
return /* @__PURE__ */
|
|
2036
|
+
return /* @__PURE__ */ React17.createElement(List, { disablePadding: true, component: "div", ...props });
|
|
2028
2037
|
}
|
|
2029
2038
|
|
|
2030
2039
|
// src/components/interactions-tab.tsx
|
|
2031
2040
|
var InteractionsTab = () => {
|
|
2032
2041
|
const { element } = useElement();
|
|
2033
|
-
return /* @__PURE__ */
|
|
2042
|
+
return /* @__PURE__ */ React18.createElement(SectionsList, null, /* @__PURE__ */ React18.createElement(InteractionsTabContent, { elementId: element.id }));
|
|
2034
2043
|
};
|
|
2035
2044
|
|
|
2036
2045
|
// src/components/settings-tab.tsx
|
|
@@ -2251,10 +2260,10 @@ function removePreviousValueFromStorage({ path, elementId }) {
|
|
|
2251
2260
|
}
|
|
2252
2261
|
|
|
2253
2262
|
// src/components/section.tsx
|
|
2254
|
-
import * as
|
|
2263
|
+
import * as React19 from "react";
|
|
2255
2264
|
import { useId as useId2, useRef as useRef3 } from "react";
|
|
2256
2265
|
import { CollapseIcon, getCollapsibleValue, SectionRefContext } from "@elementor/editor-ui";
|
|
2257
|
-
import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as
|
|
2266
|
+
import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as Stack5 } from "@elementor/ui";
|
|
2258
2267
|
function Section({ title, children, defaultExpanded = false, titleEnd, unmountOnExit = true, action }) {
|
|
2259
2268
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
2260
2269
|
const ref = useRef3(null);
|
|
@@ -2269,7 +2278,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2269
2278
|
const id = useId2();
|
|
2270
2279
|
const labelId = `label-${id}`;
|
|
2271
2280
|
const contentId = `content-${id}`;
|
|
2272
|
-
return /* @__PURE__ */
|
|
2281
|
+
return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
2273
2282
|
ListItemButton,
|
|
2274
2283
|
{
|
|
2275
2284
|
id: labelId,
|
|
@@ -2278,7 +2287,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2278
2287
|
onClick: handleClick,
|
|
2279
2288
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
2280
2289
|
},
|
|
2281
|
-
/* @__PURE__ */
|
|
2290
|
+
/* @__PURE__ */ React19.createElement(Stack5, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React19.createElement(
|
|
2282
2291
|
ListItemText,
|
|
2283
2292
|
{
|
|
2284
2293
|
secondary: title,
|
|
@@ -2287,7 +2296,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2287
2296
|
}
|
|
2288
2297
|
), getCollapsibleValue(titleEnd, isOpen)),
|
|
2289
2298
|
action?.component,
|
|
2290
|
-
/* @__PURE__ */
|
|
2299
|
+
/* @__PURE__ */ React19.createElement(
|
|
2291
2300
|
CollapseIcon,
|
|
2292
2301
|
{
|
|
2293
2302
|
open: isOpen,
|
|
@@ -2297,7 +2306,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2297
2306
|
sx: { ml: 1 }
|
|
2298
2307
|
}
|
|
2299
2308
|
)
|
|
2300
|
-
), /* @__PURE__ */
|
|
2309
|
+
), /* @__PURE__ */ React19.createElement(
|
|
2301
2310
|
Collapse,
|
|
2302
2311
|
{
|
|
2303
2312
|
id: contentId,
|
|
@@ -2306,8 +2315,8 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2306
2315
|
timeout: "auto",
|
|
2307
2316
|
unmountOnExit
|
|
2308
2317
|
},
|
|
2309
|
-
/* @__PURE__ */
|
|
2310
|
-
), /* @__PURE__ */
|
|
2318
|
+
/* @__PURE__ */ React19.createElement(SectionRefContext.Provider, { value: ref }, /* @__PURE__ */ React19.createElement(Stack5, { ref, gap: 2.5, p: 2, "aria-label": `${title} section content` }, children))
|
|
2319
|
+
), /* @__PURE__ */ React19.createElement(Divider2, null));
|
|
2311
2320
|
}
|
|
2312
2321
|
|
|
2313
2322
|
// src/components/settings-control.tsx
|
|
@@ -2316,7 +2325,7 @@ import { ControlAdornmentsProvider } from "@elementor/editor-controls";
|
|
|
2316
2325
|
import { Divider as Divider3, styled as styled5 } from "@elementor/ui";
|
|
2317
2326
|
|
|
2318
2327
|
// src/controls-registry/control.tsx
|
|
2319
|
-
import * as
|
|
2328
|
+
import * as React20 from "react";
|
|
2320
2329
|
|
|
2321
2330
|
// src/controls-registry/controls-registry.tsx
|
|
2322
2331
|
import {
|
|
@@ -2447,17 +2456,17 @@ var Control = ({ props, type }) => {
|
|
|
2447
2456
|
context: { controlType: type }
|
|
2448
2457
|
});
|
|
2449
2458
|
}
|
|
2450
|
-
return /* @__PURE__ */
|
|
2459
|
+
return /* @__PURE__ */ React20.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
2451
2460
|
};
|
|
2452
2461
|
|
|
2453
2462
|
// src/controls-registry/control-type-container.tsx
|
|
2454
|
-
import * as
|
|
2463
|
+
import * as React21 from "react";
|
|
2455
2464
|
import { Box as Box4, styled as styled4 } from "@elementor/ui";
|
|
2456
2465
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
2457
2466
|
if (layout === "custom") {
|
|
2458
2467
|
return children;
|
|
2459
2468
|
}
|
|
2460
|
-
return /* @__PURE__ */
|
|
2469
|
+
return /* @__PURE__ */ React21.createElement(StyledContainer, { layout }, children);
|
|
2461
2470
|
};
|
|
2462
2471
|
var StyledContainer = styled4(Box4, {
|
|
2463
2472
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
@@ -2485,7 +2494,7 @@ var getStyleByLayout = (layout) => {
|
|
|
2485
2494
|
};
|
|
2486
2495
|
|
|
2487
2496
|
// src/controls-registry/settings-field.tsx
|
|
2488
|
-
import * as
|
|
2497
|
+
import * as React22 from "react";
|
|
2489
2498
|
import { useMemo as useMemo7 } from "react";
|
|
2490
2499
|
import { PropKeyProvider, PropProvider } from "@elementor/editor-controls";
|
|
2491
2500
|
import { setDocumentModifiedStatus as setDocumentModifiedStatus2 } from "@elementor/editor-documents";
|
|
@@ -2535,7 +2544,7 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
2535
2544
|
updateElementSettings3({ id: elementId, props: settings, withHistory: false });
|
|
2536
2545
|
}
|
|
2537
2546
|
};
|
|
2538
|
-
return /* @__PURE__ */
|
|
2547
|
+
return /* @__PURE__ */ React22.createElement(PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React22.createElement(PropKeyProvider, { bind }, children));
|
|
2539
2548
|
};
|
|
2540
2549
|
function useUndoableUpdateElementProp({
|
|
2541
2550
|
elementId,
|
|
@@ -2584,15 +2593,6 @@ var registerFieldIndicator = ({
|
|
|
2584
2593
|
};
|
|
2585
2594
|
var getFieldIndicators = (fieldType) => Array.from(indicatorsRegistry[fieldType].values()).sort((a, b) => a.priority - b.priority).map(({ id, indicator: Adornment }) => ({ id, Adornment }));
|
|
2586
2595
|
|
|
2587
|
-
// src/components/control-label.tsx
|
|
2588
|
-
import * as React22 from "react";
|
|
2589
|
-
import { ControlAdornments, ControlFormLabel } from "@elementor/editor-controls";
|
|
2590
|
-
import { InfoCircleIcon } from "@elementor/icons";
|
|
2591
|
-
import { Stack as Stack5, Tooltip } from "@elementor/ui";
|
|
2592
|
-
var ControlLabel = ({ children, infoTooltip }) => {
|
|
2593
|
-
return /* @__PURE__ */ React22.createElement(Stack5, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React22.createElement(ControlFormLabel, null, children), infoTooltip && /* @__PURE__ */ React22.createElement(Tooltip, { title: infoTooltip, placement: "top" }, /* @__PURE__ */ React22.createElement(InfoCircleIcon, { fontSize: "tiny" })), /* @__PURE__ */ React22.createElement(ControlAdornments, null));
|
|
2594
|
-
};
|
|
2595
|
-
|
|
2596
2596
|
// src/components/settings-control.tsx
|
|
2597
2597
|
var Wrapper = styled5("span")`
|
|
2598
2598
|
display: contents;
|
|
@@ -7617,6 +7617,7 @@ var blockV1Panel = () => {
|
|
|
7617
7617
|
};
|
|
7618
7618
|
export {
|
|
7619
7619
|
Control as BaseControl,
|
|
7620
|
+
ControlLabel,
|
|
7620
7621
|
ControlTypeContainer,
|
|
7621
7622
|
CustomCssIndicator,
|
|
7622
7623
|
EditingPanelTabs,
|