@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.mjs
CHANGED
|
@@ -5314,24 +5314,13 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
5314
5314
|
});
|
|
5315
5315
|
|
|
5316
5316
|
// src/controls/svg-media-control.tsx
|
|
5317
|
-
import * as
|
|
5318
|
-
import { useEffect as useEffect16, useState as
|
|
5317
|
+
import * as React85 from "react";
|
|
5318
|
+
import { useEffect as useEffect16, useRef as useRef15, useState as useState17 } from "react";
|
|
5319
5319
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
5320
5320
|
import { iconPropTypeUtil, svgSrcPropTypeUtil, urlPropTypeUtil as urlPropTypeUtil4 } from "@elementor/editor-props";
|
|
5321
|
-
import {
|
|
5322
|
-
import {
|
|
5323
|
-
Box as Box15,
|
|
5324
|
-
Button as Button5,
|
|
5325
|
-
Card as Card2,
|
|
5326
|
-
CardMedia as CardMedia2,
|
|
5327
|
-
CardOverlay as CardOverlay2,
|
|
5328
|
-
CircularProgress as CircularProgress3,
|
|
5329
|
-
Stack as Stack13,
|
|
5330
|
-
styled as styled9,
|
|
5331
|
-
ThemeProvider
|
|
5332
|
-
} from "@elementor/ui";
|
|
5321
|
+
import { Box as Box18, Card as Card2, CardOverlay as CardOverlay2, Popover as Popover6, Stack as Stack15, styled as styled11, usePopupState as usePopupState8 } from "@elementor/ui";
|
|
5333
5322
|
import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWpMediaFrame2 } from "@elementor/wp-media";
|
|
5334
|
-
import { __ as
|
|
5323
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
5335
5324
|
|
|
5336
5325
|
// src/components/enable-unfiltered-modal.tsx
|
|
5337
5326
|
import * as React80 from "react";
|
|
@@ -5393,37 +5382,442 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
5393
5382
|
isPending ? /* @__PURE__ */ React80.createElement(CircularProgress2, { size: 24 }) : __31("Enable", "elementor")
|
|
5394
5383
|
)));
|
|
5395
5384
|
|
|
5396
|
-
// src/controls/
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5385
|
+
// src/controls/icon-library/get-icon-library-anchor.ts
|
|
5386
|
+
function getIconLibraryAnchor(containerRect, buttonGroupRect) {
|
|
5387
|
+
if (!containerRect || containerRect.width <= 0) {
|
|
5388
|
+
return null;
|
|
5389
|
+
}
|
|
5390
|
+
return {
|
|
5391
|
+
top: buttonGroupRect?.top ?? containerRect.top,
|
|
5392
|
+
left: containerRect.left,
|
|
5393
|
+
width: containerRect.width
|
|
5394
|
+
};
|
|
5401
5395
|
}
|
|
5402
|
-
function
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5396
|
+
function measureIconLibraryAnchor(container, buttonGroup) {
|
|
5397
|
+
return getIconLibraryAnchor(container?.getBoundingClientRect(), buttonGroup?.getBoundingClientRect());
|
|
5398
|
+
}
|
|
5399
|
+
|
|
5400
|
+
// src/controls/icon-library/icon-library-popover.tsx
|
|
5401
|
+
import * as React82 from "react";
|
|
5402
|
+
import { useMemo as useMemo12, useState as useState16 } from "react";
|
|
5403
|
+
import {
|
|
5404
|
+
PopoverBody as PopoverBody2,
|
|
5405
|
+
PopoverHeader as PopoverHeader4,
|
|
5406
|
+
PopoverMenuList as PopoverMenuList2,
|
|
5407
|
+
SearchField as SearchField2,
|
|
5408
|
+
StyledMenuList
|
|
5409
|
+
} from "@elementor/editor-ui";
|
|
5410
|
+
import { ComponentsIcon } from "@elementor/icons";
|
|
5411
|
+
import { Box as Box15, CircularProgress as CircularProgress3, Divider as Divider4, Link as Link3, Stack as Stack13, styled as styled9, Typography as Typography7 } from "@elementor/ui";
|
|
5412
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
5413
|
+
|
|
5414
|
+
// src/controls/icon-library/font-awesome-7-data.ts
|
|
5415
|
+
var FONT_AWESOME_7_LIBRARIES = [
|
|
5416
|
+
{ file: "solid", library: "fa-solid" },
|
|
5417
|
+
{ file: "regular", library: "fa-regular" },
|
|
5418
|
+
{ file: "brands", library: "fa-brands" }
|
|
5419
|
+
];
|
|
5420
|
+
var FONT_AWESOME_JSON = {
|
|
5421
|
+
width: 0,
|
|
5422
|
+
height: 1,
|
|
5423
|
+
aliases: 2,
|
|
5424
|
+
unicode: 3,
|
|
5425
|
+
path: 4
|
|
5426
|
+
};
|
|
5427
|
+
var libraryCache = /* @__PURE__ */ new Map();
|
|
5428
|
+
function getFontAwesome7EditorConfig() {
|
|
5429
|
+
const config = window.elementorCommon?.config?.fontAwesome?.v7;
|
|
5430
|
+
if (!config || !Array.isArray(config.jsonFiles)) {
|
|
5431
|
+
return null;
|
|
5432
|
+
}
|
|
5433
|
+
const jsonBaseUrl = getAllowedJsonBaseUrl(config.jsonBaseUrl);
|
|
5434
|
+
if (!jsonBaseUrl) {
|
|
5435
|
+
return null;
|
|
5436
|
+
}
|
|
5437
|
+
return {
|
|
5438
|
+
jsonFiles: config.jsonFiles,
|
|
5439
|
+
jsonBaseUrl
|
|
5440
|
+
};
|
|
5441
|
+
}
|
|
5442
|
+
var FONT_AWESOME_ICON_NAME_PATTERN = /^fa\S*\s+fa-([^\s]+)/;
|
|
5443
|
+
function getFontAwesome7IconName(iconValue) {
|
|
5444
|
+
return iconValue.match(FONT_AWESOME_ICON_NAME_PATTERN)?.[1] ?? null;
|
|
5445
|
+
}
|
|
5446
|
+
function resetFontAwesome7IconsCache() {
|
|
5447
|
+
libraryCache.clear();
|
|
5448
|
+
}
|
|
5449
|
+
async function loadFontAwesome7Library(file, signal) {
|
|
5450
|
+
const cached = await getCachedLibrary(file, signal);
|
|
5451
|
+
return cached?.icons ?? [];
|
|
5452
|
+
}
|
|
5453
|
+
async function resolveFontAwesome7Icon(library, iconName, signal) {
|
|
5454
|
+
const file = getLibraryFileName(library);
|
|
5455
|
+
if (!file) {
|
|
5456
|
+
return null;
|
|
5406
5457
|
}
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5458
|
+
const cached = await getCachedLibrary(file, signal);
|
|
5459
|
+
return cached?.lookup[iconName] ?? null;
|
|
5460
|
+
}
|
|
5461
|
+
async function getCachedLibrary(file, signal) {
|
|
5462
|
+
const cached = libraryCache.get(file);
|
|
5463
|
+
if (cached) {
|
|
5464
|
+
return cached;
|
|
5465
|
+
}
|
|
5466
|
+
const loaded = await fetchLibrary(file, signal);
|
|
5467
|
+
if (loaded) {
|
|
5468
|
+
libraryCache.set(file, loaded);
|
|
5469
|
+
}
|
|
5470
|
+
return loaded;
|
|
5471
|
+
}
|
|
5472
|
+
function getLibraryFileName(library) {
|
|
5473
|
+
const config = getFontAwesome7EditorConfig();
|
|
5474
|
+
const match = FONT_AWESOME_7_LIBRARIES.find((item) => item.library === library);
|
|
5475
|
+
if (!config || !match || !config.jsonFiles.includes(match.file)) {
|
|
5476
|
+
return null;
|
|
5477
|
+
}
|
|
5478
|
+
return match.file;
|
|
5479
|
+
}
|
|
5480
|
+
async function fetchLibrary(file, signal) {
|
|
5481
|
+
const config = getFontAwesome7EditorConfig();
|
|
5482
|
+
if (!config?.jsonFiles.includes(file)) {
|
|
5483
|
+
return null;
|
|
5484
|
+
}
|
|
5485
|
+
const catalogUrl = getCatalogFileUrl(config.jsonBaseUrl, file);
|
|
5486
|
+
if (!catalogUrl) {
|
|
5487
|
+
return null;
|
|
5488
|
+
}
|
|
5489
|
+
try {
|
|
5490
|
+
const response = await fetch(catalogUrl, { signal });
|
|
5491
|
+
if (!response.ok) {
|
|
5492
|
+
return null;
|
|
5493
|
+
}
|
|
5494
|
+
const data = await response.json();
|
|
5495
|
+
const icons = data.icons;
|
|
5496
|
+
if (!icons || typeof icons !== "object") {
|
|
5497
|
+
return null;
|
|
5498
|
+
}
|
|
5499
|
+
return indexLibrary(icons);
|
|
5500
|
+
} catch {
|
|
5501
|
+
return null;
|
|
5502
|
+
}
|
|
5503
|
+
}
|
|
5504
|
+
function indexLibrary(icons) {
|
|
5505
|
+
const definitions = [];
|
|
5506
|
+
const lookup = /* @__PURE__ */ Object.create(null);
|
|
5507
|
+
for (const [name, iconData] of Object.entries(icons)) {
|
|
5508
|
+
const definition = toIconDefinition(name, iconData);
|
|
5509
|
+
if (!definition) {
|
|
5510
|
+
continue;
|
|
5511
|
+
}
|
|
5512
|
+
definitions.push(definition);
|
|
5513
|
+
lookup[name] = definition;
|
|
5514
|
+
for (const alias of definition.aliases) {
|
|
5515
|
+
if (!lookup[alias]) {
|
|
5516
|
+
lookup[alias] = definition;
|
|
5517
|
+
}
|
|
5518
|
+
}
|
|
5519
|
+
}
|
|
5520
|
+
return { icons: definitions, lookup };
|
|
5521
|
+
}
|
|
5522
|
+
function toIconDefinition(name, iconData) {
|
|
5523
|
+
if (!isValidIconTuple(iconData)) {
|
|
5524
|
+
return null;
|
|
5525
|
+
}
|
|
5526
|
+
const paths = normalizePaths(iconData[FONT_AWESOME_JSON.path]);
|
|
5527
|
+
if (paths.length === 0) {
|
|
5528
|
+
return null;
|
|
5529
|
+
}
|
|
5530
|
+
const aliases = iconData[FONT_AWESOME_JSON.aliases].filter(
|
|
5531
|
+
(alias) => typeof alias === "string" && alias !== ""
|
|
5532
|
+
);
|
|
5533
|
+
return {
|
|
5534
|
+
name,
|
|
5535
|
+
aliases,
|
|
5536
|
+
width: iconData[FONT_AWESOME_JSON.width],
|
|
5537
|
+
height: iconData[FONT_AWESOME_JSON.height],
|
|
5538
|
+
paths
|
|
5539
|
+
};
|
|
5540
|
+
}
|
|
5541
|
+
function isValidIconTuple(iconData) {
|
|
5542
|
+
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]);
|
|
5543
|
+
}
|
|
5544
|
+
function normalizePaths(pathData) {
|
|
5545
|
+
if (typeof pathData === "string" && isSafeSvgPath(pathData)) {
|
|
5546
|
+
return [pathData];
|
|
5547
|
+
}
|
|
5548
|
+
if (!Array.isArray(pathData)) {
|
|
5549
|
+
return [];
|
|
5550
|
+
}
|
|
5551
|
+
return pathData.filter((path) => typeof path === "string" && isSafeSvgPath(path));
|
|
5552
|
+
}
|
|
5553
|
+
function isSafeSvgPath(path) {
|
|
5554
|
+
return path !== "" && !/[<>"'`]/.test(path);
|
|
5555
|
+
}
|
|
5556
|
+
function getAllowedJsonBaseUrl(jsonBaseUrl) {
|
|
5557
|
+
if (typeof jsonBaseUrl !== "string" || jsonBaseUrl === "") {
|
|
5558
|
+
return null;
|
|
5559
|
+
}
|
|
5560
|
+
try {
|
|
5561
|
+
const url = new URL(jsonBaseUrl);
|
|
5562
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
5563
|
+
return null;
|
|
5564
|
+
}
|
|
5565
|
+
return url.href;
|
|
5566
|
+
} catch {
|
|
5567
|
+
return null;
|
|
5568
|
+
}
|
|
5569
|
+
}
|
|
5570
|
+
function getCatalogFileUrl(jsonBaseUrl, file) {
|
|
5571
|
+
try {
|
|
5572
|
+
const baseUrl = new URL(jsonBaseUrl);
|
|
5573
|
+
const fileUrl = new URL(`${file}.json`, jsonBaseUrl);
|
|
5574
|
+
if (fileUrl.origin !== baseUrl.origin || !fileUrl.pathname.startsWith(baseUrl.pathname)) {
|
|
5575
|
+
return null;
|
|
5576
|
+
}
|
|
5577
|
+
if (fileUrl.protocol !== "http:" && fileUrl.protocol !== "https:") {
|
|
5578
|
+
return null;
|
|
5579
|
+
}
|
|
5580
|
+
return fileUrl.href;
|
|
5581
|
+
} catch {
|
|
5582
|
+
return null;
|
|
5583
|
+
}
|
|
5584
|
+
}
|
|
5585
|
+
|
|
5586
|
+
// src/controls/icon-library/font-awesome-7-catalog.ts
|
|
5587
|
+
async function loadFontAwesome7Catalog(signal) {
|
|
5588
|
+
const config = getFontAwesome7EditorConfig();
|
|
5589
|
+
if (!config) {
|
|
5590
|
+
return [];
|
|
5591
|
+
}
|
|
5592
|
+
const catalogs = await Promise.all(
|
|
5593
|
+
FONT_AWESOME_7_LIBRARIES.map(async ({ file, library }) => {
|
|
5594
|
+
if (!config.jsonFiles.includes(file)) {
|
|
5595
|
+
return [];
|
|
5596
|
+
}
|
|
5597
|
+
const icons = await loadFontAwesome7Library(file, signal);
|
|
5598
|
+
return icons.map((icon) => toCatalogIcon(icon, library));
|
|
5599
|
+
})
|
|
5600
|
+
);
|
|
5601
|
+
return catalogs.flat();
|
|
5602
|
+
}
|
|
5603
|
+
function filterFontAwesome7Icons(icons, searchValue) {
|
|
5604
|
+
const query = searchValue?.trim().toLowerCase() ?? "";
|
|
5605
|
+
if (query === "") {
|
|
5606
|
+
return icons;
|
|
5607
|
+
}
|
|
5608
|
+
return icons.filter((icon) => {
|
|
5609
|
+
if (icon.name.includes(query) || icon.label.toLowerCase().includes(query)) {
|
|
5610
|
+
return true;
|
|
5611
|
+
}
|
|
5612
|
+
return icon.aliases.some((alias) => alias.toLowerCase().includes(query));
|
|
5410
5613
|
});
|
|
5411
5614
|
}
|
|
5412
|
-
function
|
|
5413
|
-
|
|
5615
|
+
function createIconSelectionValue(library, name) {
|
|
5616
|
+
return `${library} fa-${name}`;
|
|
5617
|
+
}
|
|
5618
|
+
function getSelectedIconId(iconClass, library) {
|
|
5619
|
+
if (!iconClass || !library) {
|
|
5620
|
+
return void 0;
|
|
5621
|
+
}
|
|
5622
|
+
const name = getFontAwesome7IconName(iconClass);
|
|
5623
|
+
if (!name) {
|
|
5624
|
+
return void 0;
|
|
5625
|
+
}
|
|
5626
|
+
return `${library}:${name}`;
|
|
5627
|
+
}
|
|
5628
|
+
function findFontAwesome7Icon(icons, iconClass, library) {
|
|
5629
|
+
const selectedId = getSelectedIconId(iconClass, library);
|
|
5630
|
+
if (!selectedId || !library) {
|
|
5631
|
+
return void 0;
|
|
5632
|
+
}
|
|
5633
|
+
const selectedName = selectedId.slice(`${library}:`.length);
|
|
5634
|
+
return icons.find((icon) => {
|
|
5635
|
+
if (icon.library !== library) {
|
|
5636
|
+
return false;
|
|
5637
|
+
}
|
|
5638
|
+
return icon.id === selectedId || icon.name === selectedName || icon.aliases.includes(selectedName);
|
|
5639
|
+
});
|
|
5414
5640
|
}
|
|
5415
|
-
function
|
|
5641
|
+
function toCatalogIcon(icon, library) {
|
|
5416
5642
|
return {
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
onSelect?.(icon);
|
|
5423
|
-
},
|
|
5424
|
-
applySavedValue: () => void 0
|
|
5643
|
+
...icon,
|
|
5644
|
+
id: `${library}:${icon.name}`,
|
|
5645
|
+
label: icon.name.replace(/-/g, " "),
|
|
5646
|
+
library,
|
|
5647
|
+
value: createIconSelectionValue(library, icon.name)
|
|
5425
5648
|
};
|
|
5426
5649
|
}
|
|
5650
|
+
|
|
5651
|
+
// src/controls/icon-library/font-awesome-glyph.tsx
|
|
5652
|
+
import * as React81 from "react";
|
|
5653
|
+
var FontAwesomeGlyph = ({ icon, size, color, label }) => {
|
|
5654
|
+
return /* @__PURE__ */ React81.createElement(
|
|
5655
|
+
"svg",
|
|
5656
|
+
{
|
|
5657
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5658
|
+
viewBox: `0 0 ${icon.width} ${icon.height}`,
|
|
5659
|
+
width: size,
|
|
5660
|
+
height: size,
|
|
5661
|
+
fill: color,
|
|
5662
|
+
overflow: "visible",
|
|
5663
|
+
"aria-hidden": label ? void 0 : true,
|
|
5664
|
+
"aria-label": label,
|
|
5665
|
+
role: label ? "img" : void 0
|
|
5666
|
+
},
|
|
5667
|
+
icon.paths.map((path, index) => /* @__PURE__ */ React81.createElement("path", { key: `${index}-${path}`, d: path }))
|
|
5668
|
+
);
|
|
5669
|
+
};
|
|
5670
|
+
|
|
5671
|
+
// src/controls/icon-library/use-font-awesome-7-catalog.ts
|
|
5672
|
+
import { useQuery as useQuery2 } from "@elementor/query";
|
|
5673
|
+
var FONT_AWESOME_7_CATALOG_QUERY_KEY = ["font-awesome-7-catalog"];
|
|
5674
|
+
function useFontAwesome7Catalog(enabled) {
|
|
5675
|
+
return useQuery2({
|
|
5676
|
+
queryKey: FONT_AWESOME_7_CATALOG_QUERY_KEY,
|
|
5677
|
+
queryFn: ({ signal }) => loadFontAwesome7Catalog(signal),
|
|
5678
|
+
enabled,
|
|
5679
|
+
staleTime: Infinity
|
|
5680
|
+
});
|
|
5681
|
+
}
|
|
5682
|
+
|
|
5683
|
+
// src/controls/icon-library/icon-library-popover.tsx
|
|
5684
|
+
var ICON_LIBRARY_POPOVER_WIDTH = 300;
|
|
5685
|
+
var ICON_LIBRARY_ROW_HEIGHT = 48;
|
|
5686
|
+
var ICON_TILE_SIZE = 40;
|
|
5687
|
+
var ICON_GLYPH_SIZE = 20;
|
|
5688
|
+
var ICON_LIBRARY_INLINE_SPACING = 1;
|
|
5689
|
+
var CompactIconLibraryMenuList = styled9(StyledMenuList)(({ theme }) => ({
|
|
5690
|
+
'& > [role="option"]': {
|
|
5691
|
+
padding: theme.spacing(0.75, ICON_LIBRARY_INLINE_SPACING)
|
|
5692
|
+
}
|
|
5693
|
+
}));
|
|
5694
|
+
var IconLibraryPopover = ({
|
|
5695
|
+
open,
|
|
5696
|
+
selectedIconClass,
|
|
5697
|
+
selectedIconLibrary,
|
|
5698
|
+
onSelect,
|
|
5699
|
+
onClose,
|
|
5700
|
+
width = ICON_LIBRARY_POPOVER_WIDTH
|
|
5701
|
+
}) => {
|
|
5702
|
+
const [searchValue, setSearchValue] = useState16("");
|
|
5703
|
+
const { data: icons = [], isLoading } = useFontAwesome7Catalog(open);
|
|
5704
|
+
const items2 = useMemo12(() => createIconLibraryItems(icons, searchValue), [icons, searchValue]);
|
|
5705
|
+
const selectedValue = useMemo12(
|
|
5706
|
+
() => findFontAwesome7Icon(icons, selectedIconClass, selectedIconLibrary)?.id,
|
|
5707
|
+
[icons, selectedIconClass, selectedIconLibrary]
|
|
5708
|
+
);
|
|
5709
|
+
const handleClose = () => {
|
|
5710
|
+
setSearchValue("");
|
|
5711
|
+
onClose();
|
|
5712
|
+
};
|
|
5713
|
+
const handleSelect = (id) => {
|
|
5714
|
+
const icon = items2.find((item) => item.id === id);
|
|
5715
|
+
if (!icon) {
|
|
5716
|
+
return;
|
|
5717
|
+
}
|
|
5718
|
+
onSelect({
|
|
5719
|
+
value: createIconSelectionValue(icon.library, icon.name),
|
|
5720
|
+
library: icon.library
|
|
5721
|
+
});
|
|
5722
|
+
};
|
|
5723
|
+
const handleClearSearch = () => {
|
|
5724
|
+
setSearchValue("");
|
|
5725
|
+
};
|
|
5726
|
+
return /* @__PURE__ */ React82.createElement(PopoverBody2, { width, fillWidth: true, id: "icon-library" }, /* @__PURE__ */ React82.createElement(
|
|
5727
|
+
PopoverHeader4,
|
|
5728
|
+
{
|
|
5729
|
+
title: __32("Icon library", "elementor"),
|
|
5730
|
+
onClose: handleClose,
|
|
5731
|
+
icon: /* @__PURE__ */ React82.createElement(ComponentsIcon, { fontSize: "tiny" }),
|
|
5732
|
+
sx: { pl: ICON_LIBRARY_INLINE_SPACING, pr: 0.5 }
|
|
5733
|
+
}
|
|
5734
|
+
), /* @__PURE__ */ React82.createElement(
|
|
5735
|
+
SearchField2,
|
|
5736
|
+
{
|
|
5737
|
+
value: searchValue,
|
|
5738
|
+
onSearch: setSearchValue,
|
|
5739
|
+
placeholder: __32("Search", "elementor"),
|
|
5740
|
+
id: "icon-library-search",
|
|
5741
|
+
sx: { px: ICON_LIBRARY_INLINE_SPACING, pb: 1 }
|
|
5742
|
+
}
|
|
5743
|
+
), /* @__PURE__ */ React82.createElement(Divider4, null), /* @__PURE__ */ React82.createElement(Box15, { sx: { flex: 1, overflow: "auto", minHeight: 0 } }, /* @__PURE__ */ React82.createElement(
|
|
5744
|
+
IconLibraryContent,
|
|
5745
|
+
{
|
|
5746
|
+
isLoading,
|
|
5747
|
+
items: items2,
|
|
5748
|
+
selectedValue,
|
|
5749
|
+
searchValue,
|
|
5750
|
+
onSelect: handleSelect,
|
|
5751
|
+
onClose: handleClose,
|
|
5752
|
+
onClearSearch: handleClearSearch
|
|
5753
|
+
}
|
|
5754
|
+
)));
|
|
5755
|
+
};
|
|
5756
|
+
var IconLibraryContent = ({
|
|
5757
|
+
isLoading,
|
|
5758
|
+
items: items2,
|
|
5759
|
+
selectedValue,
|
|
5760
|
+
searchValue,
|
|
5761
|
+
onSelect,
|
|
5762
|
+
onClose,
|
|
5763
|
+
onClearSearch
|
|
5764
|
+
}) => {
|
|
5765
|
+
if (isLoading) {
|
|
5766
|
+
return /* @__PURE__ */ React82.createElement(IconLibraryLoadingState, null);
|
|
5767
|
+
}
|
|
5768
|
+
return /* @__PURE__ */ React82.createElement(
|
|
5769
|
+
PopoverMenuList2,
|
|
5770
|
+
{
|
|
5771
|
+
items: items2,
|
|
5772
|
+
selectedValue,
|
|
5773
|
+
menuListTemplate: CompactIconLibraryMenuList,
|
|
5774
|
+
onSelect,
|
|
5775
|
+
onClose,
|
|
5776
|
+
itemHeight: ICON_LIBRARY_ROW_HEIGHT,
|
|
5777
|
+
menuItemContentTemplate: IconLibraryRow,
|
|
5778
|
+
noResultsComponent: /* @__PURE__ */ React82.createElement(IconLibraryEmptyState, { searchValue, onClear: onClearSearch }),
|
|
5779
|
+
"data-testid": "icon-library-list"
|
|
5780
|
+
}
|
|
5781
|
+
);
|
|
5782
|
+
};
|
|
5783
|
+
var IconLibraryLoadingState = () => /* @__PURE__ */ React82.createElement(Stack13, { alignItems: "center", justifyContent: "center", height: "100%" }, /* @__PURE__ */ React82.createElement(CircularProgress3, { role: "progressbar", size: 24 }));
|
|
5784
|
+
var IconLibraryEmptyState = ({ searchValue, onClear }) => {
|
|
5785
|
+
if (searchValue.trim() === "") {
|
|
5786
|
+
return /* @__PURE__ */ React82.createElement(CatalogUnavailable, null);
|
|
5787
|
+
}
|
|
5788
|
+
return /* @__PURE__ */ React82.createElement(NoResults, { searchValue, onClear });
|
|
5789
|
+
};
|
|
5790
|
+
var IconLibraryRow = (item) => {
|
|
5791
|
+
const icon = item;
|
|
5792
|
+
return /* @__PURE__ */ React82.createElement(Stack13, { direction: "row", alignItems: "center", gap: 1, sx: { width: "100%" } }, /* @__PURE__ */ React82.createElement(
|
|
5793
|
+
Box15,
|
|
5794
|
+
{
|
|
5795
|
+
sx: {
|
|
5796
|
+
width: ICON_TILE_SIZE,
|
|
5797
|
+
height: ICON_TILE_SIZE,
|
|
5798
|
+
display: "flex",
|
|
5799
|
+
alignItems: "center",
|
|
5800
|
+
justifyContent: "center",
|
|
5801
|
+
border: 1,
|
|
5802
|
+
borderColor: "divider",
|
|
5803
|
+
borderRadius: 1,
|
|
5804
|
+
color: "text.tertiary",
|
|
5805
|
+
flexShrink: 0
|
|
5806
|
+
}
|
|
5807
|
+
},
|
|
5808
|
+
icon.paths.length > 0 ? /* @__PURE__ */ React82.createElement(FontAwesomeGlyph, { icon, size: ICON_GLYPH_SIZE, color: "currentColor" }) : null
|
|
5809
|
+
), /* @__PURE__ */ React82.createElement(Typography7, { variant: "caption", color: "text.primary", noWrap: true }, icon.label));
|
|
5810
|
+
};
|
|
5811
|
+
var CatalogUnavailable = () => /* @__PURE__ */ React82.createElement(Stack13, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React82.createElement(ComponentsIcon, { fontSize: "large" }), /* @__PURE__ */ React82.createElement(Typography7, { align: "center", variant: "subtitle2", color: "text.secondary" }, __32("Icons couldn't be loaded.", "elementor")));
|
|
5812
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React82.createElement(Stack13, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React82.createElement(ComponentsIcon, { fontSize: "large" }), /* @__PURE__ */ React82.createElement(Typography7, { align: "center", variant: "subtitle2", color: "text.secondary" }, __32("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React82.createElement(Typography7, { align: "center", variant: "subtitle2", color: "text.secondary", noWrap: true, sx: { maxWidth: "80%" } }, "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React82.createElement(Link3, { color: "secondary", variant: "caption", component: "button", type: "button", onClick: onClear }, __32("Clear & try again", "elementor")));
|
|
5813
|
+
var createIconLibraryItems = (icons, searchValue) => filterFontAwesome7Icons(icons, searchValue).map((icon) => ({
|
|
5814
|
+
...icon,
|
|
5815
|
+
type: "item",
|
|
5816
|
+
value: icon.id
|
|
5817
|
+
}));
|
|
5818
|
+
|
|
5819
|
+
// src/controls/open-icon-library.ts
|
|
5820
|
+
import { stringPropTypeUtil as stringPropTypeUtil14 } from "@elementor/editor-props";
|
|
5427
5821
|
function createIconPropValue(icon, library) {
|
|
5428
5822
|
return {
|
|
5429
5823
|
value: stringPropTypeUtil14.create(icon),
|
|
@@ -5431,13 +5825,170 @@ function createIconPropValue(icon, library) {
|
|
|
5431
5825
|
};
|
|
5432
5826
|
}
|
|
5433
5827
|
|
|
5828
|
+
// src/controls/svg-media-overlay.tsx
|
|
5829
|
+
import * as React83 from "react";
|
|
5830
|
+
import { LibraryIcon, UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
5831
|
+
import { Box as Box16, Button as Button5, Stack as Stack14, styled as styled10, ThemeProvider, Typography as Typography8 } from "@elementor/ui";
|
|
5832
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
5833
|
+
var SVG_MEDIA_CONTROL_CONTAINER_TEST_ID = "svg-media-control-container";
|
|
5834
|
+
var SVG_MEDIA_ACTION_GROUP_TEST_ID = "svg-media-action-group";
|
|
5835
|
+
var MEDIA_ACTION_PADDING_Y = 0.75;
|
|
5836
|
+
var MEDIA_ACTION_PADDING_X = 2;
|
|
5837
|
+
var ICON_LIBRARY_PADDING = 0.625;
|
|
5838
|
+
var svgButtonSx = {
|
|
5839
|
+
px: MEDIA_ACTION_PADDING_X,
|
|
5840
|
+
py: MEDIA_ACTION_PADDING_Y
|
|
5841
|
+
};
|
|
5842
|
+
var MediaActionGroup = styled10(Stack14)(({ theme }) => ({
|
|
5843
|
+
display: "inline-flex",
|
|
5844
|
+
flexDirection: "row",
|
|
5845
|
+
alignItems: "stretch",
|
|
5846
|
+
border: "1px solid currentColor",
|
|
5847
|
+
borderRadius: theme.shape.borderRadius,
|
|
5848
|
+
overflow: "hidden",
|
|
5849
|
+
"& .MuiButton-root": {
|
|
5850
|
+
border: "none",
|
|
5851
|
+
borderRadius: 0,
|
|
5852
|
+
lineHeight: 1
|
|
5853
|
+
}
|
|
5854
|
+
}));
|
|
5855
|
+
var SvgMediaOverlay = ({
|
|
5856
|
+
isAdmin,
|
|
5857
|
+
showIconLibrary,
|
|
5858
|
+
buttonGroupRef,
|
|
5859
|
+
onSelectSvg,
|
|
5860
|
+
onUpload,
|
|
5861
|
+
onOpenIconLibrary,
|
|
5862
|
+
infotipTitle,
|
|
5863
|
+
infotipDescription
|
|
5864
|
+
}) => /* @__PURE__ */ React83.createElement(Stack14, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React83.createElement(MediaActionGroup, { ref: buttonGroupRef, direction: "row", "data-testid": SVG_MEDIA_ACTION_GROUP_TEST_ID }, /* @__PURE__ */ React83.createElement(
|
|
5865
|
+
Button5,
|
|
5866
|
+
{
|
|
5867
|
+
size: "tiny",
|
|
5868
|
+
color: "inherit",
|
|
5869
|
+
variant: "text",
|
|
5870
|
+
onClick: onSelectSvg,
|
|
5871
|
+
"aria-label": __33("Select", "elementor"),
|
|
5872
|
+
sx: svgButtonSx
|
|
5873
|
+
},
|
|
5874
|
+
__33("Select", "elementor")
|
|
5875
|
+
), /* @__PURE__ */ React83.createElement(
|
|
5876
|
+
Box16,
|
|
5877
|
+
{
|
|
5878
|
+
sx: {
|
|
5879
|
+
width: "1px",
|
|
5880
|
+
alignSelf: "stretch",
|
|
5881
|
+
bgcolor: "currentColor",
|
|
5882
|
+
flexShrink: 0
|
|
5883
|
+
}
|
|
5884
|
+
}
|
|
5885
|
+
), /* @__PURE__ */ React83.createElement(
|
|
5886
|
+
ConditionalControlInfotip,
|
|
5887
|
+
{
|
|
5888
|
+
title: infotipTitle,
|
|
5889
|
+
description: infotipDescription,
|
|
5890
|
+
isEnabled: !isAdmin
|
|
5891
|
+
},
|
|
5892
|
+
/* @__PURE__ */ React83.createElement(Box16, { component: "span", sx: { display: "inline-flex" } }, /* @__PURE__ */ React83.createElement(UploadControl, { isAdmin, onUpload }))
|
|
5893
|
+
)), showIconLibrary ? /* @__PURE__ */ React83.createElement(
|
|
5894
|
+
Button5,
|
|
5895
|
+
{
|
|
5896
|
+
size: "tiny",
|
|
5897
|
+
color: "inherit",
|
|
5898
|
+
variant: "text",
|
|
5899
|
+
startIcon: /* @__PURE__ */ React83.createElement(LibraryIcon, { sx: { height: "18px", width: "16px" } }),
|
|
5900
|
+
"aria-label": __33("Icon library", "elementor"),
|
|
5901
|
+
onClick: onOpenIconLibrary,
|
|
5902
|
+
sx: {
|
|
5903
|
+
height: "28px",
|
|
5904
|
+
p: ICON_LIBRARY_PADDING,
|
|
5905
|
+
".MuiButton-icon": { ml: 0 }
|
|
5906
|
+
}
|
|
5907
|
+
},
|
|
5908
|
+
/* @__PURE__ */ React83.createElement(Typography8, null, __33("Icon library", "elementor"))
|
|
5909
|
+
) : null);
|
|
5910
|
+
var UploadControl = ({ isAdmin, onUpload }) => {
|
|
5911
|
+
if (isAdmin) {
|
|
5912
|
+
return /* @__PURE__ */ React83.createElement(UploadButton, { sx: svgButtonSx, onClick: onUpload });
|
|
5913
|
+
}
|
|
5914
|
+
return /* @__PURE__ */ React83.createElement(ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React83.createElement(UploadButton, { disabled: true, sx: svgButtonSx }));
|
|
5915
|
+
};
|
|
5916
|
+
var UploadButton = ({
|
|
5917
|
+
disabled = false,
|
|
5918
|
+
sx,
|
|
5919
|
+
onClick
|
|
5920
|
+
}) => /* @__PURE__ */ React83.createElement(
|
|
5921
|
+
Button5,
|
|
5922
|
+
{
|
|
5923
|
+
sx,
|
|
5924
|
+
size: "tiny",
|
|
5925
|
+
color: "inherit",
|
|
5926
|
+
variant: "text",
|
|
5927
|
+
disabled,
|
|
5928
|
+
onClick,
|
|
5929
|
+
"aria-label": __33("Upload", "elementor")
|
|
5930
|
+
},
|
|
5931
|
+
/* @__PURE__ */ React83.createElement(UploadIcon2, null)
|
|
5932
|
+
);
|
|
5933
|
+
|
|
5934
|
+
// src/controls/svg-media-preview.tsx
|
|
5935
|
+
import * as React84 from "react";
|
|
5936
|
+
import { Box as Box17, CardMedia as CardMedia2, CircularProgress as CircularProgress4 } from "@elementor/ui";
|
|
5937
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
5938
|
+
var ICON_PREVIEW_SIZE = 50;
|
|
5939
|
+
var ICON_PREVIEW_COLOR = "#000000";
|
|
5940
|
+
var SvgMediaPreview = ({ isFetching, src, iconClassName, iconLibrary }) => {
|
|
5941
|
+
const shouldLoadIconCatalog = Boolean(iconClassName && iconLibrary);
|
|
5942
|
+
const { data: icons = [], isLoading } = useFontAwesome7Catalog(shouldLoadIconCatalog);
|
|
5943
|
+
const selectedIcon = findFontAwesome7Icon(icons, iconClassName, iconLibrary);
|
|
5944
|
+
if (isFetching || shouldLoadIconCatalog && isLoading) {
|
|
5945
|
+
return /* @__PURE__ */ React84.createElement(CircularProgress4, { role: "progressbar" });
|
|
5946
|
+
}
|
|
5947
|
+
if (selectedIcon) {
|
|
5948
|
+
return /* @__PURE__ */ React84.createElement(IconPreview, { icon: selectedIcon });
|
|
5949
|
+
}
|
|
5950
|
+
if (shouldLoadIconCatalog) {
|
|
5951
|
+
return /* @__PURE__ */ React84.createElement(IconPreviewPlaceholder, null);
|
|
5952
|
+
}
|
|
5953
|
+
return /* @__PURE__ */ React84.createElement(SvgPreview, { src });
|
|
5954
|
+
};
|
|
5955
|
+
var IconPreview = ({ icon }) => /* @__PURE__ */ React84.createElement(Box17, { sx: { color: ICON_PREVIEW_COLOR } }, /* @__PURE__ */ React84.createElement(
|
|
5956
|
+
FontAwesomeGlyph,
|
|
5957
|
+
{
|
|
5958
|
+
icon,
|
|
5959
|
+
size: ICON_PREVIEW_SIZE,
|
|
5960
|
+
color: ICON_PREVIEW_COLOR,
|
|
5961
|
+
label: __34("Preview icon", "elementor")
|
|
5962
|
+
}
|
|
5963
|
+
));
|
|
5964
|
+
var IconPreviewPlaceholder = () => /* @__PURE__ */ React84.createElement(
|
|
5965
|
+
Box17,
|
|
5966
|
+
{
|
|
5967
|
+
"aria-hidden": true,
|
|
5968
|
+
sx: {
|
|
5969
|
+
width: ICON_PREVIEW_SIZE,
|
|
5970
|
+
height: ICON_PREVIEW_SIZE,
|
|
5971
|
+
color: ICON_PREVIEW_COLOR
|
|
5972
|
+
}
|
|
5973
|
+
}
|
|
5974
|
+
);
|
|
5975
|
+
var SvgPreview = ({ src }) => /* @__PURE__ */ React84.createElement(
|
|
5976
|
+
CardMedia2,
|
|
5977
|
+
{
|
|
5978
|
+
component: "img",
|
|
5979
|
+
image: src,
|
|
5980
|
+
alt: __34("Preview SVG", "elementor"),
|
|
5981
|
+
sx: { maxHeight: "140px", width: `${ICON_PREVIEW_SIZE}px`, color: ICON_PREVIEW_COLOR }
|
|
5982
|
+
}
|
|
5983
|
+
);
|
|
5984
|
+
|
|
5434
5985
|
// src/controls/svg-media-control.tsx
|
|
5435
5986
|
var TILE_SIZE = 8;
|
|
5436
5987
|
var TILE_WHITE = "transparent";
|
|
5437
5988
|
var TILE_BLACK = "#c1c1c1";
|
|
5438
|
-
var ICON_PREVIEW_FONT_SIZE = 50;
|
|
5439
5989
|
var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
|
|
5440
|
-
var StyledCard =
|
|
5990
|
+
var StyledCard = styled11(Card2)`
|
|
5991
|
+
position: relative;
|
|
5441
5992
|
background-color: white;
|
|
5442
5993
|
background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
|
|
5443
5994
|
background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
|
|
@@ -5446,7 +5997,8 @@ var StyledCard = styled9(Card2)`
|
|
|
5446
5997
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
5447
5998
|
border: none;
|
|
5448
5999
|
`;
|
|
5449
|
-
var
|
|
6000
|
+
var PREVIEW_ICON_COLOR = "#000000";
|
|
6001
|
+
var StyledCardMediaContainer = styled11(Stack15)`
|
|
5450
6002
|
position: relative;
|
|
5451
6003
|
height: 140px;
|
|
5452
6004
|
object-fit: contain;
|
|
@@ -5454,6 +6006,7 @@ var StyledCardMediaContainer = styled9(Stack13)`
|
|
|
5454
6006
|
justify-content: center;
|
|
5455
6007
|
align-items: center;
|
|
5456
6008
|
background-color: rgba( 255, 255, 255, 0.37 );
|
|
6009
|
+
color: ${PREVIEW_ICON_COLOR};
|
|
5457
6010
|
`;
|
|
5458
6011
|
var MODE_BROWSE = { mode: "browse" };
|
|
5459
6012
|
var MODE_UPLOAD = { mode: "upload" };
|
|
@@ -5465,7 +6018,11 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5465
6018
|
const { data: attachment, isFetching } = useWpMediaAttachment2(id?.value || null);
|
|
5466
6019
|
const src = attachment?.url ?? url?.value ?? null;
|
|
5467
6020
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
5468
|
-
const [unfilteredModalOpenState, setUnfilteredModalOpenState] =
|
|
6021
|
+
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState17(false);
|
|
6022
|
+
const iconLibraryPopoverState = usePopupState8({ variant: "popover" });
|
|
6023
|
+
const controlContainerRef = useRef15(null);
|
|
6024
|
+
const buttonGroupRef = useRef15(null);
|
|
6025
|
+
const [iconLibraryAnchor, setIconLibraryAnchor] = useState17(null);
|
|
5469
6026
|
const { isAdmin } = useCurrentUserCapabilities();
|
|
5470
6027
|
const selectedIconClass = showIconLibrary && typeof iconValue?.value?.value === "string" ? iconValue.value.value : null;
|
|
5471
6028
|
const selectedIconLibrary = showIconLibrary && typeof iconValue?.library?.value === "string" ? iconValue.library.value : null;
|
|
@@ -5483,7 +6040,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5483
6040
|
});
|
|
5484
6041
|
}
|
|
5485
6042
|
});
|
|
5486
|
-
const
|
|
6043
|
+
const handleCloseUnfilteredModal = (enabled) => {
|
|
5487
6044
|
setUnfilteredModalOpenState(false);
|
|
5488
6045
|
if (enabled) {
|
|
5489
6046
|
open(MODE_UPLOAD);
|
|
@@ -5496,127 +6053,123 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5496
6053
|
open(openOptions);
|
|
5497
6054
|
}
|
|
5498
6055
|
};
|
|
6056
|
+
const handleSelectSvg = () => {
|
|
6057
|
+
handleClick(MODE_BROWSE);
|
|
6058
|
+
};
|
|
6059
|
+
const handleUpload = () => {
|
|
6060
|
+
handleClick(MODE_UPLOAD);
|
|
6061
|
+
};
|
|
6062
|
+
const handleCloseIconLibrary = () => {
|
|
6063
|
+
iconLibraryPopoverState.close();
|
|
6064
|
+
setIconLibraryAnchor(null);
|
|
6065
|
+
};
|
|
5499
6066
|
const handleIconLibrarySelect = (icon) => {
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
id: icon.value.id ? {
|
|
5506
|
-
$$type: "image-attachment-id",
|
|
5507
|
-
value: icon.value.id
|
|
5508
|
-
} : null,
|
|
5509
|
-
url: icon.value.url ? urlPropTypeUtil4.create(icon.value.url) : null
|
|
5510
|
-
});
|
|
6067
|
+
setIconValue(createIconPropValue(icon.value, icon.library));
|
|
6068
|
+
};
|
|
6069
|
+
const handleOpenIconLibrary = (event) => {
|
|
6070
|
+
const anchor = measureIconLibraryAnchor(controlContainerRef.current, buttonGroupRef.current);
|
|
6071
|
+
if (!anchor) {
|
|
5511
6072
|
return;
|
|
5512
6073
|
}
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
}
|
|
5516
|
-
};
|
|
5517
|
-
const infotipProps = {
|
|
5518
|
-
title: __32("Sorry, you can't upload that file yet.", "elementor"),
|
|
5519
|
-
description: /* @__PURE__ */ React81.createElement(React81.Fragment, null, __32("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React81.createElement("br", null), __32("file uploads.", "elementor")),
|
|
5520
|
-
isEnabled: !isAdmin
|
|
6074
|
+
setIconLibraryAnchor(anchor);
|
|
6075
|
+
iconLibraryPopoverState.open(event);
|
|
5521
6076
|
};
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
isFetching,
|
|
5526
|
-
src,
|
|
5527
|
-
iconClassName: selectedIconClass,
|
|
5528
|
-
iconLibrary: selectedIconLibrary
|
|
6077
|
+
useEffect16(() => {
|
|
6078
|
+
if (!iconLibraryPopoverState.isOpen) {
|
|
6079
|
+
return;
|
|
5529
6080
|
}
|
|
5530
|
-
|
|
5531
|
-
|
|
6081
|
+
const handleResize = () => {
|
|
6082
|
+
const nextAnchor = measureIconLibraryAnchor(controlContainerRef.current, buttonGroupRef.current);
|
|
6083
|
+
if (nextAnchor) {
|
|
6084
|
+
setIconLibraryAnchor(nextAnchor);
|
|
6085
|
+
}
|
|
6086
|
+
};
|
|
6087
|
+
window.addEventListener("resize", handleResize);
|
|
6088
|
+
return () => {
|
|
6089
|
+
window.removeEventListener("resize", handleResize);
|
|
6090
|
+
};
|
|
6091
|
+
}, [iconLibraryPopoverState.isOpen]);
|
|
6092
|
+
const iconLibraryWidth = iconLibraryAnchor?.width ?? ICON_LIBRARY_POPOVER_WIDTH;
|
|
6093
|
+
return /* @__PURE__ */ React85.createElement(Stack15, { gap: 1, "aria-label": __35("SVG control", "elementor") }, /* @__PURE__ */ React85.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: handleCloseUnfilteredModal }), showIconLibrary && iconLibraryAnchor ? /* @__PURE__ */ React85.createElement(
|
|
6094
|
+
Popover6,
|
|
5532
6095
|
{
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
6096
|
+
disableScrollLock: true,
|
|
6097
|
+
open: iconLibraryPopoverState.isOpen,
|
|
6098
|
+
onClose: handleCloseIconLibrary,
|
|
6099
|
+
anchorReference: "anchorPosition",
|
|
6100
|
+
anchorPosition: { top: iconLibraryAnchor.top, left: iconLibraryAnchor.left },
|
|
6101
|
+
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
6102
|
+
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
6103
|
+
marginThreshold: 0,
|
|
6104
|
+
PaperProps: {
|
|
6105
|
+
sx: {
|
|
6106
|
+
width: iconLibraryWidth,
|
|
6107
|
+
minWidth: iconLibraryWidth,
|
|
6108
|
+
maxWidth: iconLibraryWidth,
|
|
6109
|
+
m: 0
|
|
5536
6110
|
}
|
|
5537
6111
|
}
|
|
5538
6112
|
},
|
|
5539
|
-
/* @__PURE__ */
|
|
5540
|
-
|
|
6113
|
+
/* @__PURE__ */ React85.createElement(
|
|
6114
|
+
IconLibraryPopover,
|
|
5541
6115
|
{
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
)
|
|
5550
|
-
|
|
6116
|
+
open: iconLibraryPopoverState.isOpen,
|
|
6117
|
+
selectedIconClass,
|
|
6118
|
+
selectedIconLibrary,
|
|
6119
|
+
onSelect: handleIconLibrarySelect,
|
|
6120
|
+
onClose: handleCloseIconLibrary,
|
|
6121
|
+
width: iconLibraryWidth
|
|
6122
|
+
}
|
|
6123
|
+
)
|
|
6124
|
+
) : null, /* @__PURE__ */ React85.createElement(
|
|
6125
|
+
Box18,
|
|
6126
|
+
{
|
|
6127
|
+
ref: controlContainerRef,
|
|
6128
|
+
"data-testid": SVG_MEDIA_CONTROL_CONTAINER_TEST_ID,
|
|
6129
|
+
sx: { width: "100%" }
|
|
6130
|
+
},
|
|
6131
|
+
/* @__PURE__ */ React85.createElement(ControlActions, null, /* @__PURE__ */ React85.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React85.createElement(StyledCardMediaContainer, null, /* @__PURE__ */ React85.createElement(
|
|
6132
|
+
SvgMediaPreview,
|
|
5551
6133
|
{
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
"aria-label": __32("Icon library", "elementor")
|
|
5560
|
-
},
|
|
5561
|
-
__32("Icon library", "elementor")
|
|
5562
|
-
) : null, /* @__PURE__ */ React81.createElement(ConditionalControlInfotip, { ...infotipProps }, /* @__PURE__ */ React81.createElement("span", null, /* @__PURE__ */ React81.createElement(ThemeProvider, { colorScheme: isAdmin ? "light" : "dark" }, /* @__PURE__ */ React81.createElement(
|
|
5563
|
-
Button5,
|
|
6134
|
+
isFetching,
|
|
6135
|
+
src,
|
|
6136
|
+
iconClassName: selectedIconClass,
|
|
6137
|
+
iconLibrary: selectedIconLibrary
|
|
6138
|
+
}
|
|
6139
|
+
)), /* @__PURE__ */ React85.createElement(
|
|
6140
|
+
CardOverlay2,
|
|
5564
6141
|
{
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
onClick: () => isAdmin && handleClick(MODE_UPLOAD),
|
|
5571
|
-
"aria-label": "Upload SVG"
|
|
6142
|
+
sx: {
|
|
6143
|
+
"&:hover": {
|
|
6144
|
+
backgroundColor: "rgba( 0, 0, 0, 0.75 )"
|
|
6145
|
+
}
|
|
6146
|
+
}
|
|
5572
6147
|
},
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
6148
|
+
/* @__PURE__ */ React85.createElement(
|
|
6149
|
+
SvgMediaOverlay,
|
|
6150
|
+
{
|
|
6151
|
+
isAdmin,
|
|
6152
|
+
showIconLibrary,
|
|
6153
|
+
buttonGroupRef,
|
|
6154
|
+
onSelectSvg: handleSelectSvg,
|
|
6155
|
+
onUpload: handleUpload,
|
|
6156
|
+
onOpenIconLibrary: handleOpenIconLibrary,
|
|
6157
|
+
infotipTitle: __35("Sorry, you can't upload that file yet.", "elementor"),
|
|
6158
|
+
infotipDescription: /* @__PURE__ */ React85.createElement(UnfilteredUploadInfotipDescription, null)
|
|
6159
|
+
}
|
|
6160
|
+
)
|
|
6161
|
+
)))
|
|
6162
|
+
));
|
|
5576
6163
|
});
|
|
5577
|
-
|
|
5578
|
-
isFetching,
|
|
5579
|
-
src,
|
|
5580
|
-
iconClassName,
|
|
5581
|
-
iconLibrary
|
|
5582
|
-
}) {
|
|
5583
|
-
useEffect16(() => {
|
|
5584
|
-
if (iconLibrary) {
|
|
5585
|
-
enqueueIconFonts(iconLibrary);
|
|
5586
|
-
}
|
|
5587
|
-
}, [iconLibrary]);
|
|
5588
|
-
if (isFetching) {
|
|
5589
|
-
return /* @__PURE__ */ React81.createElement(CircularProgress3, { role: "progressbar" });
|
|
5590
|
-
}
|
|
5591
|
-
if (iconClassName) {
|
|
5592
|
-
return /* @__PURE__ */ React81.createElement(
|
|
5593
|
-
Box15,
|
|
5594
|
-
{
|
|
5595
|
-
component: "i",
|
|
5596
|
-
className: iconClassName,
|
|
5597
|
-
"aria-label": __32("Preview icon", "elementor"),
|
|
5598
|
-
sx: { fontSize: ICON_PREVIEW_FONT_SIZE }
|
|
5599
|
-
}
|
|
5600
|
-
);
|
|
5601
|
-
}
|
|
5602
|
-
return /* @__PURE__ */ React81.createElement(
|
|
5603
|
-
CardMedia2,
|
|
5604
|
-
{
|
|
5605
|
-
component: "img",
|
|
5606
|
-
image: src,
|
|
5607
|
-
alt: __32("Preview SVG", "elementor"),
|
|
5608
|
-
sx: { maxHeight: "140px", width: `${ICON_PREVIEW_FONT_SIZE}px` }
|
|
5609
|
-
}
|
|
5610
|
-
);
|
|
5611
|
-
}
|
|
6164
|
+
var UnfilteredUploadInfotipDescription = () => /* @__PURE__ */ React85.createElement(React85.Fragment, null, __35("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React85.createElement("br", null), __35("file uploads.", "elementor"));
|
|
5612
6165
|
|
|
5613
6166
|
// src/controls/video-media-control.tsx
|
|
5614
|
-
import * as
|
|
6167
|
+
import * as React86 from "react";
|
|
5615
6168
|
import { urlPropTypeUtil as urlPropTypeUtil5, videoSrcPropTypeUtil } from "@elementor/editor-props";
|
|
5616
6169
|
import { UploadIcon as UploadIcon3 } from "@elementor/icons";
|
|
5617
|
-
import { Button as Button6, Card as Card3, CardMedia as CardMedia3, CardOverlay as CardOverlay3, CircularProgress as
|
|
6170
|
+
import { Button as Button6, Card as Card3, CardMedia as CardMedia3, CardOverlay as CardOverlay3, CircularProgress as CircularProgress5, Stack as Stack16 } from "@elementor/ui";
|
|
5618
6171
|
import { useWpMediaAttachment as useWpMediaAttachment3, useWpMediaFrame as useWpMediaFrame3 } from "@elementor/wp-media";
|
|
5619
|
-
import { __ as
|
|
6172
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
5620
6173
|
var PLACEHOLDER_IMAGE = window.elementorCommon?.config?.urls?.assets + "/shapes/play-triangle.svg";
|
|
5621
6174
|
var VideoMediaControl = createControl(() => {
|
|
5622
6175
|
const { value, setValue, propType } = useBoundProp(videoSrcPropTypeUtil);
|
|
@@ -5646,7 +6199,7 @@ var VideoMediaControl = createControl(() => {
|
|
|
5646
6199
|
});
|
|
5647
6200
|
}
|
|
5648
6201
|
});
|
|
5649
|
-
return /* @__PURE__ */
|
|
6202
|
+
return /* @__PURE__ */ React86.createElement(ControlActions, null, /* @__PURE__ */ React86.createElement(Card3, { variant: "outlined" }, /* @__PURE__ */ React86.createElement(
|
|
5650
6203
|
CardMedia3,
|
|
5651
6204
|
{
|
|
5652
6205
|
sx: {
|
|
@@ -5661,8 +6214,8 @@ var VideoMediaControl = createControl(() => {
|
|
|
5661
6214
|
alignItems: "center"
|
|
5662
6215
|
}
|
|
5663
6216
|
},
|
|
5664
|
-
/* @__PURE__ */
|
|
5665
|
-
), /* @__PURE__ */
|
|
6217
|
+
/* @__PURE__ */ React86.createElement(VideoPreview, { isFetching, videoUrl })
|
|
6218
|
+
), /* @__PURE__ */ React86.createElement(CardOverlay3, null, /* @__PURE__ */ React86.createElement(Stack16, { gap: 1 }, /* @__PURE__ */ React86.createElement(
|
|
5666
6219
|
Button6,
|
|
5667
6220
|
{
|
|
5668
6221
|
size: "tiny",
|
|
@@ -5670,18 +6223,18 @@ var VideoMediaControl = createControl(() => {
|
|
|
5670
6223
|
variant: "outlined",
|
|
5671
6224
|
onClick: () => open({ mode: "browse" })
|
|
5672
6225
|
},
|
|
5673
|
-
|
|
5674
|
-
), /* @__PURE__ */
|
|
6226
|
+
__36("Select video", "elementor")
|
|
6227
|
+
), /* @__PURE__ */ React86.createElement(
|
|
5675
6228
|
Button6,
|
|
5676
6229
|
{
|
|
5677
6230
|
size: "tiny",
|
|
5678
6231
|
variant: "text",
|
|
5679
6232
|
color: "inherit",
|
|
5680
|
-
startIcon: /* @__PURE__ */
|
|
6233
|
+
startIcon: /* @__PURE__ */ React86.createElement(UploadIcon3, null),
|
|
5681
6234
|
onClick: () => open({ mode: "upload" })
|
|
5682
6235
|
},
|
|
5683
|
-
|
|
5684
|
-
), /* @__PURE__ */
|
|
6236
|
+
__36("Upload", "elementor")
|
|
6237
|
+
), /* @__PURE__ */ React86.createElement(
|
|
5685
6238
|
Button6,
|
|
5686
6239
|
{
|
|
5687
6240
|
size: "tiny",
|
|
@@ -5689,18 +6242,18 @@ var VideoMediaControl = createControl(() => {
|
|
|
5689
6242
|
color: "inherit",
|
|
5690
6243
|
onClick: () => open({ mode: "url", currentUrl: currentUrlForModal })
|
|
5691
6244
|
},
|
|
5692
|
-
|
|
6245
|
+
__36("Insert from URL", "elementor")
|
|
5693
6246
|
)))));
|
|
5694
6247
|
});
|
|
5695
6248
|
var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
5696
6249
|
if (isFetching) {
|
|
5697
|
-
return /* @__PURE__ */
|
|
6250
|
+
return /* @__PURE__ */ React86.createElement(CircularProgress5, null);
|
|
5698
6251
|
}
|
|
5699
6252
|
if (videoUrl) {
|
|
5700
|
-
return /* @__PURE__ */
|
|
6253
|
+
return /* @__PURE__ */ React86.createElement(
|
|
5701
6254
|
"video",
|
|
5702
6255
|
{
|
|
5703
|
-
"aria-label":
|
|
6256
|
+
"aria-label": __36("Video preview", "elementor"),
|
|
5704
6257
|
src: videoUrl,
|
|
5705
6258
|
muted: true,
|
|
5706
6259
|
preload: "metadata",
|
|
@@ -5713,33 +6266,33 @@ var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
|
5713
6266
|
}
|
|
5714
6267
|
);
|
|
5715
6268
|
}
|
|
5716
|
-
return /* @__PURE__ */
|
|
6269
|
+
return /* @__PURE__ */ React86.createElement("img", { src: PLACEHOLDER_IMAGE, alt: "No video selected" });
|
|
5717
6270
|
};
|
|
5718
6271
|
|
|
5719
6272
|
// src/controls/background-control/background-control.tsx
|
|
5720
|
-
import * as
|
|
6273
|
+
import * as React93 from "react";
|
|
5721
6274
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
5722
6275
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
5723
|
-
import { __ as
|
|
6276
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
5724
6277
|
|
|
5725
6278
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
5726
|
-
import * as
|
|
6279
|
+
import * as React92 from "react";
|
|
5727
6280
|
import {
|
|
5728
6281
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
5729
6282
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
5730
6283
|
backgroundOverlayPropTypeUtil,
|
|
5731
6284
|
colorPropTypeUtil as colorPropTypeUtil3
|
|
5732
6285
|
} from "@elementor/editor-props";
|
|
5733
|
-
import { Box as
|
|
6286
|
+
import { Box as Box19, CardMedia as CardMedia4, styled as styled12, Tab, TabPanel, Tabs, UnstableColorIndicator as UnstableColorIndicator3 } from "@elementor/ui";
|
|
5734
6287
|
import { useWpMediaAttachment as useWpMediaAttachment4 } from "@elementor/wp-media";
|
|
5735
|
-
import { __ as
|
|
6288
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
5736
6289
|
|
|
5737
6290
|
// src/env.ts
|
|
5738
6291
|
import { parseEnv } from "@elementor/env";
|
|
5739
6292
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
5740
6293
|
|
|
5741
6294
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
5742
|
-
import * as
|
|
6295
|
+
import * as React87 from "react";
|
|
5743
6296
|
import {
|
|
5744
6297
|
backgroundGradientOverlayPropTypeUtil,
|
|
5745
6298
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -5786,7 +6339,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
5786
6339
|
positions: positions?.value.split(" ")
|
|
5787
6340
|
};
|
|
5788
6341
|
};
|
|
5789
|
-
return /* @__PURE__ */
|
|
6342
|
+
return /* @__PURE__ */ React87.createElement(
|
|
5790
6343
|
UnstableGradientBox,
|
|
5791
6344
|
{
|
|
5792
6345
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -5811,53 +6364,53 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
5811
6364
|
});
|
|
5812
6365
|
|
|
5813
6366
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
5814
|
-
import * as
|
|
6367
|
+
import * as React88 from "react";
|
|
5815
6368
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
5816
6369
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
5817
|
-
import { __ as
|
|
6370
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
5818
6371
|
var attachmentControlOptions = [
|
|
5819
6372
|
{
|
|
5820
6373
|
value: "fixed",
|
|
5821
|
-
label:
|
|
5822
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6374
|
+
label: __37("Fixed", "elementor"),
|
|
6375
|
+
renderContent: ({ size }) => /* @__PURE__ */ React88.createElement(PinIcon, { fontSize: size }),
|
|
5823
6376
|
showTooltip: true
|
|
5824
6377
|
},
|
|
5825
6378
|
{
|
|
5826
6379
|
value: "scroll",
|
|
5827
|
-
label:
|
|
5828
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6380
|
+
label: __37("Scroll", "elementor"),
|
|
6381
|
+
renderContent: ({ size }) => /* @__PURE__ */ React88.createElement(PinnedOffIcon, { fontSize: size }),
|
|
5829
6382
|
showTooltip: true
|
|
5830
6383
|
}
|
|
5831
6384
|
];
|
|
5832
6385
|
var BackgroundImageOverlayAttachment = () => {
|
|
5833
|
-
return /* @__PURE__ */
|
|
6386
|
+
return /* @__PURE__ */ React88.createElement(PopoverGridContainer, null, /* @__PURE__ */ React88.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React88.createElement(ControlFormLabel, null, __37("Attachment", "elementor"))), /* @__PURE__ */ React88.createElement(Grid14, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React88.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
5834
6387
|
};
|
|
5835
6388
|
|
|
5836
6389
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
5837
|
-
import * as
|
|
5838
|
-
import { useRef as
|
|
6390
|
+
import * as React89 from "react";
|
|
6391
|
+
import { useRef as useRef16 } from "react";
|
|
5839
6392
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil16 } from "@elementor/editor-props";
|
|
5840
6393
|
import { MenuListItem as MenuListItem6 } from "@elementor/editor-ui";
|
|
5841
6394
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
5842
6395
|
import { Grid as Grid15, Select as Select4 } from "@elementor/ui";
|
|
5843
|
-
import { __ as
|
|
6396
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
5844
6397
|
var backgroundPositionOptions = [
|
|
5845
|
-
{ label:
|
|
5846
|
-
{ label:
|
|
5847
|
-
{ label:
|
|
5848
|
-
{ label:
|
|
5849
|
-
{ label:
|
|
5850
|
-
{ label:
|
|
5851
|
-
{ label:
|
|
5852
|
-
{ label:
|
|
5853
|
-
{ label:
|
|
5854
|
-
{ label:
|
|
6398
|
+
{ label: __38("Center center", "elementor"), value: "center center" },
|
|
6399
|
+
{ label: __38("Center left", "elementor"), value: "center left" },
|
|
6400
|
+
{ label: __38("Center right", "elementor"), value: "center right" },
|
|
6401
|
+
{ label: __38("Top center", "elementor"), value: "top center" },
|
|
6402
|
+
{ label: __38("Top left", "elementor"), value: "top left" },
|
|
6403
|
+
{ label: __38("Top right", "elementor"), value: "top right" },
|
|
6404
|
+
{ label: __38("Bottom center", "elementor"), value: "bottom center" },
|
|
6405
|
+
{ label: __38("Bottom left", "elementor"), value: "bottom left" },
|
|
6406
|
+
{ label: __38("Bottom right", "elementor"), value: "bottom right" },
|
|
6407
|
+
{ label: __38("Custom", "elementor"), value: "custom" }
|
|
5855
6408
|
];
|
|
5856
6409
|
var BackgroundImageOverlayPosition = () => {
|
|
5857
6410
|
const backgroundImageOffsetContext = useBoundProp(backgroundImagePositionOffsetPropTypeUtil);
|
|
5858
6411
|
const stringPropContext = useBoundProp(stringPropTypeUtil16);
|
|
5859
6412
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
5860
|
-
const rowRef =
|
|
6413
|
+
const rowRef = useRef16(null);
|
|
5861
6414
|
const handlePositionChange = (event) => {
|
|
5862
6415
|
const value = event.target.value || null;
|
|
5863
6416
|
if (value === "custom") {
|
|
@@ -5866,7 +6419,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5866
6419
|
stringPropContext.setValue(value);
|
|
5867
6420
|
}
|
|
5868
6421
|
};
|
|
5869
|
-
return /* @__PURE__ */
|
|
6422
|
+
return /* @__PURE__ */ React89.createElement(Grid15, { container: true, spacing: 1.5 }, /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(PopoverGridContainer, null, /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React89.createElement(ControlFormLabel, null, __38("Position", "elementor"))), /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React89.createElement(ControlActions, null, /* @__PURE__ */ React89.createElement(
|
|
5870
6423
|
Select4,
|
|
5871
6424
|
{
|
|
5872
6425
|
fullWidth: true,
|
|
@@ -5875,18 +6428,18 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5875
6428
|
disabled: stringPropContext.disabled,
|
|
5876
6429
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
5877
6430
|
},
|
|
5878
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
5879
|
-
))))), isCustom ? /* @__PURE__ */
|
|
6431
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React89.createElement(MenuListItem6, { key: value, value: value ?? "" }, label))
|
|
6432
|
+
))))), isCustom ? /* @__PURE__ */ React89.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(Grid15, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React89.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React89.createElement(
|
|
5880
6433
|
SizeControl,
|
|
5881
6434
|
{
|
|
5882
|
-
startIcon: /* @__PURE__ */
|
|
6435
|
+
startIcon: /* @__PURE__ */ React89.createElement(LetterXIcon, { fontSize: "tiny" }),
|
|
5883
6436
|
anchorRef: rowRef,
|
|
5884
6437
|
min: -Number.MAX_SAFE_INTEGER
|
|
5885
6438
|
}
|
|
5886
|
-
))), /* @__PURE__ */
|
|
6439
|
+
))), /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React89.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React89.createElement(
|
|
5887
6440
|
SizeControl,
|
|
5888
6441
|
{
|
|
5889
|
-
startIcon: /* @__PURE__ */
|
|
6442
|
+
startIcon: /* @__PURE__ */ React89.createElement(LetterYIcon, { fontSize: "tiny" }),
|
|
5890
6443
|
anchorRef: rowRef,
|
|
5891
6444
|
min: -Number.MAX_SAFE_INTEGER
|
|
5892
6445
|
}
|
|
@@ -5894,43 +6447,43 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5894
6447
|
};
|
|
5895
6448
|
|
|
5896
6449
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
5897
|
-
import * as
|
|
6450
|
+
import * as React90 from "react";
|
|
5898
6451
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon3 } from "@elementor/icons";
|
|
5899
6452
|
import { Grid as Grid16 } from "@elementor/ui";
|
|
5900
|
-
import { __ as
|
|
6453
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
5901
6454
|
var repeatControlOptions = [
|
|
5902
6455
|
{
|
|
5903
6456
|
value: "repeat",
|
|
5904
|
-
label:
|
|
5905
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6457
|
+
label: __39("Repeat", "elementor"),
|
|
6458
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(GridDotsIcon, { fontSize: size }),
|
|
5906
6459
|
showTooltip: true
|
|
5907
6460
|
},
|
|
5908
6461
|
{
|
|
5909
6462
|
value: "repeat-x",
|
|
5910
|
-
label:
|
|
5911
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6463
|
+
label: __39("Repeat-x", "elementor"),
|
|
6464
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
5912
6465
|
showTooltip: true
|
|
5913
6466
|
},
|
|
5914
6467
|
{
|
|
5915
6468
|
value: "repeat-y",
|
|
5916
|
-
label:
|
|
5917
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6469
|
+
label: __39("Repeat-y", "elementor"),
|
|
6470
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
5918
6471
|
showTooltip: true
|
|
5919
6472
|
},
|
|
5920
6473
|
{
|
|
5921
6474
|
value: "no-repeat",
|
|
5922
|
-
label:
|
|
5923
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6475
|
+
label: __39("No-repeat", "elementor"),
|
|
6476
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(XIcon3, { fontSize: size }),
|
|
5924
6477
|
showTooltip: true
|
|
5925
6478
|
}
|
|
5926
6479
|
];
|
|
5927
6480
|
var BackgroundImageOverlayRepeat = () => {
|
|
5928
|
-
return /* @__PURE__ */
|
|
6481
|
+
return /* @__PURE__ */ React90.createElement(PopoverGridContainer, null, /* @__PURE__ */ React90.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React90.createElement(ControlFormLabel, null, __39("Repeat", "elementor"))), /* @__PURE__ */ React90.createElement(Grid16, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React90.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
5929
6482
|
};
|
|
5930
6483
|
|
|
5931
6484
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
5932
|
-
import * as
|
|
5933
|
-
import { useRef as
|
|
6485
|
+
import * as React91 from "react";
|
|
6486
|
+
import { useRef as useRef17 } from "react";
|
|
5934
6487
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil17 } from "@elementor/editor-props";
|
|
5935
6488
|
import {
|
|
5936
6489
|
ArrowBarBothIcon,
|
|
@@ -5941,30 +6494,30 @@ import {
|
|
|
5941
6494
|
PencilIcon
|
|
5942
6495
|
} from "@elementor/icons";
|
|
5943
6496
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
5944
|
-
import { __ as
|
|
6497
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
5945
6498
|
var sizeControlOptions = [
|
|
5946
6499
|
{
|
|
5947
6500
|
value: "auto",
|
|
5948
|
-
label:
|
|
5949
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6501
|
+
label: __40("Auto", "elementor"),
|
|
6502
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(LetterAIcon, { fontSize: size }),
|
|
5950
6503
|
showTooltip: true
|
|
5951
6504
|
},
|
|
5952
6505
|
{
|
|
5953
6506
|
value: "cover",
|
|
5954
|
-
label:
|
|
5955
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6507
|
+
label: __40("Cover", "elementor"),
|
|
6508
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
5956
6509
|
showTooltip: true
|
|
5957
6510
|
},
|
|
5958
6511
|
{
|
|
5959
6512
|
value: "contain",
|
|
5960
|
-
label:
|
|
5961
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6513
|
+
label: __40("Contain", "elementor"),
|
|
6514
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
5962
6515
|
showTooltip: true
|
|
5963
6516
|
},
|
|
5964
6517
|
{
|
|
5965
6518
|
value: "custom",
|
|
5966
|
-
label:
|
|
5967
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6519
|
+
label: __40("Custom", "elementor"),
|
|
6520
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(PencilIcon, { fontSize: size }),
|
|
5968
6521
|
showTooltip: true
|
|
5969
6522
|
}
|
|
5970
6523
|
];
|
|
@@ -5972,7 +6525,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5972
6525
|
const backgroundImageScaleContext = useBoundProp(backgroundImageSizeScalePropTypeUtil);
|
|
5973
6526
|
const stringPropContext = useBoundProp(stringPropTypeUtil17);
|
|
5974
6527
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
5975
|
-
const rowRef =
|
|
6528
|
+
const rowRef = useRef17(null);
|
|
5976
6529
|
const handleSizeChange = (size) => {
|
|
5977
6530
|
if (size === "custom") {
|
|
5978
6531
|
backgroundImageScaleContext.setValue({ width: null, height: null });
|
|
@@ -5980,7 +6533,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5980
6533
|
stringPropContext.setValue(size);
|
|
5981
6534
|
}
|
|
5982
6535
|
};
|
|
5983
|
-
return /* @__PURE__ */
|
|
6536
|
+
return /* @__PURE__ */ React91.createElement(Grid17, { container: true, spacing: 1.5 }, /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 12 }, /* @__PURE__ */ React91.createElement(PopoverGridContainer, null, /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, __40("Size", "elementor"))), /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React91.createElement(
|
|
5984
6537
|
ControlToggleButtonGroup,
|
|
5985
6538
|
{
|
|
5986
6539
|
exclusive: true,
|
|
@@ -5989,17 +6542,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5989
6542
|
disabled: stringPropContext.disabled,
|
|
5990
6543
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
5991
6544
|
}
|
|
5992
|
-
)))), isCustom ? /* @__PURE__ */
|
|
6545
|
+
)))), isCustom ? /* @__PURE__ */ React91.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React91.createElement(PopoverGridContainer, null, /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React91.createElement(
|
|
5993
6546
|
SizeControl,
|
|
5994
6547
|
{
|
|
5995
|
-
startIcon: /* @__PURE__ */
|
|
6548
|
+
startIcon: /* @__PURE__ */ React91.createElement(ArrowsMoveHorizontalIcon2, { fontSize: "tiny" }),
|
|
5996
6549
|
extendedOptions: ["auto"],
|
|
5997
6550
|
anchorRef: rowRef
|
|
5998
6551
|
}
|
|
5999
|
-
))), /* @__PURE__ */
|
|
6552
|
+
))), /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React91.createElement(
|
|
6000
6553
|
SizeControl,
|
|
6001
6554
|
{
|
|
6002
|
-
startIcon: /* @__PURE__ */
|
|
6555
|
+
startIcon: /* @__PURE__ */ React91.createElement(ArrowsMoveVerticalIcon2, { fontSize: "tiny" }),
|
|
6003
6556
|
extendedOptions: ["auto"],
|
|
6004
6557
|
anchorRef: rowRef
|
|
6005
6558
|
}
|
|
@@ -6007,7 +6560,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
6007
6560
|
};
|
|
6008
6561
|
|
|
6009
6562
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
6010
|
-
import { useRef as
|
|
6563
|
+
import { useRef as useRef18 } from "react";
|
|
6011
6564
|
import {
|
|
6012
6565
|
backgroundColorOverlayPropTypeUtil,
|
|
6013
6566
|
backgroundGradientOverlayPropTypeUtil as backgroundGradientOverlayPropTypeUtil2,
|
|
@@ -6032,7 +6585,7 @@ var useBackgroundTabsHistory = ({
|
|
|
6032
6585
|
return "image";
|
|
6033
6586
|
};
|
|
6034
6587
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs(getCurrentOverlayType());
|
|
6035
|
-
const valuesHistory =
|
|
6588
|
+
const valuesHistory = useRef18({
|
|
6036
6589
|
image: initialBackgroundImageOverlay,
|
|
6037
6590
|
color: initialBackgroundColorOverlay2,
|
|
6038
6591
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -6100,29 +6653,29 @@ var getInitialBackgroundOverlay = () => ({
|
|
|
6100
6653
|
}
|
|
6101
6654
|
});
|
|
6102
6655
|
var backgroundResolutionOptions = [
|
|
6103
|
-
{ label:
|
|
6104
|
-
{ label:
|
|
6105
|
-
{ label:
|
|
6106
|
-
{ label:
|
|
6656
|
+
{ label: __41("Thumbnail - 150 x 150", "elementor"), value: "thumbnail" },
|
|
6657
|
+
{ label: __41("Medium - 300 x 300", "elementor"), value: "medium" },
|
|
6658
|
+
{ label: __41("Large 1024 x 1024", "elementor"), value: "large" },
|
|
6659
|
+
{ label: __41("Full", "elementor"), value: "full" }
|
|
6107
6660
|
];
|
|
6108
6661
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
6109
6662
|
const { propType, value: overlayValues, setValue } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
6110
|
-
return /* @__PURE__ */
|
|
6663
|
+
return /* @__PURE__ */ React92.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React92.createElement(
|
|
6111
6664
|
ControlRepeater,
|
|
6112
6665
|
{
|
|
6113
6666
|
initial: getInitialBackgroundOverlay(),
|
|
6114
6667
|
propTypeUtil: backgroundOverlayPropTypeUtil
|
|
6115
6668
|
},
|
|
6116
|
-
/* @__PURE__ */
|
|
6117
|
-
/* @__PURE__ */
|
|
6669
|
+
/* @__PURE__ */ React92.createElement(RepeaterHeader, { label: __41("Overlay", "elementor") }, /* @__PURE__ */ React92.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
6670
|
+
/* @__PURE__ */ React92.createElement(ItemsContainer, null, /* @__PURE__ */ React92.createElement(
|
|
6118
6671
|
Item,
|
|
6119
6672
|
{
|
|
6120
6673
|
Icon: ItemIcon2,
|
|
6121
6674
|
Label: ItemLabel3,
|
|
6122
|
-
actions: /* @__PURE__ */
|
|
6675
|
+
actions: /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(DuplicateItemAction, null), /* @__PURE__ */ React92.createElement(DisableItemAction, null), /* @__PURE__ */ React92.createElement(RemoveItemAction, null))
|
|
6123
6676
|
}
|
|
6124
6677
|
)),
|
|
6125
|
-
/* @__PURE__ */
|
|
6678
|
+
/* @__PURE__ */ React92.createElement(EditItemPopover, null, /* @__PURE__ */ React92.createElement(ItemContent2, null))
|
|
6126
6679
|
));
|
|
6127
6680
|
});
|
|
6128
6681
|
var ItemContent2 = () => {
|
|
@@ -6132,27 +6685,27 @@ var ItemContent2 = () => {
|
|
|
6132
6685
|
gradient: initialBackgroundGradientOverlay.value
|
|
6133
6686
|
});
|
|
6134
6687
|
const { rowRef } = useRepeaterContext();
|
|
6135
|
-
return /* @__PURE__ */
|
|
6688
|
+
return /* @__PURE__ */ React92.createElement(Box19, { sx: { width: "100%" } }, /* @__PURE__ */ React92.createElement(Box19, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React92.createElement(
|
|
6136
6689
|
Tabs,
|
|
6137
6690
|
{
|
|
6138
6691
|
size: "small",
|
|
6139
6692
|
variant: "fullWidth",
|
|
6140
6693
|
...getTabsProps(),
|
|
6141
|
-
"aria-label":
|
|
6694
|
+
"aria-label": __41("Background Overlay", "elementor")
|
|
6142
6695
|
},
|
|
6143
|
-
/* @__PURE__ */
|
|
6144
|
-
/* @__PURE__ */
|
|
6145
|
-
/* @__PURE__ */
|
|
6146
|
-
)), /* @__PURE__ */
|
|
6696
|
+
/* @__PURE__ */ React92.createElement(Tab, { label: __41("Image", "elementor"), ...getTabProps("image") }),
|
|
6697
|
+
/* @__PURE__ */ React92.createElement(Tab, { label: __41("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
6698
|
+
/* @__PURE__ */ React92.createElement(Tab, { label: __41("Color", "elementor"), ...getTabProps("color") })
|
|
6699
|
+
)), /* @__PURE__ */ React92.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React92.createElement(PopoverContent, null, /* @__PURE__ */ React92.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React92.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React92.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React92.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React92.createElement(PopoverContent, null, /* @__PURE__ */ React92.createElement(ColorOverlayContent, { anchorEl: rowRef }))));
|
|
6147
6700
|
};
|
|
6148
6701
|
var ItemIcon2 = ({ value }) => {
|
|
6149
6702
|
switch (value.$$type) {
|
|
6150
6703
|
case "background-image-overlay":
|
|
6151
|
-
return /* @__PURE__ */
|
|
6704
|
+
return /* @__PURE__ */ React92.createElement(ItemIconImage, { value });
|
|
6152
6705
|
case "background-color-overlay":
|
|
6153
|
-
return /* @__PURE__ */
|
|
6706
|
+
return /* @__PURE__ */ React92.createElement(ItemIconColor, { value });
|
|
6154
6707
|
case "background-gradient-overlay":
|
|
6155
|
-
return /* @__PURE__ */
|
|
6708
|
+
return /* @__PURE__ */ React92.createElement(ItemIconGradient, { value });
|
|
6156
6709
|
default:
|
|
6157
6710
|
return null;
|
|
6158
6711
|
}
|
|
@@ -6165,11 +6718,11 @@ var extractColorFrom = (prop) => {
|
|
|
6165
6718
|
};
|
|
6166
6719
|
var ItemIconColor = ({ value: prop }) => {
|
|
6167
6720
|
const color = extractColorFrom(prop);
|
|
6168
|
-
return /* @__PURE__ */
|
|
6721
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: color });
|
|
6169
6722
|
};
|
|
6170
6723
|
var ItemIconImage = ({ value }) => {
|
|
6171
6724
|
const { imageUrl } = useImage(value);
|
|
6172
|
-
return /* @__PURE__ */
|
|
6725
|
+
return /* @__PURE__ */ React92.createElement(
|
|
6173
6726
|
CardMedia4,
|
|
6174
6727
|
{
|
|
6175
6728
|
image: imageUrl,
|
|
@@ -6184,43 +6737,43 @@ var ItemIconImage = ({ value }) => {
|
|
|
6184
6737
|
};
|
|
6185
6738
|
var ItemIconGradient = ({ value }) => {
|
|
6186
6739
|
const gradient = getGradientValue(value);
|
|
6187
|
-
return /* @__PURE__ */
|
|
6740
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: gradient });
|
|
6188
6741
|
};
|
|
6189
6742
|
var ItemLabel3 = ({ value }) => {
|
|
6190
6743
|
switch (value.$$type) {
|
|
6191
6744
|
case "background-image-overlay":
|
|
6192
|
-
return /* @__PURE__ */
|
|
6745
|
+
return /* @__PURE__ */ React92.createElement(ItemLabelImage, { value });
|
|
6193
6746
|
case "background-color-overlay":
|
|
6194
|
-
return /* @__PURE__ */
|
|
6747
|
+
return /* @__PURE__ */ React92.createElement(ItemLabelColor, { value });
|
|
6195
6748
|
case "background-gradient-overlay":
|
|
6196
|
-
return /* @__PURE__ */
|
|
6749
|
+
return /* @__PURE__ */ React92.createElement(ItemLabelGradient, { value });
|
|
6197
6750
|
default:
|
|
6198
6751
|
return null;
|
|
6199
6752
|
}
|
|
6200
6753
|
};
|
|
6201
6754
|
var ItemLabelColor = ({ value: prop }) => {
|
|
6202
6755
|
const color = extractColorFrom(prop);
|
|
6203
|
-
return /* @__PURE__ */
|
|
6756
|
+
return /* @__PURE__ */ React92.createElement("span", null, color);
|
|
6204
6757
|
};
|
|
6205
6758
|
var ItemLabelImage = ({ value }) => {
|
|
6206
6759
|
const { imageTitle } = useImage(value);
|
|
6207
|
-
return /* @__PURE__ */
|
|
6760
|
+
return /* @__PURE__ */ React92.createElement("span", null, imageTitle);
|
|
6208
6761
|
};
|
|
6209
6762
|
var ItemLabelGradient = ({ value }) => {
|
|
6210
6763
|
if (value.value.type.value === "linear") {
|
|
6211
|
-
return /* @__PURE__ */
|
|
6764
|
+
return /* @__PURE__ */ React92.createElement("span", null, __41("Linear Gradient", "elementor"));
|
|
6212
6765
|
}
|
|
6213
|
-
return /* @__PURE__ */
|
|
6766
|
+
return /* @__PURE__ */ React92.createElement("span", null, __41("Radial Gradient", "elementor"));
|
|
6214
6767
|
};
|
|
6215
6768
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
6216
6769
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
6217
|
-
return /* @__PURE__ */
|
|
6770
|
+
return /* @__PURE__ */ React92.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React92.createElement(ColorControl, { anchorEl })));
|
|
6218
6771
|
};
|
|
6219
6772
|
var ImageOverlayContent = () => {
|
|
6220
6773
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
6221
|
-
return /* @__PURE__ */
|
|
6774
|
+
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)));
|
|
6222
6775
|
};
|
|
6223
|
-
var StyledUnstableColorIndicator3 =
|
|
6776
|
+
var StyledUnstableColorIndicator3 = styled12(UnstableColorIndicator3)(({ theme }) => ({
|
|
6224
6777
|
height: "1rem",
|
|
6225
6778
|
width: "1rem",
|
|
6226
6779
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -6259,29 +6812,29 @@ var getGradientValue = (value) => {
|
|
|
6259
6812
|
|
|
6260
6813
|
// src/controls/background-control/background-control.tsx
|
|
6261
6814
|
var clipOptions = [
|
|
6262
|
-
{ label:
|
|
6263
|
-
{ label:
|
|
6264
|
-
{ label:
|
|
6265
|
-
{ label:
|
|
6815
|
+
{ label: __42("Full element", "elementor"), value: "border-box" },
|
|
6816
|
+
{ label: __42("Padding edges", "elementor"), value: "padding-box" },
|
|
6817
|
+
{ label: __42("Content edges", "elementor"), value: "content-box" },
|
|
6818
|
+
{ label: __42("Text", "elementor"), value: "text" }
|
|
6266
6819
|
];
|
|
6267
|
-
var colorLabel =
|
|
6268
|
-
var clipLabel =
|
|
6820
|
+
var colorLabel = __42("Color", "elementor");
|
|
6821
|
+
var clipLabel = __42("Clipping", "elementor");
|
|
6269
6822
|
var BackgroundControl = createControl(() => {
|
|
6270
6823
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
6271
|
-
return /* @__PURE__ */
|
|
6824
|
+
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));
|
|
6272
6825
|
});
|
|
6273
6826
|
var BackgroundColorField = () => {
|
|
6274
|
-
return /* @__PURE__ */
|
|
6827
|
+
return /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React93.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React93.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ControlLabel, null, colorLabel)), /* @__PURE__ */ React93.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ColorControl, null))));
|
|
6275
6828
|
};
|
|
6276
6829
|
var BackgroundClipField = () => {
|
|
6277
|
-
return /* @__PURE__ */
|
|
6830
|
+
return /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "clip" }, /* @__PURE__ */ React93.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React93.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ControlLabel, null, clipLabel)), /* @__PURE__ */ React93.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(SelectControl, { options: clipOptions }))));
|
|
6278
6831
|
};
|
|
6279
6832
|
|
|
6280
6833
|
// src/controls/repeatable-control.tsx
|
|
6281
|
-
import * as
|
|
6282
|
-
import { useMemo as
|
|
6834
|
+
import * as React94 from "react";
|
|
6835
|
+
import { useMemo as useMemo13 } from "react";
|
|
6283
6836
|
import { createArrayPropUtils as createArrayPropUtils2 } from "@elementor/editor-props";
|
|
6284
|
-
import { Box as
|
|
6837
|
+
import { Box as Box20 } from "@elementor/ui";
|
|
6285
6838
|
var PLACEHOLDER_REGEX = /\$\{([^}]+)\}/g;
|
|
6286
6839
|
var RepeatableControl = createControl(
|
|
6287
6840
|
({
|
|
@@ -6300,11 +6853,11 @@ var RepeatableControl = createControl(
|
|
|
6300
6853
|
if (!childPropTypeUtil) {
|
|
6301
6854
|
return null;
|
|
6302
6855
|
}
|
|
6303
|
-
const childArrayPropTypeUtil2 =
|
|
6856
|
+
const childArrayPropTypeUtil2 = useMemo13(
|
|
6304
6857
|
() => createArrayPropUtils2(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
|
|
6305
6858
|
[childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
|
|
6306
6859
|
);
|
|
6307
|
-
const contextValue =
|
|
6860
|
+
const contextValue = useMemo13(
|
|
6308
6861
|
() => ({
|
|
6309
6862
|
...childControlConfig,
|
|
6310
6863
|
placeholder: placeholder || "",
|
|
@@ -6314,14 +6867,14 @@ var RepeatableControl = createControl(
|
|
|
6314
6867
|
);
|
|
6315
6868
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil2);
|
|
6316
6869
|
const newItemIndex = addItemTooltipProps?.newItemIndex === null ? void 0 : 0;
|
|
6317
|
-
return /* @__PURE__ */
|
|
6870
|
+
return /* @__PURE__ */ React94.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React94.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React94.createElement(
|
|
6318
6871
|
ControlRepeater,
|
|
6319
6872
|
{
|
|
6320
6873
|
initial: childPropTypeUtil.create(initialValues || null),
|
|
6321
6874
|
propTypeUtil: childArrayPropTypeUtil2,
|
|
6322
6875
|
isItemDisabled: isItemDisabled2
|
|
6323
6876
|
},
|
|
6324
|
-
/* @__PURE__ */
|
|
6877
|
+
/* @__PURE__ */ React94.createElement(RepeaterHeader, { label: repeaterLabel }, /* @__PURE__ */ React94.createElement(
|
|
6325
6878
|
TooltipAddItemAction,
|
|
6326
6879
|
{
|
|
6327
6880
|
...addItemTooltipProps,
|
|
@@ -6329,22 +6882,22 @@ var RepeatableControl = createControl(
|
|
|
6329
6882
|
ariaLabel: repeaterLabel
|
|
6330
6883
|
}
|
|
6331
6884
|
)),
|
|
6332
|
-
/* @__PURE__ */
|
|
6885
|
+
/* @__PURE__ */ React94.createElement(ItemsContainer, { isSortable }, /* @__PURE__ */ React94.createElement(
|
|
6333
6886
|
Item,
|
|
6334
6887
|
{
|
|
6335
6888
|
Icon: ItemIcon3,
|
|
6336
6889
|
Label: ItemLabel4,
|
|
6337
|
-
actions: /* @__PURE__ */
|
|
6890
|
+
actions: /* @__PURE__ */ React94.createElement(React94.Fragment, null, showDuplicate && /* @__PURE__ */ React94.createElement(DuplicateItemAction, null), showToggle && /* @__PURE__ */ React94.createElement(DisableItemAction, null), /* @__PURE__ */ React94.createElement(RemoveItemAction, null))
|
|
6338
6891
|
}
|
|
6339
6892
|
)),
|
|
6340
|
-
/* @__PURE__ */
|
|
6893
|
+
/* @__PURE__ */ React94.createElement(EditItemPopover, null, /* @__PURE__ */ React94.createElement(Content2, null))
|
|
6341
6894
|
)));
|
|
6342
6895
|
}
|
|
6343
6896
|
);
|
|
6344
|
-
var ItemIcon3 = () => /* @__PURE__ */
|
|
6897
|
+
var ItemIcon3 = () => /* @__PURE__ */ React94.createElement(React94.Fragment, null);
|
|
6345
6898
|
var Content2 = () => {
|
|
6346
6899
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
6347
|
-
return /* @__PURE__ */
|
|
6900
|
+
return /* @__PURE__ */ React94.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React94.createElement(PopoverGridContainer, null, /* @__PURE__ */ React94.createElement(ChildControl, { ...props })));
|
|
6348
6901
|
};
|
|
6349
6902
|
var interpolate = (template, data) => {
|
|
6350
6903
|
if (!data) {
|
|
@@ -6427,7 +6980,7 @@ var ItemLabel4 = ({ value }) => {
|
|
|
6427
6980
|
const label = showPlaceholder ? placeholder : interpolate(patternLabel, value);
|
|
6428
6981
|
const isReadOnly = !!childProps?.readOnly;
|
|
6429
6982
|
const color = getTextColor(isReadOnly, showPlaceholder);
|
|
6430
|
-
return /* @__PURE__ */
|
|
6983
|
+
return /* @__PURE__ */ React94.createElement(Box20, { component: "span", color }, label);
|
|
6431
6984
|
};
|
|
6432
6985
|
var getAllProperties = (pattern) => {
|
|
6433
6986
|
const properties = pattern.match(PLACEHOLDER_REGEX)?.map((match) => match.slice(2, -1)) || [];
|
|
@@ -6435,15 +6988,15 @@ var getAllProperties = (pattern) => {
|
|
|
6435
6988
|
};
|
|
6436
6989
|
|
|
6437
6990
|
// src/controls/key-value-control.tsx
|
|
6438
|
-
import * as
|
|
6439
|
-
import { useMemo as
|
|
6991
|
+
import * as React95 from "react";
|
|
6992
|
+
import { useMemo as useMemo14, useState as useState18 } from "react";
|
|
6440
6993
|
import {
|
|
6441
6994
|
isTransformable,
|
|
6442
6995
|
keyValuePropTypeUtil,
|
|
6443
6996
|
stringPropTypeUtil as stringPropTypeUtil18
|
|
6444
6997
|
} from "@elementor/editor-props";
|
|
6445
6998
|
import { FormHelperText, FormLabel as FormLabel3, Grid as Grid19 } from "@elementor/ui";
|
|
6446
|
-
import { __ as
|
|
6999
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
6447
7000
|
|
|
6448
7001
|
// src/utils/escape-html-attr.ts
|
|
6449
7002
|
var escapeHtmlAttr = (value) => {
|
|
@@ -6467,23 +7020,23 @@ var getInitialFieldValue = (fieldValue) => {
|
|
|
6467
7020
|
};
|
|
6468
7021
|
var KeyValueControl = createControl((props = {}) => {
|
|
6469
7022
|
const { value, setValue, ...propContext } = useBoundProp(keyValuePropTypeUtil);
|
|
6470
|
-
const [keyError, setKeyError] =
|
|
6471
|
-
const [valueError, setValueError] =
|
|
6472
|
-
const [sessionState, setSessionState] =
|
|
7023
|
+
const [keyError, setKeyError] = useState18("");
|
|
7024
|
+
const [valueError, setValueError] = useState18("");
|
|
7025
|
+
const [sessionState, setSessionState] = useState18({
|
|
6473
7026
|
key: getInitialFieldValue(value?.key),
|
|
6474
7027
|
value: getInitialFieldValue(value?.value)
|
|
6475
7028
|
});
|
|
6476
|
-
const keyLabel = props.keyName ||
|
|
6477
|
-
const valueLabel = props.valueName ||
|
|
7029
|
+
const keyLabel = props.keyName || __43("Key", "elementor");
|
|
7030
|
+
const valueLabel = props.valueName || __43("Value", "elementor");
|
|
6478
7031
|
const { keyHelper, valueHelper } = props.getHelperText?.(sessionState.key, sessionState.value) || {
|
|
6479
7032
|
keyHelper: void 0,
|
|
6480
7033
|
valueHelper: void 0
|
|
6481
7034
|
};
|
|
6482
|
-
const [keyRegex, valueRegex, errMsg] =
|
|
7035
|
+
const [keyRegex, valueRegex, errMsg] = useMemo14(
|
|
6483
7036
|
() => [
|
|
6484
7037
|
props.regexKey ? new RegExp(props.regexKey) : void 0,
|
|
6485
7038
|
props.regexValue ? new RegExp(props.regexValue) : void 0,
|
|
6486
|
-
props.validationErrorMessage ||
|
|
7039
|
+
props.validationErrorMessage || __43("Invalid Format", "elementor")
|
|
6487
7040
|
],
|
|
6488
7041
|
[props.regexKey, props.regexValue, props.validationErrorMessage]
|
|
6489
7042
|
);
|
|
@@ -6532,14 +7085,14 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6532
7085
|
});
|
|
6533
7086
|
}
|
|
6534
7087
|
};
|
|
6535
|
-
return /* @__PURE__ */
|
|
7088
|
+
return /* @__PURE__ */ React95.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React95.createElement(Grid19, { container: true, gap: 1.5 }, /* @__PURE__ */ React95.createElement(Grid19, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React95.createElement(FormLabel3, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React95.createElement(
|
|
6536
7089
|
TextControl,
|
|
6537
7090
|
{
|
|
6538
7091
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.key) : sessionState.key,
|
|
6539
7092
|
error: !!keyError,
|
|
6540
7093
|
helperText: keyHelper
|
|
6541
7094
|
}
|
|
6542
|
-
)), !!keyError && /* @__PURE__ */
|
|
7095
|
+
)), !!keyError && /* @__PURE__ */ React95.createElement(FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React95.createElement(Grid19, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React95.createElement(FormLabel3, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React95.createElement(
|
|
6543
7096
|
TextControl,
|
|
6544
7097
|
{
|
|
6545
7098
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.value) : sessionState.value,
|
|
@@ -6547,27 +7100,27 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6547
7100
|
inputDisabled: !!keyError,
|
|
6548
7101
|
helperText: valueHelper
|
|
6549
7102
|
}
|
|
6550
|
-
)), !!valueError && /* @__PURE__ */
|
|
7103
|
+
)), !!valueError && /* @__PURE__ */ React95.createElement(FormHelperText, { error: true }, valueError))));
|
|
6551
7104
|
});
|
|
6552
7105
|
|
|
6553
7106
|
// src/controls/position-control.tsx
|
|
6554
|
-
import * as
|
|
7107
|
+
import * as React96 from "react";
|
|
6555
7108
|
import { positionPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil19 } from "@elementor/editor-props";
|
|
6556
7109
|
import { MenuListItem as MenuListItem7 } from "@elementor/editor-ui";
|
|
6557
7110
|
import { LetterXIcon as LetterXIcon2, LetterYIcon as LetterYIcon2 } from "@elementor/icons";
|
|
6558
7111
|
import { Grid as Grid20, Select as Select5 } from "@elementor/ui";
|
|
6559
|
-
import { __ as
|
|
7112
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
6560
7113
|
var positionOptions = [
|
|
6561
|
-
{ label:
|
|
6562
|
-
{ label:
|
|
6563
|
-
{ label:
|
|
6564
|
-
{ label:
|
|
6565
|
-
{ label:
|
|
6566
|
-
{ label:
|
|
6567
|
-
{ label:
|
|
6568
|
-
{ label:
|
|
6569
|
-
{ label:
|
|
6570
|
-
{ label:
|
|
7114
|
+
{ label: __44("Center center", "elementor"), value: "center center" },
|
|
7115
|
+
{ label: __44("Center left", "elementor"), value: "center left" },
|
|
7116
|
+
{ label: __44("Center right", "elementor"), value: "center right" },
|
|
7117
|
+
{ label: __44("Top center", "elementor"), value: "top center" },
|
|
7118
|
+
{ label: __44("Top left", "elementor"), value: "top left" },
|
|
7119
|
+
{ label: __44("Top right", "elementor"), value: "top right" },
|
|
7120
|
+
{ label: __44("Bottom center", "elementor"), value: "bottom center" },
|
|
7121
|
+
{ label: __44("Bottom left", "elementor"), value: "bottom left" },
|
|
7122
|
+
{ label: __44("Bottom right", "elementor"), value: "bottom right" },
|
|
7123
|
+
{ label: __44("Custom", "elementor"), value: "custom" }
|
|
6571
7124
|
];
|
|
6572
7125
|
var PositionControl = () => {
|
|
6573
7126
|
const positionContext = useBoundProp(positionPropTypeUtil);
|
|
@@ -6582,7 +7135,7 @@ var PositionControl = () => {
|
|
|
6582
7135
|
stringPropContext.setValue(value);
|
|
6583
7136
|
}
|
|
6584
7137
|
};
|
|
6585
|
-
return /* @__PURE__ */
|
|
7138
|
+
return /* @__PURE__ */ React96.createElement(Grid20, { container: true, spacing: 1.5 }, /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React96.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(ControlFormLabel, null, __44("Object position", "elementor"))), /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React96.createElement(
|
|
6586
7139
|
Select5,
|
|
6587
7140
|
{
|
|
6588
7141
|
size: "tiny",
|
|
@@ -6593,29 +7146,29 @@ var PositionControl = () => {
|
|
|
6593
7146
|
renderValue: (selectedValue) => getSelectRenderValue(positionOptions, placeholder, selectedValue),
|
|
6594
7147
|
fullWidth: true
|
|
6595
7148
|
},
|
|
6596
|
-
positionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
6597
|
-
)))), isCustom && /* @__PURE__ */
|
|
7149
|
+
positionOptions.map(({ label, value }) => /* @__PURE__ */ React96.createElement(MenuListItem7, { key: value, value: value ?? "" }, label))
|
|
7150
|
+
)))), isCustom && /* @__PURE__ */ React96.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React96.createElement(Grid20, { container: true, spacing: 1.5 }, /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React96.createElement(
|
|
6598
7151
|
SizeControl,
|
|
6599
7152
|
{
|
|
6600
|
-
startIcon: /* @__PURE__ */
|
|
7153
|
+
startIcon: /* @__PURE__ */ React96.createElement(LetterXIcon2, { fontSize: "tiny" }),
|
|
6601
7154
|
min: -Number.MAX_SAFE_INTEGER
|
|
6602
7155
|
}
|
|
6603
|
-
))), /* @__PURE__ */
|
|
7156
|
+
))), /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React96.createElement(
|
|
6604
7157
|
SizeControl,
|
|
6605
7158
|
{
|
|
6606
|
-
startIcon: /* @__PURE__ */
|
|
7159
|
+
startIcon: /* @__PURE__ */ React96.createElement(LetterYIcon2, { fontSize: "tiny" }),
|
|
6607
7160
|
min: -Number.MAX_SAFE_INTEGER
|
|
6608
7161
|
}
|
|
6609
7162
|
)))))));
|
|
6610
7163
|
};
|
|
6611
7164
|
|
|
6612
7165
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
6613
|
-
import * as
|
|
6614
|
-
import { useRef as
|
|
7166
|
+
import * as React109 from "react";
|
|
7167
|
+
import { useRef as useRef26 } from "react";
|
|
6615
7168
|
import { transformFunctionsPropTypeUtil, transformPropTypeUtil } from "@elementor/editor-props";
|
|
6616
7169
|
import { AdjustmentsIcon as AdjustmentsIcon2, InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
|
|
6617
|
-
import { bindTrigger as bindTrigger5, Box as
|
|
6618
|
-
import { __ as
|
|
7170
|
+
import { bindTrigger as bindTrigger5, Box as Box24, IconButton as IconButton8, Tooltip as Tooltip8, Typography as Typography9, usePopupState as usePopupState9 } from "@elementor/ui";
|
|
7171
|
+
import { __ as __54 } from "@wordpress/i18n";
|
|
6619
7172
|
|
|
6620
7173
|
// src/controls/transform-control/initial-values.ts
|
|
6621
7174
|
import {
|
|
@@ -6669,24 +7222,24 @@ var initialSkewValue = skewTransformPropTypeUtil.create({
|
|
|
6669
7222
|
});
|
|
6670
7223
|
|
|
6671
7224
|
// src/controls/transform-control/transform-content.tsx
|
|
6672
|
-
import * as
|
|
6673
|
-
import { Box as
|
|
6674
|
-
import { __ as
|
|
7225
|
+
import * as React103 from "react";
|
|
7226
|
+
import { Box as Box21, Tab as Tab2, TabPanel as TabPanel2, Tabs as Tabs2 } from "@elementor/ui";
|
|
7227
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
6675
7228
|
|
|
6676
7229
|
// src/controls/transform-control/functions/move.tsx
|
|
6677
|
-
import * as
|
|
6678
|
-
import { useRef as
|
|
7230
|
+
import * as React98 from "react";
|
|
7231
|
+
import { useRef as useRef19 } from "react";
|
|
6679
7232
|
import { moveTransformPropTypeUtil } from "@elementor/editor-props";
|
|
6680
7233
|
import { ArrowDownLeftIcon, ArrowDownSmallIcon, ArrowRightIcon } from "@elementor/icons";
|
|
6681
7234
|
import { Grid as Grid22 } from "@elementor/ui";
|
|
6682
|
-
import { __ as
|
|
7235
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
6683
7236
|
|
|
6684
7237
|
// src/controls/transform-control/functions/axis-row.tsx
|
|
6685
|
-
import * as
|
|
7238
|
+
import * as React97 from "react";
|
|
6686
7239
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
6687
7240
|
var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "angle" }) => {
|
|
6688
7241
|
const safeId = label.replace(/\s+/g, "-").toLowerCase();
|
|
6689
|
-
return /* @__PURE__ */
|
|
7242
|
+
return /* @__PURE__ */ React97.createElement(Grid21, { item: true, xs: 12 }, /* @__PURE__ */ React97.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React97.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React97.createElement(ControlLabel, { htmlFor: safeId }, label)), /* @__PURE__ */ React97.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React97.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React97.createElement(
|
|
6690
7243
|
SizeControl,
|
|
6691
7244
|
{
|
|
6692
7245
|
anchorRef,
|
|
@@ -6702,28 +7255,28 @@ var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "an
|
|
|
6702
7255
|
// src/controls/transform-control/functions/move.tsx
|
|
6703
7256
|
var moveAxisControls = [
|
|
6704
7257
|
{
|
|
6705
|
-
label:
|
|
7258
|
+
label: __45("Move X", "elementor"),
|
|
6706
7259
|
bind: "x",
|
|
6707
|
-
startIcon: /* @__PURE__ */
|
|
7260
|
+
startIcon: /* @__PURE__ */ React98.createElement(ArrowRightIcon, { fontSize: "tiny" }),
|
|
6708
7261
|
units: ["px", "%", "em", "rem", "vw"]
|
|
6709
7262
|
},
|
|
6710
7263
|
{
|
|
6711
|
-
label:
|
|
7264
|
+
label: __45("Move Y", "elementor"),
|
|
6712
7265
|
bind: "y",
|
|
6713
|
-
startIcon: /* @__PURE__ */
|
|
7266
|
+
startIcon: /* @__PURE__ */ React98.createElement(ArrowDownSmallIcon, { fontSize: "tiny" }),
|
|
6714
7267
|
units: ["px", "%", "em", "rem", "vh"]
|
|
6715
7268
|
},
|
|
6716
7269
|
{
|
|
6717
|
-
label:
|
|
7270
|
+
label: __45("Move Z", "elementor"),
|
|
6718
7271
|
bind: "z",
|
|
6719
|
-
startIcon: /* @__PURE__ */
|
|
7272
|
+
startIcon: /* @__PURE__ */ React98.createElement(ArrowDownLeftIcon, { fontSize: "tiny" }),
|
|
6720
7273
|
units: ["px", "%", "em", "rem", "vw", "vh"]
|
|
6721
7274
|
}
|
|
6722
7275
|
];
|
|
6723
7276
|
var Move = () => {
|
|
6724
7277
|
const context = useBoundProp(moveTransformPropTypeUtil);
|
|
6725
|
-
const rowRefs = [
|
|
6726
|
-
return /* @__PURE__ */
|
|
7278
|
+
const rowRefs = [useRef19(null), useRef19(null), useRef19(null)];
|
|
7279
|
+
return /* @__PURE__ */ React98.createElement(Grid22, { container: true, spacing: 1.5 }, /* @__PURE__ */ React98.createElement(PropProvider, { ...context }, /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React98.createElement(
|
|
6727
7280
|
AxisRow,
|
|
6728
7281
|
{
|
|
6729
7282
|
key: control.bind,
|
|
@@ -6736,34 +7289,34 @@ var Move = () => {
|
|
|
6736
7289
|
};
|
|
6737
7290
|
|
|
6738
7291
|
// src/controls/transform-control/functions/rotate.tsx
|
|
6739
|
-
import * as
|
|
6740
|
-
import { useRef as
|
|
7292
|
+
import * as React99 from "react";
|
|
7293
|
+
import { useRef as useRef20 } from "react";
|
|
6741
7294
|
import { rotateTransformPropTypeUtil as rotateTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
6742
7295
|
import { Arrow360Icon, RotateClockwiseIcon } from "@elementor/icons";
|
|
6743
7296
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
6744
|
-
import { __ as
|
|
7297
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
6745
7298
|
var rotateAxisControls = [
|
|
6746
7299
|
{
|
|
6747
|
-
label:
|
|
7300
|
+
label: __46("Rotate X", "elementor"),
|
|
6748
7301
|
bind: "x",
|
|
6749
|
-
startIcon: /* @__PURE__ */
|
|
7302
|
+
startIcon: /* @__PURE__ */ React99.createElement(Arrow360Icon, { fontSize: "tiny" })
|
|
6750
7303
|
},
|
|
6751
7304
|
{
|
|
6752
|
-
label:
|
|
7305
|
+
label: __46("Rotate Y", "elementor"),
|
|
6753
7306
|
bind: "y",
|
|
6754
|
-
startIcon: /* @__PURE__ */
|
|
7307
|
+
startIcon: /* @__PURE__ */ React99.createElement(Arrow360Icon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
6755
7308
|
},
|
|
6756
7309
|
{
|
|
6757
|
-
label:
|
|
7310
|
+
label: __46("Rotate Z", "elementor"),
|
|
6758
7311
|
bind: "z",
|
|
6759
|
-
startIcon: /* @__PURE__ */
|
|
7312
|
+
startIcon: /* @__PURE__ */ React99.createElement(RotateClockwiseIcon, { fontSize: "tiny" })
|
|
6760
7313
|
}
|
|
6761
7314
|
];
|
|
6762
7315
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
6763
7316
|
var Rotate = () => {
|
|
6764
7317
|
const context = useBoundProp(rotateTransformPropTypeUtil2);
|
|
6765
|
-
const rowRefs = [
|
|
6766
|
-
return /* @__PURE__ */
|
|
7318
|
+
const rowRefs = [useRef20(null), useRef20(null), useRef20(null)];
|
|
7319
|
+
return /* @__PURE__ */ React99.createElement(Grid23, { container: true, spacing: 1.5 }, /* @__PURE__ */ React99.createElement(PropProvider, { ...context }, /* @__PURE__ */ React99.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React99.createElement(
|
|
6767
7320
|
AxisRow,
|
|
6768
7321
|
{
|
|
6769
7322
|
key: control.bind,
|
|
@@ -6775,68 +7328,68 @@ var Rotate = () => {
|
|
|
6775
7328
|
};
|
|
6776
7329
|
|
|
6777
7330
|
// src/controls/transform-control/functions/scale.tsx
|
|
6778
|
-
import * as
|
|
6779
|
-
import { useRef as
|
|
7331
|
+
import * as React101 from "react";
|
|
7332
|
+
import { useRef as useRef21 } from "react";
|
|
6780
7333
|
import { scaleTransformPropTypeUtil as scaleTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
6781
7334
|
import { ArrowDownLeftIcon as ArrowDownLeftIcon2, ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
6782
7335
|
import { Grid as Grid25 } from "@elementor/ui";
|
|
6783
|
-
import { __ as
|
|
7336
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
6784
7337
|
|
|
6785
7338
|
// src/controls/transform-control/functions/scale-axis-row.tsx
|
|
6786
|
-
import * as
|
|
7339
|
+
import * as React100 from "react";
|
|
6787
7340
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
6788
7341
|
var ScaleAxisRow = ({ label, bind, startIcon, anchorRef }) => {
|
|
6789
|
-
return /* @__PURE__ */
|
|
7342
|
+
return /* @__PURE__ */ React100.createElement(Grid24, { item: true, xs: 12 }, /* @__PURE__ */ React100.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React100.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(ControlLabel, null, label)), /* @__PURE__ */ React100.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React100.createElement(NumberControl, { step: 0.1, placeholder: "1", startIcon })))));
|
|
6790
7343
|
};
|
|
6791
7344
|
|
|
6792
7345
|
// src/controls/transform-control/functions/scale.tsx
|
|
6793
7346
|
var scaleAxisControls = [
|
|
6794
7347
|
{
|
|
6795
|
-
label:
|
|
7348
|
+
label: __47("Scale X", "elementor"),
|
|
6796
7349
|
bind: "x",
|
|
6797
|
-
startIcon: /* @__PURE__ */
|
|
7350
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowRightIcon2, { fontSize: "tiny" })
|
|
6798
7351
|
},
|
|
6799
7352
|
{
|
|
6800
|
-
label:
|
|
7353
|
+
label: __47("Scale Y", "elementor"),
|
|
6801
7354
|
bind: "y",
|
|
6802
|
-
startIcon: /* @__PURE__ */
|
|
7355
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowDownSmallIcon2, { fontSize: "tiny" })
|
|
6803
7356
|
},
|
|
6804
7357
|
{
|
|
6805
|
-
label:
|
|
7358
|
+
label: __47("Scale Z", "elementor"),
|
|
6806
7359
|
bind: "z",
|
|
6807
|
-
startIcon: /* @__PURE__ */
|
|
7360
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowDownLeftIcon2, { fontSize: "tiny" })
|
|
6808
7361
|
}
|
|
6809
7362
|
];
|
|
6810
7363
|
var Scale = () => {
|
|
6811
7364
|
const context = useBoundProp(scaleTransformPropTypeUtil2);
|
|
6812
|
-
const rowRefs = [
|
|
6813
|
-
return /* @__PURE__ */
|
|
7365
|
+
const rowRefs = [useRef21(null), useRef21(null), useRef21(null)];
|
|
7366
|
+
return /* @__PURE__ */ React101.createElement(Grid25, { 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] })))));
|
|
6814
7367
|
};
|
|
6815
7368
|
|
|
6816
7369
|
// src/controls/transform-control/functions/skew.tsx
|
|
6817
|
-
import * as
|
|
6818
|
-
import { useRef as
|
|
7370
|
+
import * as React102 from "react";
|
|
7371
|
+
import { useRef as useRef22 } from "react";
|
|
6819
7372
|
import { skewTransformPropTypeUtil as skewTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
6820
7373
|
import { ArrowLeftIcon, ArrowRightIcon as ArrowRightIcon3 } from "@elementor/icons";
|
|
6821
7374
|
import { Grid as Grid26 } from "@elementor/ui";
|
|
6822
|
-
import { __ as
|
|
7375
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
6823
7376
|
var skewAxisControls = [
|
|
6824
7377
|
{
|
|
6825
|
-
label:
|
|
7378
|
+
label: __48("Skew X", "elementor"),
|
|
6826
7379
|
bind: "x",
|
|
6827
|
-
startIcon: /* @__PURE__ */
|
|
7380
|
+
startIcon: /* @__PURE__ */ React102.createElement(ArrowRightIcon3, { fontSize: "tiny" })
|
|
6828
7381
|
},
|
|
6829
7382
|
{
|
|
6830
|
-
label:
|
|
7383
|
+
label: __48("Skew Y", "elementor"),
|
|
6831
7384
|
bind: "y",
|
|
6832
|
-
startIcon: /* @__PURE__ */
|
|
7385
|
+
startIcon: /* @__PURE__ */ React102.createElement(ArrowLeftIcon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
6833
7386
|
}
|
|
6834
7387
|
];
|
|
6835
7388
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
6836
7389
|
var Skew = () => {
|
|
6837
7390
|
const context = useBoundProp(skewTransformPropTypeUtil2);
|
|
6838
|
-
const rowRefs = [
|
|
6839
|
-
return /* @__PURE__ */
|
|
7391
|
+
const rowRefs = [useRef22(null), useRef22(null), useRef22(null)];
|
|
7392
|
+
return /* @__PURE__ */ React102.createElement(Grid26, { container: true, spacing: 1.5 }, /* @__PURE__ */ React102.createElement(PropProvider, { ...context }, /* @__PURE__ */ React102.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React102.createElement(
|
|
6840
7393
|
AxisRow,
|
|
6841
7394
|
{
|
|
6842
7395
|
key: control.bind,
|
|
@@ -6848,7 +7401,7 @@ var Skew = () => {
|
|
|
6848
7401
|
};
|
|
6849
7402
|
|
|
6850
7403
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
6851
|
-
import { useRef as
|
|
7404
|
+
import { useRef as useRef23 } from "react";
|
|
6852
7405
|
import {
|
|
6853
7406
|
moveTransformPropTypeUtil as moveTransformPropTypeUtil2,
|
|
6854
7407
|
rotateTransformPropTypeUtil as rotateTransformPropTypeUtil3,
|
|
@@ -6880,7 +7433,7 @@ var useTransformTabsHistory = ({
|
|
|
6880
7433
|
}
|
|
6881
7434
|
};
|
|
6882
7435
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs2(getCurrentTransformType());
|
|
6883
|
-
const valuesHistory =
|
|
7436
|
+
const valuesHistory = useRef23({
|
|
6884
7437
|
move: initialMove,
|
|
6885
7438
|
scale: initialScale,
|
|
6886
7439
|
rotate: initialRotate,
|
|
@@ -6941,7 +7494,7 @@ var TransformContent = () => {
|
|
|
6941
7494
|
rotate: initialRotateValue.value,
|
|
6942
7495
|
skew: initialSkewValue.value
|
|
6943
7496
|
});
|
|
6944
|
-
return /* @__PURE__ */
|
|
7497
|
+
return /* @__PURE__ */ React103.createElement(PopoverContent, null, /* @__PURE__ */ React103.createElement(Box21, { sx: { width: "100%" } }, /* @__PURE__ */ React103.createElement(Box21, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React103.createElement(
|
|
6945
7498
|
Tabs2,
|
|
6946
7499
|
{
|
|
6947
7500
|
size: "small",
|
|
@@ -6952,37 +7505,37 @@ var TransformContent = () => {
|
|
|
6952
7505
|
}
|
|
6953
7506
|
},
|
|
6954
7507
|
...getTabsProps(),
|
|
6955
|
-
"aria-label":
|
|
7508
|
+
"aria-label": __49("Transform", "elementor")
|
|
6956
7509
|
},
|
|
6957
|
-
/* @__PURE__ */
|
|
6958
|
-
/* @__PURE__ */
|
|
6959
|
-
/* @__PURE__ */
|
|
6960
|
-
/* @__PURE__ */
|
|
6961
|
-
)), /* @__PURE__ */
|
|
7510
|
+
/* @__PURE__ */ React103.createElement(Tab2, { label: __49("Move", "elementor"), ...getTabProps(TransformFunctionKeys.move) }),
|
|
7511
|
+
/* @__PURE__ */ React103.createElement(Tab2, { label: __49("Scale", "elementor"), ...getTabProps(TransformFunctionKeys.scale) }),
|
|
7512
|
+
/* @__PURE__ */ React103.createElement(Tab2, { label: __49("Rotate", "elementor"), ...getTabProps(TransformFunctionKeys.rotate) }),
|
|
7513
|
+
/* @__PURE__ */ React103.createElement(Tab2, { label: __49("Skew", "elementor"), ...getTabProps(TransformFunctionKeys.skew) })
|
|
7514
|
+
)), /* @__PURE__ */ React103.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.move) }, /* @__PURE__ */ React103.createElement(Move, null)), /* @__PURE__ */ React103.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.scale) }, /* @__PURE__ */ React103.createElement(Scale, null)), /* @__PURE__ */ React103.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.rotate) }, /* @__PURE__ */ React103.createElement(Rotate, null)), /* @__PURE__ */ React103.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.skew) }, /* @__PURE__ */ React103.createElement(Skew, null))));
|
|
6962
7515
|
};
|
|
6963
7516
|
|
|
6964
7517
|
// src/controls/transform-control/transform-icon.tsx
|
|
6965
|
-
import * as
|
|
7518
|
+
import * as React104 from "react";
|
|
6966
7519
|
import { ArrowAutofitHeightIcon, ArrowsMaximizeIcon as ArrowsMaximizeIcon2, RotateClockwise2Icon, SkewXIcon } from "@elementor/icons";
|
|
6967
7520
|
var TransformIcon = ({ value }) => {
|
|
6968
7521
|
switch (value.$$type) {
|
|
6969
7522
|
case TransformFunctionKeys.move:
|
|
6970
|
-
return /* @__PURE__ */
|
|
7523
|
+
return /* @__PURE__ */ React104.createElement(ArrowsMaximizeIcon2, { fontSize: "tiny" });
|
|
6971
7524
|
case TransformFunctionKeys.scale:
|
|
6972
|
-
return /* @__PURE__ */
|
|
7525
|
+
return /* @__PURE__ */ React104.createElement(ArrowAutofitHeightIcon, { fontSize: "tiny" });
|
|
6973
7526
|
case TransformFunctionKeys.rotate:
|
|
6974
|
-
return /* @__PURE__ */
|
|
7527
|
+
return /* @__PURE__ */ React104.createElement(RotateClockwise2Icon, { fontSize: "tiny" });
|
|
6975
7528
|
case TransformFunctionKeys.skew:
|
|
6976
|
-
return /* @__PURE__ */
|
|
7529
|
+
return /* @__PURE__ */ React104.createElement(SkewXIcon, { fontSize: "tiny" });
|
|
6977
7530
|
default:
|
|
6978
7531
|
return null;
|
|
6979
7532
|
}
|
|
6980
7533
|
};
|
|
6981
7534
|
|
|
6982
7535
|
// src/controls/transform-control/transform-label.tsx
|
|
6983
|
-
import * as
|
|
6984
|
-
import { Box as
|
|
6985
|
-
import { __ as
|
|
7536
|
+
import * as React105 from "react";
|
|
7537
|
+
import { Box as Box22 } from "@elementor/ui";
|
|
7538
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
6986
7539
|
var orderedAxis = ["x", "y", "z"];
|
|
6987
7540
|
var formatLabel = (value, functionType) => {
|
|
6988
7541
|
return orderedAxis.map((axisKey) => {
|
|
@@ -7000,98 +7553,98 @@ var TransformLabel = (props) => {
|
|
|
7000
7553
|
const { $$type, value } = props.value;
|
|
7001
7554
|
switch ($$type) {
|
|
7002
7555
|
case TransformFunctionKeys.move:
|
|
7003
|
-
return /* @__PURE__ */
|
|
7556
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: __50("Move", "elementor"), value: formatLabel(value, "move") });
|
|
7004
7557
|
case TransformFunctionKeys.scale:
|
|
7005
|
-
return /* @__PURE__ */
|
|
7558
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: __50("Scale", "elementor"), value: formatLabel(value, "scale") });
|
|
7006
7559
|
case TransformFunctionKeys.rotate:
|
|
7007
|
-
return /* @__PURE__ */
|
|
7560
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: __50("Rotate", "elementor"), value: formatLabel(value, "rotate") });
|
|
7008
7561
|
case TransformFunctionKeys.skew:
|
|
7009
|
-
return /* @__PURE__ */
|
|
7562
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: __50("Skew", "elementor"), value: formatLabel(value, "skew") });
|
|
7010
7563
|
default:
|
|
7011
7564
|
return "";
|
|
7012
7565
|
}
|
|
7013
7566
|
};
|
|
7014
7567
|
var Label2 = ({ label, value }) => {
|
|
7015
|
-
return /* @__PURE__ */
|
|
7568
|
+
return /* @__PURE__ */ React105.createElement(Box22, { component: "span" }, label, ": ", value);
|
|
7016
7569
|
};
|
|
7017
7570
|
|
|
7018
7571
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
7019
|
-
import * as
|
|
7020
|
-
import { PopoverHeader as
|
|
7572
|
+
import * as React108 from "react";
|
|
7573
|
+
import { PopoverHeader as PopoverHeader5 } from "@elementor/editor-ui";
|
|
7021
7574
|
import { AdjustmentsIcon } from "@elementor/icons";
|
|
7022
|
-
import { bindPopover as bindPopover6, Box as
|
|
7023
|
-
import { __ as
|
|
7575
|
+
import { bindPopover as bindPopover6, Box as Box23, Divider as Divider5, Popover as Popover7 } from "@elementor/ui";
|
|
7576
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
7024
7577
|
|
|
7025
7578
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
7026
|
-
import * as
|
|
7027
|
-
import { useRef as
|
|
7579
|
+
import * as React106 from "react";
|
|
7580
|
+
import { useRef as useRef24 } from "react";
|
|
7028
7581
|
import { perspectiveOriginPropTypeUtil } from "@elementor/editor-props";
|
|
7029
|
-
import { Grid as Grid27, Stack as
|
|
7030
|
-
import { __ as
|
|
7582
|
+
import { Grid as Grid27, Stack as Stack17 } from "@elementor/ui";
|
|
7583
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
7031
7584
|
var ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
7032
7585
|
var PERSPECTIVE_CONTROL_FIELD = {
|
|
7033
|
-
label:
|
|
7586
|
+
label: __51("Perspective", "elementor"),
|
|
7034
7587
|
bind: "perspective",
|
|
7035
7588
|
units: ["px", "em", "rem", "vw", "vh"]
|
|
7036
7589
|
};
|
|
7037
7590
|
var CHILDREN_PERSPECTIVE_FIELDS = [
|
|
7038
7591
|
{
|
|
7039
|
-
label:
|
|
7592
|
+
label: __51("Origin X", "elementor"),
|
|
7040
7593
|
bind: "x",
|
|
7041
7594
|
units: ORIGIN_UNITS
|
|
7042
7595
|
},
|
|
7043
7596
|
{
|
|
7044
|
-
label:
|
|
7597
|
+
label: __51("Origin Y", "elementor"),
|
|
7045
7598
|
bind: "y",
|
|
7046
7599
|
units: ORIGIN_UNITS
|
|
7047
7600
|
}
|
|
7048
7601
|
];
|
|
7049
7602
|
var ChildrenPerspectiveControl = () => {
|
|
7050
|
-
return /* @__PURE__ */
|
|
7603
|
+
return /* @__PURE__ */ React106.createElement(Stack17, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React106.createElement(ControlFormLabel, null, __51("Children perspective", "elementor")), /* @__PURE__ */ React106.createElement(PerspectiveControl, null), /* @__PURE__ */ React106.createElement(PerspectiveOriginControl, null));
|
|
7051
7604
|
};
|
|
7052
|
-
var PerspectiveControl = () => /* @__PURE__ */
|
|
7053
|
-
var PerspectiveOriginControl = () => /* @__PURE__ */
|
|
7605
|
+
var PerspectiveControl = () => /* @__PURE__ */ React106.createElement(PropKeyProvider, { bind: "perspective" }, /* @__PURE__ */ React106.createElement(ControlFields, { control: PERSPECTIVE_CONTROL_FIELD, key: PERSPECTIVE_CONTROL_FIELD.bind }));
|
|
7606
|
+
var PerspectiveOriginControl = () => /* @__PURE__ */ React106.createElement(PropKeyProvider, { bind: "perspective-origin" }, /* @__PURE__ */ React106.createElement(PerspectiveOriginControlProvider, null));
|
|
7054
7607
|
var PerspectiveOriginControlProvider = () => {
|
|
7055
7608
|
const context = useBoundProp(perspectiveOriginPropTypeUtil);
|
|
7056
|
-
return /* @__PURE__ */
|
|
7609
|
+
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 }))));
|
|
7057
7610
|
};
|
|
7058
7611
|
var ControlFields = ({ control }) => {
|
|
7059
|
-
const rowRef =
|
|
7060
|
-
return /* @__PURE__ */
|
|
7612
|
+
const rowRef = useRef24(null);
|
|
7613
|
+
return /* @__PURE__ */ React106.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React106.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React106.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React106.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React106.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
|
|
7061
7614
|
};
|
|
7062
7615
|
|
|
7063
7616
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
7064
|
-
import * as
|
|
7065
|
-
import { useRef as
|
|
7617
|
+
import * as React107 from "react";
|
|
7618
|
+
import { useRef as useRef25 } from "react";
|
|
7066
7619
|
import { transformOriginPropTypeUtil } from "@elementor/editor-props";
|
|
7067
|
-
import { Grid as Grid28, Stack as
|
|
7068
|
-
import { __ as
|
|
7620
|
+
import { Grid as Grid28, Stack as Stack18 } from "@elementor/ui";
|
|
7621
|
+
import { __ as __52 } from "@wordpress/i18n";
|
|
7069
7622
|
var TRANSFORM_ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
7070
7623
|
var TRANSFORM_ORIGIN_UNITS_Z_AXIS = TRANSFORM_ORIGIN_UNITS.filter((unit) => unit !== "%");
|
|
7071
7624
|
var TRANSFORM_ORIGIN_FIELDS = [
|
|
7072
7625
|
{
|
|
7073
|
-
label:
|
|
7626
|
+
label: __52("Origin X", "elementor"),
|
|
7074
7627
|
bind: "x",
|
|
7075
7628
|
units: TRANSFORM_ORIGIN_UNITS
|
|
7076
7629
|
},
|
|
7077
7630
|
{
|
|
7078
|
-
label:
|
|
7631
|
+
label: __52("Origin Y", "elementor"),
|
|
7079
7632
|
bind: "y",
|
|
7080
7633
|
units: TRANSFORM_ORIGIN_UNITS
|
|
7081
7634
|
},
|
|
7082
7635
|
{
|
|
7083
|
-
label:
|
|
7636
|
+
label: __52("Origin Z", "elementor"),
|
|
7084
7637
|
bind: "z",
|
|
7085
7638
|
units: TRANSFORM_ORIGIN_UNITS_Z_AXIS
|
|
7086
7639
|
}
|
|
7087
7640
|
];
|
|
7088
7641
|
var TransformOriginControl = () => {
|
|
7089
|
-
return /* @__PURE__ */
|
|
7642
|
+
return /* @__PURE__ */ React107.createElement(Stack18, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React107.createElement(ControlFormLabel, null, __52("Transform", "elementor")), TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React107.createElement(ControlFields2, { control, key: control.bind })));
|
|
7090
7643
|
};
|
|
7091
7644
|
var ControlFields2 = ({ control }) => {
|
|
7092
7645
|
const context = useBoundProp(transformOriginPropTypeUtil);
|
|
7093
|
-
const rowRef =
|
|
7094
|
-
return /* @__PURE__ */
|
|
7646
|
+
const rowRef = useRef25(null);
|
|
7647
|
+
return /* @__PURE__ */ React107.createElement(PropProvider, { ...context }, /* @__PURE__ */ React107.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React107.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React107.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React107.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React107.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React107.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef })))));
|
|
7095
7648
|
};
|
|
7096
7649
|
|
|
7097
7650
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
@@ -7105,8 +7658,8 @@ var TransformSettingsControl = ({
|
|
|
7105
7658
|
...popupState,
|
|
7106
7659
|
anchorEl: anchorRef.current ?? void 0
|
|
7107
7660
|
});
|
|
7108
|
-
return /* @__PURE__ */
|
|
7109
|
-
|
|
7661
|
+
return /* @__PURE__ */ React108.createElement(
|
|
7662
|
+
Popover7,
|
|
7110
7663
|
{
|
|
7111
7664
|
disablePortal: true,
|
|
7112
7665
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
@@ -7120,16 +7673,16 @@ var TransformSettingsControl = ({
|
|
|
7120
7673
|
},
|
|
7121
7674
|
...popupProps
|
|
7122
7675
|
},
|
|
7123
|
-
/* @__PURE__ */
|
|
7124
|
-
|
|
7676
|
+
/* @__PURE__ */ React108.createElement(
|
|
7677
|
+
PopoverHeader5,
|
|
7125
7678
|
{
|
|
7126
|
-
title:
|
|
7679
|
+
title: __53("Transform settings", "elementor"),
|
|
7127
7680
|
onClose: popupState.close,
|
|
7128
|
-
icon: /* @__PURE__ */
|
|
7681
|
+
icon: /* @__PURE__ */ React108.createElement(AdjustmentsIcon, { fontSize: SIZE10 })
|
|
7129
7682
|
}
|
|
7130
7683
|
),
|
|
7131
|
-
/* @__PURE__ */
|
|
7132
|
-
/* @__PURE__ */
|
|
7684
|
+
/* @__PURE__ */ React108.createElement(Divider5, null),
|
|
7685
|
+
/* @__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(Box23, { sx: { my: 0.5 } }, /* @__PURE__ */ React108.createElement(Divider5, null)), /* @__PURE__ */ React108.createElement(ChildrenPerspectiveControl, null)))
|
|
7133
7686
|
);
|
|
7134
7687
|
};
|
|
7135
7688
|
|
|
@@ -7138,27 +7691,27 @@ var SIZE11 = "tiny";
|
|
|
7138
7691
|
var TransformRepeaterControl = createControl(
|
|
7139
7692
|
({ showChildrenPerspective }) => {
|
|
7140
7693
|
const context = useBoundProp(transformPropTypeUtil);
|
|
7141
|
-
const headerRef =
|
|
7142
|
-
const popupState =
|
|
7143
|
-
return /* @__PURE__ */
|
|
7694
|
+
const headerRef = useRef26(null);
|
|
7695
|
+
const popupState = usePopupState9({ variant: "popover" });
|
|
7696
|
+
return /* @__PURE__ */ React109.createElement(PropProvider, { ...context }, /* @__PURE__ */ React109.createElement(
|
|
7144
7697
|
TransformSettingsControl,
|
|
7145
7698
|
{
|
|
7146
7699
|
popupState,
|
|
7147
7700
|
anchorRef: headerRef,
|
|
7148
7701
|
showChildrenPerspective
|
|
7149
7702
|
}
|
|
7150
|
-
), /* @__PURE__ */
|
|
7703
|
+
), /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React109.createElement(Repeater2, { headerRef, propType: context.propType, popupState })));
|
|
7151
7704
|
}
|
|
7152
7705
|
);
|
|
7153
|
-
var ToolTip = /* @__PURE__ */
|
|
7154
|
-
|
|
7706
|
+
var ToolTip = /* @__PURE__ */ React109.createElement(
|
|
7707
|
+
Box24,
|
|
7155
7708
|
{
|
|
7156
7709
|
component: "span",
|
|
7157
7710
|
"aria-label": void 0,
|
|
7158
7711
|
sx: { display: "flex", gap: 0.5, p: 2, width: 320, borderRadius: 1 }
|
|
7159
7712
|
},
|
|
7160
|
-
/* @__PURE__ */
|
|
7161
|
-
/* @__PURE__ */
|
|
7713
|
+
/* @__PURE__ */ React109.createElement(InfoCircleFilledIcon2, { sx: { color: "secondary.main" } }),
|
|
7714
|
+
/* @__PURE__ */ React109.createElement(Typography9, { variant: "body2", color: "text.secondary", fontSize: "14px" }, __54("You can use each kind of transform only once per element.", "elementor"))
|
|
7162
7715
|
);
|
|
7163
7716
|
var Repeater2 = ({
|
|
7164
7717
|
headerRef,
|
|
@@ -7172,21 +7725,21 @@ var Repeater2 = ({
|
|
|
7172
7725
|
return availableValues.find((value) => !transformValues?.some((item) => item.$$type === value.$$type));
|
|
7173
7726
|
};
|
|
7174
7727
|
const shouldDisableAddItem = !getInitialValue2();
|
|
7175
|
-
return /* @__PURE__ */
|
|
7728
|
+
return /* @__PURE__ */ React109.createElement(PropProvider, { ...transformFunctionsContext }, /* @__PURE__ */ React109.createElement(
|
|
7176
7729
|
ControlRepeater,
|
|
7177
7730
|
{
|
|
7178
7731
|
initial: getInitialValue2() ?? initialTransformValue,
|
|
7179
7732
|
propTypeUtil: transformFunctionsPropTypeUtil
|
|
7180
7733
|
},
|
|
7181
|
-
/* @__PURE__ */
|
|
7734
|
+
/* @__PURE__ */ React109.createElement(
|
|
7182
7735
|
RepeaterHeader,
|
|
7183
7736
|
{
|
|
7184
|
-
label:
|
|
7185
|
-
adornment: () => /* @__PURE__ */
|
|
7737
|
+
label: __54("Transform", "elementor"),
|
|
7738
|
+
adornment: () => /* @__PURE__ */ React109.createElement(ControlAdornments, { customContext: { path: ["transform"], propType } }),
|
|
7186
7739
|
ref: headerRef
|
|
7187
7740
|
},
|
|
7188
|
-
/* @__PURE__ */
|
|
7189
|
-
/* @__PURE__ */
|
|
7741
|
+
/* @__PURE__ */ React109.createElement(TransformBasePopoverTrigger, { popupState, repeaterBindKey: bind }),
|
|
7742
|
+
/* @__PURE__ */ React109.createElement(
|
|
7190
7743
|
TooltipAddItemAction,
|
|
7191
7744
|
{
|
|
7192
7745
|
disabled: shouldDisableAddItem,
|
|
@@ -7196,15 +7749,15 @@ var Repeater2 = ({
|
|
|
7196
7749
|
}
|
|
7197
7750
|
)
|
|
7198
7751
|
),
|
|
7199
|
-
/* @__PURE__ */
|
|
7752
|
+
/* @__PURE__ */ React109.createElement(ItemsContainer, null, /* @__PURE__ */ React109.createElement(
|
|
7200
7753
|
Item,
|
|
7201
7754
|
{
|
|
7202
7755
|
Icon: TransformIcon,
|
|
7203
7756
|
Label: TransformLabel,
|
|
7204
|
-
actions: /* @__PURE__ */
|
|
7757
|
+
actions: /* @__PURE__ */ React109.createElement(React109.Fragment, null, /* @__PURE__ */ React109.createElement(DisableItemAction, null), /* @__PURE__ */ React109.createElement(RemoveItemAction, null))
|
|
7205
7758
|
}
|
|
7206
7759
|
)),
|
|
7207
|
-
/* @__PURE__ */
|
|
7760
|
+
/* @__PURE__ */ React109.createElement(EditItemPopover, null, /* @__PURE__ */ React109.createElement(TransformContent, null))
|
|
7208
7761
|
));
|
|
7209
7762
|
};
|
|
7210
7763
|
var TransformBasePopoverTrigger = ({
|
|
@@ -7212,33 +7765,33 @@ var TransformBasePopoverTrigger = ({
|
|
|
7212
7765
|
repeaterBindKey
|
|
7213
7766
|
}) => {
|
|
7214
7767
|
const { bind } = useBoundProp();
|
|
7215
|
-
const titleLabel =
|
|
7216
|
-
return bind !== repeaterBindKey ? null : /* @__PURE__ */
|
|
7768
|
+
const titleLabel = __54("Transform settings", "elementor");
|
|
7769
|
+
return bind !== repeaterBindKey ? null : /* @__PURE__ */ React109.createElement(Tooltip8, { title: titleLabel, placement: "top" }, /* @__PURE__ */ React109.createElement(IconButton8, { size: SIZE11, "aria-label": titleLabel, ...bindTrigger5(popupState) }, /* @__PURE__ */ React109.createElement(AdjustmentsIcon2, { fontSize: SIZE11 })));
|
|
7217
7770
|
};
|
|
7218
7771
|
|
|
7219
7772
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
7220
|
-
import * as
|
|
7221
|
-
import { useEffect as useEffect17, useMemo as
|
|
7773
|
+
import * as React112 from "react";
|
|
7774
|
+
import { useEffect as useEffect17, useMemo as useMemo17, useState as useState19 } from "react";
|
|
7222
7775
|
import {
|
|
7223
7776
|
createArrayPropUtils as createArrayPropUtils3,
|
|
7224
7777
|
selectionSizePropTypeUtil as selectionSizePropTypeUtil2
|
|
7225
7778
|
} from "@elementor/editor-props";
|
|
7226
7779
|
import { InfoCircleFilledIcon as InfoCircleFilledIcon3 } from "@elementor/icons";
|
|
7227
|
-
import { Alert as Alert2, AlertTitle as AlertTitle3, Box as
|
|
7780
|
+
import { Alert as Alert2, AlertTitle as AlertTitle3, Box as Box26, Typography as Typography10 } from "@elementor/ui";
|
|
7228
7781
|
import { hasProInstalled as hasProInstalled2 } from "@elementor/utils";
|
|
7229
|
-
import { __ as
|
|
7782
|
+
import { __ as __57 } from "@wordpress/i18n";
|
|
7230
7783
|
|
|
7231
7784
|
// src/controls/selection-size-control.tsx
|
|
7232
|
-
import * as
|
|
7233
|
-
import { useMemo as
|
|
7785
|
+
import * as React110 from "react";
|
|
7786
|
+
import { useMemo as useMemo15, useRef as useRef27 } from "react";
|
|
7234
7787
|
import { selectionSizePropTypeUtil } from "@elementor/editor-props";
|
|
7235
7788
|
import { Grid as Grid29 } from "@elementor/ui";
|
|
7236
7789
|
var SelectionSizeControl = createControl(
|
|
7237
7790
|
({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
|
|
7238
7791
|
const { value, setValue, propType } = useBoundProp(selectionSizePropTypeUtil);
|
|
7239
|
-
const rowRef =
|
|
7792
|
+
const rowRef = useRef27(null);
|
|
7240
7793
|
const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
|
|
7241
|
-
const currentSizeConfig =
|
|
7794
|
+
const currentSizeConfig = useMemo15(() => {
|
|
7242
7795
|
switch (value.selection.$$type) {
|
|
7243
7796
|
case "key-value":
|
|
7244
7797
|
return sizeConfigMap[value?.selection?.value.value.value || ""];
|
|
@@ -7249,7 +7802,7 @@ var SelectionSizeControl = createControl(
|
|
|
7249
7802
|
}
|
|
7250
7803
|
}, [value, sizeConfigMap]);
|
|
7251
7804
|
const SelectionComponent = selectionConfig.component;
|
|
7252
|
-
return /* @__PURE__ */
|
|
7805
|
+
return /* @__PURE__ */ React110.createElement(PropProvider, { value, setValue, propType }, /* @__PURE__ */ React110.createElement(Grid29, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React110.createElement(Grid29, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React110.createElement(ControlFormLabel, null, selectionLabel)), /* @__PURE__ */ React110.createElement(Grid29, { 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(Grid29, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React110.createElement(ControlFormLabel, { htmlFor: sizeFieldId }, sizeLabel)), /* @__PURE__ */ React110.createElement(Grid29, { item: true, xs: 6 }, /* @__PURE__ */ React110.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React110.createElement(
|
|
7253
7806
|
SizeControl,
|
|
7254
7807
|
{
|
|
7255
7808
|
anchorRef: rowRef,
|
|
@@ -7264,12 +7817,12 @@ var SelectionSizeControl = createControl(
|
|
|
7264
7817
|
|
|
7265
7818
|
// src/controls/transition-control/data.ts
|
|
7266
7819
|
import { hasProInstalled, isVersionGreaterOrEqual } from "@elementor/utils";
|
|
7267
|
-
import { __ as
|
|
7820
|
+
import { __ as __55 } from "@wordpress/i18n";
|
|
7268
7821
|
var initialTransitionValue = {
|
|
7269
7822
|
selection: {
|
|
7270
7823
|
$$type: "key-value",
|
|
7271
7824
|
value: {
|
|
7272
|
-
key: { value:
|
|
7825
|
+
key: { value: __55("All properties", "elementor"), $$type: "string" },
|
|
7273
7826
|
value: { value: "all", $$type: "string" }
|
|
7274
7827
|
}
|
|
7275
7828
|
},
|
|
@@ -7293,128 +7846,128 @@ var createTransitionPropertiesList = () => {
|
|
|
7293
7846
|
const isSiteRtl = getIsSiteRtl();
|
|
7294
7847
|
const baseProperties = [
|
|
7295
7848
|
{
|
|
7296
|
-
label:
|
|
7849
|
+
label: __55("Default", "elementor"),
|
|
7297
7850
|
type: "category",
|
|
7298
|
-
properties: [{ label:
|
|
7851
|
+
properties: [{ label: __55("All properties", "elementor"), value: "all" }]
|
|
7299
7852
|
},
|
|
7300
7853
|
{
|
|
7301
|
-
label:
|
|
7854
|
+
label: __55("Margin", "elementor"),
|
|
7302
7855
|
type: "category",
|
|
7303
7856
|
properties: [
|
|
7304
|
-
{ label:
|
|
7305
|
-
{ label:
|
|
7857
|
+
{ label: __55("Margin (all)", "elementor"), value: "margin", isDisabled: true },
|
|
7858
|
+
{ label: __55("Margin bottom", "elementor"), value: "margin-block-end", isDisabled: true },
|
|
7306
7859
|
{
|
|
7307
|
-
label: isSiteRtl ?
|
|
7860
|
+
label: isSiteRtl ? __55("Margin right", "elementor") : __55("Margin left", "elementor"),
|
|
7308
7861
|
value: "margin-inline-start",
|
|
7309
7862
|
isDisabled: true
|
|
7310
7863
|
},
|
|
7311
7864
|
{
|
|
7312
|
-
label: isSiteRtl ?
|
|
7865
|
+
label: isSiteRtl ? __55("Margin left", "elementor") : __55("Margin right", "elementor"),
|
|
7313
7866
|
value: "margin-inline-end",
|
|
7314
7867
|
isDisabled: true
|
|
7315
7868
|
},
|
|
7316
|
-
{ label:
|
|
7869
|
+
{ label: __55("Margin top", "elementor"), value: "margin-block-start", isDisabled: true }
|
|
7317
7870
|
]
|
|
7318
7871
|
},
|
|
7319
7872
|
{
|
|
7320
|
-
label:
|
|
7873
|
+
label: __55("Padding", "elementor"),
|
|
7321
7874
|
type: "category",
|
|
7322
7875
|
properties: [
|
|
7323
|
-
{ label:
|
|
7324
|
-
{ label:
|
|
7876
|
+
{ label: __55("Padding (all)", "elementor"), value: "padding", isDisabled: true },
|
|
7877
|
+
{ label: __55("Padding bottom", "elementor"), value: "padding-block-end", isDisabled: true },
|
|
7325
7878
|
{
|
|
7326
|
-
label: isSiteRtl ?
|
|
7879
|
+
label: isSiteRtl ? __55("Padding right", "elementor") : __55("Padding left", "elementor"),
|
|
7327
7880
|
value: "padding-inline-start",
|
|
7328
7881
|
isDisabled: true
|
|
7329
7882
|
},
|
|
7330
7883
|
{
|
|
7331
|
-
label: isSiteRtl ?
|
|
7884
|
+
label: isSiteRtl ? __55("Padding left", "elementor") : __55("Padding right", "elementor"),
|
|
7332
7885
|
value: "padding-inline-end",
|
|
7333
7886
|
isDisabled: true
|
|
7334
7887
|
},
|
|
7335
|
-
{ label:
|
|
7888
|
+
{ label: __55("Padding top", "elementor"), value: "padding-block-start", isDisabled: true }
|
|
7336
7889
|
]
|
|
7337
7890
|
},
|
|
7338
7891
|
{
|
|
7339
|
-
label:
|
|
7892
|
+
label: __55("Flex", "elementor"),
|
|
7340
7893
|
type: "category",
|
|
7341
7894
|
properties: [
|
|
7342
|
-
{ label:
|
|
7343
|
-
{ label:
|
|
7344
|
-
{ label:
|
|
7345
|
-
{ label:
|
|
7895
|
+
{ label: __55("Flex (all)", "elementor"), value: "flex", isDisabled: true },
|
|
7896
|
+
{ label: __55("Flex grow", "elementor"), value: "flex-grow", isDisabled: true },
|
|
7897
|
+
{ label: __55("Flex shrink", "elementor"), value: "flex-shrink", isDisabled: true },
|
|
7898
|
+
{ label: __55("Flex basis", "elementor"), value: "flex-basis", isDisabled: true }
|
|
7346
7899
|
]
|
|
7347
7900
|
},
|
|
7348
7901
|
{
|
|
7349
|
-
label:
|
|
7902
|
+
label: __55("Size", "elementor"),
|
|
7350
7903
|
type: "category",
|
|
7351
7904
|
properties: [
|
|
7352
|
-
{ label:
|
|
7353
|
-
{ label:
|
|
7354
|
-
{ label:
|
|
7355
|
-
{ label:
|
|
7356
|
-
{ label:
|
|
7357
|
-
{ label:
|
|
7905
|
+
{ label: __55("Width", "elementor"), value: "width", isDisabled: true },
|
|
7906
|
+
{ label: __55("Height", "elementor"), value: "height", isDisabled: true },
|
|
7907
|
+
{ label: __55("Max height", "elementor"), value: "max-height", isDisabled: true },
|
|
7908
|
+
{ label: __55("Max width", "elementor"), value: "max-width", isDisabled: true },
|
|
7909
|
+
{ label: __55("Min height", "elementor"), value: "min-height", isDisabled: true },
|
|
7910
|
+
{ label: __55("Min width", "elementor"), value: "min-width", isDisabled: true }
|
|
7358
7911
|
]
|
|
7359
7912
|
},
|
|
7360
7913
|
{
|
|
7361
|
-
label:
|
|
7914
|
+
label: __55("Position", "elementor"),
|
|
7362
7915
|
type: "category",
|
|
7363
7916
|
properties: [
|
|
7364
|
-
{ label:
|
|
7917
|
+
{ label: __55("Top", "elementor"), value: "inset-block-start", isDisabled: true },
|
|
7365
7918
|
{
|
|
7366
|
-
label: isSiteRtl ?
|
|
7919
|
+
label: isSiteRtl ? __55("Right", "elementor") : __55("Left", "elementor"),
|
|
7367
7920
|
value: "inset-inline-start",
|
|
7368
7921
|
isDisabled: true
|
|
7369
7922
|
},
|
|
7370
7923
|
{
|
|
7371
|
-
label: isSiteRtl ?
|
|
7924
|
+
label: isSiteRtl ? __55("Left", "elementor") : __55("Right", "elementor"),
|
|
7372
7925
|
value: "inset-inline-end",
|
|
7373
7926
|
isDisabled: true
|
|
7374
7927
|
},
|
|
7375
|
-
{ label:
|
|
7376
|
-
{ label:
|
|
7928
|
+
{ label: __55("Bottom", "elementor"), value: "inset-block-end", isDisabled: true },
|
|
7929
|
+
{ label: __55("Z-index", "elementor"), value: "z-index", isDisabled: true }
|
|
7377
7930
|
]
|
|
7378
7931
|
},
|
|
7379
7932
|
{
|
|
7380
|
-
label:
|
|
7933
|
+
label: __55("Typography", "elementor"),
|
|
7381
7934
|
type: "category",
|
|
7382
7935
|
properties: [
|
|
7383
|
-
{ label:
|
|
7384
|
-
{ label:
|
|
7385
|
-
{ label:
|
|
7386
|
-
{ label:
|
|
7387
|
-
{ label:
|
|
7388
|
-
{ label:
|
|
7389
|
-
{ label:
|
|
7936
|
+
{ label: __55("Font color", "elementor"), value: "color", isDisabled: true },
|
|
7937
|
+
{ label: __55("Font size", "elementor"), value: "font-size", isDisabled: true },
|
|
7938
|
+
{ label: __55("Line height", "elementor"), value: "line-height", isDisabled: true },
|
|
7939
|
+
{ label: __55("Letter spacing", "elementor"), value: "letter-spacing", isDisabled: true },
|
|
7940
|
+
{ label: __55("Word spacing", "elementor"), value: "word-spacing", isDisabled: true },
|
|
7941
|
+
{ label: __55("Font variations", "elementor"), value: "font-variation-settings", isDisabled: true },
|
|
7942
|
+
{ label: __55("Text stroke color", "elementor"), value: "-webkit-text-stroke-color", isDisabled: true }
|
|
7390
7943
|
]
|
|
7391
7944
|
},
|
|
7392
7945
|
{
|
|
7393
|
-
label:
|
|
7946
|
+
label: __55("Background", "elementor"),
|
|
7394
7947
|
type: "category",
|
|
7395
7948
|
properties: [
|
|
7396
|
-
{ label:
|
|
7397
|
-
{ label:
|
|
7398
|
-
{ label:
|
|
7949
|
+
{ label: __55("Background color", "elementor"), value: "background-color", isDisabled: true },
|
|
7950
|
+
{ label: __55("Background position", "elementor"), value: "background-position", isDisabled: true },
|
|
7951
|
+
{ label: __55("Box shadow", "elementor"), value: "box-shadow", isDisabled: true }
|
|
7399
7952
|
]
|
|
7400
7953
|
},
|
|
7401
7954
|
{
|
|
7402
|
-
label:
|
|
7955
|
+
label: __55("Border", "elementor"),
|
|
7403
7956
|
type: "category",
|
|
7404
7957
|
properties: [
|
|
7405
|
-
{ label:
|
|
7406
|
-
{ label:
|
|
7407
|
-
{ label:
|
|
7408
|
-
{ label:
|
|
7958
|
+
{ label: __55("Border (all)", "elementor"), value: "border", isDisabled: true },
|
|
7959
|
+
{ label: __55("Border radius", "elementor"), value: "border-radius", isDisabled: true },
|
|
7960
|
+
{ label: __55("Border color", "elementor"), value: "border-color", isDisabled: true },
|
|
7961
|
+
{ label: __55("Border width", "elementor"), value: "border-width", isDisabled: true }
|
|
7409
7962
|
]
|
|
7410
7963
|
},
|
|
7411
7964
|
{
|
|
7412
|
-
label:
|
|
7965
|
+
label: __55("Effects", "elementor"),
|
|
7413
7966
|
type: "category",
|
|
7414
7967
|
properties: [
|
|
7415
|
-
{ label:
|
|
7416
|
-
{ label:
|
|
7417
|
-
{ label:
|
|
7968
|
+
{ label: __55("Opacity", "elementor"), value: "opacity", isDisabled: true },
|
|
7969
|
+
{ label: __55("Transform (all)", "elementor"), value: "transform", isDisabled: true },
|
|
7970
|
+
{ label: __55("Filter (all)", "elementor"), value: "filter", isDisabled: true }
|
|
7418
7971
|
]
|
|
7419
7972
|
}
|
|
7420
7973
|
];
|
|
@@ -7450,13 +8003,13 @@ function subscribeToTransitionEvent() {
|
|
|
7450
8003
|
}
|
|
7451
8004
|
|
|
7452
8005
|
// src/controls/transition-control/transition-selector.tsx
|
|
7453
|
-
import * as
|
|
7454
|
-
import { useMemo as
|
|
8006
|
+
import * as React111 from "react";
|
|
8007
|
+
import { useMemo as useMemo16, useRef as useRef28 } from "react";
|
|
7455
8008
|
import { keyValuePropTypeUtil as keyValuePropTypeUtil2 } from "@elementor/editor-props";
|
|
7456
8009
|
import { PromotionAlert, PromotionChip } from "@elementor/editor-ui";
|
|
7457
8010
|
import { ChevronDownIcon as ChevronDownIcon3, VariationsIcon } from "@elementor/icons";
|
|
7458
|
-
import { bindPopover as bindPopover7, bindTrigger as bindTrigger6, Box as
|
|
7459
|
-
import { __ as
|
|
8011
|
+
import { bindPopover as bindPopover7, bindTrigger as bindTrigger6, Box as Box25, Popover as Popover8, UnstableTag as UnstableTag3, usePopupState as usePopupState10 } from "@elementor/ui";
|
|
8012
|
+
import { __ as __56 } from "@wordpress/i18n";
|
|
7460
8013
|
|
|
7461
8014
|
// src/utils/tracking.ts
|
|
7462
8015
|
import { getSelectedElements as getSelectedElements2 } from "@elementor/editor-elements";
|
|
@@ -7537,9 +8090,9 @@ var TransitionSelector = ({
|
|
|
7537
8090
|
const {
|
|
7538
8091
|
key: { value: transitionLabel }
|
|
7539
8092
|
} = value;
|
|
7540
|
-
const defaultRef =
|
|
7541
|
-
const popoverState =
|
|
7542
|
-
const disabledCategories =
|
|
8093
|
+
const defaultRef = useRef28(null);
|
|
8094
|
+
const popoverState = usePopupState10({ variant: "popover" });
|
|
8095
|
+
const disabledCategories = useMemo16(() => {
|
|
7543
8096
|
return new Set(
|
|
7544
8097
|
transitionProperties.filter((cat) => cat.properties.some((prop) => prop.isDisabled)).map((cat) => cat.label)
|
|
7545
8098
|
);
|
|
@@ -7559,7 +8112,7 @@ var TransitionSelector = ({
|
|
|
7559
8112
|
return [
|
|
7560
8113
|
first,
|
|
7561
8114
|
{
|
|
7562
|
-
label:
|
|
8115
|
+
label: __56("Recently Used", "elementor"),
|
|
7563
8116
|
items: recentItems
|
|
7564
8117
|
},
|
|
7565
8118
|
...rest
|
|
@@ -7583,17 +8136,17 @@ var TransitionSelector = ({
|
|
|
7583
8136
|
left: rect.right + 36
|
|
7584
8137
|
};
|
|
7585
8138
|
};
|
|
7586
|
-
return /* @__PURE__ */
|
|
8139
|
+
return /* @__PURE__ */ React111.createElement(Box25, { ref: defaultRef }, /* @__PURE__ */ React111.createElement(ControlActions, null, /* @__PURE__ */ React111.createElement(
|
|
7587
8140
|
UnstableTag3,
|
|
7588
8141
|
{
|
|
7589
8142
|
variant: "outlined",
|
|
7590
8143
|
label: transitionLabel,
|
|
7591
|
-
endIcon: /* @__PURE__ */
|
|
8144
|
+
endIcon: /* @__PURE__ */ React111.createElement(ChevronDownIcon3, { fontSize: "tiny" }),
|
|
7592
8145
|
...bindTrigger6(popoverState),
|
|
7593
8146
|
fullWidth: true
|
|
7594
8147
|
}
|
|
7595
|
-
)), /* @__PURE__ */
|
|
7596
|
-
|
|
8148
|
+
)), /* @__PURE__ */ React111.createElement(
|
|
8149
|
+
Popover8,
|
|
7597
8150
|
{
|
|
7598
8151
|
disablePortal: true,
|
|
7599
8152
|
disableScrollLock: true,
|
|
@@ -7603,7 +8156,7 @@ var TransitionSelector = ({
|
|
|
7603
8156
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
7604
8157
|
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
7605
8158
|
},
|
|
7606
|
-
/* @__PURE__ */
|
|
8159
|
+
/* @__PURE__ */ React111.createElement(
|
|
7607
8160
|
ItemSelector,
|
|
7608
8161
|
{
|
|
7609
8162
|
itemsList: getItemList(),
|
|
@@ -7611,11 +8164,11 @@ var TransitionSelector = ({
|
|
|
7611
8164
|
onItemChange: handleTransitionPropertyChange,
|
|
7612
8165
|
onClose: popoverState.close,
|
|
7613
8166
|
sectionWidth: 268,
|
|
7614
|
-
title:
|
|
8167
|
+
title: __56("Transition Property", "elementor"),
|
|
7615
8168
|
icon: VariationsIcon,
|
|
7616
8169
|
disabledItems: includeCurrentValueInOptions(value, disabledItems),
|
|
7617
|
-
categoryItemContentTemplate: (item) => /* @__PURE__ */
|
|
7618
|
-
|
|
8170
|
+
categoryItemContentTemplate: (item) => /* @__PURE__ */ React111.createElement(
|
|
8171
|
+
Box25,
|
|
7619
8172
|
{
|
|
7620
8173
|
sx: {
|
|
7621
8174
|
display: "flex",
|
|
@@ -7624,13 +8177,13 @@ var TransitionSelector = ({
|
|
|
7624
8177
|
width: "100%"
|
|
7625
8178
|
}
|
|
7626
8179
|
},
|
|
7627
|
-
/* @__PURE__ */
|
|
7628
|
-
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */
|
|
8180
|
+
/* @__PURE__ */ React111.createElement("span", null, item.value),
|
|
8181
|
+
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */ React111.createElement(PromotionChip, null)
|
|
7629
8182
|
),
|
|
7630
|
-
footer: showPromotion ? /* @__PURE__ */
|
|
8183
|
+
footer: showPromotion ? /* @__PURE__ */ React111.createElement(
|
|
7631
8184
|
PromotionAlert,
|
|
7632
8185
|
{
|
|
7633
|
-
message:
|
|
8186
|
+
message: __56(
|
|
7634
8187
|
"Upgrade to customize transition properties and control effects.",
|
|
7635
8188
|
"elementor"
|
|
7636
8189
|
),
|
|
@@ -7669,8 +8222,8 @@ var areAllPropertiesUsed = (value = []) => {
|
|
|
7669
8222
|
};
|
|
7670
8223
|
var getSelectionSizeProps = (recentlyUsedList, disabledItems, showPromotion) => {
|
|
7671
8224
|
return {
|
|
7672
|
-
selectionLabel:
|
|
7673
|
-
sizeLabel:
|
|
8225
|
+
selectionLabel: __57("Type", "elementor"),
|
|
8226
|
+
sizeLabel: __57("Duration", "elementor"),
|
|
7674
8227
|
selectionConfig: {
|
|
7675
8228
|
component: TransitionSelector,
|
|
7676
8229
|
props: {
|
|
@@ -7746,7 +8299,7 @@ var getInitialValue = (values = []) => {
|
|
|
7746
8299
|
}
|
|
7747
8300
|
return initialTransitionValue;
|
|
7748
8301
|
};
|
|
7749
|
-
var disableAddItemTooltipContent = /* @__PURE__ */
|
|
8302
|
+
var disableAddItemTooltipContent = /* @__PURE__ */ React112.createElement(
|
|
7750
8303
|
Alert2,
|
|
7751
8304
|
{
|
|
7752
8305
|
sx: {
|
|
@@ -7754,10 +8307,10 @@ var disableAddItemTooltipContent = /* @__PURE__ */ React108.createElement(
|
|
|
7754
8307
|
gap: 0.5
|
|
7755
8308
|
},
|
|
7756
8309
|
color: "secondary",
|
|
7757
|
-
icon: /* @__PURE__ */
|
|
8310
|
+
icon: /* @__PURE__ */ React112.createElement(InfoCircleFilledIcon3, null)
|
|
7758
8311
|
},
|
|
7759
|
-
/* @__PURE__ */
|
|
7760
|
-
/* @__PURE__ */
|
|
8312
|
+
/* @__PURE__ */ React112.createElement(AlertTitle3, null, __57("Transitions", "elementor")),
|
|
8313
|
+
/* @__PURE__ */ React112.createElement(Box26, { component: "span" }, /* @__PURE__ */ React112.createElement(Typography10, { variant: "body2" }, __57("Switch to 'Normal' state to add a transition.", "elementor")))
|
|
7761
8314
|
);
|
|
7762
8315
|
var TransitionRepeaterControl = createControl(
|
|
7763
8316
|
({
|
|
@@ -7765,14 +8318,14 @@ var TransitionRepeaterControl = createControl(
|
|
|
7765
8318
|
currentStyleState
|
|
7766
8319
|
}) => {
|
|
7767
8320
|
const currentStyleIsNormal = currentStyleState === null;
|
|
7768
|
-
const [recentlyUsedList, setRecentlyUsedList] =
|
|
8321
|
+
const [recentlyUsedList, setRecentlyUsedList] = useState19([]);
|
|
7769
8322
|
const proInstalled = hasProInstalled2();
|
|
7770
8323
|
const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
7771
|
-
const { allDisabled: disabledItems, proDisabled: proDisabledItems } =
|
|
8324
|
+
const { allDisabled: disabledItems, proDisabled: proDisabledItems } = useMemo17(
|
|
7772
8325
|
() => getDisabledItemLabels(value),
|
|
7773
8326
|
[value]
|
|
7774
8327
|
);
|
|
7775
|
-
const allowedTransitionSet =
|
|
8328
|
+
const allowedTransitionSet = useMemo17(() => {
|
|
7776
8329
|
const set = /* @__PURE__ */ new Set();
|
|
7777
8330
|
transitionProperties.forEach((category) => {
|
|
7778
8331
|
category.properties.forEach((prop) => {
|
|
@@ -7798,15 +8351,15 @@ var TransitionRepeaterControl = createControl(
|
|
|
7798
8351
|
useEffect17(() => {
|
|
7799
8352
|
recentlyUsedListGetter().then(setRecentlyUsedList);
|
|
7800
8353
|
}, [recentlyUsedListGetter]);
|
|
7801
|
-
const allPropertiesUsed =
|
|
8354
|
+
const allPropertiesUsed = useMemo17(() => areAllPropertiesUsed(value), [value]);
|
|
7802
8355
|
const isAddItemDisabled = !currentStyleIsNormal || allPropertiesUsed;
|
|
7803
|
-
return /* @__PURE__ */
|
|
8356
|
+
return /* @__PURE__ */ React112.createElement(
|
|
7804
8357
|
RepeatableControl,
|
|
7805
8358
|
{
|
|
7806
|
-
label:
|
|
7807
|
-
repeaterLabel:
|
|
8359
|
+
label: __57("Transitions", "elementor"),
|
|
8360
|
+
repeaterLabel: __57("Transitions", "elementor"),
|
|
7808
8361
|
patternLabel: "${value.selection.value.key.value}: ${value.size.value.size}${value.size.value.unit}",
|
|
7809
|
-
placeholder:
|
|
8362
|
+
placeholder: __57("Empty Transition", "elementor"),
|
|
7810
8363
|
showDuplicate: false,
|
|
7811
8364
|
showToggle: true,
|
|
7812
8365
|
initialValues: getInitialValue(value),
|
|
@@ -7827,11 +8380,11 @@ var TransitionRepeaterControl = createControl(
|
|
|
7827
8380
|
);
|
|
7828
8381
|
|
|
7829
8382
|
// src/controls/date-time-control.tsx
|
|
7830
|
-
import * as
|
|
8383
|
+
import * as React113 from "react";
|
|
7831
8384
|
import * as dayjs from "dayjs";
|
|
7832
8385
|
import { isTransformable as isTransformable2, stringPropTypeUtil as stringPropTypeUtil20 } from "@elementor/editor-props";
|
|
7833
8386
|
import { DateTimePropTypeUtil } from "@elementor/editor-props";
|
|
7834
|
-
import { Box as
|
|
8387
|
+
import { Box as Box27, DatePicker, LocalizationProvider, TimePicker } from "@elementor/ui";
|
|
7835
8388
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
7836
8389
|
var TIME_FORMAT = "HH:mm";
|
|
7837
8390
|
var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
@@ -7875,7 +8428,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7875
8428
|
const base = dayjs.default();
|
|
7876
8429
|
return base.hour(h).minute(m).second(0).millisecond(0);
|
|
7877
8430
|
};
|
|
7878
|
-
return /* @__PURE__ */
|
|
8431
|
+
return /* @__PURE__ */ React113.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React113.createElement(ControlActions, null, /* @__PURE__ */ React113.createElement(LocalizationProvider, null, /* @__PURE__ */ React113.createElement(Box27, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React113.createElement(
|
|
7879
8432
|
DatePicker,
|
|
7880
8433
|
{
|
|
7881
8434
|
value: parseDateValue(stringPropTypeUtil20.extract(value?.date)),
|
|
@@ -7887,7 +8440,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7887
8440
|
openPickerIcon: { fontSize: "tiny" }
|
|
7888
8441
|
}
|
|
7889
8442
|
}
|
|
7890
|
-
)), /* @__PURE__ */
|
|
8443
|
+
)), /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React113.createElement(
|
|
7891
8444
|
TimePicker,
|
|
7892
8445
|
{
|
|
7893
8446
|
value: parseTimeValue(stringPropTypeUtil20.extract(value?.time)),
|
|
@@ -7903,13 +8456,13 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7903
8456
|
});
|
|
7904
8457
|
|
|
7905
8458
|
// src/controls/date-range-control.tsx
|
|
7906
|
-
import * as
|
|
8459
|
+
import * as React115 from "react";
|
|
7907
8460
|
import { dateRangePropTypeUtil, dateStringPropTypeUtil as dateStringPropTypeUtil2 } from "@elementor/editor-props";
|
|
7908
|
-
import { FormHelperText as FormHelperText2, Grid as Grid30, Stack as
|
|
7909
|
-
import { __ as
|
|
8461
|
+
import { FormHelperText as FormHelperText2, Grid as Grid30, Stack as Stack19 } from "@elementor/ui";
|
|
8462
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
7910
8463
|
|
|
7911
8464
|
// src/controls/date-string-control.tsx
|
|
7912
|
-
import * as
|
|
8465
|
+
import * as React114 from "react";
|
|
7913
8466
|
import { dateStringPropTypeUtil } from "@elementor/editor-props";
|
|
7914
8467
|
import { DatePicker as DatePicker2, LocalizationProvider as LocalizationProvider2 } from "@elementor/ui";
|
|
7915
8468
|
|
|
@@ -7968,7 +8521,7 @@ var DateStringControl = createControl(
|
|
|
7968
8521
|
}
|
|
7969
8522
|
setValue(newValue.format(format));
|
|
7970
8523
|
};
|
|
7971
|
-
return /* @__PURE__ */
|
|
8524
|
+
return /* @__PURE__ */ React114.createElement(LocalizationProvider2, null, /* @__PURE__ */ React114.createElement(ControlActions, null, /* @__PURE__ */ React114.createElement(
|
|
7972
8525
|
DatePicker2,
|
|
7973
8526
|
{
|
|
7974
8527
|
value: parseDateString(value ?? ""),
|
|
@@ -7982,8 +8535,8 @@ var DateStringControl = createControl(
|
|
|
7982
8535
|
|
|
7983
8536
|
// src/controls/date-range-control.tsx
|
|
7984
8537
|
var RANGE_LABELS = {
|
|
7985
|
-
min:
|
|
7986
|
-
max:
|
|
8538
|
+
min: __58("Min date", "elementor"),
|
|
8539
|
+
max: __58("Max date", "elementor")
|
|
7987
8540
|
};
|
|
7988
8541
|
var isMaxBeforeMin = (minIso, maxIso) => {
|
|
7989
8542
|
if (!minIso || !maxIso) {
|
|
@@ -7991,38 +8544,38 @@ var isMaxBeforeMin = (minIso, maxIso) => {
|
|
|
7991
8544
|
}
|
|
7992
8545
|
return maxIso < minIso;
|
|
7993
8546
|
};
|
|
7994
|
-
var RANGE_ERROR_MESSAGE =
|
|
8547
|
+
var RANGE_ERROR_MESSAGE = __58("Max date must be on or after Min date", "elementor");
|
|
7995
8548
|
var DateRangeControl = createControl(() => {
|
|
7996
8549
|
const { value, setValue, ...propContext } = useBoundProp(dateRangePropTypeUtil);
|
|
7997
8550
|
const minString = dateStringPropTypeUtil2.extract(value?.min);
|
|
7998
8551
|
const maxString = dateStringPropTypeUtil2.extract(value?.max);
|
|
7999
8552
|
const hasInvalidRange = isMaxBeforeMin(minString, maxString);
|
|
8000
|
-
return /* @__PURE__ */
|
|
8553
|
+
return /* @__PURE__ */ React115.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React115.createElement(Stack19, { gap: 0.75 }, /* @__PURE__ */ React115.createElement(Stack19, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React115.createElement(Grid30, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React115.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(ControlFormLabel, null, RANGE_LABELS.min)), /* @__PURE__ */ React115.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(
|
|
8001
8554
|
BoundDateStringControl,
|
|
8002
8555
|
{
|
|
8003
8556
|
bind: "min",
|
|
8004
8557
|
ariaLabel: RANGE_LABELS.min,
|
|
8005
8558
|
error: hasInvalidRange
|
|
8006
8559
|
}
|
|
8007
|
-
))), /* @__PURE__ */
|
|
8560
|
+
))), /* @__PURE__ */ React115.createElement(Grid30, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React115.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(ControlFormLabel, null, RANGE_LABELS.max)), /* @__PURE__ */ React115.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(
|
|
8008
8561
|
BoundDateStringControl,
|
|
8009
8562
|
{
|
|
8010
8563
|
bind: "max",
|
|
8011
8564
|
ariaLabel: RANGE_LABELS.max,
|
|
8012
8565
|
error: hasInvalidRange
|
|
8013
8566
|
}
|
|
8014
|
-
)))), hasInvalidRange && /* @__PURE__ */
|
|
8567
|
+
)))), hasInvalidRange && /* @__PURE__ */ React115.createElement(FormHelperText2, { error: true }, RANGE_ERROR_MESSAGE)));
|
|
8015
8568
|
});
|
|
8016
8569
|
var BoundDateStringControl = ({
|
|
8017
8570
|
bind,
|
|
8018
8571
|
ariaLabel,
|
|
8019
8572
|
error
|
|
8020
8573
|
}) => {
|
|
8021
|
-
return /* @__PURE__ */
|
|
8574
|
+
return /* @__PURE__ */ React115.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React115.createElement(DateStringControl, { ariaLabel, error, coerceInvalidToNull: true }));
|
|
8022
8575
|
};
|
|
8023
8576
|
|
|
8024
8577
|
// src/controls/time-string-control.tsx
|
|
8025
|
-
import * as
|
|
8578
|
+
import * as React116 from "react";
|
|
8026
8579
|
import { timeStringPropTypeUtil } from "@elementor/editor-props";
|
|
8027
8580
|
import { LocalizationProvider as LocalizationProvider3, TimePicker as TimePicker2 } from "@elementor/ui";
|
|
8028
8581
|
var TimeStringControl = createControl(
|
|
@@ -8050,7 +8603,7 @@ var TimeStringControl = createControl(
|
|
|
8050
8603
|
}
|
|
8051
8604
|
setValue(newValue.format(format));
|
|
8052
8605
|
};
|
|
8053
|
-
return /* @__PURE__ */
|
|
8606
|
+
return /* @__PURE__ */ React116.createElement(LocalizationProvider3, null, /* @__PURE__ */ React116.createElement(ControlActions, null, /* @__PURE__ */ React116.createElement(
|
|
8054
8607
|
TimePicker2,
|
|
8055
8608
|
{
|
|
8056
8609
|
value: parseTimeString(value ?? ""),
|
|
@@ -8063,38 +8616,38 @@ var TimeStringControl = createControl(
|
|
|
8063
8616
|
);
|
|
8064
8617
|
|
|
8065
8618
|
// src/controls/time-range-control.tsx
|
|
8066
|
-
import * as
|
|
8619
|
+
import * as React117 from "react";
|
|
8067
8620
|
import { timeRangePropTypeUtil } from "@elementor/editor-props";
|
|
8068
|
-
import { Grid as Grid31, Stack as
|
|
8069
|
-
import { __ as
|
|
8621
|
+
import { Grid as Grid31, Stack as Stack20 } from "@elementor/ui";
|
|
8622
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
8070
8623
|
var RANGE_LABELS2 = {
|
|
8071
|
-
min:
|
|
8072
|
-
max:
|
|
8624
|
+
min: __59("Start time", "elementor"),
|
|
8625
|
+
max: __59("End time", "elementor")
|
|
8073
8626
|
};
|
|
8074
8627
|
var TimeRangeControl = createControl(() => {
|
|
8075
8628
|
const { value, setValue, ...propContext } = useBoundProp(timeRangePropTypeUtil);
|
|
8076
|
-
return /* @__PURE__ */
|
|
8629
|
+
return /* @__PURE__ */ React117.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React117.createElement(Stack20, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React117.createElement(Grid31, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React117.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(ControlFormLabel, null, RANGE_LABELS2.min)), /* @__PURE__ */ React117.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(BoundTimeStringControl, { bind: "min", ariaLabel: RANGE_LABELS2.min }))), /* @__PURE__ */ React117.createElement(Grid31, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React117.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(ControlFormLabel, null, RANGE_LABELS2.max)), /* @__PURE__ */ React117.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(BoundTimeStringControl, { bind: "max", ariaLabel: RANGE_LABELS2.max })))));
|
|
8077
8630
|
});
|
|
8078
8631
|
var BoundTimeStringControl = ({ bind, ariaLabel }) => {
|
|
8079
|
-
return /* @__PURE__ */
|
|
8632
|
+
return /* @__PURE__ */ React117.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React117.createElement(TimeStringControl, { ariaLabel, coerceInvalidToNull: true }));
|
|
8080
8633
|
};
|
|
8081
8634
|
|
|
8082
8635
|
// src/controls/inline-editing-control.tsx
|
|
8083
|
-
import * as
|
|
8084
|
-
import { useCallback as useCallback4, useState as
|
|
8636
|
+
import * as React121 from "react";
|
|
8637
|
+
import { useCallback as useCallback4, useState as useState21 } from "react";
|
|
8085
8638
|
import { escapedHtmlPropTypeUtil as escapedHtmlPropTypeUtil2 } from "@elementor/editor-props";
|
|
8086
|
-
import { Box as
|
|
8639
|
+
import { Box as Box30 } from "@elementor/ui";
|
|
8087
8640
|
|
|
8088
8641
|
// src/components/inline-editor.tsx
|
|
8089
|
-
import * as
|
|
8090
|
-
import { useEffect as useEffect18, useRef as
|
|
8091
|
-
import { Box as
|
|
8642
|
+
import * as React118 from "react";
|
|
8643
|
+
import { useEffect as useEffect18, useRef as useRef29 } from "react";
|
|
8644
|
+
import { Box as Box28 } from "@elementor/ui";
|
|
8092
8645
|
import Bold from "@tiptap/extension-bold";
|
|
8093
8646
|
import Document from "@tiptap/extension-document";
|
|
8094
8647
|
import HardBreak from "@tiptap/extension-hard-break";
|
|
8095
8648
|
import Heading from "@tiptap/extension-heading";
|
|
8096
8649
|
import Italic from "@tiptap/extension-italic";
|
|
8097
|
-
import
|
|
8650
|
+
import Link4 from "@tiptap/extension-link";
|
|
8098
8651
|
import Paragraph from "@tiptap/extension-paragraph";
|
|
8099
8652
|
import Strike from "@tiptap/extension-strike";
|
|
8100
8653
|
import Subscript from "@tiptap/extension-subscript";
|
|
@@ -8133,7 +8686,7 @@ function extractInlineHtmlContent(propValue) {
|
|
|
8133
8686
|
var ITALIC_KEYBOARD_SHORTCUT = "i";
|
|
8134
8687
|
var BOLD_KEYBOARD_SHORTCUT = "b";
|
|
8135
8688
|
var UNDERLINE_KEYBOARD_SHORTCUT = "u";
|
|
8136
|
-
var InlineEditor =
|
|
8689
|
+
var InlineEditor = React118.forwardRef((props, ref) => {
|
|
8137
8690
|
const {
|
|
8138
8691
|
value,
|
|
8139
8692
|
setValue,
|
|
@@ -8150,8 +8703,8 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8150
8703
|
onSelectionEnd,
|
|
8151
8704
|
mountElement = null
|
|
8152
8705
|
} = props;
|
|
8153
|
-
const containerRef =
|
|
8154
|
-
const onBlurRef =
|
|
8706
|
+
const containerRef = useRef29(null);
|
|
8707
|
+
const onBlurRef = useRef29(onBlur);
|
|
8155
8708
|
onBlurRef.current = onBlur;
|
|
8156
8709
|
const documentContentSettings = !!expectedTag ? "block+" : "inline*";
|
|
8157
8710
|
const onUpdate = ({ editor: updatedEditor }) => {
|
|
@@ -8196,7 +8749,7 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8196
8749
|
}).configure({
|
|
8197
8750
|
levels: [1, 2, 3, 4, 5, 6]
|
|
8198
8751
|
}),
|
|
8199
|
-
|
|
8752
|
+
Link4.configure({
|
|
8200
8753
|
openOnClick: false
|
|
8201
8754
|
}),
|
|
8202
8755
|
Text,
|
|
@@ -8246,10 +8799,10 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8246
8799
|
if (mountElement) {
|
|
8247
8800
|
return null;
|
|
8248
8801
|
}
|
|
8249
|
-
return /* @__PURE__ */
|
|
8802
|
+
return /* @__PURE__ */ React118.createElement(Box28, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React118.createElement(EditorContent, { ref, editor }));
|
|
8250
8803
|
});
|
|
8251
8804
|
var useOnUpdate = (callback, dependencies) => {
|
|
8252
|
-
const hasMounted =
|
|
8805
|
+
const hasMounted = useRef29(false);
|
|
8253
8806
|
useEffect18(() => {
|
|
8254
8807
|
if (hasMounted.current) {
|
|
8255
8808
|
callback();
|
|
@@ -8260,8 +8813,8 @@ var useOnUpdate = (callback, dependencies) => {
|
|
|
8260
8813
|
};
|
|
8261
8814
|
|
|
8262
8815
|
// src/components/inline-editor-toolbar.tsx
|
|
8263
|
-
import * as
|
|
8264
|
-
import { useEffect as useEffect20, useMemo as
|
|
8816
|
+
import * as React120 from "react";
|
|
8817
|
+
import { useEffect as useEffect20, useMemo as useMemo18, useRef as useRef31, useState as useState20 } from "react";
|
|
8265
8818
|
import { getContainer as getContainer2, getElementSetting } from "@elementor/editor-elements";
|
|
8266
8819
|
import {
|
|
8267
8820
|
BoldIcon,
|
|
@@ -8274,23 +8827,23 @@ import {
|
|
|
8274
8827
|
UnderlineIcon
|
|
8275
8828
|
} from "@elementor/icons";
|
|
8276
8829
|
import {
|
|
8277
|
-
Box as
|
|
8830
|
+
Box as Box29,
|
|
8278
8831
|
IconButton as IconButton9,
|
|
8279
8832
|
ToggleButton as ToggleButton3,
|
|
8280
8833
|
ToggleButtonGroup as ToggleButtonGroup2,
|
|
8281
8834
|
toggleButtonGroupClasses,
|
|
8282
8835
|
Tooltip as Tooltip10,
|
|
8283
|
-
usePopupState as
|
|
8836
|
+
usePopupState as usePopupState11
|
|
8284
8837
|
} from "@elementor/ui";
|
|
8285
8838
|
import { useEditorState } from "@tiptap/react";
|
|
8286
|
-
import { __ as
|
|
8839
|
+
import { __ as __61 } from "@wordpress/i18n";
|
|
8287
8840
|
|
|
8288
8841
|
// src/components/url-popover.tsx
|
|
8289
|
-
import * as
|
|
8290
|
-
import { useEffect as useEffect19, useRef as
|
|
8842
|
+
import * as React119 from "react";
|
|
8843
|
+
import { useEffect as useEffect19, useRef as useRef30 } from "react";
|
|
8291
8844
|
import { ExternalLinkIcon } from "@elementor/icons";
|
|
8292
|
-
import { bindPopover as bindPopover8, Popover as
|
|
8293
|
-
import { __ as
|
|
8845
|
+
import { bindPopover as bindPopover8, Popover as Popover9, Stack as Stack21, TextField as TextField11, ToggleButton as ToggleButton2, Tooltip as Tooltip9 } from "@elementor/ui";
|
|
8846
|
+
import { __ as __60 } from "@wordpress/i18n";
|
|
8294
8847
|
var UrlPopover = ({
|
|
8295
8848
|
popupState,
|
|
8296
8849
|
restoreValue,
|
|
@@ -8300,7 +8853,7 @@ var UrlPopover = ({
|
|
|
8300
8853
|
openInNewTab,
|
|
8301
8854
|
onToggleNewTab
|
|
8302
8855
|
}) => {
|
|
8303
|
-
const inputRef =
|
|
8856
|
+
const inputRef = useRef30(null);
|
|
8304
8857
|
useEffect19(() => {
|
|
8305
8858
|
if (popupState.isOpen) {
|
|
8306
8859
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
@@ -8310,8 +8863,8 @@ var UrlPopover = ({
|
|
|
8310
8863
|
restoreValue();
|
|
8311
8864
|
popupState.close();
|
|
8312
8865
|
};
|
|
8313
|
-
return /* @__PURE__ */
|
|
8314
|
-
|
|
8866
|
+
return /* @__PURE__ */ React119.createElement(
|
|
8867
|
+
Popover9,
|
|
8315
8868
|
{
|
|
8316
8869
|
slotProps: {
|
|
8317
8870
|
paper: { sx: { borderRadius: "16px", width: anchorRef.current?.offsetWidth + "px", marginTop: -1 } }
|
|
@@ -8321,30 +8874,30 @@ var UrlPopover = ({
|
|
|
8321
8874
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
8322
8875
|
onClose: handleClose
|
|
8323
8876
|
},
|
|
8324
|
-
/* @__PURE__ */
|
|
8877
|
+
/* @__PURE__ */ React119.createElement(Stack21, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React119.createElement(
|
|
8325
8878
|
TextField11,
|
|
8326
8879
|
{
|
|
8327
8880
|
value,
|
|
8328
8881
|
onChange,
|
|
8329
8882
|
size: "tiny",
|
|
8330
8883
|
fullWidth: true,
|
|
8331
|
-
placeholder:
|
|
8884
|
+
placeholder: __60("Type a URL", "elementor"),
|
|
8332
8885
|
inputProps: { ref: inputRef },
|
|
8333
8886
|
color: "secondary",
|
|
8334
8887
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
8335
8888
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
8336
8889
|
}
|
|
8337
|
-
), /* @__PURE__ */
|
|
8890
|
+
), /* @__PURE__ */ React119.createElement(Tooltip9, { title: __60("Open in a new tab", "elementor") }, /* @__PURE__ */ React119.createElement(
|
|
8338
8891
|
ToggleButton2,
|
|
8339
8892
|
{
|
|
8340
8893
|
size: "tiny",
|
|
8341
8894
|
value: "newTab",
|
|
8342
8895
|
selected: openInNewTab,
|
|
8343
8896
|
onClick: onToggleNewTab,
|
|
8344
|
-
"aria-label":
|
|
8897
|
+
"aria-label": __60("Open in a new tab", "elementor"),
|
|
8345
8898
|
sx: { borderRadius: "8px" }
|
|
8346
8899
|
},
|
|
8347
|
-
/* @__PURE__ */
|
|
8900
|
+
/* @__PURE__ */ React119.createElement(ExternalLinkIcon, { fontSize: "tiny" })
|
|
8348
8901
|
)))
|
|
8349
8902
|
);
|
|
8350
8903
|
};
|
|
@@ -8356,16 +8909,16 @@ var InlineEditorToolbar = ({
|
|
|
8356
8909
|
sx = {},
|
|
8357
8910
|
inControlPanel = false
|
|
8358
8911
|
}) => {
|
|
8359
|
-
const [urlValue, setUrlValue] =
|
|
8360
|
-
const [openInNewTab, setOpenInNewTab] =
|
|
8361
|
-
const toolbarRef =
|
|
8362
|
-
const linkPopupState =
|
|
8912
|
+
const [urlValue, setUrlValue] = useState20("");
|
|
8913
|
+
const [openInNewTab, setOpenInNewTab] = useState20(false);
|
|
8914
|
+
const toolbarRef = useRef31(null);
|
|
8915
|
+
const linkPopupState = usePopupState11({ variant: "popover" });
|
|
8363
8916
|
const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
|
|
8364
8917
|
const editorState = useEditorState({
|
|
8365
8918
|
editor,
|
|
8366
8919
|
selector: (ctx) => possibleFormats.filter((format) => ctx.editor.isActive(format))
|
|
8367
8920
|
});
|
|
8368
|
-
const formatButtonsList =
|
|
8921
|
+
const formatButtonsList = useMemo18(() => {
|
|
8369
8922
|
const buttons = Object.values(formatButtons);
|
|
8370
8923
|
if (isElementClickable) {
|
|
8371
8924
|
return buttons.filter((button) => button.action !== "link");
|
|
@@ -8407,8 +8960,8 @@ var InlineEditorToolbar = ({
|
|
|
8407
8960
|
editor?.commands?.focus();
|
|
8408
8961
|
}
|
|
8409
8962
|
}, [editor, inControlPanel]);
|
|
8410
|
-
return /* @__PURE__ */
|
|
8411
|
-
|
|
8963
|
+
return /* @__PURE__ */ React120.createElement(
|
|
8964
|
+
Box29,
|
|
8412
8965
|
{
|
|
8413
8966
|
ref: toolbarRef,
|
|
8414
8967
|
sx: {
|
|
@@ -8441,8 +8994,8 @@ var InlineEditorToolbar = ({
|
|
|
8441
8994
|
}
|
|
8442
8995
|
}
|
|
8443
8996
|
},
|
|
8444
|
-
/* @__PURE__ */
|
|
8445
|
-
/* @__PURE__ */
|
|
8997
|
+
/* @__PURE__ */ React120.createElement(Tooltip10, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React120.createElement(IconButton9, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
8998
|
+
/* @__PURE__ */ React120.createElement(
|
|
8446
8999
|
ToggleButtonGroup2,
|
|
8447
9000
|
{
|
|
8448
9001
|
value: editorState,
|
|
@@ -8472,7 +9025,7 @@ var InlineEditorToolbar = ({
|
|
|
8472
9025
|
}
|
|
8473
9026
|
}
|
|
8474
9027
|
},
|
|
8475
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
9028
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React120.createElement(Tooltip10, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React120.createElement(
|
|
8476
9029
|
ToggleButton3,
|
|
8477
9030
|
{
|
|
8478
9031
|
value: button.action,
|
|
@@ -8490,7 +9043,7 @@ var InlineEditorToolbar = ({
|
|
|
8490
9043
|
button.icon
|
|
8491
9044
|
)))
|
|
8492
9045
|
),
|
|
8493
|
-
/* @__PURE__ */
|
|
9046
|
+
/* @__PURE__ */ React120.createElement(
|
|
8494
9047
|
UrlPopover,
|
|
8495
9048
|
{
|
|
8496
9049
|
popupState: linkPopupState,
|
|
@@ -8513,64 +9066,64 @@ var checkIfElementIsClickable = (elementId) => {
|
|
|
8513
9066
|
};
|
|
8514
9067
|
var toolbarButtons = {
|
|
8515
9068
|
clear: {
|
|
8516
|
-
label:
|
|
8517
|
-
icon: /* @__PURE__ */
|
|
9069
|
+
label: __61("Clear", "elementor"),
|
|
9070
|
+
icon: /* @__PURE__ */ React120.createElement(MinusIcon2, { fontSize: "tiny" }),
|
|
8518
9071
|
action: "clear",
|
|
8519
9072
|
method: (editor) => {
|
|
8520
9073
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
8521
9074
|
}
|
|
8522
9075
|
},
|
|
8523
9076
|
bold: {
|
|
8524
|
-
label:
|
|
8525
|
-
icon: /* @__PURE__ */
|
|
9077
|
+
label: __61("Bold", "elementor"),
|
|
9078
|
+
icon: /* @__PURE__ */ React120.createElement(BoldIcon, { fontSize: "tiny" }),
|
|
8526
9079
|
action: "bold",
|
|
8527
9080
|
method: (editor) => {
|
|
8528
9081
|
editor.chain().focus().toggleBold().run();
|
|
8529
9082
|
}
|
|
8530
9083
|
},
|
|
8531
9084
|
italic: {
|
|
8532
|
-
label:
|
|
8533
|
-
icon: /* @__PURE__ */
|
|
9085
|
+
label: __61("Italic", "elementor"),
|
|
9086
|
+
icon: /* @__PURE__ */ React120.createElement(ItalicIcon, { fontSize: "tiny" }),
|
|
8534
9087
|
action: "italic",
|
|
8535
9088
|
method: (editor) => {
|
|
8536
9089
|
editor.chain().focus().toggleItalic().run();
|
|
8537
9090
|
}
|
|
8538
9091
|
},
|
|
8539
9092
|
underline: {
|
|
8540
|
-
label:
|
|
8541
|
-
icon: /* @__PURE__ */
|
|
9093
|
+
label: __61("Underline", "elementor"),
|
|
9094
|
+
icon: /* @__PURE__ */ React120.createElement(UnderlineIcon, { fontSize: "tiny" }),
|
|
8542
9095
|
action: "underline",
|
|
8543
9096
|
method: (editor) => {
|
|
8544
9097
|
editor.chain().focus().toggleUnderline().run();
|
|
8545
9098
|
}
|
|
8546
9099
|
},
|
|
8547
9100
|
strike: {
|
|
8548
|
-
label:
|
|
8549
|
-
icon: /* @__PURE__ */
|
|
9101
|
+
label: __61("Strikethrough", "elementor"),
|
|
9102
|
+
icon: /* @__PURE__ */ React120.createElement(StrikethroughIcon, { fontSize: "tiny" }),
|
|
8550
9103
|
action: "strike",
|
|
8551
9104
|
method: (editor) => {
|
|
8552
9105
|
editor.chain().focus().toggleStrike().run();
|
|
8553
9106
|
}
|
|
8554
9107
|
},
|
|
8555
9108
|
superscript: {
|
|
8556
|
-
label:
|
|
8557
|
-
icon: /* @__PURE__ */
|
|
9109
|
+
label: __61("Superscript", "elementor"),
|
|
9110
|
+
icon: /* @__PURE__ */ React120.createElement(SuperscriptIcon, { fontSize: "tiny" }),
|
|
8558
9111
|
action: "superscript",
|
|
8559
9112
|
method: (editor) => {
|
|
8560
9113
|
editor.chain().focus().toggleSuperscript().run();
|
|
8561
9114
|
}
|
|
8562
9115
|
},
|
|
8563
9116
|
subscript: {
|
|
8564
|
-
label:
|
|
8565
|
-
icon: /* @__PURE__ */
|
|
9117
|
+
label: __61("Subscript", "elementor"),
|
|
9118
|
+
icon: /* @__PURE__ */ React120.createElement(SubscriptIcon, { fontSize: "tiny" }),
|
|
8566
9119
|
action: "subscript",
|
|
8567
9120
|
method: (editor) => {
|
|
8568
9121
|
editor.chain().focus().toggleSubscript().run();
|
|
8569
9122
|
}
|
|
8570
9123
|
},
|
|
8571
9124
|
link: {
|
|
8572
|
-
label:
|
|
8573
|
-
icon: /* @__PURE__ */
|
|
9125
|
+
label: __61("Link", "elementor"),
|
|
9126
|
+
icon: /* @__PURE__ */ React120.createElement(LinkIcon3, { fontSize: "tiny" }),
|
|
8574
9127
|
action: "link",
|
|
8575
9128
|
method: null
|
|
8576
9129
|
}
|
|
@@ -8583,7 +9136,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8583
9136
|
const { setValue, placeholder, value } = useBoundProp(escapedHtmlPropTypeUtil2);
|
|
8584
9137
|
const { value: rawValue } = usePropKeyContext();
|
|
8585
9138
|
const content = value ?? extractInlineHtmlContent(rawValue);
|
|
8586
|
-
const [editor, setEditor] =
|
|
9139
|
+
const [editor, setEditor] = useState21(null);
|
|
8587
9140
|
const handleChange = useCallback4(
|
|
8588
9141
|
(newValue) => {
|
|
8589
9142
|
const html = newValue ?? "";
|
|
@@ -8591,7 +9144,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8591
9144
|
},
|
|
8592
9145
|
[setValue]
|
|
8593
9146
|
);
|
|
8594
|
-
return /* @__PURE__ */
|
|
9147
|
+
return /* @__PURE__ */ React121.createElement(ControlActions, null, /* @__PURE__ */ React121.createElement(Box30, { sx: { position: "relative" } }, editor && editor.isEditable && /* @__PURE__ */ React121.createElement(
|
|
8595
9148
|
InlineEditorToolbar,
|
|
8596
9149
|
{
|
|
8597
9150
|
editor,
|
|
@@ -8604,8 +9157,8 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8604
9157
|
}),
|
|
8605
9158
|
inControlPanel: true
|
|
8606
9159
|
}
|
|
8607
|
-
), /* @__PURE__ */
|
|
8608
|
-
|
|
9160
|
+
), /* @__PURE__ */ React121.createElement(
|
|
9161
|
+
Box30,
|
|
8609
9162
|
{
|
|
8610
9163
|
sx: (theme) => ({
|
|
8611
9164
|
p: 0.8,
|
|
@@ -8649,7 +9202,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8649
9202
|
...attributes,
|
|
8650
9203
|
...props
|
|
8651
9204
|
},
|
|
8652
|
-
/* @__PURE__ */
|
|
9205
|
+
/* @__PURE__ */ React121.createElement(
|
|
8653
9206
|
InlineEditor,
|
|
8654
9207
|
{
|
|
8655
9208
|
value: content,
|
|
@@ -8666,17 +9219,17 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8666
9219
|
});
|
|
8667
9220
|
|
|
8668
9221
|
// src/controls/email-form-action-control/index.tsx
|
|
8669
|
-
import * as
|
|
9222
|
+
import * as React125 from "react";
|
|
8670
9223
|
import { emailsPropTypeUtil } from "@elementor/editor-props";
|
|
8671
9224
|
import { CollapsibleContent } from "@elementor/editor-ui";
|
|
8672
|
-
import { Box as
|
|
8673
|
-
import { __ as
|
|
9225
|
+
import { Box as Box31, Divider as Divider6, Stack as Stack23 } from "@elementor/ui";
|
|
9226
|
+
import { __ as __63 } from "@wordpress/i18n";
|
|
8674
9227
|
|
|
8675
9228
|
// src/controls/email-form-action-control/fields.tsx
|
|
8676
|
-
import * as
|
|
9229
|
+
import * as React124 from "react";
|
|
8677
9230
|
import { InfoAlert as InfoAlert2 } from "@elementor/editor-ui";
|
|
8678
|
-
import { Grid as Grid34, Stack as
|
|
8679
|
-
import { __ as
|
|
9231
|
+
import { Grid as Grid34, Stack as Stack22 } from "@elementor/ui";
|
|
9232
|
+
import { __ as __62 } from "@wordpress/i18n";
|
|
8680
9233
|
|
|
8681
9234
|
// src/hooks/use-form-field-suggestions.ts
|
|
8682
9235
|
import { getContainer as getContainer3, getSelectedElements as getSelectedElements3, getWidgetsCache } from "@elementor/editor-elements";
|
|
@@ -8765,8 +9318,8 @@ function useFormFieldSuggestions(options) {
|
|
|
8765
9318
|
}
|
|
8766
9319
|
|
|
8767
9320
|
// src/controls/email-form-action-control/email-chips-field.tsx
|
|
8768
|
-
import * as
|
|
8769
|
-
import { useMemo as
|
|
9321
|
+
import * as React122 from "react";
|
|
9322
|
+
import { useMemo as useMemo19, useState as useState22 } from "react";
|
|
8770
9323
|
import { stringArrayPropTypeUtil as stringArrayPropTypeUtil3, stringPropTypeUtil as stringPropTypeUtil23 } from "@elementor/editor-props";
|
|
8771
9324
|
import { Autocomplete as Autocomplete4, Grid as Grid32, TextField as TextField12 } from "@elementor/ui";
|
|
8772
9325
|
|
|
@@ -8804,10 +9357,10 @@ function resolveMention(raw, suggestions) {
|
|
|
8804
9357
|
}
|
|
8805
9358
|
var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
8806
9359
|
const { value, setValue, disabled } = useBoundProp(stringArrayPropTypeUtil3);
|
|
8807
|
-
const [inputValue, setInputValue] =
|
|
9360
|
+
const [inputValue, setInputValue] = useState22("");
|
|
8808
9361
|
const items2 = value || [];
|
|
8809
9362
|
const selectedValues = items2.map((item) => stringPropTypeUtil23.extract(item)).filter((val) => val !== null);
|
|
8810
|
-
const suggestionOptions =
|
|
9363
|
+
const suggestionOptions = useMemo19(
|
|
8811
9364
|
() => suggestions.map((suggestion) => `[${suggestion.value}]`),
|
|
8812
9365
|
[suggestions]
|
|
8813
9366
|
);
|
|
@@ -8842,7 +9395,7 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8842
9395
|
tryAddChip(inputValue);
|
|
8843
9396
|
}
|
|
8844
9397
|
};
|
|
8845
|
-
return /* @__PURE__ */
|
|
9398
|
+
return /* @__PURE__ */ React122.createElement(ControlActions, null, /* @__PURE__ */ React122.createElement(
|
|
8846
9399
|
Autocomplete4,
|
|
8847
9400
|
{
|
|
8848
9401
|
fullWidth: true,
|
|
@@ -8867,99 +9420,99 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8867
9420
|
onBlur: handleBlur,
|
|
8868
9421
|
getOptionLabel: (option) => option,
|
|
8869
9422
|
isOptionEqualToValue: (option, val) => option === val,
|
|
8870
|
-
renderInput: (params) => /* @__PURE__ */
|
|
8871
|
-
renderTags: (tagValues, getTagProps) => /* @__PURE__ */
|
|
9423
|
+
renderInput: (params) => /* @__PURE__ */ React122.createElement(TextField12, { ...params, placeholder, onKeyDown: handleKeyDown }),
|
|
9424
|
+
renderTags: (tagValues, getTagProps) => /* @__PURE__ */ React122.createElement(ChipsList, { getLabel: (option) => option, getTagProps, values: tagValues })
|
|
8872
9425
|
}
|
|
8873
9426
|
));
|
|
8874
9427
|
});
|
|
8875
|
-
var EmailChipsField = ({ fieldLabel, placeholder, suggestions }) => /* @__PURE__ */
|
|
9428
|
+
var EmailChipsField = ({ fieldLabel, placeholder, suggestions }) => /* @__PURE__ */ React122.createElement(Grid32, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React122.createElement(Grid32, { item: true }, /* @__PURE__ */ React122.createElement(ControlFormLabel, null, fieldLabel)), /* @__PURE__ */ React122.createElement(Grid32, { item: true }, /* @__PURE__ */ React122.createElement(EmailChipsControl, { placeholder, suggestions })));
|
|
8876
9429
|
|
|
8877
9430
|
// src/controls/email-form-action-control/email-field.tsx
|
|
8878
|
-
import * as
|
|
9431
|
+
import * as React123 from "react";
|
|
8879
9432
|
import { Grid as Grid33 } from "@elementor/ui";
|
|
8880
|
-
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */
|
|
9433
|
+
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React123.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React123.createElement(Grid33, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React123.createElement(Grid33, { item: true }, /* @__PURE__ */ React123.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React123.createElement(Grid33, { item: true }, /* @__PURE__ */ React123.createElement(TextControl, { placeholder }))));
|
|
8881
9434
|
|
|
8882
9435
|
// src/controls/email-form-action-control/fields.tsx
|
|
8883
9436
|
var SendToField = ({ placeholder }) => {
|
|
8884
9437
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8885
|
-
return /* @__PURE__ */
|
|
9438
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "to" }, /* @__PURE__ */ React124.createElement(Stack22, { gap: 0.5 }, /* @__PURE__ */ React124.createElement(
|
|
8886
9439
|
EmailChipsField,
|
|
8887
9440
|
{
|
|
8888
|
-
fieldLabel:
|
|
9441
|
+
fieldLabel: __62("Send to", "elementor"),
|
|
8889
9442
|
placeholder,
|
|
8890
9443
|
suggestions
|
|
8891
9444
|
}
|
|
8892
|
-
), shouldShowMentionsInfo() && /* @__PURE__ */
|
|
9445
|
+
), shouldShowMentionsInfo() && /* @__PURE__ */ React124.createElement(InfoAlert2, null, __62("Type @ or an email field name to insert its submitted value.", "elementor"))));
|
|
8893
9446
|
};
|
|
8894
|
-
var SubjectField = () => /* @__PURE__ */
|
|
9447
|
+
var SubjectField = () => /* @__PURE__ */ React124.createElement(
|
|
8895
9448
|
EmailField,
|
|
8896
9449
|
{
|
|
8897
9450
|
bind: "subject",
|
|
8898
|
-
label:
|
|
8899
|
-
placeholder:
|
|
9451
|
+
label: __62("Email subject", "elementor"),
|
|
9452
|
+
placeholder: __62("New form submission", "elementor")
|
|
8900
9453
|
}
|
|
8901
9454
|
);
|
|
8902
9455
|
var MessageField = () => {
|
|
8903
9456
|
const suggestions = useFormFieldSuggestions();
|
|
8904
|
-
return /* @__PURE__ */
|
|
9457
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "message" }, /* @__PURE__ */ React124.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, __62("Message", "elementor"))), /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(MentionTextAreaControl, { suggestions })), /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(InfoAlert2, null, shouldShowMentionsInfo() ? __62(
|
|
8905
9458
|
"[all-fields] shortcode sends all fields. Type @ to insert specific fields and customize your message.",
|
|
8906
9459
|
"elementor"
|
|
8907
|
-
) :
|
|
9460
|
+
) : __62("[all-fields] shortcode sends all fields.", "elementor")))));
|
|
8908
9461
|
};
|
|
8909
|
-
var FromEmailField = () => /* @__PURE__ */
|
|
9462
|
+
var FromEmailField = () => /* @__PURE__ */ React124.createElement(
|
|
8910
9463
|
EmailField,
|
|
8911
9464
|
{
|
|
8912
9465
|
bind: "from",
|
|
8913
|
-
label:
|
|
8914
|
-
placeholder:
|
|
9466
|
+
label: __62("From email", "elementor"),
|
|
9467
|
+
placeholder: __62("What email should appear as the sender?", "elementor")
|
|
8915
9468
|
}
|
|
8916
9469
|
);
|
|
8917
|
-
var FromNameField = () => /* @__PURE__ */
|
|
9470
|
+
var FromNameField = () => /* @__PURE__ */ React124.createElement(
|
|
8918
9471
|
EmailField,
|
|
8919
9472
|
{
|
|
8920
9473
|
bind: "from-name",
|
|
8921
|
-
label:
|
|
8922
|
-
placeholder:
|
|
9474
|
+
label: __62("From name", "elementor"),
|
|
9475
|
+
placeholder: __62("What name should appear as the sender?", "elementor")
|
|
8923
9476
|
}
|
|
8924
9477
|
);
|
|
8925
9478
|
var ReplyToField = () => {
|
|
8926
9479
|
const emailSuggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8927
|
-
return /* @__PURE__ */
|
|
9480
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "reply-to" }, /* @__PURE__ */ React124.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, __62("Reply-to", "elementor"))), /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(
|
|
8928
9481
|
MentionTextAreaControl,
|
|
8929
9482
|
{
|
|
8930
9483
|
suggestions: emailSuggestions,
|
|
8931
9484
|
rows: 1,
|
|
8932
9485
|
triggerPosition: "start",
|
|
8933
|
-
placeholder:
|
|
9486
|
+
placeholder: __62("You can type @ to insert an email field", "elementor")
|
|
8934
9487
|
}
|
|
8935
9488
|
))));
|
|
8936
9489
|
};
|
|
8937
9490
|
var CcField = () => {
|
|
8938
9491
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8939
|
-
return /* @__PURE__ */
|
|
9492
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "cc" }, /* @__PURE__ */ React124.createElement(EmailChipsField, { fieldLabel: __62("Cc", "elementor"), suggestions }));
|
|
8940
9493
|
};
|
|
8941
9494
|
var BccField = () => {
|
|
8942
9495
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8943
|
-
return /* @__PURE__ */
|
|
9496
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "bcc" }, /* @__PURE__ */ React124.createElement(EmailChipsField, { fieldLabel: __62("Bcc", "elementor"), suggestions }));
|
|
8944
9497
|
};
|
|
8945
|
-
var MetaDataField = () => /* @__PURE__ */
|
|
9498
|
+
var MetaDataField = () => /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "meta-data" }, /* @__PURE__ */ React124.createElement(Stack22, { gap: 0.5 }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, __62("Metadata", "elementor")), /* @__PURE__ */ React124.createElement(
|
|
8946
9499
|
ChipsControl,
|
|
8947
9500
|
{
|
|
8948
9501
|
options: [
|
|
8949
|
-
{ label:
|
|
8950
|
-
{ label:
|
|
8951
|
-
{ label:
|
|
8952
|
-
{ label:
|
|
8953
|
-
{ label:
|
|
9502
|
+
{ label: __62("Date", "elementor"), value: "date" },
|
|
9503
|
+
{ label: __62("Time", "elementor"), value: "time" },
|
|
9504
|
+
{ label: __62("Page URL", "elementor"), value: "page-url" },
|
|
9505
|
+
{ label: __62("User agent", "elementor"), value: "user-agent" },
|
|
9506
|
+
{ label: __62("Credit", "elementor"), value: "credit" }
|
|
8954
9507
|
]
|
|
8955
9508
|
}
|
|
8956
9509
|
)));
|
|
8957
|
-
var SendAsField = () => /* @__PURE__ */
|
|
9510
|
+
var SendAsField = () => /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "send-as" }, /* @__PURE__ */ React124.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, __62("Send as", "elementor"))), /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(
|
|
8958
9511
|
SelectControl,
|
|
8959
9512
|
{
|
|
8960
9513
|
options: [
|
|
8961
|
-
{ label:
|
|
8962
|
-
{ label:
|
|
9514
|
+
{ label: __62("HTML", "elementor"), value: "html" },
|
|
9515
|
+
{ label: __62("Plain Text", "elementor"), value: "plain" }
|
|
8963
9516
|
]
|
|
8964
9517
|
}
|
|
8965
9518
|
))));
|
|
@@ -8968,25 +9521,25 @@ var SendAsField = () => /* @__PURE__ */ React120.createElement(PropKeyProvider,
|
|
|
8968
9521
|
var EmailFormActionControl = createControl(
|
|
8969
9522
|
({ toPlaceholder, label }) => {
|
|
8970
9523
|
const { value, setValue, ...propContext } = useBoundProp(emailsPropTypeUtil);
|
|
8971
|
-
return /* @__PURE__ */
|
|
9524
|
+
return /* @__PURE__ */ React125.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React125.createElement(Stack23, { gap: 2 }, /* @__PURE__ */ React125.createElement(ControlLabel, null, label ? label + " " + __63("settings", "elementor") : __63("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)));
|
|
8972
9525
|
}
|
|
8973
9526
|
);
|
|
8974
|
-
var AdvancedSettings = () => /* @__PURE__ */
|
|
9527
|
+
var AdvancedSettings = () => /* @__PURE__ */ React125.createElement(CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React125.createElement(Box31, { sx: { pt: 2 } }, /* @__PURE__ */ React125.createElement(Stack23, { 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(Divider6, null), /* @__PURE__ */ React125.createElement(MetaDataField, null), /* @__PURE__ */ React125.createElement(SendAsField, null))));
|
|
8975
9528
|
|
|
8976
9529
|
// src/controls/attachment-type-control.tsx
|
|
8977
|
-
import * as
|
|
9530
|
+
import * as React126 from "react";
|
|
8978
9531
|
import { InfoAlert as InfoAlert3 } from "@elementor/editor-ui";
|
|
8979
9532
|
import { Grid as Grid35 } from "@elementor/ui";
|
|
8980
|
-
import { __ as
|
|
9533
|
+
import { __ as __64 } from "@wordpress/i18n";
|
|
8981
9534
|
var AttachmentTypeControl = createControl(({ label, options }) => {
|
|
8982
|
-
return /* @__PURE__ */
|
|
9535
|
+
return /* @__PURE__ */ React126.createElement(Grid35, { container: true, direction: "column", gap: 1 }, label && /* @__PURE__ */ React126.createElement(Grid35, { item: true }, /* @__PURE__ */ React126.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React126.createElement(Grid35, { item: true }, /* @__PURE__ */ React126.createElement(SelectControl, { options })), /* @__PURE__ */ React126.createElement(Grid35, { item: true }, /* @__PURE__ */ React126.createElement(InfoAlert3, null, __64(
|
|
8983
9536
|
"Linked uploads are saved to the server. Direct attachments will not appear under Submissions.",
|
|
8984
9537
|
"elementor"
|
|
8985
9538
|
))));
|
|
8986
9539
|
});
|
|
8987
9540
|
|
|
8988
9541
|
// src/controls/grid-span-control.tsx
|
|
8989
|
-
import * as
|
|
9542
|
+
import * as React127 from "react";
|
|
8990
9543
|
import { spanPropTypeUtil } from "@elementor/editor-props";
|
|
8991
9544
|
import { TextField as TextField13 } from "@elementor/ui";
|
|
8992
9545
|
var GridSpanControl = createControl(
|
|
@@ -9005,7 +9558,7 @@ var GridSpanControl = createControl(
|
|
|
9005
9558
|
setValue(next === "" ? null : next);
|
|
9006
9559
|
};
|
|
9007
9560
|
const placeholder = propPlaceholder ?? boundPlaceholder ?? `e.g: 'span 2' or '1 / 3'`;
|
|
9008
|
-
return /* @__PURE__ */
|
|
9561
|
+
return /* @__PURE__ */ React127.createElement(ControlActions, null, /* @__PURE__ */ React127.createElement(
|
|
9009
9562
|
TextField13,
|
|
9010
9563
|
{
|
|
9011
9564
|
size: "tiny",
|
|
@@ -9026,23 +9579,23 @@ var GridSpanControl = createControl(
|
|
|
9026
9579
|
);
|
|
9027
9580
|
|
|
9028
9581
|
// src/components/promotions/display-conditions-control.tsx
|
|
9029
|
-
import * as
|
|
9030
|
-
import { useRef as
|
|
9582
|
+
import * as React129 from "react";
|
|
9583
|
+
import { useRef as useRef32 } from "react";
|
|
9031
9584
|
import { SitemapIcon } from "@elementor/icons";
|
|
9032
|
-
import { IconButton as IconButton10, Stack as
|
|
9033
|
-
import { __ as
|
|
9585
|
+
import { IconButton as IconButton10, Stack as Stack24, Tooltip as Tooltip11 } from "@elementor/ui";
|
|
9586
|
+
import { __ as __65 } from "@wordpress/i18n";
|
|
9034
9587
|
|
|
9035
9588
|
// src/components/promotions/promotion-trigger.tsx
|
|
9036
|
-
import * as
|
|
9037
|
-
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as
|
|
9589
|
+
import * as React128 from "react";
|
|
9590
|
+
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as useState23 } from "react";
|
|
9038
9591
|
import { PromotionChip as PromotionChip2, PromotionInfotip } from "@elementor/editor-ui";
|
|
9039
|
-
import { Box as
|
|
9592
|
+
import { Box as Box32 } from "@elementor/ui";
|
|
9040
9593
|
function getV4Promotion(key) {
|
|
9041
9594
|
return window.elementor?.config?.v4Promotions?.[key];
|
|
9042
9595
|
}
|
|
9043
9596
|
var PromotionTrigger = forwardRef12(
|
|
9044
9597
|
({ promotionKey, children, trackingData }, ref) => {
|
|
9045
|
-
const [isOpen, setIsOpen] =
|
|
9598
|
+
const [isOpen, setIsOpen] = useState23(false);
|
|
9046
9599
|
const promotion = getV4Promotion(promotionKey);
|
|
9047
9600
|
const toggle = useCallback5(() => {
|
|
9048
9601
|
setIsOpen((prev) => {
|
|
@@ -9053,7 +9606,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
9053
9606
|
});
|
|
9054
9607
|
}, [trackingData]);
|
|
9055
9608
|
useImperativeHandle(ref, () => ({ toggle }), [toggle]);
|
|
9056
|
-
return /* @__PURE__ */
|
|
9609
|
+
return /* @__PURE__ */ React128.createElement(React128.Fragment, null, promotion && /* @__PURE__ */ React128.createElement(
|
|
9057
9610
|
PromotionInfotip,
|
|
9058
9611
|
{
|
|
9059
9612
|
title: promotion.title,
|
|
@@ -9067,8 +9620,8 @@ var PromotionTrigger = forwardRef12(
|
|
|
9067
9620
|
},
|
|
9068
9621
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
9069
9622
|
},
|
|
9070
|
-
/* @__PURE__ */
|
|
9071
|
-
|
|
9623
|
+
/* @__PURE__ */ React128.createElement(
|
|
9624
|
+
Box32,
|
|
9072
9625
|
{
|
|
9073
9626
|
onClick: (e) => {
|
|
9074
9627
|
e.stopPropagation();
|
|
@@ -9076,19 +9629,19 @@ var PromotionTrigger = forwardRef12(
|
|
|
9076
9629
|
},
|
|
9077
9630
|
sx: { cursor: "pointer", display: "inline-flex" }
|
|
9078
9631
|
},
|
|
9079
|
-
children ?? /* @__PURE__ */
|
|
9632
|
+
children ?? /* @__PURE__ */ React128.createElement(PromotionChip2, null)
|
|
9080
9633
|
)
|
|
9081
9634
|
));
|
|
9082
9635
|
}
|
|
9083
9636
|
);
|
|
9084
9637
|
|
|
9085
9638
|
// src/components/promotions/display-conditions-control.tsx
|
|
9086
|
-
var ARIA_LABEL =
|
|
9639
|
+
var ARIA_LABEL = __65("Display Conditions", "elementor");
|
|
9087
9640
|
var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
|
|
9088
9641
|
var DisplayConditionsControl = createControl(() => {
|
|
9089
|
-
const triggerRef =
|
|
9090
|
-
return /* @__PURE__ */
|
|
9091
|
-
|
|
9642
|
+
const triggerRef = useRef32(null);
|
|
9643
|
+
return /* @__PURE__ */ React129.createElement(
|
|
9644
|
+
Stack24,
|
|
9092
9645
|
{
|
|
9093
9646
|
direction: "row",
|
|
9094
9647
|
spacing: 2,
|
|
@@ -9097,8 +9650,8 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9097
9650
|
alignItems: "center"
|
|
9098
9651
|
}
|
|
9099
9652
|
},
|
|
9100
|
-
/* @__PURE__ */
|
|
9101
|
-
/* @__PURE__ */
|
|
9653
|
+
/* @__PURE__ */ React129.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
|
|
9654
|
+
/* @__PURE__ */ React129.createElement(Tooltip11, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React129.createElement(
|
|
9102
9655
|
IconButton10,
|
|
9103
9656
|
{
|
|
9104
9657
|
size: "tiny",
|
|
@@ -9111,23 +9664,23 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9111
9664
|
borderRadius: 1
|
|
9112
9665
|
}
|
|
9113
9666
|
},
|
|
9114
|
-
/* @__PURE__ */
|
|
9667
|
+
/* @__PURE__ */ React129.createElement(SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
9115
9668
|
))
|
|
9116
9669
|
);
|
|
9117
9670
|
});
|
|
9118
9671
|
|
|
9119
9672
|
// src/components/promotions/attributes-control.tsx
|
|
9120
|
-
import * as
|
|
9121
|
-
import { useRef as
|
|
9673
|
+
import * as React130 from "react";
|
|
9674
|
+
import { useRef as useRef33 } from "react";
|
|
9122
9675
|
import { PlusIcon as PlusIcon4 } from "@elementor/icons";
|
|
9123
|
-
import { Stack as
|
|
9124
|
-
import { __ as
|
|
9125
|
-
var ARIA_LABEL2 =
|
|
9676
|
+
import { Stack as Stack25, Tooltip as Tooltip12 } from "@elementor/ui";
|
|
9677
|
+
import { __ as __66 } from "@wordpress/i18n";
|
|
9678
|
+
var ARIA_LABEL2 = __66("Attributes", "elementor");
|
|
9126
9679
|
var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
|
|
9127
9680
|
var AttributesControl = createControl(() => {
|
|
9128
|
-
const triggerRef =
|
|
9129
|
-
return /* @__PURE__ */
|
|
9130
|
-
|
|
9681
|
+
const triggerRef = useRef33(null);
|
|
9682
|
+
return /* @__PURE__ */ React130.createElement(
|
|
9683
|
+
Stack25,
|
|
9131
9684
|
{
|
|
9132
9685
|
direction: "row",
|
|
9133
9686
|
spacing: 2,
|
|
@@ -9136,8 +9689,8 @@ var AttributesControl = createControl(() => {
|
|
|
9136
9689
|
alignItems: "center"
|
|
9137
9690
|
}
|
|
9138
9691
|
},
|
|
9139
|
-
/* @__PURE__ */
|
|
9140
|
-
/* @__PURE__ */
|
|
9692
|
+
/* @__PURE__ */ React130.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
|
|
9693
|
+
/* @__PURE__ */ React130.createElement(Tooltip12, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React130.createElement(
|
|
9141
9694
|
PlusIcon4,
|
|
9142
9695
|
{
|
|
9143
9696
|
"aria-label": ARIA_LABEL2,
|
|
@@ -9151,29 +9704,29 @@ var AttributesControl = createControl(() => {
|
|
|
9151
9704
|
});
|
|
9152
9705
|
|
|
9153
9706
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
9154
|
-
import * as
|
|
9707
|
+
import * as React131 from "react";
|
|
9155
9708
|
import { BrushBigIcon } from "@elementor/icons";
|
|
9156
|
-
import { IconButton as IconButton11, styled as
|
|
9157
|
-
var CustomIconButton =
|
|
9709
|
+
import { IconButton as IconButton11, styled as styled13, Tooltip as Tooltip13 } from "@elementor/ui";
|
|
9710
|
+
var CustomIconButton = styled13(IconButton11)(({ theme }) => ({
|
|
9158
9711
|
width: theme.spacing(2.5),
|
|
9159
9712
|
height: theme.spacing(2.5)
|
|
9160
9713
|
}));
|
|
9161
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
9714
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React131.createElement(Tooltip13, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React131.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React131.createElement(BrushBigIcon, { fontSize: size })));
|
|
9162
9715
|
|
|
9163
9716
|
// src/components/repeater/repeater.tsx
|
|
9164
|
-
import * as
|
|
9165
|
-
import { useEffect as useEffect21, useState as
|
|
9717
|
+
import * as React132 from "react";
|
|
9718
|
+
import { useEffect as useEffect21, useState as useState24 } from "react";
|
|
9166
9719
|
import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon5, XIcon as XIcon4 } from "@elementor/icons";
|
|
9167
9720
|
import {
|
|
9168
9721
|
bindPopover as bindPopover9,
|
|
9169
9722
|
bindTrigger as bindTrigger7,
|
|
9170
|
-
Box as
|
|
9723
|
+
Box as Box33,
|
|
9171
9724
|
IconButton as IconButton12,
|
|
9172
9725
|
Infotip as Infotip4,
|
|
9173
9726
|
Tooltip as Tooltip14,
|
|
9174
|
-
usePopupState as
|
|
9727
|
+
usePopupState as usePopupState12
|
|
9175
9728
|
} from "@elementor/ui";
|
|
9176
|
-
import { __ as
|
|
9729
|
+
import { __ as __67 } from "@wordpress/i18n";
|
|
9177
9730
|
var SIZE12 = "tiny";
|
|
9178
9731
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
9179
9732
|
var Repeater3 = ({
|
|
@@ -9192,7 +9745,7 @@ var Repeater3 = ({
|
|
|
9192
9745
|
isSortable = true,
|
|
9193
9746
|
adornment = ControlAdornments
|
|
9194
9747
|
}) => {
|
|
9195
|
-
const [openItem, setOpenItem] =
|
|
9748
|
+
const [openItem, setOpenItem] = useState24(initialOpenItem);
|
|
9196
9749
|
const uniqueKeys = items2.map(
|
|
9197
9750
|
(item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
|
|
9198
9751
|
);
|
|
@@ -9255,7 +9808,7 @@ var Repeater3 = ({
|
|
|
9255
9808
|
};
|
|
9256
9809
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
9257
9810
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
9258
|
-
const addButton = /* @__PURE__ */
|
|
9811
|
+
const addButton = /* @__PURE__ */ React132.createElement(
|
|
9259
9812
|
IconButton12,
|
|
9260
9813
|
{
|
|
9261
9814
|
size: SIZE12,
|
|
@@ -9264,11 +9817,11 @@ var Repeater3 = ({
|
|
|
9264
9817
|
},
|
|
9265
9818
|
disabled: isButtonDisabled,
|
|
9266
9819
|
onClick: addRepeaterItem,
|
|
9267
|
-
"aria-label":
|
|
9820
|
+
"aria-label": __67("Add item", "elementor")
|
|
9268
9821
|
},
|
|
9269
|
-
/* @__PURE__ */
|
|
9822
|
+
/* @__PURE__ */ React132.createElement(PlusIcon5, { fontSize: SIZE12 })
|
|
9270
9823
|
);
|
|
9271
|
-
return /* @__PURE__ */
|
|
9824
|
+
return /* @__PURE__ */ React132.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React132.createElement(RepeaterHeader, { label, adornment }, shouldShowInfotip ? /* @__PURE__ */ React132.createElement(
|
|
9272
9825
|
Infotip4,
|
|
9273
9826
|
{
|
|
9274
9827
|
placement: "right",
|
|
@@ -9276,20 +9829,20 @@ var Repeater3 = ({
|
|
|
9276
9829
|
color: "secondary",
|
|
9277
9830
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
9278
9831
|
},
|
|
9279
|
-
/* @__PURE__ */
|
|
9280
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
9832
|
+
/* @__PURE__ */ React132.createElement(Box33, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
9833
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React132.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
9281
9834
|
const index = uniqueKeys.indexOf(key);
|
|
9282
9835
|
const value = items2[index];
|
|
9283
9836
|
if (!value) {
|
|
9284
9837
|
return null;
|
|
9285
9838
|
}
|
|
9286
|
-
return /* @__PURE__ */
|
|
9839
|
+
return /* @__PURE__ */ React132.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React132.createElement(
|
|
9287
9840
|
RepeaterItem,
|
|
9288
9841
|
{
|
|
9289
9842
|
disabled,
|
|
9290
9843
|
propDisabled: value?.disabled,
|
|
9291
|
-
label: /* @__PURE__ */
|
|
9292
|
-
startIcon: /* @__PURE__ */
|
|
9844
|
+
label: /* @__PURE__ */ React132.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React132.createElement(itemSettings.Label, { value, index })),
|
|
9845
|
+
startIcon: /* @__PURE__ */ React132.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React132.createElement(itemSettings.Icon, { value })),
|
|
9293
9846
|
removeItem: () => removeRepeaterItem(index),
|
|
9294
9847
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
9295
9848
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -9303,7 +9856,7 @@ var Repeater3 = ({
|
|
|
9303
9856
|
actions: itemSettings.actions,
|
|
9304
9857
|
value
|
|
9305
9858
|
},
|
|
9306
|
-
(props) => /* @__PURE__ */
|
|
9859
|
+
(props) => /* @__PURE__ */ React132.createElement(
|
|
9307
9860
|
itemSettings.Content,
|
|
9308
9861
|
{
|
|
9309
9862
|
...props,
|
|
@@ -9345,16 +9898,16 @@ var RepeaterItem = ({
|
|
|
9345
9898
|
);
|
|
9346
9899
|
const triggerProps = bindTrigger7(popoverState);
|
|
9347
9900
|
usePopoverDismiss({ isOpen: popoverState.isOpen, onClose: popoverProps.onClose });
|
|
9348
|
-
const duplicateLabel =
|
|
9349
|
-
const toggleLabel = propDisabled ?
|
|
9350
|
-
const removeLabel =
|
|
9351
|
-
return /* @__PURE__ */
|
|
9901
|
+
const duplicateLabel = __67("Duplicate", "elementor");
|
|
9902
|
+
const toggleLabel = propDisabled ? __67("Show", "elementor") : __67("Hide", "elementor");
|
|
9903
|
+
const removeLabel = __67("Remove", "elementor");
|
|
9904
|
+
return /* @__PURE__ */ React132.createElement(Box33, { sx: { display: "contents" } }, /* @__PURE__ */ React132.createElement(
|
|
9352
9905
|
RepeaterTag,
|
|
9353
9906
|
{
|
|
9354
9907
|
disabled,
|
|
9355
9908
|
label,
|
|
9356
9909
|
ref: setRef,
|
|
9357
|
-
"aria-label":
|
|
9910
|
+
"aria-label": __67("Open item", "elementor"),
|
|
9358
9911
|
...triggerProps,
|
|
9359
9912
|
onClick: (e) => {
|
|
9360
9913
|
triggerProps.onClick(e);
|
|
@@ -9363,13 +9916,13 @@ var RepeaterItem = ({
|
|
|
9363
9916
|
}
|
|
9364
9917
|
},
|
|
9365
9918
|
startIcon,
|
|
9366
|
-
actions: /* @__PURE__ */
|
|
9919
|
+
actions: /* @__PURE__ */ React132.createElement(React132.Fragment, null, showDuplicate && /* @__PURE__ */ React132.createElement(Tooltip14, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React132.createElement(IconButton12, { size: SIZE12, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React132.createElement(CopyIcon2, { fontSize: SIZE12 }))), showToggle && /* @__PURE__ */ React132.createElement(Tooltip14, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React132.createElement(IconButton12, { size: SIZE12, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React132.createElement(EyeOffIcon2, { fontSize: SIZE12 }) : /* @__PURE__ */ React132.createElement(EyeIcon2, { fontSize: SIZE12 }))), actions?.(value), showRemove && /* @__PURE__ */ React132.createElement(Tooltip14, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React132.createElement(IconButton12, { size: SIZE12, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React132.createElement(XIcon4, { fontSize: SIZE12 }))))
|
|
9367
9920
|
}
|
|
9368
|
-
), /* @__PURE__ */
|
|
9921
|
+
), /* @__PURE__ */ React132.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React132.createElement(Box33, null, children({ anchorEl: ref }))));
|
|
9369
9922
|
};
|
|
9370
9923
|
var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
9371
|
-
const [ref, setRef] =
|
|
9372
|
-
const popoverState =
|
|
9924
|
+
const [ref, setRef] = useState24(null);
|
|
9925
|
+
const popoverState = usePopupState12({ variant: "popover" });
|
|
9373
9926
|
const popoverProps = bindPopover9(popoverState);
|
|
9374
9927
|
useEffect21(() => {
|
|
9375
9928
|
if (openOnMount && ref) {
|
|
@@ -9390,7 +9943,7 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
|
9390
9943
|
};
|
|
9391
9944
|
|
|
9392
9945
|
// src/components/size/unstable-size-field.tsx
|
|
9393
|
-
import * as
|
|
9946
|
+
import * as React135 from "react";
|
|
9394
9947
|
import { InputAdornment as InputAdornment6 } from "@elementor/ui";
|
|
9395
9948
|
|
|
9396
9949
|
// src/hooks/use-size-value.ts
|
|
@@ -9433,17 +9986,17 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
9433
9986
|
};
|
|
9434
9987
|
|
|
9435
9988
|
// src/components/size/unit-select.tsx
|
|
9436
|
-
import * as
|
|
9989
|
+
import * as React133 from "react";
|
|
9437
9990
|
import { useId as useId4 } from "react";
|
|
9438
9991
|
import { MenuListItem as MenuListItem8 } from "@elementor/editor-ui";
|
|
9439
|
-
import { bindMenu as bindMenu3, bindTrigger as bindTrigger8, Button as Button7, Menu as Menu4, styled as
|
|
9992
|
+
import { bindMenu as bindMenu3, bindTrigger as bindTrigger8, Button as Button7, Menu as Menu4, styled as styled14, usePopupState as usePopupState13 } from "@elementor/ui";
|
|
9440
9993
|
var menuItemContentStyles2 = {
|
|
9441
9994
|
display: "flex",
|
|
9442
9995
|
flexDirection: "column",
|
|
9443
9996
|
justifyContent: "center"
|
|
9444
9997
|
};
|
|
9445
9998
|
var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
9446
|
-
const popupState =
|
|
9999
|
+
const popupState = usePopupState13({
|
|
9447
10000
|
variant: "popover",
|
|
9448
10001
|
popupId: useId4()
|
|
9449
10002
|
});
|
|
@@ -9451,7 +10004,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
9451
10004
|
onClick(options[index]);
|
|
9452
10005
|
popupState.close();
|
|
9453
10006
|
};
|
|
9454
|
-
return /* @__PURE__ */
|
|
10007
|
+
return /* @__PURE__ */ React133.createElement(React133.Fragment, null, /* @__PURE__ */ React133.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...bindTrigger8(popupState) }, value), /* @__PURE__ */ React133.createElement(Menu4, { MenuListProps: { dense: true }, ...bindMenu3(popupState) }, options.map((option, index) => /* @__PURE__ */ React133.createElement(
|
|
9455
10008
|
MenuListItem8,
|
|
9456
10009
|
{
|
|
9457
10010
|
key: option,
|
|
@@ -9470,7 +10023,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
9470
10023
|
option.toUpperCase()
|
|
9471
10024
|
))));
|
|
9472
10025
|
};
|
|
9473
|
-
var StyledButton3 =
|
|
10026
|
+
var StyledButton3 = styled14(Button7, {
|
|
9474
10027
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
9475
10028
|
})(({ isPrimaryColor, theme }) => ({
|
|
9476
10029
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -9480,11 +10033,11 @@ var StyledButton3 = styled12(Button7, {
|
|
|
9480
10033
|
}));
|
|
9481
10034
|
|
|
9482
10035
|
// src/components/size/unstable-size-input.tsx
|
|
9483
|
-
import * as
|
|
10036
|
+
import * as React134 from "react";
|
|
9484
10037
|
import { forwardRef as forwardRef13 } from "react";
|
|
9485
10038
|
var UnstableSizeInput = forwardRef13(
|
|
9486
10039
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
9487
|
-
return /* @__PURE__ */
|
|
10040
|
+
return /* @__PURE__ */ React134.createElement(
|
|
9488
10041
|
NumberInput,
|
|
9489
10042
|
{
|
|
9490
10043
|
ref,
|
|
@@ -9522,7 +10075,7 @@ var UnstableSizeField = ({
|
|
|
9522
10075
|
const shouldHighlightUnit2 = () => {
|
|
9523
10076
|
return hasValue(size);
|
|
9524
10077
|
};
|
|
9525
|
-
return /* @__PURE__ */
|
|
10078
|
+
return /* @__PURE__ */ React135.createElement(
|
|
9526
10079
|
UnstableSizeInput,
|
|
9527
10080
|
{
|
|
9528
10081
|
type: "number",
|
|
@@ -9531,8 +10084,8 @@ var UnstableSizeField = ({
|
|
|
9531
10084
|
onChange: (event) => setSize(event.target.value),
|
|
9532
10085
|
InputProps: {
|
|
9533
10086
|
...InputProps,
|
|
9534
|
-
startAdornment: startIcon && /* @__PURE__ */
|
|
9535
|
-
endAdornment: /* @__PURE__ */
|
|
10087
|
+
startAdornment: startIcon && /* @__PURE__ */ React135.createElement(InputAdornment6, { position: "start" }, startIcon),
|
|
10088
|
+
endAdornment: /* @__PURE__ */ React135.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React135.createElement(
|
|
9536
10089
|
UnitSelect,
|
|
9537
10090
|
{
|
|
9538
10091
|
options: units2,
|
|
@@ -9550,7 +10103,7 @@ var hasValue = (value) => {
|
|
|
9550
10103
|
};
|
|
9551
10104
|
|
|
9552
10105
|
// src/hooks/use-font-families.ts
|
|
9553
|
-
import { useMemo as
|
|
10106
|
+
import { useMemo as useMemo20 } from "react";
|
|
9554
10107
|
import { getElementorConfig } from "@elementor/editor-v1-adapters";
|
|
9555
10108
|
var getFontControlConfig = () => {
|
|
9556
10109
|
const { controls } = getElementorConfig();
|
|
@@ -9558,7 +10111,7 @@ var getFontControlConfig = () => {
|
|
|
9558
10111
|
};
|
|
9559
10112
|
var useFontFamilies = () => {
|
|
9560
10113
|
const { groups, options } = getFontControlConfig();
|
|
9561
|
-
return
|
|
10114
|
+
return useMemo20(() => {
|
|
9562
10115
|
if (!groups || !options) {
|
|
9563
10116
|
return [];
|
|
9564
10117
|
}
|
|
@@ -9654,11 +10207,14 @@ export {
|
|
|
9654
10207
|
createControlReplacementsRegistry,
|
|
9655
10208
|
enqueueFont,
|
|
9656
10209
|
getControlReplacements,
|
|
10210
|
+
getFontAwesome7IconName,
|
|
9657
10211
|
injectIntoRepeaterItemActions,
|
|
9658
10212
|
injectIntoRepeaterItemIcon,
|
|
9659
10213
|
injectIntoRepeaterItemLabel,
|
|
9660
10214
|
isUnitExtendedOption,
|
|
9661
10215
|
registerControlReplacement,
|
|
10216
|
+
resetFontAwesome7IconsCache,
|
|
10217
|
+
resolveFontAwesome7Icon,
|
|
9662
10218
|
trackUpgradePromotionClick,
|
|
9663
10219
|
trackViewPromotion,
|
|
9664
10220
|
transitionProperties,
|