@elementor/editor-editing-panel 3.35.0-375 → 3.35.0-377
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +305 -238
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +230 -163
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/promotions/custom-css.tsx +48 -0
- package/src/components/promotions/init.tsx +13 -0
- package/src/components/section.tsx +8 -3
- package/src/components/style-tab-section.tsx +5 -3
- package/src/init.ts +3 -0
package/dist/index.mjs
CHANGED
|
@@ -1808,7 +1808,7 @@ function EditorPanelErrorFallback() {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
|
|
1810
1810
|
// src/components/editing-panel-tabs.tsx
|
|
1811
|
-
import { Fragment as
|
|
1811
|
+
import { Fragment as Fragment10 } from "react";
|
|
1812
1812
|
import * as React83 from "react";
|
|
1813
1813
|
import { isExperimentActive } from "@elementor/editor-v1-adapters";
|
|
1814
1814
|
import { Divider as Divider6, Stack as Stack14, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
@@ -1978,11 +1978,14 @@ function getCollapsibleValue(value, isOpen) {
|
|
|
1978
1978
|
}
|
|
1979
1979
|
|
|
1980
1980
|
// src/components/section.tsx
|
|
1981
|
-
function Section({ title, children, defaultExpanded = false, titleEnd, unmountOnExit = true }) {
|
|
1981
|
+
function Section({ title, children, defaultExpanded = false, titleEnd, unmountOnExit = true, action }) {
|
|
1982
1982
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
1983
1983
|
const ref = useRef3(null);
|
|
1984
|
+
const isDisabled = !!action;
|
|
1984
1985
|
const handleClick = () => {
|
|
1985
|
-
|
|
1986
|
+
if (!isDisabled) {
|
|
1987
|
+
setIsOpen(!isOpen);
|
|
1988
|
+
}
|
|
1986
1989
|
};
|
|
1987
1990
|
const id = useId2();
|
|
1988
1991
|
const labelId = `label-${id}`;
|
|
@@ -2004,7 +2007,8 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2004
2007
|
sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
|
|
2005
2008
|
}
|
|
2006
2009
|
), getCollapsibleValue(titleEnd, isOpen)),
|
|
2007
|
-
|
|
2010
|
+
action,
|
|
2011
|
+
/* @__PURE__ */ React19.createElement(CollapseIcon2, { open: isOpen, color: "secondary", fontSize: "tiny", disabled: isDisabled })
|
|
2008
2012
|
), /* @__PURE__ */ React19.createElement(
|
|
2009
2013
|
Collapse2,
|
|
2010
2014
|
{
|
|
@@ -4695,9 +4699,9 @@ var TypographySection = () => {
|
|
|
4695
4699
|
// src/components/style-tab-section.tsx
|
|
4696
4700
|
import * as React81 from "react";
|
|
4697
4701
|
var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
4698
|
-
const { component, name, title } = section;
|
|
4702
|
+
const { component, name, title, action } = section;
|
|
4699
4703
|
const tabDefaults = useDefaultPanelSettings();
|
|
4700
|
-
const SectionComponent = component;
|
|
4704
|
+
const SectionComponent = component || (() => /* @__PURE__ */ React81.createElement(React81.Fragment, null));
|
|
4701
4705
|
const isExpanded = tabDefaults.defaultSectionsExpanded.style?.includes(name);
|
|
4702
4706
|
return /* @__PURE__ */ React81.createElement(
|
|
4703
4707
|
Section,
|
|
@@ -4705,7 +4709,8 @@ var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
|
4705
4709
|
title,
|
|
4706
4710
|
defaultExpanded: isExpanded,
|
|
4707
4711
|
titleEnd: getStylesInheritanceIndicators(fields),
|
|
4708
|
-
unmountOnExit
|
|
4712
|
+
unmountOnExit,
|
|
4713
|
+
action
|
|
4709
4714
|
},
|
|
4710
4715
|
/* @__PURE__ */ React81.createElement(SectionComponent, null)
|
|
4711
4716
|
);
|
|
@@ -4887,7 +4892,7 @@ var EditingPanelTabs = () => {
|
|
|
4887
4892
|
return (
|
|
4888
4893
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4889
4894
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4890
|
-
/* @__PURE__ */ React83.createElement(
|
|
4895
|
+
/* @__PURE__ */ React83.createElement(Fragment10, { key: element.id }, /* @__PURE__ */ React83.createElement(PanelTabContent, null))
|
|
4891
4896
|
);
|
|
4892
4897
|
};
|
|
4893
4898
|
var PanelTabContent = () => {
|
|
@@ -4986,8 +4991,69 @@ var EditingPanelHooks = () => {
|
|
|
4986
4991
|
return null;
|
|
4987
4992
|
};
|
|
4988
4993
|
|
|
4989
|
-
// src/
|
|
4994
|
+
// src/components/promotions/custom-css.tsx
|
|
4990
4995
|
import * as React86 from "react";
|
|
4996
|
+
import { useState as useState11 } from "react";
|
|
4997
|
+
import { PromotionInfotip } from "@elementor/editor-ui";
|
|
4998
|
+
import { CrownFilledIcon } from "@elementor/icons";
|
|
4999
|
+
import { Chip as Chip4 } from "@elementor/ui";
|
|
5000
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
5001
|
+
var CustomCssSection = () => {
|
|
5002
|
+
const [showInfoTip, sethSowInfoTip] = useState11(false);
|
|
5003
|
+
return /* @__PURE__ */ React86.createElement(
|
|
5004
|
+
StyleTabSection,
|
|
5005
|
+
{
|
|
5006
|
+
section: {
|
|
5007
|
+
name: "Custom CSS",
|
|
5008
|
+
title: __58("Custom CSS", "elementor"),
|
|
5009
|
+
action: /* @__PURE__ */ React86.createElement(
|
|
5010
|
+
PromotionInfotip,
|
|
5011
|
+
{
|
|
5012
|
+
title: __58("Custom CSS", "elementor"),
|
|
5013
|
+
content: __58(
|
|
5014
|
+
"Add custom CSS to refine and enrich the appearance of any element on your site.",
|
|
5015
|
+
"elementor"
|
|
5016
|
+
),
|
|
5017
|
+
assetUrl: "https://assets.elementor.com/packages/v1/images/custom-css-promotion.png",
|
|
5018
|
+
ctaUrl: "https://go.elementor.com/go-pro-style-custom-css/",
|
|
5019
|
+
open: showInfoTip,
|
|
5020
|
+
setOpen: sethSowInfoTip
|
|
5021
|
+
},
|
|
5022
|
+
/* @__PURE__ */ React86.createElement(
|
|
5023
|
+
Chip4,
|
|
5024
|
+
{
|
|
5025
|
+
size: "tiny",
|
|
5026
|
+
color: "promotion",
|
|
5027
|
+
variant: "standard",
|
|
5028
|
+
icon: /* @__PURE__ */ React86.createElement(CrownFilledIcon, null),
|
|
5029
|
+
sx: {
|
|
5030
|
+
mr: 1,
|
|
5031
|
+
"& .MuiChip-label": {
|
|
5032
|
+
display: "none"
|
|
5033
|
+
}
|
|
5034
|
+
},
|
|
5035
|
+
onClick: () => sethSowInfoTip(true)
|
|
5036
|
+
}
|
|
5037
|
+
)
|
|
5038
|
+
)
|
|
5039
|
+
}
|
|
5040
|
+
}
|
|
5041
|
+
);
|
|
5042
|
+
};
|
|
5043
|
+
|
|
5044
|
+
// src/components/promotions/init.tsx
|
|
5045
|
+
var init = () => {
|
|
5046
|
+
if (!window.elementorPro) {
|
|
5047
|
+
injectIntoStyleTab({
|
|
5048
|
+
id: "custom-css",
|
|
5049
|
+
component: CustomCssSection,
|
|
5050
|
+
options: { overwrite: true }
|
|
5051
|
+
});
|
|
5052
|
+
}
|
|
5053
|
+
};
|
|
5054
|
+
|
|
5055
|
+
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
5056
|
+
import * as React87 from "react";
|
|
4991
5057
|
import {
|
|
4992
5058
|
ControlFormLabel as ControlFormLabel3,
|
|
4993
5059
|
Repeater,
|
|
@@ -5001,8 +5067,8 @@ import {
|
|
|
5001
5067
|
} from "@elementor/editor-elements";
|
|
5002
5068
|
import { numberPropTypeUtil as numberPropTypeUtil4 } from "@elementor/editor-props";
|
|
5003
5069
|
import { InfoCircleFilledIcon } from "@elementor/icons";
|
|
5004
|
-
import { Alert as Alert2, Chip as
|
|
5005
|
-
import { __ as
|
|
5070
|
+
import { Alert as Alert2, Chip as Chip5, Infotip, Stack as Stack15, Switch, TextField as TextField2, Typography as Typography4 } from "@elementor/ui";
|
|
5071
|
+
import { __ as __60 } from "@wordpress/i18n";
|
|
5006
5072
|
|
|
5007
5073
|
// src/controls-registry/element-controls/get-element-by-type.ts
|
|
5008
5074
|
import { getContainer } from "@elementor/editor-elements";
|
|
@@ -5031,7 +5097,7 @@ import {
|
|
|
5031
5097
|
removeElements
|
|
5032
5098
|
} from "@elementor/editor-elements";
|
|
5033
5099
|
import { numberPropTypeUtil as numberPropTypeUtil3 } from "@elementor/editor-props";
|
|
5034
|
-
import { __ as
|
|
5100
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
5035
5101
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
5036
5102
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
5037
5103
|
var useActions = () => {
|
|
@@ -5054,7 +5120,7 @@ var useActions = () => {
|
|
|
5054
5120
|
}
|
|
5055
5121
|
duplicateElements({
|
|
5056
5122
|
elementIds: [tabId, tabContentId],
|
|
5057
|
-
title:
|
|
5123
|
+
title: __59("Duplicate Tab", "elementor"),
|
|
5058
5124
|
onDuplicateElements: () => {
|
|
5059
5125
|
if (newDefault !== defaultActiveTab) {
|
|
5060
5126
|
setDefaultActiveTab(newDefault, {}, { withHistory: false });
|
|
@@ -5086,7 +5152,7 @@ var useActions = () => {
|
|
|
5086
5152
|
defaultActiveTab
|
|
5087
5153
|
});
|
|
5088
5154
|
moveElements({
|
|
5089
|
-
title:
|
|
5155
|
+
title: __59("Reorder Tabs", "elementor"),
|
|
5090
5156
|
moves: [
|
|
5091
5157
|
{
|
|
5092
5158
|
elementId: movedElementId,
|
|
@@ -5120,7 +5186,7 @@ var useActions = () => {
|
|
|
5120
5186
|
defaultActiveTab
|
|
5121
5187
|
});
|
|
5122
5188
|
removeElements({
|
|
5123
|
-
title:
|
|
5189
|
+
title: __59("Tabs", "elementor"),
|
|
5124
5190
|
elementIds: items3.flatMap(({ item, index }) => {
|
|
5125
5191
|
const tabId = item.id;
|
|
5126
5192
|
const tabContentContainer = getContainer2(tabContentAreaId);
|
|
@@ -5150,7 +5216,7 @@ var useActions = () => {
|
|
|
5150
5216
|
items3.forEach(({ index }) => {
|
|
5151
5217
|
const position = index + 1;
|
|
5152
5218
|
createElements({
|
|
5153
|
-
title:
|
|
5219
|
+
title: __59("Tabs", "elementor"),
|
|
5154
5220
|
elements: [
|
|
5155
5221
|
{
|
|
5156
5222
|
containerId: tabContentAreaId,
|
|
@@ -5219,7 +5285,7 @@ var calculateDefaultOnDuplicate = ({
|
|
|
5219
5285
|
var TAB_MENU_ELEMENT_TYPE = "e-tabs-menu";
|
|
5220
5286
|
var TAB_CONTENT_AREA_ELEMENT_TYPE = "e-tabs-content-area";
|
|
5221
5287
|
var TabsControl = ({ label }) => {
|
|
5222
|
-
return /* @__PURE__ */
|
|
5288
|
+
return /* @__PURE__ */ React87.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __60("Tabs", "elementor") }, /* @__PURE__ */ React87.createElement(TabsControlContent, { label }));
|
|
5223
5289
|
};
|
|
5224
5290
|
var TabsControlContent = ({ label }) => {
|
|
5225
5291
|
const { element } = useElement();
|
|
@@ -5264,7 +5330,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
5264
5330
|
});
|
|
5265
5331
|
}
|
|
5266
5332
|
};
|
|
5267
|
-
return /* @__PURE__ */
|
|
5333
|
+
return /* @__PURE__ */ React87.createElement(
|
|
5268
5334
|
Repeater,
|
|
5269
5335
|
{
|
|
5270
5336
|
showToggle: false,
|
|
@@ -5286,7 +5352,7 @@ var ItemLabel = ({ value, index }) => {
|
|
|
5286
5352
|
const id = value.id ?? "";
|
|
5287
5353
|
const editorSettings = useElementEditorSettings(id);
|
|
5288
5354
|
const elementTitle = editorSettings?.title;
|
|
5289
|
-
return /* @__PURE__ */
|
|
5355
|
+
return /* @__PURE__ */ React87.createElement(Stack15, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React87.createElement("span", null, elementTitle), /* @__PURE__ */ React87.createElement(ItemDefaultTab, { index }));
|
|
5290
5356
|
};
|
|
5291
5357
|
var ItemDefaultTab = ({ index }) => {
|
|
5292
5358
|
const { value: defaultItem } = useBoundProp5(numberPropTypeUtil4);
|
|
@@ -5294,18 +5360,18 @@ var ItemDefaultTab = ({ index }) => {
|
|
|
5294
5360
|
if (!isDefault) {
|
|
5295
5361
|
return null;
|
|
5296
5362
|
}
|
|
5297
|
-
return /* @__PURE__ */
|
|
5363
|
+
return /* @__PURE__ */ React87.createElement(Chip5, { size: "tiny", shape: "rounded", label: __60("Default", "elementor") });
|
|
5298
5364
|
};
|
|
5299
5365
|
var ItemContent = ({ value, index }) => {
|
|
5300
5366
|
if (!value.id) {
|
|
5301
5367
|
return null;
|
|
5302
5368
|
}
|
|
5303
|
-
return /* @__PURE__ */
|
|
5369
|
+
return /* @__PURE__ */ React87.createElement(Stack15, { p: 2, gap: 1.5 }, /* @__PURE__ */ React87.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React87.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __60("Tabs", "elementor") }, /* @__PURE__ */ React87.createElement(DefaultTabControl, { tabIndex: index })));
|
|
5304
5370
|
};
|
|
5305
5371
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
5306
5372
|
const { value, setValue } = useBoundProp5(numberPropTypeUtil4);
|
|
5307
5373
|
const isDefault = value === tabIndex;
|
|
5308
|
-
return /* @__PURE__ */
|
|
5374
|
+
return /* @__PURE__ */ React87.createElement(Stack15, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React87.createElement(ControlFormLabel3, null, __60("Set as default tab", "elementor")), /* @__PURE__ */ React87.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React87.createElement(
|
|
5309
5375
|
Switch,
|
|
5310
5376
|
{
|
|
5311
5377
|
size: "small",
|
|
@@ -5323,7 +5389,7 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
5323
5389
|
var TabLabelControl = ({ elementId }) => {
|
|
5324
5390
|
const editorSettings = useElementEditorSettings(elementId);
|
|
5325
5391
|
const label = editorSettings?.title ?? "";
|
|
5326
|
-
return /* @__PURE__ */
|
|
5392
|
+
return /* @__PURE__ */ React87.createElement(Stack15, { gap: 1 }, /* @__PURE__ */ React87.createElement(ControlFormLabel3, null, __60("Tab name", "elementor")), /* @__PURE__ */ React87.createElement(
|
|
5327
5393
|
TextField2,
|
|
5328
5394
|
{
|
|
5329
5395
|
size: "tiny",
|
|
@@ -5344,22 +5410,22 @@ var ConditionalTooltip = ({
|
|
|
5344
5410
|
if (!showTooltip) {
|
|
5345
5411
|
return children;
|
|
5346
5412
|
}
|
|
5347
|
-
return /* @__PURE__ */
|
|
5413
|
+
return /* @__PURE__ */ React87.createElement(
|
|
5348
5414
|
Infotip,
|
|
5349
5415
|
{
|
|
5350
5416
|
arrow: false,
|
|
5351
|
-
content: /* @__PURE__ */
|
|
5417
|
+
content: /* @__PURE__ */ React87.createElement(
|
|
5352
5418
|
Alert2,
|
|
5353
5419
|
{
|
|
5354
5420
|
color: "secondary",
|
|
5355
|
-
icon: /* @__PURE__ */
|
|
5421
|
+
icon: /* @__PURE__ */ React87.createElement(InfoCircleFilledIcon, { fontSize: "tiny" }),
|
|
5356
5422
|
size: "small",
|
|
5357
5423
|
sx: { width: 288 }
|
|
5358
5424
|
},
|
|
5359
|
-
/* @__PURE__ */
|
|
5425
|
+
/* @__PURE__ */ React87.createElement(Typography4, { variant: "body2" }, __60("To change the default tab, simply set another tab as default.", "elementor"))
|
|
5360
5426
|
)
|
|
5361
5427
|
},
|
|
5362
|
-
/* @__PURE__ */
|
|
5428
|
+
/* @__PURE__ */ React87.createElement("span", null, children)
|
|
5363
5429
|
);
|
|
5364
5430
|
};
|
|
5365
5431
|
|
|
@@ -5380,7 +5446,7 @@ import { settingsTransformersRegistry, styleTransformersRegistry as styleTransfo
|
|
|
5380
5446
|
import { injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel } from "@elementor/editor-controls";
|
|
5381
5447
|
|
|
5382
5448
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5383
|
-
import * as
|
|
5449
|
+
import * as React88 from "react";
|
|
5384
5450
|
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
5385
5451
|
import {
|
|
5386
5452
|
backgroundImageOverlayPropTypeUtil
|
|
@@ -5481,24 +5547,24 @@ var useDynamicTag = (tagName) => {
|
|
|
5481
5547
|
};
|
|
5482
5548
|
|
|
5483
5549
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5484
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
5550
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React88.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
5485
5551
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5486
5552
|
const context = useBoundProp7(backgroundImageOverlayPropTypeUtil);
|
|
5487
|
-
return /* @__PURE__ */
|
|
5553
|
+
return /* @__PURE__ */ React88.createElement(PropProvider4, { ...context, value: value.value }, /* @__PURE__ */ React88.createElement(PropKeyProvider4, { bind: "image" }, /* @__PURE__ */ React88.createElement(Wrapper2, { rawValue: value.value })));
|
|
5488
5554
|
};
|
|
5489
5555
|
var Wrapper2 = ({ rawValue }) => {
|
|
5490
5556
|
const { propType } = useBoundProp7();
|
|
5491
5557
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5492
|
-
return /* @__PURE__ */
|
|
5558
|
+
return /* @__PURE__ */ React88.createElement(PropProvider4, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React88.createElement(PropKeyProvider4, { bind: "src" }, /* @__PURE__ */ React88.createElement(Content, { rawValue: rawValue.image })));
|
|
5493
5559
|
};
|
|
5494
5560
|
var Content = ({ rawValue }) => {
|
|
5495
5561
|
const src = rawValue.value.src;
|
|
5496
5562
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
5497
|
-
return /* @__PURE__ */
|
|
5563
|
+
return /* @__PURE__ */ React88.createElement(React88.Fragment, null, dynamicTag?.label);
|
|
5498
5564
|
};
|
|
5499
5565
|
|
|
5500
5566
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5501
|
-
import * as
|
|
5567
|
+
import * as React92 from "react";
|
|
5502
5568
|
import { ControlFormLabel as ControlFormLabel4, useBoundProp as useBoundProp10 } from "@elementor/editor-controls";
|
|
5503
5569
|
import { PopoverHeader as PopoverHeader2 } from "@elementor/editor-ui";
|
|
5504
5570
|
import { DatabaseIcon as DatabaseIcon3, SettingsIcon, XIcon } from "@elementor/icons";
|
|
@@ -5518,7 +5584,7 @@ import {
|
|
|
5518
5584
|
usePopupState as usePopupState3,
|
|
5519
5585
|
useTabs as useTabs2
|
|
5520
5586
|
} from "@elementor/ui";
|
|
5521
|
-
import { __ as
|
|
5587
|
+
import { __ as __62 } from "@wordpress/i18n";
|
|
5522
5588
|
|
|
5523
5589
|
// src/hooks/use-persist-dynamic-value.ts
|
|
5524
5590
|
import { useSessionStorage as useSessionStorage4 } from "@elementor/session";
|
|
@@ -5529,11 +5595,11 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
5529
5595
|
};
|
|
5530
5596
|
|
|
5531
5597
|
// src/dynamics/dynamic-control.tsx
|
|
5532
|
-
import * as
|
|
5598
|
+
import * as React90 from "react";
|
|
5533
5599
|
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as useBoundProp8 } from "@elementor/editor-controls";
|
|
5534
5600
|
|
|
5535
5601
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5536
|
-
import * as
|
|
5602
|
+
import * as React89 from "react";
|
|
5537
5603
|
import { isDependencyMet as isDependencyMet4 } from "@elementor/editor-props";
|
|
5538
5604
|
var DynamicConditionalControl = ({
|
|
5539
5605
|
children,
|
|
@@ -5541,7 +5607,7 @@ var DynamicConditionalControl = ({
|
|
|
5541
5607
|
propsSchema,
|
|
5542
5608
|
dynamicSettings
|
|
5543
5609
|
}) => {
|
|
5544
|
-
const defaults =
|
|
5610
|
+
const defaults = React89.useMemo(() => {
|
|
5545
5611
|
if (!propsSchema) {
|
|
5546
5612
|
return {};
|
|
5547
5613
|
}
|
|
@@ -5551,7 +5617,7 @@ var DynamicConditionalControl = ({
|
|
|
5551
5617
|
return result;
|
|
5552
5618
|
}, {});
|
|
5553
5619
|
}, [propsSchema]);
|
|
5554
|
-
const convertedSettings =
|
|
5620
|
+
const convertedSettings = React89.useMemo(() => {
|
|
5555
5621
|
if (!dynamicSettings) {
|
|
5556
5622
|
return {};
|
|
5557
5623
|
}
|
|
@@ -5570,14 +5636,14 @@ var DynamicConditionalControl = ({
|
|
|
5570
5636
|
{}
|
|
5571
5637
|
);
|
|
5572
5638
|
}, [dynamicSettings]);
|
|
5573
|
-
const effectiveSettings =
|
|
5639
|
+
const effectiveSettings = React89.useMemo(() => {
|
|
5574
5640
|
return { ...defaults, ...convertedSettings };
|
|
5575
5641
|
}, [defaults, convertedSettings]);
|
|
5576
5642
|
if (!propType?.dependencies?.terms.length) {
|
|
5577
|
-
return /* @__PURE__ */
|
|
5643
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, children);
|
|
5578
5644
|
}
|
|
5579
5645
|
const isHidden = !isDependencyMet4(propType?.dependencies, effectiveSettings).isMet;
|
|
5580
|
-
return isHidden ? null : /* @__PURE__ */
|
|
5646
|
+
return isHidden ? null : /* @__PURE__ */ React89.createElement(React89.Fragment, null, children);
|
|
5581
5647
|
};
|
|
5582
5648
|
|
|
5583
5649
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -5602,7 +5668,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5602
5668
|
});
|
|
5603
5669
|
};
|
|
5604
5670
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
5605
|
-
return /* @__PURE__ */
|
|
5671
|
+
return /* @__PURE__ */ React90.createElement(PropProvider5, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React90.createElement(PropKeyProvider5, { bind }, /* @__PURE__ */ React90.createElement(
|
|
5606
5672
|
DynamicConditionalControl,
|
|
5607
5673
|
{
|
|
5608
5674
|
propType: dynamicPropType,
|
|
@@ -5614,16 +5680,16 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5614
5680
|
};
|
|
5615
5681
|
|
|
5616
5682
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5617
|
-
import { Fragment as
|
|
5618
|
-
import * as
|
|
5683
|
+
import { Fragment as Fragment14, useState as useState12 } from "react";
|
|
5684
|
+
import * as React91 from "react";
|
|
5619
5685
|
import { useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
5620
5686
|
import { PopoverHeader, PopoverMenuList, SearchField } from "@elementor/editor-ui";
|
|
5621
5687
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
5622
5688
|
import { Divider as Divider7, Link as Link2, Stack as Stack16, Typography as Typography5, useTheme as useTheme3 } from "@elementor/ui";
|
|
5623
|
-
import { __ as
|
|
5689
|
+
import { __ as __61 } from "@wordpress/i18n";
|
|
5624
5690
|
var SIZE4 = "tiny";
|
|
5625
5691
|
var DynamicSelection = ({ close: closePopover }) => {
|
|
5626
|
-
const [searchValue, setSearchValue] =
|
|
5692
|
+
const [searchValue, setSearchValue] = useState12("");
|
|
5627
5693
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5628
5694
|
const theme = useTheme3();
|
|
5629
5695
|
const { value: anyValue } = useBoundProp9();
|
|
@@ -5655,21 +5721,21 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5655
5721
|
label: item.label
|
|
5656
5722
|
}))
|
|
5657
5723
|
]);
|
|
5658
|
-
return /* @__PURE__ */
|
|
5724
|
+
return /* @__PURE__ */ React91.createElement(PopoverBody, { "aria-label": __61("Dynamic tags", "elementor") }, /* @__PURE__ */ React91.createElement(
|
|
5659
5725
|
PopoverHeader,
|
|
5660
5726
|
{
|
|
5661
|
-
title:
|
|
5727
|
+
title: __61("Dynamic tags", "elementor"),
|
|
5662
5728
|
onClose: closePopover,
|
|
5663
|
-
icon: /* @__PURE__ */
|
|
5729
|
+
icon: /* @__PURE__ */ React91.createElement(DatabaseIcon2, { fontSize: SIZE4 })
|
|
5664
5730
|
}
|
|
5665
|
-
), hasNoDynamicTags ? /* @__PURE__ */
|
|
5731
|
+
), hasNoDynamicTags ? /* @__PURE__ */ React91.createElement(NoDynamicTags, null) : /* @__PURE__ */ React91.createElement(Fragment14, null, /* @__PURE__ */ React91.createElement(
|
|
5666
5732
|
SearchField,
|
|
5667
5733
|
{
|
|
5668
5734
|
value: searchValue,
|
|
5669
5735
|
onSearch: handleSearch,
|
|
5670
|
-
placeholder:
|
|
5736
|
+
placeholder: __61("Search dynamic tags\u2026", "elementor")
|
|
5671
5737
|
}
|
|
5672
|
-
), /* @__PURE__ */
|
|
5738
|
+
), /* @__PURE__ */ React91.createElement(Divider7, null), /* @__PURE__ */ React91.createElement(
|
|
5673
5739
|
PopoverMenuList,
|
|
5674
5740
|
{
|
|
5675
5741
|
items: virtualizedItems,
|
|
@@ -5677,11 +5743,11 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5677
5743
|
onClose: closePopover,
|
|
5678
5744
|
selectedValue: dynamicValue?.name,
|
|
5679
5745
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
5680
|
-
noResultsComponent: /* @__PURE__ */
|
|
5746
|
+
noResultsComponent: /* @__PURE__ */ React91.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
5681
5747
|
}
|
|
5682
5748
|
)));
|
|
5683
5749
|
};
|
|
5684
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
5750
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React91.createElement(
|
|
5685
5751
|
Stack16,
|
|
5686
5752
|
{
|
|
5687
5753
|
gap: 1,
|
|
@@ -5692,11 +5758,11 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React90.createElem
|
|
|
5692
5758
|
color: "text.secondary",
|
|
5693
5759
|
sx: { pb: 3.5 }
|
|
5694
5760
|
},
|
|
5695
|
-
/* @__PURE__ */
|
|
5696
|
-
/* @__PURE__ */
|
|
5697
|
-
/* @__PURE__ */
|
|
5761
|
+
/* @__PURE__ */ React91.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
5762
|
+
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "subtitle2" }, __61("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React91.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
5763
|
+
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, __61("Try something else.", "elementor"), /* @__PURE__ */ React91.createElement(Link2, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __61("Clear & try again", "elementor")))
|
|
5698
5764
|
);
|
|
5699
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
5765
|
+
var NoDynamicTags = () => /* @__PURE__ */ React91.createElement(React91.Fragment, null, /* @__PURE__ */ React91.createElement(Divider7, null), /* @__PURE__ */ React91.createElement(
|
|
5700
5766
|
Stack16,
|
|
5701
5767
|
{
|
|
5702
5768
|
gap: 1,
|
|
@@ -5707,9 +5773,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React90.createElement(React90.Fragment
|
|
|
5707
5773
|
color: "text.secondary",
|
|
5708
5774
|
sx: { pb: 3.5 }
|
|
5709
5775
|
},
|
|
5710
|
-
/* @__PURE__ */
|
|
5711
|
-
/* @__PURE__ */
|
|
5712
|
-
/* @__PURE__ */
|
|
5776
|
+
/* @__PURE__ */ React91.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
5777
|
+
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "subtitle2" }, __61("Streamline your workflow with dynamic tags", "elementor")),
|
|
5778
|
+
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "caption" }, __61("You'll need Elementor Pro to use this feature.", "elementor"))
|
|
5713
5779
|
));
|
|
5714
5780
|
var useFilteredOptions = (searchValue) => {
|
|
5715
5781
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -5743,25 +5809,25 @@ var DynamicSelectionControl = () => {
|
|
|
5743
5809
|
if (!dynamicTag) {
|
|
5744
5810
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
5745
5811
|
}
|
|
5746
|
-
return /* @__PURE__ */
|
|
5812
|
+
return /* @__PURE__ */ React92.createElement(Box6, null, /* @__PURE__ */ React92.createElement(
|
|
5747
5813
|
Tag,
|
|
5748
5814
|
{
|
|
5749
5815
|
fullWidth: true,
|
|
5750
5816
|
showActionsOnHover: true,
|
|
5751
5817
|
label: dynamicTag.label,
|
|
5752
|
-
startIcon: /* @__PURE__ */
|
|
5818
|
+
startIcon: /* @__PURE__ */ React92.createElement(DatabaseIcon3, { fontSize: SIZE5 }),
|
|
5753
5819
|
...bindTrigger3(selectionPopoverState),
|
|
5754
|
-
actions: /* @__PURE__ */
|
|
5820
|
+
actions: /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React92.createElement(
|
|
5755
5821
|
IconButton4,
|
|
5756
5822
|
{
|
|
5757
5823
|
size: SIZE5,
|
|
5758
5824
|
onClick: removeDynamicTag,
|
|
5759
|
-
"aria-label":
|
|
5825
|
+
"aria-label": __62("Remove dynamic value", "elementor")
|
|
5760
5826
|
},
|
|
5761
|
-
/* @__PURE__ */
|
|
5827
|
+
/* @__PURE__ */ React92.createElement(XIcon, { fontSize: SIZE5 })
|
|
5762
5828
|
))
|
|
5763
5829
|
}
|
|
5764
|
-
), /* @__PURE__ */
|
|
5830
|
+
), /* @__PURE__ */ React92.createElement(
|
|
5765
5831
|
Popover2,
|
|
5766
5832
|
{
|
|
5767
5833
|
disablePortal: true,
|
|
@@ -5773,7 +5839,7 @@ var DynamicSelectionControl = () => {
|
|
|
5773
5839
|
},
|
|
5774
5840
|
...bindPopover2(selectionPopoverState)
|
|
5775
5841
|
},
|
|
5776
|
-
/* @__PURE__ */
|
|
5842
|
+
/* @__PURE__ */ React92.createElement(PopoverBody, { "aria-label": __62("Dynamic tags", "elementor") }, /* @__PURE__ */ React92.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
5777
5843
|
));
|
|
5778
5844
|
};
|
|
5779
5845
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -5782,15 +5848,15 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
5782
5848
|
if (!hasDynamicSettings) {
|
|
5783
5849
|
return null;
|
|
5784
5850
|
}
|
|
5785
|
-
return /* @__PURE__ */
|
|
5851
|
+
return /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(
|
|
5786
5852
|
IconButton4,
|
|
5787
5853
|
{
|
|
5788
5854
|
size: SIZE5,
|
|
5789
5855
|
...bindTrigger3(popupState),
|
|
5790
|
-
"aria-label":
|
|
5856
|
+
"aria-label": __62("Dynamic settings", "elementor")
|
|
5791
5857
|
},
|
|
5792
|
-
/* @__PURE__ */
|
|
5793
|
-
), /* @__PURE__ */
|
|
5858
|
+
/* @__PURE__ */ React92.createElement(SettingsIcon, { fontSize: SIZE5 })
|
|
5859
|
+
), /* @__PURE__ */ React92.createElement(
|
|
5794
5860
|
Popover2,
|
|
5795
5861
|
{
|
|
5796
5862
|
disablePortal: true,
|
|
@@ -5802,14 +5868,14 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
5802
5868
|
},
|
|
5803
5869
|
...bindPopover2(popupState)
|
|
5804
5870
|
},
|
|
5805
|
-
/* @__PURE__ */
|
|
5871
|
+
/* @__PURE__ */ React92.createElement(PopoverBody, { "aria-label": __62("Dynamic settings", "elementor") }, /* @__PURE__ */ React92.createElement(
|
|
5806
5872
|
PopoverHeader2,
|
|
5807
5873
|
{
|
|
5808
5874
|
title: dynamicTag.label,
|
|
5809
5875
|
onClose: popupState.close,
|
|
5810
|
-
icon: /* @__PURE__ */
|
|
5876
|
+
icon: /* @__PURE__ */ React92.createElement(DatabaseIcon3, { fontSize: SIZE5 })
|
|
5811
5877
|
}
|
|
5812
|
-
), /* @__PURE__ */
|
|
5878
|
+
), /* @__PURE__ */ React92.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls, tagName: dynamicTag.name }))
|
|
5813
5879
|
));
|
|
5814
5880
|
};
|
|
5815
5881
|
var DynamicSettings = ({ controls, tagName }) => {
|
|
@@ -5820,9 +5886,9 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
5820
5886
|
}
|
|
5821
5887
|
if (tagsWithoutTabs.includes(tagName)) {
|
|
5822
5888
|
const singleTab = tabs[0];
|
|
5823
|
-
return /* @__PURE__ */
|
|
5889
|
+
return /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(Divider8, null), /* @__PURE__ */ React92.createElement(ControlsItemsStack, { items: singleTab.value.items }));
|
|
5824
5890
|
}
|
|
5825
|
-
return /* @__PURE__ */
|
|
5891
|
+
return /* @__PURE__ */ React92.createElement(React92.Fragment, null, tabs.length > 1 && /* @__PURE__ */ React92.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React92.createElement(
|
|
5826
5892
|
Tab2,
|
|
5827
5893
|
{
|
|
5828
5894
|
key: index,
|
|
@@ -5830,15 +5896,15 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
5830
5896
|
sx: { px: 1, py: 0.5 },
|
|
5831
5897
|
...getTabProps(index)
|
|
5832
5898
|
}
|
|
5833
|
-
))), /* @__PURE__ */
|
|
5834
|
-
return /* @__PURE__ */
|
|
5899
|
+
))), /* @__PURE__ */ React92.createElement(Divider8, null), tabs.map(({ value }, index) => {
|
|
5900
|
+
return /* @__PURE__ */ React92.createElement(
|
|
5835
5901
|
TabPanel2,
|
|
5836
5902
|
{
|
|
5837
5903
|
key: index,
|
|
5838
5904
|
sx: { flexGrow: 1, py: 0, overflowY: "auto" },
|
|
5839
5905
|
...getTabPanelProps(index)
|
|
5840
5906
|
},
|
|
5841
|
-
/* @__PURE__ */
|
|
5907
|
+
/* @__PURE__ */ React92.createElement(ControlsItemsStack, { items: value.items })
|
|
5842
5908
|
);
|
|
5843
5909
|
}));
|
|
5844
5910
|
};
|
|
@@ -5880,11 +5946,11 @@ var Control2 = ({ control }) => {
|
|
|
5880
5946
|
display: "grid",
|
|
5881
5947
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
5882
5948
|
} : {};
|
|
5883
|
-
return /* @__PURE__ */
|
|
5949
|
+
return /* @__PURE__ */ React92.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React92.createElement(Grid5, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React92.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(ControlFormLabel4, null, control.label)) : null, /* @__PURE__ */ React92.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(Control, { type: control.type, props: controlProps }))));
|
|
5884
5950
|
};
|
|
5885
5951
|
function ControlsItemsStack({ items: items3 }) {
|
|
5886
|
-
return /* @__PURE__ */
|
|
5887
|
-
(item) => item.type === "control" ? /* @__PURE__ */
|
|
5952
|
+
return /* @__PURE__ */ React92.createElement(Stack17, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
5953
|
+
(item) => item.type === "control" ? /* @__PURE__ */ React92.createElement(Control2, { key: item.value.bind, control: item.value }) : null
|
|
5888
5954
|
));
|
|
5889
5955
|
}
|
|
5890
5956
|
|
|
@@ -5938,24 +6004,24 @@ function getDynamicValue(name, settings) {
|
|
|
5938
6004
|
}
|
|
5939
6005
|
|
|
5940
6006
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
5941
|
-
import * as
|
|
6007
|
+
import * as React93 from "react";
|
|
5942
6008
|
import { useBoundProp as useBoundProp11 } from "@elementor/editor-controls";
|
|
5943
6009
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
5944
|
-
import { __ as
|
|
6010
|
+
import { __ as __63 } from "@wordpress/i18n";
|
|
5945
6011
|
var usePropDynamicAction = () => {
|
|
5946
6012
|
const { propType } = useBoundProp11();
|
|
5947
6013
|
const visible = !!propType && supportsDynamic(propType);
|
|
5948
6014
|
return {
|
|
5949
6015
|
visible,
|
|
5950
6016
|
icon: DatabaseIcon4,
|
|
5951
|
-
title:
|
|
5952
|
-
content: ({ close }) => /* @__PURE__ */
|
|
6017
|
+
title: __63("Dynamic tags", "elementor"),
|
|
6018
|
+
content: ({ close }) => /* @__PURE__ */ React93.createElement(DynamicSelection, { close })
|
|
5953
6019
|
};
|
|
5954
6020
|
};
|
|
5955
6021
|
|
|
5956
6022
|
// src/dynamics/init.ts
|
|
5957
6023
|
var { registerPopoverAction } = controlActionsMenu;
|
|
5958
|
-
var
|
|
6024
|
+
var init2 = () => {
|
|
5959
6025
|
registerControlReplacement({
|
|
5960
6026
|
component: DynamicSelectionControl,
|
|
5961
6027
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
@@ -5981,7 +6047,7 @@ var init = () => {
|
|
|
5981
6047
|
// src/reset-style-props.tsx
|
|
5982
6048
|
import { useBoundProp as useBoundProp12 } from "@elementor/editor-controls";
|
|
5983
6049
|
import { BrushBigIcon } from "@elementor/icons";
|
|
5984
|
-
import { __ as
|
|
6050
|
+
import { __ as __64 } from "@wordpress/i18n";
|
|
5985
6051
|
|
|
5986
6052
|
// src/utils/is-equal.ts
|
|
5987
6053
|
function isEqual(a, b) {
|
|
@@ -6053,22 +6119,22 @@ function useResetStyleValueProps() {
|
|
|
6053
6119
|
const visible = calculateVisibility();
|
|
6054
6120
|
return {
|
|
6055
6121
|
visible,
|
|
6056
|
-
title:
|
|
6122
|
+
title: __64("Clear", "elementor"),
|
|
6057
6123
|
icon: BrushBigIcon,
|
|
6058
6124
|
onClick: () => resetValue()
|
|
6059
6125
|
};
|
|
6060
6126
|
}
|
|
6061
6127
|
|
|
6062
6128
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6063
|
-
import * as
|
|
6129
|
+
import * as React99 from "react";
|
|
6064
6130
|
import { useBoundProp as useBoundProp13 } from "@elementor/editor-controls";
|
|
6065
6131
|
import { isEmpty as isEmpty2 } from "@elementor/editor-props";
|
|
6066
6132
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
6067
|
-
import { __ as
|
|
6133
|
+
import { __ as __68 } from "@wordpress/i18n";
|
|
6068
6134
|
|
|
6069
6135
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6070
|
-
import * as
|
|
6071
|
-
import { useMemo as useMemo14, useState as
|
|
6136
|
+
import * as React98 from "react";
|
|
6137
|
+
import { useMemo as useMemo14, useState as useState14 } from "react";
|
|
6072
6138
|
import { createPropsResolver as createPropsResolver2 } from "@elementor/editor-canvas";
|
|
6073
6139
|
import { PopoverHeader as PopoverHeader3 } from "@elementor/editor-ui";
|
|
6074
6140
|
import {
|
|
@@ -6082,20 +6148,20 @@ import {
|
|
|
6082
6148
|
Stack as Stack18,
|
|
6083
6149
|
Tooltip as Tooltip6
|
|
6084
6150
|
} from "@elementor/ui";
|
|
6085
|
-
import { __ as
|
|
6151
|
+
import { __ as __67 } from "@wordpress/i18n";
|
|
6086
6152
|
|
|
6087
6153
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
6088
|
-
import { isValidElement, useEffect as useEffect7, useState as
|
|
6154
|
+
import { isValidElement, useEffect as useEffect7, useState as useState13 } from "react";
|
|
6089
6155
|
import { UnknownStyleStateError } from "@elementor/editor-canvas";
|
|
6090
6156
|
import {
|
|
6091
6157
|
isClassState as isClassState2,
|
|
6092
6158
|
isPseudoState
|
|
6093
6159
|
} from "@elementor/editor-styles";
|
|
6094
6160
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY2 } from "@elementor/editor-styles-repository";
|
|
6095
|
-
import { __ as
|
|
6161
|
+
import { __ as __65 } from "@wordpress/i18n";
|
|
6096
6162
|
var MAXIMUM_ITEMS = 2;
|
|
6097
6163
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
6098
|
-
const [items3, setItems] =
|
|
6164
|
+
const [items3, setItems] = useState13([]);
|
|
6099
6165
|
useEffect7(() => {
|
|
6100
6166
|
(async () => {
|
|
6101
6167
|
const normalizedItems = await Promise.all(
|
|
@@ -6103,7 +6169,7 @@ var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
|
6103
6169
|
);
|
|
6104
6170
|
const validItems = normalizedItems.map((item) => ({
|
|
6105
6171
|
...item,
|
|
6106
|
-
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel :
|
|
6172
|
+
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel : __65("Base", "elementor")
|
|
6107
6173
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
6108
6174
|
setItems(validItems);
|
|
6109
6175
|
})();
|
|
@@ -6164,7 +6230,7 @@ import { createTransformersRegistry } from "@elementor/editor-canvas";
|
|
|
6164
6230
|
var stylesInheritanceTransformersRegistry = createTransformersRegistry();
|
|
6165
6231
|
|
|
6166
6232
|
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
6167
|
-
import * as
|
|
6233
|
+
import * as React94 from "react";
|
|
6168
6234
|
import { useBreakpoints } from "@elementor/editor-responsive";
|
|
6169
6235
|
import {
|
|
6170
6236
|
DesktopIcon,
|
|
@@ -6195,21 +6261,21 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
6195
6261
|
return null;
|
|
6196
6262
|
}
|
|
6197
6263
|
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
6198
|
-
return /* @__PURE__ */
|
|
6264
|
+
return /* @__PURE__ */ React94.createElement(Tooltip4, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React94.createElement(IconComponent, { fontSize: SIZE6, sx: { mt: "2px" } }));
|
|
6199
6265
|
};
|
|
6200
6266
|
|
|
6201
6267
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
6202
|
-
import * as
|
|
6268
|
+
import * as React95 from "react";
|
|
6203
6269
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY3 } from "@elementor/editor-styles-repository";
|
|
6204
6270
|
import { InfoCircleIcon } from "@elementor/icons";
|
|
6205
|
-
import { Chip as
|
|
6206
|
-
import { __ as
|
|
6271
|
+
import { Chip as Chip6, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
6272
|
+
import { __ as __66 } from "@wordpress/i18n";
|
|
6207
6273
|
var SIZE7 = "tiny";
|
|
6208
6274
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
6209
6275
|
const isBaseStyle = provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY3;
|
|
6210
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */
|
|
6211
|
-
return /* @__PURE__ */
|
|
6212
|
-
|
|
6276
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React95.createElement(Tooltip5, { title: __66("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React95.createElement(InfoCircleIcon, { fontSize: SIZE7 })) : void 0;
|
|
6277
|
+
return /* @__PURE__ */ React95.createElement(
|
|
6278
|
+
Chip6,
|
|
6213
6279
|
{
|
|
6214
6280
|
label: displayLabel,
|
|
6215
6281
|
size: SIZE7,
|
|
@@ -6234,10 +6300,10 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
6234
6300
|
};
|
|
6235
6301
|
|
|
6236
6302
|
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
6237
|
-
import * as
|
|
6303
|
+
import * as React96 from "react";
|
|
6238
6304
|
import { Typography as Typography6 } from "@elementor/ui";
|
|
6239
6305
|
var ValueComponent = ({ index, value }) => {
|
|
6240
|
-
return /* @__PURE__ */
|
|
6306
|
+
return /* @__PURE__ */ React96.createElement(
|
|
6241
6307
|
Typography6,
|
|
6242
6308
|
{
|
|
6243
6309
|
variant: "caption",
|
|
@@ -6258,9 +6324,9 @@ var ValueComponent = ({ index, value }) => {
|
|
|
6258
6324
|
};
|
|
6259
6325
|
|
|
6260
6326
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
6261
|
-
import * as
|
|
6327
|
+
import * as React97 from "react";
|
|
6262
6328
|
import { Box as Box7 } from "@elementor/ui";
|
|
6263
|
-
var ActionIcons = () => /* @__PURE__ */
|
|
6329
|
+
var ActionIcons = () => /* @__PURE__ */ React97.createElement(Box7, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
6264
6330
|
|
|
6265
6331
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6266
6332
|
var SECTION_PADDING_INLINE = 32;
|
|
@@ -6272,7 +6338,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6272
6338
|
children,
|
|
6273
6339
|
isDisabled
|
|
6274
6340
|
}) => {
|
|
6275
|
-
const [showInfotip, setShowInfotip] =
|
|
6341
|
+
const [showInfotip, setShowInfotip] = useState14(false);
|
|
6276
6342
|
const toggleInfotip = () => {
|
|
6277
6343
|
if (isDisabled) {
|
|
6278
6344
|
return;
|
|
@@ -6294,7 +6360,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6294
6360
|
});
|
|
6295
6361
|
}, [key, propType]);
|
|
6296
6362
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
6297
|
-
const infotipContent = /* @__PURE__ */
|
|
6363
|
+
const infotipContent = /* @__PURE__ */ React98.createElement(ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React98.createElement(
|
|
6298
6364
|
Card,
|
|
6299
6365
|
{
|
|
6300
6366
|
elevation: 0,
|
|
@@ -6307,7 +6373,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6307
6373
|
flexDirection: "column"
|
|
6308
6374
|
}
|
|
6309
6375
|
},
|
|
6310
|
-
/* @__PURE__ */
|
|
6376
|
+
/* @__PURE__ */ React98.createElement(
|
|
6311
6377
|
Box8,
|
|
6312
6378
|
{
|
|
6313
6379
|
sx: {
|
|
@@ -6317,9 +6383,9 @@ var StylesInheritanceInfotip = ({
|
|
|
6317
6383
|
backgroundColor: "background.paper"
|
|
6318
6384
|
}
|
|
6319
6385
|
},
|
|
6320
|
-
/* @__PURE__ */
|
|
6386
|
+
/* @__PURE__ */ React98.createElement(PopoverHeader3, { title: __67("Style origin", "elementor"), onClose: closeInfotip })
|
|
6321
6387
|
),
|
|
6322
|
-
/* @__PURE__ */
|
|
6388
|
+
/* @__PURE__ */ React98.createElement(
|
|
6323
6389
|
CardContent,
|
|
6324
6390
|
{
|
|
6325
6391
|
sx: {
|
|
@@ -6333,39 +6399,39 @@ var StylesInheritanceInfotip = ({
|
|
|
6333
6399
|
}
|
|
6334
6400
|
}
|
|
6335
6401
|
},
|
|
6336
|
-
/* @__PURE__ */
|
|
6337
|
-
return /* @__PURE__ */
|
|
6402
|
+
/* @__PURE__ */ React98.createElement(Stack18, { gap: 1.5, sx: { pl: 3, pr: 1, pb: 2 }, role: "list" }, items3.map((item, index) => {
|
|
6403
|
+
return /* @__PURE__ */ React98.createElement(
|
|
6338
6404
|
Box8,
|
|
6339
6405
|
{
|
|
6340
6406
|
key: item.id,
|
|
6341
6407
|
display: "flex",
|
|
6342
6408
|
gap: 0.5,
|
|
6343
6409
|
role: "listitem",
|
|
6344
|
-
"aria-label":
|
|
6410
|
+
"aria-label": __67("Inheritance item: %s", "elementor").replace(
|
|
6345
6411
|
"%s",
|
|
6346
6412
|
item.displayLabel
|
|
6347
6413
|
)
|
|
6348
6414
|
},
|
|
6349
|
-
/* @__PURE__ */
|
|
6415
|
+
/* @__PURE__ */ React98.createElement(
|
|
6350
6416
|
Box8,
|
|
6351
6417
|
{
|
|
6352
6418
|
display: "flex",
|
|
6353
6419
|
gap: 0.5,
|
|
6354
6420
|
sx: { flexWrap: "wrap", width: "100%", alignItems: "flex-start" }
|
|
6355
6421
|
},
|
|
6356
|
-
/* @__PURE__ */
|
|
6357
|
-
/* @__PURE__ */
|
|
6358
|
-
/* @__PURE__ */
|
|
6422
|
+
/* @__PURE__ */ React98.createElement(BreakpointIcon, { breakpoint: item.breakpoint }),
|
|
6423
|
+
/* @__PURE__ */ React98.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }),
|
|
6424
|
+
/* @__PURE__ */ React98.createElement(ValueComponent, { index, value: item.value })
|
|
6359
6425
|
),
|
|
6360
|
-
/* @__PURE__ */
|
|
6426
|
+
/* @__PURE__ */ React98.createElement(ActionIcons, null)
|
|
6361
6427
|
);
|
|
6362
6428
|
}))
|
|
6363
6429
|
)
|
|
6364
6430
|
));
|
|
6365
6431
|
if (isDisabled) {
|
|
6366
|
-
return /* @__PURE__ */
|
|
6432
|
+
return /* @__PURE__ */ React98.createElement(Box8, { sx: { display: "inline-flex" } }, children);
|
|
6367
6433
|
}
|
|
6368
|
-
return /* @__PURE__ */
|
|
6434
|
+
return /* @__PURE__ */ React98.createElement(
|
|
6369
6435
|
TooltipOrInfotip,
|
|
6370
6436
|
{
|
|
6371
6437
|
showInfotip,
|
|
@@ -6373,7 +6439,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6373
6439
|
infotipContent,
|
|
6374
6440
|
isDisabled
|
|
6375
6441
|
},
|
|
6376
|
-
/* @__PURE__ */
|
|
6442
|
+
/* @__PURE__ */ React98.createElement(IconButton5, { onClick: toggleInfotip, "aria-label": label, sx: { my: "-1px" }, disabled: isDisabled }, children)
|
|
6377
6443
|
);
|
|
6378
6444
|
};
|
|
6379
6445
|
function TooltipOrInfotip({
|
|
@@ -6387,10 +6453,10 @@ function TooltipOrInfotip({
|
|
|
6387
6453
|
const isSiteRtl = direction.isSiteRtl;
|
|
6388
6454
|
const forceInfotipAlignLeft = isSiteRtl ? 9999999 : -9999999;
|
|
6389
6455
|
if (isDisabled) {
|
|
6390
|
-
return /* @__PURE__ */
|
|
6456
|
+
return /* @__PURE__ */ React98.createElement(Box8, { sx: { display: "inline-flex" } }, children);
|
|
6391
6457
|
}
|
|
6392
6458
|
if (showInfotip) {
|
|
6393
|
-
return /* @__PURE__ */
|
|
6459
|
+
return /* @__PURE__ */ React98.createElement(React98.Fragment, null, /* @__PURE__ */ React98.createElement(
|
|
6394
6460
|
Backdrop,
|
|
6395
6461
|
{
|
|
6396
6462
|
open: showInfotip,
|
|
@@ -6400,7 +6466,7 @@ function TooltipOrInfotip({
|
|
|
6400
6466
|
zIndex: (theme) => theme.zIndex.modal - 1
|
|
6401
6467
|
}
|
|
6402
6468
|
}
|
|
6403
|
-
), /* @__PURE__ */
|
|
6469
|
+
), /* @__PURE__ */ React98.createElement(
|
|
6404
6470
|
Infotip2,
|
|
6405
6471
|
{
|
|
6406
6472
|
placement: "top",
|
|
@@ -6427,7 +6493,7 @@ function TooltipOrInfotip({
|
|
|
6427
6493
|
children
|
|
6428
6494
|
));
|
|
6429
6495
|
}
|
|
6430
|
-
return /* @__PURE__ */
|
|
6496
|
+
return /* @__PURE__ */ React98.createElement(Tooltip6, { title: __67("Style origin", "elementor"), placement: "top" }, children);
|
|
6431
6497
|
}
|
|
6432
6498
|
|
|
6433
6499
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
@@ -6440,7 +6506,7 @@ var StylesInheritanceIndicator = ({
|
|
|
6440
6506
|
if (!path || !inheritanceChain.length) {
|
|
6441
6507
|
return null;
|
|
6442
6508
|
}
|
|
6443
|
-
return /* @__PURE__ */
|
|
6509
|
+
return /* @__PURE__ */ React99.createElement(Indicator, { inheritanceChain, path, propType });
|
|
6444
6510
|
};
|
|
6445
6511
|
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
6446
6512
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
@@ -6456,7 +6522,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6456
6522
|
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
6457
6523
|
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
6458
6524
|
};
|
|
6459
|
-
return /* @__PURE__ */
|
|
6525
|
+
return /* @__PURE__ */ React99.createElement(
|
|
6460
6526
|
StylesInheritanceInfotip,
|
|
6461
6527
|
{
|
|
6462
6528
|
inheritanceChain,
|
|
@@ -6465,17 +6531,17 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6465
6531
|
label,
|
|
6466
6532
|
isDisabled
|
|
6467
6533
|
},
|
|
6468
|
-
/* @__PURE__ */
|
|
6534
|
+
/* @__PURE__ */ React99.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
6469
6535
|
);
|
|
6470
6536
|
};
|
|
6471
6537
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
6472
6538
|
if (isFinalValue) {
|
|
6473
|
-
return
|
|
6539
|
+
return __68("This is the final value", "elementor");
|
|
6474
6540
|
}
|
|
6475
6541
|
if (hasValue) {
|
|
6476
|
-
return
|
|
6542
|
+
return __68("This value is overridden by another style", "elementor");
|
|
6477
6543
|
}
|
|
6478
|
-
return
|
|
6544
|
+
return __68("This has value from another style", "elementor");
|
|
6479
6545
|
};
|
|
6480
6546
|
|
|
6481
6547
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -6496,23 +6562,23 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
6496
6562
|
]);
|
|
6497
6563
|
|
|
6498
6564
|
// src/styles-inheritance/transformers/array-transformer.tsx
|
|
6499
|
-
import * as
|
|
6565
|
+
import * as React100 from "react";
|
|
6500
6566
|
import { createTransformer as createTransformer2 } from "@elementor/editor-canvas";
|
|
6501
6567
|
import { Stack as Stack19 } from "@elementor/ui";
|
|
6502
6568
|
var arrayTransformer = createTransformer2((values) => {
|
|
6503
6569
|
if (!values || values.length === 0) {
|
|
6504
6570
|
return null;
|
|
6505
6571
|
}
|
|
6506
|
-
return /* @__PURE__ */
|
|
6572
|
+
return /* @__PURE__ */ React100.createElement(Stack19, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React100.createElement(Stack19, { key: index }, item)));
|
|
6507
6573
|
});
|
|
6508
6574
|
|
|
6509
6575
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
6510
|
-
import * as
|
|
6576
|
+
import * as React101 from "react";
|
|
6511
6577
|
import { createTransformer as createTransformer3 } from "@elementor/editor-canvas";
|
|
6512
6578
|
import { Stack as Stack20, styled as styled7, UnstableColorIndicator } from "@elementor/ui";
|
|
6513
|
-
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */
|
|
6579
|
+
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React101.createElement(Stack20, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React101.createElement(ItemLabelColor, { value })));
|
|
6514
6580
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
6515
|
-
return /* @__PURE__ */
|
|
6581
|
+
return /* @__PURE__ */ React101.createElement("span", null, color);
|
|
6516
6582
|
};
|
|
6517
6583
|
var StyledUnstableColorIndicator = styled7(UnstableColorIndicator)(({ theme }) => ({
|
|
6518
6584
|
width: "1em",
|
|
@@ -6523,20 +6589,20 @@ var StyledUnstableColorIndicator = styled7(UnstableColorIndicator)(({ theme }) =
|
|
|
6523
6589
|
}));
|
|
6524
6590
|
|
|
6525
6591
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
6526
|
-
import * as
|
|
6592
|
+
import * as React102 from "react";
|
|
6527
6593
|
import { createTransformer as createTransformer4 } from "@elementor/editor-canvas";
|
|
6528
6594
|
import { Stack as Stack21 } from "@elementor/ui";
|
|
6529
|
-
import { __ as
|
|
6530
|
-
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */
|
|
6595
|
+
import { __ as __69 } from "@wordpress/i18n";
|
|
6596
|
+
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React102.createElement(Stack21, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React102.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React102.createElement(ItemLabelGradient, { value })));
|
|
6531
6597
|
var ItemIconGradient = ({ value }) => {
|
|
6532
6598
|
const gradient = getGradientValue(value);
|
|
6533
|
-
return /* @__PURE__ */
|
|
6599
|
+
return /* @__PURE__ */ React102.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
6534
6600
|
};
|
|
6535
6601
|
var ItemLabelGradient = ({ value }) => {
|
|
6536
6602
|
if (value.type === "linear") {
|
|
6537
|
-
return /* @__PURE__ */
|
|
6603
|
+
return /* @__PURE__ */ React102.createElement("span", null, __69("Linear gradient", "elementor"));
|
|
6538
6604
|
}
|
|
6539
|
-
return /* @__PURE__ */
|
|
6605
|
+
return /* @__PURE__ */ React102.createElement("span", null, __69("Radial gradient", "elementor"));
|
|
6540
6606
|
};
|
|
6541
6607
|
var getGradientValue = (gradient) => {
|
|
6542
6608
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -6547,15 +6613,15 @@ var getGradientValue = (gradient) => {
|
|
|
6547
6613
|
};
|
|
6548
6614
|
|
|
6549
6615
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
6550
|
-
import * as
|
|
6616
|
+
import * as React103 from "react";
|
|
6551
6617
|
import { createTransformer as createTransformer5 } from "@elementor/editor-canvas";
|
|
6552
6618
|
import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
|
|
6553
6619
|
import { CardMedia, Stack as Stack22 } from "@elementor/ui";
|
|
6554
6620
|
import { useWpMediaAttachment } from "@elementor/wp-media";
|
|
6555
|
-
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */
|
|
6621
|
+
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */ React103.createElement(Stack22, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React103.createElement(ItemIconImage, { value }), /* @__PURE__ */ React103.createElement(ItemLabelImage, { value })));
|
|
6556
6622
|
var ItemIconImage = ({ value }) => {
|
|
6557
6623
|
const { imageUrl } = useImage(value);
|
|
6558
|
-
return /* @__PURE__ */
|
|
6624
|
+
return /* @__PURE__ */ React103.createElement(
|
|
6559
6625
|
CardMedia,
|
|
6560
6626
|
{
|
|
6561
6627
|
image: imageUrl,
|
|
@@ -6571,7 +6637,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
6571
6637
|
};
|
|
6572
6638
|
var ItemLabelImage = ({ value }) => {
|
|
6573
6639
|
const { imageTitle } = useImage(value);
|
|
6574
|
-
return /* @__PURE__ */
|
|
6640
|
+
return /* @__PURE__ */ React103.createElement(EllipsisWithTooltip2, { title: imageTitle }, /* @__PURE__ */ React103.createElement("span", null, imageTitle));
|
|
6575
6641
|
};
|
|
6576
6642
|
var useImage = (image) => {
|
|
6577
6643
|
let imageTitle, imageUrl = null;
|
|
@@ -6596,7 +6662,7 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
6596
6662
|
};
|
|
6597
6663
|
|
|
6598
6664
|
// src/styles-inheritance/transformers/box-shadow-transformer.tsx
|
|
6599
|
-
import * as
|
|
6665
|
+
import * as React104 from "react";
|
|
6600
6666
|
import { createTransformer as createTransformer6 } from "@elementor/editor-canvas";
|
|
6601
6667
|
import { Stack as Stack23 } from "@elementor/ui";
|
|
6602
6668
|
var boxShadowTransformer = createTransformer6((value) => {
|
|
@@ -6607,11 +6673,11 @@ var boxShadowTransformer = createTransformer6((value) => {
|
|
|
6607
6673
|
const colorValue = color || "#000000";
|
|
6608
6674
|
const sizes = [hOffset || "0px", vOffset || "0px", blur || "10px", spread || "0px"].join(" ");
|
|
6609
6675
|
const positionValue = position || "outset";
|
|
6610
|
-
return /* @__PURE__ */
|
|
6676
|
+
return /* @__PURE__ */ React104.createElement(Stack23, { direction: "column", gap: 0.5, pb: 1 }, /* @__PURE__ */ React104.createElement("span", null, colorValue, " ", positionValue, ", ", sizes));
|
|
6611
6677
|
});
|
|
6612
6678
|
|
|
6613
6679
|
// src/styles-inheritance/transformers/color-transformer.tsx
|
|
6614
|
-
import * as
|
|
6680
|
+
import * as React105 from "react";
|
|
6615
6681
|
import { createTransformer as createTransformer7 } from "@elementor/editor-canvas";
|
|
6616
6682
|
import { Stack as Stack24, styled as styled8, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
6617
6683
|
function isValidCSSColor(value) {
|
|
@@ -6631,11 +6697,11 @@ var colorTransformer = createTransformer7((value) => {
|
|
|
6631
6697
|
if (!isValidCSSColor(value)) {
|
|
6632
6698
|
return value;
|
|
6633
6699
|
}
|
|
6634
|
-
return /* @__PURE__ */
|
|
6700
|
+
return /* @__PURE__ */ React105.createElement(Stack24, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React105.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React105.createElement("span", null, value));
|
|
6635
6701
|
});
|
|
6636
6702
|
|
|
6637
6703
|
// src/styles-inheritance/transformers/repeater-to-items-transformer.tsx
|
|
6638
|
-
import * as
|
|
6704
|
+
import * as React106 from "react";
|
|
6639
6705
|
import { createTransformer as createTransformer8 } from "@elementor/editor-canvas";
|
|
6640
6706
|
import { Stack as Stack25 } from "@elementor/ui";
|
|
6641
6707
|
var createRepeaterToItemsTransformer = (originalTransformer, separator = " ") => {
|
|
@@ -6648,7 +6714,7 @@ var createRepeaterToItemsTransformer = (originalTransformer, separator = " ") =>
|
|
|
6648
6714
|
if (parts.length <= 1) {
|
|
6649
6715
|
return stringResult;
|
|
6650
6716
|
}
|
|
6651
|
-
return /* @__PURE__ */
|
|
6717
|
+
return /* @__PURE__ */ React106.createElement(Stack25, { direction: "column", gap: 0.5 }, parts.map((part, index) => /* @__PURE__ */ React106.createElement(Stack25, { key: index }, part.trim())));
|
|
6652
6718
|
});
|
|
6653
6719
|
};
|
|
6654
6720
|
|
|
@@ -6695,7 +6761,7 @@ function registerCustomTransformers(originalStyleTransformers) {
|
|
|
6695
6761
|
}
|
|
6696
6762
|
|
|
6697
6763
|
// src/styles-inheritance/init.ts
|
|
6698
|
-
var
|
|
6764
|
+
var init3 = () => {
|
|
6699
6765
|
initStylesInheritanceTransformers();
|
|
6700
6766
|
registerFieldIndicator({
|
|
6701
6767
|
fieldType: FIELD_TYPE.STYLES,
|
|
@@ -6706,17 +6772,18 @@ var init2 = () => {
|
|
|
6706
6772
|
};
|
|
6707
6773
|
|
|
6708
6774
|
// src/init.ts
|
|
6709
|
-
function
|
|
6775
|
+
function init4() {
|
|
6710
6776
|
registerPanel(panel);
|
|
6711
6777
|
blockV1Panel();
|
|
6712
6778
|
injectIntoLogic({
|
|
6713
6779
|
id: "editing-panel-hooks",
|
|
6714
6780
|
component: EditingPanelHooks
|
|
6715
6781
|
});
|
|
6716
|
-
init();
|
|
6717
6782
|
init2();
|
|
6783
|
+
init3();
|
|
6718
6784
|
registerElementControls();
|
|
6719
6785
|
initResetStyleProps();
|
|
6786
|
+
init();
|
|
6720
6787
|
}
|
|
6721
6788
|
var blockV1Panel = () => {
|
|
6722
6789
|
blockCommand({
|
|
@@ -6743,7 +6810,7 @@ export {
|
|
|
6743
6810
|
doUnapplyClass,
|
|
6744
6811
|
getSubtitle,
|
|
6745
6812
|
getTitle,
|
|
6746
|
-
|
|
6813
|
+
init4 as init,
|
|
6747
6814
|
injectIntoClassSelectorActions,
|
|
6748
6815
|
injectIntoCssClassConvert,
|
|
6749
6816
|
injectIntoPanelHeaderTop,
|