@elementor/editor-controls 4.4.0-1077 → 4.4.0-1078
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 +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +1400 -837
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1297 -741
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/controls/icon-library/font-awesome-7-catalog.ts +104 -0
- package/src/controls/icon-library/font-awesome-7-data.ts +260 -0
- package/src/controls/icon-library/font-awesome-glyph.tsx +30 -0
- package/src/controls/icon-library/get-icon-library-anchor.ts +29 -0
- package/src/controls/icon-library/icon-library-popover.tsx +228 -0
- package/src/controls/icon-library/use-font-awesome-7-catalog.ts +14 -0
- package/src/controls/svg-media-control.tsx +132 -159
- package/src/controls/svg-media-overlay.tsx +137 -0
- package/src/controls/svg-media-preview.tsx +68 -0
- package/src/index.ts +6 -0
package/dist/index.js
CHANGED
|
@@ -103,11 +103,14 @@ __export(index_exports, {
|
|
|
103
103
|
createControlReplacementsRegistry: () => createControlReplacementsRegistry,
|
|
104
104
|
enqueueFont: () => enqueueFont,
|
|
105
105
|
getControlReplacements: () => getControlReplacements,
|
|
106
|
+
getFontAwesome7IconName: () => getFontAwesome7IconName,
|
|
106
107
|
injectIntoRepeaterItemActions: () => injectIntoRepeaterItemActions,
|
|
107
108
|
injectIntoRepeaterItemIcon: () => injectIntoRepeaterItemIcon,
|
|
108
109
|
injectIntoRepeaterItemLabel: () => injectIntoRepeaterItemLabel,
|
|
109
110
|
isUnitExtendedOption: () => isUnitExtendedOption,
|
|
110
111
|
registerControlReplacement: () => registerControlReplacement,
|
|
112
|
+
resetFontAwesome7IconsCache: () => resetFontAwesome7IconsCache,
|
|
113
|
+
resolveFontAwesome7Icon: () => resolveFontAwesome7Icon,
|
|
111
114
|
trackUpgradePromotionClick: () => trackUpgradePromotionClick,
|
|
112
115
|
trackViewPromotion: () => trackViewPromotion,
|
|
113
116
|
transitionProperties: () => transitionProperties,
|
|
@@ -5376,14 +5379,13 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
5376
5379
|
});
|
|
5377
5380
|
|
|
5378
5381
|
// src/controls/svg-media-control.tsx
|
|
5379
|
-
var
|
|
5380
|
-
var
|
|
5382
|
+
var React85 = __toESM(require("react"));
|
|
5383
|
+
var import_react50 = require("react");
|
|
5381
5384
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
5382
5385
|
var import_editor_props35 = require("@elementor/editor-props");
|
|
5383
|
-
var
|
|
5384
|
-
var import_ui64 = require("@elementor/ui");
|
|
5386
|
+
var import_ui67 = require("@elementor/ui");
|
|
5385
5387
|
var import_wp_media2 = require("@elementor/wp-media");
|
|
5386
|
-
var
|
|
5388
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
5387
5389
|
|
|
5388
5390
|
// src/components/enable-unfiltered-modal.tsx
|
|
5389
5391
|
var React80 = __toESM(require("react"));
|
|
@@ -5435,37 +5437,436 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
5435
5437
|
isPending ? /* @__PURE__ */ React80.createElement(import_ui63.CircularProgress, { size: 24 }) : (0, import_i18n31.__)("Enable", "elementor")
|
|
5436
5438
|
)));
|
|
5437
5439
|
|
|
5438
|
-
// src/controls/
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5440
|
+
// src/controls/icon-library/get-icon-library-anchor.ts
|
|
5441
|
+
function getIconLibraryAnchor(containerRect, buttonGroupRect) {
|
|
5442
|
+
if (!containerRect || containerRect.width <= 0) {
|
|
5443
|
+
return null;
|
|
5444
|
+
}
|
|
5445
|
+
return {
|
|
5446
|
+
top: buttonGroupRect?.top ?? containerRect.top,
|
|
5447
|
+
left: containerRect.left,
|
|
5448
|
+
width: containerRect.width
|
|
5449
|
+
};
|
|
5443
5450
|
}
|
|
5444
|
-
function
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5451
|
+
function measureIconLibraryAnchor(container, buttonGroup) {
|
|
5452
|
+
return getIconLibraryAnchor(container?.getBoundingClientRect(), buttonGroup?.getBoundingClientRect());
|
|
5453
|
+
}
|
|
5454
|
+
|
|
5455
|
+
// src/controls/icon-library/icon-library-popover.tsx
|
|
5456
|
+
var React82 = __toESM(require("react"));
|
|
5457
|
+
var import_react49 = require("react");
|
|
5458
|
+
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
5459
|
+
var import_icons21 = require("@elementor/icons");
|
|
5460
|
+
var import_ui64 = require("@elementor/ui");
|
|
5461
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
5462
|
+
|
|
5463
|
+
// src/controls/icon-library/font-awesome-7-data.ts
|
|
5464
|
+
var FONT_AWESOME_7_LIBRARIES = [
|
|
5465
|
+
{ file: "solid", library: "fa-solid" },
|
|
5466
|
+
{ file: "regular", library: "fa-regular" },
|
|
5467
|
+
{ file: "brands", library: "fa-brands" }
|
|
5468
|
+
];
|
|
5469
|
+
var FONT_AWESOME_JSON = {
|
|
5470
|
+
width: 0,
|
|
5471
|
+
height: 1,
|
|
5472
|
+
aliases: 2,
|
|
5473
|
+
unicode: 3,
|
|
5474
|
+
path: 4
|
|
5475
|
+
};
|
|
5476
|
+
var libraryCache = /* @__PURE__ */ new Map();
|
|
5477
|
+
function getFontAwesome7EditorConfig() {
|
|
5478
|
+
const config = window.elementorCommon?.config?.fontAwesome?.v7;
|
|
5479
|
+
if (!config || !Array.isArray(config.jsonFiles)) {
|
|
5480
|
+
return null;
|
|
5481
|
+
}
|
|
5482
|
+
const jsonBaseUrl = getAllowedJsonBaseUrl(config.jsonBaseUrl);
|
|
5483
|
+
if (!jsonBaseUrl) {
|
|
5484
|
+
return null;
|
|
5485
|
+
}
|
|
5486
|
+
return {
|
|
5487
|
+
jsonFiles: config.jsonFiles,
|
|
5488
|
+
jsonBaseUrl
|
|
5489
|
+
};
|
|
5490
|
+
}
|
|
5491
|
+
var FONT_AWESOME_ICON_NAME_PATTERN = /^fa\S*\s+fa-([^\s]+)/;
|
|
5492
|
+
function getFontAwesome7IconName(iconValue) {
|
|
5493
|
+
return iconValue.match(FONT_AWESOME_ICON_NAME_PATTERN)?.[1] ?? null;
|
|
5494
|
+
}
|
|
5495
|
+
function resetFontAwesome7IconsCache() {
|
|
5496
|
+
libraryCache.clear();
|
|
5497
|
+
}
|
|
5498
|
+
async function loadFontAwesome7Library(file, signal) {
|
|
5499
|
+
const cached = await getCachedLibrary(file, signal);
|
|
5500
|
+
return cached?.icons ?? [];
|
|
5501
|
+
}
|
|
5502
|
+
async function resolveFontAwesome7Icon(library, iconName, signal) {
|
|
5503
|
+
const file = getLibraryFileName(library);
|
|
5504
|
+
if (!file) {
|
|
5505
|
+
return null;
|
|
5506
|
+
}
|
|
5507
|
+
const cached = await getCachedLibrary(file, signal);
|
|
5508
|
+
return cached?.lookup[iconName] ?? null;
|
|
5509
|
+
}
|
|
5510
|
+
async function getCachedLibrary(file, signal) {
|
|
5511
|
+
const cached = libraryCache.get(file);
|
|
5512
|
+
if (cached) {
|
|
5513
|
+
return cached;
|
|
5514
|
+
}
|
|
5515
|
+
const loaded = await fetchLibrary(file, signal);
|
|
5516
|
+
if (loaded) {
|
|
5517
|
+
libraryCache.set(file, loaded);
|
|
5518
|
+
}
|
|
5519
|
+
return loaded;
|
|
5520
|
+
}
|
|
5521
|
+
function getLibraryFileName(library) {
|
|
5522
|
+
const config = getFontAwesome7EditorConfig();
|
|
5523
|
+
const match = FONT_AWESOME_7_LIBRARIES.find((item) => item.library === library);
|
|
5524
|
+
if (!config || !match || !config.jsonFiles.includes(match.file)) {
|
|
5525
|
+
return null;
|
|
5526
|
+
}
|
|
5527
|
+
return match.file;
|
|
5528
|
+
}
|
|
5529
|
+
async function fetchLibrary(file, signal) {
|
|
5530
|
+
const config = getFontAwesome7EditorConfig();
|
|
5531
|
+
if (!config?.jsonFiles.includes(file)) {
|
|
5532
|
+
return null;
|
|
5533
|
+
}
|
|
5534
|
+
const catalogUrl = getCatalogFileUrl(config.jsonBaseUrl, file);
|
|
5535
|
+
if (!catalogUrl) {
|
|
5536
|
+
return null;
|
|
5537
|
+
}
|
|
5538
|
+
try {
|
|
5539
|
+
const response = await fetch(catalogUrl, { signal });
|
|
5540
|
+
if (!response.ok) {
|
|
5541
|
+
return null;
|
|
5542
|
+
}
|
|
5543
|
+
const data = await response.json();
|
|
5544
|
+
const icons = data.icons;
|
|
5545
|
+
if (!icons || typeof icons !== "object") {
|
|
5546
|
+
return null;
|
|
5547
|
+
}
|
|
5548
|
+
return indexLibrary(icons);
|
|
5549
|
+
} catch {
|
|
5550
|
+
return null;
|
|
5551
|
+
}
|
|
5552
|
+
}
|
|
5553
|
+
function indexLibrary(icons) {
|
|
5554
|
+
const definitions = [];
|
|
5555
|
+
const lookup = /* @__PURE__ */ Object.create(null);
|
|
5556
|
+
for (const [name, iconData] of Object.entries(icons)) {
|
|
5557
|
+
const definition = toIconDefinition(name, iconData);
|
|
5558
|
+
if (!definition) {
|
|
5559
|
+
continue;
|
|
5560
|
+
}
|
|
5561
|
+
definitions.push(definition);
|
|
5562
|
+
lookup[name] = definition;
|
|
5563
|
+
for (const alias of definition.aliases) {
|
|
5564
|
+
if (!lookup[alias]) {
|
|
5565
|
+
lookup[alias] = definition;
|
|
5566
|
+
}
|
|
5567
|
+
}
|
|
5568
|
+
}
|
|
5569
|
+
return { icons: definitions, lookup };
|
|
5570
|
+
}
|
|
5571
|
+
function toIconDefinition(name, iconData) {
|
|
5572
|
+
if (!isValidIconTuple(iconData)) {
|
|
5573
|
+
return null;
|
|
5574
|
+
}
|
|
5575
|
+
const paths = normalizePaths(iconData[FONT_AWESOME_JSON.path]);
|
|
5576
|
+
if (paths.length === 0) {
|
|
5577
|
+
return null;
|
|
5578
|
+
}
|
|
5579
|
+
const aliases = iconData[FONT_AWESOME_JSON.aliases].filter(
|
|
5580
|
+
(alias) => typeof alias === "string" && alias !== ""
|
|
5581
|
+
);
|
|
5582
|
+
return {
|
|
5583
|
+
name,
|
|
5584
|
+
aliases,
|
|
5585
|
+
width: iconData[FONT_AWESOME_JSON.width],
|
|
5586
|
+
height: iconData[FONT_AWESOME_JSON.height],
|
|
5587
|
+
paths
|
|
5588
|
+
};
|
|
5589
|
+
}
|
|
5590
|
+
function isValidIconTuple(iconData) {
|
|
5591
|
+
return Array.isArray(iconData) && iconData.length > FONT_AWESOME_JSON.path && typeof iconData[FONT_AWESOME_JSON.width] === "number" && typeof iconData[FONT_AWESOME_JSON.height] === "number" && Array.isArray(iconData[FONT_AWESOME_JSON.aliases]);
|
|
5592
|
+
}
|
|
5593
|
+
function normalizePaths(pathData) {
|
|
5594
|
+
if (typeof pathData === "string" && isSafeSvgPath(pathData)) {
|
|
5595
|
+
return [pathData];
|
|
5596
|
+
}
|
|
5597
|
+
if (!Array.isArray(pathData)) {
|
|
5598
|
+
return [];
|
|
5599
|
+
}
|
|
5600
|
+
return pathData.filter((path) => typeof path === "string" && isSafeSvgPath(path));
|
|
5601
|
+
}
|
|
5602
|
+
function isSafeSvgPath(path) {
|
|
5603
|
+
return path !== "" && !/[<>"'`]/.test(path);
|
|
5604
|
+
}
|
|
5605
|
+
function getAllowedJsonBaseUrl(jsonBaseUrl) {
|
|
5606
|
+
if (typeof jsonBaseUrl !== "string" || jsonBaseUrl === "") {
|
|
5607
|
+
return null;
|
|
5608
|
+
}
|
|
5609
|
+
try {
|
|
5610
|
+
const url = new URL(jsonBaseUrl);
|
|
5611
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
5612
|
+
return null;
|
|
5613
|
+
}
|
|
5614
|
+
return url.href;
|
|
5615
|
+
} catch {
|
|
5616
|
+
return null;
|
|
5617
|
+
}
|
|
5618
|
+
}
|
|
5619
|
+
function getCatalogFileUrl(jsonBaseUrl, file) {
|
|
5620
|
+
try {
|
|
5621
|
+
const baseUrl = new URL(jsonBaseUrl);
|
|
5622
|
+
const fileUrl = new URL(`${file}.json`, jsonBaseUrl);
|
|
5623
|
+
if (fileUrl.origin !== baseUrl.origin || !fileUrl.pathname.startsWith(baseUrl.pathname)) {
|
|
5624
|
+
return null;
|
|
5625
|
+
}
|
|
5626
|
+
if (fileUrl.protocol !== "http:" && fileUrl.protocol !== "https:") {
|
|
5627
|
+
return null;
|
|
5628
|
+
}
|
|
5629
|
+
return fileUrl.href;
|
|
5630
|
+
} catch {
|
|
5631
|
+
return null;
|
|
5448
5632
|
}
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5633
|
+
}
|
|
5634
|
+
|
|
5635
|
+
// src/controls/icon-library/font-awesome-7-catalog.ts
|
|
5636
|
+
async function loadFontAwesome7Catalog(signal) {
|
|
5637
|
+
const config = getFontAwesome7EditorConfig();
|
|
5638
|
+
if (!config) {
|
|
5639
|
+
return [];
|
|
5640
|
+
}
|
|
5641
|
+
const catalogs = await Promise.all(
|
|
5642
|
+
FONT_AWESOME_7_LIBRARIES.map(async ({ file, library }) => {
|
|
5643
|
+
if (!config.jsonFiles.includes(file)) {
|
|
5644
|
+
return [];
|
|
5645
|
+
}
|
|
5646
|
+
const icons = await loadFontAwesome7Library(file, signal);
|
|
5647
|
+
return icons.map((icon) => toCatalogIcon(icon, library));
|
|
5648
|
+
})
|
|
5649
|
+
);
|
|
5650
|
+
return catalogs.flat();
|
|
5651
|
+
}
|
|
5652
|
+
function filterFontAwesome7Icons(icons, searchValue) {
|
|
5653
|
+
const query = searchValue?.trim().toLowerCase() ?? "";
|
|
5654
|
+
if (query === "") {
|
|
5655
|
+
return icons;
|
|
5656
|
+
}
|
|
5657
|
+
return icons.filter((icon) => {
|
|
5658
|
+
if (icon.name.includes(query) || icon.label.toLowerCase().includes(query)) {
|
|
5659
|
+
return true;
|
|
5660
|
+
}
|
|
5661
|
+
return icon.aliases.some((alias) => alias.toLowerCase().includes(query));
|
|
5452
5662
|
});
|
|
5453
5663
|
}
|
|
5454
|
-
function
|
|
5455
|
-
|
|
5664
|
+
function createIconSelectionValue(library, name) {
|
|
5665
|
+
return `${library} fa-${name}`;
|
|
5456
5666
|
}
|
|
5457
|
-
function
|
|
5667
|
+
function getSelectedIconId(iconClass, library) {
|
|
5668
|
+
if (!iconClass || !library) {
|
|
5669
|
+
return void 0;
|
|
5670
|
+
}
|
|
5671
|
+
const name = getFontAwesome7IconName(iconClass);
|
|
5672
|
+
if (!name) {
|
|
5673
|
+
return void 0;
|
|
5674
|
+
}
|
|
5675
|
+
return `${library}:${name}`;
|
|
5676
|
+
}
|
|
5677
|
+
function findFontAwesome7Icon(icons, iconClass, library) {
|
|
5678
|
+
const selectedId = getSelectedIconId(iconClass, library);
|
|
5679
|
+
if (!selectedId || !library) {
|
|
5680
|
+
return void 0;
|
|
5681
|
+
}
|
|
5682
|
+
const selectedName = selectedId.slice(`${library}:`.length);
|
|
5683
|
+
return icons.find((icon) => {
|
|
5684
|
+
if (icon.library !== library) {
|
|
5685
|
+
return false;
|
|
5686
|
+
}
|
|
5687
|
+
return icon.id === selectedId || icon.name === selectedName || icon.aliases.includes(selectedName);
|
|
5688
|
+
});
|
|
5689
|
+
}
|
|
5690
|
+
function toCatalogIcon(icon, library) {
|
|
5458
5691
|
return {
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
onSelect?.(icon);
|
|
5465
|
-
},
|
|
5466
|
-
applySavedValue: () => void 0
|
|
5692
|
+
...icon,
|
|
5693
|
+
id: `${library}:${icon.name}`,
|
|
5694
|
+
label: icon.name.replace(/-/g, " "),
|
|
5695
|
+
library,
|
|
5696
|
+
value: createIconSelectionValue(library, icon.name)
|
|
5467
5697
|
};
|
|
5468
5698
|
}
|
|
5699
|
+
|
|
5700
|
+
// src/controls/icon-library/font-awesome-glyph.tsx
|
|
5701
|
+
var React81 = __toESM(require("react"));
|
|
5702
|
+
var FontAwesomeGlyph = ({ icon, size, color, label }) => {
|
|
5703
|
+
return /* @__PURE__ */ React81.createElement(
|
|
5704
|
+
"svg",
|
|
5705
|
+
{
|
|
5706
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5707
|
+
viewBox: `0 0 ${icon.width} ${icon.height}`,
|
|
5708
|
+
width: size,
|
|
5709
|
+
height: size,
|
|
5710
|
+
fill: color,
|
|
5711
|
+
overflow: "visible",
|
|
5712
|
+
"aria-hidden": label ? void 0 : true,
|
|
5713
|
+
"aria-label": label,
|
|
5714
|
+
role: label ? "img" : void 0
|
|
5715
|
+
},
|
|
5716
|
+
icon.paths.map((path, index) => /* @__PURE__ */ React81.createElement("path", { key: `${index}-${path}`, d: path }))
|
|
5717
|
+
);
|
|
5718
|
+
};
|
|
5719
|
+
|
|
5720
|
+
// src/controls/icon-library/use-font-awesome-7-catalog.ts
|
|
5721
|
+
var import_query2 = require("@elementor/query");
|
|
5722
|
+
var FONT_AWESOME_7_CATALOG_QUERY_KEY = ["font-awesome-7-catalog"];
|
|
5723
|
+
function useFontAwesome7Catalog(enabled) {
|
|
5724
|
+
return (0, import_query2.useQuery)({
|
|
5725
|
+
queryKey: FONT_AWESOME_7_CATALOG_QUERY_KEY,
|
|
5726
|
+
queryFn: ({ signal }) => loadFontAwesome7Catalog(signal),
|
|
5727
|
+
enabled,
|
|
5728
|
+
staleTime: Infinity
|
|
5729
|
+
});
|
|
5730
|
+
}
|
|
5731
|
+
|
|
5732
|
+
// src/controls/icon-library/icon-library-popover.tsx
|
|
5733
|
+
var ICON_LIBRARY_POPOVER_WIDTH = 300;
|
|
5734
|
+
var ICON_LIBRARY_ROW_HEIGHT = 48;
|
|
5735
|
+
var ICON_TILE_SIZE = 40;
|
|
5736
|
+
var ICON_GLYPH_SIZE = 20;
|
|
5737
|
+
var ICON_LIBRARY_INLINE_SPACING = 1;
|
|
5738
|
+
var CompactIconLibraryMenuList = (0, import_ui64.styled)(import_editor_ui11.StyledMenuList)(({ theme }) => ({
|
|
5739
|
+
'& > [role="option"]': {
|
|
5740
|
+
padding: theme.spacing(0.75, ICON_LIBRARY_INLINE_SPACING)
|
|
5741
|
+
}
|
|
5742
|
+
}));
|
|
5743
|
+
var IconLibraryPopover = ({
|
|
5744
|
+
open,
|
|
5745
|
+
selectedIconClass,
|
|
5746
|
+
selectedIconLibrary,
|
|
5747
|
+
onSelect,
|
|
5748
|
+
onClose,
|
|
5749
|
+
width = ICON_LIBRARY_POPOVER_WIDTH
|
|
5750
|
+
}) => {
|
|
5751
|
+
const [searchValue, setSearchValue] = (0, import_react49.useState)("");
|
|
5752
|
+
const { data: icons = [], isLoading } = useFontAwesome7Catalog(open);
|
|
5753
|
+
const items2 = (0, import_react49.useMemo)(() => createIconLibraryItems(icons, searchValue), [icons, searchValue]);
|
|
5754
|
+
const selectedValue = (0, import_react49.useMemo)(
|
|
5755
|
+
() => findFontAwesome7Icon(icons, selectedIconClass, selectedIconLibrary)?.id,
|
|
5756
|
+
[icons, selectedIconClass, selectedIconLibrary]
|
|
5757
|
+
);
|
|
5758
|
+
const handleClose = () => {
|
|
5759
|
+
setSearchValue("");
|
|
5760
|
+
onClose();
|
|
5761
|
+
};
|
|
5762
|
+
const handleSelect = (id) => {
|
|
5763
|
+
const icon = items2.find((item) => item.id === id);
|
|
5764
|
+
if (!icon) {
|
|
5765
|
+
return;
|
|
5766
|
+
}
|
|
5767
|
+
onSelect({
|
|
5768
|
+
value: createIconSelectionValue(icon.library, icon.name),
|
|
5769
|
+
library: icon.library
|
|
5770
|
+
});
|
|
5771
|
+
};
|
|
5772
|
+
const handleClearSearch = () => {
|
|
5773
|
+
setSearchValue("");
|
|
5774
|
+
};
|
|
5775
|
+
return /* @__PURE__ */ React82.createElement(import_editor_ui11.PopoverBody, { width, fillWidth: true, id: "icon-library" }, /* @__PURE__ */ React82.createElement(
|
|
5776
|
+
import_editor_ui11.PopoverHeader,
|
|
5777
|
+
{
|
|
5778
|
+
title: (0, import_i18n32.__)("Icon library", "elementor"),
|
|
5779
|
+
onClose: handleClose,
|
|
5780
|
+
icon: /* @__PURE__ */ React82.createElement(import_icons21.ComponentsIcon, { fontSize: "tiny" }),
|
|
5781
|
+
sx: { pl: ICON_LIBRARY_INLINE_SPACING, pr: 0.5 }
|
|
5782
|
+
}
|
|
5783
|
+
), /* @__PURE__ */ React82.createElement(
|
|
5784
|
+
import_editor_ui11.SearchField,
|
|
5785
|
+
{
|
|
5786
|
+
value: searchValue,
|
|
5787
|
+
onSearch: setSearchValue,
|
|
5788
|
+
placeholder: (0, import_i18n32.__)("Search", "elementor"),
|
|
5789
|
+
id: "icon-library-search",
|
|
5790
|
+
sx: { px: ICON_LIBRARY_INLINE_SPACING, pb: 1 }
|
|
5791
|
+
}
|
|
5792
|
+
), /* @__PURE__ */ React82.createElement(import_ui64.Divider, null), /* @__PURE__ */ React82.createElement(import_ui64.Box, { sx: { flex: 1, overflow: "auto", minHeight: 0 } }, /* @__PURE__ */ React82.createElement(
|
|
5793
|
+
IconLibraryContent,
|
|
5794
|
+
{
|
|
5795
|
+
isLoading,
|
|
5796
|
+
items: items2,
|
|
5797
|
+
selectedValue,
|
|
5798
|
+
searchValue,
|
|
5799
|
+
onSelect: handleSelect,
|
|
5800
|
+
onClose: handleClose,
|
|
5801
|
+
onClearSearch: handleClearSearch
|
|
5802
|
+
}
|
|
5803
|
+
)));
|
|
5804
|
+
};
|
|
5805
|
+
var IconLibraryContent = ({
|
|
5806
|
+
isLoading,
|
|
5807
|
+
items: items2,
|
|
5808
|
+
selectedValue,
|
|
5809
|
+
searchValue,
|
|
5810
|
+
onSelect,
|
|
5811
|
+
onClose,
|
|
5812
|
+
onClearSearch
|
|
5813
|
+
}) => {
|
|
5814
|
+
if (isLoading) {
|
|
5815
|
+
return /* @__PURE__ */ React82.createElement(IconLibraryLoadingState, null);
|
|
5816
|
+
}
|
|
5817
|
+
return /* @__PURE__ */ React82.createElement(
|
|
5818
|
+
import_editor_ui11.PopoverMenuList,
|
|
5819
|
+
{
|
|
5820
|
+
items: items2,
|
|
5821
|
+
selectedValue,
|
|
5822
|
+
menuListTemplate: CompactIconLibraryMenuList,
|
|
5823
|
+
onSelect,
|
|
5824
|
+
onClose,
|
|
5825
|
+
itemHeight: ICON_LIBRARY_ROW_HEIGHT,
|
|
5826
|
+
menuItemContentTemplate: IconLibraryRow,
|
|
5827
|
+
noResultsComponent: /* @__PURE__ */ React82.createElement(IconLibraryEmptyState, { searchValue, onClear: onClearSearch }),
|
|
5828
|
+
"data-testid": "icon-library-list"
|
|
5829
|
+
}
|
|
5830
|
+
);
|
|
5831
|
+
};
|
|
5832
|
+
var IconLibraryLoadingState = () => /* @__PURE__ */ React82.createElement(import_ui64.Stack, { alignItems: "center", justifyContent: "center", height: "100%" }, /* @__PURE__ */ React82.createElement(import_ui64.CircularProgress, { role: "progressbar", size: 24 }));
|
|
5833
|
+
var IconLibraryEmptyState = ({ searchValue, onClear }) => {
|
|
5834
|
+
if (searchValue.trim() === "") {
|
|
5835
|
+
return /* @__PURE__ */ React82.createElement(CatalogUnavailable, null);
|
|
5836
|
+
}
|
|
5837
|
+
return /* @__PURE__ */ React82.createElement(NoResults, { searchValue, onClear });
|
|
5838
|
+
};
|
|
5839
|
+
var IconLibraryRow = (item) => {
|
|
5840
|
+
const icon = item;
|
|
5841
|
+
return /* @__PURE__ */ React82.createElement(import_ui64.Stack, { direction: "row", alignItems: "center", gap: 1, sx: { width: "100%" } }, /* @__PURE__ */ React82.createElement(
|
|
5842
|
+
import_ui64.Box,
|
|
5843
|
+
{
|
|
5844
|
+
sx: {
|
|
5845
|
+
width: ICON_TILE_SIZE,
|
|
5846
|
+
height: ICON_TILE_SIZE,
|
|
5847
|
+
display: "flex",
|
|
5848
|
+
alignItems: "center",
|
|
5849
|
+
justifyContent: "center",
|
|
5850
|
+
border: 1,
|
|
5851
|
+
borderColor: "divider",
|
|
5852
|
+
borderRadius: 1,
|
|
5853
|
+
color: "text.tertiary",
|
|
5854
|
+
flexShrink: 0
|
|
5855
|
+
}
|
|
5856
|
+
},
|
|
5857
|
+
icon.paths.length > 0 ? /* @__PURE__ */ React82.createElement(FontAwesomeGlyph, { icon, size: ICON_GLYPH_SIZE, color: "currentColor" }) : null
|
|
5858
|
+
), /* @__PURE__ */ React82.createElement(import_ui64.Typography, { variant: "caption", color: "text.primary", noWrap: true }, icon.label));
|
|
5859
|
+
};
|
|
5860
|
+
var CatalogUnavailable = () => /* @__PURE__ */ React82.createElement(import_ui64.Stack, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React82.createElement(import_icons21.ComponentsIcon, { fontSize: "large" }), /* @__PURE__ */ React82.createElement(import_ui64.Typography, { align: "center", variant: "subtitle2", color: "text.secondary" }, (0, import_i18n32.__)("Icons couldn't be loaded.", "elementor")));
|
|
5861
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React82.createElement(import_ui64.Stack, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React82.createElement(import_icons21.ComponentsIcon, { fontSize: "large" }), /* @__PURE__ */ React82.createElement(import_ui64.Typography, { align: "center", variant: "subtitle2", color: "text.secondary" }, (0, import_i18n32.__)("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React82.createElement(import_ui64.Typography, { align: "center", variant: "subtitle2", color: "text.secondary", noWrap: true, sx: { maxWidth: "80%" } }, "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React82.createElement(import_ui64.Link, { color: "secondary", variant: "caption", component: "button", type: "button", onClick: onClear }, (0, import_i18n32.__)("Clear & try again", "elementor")));
|
|
5862
|
+
var createIconLibraryItems = (icons, searchValue) => filterFontAwesome7Icons(icons, searchValue).map((icon) => ({
|
|
5863
|
+
...icon,
|
|
5864
|
+
type: "item",
|
|
5865
|
+
value: icon.id
|
|
5866
|
+
}));
|
|
5867
|
+
|
|
5868
|
+
// src/controls/open-icon-library.ts
|
|
5869
|
+
var import_editor_props34 = require("@elementor/editor-props");
|
|
5469
5870
|
function createIconPropValue(icon, library) {
|
|
5470
5871
|
return {
|
|
5471
5872
|
value: import_editor_props34.stringPropTypeUtil.create(icon),
|
|
@@ -5473,13 +5874,170 @@ function createIconPropValue(icon, library) {
|
|
|
5473
5874
|
};
|
|
5474
5875
|
}
|
|
5475
5876
|
|
|
5877
|
+
// src/controls/svg-media-overlay.tsx
|
|
5878
|
+
var React83 = __toESM(require("react"));
|
|
5879
|
+
var import_icons22 = require("@elementor/icons");
|
|
5880
|
+
var import_ui65 = require("@elementor/ui");
|
|
5881
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
5882
|
+
var SVG_MEDIA_CONTROL_CONTAINER_TEST_ID = "svg-media-control-container";
|
|
5883
|
+
var SVG_MEDIA_ACTION_GROUP_TEST_ID = "svg-media-action-group";
|
|
5884
|
+
var MEDIA_ACTION_PADDING_Y = 0.75;
|
|
5885
|
+
var MEDIA_ACTION_PADDING_X = 2;
|
|
5886
|
+
var ICON_LIBRARY_PADDING = 0.625;
|
|
5887
|
+
var svgButtonSx = {
|
|
5888
|
+
px: MEDIA_ACTION_PADDING_X,
|
|
5889
|
+
py: MEDIA_ACTION_PADDING_Y
|
|
5890
|
+
};
|
|
5891
|
+
var MediaActionGroup = (0, import_ui65.styled)(import_ui65.Stack)(({ theme }) => ({
|
|
5892
|
+
display: "inline-flex",
|
|
5893
|
+
flexDirection: "row",
|
|
5894
|
+
alignItems: "stretch",
|
|
5895
|
+
border: "1px solid currentColor",
|
|
5896
|
+
borderRadius: theme.shape.borderRadius,
|
|
5897
|
+
overflow: "hidden",
|
|
5898
|
+
"& .MuiButton-root": {
|
|
5899
|
+
border: "none",
|
|
5900
|
+
borderRadius: 0,
|
|
5901
|
+
lineHeight: 1
|
|
5902
|
+
}
|
|
5903
|
+
}));
|
|
5904
|
+
var SvgMediaOverlay = ({
|
|
5905
|
+
isAdmin,
|
|
5906
|
+
showIconLibrary,
|
|
5907
|
+
buttonGroupRef,
|
|
5908
|
+
onSelectSvg,
|
|
5909
|
+
onUpload,
|
|
5910
|
+
onOpenIconLibrary,
|
|
5911
|
+
infotipTitle,
|
|
5912
|
+
infotipDescription
|
|
5913
|
+
}) => /* @__PURE__ */ React83.createElement(import_ui65.Stack, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React83.createElement(MediaActionGroup, { ref: buttonGroupRef, direction: "row", "data-testid": SVG_MEDIA_ACTION_GROUP_TEST_ID }, /* @__PURE__ */ React83.createElement(
|
|
5914
|
+
import_ui65.Button,
|
|
5915
|
+
{
|
|
5916
|
+
size: "tiny",
|
|
5917
|
+
color: "inherit",
|
|
5918
|
+
variant: "text",
|
|
5919
|
+
onClick: onSelectSvg,
|
|
5920
|
+
"aria-label": (0, import_i18n33.__)("Select", "elementor"),
|
|
5921
|
+
sx: svgButtonSx
|
|
5922
|
+
},
|
|
5923
|
+
(0, import_i18n33.__)("Select", "elementor")
|
|
5924
|
+
), /* @__PURE__ */ React83.createElement(
|
|
5925
|
+
import_ui65.Box,
|
|
5926
|
+
{
|
|
5927
|
+
sx: {
|
|
5928
|
+
width: "1px",
|
|
5929
|
+
alignSelf: "stretch",
|
|
5930
|
+
bgcolor: "currentColor",
|
|
5931
|
+
flexShrink: 0
|
|
5932
|
+
}
|
|
5933
|
+
}
|
|
5934
|
+
), /* @__PURE__ */ React83.createElement(
|
|
5935
|
+
ConditionalControlInfotip,
|
|
5936
|
+
{
|
|
5937
|
+
title: infotipTitle,
|
|
5938
|
+
description: infotipDescription,
|
|
5939
|
+
isEnabled: !isAdmin
|
|
5940
|
+
},
|
|
5941
|
+
/* @__PURE__ */ React83.createElement(import_ui65.Box, { component: "span", sx: { display: "inline-flex" } }, /* @__PURE__ */ React83.createElement(UploadControl, { isAdmin, onUpload }))
|
|
5942
|
+
)), showIconLibrary ? /* @__PURE__ */ React83.createElement(
|
|
5943
|
+
import_ui65.Button,
|
|
5944
|
+
{
|
|
5945
|
+
size: "tiny",
|
|
5946
|
+
color: "inherit",
|
|
5947
|
+
variant: "text",
|
|
5948
|
+
startIcon: /* @__PURE__ */ React83.createElement(import_icons22.LibraryIcon, { sx: { height: "18px", width: "16px" } }),
|
|
5949
|
+
"aria-label": (0, import_i18n33.__)("Icon library", "elementor"),
|
|
5950
|
+
onClick: onOpenIconLibrary,
|
|
5951
|
+
sx: {
|
|
5952
|
+
height: "28px",
|
|
5953
|
+
p: ICON_LIBRARY_PADDING,
|
|
5954
|
+
".MuiButton-icon": { ml: 0 }
|
|
5955
|
+
}
|
|
5956
|
+
},
|
|
5957
|
+
/* @__PURE__ */ React83.createElement(import_ui65.Typography, null, (0, import_i18n33.__)("Icon library", "elementor"))
|
|
5958
|
+
) : null);
|
|
5959
|
+
var UploadControl = ({ isAdmin, onUpload }) => {
|
|
5960
|
+
if (isAdmin) {
|
|
5961
|
+
return /* @__PURE__ */ React83.createElement(UploadButton, { sx: svgButtonSx, onClick: onUpload });
|
|
5962
|
+
}
|
|
5963
|
+
return /* @__PURE__ */ React83.createElement(import_ui65.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React83.createElement(UploadButton, { disabled: true, sx: svgButtonSx }));
|
|
5964
|
+
};
|
|
5965
|
+
var UploadButton = ({
|
|
5966
|
+
disabled = false,
|
|
5967
|
+
sx,
|
|
5968
|
+
onClick
|
|
5969
|
+
}) => /* @__PURE__ */ React83.createElement(
|
|
5970
|
+
import_ui65.Button,
|
|
5971
|
+
{
|
|
5972
|
+
sx,
|
|
5973
|
+
size: "tiny",
|
|
5974
|
+
color: "inherit",
|
|
5975
|
+
variant: "text",
|
|
5976
|
+
disabled,
|
|
5977
|
+
onClick,
|
|
5978
|
+
"aria-label": (0, import_i18n33.__)("Upload", "elementor")
|
|
5979
|
+
},
|
|
5980
|
+
/* @__PURE__ */ React83.createElement(import_icons22.UploadIcon, null)
|
|
5981
|
+
);
|
|
5982
|
+
|
|
5983
|
+
// src/controls/svg-media-preview.tsx
|
|
5984
|
+
var React84 = __toESM(require("react"));
|
|
5985
|
+
var import_ui66 = require("@elementor/ui");
|
|
5986
|
+
var import_i18n34 = require("@wordpress/i18n");
|
|
5987
|
+
var ICON_PREVIEW_SIZE = 50;
|
|
5988
|
+
var ICON_PREVIEW_COLOR = "#000000";
|
|
5989
|
+
var SvgMediaPreview = ({ isFetching, src, iconClassName, iconLibrary }) => {
|
|
5990
|
+
const shouldLoadIconCatalog = Boolean(iconClassName && iconLibrary);
|
|
5991
|
+
const { data: icons = [], isLoading } = useFontAwesome7Catalog(shouldLoadIconCatalog);
|
|
5992
|
+
const selectedIcon = findFontAwesome7Icon(icons, iconClassName, iconLibrary);
|
|
5993
|
+
if (isFetching || shouldLoadIconCatalog && isLoading) {
|
|
5994
|
+
return /* @__PURE__ */ React84.createElement(import_ui66.CircularProgress, { role: "progressbar" });
|
|
5995
|
+
}
|
|
5996
|
+
if (selectedIcon) {
|
|
5997
|
+
return /* @__PURE__ */ React84.createElement(IconPreview, { icon: selectedIcon });
|
|
5998
|
+
}
|
|
5999
|
+
if (shouldLoadIconCatalog) {
|
|
6000
|
+
return /* @__PURE__ */ React84.createElement(IconPreviewPlaceholder, null);
|
|
6001
|
+
}
|
|
6002
|
+
return /* @__PURE__ */ React84.createElement(SvgPreview, { src });
|
|
6003
|
+
};
|
|
6004
|
+
var IconPreview = ({ icon }) => /* @__PURE__ */ React84.createElement(import_ui66.Box, { sx: { color: ICON_PREVIEW_COLOR } }, /* @__PURE__ */ React84.createElement(
|
|
6005
|
+
FontAwesomeGlyph,
|
|
6006
|
+
{
|
|
6007
|
+
icon,
|
|
6008
|
+
size: ICON_PREVIEW_SIZE,
|
|
6009
|
+
color: ICON_PREVIEW_COLOR,
|
|
6010
|
+
label: (0, import_i18n34.__)("Preview icon", "elementor")
|
|
6011
|
+
}
|
|
6012
|
+
));
|
|
6013
|
+
var IconPreviewPlaceholder = () => /* @__PURE__ */ React84.createElement(
|
|
6014
|
+
import_ui66.Box,
|
|
6015
|
+
{
|
|
6016
|
+
"aria-hidden": true,
|
|
6017
|
+
sx: {
|
|
6018
|
+
width: ICON_PREVIEW_SIZE,
|
|
6019
|
+
height: ICON_PREVIEW_SIZE,
|
|
6020
|
+
color: ICON_PREVIEW_COLOR
|
|
6021
|
+
}
|
|
6022
|
+
}
|
|
6023
|
+
);
|
|
6024
|
+
var SvgPreview = ({ src }) => /* @__PURE__ */ React84.createElement(
|
|
6025
|
+
import_ui66.CardMedia,
|
|
6026
|
+
{
|
|
6027
|
+
component: "img",
|
|
6028
|
+
image: src,
|
|
6029
|
+
alt: (0, import_i18n34.__)("Preview SVG", "elementor"),
|
|
6030
|
+
sx: { maxHeight: "140px", width: `${ICON_PREVIEW_SIZE}px`, color: ICON_PREVIEW_COLOR }
|
|
6031
|
+
}
|
|
6032
|
+
);
|
|
6033
|
+
|
|
5476
6034
|
// src/controls/svg-media-control.tsx
|
|
5477
6035
|
var TILE_SIZE = 8;
|
|
5478
6036
|
var TILE_WHITE = "transparent";
|
|
5479
6037
|
var TILE_BLACK = "#c1c1c1";
|
|
5480
|
-
var ICON_PREVIEW_FONT_SIZE = 50;
|
|
5481
6038
|
var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
|
|
5482
|
-
var StyledCard = (0,
|
|
6039
|
+
var StyledCard = (0, import_ui67.styled)(import_ui67.Card)`
|
|
6040
|
+
position: relative;
|
|
5483
6041
|
background-color: white;
|
|
5484
6042
|
background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
|
|
5485
6043
|
background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
|
|
@@ -5488,7 +6046,8 @@ var StyledCard = (0, import_ui64.styled)(import_ui64.Card)`
|
|
|
5488
6046
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
5489
6047
|
border: none;
|
|
5490
6048
|
`;
|
|
5491
|
-
var
|
|
6049
|
+
var PREVIEW_ICON_COLOR = "#000000";
|
|
6050
|
+
var StyledCardMediaContainer = (0, import_ui67.styled)(import_ui67.Stack)`
|
|
5492
6051
|
position: relative;
|
|
5493
6052
|
height: 140px;
|
|
5494
6053
|
object-fit: contain;
|
|
@@ -5496,6 +6055,7 @@ var StyledCardMediaContainer = (0, import_ui64.styled)(import_ui64.Stack)`
|
|
|
5496
6055
|
justify-content: center;
|
|
5497
6056
|
align-items: center;
|
|
5498
6057
|
background-color: rgba( 255, 255, 255, 0.37 );
|
|
6058
|
+
color: ${PREVIEW_ICON_COLOR};
|
|
5499
6059
|
`;
|
|
5500
6060
|
var MODE_BROWSE = { mode: "browse" };
|
|
5501
6061
|
var MODE_UPLOAD = { mode: "upload" };
|
|
@@ -5507,7 +6067,11 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5507
6067
|
const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
|
|
5508
6068
|
const src = attachment?.url ?? url?.value ?? null;
|
|
5509
6069
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
5510
|
-
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0,
|
|
6070
|
+
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0, import_react50.useState)(false);
|
|
6071
|
+
const iconLibraryPopoverState = (0, import_ui67.usePopupState)({ variant: "popover" });
|
|
6072
|
+
const controlContainerRef = (0, import_react50.useRef)(null);
|
|
6073
|
+
const buttonGroupRef = (0, import_react50.useRef)(null);
|
|
6074
|
+
const [iconLibraryAnchor, setIconLibraryAnchor] = (0, import_react50.useState)(null);
|
|
5511
6075
|
const { isAdmin } = (0, import_editor_current_user.useCurrentUserCapabilities)();
|
|
5512
6076
|
const selectedIconClass = showIconLibrary && typeof iconValue?.value?.value === "string" ? iconValue.value.value : null;
|
|
5513
6077
|
const selectedIconLibrary = showIconLibrary && typeof iconValue?.library?.value === "string" ? iconValue.library.value : null;
|
|
@@ -5525,7 +6089,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5525
6089
|
});
|
|
5526
6090
|
}
|
|
5527
6091
|
});
|
|
5528
|
-
const
|
|
6092
|
+
const handleCloseUnfilteredModal = (enabled) => {
|
|
5529
6093
|
setUnfilteredModalOpenState(false);
|
|
5530
6094
|
if (enabled) {
|
|
5531
6095
|
open(MODE_UPLOAD);
|
|
@@ -5538,127 +6102,123 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5538
6102
|
open(openOptions);
|
|
5539
6103
|
}
|
|
5540
6104
|
};
|
|
6105
|
+
const handleSelectSvg = () => {
|
|
6106
|
+
handleClick(MODE_BROWSE);
|
|
6107
|
+
};
|
|
6108
|
+
const handleUpload = () => {
|
|
6109
|
+
handleClick(MODE_UPLOAD);
|
|
6110
|
+
};
|
|
6111
|
+
const handleCloseIconLibrary = () => {
|
|
6112
|
+
iconLibraryPopoverState.close();
|
|
6113
|
+
setIconLibraryAnchor(null);
|
|
6114
|
+
};
|
|
5541
6115
|
const handleIconLibrarySelect = (icon) => {
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
id: icon.value.id ? {
|
|
5548
|
-
$$type: "image-attachment-id",
|
|
5549
|
-
value: icon.value.id
|
|
5550
|
-
} : null,
|
|
5551
|
-
url: icon.value.url ? import_editor_props35.urlPropTypeUtil.create(icon.value.url) : null
|
|
5552
|
-
});
|
|
6116
|
+
setIconValue(createIconPropValue(icon.value, icon.library));
|
|
6117
|
+
};
|
|
6118
|
+
const handleOpenIconLibrary = (event) => {
|
|
6119
|
+
const anchor = measureIconLibraryAnchor(controlContainerRef.current, buttonGroupRef.current);
|
|
6120
|
+
if (!anchor) {
|
|
5553
6121
|
return;
|
|
5554
6122
|
}
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
}
|
|
6123
|
+
setIconLibraryAnchor(anchor);
|
|
6124
|
+
iconLibraryPopoverState.open(event);
|
|
5558
6125
|
};
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
isEnabled: !isAdmin
|
|
5563
|
-
};
|
|
5564
|
-
return /* @__PURE__ */ React81.createElement(import_ui64.Stack, { gap: 1, "aria-label": "SVG Control" }, /* @__PURE__ */ React81.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React81.createElement(ControlActions, null, /* @__PURE__ */ React81.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React81.createElement(StyledCardMediaContainer, null, /* @__PURE__ */ React81.createElement(
|
|
5565
|
-
SvgMediaPreview,
|
|
5566
|
-
{
|
|
5567
|
-
isFetching,
|
|
5568
|
-
src,
|
|
5569
|
-
iconClassName: selectedIconClass,
|
|
5570
|
-
iconLibrary: selectedIconLibrary
|
|
6126
|
+
(0, import_react50.useEffect)(() => {
|
|
6127
|
+
if (!iconLibraryPopoverState.isOpen) {
|
|
6128
|
+
return;
|
|
5571
6129
|
}
|
|
5572
|
-
|
|
5573
|
-
|
|
6130
|
+
const handleResize = () => {
|
|
6131
|
+
const nextAnchor = measureIconLibraryAnchor(controlContainerRef.current, buttonGroupRef.current);
|
|
6132
|
+
if (nextAnchor) {
|
|
6133
|
+
setIconLibraryAnchor(nextAnchor);
|
|
6134
|
+
}
|
|
6135
|
+
};
|
|
6136
|
+
window.addEventListener("resize", handleResize);
|
|
6137
|
+
return () => {
|
|
6138
|
+
window.removeEventListener("resize", handleResize);
|
|
6139
|
+
};
|
|
6140
|
+
}, [iconLibraryPopoverState.isOpen]);
|
|
6141
|
+
const iconLibraryWidth = iconLibraryAnchor?.width ?? ICON_LIBRARY_POPOVER_WIDTH;
|
|
6142
|
+
return /* @__PURE__ */ React85.createElement(import_ui67.Stack, { gap: 1, "aria-label": (0, import_i18n35.__)("SVG control", "elementor") }, /* @__PURE__ */ React85.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: handleCloseUnfilteredModal }), showIconLibrary && iconLibraryAnchor ? /* @__PURE__ */ React85.createElement(
|
|
6143
|
+
import_ui67.Popover,
|
|
5574
6144
|
{
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
6145
|
+
disableScrollLock: true,
|
|
6146
|
+
open: iconLibraryPopoverState.isOpen,
|
|
6147
|
+
onClose: handleCloseIconLibrary,
|
|
6148
|
+
anchorReference: "anchorPosition",
|
|
6149
|
+
anchorPosition: { top: iconLibraryAnchor.top, left: iconLibraryAnchor.left },
|
|
6150
|
+
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
6151
|
+
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
6152
|
+
marginThreshold: 0,
|
|
6153
|
+
PaperProps: {
|
|
6154
|
+
sx: {
|
|
6155
|
+
width: iconLibraryWidth,
|
|
6156
|
+
minWidth: iconLibraryWidth,
|
|
6157
|
+
maxWidth: iconLibraryWidth,
|
|
6158
|
+
m: 0
|
|
5578
6159
|
}
|
|
5579
6160
|
}
|
|
5580
6161
|
},
|
|
5581
|
-
/* @__PURE__ */
|
|
5582
|
-
|
|
6162
|
+
/* @__PURE__ */ React85.createElement(
|
|
6163
|
+
IconLibraryPopover,
|
|
5583
6164
|
{
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
)
|
|
5592
|
-
|
|
6165
|
+
open: iconLibraryPopoverState.isOpen,
|
|
6166
|
+
selectedIconClass,
|
|
6167
|
+
selectedIconLibrary,
|
|
6168
|
+
onSelect: handleIconLibrarySelect,
|
|
6169
|
+
onClose: handleCloseIconLibrary,
|
|
6170
|
+
width: iconLibraryWidth
|
|
6171
|
+
}
|
|
6172
|
+
)
|
|
6173
|
+
) : null, /* @__PURE__ */ React85.createElement(
|
|
6174
|
+
import_ui67.Box,
|
|
6175
|
+
{
|
|
6176
|
+
ref: controlContainerRef,
|
|
6177
|
+
"data-testid": SVG_MEDIA_CONTROL_CONTAINER_TEST_ID,
|
|
6178
|
+
sx: { width: "100%" }
|
|
6179
|
+
},
|
|
6180
|
+
/* @__PURE__ */ React85.createElement(ControlActions, null, /* @__PURE__ */ React85.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React85.createElement(StyledCardMediaContainer, null, /* @__PURE__ */ React85.createElement(
|
|
6181
|
+
SvgMediaPreview,
|
|
5593
6182
|
{
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
"aria-label": (0, import_i18n32.__)("Icon library", "elementor")
|
|
5602
|
-
},
|
|
5603
|
-
(0, import_i18n32.__)("Icon library", "elementor")
|
|
5604
|
-
) : null, /* @__PURE__ */ React81.createElement(ConditionalControlInfotip, { ...infotipProps }, /* @__PURE__ */ React81.createElement("span", null, /* @__PURE__ */ React81.createElement(import_ui64.ThemeProvider, { colorScheme: isAdmin ? "light" : "dark" }, /* @__PURE__ */ React81.createElement(
|
|
5605
|
-
import_ui64.Button,
|
|
6183
|
+
isFetching,
|
|
6184
|
+
src,
|
|
6185
|
+
iconClassName: selectedIconClass,
|
|
6186
|
+
iconLibrary: selectedIconLibrary
|
|
6187
|
+
}
|
|
6188
|
+
)), /* @__PURE__ */ React85.createElement(
|
|
6189
|
+
import_ui67.CardOverlay,
|
|
5606
6190
|
{
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
onClick: () => isAdmin && handleClick(MODE_UPLOAD),
|
|
5613
|
-
"aria-label": "Upload SVG"
|
|
6191
|
+
sx: {
|
|
6192
|
+
"&:hover": {
|
|
6193
|
+
backgroundColor: "rgba( 0, 0, 0, 0.75 )"
|
|
6194
|
+
}
|
|
6195
|
+
}
|
|
5614
6196
|
},
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
6197
|
+
/* @__PURE__ */ React85.createElement(
|
|
6198
|
+
SvgMediaOverlay,
|
|
6199
|
+
{
|
|
6200
|
+
isAdmin,
|
|
6201
|
+
showIconLibrary,
|
|
6202
|
+
buttonGroupRef,
|
|
6203
|
+
onSelectSvg: handleSelectSvg,
|
|
6204
|
+
onUpload: handleUpload,
|
|
6205
|
+
onOpenIconLibrary: handleOpenIconLibrary,
|
|
6206
|
+
infotipTitle: (0, import_i18n35.__)("Sorry, you can't upload that file yet.", "elementor"),
|
|
6207
|
+
infotipDescription: /* @__PURE__ */ React85.createElement(UnfilteredUploadInfotipDescription, null)
|
|
6208
|
+
}
|
|
6209
|
+
)
|
|
6210
|
+
)))
|
|
6211
|
+
));
|
|
5618
6212
|
});
|
|
5619
|
-
|
|
5620
|
-
isFetching,
|
|
5621
|
-
src,
|
|
5622
|
-
iconClassName,
|
|
5623
|
-
iconLibrary
|
|
5624
|
-
}) {
|
|
5625
|
-
(0, import_react49.useEffect)(() => {
|
|
5626
|
-
if (iconLibrary) {
|
|
5627
|
-
enqueueIconFonts(iconLibrary);
|
|
5628
|
-
}
|
|
5629
|
-
}, [iconLibrary]);
|
|
5630
|
-
if (isFetching) {
|
|
5631
|
-
return /* @__PURE__ */ React81.createElement(import_ui64.CircularProgress, { role: "progressbar" });
|
|
5632
|
-
}
|
|
5633
|
-
if (iconClassName) {
|
|
5634
|
-
return /* @__PURE__ */ React81.createElement(
|
|
5635
|
-
import_ui64.Box,
|
|
5636
|
-
{
|
|
5637
|
-
component: "i",
|
|
5638
|
-
className: iconClassName,
|
|
5639
|
-
"aria-label": (0, import_i18n32.__)("Preview icon", "elementor"),
|
|
5640
|
-
sx: { fontSize: ICON_PREVIEW_FONT_SIZE }
|
|
5641
|
-
}
|
|
5642
|
-
);
|
|
5643
|
-
}
|
|
5644
|
-
return /* @__PURE__ */ React81.createElement(
|
|
5645
|
-
import_ui64.CardMedia,
|
|
5646
|
-
{
|
|
5647
|
-
component: "img",
|
|
5648
|
-
image: src,
|
|
5649
|
-
alt: (0, import_i18n32.__)("Preview SVG", "elementor"),
|
|
5650
|
-
sx: { maxHeight: "140px", width: `${ICON_PREVIEW_FONT_SIZE}px` }
|
|
5651
|
-
}
|
|
5652
|
-
);
|
|
5653
|
-
}
|
|
6213
|
+
var UnfilteredUploadInfotipDescription = () => /* @__PURE__ */ React85.createElement(React85.Fragment, null, (0, import_i18n35.__)("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React85.createElement("br", null), (0, import_i18n35.__)("file uploads.", "elementor"));
|
|
5654
6214
|
|
|
5655
6215
|
// src/controls/video-media-control.tsx
|
|
5656
|
-
var
|
|
6216
|
+
var React86 = __toESM(require("react"));
|
|
5657
6217
|
var import_editor_props36 = require("@elementor/editor-props");
|
|
5658
|
-
var
|
|
5659
|
-
var
|
|
6218
|
+
var import_icons23 = require("@elementor/icons");
|
|
6219
|
+
var import_ui68 = require("@elementor/ui");
|
|
5660
6220
|
var import_wp_media3 = require("@elementor/wp-media");
|
|
5661
|
-
var
|
|
6221
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
5662
6222
|
var PLACEHOLDER_IMAGE = window.elementorCommon?.config?.urls?.assets + "/shapes/play-triangle.svg";
|
|
5663
6223
|
var VideoMediaControl = createControl(() => {
|
|
5664
6224
|
const { value, setValue, propType } = useBoundProp(import_editor_props36.videoSrcPropTypeUtil);
|
|
@@ -5688,8 +6248,8 @@ var VideoMediaControl = createControl(() => {
|
|
|
5688
6248
|
});
|
|
5689
6249
|
}
|
|
5690
6250
|
});
|
|
5691
|
-
return /* @__PURE__ */
|
|
5692
|
-
|
|
6251
|
+
return /* @__PURE__ */ React86.createElement(ControlActions, null, /* @__PURE__ */ React86.createElement(import_ui68.Card, { variant: "outlined" }, /* @__PURE__ */ React86.createElement(
|
|
6252
|
+
import_ui68.CardMedia,
|
|
5693
6253
|
{
|
|
5694
6254
|
sx: {
|
|
5695
6255
|
height: 140,
|
|
@@ -5703,46 +6263,46 @@ var VideoMediaControl = createControl(() => {
|
|
|
5703
6263
|
alignItems: "center"
|
|
5704
6264
|
}
|
|
5705
6265
|
},
|
|
5706
|
-
/* @__PURE__ */
|
|
5707
|
-
), /* @__PURE__ */
|
|
5708
|
-
|
|
6266
|
+
/* @__PURE__ */ React86.createElement(VideoPreview, { isFetching, videoUrl })
|
|
6267
|
+
), /* @__PURE__ */ React86.createElement(import_ui68.CardOverlay, null, /* @__PURE__ */ React86.createElement(import_ui68.Stack, { gap: 1 }, /* @__PURE__ */ React86.createElement(
|
|
6268
|
+
import_ui68.Button,
|
|
5709
6269
|
{
|
|
5710
6270
|
size: "tiny",
|
|
5711
6271
|
color: "inherit",
|
|
5712
6272
|
variant: "outlined",
|
|
5713
6273
|
onClick: () => open({ mode: "browse" })
|
|
5714
6274
|
},
|
|
5715
|
-
(0,
|
|
5716
|
-
), /* @__PURE__ */
|
|
5717
|
-
|
|
6275
|
+
(0, import_i18n36.__)("Select video", "elementor")
|
|
6276
|
+
), /* @__PURE__ */ React86.createElement(
|
|
6277
|
+
import_ui68.Button,
|
|
5718
6278
|
{
|
|
5719
6279
|
size: "tiny",
|
|
5720
6280
|
variant: "text",
|
|
5721
6281
|
color: "inherit",
|
|
5722
|
-
startIcon: /* @__PURE__ */
|
|
6282
|
+
startIcon: /* @__PURE__ */ React86.createElement(import_icons23.UploadIcon, null),
|
|
5723
6283
|
onClick: () => open({ mode: "upload" })
|
|
5724
6284
|
},
|
|
5725
|
-
(0,
|
|
5726
|
-
), /* @__PURE__ */
|
|
5727
|
-
|
|
6285
|
+
(0, import_i18n36.__)("Upload", "elementor")
|
|
6286
|
+
), /* @__PURE__ */ React86.createElement(
|
|
6287
|
+
import_ui68.Button,
|
|
5728
6288
|
{
|
|
5729
6289
|
size: "tiny",
|
|
5730
6290
|
variant: "text",
|
|
5731
6291
|
color: "inherit",
|
|
5732
6292
|
onClick: () => open({ mode: "url", currentUrl: currentUrlForModal })
|
|
5733
6293
|
},
|
|
5734
|
-
(0,
|
|
6294
|
+
(0, import_i18n36.__)("Insert from URL", "elementor")
|
|
5735
6295
|
)))));
|
|
5736
6296
|
});
|
|
5737
6297
|
var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
5738
6298
|
if (isFetching) {
|
|
5739
|
-
return /* @__PURE__ */
|
|
6299
|
+
return /* @__PURE__ */ React86.createElement(import_ui68.CircularProgress, null);
|
|
5740
6300
|
}
|
|
5741
6301
|
if (videoUrl) {
|
|
5742
|
-
return /* @__PURE__ */
|
|
6302
|
+
return /* @__PURE__ */ React86.createElement(
|
|
5743
6303
|
"video",
|
|
5744
6304
|
{
|
|
5745
|
-
"aria-label": (0,
|
|
6305
|
+
"aria-label": (0, import_i18n36.__)("Video preview", "elementor"),
|
|
5746
6306
|
src: videoUrl,
|
|
5747
6307
|
muted: true,
|
|
5748
6308
|
preload: "metadata",
|
|
@@ -5755,30 +6315,30 @@ var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
|
5755
6315
|
}
|
|
5756
6316
|
);
|
|
5757
6317
|
}
|
|
5758
|
-
return /* @__PURE__ */
|
|
6318
|
+
return /* @__PURE__ */ React86.createElement("img", { src: PLACEHOLDER_IMAGE, alt: "No video selected" });
|
|
5759
6319
|
};
|
|
5760
6320
|
|
|
5761
6321
|
// src/controls/background-control/background-control.tsx
|
|
5762
|
-
var
|
|
6322
|
+
var React93 = __toESM(require("react"));
|
|
5763
6323
|
var import_editor_props42 = require("@elementor/editor-props");
|
|
5764
|
-
var
|
|
5765
|
-
var
|
|
6324
|
+
var import_ui76 = require("@elementor/ui");
|
|
6325
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
5766
6326
|
|
|
5767
6327
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
5768
|
-
var
|
|
6328
|
+
var React92 = __toESM(require("react"));
|
|
5769
6329
|
var import_editor_props41 = require("@elementor/editor-props");
|
|
5770
|
-
var
|
|
6330
|
+
var import_ui75 = require("@elementor/ui");
|
|
5771
6331
|
var import_wp_media4 = require("@elementor/wp-media");
|
|
5772
|
-
var
|
|
6332
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
5773
6333
|
|
|
5774
6334
|
// src/env.ts
|
|
5775
6335
|
var import_env = require("@elementor/env");
|
|
5776
6336
|
var { env } = (0, import_env.parseEnv)("@elementor/editor-controls");
|
|
5777
6337
|
|
|
5778
6338
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
5779
|
-
var
|
|
6339
|
+
var React87 = __toESM(require("react"));
|
|
5780
6340
|
var import_editor_props37 = require("@elementor/editor-props");
|
|
5781
|
-
var
|
|
6341
|
+
var import_ui69 = require("@elementor/ui");
|
|
5782
6342
|
var BackgroundGradientColorControl = createControl(() => {
|
|
5783
6343
|
const { value, setValue } = useBoundProp(import_editor_props37.backgroundGradientOverlayPropTypeUtil);
|
|
5784
6344
|
const handleChange = (newValue) => {
|
|
@@ -5816,8 +6376,8 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
5816
6376
|
positions: positions?.value.split(" ")
|
|
5817
6377
|
};
|
|
5818
6378
|
};
|
|
5819
|
-
return /* @__PURE__ */
|
|
5820
|
-
|
|
6379
|
+
return /* @__PURE__ */ React87.createElement(
|
|
6380
|
+
import_ui69.UnstableGradientBox,
|
|
5821
6381
|
{
|
|
5822
6382
|
sx: { width: "auto", padding: 1.5 },
|
|
5823
6383
|
value: normalizeValue(),
|
|
@@ -5841,53 +6401,53 @@ var initialBackgroundGradientOverlay = import_editor_props37.backgroundGradientO
|
|
|
5841
6401
|
});
|
|
5842
6402
|
|
|
5843
6403
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
5844
|
-
var
|
|
5845
|
-
var
|
|
5846
|
-
var
|
|
5847
|
-
var
|
|
6404
|
+
var React88 = __toESM(require("react"));
|
|
6405
|
+
var import_icons24 = require("@elementor/icons");
|
|
6406
|
+
var import_ui70 = require("@elementor/ui");
|
|
6407
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
5848
6408
|
var attachmentControlOptions = [
|
|
5849
6409
|
{
|
|
5850
6410
|
value: "fixed",
|
|
5851
|
-
label: (0,
|
|
5852
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6411
|
+
label: (0, import_i18n37.__)("Fixed", "elementor"),
|
|
6412
|
+
renderContent: ({ size }) => /* @__PURE__ */ React88.createElement(import_icons24.PinIcon, { fontSize: size }),
|
|
5853
6413
|
showTooltip: true
|
|
5854
6414
|
},
|
|
5855
6415
|
{
|
|
5856
6416
|
value: "scroll",
|
|
5857
|
-
label: (0,
|
|
5858
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6417
|
+
label: (0, import_i18n37.__)("Scroll", "elementor"),
|
|
6418
|
+
renderContent: ({ size }) => /* @__PURE__ */ React88.createElement(import_icons24.PinnedOffIcon, { fontSize: size }),
|
|
5859
6419
|
showTooltip: true
|
|
5860
6420
|
}
|
|
5861
6421
|
];
|
|
5862
6422
|
var BackgroundImageOverlayAttachment = () => {
|
|
5863
|
-
return /* @__PURE__ */
|
|
6423
|
+
return /* @__PURE__ */ React88.createElement(PopoverGridContainer, null, /* @__PURE__ */ React88.createElement(import_ui70.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React88.createElement(ControlFormLabel, null, (0, import_i18n37.__)("Attachment", "elementor"))), /* @__PURE__ */ React88.createElement(import_ui70.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React88.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
5864
6424
|
};
|
|
5865
6425
|
|
|
5866
6426
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
5867
|
-
var
|
|
5868
|
-
var
|
|
6427
|
+
var React89 = __toESM(require("react"));
|
|
6428
|
+
var import_react51 = require("react");
|
|
5869
6429
|
var import_editor_props38 = require("@elementor/editor-props");
|
|
5870
|
-
var
|
|
5871
|
-
var
|
|
5872
|
-
var
|
|
5873
|
-
var
|
|
6430
|
+
var import_editor_ui12 = require("@elementor/editor-ui");
|
|
6431
|
+
var import_icons25 = require("@elementor/icons");
|
|
6432
|
+
var import_ui71 = require("@elementor/ui");
|
|
6433
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
5874
6434
|
var backgroundPositionOptions = [
|
|
5875
|
-
{ label: (0,
|
|
5876
|
-
{ label: (0,
|
|
5877
|
-
{ label: (0,
|
|
5878
|
-
{ label: (0,
|
|
5879
|
-
{ label: (0,
|
|
5880
|
-
{ label: (0,
|
|
5881
|
-
{ label: (0,
|
|
5882
|
-
{ label: (0,
|
|
5883
|
-
{ label: (0,
|
|
5884
|
-
{ label: (0,
|
|
6435
|
+
{ label: (0, import_i18n38.__)("Center center", "elementor"), value: "center center" },
|
|
6436
|
+
{ label: (0, import_i18n38.__)("Center left", "elementor"), value: "center left" },
|
|
6437
|
+
{ label: (0, import_i18n38.__)("Center right", "elementor"), value: "center right" },
|
|
6438
|
+
{ label: (0, import_i18n38.__)("Top center", "elementor"), value: "top center" },
|
|
6439
|
+
{ label: (0, import_i18n38.__)("Top left", "elementor"), value: "top left" },
|
|
6440
|
+
{ label: (0, import_i18n38.__)("Top right", "elementor"), value: "top right" },
|
|
6441
|
+
{ label: (0, import_i18n38.__)("Bottom center", "elementor"), value: "bottom center" },
|
|
6442
|
+
{ label: (0, import_i18n38.__)("Bottom left", "elementor"), value: "bottom left" },
|
|
6443
|
+
{ label: (0, import_i18n38.__)("Bottom right", "elementor"), value: "bottom right" },
|
|
6444
|
+
{ label: (0, import_i18n38.__)("Custom", "elementor"), value: "custom" }
|
|
5885
6445
|
];
|
|
5886
6446
|
var BackgroundImageOverlayPosition = () => {
|
|
5887
6447
|
const backgroundImageOffsetContext = useBoundProp(import_editor_props38.backgroundImagePositionOffsetPropTypeUtil);
|
|
5888
6448
|
const stringPropContext = useBoundProp(import_editor_props38.stringPropTypeUtil);
|
|
5889
6449
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
5890
|
-
const rowRef = (0,
|
|
6450
|
+
const rowRef = (0, import_react51.useRef)(null);
|
|
5891
6451
|
const handlePositionChange = (event) => {
|
|
5892
6452
|
const value = event.target.value || null;
|
|
5893
6453
|
if (value === "custom") {
|
|
@@ -5896,8 +6456,8 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5896
6456
|
stringPropContext.setValue(value);
|
|
5897
6457
|
}
|
|
5898
6458
|
};
|
|
5899
|
-
return /* @__PURE__ */
|
|
5900
|
-
|
|
6459
|
+
return /* @__PURE__ */ React89.createElement(import_ui71.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React89.createElement(import_ui71.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(PopoverGridContainer, null, /* @__PURE__ */ React89.createElement(import_ui71.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React89.createElement(ControlFormLabel, null, (0, import_i18n38.__)("Position", "elementor"))), /* @__PURE__ */ React89.createElement(import_ui71.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React89.createElement(ControlActions, null, /* @__PURE__ */ React89.createElement(
|
|
6460
|
+
import_ui71.Select,
|
|
5901
6461
|
{
|
|
5902
6462
|
fullWidth: true,
|
|
5903
6463
|
size: "tiny",
|
|
@@ -5905,18 +6465,18 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5905
6465
|
disabled: stringPropContext.disabled,
|
|
5906
6466
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
5907
6467
|
},
|
|
5908
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
5909
|
-
))))), isCustom ? /* @__PURE__ */
|
|
6468
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React89.createElement(import_editor_ui12.MenuListItem, { key: value, value: value ?? "" }, label))
|
|
6469
|
+
))))), isCustom ? /* @__PURE__ */ React89.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React89.createElement(import_ui71.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(import_ui71.Grid, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React89.createElement(import_ui71.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React89.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React89.createElement(
|
|
5910
6470
|
SizeControl,
|
|
5911
6471
|
{
|
|
5912
|
-
startIcon: /* @__PURE__ */
|
|
6472
|
+
startIcon: /* @__PURE__ */ React89.createElement(import_icons25.LetterXIcon, { fontSize: "tiny" }),
|
|
5913
6473
|
anchorRef: rowRef,
|
|
5914
6474
|
min: -Number.MAX_SAFE_INTEGER
|
|
5915
6475
|
}
|
|
5916
|
-
))), /* @__PURE__ */
|
|
6476
|
+
))), /* @__PURE__ */ React89.createElement(import_ui71.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React89.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React89.createElement(
|
|
5917
6477
|
SizeControl,
|
|
5918
6478
|
{
|
|
5919
|
-
startIcon: /* @__PURE__ */
|
|
6479
|
+
startIcon: /* @__PURE__ */ React89.createElement(import_icons25.LetterYIcon, { fontSize: "tiny" }),
|
|
5920
6480
|
anchorRef: rowRef,
|
|
5921
6481
|
min: -Number.MAX_SAFE_INTEGER
|
|
5922
6482
|
}
|
|
@@ -5924,70 +6484,70 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5924
6484
|
};
|
|
5925
6485
|
|
|
5926
6486
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
5927
|
-
var
|
|
5928
|
-
var
|
|
5929
|
-
var
|
|
5930
|
-
var
|
|
6487
|
+
var React90 = __toESM(require("react"));
|
|
6488
|
+
var import_icons26 = require("@elementor/icons");
|
|
6489
|
+
var import_ui72 = require("@elementor/ui");
|
|
6490
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
5931
6491
|
var repeatControlOptions = [
|
|
5932
6492
|
{
|
|
5933
6493
|
value: "repeat",
|
|
5934
|
-
label: (0,
|
|
5935
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6494
|
+
label: (0, import_i18n39.__)("Repeat", "elementor"),
|
|
6495
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(import_icons26.GridDotsIcon, { fontSize: size }),
|
|
5936
6496
|
showTooltip: true
|
|
5937
6497
|
},
|
|
5938
6498
|
{
|
|
5939
6499
|
value: "repeat-x",
|
|
5940
|
-
label: (0,
|
|
5941
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6500
|
+
label: (0, import_i18n39.__)("Repeat-x", "elementor"),
|
|
6501
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(import_icons26.DotsHorizontalIcon, { fontSize: size }),
|
|
5942
6502
|
showTooltip: true
|
|
5943
6503
|
},
|
|
5944
6504
|
{
|
|
5945
6505
|
value: "repeat-y",
|
|
5946
|
-
label: (0,
|
|
5947
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6506
|
+
label: (0, import_i18n39.__)("Repeat-y", "elementor"),
|
|
6507
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(import_icons26.DotsVerticalIcon, { fontSize: size }),
|
|
5948
6508
|
showTooltip: true
|
|
5949
6509
|
},
|
|
5950
6510
|
{
|
|
5951
6511
|
value: "no-repeat",
|
|
5952
|
-
label: (0,
|
|
5953
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6512
|
+
label: (0, import_i18n39.__)("No-repeat", "elementor"),
|
|
6513
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(import_icons26.XIcon, { fontSize: size }),
|
|
5954
6514
|
showTooltip: true
|
|
5955
6515
|
}
|
|
5956
6516
|
];
|
|
5957
6517
|
var BackgroundImageOverlayRepeat = () => {
|
|
5958
|
-
return /* @__PURE__ */
|
|
6518
|
+
return /* @__PURE__ */ React90.createElement(PopoverGridContainer, null, /* @__PURE__ */ React90.createElement(import_ui72.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React90.createElement(ControlFormLabel, null, (0, import_i18n39.__)("Repeat", "elementor"))), /* @__PURE__ */ React90.createElement(import_ui72.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React90.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
5959
6519
|
};
|
|
5960
6520
|
|
|
5961
6521
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
5962
|
-
var
|
|
5963
|
-
var
|
|
6522
|
+
var React91 = __toESM(require("react"));
|
|
6523
|
+
var import_react52 = require("react");
|
|
5964
6524
|
var import_editor_props39 = require("@elementor/editor-props");
|
|
5965
|
-
var
|
|
5966
|
-
var
|
|
5967
|
-
var
|
|
6525
|
+
var import_icons27 = require("@elementor/icons");
|
|
6526
|
+
var import_ui73 = require("@elementor/ui");
|
|
6527
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
5968
6528
|
var sizeControlOptions = [
|
|
5969
6529
|
{
|
|
5970
6530
|
value: "auto",
|
|
5971
|
-
label: (0,
|
|
5972
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6531
|
+
label: (0, import_i18n40.__)("Auto", "elementor"),
|
|
6532
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(import_icons27.LetterAIcon, { fontSize: size }),
|
|
5973
6533
|
showTooltip: true
|
|
5974
6534
|
},
|
|
5975
6535
|
{
|
|
5976
6536
|
value: "cover",
|
|
5977
|
-
label: (0,
|
|
5978
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6537
|
+
label: (0, import_i18n40.__)("Cover", "elementor"),
|
|
6538
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(import_icons27.ArrowsMaximizeIcon, { fontSize: size }),
|
|
5979
6539
|
showTooltip: true
|
|
5980
6540
|
},
|
|
5981
6541
|
{
|
|
5982
6542
|
value: "contain",
|
|
5983
|
-
label: (0,
|
|
5984
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6543
|
+
label: (0, import_i18n40.__)("Contain", "elementor"),
|
|
6544
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(import_icons27.ArrowBarBothIcon, { fontSize: size }),
|
|
5985
6545
|
showTooltip: true
|
|
5986
6546
|
},
|
|
5987
6547
|
{
|
|
5988
6548
|
value: "custom",
|
|
5989
|
-
label: (0,
|
|
5990
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6549
|
+
label: (0, import_i18n40.__)("Custom", "elementor"),
|
|
6550
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(import_icons27.PencilIcon, { fontSize: size }),
|
|
5991
6551
|
showTooltip: true
|
|
5992
6552
|
}
|
|
5993
6553
|
];
|
|
@@ -5995,7 +6555,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5995
6555
|
const backgroundImageScaleContext = useBoundProp(import_editor_props39.backgroundImageSizeScalePropTypeUtil);
|
|
5996
6556
|
const stringPropContext = useBoundProp(import_editor_props39.stringPropTypeUtil);
|
|
5997
6557
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
5998
|
-
const rowRef = (0,
|
|
6558
|
+
const rowRef = (0, import_react52.useRef)(null);
|
|
5999
6559
|
const handleSizeChange = (size) => {
|
|
6000
6560
|
if (size === "custom") {
|
|
6001
6561
|
backgroundImageScaleContext.setValue({ width: null, height: null });
|
|
@@ -6003,7 +6563,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
6003
6563
|
stringPropContext.setValue(size);
|
|
6004
6564
|
}
|
|
6005
6565
|
};
|
|
6006
|
-
return /* @__PURE__ */
|
|
6566
|
+
return /* @__PURE__ */ React91.createElement(import_ui73.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React91.createElement(import_ui73.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React91.createElement(PopoverGridContainer, null, /* @__PURE__ */ React91.createElement(import_ui73.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, (0, import_i18n40.__)("Size", "elementor"))), /* @__PURE__ */ React91.createElement(import_ui73.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React91.createElement(
|
|
6007
6567
|
ControlToggleButtonGroup,
|
|
6008
6568
|
{
|
|
6009
6569
|
exclusive: true,
|
|
@@ -6012,17 +6572,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
6012
6572
|
disabled: stringPropContext.disabled,
|
|
6013
6573
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
6014
6574
|
}
|
|
6015
|
-
)))), isCustom ? /* @__PURE__ */
|
|
6575
|
+
)))), isCustom ? /* @__PURE__ */ React91.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React91.createElement(import_ui73.Grid, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React91.createElement(PopoverGridContainer, null, /* @__PURE__ */ React91.createElement(import_ui73.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React91.createElement(
|
|
6016
6576
|
SizeControl,
|
|
6017
6577
|
{
|
|
6018
|
-
startIcon: /* @__PURE__ */
|
|
6578
|
+
startIcon: /* @__PURE__ */ React91.createElement(import_icons27.ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
|
|
6019
6579
|
extendedOptions: ["auto"],
|
|
6020
6580
|
anchorRef: rowRef
|
|
6021
6581
|
}
|
|
6022
|
-
))), /* @__PURE__ */
|
|
6582
|
+
))), /* @__PURE__ */ React91.createElement(import_ui73.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React91.createElement(
|
|
6023
6583
|
SizeControl,
|
|
6024
6584
|
{
|
|
6025
|
-
startIcon: /* @__PURE__ */
|
|
6585
|
+
startIcon: /* @__PURE__ */ React91.createElement(import_icons27.ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
|
|
6026
6586
|
extendedOptions: ["auto"],
|
|
6027
6587
|
anchorRef: rowRef
|
|
6028
6588
|
}
|
|
@@ -6030,9 +6590,9 @@ var BackgroundImageOverlaySize = () => {
|
|
|
6030
6590
|
};
|
|
6031
6591
|
|
|
6032
6592
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
6033
|
-
var
|
|
6593
|
+
var import_react53 = require("react");
|
|
6034
6594
|
var import_editor_props40 = require("@elementor/editor-props");
|
|
6035
|
-
var
|
|
6595
|
+
var import_ui74 = require("@elementor/ui");
|
|
6036
6596
|
var useBackgroundTabsHistory = ({
|
|
6037
6597
|
color: initialBackgroundColorOverlay2,
|
|
6038
6598
|
image: initialBackgroundImageOverlay,
|
|
@@ -6050,8 +6610,8 @@ var useBackgroundTabsHistory = ({
|
|
|
6050
6610
|
}
|
|
6051
6611
|
return "image";
|
|
6052
6612
|
};
|
|
6053
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
6054
|
-
const valuesHistory = (0,
|
|
6613
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui74.useTabs)(getCurrentOverlayType());
|
|
6614
|
+
const valuesHistory = (0, import_react53.useRef)({
|
|
6055
6615
|
image: initialBackgroundImageOverlay,
|
|
6056
6616
|
color: initialBackgroundColorOverlay2,
|
|
6057
6617
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -6119,29 +6679,29 @@ var getInitialBackgroundOverlay = () => ({
|
|
|
6119
6679
|
}
|
|
6120
6680
|
});
|
|
6121
6681
|
var backgroundResolutionOptions = [
|
|
6122
|
-
{ label: (0,
|
|
6123
|
-
{ label: (0,
|
|
6124
|
-
{ label: (0,
|
|
6125
|
-
{ label: (0,
|
|
6682
|
+
{ label: (0, import_i18n41.__)("Thumbnail - 150 x 150", "elementor"), value: "thumbnail" },
|
|
6683
|
+
{ label: (0, import_i18n41.__)("Medium - 300 x 300", "elementor"), value: "medium" },
|
|
6684
|
+
{ label: (0, import_i18n41.__)("Large 1024 x 1024", "elementor"), value: "large" },
|
|
6685
|
+
{ label: (0, import_i18n41.__)("Full", "elementor"), value: "full" }
|
|
6126
6686
|
];
|
|
6127
6687
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
6128
6688
|
const { propType, value: overlayValues, setValue } = useBoundProp(import_editor_props41.backgroundOverlayPropTypeUtil);
|
|
6129
|
-
return /* @__PURE__ */
|
|
6689
|
+
return /* @__PURE__ */ React92.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React92.createElement(
|
|
6130
6690
|
ControlRepeater,
|
|
6131
6691
|
{
|
|
6132
6692
|
initial: getInitialBackgroundOverlay(),
|
|
6133
6693
|
propTypeUtil: import_editor_props41.backgroundOverlayPropTypeUtil
|
|
6134
6694
|
},
|
|
6135
|
-
/* @__PURE__ */
|
|
6136
|
-
/* @__PURE__ */
|
|
6695
|
+
/* @__PURE__ */ React92.createElement(RepeaterHeader, { label: (0, import_i18n41.__)("Overlay", "elementor") }, /* @__PURE__ */ React92.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
6696
|
+
/* @__PURE__ */ React92.createElement(ItemsContainer, null, /* @__PURE__ */ React92.createElement(
|
|
6137
6697
|
Item,
|
|
6138
6698
|
{
|
|
6139
6699
|
Icon: ItemIcon2,
|
|
6140
6700
|
Label: ItemLabel3,
|
|
6141
|
-
actions: /* @__PURE__ */
|
|
6701
|
+
actions: /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(DuplicateItemAction, null), /* @__PURE__ */ React92.createElement(DisableItemAction, null), /* @__PURE__ */ React92.createElement(RemoveItemAction, null))
|
|
6142
6702
|
}
|
|
6143
6703
|
)),
|
|
6144
|
-
/* @__PURE__ */
|
|
6704
|
+
/* @__PURE__ */ React92.createElement(EditItemPopover, null, /* @__PURE__ */ React92.createElement(ItemContent2, null))
|
|
6145
6705
|
));
|
|
6146
6706
|
});
|
|
6147
6707
|
var ItemContent2 = () => {
|
|
@@ -6151,27 +6711,27 @@ var ItemContent2 = () => {
|
|
|
6151
6711
|
gradient: initialBackgroundGradientOverlay.value
|
|
6152
6712
|
});
|
|
6153
6713
|
const { rowRef } = useRepeaterContext();
|
|
6154
|
-
return /* @__PURE__ */
|
|
6155
|
-
|
|
6714
|
+
return /* @__PURE__ */ React92.createElement(import_ui75.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React92.createElement(import_ui75.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React92.createElement(
|
|
6715
|
+
import_ui75.Tabs,
|
|
6156
6716
|
{
|
|
6157
6717
|
size: "small",
|
|
6158
6718
|
variant: "fullWidth",
|
|
6159
6719
|
...getTabsProps(),
|
|
6160
|
-
"aria-label": (0,
|
|
6720
|
+
"aria-label": (0, import_i18n41.__)("Background Overlay", "elementor")
|
|
6161
6721
|
},
|
|
6162
|
-
/* @__PURE__ */
|
|
6163
|
-
/* @__PURE__ */
|
|
6164
|
-
/* @__PURE__ */
|
|
6165
|
-
)), /* @__PURE__ */
|
|
6722
|
+
/* @__PURE__ */ React92.createElement(import_ui75.Tab, { label: (0, import_i18n41.__)("Image", "elementor"), ...getTabProps("image") }),
|
|
6723
|
+
/* @__PURE__ */ React92.createElement(import_ui75.Tab, { label: (0, import_i18n41.__)("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
6724
|
+
/* @__PURE__ */ React92.createElement(import_ui75.Tab, { label: (0, import_i18n41.__)("Color", "elementor"), ...getTabProps("color") })
|
|
6725
|
+
)), /* @__PURE__ */ React92.createElement(import_ui75.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React92.createElement(PopoverContent, null, /* @__PURE__ */ React92.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React92.createElement(import_ui75.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React92.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React92.createElement(import_ui75.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React92.createElement(PopoverContent, null, /* @__PURE__ */ React92.createElement(ColorOverlayContent, { anchorEl: rowRef }))));
|
|
6166
6726
|
};
|
|
6167
6727
|
var ItemIcon2 = ({ value }) => {
|
|
6168
6728
|
switch (value.$$type) {
|
|
6169
6729
|
case "background-image-overlay":
|
|
6170
|
-
return /* @__PURE__ */
|
|
6730
|
+
return /* @__PURE__ */ React92.createElement(ItemIconImage, { value });
|
|
6171
6731
|
case "background-color-overlay":
|
|
6172
|
-
return /* @__PURE__ */
|
|
6732
|
+
return /* @__PURE__ */ React92.createElement(ItemIconColor, { value });
|
|
6173
6733
|
case "background-gradient-overlay":
|
|
6174
|
-
return /* @__PURE__ */
|
|
6734
|
+
return /* @__PURE__ */ React92.createElement(ItemIconGradient, { value });
|
|
6175
6735
|
default:
|
|
6176
6736
|
return null;
|
|
6177
6737
|
}
|
|
@@ -6184,12 +6744,12 @@ var extractColorFrom = (prop) => {
|
|
|
6184
6744
|
};
|
|
6185
6745
|
var ItemIconColor = ({ value: prop }) => {
|
|
6186
6746
|
const color = extractColorFrom(prop);
|
|
6187
|
-
return /* @__PURE__ */
|
|
6747
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: color });
|
|
6188
6748
|
};
|
|
6189
6749
|
var ItemIconImage = ({ value }) => {
|
|
6190
6750
|
const { imageUrl } = useImage(value);
|
|
6191
|
-
return /* @__PURE__ */
|
|
6192
|
-
|
|
6751
|
+
return /* @__PURE__ */ React92.createElement(
|
|
6752
|
+
import_ui75.CardMedia,
|
|
6193
6753
|
{
|
|
6194
6754
|
image: imageUrl,
|
|
6195
6755
|
sx: (theme) => ({
|
|
@@ -6203,43 +6763,43 @@ var ItemIconImage = ({ value }) => {
|
|
|
6203
6763
|
};
|
|
6204
6764
|
var ItemIconGradient = ({ value }) => {
|
|
6205
6765
|
const gradient = getGradientValue(value);
|
|
6206
|
-
return /* @__PURE__ */
|
|
6766
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: gradient });
|
|
6207
6767
|
};
|
|
6208
6768
|
var ItemLabel3 = ({ value }) => {
|
|
6209
6769
|
switch (value.$$type) {
|
|
6210
6770
|
case "background-image-overlay":
|
|
6211
|
-
return /* @__PURE__ */
|
|
6771
|
+
return /* @__PURE__ */ React92.createElement(ItemLabelImage, { value });
|
|
6212
6772
|
case "background-color-overlay":
|
|
6213
|
-
return /* @__PURE__ */
|
|
6773
|
+
return /* @__PURE__ */ React92.createElement(ItemLabelColor, { value });
|
|
6214
6774
|
case "background-gradient-overlay":
|
|
6215
|
-
return /* @__PURE__ */
|
|
6775
|
+
return /* @__PURE__ */ React92.createElement(ItemLabelGradient, { value });
|
|
6216
6776
|
default:
|
|
6217
6777
|
return null;
|
|
6218
6778
|
}
|
|
6219
6779
|
};
|
|
6220
6780
|
var ItemLabelColor = ({ value: prop }) => {
|
|
6221
6781
|
const color = extractColorFrom(prop);
|
|
6222
|
-
return /* @__PURE__ */
|
|
6782
|
+
return /* @__PURE__ */ React92.createElement("span", null, color);
|
|
6223
6783
|
};
|
|
6224
6784
|
var ItemLabelImage = ({ value }) => {
|
|
6225
6785
|
const { imageTitle } = useImage(value);
|
|
6226
|
-
return /* @__PURE__ */
|
|
6786
|
+
return /* @__PURE__ */ React92.createElement("span", null, imageTitle);
|
|
6227
6787
|
};
|
|
6228
6788
|
var ItemLabelGradient = ({ value }) => {
|
|
6229
6789
|
if (value.value.type.value === "linear") {
|
|
6230
|
-
return /* @__PURE__ */
|
|
6790
|
+
return /* @__PURE__ */ React92.createElement("span", null, (0, import_i18n41.__)("Linear Gradient", "elementor"));
|
|
6231
6791
|
}
|
|
6232
|
-
return /* @__PURE__ */
|
|
6792
|
+
return /* @__PURE__ */ React92.createElement("span", null, (0, import_i18n41.__)("Radial Gradient", "elementor"));
|
|
6233
6793
|
};
|
|
6234
6794
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
6235
6795
|
const propContext = useBoundProp(import_editor_props41.backgroundColorOverlayPropTypeUtil);
|
|
6236
|
-
return /* @__PURE__ */
|
|
6796
|
+
return /* @__PURE__ */ React92.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React92.createElement(ColorControl, { anchorEl })));
|
|
6237
6797
|
};
|
|
6238
6798
|
var ImageOverlayContent = () => {
|
|
6239
6799
|
const propContext = useBoundProp(import_editor_props41.backgroundImageOverlayPropTypeUtil);
|
|
6240
|
-
return /* @__PURE__ */
|
|
6800
|
+
return /* @__PURE__ */ React92.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React92.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React92.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React92.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React92.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React92.createElement(BackgroundImageOverlayAttachment, null)));
|
|
6241
6801
|
};
|
|
6242
|
-
var StyledUnstableColorIndicator3 = (0,
|
|
6802
|
+
var StyledUnstableColorIndicator3 = (0, import_ui75.styled)(import_ui75.UnstableColorIndicator)(({ theme }) => ({
|
|
6243
6803
|
height: "1rem",
|
|
6244
6804
|
width: "1rem",
|
|
6245
6805
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -6278,29 +6838,29 @@ var getGradientValue = (value) => {
|
|
|
6278
6838
|
|
|
6279
6839
|
// src/controls/background-control/background-control.tsx
|
|
6280
6840
|
var clipOptions = [
|
|
6281
|
-
{ label: (0,
|
|
6282
|
-
{ label: (0,
|
|
6283
|
-
{ label: (0,
|
|
6284
|
-
{ label: (0,
|
|
6841
|
+
{ label: (0, import_i18n42.__)("Full element", "elementor"), value: "border-box" },
|
|
6842
|
+
{ label: (0, import_i18n42.__)("Padding edges", "elementor"), value: "padding-box" },
|
|
6843
|
+
{ label: (0, import_i18n42.__)("Content edges", "elementor"), value: "content-box" },
|
|
6844
|
+
{ label: (0, import_i18n42.__)("Text", "elementor"), value: "text" }
|
|
6285
6845
|
];
|
|
6286
|
-
var colorLabel = (0,
|
|
6287
|
-
var clipLabel = (0,
|
|
6846
|
+
var colorLabel = (0, import_i18n42.__)("Color", "elementor");
|
|
6847
|
+
var clipLabel = (0, import_i18n42.__)("Clipping", "elementor");
|
|
6288
6848
|
var BackgroundControl = createControl(() => {
|
|
6289
6849
|
const propContext = useBoundProp(import_editor_props42.backgroundPropTypeUtil);
|
|
6290
|
-
return /* @__PURE__ */
|
|
6850
|
+
return /* @__PURE__ */ React93.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React93.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React93.createElement(BackgroundColorField, null), /* @__PURE__ */ React93.createElement(BackgroundClipField, null));
|
|
6291
6851
|
});
|
|
6292
6852
|
var BackgroundColorField = () => {
|
|
6293
|
-
return /* @__PURE__ */
|
|
6853
|
+
return /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React93.createElement(import_ui76.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React93.createElement(import_ui76.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ControlLabel, null, colorLabel)), /* @__PURE__ */ React93.createElement(import_ui76.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ColorControl, null))));
|
|
6294
6854
|
};
|
|
6295
6855
|
var BackgroundClipField = () => {
|
|
6296
|
-
return /* @__PURE__ */
|
|
6856
|
+
return /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "clip" }, /* @__PURE__ */ React93.createElement(import_ui76.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React93.createElement(import_ui76.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ControlLabel, null, clipLabel)), /* @__PURE__ */ React93.createElement(import_ui76.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(SelectControl, { options: clipOptions }))));
|
|
6297
6857
|
};
|
|
6298
6858
|
|
|
6299
6859
|
// src/controls/repeatable-control.tsx
|
|
6300
|
-
var
|
|
6301
|
-
var
|
|
6860
|
+
var React94 = __toESM(require("react"));
|
|
6861
|
+
var import_react54 = require("react");
|
|
6302
6862
|
var import_editor_props43 = require("@elementor/editor-props");
|
|
6303
|
-
var
|
|
6863
|
+
var import_ui77 = require("@elementor/ui");
|
|
6304
6864
|
var PLACEHOLDER_REGEX = /\$\{([^}]+)\}/g;
|
|
6305
6865
|
var RepeatableControl = createControl(
|
|
6306
6866
|
({
|
|
@@ -6319,11 +6879,11 @@ var RepeatableControl = createControl(
|
|
|
6319
6879
|
if (!childPropTypeUtil) {
|
|
6320
6880
|
return null;
|
|
6321
6881
|
}
|
|
6322
|
-
const childArrayPropTypeUtil2 = (0,
|
|
6882
|
+
const childArrayPropTypeUtil2 = (0, import_react54.useMemo)(
|
|
6323
6883
|
() => (0, import_editor_props43.createArrayPropUtils)(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
|
|
6324
6884
|
[childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
|
|
6325
6885
|
);
|
|
6326
|
-
const contextValue = (0,
|
|
6886
|
+
const contextValue = (0, import_react54.useMemo)(
|
|
6327
6887
|
() => ({
|
|
6328
6888
|
...childControlConfig,
|
|
6329
6889
|
placeholder: placeholder || "",
|
|
@@ -6333,14 +6893,14 @@ var RepeatableControl = createControl(
|
|
|
6333
6893
|
);
|
|
6334
6894
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil2);
|
|
6335
6895
|
const newItemIndex = addItemTooltipProps?.newItemIndex === null ? void 0 : 0;
|
|
6336
|
-
return /* @__PURE__ */
|
|
6896
|
+
return /* @__PURE__ */ React94.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React94.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React94.createElement(
|
|
6337
6897
|
ControlRepeater,
|
|
6338
6898
|
{
|
|
6339
6899
|
initial: childPropTypeUtil.create(initialValues || null),
|
|
6340
6900
|
propTypeUtil: childArrayPropTypeUtil2,
|
|
6341
6901
|
isItemDisabled: isItemDisabled2
|
|
6342
6902
|
},
|
|
6343
|
-
/* @__PURE__ */
|
|
6903
|
+
/* @__PURE__ */ React94.createElement(RepeaterHeader, { label: repeaterLabel }, /* @__PURE__ */ React94.createElement(
|
|
6344
6904
|
TooltipAddItemAction,
|
|
6345
6905
|
{
|
|
6346
6906
|
...addItemTooltipProps,
|
|
@@ -6348,22 +6908,22 @@ var RepeatableControl = createControl(
|
|
|
6348
6908
|
ariaLabel: repeaterLabel
|
|
6349
6909
|
}
|
|
6350
6910
|
)),
|
|
6351
|
-
/* @__PURE__ */
|
|
6911
|
+
/* @__PURE__ */ React94.createElement(ItemsContainer, { isSortable }, /* @__PURE__ */ React94.createElement(
|
|
6352
6912
|
Item,
|
|
6353
6913
|
{
|
|
6354
6914
|
Icon: ItemIcon3,
|
|
6355
6915
|
Label: ItemLabel4,
|
|
6356
|
-
actions: /* @__PURE__ */
|
|
6916
|
+
actions: /* @__PURE__ */ React94.createElement(React94.Fragment, null, showDuplicate && /* @__PURE__ */ React94.createElement(DuplicateItemAction, null), showToggle && /* @__PURE__ */ React94.createElement(DisableItemAction, null), /* @__PURE__ */ React94.createElement(RemoveItemAction, null))
|
|
6357
6917
|
}
|
|
6358
6918
|
)),
|
|
6359
|
-
/* @__PURE__ */
|
|
6919
|
+
/* @__PURE__ */ React94.createElement(EditItemPopover, null, /* @__PURE__ */ React94.createElement(Content2, null))
|
|
6360
6920
|
)));
|
|
6361
6921
|
}
|
|
6362
6922
|
);
|
|
6363
|
-
var ItemIcon3 = () => /* @__PURE__ */
|
|
6923
|
+
var ItemIcon3 = () => /* @__PURE__ */ React94.createElement(React94.Fragment, null);
|
|
6364
6924
|
var Content2 = () => {
|
|
6365
6925
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
6366
|
-
return /* @__PURE__ */
|
|
6926
|
+
return /* @__PURE__ */ React94.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React94.createElement(PopoverGridContainer, null, /* @__PURE__ */ React94.createElement(ChildControl, { ...props })));
|
|
6367
6927
|
};
|
|
6368
6928
|
var interpolate = (template, data) => {
|
|
6369
6929
|
if (!data) {
|
|
@@ -6446,7 +7006,7 @@ var ItemLabel4 = ({ value }) => {
|
|
|
6446
7006
|
const label = showPlaceholder ? placeholder : interpolate(patternLabel, value);
|
|
6447
7007
|
const isReadOnly = !!childProps?.readOnly;
|
|
6448
7008
|
const color = getTextColor(isReadOnly, showPlaceholder);
|
|
6449
|
-
return /* @__PURE__ */
|
|
7009
|
+
return /* @__PURE__ */ React94.createElement(import_ui77.Box, { component: "span", color }, label);
|
|
6450
7010
|
};
|
|
6451
7011
|
var getAllProperties = (pattern) => {
|
|
6452
7012
|
const properties = pattern.match(PLACEHOLDER_REGEX)?.map((match) => match.slice(2, -1)) || [];
|
|
@@ -6454,11 +7014,11 @@ var getAllProperties = (pattern) => {
|
|
|
6454
7014
|
};
|
|
6455
7015
|
|
|
6456
7016
|
// src/controls/key-value-control.tsx
|
|
6457
|
-
var
|
|
6458
|
-
var
|
|
7017
|
+
var React95 = __toESM(require("react"));
|
|
7018
|
+
var import_react55 = require("react");
|
|
6459
7019
|
var import_editor_props44 = require("@elementor/editor-props");
|
|
6460
|
-
var
|
|
6461
|
-
var
|
|
7020
|
+
var import_ui78 = require("@elementor/ui");
|
|
7021
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
6462
7022
|
|
|
6463
7023
|
// src/utils/escape-html-attr.ts
|
|
6464
7024
|
var escapeHtmlAttr = (value) => {
|
|
@@ -6482,23 +7042,23 @@ var getInitialFieldValue = (fieldValue) => {
|
|
|
6482
7042
|
};
|
|
6483
7043
|
var KeyValueControl = createControl((props = {}) => {
|
|
6484
7044
|
const { value, setValue, ...propContext } = useBoundProp(import_editor_props44.keyValuePropTypeUtil);
|
|
6485
|
-
const [keyError, setKeyError] = (0,
|
|
6486
|
-
const [valueError, setValueError] = (0,
|
|
6487
|
-
const [sessionState, setSessionState] = (0,
|
|
7045
|
+
const [keyError, setKeyError] = (0, import_react55.useState)("");
|
|
7046
|
+
const [valueError, setValueError] = (0, import_react55.useState)("");
|
|
7047
|
+
const [sessionState, setSessionState] = (0, import_react55.useState)({
|
|
6488
7048
|
key: getInitialFieldValue(value?.key),
|
|
6489
7049
|
value: getInitialFieldValue(value?.value)
|
|
6490
7050
|
});
|
|
6491
|
-
const keyLabel = props.keyName || (0,
|
|
6492
|
-
const valueLabel = props.valueName || (0,
|
|
7051
|
+
const keyLabel = props.keyName || (0, import_i18n43.__)("Key", "elementor");
|
|
7052
|
+
const valueLabel = props.valueName || (0, import_i18n43.__)("Value", "elementor");
|
|
6493
7053
|
const { keyHelper, valueHelper } = props.getHelperText?.(sessionState.key, sessionState.value) || {
|
|
6494
7054
|
keyHelper: void 0,
|
|
6495
7055
|
valueHelper: void 0
|
|
6496
7056
|
};
|
|
6497
|
-
const [keyRegex, valueRegex, errMsg] = (0,
|
|
7057
|
+
const [keyRegex, valueRegex, errMsg] = (0, import_react55.useMemo)(
|
|
6498
7058
|
() => [
|
|
6499
7059
|
props.regexKey ? new RegExp(props.regexKey) : void 0,
|
|
6500
7060
|
props.regexValue ? new RegExp(props.regexValue) : void 0,
|
|
6501
|
-
props.validationErrorMessage || (0,
|
|
7061
|
+
props.validationErrorMessage || (0, import_i18n43.__)("Invalid Format", "elementor")
|
|
6502
7062
|
],
|
|
6503
7063
|
[props.regexKey, props.regexValue, props.validationErrorMessage]
|
|
6504
7064
|
);
|
|
@@ -6547,14 +7107,14 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6547
7107
|
});
|
|
6548
7108
|
}
|
|
6549
7109
|
};
|
|
6550
|
-
return /* @__PURE__ */
|
|
7110
|
+
return /* @__PURE__ */ React95.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React95.createElement(import_ui78.Grid, { container: true, gap: 1.5 }, /* @__PURE__ */ React95.createElement(import_ui78.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React95.createElement(import_ui78.FormLabel, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React95.createElement(
|
|
6551
7111
|
TextControl,
|
|
6552
7112
|
{
|
|
6553
7113
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.key) : sessionState.key,
|
|
6554
7114
|
error: !!keyError,
|
|
6555
7115
|
helperText: keyHelper
|
|
6556
7116
|
}
|
|
6557
|
-
)), !!keyError && /* @__PURE__ */
|
|
7117
|
+
)), !!keyError && /* @__PURE__ */ React95.createElement(import_ui78.FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React95.createElement(import_ui78.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React95.createElement(import_ui78.FormLabel, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React95.createElement(
|
|
6558
7118
|
TextControl,
|
|
6559
7119
|
{
|
|
6560
7120
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.value) : sessionState.value,
|
|
@@ -6562,27 +7122,27 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6562
7122
|
inputDisabled: !!keyError,
|
|
6563
7123
|
helperText: valueHelper
|
|
6564
7124
|
}
|
|
6565
|
-
)), !!valueError && /* @__PURE__ */
|
|
7125
|
+
)), !!valueError && /* @__PURE__ */ React95.createElement(import_ui78.FormHelperText, { error: true }, valueError))));
|
|
6566
7126
|
});
|
|
6567
7127
|
|
|
6568
7128
|
// src/controls/position-control.tsx
|
|
6569
|
-
var
|
|
7129
|
+
var React96 = __toESM(require("react"));
|
|
6570
7130
|
var import_editor_props45 = require("@elementor/editor-props");
|
|
6571
|
-
var
|
|
6572
|
-
var
|
|
6573
|
-
var
|
|
6574
|
-
var
|
|
7131
|
+
var import_editor_ui13 = require("@elementor/editor-ui");
|
|
7132
|
+
var import_icons28 = require("@elementor/icons");
|
|
7133
|
+
var import_ui79 = require("@elementor/ui");
|
|
7134
|
+
var import_i18n44 = require("@wordpress/i18n");
|
|
6575
7135
|
var positionOptions = [
|
|
6576
|
-
{ label: (0,
|
|
6577
|
-
{ label: (0,
|
|
6578
|
-
{ label: (0,
|
|
6579
|
-
{ label: (0,
|
|
6580
|
-
{ label: (0,
|
|
6581
|
-
{ label: (0,
|
|
6582
|
-
{ label: (0,
|
|
6583
|
-
{ label: (0,
|
|
6584
|
-
{ label: (0,
|
|
6585
|
-
{ label: (0,
|
|
7136
|
+
{ label: (0, import_i18n44.__)("Center center", "elementor"), value: "center center" },
|
|
7137
|
+
{ label: (0, import_i18n44.__)("Center left", "elementor"), value: "center left" },
|
|
7138
|
+
{ label: (0, import_i18n44.__)("Center right", "elementor"), value: "center right" },
|
|
7139
|
+
{ label: (0, import_i18n44.__)("Top center", "elementor"), value: "top center" },
|
|
7140
|
+
{ label: (0, import_i18n44.__)("Top left", "elementor"), value: "top left" },
|
|
7141
|
+
{ label: (0, import_i18n44.__)("Top right", "elementor"), value: "top right" },
|
|
7142
|
+
{ label: (0, import_i18n44.__)("Bottom center", "elementor"), value: "bottom center" },
|
|
7143
|
+
{ label: (0, import_i18n44.__)("Bottom left", "elementor"), value: "bottom left" },
|
|
7144
|
+
{ label: (0, import_i18n44.__)("Bottom right", "elementor"), value: "bottom right" },
|
|
7145
|
+
{ label: (0, import_i18n44.__)("Custom", "elementor"), value: "custom" }
|
|
6586
7146
|
];
|
|
6587
7147
|
var PositionControl = () => {
|
|
6588
7148
|
const positionContext = useBoundProp(import_editor_props45.positionPropTypeUtil);
|
|
@@ -6597,8 +7157,8 @@ var PositionControl = () => {
|
|
|
6597
7157
|
stringPropContext.setValue(value);
|
|
6598
7158
|
}
|
|
6599
7159
|
};
|
|
6600
|
-
return /* @__PURE__ */
|
|
6601
|
-
|
|
7160
|
+
return /* @__PURE__ */ React96.createElement(import_ui79.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React96.createElement(import_ui79.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React96.createElement(import_ui79.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React96.createElement(import_ui79.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(ControlFormLabel, null, (0, import_i18n44.__)("Object position", "elementor"))), /* @__PURE__ */ React96.createElement(import_ui79.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React96.createElement(
|
|
7161
|
+
import_ui79.Select,
|
|
6602
7162
|
{
|
|
6603
7163
|
size: "tiny",
|
|
6604
7164
|
displayEmpty: true,
|
|
@@ -6608,29 +7168,29 @@ var PositionControl = () => {
|
|
|
6608
7168
|
renderValue: (selectedValue) => getSelectRenderValue(positionOptions, placeholder, selectedValue),
|
|
6609
7169
|
fullWidth: true
|
|
6610
7170
|
},
|
|
6611
|
-
positionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
6612
|
-
)))), isCustom && /* @__PURE__ */
|
|
7171
|
+
positionOptions.map(({ label, value }) => /* @__PURE__ */ React96.createElement(import_editor_ui13.MenuListItem, { key: value, value: value ?? "" }, label))
|
|
7172
|
+
)))), isCustom && /* @__PURE__ */ React96.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React96.createElement(import_ui79.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React96.createElement(import_ui79.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React96.createElement(import_ui79.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React96.createElement(
|
|
6613
7173
|
SizeControl,
|
|
6614
7174
|
{
|
|
6615
|
-
startIcon: /* @__PURE__ */
|
|
7175
|
+
startIcon: /* @__PURE__ */ React96.createElement(import_icons28.LetterXIcon, { fontSize: "tiny" }),
|
|
6616
7176
|
min: -Number.MAX_SAFE_INTEGER
|
|
6617
7177
|
}
|
|
6618
|
-
))), /* @__PURE__ */
|
|
7178
|
+
))), /* @__PURE__ */ React96.createElement(import_ui79.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React96.createElement(
|
|
6619
7179
|
SizeControl,
|
|
6620
7180
|
{
|
|
6621
|
-
startIcon: /* @__PURE__ */
|
|
7181
|
+
startIcon: /* @__PURE__ */ React96.createElement(import_icons28.LetterYIcon, { fontSize: "tiny" }),
|
|
6622
7182
|
min: -Number.MAX_SAFE_INTEGER
|
|
6623
7183
|
}
|
|
6624
7184
|
)))))));
|
|
6625
7185
|
};
|
|
6626
7186
|
|
|
6627
7187
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
6628
|
-
var
|
|
6629
|
-
var
|
|
7188
|
+
var React109 = __toESM(require("react"));
|
|
7189
|
+
var import_react63 = require("react");
|
|
6630
7190
|
var import_editor_props54 = require("@elementor/editor-props");
|
|
6631
|
-
var
|
|
6632
|
-
var
|
|
6633
|
-
var
|
|
7191
|
+
var import_icons35 = require("@elementor/icons");
|
|
7192
|
+
var import_ui92 = require("@elementor/ui");
|
|
7193
|
+
var import_i18n54 = require("@wordpress/i18n");
|
|
6634
7194
|
|
|
6635
7195
|
// src/controls/transform-control/initial-values.ts
|
|
6636
7196
|
var import_editor_props46 = require("@elementor/editor-props");
|
|
@@ -6679,24 +7239,24 @@ var initialSkewValue = import_editor_props46.skewTransformPropTypeUtil.create({
|
|
|
6679
7239
|
});
|
|
6680
7240
|
|
|
6681
7241
|
// src/controls/transform-control/transform-content.tsx
|
|
6682
|
-
var
|
|
6683
|
-
var
|
|
6684
|
-
var
|
|
7242
|
+
var React103 = __toESM(require("react"));
|
|
7243
|
+
var import_ui87 = require("@elementor/ui");
|
|
7244
|
+
var import_i18n49 = require("@wordpress/i18n");
|
|
6685
7245
|
|
|
6686
7246
|
// src/controls/transform-control/functions/move.tsx
|
|
6687
|
-
var
|
|
6688
|
-
var
|
|
7247
|
+
var React98 = __toESM(require("react"));
|
|
7248
|
+
var import_react56 = require("react");
|
|
6689
7249
|
var import_editor_props47 = require("@elementor/editor-props");
|
|
6690
|
-
var
|
|
6691
|
-
var
|
|
6692
|
-
var
|
|
7250
|
+
var import_icons29 = require("@elementor/icons");
|
|
7251
|
+
var import_ui81 = require("@elementor/ui");
|
|
7252
|
+
var import_i18n45 = require("@wordpress/i18n");
|
|
6693
7253
|
|
|
6694
7254
|
// src/controls/transform-control/functions/axis-row.tsx
|
|
6695
|
-
var
|
|
6696
|
-
var
|
|
7255
|
+
var React97 = __toESM(require("react"));
|
|
7256
|
+
var import_ui80 = require("@elementor/ui");
|
|
6697
7257
|
var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "angle" }) => {
|
|
6698
7258
|
const safeId = label.replace(/\s+/g, "-").toLowerCase();
|
|
6699
|
-
return /* @__PURE__ */
|
|
7259
|
+
return /* @__PURE__ */ React97.createElement(import_ui80.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React97.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React97.createElement(import_ui80.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React97.createElement(ControlLabel, { htmlFor: safeId }, label)), /* @__PURE__ */ React97.createElement(import_ui80.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React97.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React97.createElement(
|
|
6700
7260
|
SizeControl,
|
|
6701
7261
|
{
|
|
6702
7262
|
anchorRef,
|
|
@@ -6712,28 +7272,28 @@ var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "an
|
|
|
6712
7272
|
// src/controls/transform-control/functions/move.tsx
|
|
6713
7273
|
var moveAxisControls = [
|
|
6714
7274
|
{
|
|
6715
|
-
label: (0,
|
|
7275
|
+
label: (0, import_i18n45.__)("Move X", "elementor"),
|
|
6716
7276
|
bind: "x",
|
|
6717
|
-
startIcon: /* @__PURE__ */
|
|
7277
|
+
startIcon: /* @__PURE__ */ React98.createElement(import_icons29.ArrowRightIcon, { fontSize: "tiny" }),
|
|
6718
7278
|
units: ["px", "%", "em", "rem", "vw"]
|
|
6719
7279
|
},
|
|
6720
7280
|
{
|
|
6721
|
-
label: (0,
|
|
7281
|
+
label: (0, import_i18n45.__)("Move Y", "elementor"),
|
|
6722
7282
|
bind: "y",
|
|
6723
|
-
startIcon: /* @__PURE__ */
|
|
7283
|
+
startIcon: /* @__PURE__ */ React98.createElement(import_icons29.ArrowDownSmallIcon, { fontSize: "tiny" }),
|
|
6724
7284
|
units: ["px", "%", "em", "rem", "vh"]
|
|
6725
7285
|
},
|
|
6726
7286
|
{
|
|
6727
|
-
label: (0,
|
|
7287
|
+
label: (0, import_i18n45.__)("Move Z", "elementor"),
|
|
6728
7288
|
bind: "z",
|
|
6729
|
-
startIcon: /* @__PURE__ */
|
|
7289
|
+
startIcon: /* @__PURE__ */ React98.createElement(import_icons29.ArrowDownLeftIcon, { fontSize: "tiny" }),
|
|
6730
7290
|
units: ["px", "%", "em", "rem", "vw", "vh"]
|
|
6731
7291
|
}
|
|
6732
7292
|
];
|
|
6733
7293
|
var Move = () => {
|
|
6734
7294
|
const context = useBoundProp(import_editor_props47.moveTransformPropTypeUtil);
|
|
6735
|
-
const rowRefs = [(0,
|
|
6736
|
-
return /* @__PURE__ */
|
|
7295
|
+
const rowRefs = [(0, import_react56.useRef)(null), (0, import_react56.useRef)(null), (0, import_react56.useRef)(null)];
|
|
7296
|
+
return /* @__PURE__ */ React98.createElement(import_ui81.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React98.createElement(PropProvider, { ...context }, /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React98.createElement(
|
|
6737
7297
|
AxisRow,
|
|
6738
7298
|
{
|
|
6739
7299
|
key: control.bind,
|
|
@@ -6746,34 +7306,34 @@ var Move = () => {
|
|
|
6746
7306
|
};
|
|
6747
7307
|
|
|
6748
7308
|
// src/controls/transform-control/functions/rotate.tsx
|
|
6749
|
-
var
|
|
6750
|
-
var
|
|
7309
|
+
var React99 = __toESM(require("react"));
|
|
7310
|
+
var import_react57 = require("react");
|
|
6751
7311
|
var import_editor_props48 = require("@elementor/editor-props");
|
|
6752
|
-
var
|
|
6753
|
-
var
|
|
6754
|
-
var
|
|
7312
|
+
var import_icons30 = require("@elementor/icons");
|
|
7313
|
+
var import_ui82 = require("@elementor/ui");
|
|
7314
|
+
var import_i18n46 = require("@wordpress/i18n");
|
|
6755
7315
|
var rotateAxisControls = [
|
|
6756
7316
|
{
|
|
6757
|
-
label: (0,
|
|
7317
|
+
label: (0, import_i18n46.__)("Rotate X", "elementor"),
|
|
6758
7318
|
bind: "x",
|
|
6759
|
-
startIcon: /* @__PURE__ */
|
|
7319
|
+
startIcon: /* @__PURE__ */ React99.createElement(import_icons30.Arrow360Icon, { fontSize: "tiny" })
|
|
6760
7320
|
},
|
|
6761
7321
|
{
|
|
6762
|
-
label: (0,
|
|
7322
|
+
label: (0, import_i18n46.__)("Rotate Y", "elementor"),
|
|
6763
7323
|
bind: "y",
|
|
6764
|
-
startIcon: /* @__PURE__ */
|
|
7324
|
+
startIcon: /* @__PURE__ */ React99.createElement(import_icons30.Arrow360Icon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
6765
7325
|
},
|
|
6766
7326
|
{
|
|
6767
|
-
label: (0,
|
|
7327
|
+
label: (0, import_i18n46.__)("Rotate Z", "elementor"),
|
|
6768
7328
|
bind: "z",
|
|
6769
|
-
startIcon: /* @__PURE__ */
|
|
7329
|
+
startIcon: /* @__PURE__ */ React99.createElement(import_icons30.RotateClockwiseIcon, { fontSize: "tiny" })
|
|
6770
7330
|
}
|
|
6771
7331
|
];
|
|
6772
7332
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
6773
7333
|
var Rotate = () => {
|
|
6774
7334
|
const context = useBoundProp(import_editor_props48.rotateTransformPropTypeUtil);
|
|
6775
|
-
const rowRefs = [(0,
|
|
6776
|
-
return /* @__PURE__ */
|
|
7335
|
+
const rowRefs = [(0, import_react57.useRef)(null), (0, import_react57.useRef)(null), (0, import_react57.useRef)(null)];
|
|
7336
|
+
return /* @__PURE__ */ React99.createElement(import_ui82.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React99.createElement(PropProvider, { ...context }, /* @__PURE__ */ React99.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React99.createElement(
|
|
6777
7337
|
AxisRow,
|
|
6778
7338
|
{
|
|
6779
7339
|
key: control.bind,
|
|
@@ -6785,68 +7345,68 @@ var Rotate = () => {
|
|
|
6785
7345
|
};
|
|
6786
7346
|
|
|
6787
7347
|
// src/controls/transform-control/functions/scale.tsx
|
|
6788
|
-
var
|
|
6789
|
-
var
|
|
7348
|
+
var React101 = __toESM(require("react"));
|
|
7349
|
+
var import_react58 = require("react");
|
|
6790
7350
|
var import_editor_props49 = require("@elementor/editor-props");
|
|
6791
|
-
var
|
|
6792
|
-
var
|
|
6793
|
-
var
|
|
7351
|
+
var import_icons31 = require("@elementor/icons");
|
|
7352
|
+
var import_ui84 = require("@elementor/ui");
|
|
7353
|
+
var import_i18n47 = require("@wordpress/i18n");
|
|
6794
7354
|
|
|
6795
7355
|
// src/controls/transform-control/functions/scale-axis-row.tsx
|
|
6796
|
-
var
|
|
6797
|
-
var
|
|
7356
|
+
var React100 = __toESM(require("react"));
|
|
7357
|
+
var import_ui83 = require("@elementor/ui");
|
|
6798
7358
|
var ScaleAxisRow = ({ label, bind, startIcon, anchorRef }) => {
|
|
6799
|
-
return /* @__PURE__ */
|
|
7359
|
+
return /* @__PURE__ */ React100.createElement(import_ui83.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React100.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React100.createElement(import_ui83.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(ControlLabel, null, label)), /* @__PURE__ */ React100.createElement(import_ui83.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React100.createElement(NumberControl, { step: 0.1, placeholder: "1", startIcon })))));
|
|
6800
7360
|
};
|
|
6801
7361
|
|
|
6802
7362
|
// src/controls/transform-control/functions/scale.tsx
|
|
6803
7363
|
var scaleAxisControls = [
|
|
6804
7364
|
{
|
|
6805
|
-
label: (0,
|
|
7365
|
+
label: (0, import_i18n47.__)("Scale X", "elementor"),
|
|
6806
7366
|
bind: "x",
|
|
6807
|
-
startIcon: /* @__PURE__ */
|
|
7367
|
+
startIcon: /* @__PURE__ */ React101.createElement(import_icons31.ArrowRightIcon, { fontSize: "tiny" })
|
|
6808
7368
|
},
|
|
6809
7369
|
{
|
|
6810
|
-
label: (0,
|
|
7370
|
+
label: (0, import_i18n47.__)("Scale Y", "elementor"),
|
|
6811
7371
|
bind: "y",
|
|
6812
|
-
startIcon: /* @__PURE__ */
|
|
7372
|
+
startIcon: /* @__PURE__ */ React101.createElement(import_icons31.ArrowDownSmallIcon, { fontSize: "tiny" })
|
|
6813
7373
|
},
|
|
6814
7374
|
{
|
|
6815
|
-
label: (0,
|
|
7375
|
+
label: (0, import_i18n47.__)("Scale Z", "elementor"),
|
|
6816
7376
|
bind: "z",
|
|
6817
|
-
startIcon: /* @__PURE__ */
|
|
7377
|
+
startIcon: /* @__PURE__ */ React101.createElement(import_icons31.ArrowDownLeftIcon, { fontSize: "tiny" })
|
|
6818
7378
|
}
|
|
6819
7379
|
];
|
|
6820
7380
|
var Scale = () => {
|
|
6821
7381
|
const context = useBoundProp(import_editor_props49.scaleTransformPropTypeUtil);
|
|
6822
|
-
const rowRefs = [(0,
|
|
6823
|
-
return /* @__PURE__ */
|
|
7382
|
+
const rowRefs = [(0, import_react58.useRef)(null), (0, import_react58.useRef)(null), (0, import_react58.useRef)(null)];
|
|
7383
|
+
return /* @__PURE__ */ React101.createElement(import_ui84.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React101.createElement(PropProvider, { ...context }, /* @__PURE__ */ React101.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React101.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
6824
7384
|
};
|
|
6825
7385
|
|
|
6826
7386
|
// src/controls/transform-control/functions/skew.tsx
|
|
6827
|
-
var
|
|
6828
|
-
var
|
|
7387
|
+
var React102 = __toESM(require("react"));
|
|
7388
|
+
var import_react59 = require("react");
|
|
6829
7389
|
var import_editor_props50 = require("@elementor/editor-props");
|
|
6830
|
-
var
|
|
6831
|
-
var
|
|
6832
|
-
var
|
|
7390
|
+
var import_icons32 = require("@elementor/icons");
|
|
7391
|
+
var import_ui85 = require("@elementor/ui");
|
|
7392
|
+
var import_i18n48 = require("@wordpress/i18n");
|
|
6833
7393
|
var skewAxisControls = [
|
|
6834
7394
|
{
|
|
6835
|
-
label: (0,
|
|
7395
|
+
label: (0, import_i18n48.__)("Skew X", "elementor"),
|
|
6836
7396
|
bind: "x",
|
|
6837
|
-
startIcon: /* @__PURE__ */
|
|
7397
|
+
startIcon: /* @__PURE__ */ React102.createElement(import_icons32.ArrowRightIcon, { fontSize: "tiny" })
|
|
6838
7398
|
},
|
|
6839
7399
|
{
|
|
6840
|
-
label: (0,
|
|
7400
|
+
label: (0, import_i18n48.__)("Skew Y", "elementor"),
|
|
6841
7401
|
bind: "y",
|
|
6842
|
-
startIcon: /* @__PURE__ */
|
|
7402
|
+
startIcon: /* @__PURE__ */ React102.createElement(import_icons32.ArrowLeftIcon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
6843
7403
|
}
|
|
6844
7404
|
];
|
|
6845
7405
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
6846
7406
|
var Skew = () => {
|
|
6847
7407
|
const context = useBoundProp(import_editor_props50.skewTransformPropTypeUtil);
|
|
6848
|
-
const rowRefs = [(0,
|
|
6849
|
-
return /* @__PURE__ */
|
|
7408
|
+
const rowRefs = [(0, import_react59.useRef)(null), (0, import_react59.useRef)(null), (0, import_react59.useRef)(null)];
|
|
7409
|
+
return /* @__PURE__ */ React102.createElement(import_ui85.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React102.createElement(PropProvider, { ...context }, /* @__PURE__ */ React102.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React102.createElement(
|
|
6850
7410
|
AxisRow,
|
|
6851
7411
|
{
|
|
6852
7412
|
key: control.bind,
|
|
@@ -6858,9 +7418,9 @@ var Skew = () => {
|
|
|
6858
7418
|
};
|
|
6859
7419
|
|
|
6860
7420
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
6861
|
-
var
|
|
7421
|
+
var import_react60 = require("react");
|
|
6862
7422
|
var import_editor_props51 = require("@elementor/editor-props");
|
|
6863
|
-
var
|
|
7423
|
+
var import_ui86 = require("@elementor/ui");
|
|
6864
7424
|
var useTransformTabsHistory = ({
|
|
6865
7425
|
move: initialMove,
|
|
6866
7426
|
scale: initialScale,
|
|
@@ -6884,8 +7444,8 @@ var useTransformTabsHistory = ({
|
|
|
6884
7444
|
return TransformFunctionKeys.move;
|
|
6885
7445
|
}
|
|
6886
7446
|
};
|
|
6887
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
6888
|
-
const valuesHistory = (0,
|
|
7447
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui86.useTabs)(getCurrentTransformType());
|
|
7448
|
+
const valuesHistory = (0, import_react60.useRef)({
|
|
6889
7449
|
move: initialMove,
|
|
6890
7450
|
scale: initialScale,
|
|
6891
7451
|
rotate: initialRotate,
|
|
@@ -6946,8 +7506,8 @@ var TransformContent = () => {
|
|
|
6946
7506
|
rotate: initialRotateValue.value,
|
|
6947
7507
|
skew: initialSkewValue.value
|
|
6948
7508
|
});
|
|
6949
|
-
return /* @__PURE__ */
|
|
6950
|
-
|
|
7509
|
+
return /* @__PURE__ */ React103.createElement(PopoverContent, null, /* @__PURE__ */ React103.createElement(import_ui87.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React103.createElement(import_ui87.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React103.createElement(
|
|
7510
|
+
import_ui87.Tabs,
|
|
6951
7511
|
{
|
|
6952
7512
|
size: "small",
|
|
6953
7513
|
variant: "fullWidth",
|
|
@@ -6957,37 +7517,37 @@ var TransformContent = () => {
|
|
|
6957
7517
|
}
|
|
6958
7518
|
},
|
|
6959
7519
|
...getTabsProps(),
|
|
6960
|
-
"aria-label": (0,
|
|
7520
|
+
"aria-label": (0, import_i18n49.__)("Transform", "elementor")
|
|
6961
7521
|
},
|
|
6962
|
-
/* @__PURE__ */
|
|
6963
|
-
/* @__PURE__ */
|
|
6964
|
-
/* @__PURE__ */
|
|
6965
|
-
/* @__PURE__ */
|
|
6966
|
-
)), /* @__PURE__ */
|
|
7522
|
+
/* @__PURE__ */ React103.createElement(import_ui87.Tab, { label: (0, import_i18n49.__)("Move", "elementor"), ...getTabProps(TransformFunctionKeys.move) }),
|
|
7523
|
+
/* @__PURE__ */ React103.createElement(import_ui87.Tab, { label: (0, import_i18n49.__)("Scale", "elementor"), ...getTabProps(TransformFunctionKeys.scale) }),
|
|
7524
|
+
/* @__PURE__ */ React103.createElement(import_ui87.Tab, { label: (0, import_i18n49.__)("Rotate", "elementor"), ...getTabProps(TransformFunctionKeys.rotate) }),
|
|
7525
|
+
/* @__PURE__ */ React103.createElement(import_ui87.Tab, { label: (0, import_i18n49.__)("Skew", "elementor"), ...getTabProps(TransformFunctionKeys.skew) })
|
|
7526
|
+
)), /* @__PURE__ */ React103.createElement(import_ui87.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.move) }, /* @__PURE__ */ React103.createElement(Move, null)), /* @__PURE__ */ React103.createElement(import_ui87.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.scale) }, /* @__PURE__ */ React103.createElement(Scale, null)), /* @__PURE__ */ React103.createElement(import_ui87.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.rotate) }, /* @__PURE__ */ React103.createElement(Rotate, null)), /* @__PURE__ */ React103.createElement(import_ui87.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.skew) }, /* @__PURE__ */ React103.createElement(Skew, null))));
|
|
6967
7527
|
};
|
|
6968
7528
|
|
|
6969
7529
|
// src/controls/transform-control/transform-icon.tsx
|
|
6970
|
-
var
|
|
6971
|
-
var
|
|
7530
|
+
var React104 = __toESM(require("react"));
|
|
7531
|
+
var import_icons33 = require("@elementor/icons");
|
|
6972
7532
|
var TransformIcon = ({ value }) => {
|
|
6973
7533
|
switch (value.$$type) {
|
|
6974
7534
|
case TransformFunctionKeys.move:
|
|
6975
|
-
return /* @__PURE__ */
|
|
7535
|
+
return /* @__PURE__ */ React104.createElement(import_icons33.ArrowsMaximizeIcon, { fontSize: "tiny" });
|
|
6976
7536
|
case TransformFunctionKeys.scale:
|
|
6977
|
-
return /* @__PURE__ */
|
|
7537
|
+
return /* @__PURE__ */ React104.createElement(import_icons33.ArrowAutofitHeightIcon, { fontSize: "tiny" });
|
|
6978
7538
|
case TransformFunctionKeys.rotate:
|
|
6979
|
-
return /* @__PURE__ */
|
|
7539
|
+
return /* @__PURE__ */ React104.createElement(import_icons33.RotateClockwise2Icon, { fontSize: "tiny" });
|
|
6980
7540
|
case TransformFunctionKeys.skew:
|
|
6981
|
-
return /* @__PURE__ */
|
|
7541
|
+
return /* @__PURE__ */ React104.createElement(import_icons33.SkewXIcon, { fontSize: "tiny" });
|
|
6982
7542
|
default:
|
|
6983
7543
|
return null;
|
|
6984
7544
|
}
|
|
6985
7545
|
};
|
|
6986
7546
|
|
|
6987
7547
|
// src/controls/transform-control/transform-label.tsx
|
|
6988
|
-
var
|
|
6989
|
-
var
|
|
6990
|
-
var
|
|
7548
|
+
var React105 = __toESM(require("react"));
|
|
7549
|
+
var import_ui88 = require("@elementor/ui");
|
|
7550
|
+
var import_i18n50 = require("@wordpress/i18n");
|
|
6991
7551
|
var orderedAxis = ["x", "y", "z"];
|
|
6992
7552
|
var formatLabel = (value, functionType) => {
|
|
6993
7553
|
return orderedAxis.map((axisKey) => {
|
|
@@ -7005,98 +7565,98 @@ var TransformLabel = (props) => {
|
|
|
7005
7565
|
const { $$type, value } = props.value;
|
|
7006
7566
|
switch ($$type) {
|
|
7007
7567
|
case TransformFunctionKeys.move:
|
|
7008
|
-
return /* @__PURE__ */
|
|
7568
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: (0, import_i18n50.__)("Move", "elementor"), value: formatLabel(value, "move") });
|
|
7009
7569
|
case TransformFunctionKeys.scale:
|
|
7010
|
-
return /* @__PURE__ */
|
|
7570
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: (0, import_i18n50.__)("Scale", "elementor"), value: formatLabel(value, "scale") });
|
|
7011
7571
|
case TransformFunctionKeys.rotate:
|
|
7012
|
-
return /* @__PURE__ */
|
|
7572
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: (0, import_i18n50.__)("Rotate", "elementor"), value: formatLabel(value, "rotate") });
|
|
7013
7573
|
case TransformFunctionKeys.skew:
|
|
7014
|
-
return /* @__PURE__ */
|
|
7574
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: (0, import_i18n50.__)("Skew", "elementor"), value: formatLabel(value, "skew") });
|
|
7015
7575
|
default:
|
|
7016
7576
|
return "";
|
|
7017
7577
|
}
|
|
7018
7578
|
};
|
|
7019
7579
|
var Label2 = ({ label, value }) => {
|
|
7020
|
-
return /* @__PURE__ */
|
|
7580
|
+
return /* @__PURE__ */ React105.createElement(import_ui88.Box, { component: "span" }, label, ": ", value);
|
|
7021
7581
|
};
|
|
7022
7582
|
|
|
7023
7583
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
7024
|
-
var
|
|
7025
|
-
var
|
|
7026
|
-
var
|
|
7027
|
-
var
|
|
7028
|
-
var
|
|
7584
|
+
var React108 = __toESM(require("react"));
|
|
7585
|
+
var import_editor_ui14 = require("@elementor/editor-ui");
|
|
7586
|
+
var import_icons34 = require("@elementor/icons");
|
|
7587
|
+
var import_ui91 = require("@elementor/ui");
|
|
7588
|
+
var import_i18n53 = require("@wordpress/i18n");
|
|
7029
7589
|
|
|
7030
7590
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
7031
|
-
var
|
|
7032
|
-
var
|
|
7591
|
+
var React106 = __toESM(require("react"));
|
|
7592
|
+
var import_react61 = require("react");
|
|
7033
7593
|
var import_editor_props52 = require("@elementor/editor-props");
|
|
7034
|
-
var
|
|
7035
|
-
var
|
|
7594
|
+
var import_ui89 = require("@elementor/ui");
|
|
7595
|
+
var import_i18n51 = require("@wordpress/i18n");
|
|
7036
7596
|
var ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
7037
7597
|
var PERSPECTIVE_CONTROL_FIELD = {
|
|
7038
|
-
label: (0,
|
|
7598
|
+
label: (0, import_i18n51.__)("Perspective", "elementor"),
|
|
7039
7599
|
bind: "perspective",
|
|
7040
7600
|
units: ["px", "em", "rem", "vw", "vh"]
|
|
7041
7601
|
};
|
|
7042
7602
|
var CHILDREN_PERSPECTIVE_FIELDS = [
|
|
7043
7603
|
{
|
|
7044
|
-
label: (0,
|
|
7604
|
+
label: (0, import_i18n51.__)("Origin X", "elementor"),
|
|
7045
7605
|
bind: "x",
|
|
7046
7606
|
units: ORIGIN_UNITS
|
|
7047
7607
|
},
|
|
7048
7608
|
{
|
|
7049
|
-
label: (0,
|
|
7609
|
+
label: (0, import_i18n51.__)("Origin Y", "elementor"),
|
|
7050
7610
|
bind: "y",
|
|
7051
7611
|
units: ORIGIN_UNITS
|
|
7052
7612
|
}
|
|
7053
7613
|
];
|
|
7054
7614
|
var ChildrenPerspectiveControl = () => {
|
|
7055
|
-
return /* @__PURE__ */
|
|
7615
|
+
return /* @__PURE__ */ React106.createElement(import_ui89.Stack, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React106.createElement(ControlFormLabel, null, (0, import_i18n51.__)("Children perspective", "elementor")), /* @__PURE__ */ React106.createElement(PerspectiveControl, null), /* @__PURE__ */ React106.createElement(PerspectiveOriginControl, null));
|
|
7056
7616
|
};
|
|
7057
|
-
var PerspectiveControl = () => /* @__PURE__ */
|
|
7058
|
-
var PerspectiveOriginControl = () => /* @__PURE__ */
|
|
7617
|
+
var PerspectiveControl = () => /* @__PURE__ */ React106.createElement(PropKeyProvider, { bind: "perspective" }, /* @__PURE__ */ React106.createElement(ControlFields, { control: PERSPECTIVE_CONTROL_FIELD, key: PERSPECTIVE_CONTROL_FIELD.bind }));
|
|
7618
|
+
var PerspectiveOriginControl = () => /* @__PURE__ */ React106.createElement(PropKeyProvider, { bind: "perspective-origin" }, /* @__PURE__ */ React106.createElement(PerspectiveOriginControlProvider, null));
|
|
7059
7619
|
var PerspectiveOriginControlProvider = () => {
|
|
7060
7620
|
const context = useBoundProp(import_editor_props52.perspectiveOriginPropTypeUtil);
|
|
7061
|
-
return /* @__PURE__ */
|
|
7621
|
+
return /* @__PURE__ */ React106.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React106.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React106.createElement(ControlFields, { control }))));
|
|
7062
7622
|
};
|
|
7063
7623
|
var ControlFields = ({ control }) => {
|
|
7064
|
-
const rowRef = (0,
|
|
7065
|
-
return /* @__PURE__ */
|
|
7624
|
+
const rowRef = (0, import_react61.useRef)(null);
|
|
7625
|
+
return /* @__PURE__ */ React106.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React106.createElement(import_ui89.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React106.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React106.createElement(import_ui89.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React106.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
|
|
7066
7626
|
};
|
|
7067
7627
|
|
|
7068
7628
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
7069
|
-
var
|
|
7070
|
-
var
|
|
7629
|
+
var React107 = __toESM(require("react"));
|
|
7630
|
+
var import_react62 = require("react");
|
|
7071
7631
|
var import_editor_props53 = require("@elementor/editor-props");
|
|
7072
|
-
var
|
|
7073
|
-
var
|
|
7632
|
+
var import_ui90 = require("@elementor/ui");
|
|
7633
|
+
var import_i18n52 = require("@wordpress/i18n");
|
|
7074
7634
|
var TRANSFORM_ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
7075
7635
|
var TRANSFORM_ORIGIN_UNITS_Z_AXIS = TRANSFORM_ORIGIN_UNITS.filter((unit) => unit !== "%");
|
|
7076
7636
|
var TRANSFORM_ORIGIN_FIELDS = [
|
|
7077
7637
|
{
|
|
7078
|
-
label: (0,
|
|
7638
|
+
label: (0, import_i18n52.__)("Origin X", "elementor"),
|
|
7079
7639
|
bind: "x",
|
|
7080
7640
|
units: TRANSFORM_ORIGIN_UNITS
|
|
7081
7641
|
},
|
|
7082
7642
|
{
|
|
7083
|
-
label: (0,
|
|
7643
|
+
label: (0, import_i18n52.__)("Origin Y", "elementor"),
|
|
7084
7644
|
bind: "y",
|
|
7085
7645
|
units: TRANSFORM_ORIGIN_UNITS
|
|
7086
7646
|
},
|
|
7087
7647
|
{
|
|
7088
|
-
label: (0,
|
|
7648
|
+
label: (0, import_i18n52.__)("Origin Z", "elementor"),
|
|
7089
7649
|
bind: "z",
|
|
7090
7650
|
units: TRANSFORM_ORIGIN_UNITS_Z_AXIS
|
|
7091
7651
|
}
|
|
7092
7652
|
];
|
|
7093
7653
|
var TransformOriginControl = () => {
|
|
7094
|
-
return /* @__PURE__ */
|
|
7654
|
+
return /* @__PURE__ */ React107.createElement(import_ui90.Stack, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React107.createElement(ControlFormLabel, null, (0, import_i18n52.__)("Transform", "elementor")), TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React107.createElement(ControlFields2, { control, key: control.bind })));
|
|
7095
7655
|
};
|
|
7096
7656
|
var ControlFields2 = ({ control }) => {
|
|
7097
7657
|
const context = useBoundProp(import_editor_props53.transformOriginPropTypeUtil);
|
|
7098
|
-
const rowRef = (0,
|
|
7099
|
-
return /* @__PURE__ */
|
|
7658
|
+
const rowRef = (0, import_react62.useRef)(null);
|
|
7659
|
+
return /* @__PURE__ */ React107.createElement(PropProvider, { ...context }, /* @__PURE__ */ React107.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React107.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React107.createElement(import_ui90.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React107.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React107.createElement(import_ui90.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React107.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef })))));
|
|
7100
7660
|
};
|
|
7101
7661
|
|
|
7102
7662
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
@@ -7106,12 +7666,12 @@ var TransformSettingsControl = ({
|
|
|
7106
7666
|
anchorRef,
|
|
7107
7667
|
showChildrenPerspective
|
|
7108
7668
|
}) => {
|
|
7109
|
-
const popupProps = (0,
|
|
7669
|
+
const popupProps = (0, import_ui91.bindPopover)({
|
|
7110
7670
|
...popupState,
|
|
7111
7671
|
anchorEl: anchorRef.current ?? void 0
|
|
7112
7672
|
});
|
|
7113
|
-
return /* @__PURE__ */
|
|
7114
|
-
|
|
7673
|
+
return /* @__PURE__ */ React108.createElement(
|
|
7674
|
+
import_ui91.Popover,
|
|
7115
7675
|
{
|
|
7116
7676
|
disablePortal: true,
|
|
7117
7677
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
@@ -7125,16 +7685,16 @@ var TransformSettingsControl = ({
|
|
|
7125
7685
|
},
|
|
7126
7686
|
...popupProps
|
|
7127
7687
|
},
|
|
7128
|
-
/* @__PURE__ */
|
|
7129
|
-
|
|
7688
|
+
/* @__PURE__ */ React108.createElement(
|
|
7689
|
+
import_editor_ui14.PopoverHeader,
|
|
7130
7690
|
{
|
|
7131
|
-
title: (0,
|
|
7691
|
+
title: (0, import_i18n53.__)("Transform settings", "elementor"),
|
|
7132
7692
|
onClose: popupState.close,
|
|
7133
|
-
icon: /* @__PURE__ */
|
|
7693
|
+
icon: /* @__PURE__ */ React108.createElement(import_icons34.AdjustmentsIcon, { fontSize: SIZE10 })
|
|
7134
7694
|
}
|
|
7135
7695
|
),
|
|
7136
|
-
/* @__PURE__ */
|
|
7137
|
-
/* @__PURE__ */
|
|
7696
|
+
/* @__PURE__ */ React108.createElement(import_ui91.Divider, null),
|
|
7697
|
+
/* @__PURE__ */ React108.createElement(PopoverContent, { sx: { px: 2, py: 1.5 } }, /* @__PURE__ */ React108.createElement(PropKeyProvider, { bind: "transform-origin" }, /* @__PURE__ */ React108.createElement(TransformOriginControl, null)), showChildrenPerspective && /* @__PURE__ */ React108.createElement(React108.Fragment, null, /* @__PURE__ */ React108.createElement(import_ui91.Box, { sx: { my: 0.5 } }, /* @__PURE__ */ React108.createElement(import_ui91.Divider, null)), /* @__PURE__ */ React108.createElement(ChildrenPerspectiveControl, null)))
|
|
7138
7698
|
);
|
|
7139
7699
|
};
|
|
7140
7700
|
|
|
@@ -7143,27 +7703,27 @@ var SIZE11 = "tiny";
|
|
|
7143
7703
|
var TransformRepeaterControl = createControl(
|
|
7144
7704
|
({ showChildrenPerspective }) => {
|
|
7145
7705
|
const context = useBoundProp(import_editor_props54.transformPropTypeUtil);
|
|
7146
|
-
const headerRef = (0,
|
|
7147
|
-
const popupState = (0,
|
|
7148
|
-
return /* @__PURE__ */
|
|
7706
|
+
const headerRef = (0, import_react63.useRef)(null);
|
|
7707
|
+
const popupState = (0, import_ui92.usePopupState)({ variant: "popover" });
|
|
7708
|
+
return /* @__PURE__ */ React109.createElement(PropProvider, { ...context }, /* @__PURE__ */ React109.createElement(
|
|
7149
7709
|
TransformSettingsControl,
|
|
7150
7710
|
{
|
|
7151
7711
|
popupState,
|
|
7152
7712
|
anchorRef: headerRef,
|
|
7153
7713
|
showChildrenPerspective
|
|
7154
7714
|
}
|
|
7155
|
-
), /* @__PURE__ */
|
|
7715
|
+
), /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React109.createElement(Repeater2, { headerRef, propType: context.propType, popupState })));
|
|
7156
7716
|
}
|
|
7157
7717
|
);
|
|
7158
|
-
var ToolTip = /* @__PURE__ */
|
|
7159
|
-
|
|
7718
|
+
var ToolTip = /* @__PURE__ */ React109.createElement(
|
|
7719
|
+
import_ui92.Box,
|
|
7160
7720
|
{
|
|
7161
7721
|
component: "span",
|
|
7162
7722
|
"aria-label": void 0,
|
|
7163
7723
|
sx: { display: "flex", gap: 0.5, p: 2, width: 320, borderRadius: 1 }
|
|
7164
7724
|
},
|
|
7165
|
-
/* @__PURE__ */
|
|
7166
|
-
/* @__PURE__ */
|
|
7725
|
+
/* @__PURE__ */ React109.createElement(import_icons35.InfoCircleFilledIcon, { sx: { color: "secondary.main" } }),
|
|
7726
|
+
/* @__PURE__ */ React109.createElement(import_ui92.Typography, { variant: "body2", color: "text.secondary", fontSize: "14px" }, (0, import_i18n54.__)("You can use each kind of transform only once per element.", "elementor"))
|
|
7167
7727
|
);
|
|
7168
7728
|
var Repeater2 = ({
|
|
7169
7729
|
headerRef,
|
|
@@ -7177,21 +7737,21 @@ var Repeater2 = ({
|
|
|
7177
7737
|
return availableValues.find((value) => !transformValues?.some((item) => item.$$type === value.$$type));
|
|
7178
7738
|
};
|
|
7179
7739
|
const shouldDisableAddItem = !getInitialValue2();
|
|
7180
|
-
return /* @__PURE__ */
|
|
7740
|
+
return /* @__PURE__ */ React109.createElement(PropProvider, { ...transformFunctionsContext }, /* @__PURE__ */ React109.createElement(
|
|
7181
7741
|
ControlRepeater,
|
|
7182
7742
|
{
|
|
7183
7743
|
initial: getInitialValue2() ?? initialTransformValue,
|
|
7184
7744
|
propTypeUtil: import_editor_props54.transformFunctionsPropTypeUtil
|
|
7185
7745
|
},
|
|
7186
|
-
/* @__PURE__ */
|
|
7746
|
+
/* @__PURE__ */ React109.createElement(
|
|
7187
7747
|
RepeaterHeader,
|
|
7188
7748
|
{
|
|
7189
|
-
label: (0,
|
|
7190
|
-
adornment: () => /* @__PURE__ */
|
|
7749
|
+
label: (0, import_i18n54.__)("Transform", "elementor"),
|
|
7750
|
+
adornment: () => /* @__PURE__ */ React109.createElement(ControlAdornments, { customContext: { path: ["transform"], propType } }),
|
|
7191
7751
|
ref: headerRef
|
|
7192
7752
|
},
|
|
7193
|
-
/* @__PURE__ */
|
|
7194
|
-
/* @__PURE__ */
|
|
7753
|
+
/* @__PURE__ */ React109.createElement(TransformBasePopoverTrigger, { popupState, repeaterBindKey: bind }),
|
|
7754
|
+
/* @__PURE__ */ React109.createElement(
|
|
7195
7755
|
TooltipAddItemAction,
|
|
7196
7756
|
{
|
|
7197
7757
|
disabled: shouldDisableAddItem,
|
|
@@ -7201,15 +7761,15 @@ var Repeater2 = ({
|
|
|
7201
7761
|
}
|
|
7202
7762
|
)
|
|
7203
7763
|
),
|
|
7204
|
-
/* @__PURE__ */
|
|
7764
|
+
/* @__PURE__ */ React109.createElement(ItemsContainer, null, /* @__PURE__ */ React109.createElement(
|
|
7205
7765
|
Item,
|
|
7206
7766
|
{
|
|
7207
7767
|
Icon: TransformIcon,
|
|
7208
7768
|
Label: TransformLabel,
|
|
7209
|
-
actions: /* @__PURE__ */
|
|
7769
|
+
actions: /* @__PURE__ */ React109.createElement(React109.Fragment, null, /* @__PURE__ */ React109.createElement(DisableItemAction, null), /* @__PURE__ */ React109.createElement(RemoveItemAction, null))
|
|
7210
7770
|
}
|
|
7211
7771
|
)),
|
|
7212
|
-
/* @__PURE__ */
|
|
7772
|
+
/* @__PURE__ */ React109.createElement(EditItemPopover, null, /* @__PURE__ */ React109.createElement(TransformContent, null))
|
|
7213
7773
|
));
|
|
7214
7774
|
};
|
|
7215
7775
|
var TransformBasePopoverTrigger = ({
|
|
@@ -7217,30 +7777,30 @@ var TransformBasePopoverTrigger = ({
|
|
|
7217
7777
|
repeaterBindKey
|
|
7218
7778
|
}) => {
|
|
7219
7779
|
const { bind } = useBoundProp();
|
|
7220
|
-
const titleLabel = (0,
|
|
7221
|
-
return bind !== repeaterBindKey ? null : /* @__PURE__ */
|
|
7780
|
+
const titleLabel = (0, import_i18n54.__)("Transform settings", "elementor");
|
|
7781
|
+
return bind !== repeaterBindKey ? null : /* @__PURE__ */ React109.createElement(import_ui92.Tooltip, { title: titleLabel, placement: "top" }, /* @__PURE__ */ React109.createElement(import_ui92.IconButton, { size: SIZE11, "aria-label": titleLabel, ...(0, import_ui92.bindTrigger)(popupState) }, /* @__PURE__ */ React109.createElement(import_icons35.AdjustmentsIcon, { fontSize: SIZE11 })));
|
|
7222
7782
|
};
|
|
7223
7783
|
|
|
7224
7784
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
7225
|
-
var
|
|
7226
|
-
var
|
|
7785
|
+
var React112 = __toESM(require("react"));
|
|
7786
|
+
var import_react66 = require("react");
|
|
7227
7787
|
var import_editor_props57 = require("@elementor/editor-props");
|
|
7228
|
-
var
|
|
7229
|
-
var
|
|
7788
|
+
var import_icons37 = require("@elementor/icons");
|
|
7789
|
+
var import_ui95 = require("@elementor/ui");
|
|
7230
7790
|
var import_utils7 = require("@elementor/utils");
|
|
7231
|
-
var
|
|
7791
|
+
var import_i18n57 = require("@wordpress/i18n");
|
|
7232
7792
|
|
|
7233
7793
|
// src/controls/selection-size-control.tsx
|
|
7234
|
-
var
|
|
7235
|
-
var
|
|
7794
|
+
var React110 = __toESM(require("react"));
|
|
7795
|
+
var import_react64 = require("react");
|
|
7236
7796
|
var import_editor_props55 = require("@elementor/editor-props");
|
|
7237
|
-
var
|
|
7797
|
+
var import_ui93 = require("@elementor/ui");
|
|
7238
7798
|
var SelectionSizeControl = createControl(
|
|
7239
7799
|
({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
|
|
7240
7800
|
const { value, setValue, propType } = useBoundProp(import_editor_props55.selectionSizePropTypeUtil);
|
|
7241
|
-
const rowRef = (0,
|
|
7801
|
+
const rowRef = (0, import_react64.useRef)(null);
|
|
7242
7802
|
const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
|
|
7243
|
-
const currentSizeConfig = (0,
|
|
7803
|
+
const currentSizeConfig = (0, import_react64.useMemo)(() => {
|
|
7244
7804
|
switch (value.selection.$$type) {
|
|
7245
7805
|
case "key-value":
|
|
7246
7806
|
return sizeConfigMap[value?.selection?.value.value.value || ""];
|
|
@@ -7251,7 +7811,7 @@ var SelectionSizeControl = createControl(
|
|
|
7251
7811
|
}
|
|
7252
7812
|
}, [value, sizeConfigMap]);
|
|
7253
7813
|
const SelectionComponent = selectionConfig.component;
|
|
7254
|
-
return /* @__PURE__ */
|
|
7814
|
+
return /* @__PURE__ */ React110.createElement(PropProvider, { value, setValue, propType }, /* @__PURE__ */ React110.createElement(import_ui93.Grid, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React110.createElement(import_ui93.Grid, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React110.createElement(ControlFormLabel, null, selectionLabel)), /* @__PURE__ */ React110.createElement(import_ui93.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React110.createElement(PropKeyProvider, { bind: "selection" }, /* @__PURE__ */ React110.createElement(SelectionComponent, { ...selectionConfig.props }))), currentSizeConfig && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(import_ui93.Grid, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React110.createElement(ControlFormLabel, { htmlFor: sizeFieldId }, sizeLabel)), /* @__PURE__ */ React110.createElement(import_ui93.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React110.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React110.createElement(
|
|
7255
7815
|
SizeControl,
|
|
7256
7816
|
{
|
|
7257
7817
|
anchorRef: rowRef,
|
|
@@ -7266,12 +7826,12 @@ var SelectionSizeControl = createControl(
|
|
|
7266
7826
|
|
|
7267
7827
|
// src/controls/transition-control/data.ts
|
|
7268
7828
|
var import_utils6 = require("@elementor/utils");
|
|
7269
|
-
var
|
|
7829
|
+
var import_i18n55 = require("@wordpress/i18n");
|
|
7270
7830
|
var initialTransitionValue = {
|
|
7271
7831
|
selection: {
|
|
7272
7832
|
$$type: "key-value",
|
|
7273
7833
|
value: {
|
|
7274
|
-
key: { value: (0,
|
|
7834
|
+
key: { value: (0, import_i18n55.__)("All properties", "elementor"), $$type: "string" },
|
|
7275
7835
|
value: { value: "all", $$type: "string" }
|
|
7276
7836
|
}
|
|
7277
7837
|
},
|
|
@@ -7295,128 +7855,128 @@ var createTransitionPropertiesList = () => {
|
|
|
7295
7855
|
const isSiteRtl = getIsSiteRtl();
|
|
7296
7856
|
const baseProperties = [
|
|
7297
7857
|
{
|
|
7298
|
-
label: (0,
|
|
7858
|
+
label: (0, import_i18n55.__)("Default", "elementor"),
|
|
7299
7859
|
type: "category",
|
|
7300
|
-
properties: [{ label: (0,
|
|
7860
|
+
properties: [{ label: (0, import_i18n55.__)("All properties", "elementor"), value: "all" }]
|
|
7301
7861
|
},
|
|
7302
7862
|
{
|
|
7303
|
-
label: (0,
|
|
7863
|
+
label: (0, import_i18n55.__)("Margin", "elementor"),
|
|
7304
7864
|
type: "category",
|
|
7305
7865
|
properties: [
|
|
7306
|
-
{ label: (0,
|
|
7307
|
-
{ label: (0,
|
|
7866
|
+
{ label: (0, import_i18n55.__)("Margin (all)", "elementor"), value: "margin", isDisabled: true },
|
|
7867
|
+
{ label: (0, import_i18n55.__)("Margin bottom", "elementor"), value: "margin-block-end", isDisabled: true },
|
|
7308
7868
|
{
|
|
7309
|
-
label: isSiteRtl ? (0,
|
|
7869
|
+
label: isSiteRtl ? (0, import_i18n55.__)("Margin right", "elementor") : (0, import_i18n55.__)("Margin left", "elementor"),
|
|
7310
7870
|
value: "margin-inline-start",
|
|
7311
7871
|
isDisabled: true
|
|
7312
7872
|
},
|
|
7313
7873
|
{
|
|
7314
|
-
label: isSiteRtl ? (0,
|
|
7874
|
+
label: isSiteRtl ? (0, import_i18n55.__)("Margin left", "elementor") : (0, import_i18n55.__)("Margin right", "elementor"),
|
|
7315
7875
|
value: "margin-inline-end",
|
|
7316
7876
|
isDisabled: true
|
|
7317
7877
|
},
|
|
7318
|
-
{ label: (0,
|
|
7878
|
+
{ label: (0, import_i18n55.__)("Margin top", "elementor"), value: "margin-block-start", isDisabled: true }
|
|
7319
7879
|
]
|
|
7320
7880
|
},
|
|
7321
7881
|
{
|
|
7322
|
-
label: (0,
|
|
7882
|
+
label: (0, import_i18n55.__)("Padding", "elementor"),
|
|
7323
7883
|
type: "category",
|
|
7324
7884
|
properties: [
|
|
7325
|
-
{ label: (0,
|
|
7326
|
-
{ label: (0,
|
|
7885
|
+
{ label: (0, import_i18n55.__)("Padding (all)", "elementor"), value: "padding", isDisabled: true },
|
|
7886
|
+
{ label: (0, import_i18n55.__)("Padding bottom", "elementor"), value: "padding-block-end", isDisabled: true },
|
|
7327
7887
|
{
|
|
7328
|
-
label: isSiteRtl ? (0,
|
|
7888
|
+
label: isSiteRtl ? (0, import_i18n55.__)("Padding right", "elementor") : (0, import_i18n55.__)("Padding left", "elementor"),
|
|
7329
7889
|
value: "padding-inline-start",
|
|
7330
7890
|
isDisabled: true
|
|
7331
7891
|
},
|
|
7332
7892
|
{
|
|
7333
|
-
label: isSiteRtl ? (0,
|
|
7893
|
+
label: isSiteRtl ? (0, import_i18n55.__)("Padding left", "elementor") : (0, import_i18n55.__)("Padding right", "elementor"),
|
|
7334
7894
|
value: "padding-inline-end",
|
|
7335
7895
|
isDisabled: true
|
|
7336
7896
|
},
|
|
7337
|
-
{ label: (0,
|
|
7897
|
+
{ label: (0, import_i18n55.__)("Padding top", "elementor"), value: "padding-block-start", isDisabled: true }
|
|
7338
7898
|
]
|
|
7339
7899
|
},
|
|
7340
7900
|
{
|
|
7341
|
-
label: (0,
|
|
7901
|
+
label: (0, import_i18n55.__)("Flex", "elementor"),
|
|
7342
7902
|
type: "category",
|
|
7343
7903
|
properties: [
|
|
7344
|
-
{ label: (0,
|
|
7345
|
-
{ label: (0,
|
|
7346
|
-
{ label: (0,
|
|
7347
|
-
{ label: (0,
|
|
7904
|
+
{ label: (0, import_i18n55.__)("Flex (all)", "elementor"), value: "flex", isDisabled: true },
|
|
7905
|
+
{ label: (0, import_i18n55.__)("Flex grow", "elementor"), value: "flex-grow", isDisabled: true },
|
|
7906
|
+
{ label: (0, import_i18n55.__)("Flex shrink", "elementor"), value: "flex-shrink", isDisabled: true },
|
|
7907
|
+
{ label: (0, import_i18n55.__)("Flex basis", "elementor"), value: "flex-basis", isDisabled: true }
|
|
7348
7908
|
]
|
|
7349
7909
|
},
|
|
7350
7910
|
{
|
|
7351
|
-
label: (0,
|
|
7911
|
+
label: (0, import_i18n55.__)("Size", "elementor"),
|
|
7352
7912
|
type: "category",
|
|
7353
7913
|
properties: [
|
|
7354
|
-
{ label: (0,
|
|
7355
|
-
{ label: (0,
|
|
7356
|
-
{ label: (0,
|
|
7357
|
-
{ label: (0,
|
|
7358
|
-
{ label: (0,
|
|
7359
|
-
{ label: (0,
|
|
7914
|
+
{ label: (0, import_i18n55.__)("Width", "elementor"), value: "width", isDisabled: true },
|
|
7915
|
+
{ label: (0, import_i18n55.__)("Height", "elementor"), value: "height", isDisabled: true },
|
|
7916
|
+
{ label: (0, import_i18n55.__)("Max height", "elementor"), value: "max-height", isDisabled: true },
|
|
7917
|
+
{ label: (0, import_i18n55.__)("Max width", "elementor"), value: "max-width", isDisabled: true },
|
|
7918
|
+
{ label: (0, import_i18n55.__)("Min height", "elementor"), value: "min-height", isDisabled: true },
|
|
7919
|
+
{ label: (0, import_i18n55.__)("Min width", "elementor"), value: "min-width", isDisabled: true }
|
|
7360
7920
|
]
|
|
7361
7921
|
},
|
|
7362
7922
|
{
|
|
7363
|
-
label: (0,
|
|
7923
|
+
label: (0, import_i18n55.__)("Position", "elementor"),
|
|
7364
7924
|
type: "category",
|
|
7365
7925
|
properties: [
|
|
7366
|
-
{ label: (0,
|
|
7926
|
+
{ label: (0, import_i18n55.__)("Top", "elementor"), value: "inset-block-start", isDisabled: true },
|
|
7367
7927
|
{
|
|
7368
|
-
label: isSiteRtl ? (0,
|
|
7928
|
+
label: isSiteRtl ? (0, import_i18n55.__)("Right", "elementor") : (0, import_i18n55.__)("Left", "elementor"),
|
|
7369
7929
|
value: "inset-inline-start",
|
|
7370
7930
|
isDisabled: true
|
|
7371
7931
|
},
|
|
7372
7932
|
{
|
|
7373
|
-
label: isSiteRtl ? (0,
|
|
7933
|
+
label: isSiteRtl ? (0, import_i18n55.__)("Left", "elementor") : (0, import_i18n55.__)("Right", "elementor"),
|
|
7374
7934
|
value: "inset-inline-end",
|
|
7375
7935
|
isDisabled: true
|
|
7376
7936
|
},
|
|
7377
|
-
{ label: (0,
|
|
7378
|
-
{ label: (0,
|
|
7937
|
+
{ label: (0, import_i18n55.__)("Bottom", "elementor"), value: "inset-block-end", isDisabled: true },
|
|
7938
|
+
{ label: (0, import_i18n55.__)("Z-index", "elementor"), value: "z-index", isDisabled: true }
|
|
7379
7939
|
]
|
|
7380
7940
|
},
|
|
7381
7941
|
{
|
|
7382
|
-
label: (0,
|
|
7942
|
+
label: (0, import_i18n55.__)("Typography", "elementor"),
|
|
7383
7943
|
type: "category",
|
|
7384
7944
|
properties: [
|
|
7385
|
-
{ label: (0,
|
|
7386
|
-
{ label: (0,
|
|
7387
|
-
{ label: (0,
|
|
7388
|
-
{ label: (0,
|
|
7389
|
-
{ label: (0,
|
|
7390
|
-
{ label: (0,
|
|
7391
|
-
{ label: (0,
|
|
7945
|
+
{ label: (0, import_i18n55.__)("Font color", "elementor"), value: "color", isDisabled: true },
|
|
7946
|
+
{ label: (0, import_i18n55.__)("Font size", "elementor"), value: "font-size", isDisabled: true },
|
|
7947
|
+
{ label: (0, import_i18n55.__)("Line height", "elementor"), value: "line-height", isDisabled: true },
|
|
7948
|
+
{ label: (0, import_i18n55.__)("Letter spacing", "elementor"), value: "letter-spacing", isDisabled: true },
|
|
7949
|
+
{ label: (0, import_i18n55.__)("Word spacing", "elementor"), value: "word-spacing", isDisabled: true },
|
|
7950
|
+
{ label: (0, import_i18n55.__)("Font variations", "elementor"), value: "font-variation-settings", isDisabled: true },
|
|
7951
|
+
{ label: (0, import_i18n55.__)("Text stroke color", "elementor"), value: "-webkit-text-stroke-color", isDisabled: true }
|
|
7392
7952
|
]
|
|
7393
7953
|
},
|
|
7394
7954
|
{
|
|
7395
|
-
label: (0,
|
|
7955
|
+
label: (0, import_i18n55.__)("Background", "elementor"),
|
|
7396
7956
|
type: "category",
|
|
7397
7957
|
properties: [
|
|
7398
|
-
{ label: (0,
|
|
7399
|
-
{ label: (0,
|
|
7400
|
-
{ label: (0,
|
|
7958
|
+
{ label: (0, import_i18n55.__)("Background color", "elementor"), value: "background-color", isDisabled: true },
|
|
7959
|
+
{ label: (0, import_i18n55.__)("Background position", "elementor"), value: "background-position", isDisabled: true },
|
|
7960
|
+
{ label: (0, import_i18n55.__)("Box shadow", "elementor"), value: "box-shadow", isDisabled: true }
|
|
7401
7961
|
]
|
|
7402
7962
|
},
|
|
7403
7963
|
{
|
|
7404
|
-
label: (0,
|
|
7964
|
+
label: (0, import_i18n55.__)("Border", "elementor"),
|
|
7405
7965
|
type: "category",
|
|
7406
7966
|
properties: [
|
|
7407
|
-
{ label: (0,
|
|
7408
|
-
{ label: (0,
|
|
7409
|
-
{ label: (0,
|
|
7410
|
-
{ label: (0,
|
|
7967
|
+
{ label: (0, import_i18n55.__)("Border (all)", "elementor"), value: "border", isDisabled: true },
|
|
7968
|
+
{ label: (0, import_i18n55.__)("Border radius", "elementor"), value: "border-radius", isDisabled: true },
|
|
7969
|
+
{ label: (0, import_i18n55.__)("Border color", "elementor"), value: "border-color", isDisabled: true },
|
|
7970
|
+
{ label: (0, import_i18n55.__)("Border width", "elementor"), value: "border-width", isDisabled: true }
|
|
7411
7971
|
]
|
|
7412
7972
|
},
|
|
7413
7973
|
{
|
|
7414
|
-
label: (0,
|
|
7974
|
+
label: (0, import_i18n55.__)("Effects", "elementor"),
|
|
7415
7975
|
type: "category",
|
|
7416
7976
|
properties: [
|
|
7417
|
-
{ label: (0,
|
|
7418
|
-
{ label: (0,
|
|
7419
|
-
{ label: (0,
|
|
7977
|
+
{ label: (0, import_i18n55.__)("Opacity", "elementor"), value: "opacity", isDisabled: true },
|
|
7978
|
+
{ label: (0, import_i18n55.__)("Transform (all)", "elementor"), value: "transform", isDisabled: true },
|
|
7979
|
+
{ label: (0, import_i18n55.__)("Filter (all)", "elementor"), value: "filter", isDisabled: true }
|
|
7420
7980
|
]
|
|
7421
7981
|
}
|
|
7422
7982
|
];
|
|
@@ -7452,13 +8012,13 @@ function subscribeToTransitionEvent() {
|
|
|
7452
8012
|
}
|
|
7453
8013
|
|
|
7454
8014
|
// src/controls/transition-control/transition-selector.tsx
|
|
7455
|
-
var
|
|
7456
|
-
var
|
|
8015
|
+
var React111 = __toESM(require("react"));
|
|
8016
|
+
var import_react65 = require("react");
|
|
7457
8017
|
var import_editor_props56 = require("@elementor/editor-props");
|
|
7458
|
-
var
|
|
7459
|
-
var
|
|
7460
|
-
var
|
|
7461
|
-
var
|
|
8018
|
+
var import_editor_ui15 = require("@elementor/editor-ui");
|
|
8019
|
+
var import_icons36 = require("@elementor/icons");
|
|
8020
|
+
var import_ui94 = require("@elementor/ui");
|
|
8021
|
+
var import_i18n56 = require("@wordpress/i18n");
|
|
7462
8022
|
|
|
7463
8023
|
// src/utils/tracking.ts
|
|
7464
8024
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
@@ -7539,9 +8099,9 @@ var TransitionSelector = ({
|
|
|
7539
8099
|
const {
|
|
7540
8100
|
key: { value: transitionLabel }
|
|
7541
8101
|
} = value;
|
|
7542
|
-
const defaultRef = (0,
|
|
7543
|
-
const popoverState = (0,
|
|
7544
|
-
const disabledCategories = (0,
|
|
8102
|
+
const defaultRef = (0, import_react65.useRef)(null);
|
|
8103
|
+
const popoverState = (0, import_ui94.usePopupState)({ variant: "popover" });
|
|
8104
|
+
const disabledCategories = (0, import_react65.useMemo)(() => {
|
|
7545
8105
|
return new Set(
|
|
7546
8106
|
transitionProperties.filter((cat) => cat.properties.some((prop) => prop.isDisabled)).map((cat) => cat.label)
|
|
7547
8107
|
);
|
|
@@ -7561,7 +8121,7 @@ var TransitionSelector = ({
|
|
|
7561
8121
|
return [
|
|
7562
8122
|
first,
|
|
7563
8123
|
{
|
|
7564
|
-
label: (0,
|
|
8124
|
+
label: (0, import_i18n56.__)("Recently Used", "elementor"),
|
|
7565
8125
|
items: recentItems
|
|
7566
8126
|
},
|
|
7567
8127
|
...rest
|
|
@@ -7585,27 +8145,27 @@ var TransitionSelector = ({
|
|
|
7585
8145
|
left: rect.right + 36
|
|
7586
8146
|
};
|
|
7587
8147
|
};
|
|
7588
|
-
return /* @__PURE__ */
|
|
7589
|
-
|
|
8148
|
+
return /* @__PURE__ */ React111.createElement(import_ui94.Box, { ref: defaultRef }, /* @__PURE__ */ React111.createElement(ControlActions, null, /* @__PURE__ */ React111.createElement(
|
|
8149
|
+
import_ui94.UnstableTag,
|
|
7590
8150
|
{
|
|
7591
8151
|
variant: "outlined",
|
|
7592
8152
|
label: transitionLabel,
|
|
7593
|
-
endIcon: /* @__PURE__ */
|
|
7594
|
-
...(0,
|
|
8153
|
+
endIcon: /* @__PURE__ */ React111.createElement(import_icons36.ChevronDownIcon, { fontSize: "tiny" }),
|
|
8154
|
+
...(0, import_ui94.bindTrigger)(popoverState),
|
|
7595
8155
|
fullWidth: true
|
|
7596
8156
|
}
|
|
7597
|
-
)), /* @__PURE__ */
|
|
7598
|
-
|
|
8157
|
+
)), /* @__PURE__ */ React111.createElement(
|
|
8158
|
+
import_ui94.Popover,
|
|
7599
8159
|
{
|
|
7600
8160
|
disablePortal: true,
|
|
7601
8161
|
disableScrollLock: true,
|
|
7602
|
-
...(0,
|
|
8162
|
+
...(0, import_ui94.bindPopover)(popoverState),
|
|
7603
8163
|
anchorReference: "anchorPosition",
|
|
7604
8164
|
anchorPosition: getAnchorPosition(),
|
|
7605
8165
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
7606
8166
|
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
7607
8167
|
},
|
|
7608
|
-
/* @__PURE__ */
|
|
8168
|
+
/* @__PURE__ */ React111.createElement(
|
|
7609
8169
|
ItemSelector,
|
|
7610
8170
|
{
|
|
7611
8171
|
itemsList: getItemList(),
|
|
@@ -7613,11 +8173,11 @@ var TransitionSelector = ({
|
|
|
7613
8173
|
onItemChange: handleTransitionPropertyChange,
|
|
7614
8174
|
onClose: popoverState.close,
|
|
7615
8175
|
sectionWidth: 268,
|
|
7616
|
-
title: (0,
|
|
7617
|
-
icon:
|
|
8176
|
+
title: (0, import_i18n56.__)("Transition Property", "elementor"),
|
|
8177
|
+
icon: import_icons36.VariationsIcon,
|
|
7618
8178
|
disabledItems: includeCurrentValueInOptions(value, disabledItems),
|
|
7619
|
-
categoryItemContentTemplate: (item) => /* @__PURE__ */
|
|
7620
|
-
|
|
8179
|
+
categoryItemContentTemplate: (item) => /* @__PURE__ */ React111.createElement(
|
|
8180
|
+
import_ui94.Box,
|
|
7621
8181
|
{
|
|
7622
8182
|
sx: {
|
|
7623
8183
|
display: "flex",
|
|
@@ -7626,13 +8186,13 @@ var TransitionSelector = ({
|
|
|
7626
8186
|
width: "100%"
|
|
7627
8187
|
}
|
|
7628
8188
|
},
|
|
7629
|
-
/* @__PURE__ */
|
|
7630
|
-
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */
|
|
8189
|
+
/* @__PURE__ */ React111.createElement("span", null, item.value),
|
|
8190
|
+
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */ React111.createElement(import_editor_ui15.PromotionChip, null)
|
|
7631
8191
|
),
|
|
7632
|
-
footer: showPromotion ? /* @__PURE__ */
|
|
7633
|
-
|
|
8192
|
+
footer: showPromotion ? /* @__PURE__ */ React111.createElement(
|
|
8193
|
+
import_editor_ui15.PromotionAlert,
|
|
7634
8194
|
{
|
|
7635
|
-
message: (0,
|
|
8195
|
+
message: (0, import_i18n56.__)(
|
|
7636
8196
|
"Upgrade to customize transition properties and control effects.",
|
|
7637
8197
|
"elementor"
|
|
7638
8198
|
),
|
|
@@ -7671,8 +8231,8 @@ var areAllPropertiesUsed = (value = []) => {
|
|
|
7671
8231
|
};
|
|
7672
8232
|
var getSelectionSizeProps = (recentlyUsedList, disabledItems, showPromotion) => {
|
|
7673
8233
|
return {
|
|
7674
|
-
selectionLabel: (0,
|
|
7675
|
-
sizeLabel: (0,
|
|
8234
|
+
selectionLabel: (0, import_i18n57.__)("Type", "elementor"),
|
|
8235
|
+
sizeLabel: (0, import_i18n57.__)("Duration", "elementor"),
|
|
7676
8236
|
selectionConfig: {
|
|
7677
8237
|
component: TransitionSelector,
|
|
7678
8238
|
props: {
|
|
@@ -7748,18 +8308,18 @@ var getInitialValue = (values = []) => {
|
|
|
7748
8308
|
}
|
|
7749
8309
|
return initialTransitionValue;
|
|
7750
8310
|
};
|
|
7751
|
-
var disableAddItemTooltipContent = /* @__PURE__ */
|
|
7752
|
-
|
|
8311
|
+
var disableAddItemTooltipContent = /* @__PURE__ */ React112.createElement(
|
|
8312
|
+
import_ui95.Alert,
|
|
7753
8313
|
{
|
|
7754
8314
|
sx: {
|
|
7755
8315
|
width: 280,
|
|
7756
8316
|
gap: 0.5
|
|
7757
8317
|
},
|
|
7758
8318
|
color: "secondary",
|
|
7759
|
-
icon: /* @__PURE__ */
|
|
8319
|
+
icon: /* @__PURE__ */ React112.createElement(import_icons37.InfoCircleFilledIcon, null)
|
|
7760
8320
|
},
|
|
7761
|
-
/* @__PURE__ */
|
|
7762
|
-
/* @__PURE__ */
|
|
8321
|
+
/* @__PURE__ */ React112.createElement(import_ui95.AlertTitle, null, (0, import_i18n57.__)("Transitions", "elementor")),
|
|
8322
|
+
/* @__PURE__ */ React112.createElement(import_ui95.Box, { component: "span" }, /* @__PURE__ */ React112.createElement(import_ui95.Typography, { variant: "body2" }, (0, import_i18n57.__)("Switch to 'Normal' state to add a transition.", "elementor")))
|
|
7763
8323
|
);
|
|
7764
8324
|
var TransitionRepeaterControl = createControl(
|
|
7765
8325
|
({
|
|
@@ -7767,14 +8327,14 @@ var TransitionRepeaterControl = createControl(
|
|
|
7767
8327
|
currentStyleState
|
|
7768
8328
|
}) => {
|
|
7769
8329
|
const currentStyleIsNormal = currentStyleState === null;
|
|
7770
|
-
const [recentlyUsedList, setRecentlyUsedList] = (0,
|
|
8330
|
+
const [recentlyUsedList, setRecentlyUsedList] = (0, import_react66.useState)([]);
|
|
7771
8331
|
const proInstalled = (0, import_utils7.hasProInstalled)();
|
|
7772
8332
|
const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
7773
|
-
const { allDisabled: disabledItems, proDisabled: proDisabledItems } = (0,
|
|
8333
|
+
const { allDisabled: disabledItems, proDisabled: proDisabledItems } = (0, import_react66.useMemo)(
|
|
7774
8334
|
() => getDisabledItemLabels(value),
|
|
7775
8335
|
[value]
|
|
7776
8336
|
);
|
|
7777
|
-
const allowedTransitionSet = (0,
|
|
8337
|
+
const allowedTransitionSet = (0, import_react66.useMemo)(() => {
|
|
7778
8338
|
const set = /* @__PURE__ */ new Set();
|
|
7779
8339
|
transitionProperties.forEach((category) => {
|
|
7780
8340
|
category.properties.forEach((prop) => {
|
|
@@ -7785,7 +8345,7 @@ var TransitionRepeaterControl = createControl(
|
|
|
7785
8345
|
});
|
|
7786
8346
|
return set;
|
|
7787
8347
|
}, [proInstalled]);
|
|
7788
|
-
(0,
|
|
8348
|
+
(0, import_react66.useEffect)(() => {
|
|
7789
8349
|
if (!value || value.length === 0) {
|
|
7790
8350
|
return;
|
|
7791
8351
|
}
|
|
@@ -7797,18 +8357,18 @@ var TransitionRepeaterControl = createControl(
|
|
|
7797
8357
|
setValue(sanitized);
|
|
7798
8358
|
}
|
|
7799
8359
|
}, [allowedTransitionSet]);
|
|
7800
|
-
(0,
|
|
8360
|
+
(0, import_react66.useEffect)(() => {
|
|
7801
8361
|
recentlyUsedListGetter().then(setRecentlyUsedList);
|
|
7802
8362
|
}, [recentlyUsedListGetter]);
|
|
7803
|
-
const allPropertiesUsed = (0,
|
|
8363
|
+
const allPropertiesUsed = (0, import_react66.useMemo)(() => areAllPropertiesUsed(value), [value]);
|
|
7804
8364
|
const isAddItemDisabled = !currentStyleIsNormal || allPropertiesUsed;
|
|
7805
|
-
return /* @__PURE__ */
|
|
8365
|
+
return /* @__PURE__ */ React112.createElement(
|
|
7806
8366
|
RepeatableControl,
|
|
7807
8367
|
{
|
|
7808
|
-
label: (0,
|
|
7809
|
-
repeaterLabel: (0,
|
|
8368
|
+
label: (0, import_i18n57.__)("Transitions", "elementor"),
|
|
8369
|
+
repeaterLabel: (0, import_i18n57.__)("Transitions", "elementor"),
|
|
7810
8370
|
patternLabel: "${value.selection.value.key.value}: ${value.size.value.size}${value.size.value.unit}",
|
|
7811
|
-
placeholder: (0,
|
|
8371
|
+
placeholder: (0, import_i18n57.__)("Empty Transition", "elementor"),
|
|
7812
8372
|
showDuplicate: false,
|
|
7813
8373
|
showToggle: true,
|
|
7814
8374
|
initialValues: getInitialValue(value),
|
|
@@ -7829,11 +8389,11 @@ var TransitionRepeaterControl = createControl(
|
|
|
7829
8389
|
);
|
|
7830
8390
|
|
|
7831
8391
|
// src/controls/date-time-control.tsx
|
|
7832
|
-
var
|
|
8392
|
+
var React113 = __toESM(require("react"));
|
|
7833
8393
|
var dayjs = __toESM(require("dayjs"));
|
|
7834
8394
|
var import_editor_props58 = require("@elementor/editor-props");
|
|
7835
8395
|
var import_editor_props59 = require("@elementor/editor-props");
|
|
7836
|
-
var
|
|
8396
|
+
var import_ui96 = require("@elementor/ui");
|
|
7837
8397
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
7838
8398
|
var TIME_FORMAT = "HH:mm";
|
|
7839
8399
|
var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
@@ -7877,8 +8437,8 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7877
8437
|
const base = dayjs.default();
|
|
7878
8438
|
return base.hour(h).minute(m).second(0).millisecond(0);
|
|
7879
8439
|
};
|
|
7880
|
-
return /* @__PURE__ */
|
|
7881
|
-
|
|
8440
|
+
return /* @__PURE__ */ React113.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React113.createElement(ControlActions, null, /* @__PURE__ */ React113.createElement(import_ui96.LocalizationProvider, null, /* @__PURE__ */ React113.createElement(import_ui96.Box, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React113.createElement(
|
|
8441
|
+
import_ui96.DatePicker,
|
|
7882
8442
|
{
|
|
7883
8443
|
value: parseDateValue(import_editor_props58.stringPropTypeUtil.extract(value?.date)),
|
|
7884
8444
|
onChange: (v) => handleChange({ date: v }, { bind: "date" }),
|
|
@@ -7889,8 +8449,8 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7889
8449
|
openPickerIcon: { fontSize: "tiny" }
|
|
7890
8450
|
}
|
|
7891
8451
|
}
|
|
7892
|
-
)), /* @__PURE__ */
|
|
7893
|
-
|
|
8452
|
+
)), /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React113.createElement(
|
|
8453
|
+
import_ui96.TimePicker,
|
|
7894
8454
|
{
|
|
7895
8455
|
value: parseTimeValue(import_editor_props58.stringPropTypeUtil.extract(value?.time)),
|
|
7896
8456
|
onChange: (v) => handleChange({ time: v }, { bind: "time" }),
|
|
@@ -7905,15 +8465,15 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7905
8465
|
});
|
|
7906
8466
|
|
|
7907
8467
|
// src/controls/date-range-control.tsx
|
|
7908
|
-
var
|
|
8468
|
+
var React115 = __toESM(require("react"));
|
|
7909
8469
|
var import_editor_props61 = require("@elementor/editor-props");
|
|
7910
|
-
var
|
|
7911
|
-
var
|
|
8470
|
+
var import_ui98 = require("@elementor/ui");
|
|
8471
|
+
var import_i18n58 = require("@wordpress/i18n");
|
|
7912
8472
|
|
|
7913
8473
|
// src/controls/date-string-control.tsx
|
|
7914
|
-
var
|
|
8474
|
+
var React114 = __toESM(require("react"));
|
|
7915
8475
|
var import_editor_props60 = require("@elementor/editor-props");
|
|
7916
|
-
var
|
|
8476
|
+
var import_ui97 = require("@elementor/ui");
|
|
7917
8477
|
|
|
7918
8478
|
// src/utils/date-time.ts
|
|
7919
8479
|
var dayjs2 = __toESM(require("dayjs"));
|
|
@@ -7970,8 +8530,8 @@ var DateStringControl = createControl(
|
|
|
7970
8530
|
}
|
|
7971
8531
|
setValue(newValue.format(format));
|
|
7972
8532
|
};
|
|
7973
|
-
return /* @__PURE__ */
|
|
7974
|
-
|
|
8533
|
+
return /* @__PURE__ */ React114.createElement(import_ui97.LocalizationProvider, null, /* @__PURE__ */ React114.createElement(ControlActions, null, /* @__PURE__ */ React114.createElement(
|
|
8534
|
+
import_ui97.DatePicker,
|
|
7975
8535
|
{
|
|
7976
8536
|
value: parseDateString(value ?? ""),
|
|
7977
8537
|
onChange: (newValue) => handleChange(newValue, DATE_FORMAT2),
|
|
@@ -7984,8 +8544,8 @@ var DateStringControl = createControl(
|
|
|
7984
8544
|
|
|
7985
8545
|
// src/controls/date-range-control.tsx
|
|
7986
8546
|
var RANGE_LABELS = {
|
|
7987
|
-
min: (0,
|
|
7988
|
-
max: (0,
|
|
8547
|
+
min: (0, import_i18n58.__)("Min date", "elementor"),
|
|
8548
|
+
max: (0, import_i18n58.__)("Max date", "elementor")
|
|
7989
8549
|
};
|
|
7990
8550
|
var isMaxBeforeMin = (minIso, maxIso) => {
|
|
7991
8551
|
if (!minIso || !maxIso) {
|
|
@@ -7993,40 +8553,40 @@ var isMaxBeforeMin = (minIso, maxIso) => {
|
|
|
7993
8553
|
}
|
|
7994
8554
|
return maxIso < minIso;
|
|
7995
8555
|
};
|
|
7996
|
-
var RANGE_ERROR_MESSAGE = (0,
|
|
8556
|
+
var RANGE_ERROR_MESSAGE = (0, import_i18n58.__)("Max date must be on or after Min date", "elementor");
|
|
7997
8557
|
var DateRangeControl = createControl(() => {
|
|
7998
8558
|
const { value, setValue, ...propContext } = useBoundProp(import_editor_props61.dateRangePropTypeUtil);
|
|
7999
8559
|
const minString = import_editor_props61.dateStringPropTypeUtil.extract(value?.min);
|
|
8000
8560
|
const maxString = import_editor_props61.dateStringPropTypeUtil.extract(value?.max);
|
|
8001
8561
|
const hasInvalidRange = isMaxBeforeMin(minString, maxString);
|
|
8002
|
-
return /* @__PURE__ */
|
|
8562
|
+
return /* @__PURE__ */ React115.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React115.createElement(import_ui98.Stack, { gap: 0.75 }, /* @__PURE__ */ React115.createElement(import_ui98.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React115.createElement(import_ui98.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React115.createElement(import_ui98.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(ControlFormLabel, null, RANGE_LABELS.min)), /* @__PURE__ */ React115.createElement(import_ui98.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(
|
|
8003
8563
|
BoundDateStringControl,
|
|
8004
8564
|
{
|
|
8005
8565
|
bind: "min",
|
|
8006
8566
|
ariaLabel: RANGE_LABELS.min,
|
|
8007
8567
|
error: hasInvalidRange
|
|
8008
8568
|
}
|
|
8009
|
-
))), /* @__PURE__ */
|
|
8569
|
+
))), /* @__PURE__ */ React115.createElement(import_ui98.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React115.createElement(import_ui98.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(ControlFormLabel, null, RANGE_LABELS.max)), /* @__PURE__ */ React115.createElement(import_ui98.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(
|
|
8010
8570
|
BoundDateStringControl,
|
|
8011
8571
|
{
|
|
8012
8572
|
bind: "max",
|
|
8013
8573
|
ariaLabel: RANGE_LABELS.max,
|
|
8014
8574
|
error: hasInvalidRange
|
|
8015
8575
|
}
|
|
8016
|
-
)))), hasInvalidRange && /* @__PURE__ */
|
|
8576
|
+
)))), hasInvalidRange && /* @__PURE__ */ React115.createElement(import_ui98.FormHelperText, { error: true }, RANGE_ERROR_MESSAGE)));
|
|
8017
8577
|
});
|
|
8018
8578
|
var BoundDateStringControl = ({
|
|
8019
8579
|
bind,
|
|
8020
8580
|
ariaLabel,
|
|
8021
8581
|
error
|
|
8022
8582
|
}) => {
|
|
8023
|
-
return /* @__PURE__ */
|
|
8583
|
+
return /* @__PURE__ */ React115.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React115.createElement(DateStringControl, { ariaLabel, error, coerceInvalidToNull: true }));
|
|
8024
8584
|
};
|
|
8025
8585
|
|
|
8026
8586
|
// src/controls/time-string-control.tsx
|
|
8027
|
-
var
|
|
8587
|
+
var React116 = __toESM(require("react"));
|
|
8028
8588
|
var import_editor_props62 = require("@elementor/editor-props");
|
|
8029
|
-
var
|
|
8589
|
+
var import_ui99 = require("@elementor/ui");
|
|
8030
8590
|
var TimeStringControl = createControl(
|
|
8031
8591
|
({ inputDisabled, ariaLabel, error, coerceInvalidToNull = false }) => {
|
|
8032
8592
|
const { value, setValue, disabled } = useBoundProp(import_editor_props62.timeStringPropTypeUtil);
|
|
@@ -8052,8 +8612,8 @@ var TimeStringControl = createControl(
|
|
|
8052
8612
|
}
|
|
8053
8613
|
setValue(newValue.format(format));
|
|
8054
8614
|
};
|
|
8055
|
-
return /* @__PURE__ */
|
|
8056
|
-
|
|
8615
|
+
return /* @__PURE__ */ React116.createElement(import_ui99.LocalizationProvider, null, /* @__PURE__ */ React116.createElement(ControlActions, null, /* @__PURE__ */ React116.createElement(
|
|
8616
|
+
import_ui99.TimePicker,
|
|
8057
8617
|
{
|
|
8058
8618
|
value: parseTimeString(value ?? ""),
|
|
8059
8619
|
onChange: (newValue) => handleChange(newValue, TIME_FORMAT2),
|
|
@@ -8065,32 +8625,32 @@ var TimeStringControl = createControl(
|
|
|
8065
8625
|
);
|
|
8066
8626
|
|
|
8067
8627
|
// src/controls/time-range-control.tsx
|
|
8068
|
-
var
|
|
8628
|
+
var React117 = __toESM(require("react"));
|
|
8069
8629
|
var import_editor_props63 = require("@elementor/editor-props");
|
|
8070
|
-
var
|
|
8071
|
-
var
|
|
8630
|
+
var import_ui100 = require("@elementor/ui");
|
|
8631
|
+
var import_i18n59 = require("@wordpress/i18n");
|
|
8072
8632
|
var RANGE_LABELS2 = {
|
|
8073
|
-
min: (0,
|
|
8074
|
-
max: (0,
|
|
8633
|
+
min: (0, import_i18n59.__)("Start time", "elementor"),
|
|
8634
|
+
max: (0, import_i18n59.__)("End time", "elementor")
|
|
8075
8635
|
};
|
|
8076
8636
|
var TimeRangeControl = createControl(() => {
|
|
8077
8637
|
const { value, setValue, ...propContext } = useBoundProp(import_editor_props63.timeRangePropTypeUtil);
|
|
8078
|
-
return /* @__PURE__ */
|
|
8638
|
+
return /* @__PURE__ */ React117.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React117.createElement(import_ui100.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React117.createElement(import_ui100.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React117.createElement(import_ui100.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(ControlFormLabel, null, RANGE_LABELS2.min)), /* @__PURE__ */ React117.createElement(import_ui100.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(BoundTimeStringControl, { bind: "min", ariaLabel: RANGE_LABELS2.min }))), /* @__PURE__ */ React117.createElement(import_ui100.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React117.createElement(import_ui100.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(ControlFormLabel, null, RANGE_LABELS2.max)), /* @__PURE__ */ React117.createElement(import_ui100.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(BoundTimeStringControl, { bind: "max", ariaLabel: RANGE_LABELS2.max })))));
|
|
8079
8639
|
});
|
|
8080
8640
|
var BoundTimeStringControl = ({ bind, ariaLabel }) => {
|
|
8081
|
-
return /* @__PURE__ */
|
|
8641
|
+
return /* @__PURE__ */ React117.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React117.createElement(TimeStringControl, { ariaLabel, coerceInvalidToNull: true }));
|
|
8082
8642
|
};
|
|
8083
8643
|
|
|
8084
8644
|
// src/controls/inline-editing-control.tsx
|
|
8085
|
-
var
|
|
8086
|
-
var
|
|
8645
|
+
var React121 = __toESM(require("react"));
|
|
8646
|
+
var import_react72 = require("react");
|
|
8087
8647
|
var import_editor_props65 = require("@elementor/editor-props");
|
|
8088
|
-
var
|
|
8648
|
+
var import_ui104 = require("@elementor/ui");
|
|
8089
8649
|
|
|
8090
8650
|
// src/components/inline-editor.tsx
|
|
8091
|
-
var
|
|
8092
|
-
var
|
|
8093
|
-
var
|
|
8651
|
+
var React118 = __toESM(require("react"));
|
|
8652
|
+
var import_react67 = require("react");
|
|
8653
|
+
var import_ui101 = require("@elementor/ui");
|
|
8094
8654
|
var import_extension_bold = __toESM(require("@tiptap/extension-bold"));
|
|
8095
8655
|
var import_extension_document = __toESM(require("@tiptap/extension-document"));
|
|
8096
8656
|
var import_extension_hard_break = __toESM(require("@tiptap/extension-hard-break"));
|
|
@@ -8103,7 +8663,7 @@ var import_extension_subscript = __toESM(require("@tiptap/extension-subscript"))
|
|
|
8103
8663
|
var import_extension_superscript = __toESM(require("@tiptap/extension-superscript"));
|
|
8104
8664
|
var import_extension_text = __toESM(require("@tiptap/extension-text"));
|
|
8105
8665
|
var import_extension_underline = __toESM(require("@tiptap/extension-underline"));
|
|
8106
|
-
var
|
|
8666
|
+
var import_react68 = require("@tiptap/react");
|
|
8107
8667
|
|
|
8108
8668
|
// src/utils/inline-editing.ts
|
|
8109
8669
|
var import_editor_props64 = require("@elementor/editor-props");
|
|
@@ -8135,7 +8695,7 @@ function extractInlineHtmlContent(propValue) {
|
|
|
8135
8695
|
var ITALIC_KEYBOARD_SHORTCUT = "i";
|
|
8136
8696
|
var BOLD_KEYBOARD_SHORTCUT = "b";
|
|
8137
8697
|
var UNDERLINE_KEYBOARD_SHORTCUT = "u";
|
|
8138
|
-
var InlineEditor =
|
|
8698
|
+
var InlineEditor = React118.forwardRef((props, ref) => {
|
|
8139
8699
|
const {
|
|
8140
8700
|
value,
|
|
8141
8701
|
setValue,
|
|
@@ -8152,8 +8712,8 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8152
8712
|
onSelectionEnd,
|
|
8153
8713
|
mountElement = null
|
|
8154
8714
|
} = props;
|
|
8155
|
-
const containerRef = (0,
|
|
8156
|
-
const onBlurRef = (0,
|
|
8715
|
+
const containerRef = (0, import_react67.useRef)(null);
|
|
8716
|
+
const onBlurRef = (0, import_react67.useRef)(onBlur);
|
|
8157
8717
|
onBlurRef.current = onBlur;
|
|
8158
8718
|
const documentContentSettings = !!expectedTag ? "block+" : "inline*";
|
|
8159
8719
|
const onUpdate = ({ editor: updatedEditor }) => {
|
|
@@ -8175,7 +8735,7 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8175
8735
|
...HTMLAttributes,
|
|
8176
8736
|
class: elementClasses
|
|
8177
8737
|
});
|
|
8178
|
-
const editor = (0,
|
|
8738
|
+
const editor = (0, import_react68.useEditor)({
|
|
8179
8739
|
...mountElement ? { element: mountElement } : {},
|
|
8180
8740
|
extensions: [
|
|
8181
8741
|
import_extension_document.default.extend({
|
|
@@ -8248,11 +8808,11 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8248
8808
|
if (mountElement) {
|
|
8249
8809
|
return null;
|
|
8250
8810
|
}
|
|
8251
|
-
return /* @__PURE__ */
|
|
8811
|
+
return /* @__PURE__ */ React118.createElement(import_ui101.Box, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React118.createElement(import_react68.EditorContent, { ref, editor }));
|
|
8252
8812
|
});
|
|
8253
8813
|
var useOnUpdate = (callback, dependencies) => {
|
|
8254
|
-
const hasMounted = (0,
|
|
8255
|
-
(0,
|
|
8814
|
+
const hasMounted = (0, import_react67.useRef)(false);
|
|
8815
|
+
(0, import_react67.useEffect)(() => {
|
|
8256
8816
|
if (hasMounted.current) {
|
|
8257
8817
|
callback();
|
|
8258
8818
|
} else {
|
|
@@ -8262,20 +8822,20 @@ var useOnUpdate = (callback, dependencies) => {
|
|
|
8262
8822
|
};
|
|
8263
8823
|
|
|
8264
8824
|
// src/components/inline-editor-toolbar.tsx
|
|
8265
|
-
var
|
|
8266
|
-
var
|
|
8825
|
+
var React120 = __toESM(require("react"));
|
|
8826
|
+
var import_react70 = require("react");
|
|
8267
8827
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
8268
|
-
var
|
|
8269
|
-
var
|
|
8270
|
-
var
|
|
8271
|
-
var
|
|
8828
|
+
var import_icons39 = require("@elementor/icons");
|
|
8829
|
+
var import_ui103 = require("@elementor/ui");
|
|
8830
|
+
var import_react71 = require("@tiptap/react");
|
|
8831
|
+
var import_i18n61 = require("@wordpress/i18n");
|
|
8272
8832
|
|
|
8273
8833
|
// src/components/url-popover.tsx
|
|
8274
|
-
var
|
|
8275
|
-
var
|
|
8276
|
-
var
|
|
8277
|
-
var
|
|
8278
|
-
var
|
|
8834
|
+
var React119 = __toESM(require("react"));
|
|
8835
|
+
var import_react69 = require("react");
|
|
8836
|
+
var import_icons38 = require("@elementor/icons");
|
|
8837
|
+
var import_ui102 = require("@elementor/ui");
|
|
8838
|
+
var import_i18n60 = require("@wordpress/i18n");
|
|
8279
8839
|
var UrlPopover = ({
|
|
8280
8840
|
popupState,
|
|
8281
8841
|
restoreValue,
|
|
@@ -8285,8 +8845,8 @@ var UrlPopover = ({
|
|
|
8285
8845
|
openInNewTab,
|
|
8286
8846
|
onToggleNewTab
|
|
8287
8847
|
}) => {
|
|
8288
|
-
const inputRef = (0,
|
|
8289
|
-
(0,
|
|
8848
|
+
const inputRef = (0, import_react69.useRef)(null);
|
|
8849
|
+
(0, import_react69.useEffect)(() => {
|
|
8290
8850
|
if (popupState.isOpen) {
|
|
8291
8851
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
8292
8852
|
}
|
|
@@ -8295,41 +8855,41 @@ var UrlPopover = ({
|
|
|
8295
8855
|
restoreValue();
|
|
8296
8856
|
popupState.close();
|
|
8297
8857
|
};
|
|
8298
|
-
return /* @__PURE__ */
|
|
8299
|
-
|
|
8858
|
+
return /* @__PURE__ */ React119.createElement(
|
|
8859
|
+
import_ui102.Popover,
|
|
8300
8860
|
{
|
|
8301
8861
|
slotProps: {
|
|
8302
8862
|
paper: { sx: { borderRadius: "16px", width: anchorRef.current?.offsetWidth + "px", marginTop: -1 } }
|
|
8303
8863
|
},
|
|
8304
|
-
...(0,
|
|
8864
|
+
...(0, import_ui102.bindPopover)(popupState),
|
|
8305
8865
|
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
8306
8866
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
8307
8867
|
onClose: handleClose
|
|
8308
8868
|
},
|
|
8309
|
-
/* @__PURE__ */
|
|
8310
|
-
|
|
8869
|
+
/* @__PURE__ */ React119.createElement(import_ui102.Stack, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React119.createElement(
|
|
8870
|
+
import_ui102.TextField,
|
|
8311
8871
|
{
|
|
8312
8872
|
value,
|
|
8313
8873
|
onChange,
|
|
8314
8874
|
size: "tiny",
|
|
8315
8875
|
fullWidth: true,
|
|
8316
|
-
placeholder: (0,
|
|
8876
|
+
placeholder: (0, import_i18n60.__)("Type a URL", "elementor"),
|
|
8317
8877
|
inputProps: { ref: inputRef },
|
|
8318
8878
|
color: "secondary",
|
|
8319
8879
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
8320
8880
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
8321
8881
|
}
|
|
8322
|
-
), /* @__PURE__ */
|
|
8323
|
-
|
|
8882
|
+
), /* @__PURE__ */ React119.createElement(import_ui102.Tooltip, { title: (0, import_i18n60.__)("Open in a new tab", "elementor") }, /* @__PURE__ */ React119.createElement(
|
|
8883
|
+
import_ui102.ToggleButton,
|
|
8324
8884
|
{
|
|
8325
8885
|
size: "tiny",
|
|
8326
8886
|
value: "newTab",
|
|
8327
8887
|
selected: openInNewTab,
|
|
8328
8888
|
onClick: onToggleNewTab,
|
|
8329
|
-
"aria-label": (0,
|
|
8889
|
+
"aria-label": (0, import_i18n60.__)("Open in a new tab", "elementor"),
|
|
8330
8890
|
sx: { borderRadius: "8px" }
|
|
8331
8891
|
},
|
|
8332
|
-
/* @__PURE__ */
|
|
8892
|
+
/* @__PURE__ */ React119.createElement(import_icons38.ExternalLinkIcon, { fontSize: "tiny" })
|
|
8333
8893
|
)))
|
|
8334
8894
|
);
|
|
8335
8895
|
};
|
|
@@ -8341,16 +8901,16 @@ var InlineEditorToolbar = ({
|
|
|
8341
8901
|
sx = {},
|
|
8342
8902
|
inControlPanel = false
|
|
8343
8903
|
}) => {
|
|
8344
|
-
const [urlValue, setUrlValue] = (0,
|
|
8345
|
-
const [openInNewTab, setOpenInNewTab] = (0,
|
|
8346
|
-
const toolbarRef = (0,
|
|
8347
|
-
const linkPopupState = (0,
|
|
8904
|
+
const [urlValue, setUrlValue] = (0, import_react70.useState)("");
|
|
8905
|
+
const [openInNewTab, setOpenInNewTab] = (0, import_react70.useState)(false);
|
|
8906
|
+
const toolbarRef = (0, import_react70.useRef)(null);
|
|
8907
|
+
const linkPopupState = (0, import_ui103.usePopupState)({ variant: "popover" });
|
|
8348
8908
|
const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
|
|
8349
|
-
const editorState = (0,
|
|
8909
|
+
const editorState = (0, import_react71.useEditorState)({
|
|
8350
8910
|
editor,
|
|
8351
8911
|
selector: (ctx) => possibleFormats.filter((format) => ctx.editor.isActive(format))
|
|
8352
8912
|
});
|
|
8353
|
-
const formatButtonsList = (0,
|
|
8913
|
+
const formatButtonsList = (0, import_react70.useMemo)(() => {
|
|
8354
8914
|
const buttons = Object.values(formatButtons);
|
|
8355
8915
|
if (isElementClickable) {
|
|
8356
8916
|
return buttons.filter((button) => button.action !== "link");
|
|
@@ -8387,13 +8947,13 @@ var InlineEditorToolbar = ({
|
|
|
8387
8947
|
}
|
|
8388
8948
|
linkPopupState.close();
|
|
8389
8949
|
};
|
|
8390
|
-
(0,
|
|
8950
|
+
(0, import_react70.useEffect)(() => {
|
|
8391
8951
|
if (!inControlPanel) {
|
|
8392
8952
|
editor?.commands?.focus();
|
|
8393
8953
|
}
|
|
8394
8954
|
}, [editor, inControlPanel]);
|
|
8395
|
-
return /* @__PURE__ */
|
|
8396
|
-
|
|
8955
|
+
return /* @__PURE__ */ React120.createElement(
|
|
8956
|
+
import_ui103.Box,
|
|
8397
8957
|
{
|
|
8398
8958
|
ref: toolbarRef,
|
|
8399
8959
|
sx: {
|
|
@@ -8426,9 +8986,9 @@ var InlineEditorToolbar = ({
|
|
|
8426
8986
|
}
|
|
8427
8987
|
}
|
|
8428
8988
|
},
|
|
8429
|
-
/* @__PURE__ */
|
|
8430
|
-
/* @__PURE__ */
|
|
8431
|
-
|
|
8989
|
+
/* @__PURE__ */ React120.createElement(import_ui103.Tooltip, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React120.createElement(import_ui103.IconButton, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
8990
|
+
/* @__PURE__ */ React120.createElement(
|
|
8991
|
+
import_ui103.ToggleButtonGroup,
|
|
8432
8992
|
{
|
|
8433
8993
|
value: editorState,
|
|
8434
8994
|
size: "tiny",
|
|
@@ -8436,7 +8996,7 @@ var InlineEditorToolbar = ({
|
|
|
8436
8996
|
display: "flex",
|
|
8437
8997
|
gap: 0.5,
|
|
8438
8998
|
border: "none",
|
|
8439
|
-
[`& .${
|
|
8999
|
+
[`& .${import_ui103.toggleButtonGroupClasses.firstButton}, & .${import_ui103.toggleButtonGroupClasses.middleButton}, & .${import_ui103.toggleButtonGroupClasses.lastButton}`]: {
|
|
8440
9000
|
borderRadius: "8px",
|
|
8441
9001
|
border: "none",
|
|
8442
9002
|
marginLeft: 0,
|
|
@@ -8457,8 +9017,8 @@ var InlineEditorToolbar = ({
|
|
|
8457
9017
|
}
|
|
8458
9018
|
}
|
|
8459
9019
|
},
|
|
8460
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
8461
|
-
|
|
9020
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React120.createElement(import_ui103.Tooltip, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React120.createElement(
|
|
9021
|
+
import_ui103.ToggleButton,
|
|
8462
9022
|
{
|
|
8463
9023
|
value: button.action,
|
|
8464
9024
|
"aria-label": button.label,
|
|
@@ -8475,7 +9035,7 @@ var InlineEditorToolbar = ({
|
|
|
8475
9035
|
button.icon
|
|
8476
9036
|
)))
|
|
8477
9037
|
),
|
|
8478
|
-
/* @__PURE__ */
|
|
9038
|
+
/* @__PURE__ */ React120.createElement(
|
|
8479
9039
|
UrlPopover,
|
|
8480
9040
|
{
|
|
8481
9041
|
popupState: linkPopupState,
|
|
@@ -8498,64 +9058,64 @@ var checkIfElementIsClickable = (elementId) => {
|
|
|
8498
9058
|
};
|
|
8499
9059
|
var toolbarButtons = {
|
|
8500
9060
|
clear: {
|
|
8501
|
-
label: (0,
|
|
8502
|
-
icon: /* @__PURE__ */
|
|
9061
|
+
label: (0, import_i18n61.__)("Clear", "elementor"),
|
|
9062
|
+
icon: /* @__PURE__ */ React120.createElement(import_icons39.MinusIcon, { fontSize: "tiny" }),
|
|
8503
9063
|
action: "clear",
|
|
8504
9064
|
method: (editor) => {
|
|
8505
9065
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
8506
9066
|
}
|
|
8507
9067
|
},
|
|
8508
9068
|
bold: {
|
|
8509
|
-
label: (0,
|
|
8510
|
-
icon: /* @__PURE__ */
|
|
9069
|
+
label: (0, import_i18n61.__)("Bold", "elementor"),
|
|
9070
|
+
icon: /* @__PURE__ */ React120.createElement(import_icons39.BoldIcon, { fontSize: "tiny" }),
|
|
8511
9071
|
action: "bold",
|
|
8512
9072
|
method: (editor) => {
|
|
8513
9073
|
editor.chain().focus().toggleBold().run();
|
|
8514
9074
|
}
|
|
8515
9075
|
},
|
|
8516
9076
|
italic: {
|
|
8517
|
-
label: (0,
|
|
8518
|
-
icon: /* @__PURE__ */
|
|
9077
|
+
label: (0, import_i18n61.__)("Italic", "elementor"),
|
|
9078
|
+
icon: /* @__PURE__ */ React120.createElement(import_icons39.ItalicIcon, { fontSize: "tiny" }),
|
|
8519
9079
|
action: "italic",
|
|
8520
9080
|
method: (editor) => {
|
|
8521
9081
|
editor.chain().focus().toggleItalic().run();
|
|
8522
9082
|
}
|
|
8523
9083
|
},
|
|
8524
9084
|
underline: {
|
|
8525
|
-
label: (0,
|
|
8526
|
-
icon: /* @__PURE__ */
|
|
9085
|
+
label: (0, import_i18n61.__)("Underline", "elementor"),
|
|
9086
|
+
icon: /* @__PURE__ */ React120.createElement(import_icons39.UnderlineIcon, { fontSize: "tiny" }),
|
|
8527
9087
|
action: "underline",
|
|
8528
9088
|
method: (editor) => {
|
|
8529
9089
|
editor.chain().focus().toggleUnderline().run();
|
|
8530
9090
|
}
|
|
8531
9091
|
},
|
|
8532
9092
|
strike: {
|
|
8533
|
-
label: (0,
|
|
8534
|
-
icon: /* @__PURE__ */
|
|
9093
|
+
label: (0, import_i18n61.__)("Strikethrough", "elementor"),
|
|
9094
|
+
icon: /* @__PURE__ */ React120.createElement(import_icons39.StrikethroughIcon, { fontSize: "tiny" }),
|
|
8535
9095
|
action: "strike",
|
|
8536
9096
|
method: (editor) => {
|
|
8537
9097
|
editor.chain().focus().toggleStrike().run();
|
|
8538
9098
|
}
|
|
8539
9099
|
},
|
|
8540
9100
|
superscript: {
|
|
8541
|
-
label: (0,
|
|
8542
|
-
icon: /* @__PURE__ */
|
|
9101
|
+
label: (0, import_i18n61.__)("Superscript", "elementor"),
|
|
9102
|
+
icon: /* @__PURE__ */ React120.createElement(import_icons39.SuperscriptIcon, { fontSize: "tiny" }),
|
|
8543
9103
|
action: "superscript",
|
|
8544
9104
|
method: (editor) => {
|
|
8545
9105
|
editor.chain().focus().toggleSuperscript().run();
|
|
8546
9106
|
}
|
|
8547
9107
|
},
|
|
8548
9108
|
subscript: {
|
|
8549
|
-
label: (0,
|
|
8550
|
-
icon: /* @__PURE__ */
|
|
9109
|
+
label: (0, import_i18n61.__)("Subscript", "elementor"),
|
|
9110
|
+
icon: /* @__PURE__ */ React120.createElement(import_icons39.SubscriptIcon, { fontSize: "tiny" }),
|
|
8551
9111
|
action: "subscript",
|
|
8552
9112
|
method: (editor) => {
|
|
8553
9113
|
editor.chain().focus().toggleSubscript().run();
|
|
8554
9114
|
}
|
|
8555
9115
|
},
|
|
8556
9116
|
link: {
|
|
8557
|
-
label: (0,
|
|
8558
|
-
icon: /* @__PURE__ */
|
|
9117
|
+
label: (0, import_i18n61.__)("Link", "elementor"),
|
|
9118
|
+
icon: /* @__PURE__ */ React120.createElement(import_icons39.LinkIcon, { fontSize: "tiny" }),
|
|
8559
9119
|
action: "link",
|
|
8560
9120
|
method: null
|
|
8561
9121
|
}
|
|
@@ -8568,15 +9128,15 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8568
9128
|
const { setValue, placeholder, value } = useBoundProp(import_editor_props65.escapedHtmlPropTypeUtil);
|
|
8569
9129
|
const { value: rawValue } = usePropKeyContext();
|
|
8570
9130
|
const content = value ?? extractInlineHtmlContent(rawValue);
|
|
8571
|
-
const [editor, setEditor] = (0,
|
|
8572
|
-
const handleChange = (0,
|
|
9131
|
+
const [editor, setEditor] = (0, import_react72.useState)(null);
|
|
9132
|
+
const handleChange = (0, import_react72.useCallback)(
|
|
8573
9133
|
(newValue) => {
|
|
8574
9134
|
const html = newValue ?? "";
|
|
8575
9135
|
setValue(html);
|
|
8576
9136
|
},
|
|
8577
9137
|
[setValue]
|
|
8578
9138
|
);
|
|
8579
|
-
return /* @__PURE__ */
|
|
9139
|
+
return /* @__PURE__ */ React121.createElement(ControlActions, null, /* @__PURE__ */ React121.createElement(import_ui104.Box, { sx: { position: "relative" } }, editor && editor.isEditable && /* @__PURE__ */ React121.createElement(
|
|
8580
9140
|
InlineEditorToolbar,
|
|
8581
9141
|
{
|
|
8582
9142
|
editor,
|
|
@@ -8589,8 +9149,8 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8589
9149
|
}),
|
|
8590
9150
|
inControlPanel: true
|
|
8591
9151
|
}
|
|
8592
|
-
), /* @__PURE__ */
|
|
8593
|
-
|
|
9152
|
+
), /* @__PURE__ */ React121.createElement(
|
|
9153
|
+
import_ui104.Box,
|
|
8594
9154
|
{
|
|
8595
9155
|
sx: (theme) => ({
|
|
8596
9156
|
p: 0.8,
|
|
@@ -8634,7 +9194,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8634
9194
|
...attributes,
|
|
8635
9195
|
...props
|
|
8636
9196
|
},
|
|
8637
|
-
/* @__PURE__ */
|
|
9197
|
+
/* @__PURE__ */ React121.createElement(
|
|
8638
9198
|
InlineEditor,
|
|
8639
9199
|
{
|
|
8640
9200
|
value: content,
|
|
@@ -8651,17 +9211,17 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8651
9211
|
});
|
|
8652
9212
|
|
|
8653
9213
|
// src/controls/email-form-action-control/index.tsx
|
|
8654
|
-
var
|
|
9214
|
+
var React125 = __toESM(require("react"));
|
|
8655
9215
|
var import_editor_props68 = require("@elementor/editor-props");
|
|
8656
|
-
var
|
|
8657
|
-
var
|
|
8658
|
-
var
|
|
9216
|
+
var import_editor_ui17 = require("@elementor/editor-ui");
|
|
9217
|
+
var import_ui108 = require("@elementor/ui");
|
|
9218
|
+
var import_i18n63 = require("@wordpress/i18n");
|
|
8659
9219
|
|
|
8660
9220
|
// src/controls/email-form-action-control/fields.tsx
|
|
8661
|
-
var
|
|
8662
|
-
var
|
|
8663
|
-
var
|
|
8664
|
-
var
|
|
9221
|
+
var React124 = __toESM(require("react"));
|
|
9222
|
+
var import_editor_ui16 = require("@elementor/editor-ui");
|
|
9223
|
+
var import_ui107 = require("@elementor/ui");
|
|
9224
|
+
var import_i18n62 = require("@wordpress/i18n");
|
|
8665
9225
|
|
|
8666
9226
|
// src/hooks/use-form-field-suggestions.ts
|
|
8667
9227
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
@@ -8750,10 +9310,10 @@ function useFormFieldSuggestions(options) {
|
|
|
8750
9310
|
}
|
|
8751
9311
|
|
|
8752
9312
|
// src/controls/email-form-action-control/email-chips-field.tsx
|
|
8753
|
-
var
|
|
8754
|
-
var
|
|
9313
|
+
var React122 = __toESM(require("react"));
|
|
9314
|
+
var import_react73 = require("react");
|
|
8755
9315
|
var import_editor_props67 = require("@elementor/editor-props");
|
|
8756
|
-
var
|
|
9316
|
+
var import_ui105 = require("@elementor/ui");
|
|
8757
9317
|
|
|
8758
9318
|
// src/controls/email-form-action-control/utils.ts
|
|
8759
9319
|
var import_schema = require("@elementor/schema");
|
|
@@ -8789,10 +9349,10 @@ function resolveMention(raw, suggestions) {
|
|
|
8789
9349
|
}
|
|
8790
9350
|
var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
8791
9351
|
const { value, setValue, disabled } = useBoundProp(import_editor_props67.stringArrayPropTypeUtil);
|
|
8792
|
-
const [inputValue, setInputValue] = (0,
|
|
9352
|
+
const [inputValue, setInputValue] = (0, import_react73.useState)("");
|
|
8793
9353
|
const items2 = value || [];
|
|
8794
9354
|
const selectedValues = items2.map((item) => import_editor_props67.stringPropTypeUtil.extract(item)).filter((val) => val !== null);
|
|
8795
|
-
const suggestionOptions = (0,
|
|
9355
|
+
const suggestionOptions = (0, import_react73.useMemo)(
|
|
8796
9356
|
() => suggestions.map((suggestion) => `[${suggestion.value}]`),
|
|
8797
9357
|
[suggestions]
|
|
8798
9358
|
);
|
|
@@ -8827,8 +9387,8 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8827
9387
|
tryAddChip(inputValue);
|
|
8828
9388
|
}
|
|
8829
9389
|
};
|
|
8830
|
-
return /* @__PURE__ */
|
|
8831
|
-
|
|
9390
|
+
return /* @__PURE__ */ React122.createElement(ControlActions, null, /* @__PURE__ */ React122.createElement(
|
|
9391
|
+
import_ui105.Autocomplete,
|
|
8832
9392
|
{
|
|
8833
9393
|
fullWidth: true,
|
|
8834
9394
|
multiple: true,
|
|
@@ -8852,99 +9412,99 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8852
9412
|
onBlur: handleBlur,
|
|
8853
9413
|
getOptionLabel: (option) => option,
|
|
8854
9414
|
isOptionEqualToValue: (option, val) => option === val,
|
|
8855
|
-
renderInput: (params) => /* @__PURE__ */
|
|
8856
|
-
renderTags: (tagValues, getTagProps) => /* @__PURE__ */
|
|
9415
|
+
renderInput: (params) => /* @__PURE__ */ React122.createElement(import_ui105.TextField, { ...params, placeholder, onKeyDown: handleKeyDown }),
|
|
9416
|
+
renderTags: (tagValues, getTagProps) => /* @__PURE__ */ React122.createElement(ChipsList, { getLabel: (option) => option, getTagProps, values: tagValues })
|
|
8857
9417
|
}
|
|
8858
9418
|
));
|
|
8859
9419
|
});
|
|
8860
|
-
var EmailChipsField = ({ fieldLabel, placeholder, suggestions }) => /* @__PURE__ */
|
|
9420
|
+
var EmailChipsField = ({ fieldLabel, placeholder, suggestions }) => /* @__PURE__ */ React122.createElement(import_ui105.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React122.createElement(import_ui105.Grid, { item: true }, /* @__PURE__ */ React122.createElement(ControlFormLabel, null, fieldLabel)), /* @__PURE__ */ React122.createElement(import_ui105.Grid, { item: true }, /* @__PURE__ */ React122.createElement(EmailChipsControl, { placeholder, suggestions })));
|
|
8861
9421
|
|
|
8862
9422
|
// src/controls/email-form-action-control/email-field.tsx
|
|
8863
|
-
var
|
|
8864
|
-
var
|
|
8865
|
-
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */
|
|
9423
|
+
var React123 = __toESM(require("react"));
|
|
9424
|
+
var import_ui106 = require("@elementor/ui");
|
|
9425
|
+
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React123.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React123.createElement(import_ui106.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React123.createElement(import_ui106.Grid, { item: true }, /* @__PURE__ */ React123.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React123.createElement(import_ui106.Grid, { item: true }, /* @__PURE__ */ React123.createElement(TextControl, { placeholder }))));
|
|
8866
9426
|
|
|
8867
9427
|
// src/controls/email-form-action-control/fields.tsx
|
|
8868
9428
|
var SendToField = ({ placeholder }) => {
|
|
8869
9429
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8870
|
-
return /* @__PURE__ */
|
|
9430
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "to" }, /* @__PURE__ */ React124.createElement(import_ui107.Stack, { gap: 0.5 }, /* @__PURE__ */ React124.createElement(
|
|
8871
9431
|
EmailChipsField,
|
|
8872
9432
|
{
|
|
8873
|
-
fieldLabel: (0,
|
|
9433
|
+
fieldLabel: (0, import_i18n62.__)("Send to", "elementor"),
|
|
8874
9434
|
placeholder,
|
|
8875
9435
|
suggestions
|
|
8876
9436
|
}
|
|
8877
|
-
), shouldShowMentionsInfo() && /* @__PURE__ */
|
|
9437
|
+
), shouldShowMentionsInfo() && /* @__PURE__ */ React124.createElement(import_editor_ui16.InfoAlert, null, (0, import_i18n62.__)("Type @ or an email field name to insert its submitted value.", "elementor"))));
|
|
8878
9438
|
};
|
|
8879
|
-
var SubjectField = () => /* @__PURE__ */
|
|
9439
|
+
var SubjectField = () => /* @__PURE__ */ React124.createElement(
|
|
8880
9440
|
EmailField,
|
|
8881
9441
|
{
|
|
8882
9442
|
bind: "subject",
|
|
8883
|
-
label: (0,
|
|
8884
|
-
placeholder: (0,
|
|
9443
|
+
label: (0, import_i18n62.__)("Email subject", "elementor"),
|
|
9444
|
+
placeholder: (0, import_i18n62.__)("New form submission", "elementor")
|
|
8885
9445
|
}
|
|
8886
9446
|
);
|
|
8887
9447
|
var MessageField = () => {
|
|
8888
9448
|
const suggestions = useFormFieldSuggestions();
|
|
8889
|
-
return /* @__PURE__ */
|
|
9449
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "message" }, /* @__PURE__ */ React124.createElement(import_ui107.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React124.createElement(import_ui107.Grid, { item: true }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, (0, import_i18n62.__)("Message", "elementor"))), /* @__PURE__ */ React124.createElement(import_ui107.Grid, { item: true }, /* @__PURE__ */ React124.createElement(MentionTextAreaControl, { suggestions })), /* @__PURE__ */ React124.createElement(import_ui107.Grid, { item: true }, /* @__PURE__ */ React124.createElement(import_editor_ui16.InfoAlert, null, shouldShowMentionsInfo() ? (0, import_i18n62.__)(
|
|
8890
9450
|
"[all-fields] shortcode sends all fields. Type @ to insert specific fields and customize your message.",
|
|
8891
9451
|
"elementor"
|
|
8892
|
-
) : (0,
|
|
9452
|
+
) : (0, import_i18n62.__)("[all-fields] shortcode sends all fields.", "elementor")))));
|
|
8893
9453
|
};
|
|
8894
|
-
var FromEmailField = () => /* @__PURE__ */
|
|
9454
|
+
var FromEmailField = () => /* @__PURE__ */ React124.createElement(
|
|
8895
9455
|
EmailField,
|
|
8896
9456
|
{
|
|
8897
9457
|
bind: "from",
|
|
8898
|
-
label: (0,
|
|
8899
|
-
placeholder: (0,
|
|
9458
|
+
label: (0, import_i18n62.__)("From email", "elementor"),
|
|
9459
|
+
placeholder: (0, import_i18n62.__)("What email should appear as the sender?", "elementor")
|
|
8900
9460
|
}
|
|
8901
9461
|
);
|
|
8902
|
-
var FromNameField = () => /* @__PURE__ */
|
|
9462
|
+
var FromNameField = () => /* @__PURE__ */ React124.createElement(
|
|
8903
9463
|
EmailField,
|
|
8904
9464
|
{
|
|
8905
9465
|
bind: "from-name",
|
|
8906
|
-
label: (0,
|
|
8907
|
-
placeholder: (0,
|
|
9466
|
+
label: (0, import_i18n62.__)("From name", "elementor"),
|
|
9467
|
+
placeholder: (0, import_i18n62.__)("What name should appear as the sender?", "elementor")
|
|
8908
9468
|
}
|
|
8909
9469
|
);
|
|
8910
9470
|
var ReplyToField = () => {
|
|
8911
9471
|
const emailSuggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8912
|
-
return /* @__PURE__ */
|
|
9472
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "reply-to" }, /* @__PURE__ */ React124.createElement(import_ui107.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React124.createElement(import_ui107.Grid, { item: true }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, (0, import_i18n62.__)("Reply-to", "elementor"))), /* @__PURE__ */ React124.createElement(import_ui107.Grid, { item: true }, /* @__PURE__ */ React124.createElement(
|
|
8913
9473
|
MentionTextAreaControl,
|
|
8914
9474
|
{
|
|
8915
9475
|
suggestions: emailSuggestions,
|
|
8916
9476
|
rows: 1,
|
|
8917
9477
|
triggerPosition: "start",
|
|
8918
|
-
placeholder: (0,
|
|
9478
|
+
placeholder: (0, import_i18n62.__)("You can type @ to insert an email field", "elementor")
|
|
8919
9479
|
}
|
|
8920
9480
|
))));
|
|
8921
9481
|
};
|
|
8922
9482
|
var CcField = () => {
|
|
8923
9483
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8924
|
-
return /* @__PURE__ */
|
|
9484
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "cc" }, /* @__PURE__ */ React124.createElement(EmailChipsField, { fieldLabel: (0, import_i18n62.__)("Cc", "elementor"), suggestions }));
|
|
8925
9485
|
};
|
|
8926
9486
|
var BccField = () => {
|
|
8927
9487
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8928
|
-
return /* @__PURE__ */
|
|
9488
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "bcc" }, /* @__PURE__ */ React124.createElement(EmailChipsField, { fieldLabel: (0, import_i18n62.__)("Bcc", "elementor"), suggestions }));
|
|
8929
9489
|
};
|
|
8930
|
-
var MetaDataField = () => /* @__PURE__ */
|
|
9490
|
+
var MetaDataField = () => /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "meta-data" }, /* @__PURE__ */ React124.createElement(import_ui107.Stack, { gap: 0.5 }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, (0, import_i18n62.__)("Metadata", "elementor")), /* @__PURE__ */ React124.createElement(
|
|
8931
9491
|
ChipsControl,
|
|
8932
9492
|
{
|
|
8933
9493
|
options: [
|
|
8934
|
-
{ label: (0,
|
|
8935
|
-
{ label: (0,
|
|
8936
|
-
{ label: (0,
|
|
8937
|
-
{ label: (0,
|
|
8938
|
-
{ label: (0,
|
|
9494
|
+
{ label: (0, import_i18n62.__)("Date", "elementor"), value: "date" },
|
|
9495
|
+
{ label: (0, import_i18n62.__)("Time", "elementor"), value: "time" },
|
|
9496
|
+
{ label: (0, import_i18n62.__)("Page URL", "elementor"), value: "page-url" },
|
|
9497
|
+
{ label: (0, import_i18n62.__)("User agent", "elementor"), value: "user-agent" },
|
|
9498
|
+
{ label: (0, import_i18n62.__)("Credit", "elementor"), value: "credit" }
|
|
8939
9499
|
]
|
|
8940
9500
|
}
|
|
8941
9501
|
)));
|
|
8942
|
-
var SendAsField = () => /* @__PURE__ */
|
|
9502
|
+
var SendAsField = () => /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "send-as" }, /* @__PURE__ */ React124.createElement(import_ui107.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React124.createElement(import_ui107.Grid, { item: true }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, (0, import_i18n62.__)("Send as", "elementor"))), /* @__PURE__ */ React124.createElement(import_ui107.Grid, { item: true }, /* @__PURE__ */ React124.createElement(
|
|
8943
9503
|
SelectControl,
|
|
8944
9504
|
{
|
|
8945
9505
|
options: [
|
|
8946
|
-
{ label: (0,
|
|
8947
|
-
{ label: (0,
|
|
9506
|
+
{ label: (0, import_i18n62.__)("HTML", "elementor"), value: "html" },
|
|
9507
|
+
{ label: (0, import_i18n62.__)("Plain Text", "elementor"), value: "plain" }
|
|
8948
9508
|
]
|
|
8949
9509
|
}
|
|
8950
9510
|
))));
|
|
@@ -8953,27 +9513,27 @@ var SendAsField = () => /* @__PURE__ */ React120.createElement(PropKeyProvider,
|
|
|
8953
9513
|
var EmailFormActionControl = createControl(
|
|
8954
9514
|
({ toPlaceholder, label }) => {
|
|
8955
9515
|
const { value, setValue, ...propContext } = useBoundProp(import_editor_props68.emailsPropTypeUtil);
|
|
8956
|
-
return /* @__PURE__ */
|
|
9516
|
+
return /* @__PURE__ */ React125.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React125.createElement(import_ui108.Stack, { gap: 2 }, /* @__PURE__ */ React125.createElement(ControlLabel, null, label ? label + " " + (0, import_i18n63.__)("settings", "elementor") : (0, import_i18n63.__)("Email settings", "elementor")), /* @__PURE__ */ React125.createElement(SendToField, { placeholder: toPlaceholder }), /* @__PURE__ */ React125.createElement(SubjectField, null), /* @__PURE__ */ React125.createElement(MessageField, null), /* @__PURE__ */ React125.createElement(FromEmailField, null), /* @__PURE__ */ React125.createElement(AdvancedSettings, null)));
|
|
8957
9517
|
}
|
|
8958
9518
|
);
|
|
8959
|
-
var AdvancedSettings = () => /* @__PURE__ */
|
|
9519
|
+
var AdvancedSettings = () => /* @__PURE__ */ React125.createElement(import_editor_ui17.CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React125.createElement(import_ui108.Box, { sx: { pt: 2 } }, /* @__PURE__ */ React125.createElement(import_ui108.Stack, { gap: 2 }, /* @__PURE__ */ React125.createElement(FromNameField, null), /* @__PURE__ */ React125.createElement(ReplyToField, null), /* @__PURE__ */ React125.createElement(CcField, null), /* @__PURE__ */ React125.createElement(BccField, null), /* @__PURE__ */ React125.createElement(import_ui108.Divider, null), /* @__PURE__ */ React125.createElement(MetaDataField, null), /* @__PURE__ */ React125.createElement(SendAsField, null))));
|
|
8960
9520
|
|
|
8961
9521
|
// src/controls/attachment-type-control.tsx
|
|
8962
|
-
var
|
|
8963
|
-
var
|
|
8964
|
-
var
|
|
8965
|
-
var
|
|
9522
|
+
var React126 = __toESM(require("react"));
|
|
9523
|
+
var import_editor_ui18 = require("@elementor/editor-ui");
|
|
9524
|
+
var import_ui109 = require("@elementor/ui");
|
|
9525
|
+
var import_i18n64 = require("@wordpress/i18n");
|
|
8966
9526
|
var AttachmentTypeControl = createControl(({ label, options }) => {
|
|
8967
|
-
return /* @__PURE__ */
|
|
9527
|
+
return /* @__PURE__ */ React126.createElement(import_ui109.Grid, { container: true, direction: "column", gap: 1 }, label && /* @__PURE__ */ React126.createElement(import_ui109.Grid, { item: true }, /* @__PURE__ */ React126.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React126.createElement(import_ui109.Grid, { item: true }, /* @__PURE__ */ React126.createElement(SelectControl, { options })), /* @__PURE__ */ React126.createElement(import_ui109.Grid, { item: true }, /* @__PURE__ */ React126.createElement(import_editor_ui18.InfoAlert, null, (0, import_i18n64.__)(
|
|
8968
9528
|
"Linked uploads are saved to the server. Direct attachments will not appear under Submissions.",
|
|
8969
9529
|
"elementor"
|
|
8970
9530
|
))));
|
|
8971
9531
|
});
|
|
8972
9532
|
|
|
8973
9533
|
// src/controls/grid-span-control.tsx
|
|
8974
|
-
var
|
|
9534
|
+
var React127 = __toESM(require("react"));
|
|
8975
9535
|
var import_editor_props69 = require("@elementor/editor-props");
|
|
8976
|
-
var
|
|
9536
|
+
var import_ui110 = require("@elementor/ui");
|
|
8977
9537
|
var GridSpanControl = createControl(
|
|
8978
9538
|
({
|
|
8979
9539
|
placeholder: propPlaceholder,
|
|
@@ -8990,8 +9550,8 @@ var GridSpanControl = createControl(
|
|
|
8990
9550
|
setValue(next === "" ? null : next);
|
|
8991
9551
|
};
|
|
8992
9552
|
const placeholder = propPlaceholder ?? boundPlaceholder ?? `e.g: 'span 2' or '1 / 3'`;
|
|
8993
|
-
return /* @__PURE__ */
|
|
8994
|
-
|
|
9553
|
+
return /* @__PURE__ */ React127.createElement(ControlActions, null, /* @__PURE__ */ React127.createElement(
|
|
9554
|
+
import_ui110.TextField,
|
|
8995
9555
|
{
|
|
8996
9556
|
size: "tiny",
|
|
8997
9557
|
fullWidth: true,
|
|
@@ -9011,25 +9571,25 @@ var GridSpanControl = createControl(
|
|
|
9011
9571
|
);
|
|
9012
9572
|
|
|
9013
9573
|
// src/components/promotions/display-conditions-control.tsx
|
|
9014
|
-
var
|
|
9015
|
-
var
|
|
9016
|
-
var
|
|
9017
|
-
var
|
|
9018
|
-
var
|
|
9574
|
+
var React129 = __toESM(require("react"));
|
|
9575
|
+
var import_react75 = require("react");
|
|
9576
|
+
var import_icons40 = require("@elementor/icons");
|
|
9577
|
+
var import_ui112 = require("@elementor/ui");
|
|
9578
|
+
var import_i18n65 = require("@wordpress/i18n");
|
|
9019
9579
|
|
|
9020
9580
|
// src/components/promotions/promotion-trigger.tsx
|
|
9021
|
-
var
|
|
9022
|
-
var
|
|
9023
|
-
var
|
|
9024
|
-
var
|
|
9581
|
+
var React128 = __toESM(require("react"));
|
|
9582
|
+
var import_react74 = require("react");
|
|
9583
|
+
var import_editor_ui19 = require("@elementor/editor-ui");
|
|
9584
|
+
var import_ui111 = require("@elementor/ui");
|
|
9025
9585
|
function getV4Promotion(key) {
|
|
9026
9586
|
return window.elementor?.config?.v4Promotions?.[key];
|
|
9027
9587
|
}
|
|
9028
|
-
var PromotionTrigger = (0,
|
|
9588
|
+
var PromotionTrigger = (0, import_react74.forwardRef)(
|
|
9029
9589
|
({ promotionKey, children, trackingData }, ref) => {
|
|
9030
|
-
const [isOpen, setIsOpen] = (0,
|
|
9590
|
+
const [isOpen, setIsOpen] = (0, import_react74.useState)(false);
|
|
9031
9591
|
const promotion = getV4Promotion(promotionKey);
|
|
9032
|
-
const toggle = (0,
|
|
9592
|
+
const toggle = (0, import_react74.useCallback)(() => {
|
|
9033
9593
|
setIsOpen((prev) => {
|
|
9034
9594
|
if (!prev) {
|
|
9035
9595
|
trackViewPromotion(trackingData);
|
|
@@ -9037,9 +9597,9 @@ var PromotionTrigger = (0, import_react73.forwardRef)(
|
|
|
9037
9597
|
return !prev;
|
|
9038
9598
|
});
|
|
9039
9599
|
}, [trackingData]);
|
|
9040
|
-
(0,
|
|
9041
|
-
return /* @__PURE__ */
|
|
9042
|
-
|
|
9600
|
+
(0, import_react74.useImperativeHandle)(ref, () => ({ toggle }), [toggle]);
|
|
9601
|
+
return /* @__PURE__ */ React128.createElement(React128.Fragment, null, promotion && /* @__PURE__ */ React128.createElement(
|
|
9602
|
+
import_editor_ui19.PromotionInfotip,
|
|
9043
9603
|
{
|
|
9044
9604
|
title: promotion.title,
|
|
9045
9605
|
content: promotion.content,
|
|
@@ -9052,8 +9612,8 @@ var PromotionTrigger = (0, import_react73.forwardRef)(
|
|
|
9052
9612
|
},
|
|
9053
9613
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
9054
9614
|
},
|
|
9055
|
-
/* @__PURE__ */
|
|
9056
|
-
|
|
9615
|
+
/* @__PURE__ */ React128.createElement(
|
|
9616
|
+
import_ui111.Box,
|
|
9057
9617
|
{
|
|
9058
9618
|
onClick: (e) => {
|
|
9059
9619
|
e.stopPropagation();
|
|
@@ -9061,19 +9621,19 @@ var PromotionTrigger = (0, import_react73.forwardRef)(
|
|
|
9061
9621
|
},
|
|
9062
9622
|
sx: { cursor: "pointer", display: "inline-flex" }
|
|
9063
9623
|
},
|
|
9064
|
-
children ?? /* @__PURE__ */
|
|
9624
|
+
children ?? /* @__PURE__ */ React128.createElement(import_editor_ui19.PromotionChip, null)
|
|
9065
9625
|
)
|
|
9066
9626
|
));
|
|
9067
9627
|
}
|
|
9068
9628
|
);
|
|
9069
9629
|
|
|
9070
9630
|
// src/components/promotions/display-conditions-control.tsx
|
|
9071
|
-
var ARIA_LABEL = (0,
|
|
9631
|
+
var ARIA_LABEL = (0, import_i18n65.__)("Display Conditions", "elementor");
|
|
9072
9632
|
var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
|
|
9073
9633
|
var DisplayConditionsControl = createControl(() => {
|
|
9074
|
-
const triggerRef = (0,
|
|
9075
|
-
return /* @__PURE__ */
|
|
9076
|
-
|
|
9634
|
+
const triggerRef = (0, import_react75.useRef)(null);
|
|
9635
|
+
return /* @__PURE__ */ React129.createElement(
|
|
9636
|
+
import_ui112.Stack,
|
|
9077
9637
|
{
|
|
9078
9638
|
direction: "row",
|
|
9079
9639
|
spacing: 2,
|
|
@@ -9082,9 +9642,9 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9082
9642
|
alignItems: "center"
|
|
9083
9643
|
}
|
|
9084
9644
|
},
|
|
9085
|
-
/* @__PURE__ */
|
|
9086
|
-
/* @__PURE__ */
|
|
9087
|
-
|
|
9645
|
+
/* @__PURE__ */ React129.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
|
|
9646
|
+
/* @__PURE__ */ React129.createElement(import_ui112.Tooltip, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React129.createElement(
|
|
9647
|
+
import_ui112.IconButton,
|
|
9088
9648
|
{
|
|
9089
9649
|
size: "tiny",
|
|
9090
9650
|
"aria-label": ARIA_LABEL,
|
|
@@ -9096,23 +9656,23 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9096
9656
|
borderRadius: 1
|
|
9097
9657
|
}
|
|
9098
9658
|
},
|
|
9099
|
-
/* @__PURE__ */
|
|
9659
|
+
/* @__PURE__ */ React129.createElement(import_icons40.SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
9100
9660
|
))
|
|
9101
9661
|
);
|
|
9102
9662
|
});
|
|
9103
9663
|
|
|
9104
9664
|
// src/components/promotions/attributes-control.tsx
|
|
9105
|
-
var
|
|
9106
|
-
var
|
|
9107
|
-
var
|
|
9108
|
-
var
|
|
9109
|
-
var
|
|
9110
|
-
var ARIA_LABEL2 = (0,
|
|
9665
|
+
var React130 = __toESM(require("react"));
|
|
9666
|
+
var import_react76 = require("react");
|
|
9667
|
+
var import_icons41 = require("@elementor/icons");
|
|
9668
|
+
var import_ui113 = require("@elementor/ui");
|
|
9669
|
+
var import_i18n66 = require("@wordpress/i18n");
|
|
9670
|
+
var ARIA_LABEL2 = (0, import_i18n66.__)("Attributes", "elementor");
|
|
9111
9671
|
var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
|
|
9112
9672
|
var AttributesControl = createControl(() => {
|
|
9113
|
-
const triggerRef = (0,
|
|
9114
|
-
return /* @__PURE__ */
|
|
9115
|
-
|
|
9673
|
+
const triggerRef = (0, import_react76.useRef)(null);
|
|
9674
|
+
return /* @__PURE__ */ React130.createElement(
|
|
9675
|
+
import_ui113.Stack,
|
|
9116
9676
|
{
|
|
9117
9677
|
direction: "row",
|
|
9118
9678
|
spacing: 2,
|
|
@@ -9121,9 +9681,9 @@ var AttributesControl = createControl(() => {
|
|
|
9121
9681
|
alignItems: "center"
|
|
9122
9682
|
}
|
|
9123
9683
|
},
|
|
9124
|
-
/* @__PURE__ */
|
|
9125
|
-
/* @__PURE__ */
|
|
9126
|
-
|
|
9684
|
+
/* @__PURE__ */ React130.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
|
|
9685
|
+
/* @__PURE__ */ React130.createElement(import_ui113.Tooltip, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React130.createElement(
|
|
9686
|
+
import_icons41.PlusIcon,
|
|
9127
9687
|
{
|
|
9128
9688
|
"aria-label": ARIA_LABEL2,
|
|
9129
9689
|
fontSize: "tiny",
|
|
@@ -9136,21 +9696,21 @@ var AttributesControl = createControl(() => {
|
|
|
9136
9696
|
});
|
|
9137
9697
|
|
|
9138
9698
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
9139
|
-
var
|
|
9140
|
-
var
|
|
9141
|
-
var
|
|
9142
|
-
var CustomIconButton = (0,
|
|
9699
|
+
var React131 = __toESM(require("react"));
|
|
9700
|
+
var import_icons42 = require("@elementor/icons");
|
|
9701
|
+
var import_ui114 = require("@elementor/ui");
|
|
9702
|
+
var CustomIconButton = (0, import_ui114.styled)(import_ui114.IconButton)(({ theme }) => ({
|
|
9143
9703
|
width: theme.spacing(2.5),
|
|
9144
9704
|
height: theme.spacing(2.5)
|
|
9145
9705
|
}));
|
|
9146
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
9706
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React131.createElement(import_ui114.Tooltip, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React131.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React131.createElement(import_icons42.BrushBigIcon, { fontSize: size })));
|
|
9147
9707
|
|
|
9148
9708
|
// src/components/repeater/repeater.tsx
|
|
9149
|
-
var
|
|
9150
|
-
var
|
|
9151
|
-
var
|
|
9152
|
-
var
|
|
9153
|
-
var
|
|
9709
|
+
var React132 = __toESM(require("react"));
|
|
9710
|
+
var import_react77 = require("react");
|
|
9711
|
+
var import_icons43 = require("@elementor/icons");
|
|
9712
|
+
var import_ui115 = require("@elementor/ui");
|
|
9713
|
+
var import_i18n67 = require("@wordpress/i18n");
|
|
9154
9714
|
var SIZE12 = "tiny";
|
|
9155
9715
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
9156
9716
|
var Repeater3 = ({
|
|
@@ -9169,7 +9729,7 @@ var Repeater3 = ({
|
|
|
9169
9729
|
isSortable = true,
|
|
9170
9730
|
adornment = ControlAdornments
|
|
9171
9731
|
}) => {
|
|
9172
|
-
const [openItem, setOpenItem] = (0,
|
|
9732
|
+
const [openItem, setOpenItem] = (0, import_react77.useState)(initialOpenItem);
|
|
9173
9733
|
const uniqueKeys = items2.map(
|
|
9174
9734
|
(item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
|
|
9175
9735
|
);
|
|
@@ -9232,8 +9792,8 @@ var Repeater3 = ({
|
|
|
9232
9792
|
};
|
|
9233
9793
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
9234
9794
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
9235
|
-
const addButton = /* @__PURE__ */
|
|
9236
|
-
|
|
9795
|
+
const addButton = /* @__PURE__ */ React132.createElement(
|
|
9796
|
+
import_ui115.IconButton,
|
|
9237
9797
|
{
|
|
9238
9798
|
size: SIZE12,
|
|
9239
9799
|
sx: {
|
|
@@ -9241,32 +9801,32 @@ var Repeater3 = ({
|
|
|
9241
9801
|
},
|
|
9242
9802
|
disabled: isButtonDisabled,
|
|
9243
9803
|
onClick: addRepeaterItem,
|
|
9244
|
-
"aria-label": (0,
|
|
9804
|
+
"aria-label": (0, import_i18n67.__)("Add item", "elementor")
|
|
9245
9805
|
},
|
|
9246
|
-
/* @__PURE__ */
|
|
9806
|
+
/* @__PURE__ */ React132.createElement(import_icons43.PlusIcon, { fontSize: SIZE12 })
|
|
9247
9807
|
);
|
|
9248
|
-
return /* @__PURE__ */
|
|
9249
|
-
|
|
9808
|
+
return /* @__PURE__ */ React132.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React132.createElement(RepeaterHeader, { label, adornment }, shouldShowInfotip ? /* @__PURE__ */ React132.createElement(
|
|
9809
|
+
import_ui115.Infotip,
|
|
9250
9810
|
{
|
|
9251
9811
|
placement: "right",
|
|
9252
9812
|
content: addButtonInfotipContent,
|
|
9253
9813
|
color: "secondary",
|
|
9254
9814
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
9255
9815
|
},
|
|
9256
|
-
/* @__PURE__ */
|
|
9257
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
9816
|
+
/* @__PURE__ */ React132.createElement(import_ui115.Box, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
9817
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React132.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
9258
9818
|
const index = uniqueKeys.indexOf(key);
|
|
9259
9819
|
const value = items2[index];
|
|
9260
9820
|
if (!value) {
|
|
9261
9821
|
return null;
|
|
9262
9822
|
}
|
|
9263
|
-
return /* @__PURE__ */
|
|
9823
|
+
return /* @__PURE__ */ React132.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React132.createElement(
|
|
9264
9824
|
RepeaterItem,
|
|
9265
9825
|
{
|
|
9266
9826
|
disabled,
|
|
9267
9827
|
propDisabled: value?.disabled,
|
|
9268
|
-
label: /* @__PURE__ */
|
|
9269
|
-
startIcon: /* @__PURE__ */
|
|
9828
|
+
label: /* @__PURE__ */ React132.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React132.createElement(itemSettings.Label, { value, index })),
|
|
9829
|
+
startIcon: /* @__PURE__ */ React132.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React132.createElement(itemSettings.Icon, { value })),
|
|
9270
9830
|
removeItem: () => removeRepeaterItem(index),
|
|
9271
9831
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
9272
9832
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -9280,7 +9840,7 @@ var Repeater3 = ({
|
|
|
9280
9840
|
actions: itemSettings.actions,
|
|
9281
9841
|
value
|
|
9282
9842
|
},
|
|
9283
|
-
(props) => /* @__PURE__ */
|
|
9843
|
+
(props) => /* @__PURE__ */ React132.createElement(
|
|
9284
9844
|
itemSettings.Content,
|
|
9285
9845
|
{
|
|
9286
9846
|
...props,
|
|
@@ -9320,18 +9880,18 @@ var RepeaterItem = ({
|
|
|
9320
9880
|
},
|
|
9321
9881
|
wrappedOnPopoverClose
|
|
9322
9882
|
);
|
|
9323
|
-
const triggerProps = (0,
|
|
9883
|
+
const triggerProps = (0, import_ui115.bindTrigger)(popoverState);
|
|
9324
9884
|
usePopoverDismiss({ isOpen: popoverState.isOpen, onClose: popoverProps.onClose });
|
|
9325
|
-
const duplicateLabel = (0,
|
|
9326
|
-
const toggleLabel = propDisabled ? (0,
|
|
9327
|
-
const removeLabel = (0,
|
|
9328
|
-
return /* @__PURE__ */
|
|
9885
|
+
const duplicateLabel = (0, import_i18n67.__)("Duplicate", "elementor");
|
|
9886
|
+
const toggleLabel = propDisabled ? (0, import_i18n67.__)("Show", "elementor") : (0, import_i18n67.__)("Hide", "elementor");
|
|
9887
|
+
const removeLabel = (0, import_i18n67.__)("Remove", "elementor");
|
|
9888
|
+
return /* @__PURE__ */ React132.createElement(import_ui115.Box, { sx: { display: "contents" } }, /* @__PURE__ */ React132.createElement(
|
|
9329
9889
|
RepeaterTag,
|
|
9330
9890
|
{
|
|
9331
9891
|
disabled,
|
|
9332
9892
|
label,
|
|
9333
9893
|
ref: setRef,
|
|
9334
|
-
"aria-label": (0,
|
|
9894
|
+
"aria-label": (0, import_i18n67.__)("Open item", "elementor"),
|
|
9335
9895
|
...triggerProps,
|
|
9336
9896
|
onClick: (e) => {
|
|
9337
9897
|
triggerProps.onClick(e);
|
|
@@ -9340,15 +9900,15 @@ var RepeaterItem = ({
|
|
|
9340
9900
|
}
|
|
9341
9901
|
},
|
|
9342
9902
|
startIcon,
|
|
9343
|
-
actions: /* @__PURE__ */
|
|
9903
|
+
actions: /* @__PURE__ */ React132.createElement(React132.Fragment, null, showDuplicate && /* @__PURE__ */ React132.createElement(import_ui115.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React132.createElement(import_ui115.IconButton, { size: SIZE12, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React132.createElement(import_icons43.CopyIcon, { fontSize: SIZE12 }))), showToggle && /* @__PURE__ */ React132.createElement(import_ui115.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React132.createElement(import_ui115.IconButton, { size: SIZE12, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React132.createElement(import_icons43.EyeOffIcon, { fontSize: SIZE12 }) : /* @__PURE__ */ React132.createElement(import_icons43.EyeIcon, { fontSize: SIZE12 }))), actions?.(value), showRemove && /* @__PURE__ */ React132.createElement(import_ui115.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React132.createElement(import_ui115.IconButton, { size: SIZE12, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React132.createElement(import_icons43.XIcon, { fontSize: SIZE12 }))))
|
|
9344
9904
|
}
|
|
9345
|
-
), /* @__PURE__ */
|
|
9905
|
+
), /* @__PURE__ */ React132.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React132.createElement(import_ui115.Box, null, children({ anchorEl: ref }))));
|
|
9346
9906
|
};
|
|
9347
9907
|
var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
9348
|
-
const [ref, setRef] = (0,
|
|
9349
|
-
const popoverState = (0,
|
|
9350
|
-
const popoverProps = (0,
|
|
9351
|
-
(0,
|
|
9908
|
+
const [ref, setRef] = (0, import_react77.useState)(null);
|
|
9909
|
+
const popoverState = (0, import_ui115.usePopupState)({ variant: "popover" });
|
|
9910
|
+
const popoverProps = (0, import_ui115.bindPopover)(popoverState);
|
|
9911
|
+
(0, import_react77.useEffect)(() => {
|
|
9352
9912
|
if (openOnMount && ref) {
|
|
9353
9913
|
popoverState.open(ref);
|
|
9354
9914
|
onOpen?.();
|
|
@@ -9367,8 +9927,8 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
|
9367
9927
|
};
|
|
9368
9928
|
|
|
9369
9929
|
// src/components/size/unstable-size-field.tsx
|
|
9370
|
-
var
|
|
9371
|
-
var
|
|
9930
|
+
var React135 = __toESM(require("react"));
|
|
9931
|
+
var import_ui117 = require("@elementor/ui");
|
|
9372
9932
|
|
|
9373
9933
|
// src/hooks/use-size-value.ts
|
|
9374
9934
|
var DEFAULT_UNIT2 = "px";
|
|
@@ -9410,26 +9970,26 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
9410
9970
|
};
|
|
9411
9971
|
|
|
9412
9972
|
// src/components/size/unit-select.tsx
|
|
9413
|
-
var
|
|
9414
|
-
var
|
|
9415
|
-
var
|
|
9416
|
-
var
|
|
9973
|
+
var React133 = __toESM(require("react"));
|
|
9974
|
+
var import_react78 = require("react");
|
|
9975
|
+
var import_editor_ui20 = require("@elementor/editor-ui");
|
|
9976
|
+
var import_ui116 = require("@elementor/ui");
|
|
9417
9977
|
var menuItemContentStyles2 = {
|
|
9418
9978
|
display: "flex",
|
|
9419
9979
|
flexDirection: "column",
|
|
9420
9980
|
justifyContent: "center"
|
|
9421
9981
|
};
|
|
9422
9982
|
var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
9423
|
-
const popupState = (0,
|
|
9983
|
+
const popupState = (0, import_ui116.usePopupState)({
|
|
9424
9984
|
variant: "popover",
|
|
9425
|
-
popupId: (0,
|
|
9985
|
+
popupId: (0, import_react78.useId)()
|
|
9426
9986
|
});
|
|
9427
9987
|
const handleMenuItemClick = (index) => {
|
|
9428
9988
|
onClick(options[index]);
|
|
9429
9989
|
popupState.close();
|
|
9430
9990
|
};
|
|
9431
|
-
return /* @__PURE__ */
|
|
9432
|
-
|
|
9991
|
+
return /* @__PURE__ */ React133.createElement(React133.Fragment, null, /* @__PURE__ */ React133.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...(0, import_ui116.bindTrigger)(popupState) }, value), /* @__PURE__ */ React133.createElement(import_ui116.Menu, { MenuListProps: { dense: true }, ...(0, import_ui116.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React133.createElement(
|
|
9992
|
+
import_editor_ui20.MenuListItem,
|
|
9433
9993
|
{
|
|
9434
9994
|
key: option,
|
|
9435
9995
|
onClick: () => handleMenuItemClick(index),
|
|
@@ -9447,7 +10007,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
9447
10007
|
option.toUpperCase()
|
|
9448
10008
|
))));
|
|
9449
10009
|
};
|
|
9450
|
-
var StyledButton3 = (0,
|
|
10010
|
+
var StyledButton3 = (0, import_ui116.styled)(import_ui116.Button, {
|
|
9451
10011
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
9452
10012
|
})(({ isPrimaryColor, theme }) => ({
|
|
9453
10013
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -9457,11 +10017,11 @@ var StyledButton3 = (0, import_ui113.styled)(import_ui113.Button, {
|
|
|
9457
10017
|
}));
|
|
9458
10018
|
|
|
9459
10019
|
// src/components/size/unstable-size-input.tsx
|
|
9460
|
-
var
|
|
9461
|
-
var
|
|
9462
|
-
var UnstableSizeInput = (0,
|
|
10020
|
+
var React134 = __toESM(require("react"));
|
|
10021
|
+
var import_react79 = require("react");
|
|
10022
|
+
var UnstableSizeInput = (0, import_react79.forwardRef)(
|
|
9463
10023
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
9464
|
-
return /* @__PURE__ */
|
|
10024
|
+
return /* @__PURE__ */ React134.createElement(
|
|
9465
10025
|
NumberInput,
|
|
9466
10026
|
{
|
|
9467
10027
|
ref,
|
|
@@ -9499,7 +10059,7 @@ var UnstableSizeField = ({
|
|
|
9499
10059
|
const shouldHighlightUnit2 = () => {
|
|
9500
10060
|
return hasValue(size);
|
|
9501
10061
|
};
|
|
9502
|
-
return /* @__PURE__ */
|
|
10062
|
+
return /* @__PURE__ */ React135.createElement(
|
|
9503
10063
|
UnstableSizeInput,
|
|
9504
10064
|
{
|
|
9505
10065
|
type: "number",
|
|
@@ -9508,8 +10068,8 @@ var UnstableSizeField = ({
|
|
|
9508
10068
|
onChange: (event) => setSize(event.target.value),
|
|
9509
10069
|
InputProps: {
|
|
9510
10070
|
...InputProps,
|
|
9511
|
-
startAdornment: startIcon && /* @__PURE__ */
|
|
9512
|
-
endAdornment: /* @__PURE__ */
|
|
10071
|
+
startAdornment: startIcon && /* @__PURE__ */ React135.createElement(import_ui117.InputAdornment, { position: "start" }, startIcon),
|
|
10072
|
+
endAdornment: /* @__PURE__ */ React135.createElement(import_ui117.InputAdornment, { position: "end" }, /* @__PURE__ */ React135.createElement(
|
|
9513
10073
|
UnitSelect,
|
|
9514
10074
|
{
|
|
9515
10075
|
options: units2,
|
|
@@ -9527,7 +10087,7 @@ var hasValue = (value) => {
|
|
|
9527
10087
|
};
|
|
9528
10088
|
|
|
9529
10089
|
// src/hooks/use-font-families.ts
|
|
9530
|
-
var
|
|
10090
|
+
var import_react80 = require("react");
|
|
9531
10091
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
9532
10092
|
var getFontControlConfig = () => {
|
|
9533
10093
|
const { controls } = (0, import_editor_v1_adapters3.getElementorConfig)();
|
|
@@ -9535,7 +10095,7 @@ var getFontControlConfig = () => {
|
|
|
9535
10095
|
};
|
|
9536
10096
|
var useFontFamilies = () => {
|
|
9537
10097
|
const { groups, options } = getFontControlConfig();
|
|
9538
|
-
return (0,
|
|
10098
|
+
return (0, import_react80.useMemo)(() => {
|
|
9539
10099
|
if (!groups || !options) {
|
|
9540
10100
|
return [];
|
|
9541
10101
|
}
|
|
@@ -9632,11 +10192,14 @@ var useFontFamilies = () => {
|
|
|
9632
10192
|
createControlReplacementsRegistry,
|
|
9633
10193
|
enqueueFont,
|
|
9634
10194
|
getControlReplacements,
|
|
10195
|
+
getFontAwesome7IconName,
|
|
9635
10196
|
injectIntoRepeaterItemActions,
|
|
9636
10197
|
injectIntoRepeaterItemIcon,
|
|
9637
10198
|
injectIntoRepeaterItemLabel,
|
|
9638
10199
|
isUnitExtendedOption,
|
|
9639
10200
|
registerControlReplacement,
|
|
10201
|
+
resetFontAwesome7IconsCache,
|
|
10202
|
+
resolveFontAwesome7Icon,
|
|
9640
10203
|
trackUpgradePromotionClick,
|
|
9641
10204
|
trackViewPromotion,
|
|
9642
10205
|
transitionProperties,
|