@elementor/editor-editing-panel 1.45.0 → 1.46.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 +42 -0
- package/dist/index.d.mts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +702 -688
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +587 -573
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -13
- package/src/components/css-classes/css-class-menu.tsx +6 -8
- package/src/components/css-classes/css-class-selector.tsx +17 -11
- package/src/components/settings-tab.tsx +25 -2
- package/src/components/style-indicator.tsx +19 -15
- package/src/components/style-sections/border-section/border-field.tsx +4 -6
- package/src/components/style-sections/effects-section/effects-section.tsx +6 -0
- package/src/components/style-sections/layout-section/flex-order-field.tsx +1 -3
- package/src/components/style-sections/layout-section/flex-size-field.tsx +7 -10
- package/src/components/style-sections/layout-section/layout-section.tsx +2 -2
- package/src/components/style-sections/layout-section/opacity-control-field.tsx +25 -0
- package/src/components/style-sections/layout-section/utils/rotated-icon.tsx +1 -1
- package/src/components/style-sections/position-section/position-section.tsx +6 -6
- package/src/components/style-sections/size-section/object-position-field.tsx +2 -24
- package/src/components/style-sections/size-section/size-section.tsx +1 -1
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +4 -6
- package/src/components/style-sections/typography-section/typography-section.tsx +4 -2
- package/src/controls-registry/controls-registry.tsx +30 -10
- package/src/controls-registry/styles-field.tsx +1 -3
- package/src/dynamics/components/dynamic-selection-control.tsx +10 -18
- package/src/dynamics/components/dynamic-selection.tsx +58 -77
- package/src/dynamics/hooks/use-prop-dynamic-action.tsx +1 -1
- package/src/hooks/use-styles-field.ts +9 -3
- package/src/hooks/use-styles-fields.ts +4 -4
- package/src/index.ts +1 -0
- package/src/popover-action.tsx +3 -5
- package/src/provider-colors-registry.ts +20 -0
- package/src/styles-inheritance/components/infotip/label-chip.tsx +4 -5
- package/src/styles-inheritance/components/styles-inheritance-indicator.tsx +32 -40
- package/src/styles-inheritance/components/styles-inheritance-infotip.tsx +1 -5
- package/src/styles-inheritance/components/styles-inheritance-section-indicators.tsx +29 -44
- package/src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx +1 -17
- package/src/styles-inheritance/types.ts +0 -2
- package/src/styles-inheritance/utils.ts +17 -1
- package/src/utils/get-styles-provider-color.ts +28 -0
package/dist/index.js
CHANGED
|
@@ -34,23 +34,35 @@ __export(index_exports, {
|
|
|
34
34
|
init: () => init3,
|
|
35
35
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
36
36
|
registerControlReplacement: () => registerControlReplacement,
|
|
37
|
-
|
|
37
|
+
registerStyleProviderToColors: () => registerStyleProviderToColors,
|
|
38
|
+
useBoundProp: () => import_editor_controls60.useBoundProp,
|
|
38
39
|
useFontFamilies: () => useFontFamilies,
|
|
39
40
|
usePanelActions: () => usePanelActions,
|
|
40
41
|
usePanelStatus: () => usePanelStatus
|
|
41
42
|
});
|
|
42
43
|
module.exports = __toCommonJS(index_exports);
|
|
43
|
-
var
|
|
44
|
+
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
44
45
|
|
|
45
46
|
// src/control-replacement.tsx
|
|
46
47
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
47
48
|
var { registerControlReplacement, getControlReplacements } = (0, import_editor_controls.createControlReplacementsRegistry)();
|
|
48
49
|
|
|
50
|
+
// src/provider-colors-registry.ts
|
|
51
|
+
var DEFAULT_COLORS = {
|
|
52
|
+
name: "default",
|
|
53
|
+
getThemeColor: null
|
|
54
|
+
};
|
|
55
|
+
var providerColorsRegistry = /* @__PURE__ */ new Map();
|
|
56
|
+
var registerStyleProviderToColors = (provider, colors) => {
|
|
57
|
+
providerColorsRegistry.set(provider, colors);
|
|
58
|
+
};
|
|
59
|
+
var getStyleProviderColors = (provider) => providerColorsRegistry.get(provider) ?? DEFAULT_COLORS;
|
|
60
|
+
|
|
49
61
|
// src/components/css-classes/css-class-selector.tsx
|
|
50
62
|
var React8 = __toESM(require("react"));
|
|
51
63
|
var import_react10 = require("react");
|
|
52
64
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
53
|
-
var
|
|
65
|
+
var import_editor_styles_repository6 = require("@elementor/editor-styles-repository");
|
|
54
66
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
55
67
|
var import_icons2 = require("@elementor/icons");
|
|
56
68
|
var import_locations = require("@elementor/locations");
|
|
@@ -139,6 +151,27 @@ function useIsStyle() {
|
|
|
139
151
|
return !!(0, import_react3.useContext)(Context3);
|
|
140
152
|
}
|
|
141
153
|
|
|
154
|
+
// src/utils/get-styles-provider-color.ts
|
|
155
|
+
var import_editor_styles_repository2 = require("@elementor/editor-styles-repository");
|
|
156
|
+
var getStylesProviderColorName = (provider) => {
|
|
157
|
+
if (!provider || provider === import_editor_styles_repository2.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
158
|
+
return "default";
|
|
159
|
+
}
|
|
160
|
+
if ((0, import_editor_styles_repository2.isElementsStylesProvider)(provider)) {
|
|
161
|
+
return "accent";
|
|
162
|
+
}
|
|
163
|
+
return getStyleProviderColors(provider).name;
|
|
164
|
+
};
|
|
165
|
+
var getStylesProviderThemeColor = (provider) => {
|
|
166
|
+
if (!provider || provider === import_editor_styles_repository2.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
if ((0, import_editor_styles_repository2.isElementsStylesProvider)(provider)) {
|
|
170
|
+
return (theme) => theme.palette.accent.main;
|
|
171
|
+
}
|
|
172
|
+
return getStyleProviderColors(provider).getThemeColor;
|
|
173
|
+
};
|
|
174
|
+
|
|
142
175
|
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
143
176
|
var React4 = __toESM(require("react"));
|
|
144
177
|
var import_react6 = require("react");
|
|
@@ -468,7 +501,7 @@ var StyledGroupItems = (0, import_ui2.styled)("ul")`
|
|
|
468
501
|
// src/components/css-classes/css-class-item.tsx
|
|
469
502
|
var React7 = __toESM(require("react"));
|
|
470
503
|
var import_react9 = require("react");
|
|
471
|
-
var
|
|
504
|
+
var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
|
|
472
505
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
473
506
|
var import_icons = require("@elementor/icons");
|
|
474
507
|
var import_ui5 = require("@elementor/ui");
|
|
@@ -491,7 +524,7 @@ function CssClassProvider({ children, ...contextValue }) {
|
|
|
491
524
|
|
|
492
525
|
// src/components/css-classes/css-class-menu.tsx
|
|
493
526
|
var React6 = __toESM(require("react"));
|
|
494
|
-
var
|
|
527
|
+
var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
|
|
495
528
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
496
529
|
var import_ui4 = require("@elementor/ui");
|
|
497
530
|
var import_i18n2 = require("@wordpress/i18n");
|
|
@@ -499,22 +532,17 @@ var import_i18n2 = require("@wordpress/i18n");
|
|
|
499
532
|
// src/components/style-indicator.tsx
|
|
500
533
|
var import_ui3 = require("@elementor/ui");
|
|
501
534
|
var StyleIndicator = (0, import_ui3.styled)("div", {
|
|
502
|
-
shouldForwardProp: (prop) =>
|
|
535
|
+
shouldForwardProp: (prop) => !["isOverridden", "getColor"].includes(prop)
|
|
503
536
|
})`
|
|
504
537
|
width: 5px;
|
|
505
538
|
height: 5px;
|
|
506
539
|
border-radius: 50%;
|
|
507
|
-
background-color: ${({ theme,
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
return theme.palette.warning.light;
|
|
511
|
-
case "global":
|
|
512
|
-
return theme.palette.global.dark;
|
|
513
|
-
case "local":
|
|
514
|
-
return theme.palette.accent.main;
|
|
515
|
-
default:
|
|
516
|
-
return theme.palette.text.disabled;
|
|
540
|
+
background-color: ${({ theme, isOverridden, getColor }) => {
|
|
541
|
+
if (isOverridden) {
|
|
542
|
+
return theme.palette.warning.light;
|
|
517
543
|
}
|
|
544
|
+
const providerColor = getColor?.(theme);
|
|
545
|
+
return providerColor ?? theme.palette.text.disabled;
|
|
518
546
|
}};
|
|
519
547
|
`;
|
|
520
548
|
|
|
@@ -523,7 +551,7 @@ var import_react8 = require("react");
|
|
|
523
551
|
var import_editor_documents = require("@elementor/editor-documents");
|
|
524
552
|
var import_editor_elements = require("@elementor/editor-elements");
|
|
525
553
|
var import_editor_props = require("@elementor/editor-props");
|
|
526
|
-
var
|
|
554
|
+
var import_editor_styles_repository3 = require("@elementor/editor-styles-repository");
|
|
527
555
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
528
556
|
var import_i18n = require("@wordpress/i18n");
|
|
529
557
|
|
|
@@ -606,7 +634,7 @@ function useUnapplyClass() {
|
|
|
606
634
|
function useCreateAndApplyClass() {
|
|
607
635
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
608
636
|
const isVersion330Active = (0, import_editor_v1_adapters.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
609
|
-
const [provider, createAction] = (0,
|
|
637
|
+
const [provider, createAction] = (0, import_editor_styles_repository3.useGetStylesRepositoryCreateAction)() ?? [null, null];
|
|
610
638
|
const deleteAction = provider?.actions.delete;
|
|
611
639
|
const applyClass = useApply();
|
|
612
640
|
const unapplyClass = useUnapply();
|
|
@@ -749,7 +777,7 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
749
777
|
}
|
|
750
778
|
function useModifiedStates(styleId) {
|
|
751
779
|
const { meta } = useStyle();
|
|
752
|
-
const styleDef =
|
|
780
|
+
const styleDef = import_editor_styles_repository4.stylesRepository.all().find((style) => style.id === styleId);
|
|
753
781
|
return Object.fromEntries(
|
|
754
782
|
styleDef?.variants.filter((variant) => meta.breakpoint === variant.meta.breakpoint).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
|
|
755
783
|
);
|
|
@@ -762,7 +790,7 @@ function getMenuItemsByProvider({
|
|
|
762
790
|
if (!provider) {
|
|
763
791
|
return [];
|
|
764
792
|
}
|
|
765
|
-
const providerInstance =
|
|
793
|
+
const providerInstance = import_editor_styles_repository4.stylesRepository.getProviderByKey(provider);
|
|
766
794
|
const providerActions = providerInstance?.actions;
|
|
767
795
|
const canUpdate = providerActions?.update;
|
|
768
796
|
const canUnapply = !fixed;
|
|
@@ -789,10 +817,9 @@ function StateMenuItem({ state, closeMenu, ...props }) {
|
|
|
789
817
|
const { id: styleId, provider } = useCssClass();
|
|
790
818
|
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
791
819
|
const { state: activeState } = meta;
|
|
792
|
-
const { userCan } = (0,
|
|
820
|
+
const { userCan } = (0, import_editor_styles_repository4.useUserStylesCapability)();
|
|
793
821
|
const modifiedStates = useModifiedStates(styleId);
|
|
794
822
|
const isUpdateAllowed = !state || userCan(provider ?? "").updateProps;
|
|
795
|
-
const indicatorVariant = !provider || (0, import_editor_styles_repository3.isElementsStylesProvider)(provider) ? "local" : "global";
|
|
796
823
|
const isStyled = modifiedStates[state ?? "normal"] ?? false;
|
|
797
824
|
const disabled = !isUpdateAllowed && !isStyled;
|
|
798
825
|
const isActive = styleId === activeId;
|
|
@@ -818,7 +845,13 @@ function StateMenuItem({ state, closeMenu, ...props }) {
|
|
|
818
845
|
showInfoTip: disabled,
|
|
819
846
|
content: (0, import_i18n2.__)("With your current role, you can only use existing states.", "elementor")
|
|
820
847
|
},
|
|
821
|
-
/* @__PURE__ */ React6.createElement(import_ui4.Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React6.createElement(
|
|
848
|
+
/* @__PURE__ */ React6.createElement(import_ui4.Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React6.createElement(
|
|
849
|
+
StyleIndicator,
|
|
850
|
+
{
|
|
851
|
+
"aria-label": (0, import_i18n2.__)("Has style", "elementor"),
|
|
852
|
+
getColor: getStylesProviderThemeColor(provider ?? "")
|
|
853
|
+
}
|
|
854
|
+
), state ?? "normal")
|
|
822
855
|
)
|
|
823
856
|
);
|
|
824
857
|
}
|
|
@@ -839,7 +872,7 @@ function UnapplyClassMenuItem({ closeMenu, ...props }) {
|
|
|
839
872
|
}
|
|
840
873
|
function RenameClassMenuItem({ closeMenu }) {
|
|
841
874
|
const { handleRename, provider } = useCssClass();
|
|
842
|
-
const { userCan } = (0,
|
|
875
|
+
const { userCan } = (0, import_editor_styles_repository4.useUserStylesCapability)();
|
|
843
876
|
if (!provider) {
|
|
844
877
|
return null;
|
|
845
878
|
}
|
|
@@ -876,7 +909,7 @@ function CssClassItem(props) {
|
|
|
876
909
|
const popupState = (0, import_ui5.usePopupState)({ variant: "popover" });
|
|
877
910
|
const [chipRef, setChipRef] = (0, import_react9.useState)(null);
|
|
878
911
|
const { onDelete, ...chipGroupProps } = chipProps;
|
|
879
|
-
const { userCan } = (0,
|
|
912
|
+
const { userCan } = (0, import_editor_styles_repository5.useUserStylesCapability)();
|
|
880
913
|
const {
|
|
881
914
|
ref,
|
|
882
915
|
isEditing,
|
|
@@ -890,7 +923,7 @@ function CssClassItem(props) {
|
|
|
890
923
|
onError: setError
|
|
891
924
|
});
|
|
892
925
|
const color = error ? "error" : colorProp;
|
|
893
|
-
const providerActions = provider ?
|
|
926
|
+
const providerActions = provider ? import_editor_styles_repository5.stylesRepository.getProviderByKey(provider)?.actions : null;
|
|
894
927
|
const allowRename = Boolean(providerActions?.update) && userCan(provider ?? "")?.update;
|
|
895
928
|
const isShowingState = isActive && meta.state;
|
|
896
929
|
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(
|
|
@@ -957,7 +990,7 @@ function CssClassItem(props) {
|
|
|
957
990
|
), /* @__PURE__ */ React7.createElement(CssClassProvider, { ...classProps, handleRename: openEditMode }, /* @__PURE__ */ React7.createElement(CssClassMenu, { popupState, anchorEl: chipRef, fixed })));
|
|
958
991
|
}
|
|
959
992
|
var validateLabel = (newLabel) => {
|
|
960
|
-
const result = (0,
|
|
993
|
+
const result = (0, import_editor_styles_repository5.validateStyleLabel)(newLabel, "rename");
|
|
961
994
|
if (result.isValid) {
|
|
962
995
|
return null;
|
|
963
996
|
}
|
|
@@ -986,7 +1019,7 @@ function CssClassSelector() {
|
|
|
986
1019
|
const appliedOptions = useAppliedOptions(options12);
|
|
987
1020
|
const active = appliedOptions.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
988
1021
|
const showPlaceholder = appliedOptions.every(({ fixed }) => fixed);
|
|
989
|
-
const { userCan } = (0,
|
|
1022
|
+
const { userCan } = (0, import_editor_styles_repository6.useUserStylesCapability)();
|
|
990
1023
|
const canEdit = active.provider ? userCan(active.provider).updateProps : true;
|
|
991
1024
|
return /* @__PURE__ */ React8.createElement(import_ui6.Stack, { p: 2 }, /* @__PURE__ */ React8.createElement(import_ui6.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React8.createElement(import_ui6.FormLabel, { htmlFor: ID, size: "small" }, (0, import_i18n4.__)("Classes", "elementor")), /* @__PURE__ */ React8.createElement(import_ui6.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React8.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React8.createElement(
|
|
992
1025
|
import_editor_ui3.WarningInfotip,
|
|
@@ -1042,16 +1075,7 @@ function CssClassSelector() {
|
|
|
1042
1075
|
})
|
|
1043
1076
|
}
|
|
1044
1077
|
)
|
|
1045
|
-
), !canEdit && /* @__PURE__ */ React8.createElement(
|
|
1046
|
-
import_editor_ui3.InfoAlert,
|
|
1047
|
-
{
|
|
1048
|
-
content: (0, import_i18n4.__)(
|
|
1049
|
-
"With your current role, you can use existing classes but can\u2019t modify them.",
|
|
1050
|
-
"elementor"
|
|
1051
|
-
),
|
|
1052
|
-
sx: { mt: 1 }
|
|
1053
|
-
}
|
|
1054
|
-
));
|
|
1078
|
+
), !canEdit && /* @__PURE__ */ React8.createElement(import_editor_ui3.InfoAlert, { sx: { mt: 1 } }, (0, import_i18n4.__)("With your current role, you can use existing classes but can\u2019t modify them.", "elementor")));
|
|
1055
1079
|
}
|
|
1056
1080
|
var EmptyState = ({ searchValue, onClear }) => /* @__PURE__ */ React8.createElement(import_ui6.Box, { sx: { py: 4 } }, /* @__PURE__ */ React8.createElement(
|
|
1057
1081
|
import_ui6.Stack,
|
|
@@ -1071,7 +1095,7 @@ var updateClassByProvider = (provider, data) => {
|
|
|
1071
1095
|
if (!provider) {
|
|
1072
1096
|
return;
|
|
1073
1097
|
}
|
|
1074
|
-
const providerInstance =
|
|
1098
|
+
const providerInstance = import_editor_styles_repository6.stylesRepository.getProviderByKey(provider);
|
|
1075
1099
|
if (!providerInstance) {
|
|
1076
1100
|
return;
|
|
1077
1101
|
}
|
|
@@ -1080,8 +1104,8 @@ var updateClassByProvider = (provider, data) => {
|
|
|
1080
1104
|
function useOptions() {
|
|
1081
1105
|
const { element } = useElement();
|
|
1082
1106
|
const isProviderEditable = (provider) => !!provider.actions.updateProps;
|
|
1083
|
-
return (0,
|
|
1084
|
-
const isElements = (0,
|
|
1107
|
+
return (0, import_editor_styles_repository6.useProviders)().filter(isProviderEditable).flatMap((provider) => {
|
|
1108
|
+
const isElements = (0, import_editor_styles_repository6.isElementsStylesProvider)(provider.getKey());
|
|
1085
1109
|
const styleDefs = provider.actions.all({ elementId: element.id });
|
|
1086
1110
|
if (isElements && styleDefs.length === 0) {
|
|
1087
1111
|
return [EMPTY_OPTION];
|
|
@@ -1091,7 +1115,7 @@ function useOptions() {
|
|
|
1091
1115
|
label: styleDef.label,
|
|
1092
1116
|
value: styleDef.id,
|
|
1093
1117
|
fixed: isElements,
|
|
1094
|
-
color:
|
|
1118
|
+
color: getStylesProviderColorName(provider.getKey()),
|
|
1095
1119
|
icon: isElements ? /* @__PURE__ */ React8.createElement(import_icons2.MapPinIcon, null) : null,
|
|
1096
1120
|
provider: provider.getKey()
|
|
1097
1121
|
};
|
|
@@ -1116,7 +1140,7 @@ function useCreateAction() {
|
|
|
1116
1140
|
)
|
|
1117
1141
|
};
|
|
1118
1142
|
}
|
|
1119
|
-
return (0,
|
|
1143
|
+
return (0, import_editor_styles_repository6.validateStyleLabel)(newClassLabel, event);
|
|
1120
1144
|
};
|
|
1121
1145
|
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
1122
1146
|
return { create, validate, entityName };
|
|
@@ -1130,7 +1154,7 @@ function useAppliedOptions(options12) {
|
|
|
1130
1154
|
const appliedIds = (0, import_editor_elements2.useElementSetting)(element.id, currentClassesProp)?.value || [];
|
|
1131
1155
|
const appliedOptions = options12.filter((option) => option.value && appliedIds.includes(option.value));
|
|
1132
1156
|
const hasElementsProviderStyleApplied = appliedOptions.some(
|
|
1133
|
-
(option) => option.provider && (0,
|
|
1157
|
+
(option) => option.provider && (0, import_editor_styles_repository6.isElementsStylesProvider)(option.provider)
|
|
1134
1158
|
);
|
|
1135
1159
|
if (!hasElementsProviderStyleApplied) {
|
|
1136
1160
|
appliedOptions.unshift(EMPTY_OPTION);
|
|
@@ -1159,11 +1183,11 @@ function useHandleSelect() {
|
|
|
1159
1183
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
1160
1184
|
|
|
1161
1185
|
// src/components/editing-panel.tsx
|
|
1162
|
-
var
|
|
1163
|
-
var
|
|
1186
|
+
var React85 = __toESM(require("react"));
|
|
1187
|
+
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
1164
1188
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
1165
1189
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
1166
|
-
var
|
|
1190
|
+
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
1167
1191
|
var import_icons24 = require("@elementor/icons");
|
|
1168
1192
|
var import_session5 = require("@elementor/session");
|
|
1169
1193
|
var import_ui69 = require("@elementor/ui");
|
|
@@ -1186,14 +1210,13 @@ function Action({ title, visible = true, icon: Icon, onClick }) {
|
|
|
1186
1210
|
// src/popover-action.tsx
|
|
1187
1211
|
var React10 = __toESM(require("react"));
|
|
1188
1212
|
var import_react11 = require("react");
|
|
1189
|
-
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
1190
1213
|
var import_ui8 = require("@elementor/ui");
|
|
1191
1214
|
var SIZE2 = "tiny";
|
|
1192
1215
|
function PopoverAction({
|
|
1193
1216
|
title,
|
|
1194
1217
|
visible = true,
|
|
1195
1218
|
icon: Icon,
|
|
1196
|
-
|
|
1219
|
+
content: PopoverContent2
|
|
1197
1220
|
}) {
|
|
1198
1221
|
const id = (0, import_react11.useId)();
|
|
1199
1222
|
const popupState = (0, import_ui8.usePopupState)({
|
|
@@ -1214,8 +1237,7 @@ function PopoverAction({
|
|
|
1214
1237
|
},
|
|
1215
1238
|
...(0, import_ui8.bindPopover)(popupState)
|
|
1216
1239
|
},
|
|
1217
|
-
/* @__PURE__ */ React10.createElement(
|
|
1218
|
-
/* @__PURE__ */ React10.createElement(PopoverContent2, { closePopover: popupState.close })
|
|
1240
|
+
/* @__PURE__ */ React10.createElement(PopoverContent2, { close: popupState.close })
|
|
1219
1241
|
));
|
|
1220
1242
|
}
|
|
1221
1243
|
|
|
@@ -1235,8 +1257,8 @@ function EditorPanelErrorFallback() {
|
|
|
1235
1257
|
}
|
|
1236
1258
|
|
|
1237
1259
|
// src/components/editing-panel-tabs.tsx
|
|
1238
|
-
var
|
|
1239
|
-
var
|
|
1260
|
+
var React84 = __toESM(require("react"));
|
|
1261
|
+
var import_react37 = require("react");
|
|
1240
1262
|
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
1241
1263
|
var import_ui68 = require("@elementor/ui");
|
|
1242
1264
|
var import_i18n54 = require("@wordpress/i18n");
|
|
@@ -1334,19 +1356,23 @@ var React13 = __toESM(require("react"));
|
|
|
1334
1356
|
|
|
1335
1357
|
// src/controls-registry/controls-registry.tsx
|
|
1336
1358
|
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
1359
|
+
var import_editor_props2 = require("@elementor/editor-props");
|
|
1337
1360
|
var controlTypes = {
|
|
1338
|
-
image: { component: import_editor_controls2.ImageControl, layout: "full" },
|
|
1339
|
-
"svg-media": { component: import_editor_controls2.SvgMediaControl, layout: "full" },
|
|
1340
|
-
text: { component: import_editor_controls2.TextControl, layout: "full" },
|
|
1341
|
-
textarea: { component: import_editor_controls2.TextAreaControl, layout: "full" },
|
|
1342
|
-
size: { component: import_editor_controls2.SizeControl, layout: "two-columns" },
|
|
1343
|
-
select: { component: import_editor_controls2.SelectControl, layout: "two-columns" },
|
|
1344
|
-
link: { component: import_editor_controls2.LinkControl, layout: "full" },
|
|
1345
|
-
url: { component: import_editor_controls2.UrlControl, layout: "full" },
|
|
1346
|
-
switch: { component: import_editor_controls2.SwitchControl, layout: "two-columns" }
|
|
1361
|
+
image: { component: import_editor_controls2.ImageControl, layout: "full", propTypeUtil: import_editor_props2.imagePropTypeUtil },
|
|
1362
|
+
"svg-media": { component: import_editor_controls2.SvgMediaControl, layout: "full", propTypeUtil: import_editor_props2.imageSrcPropTypeUtil },
|
|
1363
|
+
text: { component: import_editor_controls2.TextControl, layout: "full", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1364
|
+
textarea: { component: import_editor_controls2.TextAreaControl, layout: "full", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1365
|
+
size: { component: import_editor_controls2.SizeControl, layout: "two-columns", propTypeUtil: import_editor_props2.sizePropTypeUtil },
|
|
1366
|
+
select: { component: import_editor_controls2.SelectControl, layout: "two-columns", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1367
|
+
link: { component: import_editor_controls2.LinkControl, layout: "full", propTypeUtil: import_editor_props2.linkPropTypeUtil },
|
|
1368
|
+
url: { component: import_editor_controls2.UrlControl, layout: "full", propTypeUtil: import_editor_props2.stringPropTypeUtil },
|
|
1369
|
+
switch: { component: import_editor_controls2.SwitchControl, layout: "two-columns", propTypeUtil: import_editor_props2.booleanPropTypeUtil },
|
|
1370
|
+
repeatable: { component: import_editor_controls2.RepeatableControl, layout: "full", propTypeUtil: void 0 },
|
|
1371
|
+
"key-value": { component: import_editor_controls2.KeyValueControl, layout: "full", propTypeUtil: import_editor_props2.keyValuePropTypeUtil }
|
|
1347
1372
|
};
|
|
1348
1373
|
var getControl = (type) => controlTypes[type]?.component;
|
|
1349
1374
|
var getDefaultLayout = (type) => controlTypes[type].layout;
|
|
1375
|
+
var getPropTypeUtil = (type) => controlTypes[type]?.propTypeUtil;
|
|
1350
1376
|
|
|
1351
1377
|
// src/controls-registry/control.tsx
|
|
1352
1378
|
var Control = ({ props, type }) => {
|
|
@@ -1543,13 +1569,29 @@ var Control2 = ({ control }) => {
|
|
|
1543
1569
|
return null;
|
|
1544
1570
|
}
|
|
1545
1571
|
const layout = control.meta?.layout || getDefaultLayout(control.type);
|
|
1546
|
-
|
|
1547
|
-
};
|
|
1572
|
+
const controlProps = populateChildControlProps(control.props);
|
|
1573
|
+
return /* @__PURE__ */ React19.createElement(SettingsField, { bind: control.bind }, control.meta?.topDivider && /* @__PURE__ */ React19.createElement(import_ui16.Divider, null), /* @__PURE__ */ React19.createElement(ControlTypeContainer, { layout }, control.label ? /* @__PURE__ */ React19.createElement(import_editor_controls4.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React19.createElement(Control, { type: control.type, props: controlProps })));
|
|
1574
|
+
};
|
|
1575
|
+
function populateChildControlProps(props) {
|
|
1576
|
+
if (props.childControlType) {
|
|
1577
|
+
const childComponent = getControl(props.childControlType);
|
|
1578
|
+
const childPropType = getPropTypeUtil(props.childControlType);
|
|
1579
|
+
props = {
|
|
1580
|
+
...props,
|
|
1581
|
+
childControlConfig: {
|
|
1582
|
+
component: childComponent,
|
|
1583
|
+
props: props.childControlProps || {},
|
|
1584
|
+
propTypeUtil: childPropType
|
|
1585
|
+
}
|
|
1586
|
+
};
|
|
1587
|
+
}
|
|
1588
|
+
return props;
|
|
1589
|
+
}
|
|
1548
1590
|
|
|
1549
1591
|
// src/components/style-tab.tsx
|
|
1550
|
-
var
|
|
1551
|
-
var
|
|
1552
|
-
var
|
|
1592
|
+
var React83 = __toESM(require("react"));
|
|
1593
|
+
var import_react36 = require("react");
|
|
1594
|
+
var import_editor_props10 = require("@elementor/editor-props");
|
|
1553
1595
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
1554
1596
|
var import_session4 = require("@elementor/session");
|
|
1555
1597
|
var import_ui67 = require("@elementor/ui");
|
|
@@ -1559,10 +1601,10 @@ var import_i18n53 = require("@wordpress/i18n");
|
|
|
1559
1601
|
var React20 = __toESM(require("react"));
|
|
1560
1602
|
var import_react18 = require("react");
|
|
1561
1603
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
1562
|
-
var
|
|
1604
|
+
var import_editor_props5 = require("@elementor/editor-props");
|
|
1563
1605
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
1564
1606
|
var import_editor_styles = require("@elementor/editor-styles");
|
|
1565
|
-
var
|
|
1607
|
+
var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
|
|
1566
1608
|
|
|
1567
1609
|
// src/hooks/use-styles-rerender.ts
|
|
1568
1610
|
var import_react17 = require("react");
|
|
@@ -1573,16 +1615,24 @@ var useStylesRerender = () => {
|
|
|
1573
1615
|
};
|
|
1574
1616
|
|
|
1575
1617
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
1576
|
-
var
|
|
1618
|
+
var import_editor_props4 = require("@elementor/editor-props");
|
|
1577
1619
|
|
|
1578
1620
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
1579
|
-
var
|
|
1621
|
+
var import_editor_props3 = require("@elementor/editor-props");
|
|
1580
1622
|
|
|
1581
1623
|
// src/styles-inheritance/utils.ts
|
|
1582
1624
|
var DEFAULT_STATE = "normal";
|
|
1583
1625
|
var DEFAULT_BREAKPOINT = "desktop";
|
|
1584
1626
|
var getStateKey = (state) => state ?? DEFAULT_STATE;
|
|
1585
1627
|
var getBreakpointKey = (breakpoint) => breakpoint ?? DEFAULT_BREAKPOINT;
|
|
1628
|
+
var getValueFromInheritanceChain = (inheritanceChain, styleId, meta) => inheritanceChain.find(
|
|
1629
|
+
({
|
|
1630
|
+
style,
|
|
1631
|
+
variant: {
|
|
1632
|
+
meta: { breakpoint, state }
|
|
1633
|
+
}
|
|
1634
|
+
}) => style.id === styleId && breakpoint === meta.breakpoint && state === meta.state
|
|
1635
|
+
);
|
|
1586
1636
|
|
|
1587
1637
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
1588
1638
|
function createSnapshotsManager(getStylesByMeta, breakpointsRoot) {
|
|
@@ -1668,7 +1718,7 @@ function buildInitialSnapshotFromStyles(styles) {
|
|
|
1668
1718
|
variant: { props }
|
|
1669
1719
|
} = styleData;
|
|
1670
1720
|
Object.entries(props).forEach(([key, value]) => {
|
|
1671
|
-
const filteredValue = (0,
|
|
1721
|
+
const filteredValue = (0, import_editor_props3.filterEmptyValues)(value);
|
|
1672
1722
|
if (filteredValue === null) {
|
|
1673
1723
|
return;
|
|
1674
1724
|
}
|
|
@@ -1714,7 +1764,7 @@ function createStylesInheritance(styleDefs, breakpointsRoot) {
|
|
|
1714
1764
|
inheritanceChain = inheritanceChain.map(({ value: styleValue, ...rest }) => ({
|
|
1715
1765
|
...rest,
|
|
1716
1766
|
value: getValueByPath(styleValue, nextFields, filterPropType)
|
|
1717
|
-
})).filter(({ value: styleValue }) => !(0,
|
|
1767
|
+
})).filter(({ value: styleValue }) => !(0, import_editor_props4.isEmpty)(styleValue));
|
|
1718
1768
|
}
|
|
1719
1769
|
return inheritanceChain;
|
|
1720
1770
|
}
|
|
@@ -1756,7 +1806,7 @@ function getValueByPath(value, path, filterPropType) {
|
|
|
1756
1806
|
if (!currentScope) {
|
|
1757
1807
|
return null;
|
|
1758
1808
|
}
|
|
1759
|
-
if ((0,
|
|
1809
|
+
if ((0, import_editor_props4.isTransformable)(currentScope)) {
|
|
1760
1810
|
return currentScope.value?.[key] ?? null;
|
|
1761
1811
|
}
|
|
1762
1812
|
if (typeof currentScope === "object") {
|
|
@@ -1766,7 +1816,7 @@ function getValueByPath(value, path, filterPropType) {
|
|
|
1766
1816
|
}, value);
|
|
1767
1817
|
}
|
|
1768
1818
|
function shouldUseOriginalValue(filterPropType, value) {
|
|
1769
|
-
return !!filterPropType && (0,
|
|
1819
|
+
return !!filterPropType && (0, import_editor_props4.isTransformable)(value) && filterPropType.key !== value.$$type;
|
|
1770
1820
|
}
|
|
1771
1821
|
var getFilterPropType = (propType, path) => {
|
|
1772
1822
|
if (!propType || propType.kind !== "union") {
|
|
@@ -1824,8 +1874,8 @@ var useAppliedStyles = () => {
|
|
|
1824
1874
|
const baseStyles = useBaseStyles();
|
|
1825
1875
|
useStylesRerender();
|
|
1826
1876
|
const classesProp = (0, import_editor_elements4.useElementSetting)(element.id, currentClassesProp);
|
|
1827
|
-
const appliedStyles =
|
|
1828
|
-
return
|
|
1877
|
+
const appliedStyles = import_editor_props5.classesPropTypeUtil.extract(classesProp) ?? [];
|
|
1878
|
+
return import_editor_styles_repository7.stylesRepository.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
1829
1879
|
};
|
|
1830
1880
|
var useBaseStyles = () => {
|
|
1831
1881
|
const { elementType } = useElement();
|
|
@@ -1873,24 +1923,24 @@ var import_editor_styles3 = require("@elementor/editor-styles");
|
|
|
1873
1923
|
var import_react19 = require("react");
|
|
1874
1924
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
1875
1925
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1876
|
-
var
|
|
1926
|
+
var import_editor_styles_repository8 = require("@elementor/editor-styles-repository");
|
|
1877
1927
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
1878
1928
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1879
1929
|
function useStylesFields(propNames) {
|
|
1880
1930
|
const { element } = useElement();
|
|
1881
|
-
const { id, meta, provider } = useStyle();
|
|
1931
|
+
const { id, meta, provider, canEdit } = useStyle();
|
|
1882
1932
|
const classesProp = useClassesProp();
|
|
1883
1933
|
const undoableUpdateStyle = useUndoableUpdateStyle();
|
|
1884
1934
|
const undoableCreateElementStyle = useUndoableCreateElementStyle();
|
|
1885
1935
|
useStylesRerender();
|
|
1886
|
-
const
|
|
1936
|
+
const values = getProps({
|
|
1887
1937
|
elementId: element.id,
|
|
1888
1938
|
styleId: id,
|
|
1889
1939
|
provider,
|
|
1890
1940
|
meta,
|
|
1891
1941
|
propNames
|
|
1892
1942
|
});
|
|
1893
|
-
const
|
|
1943
|
+
const setValues = (props) => {
|
|
1894
1944
|
if (id === null) {
|
|
1895
1945
|
undoableCreateElementStyle({
|
|
1896
1946
|
elementId: element.id,
|
|
@@ -1908,7 +1958,7 @@ function useStylesFields(propNames) {
|
|
|
1908
1958
|
props
|
|
1909
1959
|
});
|
|
1910
1960
|
};
|
|
1911
|
-
return
|
|
1961
|
+
return { values, setValues, canEdit };
|
|
1912
1962
|
}
|
|
1913
1963
|
function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
1914
1964
|
if (!provider || !styleId) {
|
|
@@ -1930,7 +1980,7 @@ function useUndoableCreateElementStyle() {
|
|
|
1930
1980
|
do: (payload) => {
|
|
1931
1981
|
return (0, import_editor_elements6.createElementStyle)({
|
|
1932
1982
|
...payload,
|
|
1933
|
-
label:
|
|
1983
|
+
label: import_editor_styles_repository8.ELEMENTS_STYLES_RESERVED_LABEL
|
|
1934
1984
|
});
|
|
1935
1985
|
},
|
|
1936
1986
|
undo: ({ elementId }, styleId) => {
|
|
@@ -1940,7 +1990,7 @@ function useUndoableCreateElementStyle() {
|
|
|
1940
1990
|
return (0, import_editor_elements6.createElementStyle)({
|
|
1941
1991
|
...payload,
|
|
1942
1992
|
styleId,
|
|
1943
|
-
label:
|
|
1993
|
+
label: import_editor_styles_repository8.ELEMENTS_STYLES_RESERVED_LABEL
|
|
1944
1994
|
});
|
|
1945
1995
|
}
|
|
1946
1996
|
},
|
|
@@ -1995,21 +2045,21 @@ function getCurrentProps(style, meta) {
|
|
|
1995
2045
|
|
|
1996
2046
|
// src/hooks/use-styles-field.ts
|
|
1997
2047
|
function useStylesField(propName) {
|
|
1998
|
-
const
|
|
2048
|
+
const { values, setValues, canEdit } = useStylesFields([propName]);
|
|
1999
2049
|
const value = values?.[propName] ?? null;
|
|
2000
2050
|
const setValue = (newValue) => {
|
|
2001
2051
|
setValues({
|
|
2002
2052
|
[propName]: newValue
|
|
2003
2053
|
});
|
|
2004
2054
|
};
|
|
2005
|
-
return
|
|
2055
|
+
return { value, setValue, canEdit };
|
|
2006
2056
|
}
|
|
2007
2057
|
|
|
2008
2058
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2009
2059
|
var React27 = __toESM(require("react"));
|
|
2010
2060
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
2011
|
-
var
|
|
2012
|
-
var
|
|
2061
|
+
var import_editor_props6 = require("@elementor/editor-props");
|
|
2062
|
+
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
2013
2063
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
2014
2064
|
var import_ui24 = require("@elementor/ui");
|
|
2015
2065
|
var import_i18n10 = require("@wordpress/i18n");
|
|
@@ -2070,7 +2120,7 @@ function useDirection() {
|
|
|
2070
2120
|
|
|
2071
2121
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
2072
2122
|
var import_react21 = require("react");
|
|
2073
|
-
var
|
|
2123
|
+
var import_editor_styles_repository9 = require("@elementor/editor-styles-repository");
|
|
2074
2124
|
var import_i18n7 = require("@wordpress/i18n");
|
|
2075
2125
|
var MAXIMUM_ITEMS = 2;
|
|
2076
2126
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
@@ -2082,7 +2132,7 @@ var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
|
2082
2132
|
);
|
|
2083
2133
|
const validItems = normalizedItems.map((item) => ({
|
|
2084
2134
|
...item,
|
|
2085
|
-
displayLabel:
|
|
2135
|
+
displayLabel: import_editor_styles_repository9.ELEMENTS_BASE_STYLES_PROVIDER_KEY !== item.provider ? item.displayLabel : (0, import_i18n7.__)("Base", "elementor")
|
|
2086
2136
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
2087
2137
|
setItems(validItems);
|
|
2088
2138
|
})();
|
|
@@ -2103,8 +2153,7 @@ var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
|
2103
2153
|
provider: item.provider || "",
|
|
2104
2154
|
breakpoint: breakpoint ?? DEFAULT_BREAKPOINT2,
|
|
2105
2155
|
displayLabel,
|
|
2106
|
-
value: await getTransformedValue(item, bind, resolve)
|
|
2107
|
-
chipColor: getChipColor(item)
|
|
2156
|
+
value: await getTransformedValue(item, bind, resolve)
|
|
2108
2157
|
};
|
|
2109
2158
|
};
|
|
2110
2159
|
var getTransformedValue = async (item, bind, resolve) => {
|
|
@@ -2126,16 +2175,6 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
2126
2175
|
return "";
|
|
2127
2176
|
}
|
|
2128
2177
|
};
|
|
2129
|
-
var getChipColor = (item) => {
|
|
2130
|
-
const { provider = "", style } = item;
|
|
2131
|
-
if (provider === import_editor_styles_repository8.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
2132
|
-
return "default";
|
|
2133
|
-
}
|
|
2134
|
-
if (style?.label === "local") {
|
|
2135
|
-
return "accent";
|
|
2136
|
-
}
|
|
2137
|
-
return "global";
|
|
2138
|
-
};
|
|
2139
2178
|
|
|
2140
2179
|
// src/styles-inheritance/styles-inheritance-transformers-registry.tsx
|
|
2141
2180
|
var import_editor_canvas = require("@elementor/editor-canvas");
|
|
@@ -2170,20 +2209,20 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
2170
2209
|
|
|
2171
2210
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
2172
2211
|
var React23 = __toESM(require("react"));
|
|
2173
|
-
var
|
|
2212
|
+
var import_editor_styles_repository10 = require("@elementor/editor-styles-repository");
|
|
2174
2213
|
var import_icons5 = require("@elementor/icons");
|
|
2175
2214
|
var import_ui20 = require("@elementor/ui");
|
|
2176
2215
|
var import_i18n8 = require("@wordpress/i18n");
|
|
2177
2216
|
var SIZE4 = "tiny";
|
|
2178
|
-
var LabelChip = ({ displayLabel, provider
|
|
2179
|
-
const isBaseStyle = provider ===
|
|
2217
|
+
var LabelChip = ({ displayLabel, provider }) => {
|
|
2218
|
+
const isBaseStyle = provider === import_editor_styles_repository10.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
2180
2219
|
const chipIcon = isBaseStyle ? /* @__PURE__ */ React23.createElement(import_ui20.Tooltip, { title: (0, import_i18n8.__)("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React23.createElement(import_icons5.InfoCircleIcon, { fontSize: SIZE4 })) : void 0;
|
|
2181
2220
|
return /* @__PURE__ */ React23.createElement(
|
|
2182
2221
|
import_ui20.Chip,
|
|
2183
2222
|
{
|
|
2184
2223
|
label: displayLabel,
|
|
2185
2224
|
size: SIZE4,
|
|
2186
|
-
color:
|
|
2225
|
+
color: getStylesProviderColorName(provider),
|
|
2187
2226
|
variant: "standard",
|
|
2188
2227
|
state: "enabled",
|
|
2189
2228
|
icon: chipIcon,
|
|
@@ -2296,14 +2335,7 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2296
2335
|
item.displayLabel
|
|
2297
2336
|
)
|
|
2298
2337
|
},
|
|
2299
|
-
/* @__PURE__ */ React26.createElement(import_ui23.Box, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React26.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React26.createElement(
|
|
2300
|
-
LabelChip,
|
|
2301
|
-
{
|
|
2302
|
-
displayLabel: item.displayLabel,
|
|
2303
|
-
provider: item.provider,
|
|
2304
|
-
chipColor: item.chipColor
|
|
2305
|
-
}
|
|
2306
|
-
), /* @__PURE__ */ React26.createElement(ValueComponent, { index, value: item.value })),
|
|
2338
|
+
/* @__PURE__ */ React26.createElement(import_ui23.Box, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React26.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React26.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }), /* @__PURE__ */ React26.createElement(ValueComponent, { index, value: item.value })),
|
|
2307
2339
|
/* @__PURE__ */ React26.createElement(ActionIcons, null)
|
|
2308
2340
|
);
|
|
2309
2341
|
})
|
|
@@ -2364,41 +2396,40 @@ function TooltipOrInfotip({
|
|
|
2364
2396
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2365
2397
|
var StylesInheritanceIndicator = () => {
|
|
2366
2398
|
const { path, propType } = (0, import_editor_controls5.useBoundProp)();
|
|
2367
|
-
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2368
2399
|
const isUsingNestedProps = (0, import_editor_v1_adapters7.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
2369
2400
|
const finalPath = isUsingNestedProps ? path : path.slice(0, 1);
|
|
2370
2401
|
const inheritanceChain = useStylesInheritanceChain(finalPath);
|
|
2371
2402
|
if (!inheritanceChain.length) {
|
|
2372
2403
|
return null;
|
|
2373
2404
|
}
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
}) => style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state
|
|
2381
|
-
);
|
|
2382
|
-
const hasValue = !(0, import_editor_props5.isEmpty)(currentItem?.value);
|
|
2405
|
+
return /* @__PURE__ */ React27.createElement(Indicator, { inheritanceChain, path: finalPath, propType });
|
|
2406
|
+
};
|
|
2407
|
+
var Indicator = ({ inheritanceChain, path, propType }) => {
|
|
2408
|
+
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2409
|
+
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
2410
|
+
const hasValue = !(0, import_editor_props6.isEmpty)(currentItem?.value);
|
|
2383
2411
|
const [actualStyle] = inheritanceChain;
|
|
2384
|
-
if (actualStyle.provider ===
|
|
2412
|
+
if (actualStyle.provider === import_editor_styles_repository11.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
2385
2413
|
return null;
|
|
2386
2414
|
}
|
|
2387
2415
|
const isFinalValue = currentItem === actualStyle;
|
|
2388
2416
|
const label = getLabel({ isFinalValue, hasValue });
|
|
2389
|
-
const
|
|
2417
|
+
const styleIndicatorProps = {
|
|
2418
|
+
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
2419
|
+
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
2420
|
+
};
|
|
2390
2421
|
if (!isUsingIndicatorPopover()) {
|
|
2391
|
-
return /* @__PURE__ */ React27.createElement(import_ui24.Tooltip, { title: (0, import_i18n10.__)("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React27.createElement(StyleIndicator, {
|
|
2422
|
+
return /* @__PURE__ */ React27.createElement(import_ui24.Tooltip, { title: (0, import_i18n10.__)("Style origin", "elementor"), placement: "top" }, /* @__PURE__ */ React27.createElement(StyleIndicator, { ...styleIndicatorProps, "aria-label": label }));
|
|
2392
2423
|
}
|
|
2393
2424
|
return /* @__PURE__ */ React27.createElement(
|
|
2394
2425
|
StylesInheritanceInfotip,
|
|
2395
2426
|
{
|
|
2396
2427
|
inheritanceChain,
|
|
2397
|
-
path
|
|
2428
|
+
path,
|
|
2398
2429
|
propType,
|
|
2399
2430
|
label
|
|
2400
2431
|
},
|
|
2401
|
-
/* @__PURE__ */ React27.createElement(StyleIndicator, {
|
|
2432
|
+
/* @__PURE__ */ React27.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
2402
2433
|
);
|
|
2403
2434
|
};
|
|
2404
2435
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
@@ -2410,24 +2441,10 @@ var getLabel = ({ isFinalValue, hasValue }) => {
|
|
|
2410
2441
|
}
|
|
2411
2442
|
return (0, import_i18n10.__)("This has value from another style", "elementor");
|
|
2412
2443
|
};
|
|
2413
|
-
var getVariant = ({
|
|
2414
|
-
isFinalValue,
|
|
2415
|
-
hasValue,
|
|
2416
|
-
currentStyleProvider
|
|
2417
|
-
}) => {
|
|
2418
|
-
if (isFinalValue) {
|
|
2419
|
-
return (0, import_editor_styles_repository10.isElementsStylesProvider)(currentStyleProvider?.getKey?.()) ? "local" : "global";
|
|
2420
|
-
}
|
|
2421
|
-
if (hasValue) {
|
|
2422
|
-
return "overridden";
|
|
2423
|
-
}
|
|
2424
|
-
return void 0;
|
|
2425
|
-
};
|
|
2426
2444
|
|
|
2427
2445
|
// src/controls-registry/styles-field.tsx
|
|
2428
2446
|
var StylesField = ({ bind, placeholder, children }) => {
|
|
2429
|
-
const
|
|
2430
|
-
const { canEdit } = useStyle();
|
|
2447
|
+
const { value, setValue, canEdit } = useStylesField(bind);
|
|
2431
2448
|
const stylesSchema = (0, import_editor_styles3.getStylesSchema)();
|
|
2432
2449
|
const propType = createTopLevelOjectType({ schema: stylesSchema });
|
|
2433
2450
|
const values = { [bind]: value };
|
|
@@ -2547,7 +2564,7 @@ var BorderStyleField = () => {
|
|
|
2547
2564
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
2548
2565
|
var React35 = __toESM(require("react"));
|
|
2549
2566
|
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
2550
|
-
var
|
|
2567
|
+
var import_editor_props7 = require("@elementor/editor-props");
|
|
2551
2568
|
var import_icons7 = require("@elementor/icons");
|
|
2552
2569
|
var import_ui30 = require("@elementor/ui");
|
|
2553
2570
|
var import_i18n13 = require("@wordpress/i18n");
|
|
@@ -2584,7 +2601,7 @@ var BorderWidthField = () => {
|
|
|
2584
2601
|
label: (0, import_i18n13.__)("Border width", "elementor"),
|
|
2585
2602
|
icon: /* @__PURE__ */ React35.createElement(import_icons7.SideAllIcon, { fontSize: "tiny" }),
|
|
2586
2603
|
tooltipLabel: (0, import_i18n13.__)("Adjust borders", "elementor"),
|
|
2587
|
-
multiSizePropTypeUtil:
|
|
2604
|
+
multiSizePropTypeUtil: import_editor_props7.borderWidthPropTypeUtil
|
|
2588
2605
|
}
|
|
2589
2606
|
));
|
|
2590
2607
|
};
|
|
@@ -2596,19 +2613,18 @@ var initialBorder = {
|
|
|
2596
2613
|
"border-style": { $$type: "string", value: "solid" }
|
|
2597
2614
|
};
|
|
2598
2615
|
var BorderField = () => {
|
|
2599
|
-
const { canEdit } =
|
|
2600
|
-
const [border, setBorder] = useStylesFields(Object.keys(initialBorder));
|
|
2616
|
+
const { values, setValues, canEdit } = useStylesFields(Object.keys(initialBorder));
|
|
2601
2617
|
const addBorder = () => {
|
|
2602
|
-
|
|
2618
|
+
setValues(initialBorder);
|
|
2603
2619
|
};
|
|
2604
2620
|
const removeBorder = () => {
|
|
2605
|
-
|
|
2621
|
+
setValues({
|
|
2606
2622
|
"border-width": null,
|
|
2607
2623
|
"border-color": null,
|
|
2608
2624
|
"border-style": null
|
|
2609
2625
|
});
|
|
2610
2626
|
};
|
|
2611
|
-
const hasBorder = Object.values(
|
|
2627
|
+
const hasBorder = Object.values(values ?? {}).some(Boolean);
|
|
2612
2628
|
return /* @__PURE__ */ React36.createElement(
|
|
2613
2629
|
AddOrRemoveContent,
|
|
2614
2630
|
{
|
|
@@ -2627,7 +2643,7 @@ var BorderField = () => {
|
|
|
2627
2643
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2628
2644
|
var React38 = __toESM(require("react"));
|
|
2629
2645
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
2630
|
-
var
|
|
2646
|
+
var import_editor_props8 = require("@elementor/editor-props");
|
|
2631
2647
|
var import_icons8 = require("@elementor/icons");
|
|
2632
2648
|
var import_ui32 = require("@elementor/ui");
|
|
2633
2649
|
var import_i18n15 = require("@wordpress/i18n");
|
|
@@ -2680,7 +2696,7 @@ var BorderRadiusField = () => {
|
|
|
2680
2696
|
label: (0, import_i18n15.__)("Border radius", "elementor"),
|
|
2681
2697
|
icon: /* @__PURE__ */ React38.createElement(import_icons8.BorderCornersIcon, { fontSize: "tiny" }),
|
|
2682
2698
|
tooltipLabel: (0, import_i18n15.__)("Adjust corners", "elementor"),
|
|
2683
|
-
multiSizePropTypeUtil:
|
|
2699
|
+
multiSizePropTypeUtil: import_editor_props8.borderRadiusPropTypeUtil
|
|
2684
2700
|
}
|
|
2685
2701
|
)));
|
|
2686
2702
|
};
|
|
@@ -2689,17 +2705,30 @@ var BorderRadiusField = () => {
|
|
|
2689
2705
|
var BorderSection = () => /* @__PURE__ */ React39.createElement(SectionContent, null, /* @__PURE__ */ React39.createElement(BorderRadiusField, null), /* @__PURE__ */ React39.createElement(PanelDivider, null), /* @__PURE__ */ React39.createElement(BorderField, null));
|
|
2690
2706
|
|
|
2691
2707
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2708
|
+
var React41 = __toESM(require("react"));
|
|
2709
|
+
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
2710
|
+
|
|
2711
|
+
// src/components/style-sections/layout-section/opacity-control-field.tsx
|
|
2692
2712
|
var React40 = __toESM(require("react"));
|
|
2713
|
+
var import_react23 = require("react");
|
|
2693
2714
|
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
2715
|
+
var import_ui33 = require("@elementor/ui");
|
|
2716
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
2717
|
+
var OpacityControlField = () => {
|
|
2718
|
+
const rowRef = (0, import_react23.useRef)();
|
|
2719
|
+
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "opacity" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, (0, import_i18n16.__)("Opacity", "elementor"))), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(import_editor_controls14.SizeControl, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" }))));
|
|
2720
|
+
};
|
|
2721
|
+
|
|
2722
|
+
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2694
2723
|
var EffectsSection = () => {
|
|
2695
|
-
return /* @__PURE__ */
|
|
2724
|
+
return /* @__PURE__ */ React41.createElement(SectionContent, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "opacity" }, /* @__PURE__ */ React41.createElement(OpacityControlField, null)), /* @__PURE__ */ React41.createElement(PanelDivider, null), /* @__PURE__ */ React41.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React41.createElement(import_editor_controls15.BoxShadowRepeaterControl, null)));
|
|
2696
2725
|
};
|
|
2697
2726
|
|
|
2698
2727
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
2699
|
-
var
|
|
2700
|
-
var
|
|
2728
|
+
var React53 = __toESM(require("react"));
|
|
2729
|
+
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
2701
2730
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
2702
|
-
var
|
|
2731
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
2703
2732
|
|
|
2704
2733
|
// src/hooks/use-computed-style.ts
|
|
2705
2734
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
@@ -2727,16 +2756,16 @@ function useComputedStyle(elementId) {
|
|
|
2727
2756
|
}
|
|
2728
2757
|
|
|
2729
2758
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2730
|
-
var
|
|
2731
|
-
var
|
|
2759
|
+
var React43 = __toESM(require("react"));
|
|
2760
|
+
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
2732
2761
|
var import_icons9 = require("@elementor/icons");
|
|
2733
|
-
var
|
|
2734
|
-
var
|
|
2762
|
+
var import_ui35 = require("@elementor/ui");
|
|
2763
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
2735
2764
|
|
|
2736
2765
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2737
|
-
var
|
|
2738
|
-
var
|
|
2739
|
-
var
|
|
2766
|
+
var React42 = __toESM(require("react"));
|
|
2767
|
+
var import_react24 = require("react");
|
|
2768
|
+
var import_ui34 = require("@elementor/ui");
|
|
2740
2769
|
var CLOCKWISE_ANGLES = {
|
|
2741
2770
|
row: 0,
|
|
2742
2771
|
column: 90,
|
|
@@ -2756,13 +2785,13 @@ var RotatedIcon = ({
|
|
|
2756
2785
|
offset = 0,
|
|
2757
2786
|
disableRotationForReversed = false
|
|
2758
2787
|
}) => {
|
|
2759
|
-
const rotate = (0,
|
|
2788
|
+
const rotate = (0, import_react24.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2760
2789
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2761
|
-
return /* @__PURE__ */
|
|
2790
|
+
return /* @__PURE__ */ React42.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2762
2791
|
};
|
|
2763
2792
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
2764
|
-
const
|
|
2765
|
-
const isRtl = "rtl" === (0,
|
|
2793
|
+
const { value: direction } = useStylesField("flex-direction");
|
|
2794
|
+
const isRtl = "rtl" === (0, import_ui34.useTheme)().direction;
|
|
2766
2795
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
2767
2796
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
2768
2797
|
const currentDirection = direction?.value || "row";
|
|
@@ -2777,8 +2806,8 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
2777
2806
|
};
|
|
2778
2807
|
|
|
2779
2808
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2780
|
-
var StartIcon = (0,
|
|
2781
|
-
var EndIcon = (0,
|
|
2809
|
+
var StartIcon = (0, import_ui35.withDirection)(import_icons9.JustifyTopIcon);
|
|
2810
|
+
var EndIcon = (0, import_ui35.withDirection)(import_icons9.JustifyBottomIcon);
|
|
2782
2811
|
var iconProps = {
|
|
2783
2812
|
isClockwise: false,
|
|
2784
2813
|
offset: 0,
|
|
@@ -2787,53 +2816,53 @@ var iconProps = {
|
|
|
2787
2816
|
var options = [
|
|
2788
2817
|
{
|
|
2789
2818
|
value: "start",
|
|
2790
|
-
label: (0,
|
|
2791
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2819
|
+
label: (0, import_i18n17.__)("Start", "elementor"),
|
|
2820
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
2792
2821
|
showTooltip: true
|
|
2793
2822
|
},
|
|
2794
2823
|
{
|
|
2795
2824
|
value: "center",
|
|
2796
|
-
label: (0,
|
|
2797
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2825
|
+
label: (0, import_i18n17.__)("Center", "elementor"),
|
|
2826
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons9.JustifyCenterIcon, size, ...iconProps }),
|
|
2798
2827
|
showTooltip: true
|
|
2799
2828
|
},
|
|
2800
2829
|
{
|
|
2801
2830
|
value: "end",
|
|
2802
|
-
label: (0,
|
|
2803
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2831
|
+
label: (0, import_i18n17.__)("End", "elementor"),
|
|
2832
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
2804
2833
|
showTooltip: true
|
|
2805
2834
|
},
|
|
2806
2835
|
{
|
|
2807
2836
|
value: "space-between",
|
|
2808
|
-
label: (0,
|
|
2809
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2837
|
+
label: (0, import_i18n17.__)("Space between", "elementor"),
|
|
2838
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons9.JustifySpaceBetweenVerticalIcon, size, ...iconProps }),
|
|
2810
2839
|
showTooltip: true
|
|
2811
2840
|
},
|
|
2812
2841
|
{
|
|
2813
2842
|
value: "space-around",
|
|
2814
|
-
label: (0,
|
|
2815
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2843
|
+
label: (0, import_i18n17.__)("Space around", "elementor"),
|
|
2844
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons9.JustifySpaceAroundVerticalIcon, size, ...iconProps }),
|
|
2816
2845
|
showTooltip: true
|
|
2817
2846
|
},
|
|
2818
2847
|
{
|
|
2819
2848
|
value: "space-evenly",
|
|
2820
|
-
label: (0,
|
|
2821
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2849
|
+
label: (0, import_i18n17.__)("Space evenly", "elementor"),
|
|
2850
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: import_icons9.JustifyDistributeVerticalIcon, size, ...iconProps }),
|
|
2822
2851
|
showTooltip: true
|
|
2823
2852
|
}
|
|
2824
2853
|
];
|
|
2825
2854
|
var AlignContentField = () => {
|
|
2826
|
-
return /* @__PURE__ */
|
|
2855
|
+
return /* @__PURE__ */ React43.createElement(UiProviders, null, /* @__PURE__ */ React43.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React43.createElement(import_ui35.Stack, { gap: 1 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, (0, import_i18n17.__)("Align content", "elementor")), /* @__PURE__ */ React43.createElement(import_editor_controls16.ToggleControl, { options, fullWidth: true }))));
|
|
2827
2856
|
};
|
|
2828
2857
|
|
|
2829
2858
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
2830
|
-
var
|
|
2831
|
-
var
|
|
2859
|
+
var React44 = __toESM(require("react"));
|
|
2860
|
+
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
2832
2861
|
var import_icons10 = require("@elementor/icons");
|
|
2833
|
-
var
|
|
2834
|
-
var
|
|
2835
|
-
var StartIcon2 = (0,
|
|
2836
|
-
var EndIcon2 = (0,
|
|
2862
|
+
var import_ui36 = require("@elementor/ui");
|
|
2863
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
2864
|
+
var StartIcon2 = (0, import_ui36.withDirection)(import_icons10.LayoutAlignLeftIcon);
|
|
2865
|
+
var EndIcon2 = (0, import_ui36.withDirection)(import_icons10.LayoutAlignRightIcon);
|
|
2837
2866
|
var iconProps2 = {
|
|
2838
2867
|
isClockwise: false,
|
|
2839
2868
|
offset: 90
|
|
@@ -2841,55 +2870,55 @@ var iconProps2 = {
|
|
|
2841
2870
|
var options2 = [
|
|
2842
2871
|
{
|
|
2843
2872
|
value: "start",
|
|
2844
|
-
label: (0,
|
|
2845
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2873
|
+
label: (0, import_i18n18.__)("Start", "elementor"),
|
|
2874
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
2846
2875
|
showTooltip: true
|
|
2847
2876
|
},
|
|
2848
2877
|
{
|
|
2849
2878
|
value: "center",
|
|
2850
|
-
label: (0,
|
|
2851
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2879
|
+
label: (0, import_i18n18.__)("Center", "elementor"),
|
|
2880
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: import_icons10.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
2852
2881
|
showTooltip: true
|
|
2853
2882
|
},
|
|
2854
2883
|
{
|
|
2855
2884
|
value: "end",
|
|
2856
|
-
label: (0,
|
|
2857
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2885
|
+
label: (0, import_i18n18.__)("End", "elementor"),
|
|
2886
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
2858
2887
|
showTooltip: true
|
|
2859
2888
|
},
|
|
2860
2889
|
{
|
|
2861
2890
|
value: "stretch",
|
|
2862
|
-
label: (0,
|
|
2863
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2891
|
+
label: (0, import_i18n18.__)("Stretch", "elementor"),
|
|
2892
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: import_icons10.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
2864
2893
|
showTooltip: true
|
|
2865
2894
|
}
|
|
2866
2895
|
];
|
|
2867
2896
|
var AlignItemsField = () => {
|
|
2868
|
-
return /* @__PURE__ */
|
|
2897
|
+
return /* @__PURE__ */ React44.createElement(UiProviders, null, /* @__PURE__ */ React44.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React44.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlLabel, null, (0, import_i18n18.__)("Align items", "elementor"))), /* @__PURE__ */ React44.createElement(import_ui36.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React44.createElement(import_editor_controls17.ToggleControl, { options: options2 })))));
|
|
2869
2898
|
};
|
|
2870
2899
|
|
|
2871
2900
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
2872
|
-
var
|
|
2873
|
-
var
|
|
2901
|
+
var React45 = __toESM(require("react"));
|
|
2902
|
+
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
2874
2903
|
var import_icons11 = require("@elementor/icons");
|
|
2875
|
-
var
|
|
2876
|
-
var
|
|
2904
|
+
var import_ui37 = require("@elementor/ui");
|
|
2905
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
2877
2906
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
2878
2907
|
row: 90,
|
|
2879
2908
|
"row-reverse": 90,
|
|
2880
2909
|
column: 0,
|
|
2881
2910
|
"column-reverse": 0
|
|
2882
2911
|
};
|
|
2883
|
-
var StartIcon3 = (0,
|
|
2884
|
-
var EndIcon3 = (0,
|
|
2912
|
+
var StartIcon3 = (0, import_ui37.withDirection)(import_icons11.LayoutAlignLeftIcon);
|
|
2913
|
+
var EndIcon3 = (0, import_ui37.withDirection)(import_icons11.LayoutAlignRightIcon);
|
|
2885
2914
|
var iconProps3 = {
|
|
2886
2915
|
isClockwise: false
|
|
2887
2916
|
};
|
|
2888
2917
|
var getOptions = (parentStyleDirection) => [
|
|
2889
2918
|
{
|
|
2890
2919
|
value: "start",
|
|
2891
|
-
label: (0,
|
|
2892
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2920
|
+
label: (0, import_i18n19.__)("Start", "elementor"),
|
|
2921
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2893
2922
|
RotatedIcon,
|
|
2894
2923
|
{
|
|
2895
2924
|
icon: StartIcon3,
|
|
@@ -2902,8 +2931,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2902
2931
|
},
|
|
2903
2932
|
{
|
|
2904
2933
|
value: "center",
|
|
2905
|
-
label: (0,
|
|
2906
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2934
|
+
label: (0, import_i18n19.__)("Center", "elementor"),
|
|
2935
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2907
2936
|
RotatedIcon,
|
|
2908
2937
|
{
|
|
2909
2938
|
icon: import_icons11.LayoutAlignCenterIcon,
|
|
@@ -2916,8 +2945,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2916
2945
|
},
|
|
2917
2946
|
{
|
|
2918
2947
|
value: "end",
|
|
2919
|
-
label: (0,
|
|
2920
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2948
|
+
label: (0, import_i18n19.__)("End", "elementor"),
|
|
2949
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2921
2950
|
RotatedIcon,
|
|
2922
2951
|
{
|
|
2923
2952
|
icon: EndIcon3,
|
|
@@ -2930,8 +2959,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2930
2959
|
},
|
|
2931
2960
|
{
|
|
2932
2961
|
value: "stretch",
|
|
2933
|
-
label: (0,
|
|
2934
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2962
|
+
label: (0, import_i18n19.__)("Stretch", "elementor"),
|
|
2963
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(
|
|
2935
2964
|
RotatedIcon,
|
|
2936
2965
|
{
|
|
2937
2966
|
icon: import_icons11.LayoutDistributeVerticalIcon,
|
|
@@ -2944,32 +2973,32 @@ var getOptions = (parentStyleDirection) => [
|
|
|
2944
2973
|
}
|
|
2945
2974
|
];
|
|
2946
2975
|
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
2947
|
-
return /* @__PURE__ */
|
|
2976
|
+
return /* @__PURE__ */ React45.createElement(UiProviders, null, /* @__PURE__ */ React45.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, (0, import_i18n19.__)("Align self", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React45.createElement(import_editor_controls18.ToggleControl, { options: getOptions(parentStyleDirection) })))));
|
|
2948
2977
|
};
|
|
2949
2978
|
|
|
2950
2979
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
2951
|
-
var
|
|
2952
|
-
var
|
|
2980
|
+
var React46 = __toESM(require("react"));
|
|
2981
|
+
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
2953
2982
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
2954
|
-
var
|
|
2955
|
-
var
|
|
2983
|
+
var import_ui38 = require("@elementor/ui");
|
|
2984
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
2956
2985
|
var displayFieldItems = [
|
|
2957
2986
|
{
|
|
2958
2987
|
value: "block",
|
|
2959
|
-
renderContent: () => (0,
|
|
2960
|
-
label: (0,
|
|
2988
|
+
renderContent: () => (0, import_i18n20.__)("Block", "elementor"),
|
|
2989
|
+
label: (0, import_i18n20.__)("Block", "elementor"),
|
|
2961
2990
|
showTooltip: true
|
|
2962
2991
|
},
|
|
2963
2992
|
{
|
|
2964
2993
|
value: "flex",
|
|
2965
|
-
renderContent: () => (0,
|
|
2966
|
-
label: (0,
|
|
2994
|
+
renderContent: () => (0, import_i18n20.__)("Flex", "elementor"),
|
|
2995
|
+
label: (0, import_i18n20.__)("Flex", "elementor"),
|
|
2967
2996
|
showTooltip: true
|
|
2968
2997
|
},
|
|
2969
2998
|
{
|
|
2970
2999
|
value: "inline-block",
|
|
2971
|
-
renderContent: () => (0,
|
|
2972
|
-
label: (0,
|
|
3000
|
+
renderContent: () => (0, import_i18n20.__)("In-blk", "elementor"),
|
|
3001
|
+
label: (0, import_i18n20.__)("Inline-block", "elementor"),
|
|
2973
3002
|
showTooltip: true
|
|
2974
3003
|
}
|
|
2975
3004
|
];
|
|
@@ -2979,71 +3008,71 @@ var DisplayField = () => {
|
|
|
2979
3008
|
if (isDisplayNoneFeatureActive) {
|
|
2980
3009
|
items3.push({
|
|
2981
3010
|
value: "none",
|
|
2982
|
-
renderContent: () => (0,
|
|
2983
|
-
label: (0,
|
|
3011
|
+
renderContent: () => (0, import_i18n20.__)("None", "elementor"),
|
|
3012
|
+
label: (0, import_i18n20.__)("None", "elementor"),
|
|
2984
3013
|
showTooltip: true
|
|
2985
3014
|
});
|
|
2986
3015
|
}
|
|
2987
3016
|
items3.push({
|
|
2988
3017
|
value: "inline-flex",
|
|
2989
|
-
renderContent: () => (0,
|
|
2990
|
-
label: (0,
|
|
3018
|
+
renderContent: () => (0, import_i18n20.__)("In-flx", "elementor"),
|
|
3019
|
+
label: (0, import_i18n20.__)("Inline-flex", "elementor"),
|
|
2991
3020
|
showTooltip: true
|
|
2992
3021
|
});
|
|
2993
3022
|
const placeholder = useDisplayPlaceholderValue();
|
|
2994
|
-
return /* @__PURE__ */
|
|
3023
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React46.createElement(import_ui38.Stack, { gap: 0.75 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, (0, import_i18n20.__)("Display", "elementor")), /* @__PURE__ */ React46.createElement(import_editor_controls19.ToggleControl, { options: items3, maxItems: 4, fullWidth: true })));
|
|
2995
3024
|
};
|
|
2996
3025
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
2997
3026
|
|
|
2998
3027
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
2999
|
-
var
|
|
3000
|
-
var
|
|
3028
|
+
var React47 = __toESM(require("react"));
|
|
3029
|
+
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
3001
3030
|
var import_icons12 = require("@elementor/icons");
|
|
3002
|
-
var
|
|
3003
|
-
var
|
|
3031
|
+
var import_ui39 = require("@elementor/ui");
|
|
3032
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
3004
3033
|
var options3 = [
|
|
3005
3034
|
{
|
|
3006
3035
|
value: "row",
|
|
3007
|
-
label: (0,
|
|
3036
|
+
label: (0, import_i18n21.__)("Row", "elementor"),
|
|
3008
3037
|
renderContent: ({ size }) => {
|
|
3009
|
-
const StartIcon5 = (0,
|
|
3010
|
-
return /* @__PURE__ */
|
|
3038
|
+
const StartIcon5 = (0, import_ui39.withDirection)(import_icons12.ArrowRightIcon);
|
|
3039
|
+
return /* @__PURE__ */ React47.createElement(StartIcon5, { fontSize: size });
|
|
3011
3040
|
},
|
|
3012
3041
|
showTooltip: true
|
|
3013
3042
|
},
|
|
3014
3043
|
{
|
|
3015
3044
|
value: "column",
|
|
3016
|
-
label: (0,
|
|
3017
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3045
|
+
label: (0, import_i18n21.__)("Column", "elementor"),
|
|
3046
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons12.ArrowDownSmallIcon, { fontSize: size }),
|
|
3018
3047
|
showTooltip: true
|
|
3019
3048
|
},
|
|
3020
3049
|
{
|
|
3021
3050
|
value: "row-reverse",
|
|
3022
|
-
label: (0,
|
|
3051
|
+
label: (0, import_i18n21.__)("Reversed row", "elementor"),
|
|
3023
3052
|
renderContent: ({ size }) => {
|
|
3024
|
-
const EndIcon5 = (0,
|
|
3025
|
-
return /* @__PURE__ */
|
|
3053
|
+
const EndIcon5 = (0, import_ui39.withDirection)(import_icons12.ArrowLeftIcon);
|
|
3054
|
+
return /* @__PURE__ */ React47.createElement(EndIcon5, { fontSize: size });
|
|
3026
3055
|
},
|
|
3027
3056
|
showTooltip: true
|
|
3028
3057
|
},
|
|
3029
3058
|
{
|
|
3030
3059
|
value: "column-reverse",
|
|
3031
|
-
label: (0,
|
|
3032
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3060
|
+
label: (0, import_i18n21.__)("Reversed column", "elementor"),
|
|
3061
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons12.ArrowUpSmallIcon, { fontSize: size }),
|
|
3033
3062
|
showTooltip: true
|
|
3034
3063
|
}
|
|
3035
3064
|
];
|
|
3036
3065
|
var FlexDirectionField = () => {
|
|
3037
|
-
return /* @__PURE__ */
|
|
3066
|
+
return /* @__PURE__ */ React47.createElement(UiProviders, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n21.__)("Direction", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React47.createElement(import_editor_controls20.ToggleControl, { options: options3 })))));
|
|
3038
3067
|
};
|
|
3039
3068
|
|
|
3040
3069
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3041
|
-
var
|
|
3042
|
-
var
|
|
3043
|
-
var
|
|
3070
|
+
var React48 = __toESM(require("react"));
|
|
3071
|
+
var import_react25 = require("react");
|
|
3072
|
+
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
3044
3073
|
var import_icons13 = require("@elementor/icons");
|
|
3045
|
-
var
|
|
3046
|
-
var
|
|
3074
|
+
var import_ui40 = require("@elementor/ui");
|
|
3075
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
3047
3076
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
3048
3077
|
var LAST_DEFAULT_VALUE = 99999;
|
|
3049
3078
|
var FIRST = "first";
|
|
@@ -3056,27 +3085,26 @@ var orderValueMap = {
|
|
|
3056
3085
|
var items = [
|
|
3057
3086
|
{
|
|
3058
3087
|
value: FIRST,
|
|
3059
|
-
label: (0,
|
|
3060
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3088
|
+
label: (0, import_i18n22.__)("First", "elementor"),
|
|
3089
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons13.ArrowUpSmallIcon, { fontSize: size }),
|
|
3061
3090
|
showTooltip: true
|
|
3062
3091
|
},
|
|
3063
3092
|
{
|
|
3064
3093
|
value: LAST,
|
|
3065
|
-
label: (0,
|
|
3066
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3094
|
+
label: (0, import_i18n22.__)("Last", "elementor"),
|
|
3095
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons13.ArrowDownSmallIcon, { fontSize: size }),
|
|
3067
3096
|
showTooltip: true
|
|
3068
3097
|
},
|
|
3069
3098
|
{
|
|
3070
3099
|
value: CUSTOM,
|
|
3071
|
-
label: (0,
|
|
3072
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3100
|
+
label: (0, import_i18n22.__)("Custom", "elementor"),
|
|
3101
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons13.PencilIcon, { fontSize: size }),
|
|
3073
3102
|
showTooltip: true
|
|
3074
3103
|
}
|
|
3075
3104
|
];
|
|
3076
3105
|
var FlexOrderField = () => {
|
|
3077
|
-
const
|
|
3078
|
-
const
|
|
3079
|
-
const [groupControlValue, setGroupControlValue] = (0, import_react24.useState)(getGroupControlValue(order?.value || null));
|
|
3106
|
+
const { value: order, setValue: setOrder, canEdit } = useStylesField("order");
|
|
3107
|
+
const [groupControlValue, setGroupControlValue] = (0, import_react25.useState)(getGroupControlValue(order?.value || null));
|
|
3080
3108
|
const handleToggleButtonChange = (group) => {
|
|
3081
3109
|
setGroupControlValue(group);
|
|
3082
3110
|
if (!group || group === CUSTOM) {
|
|
@@ -3085,8 +3113,8 @@ var FlexOrderField = () => {
|
|
|
3085
3113
|
}
|
|
3086
3114
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
3087
3115
|
};
|
|
3088
|
-
return /* @__PURE__ */
|
|
3089
|
-
|
|
3116
|
+
return /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React48.createElement(SectionContent, null, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Order", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(
|
|
3117
|
+
import_editor_controls21.ControlToggleButtonGroup,
|
|
3090
3118
|
{
|
|
3091
3119
|
items,
|
|
3092
3120
|
value: groupControlValue,
|
|
@@ -3094,8 +3122,8 @@ var FlexOrderField = () => {
|
|
|
3094
3122
|
exclusive: true,
|
|
3095
3123
|
disabled: !canEdit
|
|
3096
3124
|
}
|
|
3097
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
3098
|
-
|
|
3125
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React48.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, (0, import_i18n22.__)("Custom order", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui40.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React48.createElement(
|
|
3126
|
+
import_editor_controls21.NumberControl,
|
|
3099
3127
|
{
|
|
3100
3128
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
3101
3129
|
max: LAST_DEFAULT_VALUE - 1,
|
|
@@ -3114,45 +3142,44 @@ var getGroupControlValue = (order) => {
|
|
|
3114
3142
|
};
|
|
3115
3143
|
|
|
3116
3144
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3117
|
-
var
|
|
3118
|
-
var
|
|
3119
|
-
var
|
|
3120
|
-
var
|
|
3145
|
+
var React49 = __toESM(require("react"));
|
|
3146
|
+
var import_react26 = require("react");
|
|
3147
|
+
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
3148
|
+
var import_editor_props9 = require("@elementor/editor-props");
|
|
3121
3149
|
var import_icons14 = require("@elementor/icons");
|
|
3122
|
-
var
|
|
3123
|
-
var
|
|
3150
|
+
var import_ui41 = require("@elementor/ui");
|
|
3151
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
3124
3152
|
var DEFAULT = 1;
|
|
3125
3153
|
var items2 = [
|
|
3126
3154
|
{
|
|
3127
3155
|
value: "flex-grow",
|
|
3128
|
-
label: (0,
|
|
3129
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3156
|
+
label: (0, import_i18n23.__)("Grow", "elementor"),
|
|
3157
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons14.ExpandIcon, { fontSize: size }),
|
|
3130
3158
|
showTooltip: true
|
|
3131
3159
|
},
|
|
3132
3160
|
{
|
|
3133
3161
|
value: "flex-shrink",
|
|
3134
|
-
label: (0,
|
|
3135
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3162
|
+
label: (0, import_i18n23.__)("Shrink", "elementor"),
|
|
3163
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons14.ShrinkIcon, { fontSize: size }),
|
|
3136
3164
|
showTooltip: true
|
|
3137
3165
|
},
|
|
3138
3166
|
{
|
|
3139
3167
|
value: "custom",
|
|
3140
|
-
label: (0,
|
|
3141
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3168
|
+
label: (0, import_i18n23.__)("Custom", "elementor"),
|
|
3169
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons14.PencilIcon, { fontSize: size }),
|
|
3142
3170
|
showTooltip: true
|
|
3143
3171
|
}
|
|
3144
3172
|
];
|
|
3145
3173
|
var FlexSizeField = () => {
|
|
3146
|
-
const { canEdit } =
|
|
3147
|
-
const
|
|
3148
|
-
const
|
|
3149
|
-
const
|
|
3150
|
-
const
|
|
3151
|
-
const currentGroup = (0, import_react25.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react25.useState)(currentGroup);
|
|
3174
|
+
const { values, setValues, canEdit } = useStylesFields(["flex-grow", "flex-shrink", "flex-basis"]);
|
|
3175
|
+
const grow = values?.["flex-grow"]?.value || null;
|
|
3176
|
+
const shrink = values?.["flex-shrink"]?.value || null;
|
|
3177
|
+
const basis = values?.["flex-basis"]?.value || null;
|
|
3178
|
+
const currentGroup = (0, import_react26.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react26.useState)(currentGroup);
|
|
3152
3179
|
const onChangeGroup = (group = null) => {
|
|
3153
3180
|
setActiveGroup(group);
|
|
3154
3181
|
if (!group || group === "custom") {
|
|
3155
|
-
|
|
3182
|
+
setValues({
|
|
3156
3183
|
"flex-basis": null,
|
|
3157
3184
|
"flex-grow": null,
|
|
3158
3185
|
"flex-shrink": null
|
|
@@ -3160,21 +3187,21 @@ var FlexSizeField = () => {
|
|
|
3160
3187
|
return;
|
|
3161
3188
|
}
|
|
3162
3189
|
if (group === "flex-grow") {
|
|
3163
|
-
|
|
3190
|
+
setValues({
|
|
3164
3191
|
"flex-basis": null,
|
|
3165
|
-
"flex-grow":
|
|
3192
|
+
"flex-grow": import_editor_props9.numberPropTypeUtil.create(DEFAULT),
|
|
3166
3193
|
"flex-shrink": null
|
|
3167
3194
|
});
|
|
3168
3195
|
return;
|
|
3169
3196
|
}
|
|
3170
|
-
|
|
3197
|
+
setValues({
|
|
3171
3198
|
"flex-basis": null,
|
|
3172
3199
|
"flex-grow": null,
|
|
3173
|
-
"flex-shrink":
|
|
3200
|
+
"flex-shrink": import_editor_props9.numberPropTypeUtil.create(DEFAULT)
|
|
3174
3201
|
});
|
|
3175
3202
|
};
|
|
3176
|
-
return /* @__PURE__ */
|
|
3177
|
-
|
|
3203
|
+
return /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n23.__)("Size", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(
|
|
3204
|
+
import_editor_controls22.ControlToggleButtonGroup,
|
|
3178
3205
|
{
|
|
3179
3206
|
value: activeGroup,
|
|
3180
3207
|
onChange: onChangeGroup,
|
|
@@ -3182,11 +3209,11 @@ var FlexSizeField = () => {
|
|
|
3182
3209
|
items: items2,
|
|
3183
3210
|
exclusive: true
|
|
3184
3211
|
}
|
|
3185
|
-
)))), "custom" === activeGroup && /* @__PURE__ */
|
|
3212
|
+
)))), "custom" === activeGroup && /* @__PURE__ */ React49.createElement(FlexCustomField, null)));
|
|
3186
3213
|
};
|
|
3187
3214
|
var FlexCustomField = () => {
|
|
3188
|
-
const flexBasisRowRef = (0,
|
|
3189
|
-
return /* @__PURE__ */
|
|
3215
|
+
const flexBasisRowRef = (0, import_react26.useRef)();
|
|
3216
|
+
return /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n23.__)("Grow", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n23.__)("Shrink", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React49.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: flexBasisRowRef }, /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n23.__)("Basis", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React49.createElement(import_editor_controls22.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3190
3217
|
};
|
|
3191
3218
|
var getActiveGroup = ({
|
|
3192
3219
|
grow,
|
|
@@ -3209,22 +3236,22 @@ var getActiveGroup = ({
|
|
|
3209
3236
|
};
|
|
3210
3237
|
|
|
3211
3238
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3212
|
-
var
|
|
3213
|
-
var
|
|
3214
|
-
var
|
|
3215
|
-
var
|
|
3239
|
+
var React50 = __toESM(require("react"));
|
|
3240
|
+
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
3241
|
+
var import_ui42 = require("@elementor/ui");
|
|
3242
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
3216
3243
|
var GapControlField = () => {
|
|
3217
|
-
return /* @__PURE__ */
|
|
3244
|
+
return /* @__PURE__ */ React50.createElement(import_ui42.Stack, { gap: 1 }, /* @__PURE__ */ React50.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React50.createElement(import_editor_controls23.GapControl, { label: (0, import_i18n24.__)("Gaps", "elementor") })));
|
|
3218
3245
|
};
|
|
3219
3246
|
|
|
3220
3247
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3221
|
-
var
|
|
3222
|
-
var
|
|
3248
|
+
var React51 = __toESM(require("react"));
|
|
3249
|
+
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
3223
3250
|
var import_icons15 = require("@elementor/icons");
|
|
3224
|
-
var
|
|
3225
|
-
var
|
|
3226
|
-
var StartIcon4 = (0,
|
|
3227
|
-
var EndIcon4 = (0,
|
|
3251
|
+
var import_ui43 = require("@elementor/ui");
|
|
3252
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
3253
|
+
var StartIcon4 = (0, import_ui43.withDirection)(import_icons15.JustifyTopIcon);
|
|
3254
|
+
var EndIcon4 = (0, import_ui43.withDirection)(import_icons15.JustifyBottomIcon);
|
|
3228
3255
|
var iconProps4 = {
|
|
3229
3256
|
isClockwise: true,
|
|
3230
3257
|
offset: -90
|
|
@@ -3232,91 +3259,91 @@ var iconProps4 = {
|
|
|
3232
3259
|
var options4 = [
|
|
3233
3260
|
{
|
|
3234
3261
|
value: "flex-start",
|
|
3235
|
-
label: (0,
|
|
3236
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3262
|
+
label: (0, import_i18n25.__)("Start", "elementor"),
|
|
3263
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
3237
3264
|
showTooltip: true
|
|
3238
3265
|
},
|
|
3239
3266
|
{
|
|
3240
3267
|
value: "center",
|
|
3241
|
-
label: (0,
|
|
3242
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3268
|
+
label: (0, import_i18n25.__)("Center", "elementor"),
|
|
3269
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: import_icons15.JustifyCenterIcon, size, ...iconProps4 }),
|
|
3243
3270
|
showTooltip: true
|
|
3244
3271
|
},
|
|
3245
3272
|
{
|
|
3246
3273
|
value: "flex-end",
|
|
3247
|
-
label: (0,
|
|
3248
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3274
|
+
label: (0, import_i18n25.__)("End", "elementor"),
|
|
3275
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
3249
3276
|
showTooltip: true
|
|
3250
3277
|
},
|
|
3251
3278
|
{
|
|
3252
3279
|
value: "space-between",
|
|
3253
|
-
label: (0,
|
|
3254
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3280
|
+
label: (0, import_i18n25.__)("Space between", "elementor"),
|
|
3281
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: import_icons15.JustifySpaceBetweenVerticalIcon, size, ...iconProps4 }),
|
|
3255
3282
|
showTooltip: true
|
|
3256
3283
|
},
|
|
3257
3284
|
{
|
|
3258
3285
|
value: "space-around",
|
|
3259
|
-
label: (0,
|
|
3260
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3286
|
+
label: (0, import_i18n25.__)("Space around", "elementor"),
|
|
3287
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: import_icons15.JustifySpaceAroundVerticalIcon, size, ...iconProps4 }),
|
|
3261
3288
|
showTooltip: true
|
|
3262
3289
|
},
|
|
3263
3290
|
{
|
|
3264
3291
|
value: "space-evenly",
|
|
3265
|
-
label: (0,
|
|
3266
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3292
|
+
label: (0, import_i18n25.__)("Space evenly", "elementor"),
|
|
3293
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: import_icons15.JustifyDistributeVerticalIcon, size, ...iconProps4 }),
|
|
3267
3294
|
showTooltip: true
|
|
3268
3295
|
}
|
|
3269
3296
|
];
|
|
3270
3297
|
var JustifyContentField = () => {
|
|
3271
|
-
return /* @__PURE__ */
|
|
3298
|
+
return /* @__PURE__ */ React51.createElement(UiProviders, null, /* @__PURE__ */ React51.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React51.createElement(import_ui43.Stack, { gap: 0.75 }, /* @__PURE__ */ React51.createElement(ControlLabel, null, (0, import_i18n25.__)("Justify content", "elementor")), /* @__PURE__ */ React51.createElement(import_editor_controls24.ToggleControl, { options: options4, fullWidth: true }))));
|
|
3272
3299
|
};
|
|
3273
3300
|
|
|
3274
3301
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3275
|
-
var
|
|
3276
|
-
var
|
|
3302
|
+
var React52 = __toESM(require("react"));
|
|
3303
|
+
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
3277
3304
|
var import_icons16 = require("@elementor/icons");
|
|
3278
|
-
var
|
|
3279
|
-
var
|
|
3305
|
+
var import_ui44 = require("@elementor/ui");
|
|
3306
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
3280
3307
|
var options5 = [
|
|
3281
3308
|
{
|
|
3282
3309
|
value: "nowrap",
|
|
3283
|
-
label: (0,
|
|
3284
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3310
|
+
label: (0, import_i18n26.__)("No wrap", "elementor"),
|
|
3311
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons16.ArrowRightIcon, { fontSize: size }),
|
|
3285
3312
|
showTooltip: true
|
|
3286
3313
|
},
|
|
3287
3314
|
{
|
|
3288
3315
|
value: "wrap",
|
|
3289
|
-
label: (0,
|
|
3290
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3316
|
+
label: (0, import_i18n26.__)("Wrap", "elementor"),
|
|
3317
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons16.ArrowBackIcon, { fontSize: size }),
|
|
3291
3318
|
showTooltip: true
|
|
3292
3319
|
},
|
|
3293
3320
|
{
|
|
3294
3321
|
value: "wrap-reverse",
|
|
3295
|
-
label: (0,
|
|
3296
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3322
|
+
label: (0, import_i18n26.__)("Reversed wrap", "elementor"),
|
|
3323
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons16.ArrowForwardIcon, { fontSize: size }),
|
|
3297
3324
|
showTooltip: true
|
|
3298
3325
|
}
|
|
3299
3326
|
];
|
|
3300
3327
|
var WrapField = () => {
|
|
3301
|
-
return /* @__PURE__ */
|
|
3328
|
+
return /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React52.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, (0, import_i18n26.__)("Wrap", "elementor"))), /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React52.createElement(import_editor_controls25.ToggleControl, { options: options5 })))));
|
|
3302
3329
|
};
|
|
3303
3330
|
|
|
3304
3331
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3305
3332
|
var LayoutSection = () => {
|
|
3306
|
-
const
|
|
3333
|
+
const { value: display } = useStylesField("display");
|
|
3307
3334
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
3308
3335
|
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
3309
3336
|
const { element } = useElement();
|
|
3310
3337
|
const parent = (0, import_editor_elements7.useParentElement)(element.id);
|
|
3311
3338
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3312
3339
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
3313
|
-
return /* @__PURE__ */
|
|
3340
|
+
return /* @__PURE__ */ React53.createElement(SectionContent, null, /* @__PURE__ */ React53.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React53.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React53.createElement(FlexChildFields, { parentStyleDirection }));
|
|
3314
3341
|
};
|
|
3315
3342
|
var FlexFields = () => {
|
|
3316
|
-
const
|
|
3317
|
-
return /* @__PURE__ */
|
|
3343
|
+
const { value: flexWrap } = useStylesField("flex-wrap");
|
|
3344
|
+
return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(FlexDirectionField, null), /* @__PURE__ */ React53.createElement(JustifyContentField, null), /* @__PURE__ */ React53.createElement(AlignItemsField, null), /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(GapControlField, null), /* @__PURE__ */ React53.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React53.createElement(AlignContentField, null));
|
|
3318
3345
|
};
|
|
3319
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3346
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(import_editor_controls26.ControlFormLabel, null, (0, import_i18n27.__)("Flex child", "elementor")), /* @__PURE__ */ React53.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React53.createElement(FlexOrderField, null), /* @__PURE__ */ React53.createElement(FlexSizeField, null));
|
|
3320
3347
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3321
3348
|
const value = display?.value ?? local?.value;
|
|
3322
3349
|
if (!value) {
|
|
@@ -3326,38 +3353,38 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3326
3353
|
};
|
|
3327
3354
|
|
|
3328
3355
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3329
|
-
var
|
|
3356
|
+
var React58 = __toESM(require("react"));
|
|
3330
3357
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
3331
3358
|
var import_session3 = require("@elementor/session");
|
|
3332
3359
|
|
|
3333
3360
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3334
|
-
var
|
|
3335
|
-
var
|
|
3336
|
-
var
|
|
3361
|
+
var React54 = __toESM(require("react"));
|
|
3362
|
+
var import_react27 = require("react");
|
|
3363
|
+
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
3337
3364
|
var import_icons17 = require("@elementor/icons");
|
|
3338
|
-
var
|
|
3339
|
-
var
|
|
3340
|
-
var InlineStartIcon2 = (0,
|
|
3341
|
-
var InlineEndIcon2 = (0,
|
|
3365
|
+
var import_ui45 = require("@elementor/ui");
|
|
3366
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
3367
|
+
var InlineStartIcon2 = (0, import_ui45.withDirection)(import_icons17.SideLeftIcon);
|
|
3368
|
+
var InlineEndIcon2 = (0, import_ui45.withDirection)(import_icons17.SideRightIcon);
|
|
3342
3369
|
var sideIcons = {
|
|
3343
|
-
"inset-block-start": /* @__PURE__ */
|
|
3344
|
-
"inset-block-end": /* @__PURE__ */
|
|
3345
|
-
"inset-inline-start": /* @__PURE__ */
|
|
3346
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3370
|
+
"inset-block-start": /* @__PURE__ */ React54.createElement(import_icons17.SideTopIcon, { fontSize: "tiny" }),
|
|
3371
|
+
"inset-block-end": /* @__PURE__ */ React54.createElement(import_icons17.SideBottomIcon, { fontSize: "tiny" }),
|
|
3372
|
+
"inset-inline-start": /* @__PURE__ */ React54.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
3373
|
+
"inset-inline-end": /* @__PURE__ */ React54.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
3347
3374
|
};
|
|
3348
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3349
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3375
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n28.__)("Right", "elementor") : (0, import_i18n28.__)("Left", "elementor");
|
|
3376
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n28.__)("Left", "elementor") : (0, import_i18n28.__)("Right", "elementor");
|
|
3350
3377
|
var DimensionsField = () => {
|
|
3351
3378
|
const { isSiteRtl } = useDirection();
|
|
3352
|
-
const rowRefs = [(0,
|
|
3353
|
-
return /* @__PURE__ */
|
|
3379
|
+
const rowRefs = [(0, import_react27.useRef)(), (0, import_react27.useRef)()];
|
|
3380
|
+
return /* @__PURE__ */ React54.createElement(UiProviders, null, /* @__PURE__ */ React54.createElement(import_ui45.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React54.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n28.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React54.createElement(
|
|
3354
3381
|
DimensionField,
|
|
3355
3382
|
{
|
|
3356
3383
|
side: "inset-inline-end",
|
|
3357
3384
|
label: getInlineEndLabel(isSiteRtl),
|
|
3358
3385
|
rowRef: rowRefs[0]
|
|
3359
3386
|
}
|
|
3360
|
-
)), /* @__PURE__ */
|
|
3387
|
+
)), /* @__PURE__ */ React54.createElement(import_ui45.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React54.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n28.__)("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React54.createElement(
|
|
3361
3388
|
DimensionField,
|
|
3362
3389
|
{
|
|
3363
3390
|
side: "inset-inline-start",
|
|
@@ -3370,48 +3397,48 @@ var DimensionField = ({
|
|
|
3370
3397
|
side,
|
|
3371
3398
|
label,
|
|
3372
3399
|
rowRef
|
|
3373
|
-
}) => /* @__PURE__ */
|
|
3400
|
+
}) => /* @__PURE__ */ React54.createElement(StylesField, { bind: side }, /* @__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_controls27.SizeControl, { startIcon: sideIcons[side], extendedOptions: ["auto"], anchorRef: rowRef }))));
|
|
3374
3401
|
|
|
3375
3402
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3376
|
-
var React54 = __toESM(require("react"));
|
|
3377
|
-
var import_react27 = require("react");
|
|
3378
|
-
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
3379
|
-
var import_ui45 = require("@elementor/ui");
|
|
3380
|
-
var import_i18n28 = require("@wordpress/i18n");
|
|
3381
|
-
var OffsetField = () => {
|
|
3382
|
-
const rowRef = (0, import_react27.useRef)();
|
|
3383
|
-
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "scroll-margin-top" }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, (0, import_i18n28.__)("Anchor offset", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls27.SizeControl, { units: ["px", "em", "rem", "vw", "vh"], anchorRef: rowRef }))));
|
|
3384
|
-
};
|
|
3385
|
-
|
|
3386
|
-
// src/components/style-sections/position-section/position-field.tsx
|
|
3387
3403
|
var React55 = __toESM(require("react"));
|
|
3404
|
+
var import_react28 = require("react");
|
|
3388
3405
|
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
3389
3406
|
var import_ui46 = require("@elementor/ui");
|
|
3390
3407
|
var import_i18n29 = require("@wordpress/i18n");
|
|
3391
|
-
var
|
|
3392
|
-
|
|
3393
|
-
{
|
|
3394
|
-
{ label: (0, import_i18n29.__)("Absolute", "elementor"), value: "absolute" },
|
|
3395
|
-
{ label: (0, import_i18n29.__)("Fixed", "elementor"), value: "fixed" },
|
|
3396
|
-
{ label: (0, import_i18n29.__)("Sticky", "elementor"), value: "sticky" }
|
|
3397
|
-
];
|
|
3398
|
-
var PositionField = ({ onChange }) => {
|
|
3399
|
-
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React55.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, (0, import_i18n29.__)("Position", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React55.createElement(import_editor_controls28.SelectControl, { options: positionOptions, onChange }))));
|
|
3408
|
+
var OffsetField = () => {
|
|
3409
|
+
const rowRef = (0, import_react28.useRef)();
|
|
3410
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "scroll-margin-top" }, /* @__PURE__ */ React55.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, (0, import_i18n29.__)("Anchor offset", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls28.SizeControl, { units: ["px", "em", "rem", "vw", "vh"], anchorRef: rowRef }))));
|
|
3400
3411
|
};
|
|
3401
3412
|
|
|
3402
|
-
// src/components/style-sections/position-section/
|
|
3413
|
+
// src/components/style-sections/position-section/position-field.tsx
|
|
3403
3414
|
var React56 = __toESM(require("react"));
|
|
3404
3415
|
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
3405
3416
|
var import_ui47 = require("@elementor/ui");
|
|
3406
3417
|
var import_i18n30 = require("@wordpress/i18n");
|
|
3418
|
+
var positionOptions = [
|
|
3419
|
+
{ label: (0, import_i18n30.__)("Static", "elementor"), value: "static" },
|
|
3420
|
+
{ label: (0, import_i18n30.__)("Relative", "elementor"), value: "relative" },
|
|
3421
|
+
{ label: (0, import_i18n30.__)("Absolute", "elementor"), value: "absolute" },
|
|
3422
|
+
{ label: (0, import_i18n30.__)("Fixed", "elementor"), value: "fixed" },
|
|
3423
|
+
{ label: (0, import_i18n30.__)("Sticky", "elementor"), value: "sticky" }
|
|
3424
|
+
];
|
|
3425
|
+
var PositionField = ({ onChange }) => {
|
|
3426
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React56.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, (0, import_i18n30.__)("Position", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui47.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React56.createElement(import_editor_controls29.SelectControl, { options: positionOptions, onChange }))));
|
|
3427
|
+
};
|
|
3428
|
+
|
|
3429
|
+
// src/components/style-sections/position-section/z-index-field.tsx
|
|
3430
|
+
var React57 = __toESM(require("react"));
|
|
3431
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3432
|
+
var import_ui48 = require("@elementor/ui");
|
|
3433
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
3407
3434
|
var ZIndexField = () => {
|
|
3408
|
-
return /* @__PURE__ */
|
|
3435
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React57.createElement(import_ui48.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, (0, import_i18n31.__)("Z-index", "elementor"))), /* @__PURE__ */ React57.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(import_editor_controls30.NumberControl, null))));
|
|
3409
3436
|
};
|
|
3410
3437
|
|
|
3411
3438
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3412
3439
|
var PositionSection = () => {
|
|
3413
|
-
const
|
|
3414
|
-
const
|
|
3440
|
+
const { value: positionValue } = useStylesField("position");
|
|
3441
|
+
const { values: dimensions, setValues: setDimensions } = useStylesFields([
|
|
3415
3442
|
"inset-block-start",
|
|
3416
3443
|
"inset-block-end",
|
|
3417
3444
|
"inset-inline-start",
|
|
@@ -3421,9 +3448,9 @@ var PositionSection = () => {
|
|
|
3421
3448
|
const isCssIdFeatureActive = (0, import_editor_v1_adapters10.isExperimentActive)("e_v_3_30");
|
|
3422
3449
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
3423
3450
|
if (newPosition === "static") {
|
|
3424
|
-
if (
|
|
3425
|
-
updateDimensionsHistory(
|
|
3426
|
-
|
|
3451
|
+
if (dimensions) {
|
|
3452
|
+
updateDimensionsHistory(dimensions);
|
|
3453
|
+
setDimensions({
|
|
3427
3454
|
"inset-block-start": void 0,
|
|
3428
3455
|
"inset-block-end": void 0,
|
|
3429
3456
|
"inset-inline-start": void 0,
|
|
@@ -3432,13 +3459,13 @@ var PositionSection = () => {
|
|
|
3432
3459
|
}
|
|
3433
3460
|
} else if (previousPosition === "static") {
|
|
3434
3461
|
if (dimensionsValuesFromHistory) {
|
|
3435
|
-
|
|
3462
|
+
setDimensions(dimensionsValuesFromHistory);
|
|
3436
3463
|
clearDimensionsHistory();
|
|
3437
3464
|
}
|
|
3438
3465
|
}
|
|
3439
3466
|
};
|
|
3440
3467
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
3441
|
-
return /* @__PURE__ */
|
|
3468
|
+
return /* @__PURE__ */ React58.createElement(SectionContent, null, /* @__PURE__ */ React58.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(DimensionsField, null), /* @__PURE__ */ React58.createElement(ZIndexField, null)) : null, isCssIdFeatureActive && /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(PanelDivider, null), /* @__PURE__ */ React58.createElement(OffsetField, null)));
|
|
3442
3469
|
};
|
|
3443
3470
|
var usePersistDimensions = () => {
|
|
3444
3471
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -3448,50 +3475,55 @@ var usePersistDimensions = () => {
|
|
|
3448
3475
|
};
|
|
3449
3476
|
|
|
3450
3477
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3451
|
-
var
|
|
3452
|
-
var
|
|
3453
|
-
var
|
|
3478
|
+
var React64 = __toESM(require("react"));
|
|
3479
|
+
var import_react29 = require("react");
|
|
3480
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
3454
3481
|
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
3455
3482
|
var import_ui52 = require("@elementor/ui");
|
|
3456
3483
|
var import_i18n35 = require("@wordpress/i18n");
|
|
3457
3484
|
|
|
3458
3485
|
// src/components/style-tab-collapsible-content.tsx
|
|
3459
|
-
var
|
|
3486
|
+
var React60 = __toESM(require("react"));
|
|
3460
3487
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
3461
3488
|
|
|
3462
3489
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
3463
|
-
var
|
|
3464
|
-
var
|
|
3465
|
-
var
|
|
3466
|
-
var
|
|
3467
|
-
var orderedVariants = ["global", "local", "overridden"];
|
|
3490
|
+
var React59 = __toESM(require("react"));
|
|
3491
|
+
var import_editor_styles_repository12 = require("@elementor/editor-styles-repository");
|
|
3492
|
+
var import_ui49 = require("@elementor/ui");
|
|
3493
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
3468
3494
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
3469
|
-
const { id, meta } = useStyle();
|
|
3495
|
+
const { id, meta, provider } = useStyle();
|
|
3470
3496
|
const snapshot = useStylesInheritanceSnapshot();
|
|
3471
3497
|
const snapshotFields = Object.fromEntries(
|
|
3472
3498
|
Object.entries(snapshot ?? {}).filter(([key]) => fields.includes(key))
|
|
3473
3499
|
);
|
|
3474
|
-
const
|
|
3475
|
-
if (
|
|
3500
|
+
const { hasValues, hasOverrides } = getIndicators(snapshotFields, id ?? "", meta);
|
|
3501
|
+
if (!hasValues && !hasOverrides) {
|
|
3476
3502
|
return null;
|
|
3477
3503
|
}
|
|
3478
|
-
const
|
|
3479
|
-
const
|
|
3480
|
-
return /* @__PURE__ */
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3504
|
+
const hasValueLabel = (0, import_i18n32.__)("Has effective styles", "elementor");
|
|
3505
|
+
const hasOverridesLabel = (0, import_i18n32.__)("Has overridden styles", "elementor");
|
|
3506
|
+
return /* @__PURE__ */ React59.createElement(import_ui49.Tooltip, { title: (0, import_i18n32.__)("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React59.createElement(import_ui49.Stack, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React59.createElement(
|
|
3507
|
+
StyleIndicator,
|
|
3508
|
+
{
|
|
3509
|
+
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
3510
|
+
"data-variant": (0, import_editor_styles_repository12.isElementsStylesProvider)(provider.getKey()) ? "local" : "global",
|
|
3511
|
+
role: "listitem",
|
|
3512
|
+
"aria-label": hasValueLabel
|
|
3513
|
+
}
|
|
3514
|
+
), hasOverrides && /* @__PURE__ */ React59.createElement(
|
|
3515
|
+
StyleIndicator,
|
|
3516
|
+
{
|
|
3517
|
+
isOverridden: true,
|
|
3518
|
+
"data-variant": "overridden",
|
|
3519
|
+
role: "listitem",
|
|
3520
|
+
"aria-label": hasOverridesLabel
|
|
3521
|
+
}
|
|
3491
3522
|
)));
|
|
3492
3523
|
};
|
|
3493
3524
|
function getIndicators(snapshotFields, styleId, meta) {
|
|
3494
|
-
|
|
3525
|
+
let hasValues = false;
|
|
3526
|
+
let hasOverrides = false;
|
|
3495
3527
|
Object.values(snapshotFields).forEach((inheritanceChain) => {
|
|
3496
3528
|
const currentStyle = getCurrentStyleFromChain(inheritanceChain, styleId, meta);
|
|
3497
3529
|
if (!currentStyle) {
|
|
@@ -3499,19 +3531,12 @@ function getIndicators(snapshotFields, styleId, meta) {
|
|
|
3499
3531
|
}
|
|
3500
3532
|
const [actualStyle] = inheritanceChain;
|
|
3501
3533
|
if (currentStyle === actualStyle) {
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
return;
|
|
3506
|
-
}
|
|
3507
|
-
if (providerKey !== import_editor_styles_repository11.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
3508
|
-
indicators.global = true;
|
|
3509
|
-
}
|
|
3510
|
-
return;
|
|
3534
|
+
hasValues = true;
|
|
3535
|
+
} else {
|
|
3536
|
+
hasOverrides = true;
|
|
3511
3537
|
}
|
|
3512
|
-
indicators.overridden = true;
|
|
3513
3538
|
});
|
|
3514
|
-
return
|
|
3539
|
+
return { hasValues, hasOverrides };
|
|
3515
3540
|
}
|
|
3516
3541
|
function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
3517
3542
|
return chain.find(
|
|
@@ -3526,55 +3551,42 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
3526
3551
|
|
|
3527
3552
|
// src/components/style-tab-collapsible-content.tsx
|
|
3528
3553
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
3529
|
-
return /* @__PURE__ */
|
|
3554
|
+
return /* @__PURE__ */ React60.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
3530
3555
|
};
|
|
3531
3556
|
function getStylesInheritanceIndicators(fields) {
|
|
3532
3557
|
const isUsingFieldsIndicators = (0, import_editor_v1_adapters11.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30);
|
|
3533
3558
|
if (fields.length === 0 || !isUsingFieldsIndicators) {
|
|
3534
3559
|
return null;
|
|
3535
3560
|
}
|
|
3536
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
3561
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React60.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
3537
3562
|
}
|
|
3538
3563
|
|
|
3539
3564
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
3540
|
-
var
|
|
3541
|
-
var
|
|
3542
|
-
var
|
|
3543
|
-
var
|
|
3565
|
+
var React61 = __toESM(require("react"));
|
|
3566
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
3567
|
+
var import_ui50 = require("@elementor/ui");
|
|
3568
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
3544
3569
|
var positionOptions2 = [
|
|
3545
|
-
{ label: (0,
|
|
3546
|
-
{ label: (0,
|
|
3547
|
-
{ label: (0,
|
|
3548
|
-
{ label: (0,
|
|
3549
|
-
{ label: (0,
|
|
3570
|
+
{ label: (0, import_i18n33.__)("Fill", "elementor"), value: "fill" },
|
|
3571
|
+
{ label: (0, import_i18n33.__)("Cover", "elementor"), value: "cover" },
|
|
3572
|
+
{ label: (0, import_i18n33.__)("Contain", "elementor"), value: "contain" },
|
|
3573
|
+
{ label: (0, import_i18n33.__)("None", "elementor"), value: "none" },
|
|
3574
|
+
{ label: (0, import_i18n33.__)("Scale down", "elementor"), value: "scale-down" }
|
|
3550
3575
|
];
|
|
3551
3576
|
var ObjectFitField = () => {
|
|
3552
|
-
return /* @__PURE__ */
|
|
3577
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "object-fit" }, /* @__PURE__ */ React61.createElement(import_ui50.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel, null, (0, import_i18n33.__)("Object fit", "elementor"))), /* @__PURE__ */ React61.createElement(import_ui50.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React61.createElement(import_editor_controls31.SelectControl, { options: positionOptions2 }))));
|
|
3553
3578
|
};
|
|
3554
3579
|
|
|
3555
3580
|
// src/components/style-sections/size-section/object-position-field.tsx
|
|
3556
|
-
var
|
|
3557
|
-
var
|
|
3558
|
-
var import_ui50 = require("@elementor/ui");
|
|
3559
|
-
var import_i18n33 = require("@wordpress/i18n");
|
|
3560
|
-
var positionOptions3 = [
|
|
3561
|
-
{ label: (0, import_i18n33.__)("Center center", "elementor"), value: "center center" },
|
|
3562
|
-
{ label: (0, import_i18n33.__)("Center left", "elementor"), value: "center left" },
|
|
3563
|
-
{ label: (0, import_i18n33.__)("Center right", "elementor"), value: "center right" },
|
|
3564
|
-
{ label: (0, import_i18n33.__)("Top center", "elementor"), value: "top center" },
|
|
3565
|
-
{ label: (0, import_i18n33.__)("Top left", "elementor"), value: "top left" },
|
|
3566
|
-
{ label: (0, import_i18n33.__)("Top right", "elementor"), value: "top right" },
|
|
3567
|
-
{ label: (0, import_i18n33.__)("Bottom center", "elementor"), value: "bottom center" },
|
|
3568
|
-
{ label: (0, import_i18n33.__)("Bottom left", "elementor"), value: "bottom left" },
|
|
3569
|
-
{ label: (0, import_i18n33.__)("Bottom right", "elementor"), value: "bottom right" }
|
|
3570
|
-
];
|
|
3581
|
+
var React62 = __toESM(require("react"));
|
|
3582
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
3571
3583
|
var ObjectPositionField = () => {
|
|
3572
|
-
return /* @__PURE__ */
|
|
3584
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "object-position" }, /* @__PURE__ */ React62.createElement(import_editor_controls32.PositionControl, null));
|
|
3573
3585
|
};
|
|
3574
3586
|
|
|
3575
3587
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
3576
|
-
var
|
|
3577
|
-
var
|
|
3588
|
+
var React63 = __toESM(require("react"));
|
|
3589
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
3578
3590
|
var import_icons18 = require("@elementor/icons");
|
|
3579
3591
|
var import_ui51 = require("@elementor/ui");
|
|
3580
3592
|
var import_i18n34 = require("@wordpress/i18n");
|
|
@@ -3582,24 +3594,24 @@ var options6 = [
|
|
|
3582
3594
|
{
|
|
3583
3595
|
value: "visible",
|
|
3584
3596
|
label: (0, import_i18n34.__)("Visible", "elementor"),
|
|
3585
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3597
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(import_icons18.EyeIcon, { fontSize: size }),
|
|
3586
3598
|
showTooltip: true
|
|
3587
3599
|
},
|
|
3588
3600
|
{
|
|
3589
3601
|
value: "hidden",
|
|
3590
3602
|
label: (0, import_i18n34.__)("Hidden", "elementor"),
|
|
3591
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3603
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(import_icons18.EyeOffIcon, { fontSize: size }),
|
|
3592
3604
|
showTooltip: true
|
|
3593
3605
|
},
|
|
3594
3606
|
{
|
|
3595
3607
|
value: "auto",
|
|
3596
3608
|
label: (0, import_i18n34.__)("Auto", "elementor"),
|
|
3597
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3609
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(import_icons18.LetterAIcon, { fontSize: size }),
|
|
3598
3610
|
showTooltip: true
|
|
3599
3611
|
}
|
|
3600
3612
|
];
|
|
3601
3613
|
var OverflowField = () => {
|
|
3602
|
-
return /* @__PURE__ */
|
|
3614
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React63.createElement(import_ui51.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React63.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, (0, import_i18n34.__)("Overflow", "elementor"))), /* @__PURE__ */ React63.createElement(import_ui51.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React63.createElement(import_editor_controls33.ToggleControl, { options: options6 }))));
|
|
3603
3615
|
};
|
|
3604
3616
|
|
|
3605
3617
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -3637,64 +3649,64 @@ var CssSizeProps = [
|
|
|
3637
3649
|
]
|
|
3638
3650
|
];
|
|
3639
3651
|
var SizeSection = () => {
|
|
3640
|
-
const
|
|
3652
|
+
const { value: fitValue } = useStylesField("object-fit");
|
|
3641
3653
|
const isNotFill = fitValue && fitValue?.value !== "fill";
|
|
3642
|
-
const gridRowRefs = [(0,
|
|
3654
|
+
const gridRowRefs = [(0, import_react29.useRef)(), (0, import_react29.useRef)(), (0, import_react29.useRef)()];
|
|
3643
3655
|
const isVersion330Active = (0, import_editor_v1_adapters12.isExperimentActive)(EXPERIMENT_ID);
|
|
3644
|
-
return /* @__PURE__ */
|
|
3656
|
+
return /* @__PURE__ */ React64.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React64.createElement(import_ui52.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React64.createElement(import_ui52.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React64.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(import_ui52.Stack, null, /* @__PURE__ */ React64.createElement(OverflowField, null)), isVersion330Active && /* @__PURE__ */ React64.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React64.createElement(import_ui52.Stack, { gap: 2 }, /* @__PURE__ */ React64.createElement(StylesField, { bind: "aspect-ratio" }, /* @__PURE__ */ React64.createElement(import_editor_controls34.AspectRatioControl, { label: (0, import_i18n35.__)("Aspect Ratio", "elementor") })), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(ObjectFitField, null), isNotFill && /* @__PURE__ */ React64.createElement(import_ui52.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React64.createElement(ObjectPositionField, null)))));
|
|
3645
3657
|
};
|
|
3646
3658
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
3647
|
-
return /* @__PURE__ */
|
|
3659
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind }, /* @__PURE__ */ React64.createElement(import_ui52.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React64.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React64.createElement(ControlLabel, null, label)), /* @__PURE__ */ React64.createElement(import_ui52.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React64.createElement(import_editor_controls34.SizeControl, { extendedOptions, anchorRef: rowRef }))));
|
|
3648
3660
|
};
|
|
3649
3661
|
|
|
3650
3662
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
3651
|
-
var
|
|
3652
|
-
var
|
|
3663
|
+
var React65 = __toESM(require("react"));
|
|
3664
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
3653
3665
|
var import_i18n36 = require("@wordpress/i18n");
|
|
3654
3666
|
var SpacingSection = () => {
|
|
3655
3667
|
const { isSiteRtl } = useDirection();
|
|
3656
|
-
return /* @__PURE__ */
|
|
3657
|
-
|
|
3668
|
+
return /* @__PURE__ */ React65.createElement(SectionContent, null, /* @__PURE__ */ React65.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React65.createElement(
|
|
3669
|
+
import_editor_controls35.LinkedDimensionsControl,
|
|
3658
3670
|
{
|
|
3659
3671
|
label: (0, import_i18n36.__)("Margin", "elementor"),
|
|
3660
3672
|
isSiteRtl,
|
|
3661
3673
|
extendedOptions: ["auto"]
|
|
3662
3674
|
}
|
|
3663
|
-
)), /* @__PURE__ */
|
|
3675
|
+
)), /* @__PURE__ */ React65.createElement(PanelDivider, null), /* @__PURE__ */ React65.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React65.createElement(import_editor_controls35.LinkedDimensionsControl, { label: (0, import_i18n36.__)("Padding", "elementor"), isSiteRtl })));
|
|
3664
3676
|
};
|
|
3665
3677
|
|
|
3666
3678
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
3667
|
-
var
|
|
3679
|
+
var React81 = __toESM(require("react"));
|
|
3668
3680
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
3669
3681
|
|
|
3670
3682
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
3671
|
-
var
|
|
3672
|
-
var
|
|
3683
|
+
var React66 = __toESM(require("react"));
|
|
3684
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
3673
3685
|
var import_ui53 = require("@elementor/ui");
|
|
3674
3686
|
var import_i18n37 = require("@wordpress/i18n");
|
|
3675
3687
|
var ColumnCountField = () => {
|
|
3676
|
-
return /* @__PURE__ */
|
|
3688
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "column-count" }, /* @__PURE__ */ React66.createElement(import_ui53.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React66.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(ControlLabel, null, (0, import_i18n37.__)("Columns", "elementor"))), /* @__PURE__ */ React66.createElement(import_ui53.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React66.createElement(import_editor_controls36.NumberControl, { shouldForceInt: true, min: 0, step: 1 }))));
|
|
3677
3689
|
};
|
|
3678
3690
|
|
|
3679
3691
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
3680
|
-
var
|
|
3681
|
-
var
|
|
3682
|
-
var
|
|
3692
|
+
var React67 = __toESM(require("react"));
|
|
3693
|
+
var import_react30 = require("react");
|
|
3694
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
3683
3695
|
var import_ui54 = require("@elementor/ui");
|
|
3684
3696
|
var import_i18n38 = require("@wordpress/i18n");
|
|
3685
3697
|
var ColumnGapField = () => {
|
|
3686
|
-
const rowRef = (0,
|
|
3687
|
-
return /* @__PURE__ */
|
|
3698
|
+
const rowRef = (0, import_react30.useRef)();
|
|
3699
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "column-gap" }, /* @__PURE__ */ React67.createElement(import_ui54.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React67.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(ControlLabel, null, (0, import_i18n38.__)("Column gap", "elementor"))), /* @__PURE__ */ React67.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React67.createElement(import_editor_controls37.SizeControl, { anchorRef: rowRef }))));
|
|
3688
3700
|
};
|
|
3689
3701
|
|
|
3690
3702
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
3691
|
-
var
|
|
3692
|
-
var
|
|
3703
|
+
var React68 = __toESM(require("react"));
|
|
3704
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
3693
3705
|
var import_ui55 = require("@elementor/ui");
|
|
3694
3706
|
var import_i18n40 = require("@wordpress/i18n");
|
|
3695
3707
|
|
|
3696
3708
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
3697
|
-
var
|
|
3709
|
+
var import_react31 = require("react");
|
|
3698
3710
|
var import_i18n39 = require("@wordpress/i18n");
|
|
3699
3711
|
var supportedCategories = {
|
|
3700
3712
|
system: (0, import_i18n39.__)("System", "elementor"),
|
|
@@ -3711,7 +3723,7 @@ var getFontFamilies = () => {
|
|
|
3711
3723
|
};
|
|
3712
3724
|
var useFontFamilies = () => {
|
|
3713
3725
|
const fontFamilies = getFontFamilies();
|
|
3714
|
-
return (0,
|
|
3726
|
+
return (0, import_react31.useMemo)(() => {
|
|
3715
3727
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
3716
3728
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
3717
3729
|
if (!supportedCategories[category]) {
|
|
@@ -3736,23 +3748,23 @@ var FontFamilyField = () => {
|
|
|
3736
3748
|
if (fontFamilies.length === 0) {
|
|
3737
3749
|
return null;
|
|
3738
3750
|
}
|
|
3739
|
-
return /* @__PURE__ */
|
|
3751
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React68.createElement(import_ui55.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React68.createElement(import_ui55.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(ControlLabel, null, (0, import_i18n40.__)("Font family", "elementor"))), /* @__PURE__ */ React68.createElement(import_ui55.Grid, { item: true, xs: 6, sx: { minWidth: 0 } }, /* @__PURE__ */ React68.createElement(import_editor_controls38.FontFamilyControl, { fontFamilies }))));
|
|
3740
3752
|
};
|
|
3741
3753
|
|
|
3742
3754
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
3743
|
-
var
|
|
3744
|
-
var
|
|
3745
|
-
var
|
|
3755
|
+
var React69 = __toESM(require("react"));
|
|
3756
|
+
var import_react32 = require("react");
|
|
3757
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
3746
3758
|
var import_ui56 = require("@elementor/ui");
|
|
3747
3759
|
var import_i18n41 = require("@wordpress/i18n");
|
|
3748
3760
|
var FontSizeField = () => {
|
|
3749
|
-
const rowRef = (0,
|
|
3750
|
-
return /* @__PURE__ */
|
|
3761
|
+
const rowRef = (0, import_react32.useRef)();
|
|
3762
|
+
return /* @__PURE__ */ React69.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React69.createElement(import_ui56.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React69.createElement(import_ui56.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(ControlLabel, null, (0, import_i18n41.__)("Font size", "elementor"))), /* @__PURE__ */ React69.createElement(import_ui56.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(import_editor_controls39.SizeControl, { anchorRef: rowRef }))));
|
|
3751
3763
|
};
|
|
3752
3764
|
|
|
3753
3765
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
3754
|
-
var
|
|
3755
|
-
var
|
|
3766
|
+
var React70 = __toESM(require("react"));
|
|
3767
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
3756
3768
|
var import_icons19 = require("@elementor/icons");
|
|
3757
3769
|
var import_ui57 = require("@elementor/ui");
|
|
3758
3770
|
var import_i18n42 = require("@wordpress/i18n");
|
|
@@ -3760,21 +3772,21 @@ var options7 = [
|
|
|
3760
3772
|
{
|
|
3761
3773
|
value: "normal",
|
|
3762
3774
|
label: (0, import_i18n42.__)("Normal", "elementor"),
|
|
3763
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3775
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(import_icons19.MinusIcon, { fontSize: size }),
|
|
3764
3776
|
showTooltip: true
|
|
3765
3777
|
},
|
|
3766
3778
|
{
|
|
3767
3779
|
value: "italic",
|
|
3768
3780
|
label: (0, import_i18n42.__)("Italic", "elementor"),
|
|
3769
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3781
|
+
renderContent: ({ size }) => /* @__PURE__ */ React70.createElement(import_icons19.ItalicIcon, { fontSize: size }),
|
|
3770
3782
|
showTooltip: true
|
|
3771
3783
|
}
|
|
3772
3784
|
];
|
|
3773
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
3785
|
+
var FontStyleField = () => /* @__PURE__ */ React70.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React70.createElement(import_ui57.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React70.createElement(import_ui57.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React70.createElement(import_editor_controls40.ControlFormLabel, null, (0, import_i18n42.__)("Font style", "elementor"))), /* @__PURE__ */ React70.createElement(import_ui57.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React70.createElement(import_editor_controls40.ToggleControl, { options: options7 }))));
|
|
3774
3786
|
|
|
3775
3787
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
3776
|
-
var
|
|
3777
|
-
var
|
|
3788
|
+
var React71 = __toESM(require("react"));
|
|
3789
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
3778
3790
|
var import_ui58 = require("@elementor/ui");
|
|
3779
3791
|
var import_i18n43 = require("@wordpress/i18n");
|
|
3780
3792
|
var fontWeightOptions = [
|
|
@@ -3789,34 +3801,34 @@ var fontWeightOptions = [
|
|
|
3789
3801
|
{ value: "900", label: (0, import_i18n43.__)("900 - Black", "elementor") }
|
|
3790
3802
|
];
|
|
3791
3803
|
var FontWeightField = () => {
|
|
3792
|
-
return /* @__PURE__ */
|
|
3804
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React71.createElement(import_ui58.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React71.createElement(import_ui58.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React71.createElement(ControlLabel, null, (0, import_i18n43.__)("Font weight", "elementor"))), /* @__PURE__ */ React71.createElement(import_ui58.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React71.createElement(import_editor_controls41.SelectControl, { options: fontWeightOptions }))));
|
|
3793
3805
|
};
|
|
3794
3806
|
|
|
3795
3807
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
3796
|
-
var
|
|
3797
|
-
var
|
|
3798
|
-
var
|
|
3808
|
+
var React72 = __toESM(require("react"));
|
|
3809
|
+
var import_react33 = require("react");
|
|
3810
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
3799
3811
|
var import_ui59 = require("@elementor/ui");
|
|
3800
3812
|
var import_i18n44 = require("@wordpress/i18n");
|
|
3801
3813
|
var LetterSpacingField = () => {
|
|
3802
|
-
const rowRef = (0,
|
|
3803
|
-
return /* @__PURE__ */
|
|
3814
|
+
const rowRef = (0, import_react33.useRef)();
|
|
3815
|
+
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React72.createElement(import_ui59.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React72.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlLabel, null, (0, import_i18n44.__)("Letter spacing", "elementor"))), /* @__PURE__ */ React72.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(import_editor_controls42.SizeControl, { anchorRef: rowRef }))));
|
|
3804
3816
|
};
|
|
3805
3817
|
|
|
3806
3818
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
3807
|
-
var
|
|
3808
|
-
var
|
|
3809
|
-
var
|
|
3819
|
+
var React73 = __toESM(require("react"));
|
|
3820
|
+
var import_react34 = require("react");
|
|
3821
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
3810
3822
|
var import_ui60 = require("@elementor/ui");
|
|
3811
3823
|
var import_i18n45 = require("@wordpress/i18n");
|
|
3812
3824
|
var LineHeightField = () => {
|
|
3813
|
-
const rowRef = (0,
|
|
3814
|
-
return /* @__PURE__ */
|
|
3825
|
+
const rowRef = (0, import_react34.useRef)();
|
|
3826
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React73.createElement(import_ui60.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React73.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(ControlLabel, null, (0, import_i18n45.__)("Line height", "elementor"))), /* @__PURE__ */ React73.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(import_editor_controls43.SizeControl, { anchorRef: rowRef }))));
|
|
3815
3827
|
};
|
|
3816
3828
|
|
|
3817
3829
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
3818
|
-
var
|
|
3819
|
-
var
|
|
3830
|
+
var React74 = __toESM(require("react"));
|
|
3831
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
3820
3832
|
var import_icons20 = require("@elementor/icons");
|
|
3821
3833
|
var import_ui61 = require("@elementor/ui");
|
|
3822
3834
|
var import_i18n46 = require("@wordpress/i18n");
|
|
@@ -3826,44 +3838,44 @@ var options8 = [
|
|
|
3826
3838
|
{
|
|
3827
3839
|
value: "start",
|
|
3828
3840
|
label: (0, import_i18n46.__)("Start", "elementor"),
|
|
3829
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3841
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(AlignStartIcon, { fontSize: size }),
|
|
3830
3842
|
showTooltip: true
|
|
3831
3843
|
},
|
|
3832
3844
|
{
|
|
3833
3845
|
value: "center",
|
|
3834
3846
|
label: (0, import_i18n46.__)("Center", "elementor"),
|
|
3835
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3847
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(import_icons20.AlignCenterIcon, { fontSize: size }),
|
|
3836
3848
|
showTooltip: true
|
|
3837
3849
|
},
|
|
3838
3850
|
{
|
|
3839
3851
|
value: "end",
|
|
3840
3852
|
label: (0, import_i18n46.__)("End", "elementor"),
|
|
3841
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3853
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(AlignEndIcon, { fontSize: size }),
|
|
3842
3854
|
showTooltip: true
|
|
3843
3855
|
},
|
|
3844
3856
|
{
|
|
3845
3857
|
value: "justify",
|
|
3846
3858
|
label: (0, import_i18n46.__)("Justify", "elementor"),
|
|
3847
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3859
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(import_icons20.AlignJustifiedIcon, { fontSize: size }),
|
|
3848
3860
|
showTooltip: true
|
|
3849
3861
|
}
|
|
3850
3862
|
];
|
|
3851
3863
|
var TextAlignmentField = () => {
|
|
3852
|
-
return /* @__PURE__ */
|
|
3864
|
+
return /* @__PURE__ */ React74.createElement(UiProviders, null, /* @__PURE__ */ React74.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React74.createElement(import_ui61.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React74.createElement(import_ui61.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(ControlLabel, null, (0, import_i18n46.__)("Text align", "elementor"))), /* @__PURE__ */ React74.createElement(import_ui61.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React74.createElement(import_editor_controls44.ToggleControl, { options: options8 })))));
|
|
3853
3865
|
};
|
|
3854
3866
|
|
|
3855
3867
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
3856
|
-
var
|
|
3857
|
-
var
|
|
3868
|
+
var React75 = __toESM(require("react"));
|
|
3869
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
3858
3870
|
var import_ui62 = require("@elementor/ui");
|
|
3859
3871
|
var import_i18n47 = require("@wordpress/i18n");
|
|
3860
3872
|
var TextColorField = () => {
|
|
3861
|
-
return /* @__PURE__ */
|
|
3873
|
+
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React75.createElement(import_ui62.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React75.createElement(import_ui62.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlLabel, null, (0, import_i18n47.__)("Text color", "elementor"))), /* @__PURE__ */ React75.createElement(import_ui62.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(import_editor_controls45.ColorControl, null))));
|
|
3862
3874
|
};
|
|
3863
3875
|
|
|
3864
3876
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
3865
|
-
var
|
|
3866
|
-
var
|
|
3877
|
+
var React76 = __toESM(require("react"));
|
|
3878
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
3867
3879
|
var import_icons21 = require("@elementor/icons");
|
|
3868
3880
|
var import_ui63 = require("@elementor/ui");
|
|
3869
3881
|
var import_i18n48 = require("@wordpress/i18n");
|
|
@@ -3871,34 +3883,34 @@ var options9 = [
|
|
|
3871
3883
|
{
|
|
3872
3884
|
value: "none",
|
|
3873
3885
|
label: (0, import_i18n48.__)("None", "elementor"),
|
|
3874
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3886
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons21.MinusIcon, { fontSize: size }),
|
|
3875
3887
|
showTooltip: true,
|
|
3876
3888
|
exclusive: true
|
|
3877
3889
|
},
|
|
3878
3890
|
{
|
|
3879
3891
|
value: "underline",
|
|
3880
3892
|
label: (0, import_i18n48.__)("Underline", "elementor"),
|
|
3881
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3893
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons21.UnderlineIcon, { fontSize: size }),
|
|
3882
3894
|
showTooltip: true
|
|
3883
3895
|
},
|
|
3884
3896
|
{
|
|
3885
3897
|
value: "line-through",
|
|
3886
3898
|
label: (0, import_i18n48.__)("Line-through", "elementor"),
|
|
3887
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3899
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons21.StrikethroughIcon, { fontSize: size }),
|
|
3888
3900
|
showTooltip: true
|
|
3889
3901
|
},
|
|
3890
3902
|
{
|
|
3891
3903
|
value: "overline",
|
|
3892
3904
|
label: (0, import_i18n48.__)("Overline", "elementor"),
|
|
3893
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3905
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons21.OverlineIcon, { fontSize: size }),
|
|
3894
3906
|
showTooltip: true
|
|
3895
3907
|
}
|
|
3896
3908
|
];
|
|
3897
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3909
|
+
var TextDecorationField = () => /* @__PURE__ */ React76.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React76.createElement(import_ui63.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React76.createElement(import_ui63.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(ControlLabel, null, (0, import_i18n48.__)("Line decoration", "elementor"))), /* @__PURE__ */ React76.createElement(import_ui63.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React76.createElement(import_editor_controls46.ToggleControl, { options: options9, exclusive: false }))));
|
|
3898
3910
|
|
|
3899
3911
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
3900
|
-
var
|
|
3901
|
-
var
|
|
3912
|
+
var React77 = __toESM(require("react"));
|
|
3913
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
3902
3914
|
var import_icons22 = require("@elementor/icons");
|
|
3903
3915
|
var import_ui64 = require("@elementor/ui");
|
|
3904
3916
|
var import_i18n49 = require("@wordpress/i18n");
|
|
@@ -3906,23 +3918,23 @@ var options10 = [
|
|
|
3906
3918
|
{
|
|
3907
3919
|
value: "ltr",
|
|
3908
3920
|
label: (0, import_i18n49.__)("Left to right", "elementor"),
|
|
3909
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3921
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons22.TextDirectionLtrIcon, { fontSize: size }),
|
|
3910
3922
|
showTooltip: true
|
|
3911
3923
|
},
|
|
3912
3924
|
{
|
|
3913
3925
|
value: "rtl",
|
|
3914
3926
|
label: (0, import_i18n49.__)("Right to left", "elementor"),
|
|
3915
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3927
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons22.TextDirectionRtlIcon, { fontSize: size }),
|
|
3916
3928
|
showTooltip: true
|
|
3917
3929
|
}
|
|
3918
3930
|
];
|
|
3919
3931
|
var TextDirectionField = () => {
|
|
3920
|
-
return /* @__PURE__ */
|
|
3932
|
+
return /* @__PURE__ */ React77.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React77.createElement(import_ui64.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React77.createElement(import_ui64.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(ControlLabel, null, (0, import_i18n49.__)("Direction", "elementor"))), /* @__PURE__ */ React77.createElement(import_ui64.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React77.createElement(import_editor_controls47.ToggleControl, { options: options10 }))));
|
|
3921
3933
|
};
|
|
3922
3934
|
|
|
3923
3935
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
3924
|
-
var
|
|
3925
|
-
var
|
|
3936
|
+
var React78 = __toESM(require("react"));
|
|
3937
|
+
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
3926
3938
|
var import_i18n50 = require("@wordpress/i18n");
|
|
3927
3939
|
var initTextStroke = {
|
|
3928
3940
|
$$type: "stroke",
|
|
@@ -3941,31 +3953,30 @@ var initTextStroke = {
|
|
|
3941
3953
|
}
|
|
3942
3954
|
};
|
|
3943
3955
|
var TextStrokeField = () => {
|
|
3944
|
-
const { canEdit } =
|
|
3945
|
-
const [textStroke, setTextStroke] = useStylesField("stroke");
|
|
3956
|
+
const { value, setValue, canEdit } = useStylesField("stroke");
|
|
3946
3957
|
const addTextStroke = () => {
|
|
3947
|
-
|
|
3958
|
+
setValue(initTextStroke);
|
|
3948
3959
|
};
|
|
3949
3960
|
const removeTextStroke = () => {
|
|
3950
|
-
|
|
3961
|
+
setValue(null);
|
|
3951
3962
|
};
|
|
3952
|
-
const hasTextStroke = Boolean(
|
|
3953
|
-
return /* @__PURE__ */
|
|
3963
|
+
const hasTextStroke = Boolean(value);
|
|
3964
|
+
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React78.createElement(
|
|
3954
3965
|
AddOrRemoveContent,
|
|
3955
3966
|
{
|
|
3956
3967
|
isAdded: hasTextStroke,
|
|
3957
3968
|
onAdd: addTextStroke,
|
|
3958
3969
|
onRemove: removeTextStroke,
|
|
3959
3970
|
disabled: !canEdit,
|
|
3960
|
-
renderLabel: () => /* @__PURE__ */
|
|
3971
|
+
renderLabel: () => /* @__PURE__ */ React78.createElement(ControlLabel, null, (0, import_i18n50.__)("Text stroke", "elementor"))
|
|
3961
3972
|
},
|
|
3962
|
-
/* @__PURE__ */
|
|
3973
|
+
/* @__PURE__ */ React78.createElement(import_editor_controls48.StrokeControl, null)
|
|
3963
3974
|
));
|
|
3964
3975
|
};
|
|
3965
3976
|
|
|
3966
3977
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
3967
|
-
var
|
|
3968
|
-
var
|
|
3978
|
+
var React79 = __toESM(require("react"));
|
|
3979
|
+
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
3969
3980
|
var import_icons23 = require("@elementor/icons");
|
|
3970
3981
|
var import_ui65 = require("@elementor/ui");
|
|
3971
3982
|
var import_i18n51 = require("@wordpress/i18n");
|
|
@@ -3973,47 +3984,47 @@ var options11 = [
|
|
|
3973
3984
|
{
|
|
3974
3985
|
value: "none",
|
|
3975
3986
|
label: (0, import_i18n51.__)("None", "elementor"),
|
|
3976
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3987
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(import_icons23.MinusIcon, { fontSize: size }),
|
|
3977
3988
|
showTooltip: true
|
|
3978
3989
|
},
|
|
3979
3990
|
{
|
|
3980
3991
|
value: "capitalize",
|
|
3981
3992
|
label: (0, import_i18n51.__)("Capitalize", "elementor"),
|
|
3982
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3993
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(import_icons23.LetterCaseIcon, { fontSize: size }),
|
|
3983
3994
|
showTooltip: true
|
|
3984
3995
|
},
|
|
3985
3996
|
{
|
|
3986
3997
|
value: "uppercase",
|
|
3987
3998
|
label: (0, import_i18n51.__)("Uppercase", "elementor"),
|
|
3988
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3999
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(import_icons23.LetterCaseUpperIcon, { fontSize: size }),
|
|
3989
4000
|
showTooltip: true
|
|
3990
4001
|
},
|
|
3991
4002
|
{
|
|
3992
4003
|
value: "lowercase",
|
|
3993
4004
|
label: (0, import_i18n51.__)("Lowercase", "elementor"),
|
|
3994
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4005
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(import_icons23.LetterCaseLowerIcon, { fontSize: size }),
|
|
3995
4006
|
showTooltip: true
|
|
3996
4007
|
}
|
|
3997
4008
|
];
|
|
3998
|
-
var TransformField = () => /* @__PURE__ */
|
|
4009
|
+
var TransformField = () => /* @__PURE__ */ React79.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React79.createElement(import_ui65.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React79.createElement(import_ui65.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React79.createElement(ControlLabel, null, (0, import_i18n51.__)("Text transform", "elementor"))), /* @__PURE__ */ React79.createElement(import_ui65.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React79.createElement(import_editor_controls49.ToggleControl, { options: options11 }))));
|
|
3999
4010
|
|
|
4000
4011
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4001
|
-
var
|
|
4002
|
-
var
|
|
4003
|
-
var
|
|
4012
|
+
var React80 = __toESM(require("react"));
|
|
4013
|
+
var import_react35 = require("react");
|
|
4014
|
+
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
4004
4015
|
var import_ui66 = require("@elementor/ui");
|
|
4005
4016
|
var import_i18n52 = require("@wordpress/i18n");
|
|
4006
4017
|
var WordSpacingField = () => {
|
|
4007
|
-
const rowRef = (0,
|
|
4008
|
-
return /* @__PURE__ */
|
|
4018
|
+
const rowRef = (0, import_react35.useRef)();
|
|
4019
|
+
return /* @__PURE__ */ React80.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRef }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(ControlLabel, null, (0, import_i18n52.__)("Word spacing", "elementor"))), /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(import_editor_controls50.SizeControl, { anchorRef: rowRef }))));
|
|
4009
4020
|
};
|
|
4010
4021
|
|
|
4011
4022
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4012
4023
|
var TypographySection = () => {
|
|
4013
|
-
const
|
|
4014
|
-
const isVersion330Active = (0, import_editor_v1_adapters13.isExperimentActive)("e_v_3_30");
|
|
4024
|
+
const { value: columnCount } = useStylesField("column-count");
|
|
4015
4025
|
const hasMultiColumns = !!(columnCount?.value && columnCount?.value > 1);
|
|
4016
|
-
|
|
4026
|
+
const isVersion330Active = (0, import_editor_v1_adapters13.isExperimentActive)("e_v_3_30");
|
|
4027
|
+
return /* @__PURE__ */ React81.createElement(SectionContent, null, /* @__PURE__ */ React81.createElement(FontFamilyField, null), /* @__PURE__ */ React81.createElement(FontWeightField, null), /* @__PURE__ */ React81.createElement(FontSizeField, null), /* @__PURE__ */ React81.createElement(PanelDivider, null), /* @__PURE__ */ React81.createElement(TextAlignmentField, null), /* @__PURE__ */ React81.createElement(TextColorField, null), /* @__PURE__ */ React81.createElement(
|
|
4017
4028
|
StyleTabCollapsibleContent,
|
|
4018
4029
|
{
|
|
4019
4030
|
fields: [
|
|
@@ -4028,19 +4039,19 @@ var TypographySection = () => {
|
|
|
4028
4039
|
"stroke"
|
|
4029
4040
|
]
|
|
4030
4041
|
},
|
|
4031
|
-
/* @__PURE__ */
|
|
4042
|
+
/* @__PURE__ */ React81.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React81.createElement(LineHeightField, null), /* @__PURE__ */ React81.createElement(LetterSpacingField, null), /* @__PURE__ */ React81.createElement(WordSpacingField, null), isVersion330Active && /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(ColumnCountField, null), hasMultiColumns && /* @__PURE__ */ React81.createElement(ColumnGapField, null)), /* @__PURE__ */ React81.createElement(PanelDivider, null), /* @__PURE__ */ React81.createElement(TextDecorationField, null), /* @__PURE__ */ React81.createElement(TransformField, null), /* @__PURE__ */ React81.createElement(TextDirectionField, null), /* @__PURE__ */ React81.createElement(FontStyleField, null), /* @__PURE__ */ React81.createElement(TextStrokeField, null))
|
|
4032
4043
|
));
|
|
4033
4044
|
};
|
|
4034
4045
|
|
|
4035
4046
|
// src/components/style-tab-section.tsx
|
|
4036
|
-
var
|
|
4047
|
+
var React82 = __toESM(require("react"));
|
|
4037
4048
|
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
4038
4049
|
var StyleTabSection = ({ section, fields = [] }) => {
|
|
4039
4050
|
const { component, name, title } = section;
|
|
4040
4051
|
const tabDefaults = useDefaultPanelSettings();
|
|
4041
4052
|
const SectionComponent = component;
|
|
4042
4053
|
const isExpanded = (0, import_editor_v1_adapters14.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? tabDefaults.defaultSectionsExpanded.style?.includes(name) : false;
|
|
4043
|
-
return /* @__PURE__ */
|
|
4054
|
+
return /* @__PURE__ */ React82.createElement(Section, { title, defaultExpanded: isExpanded, titleEnd: getStylesInheritanceIndicators(fields) }, /* @__PURE__ */ React82.createElement(SectionComponent, null));
|
|
4044
4055
|
};
|
|
4045
4056
|
|
|
4046
4057
|
// src/components/style-tab.tsx
|
|
@@ -4055,9 +4066,9 @@ var stickyHeaderStyles = {
|
|
|
4055
4066
|
var StyleTab = () => {
|
|
4056
4067
|
const currentClassesProp = useCurrentClassesProp();
|
|
4057
4068
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
4058
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
4069
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react36.useState)(null);
|
|
4059
4070
|
const breakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
4060
|
-
return /* @__PURE__ */
|
|
4071
|
+
return /* @__PURE__ */ React83.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React83.createElement(
|
|
4061
4072
|
StyleProvider,
|
|
4062
4073
|
{
|
|
4063
4074
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -4068,7 +4079,7 @@ var StyleTab = () => {
|
|
|
4068
4079
|
},
|
|
4069
4080
|
setMetaState: setActiveStyleState
|
|
4070
4081
|
},
|
|
4071
|
-
/* @__PURE__ */
|
|
4082
|
+
/* @__PURE__ */ React83.createElement(import_session4.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React83.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React83.createElement(ClassesHeader, null, /* @__PURE__ */ React83.createElement(CssClassSelector, null), /* @__PURE__ */ React83.createElement(import_ui67.Divider, null)), /* @__PURE__ */ React83.createElement(SectionsList, null, /* @__PURE__ */ React83.createElement(
|
|
4072
4083
|
StyleTabSection,
|
|
4073
4084
|
{
|
|
4074
4085
|
section: {
|
|
@@ -4087,7 +4098,7 @@ var StyleTab = () => {
|
|
|
4087
4098
|
"gap"
|
|
4088
4099
|
]
|
|
4089
4100
|
}
|
|
4090
|
-
), /* @__PURE__ */
|
|
4101
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4091
4102
|
StyleTabSection,
|
|
4092
4103
|
{
|
|
4093
4104
|
section: {
|
|
@@ -4097,7 +4108,7 @@ var StyleTab = () => {
|
|
|
4097
4108
|
},
|
|
4098
4109
|
fields: ["margin", "padding"]
|
|
4099
4110
|
}
|
|
4100
|
-
), /* @__PURE__ */
|
|
4111
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4101
4112
|
StyleTabSection,
|
|
4102
4113
|
{
|
|
4103
4114
|
section: {
|
|
@@ -4117,7 +4128,7 @@ var StyleTab = () => {
|
|
|
4117
4128
|
"object-fit"
|
|
4118
4129
|
]
|
|
4119
4130
|
}
|
|
4120
|
-
), /* @__PURE__ */
|
|
4131
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4121
4132
|
StyleTabSection,
|
|
4122
4133
|
{
|
|
4123
4134
|
section: {
|
|
@@ -4127,7 +4138,7 @@ var StyleTab = () => {
|
|
|
4127
4138
|
},
|
|
4128
4139
|
fields: ["position", "z-index", "scroll-margin-top"]
|
|
4129
4140
|
}
|
|
4130
|
-
), /* @__PURE__ */
|
|
4141
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4131
4142
|
StyleTabSection,
|
|
4132
4143
|
{
|
|
4133
4144
|
section: {
|
|
@@ -4152,7 +4163,7 @@ var StyleTab = () => {
|
|
|
4152
4163
|
"stroke"
|
|
4153
4164
|
]
|
|
4154
4165
|
}
|
|
4155
|
-
), /* @__PURE__ */
|
|
4166
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4156
4167
|
StyleTabSection,
|
|
4157
4168
|
{
|
|
4158
4169
|
section: {
|
|
@@ -4162,7 +4173,7 @@ var StyleTab = () => {
|
|
|
4162
4173
|
},
|
|
4163
4174
|
fields: ["background"]
|
|
4164
4175
|
}
|
|
4165
|
-
), /* @__PURE__ */
|
|
4176
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4166
4177
|
StyleTabSection,
|
|
4167
4178
|
{
|
|
4168
4179
|
section: {
|
|
@@ -4172,7 +4183,7 @@ var StyleTab = () => {
|
|
|
4172
4183
|
},
|
|
4173
4184
|
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
4174
4185
|
}
|
|
4175
|
-
), /* @__PURE__ */
|
|
4186
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4176
4187
|
StyleTabSection,
|
|
4177
4188
|
{
|
|
4178
4189
|
section: {
|
|
@@ -4187,12 +4198,12 @@ var StyleTab = () => {
|
|
|
4187
4198
|
};
|
|
4188
4199
|
function ClassesHeader({ children }) {
|
|
4189
4200
|
const scrollDirection = useScrollDirection();
|
|
4190
|
-
return /* @__PURE__ */
|
|
4201
|
+
return /* @__PURE__ */ React83.createElement(import_ui67.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4191
4202
|
}
|
|
4192
4203
|
function useCurrentClassesProp() {
|
|
4193
4204
|
const { elementType } = useElement();
|
|
4194
4205
|
const prop = Object.entries(elementType.propsSchema).find(
|
|
4195
|
-
([, propType]) => propType.kind === "plain" && propType.key ===
|
|
4206
|
+
([, propType]) => propType.kind === "plain" && propType.key === import_editor_props10.CLASSES_PROP_KEY
|
|
4196
4207
|
);
|
|
4197
4208
|
if (!prop) {
|
|
4198
4209
|
throw new Error("Element does not have a classes prop");
|
|
@@ -4206,7 +4217,7 @@ var EditingPanelTabs = () => {
|
|
|
4206
4217
|
return (
|
|
4207
4218
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4208
4219
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4209
|
-
/* @__PURE__ */
|
|
4220
|
+
/* @__PURE__ */ React84.createElement(import_react37.Fragment, { key: element.id }, /* @__PURE__ */ React84.createElement(PanelTabContent, null))
|
|
4210
4221
|
);
|
|
4211
4222
|
};
|
|
4212
4223
|
var PanelTabContent = () => {
|
|
@@ -4214,7 +4225,7 @@ var PanelTabContent = () => {
|
|
|
4214
4225
|
const defaultComponentTab = (0, import_editor_v1_adapters15.isExperimentActive)(EXPERIMENTAL_FEATURES.V_3_30) ? editorDefaults.defaultTab : "settings";
|
|
4215
4226
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4216
4227
|
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui68.useTabs)(currentTab);
|
|
4217
|
-
return /* @__PURE__ */
|
|
4228
|
+
return /* @__PURE__ */ React84.createElement(ScrollProvider, null, /* @__PURE__ */ React84.createElement(import_ui68.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React84.createElement(import_ui68.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React84.createElement(
|
|
4218
4229
|
import_ui68.Tabs,
|
|
4219
4230
|
{
|
|
4220
4231
|
variant: "fullWidth",
|
|
@@ -4226,9 +4237,9 @@ var PanelTabContent = () => {
|
|
|
4226
4237
|
setCurrentTab(newValue);
|
|
4227
4238
|
}
|
|
4228
4239
|
},
|
|
4229
|
-
/* @__PURE__ */
|
|
4230
|
-
/* @__PURE__ */
|
|
4231
|
-
), /* @__PURE__ */
|
|
4240
|
+
/* @__PURE__ */ React84.createElement(import_ui68.Tab, { label: (0, import_i18n54.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
4241
|
+
/* @__PURE__ */ React84.createElement(import_ui68.Tab, { label: (0, import_i18n54.__)("Style", "elementor"), ...getTabProps("style") })
|
|
4242
|
+
), /* @__PURE__ */ React84.createElement(import_ui68.Divider, null)), /* @__PURE__ */ React84.createElement(import_ui68.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React84.createElement(SettingsTab, null)), /* @__PURE__ */ React84.createElement(import_ui68.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React84.createElement(StyleTab, null))));
|
|
4232
4243
|
};
|
|
4233
4244
|
|
|
4234
4245
|
// src/components/editing-panel.tsx
|
|
@@ -4241,7 +4252,7 @@ var EditingPanel = () => {
|
|
|
4241
4252
|
return null;
|
|
4242
4253
|
}
|
|
4243
4254
|
const panelTitle = (0, import_i18n55.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4244
|
-
return /* @__PURE__ */
|
|
4255
|
+
return /* @__PURE__ */ React85.createElement(import_ui69.ErrorBoundary, { fallback: /* @__PURE__ */ React85.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React85.createElement(import_session5.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React85.createElement(import_editor_ui4.ThemeProvider, null, /* @__PURE__ */ React85.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React85.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React85.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React85.createElement(import_icons24.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React85.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React85.createElement(import_editor_controls51.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React85.createElement(import_editor_controls51.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React85.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React85.createElement(EditingPanelTabs, null)))))))));
|
|
4245
4256
|
};
|
|
4246
4257
|
|
|
4247
4258
|
// src/panel.ts
|
|
@@ -4257,7 +4268,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
4257
4268
|
var import_editor_v1_adapters17 = require("@elementor/editor-v1-adapters");
|
|
4258
4269
|
|
|
4259
4270
|
// src/hooks/use-open-editor-panel.ts
|
|
4260
|
-
var
|
|
4271
|
+
var import_react38 = require("react");
|
|
4261
4272
|
var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
|
|
4262
4273
|
|
|
4263
4274
|
// src/sync/is-atomic-widget-selected.ts
|
|
@@ -4274,7 +4285,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
4274
4285
|
// src/hooks/use-open-editor-panel.ts
|
|
4275
4286
|
var useOpenEditorPanel = () => {
|
|
4276
4287
|
const { open } = usePanelActions();
|
|
4277
|
-
(0,
|
|
4288
|
+
(0, import_react38.useEffect)(() => {
|
|
4278
4289
|
return (0, import_editor_v1_adapters16.__privateListenTo)((0, import_editor_v1_adapters16.commandStartEvent)("panel/editor/open"), () => {
|
|
4279
4290
|
if (isAtomicWidgetSelected()) {
|
|
4280
4291
|
open();
|
|
@@ -4291,20 +4302,20 @@ var EditingPanelHooks = () => {
|
|
|
4291
4302
|
|
|
4292
4303
|
// src/dynamics/init.ts
|
|
4293
4304
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
4294
|
-
var
|
|
4305
|
+
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
4295
4306
|
|
|
4296
4307
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4297
|
-
var
|
|
4298
|
-
var
|
|
4299
|
-
var
|
|
4308
|
+
var React86 = __toESM(require("react"));
|
|
4309
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
4310
|
+
var import_editor_props12 = require("@elementor/editor-props");
|
|
4300
4311
|
var import_icons25 = require("@elementor/icons");
|
|
4301
4312
|
|
|
4302
4313
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4303
|
-
var
|
|
4314
|
+
var import_react40 = require("react");
|
|
4304
4315
|
|
|
4305
4316
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4306
|
-
var
|
|
4307
|
-
var
|
|
4317
|
+
var import_react39 = require("react");
|
|
4318
|
+
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4308
4319
|
|
|
4309
4320
|
// src/dynamics/sync/get-elementor-config.ts
|
|
4310
4321
|
var getElementorConfig2 = () => {
|
|
@@ -4325,7 +4336,7 @@ var getAtomicDynamicTags = () => {
|
|
|
4325
4336
|
};
|
|
4326
4337
|
|
|
4327
4338
|
// src/dynamics/utils.ts
|
|
4328
|
-
var
|
|
4339
|
+
var import_editor_props11 = require("@elementor/editor-props");
|
|
4329
4340
|
var import_schema = require("@elementor/schema");
|
|
4330
4341
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
4331
4342
|
var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
|
|
@@ -4334,12 +4345,12 @@ var getDynamicPropType = (propType) => {
|
|
|
4334
4345
|
return dynamicPropType && isDynamicPropType(dynamicPropType) ? dynamicPropType : null;
|
|
4335
4346
|
};
|
|
4336
4347
|
var isDynamicPropValue = (prop) => {
|
|
4337
|
-
return (0,
|
|
4348
|
+
return (0, import_editor_props11.isTransformable)(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
|
|
4338
4349
|
};
|
|
4339
4350
|
var supportsDynamic = (propType) => {
|
|
4340
4351
|
return !!getDynamicPropType(propType);
|
|
4341
4352
|
};
|
|
4342
|
-
var dynamicPropTypeUtil = (0,
|
|
4353
|
+
var dynamicPropTypeUtil = (0, import_editor_props11.createPropUtils)(
|
|
4343
4354
|
DYNAMIC_PROP_TYPE_KEY,
|
|
4344
4355
|
import_schema.z.strictObject({
|
|
4345
4356
|
name: import_schema.z.string(),
|
|
@@ -4350,12 +4361,12 @@ var dynamicPropTypeUtil = (0, import_editor_props10.createPropUtils)(
|
|
|
4350
4361
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4351
4362
|
var usePropDynamicTags = () => {
|
|
4352
4363
|
let categories = [];
|
|
4353
|
-
const { propType } = (0,
|
|
4364
|
+
const { propType } = (0, import_editor_controls52.useBoundProp)();
|
|
4354
4365
|
if (propType) {
|
|
4355
4366
|
const propDynamicType = getDynamicPropType(propType);
|
|
4356
4367
|
categories = propDynamicType?.settings.categories || [];
|
|
4357
4368
|
}
|
|
4358
|
-
return (0,
|
|
4369
|
+
return (0, import_react39.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
4359
4370
|
};
|
|
4360
4371
|
var getDynamicTagsByCategories = (categories) => {
|
|
4361
4372
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -4371,38 +4382,38 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
4371
4382
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4372
4383
|
var useDynamicTag = (tagName) => {
|
|
4373
4384
|
const dynamicTags = usePropDynamicTags();
|
|
4374
|
-
return (0,
|
|
4385
|
+
return (0, import_react40.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
4375
4386
|
};
|
|
4376
4387
|
|
|
4377
4388
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4378
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
4389
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React86.createElement(import_icons25.DatabaseIcon, { fontSize: "tiny" });
|
|
4379
4390
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
4380
|
-
const context = (0,
|
|
4381
|
-
return /* @__PURE__ */
|
|
4391
|
+
const context = (0, import_editor_controls53.useBoundProp)(import_editor_props12.backgroundImageOverlayPropTypeUtil);
|
|
4392
|
+
return /* @__PURE__ */ React86.createElement(import_editor_controls53.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React86.createElement(import_editor_controls53.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React86.createElement(Wrapper, { rawValue: value.value })));
|
|
4382
4393
|
};
|
|
4383
4394
|
var Wrapper = ({ rawValue }) => {
|
|
4384
|
-
const { propType } = (0,
|
|
4395
|
+
const { propType } = (0, import_editor_controls53.useBoundProp)();
|
|
4385
4396
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
4386
|
-
return /* @__PURE__ */
|
|
4397
|
+
return /* @__PURE__ */ React86.createElement(import_editor_controls53.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React86.createElement(import_editor_controls53.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React86.createElement(Content, { rawValue: rawValue.image })));
|
|
4387
4398
|
};
|
|
4388
4399
|
var Content = ({ rawValue }) => {
|
|
4389
4400
|
const src = rawValue.value.src;
|
|
4390
4401
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
4391
|
-
return /* @__PURE__ */
|
|
4402
|
+
return /* @__PURE__ */ React86.createElement(React86.Fragment, null, dynamicTag?.label);
|
|
4392
4403
|
};
|
|
4393
4404
|
|
|
4394
4405
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4395
|
-
var
|
|
4396
|
-
var
|
|
4406
|
+
var React90 = __toESM(require("react"));
|
|
4407
|
+
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
4397
4408
|
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
4398
4409
|
var import_icons27 = require("@elementor/icons");
|
|
4399
4410
|
var import_ui72 = require("@elementor/ui");
|
|
4400
4411
|
var import_i18n57 = require("@wordpress/i18n");
|
|
4401
4412
|
|
|
4402
4413
|
// src/components/popover-content.tsx
|
|
4403
|
-
var
|
|
4414
|
+
var React87 = __toESM(require("react"));
|
|
4404
4415
|
var import_ui70 = require("@elementor/ui");
|
|
4405
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
4416
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React87.createElement(import_ui70.Stack, { alignItems, gap, p }, children);
|
|
4406
4417
|
|
|
4407
4418
|
// src/hooks/use-persist-dynamic-value.ts
|
|
4408
4419
|
var import_session6 = require("@elementor/session");
|
|
@@ -4413,10 +4424,10 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
4413
4424
|
};
|
|
4414
4425
|
|
|
4415
4426
|
// src/dynamics/dynamic-control.tsx
|
|
4416
|
-
var
|
|
4417
|
-
var
|
|
4427
|
+
var React88 = __toESM(require("react"));
|
|
4428
|
+
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
4418
4429
|
var DynamicControl = ({ bind, children }) => {
|
|
4419
|
-
const { value, setValue } = (0,
|
|
4430
|
+
const { value, setValue } = (0, import_editor_controls54.useBoundProp)(dynamicPropTypeUtil);
|
|
4420
4431
|
const { name = "", settings } = value ?? {};
|
|
4421
4432
|
const dynamicTag = useDynamicTag(name);
|
|
4422
4433
|
if (!dynamicTag) {
|
|
@@ -4435,70 +4446,78 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
4435
4446
|
});
|
|
4436
4447
|
};
|
|
4437
4448
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
4438
|
-
return /* @__PURE__ */
|
|
4449
|
+
return /* @__PURE__ */ React88.createElement(import_editor_controls54.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React88.createElement(import_editor_controls54.PropKeyProvider, { bind }, children));
|
|
4439
4450
|
};
|
|
4440
4451
|
|
|
4441
4452
|
// src/dynamics/components/dynamic-selection.tsx
|
|
4442
|
-
var
|
|
4443
|
-
var
|
|
4444
|
-
var
|
|
4453
|
+
var import_react41 = require("react");
|
|
4454
|
+
var React89 = __toESM(require("react"));
|
|
4455
|
+
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
4456
|
+
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
4445
4457
|
var import_icons26 = require("@elementor/icons");
|
|
4446
4458
|
var import_ui71 = require("@elementor/ui");
|
|
4447
4459
|
var import_i18n56 = require("@wordpress/i18n");
|
|
4448
4460
|
var SIZE7 = "tiny";
|
|
4449
|
-
var DynamicSelection = ({
|
|
4450
|
-
const [searchValue, setSearchValue] = (0,
|
|
4461
|
+
var DynamicSelection = ({ close: closePopover }) => {
|
|
4462
|
+
const [searchValue, setSearchValue] = (0, import_react41.useState)("");
|
|
4451
4463
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
4452
|
-
const
|
|
4453
|
-
const {
|
|
4464
|
+
const theme = (0, import_ui71.useTheme)();
|
|
4465
|
+
const { value: anyValue } = (0, import_editor_controls55.useBoundProp)();
|
|
4466
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls55.useBoundProp)(dynamicPropTypeUtil);
|
|
4454
4467
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
4455
4468
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
4456
4469
|
const options12 = useFilteredOptions(searchValue);
|
|
4457
4470
|
const hasNoDynamicTags = !options12.length && !searchValue.trim();
|
|
4458
|
-
const handleSearch = (
|
|
4459
|
-
setSearchValue(
|
|
4471
|
+
const handleSearch = (value) => {
|
|
4472
|
+
setSearchValue(value);
|
|
4460
4473
|
};
|
|
4461
|
-
const handleSetDynamicTag = (value
|
|
4474
|
+
const handleSetDynamicTag = (value) => {
|
|
4462
4475
|
if (!isCurrentValueDynamic) {
|
|
4463
4476
|
updatePropValueHistory(anyValue);
|
|
4464
4477
|
}
|
|
4465
|
-
|
|
4466
|
-
|
|
4478
|
+
const selectedOption = options12.flatMap(([, items3]) => items3).find((item) => item.value === value);
|
|
4479
|
+
setValue({ name: value, settings: { label: selectedOption?.label } });
|
|
4480
|
+
closePopover();
|
|
4467
4481
|
};
|
|
4468
|
-
|
|
4469
|
-
|
|
4482
|
+
const virtualizedItems = options12.flatMap(([category, items3]) => [
|
|
4483
|
+
{
|
|
4484
|
+
type: "category",
|
|
4485
|
+
value: category,
|
|
4486
|
+
label: dynamicGroups?.[category]?.title || category
|
|
4487
|
+
},
|
|
4488
|
+
...items3.map((item) => ({
|
|
4489
|
+
type: "item",
|
|
4490
|
+
value: item.value,
|
|
4491
|
+
label: item.label
|
|
4492
|
+
}))
|
|
4493
|
+
]);
|
|
4494
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(
|
|
4495
|
+
import_editor_ui5.PopoverHeader,
|
|
4496
|
+
{
|
|
4497
|
+
title: (0, import_i18n56.__)("Dynamic tags", "elementor"),
|
|
4498
|
+
onClose: closePopover,
|
|
4499
|
+
icon: /* @__PURE__ */ React89.createElement(import_icons26.DatabaseIcon, { fontSize: SIZE7 })
|
|
4500
|
+
}
|
|
4501
|
+
), /* @__PURE__ */ React89.createElement(import_ui71.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React89.createElement(NoDynamicTags, null) : /* @__PURE__ */ React89.createElement(import_react41.Fragment, null, /* @__PURE__ */ React89.createElement(
|
|
4502
|
+
import_editor_ui5.PopoverSearch,
|
|
4470
4503
|
{
|
|
4471
|
-
fullWidth: true,
|
|
4472
|
-
size: SIZE7,
|
|
4473
4504
|
value: searchValue,
|
|
4474
|
-
|
|
4475
|
-
placeholder: (0, import_i18n56.__)("Search dynamic tags\u2026", "elementor")
|
|
4476
|
-
InputProps: {
|
|
4477
|
-
startAdornment: /* @__PURE__ */ React88.createElement(import_ui71.InputAdornment, { position: "start" }, /* @__PURE__ */ React88.createElement(import_icons26.SearchIcon, { fontSize: SIZE7 }))
|
|
4478
|
-
}
|
|
4505
|
+
onSearch: handleSearch,
|
|
4506
|
+
placeholder: (0, import_i18n56.__)("Search dynamic tags\u2026", "elementor")
|
|
4479
4507
|
}
|
|
4480
|
-
)
|
|
4481
|
-
|
|
4508
|
+
), /* @__PURE__ */ React89.createElement(import_ui71.Divider, null), /* @__PURE__ */ React89.createElement(
|
|
4509
|
+
import_editor_ui5.PopoverMenuList,
|
|
4482
4510
|
{
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
key: value,
|
|
4492
|
-
selected: isSelected,
|
|
4493
|
-
autoFocus: isSelected,
|
|
4494
|
-
sx: { px: 3.5, typography: "caption" },
|
|
4495
|
-
onClick: () => handleSetDynamicTag(value, tagLabel)
|
|
4496
|
-
},
|
|
4497
|
-
tagLabel
|
|
4498
|
-
);
|
|
4499
|
-
})))) : /* @__PURE__ */ React88.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
4511
|
+
items: virtualizedItems,
|
|
4512
|
+
onSelect: handleSetDynamicTag,
|
|
4513
|
+
onClose: closePopover,
|
|
4514
|
+
selectedValue: dynamicValue?.name,
|
|
4515
|
+
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
4516
|
+
noResultsComponent: /* @__PURE__ */ React89.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
4517
|
+
}
|
|
4518
|
+
))));
|
|
4500
4519
|
};
|
|
4501
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
4520
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React89.createElement(
|
|
4502
4521
|
import_ui71.Stack,
|
|
4503
4522
|
{
|
|
4504
4523
|
gap: 1,
|
|
@@ -4509,11 +4528,11 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React88.createElem
|
|
|
4509
4528
|
color: "text.secondary",
|
|
4510
4529
|
sx: { pb: 3.5 }
|
|
4511
4530
|
},
|
|
4512
|
-
/* @__PURE__ */
|
|
4513
|
-
/* @__PURE__ */
|
|
4514
|
-
/* @__PURE__ */
|
|
4531
|
+
/* @__PURE__ */ React89.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
4532
|
+
/* @__PURE__ */ React89.createElement(import_ui71.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n56.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React89.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
4533
|
+
/* @__PURE__ */ React89.createElement(import_ui71.Typography, { align: "center", variant: "caption" }, (0, import_i18n56.__)("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React89.createElement(import_ui71.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n56.__)("Clear & try again", "elementor")))
|
|
4515
4534
|
);
|
|
4516
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
4535
|
+
var NoDynamicTags = () => /* @__PURE__ */ React89.createElement(import_ui71.Box, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React89.createElement(import_ui71.Divider, null), /* @__PURE__ */ React89.createElement(
|
|
4517
4536
|
import_ui71.Stack,
|
|
4518
4537
|
{
|
|
4519
4538
|
gap: 1,
|
|
@@ -4524,9 +4543,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React88.createElement(import_ui71.Box,
|
|
|
4524
4543
|
color: "text.secondary",
|
|
4525
4544
|
sx: { pb: 3.5 }
|
|
4526
4545
|
},
|
|
4527
|
-
/* @__PURE__ */
|
|
4528
|
-
/* @__PURE__ */
|
|
4529
|
-
/* @__PURE__ */
|
|
4546
|
+
/* @__PURE__ */ React89.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
4547
|
+
/* @__PURE__ */ React89.createElement(import_ui71.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n56.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
4548
|
+
/* @__PURE__ */ React89.createElement(import_ui71.Typography, { align: "center", variant: "caption" }, (0, import_i18n56.__)("You'll need Elementor Pro to use this feature.", "elementor"))
|
|
4530
4549
|
));
|
|
4531
4550
|
var useFilteredOptions = (searchValue) => {
|
|
4532
4551
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -4547,8 +4566,8 @@ var useFilteredOptions = (searchValue) => {
|
|
|
4547
4566
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4548
4567
|
var SIZE8 = "tiny";
|
|
4549
4568
|
var DynamicSelectionControl = () => {
|
|
4550
|
-
const { setValue: setAnyValue } = (0,
|
|
4551
|
-
const { bind, value } = (0,
|
|
4569
|
+
const { setValue: setAnyValue } = (0, import_editor_controls56.useBoundProp)();
|
|
4570
|
+
const { bind, value } = (0, import_editor_controls56.useBoundProp)(dynamicPropTypeUtil);
|
|
4552
4571
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
4553
4572
|
const selectionPopoverState = (0, import_ui72.usePopupState)({ variant: "popover" });
|
|
4554
4573
|
const { name: tagName = "" } = value;
|
|
@@ -4559,25 +4578,25 @@ var DynamicSelectionControl = () => {
|
|
|
4559
4578
|
if (!dynamicTag) {
|
|
4560
4579
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
4561
4580
|
}
|
|
4562
|
-
return /* @__PURE__ */
|
|
4581
|
+
return /* @__PURE__ */ React90.createElement(import_ui72.Box, null, /* @__PURE__ */ React90.createElement(
|
|
4563
4582
|
import_ui72.UnstableTag,
|
|
4564
4583
|
{
|
|
4565
4584
|
fullWidth: true,
|
|
4566
4585
|
showActionsOnHover: true,
|
|
4567
4586
|
label: dynamicTag.label,
|
|
4568
|
-
startIcon: /* @__PURE__ */
|
|
4587
|
+
startIcon: /* @__PURE__ */ React90.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 }),
|
|
4569
4588
|
...(0, import_ui72.bindTrigger)(selectionPopoverState),
|
|
4570
|
-
actions: /* @__PURE__ */
|
|
4589
|
+
actions: /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React90.createElement(
|
|
4571
4590
|
import_ui72.IconButton,
|
|
4572
4591
|
{
|
|
4573
4592
|
size: SIZE8,
|
|
4574
4593
|
onClick: removeDynamicTag,
|
|
4575
4594
|
"aria-label": (0, import_i18n57.__)("Remove dynamic value", "elementor")
|
|
4576
4595
|
},
|
|
4577
|
-
/* @__PURE__ */
|
|
4596
|
+
/* @__PURE__ */ React90.createElement(import_icons27.XIcon, { fontSize: SIZE8 })
|
|
4578
4597
|
))
|
|
4579
4598
|
}
|
|
4580
|
-
), /* @__PURE__ */
|
|
4599
|
+
), /* @__PURE__ */ React90.createElement(
|
|
4581
4600
|
import_ui72.Popover,
|
|
4582
4601
|
{
|
|
4583
4602
|
disablePortal: true,
|
|
@@ -4585,14 +4604,7 @@ var DynamicSelectionControl = () => {
|
|
|
4585
4604
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
4586
4605
|
...(0, import_ui72.bindPopover)(selectionPopoverState)
|
|
4587
4606
|
},
|
|
4588
|
-
/* @__PURE__ */
|
|
4589
|
-
import_editor_ui6.PopoverHeader,
|
|
4590
|
-
{
|
|
4591
|
-
title: (0, import_i18n57.__)("Dynamic tags", "elementor"),
|
|
4592
|
-
onClose: selectionPopoverState.close,
|
|
4593
|
-
icon: /* @__PURE__ */ React89.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 })
|
|
4594
|
-
}
|
|
4595
|
-
), /* @__PURE__ */ React89.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
4607
|
+
/* @__PURE__ */ React90.createElement(import_ui72.Stack, null, /* @__PURE__ */ React90.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
4596
4608
|
));
|
|
4597
4609
|
};
|
|
4598
4610
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -4601,7 +4613,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
4601
4613
|
if (!hasDynamicSettings) {
|
|
4602
4614
|
return null;
|
|
4603
4615
|
}
|
|
4604
|
-
return /* @__PURE__ */
|
|
4616
|
+
return /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(import_ui72.IconButton, { size: SIZE8, ...(0, import_ui72.bindTrigger)(popupState), "aria-label": (0, import_i18n57.__)("Settings", "elementor") }, /* @__PURE__ */ React90.createElement(import_icons27.SettingsIcon, { fontSize: SIZE8 })), /* @__PURE__ */ React90.createElement(
|
|
4605
4617
|
import_ui72.Popover,
|
|
4606
4618
|
{
|
|
4607
4619
|
disablePortal: true,
|
|
@@ -4609,14 +4621,15 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
4609
4621
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
4610
4622
|
...(0, import_ui72.bindPopover)(popupState)
|
|
4611
4623
|
},
|
|
4612
|
-
/* @__PURE__ */
|
|
4624
|
+
/* @__PURE__ */ React90.createElement(
|
|
4613
4625
|
import_editor_ui6.PopoverHeader,
|
|
4614
4626
|
{
|
|
4615
4627
|
title: dynamicTag.label,
|
|
4616
4628
|
onClose: popupState.close,
|
|
4617
|
-
icon: /* @__PURE__ */
|
|
4629
|
+
icon: /* @__PURE__ */ React90.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE8 })
|
|
4618
4630
|
}
|
|
4619
|
-
),
|
|
4631
|
+
),
|
|
4632
|
+
/* @__PURE__ */ React90.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls })
|
|
4620
4633
|
));
|
|
4621
4634
|
};
|
|
4622
4635
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -4625,10 +4638,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
4625
4638
|
if (!tabs.length) {
|
|
4626
4639
|
return null;
|
|
4627
4640
|
}
|
|
4628
|
-
return /* @__PURE__ */
|
|
4629
|
-
return /* @__PURE__ */
|
|
4641
|
+
return /* @__PURE__ */ React90.createElement(import_editor_ui6.PopoverScrollableContent, null, /* @__PURE__ */ React90.createElement(import_ui72.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React90.createElement(import_ui72.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React90.createElement(import_ui72.Divider, null), tabs.map(({ value }, index) => {
|
|
4642
|
+
return /* @__PURE__ */ React90.createElement(import_ui72.TabPanel, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React90.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
4630
4643
|
if (item.type === "control") {
|
|
4631
|
-
return /* @__PURE__ */
|
|
4644
|
+
return /* @__PURE__ */ React90.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
4632
4645
|
}
|
|
4633
4646
|
return null;
|
|
4634
4647
|
})));
|
|
@@ -4638,16 +4651,16 @@ var Control3 = ({ control }) => {
|
|
|
4638
4651
|
if (!getControl(control.type)) {
|
|
4639
4652
|
return null;
|
|
4640
4653
|
}
|
|
4641
|
-
return /* @__PURE__ */
|
|
4654
|
+
return /* @__PURE__ */ React90.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React90.createElement(import_ui72.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React90.createElement(import_ui72.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React90.createElement(import_editor_controls56.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React90.createElement(import_ui72.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React90.createElement(Control, { type: control.type, props: control.props }))));
|
|
4642
4655
|
};
|
|
4643
4656
|
|
|
4644
4657
|
// src/dynamics/dynamic-transformer.ts
|
|
4645
4658
|
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
4646
|
-
var
|
|
4659
|
+
var import_editor_props13 = require("@elementor/editor-props");
|
|
4647
4660
|
|
|
4648
4661
|
// src/dynamics/errors.ts
|
|
4649
|
-
var
|
|
4650
|
-
var DynamicTagsManagerNotFoundError = (0,
|
|
4662
|
+
var import_utils9 = require("@elementor/utils");
|
|
4663
|
+
var DynamicTagsManagerNotFoundError = (0, import_utils9.createError)({
|
|
4651
4664
|
code: "dynamic_tags_manager_not_found",
|
|
4652
4665
|
message: "Dynamic tags manager not found"
|
|
4653
4666
|
});
|
|
@@ -4661,7 +4674,7 @@ var dynamicTransformer = (0, import_editor_canvas3.createTransformer)((value) =>
|
|
|
4661
4674
|
});
|
|
4662
4675
|
function simpleTransform(props) {
|
|
4663
4676
|
const transformed = Object.entries(props).map(([settingKey, settingValue]) => {
|
|
4664
|
-
const value = (0,
|
|
4677
|
+
const value = (0, import_editor_props13.isTransformable)(settingValue) ? settingValue.value : settingValue;
|
|
4665
4678
|
return [settingKey, value];
|
|
4666
4679
|
});
|
|
4667
4680
|
return Object.fromEntries(transformed);
|
|
@@ -4691,18 +4704,18 @@ function getDynamicValue(name, settings) {
|
|
|
4691
4704
|
}
|
|
4692
4705
|
|
|
4693
4706
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
4694
|
-
var
|
|
4695
|
-
var
|
|
4707
|
+
var React91 = __toESM(require("react"));
|
|
4708
|
+
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
4696
4709
|
var import_icons28 = require("@elementor/icons");
|
|
4697
4710
|
var import_i18n58 = require("@wordpress/i18n");
|
|
4698
4711
|
var usePropDynamicAction = () => {
|
|
4699
|
-
const { propType } = (0,
|
|
4712
|
+
const { propType } = (0, import_editor_controls57.useBoundProp)();
|
|
4700
4713
|
const visible = !!propType && supportsDynamic(propType);
|
|
4701
4714
|
return {
|
|
4702
4715
|
visible,
|
|
4703
4716
|
icon: import_icons28.DatabaseIcon,
|
|
4704
4717
|
title: (0, import_i18n58.__)("Dynamic tags", "elementor"),
|
|
4705
|
-
|
|
4718
|
+
content: ({ close }) => /* @__PURE__ */ React91.createElement(DynamicSelection, { close })
|
|
4706
4719
|
};
|
|
4707
4720
|
};
|
|
4708
4721
|
|
|
@@ -4713,12 +4726,12 @@ var init = () => {
|
|
|
4713
4726
|
component: DynamicSelectionControl,
|
|
4714
4727
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
4715
4728
|
});
|
|
4716
|
-
(0,
|
|
4729
|
+
(0, import_editor_controls58.injectIntoRepeaterItemLabel)({
|
|
4717
4730
|
id: "dynamic-background-image",
|
|
4718
4731
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
4719
4732
|
component: BackgroundControlDynamicTagLabel
|
|
4720
4733
|
});
|
|
4721
|
-
(0,
|
|
4734
|
+
(0, import_editor_controls58.injectIntoRepeaterItemIcon)({
|
|
4722
4735
|
id: "dynamic-background-image",
|
|
4723
4736
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
4724
4737
|
component: BackgroundControlDynamicTagIcon
|
|
@@ -4732,7 +4745,7 @@ var init = () => {
|
|
|
4732
4745
|
};
|
|
4733
4746
|
|
|
4734
4747
|
// src/reset-style-props.tsx
|
|
4735
|
-
var
|
|
4748
|
+
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
4736
4749
|
var import_icons29 = require("@elementor/icons");
|
|
4737
4750
|
var import_i18n59 = require("@wordpress/i18n");
|
|
4738
4751
|
var { registerAction } = controlActionsMenu;
|
|
@@ -4745,7 +4758,7 @@ function initResetStyleProps() {
|
|
|
4745
4758
|
var EXCLUDED_BINDS = ["order", "flex-grow", "flex-shrink", "flex-basis"];
|
|
4746
4759
|
function useResetStyleValueProps() {
|
|
4747
4760
|
const isStyle = useIsStyle();
|
|
4748
|
-
const { value, setValue, path, bind } = (0,
|
|
4761
|
+
const { value, setValue, path, bind } = (0, import_editor_controls59.useBoundProp)();
|
|
4749
4762
|
return {
|
|
4750
4763
|
visible: isStyle && value !== null && value !== void 0 && path.length <= 2 && !EXCLUDED_BINDS.includes(bind),
|
|
4751
4764
|
title: (0, import_i18n59.__)("Clear", "elementor"),
|
|
@@ -4758,36 +4771,36 @@ function useResetStyleValueProps() {
|
|
|
4758
4771
|
var import_editor_canvas9 = require("@elementor/editor-canvas");
|
|
4759
4772
|
|
|
4760
4773
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
4761
|
-
var
|
|
4774
|
+
var React92 = __toESM(require("react"));
|
|
4762
4775
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
4763
4776
|
var import_ui73 = require("@elementor/ui");
|
|
4764
|
-
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */
|
|
4777
|
+
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */ React92.createElement(import_ui73.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React92.createElement(ItemIconColor, { value }), /* @__PURE__ */ React92.createElement(ItemLabelColor, { value })));
|
|
4765
4778
|
var ItemIconColor = ({ value }) => {
|
|
4766
4779
|
const { color } = value;
|
|
4767
|
-
return /* @__PURE__ */
|
|
4780
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
4768
4781
|
};
|
|
4769
4782
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
4770
|
-
return /* @__PURE__ */
|
|
4783
|
+
return /* @__PURE__ */ React92.createElement("span", null, color);
|
|
4771
4784
|
};
|
|
4772
4785
|
var StyledUnstableColorIndicator = (0, import_ui73.styled)(import_ui73.UnstableColorIndicator)(({ theme }) => ({
|
|
4773
4786
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
4774
4787
|
}));
|
|
4775
4788
|
|
|
4776
4789
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
4777
|
-
var
|
|
4790
|
+
var React93 = __toESM(require("react"));
|
|
4778
4791
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
4779
4792
|
var import_ui74 = require("@elementor/ui");
|
|
4780
4793
|
var import_i18n60 = require("@wordpress/i18n");
|
|
4781
|
-
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */
|
|
4794
|
+
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */ React93.createElement(import_ui74.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React93.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React93.createElement(ItemLabelGradient, { value })));
|
|
4782
4795
|
var ItemIconGradient = ({ value }) => {
|
|
4783
4796
|
const gradient = getGradientValue(value);
|
|
4784
|
-
return /* @__PURE__ */
|
|
4797
|
+
return /* @__PURE__ */ React93.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
4785
4798
|
};
|
|
4786
4799
|
var ItemLabelGradient = ({ value }) => {
|
|
4787
4800
|
if (value.type === "linear") {
|
|
4788
|
-
return /* @__PURE__ */
|
|
4801
|
+
return /* @__PURE__ */ React93.createElement("span", null, (0, import_i18n60.__)("Linear Gradient", "elementor"));
|
|
4789
4802
|
}
|
|
4790
|
-
return /* @__PURE__ */
|
|
4803
|
+
return /* @__PURE__ */ React93.createElement("span", null, (0, import_i18n60.__)("Radial Gradient", "elementor"));
|
|
4791
4804
|
};
|
|
4792
4805
|
var getGradientValue = (gradient) => {
|
|
4793
4806
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -4798,15 +4811,15 @@ var getGradientValue = (gradient) => {
|
|
|
4798
4811
|
};
|
|
4799
4812
|
|
|
4800
4813
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
4801
|
-
var
|
|
4814
|
+
var React94 = __toESM(require("react"));
|
|
4802
4815
|
var import_editor_canvas7 = require("@elementor/editor-canvas");
|
|
4803
4816
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
4804
4817
|
var import_ui75 = require("@elementor/ui");
|
|
4805
4818
|
var import_wp_media = require("@elementor/wp-media");
|
|
4806
|
-
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */
|
|
4819
|
+
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React94.createElement(import_ui75.Stack, { direction: "row", gap: 10 }, /* @__PURE__ */ React94.createElement(ItemIconImage, { value }), /* @__PURE__ */ React94.createElement(ItemLabelImage, { value })));
|
|
4807
4820
|
var ItemIconImage = ({ value }) => {
|
|
4808
4821
|
const { imageUrl } = useImage(value);
|
|
4809
|
-
return /* @__PURE__ */
|
|
4822
|
+
return /* @__PURE__ */ React94.createElement(
|
|
4810
4823
|
import_ui75.CardMedia,
|
|
4811
4824
|
{
|
|
4812
4825
|
image: imageUrl,
|
|
@@ -4821,7 +4834,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
4821
4834
|
};
|
|
4822
4835
|
var ItemLabelImage = ({ value }) => {
|
|
4823
4836
|
const { imageTitle } = useImage(value);
|
|
4824
|
-
return /* @__PURE__ */
|
|
4837
|
+
return /* @__PURE__ */ React94.createElement(import_editor_ui7.EllipsisWithTooltip, { title: imageTitle }, /* @__PURE__ */ React94.createElement("span", null, imageTitle));
|
|
4825
4838
|
};
|
|
4826
4839
|
var useImage = (image) => {
|
|
4827
4840
|
let imageTitle, imageUrl = null;
|
|
@@ -4846,14 +4859,14 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
4846
4859
|
};
|
|
4847
4860
|
|
|
4848
4861
|
// src/styles-inheritance/transformers/background-overlay-transformer.tsx
|
|
4849
|
-
var
|
|
4862
|
+
var React95 = __toESM(require("react"));
|
|
4850
4863
|
var import_editor_canvas8 = require("@elementor/editor-canvas");
|
|
4851
4864
|
var import_ui76 = require("@elementor/ui");
|
|
4852
4865
|
var backgroundOverlayTransformer = (0, import_editor_canvas8.createTransformer)((values) => {
|
|
4853
4866
|
if (!values || values.length === 0) {
|
|
4854
4867
|
return null;
|
|
4855
4868
|
}
|
|
4856
|
-
return /* @__PURE__ */
|
|
4869
|
+
return /* @__PURE__ */ React95.createElement(import_ui76.Stack, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React95.createElement(import_ui76.Stack, { key: index }, item)));
|
|
4857
4870
|
});
|
|
4858
4871
|
|
|
4859
4872
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -4919,6 +4932,7 @@ var blockV1Panel = () => {
|
|
|
4919
4932
|
init,
|
|
4920
4933
|
injectIntoClassSelectorActions,
|
|
4921
4934
|
registerControlReplacement,
|
|
4935
|
+
registerStyleProviderToColors,
|
|
4922
4936
|
useBoundProp,
|
|
4923
4937
|
useFontFamilies,
|
|
4924
4938
|
usePanelActions,
|