@elementor/editor-editing-panel 4.5.0-1202 → 4.5.0-1204
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +406 -304
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +296 -196
- package/dist/index.mjs.map +1 -1
- package/package.json +25 -25
- package/src/controls-registry/element-controls/menu-items-control/menu-items-control.tsx +8 -0
- package/src/controls-registry/element-controls/menu-items-control/submenu-toggle-registry.ts +15 -0
- package/src/controls-registry/element-controls/menu-items-control/submenu-toggle.tsx +64 -0
- package/src/controls-registry/element-controls/menu-items-control/use-submenu.ts +28 -0
- package/src/controls-registry/element-controls/registry.ts +2 -0
- package/src/controls-registry/element-controls/submenu-toggle-control/submenu-toggle-control.tsx +12 -0
- package/src/index.ts +5 -0
package/dist/index.mjs
CHANGED
|
@@ -6884,9 +6884,9 @@ var ListItemLabelControl = ({ elementId, fallbackLabel }) => {
|
|
|
6884
6884
|
};
|
|
6885
6885
|
|
|
6886
6886
|
// src/controls-registry/element-controls/menu-items-control/menu-items-control.tsx
|
|
6887
|
-
import * as
|
|
6887
|
+
import * as React99 from "react";
|
|
6888
6888
|
import { useId as useId3 } from "react";
|
|
6889
|
-
import { ControlFormLabel as
|
|
6889
|
+
import { ControlFormLabel as ControlFormLabel6, Repeater as Repeater3 } from "@elementor/editor-controls";
|
|
6890
6890
|
import {
|
|
6891
6891
|
getElementType as getElementType3,
|
|
6892
6892
|
updateElementEditorSettings as updateElementEditorSettings4,
|
|
@@ -6894,8 +6894,8 @@ import {
|
|
|
6894
6894
|
useElementEditorSettings as useElementEditorSettings4
|
|
6895
6895
|
} from "@elementor/editor-elements";
|
|
6896
6896
|
import { SessionStorageProvider as SessionStorageProvider4 } from "@elementor/session";
|
|
6897
|
-
import { Stack as
|
|
6898
|
-
import { __ as
|
|
6897
|
+
import { Stack as Stack18, TextField as TextField4 } from "@elementor/ui";
|
|
6898
|
+
import { __ as __77 } from "@wordpress/i18n";
|
|
6899
6899
|
|
|
6900
6900
|
// src/controls-registry/element-controls/get-element-by-type.ts
|
|
6901
6901
|
import { getContainer as getContainer7 } from "@elementor/editor-elements";
|
|
@@ -6910,6 +6910,17 @@ var getElementByType = (elementId, type) => {
|
|
|
6910
6910
|
return currentElement.children?.findRecursive?.((child) => child.model.get("elType") === type) ?? null;
|
|
6911
6911
|
};
|
|
6912
6912
|
|
|
6913
|
+
// src/controls-registry/element-controls/menu-items-control/submenu-toggle.tsx
|
|
6914
|
+
import * as React98 from "react";
|
|
6915
|
+
import { useRef as useRef22, useState as useState11 } from "react";
|
|
6916
|
+
import { ControlFormLabel as ControlFormLabel5 } from "@elementor/editor-controls";
|
|
6917
|
+
import { PromotionChip, PromotionPopover } from "@elementor/editor-ui";
|
|
6918
|
+
import { Box as Box9, Stack as Stack17, Switch as Switch2 } from "@elementor/ui";
|
|
6919
|
+
import { __ as __76 } from "@wordpress/i18n";
|
|
6920
|
+
|
|
6921
|
+
// src/controls-registry/element-controls/menu-items-control/use-submenu.ts
|
|
6922
|
+
import { getContainer as getContainer9, getWidgetsCache as getWidgetsCache5 } from "@elementor/editor-elements";
|
|
6923
|
+
|
|
6913
6924
|
// src/controls-registry/element-controls/menu-items-control/use-actions.ts
|
|
6914
6925
|
import {
|
|
6915
6926
|
createElements as createElements3,
|
|
@@ -7011,14 +7022,88 @@ var useActions2 = () => {
|
|
|
7011
7022
|
return { addItem: addItem2, removeItem: removeItem2, duplicateItem: duplicateItem2, moveItem: moveItem2 };
|
|
7012
7023
|
};
|
|
7013
7024
|
|
|
7025
|
+
// src/controls-registry/element-controls/menu-items-control/use-submenu.ts
|
|
7026
|
+
var getSubmenuPromotion = () => {
|
|
7027
|
+
const entitlement = getWidgetsCache5()?.[MENU_ENTRY_ELEMENT_TYPE]?.meta?.submenu_entitlement;
|
|
7028
|
+
return entitlement?.locked ? entitlement.promotion : null;
|
|
7029
|
+
};
|
|
7030
|
+
var getParentEntryId = (elementId) => {
|
|
7031
|
+
const parent = getContainer9(elementId)?.parent;
|
|
7032
|
+
return parent?.model.get("elType") === MENU_ENTRY_ELEMENT_TYPE ? parent.id : null;
|
|
7033
|
+
};
|
|
7034
|
+
|
|
7035
|
+
// src/controls-registry/element-controls/menu-items-control/submenu-toggle.tsx
|
|
7036
|
+
var SubmenuToggle = ({ entryId }) => {
|
|
7037
|
+
const [isPromotionOpen, setIsPromotionOpen] = useState11(false);
|
|
7038
|
+
const anchorRef = useRef22(null);
|
|
7039
|
+
const promotion = getSubmenuPromotion();
|
|
7040
|
+
if (!entryId || !promotion) {
|
|
7041
|
+
return null;
|
|
7042
|
+
}
|
|
7043
|
+
return /* @__PURE__ */ React98.createElement(
|
|
7044
|
+
Stack17,
|
|
7045
|
+
{
|
|
7046
|
+
direction: "row",
|
|
7047
|
+
alignItems: "center",
|
|
7048
|
+
justifyContent: "space-between",
|
|
7049
|
+
ref: anchorRef,
|
|
7050
|
+
"data-testid": "submenu-toggle-row"
|
|
7051
|
+
},
|
|
7052
|
+
/* @__PURE__ */ React98.createElement(Stack17, { direction: "row", alignItems: "center" }, /* @__PURE__ */ React98.createElement(ControlFormLabel5, null, __76("Enable Submenu", "elementor")), /* @__PURE__ */ React98.createElement(
|
|
7053
|
+
PromotionPopover,
|
|
7054
|
+
{
|
|
7055
|
+
open: isPromotionOpen,
|
|
7056
|
+
title: promotion.title,
|
|
7057
|
+
content: promotion.content,
|
|
7058
|
+
ctaUrl: promotion.ctaUrl,
|
|
7059
|
+
ctaText: __76("Upgrade Now", "elementor"),
|
|
7060
|
+
onClose: () => setIsPromotionOpen(false),
|
|
7061
|
+
anchorRef
|
|
7062
|
+
},
|
|
7063
|
+
/* @__PURE__ */ React98.createElement(
|
|
7064
|
+
Box9,
|
|
7065
|
+
{
|
|
7066
|
+
component: "span",
|
|
7067
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
7068
|
+
onClick: () => setIsPromotionOpen((open) => !open),
|
|
7069
|
+
sx: { display: "inline-flex", cursor: "pointer" }
|
|
7070
|
+
},
|
|
7071
|
+
/* @__PURE__ */ React98.createElement(PromotionChip, null)
|
|
7072
|
+
)
|
|
7073
|
+
)),
|
|
7074
|
+
/* @__PURE__ */ React98.createElement(Box9, { sx: { marginInlineEnd: -1 }, onMouseDown: (e) => e.stopPropagation() }, /* @__PURE__ */ React98.createElement(
|
|
7075
|
+
Switch2,
|
|
7076
|
+
{
|
|
7077
|
+
size: "small",
|
|
7078
|
+
checked: false,
|
|
7079
|
+
onChange: () => setIsPromotionOpen((open) => !open),
|
|
7080
|
+
sx: { cursor: "pointer" },
|
|
7081
|
+
inputProps: {
|
|
7082
|
+
"aria-label": __76("Enable Submenu", "elementor"),
|
|
7083
|
+
"aria-haspopup": "dialog",
|
|
7084
|
+
"aria-expanded": isPromotionOpen,
|
|
7085
|
+
style: { cursor: "pointer" }
|
|
7086
|
+
}
|
|
7087
|
+
}
|
|
7088
|
+
))
|
|
7089
|
+
);
|
|
7090
|
+
};
|
|
7091
|
+
|
|
7092
|
+
// src/controls-registry/element-controls/menu-items-control/submenu-toggle-registry.ts
|
|
7093
|
+
var submenuToggle = SubmenuToggle;
|
|
7094
|
+
var registerSubmenuToggle = (component) => {
|
|
7095
|
+
submenuToggle = component;
|
|
7096
|
+
};
|
|
7097
|
+
var getSubmenuToggle = () => submenuToggle;
|
|
7098
|
+
|
|
7014
7099
|
// src/controls-registry/element-controls/menu-items-control/use-entry-item.ts
|
|
7015
|
-
import { getContainer as
|
|
7100
|
+
import { getContainer as getContainer10, getElementSettings as getElementSettings4, getElementType as getElementType2 } from "@elementor/editor-elements";
|
|
7016
7101
|
import { __privateUseListenTo as useListenTo4, commandEndEvent as commandEndEvent4 } from "@elementor/editor-v1-adapters";
|
|
7017
7102
|
var useEntryItem = (entryId) => {
|
|
7018
7103
|
return useListenTo4(
|
|
7019
7104
|
[commandEndEvent4("document/elements/set-settings"), commandEndEvent4("document/elements/settings")],
|
|
7020
7105
|
() => {
|
|
7021
|
-
const item =
|
|
7106
|
+
const item = getContainer10(entryId)?.children?.find(
|
|
7022
7107
|
(child) => child.model.get("elType") === MENU_ITEM_ELEMENT_TYPE
|
|
7023
7108
|
);
|
|
7024
7109
|
return {
|
|
@@ -7073,7 +7158,7 @@ var MenuItemsControl = ({ label }) => {
|
|
|
7073
7158
|
});
|
|
7074
7159
|
}
|
|
7075
7160
|
};
|
|
7076
|
-
return /* @__PURE__ */
|
|
7161
|
+
return /* @__PURE__ */ React99.createElement(
|
|
7077
7162
|
Repeater3,
|
|
7078
7163
|
{
|
|
7079
7164
|
showToggle: false,
|
|
@@ -7084,7 +7169,7 @@ var MenuItemsControl = ({ label }) => {
|
|
|
7084
7169
|
adornment: () => null,
|
|
7085
7170
|
itemSettings: {
|
|
7086
7171
|
getId: ({ item }) => item.id,
|
|
7087
|
-
initialValues: { id: "", title:
|
|
7172
|
+
initialValues: { id: "", title: __77("Menu item", "elementor") },
|
|
7088
7173
|
Label: ItemLabel3,
|
|
7089
7174
|
Content: ItemContent3,
|
|
7090
7175
|
Icon: () => null
|
|
@@ -7092,21 +7177,21 @@ var MenuItemsControl = ({ label }) => {
|
|
|
7092
7177
|
}
|
|
7093
7178
|
);
|
|
7094
7179
|
};
|
|
7095
|
-
var ItemLabel3 = ({ value }) => /* @__PURE__ */
|
|
7180
|
+
var ItemLabel3 = ({ value }) => /* @__PURE__ */ React99.createElement(Stack18, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, value.id ? /* @__PURE__ */ React99.createElement(EntryLabel, { elementId: value.id, fallbackTitle: value.title }) : /* @__PURE__ */ React99.createElement("span", null, value?.title));
|
|
7096
7181
|
var EntryLabel = ({ elementId, fallbackTitle }) => {
|
|
7097
7182
|
const editorSettings = useElementEditorSettings4(elementId);
|
|
7098
|
-
return /* @__PURE__ */
|
|
7183
|
+
return /* @__PURE__ */ React99.createElement("span", null, editorSettings?.title ?? fallbackTitle ?? "");
|
|
7099
7184
|
};
|
|
7100
7185
|
var ItemContent3 = ({ value }) => {
|
|
7101
7186
|
if (!value.id) {
|
|
7102
7187
|
return null;
|
|
7103
7188
|
}
|
|
7104
|
-
return /* @__PURE__ */
|
|
7189
|
+
return /* @__PURE__ */ React99.createElement(Stack18, { p: 2, gap: 1.5 }, /* @__PURE__ */ React99.createElement(ItemNameControl2, { elementId: value.id }), /* @__PURE__ */ React99.createElement(ItemLinkControl, { entryId: value.id }), /* @__PURE__ */ React99.createElement(SubmenuToggleSlot, { entryId: value.id }));
|
|
7105
7190
|
};
|
|
7106
7191
|
var ItemNameControl2 = ({ elementId }) => {
|
|
7107
7192
|
const editorSettings = useElementEditorSettings4(elementId);
|
|
7108
7193
|
const inputId = useId3();
|
|
7109
|
-
return /* @__PURE__ */
|
|
7194
|
+
return /* @__PURE__ */ React99.createElement(Stack18, { gap: 1 }, /* @__PURE__ */ React99.createElement(ControlFormLabel6, { htmlFor: inputId }, __77("Item name", "elementor")), /* @__PURE__ */ React99.createElement(
|
|
7110
7195
|
TextField4,
|
|
7111
7196
|
{
|
|
7112
7197
|
id: inputId,
|
|
@@ -7125,14 +7210,14 @@ var ItemLinkControl = ({ entryId }) => {
|
|
|
7125
7210
|
if (!itemId || !elementType || !linkControl) {
|
|
7126
7211
|
return null;
|
|
7127
7212
|
}
|
|
7128
|
-
return /* @__PURE__ */
|
|
7213
|
+
return /* @__PURE__ */ React99.createElement(
|
|
7129
7214
|
ElementProvider,
|
|
7130
7215
|
{
|
|
7131
7216
|
element: { id: itemId, type: MENU_ITEM_ELEMENT_TYPE },
|
|
7132
7217
|
elementType,
|
|
7133
7218
|
settings
|
|
7134
7219
|
},
|
|
7135
|
-
/* @__PURE__ */
|
|
7220
|
+
/* @__PURE__ */ React99.createElement(SessionStorageProvider4, { prefix: itemId }, /* @__PURE__ */ React99.createElement(SettingsControl, { control: linkControl }))
|
|
7136
7221
|
);
|
|
7137
7222
|
};
|
|
7138
7223
|
var findControlByBind = (items3, bind) => {
|
|
@@ -7149,11 +7234,23 @@ var findControlByBind = (items3, bind) => {
|
|
|
7149
7234
|
}
|
|
7150
7235
|
return null;
|
|
7151
7236
|
};
|
|
7237
|
+
var SubmenuToggleSlot = ({ entryId }) => {
|
|
7238
|
+
const Toggle = getSubmenuToggle();
|
|
7239
|
+
return /* @__PURE__ */ React99.createElement(Toggle, { entryId });
|
|
7240
|
+
};
|
|
7241
|
+
|
|
7242
|
+
// src/controls-registry/element-controls/submenu-toggle-control/submenu-toggle-control.tsx
|
|
7243
|
+
import * as React100 from "react";
|
|
7244
|
+
var SubmenuToggleControl = () => {
|
|
7245
|
+
const { element } = useElement();
|
|
7246
|
+
const Toggle = getSubmenuToggle();
|
|
7247
|
+
return /* @__PURE__ */ React100.createElement(Toggle, { entryId: getParentEntryId(element.id) });
|
|
7248
|
+
};
|
|
7152
7249
|
|
|
7153
7250
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
7154
|
-
import * as
|
|
7251
|
+
import * as React101 from "react";
|
|
7155
7252
|
import {
|
|
7156
|
-
ControlFormLabel as
|
|
7253
|
+
ControlFormLabel as ControlFormLabel7,
|
|
7157
7254
|
Repeater as Repeater4,
|
|
7158
7255
|
useBoundProp as useBoundProp8
|
|
7159
7256
|
} from "@elementor/editor-controls";
|
|
@@ -7164,20 +7261,20 @@ import {
|
|
|
7164
7261
|
} from "@elementor/editor-elements";
|
|
7165
7262
|
import { numberPropTypeUtil as numberPropTypeUtil4 } from "@elementor/editor-props";
|
|
7166
7263
|
import { InfoCircleFilledIcon as InfoCircleFilledIcon3 } from "@elementor/icons";
|
|
7167
|
-
import { Alert as Alert5, Chip as Chip4, Infotip as Infotip3, Stack as
|
|
7168
|
-
import { __ as
|
|
7264
|
+
import { Alert as Alert5, Chip as Chip4, Infotip as Infotip3, Stack as Stack19, Switch as Switch3, TextField as TextField5, Typography as Typography5 } from "@elementor/ui";
|
|
7265
|
+
import { __ as __79 } from "@wordpress/i18n";
|
|
7169
7266
|
|
|
7170
7267
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
7171
7268
|
import { useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
7172
7269
|
import {
|
|
7173
7270
|
createElements as createElements4,
|
|
7174
7271
|
duplicateElements as duplicateElements4,
|
|
7175
|
-
getContainer as
|
|
7272
|
+
getContainer as getContainer11,
|
|
7176
7273
|
moveElements as moveElements4,
|
|
7177
7274
|
removeElements as removeElements4
|
|
7178
7275
|
} from "@elementor/editor-elements";
|
|
7179
7276
|
import { numberPropTypeUtil as numberPropTypeUtil3 } from "@elementor/editor-props";
|
|
7180
|
-
import { __ as
|
|
7277
|
+
import { __ as __78 } from "@wordpress/i18n";
|
|
7181
7278
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
7182
7279
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
7183
7280
|
var useActions3 = () => {
|
|
@@ -7193,14 +7290,14 @@ var useActions3 = () => {
|
|
|
7193
7290
|
});
|
|
7194
7291
|
items3.forEach(({ item, index }) => {
|
|
7195
7292
|
const tabId = item.id;
|
|
7196
|
-
const tabContentAreaContainer =
|
|
7293
|
+
const tabContentAreaContainer = getContainer11(tabContentAreaId);
|
|
7197
7294
|
const tabContentId = tabContentAreaContainer?.children?.[index]?.id;
|
|
7198
7295
|
if (!tabContentId) {
|
|
7199
7296
|
throw new Error("Original content ID is required for duplication");
|
|
7200
7297
|
}
|
|
7201
7298
|
duplicateElements4({
|
|
7202
7299
|
elementIds: [tabId, tabContentId],
|
|
7203
|
-
title:
|
|
7300
|
+
title: __78("Duplicate Tab", "elementor"),
|
|
7204
7301
|
onDuplicateElements: () => {
|
|
7205
7302
|
if (newDefault !== defaultActiveTab) {
|
|
7206
7303
|
setDefaultActiveTab(newDefault, {}, { withHistory: false });
|
|
@@ -7221,10 +7318,10 @@ var useActions3 = () => {
|
|
|
7221
7318
|
movedElementId,
|
|
7222
7319
|
movedElementIndex
|
|
7223
7320
|
}) => {
|
|
7224
|
-
const tabContentContainer =
|
|
7321
|
+
const tabContentContainer = getContainer11(tabContentAreaId);
|
|
7225
7322
|
const tabContent = tabContentContainer?.children?.[movedElementIndex];
|
|
7226
|
-
const movedElement =
|
|
7227
|
-
const tabsMenu =
|
|
7323
|
+
const movedElement = getContainer11(movedElementId);
|
|
7324
|
+
const tabsMenu = getContainer11(tabsMenuId);
|
|
7228
7325
|
if (!tabContent) {
|
|
7229
7326
|
throw new Error("Content element is required");
|
|
7230
7327
|
}
|
|
@@ -7237,7 +7334,7 @@ var useActions3 = () => {
|
|
|
7237
7334
|
defaultActiveTab
|
|
7238
7335
|
});
|
|
7239
7336
|
moveElements4({
|
|
7240
|
-
title:
|
|
7337
|
+
title: __78("Reorder Tabs", "elementor"),
|
|
7241
7338
|
moves: [
|
|
7242
7339
|
{
|
|
7243
7340
|
element: movedElement,
|
|
@@ -7271,10 +7368,10 @@ var useActions3 = () => {
|
|
|
7271
7368
|
defaultActiveTab
|
|
7272
7369
|
});
|
|
7273
7370
|
removeElements4({
|
|
7274
|
-
title:
|
|
7371
|
+
title: __78("Tabs", "elementor"),
|
|
7275
7372
|
elementIds: items3.flatMap(({ item, index }) => {
|
|
7276
7373
|
const tabId = item.id;
|
|
7277
|
-
const tabContentContainer =
|
|
7374
|
+
const tabContentContainer = getContainer11(tabContentAreaId);
|
|
7278
7375
|
const tabContentId = tabContentContainer?.children?.[index]?.id;
|
|
7279
7376
|
if (!tabContentId) {
|
|
7280
7377
|
throw new Error("Content ID is required");
|
|
@@ -7298,15 +7395,15 @@ var useActions3 = () => {
|
|
|
7298
7395
|
tabsMenuId,
|
|
7299
7396
|
items: items3
|
|
7300
7397
|
}) => {
|
|
7301
|
-
const tabContentArea =
|
|
7302
|
-
const tabsMenu =
|
|
7398
|
+
const tabContentArea = getContainer11(tabContentAreaId);
|
|
7399
|
+
const tabsMenu = getContainer11(tabsMenuId);
|
|
7303
7400
|
if (!tabContentArea || !tabsMenu) {
|
|
7304
7401
|
throw new Error("Tab containers not found");
|
|
7305
7402
|
}
|
|
7306
7403
|
items3.forEach(({ index }) => {
|
|
7307
7404
|
const position = index + 1;
|
|
7308
7405
|
createElements4({
|
|
7309
|
-
title:
|
|
7406
|
+
title: __78("Tabs", "elementor"),
|
|
7310
7407
|
elements: [
|
|
7311
7408
|
{
|
|
7312
7409
|
container: tabContentArea,
|
|
@@ -7375,7 +7472,7 @@ var calculateDefaultOnDuplicate = ({
|
|
|
7375
7472
|
var TAB_MENU_ELEMENT_TYPE = "e-tabs-menu";
|
|
7376
7473
|
var TAB_CONTENT_AREA_ELEMENT_TYPE = "e-tabs-content-area";
|
|
7377
7474
|
var TabsControl = ({ label }) => {
|
|
7378
|
-
return /* @__PURE__ */
|
|
7475
|
+
return /* @__PURE__ */ React101.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __79("Tabs", "elementor") }, /* @__PURE__ */ React101.createElement(TabsControlContent, { label }));
|
|
7379
7476
|
};
|
|
7380
7477
|
var TabsControlContent = ({ label }) => {
|
|
7381
7478
|
const { element } = useElement();
|
|
@@ -7419,7 +7516,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
7419
7516
|
});
|
|
7420
7517
|
}
|
|
7421
7518
|
};
|
|
7422
|
-
return /* @__PURE__ */
|
|
7519
|
+
return /* @__PURE__ */ React101.createElement(
|
|
7423
7520
|
Repeater4,
|
|
7424
7521
|
{
|
|
7425
7522
|
showToggle: false,
|
|
@@ -7438,12 +7535,12 @@ var TabsControlContent = ({ label }) => {
|
|
|
7438
7535
|
);
|
|
7439
7536
|
};
|
|
7440
7537
|
var ItemLabel4 = ({ value, index }) => {
|
|
7441
|
-
return /* @__PURE__ */
|
|
7538
|
+
return /* @__PURE__ */ React101.createElement(Stack19, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, value.id ? /* @__PURE__ */ React101.createElement(TabRepeaterLabel, { elementId: value.id, fallbackTitle: value.title }) : /* @__PURE__ */ React101.createElement("span", null, value?.title), /* @__PURE__ */ React101.createElement(ItemDefaultTab, { index }));
|
|
7442
7539
|
};
|
|
7443
7540
|
var TabRepeaterLabel = ({ elementId, fallbackTitle }) => {
|
|
7444
7541
|
const editorSettings = useElementEditorSettings5(elementId);
|
|
7445
7542
|
const label = editorSettings?.title ?? fallbackTitle ?? "";
|
|
7446
|
-
return /* @__PURE__ */
|
|
7543
|
+
return /* @__PURE__ */ React101.createElement("span", null, label);
|
|
7447
7544
|
};
|
|
7448
7545
|
var ItemDefaultTab = ({ index }) => {
|
|
7449
7546
|
const { value: defaultItem } = useBoundProp8(numberPropTypeUtil4);
|
|
@@ -7451,19 +7548,19 @@ var ItemDefaultTab = ({ index }) => {
|
|
|
7451
7548
|
if (!isDefault) {
|
|
7452
7549
|
return null;
|
|
7453
7550
|
}
|
|
7454
|
-
return /* @__PURE__ */
|
|
7551
|
+
return /* @__PURE__ */ React101.createElement(Chip4, { size: "tiny", shape: "rounded", label: __79("Default", "elementor") });
|
|
7455
7552
|
};
|
|
7456
7553
|
var ItemContent4 = ({ value, index }) => {
|
|
7457
7554
|
if (!value.id) {
|
|
7458
7555
|
return null;
|
|
7459
7556
|
}
|
|
7460
|
-
return /* @__PURE__ */
|
|
7557
|
+
return /* @__PURE__ */ React101.createElement(Stack19, { p: 2, gap: 1.5 }, /* @__PURE__ */ React101.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React101.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __79("Tabs", "elementor") }, /* @__PURE__ */ React101.createElement(DefaultTabControl, { tabIndex: index })));
|
|
7461
7558
|
};
|
|
7462
7559
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
7463
7560
|
const { value, setValue } = useBoundProp8(numberPropTypeUtil4);
|
|
7464
7561
|
const isDefault = value === tabIndex;
|
|
7465
|
-
return /* @__PURE__ */
|
|
7466
|
-
|
|
7562
|
+
return /* @__PURE__ */ React101.createElement(Stack19, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React101.createElement(ControlFormLabel7, null, __79("Set as default tab", "elementor")), /* @__PURE__ */ React101.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React101.createElement(
|
|
7563
|
+
Switch3,
|
|
7467
7564
|
{
|
|
7468
7565
|
size: "small",
|
|
7469
7566
|
checked: isDefault,
|
|
@@ -7480,7 +7577,7 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
7480
7577
|
var TabLabelControl = ({ elementId }) => {
|
|
7481
7578
|
const editorSettings = useElementEditorSettings5(elementId);
|
|
7482
7579
|
const label = editorSettings?.title ?? "";
|
|
7483
|
-
return /* @__PURE__ */
|
|
7580
|
+
return /* @__PURE__ */ React101.createElement(Stack19, { gap: 1 }, /* @__PURE__ */ React101.createElement(ControlFormLabel7, null, __79("Tab name", "elementor")), /* @__PURE__ */ React101.createElement(
|
|
7484
7581
|
TextField5,
|
|
7485
7582
|
{
|
|
7486
7583
|
size: "tiny",
|
|
@@ -7501,22 +7598,22 @@ var ConditionalTooltip = ({
|
|
|
7501
7598
|
if (!showTooltip) {
|
|
7502
7599
|
return children;
|
|
7503
7600
|
}
|
|
7504
|
-
return /* @__PURE__ */
|
|
7601
|
+
return /* @__PURE__ */ React101.createElement(
|
|
7505
7602
|
Infotip3,
|
|
7506
7603
|
{
|
|
7507
7604
|
arrow: false,
|
|
7508
|
-
content: /* @__PURE__ */
|
|
7605
|
+
content: /* @__PURE__ */ React101.createElement(
|
|
7509
7606
|
Alert5,
|
|
7510
7607
|
{
|
|
7511
7608
|
color: "secondary",
|
|
7512
|
-
icon: /* @__PURE__ */
|
|
7609
|
+
icon: /* @__PURE__ */ React101.createElement(InfoCircleFilledIcon3, { fontSize: "tiny" }),
|
|
7513
7610
|
size: "small",
|
|
7514
7611
|
sx: { width: 288 }
|
|
7515
7612
|
},
|
|
7516
|
-
/* @__PURE__ */
|
|
7613
|
+
/* @__PURE__ */ React101.createElement(Typography5, { variant: "body2" }, __79("To change the default tab, simply set another tab as default.", "elementor"))
|
|
7517
7614
|
)
|
|
7518
7615
|
},
|
|
7519
|
-
/* @__PURE__ */
|
|
7616
|
+
/* @__PURE__ */ React101.createElement("span", null, children)
|
|
7520
7617
|
);
|
|
7521
7618
|
};
|
|
7522
7619
|
|
|
@@ -7524,6 +7621,7 @@ var ConditionalTooltip = ({
|
|
|
7524
7621
|
var controlTypes2 = {
|
|
7525
7622
|
"list-items": { component: ListItemsControl, layout: "full" },
|
|
7526
7623
|
"menu-items": { component: MenuItemsControl, layout: "full" },
|
|
7624
|
+
"submenu-toggle": { component: SubmenuToggleControl, layout: "full" },
|
|
7527
7625
|
tabs: { component: TabsControl, layout: "full" },
|
|
7528
7626
|
"accordion-items": { component: AccordionItemsControl, layout: "full" }
|
|
7529
7627
|
};
|
|
@@ -7545,7 +7643,7 @@ import {
|
|
|
7545
7643
|
import { controlActionsMenu as controlActionsMenu2 } from "@elementor/menus";
|
|
7546
7644
|
|
|
7547
7645
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
7548
|
-
import * as
|
|
7646
|
+
import * as React102 from "react";
|
|
7549
7647
|
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp10 } from "@elementor/editor-controls";
|
|
7550
7648
|
import {
|
|
7551
7649
|
backgroundImageOverlayPropTypeUtil
|
|
@@ -7688,26 +7786,26 @@ var useDynamicTag = (tagName) => {
|
|
|
7688
7786
|
};
|
|
7689
7787
|
|
|
7690
7788
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
7691
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
7789
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React102.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
7692
7790
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
7693
7791
|
const context = useBoundProp10(backgroundImageOverlayPropTypeUtil);
|
|
7694
|
-
return /* @__PURE__ */
|
|
7792
|
+
return /* @__PURE__ */ React102.createElement(PropProvider4, { ...context, value: value.value }, /* @__PURE__ */ React102.createElement(PropKeyProvider4, { bind: "image" }, /* @__PURE__ */ React102.createElement(Wrapper2, { rawValue: value.value })));
|
|
7695
7793
|
};
|
|
7696
7794
|
var Wrapper2 = ({ rawValue }) => {
|
|
7697
7795
|
const { propType } = useBoundProp10();
|
|
7698
7796
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
7699
|
-
return /* @__PURE__ */
|
|
7797
|
+
return /* @__PURE__ */ React102.createElement(PropProvider4, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React102.createElement(PropKeyProvider4, { bind: "src" }, /* @__PURE__ */ React102.createElement(Content, { rawValue: rawValue.image })));
|
|
7700
7798
|
};
|
|
7701
7799
|
var Content = ({ rawValue }) => {
|
|
7702
7800
|
const src = rawValue.value.src;
|
|
7703
7801
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
7704
|
-
return /* @__PURE__ */
|
|
7802
|
+
return /* @__PURE__ */ React102.createElement(React102.Fragment, null, dynamicTag?.label);
|
|
7705
7803
|
};
|
|
7706
7804
|
|
|
7707
7805
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
7708
|
-
import * as
|
|
7806
|
+
import * as React106 from "react";
|
|
7709
7807
|
import {
|
|
7710
|
-
ControlFormLabel as
|
|
7808
|
+
ControlFormLabel as ControlFormLabel8,
|
|
7711
7809
|
PropKeyProvider as PropKeyProvider6,
|
|
7712
7810
|
PropProvider as PropProvider6,
|
|
7713
7811
|
useBoundProp as useBoundProp13
|
|
@@ -7717,12 +7815,12 @@ import { DatabaseIcon as DatabaseIcon3, SettingsIcon, XIcon } from "@elementor/i
|
|
|
7717
7815
|
import {
|
|
7718
7816
|
bindPopover,
|
|
7719
7817
|
bindTrigger as bindTrigger2,
|
|
7720
|
-
Box as
|
|
7818
|
+
Box as Box10,
|
|
7721
7819
|
Divider as Divider8,
|
|
7722
7820
|
Grid as Grid8,
|
|
7723
7821
|
IconButton as IconButton2,
|
|
7724
7822
|
Popover,
|
|
7725
|
-
Stack as
|
|
7823
|
+
Stack as Stack21,
|
|
7726
7824
|
Tab as Tab2,
|
|
7727
7825
|
TabPanel as TabPanel2,
|
|
7728
7826
|
Tabs as Tabs2,
|
|
@@ -7730,7 +7828,7 @@ import {
|
|
|
7730
7828
|
usePopupState as usePopupState2,
|
|
7731
7829
|
useTabs as useTabs2
|
|
7732
7830
|
} from "@elementor/ui";
|
|
7733
|
-
import { __ as
|
|
7831
|
+
import { __ as __81 } from "@wordpress/i18n";
|
|
7734
7832
|
|
|
7735
7833
|
// src/hooks/use-persist-dynamic-value.ts
|
|
7736
7834
|
import { useSessionStorage as useSessionStorage5 } from "@elementor/session";
|
|
@@ -7741,11 +7839,11 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
7741
7839
|
};
|
|
7742
7840
|
|
|
7743
7841
|
// src/dynamics/dynamic-control.tsx
|
|
7744
|
-
import * as
|
|
7842
|
+
import * as React104 from "react";
|
|
7745
7843
|
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as useBoundProp11 } from "@elementor/editor-controls";
|
|
7746
7844
|
|
|
7747
7845
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
7748
|
-
import * as
|
|
7846
|
+
import * as React103 from "react";
|
|
7749
7847
|
import { useMemo as useMemo13 } from "react";
|
|
7750
7848
|
import { isDependencyMet as isDependencyMet3 } from "@elementor/editor-props";
|
|
7751
7849
|
var DynamicConditionalControl = ({
|
|
@@ -7787,10 +7885,10 @@ var DynamicConditionalControl = ({
|
|
|
7787
7885
|
return { ...defaults, ...convertedSettings };
|
|
7788
7886
|
}, [defaults, convertedSettings]);
|
|
7789
7887
|
if (!propType?.dependencies?.terms.length) {
|
|
7790
|
-
return /* @__PURE__ */
|
|
7888
|
+
return /* @__PURE__ */ React103.createElement(React103.Fragment, null, children);
|
|
7791
7889
|
}
|
|
7792
7890
|
const isHidden = !isDependencyMet3(propType?.dependencies, effectiveSettings).isMet;
|
|
7793
|
-
return isHidden ? null : /* @__PURE__ */
|
|
7891
|
+
return isHidden ? null : /* @__PURE__ */ React103.createElement(React103.Fragment, null, children);
|
|
7794
7892
|
};
|
|
7795
7893
|
|
|
7796
7894
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -7815,7 +7913,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
7815
7913
|
});
|
|
7816
7914
|
};
|
|
7817
7915
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
7818
|
-
return /* @__PURE__ */
|
|
7916
|
+
return /* @__PURE__ */ React104.createElement(PropProvider5, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React104.createElement(PropKeyProvider5, { bind }, /* @__PURE__ */ React104.createElement(
|
|
7819
7917
|
DynamicConditionalControl,
|
|
7820
7918
|
{
|
|
7821
7919
|
propType: dynamicPropType,
|
|
@@ -7827,19 +7925,19 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
7827
7925
|
};
|
|
7828
7926
|
|
|
7829
7927
|
// src/dynamics/components/dynamic-selection.tsx
|
|
7830
|
-
import * as
|
|
7831
|
-
import { Fragment as Fragment17, useEffect as useEffect12, useState as
|
|
7928
|
+
import * as React105 from "react";
|
|
7929
|
+
import { Fragment as Fragment17, useEffect as useEffect12, useState as useState12 } from "react";
|
|
7832
7930
|
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as useBoundProp12 } from "@elementor/editor-controls";
|
|
7833
7931
|
import { CtaButton, PopoverHeader, PopoverMenuList, SearchField, SectionPopoverBody } from "@elementor/editor-ui";
|
|
7834
7932
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
7835
|
-
import { Divider as Divider7, Link as Link3, Stack as
|
|
7836
|
-
import { __ as
|
|
7933
|
+
import { Divider as Divider7, Link as Link3, Stack as Stack20, Typography as Typography6, useTheme as useTheme3 } from "@elementor/ui";
|
|
7934
|
+
import { __ as __80 } from "@wordpress/i18n";
|
|
7837
7935
|
var SIZE2 = "tiny";
|
|
7838
7936
|
var PROMO_TEXT_WIDTH = 170;
|
|
7839
7937
|
var PRO_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-modal/";
|
|
7840
7938
|
var RENEW_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-renew-modal/";
|
|
7841
7939
|
var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
7842
|
-
const [searchValue, setSearchValue] =
|
|
7940
|
+
const [searchValue, setSearchValue] = useState12("");
|
|
7843
7941
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
7844
7942
|
const theme = useTheme3();
|
|
7845
7943
|
const { value: anyValue } = useBoundProp12();
|
|
@@ -7880,19 +7978,19 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
7880
7978
|
]);
|
|
7881
7979
|
const getPopOverContent = () => {
|
|
7882
7980
|
if (hasNoDynamicTags) {
|
|
7883
|
-
return /* @__PURE__ */
|
|
7981
|
+
return /* @__PURE__ */ React105.createElement(NoDynamicTags, null);
|
|
7884
7982
|
}
|
|
7885
7983
|
if (expired) {
|
|
7886
|
-
return /* @__PURE__ */
|
|
7984
|
+
return /* @__PURE__ */ React105.createElement(ExpiredDynamicTags, null);
|
|
7887
7985
|
}
|
|
7888
|
-
return /* @__PURE__ */
|
|
7986
|
+
return /* @__PURE__ */ React105.createElement(Fragment17, null, /* @__PURE__ */ React105.createElement(
|
|
7889
7987
|
SearchField,
|
|
7890
7988
|
{
|
|
7891
7989
|
value: searchValue,
|
|
7892
7990
|
onSearch: handleSearch,
|
|
7893
|
-
placeholder:
|
|
7991
|
+
placeholder: __80("Search dynamic tags\u2026", "elementor")
|
|
7894
7992
|
}
|
|
7895
|
-
), /* @__PURE__ */
|
|
7993
|
+
), /* @__PURE__ */ React105.createElement(Divider7, null), /* @__PURE__ */ React105.createElement(
|
|
7896
7994
|
PopoverMenuList,
|
|
7897
7995
|
{
|
|
7898
7996
|
items: virtualizedItems,
|
|
@@ -7900,21 +7998,21 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
7900
7998
|
onClose: closePopover,
|
|
7901
7999
|
selectedValue: dynamicValue?.name,
|
|
7902
8000
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
7903
|
-
noResultsComponent: /* @__PURE__ */
|
|
8001
|
+
noResultsComponent: /* @__PURE__ */ React105.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
7904
8002
|
}
|
|
7905
8003
|
));
|
|
7906
8004
|
};
|
|
7907
|
-
return /* @__PURE__ */
|
|
8005
|
+
return /* @__PURE__ */ React105.createElement(SectionPopoverBody, { "aria-label": __80("Dynamic tags", "elementor") }, /* @__PURE__ */ React105.createElement(
|
|
7908
8006
|
PopoverHeader,
|
|
7909
8007
|
{
|
|
7910
|
-
title:
|
|
8008
|
+
title: __80("Dynamic tags", "elementor"),
|
|
7911
8009
|
onClose: closePopover,
|
|
7912
|
-
icon: /* @__PURE__ */
|
|
8010
|
+
icon: /* @__PURE__ */ React105.createElement(DatabaseIcon2, { fontSize: SIZE2 })
|
|
7913
8011
|
}
|
|
7914
8012
|
), getPopOverContent());
|
|
7915
8013
|
};
|
|
7916
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
7917
|
-
|
|
8014
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React105.createElement(
|
|
8015
|
+
Stack20,
|
|
7918
8016
|
{
|
|
7919
8017
|
gap: 1,
|
|
7920
8018
|
alignItems: "center",
|
|
@@ -7924,12 +8022,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React103.createEle
|
|
|
7924
8022
|
color: "text.secondary",
|
|
7925
8023
|
sx: { pb: 3.5 }
|
|
7926
8024
|
},
|
|
7927
|
-
/* @__PURE__ */
|
|
7928
|
-
/* @__PURE__ */
|
|
7929
|
-
/* @__PURE__ */
|
|
8025
|
+
/* @__PURE__ */ React105.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
8026
|
+
/* @__PURE__ */ React105.createElement(Typography6, { align: "center", variant: "subtitle2" }, __80("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React105.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
8027
|
+
/* @__PURE__ */ React105.createElement(Typography6, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, __80("Try something else.", "elementor"), /* @__PURE__ */ React105.createElement(Link3, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __80("Clear & try again", "elementor")))
|
|
7930
8028
|
);
|
|
7931
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
7932
|
-
|
|
8029
|
+
var NoDynamicTags = () => /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Divider7, null), /* @__PURE__ */ React105.createElement(
|
|
8030
|
+
Stack20,
|
|
7933
8031
|
{
|
|
7934
8032
|
gap: 1,
|
|
7935
8033
|
alignItems: "center",
|
|
@@ -7939,10 +8037,10 @@ var NoDynamicTags = () => /* @__PURE__ */ React103.createElement(React103.Fragme
|
|
|
7939
8037
|
color: "text.secondary",
|
|
7940
8038
|
sx: { pb: 3.5 }
|
|
7941
8039
|
},
|
|
7942
|
-
/* @__PURE__ */
|
|
7943
|
-
/* @__PURE__ */
|
|
7944
|
-
/* @__PURE__ */
|
|
7945
|
-
/* @__PURE__ */
|
|
8040
|
+
/* @__PURE__ */ React105.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
8041
|
+
/* @__PURE__ */ React105.createElement(Typography6, { align: "center", variant: "subtitle2" }, __80("Streamline your workflow with dynamic tags", "elementor")),
|
|
8042
|
+
/* @__PURE__ */ React105.createElement(Typography6, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, __80("Upgrade now to display your content dynamically.", "elementor")),
|
|
8043
|
+
/* @__PURE__ */ React105.createElement(
|
|
7946
8044
|
CtaButton,
|
|
7947
8045
|
{
|
|
7948
8046
|
size: "small",
|
|
@@ -7951,8 +8049,8 @@ var NoDynamicTags = () => /* @__PURE__ */ React103.createElement(React103.Fragme
|
|
|
7951
8049
|
}
|
|
7952
8050
|
)
|
|
7953
8051
|
));
|
|
7954
|
-
var ExpiredDynamicTags = () => /* @__PURE__ */
|
|
7955
|
-
|
|
8052
|
+
var ExpiredDynamicTags = () => /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Divider7, null), /* @__PURE__ */ React105.createElement(
|
|
8053
|
+
Stack20,
|
|
7956
8054
|
{
|
|
7957
8055
|
gap: 1,
|
|
7958
8056
|
alignItems: "center",
|
|
@@ -7962,16 +8060,16 @@ var ExpiredDynamicTags = () => /* @__PURE__ */ React103.createElement(React103.F
|
|
|
7962
8060
|
color: "text.secondary",
|
|
7963
8061
|
sx: { pb: 3.5 }
|
|
7964
8062
|
},
|
|
7965
|
-
/* @__PURE__ */
|
|
7966
|
-
/* @__PURE__ */
|
|
7967
|
-
/* @__PURE__ */
|
|
7968
|
-
/* @__PURE__ */
|
|
8063
|
+
/* @__PURE__ */ React105.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
8064
|
+
/* @__PURE__ */ React105.createElement(Typography6, { align: "center", variant: "subtitle2" }, __80("Unlock your Dynamic tags again", "elementor")),
|
|
8065
|
+
/* @__PURE__ */ React105.createElement(Typography6, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, __80("Dynamic tags need Elementor Pro. Renew now to keep them active.", "elementor")),
|
|
8066
|
+
/* @__PURE__ */ React105.createElement(
|
|
7969
8067
|
CtaButton,
|
|
7970
8068
|
{
|
|
7971
8069
|
size: "small",
|
|
7972
8070
|
href: RENEW_DYNAMIC_TAGS_URL,
|
|
7973
8071
|
onClick: () => trackUpgradePromotionClick({ target_name: "dynamic_tags" }),
|
|
7974
|
-
children:
|
|
8072
|
+
children: __80("Renew Now", "elementor")
|
|
7975
8073
|
}
|
|
7976
8074
|
)
|
|
7977
8075
|
));
|
|
@@ -8008,7 +8106,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
8008
8106
|
const { name: tagName = "" } = value;
|
|
8009
8107
|
const dynamicTag = useDynamicTag(tagName);
|
|
8010
8108
|
if (!isDynamicTagSupported(tagName) && OriginalControl) {
|
|
8011
|
-
return /* @__PURE__ */
|
|
8109
|
+
return /* @__PURE__ */ React106.createElement(PropProvider6, { propType: originalPropType, value: { [bind]: null }, setValue: setAnyValue }, /* @__PURE__ */ React106.createElement(PropKeyProvider6, { bind }, /* @__PURE__ */ React106.createElement(OriginalControl, { ...props })));
|
|
8012
8110
|
}
|
|
8013
8111
|
const removeDynamicTag = () => {
|
|
8014
8112
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -8016,25 +8114,25 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
8016
8114
|
if (!dynamicTag) {
|
|
8017
8115
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
8018
8116
|
}
|
|
8019
|
-
return /* @__PURE__ */
|
|
8117
|
+
return /* @__PURE__ */ React106.createElement(Box10, null, /* @__PURE__ */ React106.createElement(
|
|
8020
8118
|
Tag,
|
|
8021
8119
|
{
|
|
8022
8120
|
fullWidth: true,
|
|
8023
8121
|
showActionsOnHover: true,
|
|
8024
8122
|
label: dynamicTag.label,
|
|
8025
|
-
startIcon: /* @__PURE__ */
|
|
8123
|
+
startIcon: /* @__PURE__ */ React106.createElement(DatabaseIcon3, { fontSize: SIZE3 }),
|
|
8026
8124
|
...bindTrigger2(selectionPopoverState),
|
|
8027
|
-
actions: /* @__PURE__ */
|
|
8125
|
+
actions: /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(DynamicSettingsPopover, { dynamicTag, disabled: readonly }), /* @__PURE__ */ React106.createElement(
|
|
8028
8126
|
IconButton2,
|
|
8029
8127
|
{
|
|
8030
8128
|
size: SIZE3,
|
|
8031
8129
|
onClick: removeDynamicTag,
|
|
8032
|
-
"aria-label":
|
|
8130
|
+
"aria-label": __81("Remove dynamic value", "elementor")
|
|
8033
8131
|
},
|
|
8034
|
-
/* @__PURE__ */
|
|
8132
|
+
/* @__PURE__ */ React106.createElement(XIcon, { fontSize: SIZE3 })
|
|
8035
8133
|
))
|
|
8036
8134
|
}
|
|
8037
|
-
), /* @__PURE__ */
|
|
8135
|
+
), /* @__PURE__ */ React106.createElement(
|
|
8038
8136
|
Popover,
|
|
8039
8137
|
{
|
|
8040
8138
|
disablePortal: true,
|
|
@@ -8046,7 +8144,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
8046
8144
|
},
|
|
8047
8145
|
...bindPopover(selectionPopoverState)
|
|
8048
8146
|
},
|
|
8049
|
-
/* @__PURE__ */
|
|
8147
|
+
/* @__PURE__ */ React106.createElement(SectionPopoverBody2, { "aria-label": __81("Dynamic tags", "elementor") }, /* @__PURE__ */ React106.createElement(DynamicSelection, { close: selectionPopoverState.close, expired: readonly }))
|
|
8050
8148
|
));
|
|
8051
8149
|
};
|
|
8052
8150
|
var DynamicSettingsPopover = ({
|
|
@@ -8058,16 +8156,16 @@ var DynamicSettingsPopover = ({
|
|
|
8058
8156
|
if (!hasDynamicSettings) {
|
|
8059
8157
|
return null;
|
|
8060
8158
|
}
|
|
8061
|
-
return /* @__PURE__ */
|
|
8159
|
+
return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(
|
|
8062
8160
|
IconButton2,
|
|
8063
8161
|
{
|
|
8064
8162
|
size: SIZE3,
|
|
8065
8163
|
disabled,
|
|
8066
8164
|
...!disabled && bindTrigger2(popupState),
|
|
8067
|
-
"aria-label":
|
|
8165
|
+
"aria-label": __81("Dynamic settings", "elementor")
|
|
8068
8166
|
},
|
|
8069
|
-
/* @__PURE__ */
|
|
8070
|
-
), /* @__PURE__ */
|
|
8167
|
+
/* @__PURE__ */ React106.createElement(SettingsIcon, { fontSize: SIZE3 })
|
|
8168
|
+
), /* @__PURE__ */ React106.createElement(
|
|
8071
8169
|
Popover,
|
|
8072
8170
|
{
|
|
8073
8171
|
disablePortal: true,
|
|
@@ -8079,14 +8177,14 @@ var DynamicSettingsPopover = ({
|
|
|
8079
8177
|
},
|
|
8080
8178
|
...bindPopover(popupState)
|
|
8081
8179
|
},
|
|
8082
|
-
/* @__PURE__ */
|
|
8180
|
+
/* @__PURE__ */ React106.createElement(SectionPopoverBody2, { "aria-label": __81("Dynamic settings", "elementor") }, /* @__PURE__ */ React106.createElement(
|
|
8083
8181
|
PopoverHeader2,
|
|
8084
8182
|
{
|
|
8085
8183
|
title: dynamicTag.label,
|
|
8086
8184
|
onClose: popupState.close,
|
|
8087
|
-
icon: /* @__PURE__ */
|
|
8185
|
+
icon: /* @__PURE__ */ React106.createElement(DatabaseIcon3, { fontSize: SIZE3 })
|
|
8088
8186
|
}
|
|
8089
|
-
), /* @__PURE__ */
|
|
8187
|
+
), /* @__PURE__ */ React106.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls, tagName: dynamicTag.name }))
|
|
8090
8188
|
));
|
|
8091
8189
|
};
|
|
8092
8190
|
var DynamicSettings = ({ controls, tagName }) => {
|
|
@@ -8097,9 +8195,9 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
8097
8195
|
}
|
|
8098
8196
|
if (tagsWithoutTabs.includes(tagName)) {
|
|
8099
8197
|
const singleTab = tabs[0];
|
|
8100
|
-
return /* @__PURE__ */
|
|
8198
|
+
return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Divider8, null), /* @__PURE__ */ React106.createElement(ControlsItemsStack, { items: singleTab.value.items }));
|
|
8101
8199
|
}
|
|
8102
|
-
return /* @__PURE__ */
|
|
8200
|
+
return /* @__PURE__ */ React106.createElement(React106.Fragment, null, tabs.length > 1 && /* @__PURE__ */ React106.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React106.createElement(
|
|
8103
8201
|
Tab2,
|
|
8104
8202
|
{
|
|
8105
8203
|
key: index,
|
|
@@ -8107,15 +8205,15 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
8107
8205
|
sx: { px: 1, py: 0.5 },
|
|
8108
8206
|
...getTabProps(index)
|
|
8109
8207
|
}
|
|
8110
|
-
))), /* @__PURE__ */
|
|
8111
|
-
return /* @__PURE__ */
|
|
8208
|
+
))), /* @__PURE__ */ React106.createElement(Divider8, null), tabs.map(({ value }, index) => {
|
|
8209
|
+
return /* @__PURE__ */ React106.createElement(
|
|
8112
8210
|
TabPanel2,
|
|
8113
8211
|
{
|
|
8114
8212
|
key: index,
|
|
8115
8213
|
sx: { flexGrow: 1, py: 0, overflowY: "auto" },
|
|
8116
8214
|
...getTabPanelProps(index)
|
|
8117
8215
|
},
|
|
8118
|
-
/* @__PURE__ */
|
|
8216
|
+
/* @__PURE__ */ React106.createElement(ControlsItemsStack, { items: value.items })
|
|
8119
8217
|
);
|
|
8120
8218
|
}));
|
|
8121
8219
|
};
|
|
@@ -8157,11 +8255,11 @@ var Control2 = ({ control }) => {
|
|
|
8157
8255
|
display: "grid",
|
|
8158
8256
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
8159
8257
|
} : {};
|
|
8160
|
-
return /* @__PURE__ */
|
|
8258
|
+
return /* @__PURE__ */ React106.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React106.createElement(Grid8, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React106.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React106.createElement(ControlFormLabel8, null, control.label)) : null, /* @__PURE__ */ React106.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React106.createElement(Control, { type: control.type, props: controlProps }))));
|
|
8161
8259
|
};
|
|
8162
8260
|
function ControlsItemsStack({ items: items3 }) {
|
|
8163
|
-
return /* @__PURE__ */
|
|
8164
|
-
(item) => item.type === "control" ? /* @__PURE__ */
|
|
8261
|
+
return /* @__PURE__ */ React106.createElement(Stack21, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
8262
|
+
(item) => item.type === "control" ? /* @__PURE__ */ React106.createElement(Control2, { key: item.value.bind, control: item.value }) : null
|
|
8165
8263
|
));
|
|
8166
8264
|
}
|
|
8167
8265
|
|
|
@@ -8218,18 +8316,18 @@ function getDynamicValue(name, settings, renderPostId) {
|
|
|
8218
8316
|
}
|
|
8219
8317
|
|
|
8220
8318
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
8221
|
-
import * as
|
|
8319
|
+
import * as React107 from "react";
|
|
8222
8320
|
import { useBoundProp as useBoundProp14 } from "@elementor/editor-controls";
|
|
8223
8321
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
8224
|
-
import { __ as
|
|
8322
|
+
import { __ as __82 } from "@wordpress/i18n";
|
|
8225
8323
|
var usePropDynamicAction = () => {
|
|
8226
8324
|
const { propType } = useBoundProp14();
|
|
8227
8325
|
const visible = !!propType && supportsDynamic(propType);
|
|
8228
8326
|
return {
|
|
8229
8327
|
visible,
|
|
8230
8328
|
icon: DatabaseIcon4,
|
|
8231
|
-
title:
|
|
8232
|
-
content: ({ close }) => /* @__PURE__ */
|
|
8329
|
+
title: __82("Dynamic tags", "elementor"),
|
|
8330
|
+
content: ({ close }) => /* @__PURE__ */ React107.createElement(DynamicSelection, { close })
|
|
8233
8331
|
};
|
|
8234
8332
|
};
|
|
8235
8333
|
|
|
@@ -8264,7 +8362,7 @@ import { useBoundProp as useBoundProp15 } from "@elementor/editor-controls";
|
|
|
8264
8362
|
import { hasVariable as hasVariable2 } from "@elementor/editor-variables";
|
|
8265
8363
|
import { BrushBigIcon } from "@elementor/icons";
|
|
8266
8364
|
import { controlActionsMenu as controlActionsMenu3 } from "@elementor/menus";
|
|
8267
|
-
import { __ as
|
|
8365
|
+
import { __ as __83 } from "@wordpress/i18n";
|
|
8268
8366
|
|
|
8269
8367
|
// src/utils/is-equal.ts
|
|
8270
8368
|
function isEqual(a, b) {
|
|
@@ -8340,22 +8438,22 @@ function useResetStyleValueProps() {
|
|
|
8340
8438
|
const visible = calculateVisibility();
|
|
8341
8439
|
return {
|
|
8342
8440
|
visible,
|
|
8343
|
-
title:
|
|
8441
|
+
title: __83("Clear", "elementor"),
|
|
8344
8442
|
icon: BrushBigIcon,
|
|
8345
8443
|
onClick: () => resetValue()
|
|
8346
8444
|
};
|
|
8347
8445
|
}
|
|
8348
8446
|
|
|
8349
8447
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
8350
|
-
import * as
|
|
8448
|
+
import * as React113 from "react";
|
|
8351
8449
|
import { useBoundProp as useBoundProp16 } from "@elementor/editor-controls";
|
|
8352
8450
|
import { isEmpty as isEmpty3 } from "@elementor/editor-props";
|
|
8353
8451
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
8354
|
-
import { __ as
|
|
8452
|
+
import { __ as __87 } from "@wordpress/i18n";
|
|
8355
8453
|
|
|
8356
8454
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
8357
|
-
import * as
|
|
8358
|
-
import { useMemo as useMemo14, useRef as
|
|
8455
|
+
import * as React112 from "react";
|
|
8456
|
+
import { useMemo as useMemo14, useRef as useRef23, useState as useState14 } from "react";
|
|
8359
8457
|
import {
|
|
8360
8458
|
createPropsResolver as createPropsResolver2,
|
|
8361
8459
|
stylesInheritanceTransformersRegistry
|
|
@@ -8363,29 +8461,29 @@ import {
|
|
|
8363
8461
|
import { PopoverHeader as PopoverHeader3, useSectionWidth as useSectionWidth2 } from "@elementor/editor-ui";
|
|
8364
8462
|
import {
|
|
8365
8463
|
Backdrop,
|
|
8366
|
-
Box as
|
|
8464
|
+
Box as Box12,
|
|
8367
8465
|
Card,
|
|
8368
8466
|
CardContent,
|
|
8369
8467
|
ClickAwayListener,
|
|
8370
8468
|
IconButton as IconButton3,
|
|
8371
8469
|
Infotip as Infotip4,
|
|
8372
|
-
Stack as
|
|
8470
|
+
Stack as Stack22,
|
|
8373
8471
|
Tooltip as Tooltip7
|
|
8374
8472
|
} from "@elementor/ui";
|
|
8375
|
-
import { __ as
|
|
8473
|
+
import { __ as __86 } from "@wordpress/i18n";
|
|
8376
8474
|
|
|
8377
8475
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
8378
|
-
import { isValidElement, useEffect as useEffect13, useState as
|
|
8476
|
+
import { isValidElement, useEffect as useEffect13, useState as useState13 } from "react";
|
|
8379
8477
|
import { UnknownStyleStateError } from "@elementor/editor-canvas";
|
|
8380
8478
|
import {
|
|
8381
8479
|
isClassState as isClassState2,
|
|
8382
8480
|
isPseudoState
|
|
8383
8481
|
} from "@elementor/editor-styles";
|
|
8384
8482
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY2 } from "@elementor/editor-styles-repository";
|
|
8385
|
-
import { __ as
|
|
8483
|
+
import { __ as __84 } from "@wordpress/i18n";
|
|
8386
8484
|
var MAXIMUM_ITEMS = 2;
|
|
8387
8485
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
8388
|
-
const [items3, setItems] =
|
|
8486
|
+
const [items3, setItems] = useState13([]);
|
|
8389
8487
|
useEffect13(() => {
|
|
8390
8488
|
(async () => {
|
|
8391
8489
|
const normalizedItems = await Promise.all(
|
|
@@ -8393,7 +8491,7 @@ var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
|
8393
8491
|
);
|
|
8394
8492
|
const validItems = normalizedItems.map((item) => ({
|
|
8395
8493
|
...item,
|
|
8396
|
-
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel :
|
|
8494
|
+
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel : __84("Base", "elementor")
|
|
8397
8495
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
8398
8496
|
setItems(validItems);
|
|
8399
8497
|
})();
|
|
@@ -8450,7 +8548,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
8450
8548
|
};
|
|
8451
8549
|
|
|
8452
8550
|
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
8453
|
-
import * as
|
|
8551
|
+
import * as React108 from "react";
|
|
8454
8552
|
import { useBreakpoints as useBreakpoints2 } from "@elementor/editor-responsive";
|
|
8455
8553
|
import {
|
|
8456
8554
|
DesktopIcon,
|
|
@@ -8481,20 +8579,20 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
8481
8579
|
return null;
|
|
8482
8580
|
}
|
|
8483
8581
|
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
8484
|
-
return /* @__PURE__ */
|
|
8582
|
+
return /* @__PURE__ */ React108.createElement(Tooltip4, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React108.createElement(IconComponent, { fontSize: SIZE4, sx: { mt: "2px" } }));
|
|
8485
8583
|
};
|
|
8486
8584
|
|
|
8487
8585
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
8488
|
-
import * as
|
|
8586
|
+
import * as React109 from "react";
|
|
8489
8587
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY3 } from "@elementor/editor-styles-repository";
|
|
8490
8588
|
import { InfoCircleIcon as InfoCircleIcon2 } from "@elementor/icons";
|
|
8491
8589
|
import { Chip as Chip5, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
8492
|
-
import { __ as
|
|
8590
|
+
import { __ as __85 } from "@wordpress/i18n";
|
|
8493
8591
|
var SIZE5 = "tiny";
|
|
8494
8592
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
8495
8593
|
const isBaseStyle = provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY3;
|
|
8496
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */
|
|
8497
|
-
return /* @__PURE__ */
|
|
8594
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React109.createElement(Tooltip5, { title: __85("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React109.createElement(InfoCircleIcon2, { fontSize: SIZE5 })) : void 0;
|
|
8595
|
+
return /* @__PURE__ */ React109.createElement(
|
|
8498
8596
|
Chip5,
|
|
8499
8597
|
{
|
|
8500
8598
|
label: displayLabel,
|
|
@@ -8520,10 +8618,10 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
8520
8618
|
};
|
|
8521
8619
|
|
|
8522
8620
|
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
8523
|
-
import * as
|
|
8621
|
+
import * as React110 from "react";
|
|
8524
8622
|
import { Tooltip as Tooltip6, Typography as Typography7 } from "@elementor/ui";
|
|
8525
8623
|
var ValueComponent = ({ index, value }) => {
|
|
8526
|
-
return /* @__PURE__ */
|
|
8624
|
+
return /* @__PURE__ */ React110.createElement(Tooltip6, { title: value, placement: "top" }, /* @__PURE__ */ React110.createElement(
|
|
8527
8625
|
Typography7,
|
|
8528
8626
|
{
|
|
8529
8627
|
variant: "caption",
|
|
@@ -8545,9 +8643,9 @@ var ValueComponent = ({ index, value }) => {
|
|
|
8545
8643
|
};
|
|
8546
8644
|
|
|
8547
8645
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
8548
|
-
import * as
|
|
8549
|
-
import { Box as
|
|
8550
|
-
var ActionIcons = () => /* @__PURE__ */
|
|
8646
|
+
import * as React111 from "react";
|
|
8647
|
+
import { Box as Box11 } from "@elementor/ui";
|
|
8648
|
+
var ActionIcons = () => /* @__PURE__ */ React111.createElement(Box11, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
8551
8649
|
|
|
8552
8650
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
8553
8651
|
var SECTION_PADDING_INLINE = 32;
|
|
@@ -8560,8 +8658,8 @@ var StylesInheritanceInfotip = ({
|
|
|
8560
8658
|
children,
|
|
8561
8659
|
isDisabled
|
|
8562
8660
|
}) => {
|
|
8563
|
-
const [showInfotip, setShowInfotip] =
|
|
8564
|
-
const triggerRef =
|
|
8661
|
+
const [showInfotip, setShowInfotip] = useState14(false);
|
|
8662
|
+
const triggerRef = useRef23(null);
|
|
8565
8663
|
const toggleInfotip = () => {
|
|
8566
8664
|
if (isDisabled) {
|
|
8567
8665
|
return;
|
|
@@ -8583,7 +8681,7 @@ var StylesInheritanceInfotip = ({
|
|
|
8583
8681
|
});
|
|
8584
8682
|
}, [key, propType]);
|
|
8585
8683
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
8586
|
-
const infotipContent = /* @__PURE__ */
|
|
8684
|
+
const infotipContent = /* @__PURE__ */ React112.createElement(ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React112.createElement(
|
|
8587
8685
|
Card,
|
|
8588
8686
|
{
|
|
8589
8687
|
elevation: 0,
|
|
@@ -8596,8 +8694,8 @@ var StylesInheritanceInfotip = ({
|
|
|
8596
8694
|
flexDirection: "column"
|
|
8597
8695
|
}
|
|
8598
8696
|
},
|
|
8599
|
-
/* @__PURE__ */
|
|
8600
|
-
|
|
8697
|
+
/* @__PURE__ */ React112.createElement(
|
|
8698
|
+
Box12,
|
|
8601
8699
|
{
|
|
8602
8700
|
sx: {
|
|
8603
8701
|
position: "sticky",
|
|
@@ -8606,9 +8704,9 @@ var StylesInheritanceInfotip = ({
|
|
|
8606
8704
|
backgroundColor: "background.paper"
|
|
8607
8705
|
}
|
|
8608
8706
|
},
|
|
8609
|
-
/* @__PURE__ */
|
|
8707
|
+
/* @__PURE__ */ React112.createElement(PopoverHeader3, { title: __86("Style origin", "elementor"), onClose: closeInfotip })
|
|
8610
8708
|
),
|
|
8611
|
-
/* @__PURE__ */
|
|
8709
|
+
/* @__PURE__ */ React112.createElement(
|
|
8612
8710
|
CardContent,
|
|
8613
8711
|
{
|
|
8614
8712
|
sx: {
|
|
@@ -8622,39 +8720,39 @@ var StylesInheritanceInfotip = ({
|
|
|
8622
8720
|
}
|
|
8623
8721
|
}
|
|
8624
8722
|
},
|
|
8625
|
-
/* @__PURE__ */
|
|
8626
|
-
return /* @__PURE__ */
|
|
8627
|
-
|
|
8723
|
+
/* @__PURE__ */ React112.createElement(Stack22, { gap: 1.5, sx: { pl: 2, pr: 1, pt: 1.5, pb: 1.5 }, role: "list" }, items3.map((item, index) => {
|
|
8724
|
+
return /* @__PURE__ */ React112.createElement(
|
|
8725
|
+
Box12,
|
|
8628
8726
|
{
|
|
8629
8727
|
key: item.id,
|
|
8630
8728
|
display: "flex",
|
|
8631
8729
|
gap: 0.5,
|
|
8632
8730
|
role: "listitem",
|
|
8633
|
-
"aria-label":
|
|
8731
|
+
"aria-label": __86("Inheritance item: %s", "elementor").replace(
|
|
8634
8732
|
"%s",
|
|
8635
8733
|
item.displayLabel
|
|
8636
8734
|
)
|
|
8637
8735
|
},
|
|
8638
|
-
/* @__PURE__ */
|
|
8639
|
-
|
|
8736
|
+
/* @__PURE__ */ React112.createElement(
|
|
8737
|
+
Box12,
|
|
8640
8738
|
{
|
|
8641
8739
|
display: "flex",
|
|
8642
8740
|
gap: 0.5,
|
|
8643
8741
|
sx: { flexWrap: "wrap", width: "100%", alignItems: "flex-start" }
|
|
8644
8742
|
},
|
|
8645
|
-
/* @__PURE__ */
|
|
8646
|
-
/* @__PURE__ */
|
|
8647
|
-
/* @__PURE__ */
|
|
8743
|
+
/* @__PURE__ */ React112.createElement(BreakpointIcon, { breakpoint: item.breakpoint }),
|
|
8744
|
+
/* @__PURE__ */ React112.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }),
|
|
8745
|
+
/* @__PURE__ */ React112.createElement(ValueComponent, { index, value: item.value })
|
|
8648
8746
|
),
|
|
8649
|
-
/* @__PURE__ */
|
|
8747
|
+
/* @__PURE__ */ React112.createElement(ActionIcons, null)
|
|
8650
8748
|
);
|
|
8651
8749
|
}))
|
|
8652
8750
|
)
|
|
8653
8751
|
));
|
|
8654
8752
|
if (isDisabled) {
|
|
8655
|
-
return /* @__PURE__ */
|
|
8753
|
+
return /* @__PURE__ */ React112.createElement(Box12, { sx: { display: "inline-flex" } }, children);
|
|
8656
8754
|
}
|
|
8657
|
-
return /* @__PURE__ */
|
|
8755
|
+
return /* @__PURE__ */ React112.createElement(Box12, { ref: triggerRef, sx: { display: "inline-flex" } }, /* @__PURE__ */ React112.createElement(
|
|
8658
8756
|
TooltipOrInfotip,
|
|
8659
8757
|
{
|
|
8660
8758
|
showInfotip,
|
|
@@ -8662,7 +8760,7 @@ var StylesInheritanceInfotip = ({
|
|
|
8662
8760
|
infotipContent,
|
|
8663
8761
|
isDisabled
|
|
8664
8762
|
},
|
|
8665
|
-
/* @__PURE__ */
|
|
8763
|
+
/* @__PURE__ */ React112.createElement(
|
|
8666
8764
|
IconButton3,
|
|
8667
8765
|
{
|
|
8668
8766
|
onClick: toggleInfotip,
|
|
@@ -8682,10 +8780,10 @@ function TooltipOrInfotip({
|
|
|
8682
8780
|
isDisabled
|
|
8683
8781
|
}) {
|
|
8684
8782
|
if (isDisabled) {
|
|
8685
|
-
return /* @__PURE__ */
|
|
8783
|
+
return /* @__PURE__ */ React112.createElement(Box12, { sx: { display: "inline-flex" } }, children);
|
|
8686
8784
|
}
|
|
8687
8785
|
if (showInfotip) {
|
|
8688
|
-
return /* @__PURE__ */
|
|
8786
|
+
return /* @__PURE__ */ React112.createElement(React112.Fragment, null, /* @__PURE__ */ React112.createElement(
|
|
8689
8787
|
Backdrop,
|
|
8690
8788
|
{
|
|
8691
8789
|
open: showInfotip,
|
|
@@ -8695,7 +8793,7 @@ function TooltipOrInfotip({
|
|
|
8695
8793
|
zIndex: (theme) => theme.zIndex.modal - 1
|
|
8696
8794
|
}
|
|
8697
8795
|
}
|
|
8698
|
-
), /* @__PURE__ */
|
|
8796
|
+
), /* @__PURE__ */ React112.createElement(
|
|
8699
8797
|
Infotip4,
|
|
8700
8798
|
{
|
|
8701
8799
|
placement: "top-end",
|
|
@@ -8707,7 +8805,7 @@ function TooltipOrInfotip({
|
|
|
8707
8805
|
children
|
|
8708
8806
|
));
|
|
8709
8807
|
}
|
|
8710
|
-
return /* @__PURE__ */
|
|
8808
|
+
return /* @__PURE__ */ React112.createElement(Tooltip7, { title: __86("Style origin", "elementor"), placement: "top" }, children);
|
|
8711
8809
|
}
|
|
8712
8810
|
|
|
8713
8811
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
@@ -8720,7 +8818,7 @@ var StylesInheritanceIndicator = ({
|
|
|
8720
8818
|
if (!path || !inheritanceChain.length) {
|
|
8721
8819
|
return null;
|
|
8722
8820
|
}
|
|
8723
|
-
return /* @__PURE__ */
|
|
8821
|
+
return /* @__PURE__ */ React113.createElement(Indicator, { inheritanceChain, path, propType });
|
|
8724
8822
|
};
|
|
8725
8823
|
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
8726
8824
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
@@ -8736,7 +8834,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
8736
8834
|
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
8737
8835
|
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
8738
8836
|
};
|
|
8739
|
-
return /* @__PURE__ */
|
|
8837
|
+
return /* @__PURE__ */ React113.createElement(
|
|
8740
8838
|
StylesInheritanceInfotip,
|
|
8741
8839
|
{
|
|
8742
8840
|
inheritanceChain,
|
|
@@ -8745,17 +8843,17 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
8745
8843
|
label,
|
|
8746
8844
|
isDisabled
|
|
8747
8845
|
},
|
|
8748
|
-
/* @__PURE__ */
|
|
8846
|
+
/* @__PURE__ */ React113.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
8749
8847
|
);
|
|
8750
8848
|
};
|
|
8751
8849
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
8752
8850
|
if (isFinalValue) {
|
|
8753
|
-
return
|
|
8851
|
+
return __87("This is the final value", "elementor");
|
|
8754
8852
|
}
|
|
8755
8853
|
if (hasValue) {
|
|
8756
|
-
return
|
|
8854
|
+
return __87("This value is overridden by another style", "elementor");
|
|
8757
8855
|
}
|
|
8758
|
-
return
|
|
8856
|
+
return __87("This has value from another style", "elementor");
|
|
8759
8857
|
};
|
|
8760
8858
|
|
|
8761
8859
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -8780,7 +8878,7 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
8780
8878
|
]);
|
|
8781
8879
|
|
|
8782
8880
|
// src/styles-inheritance/transformers/array-transformer.tsx
|
|
8783
|
-
import * as
|
|
8881
|
+
import * as React114 from "react";
|
|
8784
8882
|
import { createTransformer as createTransformer2 } from "@elementor/editor-canvas";
|
|
8785
8883
|
var arrayTransformer = createTransformer2((values) => {
|
|
8786
8884
|
if (!values || values.length === 0) {
|
|
@@ -8790,16 +8888,16 @@ var arrayTransformer = createTransformer2((values) => {
|
|
|
8790
8888
|
if (allStrings) {
|
|
8791
8889
|
return values.join(" ");
|
|
8792
8890
|
}
|
|
8793
|
-
return /* @__PURE__ */
|
|
8891
|
+
return /* @__PURE__ */ React114.createElement(React114.Fragment, null, values.map((item, index) => /* @__PURE__ */ React114.createElement(React114.Fragment, { key: index }, index > 0 && " ", item)));
|
|
8794
8892
|
});
|
|
8795
8893
|
|
|
8796
8894
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
8797
|
-
import * as
|
|
8895
|
+
import * as React115 from "react";
|
|
8798
8896
|
import { createTransformer as createTransformer3 } from "@elementor/editor-canvas";
|
|
8799
|
-
import { Stack as
|
|
8800
|
-
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */
|
|
8897
|
+
import { Stack as Stack23, styled as styled7, UnstableColorIndicator } from "@elementor/ui";
|
|
8898
|
+
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React115.createElement(Stack23, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React115.createElement(ItemLabelColor, { value })));
|
|
8801
8899
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
8802
|
-
return /* @__PURE__ */
|
|
8900
|
+
return /* @__PURE__ */ React115.createElement("span", null, color);
|
|
8803
8901
|
};
|
|
8804
8902
|
var StyledUnstableColorIndicator = styled7(UnstableColorIndicator)(({ theme }) => ({
|
|
8805
8903
|
width: "1em",
|
|
@@ -8810,20 +8908,20 @@ var StyledUnstableColorIndicator = styled7(UnstableColorIndicator)(({ theme }) =
|
|
|
8810
8908
|
}));
|
|
8811
8909
|
|
|
8812
8910
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
8813
|
-
import * as
|
|
8911
|
+
import * as React116 from "react";
|
|
8814
8912
|
import { createTransformer as createTransformer4 } from "@elementor/editor-canvas";
|
|
8815
|
-
import { Stack as
|
|
8816
|
-
import { __ as
|
|
8817
|
-
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */
|
|
8913
|
+
import { Stack as Stack24 } from "@elementor/ui";
|
|
8914
|
+
import { __ as __88 } from "@wordpress/i18n";
|
|
8915
|
+
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React116.createElement(Stack24, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React116.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React116.createElement(ItemLabelGradient, { value })));
|
|
8818
8916
|
var ItemIconGradient = ({ value }) => {
|
|
8819
8917
|
const gradient = getGradientValue(value);
|
|
8820
|
-
return /* @__PURE__ */
|
|
8918
|
+
return /* @__PURE__ */ React116.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
8821
8919
|
};
|
|
8822
8920
|
var ItemLabelGradient = ({ value }) => {
|
|
8823
8921
|
if (value.type === "linear") {
|
|
8824
|
-
return /* @__PURE__ */
|
|
8922
|
+
return /* @__PURE__ */ React116.createElement("span", null, __88("Linear gradient", "elementor"));
|
|
8825
8923
|
}
|
|
8826
|
-
return /* @__PURE__ */
|
|
8924
|
+
return /* @__PURE__ */ React116.createElement("span", null, __88("Radial gradient", "elementor"));
|
|
8827
8925
|
};
|
|
8828
8926
|
var getGradientValue = (gradient) => {
|
|
8829
8927
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -8837,15 +8935,15 @@ var getGradientValue = (gradient) => {
|
|
|
8837
8935
|
};
|
|
8838
8936
|
|
|
8839
8937
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
8840
|
-
import * as
|
|
8938
|
+
import * as React117 from "react";
|
|
8841
8939
|
import { createTransformer as createTransformer5 } from "@elementor/editor-canvas";
|
|
8842
8940
|
import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
|
|
8843
|
-
import { CardMedia, Stack as
|
|
8941
|
+
import { CardMedia, Stack as Stack25 } from "@elementor/ui";
|
|
8844
8942
|
import { useWpMediaAttachment } from "@elementor/wp-media";
|
|
8845
|
-
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */
|
|
8943
|
+
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */ React117.createElement(Stack25, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React117.createElement(ItemIconImage, { value }), /* @__PURE__ */ React117.createElement(ItemLabelImage, { value })));
|
|
8846
8944
|
var ItemIconImage = ({ value }) => {
|
|
8847
8945
|
const { imageUrl } = useImage(value);
|
|
8848
|
-
return /* @__PURE__ */
|
|
8946
|
+
return /* @__PURE__ */ React117.createElement(
|
|
8849
8947
|
CardMedia,
|
|
8850
8948
|
{
|
|
8851
8949
|
image: imageUrl,
|
|
@@ -8861,7 +8959,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
8861
8959
|
};
|
|
8862
8960
|
var ItemLabelImage = ({ value }) => {
|
|
8863
8961
|
const { imageTitle } = useImage(value);
|
|
8864
|
-
return /* @__PURE__ */
|
|
8962
|
+
return /* @__PURE__ */ React117.createElement(EllipsisWithTooltip2, { title: imageTitle }, /* @__PURE__ */ React117.createElement("span", null, imageTitle));
|
|
8865
8963
|
};
|
|
8866
8964
|
var useImage = (image) => {
|
|
8867
8965
|
let imageTitle, imageUrl = null;
|
|
@@ -8886,7 +8984,7 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
8886
8984
|
};
|
|
8887
8985
|
|
|
8888
8986
|
// src/styles-inheritance/transformers/box-shadow-transformer.tsx
|
|
8889
|
-
import * as
|
|
8987
|
+
import * as React118 from "react";
|
|
8890
8988
|
import { createTransformer as createTransformer6 } from "@elementor/editor-canvas";
|
|
8891
8989
|
var boxShadowTransformer = createTransformer6((value) => {
|
|
8892
8990
|
if (!value) {
|
|
@@ -8896,13 +8994,13 @@ var boxShadowTransformer = createTransformer6((value) => {
|
|
|
8896
8994
|
const colorValue = color || "#000000";
|
|
8897
8995
|
const sizes = [hOffset || "0px", vOffset || "0px", blur || "10px", spread || "0px"].join(" ");
|
|
8898
8996
|
const positionValue = position || "outset";
|
|
8899
|
-
return /* @__PURE__ */
|
|
8997
|
+
return /* @__PURE__ */ React118.createElement(React118.Fragment, null, colorValue, " ", positionValue, ", ", sizes);
|
|
8900
8998
|
});
|
|
8901
8999
|
|
|
8902
9000
|
// src/styles-inheritance/transformers/color-transformer.tsx
|
|
8903
|
-
import * as
|
|
9001
|
+
import * as React119 from "react";
|
|
8904
9002
|
import { createTransformer as createTransformer7 } from "@elementor/editor-canvas";
|
|
8905
|
-
import { Stack as
|
|
9003
|
+
import { Stack as Stack26, styled as styled8, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
8906
9004
|
function isValidCSSColor(value) {
|
|
8907
9005
|
if (!value.trim()) {
|
|
8908
9006
|
return false;
|
|
@@ -8920,7 +9018,7 @@ var colorTransformer = createTransformer7((value) => {
|
|
|
8920
9018
|
if (!isValidCSSColor(value)) {
|
|
8921
9019
|
return value;
|
|
8922
9020
|
}
|
|
8923
|
-
return /* @__PURE__ */
|
|
9021
|
+
return /* @__PURE__ */ React119.createElement(Stack26, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React119.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React119.createElement("span", null, value));
|
|
8924
9022
|
});
|
|
8925
9023
|
|
|
8926
9024
|
// src/styles-inheritance/transformers/repeater-to-items-transformer.tsx
|
|
@@ -9038,6 +9136,7 @@ export {
|
|
|
9038
9136
|
StyleTabSection,
|
|
9039
9137
|
StyleTabSlot,
|
|
9040
9138
|
StylesProviderCannotUpdatePropsError,
|
|
9139
|
+
SubmenuToggle,
|
|
9041
9140
|
controlsRegistry,
|
|
9042
9141
|
createTopLevelObjectType,
|
|
9043
9142
|
doApplyClasses,
|
|
@@ -9065,6 +9164,7 @@ export {
|
|
|
9065
9164
|
registerElementPanelDefaults,
|
|
9066
9165
|
registerFieldIndicator,
|
|
9067
9166
|
registerStyleProviderToColors,
|
|
9167
|
+
registerSubmenuToggle,
|
|
9068
9168
|
setLicenseConfig,
|
|
9069
9169
|
useClassesProp,
|
|
9070
9170
|
useControlsByWidgetType,
|