@elementor/editor-editing-panel 4.2.0-912 → 4.2.0-914
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.js
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
BaseControl: () => Control,
|
|
34
|
+
ControlLabel: () => ControlLabel,
|
|
34
35
|
ControlTypeContainer: () => ControlTypeContainer,
|
|
35
36
|
CustomCssIndicator: () => CustomCssIndicator,
|
|
36
37
|
EditingPanelTabs: () => EditingPanelTabs,
|
|
@@ -226,14 +227,23 @@ var onConvert = (opts) => {
|
|
|
226
227
|
});
|
|
227
228
|
};
|
|
228
229
|
|
|
230
|
+
// src/components/control-label.tsx
|
|
231
|
+
var React5 = __toESM(require("react"));
|
|
232
|
+
var import_editor_controls = require("@elementor/editor-controls");
|
|
233
|
+
var import_icons = require("@elementor/icons");
|
|
234
|
+
var import_ui = require("@elementor/ui");
|
|
235
|
+
var ControlLabel = ({ children, infoTooltip }) => {
|
|
236
|
+
return /* @__PURE__ */ React5.createElement(import_ui.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React5.createElement(import_editor_controls.ControlFormLabel, null, children), infoTooltip && /* @__PURE__ */ React5.createElement(import_ui.Tooltip, { title: infoTooltip, placement: "top" }, /* @__PURE__ */ React5.createElement(import_icons.InfoCircleIcon, { fontSize: "tiny" })), /* @__PURE__ */ React5.createElement(import_editor_controls.ControlAdornments, null));
|
|
237
|
+
};
|
|
238
|
+
|
|
229
239
|
// src/components/css-classes/css-class-selector.tsx
|
|
230
|
-
var
|
|
240
|
+
var React13 = __toESM(require("react"));
|
|
231
241
|
var import_react10 = require("react");
|
|
232
242
|
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
233
243
|
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
234
|
-
var
|
|
244
|
+
var import_icons4 = require("@elementor/icons");
|
|
235
245
|
var import_locations2 = require("@elementor/locations");
|
|
236
|
-
var
|
|
246
|
+
var import_ui9 = require("@elementor/ui");
|
|
237
247
|
var import_i18n7 = require("@wordpress/i18n");
|
|
238
248
|
|
|
239
249
|
// src/utils/get-styles-provider-color.ts
|
|
@@ -284,9 +294,9 @@ var trackStyles = (provider, event, data) => {
|
|
|
284
294
|
};
|
|
285
295
|
|
|
286
296
|
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
287
|
-
var
|
|
297
|
+
var React6 = __toESM(require("react"));
|
|
288
298
|
var import_react6 = require("react");
|
|
289
|
-
var
|
|
299
|
+
var import_ui3 = require("@elementor/ui");
|
|
290
300
|
|
|
291
301
|
// src/components/creatable-autocomplete/autocomplete-option-internal-properties.ts
|
|
292
302
|
function addGroupToOptions(options13, pluralEntityName) {
|
|
@@ -432,14 +442,14 @@ function useCreateOption(params) {
|
|
|
432
442
|
}
|
|
433
443
|
|
|
434
444
|
// src/components/creatable-autocomplete/use-filter-options.ts
|
|
435
|
-
var
|
|
445
|
+
var import_ui2 = require("@elementor/ui");
|
|
436
446
|
var STRIP_NON_CLASS_CHARS = /[^a-zA-Z0-9_-]/g;
|
|
437
447
|
function normalizeClassSearch(value) {
|
|
438
448
|
return value.replace(STRIP_NON_CLASS_CHARS, "").toLowerCase();
|
|
439
449
|
}
|
|
440
450
|
function useFilterOptions(parameters) {
|
|
441
451
|
const { options: options13, selected, onCreate, entityName } = parameters;
|
|
442
|
-
const filter = (0,
|
|
452
|
+
const filter = (0, import_ui2.createFilterOptions)({
|
|
443
453
|
matchFrom: "any"
|
|
444
454
|
});
|
|
445
455
|
const filterOptions = (optionList, params) => {
|
|
@@ -466,7 +476,7 @@ function useFilterOptions(parameters) {
|
|
|
466
476
|
|
|
467
477
|
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
468
478
|
var MIN_INPUT_LENGTH = 2;
|
|
469
|
-
var CreatableAutocomplete =
|
|
479
|
+
var CreatableAutocomplete = React6.forwardRef(CreatableAutocompleteInner);
|
|
470
480
|
function CreatableAutocompleteInner({
|
|
471
481
|
selected,
|
|
472
482
|
options: options13,
|
|
@@ -495,12 +505,12 @@ function CreatableAutocompleteInner({
|
|
|
495
505
|
const filterOptions = useFilterOptions({ options: options13, selected, onCreate, entityName });
|
|
496
506
|
const isCreatable = Boolean(onCreate);
|
|
497
507
|
const freeSolo = isCreatable || inputValue.length < MIN_INPUT_LENGTH || void 0;
|
|
498
|
-
return /* @__PURE__ */
|
|
499
|
-
|
|
508
|
+
return /* @__PURE__ */ React6.createElement(
|
|
509
|
+
import_ui3.Autocomplete,
|
|
500
510
|
{
|
|
501
511
|
renderTags: (tagValue, getTagProps) => {
|
|
502
|
-
return tagValue.map((option, index) => /* @__PURE__ */
|
|
503
|
-
|
|
512
|
+
return tagValue.map((option, index) => /* @__PURE__ */ React6.createElement(
|
|
513
|
+
import_ui3.Chip,
|
|
504
514
|
{
|
|
505
515
|
size: "tiny",
|
|
506
516
|
...getTagProps({ index }),
|
|
@@ -525,12 +535,12 @@ function CreatableAutocompleteInner({
|
|
|
525
535
|
disableCloseOnSelect: true,
|
|
526
536
|
value: internalSelected,
|
|
527
537
|
options: internalOptions,
|
|
528
|
-
ListboxComponent: error ?
|
|
529
|
-
renderGroup: (params) => /* @__PURE__ */
|
|
538
|
+
ListboxComponent: error ? React6.forwardRef((_, errorTextRef) => /* @__PURE__ */ React6.createElement(ErrorText, { ref: errorTextRef, error })) : void 0,
|
|
539
|
+
renderGroup: (params) => /* @__PURE__ */ React6.createElement(Group, { ...params }),
|
|
530
540
|
inputValue,
|
|
531
541
|
renderInput: (params) => {
|
|
532
|
-
return /* @__PURE__ */
|
|
533
|
-
|
|
542
|
+
return /* @__PURE__ */ React6.createElement(
|
|
543
|
+
import_ui3.TextField,
|
|
534
544
|
{
|
|
535
545
|
...params,
|
|
536
546
|
error: Boolean(error),
|
|
@@ -557,7 +567,7 @@ function CreatableAutocompleteInner({
|
|
|
557
567
|
groupBy: (option) => option._group ?? "",
|
|
558
568
|
renderOption: (optionProps, option) => {
|
|
559
569
|
const { _group, label } = option;
|
|
560
|
-
return /* @__PURE__ */
|
|
570
|
+
return /* @__PURE__ */ React6.createElement(
|
|
561
571
|
"li",
|
|
562
572
|
{
|
|
563
573
|
...optionProps,
|
|
@@ -585,49 +595,49 @@ function CreatableAutocompleteInner({
|
|
|
585
595
|
}
|
|
586
596
|
var Group = (params) => {
|
|
587
597
|
const id = `combobox-group-${(0, import_react6.useId)().replace(/:/g, "_")}`;
|
|
588
|
-
return /* @__PURE__ */
|
|
598
|
+
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));
|
|
589
599
|
};
|
|
590
|
-
var ErrorText =
|
|
591
|
-
return /* @__PURE__ */
|
|
592
|
-
|
|
600
|
+
var ErrorText = React6.forwardRef(({ error = "error" }, ref) => {
|
|
601
|
+
return /* @__PURE__ */ React6.createElement(
|
|
602
|
+
import_ui3.Box,
|
|
593
603
|
{
|
|
594
604
|
ref,
|
|
595
605
|
sx: (theme) => ({
|
|
596
606
|
padding: theme.spacing(2)
|
|
597
607
|
})
|
|
598
608
|
},
|
|
599
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ React6.createElement(import_ui3.Typography, { variant: "caption", sx: { color: "error.main", display: "inline-block" } }, error)
|
|
600
610
|
);
|
|
601
611
|
});
|
|
602
|
-
var StyledGroup = (0,
|
|
612
|
+
var StyledGroup = (0, import_ui3.styled)("li")`
|
|
603
613
|
&:not( :last-of-type ) {
|
|
604
614
|
border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
|
|
605
615
|
}
|
|
606
616
|
`;
|
|
607
|
-
var StyledGroupHeader = (0,
|
|
617
|
+
var StyledGroupHeader = (0, import_ui3.styled)(import_ui3.Box)(({ theme }) => ({
|
|
608
618
|
position: "sticky",
|
|
609
619
|
top: "-8px",
|
|
610
620
|
padding: theme.spacing(1, 2),
|
|
611
621
|
color: theme.palette.text.tertiary,
|
|
612
622
|
backgroundColor: theme.palette.primary.contrastText
|
|
613
623
|
}));
|
|
614
|
-
var StyledGroupItems = (0,
|
|
624
|
+
var StyledGroupItems = (0, import_ui3.styled)("ul")`
|
|
615
625
|
padding: 0;
|
|
616
626
|
`;
|
|
617
627
|
|
|
618
628
|
// src/components/css-classes/css-class-item.tsx
|
|
619
|
-
var
|
|
629
|
+
var React11 = __toESM(require("react"));
|
|
620
630
|
var import_react9 = require("react");
|
|
621
631
|
var import_editor_styles = require("@elementor/editor-styles");
|
|
622
632
|
var import_editor_styles_repository9 = require("@elementor/editor-styles-repository");
|
|
623
633
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
624
|
-
var
|
|
634
|
+
var import_icons2 = require("@elementor/icons");
|
|
625
635
|
var import_session3 = require("@elementor/session");
|
|
626
|
-
var
|
|
636
|
+
var import_ui7 = require("@elementor/ui");
|
|
627
637
|
var import_i18n5 = require("@wordpress/i18n");
|
|
628
638
|
|
|
629
639
|
// src/components/css-classes/css-class-context.tsx
|
|
630
|
-
var
|
|
640
|
+
var React7 = __toESM(require("react"));
|
|
631
641
|
var import_react7 = require("react");
|
|
632
642
|
var CssClassContext = (0, import_react7.createContext)(null);
|
|
633
643
|
var useCssClass = () => {
|
|
@@ -638,19 +648,19 @@ var useCssClass = () => {
|
|
|
638
648
|
return context;
|
|
639
649
|
};
|
|
640
650
|
function CssClassProvider({ children, ...contextValue }) {
|
|
641
|
-
return /* @__PURE__ */
|
|
651
|
+
return /* @__PURE__ */ React7.createElement(CssClassContext.Provider, { value: contextValue }, children);
|
|
642
652
|
}
|
|
643
653
|
|
|
644
654
|
// src/components/css-classes/css-class-menu.tsx
|
|
645
|
-
var
|
|
655
|
+
var React10 = __toESM(require("react"));
|
|
646
656
|
var import_editor_styles_repository8 = require("@elementor/editor-styles-repository");
|
|
647
657
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
648
|
-
var
|
|
658
|
+
var import_ui6 = require("@elementor/ui");
|
|
649
659
|
var import_i18n4 = require("@wordpress/i18n");
|
|
650
660
|
|
|
651
661
|
// src/components/style-indicator.tsx
|
|
652
|
-
var
|
|
653
|
-
var StyleIndicator = (0,
|
|
662
|
+
var import_ui4 = require("@elementor/ui");
|
|
663
|
+
var StyleIndicator = (0, import_ui4.styled)("div", {
|
|
654
664
|
shouldForwardProp: (prop) => !["isOverridden", "getColor"].includes(prop)
|
|
655
665
|
})`
|
|
656
666
|
width: 5px;
|
|
@@ -666,7 +676,7 @@ var StyleIndicator = (0, import_ui3.styled)("div", {
|
|
|
666
676
|
`;
|
|
667
677
|
|
|
668
678
|
// src/components/css-classes/duplicate-class-menu-item.tsx
|
|
669
|
-
var
|
|
679
|
+
var React8 = __toESM(require("react"));
|
|
670
680
|
var import_editor_styles_repository6 = require("@elementor/editor-styles-repository");
|
|
671
681
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
672
682
|
var import_session2 = require("@elementor/session");
|
|
@@ -918,12 +928,12 @@ function DuplicateClassMenuItem({ closeMenu }) {
|
|
|
918
928
|
}
|
|
919
929
|
closeMenu();
|
|
920
930
|
};
|
|
921
|
-
return /* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ React8.createElement(import_editor_ui.MenuListItem, { onClick: handleDuplicate }, (0, import_i18n2.__)("Duplicate", "elementor"));
|
|
922
932
|
}
|
|
923
933
|
|
|
924
934
|
// src/components/css-classes/local-class-sub-menu.tsx
|
|
925
|
-
var
|
|
926
|
-
var
|
|
935
|
+
var React9 = __toESM(require("react"));
|
|
936
|
+
var import_ui5 = require("@elementor/ui");
|
|
927
937
|
var import_i18n3 = require("@wordpress/i18n");
|
|
928
938
|
|
|
929
939
|
// src/components/css-classes/use-can-convert-local-class-to-global.ts
|
|
@@ -946,7 +956,7 @@ var useCanConvertLocalClassToGlobal = () => {
|
|
|
946
956
|
// src/components/css-classes/local-class-sub-menu.tsx
|
|
947
957
|
var LocalClassSubMenu = (props) => {
|
|
948
958
|
const { canConvert, styleDef } = useCanConvertLocalClassToGlobal();
|
|
949
|
-
return /* @__PURE__ */
|
|
959
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(import_ui5.MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, (0, import_i18n3.__)("Local Class", "elementor")), /* @__PURE__ */ React9.createElement(CssClassConvert, { canConvert, styleDef, closeMenu: props.popupState.close }));
|
|
950
960
|
};
|
|
951
961
|
|
|
952
962
|
// src/components/css-classes/css-class-menu.tsx
|
|
@@ -973,11 +983,11 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
973
983
|
const handleKeyDown = (e) => {
|
|
974
984
|
e.stopPropagation();
|
|
975
985
|
};
|
|
976
|
-
return /* @__PURE__ */
|
|
977
|
-
|
|
986
|
+
return /* @__PURE__ */ React10.createElement(
|
|
987
|
+
import_ui6.Menu,
|
|
978
988
|
{
|
|
979
989
|
MenuListProps: { dense: true, sx: { minWidth: "160px" } },
|
|
980
|
-
...(0,
|
|
990
|
+
...(0, import_ui6.bindMenu)(popupState),
|
|
981
991
|
anchorEl,
|
|
982
992
|
anchorOrigin: {
|
|
983
993
|
vertical: "bottom",
|
|
@@ -990,11 +1000,11 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
990
1000
|
onKeyDown: handleKeyDown,
|
|
991
1001
|
disableAutoFocusItem: true
|
|
992
1002
|
},
|
|
993
|
-
isLocalStyle2 && /* @__PURE__ */
|
|
1003
|
+
isLocalStyle2 && /* @__PURE__ */ React10.createElement(LocalClassSubMenu, { popupState }),
|
|
994
1004
|
getMenuItemsByProvider({ provider, closeMenu: popupState.close, fixed }),
|
|
995
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ React10.createElement(import_ui6.MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, (0, import_i18n4.__)("States", "elementor")),
|
|
996
1006
|
pseudoStates.map((state) => {
|
|
997
|
-
return /* @__PURE__ */
|
|
1007
|
+
return /* @__PURE__ */ React10.createElement(
|
|
998
1008
|
StateMenuItem,
|
|
999
1009
|
{
|
|
1000
1010
|
key: state.key,
|
|
@@ -1004,7 +1014,7 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
1004
1014
|
}
|
|
1005
1015
|
);
|
|
1006
1016
|
}),
|
|
1007
|
-
/* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ React10.createElement(ClassStatesMenu, { closeMenu: popupState.close })
|
|
1008
1018
|
);
|
|
1009
1019
|
}
|
|
1010
1020
|
function ClassStatesMenu({ closeMenu }) {
|
|
@@ -1013,8 +1023,8 @@ function ClassStatesMenu({ closeMenu }) {
|
|
|
1013
1023
|
return null;
|
|
1014
1024
|
}
|
|
1015
1025
|
const customTitle = (0, import_i18n4.__)("%s States", "elementor").replace("%s", elementTitle);
|
|
1016
|
-
return /* @__PURE__ */
|
|
1017
|
-
return /* @__PURE__ */
|
|
1026
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(import_ui6.Divider, null), /* @__PURE__ */ React10.createElement(import_ui6.MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, customTitle), elementStates.map((state) => {
|
|
1027
|
+
return /* @__PURE__ */ React10.createElement(
|
|
1018
1028
|
StateMenuItem,
|
|
1019
1029
|
{
|
|
1020
1030
|
key: state.key,
|
|
@@ -1064,14 +1074,14 @@ function getMenuItemsByProvider({
|
|
|
1064
1074
|
const canDuplicate = providerActions?.create && providerActions?.get;
|
|
1065
1075
|
const canUnapply = !fixed;
|
|
1066
1076
|
const actions = [
|
|
1067
|
-
canUpdate && /* @__PURE__ */
|
|
1068
|
-
canDuplicate && /* @__PURE__ */
|
|
1069
|
-
canUnapply && /* @__PURE__ */
|
|
1077
|
+
canUpdate && /* @__PURE__ */ React10.createElement(RenameClassMenuItem, { key: "rename-class", closeMenu }),
|
|
1078
|
+
canDuplicate && /* @__PURE__ */ React10.createElement(DuplicateClassMenuItem, { key: "duplicate-class", closeMenu }),
|
|
1079
|
+
canUnapply && /* @__PURE__ */ React10.createElement(UnapplyClassMenuItem, { key: "unapply-class", closeMenu })
|
|
1070
1080
|
].filter(Boolean);
|
|
1071
1081
|
if (actions.length) {
|
|
1072
1082
|
actions.unshift(
|
|
1073
|
-
/* @__PURE__ */
|
|
1074
|
-
|
|
1083
|
+
/* @__PURE__ */ React10.createElement(
|
|
1084
|
+
import_ui6.MenuSubheader,
|
|
1075
1085
|
{
|
|
1076
1086
|
key: "provider-label",
|
|
1077
1087
|
sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1, textTransform: "capitalize" }
|
|
@@ -1079,7 +1089,7 @@ function getMenuItemsByProvider({
|
|
|
1079
1089
|
providerInstance?.labels?.singular
|
|
1080
1090
|
)
|
|
1081
1091
|
);
|
|
1082
|
-
actions.push(/* @__PURE__ */
|
|
1092
|
+
actions.push(/* @__PURE__ */ React10.createElement(import_ui6.Divider, { key: "provider-actions-divider" }));
|
|
1083
1093
|
}
|
|
1084
1094
|
return actions;
|
|
1085
1095
|
}
|
|
@@ -1094,7 +1104,7 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
1094
1104
|
const disabled = !isUpdateAllowed && !isStyled;
|
|
1095
1105
|
const isActive = styleId === activeId;
|
|
1096
1106
|
const isSelected = state === activeState && isActive;
|
|
1097
|
-
return /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ React10.createElement(
|
|
1098
1108
|
import_editor_ui2.MenuListItem,
|
|
1099
1109
|
{
|
|
1100
1110
|
...props,
|
|
@@ -1114,13 +1124,13 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
1114
1124
|
closeMenu();
|
|
1115
1125
|
}
|
|
1116
1126
|
},
|
|
1117
|
-
/* @__PURE__ */
|
|
1127
|
+
/* @__PURE__ */ React10.createElement(
|
|
1118
1128
|
import_editor_ui2.MenuItemInfotip,
|
|
1119
1129
|
{
|
|
1120
1130
|
showInfoTip: disabled,
|
|
1121
1131
|
content: (0, import_i18n4.__)("With your current role, you can only use existing states.", "elementor")
|
|
1122
1132
|
},
|
|
1123
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ React10.createElement(import_ui6.Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React10.createElement(
|
|
1124
1134
|
StyleIndicator,
|
|
1125
1135
|
{
|
|
1126
1136
|
"aria-label": (0, import_i18n4.__)("Has style", "elementor"),
|
|
@@ -1133,7 +1143,7 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
1133
1143
|
function UnapplyClassMenuItem({ closeMenu, ...props }) {
|
|
1134
1144
|
const { id: classId, label: classLabel, provider } = useCssClass();
|
|
1135
1145
|
const unapplyClass = useUndoableUnapplyClass();
|
|
1136
|
-
return classId ? /* @__PURE__ */
|
|
1146
|
+
return classId ? /* @__PURE__ */ React10.createElement(
|
|
1137
1147
|
import_editor_ui2.MenuListItem,
|
|
1138
1148
|
{
|
|
1139
1149
|
...props,
|
|
@@ -1157,7 +1167,7 @@ function RenameClassMenuItem({ closeMenu }) {
|
|
|
1157
1167
|
return null;
|
|
1158
1168
|
}
|
|
1159
1169
|
const isAllowed = userCan(provider).update;
|
|
1160
|
-
return /* @__PURE__ */
|
|
1170
|
+
return /* @__PURE__ */ React10.createElement(
|
|
1161
1171
|
import_editor_ui2.MenuListItem,
|
|
1162
1172
|
{
|
|
1163
1173
|
disabled: !isAllowed,
|
|
@@ -1166,7 +1176,7 @@ function RenameClassMenuItem({ closeMenu }) {
|
|
|
1166
1176
|
handleRename();
|
|
1167
1177
|
}
|
|
1168
1178
|
},
|
|
1169
|
-
/* @__PURE__ */
|
|
1179
|
+
/* @__PURE__ */ React10.createElement(
|
|
1170
1180
|
import_editor_ui2.MenuItemInfotip,
|
|
1171
1181
|
{
|
|
1172
1182
|
showInfoTip: !isAllowed,
|
|
@@ -1187,7 +1197,7 @@ function CssClassItem(props) {
|
|
|
1187
1197
|
const { id, provider, label, isActive, onClickActive, renameLabel, setError } = classProps;
|
|
1188
1198
|
const { elementStates } = useElementStates();
|
|
1189
1199
|
const { meta, setMetaState } = useStyle();
|
|
1190
|
-
const popupState = (0,
|
|
1200
|
+
const popupState = (0, import_ui7.usePopupState)({ variant: "popover" });
|
|
1191
1201
|
const [chipRef, setChipRef] = (0, import_react9.useState)(null);
|
|
1192
1202
|
const { onDelete, ...chipGroupProps } = chipProps;
|
|
1193
1203
|
const { userCan } = (0, import_editor_styles_repository9.useUserStylesCapability)();
|
|
@@ -1223,8 +1233,8 @@ function CssClassItem(props) {
|
|
|
1223
1233
|
openEditMode();
|
|
1224
1234
|
}
|
|
1225
1235
|
}, [id, convertedFromLocalId]);
|
|
1226
|
-
return /* @__PURE__ */
|
|
1227
|
-
|
|
1236
|
+
return /* @__PURE__ */ React11.createElement(import_ui7.ThemeProvider, { palette: "default" }, /* @__PURE__ */ React11.createElement(
|
|
1237
|
+
import_ui7.UnstableChipGroup,
|
|
1228
1238
|
{
|
|
1229
1239
|
ref: setChipRef,
|
|
1230
1240
|
...chipGroupProps,
|
|
@@ -1234,11 +1244,11 @@ function CssClassItem(props) {
|
|
|
1234
1244
|
"&.MuiChipGroup-root.MuiAutocomplete-tag": { margin: theme.spacing(0.125) }
|
|
1235
1245
|
})
|
|
1236
1246
|
},
|
|
1237
|
-
/* @__PURE__ */
|
|
1238
|
-
|
|
1247
|
+
/* @__PURE__ */ React11.createElement(
|
|
1248
|
+
import_ui7.Chip,
|
|
1239
1249
|
{
|
|
1240
1250
|
size: CHIP_SIZE,
|
|
1241
|
-
label: isEditing ? /* @__PURE__ */
|
|
1251
|
+
label: isEditing ? /* @__PURE__ */ React11.createElement(import_editor_ui3.EditableField, { ref, ...getEditableProps() }) : /* @__PURE__ */ React11.createElement(import_editor_ui3.EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
|
|
1242
1252
|
variant: isActive && !meta.state && !isEditing ? "filled" : "standard",
|
|
1243
1253
|
shape: "rounded",
|
|
1244
1254
|
icon,
|
|
@@ -1265,16 +1275,16 @@ function CssClassItem(props) {
|
|
|
1265
1275
|
})
|
|
1266
1276
|
}
|
|
1267
1277
|
),
|
|
1268
|
-
!isEditing && /* @__PURE__ */
|
|
1269
|
-
|
|
1278
|
+
!isEditing && /* @__PURE__ */ React11.createElement(
|
|
1279
|
+
import_ui7.Chip,
|
|
1270
1280
|
{
|
|
1271
|
-
icon: isShowingState ? void 0 : /* @__PURE__ */
|
|
1281
|
+
icon: isShowingState ? void 0 : /* @__PURE__ */ React11.createElement(import_icons2.DotsVerticalIcon, { fontSize: "tiny" }),
|
|
1272
1282
|
size: CHIP_SIZE,
|
|
1273
|
-
label: isShowingState ? /* @__PURE__ */
|
|
1283
|
+
label: isShowingState ? /* @__PURE__ */ React11.createElement(import_ui7.Stack, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React11.createElement(import_ui7.Typography, { variant: "inherit" }, stateLabel), /* @__PURE__ */ React11.createElement(import_icons2.DotsVerticalIcon, { fontSize: "tiny" })) : void 0,
|
|
1274
1284
|
variant: "filled",
|
|
1275
1285
|
shape: "rounded",
|
|
1276
1286
|
color,
|
|
1277
|
-
...(0,
|
|
1287
|
+
...(0, import_ui7.bindTrigger)(popupState),
|
|
1278
1288
|
"aria-label": (0, import_i18n5.__)("Open CSS Class Menu", "elementor"),
|
|
1279
1289
|
sx: (theme) => ({
|
|
1280
1290
|
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
@@ -1284,7 +1294,7 @@ function CssClassItem(props) {
|
|
|
1284
1294
|
})
|
|
1285
1295
|
}
|
|
1286
1296
|
)
|
|
1287
|
-
), /* @__PURE__ */
|
|
1297
|
+
), /* @__PURE__ */ React11.createElement(CssClassProvider, { ...classProps, handleRename: openEditMode }, /* @__PURE__ */ React11.createElement(CssClassMenu, { popupState, anchorEl: chipRef, fixed })));
|
|
1288
1298
|
}
|
|
1289
1299
|
var validateLabel = (newLabel) => {
|
|
1290
1300
|
const result = (0, import_editor_styles_repository9.validateStyleLabel)(newLabel, "rename");
|
|
@@ -1295,22 +1305,22 @@ var validateLabel = (newLabel) => {
|
|
|
1295
1305
|
};
|
|
1296
1306
|
|
|
1297
1307
|
// src/components/css-classes/missing-classes-alert.tsx
|
|
1298
|
-
var
|
|
1299
|
-
var
|
|
1300
|
-
var
|
|
1308
|
+
var React12 = __toESM(require("react"));
|
|
1309
|
+
var import_icons3 = require("@elementor/icons");
|
|
1310
|
+
var import_ui8 = require("@elementor/ui");
|
|
1301
1311
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1302
1312
|
function MissingClassesAlert({ onDismiss }) {
|
|
1303
|
-
return /* @__PURE__ */
|
|
1304
|
-
|
|
1313
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1314
|
+
import_ui8.Alert,
|
|
1305
1315
|
{
|
|
1306
1316
|
severity: "warning",
|
|
1307
1317
|
onClose: onDismiss,
|
|
1308
1318
|
size: "small",
|
|
1309
|
-
icon: /* @__PURE__ */
|
|
1319
|
+
icon: /* @__PURE__ */ React12.createElement(import_icons3.AlertTriangleFilledIcon, { fontSize: "tiny" }),
|
|
1310
1320
|
sx: { mt: 1 }
|
|
1311
1321
|
},
|
|
1312
|
-
/* @__PURE__ */
|
|
1313
|
-
/* @__PURE__ */
|
|
1322
|
+
/* @__PURE__ */ React12.createElement(import_ui8.AlertTitle, null, (0, import_i18n6.__)("Some classes are missing", "elementor")),
|
|
1323
|
+
/* @__PURE__ */ React12.createElement(import_ui8.Typography, { variant: "caption", textColor: "primary" }, (0, import_i18n6.__)("A class was removed from your site and is no longer active on this element", "elementor"))
|
|
1314
1324
|
);
|
|
1315
1325
|
}
|
|
1316
1326
|
|
|
@@ -1341,7 +1351,7 @@ var EMPTY_OPTION = {
|
|
|
1341
1351
|
value: null,
|
|
1342
1352
|
fixed: true,
|
|
1343
1353
|
color: getTempStylesProviderColorName("accent"),
|
|
1344
|
-
icon: /* @__PURE__ */
|
|
1354
|
+
icon: /* @__PURE__ */ React13.createElement(import_icons4.MapPinIcon, null),
|
|
1345
1355
|
provider: null
|
|
1346
1356
|
};
|
|
1347
1357
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = (0, import_locations2.createLocation)();
|
|
@@ -1363,7 +1373,7 @@ function CssClassSelector() {
|
|
|
1363
1373
|
const clearMissingClasses = (0, import_react10.useCallback)(() => {
|
|
1364
1374
|
unapplyClasses(missingClassesIds);
|
|
1365
1375
|
}, [missingClassesIds, unapplyClasses]);
|
|
1366
|
-
return /* @__PURE__ */
|
|
1376
|
+
return /* @__PURE__ */ React13.createElement(import_ui9.Stack, { p: 2 }, /* @__PURE__ */ React13.createElement(import_ui9.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React13.createElement(import_ui9.FormLabel, { htmlFor: ID, size: "small" }, (0, import_i18n7.__)("Classes", "elementor")), /* @__PURE__ */ React13.createElement(import_ui9.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React13.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React13.createElement(
|
|
1367
1377
|
import_editor_ui4.WarningInfotip,
|
|
1368
1378
|
{
|
|
1369
1379
|
open: Boolean(renameError),
|
|
@@ -1372,7 +1382,7 @@ function CssClassSelector() {
|
|
|
1372
1382
|
width: autocompleteRef.current?.getBoundingClientRect().width,
|
|
1373
1383
|
offset: [0, -15]
|
|
1374
1384
|
},
|
|
1375
|
-
/* @__PURE__ */
|
|
1385
|
+
/* @__PURE__ */ React13.createElement(
|
|
1376
1386
|
CreatableAutocomplete,
|
|
1377
1387
|
{
|
|
1378
1388
|
id: ID,
|
|
@@ -1386,8 +1396,8 @@ function CssClassSelector() {
|
|
|
1386
1396
|
onCreate: create ?? void 0,
|
|
1387
1397
|
validate: validate ?? void 0,
|
|
1388
1398
|
limitTags: TAGS_LIMIT,
|
|
1389
|
-
renderEmptyState: isAtLimit && typeof limitCount === "number" ? (props) => /* @__PURE__ */
|
|
1390
|
-
getLimitTagsText: (more) => /* @__PURE__ */
|
|
1399
|
+
renderEmptyState: isAtLimit && typeof limitCount === "number" ? (props) => /* @__PURE__ */ React13.createElement(LimitReachedEmptyState, { limitCount, onClear: props.onClear }) : EmptyState,
|
|
1400
|
+
getLimitTagsText: (more) => /* @__PURE__ */ React13.createElement(import_ui9.Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
1391
1401
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
1392
1402
|
const chipProps = getTagProps({ index });
|
|
1393
1403
|
const isActive = value.value === active?.value;
|
|
@@ -1403,7 +1413,7 @@ function CssClassSelector() {
|
|
|
1403
1413
|
});
|
|
1404
1414
|
return updateClassByProvider(value.provider, { label: newLabel, id: value.value });
|
|
1405
1415
|
};
|
|
1406
|
-
return /* @__PURE__ */
|
|
1416
|
+
return /* @__PURE__ */ React13.createElement(
|
|
1407
1417
|
CssClassItem,
|
|
1408
1418
|
{
|
|
1409
1419
|
key: chipProps.key,
|
|
@@ -1423,10 +1433,10 @@ function CssClassSelector() {
|
|
|
1423
1433
|
})
|
|
1424
1434
|
}
|
|
1425
1435
|
)
|
|
1426
|
-
), hasMissingClasses && /* @__PURE__ */
|
|
1436
|
+
), hasMissingClasses && /* @__PURE__ */ React13.createElement(MissingClassesAlert, { onDismiss: clearMissingClasses }), !canEdit && /* @__PURE__ */ React13.createElement(import_editor_ui4.InfoAlert, { sx: { mt: 1 } }, (0, import_i18n7.__)("With your current role, you can use existing classes but can\u2019t modify them.", "elementor")));
|
|
1427
1437
|
}
|
|
1428
|
-
var EmptyStateLayout = ({ searchValue, onClear, children }) => /* @__PURE__ */
|
|
1429
|
-
|
|
1438
|
+
var EmptyStateLayout = ({ searchValue, onClear, children }) => /* @__PURE__ */ React13.createElement(import_ui9.Box, { sx: { py: 4 } }, /* @__PURE__ */ React13.createElement(
|
|
1439
|
+
import_ui9.Stack,
|
|
1430
1440
|
{
|
|
1431
1441
|
gap: 1,
|
|
1432
1442
|
alignItems: "center",
|
|
@@ -1434,17 +1444,17 @@ var EmptyStateLayout = ({ searchValue, onClear, children }) => /* @__PURE__ */ R
|
|
|
1434
1444
|
justifyContent: "center",
|
|
1435
1445
|
sx: { px: 2, m: "auto", maxWidth: "236px" }
|
|
1436
1446
|
},
|
|
1437
|
-
/* @__PURE__ */
|
|
1438
|
-
/* @__PURE__ */
|
|
1447
|
+
/* @__PURE__ */ React13.createElement(import_icons4.ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1448
|
+
/* @__PURE__ */ React13.createElement(import_ui9.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n7.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React13.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
1439
1449
|
children,
|
|
1440
|
-
/* @__PURE__ */
|
|
1450
|
+
/* @__PURE__ */ React13.createElement(import_ui9.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n7.__)("Clear & try again", "elementor"))
|
|
1441
1451
|
));
|
|
1442
|
-
var EmptyState = (props) => /* @__PURE__ */
|
|
1452
|
+
var EmptyState = (props) => /* @__PURE__ */ React13.createElement(EmptyStateLayout, { ...props }, /* @__PURE__ */ React13.createElement(import_ui9.Typography, { align: "center", variant: "caption", sx: { mb: 2 } }, (0, import_i18n7.__)("With your current role,", "elementor"), /* @__PURE__ */ React13.createElement("br", null), (0, import_i18n7.__)("you can only use existing classes.", "elementor")));
|
|
1443
1453
|
var LimitReachedEmptyState = ({
|
|
1444
1454
|
limitCount,
|
|
1445
1455
|
onClear
|
|
1446
|
-
}) => /* @__PURE__ */
|
|
1447
|
-
|
|
1456
|
+
}) => /* @__PURE__ */ React13.createElement(import_ui9.Box, { sx: { py: 4 } }, /* @__PURE__ */ React13.createElement(
|
|
1457
|
+
import_ui9.Stack,
|
|
1448
1458
|
{
|
|
1449
1459
|
gap: 1,
|
|
1450
1460
|
alignItems: "center",
|
|
@@ -1452,15 +1462,15 @@ var LimitReachedEmptyState = ({
|
|
|
1452
1462
|
justifyContent: "center",
|
|
1453
1463
|
sx: { px: 1, m: "auto", maxWidth: "260px" }
|
|
1454
1464
|
},
|
|
1455
|
-
/* @__PURE__ */
|
|
1456
|
-
/* @__PURE__ */
|
|
1457
|
-
|
|
1465
|
+
/* @__PURE__ */ React13.createElement(import_icons4.ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1466
|
+
/* @__PURE__ */ React13.createElement(
|
|
1467
|
+
import_ui9.Typography,
|
|
1458
1468
|
{ align: "center", variant: "subtitle2" },
|
|
1459
1469
|
/* translators: %s is the maximum number of classes */
|
|
1460
1470
|
(0, import_i18n7.__)("Limit of %s classes reached", "elementor").replace("%s", String(limitCount))
|
|
1461
1471
|
),
|
|
1462
|
-
/* @__PURE__ */
|
|
1463
|
-
|
|
1472
|
+
/* @__PURE__ */ React13.createElement(import_ui9.Typography, { align: "center", variant: "caption", component: "div" }, (0, import_i18n7.__)("Remove a class to create a new one.", "elementor"), " ", /* @__PURE__ */ React13.createElement(
|
|
1473
|
+
import_ui9.Link,
|
|
1464
1474
|
{
|
|
1465
1475
|
color: "inherit",
|
|
1466
1476
|
variant: "caption",
|
|
@@ -1470,8 +1480,8 @@ var LimitReachedEmptyState = ({
|
|
|
1470
1480
|
},
|
|
1471
1481
|
(0, import_i18n7.__)("Clear", "elementor")
|
|
1472
1482
|
)),
|
|
1473
|
-
/* @__PURE__ */
|
|
1474
|
-
|
|
1483
|
+
/* @__PURE__ */ React13.createElement(
|
|
1484
|
+
import_ui9.Button,
|
|
1475
1485
|
{
|
|
1476
1486
|
variant: "outlined",
|
|
1477
1487
|
color: "secondary",
|
|
@@ -1509,7 +1519,7 @@ function useOptions() {
|
|
|
1509
1519
|
value: styleDef.id,
|
|
1510
1520
|
fixed: isElements,
|
|
1511
1521
|
color: getTempStylesProviderColorName(getStylesProviderColorName(provider.getKey())),
|
|
1512
|
-
icon: isElements ? /* @__PURE__ */
|
|
1522
|
+
icon: isElements ? /* @__PURE__ */ React13.createElement(import_icons4.MapPinIcon, null) : null,
|
|
1513
1523
|
provider: provider.getKey()
|
|
1514
1524
|
};
|
|
1515
1525
|
});
|
|
@@ -1583,7 +1593,7 @@ function useHandleSelect() {
|
|
|
1583
1593
|
}
|
|
1584
1594
|
|
|
1585
1595
|
// src/components/custom-css-indicator.tsx
|
|
1586
|
-
var
|
|
1596
|
+
var React14 = __toESM(require("react"));
|
|
1587
1597
|
var import_react14 = require("react");
|
|
1588
1598
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
1589
1599
|
var import_editor_styles4 = require("@elementor/editor-styles");
|
|
@@ -1882,11 +1892,11 @@ var CustomCssIndicator = () => {
|
|
|
1882
1892
|
}, [hasContent, style, meta]);
|
|
1883
1893
|
if (!hasContent) {
|
|
1884
1894
|
if (hasInheritedContent) {
|
|
1885
|
-
return /* @__PURE__ */
|
|
1895
|
+
return /* @__PURE__ */ React14.createElement(StyleIndicator, null);
|
|
1886
1896
|
}
|
|
1887
1897
|
return null;
|
|
1888
1898
|
}
|
|
1889
|
-
return /* @__PURE__ */
|
|
1899
|
+
return /* @__PURE__ */ React14.createElement(StyleIndicator, { getColor: provider ? getStylesProviderThemeColor(provider.getKey()) : void 0 });
|
|
1890
1900
|
};
|
|
1891
1901
|
var hasInheritedCustomCss = (style, meta) => {
|
|
1892
1902
|
if (!style || !meta) {
|
|
@@ -1945,10 +1955,10 @@ var registerEditingPanelReplacement = ({
|
|
|
1945
1955
|
var getEditingPanelReplacement = (element, elementType) => Array.from(registry.values()).filter(({ condition }) => condition(element, elementType)).sort((a, b) => a.priority - b.priority)?.[0] ?? null;
|
|
1946
1956
|
|
|
1947
1957
|
// src/components/editing-panel-error-fallback.tsx
|
|
1948
|
-
var
|
|
1949
|
-
var
|
|
1958
|
+
var React15 = __toESM(require("react"));
|
|
1959
|
+
var import_ui10 = require("@elementor/ui");
|
|
1950
1960
|
function EditorPanelErrorFallback() {
|
|
1951
|
-
return /* @__PURE__ */
|
|
1961
|
+
return /* @__PURE__ */ React15.createElement(import_ui10.Box, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React15.createElement(import_ui10.Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React15.createElement("strong", null, "Something went wrong")));
|
|
1952
1962
|
}
|
|
1953
1963
|
|
|
1954
1964
|
// src/components/editing-panel-tabs.tsx
|
|
@@ -1960,11 +1970,11 @@ var import_ui43 = require("@elementor/ui");
|
|
|
1960
1970
|
var import_i18n63 = require("@wordpress/i18n");
|
|
1961
1971
|
|
|
1962
1972
|
// src/contexts/scroll-context.tsx
|
|
1963
|
-
var
|
|
1973
|
+
var React16 = __toESM(require("react"));
|
|
1964
1974
|
var import_react15 = require("react");
|
|
1965
|
-
var
|
|
1975
|
+
var import_ui11 = require("@elementor/ui");
|
|
1966
1976
|
var ScrollContext = (0, import_react15.createContext)(void 0);
|
|
1967
|
-
var ScrollPanel = (0,
|
|
1977
|
+
var ScrollPanel = (0, import_ui11.styled)("div")`
|
|
1968
1978
|
height: 100%;
|
|
1969
1979
|
overflow-y: auto;
|
|
1970
1980
|
`;
|
|
@@ -1992,7 +2002,7 @@ function ScrollProvider({ children }) {
|
|
|
1992
2002
|
scrollElement.removeEventListener("scroll", handleScroll);
|
|
1993
2003
|
};
|
|
1994
2004
|
});
|
|
1995
|
-
return /* @__PURE__ */
|
|
2005
|
+
return /* @__PURE__ */ React16.createElement(ScrollContext.Provider, { value: { direction } }, /* @__PURE__ */ React16.createElement(ScrollPanel, { ref }, children));
|
|
1996
2006
|
}
|
|
1997
2007
|
function useScrollDirection() {
|
|
1998
2008
|
return (0, import_react15.useContext)(ScrollContext)?.direction ?? DEFAULT_SCROLL_DIRECTION;
|
|
@@ -2048,20 +2058,20 @@ var useStateByElement = (key, initialValue) => {
|
|
|
2048
2058
|
};
|
|
2049
2059
|
|
|
2050
2060
|
// src/components/interactions-tab.tsx
|
|
2051
|
-
var
|
|
2061
|
+
var React18 = __toESM(require("react"));
|
|
2052
2062
|
var import_editor_interactions = require("@elementor/editor-interactions");
|
|
2053
2063
|
|
|
2054
2064
|
// src/components/sections-list.tsx
|
|
2055
|
-
var
|
|
2056
|
-
var
|
|
2065
|
+
var React17 = __toESM(require("react"));
|
|
2066
|
+
var import_ui12 = require("@elementor/ui");
|
|
2057
2067
|
function SectionsList(props) {
|
|
2058
|
-
return /* @__PURE__ */
|
|
2068
|
+
return /* @__PURE__ */ React17.createElement(import_ui12.List, { disablePadding: true, component: "div", ...props });
|
|
2059
2069
|
}
|
|
2060
2070
|
|
|
2061
2071
|
// src/components/interactions-tab.tsx
|
|
2062
2072
|
var InteractionsTab = () => {
|
|
2063
2073
|
const { element } = useElement();
|
|
2064
|
-
return /* @__PURE__ */
|
|
2074
|
+
return /* @__PURE__ */ React18.createElement(SectionsList, null, /* @__PURE__ */ React18.createElement(import_editor_interactions.InteractionsTab, { elementId: element.id }));
|
|
2065
2075
|
};
|
|
2066
2076
|
|
|
2067
2077
|
// src/components/settings-tab.tsx
|
|
@@ -2275,10 +2285,10 @@ function removePreviousValueFromStorage({ path, elementId }) {
|
|
|
2275
2285
|
}
|
|
2276
2286
|
|
|
2277
2287
|
// src/components/section.tsx
|
|
2278
|
-
var
|
|
2288
|
+
var React19 = __toESM(require("react"));
|
|
2279
2289
|
var import_react17 = require("react");
|
|
2280
2290
|
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
2281
|
-
var
|
|
2291
|
+
var import_ui13 = require("@elementor/ui");
|
|
2282
2292
|
function Section({ title, children, defaultExpanded = false, titleEnd, unmountOnExit = true, action }) {
|
|
2283
2293
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
2284
2294
|
const ref = (0, import_react17.useRef)(null);
|
|
@@ -2293,8 +2303,8 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2293
2303
|
const id = (0, import_react17.useId)();
|
|
2294
2304
|
const labelId = `label-${id}`;
|
|
2295
2305
|
const contentId = `content-${id}`;
|
|
2296
|
-
return /* @__PURE__ */
|
|
2297
|
-
|
|
2306
|
+
return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
2307
|
+
import_ui13.ListItemButton,
|
|
2298
2308
|
{
|
|
2299
2309
|
id: labelId,
|
|
2300
2310
|
"aria-controls": contentId,
|
|
@@ -2302,8 +2312,8 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2302
2312
|
onClick: handleClick,
|
|
2303
2313
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
2304
2314
|
},
|
|
2305
|
-
/* @__PURE__ */
|
|
2306
|
-
|
|
2315
|
+
/* @__PURE__ */ React19.createElement(import_ui13.Stack, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React19.createElement(
|
|
2316
|
+
import_ui13.ListItemText,
|
|
2307
2317
|
{
|
|
2308
2318
|
secondary: title,
|
|
2309
2319
|
secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" },
|
|
@@ -2311,7 +2321,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2311
2321
|
}
|
|
2312
2322
|
), (0, import_editor_ui5.getCollapsibleValue)(titleEnd, isOpen)),
|
|
2313
2323
|
action?.component,
|
|
2314
|
-
/* @__PURE__ */
|
|
2324
|
+
/* @__PURE__ */ React19.createElement(
|
|
2315
2325
|
import_editor_ui5.CollapseIcon,
|
|
2316
2326
|
{
|
|
2317
2327
|
open: isOpen,
|
|
@@ -2321,8 +2331,8 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2321
2331
|
sx: { ml: 1 }
|
|
2322
2332
|
}
|
|
2323
2333
|
)
|
|
2324
|
-
), /* @__PURE__ */
|
|
2325
|
-
|
|
2334
|
+
), /* @__PURE__ */ React19.createElement(
|
|
2335
|
+
import_ui13.Collapse,
|
|
2326
2336
|
{
|
|
2327
2337
|
id: contentId,
|
|
2328
2338
|
"aria-labelledby": labelId,
|
|
@@ -2330,8 +2340,8 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2330
2340
|
timeout: "auto",
|
|
2331
2341
|
unmountOnExit
|
|
2332
2342
|
},
|
|
2333
|
-
/* @__PURE__ */
|
|
2334
|
-
), /* @__PURE__ */
|
|
2343
|
+
/* @__PURE__ */ React19.createElement(import_editor_ui5.SectionRefContext.Provider, { value: ref }, /* @__PURE__ */ React19.createElement(import_ui13.Stack, { ref, gap: 2.5, p: 2, "aria-label": `${title} section content` }, children))
|
|
2344
|
+
), /* @__PURE__ */ React19.createElement(import_ui13.Divider, null));
|
|
2335
2345
|
}
|
|
2336
2346
|
|
|
2337
2347
|
// src/components/settings-control.tsx
|
|
@@ -2340,50 +2350,50 @@ var import_editor_controls4 = require("@elementor/editor-controls");
|
|
|
2340
2350
|
var import_ui15 = require("@elementor/ui");
|
|
2341
2351
|
|
|
2342
2352
|
// src/controls-registry/control.tsx
|
|
2343
|
-
var
|
|
2353
|
+
var React20 = __toESM(require("react"));
|
|
2344
2354
|
|
|
2345
2355
|
// src/controls-registry/controls-registry.tsx
|
|
2346
|
-
var
|
|
2356
|
+
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
2347
2357
|
var import_editor_props5 = require("@elementor/editor-props");
|
|
2348
2358
|
var queryArrayPropTypeUtil = (0, import_editor_props5.createArrayPropUtils)(import_editor_props5.queryPropTypeUtil.key, import_editor_props5.queryPropTypeUtil.schema);
|
|
2349
2359
|
var controlTypes = {
|
|
2350
|
-
image: { component:
|
|
2351
|
-
"svg-media": { component:
|
|
2352
|
-
text: { component:
|
|
2353
|
-
textarea: { component:
|
|
2354
|
-
size: { component:
|
|
2355
|
-
select: { component:
|
|
2356
|
-
chips: { component:
|
|
2357
|
-
link: { component:
|
|
2358
|
-
query: { component:
|
|
2359
|
-
"query-chips": { component:
|
|
2360
|
+
image: { component: import_editor_controls2.ImageControl, layout: "custom", propTypeUtil: import_editor_props5.imagePropTypeUtil },
|
|
2361
|
+
"svg-media": { component: import_editor_controls2.SvgMediaControl, layout: "full", propTypeUtil: import_editor_props5.svgSrcPropTypeUtil },
|
|
2362
|
+
text: { component: import_editor_controls2.TextControl, layout: "full", propTypeUtil: import_editor_props5.stringPropTypeUtil },
|
|
2363
|
+
textarea: { component: import_editor_controls2.TextAreaControl, layout: "full", propTypeUtil: import_editor_props5.stringPropTypeUtil },
|
|
2364
|
+
size: { component: import_editor_controls2.SizeControl, layout: "two-columns", propTypeUtil: import_editor_props5.sizePropTypeUtil },
|
|
2365
|
+
select: { component: import_editor_controls2.SelectControlWrapper, layout: "two-columns", propTypeUtil: import_editor_props5.stringPropTypeUtil },
|
|
2366
|
+
chips: { component: import_editor_controls2.ChipsControl, layout: "full", propTypeUtil: import_editor_props5.stringArrayPropTypeUtil },
|
|
2367
|
+
link: { component: import_editor_controls2.LinkControl, layout: "custom", propTypeUtil: import_editor_props5.linkPropTypeUtil },
|
|
2368
|
+
query: { component: import_editor_controls2.QueryControl, layout: "full", propTypeUtil: import_editor_props5.queryPropTypeUtil },
|
|
2369
|
+
"query-chips": { component: import_editor_controls2.QueryChipsControl, layout: "full", propTypeUtil: queryArrayPropTypeUtil },
|
|
2360
2370
|
"query-filter-repeater": {
|
|
2361
|
-
component:
|
|
2371
|
+
component: import_editor_controls2.QueryFilterRepeaterControl,
|
|
2362
2372
|
layout: "full",
|
|
2363
2373
|
propTypeUtil: import_editor_props5.queryFilterArrayPropTypeUtil
|
|
2364
2374
|
},
|
|
2365
|
-
url: { component:
|
|
2366
|
-
switch: { component:
|
|
2367
|
-
number: { component:
|
|
2368
|
-
repeatable: { component:
|
|
2369
|
-
"key-value": { component:
|
|
2370
|
-
"html-tag": { component:
|
|
2371
|
-
toggle: { component:
|
|
2372
|
-
"date-time": { component:
|
|
2373
|
-
video: { component:
|
|
2374
|
-
"inline-editing": { component:
|
|
2375
|
-
email: { component:
|
|
2375
|
+
url: { component: import_editor_controls2.UrlControl, layout: "full", propTypeUtil: import_editor_props5.stringPropTypeUtil },
|
|
2376
|
+
switch: { component: import_editor_controls2.SwitchControl, layout: "two-columns", propTypeUtil: import_editor_props5.booleanPropTypeUtil },
|
|
2377
|
+
number: { component: import_editor_controls2.NumberControl, layout: "two-columns", propTypeUtil: import_editor_props5.numberPropTypeUtil },
|
|
2378
|
+
repeatable: { component: import_editor_controls2.RepeatableControl, layout: "full", propTypeUtil: void 0 },
|
|
2379
|
+
"key-value": { component: import_editor_controls2.KeyValueControl, layout: "full", propTypeUtil: import_editor_props5.keyValuePropTypeUtil },
|
|
2380
|
+
"html-tag": { component: import_editor_controls2.HtmlTagControl, layout: "two-columns", propTypeUtil: import_editor_props5.stringPropTypeUtil },
|
|
2381
|
+
toggle: { component: import_editor_controls2.ToggleControl, layout: "full", propTypeUtil: import_editor_props5.stringPropTypeUtil },
|
|
2382
|
+
"date-time": { component: import_editor_controls2.DateTimeControl, layout: "full", propTypeUtil: import_editor_props5.DateTimePropTypeUtil },
|
|
2383
|
+
video: { component: import_editor_controls2.VideoMediaControl, layout: "full", propTypeUtil: import_editor_props5.videoSrcPropTypeUtil },
|
|
2384
|
+
"inline-editing": { component: import_editor_controls2.InlineEditingControl, layout: "full", propTypeUtil: import_editor_props5.htmlV3PropTypeUtil },
|
|
2385
|
+
email: { component: import_editor_controls2.EmailFormActionControl, layout: "custom", propTypeUtil: import_editor_props5.emailsPropTypeUtil },
|
|
2376
2386
|
"date-range": {
|
|
2377
|
-
component:
|
|
2387
|
+
component: import_editor_controls2.DateRangeControl,
|
|
2378
2388
|
layout: "custom",
|
|
2379
2389
|
propTypeUtil: import_editor_props5.dateRangePropTypeUtil
|
|
2380
2390
|
},
|
|
2381
2391
|
"time-range": {
|
|
2382
|
-
component:
|
|
2392
|
+
component: import_editor_controls2.TimeRangeControl,
|
|
2383
2393
|
layout: "custom",
|
|
2384
2394
|
propTypeUtil: import_editor_props5.timeRangePropTypeUtil
|
|
2385
2395
|
},
|
|
2386
|
-
"attachment-type": { component:
|
|
2396
|
+
"attachment-type": { component: import_editor_controls2.AttachmentTypeControl, layout: "custom", propTypeUtil: import_editor_props5.stringPropTypeUtil }
|
|
2387
2397
|
};
|
|
2388
2398
|
var ControlsRegistry = class {
|
|
2389
2399
|
constructor(controlsRegistry2) {
|
|
@@ -2426,19 +2436,19 @@ var Control = ({ props, type }) => {
|
|
|
2426
2436
|
context: { controlType: type }
|
|
2427
2437
|
});
|
|
2428
2438
|
}
|
|
2429
|
-
return /* @__PURE__ */
|
|
2439
|
+
return /* @__PURE__ */ React20.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
2430
2440
|
};
|
|
2431
2441
|
|
|
2432
2442
|
// src/controls-registry/control-type-container.tsx
|
|
2433
|
-
var
|
|
2434
|
-
var
|
|
2443
|
+
var React21 = __toESM(require("react"));
|
|
2444
|
+
var import_ui14 = require("@elementor/ui");
|
|
2435
2445
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
2436
2446
|
if (layout === "custom") {
|
|
2437
2447
|
return children;
|
|
2438
2448
|
}
|
|
2439
|
-
return /* @__PURE__ */
|
|
2449
|
+
return /* @__PURE__ */ React21.createElement(StyledContainer, { layout }, children);
|
|
2440
2450
|
};
|
|
2441
|
-
var StyledContainer = (0,
|
|
2451
|
+
var StyledContainer = (0, import_ui14.styled)(import_ui14.Box, {
|
|
2442
2452
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
2443
2453
|
})(({ layout, theme }) => ({
|
|
2444
2454
|
display: "grid",
|
|
@@ -2464,9 +2474,9 @@ var getStyleByLayout = (layout) => {
|
|
|
2464
2474
|
};
|
|
2465
2475
|
|
|
2466
2476
|
// src/controls-registry/settings-field.tsx
|
|
2467
|
-
var
|
|
2477
|
+
var React22 = __toESM(require("react"));
|
|
2468
2478
|
var import_react18 = require("react");
|
|
2469
|
-
var
|
|
2479
|
+
var import_editor_controls3 = require("@elementor/editor-controls");
|
|
2470
2480
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
2471
2481
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
2472
2482
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
@@ -2514,7 +2524,7 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
2514
2524
|
(0, import_editor_elements6.updateElementSettings)({ id: elementId, props: settings, withHistory: false });
|
|
2515
2525
|
}
|
|
2516
2526
|
};
|
|
2517
|
-
return /* @__PURE__ */
|
|
2527
|
+
return /* @__PURE__ */ React22.createElement(import_editor_controls3.PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React22.createElement(import_editor_controls3.PropKeyProvider, { bind }, children));
|
|
2518
2528
|
};
|
|
2519
2529
|
function useUndoableUpdateElementProp({
|
|
2520
2530
|
elementId,
|
|
@@ -2563,15 +2573,6 @@ var registerFieldIndicator = ({
|
|
|
2563
2573
|
};
|
|
2564
2574
|
var getFieldIndicators = (fieldType) => Array.from(indicatorsRegistry[fieldType].values()).sort((a, b) => a.priority - b.priority).map(({ id, indicator: Adornment }) => ({ id, Adornment }));
|
|
2565
2575
|
|
|
2566
|
-
// src/components/control-label.tsx
|
|
2567
|
-
var React22 = __toESM(require("react"));
|
|
2568
|
-
var import_editor_controls3 = require("@elementor/editor-controls");
|
|
2569
|
-
var import_icons4 = require("@elementor/icons");
|
|
2570
|
-
var import_ui14 = require("@elementor/ui");
|
|
2571
|
-
var ControlLabel = ({ children, infoTooltip }) => {
|
|
2572
|
-
return /* @__PURE__ */ React22.createElement(import_ui14.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React22.createElement(import_editor_controls3.ControlFormLabel, null, children), infoTooltip && /* @__PURE__ */ React22.createElement(import_ui14.Tooltip, { title: infoTooltip, placement: "top" }, /* @__PURE__ */ React22.createElement(import_icons4.InfoCircleIcon, { fontSize: "tiny" })), /* @__PURE__ */ React22.createElement(import_editor_controls3.ControlAdornments, null));
|
|
2573
|
-
};
|
|
2574
|
-
|
|
2575
2576
|
// src/components/settings-control.tsx
|
|
2576
2577
|
var Wrapper = (0, import_ui15.styled)("span")`
|
|
2577
2578
|
display: contents;
|
|
@@ -7464,6 +7465,7 @@ var blockV1Panel = () => {
|
|
|
7464
7465
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7465
7466
|
0 && (module.exports = {
|
|
7466
7467
|
BaseControl,
|
|
7468
|
+
ControlLabel,
|
|
7467
7469
|
ControlTypeContainer,
|
|
7468
7470
|
CustomCssIndicator,
|
|
7469
7471
|
EditingPanelTabs,
|