@elementor/editor-controls 4.4.0-1095 → 4.4.0-1097
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.js +1249 -833
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1134 -708
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -16
- package/src/controls/icon-library/icon-library-filter.tsx +9 -2
- package/src/controls/icon-library/icon-library-grid.tsx +344 -0
- package/src/controls/icon-library/icon-library-popover.tsx +43 -8
- package/src/controls/icon-library/icon-library-tooltip.ts +1 -0
- package/src/controls/icon-library/icon-library-view-toggle.tsx +104 -0
- package/src/controls/link-control.tsx +18 -8
package/dist/index.mjs
CHANGED
|
@@ -381,7 +381,7 @@ function ControlActions({ children }) {
|
|
|
381
381
|
if (items2.length === 0 || disabled) {
|
|
382
382
|
return children;
|
|
383
383
|
}
|
|
384
|
-
const menuItems = items2.map(({ MenuItem:
|
|
384
|
+
const menuItems = items2.map(({ MenuItem: MenuItem4, id }) => /* @__PURE__ */ React10.createElement(MenuItem4, { key: id }));
|
|
385
385
|
return /* @__PURE__ */ React10.createElement(FloatingActionsBar, { actions: menuItems }, children);
|
|
386
386
|
}
|
|
387
387
|
|
|
@@ -4633,33 +4633,39 @@ var LinkControl = createControl((props) => {
|
|
|
4633
4633
|
getLinkInLinkRestriction(elementId, value ?? linkPlaceholder)
|
|
4634
4634
|
);
|
|
4635
4635
|
const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
|
|
4636
|
-
const
|
|
4636
|
+
const syncLinkRestriction = (clearActiveLinkWhen = "restricted") => {
|
|
4637
4637
|
const newRestriction = getLinkInLinkRestriction(elementId, value ?? linkPlaceholder);
|
|
4638
|
-
|
|
4638
|
+
const becameRestricted = newRestriction.shouldRestrict && !linkInLinkRestriction.shouldRestrict;
|
|
4639
|
+
const shouldClearActiveLink = clearActiveLinkWhen === "newly-restricted" ? becameRestricted : newRestriction.shouldRestrict;
|
|
4640
|
+
if (shouldClearActiveLink && isActive && !linkPlaceholder) {
|
|
4639
4641
|
setIsActive(false);
|
|
4640
4642
|
if (value !== null) {
|
|
4641
4643
|
setValue(null);
|
|
4642
4644
|
}
|
|
4643
4645
|
}
|
|
4644
4646
|
setLinkInLinkRestriction((prev) => isSameRestriction(prev, newRestriction) ? prev : newRestriction);
|
|
4645
|
-
}
|
|
4647
|
+
};
|
|
4648
|
+
const debouncedSyncLinkRestriction = useDebouncedCallback(
|
|
4649
|
+
(clearActiveLinkWhen = "restricted") => syncLinkRestriction(clearActiveLinkWhen),
|
|
4650
|
+
300
|
|
4651
|
+
);
|
|
4646
4652
|
useListenTo(
|
|
4647
4653
|
commandEndEvent("document/elements/set-settings"),
|
|
4648
4654
|
() => {
|
|
4649
|
-
|
|
4655
|
+
debouncedSyncLinkRestriction("newly-restricted");
|
|
4650
4656
|
},
|
|
4651
|
-
[
|
|
4657
|
+
[debouncedSyncLinkRestriction]
|
|
4652
4658
|
);
|
|
4653
4659
|
useEffect14(() => {
|
|
4654
|
-
|
|
4660
|
+
debouncedSyncLinkRestriction();
|
|
4655
4661
|
const handleInlineLinkChanged = () => {
|
|
4656
|
-
|
|
4662
|
+
debouncedSyncLinkRestriction();
|
|
4657
4663
|
};
|
|
4658
4664
|
window.addEventListener("elementor:inline-link-changed", handleInlineLinkChanged);
|
|
4659
4665
|
return () => {
|
|
4660
4666
|
window.removeEventListener("elementor:inline-link-changed", handleInlineLinkChanged);
|
|
4661
4667
|
};
|
|
4662
|
-
}, [elementId,
|
|
4668
|
+
}, [elementId, debouncedSyncLinkRestriction]);
|
|
4663
4669
|
const onEnabledChange = () => {
|
|
4664
4670
|
setLinkInLinkRestriction(getLinkInLinkRestriction(elementId, value ?? linkPlaceholder));
|
|
4665
4671
|
if (linkInLinkRestriction.shouldRestrict && !isActive) {
|
|
@@ -5322,13 +5328,13 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
5322
5328
|
});
|
|
5323
5329
|
|
|
5324
5330
|
// src/controls/svg-media-control.tsx
|
|
5325
|
-
import * as
|
|
5326
|
-
import { useEffect as useEffect16, useRef as
|
|
5331
|
+
import * as React88 from "react";
|
|
5332
|
+
import { useEffect as useEffect16, useRef as useRef16, useState as useState18 } from "react";
|
|
5327
5333
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
5328
5334
|
import { iconPropTypeUtil, svgSrcPropTypeUtil, urlPropTypeUtil as urlPropTypeUtil4 } from "@elementor/editor-props";
|
|
5329
|
-
import { Box as
|
|
5335
|
+
import { Box as Box20, Card as Card2, CardOverlay as CardOverlay2, Popover as Popover6, Stack as Stack17, styled as styled11, usePopupState as usePopupState10 } from "@elementor/ui";
|
|
5330
5336
|
import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWpMediaFrame2 } from "@elementor/wp-media";
|
|
5331
|
-
import { __ as
|
|
5337
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
5332
5338
|
|
|
5333
5339
|
// src/components/enable-unfiltered-modal.tsx
|
|
5334
5340
|
import * as React80 from "react";
|
|
@@ -5406,8 +5412,8 @@ function measureIconLibraryAnchor(container, buttonGroup) {
|
|
|
5406
5412
|
}
|
|
5407
5413
|
|
|
5408
5414
|
// src/controls/icon-library/icon-library-popover.tsx
|
|
5409
|
-
import * as
|
|
5410
|
-
import { useMemo as useMemo12, useState as
|
|
5415
|
+
import * as React85 from "react";
|
|
5416
|
+
import { useMemo as useMemo12, useState as useState17 } from "react";
|
|
5411
5417
|
import {
|
|
5412
5418
|
PopoverBody as PopoverBody2,
|
|
5413
5419
|
PopoverHeader as PopoverHeader4,
|
|
@@ -5416,9 +5422,10 @@ import {
|
|
|
5416
5422
|
StyledMenuList
|
|
5417
5423
|
} from "@elementor/editor-ui";
|
|
5418
5424
|
import { ComponentsIcon } from "@elementor/icons";
|
|
5419
|
-
import {
|
|
5425
|
+
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
5426
|
+
import { Box as Box17, CircularProgress as CircularProgress3, Divider as Divider4, Link as Link3, Stack as Stack15, styled as styled9, Typography as Typography9 } from "@elementor/ui";
|
|
5420
5427
|
import { useDebounceState } from "@elementor/utils";
|
|
5421
|
-
import { __ as
|
|
5428
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
5422
5429
|
|
|
5423
5430
|
// src/controls/icon-library/font-awesome-7-data.ts
|
|
5424
5431
|
var FONT_AWESOME_7_LIBRARIES = [
|
|
@@ -5695,6 +5702,11 @@ import {
|
|
|
5695
5702
|
usePopupState as usePopupState8
|
|
5696
5703
|
} from "@elementor/ui";
|
|
5697
5704
|
import { __ as __32 } from "@wordpress/i18n";
|
|
5705
|
+
|
|
5706
|
+
// src/controls/icon-library/icon-library-tooltip.ts
|
|
5707
|
+
var ICON_LIBRARY_ACTION_TOOLTIP_ENTER_DELAY = 0;
|
|
5708
|
+
|
|
5709
|
+
// src/controls/icon-library/icon-library-filter.tsx
|
|
5698
5710
|
var FILTER_MENU_WIDTH = 280;
|
|
5699
5711
|
var FILTER_INDICATOR_SIZE = 6;
|
|
5700
5712
|
var FILTER_INDICATOR_OFFSET = 4;
|
|
@@ -5741,35 +5753,45 @@ var IconLibraryFilter = ({ value, onChange }) => {
|
|
|
5741
5753
|
const nextValue = value.includes(library) ? value.filter((selectedLibrary) => selectedLibrary !== library) : [...value, library];
|
|
5742
5754
|
onChange(nextValue.length === FONT_AWESOME_7_LIBRARIES.length ? [] : nextValue);
|
|
5743
5755
|
};
|
|
5744
|
-
return /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
|
|
5745
|
-
|
|
5756
|
+
return /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
|
|
5757
|
+
Tooltip8,
|
|
5746
5758
|
{
|
|
5747
|
-
"
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
...bindToggle2(popupState),
|
|
5753
|
-
"aria-expanded": popupState.isOpen
|
|
5759
|
+
title: __32("Filter by library", "elementor"),
|
|
5760
|
+
placement: "top",
|
|
5761
|
+
enterDelay: ICON_LIBRARY_ACTION_TOOLTIP_ENTER_DELAY,
|
|
5762
|
+
enterNextDelay: ICON_LIBRARY_ACTION_TOOLTIP_ENTER_DELAY,
|
|
5763
|
+
disableInteractive: true
|
|
5754
5764
|
},
|
|
5755
|
-
/* @__PURE__ */ React82.createElement(
|
|
5756
|
-
|
|
5757
|
-
Box15,
|
|
5765
|
+
/* @__PURE__ */ React82.createElement(
|
|
5766
|
+
ToggleButton2,
|
|
5758
5767
|
{
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5768
|
+
"aria-label": filterButtonLabel,
|
|
5769
|
+
value: "filter",
|
|
5770
|
+
size: "tiny",
|
|
5771
|
+
selected: popupState.isOpen,
|
|
5772
|
+
sx: { position: "relative", flexShrink: 0 },
|
|
5773
|
+
...bindToggle2(popupState),
|
|
5774
|
+
"aria-expanded": popupState.isOpen
|
|
5775
|
+
},
|
|
5776
|
+
/* @__PURE__ */ React82.createElement(FilterIcon2, { fontSize: "tiny" }),
|
|
5777
|
+
isFiltered ? /* @__PURE__ */ React82.createElement(
|
|
5778
|
+
Box15,
|
|
5779
|
+
{
|
|
5780
|
+
component: "span",
|
|
5781
|
+
"aria-hidden": "true",
|
|
5782
|
+
sx: {
|
|
5783
|
+
position: "absolute",
|
|
5784
|
+
insetBlockStart: FILTER_INDICATOR_OFFSET,
|
|
5785
|
+
insetInlineEnd: FILTER_INDICATOR_OFFSET,
|
|
5786
|
+
width: FILTER_INDICATOR_SIZE,
|
|
5787
|
+
height: FILTER_INDICATOR_SIZE,
|
|
5788
|
+
borderRadius: "50%",
|
|
5789
|
+
bgcolor: "secondary.main"
|
|
5790
|
+
}
|
|
5769
5791
|
}
|
|
5770
|
-
|
|
5771
|
-
)
|
|
5772
|
-
)
|
|
5792
|
+
) : null
|
|
5793
|
+
)
|
|
5794
|
+
), /* @__PURE__ */ React82.createElement(
|
|
5773
5795
|
Menu4,
|
|
5774
5796
|
{
|
|
5775
5797
|
...bindMenu3(popupState),
|
|
@@ -5803,7 +5825,384 @@ var IconLibraryFilter = ({ value, onChange }) => {
|
|
|
5803
5825
|
))
|
|
5804
5826
|
));
|
|
5805
5827
|
};
|
|
5806
|
-
var renderFilterMenuItemContent = (label, Icon, selected) => /* @__PURE__ */ React82.createElement(Stack13, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React82.createElement(Icon, { fontSize: "tiny" }), /* @__PURE__ */ React82.createElement(Typography7, { variant: "caption", sx: { flex: 1 } }, label), selected ? /* @__PURE__ */ React82.createElement(CheckIcon, { fontSize: "tiny" }) : null);
|
|
5828
|
+
var renderFilterMenuItemContent = (label, Icon, selected) => /* @__PURE__ */ React82.createElement(Stack13, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React82.createElement(Icon, { fontSize: "tiny" }), /* @__PURE__ */ React82.createElement(Typography7, { variant: "caption", sx: { flex: 1 } }, label), selected ? /* @__PURE__ */ React82.createElement(CheckIcon, { fontSize: "tiny", "aria-hidden": "true" }) : null);
|
|
5829
|
+
|
|
5830
|
+
// src/controls/icon-library/icon-library-grid.tsx
|
|
5831
|
+
import * as React83 from "react";
|
|
5832
|
+
import { useLayoutEffect as useLayoutEffect3, useRef as useRef15, useState as useState16 } from "react";
|
|
5833
|
+
import { Box as Box16, Tooltip as Tooltip9, useTheme as useTheme3 } from "@elementor/ui";
|
|
5834
|
+
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
5835
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
5836
|
+
var ICON_LIBRARY_GRID_FALLBACK_COLUMN_COUNT = 4;
|
|
5837
|
+
var ICON_LIBRARY_GRID_MIN_CELL_SIZE = 52;
|
|
5838
|
+
var ICON_LIBRARY_GRID_TOOLTIP_ENTER_DELAY = 1e3;
|
|
5839
|
+
var ICON_GLYPH_SIZE = 20;
|
|
5840
|
+
var GRID_OVERSCAN = 6;
|
|
5841
|
+
var GRID_COLUMN_GAP = 1;
|
|
5842
|
+
var GRID_HORIZONTAL_PADDING = 1;
|
|
5843
|
+
var HOME_END_KEYS = /* @__PURE__ */ new Set(["Home", "End"]);
|
|
5844
|
+
var getGridMetrics = (containerWidth, columnGap, inlinePadding) => {
|
|
5845
|
+
const availableWidth = containerWidth - inlinePadding;
|
|
5846
|
+
if (availableWidth <= 0) {
|
|
5847
|
+
return {
|
|
5848
|
+
columnCount: ICON_LIBRARY_GRID_FALLBACK_COLUMN_COUNT,
|
|
5849
|
+
cellSize: ICON_LIBRARY_GRID_MIN_CELL_SIZE
|
|
5850
|
+
};
|
|
5851
|
+
}
|
|
5852
|
+
const columnCount = Math.max(
|
|
5853
|
+
1,
|
|
5854
|
+
Math.floor((availableWidth + columnGap) / (ICON_LIBRARY_GRID_MIN_CELL_SIZE + columnGap))
|
|
5855
|
+
);
|
|
5856
|
+
const cellSize = Math.floor((availableWidth - columnGap * (columnCount - 1)) / columnCount);
|
|
5857
|
+
return {
|
|
5858
|
+
columnCount,
|
|
5859
|
+
cellSize: Math.max(cellSize, 1)
|
|
5860
|
+
};
|
|
5861
|
+
};
|
|
5862
|
+
var IconLibraryGrid = ({
|
|
5863
|
+
items: items2,
|
|
5864
|
+
selectedValue,
|
|
5865
|
+
onSelect,
|
|
5866
|
+
onClose,
|
|
5867
|
+
noResultsComponent
|
|
5868
|
+
}) => {
|
|
5869
|
+
const theme = useTheme3();
|
|
5870
|
+
const containerRef = useRef15(null);
|
|
5871
|
+
const cellRefs = useRef15(/* @__PURE__ */ new Map());
|
|
5872
|
+
const shouldRestoreFocusRef = useRef15(false);
|
|
5873
|
+
const selectedIndex = items2.findIndex((item) => item.id === selectedValue);
|
|
5874
|
+
const [focusedIndex, setFocusedIndex] = useState16(selectedIndex >= 0 ? selectedIndex : 0);
|
|
5875
|
+
const [{ columnCount, cellSize }, setGridMetrics] = useState16(() => getGridMetrics(0, 0, 0));
|
|
5876
|
+
const rowCount = Math.ceil(items2.length / columnCount);
|
|
5877
|
+
const virtualizer = useVirtualizer({
|
|
5878
|
+
count: rowCount,
|
|
5879
|
+
getScrollElement: () => containerRef.current,
|
|
5880
|
+
estimateSize: () => cellSize,
|
|
5881
|
+
overscan: GRID_OVERSCAN
|
|
5882
|
+
});
|
|
5883
|
+
const focusedItem = items2[focusedIndex];
|
|
5884
|
+
const visibleRowIndexes = virtualizer.getVirtualIndexes().join(",");
|
|
5885
|
+
useLayoutEffect3(() => {
|
|
5886
|
+
setFocusedIndex((current) => {
|
|
5887
|
+
if (items2.length === 0) {
|
|
5888
|
+
return 0;
|
|
5889
|
+
}
|
|
5890
|
+
if (selectedIndex >= 0) {
|
|
5891
|
+
return selectedIndex;
|
|
5892
|
+
}
|
|
5893
|
+
return Math.min(current, items2.length - 1);
|
|
5894
|
+
});
|
|
5895
|
+
if (selectedIndex >= 0) {
|
|
5896
|
+
virtualizer.scrollToIndex(Math.floor(selectedIndex / columnCount));
|
|
5897
|
+
}
|
|
5898
|
+
}, [columnCount, items2, selectedIndex, selectedValue]);
|
|
5899
|
+
useLayoutEffect3(() => {
|
|
5900
|
+
if (!shouldRestoreFocusRef.current || !focusedItem) {
|
|
5901
|
+
return;
|
|
5902
|
+
}
|
|
5903
|
+
const cell = cellRefs.current.get(focusedItem.id);
|
|
5904
|
+
if (!cell) {
|
|
5905
|
+
return;
|
|
5906
|
+
}
|
|
5907
|
+
cell.focus();
|
|
5908
|
+
shouldRestoreFocusRef.current = false;
|
|
5909
|
+
}, [focusedItem, visibleRowIndexes]);
|
|
5910
|
+
useLayoutEffect3(() => {
|
|
5911
|
+
const container = containerRef.current;
|
|
5912
|
+
if (!container) {
|
|
5913
|
+
return;
|
|
5914
|
+
}
|
|
5915
|
+
const measureGrid = () => {
|
|
5916
|
+
const columnGap = Number.parseFloat(theme.spacing(GRID_COLUMN_GAP));
|
|
5917
|
+
const inlinePadding = Number.parseFloat(theme.spacing(GRID_HORIZONTAL_PADDING)) * 2;
|
|
5918
|
+
setGridMetrics(getGridMetrics(container.clientWidth, columnGap, inlinePadding));
|
|
5919
|
+
};
|
|
5920
|
+
measureGrid();
|
|
5921
|
+
const resizeObserver = new ResizeObserver(measureGrid);
|
|
5922
|
+
resizeObserver.observe(container);
|
|
5923
|
+
return () => {
|
|
5924
|
+
resizeObserver.disconnect();
|
|
5925
|
+
};
|
|
5926
|
+
}, [theme, items2.length]);
|
|
5927
|
+
useLayoutEffect3(() => {
|
|
5928
|
+
virtualizer.measure();
|
|
5929
|
+
}, [cellSize, columnCount]);
|
|
5930
|
+
const isRtl = theme.direction === "rtl" || document.documentElement.dir === "rtl";
|
|
5931
|
+
const horizontalOffset = isRtl ? -1 : 1;
|
|
5932
|
+
const moveFocus = (nextIndex) => {
|
|
5933
|
+
if (nextIndex < 0 || nextIndex >= items2.length) {
|
|
5934
|
+
return;
|
|
5935
|
+
}
|
|
5936
|
+
shouldRestoreFocusRef.current = true;
|
|
5937
|
+
setFocusedIndex(nextIndex);
|
|
5938
|
+
virtualizer.scrollToIndex(Math.floor(nextIndex / columnCount));
|
|
5939
|
+
};
|
|
5940
|
+
const handleKeyDown = (event, index) => {
|
|
5941
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
5942
|
+
event.preventDefault();
|
|
5943
|
+
onSelect(items2[index].id);
|
|
5944
|
+
onClose();
|
|
5945
|
+
return;
|
|
5946
|
+
}
|
|
5947
|
+
if (event.key === "ArrowRight") {
|
|
5948
|
+
event.preventDefault();
|
|
5949
|
+
moveFocus(index + horizontalOffset);
|
|
5950
|
+
return;
|
|
5951
|
+
}
|
|
5952
|
+
if (event.key === "ArrowLeft") {
|
|
5953
|
+
event.preventDefault();
|
|
5954
|
+
moveFocus(index - horizontalOffset);
|
|
5955
|
+
return;
|
|
5956
|
+
}
|
|
5957
|
+
if (event.key === "ArrowDown") {
|
|
5958
|
+
event.preventDefault();
|
|
5959
|
+
moveFocus(index + columnCount);
|
|
5960
|
+
return;
|
|
5961
|
+
}
|
|
5962
|
+
if (event.key === "ArrowUp") {
|
|
5963
|
+
event.preventDefault();
|
|
5964
|
+
moveFocus(index - columnCount);
|
|
5965
|
+
return;
|
|
5966
|
+
}
|
|
5967
|
+
if (HOME_END_KEYS.has(event.key)) {
|
|
5968
|
+
event.preventDefault();
|
|
5969
|
+
if (event.ctrlKey) {
|
|
5970
|
+
moveFocus(event.key === "Home" ? 0 : items2.length - 1);
|
|
5971
|
+
return;
|
|
5972
|
+
}
|
|
5973
|
+
const rowStart = Math.floor(index / columnCount) * columnCount;
|
|
5974
|
+
const rowEnd = Math.min(rowStart + columnCount - 1, items2.length - 1);
|
|
5975
|
+
moveFocus(event.key === "Home" ? rowStart : rowEnd);
|
|
5976
|
+
}
|
|
5977
|
+
};
|
|
5978
|
+
return /* @__PURE__ */ React83.createElement(
|
|
5979
|
+
Box16,
|
|
5980
|
+
{
|
|
5981
|
+
ref: containerRef,
|
|
5982
|
+
sx: {
|
|
5983
|
+
width: "100%",
|
|
5984
|
+
height: "100%",
|
|
5985
|
+
minWidth: 0,
|
|
5986
|
+
overflowX: "hidden",
|
|
5987
|
+
overflowY: "auto"
|
|
5988
|
+
}
|
|
5989
|
+
},
|
|
5990
|
+
items2.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React83.createElement(
|
|
5991
|
+
Box16,
|
|
5992
|
+
{
|
|
5993
|
+
role: "grid",
|
|
5994
|
+
"aria-label": __33("Icons", "elementor"),
|
|
5995
|
+
"aria-rowcount": rowCount,
|
|
5996
|
+
"aria-colcount": columnCount,
|
|
5997
|
+
"data-testid": "icon-library-grid",
|
|
5998
|
+
sx: {
|
|
5999
|
+
width: "100%",
|
|
6000
|
+
minWidth: 0,
|
|
6001
|
+
height: virtualizer.getTotalSize(),
|
|
6002
|
+
position: "relative"
|
|
6003
|
+
}
|
|
6004
|
+
},
|
|
6005
|
+
virtualizer.getVirtualItems().map((virtualRow) => {
|
|
6006
|
+
const startIndex = virtualRow.index * columnCount;
|
|
6007
|
+
const rowItems = items2.slice(startIndex, startIndex + columnCount);
|
|
6008
|
+
return /* @__PURE__ */ React83.createElement(
|
|
6009
|
+
Box16,
|
|
6010
|
+
{
|
|
6011
|
+
key: virtualRow.key,
|
|
6012
|
+
role: "row",
|
|
6013
|
+
"aria-rowindex": virtualRow.index + 1,
|
|
6014
|
+
sx: {
|
|
6015
|
+
position: "absolute",
|
|
6016
|
+
top: 0,
|
|
6017
|
+
left: 0,
|
|
6018
|
+
width: "100%",
|
|
6019
|
+
height: virtualRow.size,
|
|
6020
|
+
transform: `translateY(${virtualRow.start}px)`,
|
|
6021
|
+
display: "grid",
|
|
6022
|
+
gridTemplateColumns: `repeat(${columnCount}, minmax(0, 1fr))`,
|
|
6023
|
+
gap: GRID_COLUMN_GAP,
|
|
6024
|
+
px: GRID_HORIZONTAL_PADDING,
|
|
6025
|
+
boxSizing: "border-box"
|
|
6026
|
+
}
|
|
6027
|
+
},
|
|
6028
|
+
rowItems.map((item, columnIndex) => {
|
|
6029
|
+
const index = startIndex + columnIndex;
|
|
6030
|
+
const isSelected = selectedValue === item.id;
|
|
6031
|
+
const tabIndex = focusedIndex === index ? 0 : -1;
|
|
6032
|
+
return /* @__PURE__ */ React83.createElement(
|
|
6033
|
+
Box16,
|
|
6034
|
+
{
|
|
6035
|
+
key: item.id,
|
|
6036
|
+
role: "presentation",
|
|
6037
|
+
sx: { minWidth: 0, minHeight: 0, width: "100%", height: "100%" }
|
|
6038
|
+
},
|
|
6039
|
+
/* @__PURE__ */ React83.createElement(
|
|
6040
|
+
Tooltip9,
|
|
6041
|
+
{
|
|
6042
|
+
title: item.label,
|
|
6043
|
+
placement: "top",
|
|
6044
|
+
enterDelay: ICON_LIBRARY_GRID_TOOLTIP_ENTER_DELAY,
|
|
6045
|
+
enterNextDelay: ICON_LIBRARY_GRID_TOOLTIP_ENTER_DELAY,
|
|
6046
|
+
disableInteractive: true,
|
|
6047
|
+
disableFocusListener: true
|
|
6048
|
+
},
|
|
6049
|
+
/* @__PURE__ */ React83.createElement(
|
|
6050
|
+
Box16,
|
|
6051
|
+
{
|
|
6052
|
+
component: "button",
|
|
6053
|
+
type: "button",
|
|
6054
|
+
role: "gridcell",
|
|
6055
|
+
"aria-colindex": columnIndex + 1,
|
|
6056
|
+
"aria-label": item.label,
|
|
6057
|
+
"aria-selected": isSelected,
|
|
6058
|
+
tabIndex,
|
|
6059
|
+
ref: (node) => {
|
|
6060
|
+
if (node) {
|
|
6061
|
+
cellRefs.current.set(item.id, node);
|
|
6062
|
+
} else {
|
|
6063
|
+
cellRefs.current.delete(item.id);
|
|
6064
|
+
}
|
|
6065
|
+
},
|
|
6066
|
+
onClick: () => {
|
|
6067
|
+
onSelect(item.id);
|
|
6068
|
+
onClose();
|
|
6069
|
+
},
|
|
6070
|
+
onFocus: () => setFocusedIndex(index),
|
|
6071
|
+
onKeyDown: (event) => handleKeyDown(event, index),
|
|
6072
|
+
sx: {
|
|
6073
|
+
boxSizing: "border-box",
|
|
6074
|
+
appearance: "none",
|
|
6075
|
+
m: 0,
|
|
6076
|
+
width: "100%",
|
|
6077
|
+
height: "100%",
|
|
6078
|
+
minWidth: 0,
|
|
6079
|
+
minHeight: 0,
|
|
6080
|
+
display: "flex",
|
|
6081
|
+
alignItems: "center",
|
|
6082
|
+
justifyContent: "center",
|
|
6083
|
+
border: "1px solid",
|
|
6084
|
+
borderColor: "divider",
|
|
6085
|
+
borderRadius: 1,
|
|
6086
|
+
color: "text.tertiary",
|
|
6087
|
+
bgcolor: "transparent",
|
|
6088
|
+
p: 0,
|
|
6089
|
+
cursor: "pointer",
|
|
6090
|
+
font: "inherit",
|
|
6091
|
+
lineHeight: 0,
|
|
6092
|
+
overflow: "hidden",
|
|
6093
|
+
"&:hover, &:focus": {
|
|
6094
|
+
bgcolor: "action.hover"
|
|
6095
|
+
},
|
|
6096
|
+
'&[aria-selected="true"]': {
|
|
6097
|
+
bgcolor: "action.selected"
|
|
6098
|
+
},
|
|
6099
|
+
'&[aria-selected="true"]:hover, &[aria-selected="true"]:focus': {
|
|
6100
|
+
bgcolor: "action.selected"
|
|
6101
|
+
}
|
|
6102
|
+
}
|
|
6103
|
+
},
|
|
6104
|
+
item.paths.length > 0 ? /* @__PURE__ */ React83.createElement(
|
|
6105
|
+
FontAwesomeGlyph,
|
|
6106
|
+
{
|
|
6107
|
+
icon: item,
|
|
6108
|
+
size: ICON_GLYPH_SIZE,
|
|
6109
|
+
color: "currentColor"
|
|
6110
|
+
}
|
|
6111
|
+
) : null
|
|
6112
|
+
)
|
|
6113
|
+
)
|
|
6114
|
+
);
|
|
6115
|
+
})
|
|
6116
|
+
);
|
|
6117
|
+
})
|
|
6118
|
+
)
|
|
6119
|
+
);
|
|
6120
|
+
};
|
|
6121
|
+
|
|
6122
|
+
// src/controls/icon-library/icon-library-view-toggle.tsx
|
|
6123
|
+
import * as React84 from "react";
|
|
6124
|
+
import { useId as useId5 } from "react";
|
|
6125
|
+
import { CheckIcon as CheckIcon2, ListIcon as ListIcon2, WidgetsIcon } from "@elementor/icons";
|
|
6126
|
+
import {
|
|
6127
|
+
bindMenu as bindMenu4,
|
|
6128
|
+
bindToggle as bindToggle3,
|
|
6129
|
+
Menu as Menu5,
|
|
6130
|
+
MenuItem as MenuItem3,
|
|
6131
|
+
Stack as Stack14,
|
|
6132
|
+
ToggleButton as ToggleButton3,
|
|
6133
|
+
Tooltip as Tooltip10,
|
|
6134
|
+
Typography as Typography8,
|
|
6135
|
+
usePopupState as usePopupState9
|
|
6136
|
+
} from "@elementor/ui";
|
|
6137
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
6138
|
+
var VIEW_MENU_WIDTH = 122;
|
|
6139
|
+
var IconLibraryViewToggle = ({ value, onChange }) => {
|
|
6140
|
+
const popupId = useId5();
|
|
6141
|
+
const popupState = usePopupState9({
|
|
6142
|
+
variant: "popover",
|
|
6143
|
+
popupId
|
|
6144
|
+
});
|
|
6145
|
+
const isGrid = value === "grid";
|
|
6146
|
+
const ViewIcon = isGrid ? WidgetsIcon : ListIcon2;
|
|
6147
|
+
const viewButtonLabel = isGrid ? __34("Grid view", "elementor") : __34("List view", "elementor");
|
|
6148
|
+
return /* @__PURE__ */ React84.createElement(React84.Fragment, null, /* @__PURE__ */ React84.createElement(
|
|
6149
|
+
Tooltip10,
|
|
6150
|
+
{
|
|
6151
|
+
title: viewButtonLabel,
|
|
6152
|
+
placement: "top",
|
|
6153
|
+
enterDelay: ICON_LIBRARY_ACTION_TOOLTIP_ENTER_DELAY,
|
|
6154
|
+
enterNextDelay: ICON_LIBRARY_ACTION_TOOLTIP_ENTER_DELAY,
|
|
6155
|
+
disableInteractive: true
|
|
6156
|
+
},
|
|
6157
|
+
/* @__PURE__ */ React84.createElement(
|
|
6158
|
+
ToggleButton3,
|
|
6159
|
+
{
|
|
6160
|
+
"aria-label": viewButtonLabel,
|
|
6161
|
+
value: "view",
|
|
6162
|
+
size: "tiny",
|
|
6163
|
+
selected: popupState.isOpen,
|
|
6164
|
+
sx: { flexShrink: 0 },
|
|
6165
|
+
...bindToggle3(popupState),
|
|
6166
|
+
"aria-expanded": popupState.isOpen
|
|
6167
|
+
},
|
|
6168
|
+
/* @__PURE__ */ React84.createElement(ViewIcon, { fontSize: "tiny" })
|
|
6169
|
+
)
|
|
6170
|
+
), /* @__PURE__ */ React84.createElement(
|
|
6171
|
+
Menu5,
|
|
6172
|
+
{
|
|
6173
|
+
...bindMenu4(popupState),
|
|
6174
|
+
MenuListProps: {
|
|
6175
|
+
dense: true,
|
|
6176
|
+
autoFocusItem: true,
|
|
6177
|
+
"aria-label": __34("View", "elementor")
|
|
6178
|
+
},
|
|
6179
|
+
sx: { "& .MuiPaper-root": { minWidth: VIEW_MENU_WIDTH } }
|
|
6180
|
+
},
|
|
6181
|
+
/* @__PURE__ */ React84.createElement(
|
|
6182
|
+
ViewMenuItem,
|
|
6183
|
+
{
|
|
6184
|
+
label: __34("List", "elementor"),
|
|
6185
|
+
selected: value === "list",
|
|
6186
|
+
onClick: () => {
|
|
6187
|
+
onChange("list");
|
|
6188
|
+
popupState.close();
|
|
6189
|
+
}
|
|
6190
|
+
}
|
|
6191
|
+
),
|
|
6192
|
+
/* @__PURE__ */ React84.createElement(
|
|
6193
|
+
ViewMenuItem,
|
|
6194
|
+
{
|
|
6195
|
+
label: __34("Grid", "elementor"),
|
|
6196
|
+
selected: value === "grid",
|
|
6197
|
+
onClick: () => {
|
|
6198
|
+
onChange("grid");
|
|
6199
|
+
popupState.close();
|
|
6200
|
+
}
|
|
6201
|
+
}
|
|
6202
|
+
)
|
|
6203
|
+
));
|
|
6204
|
+
};
|
|
6205
|
+
var ViewMenuItem = ({ label, selected, onClick }) => /* @__PURE__ */ React84.createElement(MenuItem3, { role: "menuitemradio", "aria-checked": selected, selected, onClick }, /* @__PURE__ */ React84.createElement(Stack14, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React84.createElement(Typography8, { variant: "caption", sx: { flex: 1 } }, label), selected ? /* @__PURE__ */ React84.createElement(CheckIcon2, { fontSize: "tiny", "aria-hidden": "true" }) : null));
|
|
5807
6206
|
|
|
5808
6207
|
// src/controls/icon-library/use-font-awesome-7-catalog.ts
|
|
5809
6208
|
import { useQuery as useQuery2 } from "@elementor/query";
|
|
@@ -5821,8 +6220,14 @@ function useFontAwesome7Catalog(enabled) {
|
|
|
5821
6220
|
var ICON_LIBRARY_POPOVER_WIDTH = 300;
|
|
5822
6221
|
var ICON_LIBRARY_ROW_HEIGHT = 48;
|
|
5823
6222
|
var ICON_LIBRARY_SEARCH_DEBOUNCE_DELAY = 300;
|
|
6223
|
+
var ICON_LIBRARY_VIEW_STORAGE_KEY = "icon-library-view";
|
|
6224
|
+
var ICON_LIBRARY_VIEW_STORAGE_PREFIX = "editor-controls";
|
|
6225
|
+
var DEFAULT_ICON_LIBRARY_VIEW = "list";
|
|
6226
|
+
var isIconLibraryView = (value) => {
|
|
6227
|
+
return value === "grid" || value === "list";
|
|
6228
|
+
};
|
|
5824
6229
|
var ICON_TILE_SIZE = 40;
|
|
5825
|
-
var
|
|
6230
|
+
var ICON_GLYPH_SIZE2 = 20;
|
|
5826
6231
|
var ICON_LIBRARY_INLINE_SPACING = 1;
|
|
5827
6232
|
var CompactIconLibraryMenuList = styled9(StyledMenuList)(({ theme }) => ({
|
|
5828
6233
|
'& > [role="option"]': {
|
|
@@ -5843,7 +6248,12 @@ var IconLibraryPopover = ({
|
|
|
5843
6248
|
handleChange: handleSearchChange,
|
|
5844
6249
|
setImmediateValue: setSearchValue
|
|
5845
6250
|
} = useDebounceState({ delay: ICON_LIBRARY_SEARCH_DEBOUNCE_DELAY });
|
|
5846
|
-
const [activeLibraries, setActiveLibraries] =
|
|
6251
|
+
const [activeLibraries, setActiveLibraries] = useState17([]);
|
|
6252
|
+
const [storedView, setStoredView] = useSessionStorage2(
|
|
6253
|
+
ICON_LIBRARY_VIEW_STORAGE_KEY,
|
|
6254
|
+
ICON_LIBRARY_VIEW_STORAGE_PREFIX
|
|
6255
|
+
);
|
|
6256
|
+
const view = isIconLibraryView(storedView) ? storedView : DEFAULT_ICON_LIBRARY_VIEW;
|
|
5847
6257
|
const { data: icons = [], isLoading } = useFontAwesome7Catalog(open);
|
|
5848
6258
|
const items2 = useMemo12(
|
|
5849
6259
|
() => createIconLibraryItems(icons, searchValue, activeLibraries),
|
|
@@ -5871,24 +6281,25 @@ var IconLibraryPopover = ({
|
|
|
5871
6281
|
const handleClearSearch = () => {
|
|
5872
6282
|
setSearchValue("");
|
|
5873
6283
|
};
|
|
5874
|
-
return /* @__PURE__ */
|
|
6284
|
+
return /* @__PURE__ */ React85.createElement(PopoverBody2, { width, fillWidth: true, id: "icon-library" }, /* @__PURE__ */ React85.createElement(
|
|
5875
6285
|
PopoverHeader4,
|
|
5876
6286
|
{
|
|
5877
|
-
title:
|
|
6287
|
+
title: __35("Icon library", "elementor"),
|
|
5878
6288
|
onClose: handleClose,
|
|
5879
|
-
icon: /* @__PURE__ */
|
|
6289
|
+
icon: /* @__PURE__ */ React85.createElement(ComponentsIcon, { fontSize: "tiny" }),
|
|
6290
|
+
actions: [/* @__PURE__ */ React85.createElement(IconLibraryViewToggle, { key: "view", value: view, onChange: setStoredView })],
|
|
5880
6291
|
sx: { pl: ICON_LIBRARY_INLINE_SPACING, pr: 0.5 }
|
|
5881
6292
|
}
|
|
5882
|
-
), /* @__PURE__ */
|
|
6293
|
+
), /* @__PURE__ */ React85.createElement(Stack15, { direction: "row", alignItems: "center", gap: 1, sx: { px: ICON_LIBRARY_INLINE_SPACING, pb: 1 } }, /* @__PURE__ */ React85.createElement(
|
|
5883
6294
|
SearchField2,
|
|
5884
6295
|
{
|
|
5885
6296
|
value: searchInputValue,
|
|
5886
6297
|
onSearch: handleSearchChange,
|
|
5887
|
-
placeholder:
|
|
6298
|
+
placeholder: __35("Search", "elementor"),
|
|
5888
6299
|
id: "icon-library-search",
|
|
5889
6300
|
sx: { flex: 1, px: 0, pb: 0 }
|
|
5890
6301
|
}
|
|
5891
|
-
), /* @__PURE__ */
|
|
6302
|
+
), /* @__PURE__ */ React85.createElement(IconLibraryFilter, { value: activeLibraries, onChange: setActiveLibraries })), /* @__PURE__ */ React85.createElement(Divider4, null), /* @__PURE__ */ React85.createElement(Box17, { sx: { flex: 1, overflow: "hidden", minHeight: 0, minWidth: 0 } }, /* @__PURE__ */ React85.createElement(
|
|
5892
6303
|
IconLibraryContent,
|
|
5893
6304
|
{
|
|
5894
6305
|
isLoading,
|
|
@@ -5896,6 +6307,7 @@ var IconLibraryPopover = ({
|
|
|
5896
6307
|
selectedValue,
|
|
5897
6308
|
searchValue,
|
|
5898
6309
|
isCatalogAvailable: icons.length > 0,
|
|
6310
|
+
view,
|
|
5899
6311
|
onSelect: handleSelect,
|
|
5900
6312
|
onClose: handleClose,
|
|
5901
6313
|
onClearSearch: handleClearSearch
|
|
@@ -5908,14 +6320,35 @@ var IconLibraryContent = ({
|
|
|
5908
6320
|
selectedValue,
|
|
5909
6321
|
searchValue,
|
|
5910
6322
|
isCatalogAvailable,
|
|
6323
|
+
view,
|
|
5911
6324
|
onSelect,
|
|
5912
6325
|
onClose,
|
|
5913
6326
|
onClearSearch
|
|
5914
6327
|
}) => {
|
|
5915
6328
|
if (isLoading) {
|
|
5916
|
-
return /* @__PURE__ */
|
|
6329
|
+
return /* @__PURE__ */ React85.createElement(IconLibraryLoadingState, null);
|
|
5917
6330
|
}
|
|
5918
|
-
|
|
6331
|
+
const emptyState = /* @__PURE__ */ React85.createElement(
|
|
6332
|
+
IconLibraryEmptyState,
|
|
6333
|
+
{
|
|
6334
|
+
searchValue,
|
|
6335
|
+
isCatalogAvailable,
|
|
6336
|
+
onClear: onClearSearch
|
|
6337
|
+
}
|
|
6338
|
+
);
|
|
6339
|
+
if (view === "grid") {
|
|
6340
|
+
return /* @__PURE__ */ React85.createElement(Box17, { sx: { width: "100%", height: "100%", minWidth: 0, minHeight: 0 } }, /* @__PURE__ */ React85.createElement(
|
|
6341
|
+
IconLibraryGrid,
|
|
6342
|
+
{
|
|
6343
|
+
items: items2,
|
|
6344
|
+
selectedValue,
|
|
6345
|
+
onSelect,
|
|
6346
|
+
onClose,
|
|
6347
|
+
noResultsComponent: emptyState
|
|
6348
|
+
}
|
|
6349
|
+
));
|
|
6350
|
+
}
|
|
6351
|
+
return /* @__PURE__ */ React85.createElement(
|
|
5919
6352
|
PopoverMenuList2,
|
|
5920
6353
|
{
|
|
5921
6354
|
items: items2,
|
|
@@ -5925,33 +6358,26 @@ var IconLibraryContent = ({
|
|
|
5925
6358
|
onClose,
|
|
5926
6359
|
itemHeight: ICON_LIBRARY_ROW_HEIGHT,
|
|
5927
6360
|
menuItemContentTemplate: IconLibraryRow,
|
|
5928
|
-
noResultsComponent:
|
|
5929
|
-
IconLibraryEmptyState,
|
|
5930
|
-
{
|
|
5931
|
-
searchValue,
|
|
5932
|
-
isCatalogAvailable,
|
|
5933
|
-
onClear: onClearSearch
|
|
5934
|
-
}
|
|
5935
|
-
),
|
|
6361
|
+
noResultsComponent: emptyState,
|
|
5936
6362
|
"data-testid": "icon-library-list"
|
|
5937
6363
|
}
|
|
5938
6364
|
);
|
|
5939
6365
|
};
|
|
5940
|
-
var IconLibraryLoadingState = () => /* @__PURE__ */
|
|
6366
|
+
var IconLibraryLoadingState = () => /* @__PURE__ */ React85.createElement(Stack15, { alignItems: "center", justifyContent: "center", height: "100%" }, /* @__PURE__ */ React85.createElement(CircularProgress3, { role: "progressbar", size: 24 }));
|
|
5941
6367
|
var IconLibraryEmptyState = ({
|
|
5942
6368
|
searchValue,
|
|
5943
6369
|
isCatalogAvailable,
|
|
5944
6370
|
onClear
|
|
5945
6371
|
}) => {
|
|
5946
6372
|
if (!isCatalogAvailable) {
|
|
5947
|
-
return /* @__PURE__ */
|
|
6373
|
+
return /* @__PURE__ */ React85.createElement(CatalogUnavailable, null);
|
|
5948
6374
|
}
|
|
5949
|
-
return /* @__PURE__ */
|
|
6375
|
+
return /* @__PURE__ */ React85.createElement(NoResults, { searchValue, onClear });
|
|
5950
6376
|
};
|
|
5951
6377
|
var IconLibraryRow = (item) => {
|
|
5952
6378
|
const icon = item;
|
|
5953
|
-
return /* @__PURE__ */
|
|
5954
|
-
|
|
6379
|
+
return /* @__PURE__ */ React85.createElement(Stack15, { direction: "row", alignItems: "center", gap: 1, sx: { width: "100%" } }, /* @__PURE__ */ React85.createElement(
|
|
6380
|
+
Box17,
|
|
5955
6381
|
{
|
|
5956
6382
|
sx: {
|
|
5957
6383
|
width: ICON_TILE_SIZE,
|
|
@@ -5966,11 +6392,11 @@ var IconLibraryRow = (item) => {
|
|
|
5966
6392
|
flexShrink: 0
|
|
5967
6393
|
}
|
|
5968
6394
|
},
|
|
5969
|
-
icon.paths.length > 0 ? /* @__PURE__ */
|
|
5970
|
-
), /* @__PURE__ */
|
|
6395
|
+
icon.paths.length > 0 ? /* @__PURE__ */ React85.createElement(FontAwesomeGlyph, { icon, size: ICON_GLYPH_SIZE2, color: "currentColor" }) : null
|
|
6396
|
+
), /* @__PURE__ */ React85.createElement(Typography9, { variant: "caption", color: "text.primary", noWrap: true }, icon.label));
|
|
5971
6397
|
};
|
|
5972
|
-
var CatalogUnavailable = () => /* @__PURE__ */
|
|
5973
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
6398
|
+
var CatalogUnavailable = () => /* @__PURE__ */ React85.createElement(Stack15, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React85.createElement(ComponentsIcon, { fontSize: "large" }), /* @__PURE__ */ React85.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary" }, __35("Icons couldn't be loaded.", "elementor")));
|
|
6399
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React85.createElement(Stack15, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React85.createElement(ComponentsIcon, { fontSize: "large" }), /* @__PURE__ */ React85.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary" }, __35("Sorry, nothing matched", "elementor")), searchValue ? /* @__PURE__ */ React85.createElement(React85.Fragment, null, /* @__PURE__ */ React85.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary", noWrap: true, sx: { maxWidth: "80%" } }, "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React85.createElement(Link3, { color: "secondary", variant: "caption", component: "button", type: "button", onClick: onClear }, __35("Clear & try again", "elementor"))) : null);
|
|
5974
6400
|
var createIconLibraryItems = (icons, searchValue, libraries) => filterFontAwesome7Icons(icons, searchValue, libraries).map((icon) => ({
|
|
5975
6401
|
...icon,
|
|
5976
6402
|
type: "item",
|
|
@@ -5987,10 +6413,10 @@ function createIconPropValue(icon, library) {
|
|
|
5987
6413
|
}
|
|
5988
6414
|
|
|
5989
6415
|
// src/controls/svg-media-overlay.tsx
|
|
5990
|
-
import * as
|
|
6416
|
+
import * as React86 from "react";
|
|
5991
6417
|
import { LibraryIcon as LibraryIcon2, UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
5992
|
-
import { Box as
|
|
5993
|
-
import { __ as
|
|
6418
|
+
import { Box as Box18, Button as Button5, Stack as Stack16, styled as styled10, ThemeProvider, Typography as Typography10 } from "@elementor/ui";
|
|
6419
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
5994
6420
|
var SVG_MEDIA_CONTROL_CONTAINER_TEST_ID = "svg-media-control-container";
|
|
5995
6421
|
var SVG_MEDIA_ACTION_GROUP_TEST_ID = "svg-media-action-group";
|
|
5996
6422
|
var MEDIA_ACTION_PADDING_Y = 0.75;
|
|
@@ -6000,7 +6426,7 @@ var svgButtonSx = {
|
|
|
6000
6426
|
px: MEDIA_ACTION_PADDING_X,
|
|
6001
6427
|
py: MEDIA_ACTION_PADDING_Y
|
|
6002
6428
|
};
|
|
6003
|
-
var MediaActionGroup = styled10(
|
|
6429
|
+
var MediaActionGroup = styled10(Stack16)(({ theme }) => ({
|
|
6004
6430
|
display: "inline-flex",
|
|
6005
6431
|
flexDirection: "row",
|
|
6006
6432
|
alignItems: "stretch",
|
|
@@ -6022,19 +6448,19 @@ var SvgMediaOverlay = ({
|
|
|
6022
6448
|
onOpenIconLibrary,
|
|
6023
6449
|
infotipTitle,
|
|
6024
6450
|
infotipDescription
|
|
6025
|
-
}) => /* @__PURE__ */
|
|
6451
|
+
}) => /* @__PURE__ */ React86.createElement(Stack16, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React86.createElement(MediaActionGroup, { ref: buttonGroupRef, direction: "row", "data-testid": SVG_MEDIA_ACTION_GROUP_TEST_ID }, /* @__PURE__ */ React86.createElement(
|
|
6026
6452
|
Button5,
|
|
6027
6453
|
{
|
|
6028
6454
|
size: "tiny",
|
|
6029
6455
|
color: "inherit",
|
|
6030
6456
|
variant: "text",
|
|
6031
6457
|
onClick: onSelectSvg,
|
|
6032
|
-
"aria-label":
|
|
6458
|
+
"aria-label": __36("Select", "elementor"),
|
|
6033
6459
|
sx: svgButtonSx
|
|
6034
6460
|
},
|
|
6035
|
-
|
|
6036
|
-
), /* @__PURE__ */
|
|
6037
|
-
|
|
6461
|
+
__36("Select", "elementor")
|
|
6462
|
+
), /* @__PURE__ */ React86.createElement(
|
|
6463
|
+
Box18,
|
|
6038
6464
|
{
|
|
6039
6465
|
sx: {
|
|
6040
6466
|
width: "1px",
|
|
@@ -6043,22 +6469,22 @@ var SvgMediaOverlay = ({
|
|
|
6043
6469
|
flexShrink: 0
|
|
6044
6470
|
}
|
|
6045
6471
|
}
|
|
6046
|
-
), /* @__PURE__ */
|
|
6472
|
+
), /* @__PURE__ */ React86.createElement(
|
|
6047
6473
|
ConditionalControlInfotip,
|
|
6048
6474
|
{
|
|
6049
6475
|
title: infotipTitle,
|
|
6050
6476
|
description: infotipDescription,
|
|
6051
6477
|
isEnabled: !isAdmin
|
|
6052
6478
|
},
|
|
6053
|
-
/* @__PURE__ */
|
|
6054
|
-
)), showIconLibrary ? /* @__PURE__ */
|
|
6479
|
+
/* @__PURE__ */ React86.createElement(Box18, { component: "span", sx: { display: "inline-flex" } }, /* @__PURE__ */ React86.createElement(UploadControl, { isAdmin, onUpload }))
|
|
6480
|
+
)), showIconLibrary ? /* @__PURE__ */ React86.createElement(
|
|
6055
6481
|
Button5,
|
|
6056
6482
|
{
|
|
6057
6483
|
size: "tiny",
|
|
6058
6484
|
color: "inherit",
|
|
6059
6485
|
variant: "text",
|
|
6060
|
-
startIcon: /* @__PURE__ */
|
|
6061
|
-
"aria-label":
|
|
6486
|
+
startIcon: /* @__PURE__ */ React86.createElement(LibraryIcon2, { sx: { height: "18px", width: "16px" } }),
|
|
6487
|
+
"aria-label": __36("Icon library", "elementor"),
|
|
6062
6488
|
onClick: onOpenIconLibrary,
|
|
6063
6489
|
sx: {
|
|
6064
6490
|
height: "28px",
|
|
@@ -6066,19 +6492,19 @@ var SvgMediaOverlay = ({
|
|
|
6066
6492
|
".MuiButton-icon": { ml: 0 }
|
|
6067
6493
|
}
|
|
6068
6494
|
},
|
|
6069
|
-
/* @__PURE__ */
|
|
6495
|
+
/* @__PURE__ */ React86.createElement(Typography10, null, __36("Icon library", "elementor"))
|
|
6070
6496
|
) : null);
|
|
6071
6497
|
var UploadControl = ({ isAdmin, onUpload }) => {
|
|
6072
6498
|
if (isAdmin) {
|
|
6073
|
-
return /* @__PURE__ */
|
|
6499
|
+
return /* @__PURE__ */ React86.createElement(UploadButton, { sx: svgButtonSx, onClick: onUpload });
|
|
6074
6500
|
}
|
|
6075
|
-
return /* @__PURE__ */
|
|
6501
|
+
return /* @__PURE__ */ React86.createElement(ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React86.createElement(UploadButton, { disabled: true, sx: svgButtonSx }));
|
|
6076
6502
|
};
|
|
6077
6503
|
var UploadButton = ({
|
|
6078
6504
|
disabled = false,
|
|
6079
6505
|
sx,
|
|
6080
6506
|
onClick
|
|
6081
|
-
}) => /* @__PURE__ */
|
|
6507
|
+
}) => /* @__PURE__ */ React86.createElement(
|
|
6082
6508
|
Button5,
|
|
6083
6509
|
{
|
|
6084
6510
|
sx,
|
|
@@ -6087,15 +6513,15 @@ var UploadButton = ({
|
|
|
6087
6513
|
variant: "text",
|
|
6088
6514
|
disabled,
|
|
6089
6515
|
onClick,
|
|
6090
|
-
"aria-label":
|
|
6516
|
+
"aria-label": __36("Upload", "elementor")
|
|
6091
6517
|
},
|
|
6092
|
-
/* @__PURE__ */
|
|
6518
|
+
/* @__PURE__ */ React86.createElement(UploadIcon2, null)
|
|
6093
6519
|
);
|
|
6094
6520
|
|
|
6095
6521
|
// src/controls/svg-media-preview.tsx
|
|
6096
|
-
import * as
|
|
6097
|
-
import { Box as
|
|
6098
|
-
import { __ as
|
|
6522
|
+
import * as React87 from "react";
|
|
6523
|
+
import { Box as Box19, CardMedia as CardMedia2, CircularProgress as CircularProgress4 } from "@elementor/ui";
|
|
6524
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
6099
6525
|
var ICON_PREVIEW_SIZE = 50;
|
|
6100
6526
|
var ICON_PREVIEW_COLOR = "#000000";
|
|
6101
6527
|
var SvgMediaPreview = ({ isFetching, src, iconClassName, iconLibrary }) => {
|
|
@@ -6103,27 +6529,27 @@ var SvgMediaPreview = ({ isFetching, src, iconClassName, iconLibrary }) => {
|
|
|
6103
6529
|
const { data: icons = [], isLoading } = useFontAwesome7Catalog(shouldLoadIconCatalog);
|
|
6104
6530
|
const selectedIcon = findFontAwesome7Icon(icons, iconClassName, iconLibrary);
|
|
6105
6531
|
if (isFetching || shouldLoadIconCatalog && isLoading) {
|
|
6106
|
-
return /* @__PURE__ */
|
|
6532
|
+
return /* @__PURE__ */ React87.createElement(CircularProgress4, { role: "progressbar" });
|
|
6107
6533
|
}
|
|
6108
6534
|
if (selectedIcon) {
|
|
6109
|
-
return /* @__PURE__ */
|
|
6535
|
+
return /* @__PURE__ */ React87.createElement(IconPreview, { icon: selectedIcon });
|
|
6110
6536
|
}
|
|
6111
6537
|
if (shouldLoadIconCatalog) {
|
|
6112
|
-
return /* @__PURE__ */
|
|
6538
|
+
return /* @__PURE__ */ React87.createElement(IconPreviewPlaceholder, null);
|
|
6113
6539
|
}
|
|
6114
|
-
return /* @__PURE__ */
|
|
6540
|
+
return /* @__PURE__ */ React87.createElement(SvgPreview, { src });
|
|
6115
6541
|
};
|
|
6116
|
-
var IconPreview = ({ icon }) => /* @__PURE__ */
|
|
6542
|
+
var IconPreview = ({ icon }) => /* @__PURE__ */ React87.createElement(Box19, { sx: { color: ICON_PREVIEW_COLOR } }, /* @__PURE__ */ React87.createElement(
|
|
6117
6543
|
FontAwesomeGlyph,
|
|
6118
6544
|
{
|
|
6119
6545
|
icon,
|
|
6120
6546
|
size: ICON_PREVIEW_SIZE,
|
|
6121
6547
|
color: ICON_PREVIEW_COLOR,
|
|
6122
|
-
label:
|
|
6548
|
+
label: __37("Preview icon", "elementor")
|
|
6123
6549
|
}
|
|
6124
6550
|
));
|
|
6125
|
-
var IconPreviewPlaceholder = () => /* @__PURE__ */
|
|
6126
|
-
|
|
6551
|
+
var IconPreviewPlaceholder = () => /* @__PURE__ */ React87.createElement(
|
|
6552
|
+
Box19,
|
|
6127
6553
|
{
|
|
6128
6554
|
"aria-hidden": true,
|
|
6129
6555
|
sx: {
|
|
@@ -6133,12 +6559,12 @@ var IconPreviewPlaceholder = () => /* @__PURE__ */ React85.createElement(
|
|
|
6133
6559
|
}
|
|
6134
6560
|
}
|
|
6135
6561
|
);
|
|
6136
|
-
var SvgPreview = ({ src }) => /* @__PURE__ */
|
|
6562
|
+
var SvgPreview = ({ src }) => /* @__PURE__ */ React87.createElement(
|
|
6137
6563
|
CardMedia2,
|
|
6138
6564
|
{
|
|
6139
6565
|
component: "img",
|
|
6140
6566
|
image: src,
|
|
6141
|
-
alt:
|
|
6567
|
+
alt: __37("Preview SVG", "elementor"),
|
|
6142
6568
|
sx: { maxHeight: "140px", width: `${ICON_PREVIEW_SIZE}px`, color: ICON_PREVIEW_COLOR }
|
|
6143
6569
|
}
|
|
6144
6570
|
);
|
|
@@ -6159,7 +6585,7 @@ var StyledCard = styled11(Card2)`
|
|
|
6159
6585
|
border: none;
|
|
6160
6586
|
`;
|
|
6161
6587
|
var PREVIEW_ICON_COLOR = "#000000";
|
|
6162
|
-
var StyledCardMediaContainer = styled11(
|
|
6588
|
+
var StyledCardMediaContainer = styled11(Stack17)`
|
|
6163
6589
|
position: relative;
|
|
6164
6590
|
height: 140px;
|
|
6165
6591
|
object-fit: contain;
|
|
@@ -6179,11 +6605,11 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
6179
6605
|
const { data: attachment, isFetching } = useWpMediaAttachment2(id?.value || null);
|
|
6180
6606
|
const src = attachment?.url ?? url?.value ?? null;
|
|
6181
6607
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
6182
|
-
const [unfilteredModalOpenState, setUnfilteredModalOpenState] =
|
|
6183
|
-
const iconLibraryPopoverState =
|
|
6184
|
-
const controlContainerRef =
|
|
6185
|
-
const buttonGroupRef =
|
|
6186
|
-
const [iconLibraryAnchor, setIconLibraryAnchor] =
|
|
6608
|
+
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState18(false);
|
|
6609
|
+
const iconLibraryPopoverState = usePopupState10({ variant: "popover" });
|
|
6610
|
+
const controlContainerRef = useRef16(null);
|
|
6611
|
+
const buttonGroupRef = useRef16(null);
|
|
6612
|
+
const [iconLibraryAnchor, setIconLibraryAnchor] = useState18(null);
|
|
6187
6613
|
const { isAdmin } = useCurrentUserCapabilities();
|
|
6188
6614
|
const selectedIconClass = showIconLibrary && typeof iconValue?.value?.value === "string" ? iconValue.value.value : null;
|
|
6189
6615
|
const selectedIconLibrary = showIconLibrary && typeof iconValue?.library?.value === "string" ? iconValue.library.value : null;
|
|
@@ -6251,7 +6677,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
6251
6677
|
};
|
|
6252
6678
|
}, [iconLibraryPopoverState.isOpen]);
|
|
6253
6679
|
const iconLibraryWidth = iconLibraryAnchor?.width ?? ICON_LIBRARY_POPOVER_WIDTH;
|
|
6254
|
-
return /* @__PURE__ */
|
|
6680
|
+
return /* @__PURE__ */ React88.createElement(Stack17, { gap: 1, "aria-label": __38("SVG control", "elementor") }, /* @__PURE__ */ React88.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: handleCloseUnfilteredModal }), showIconLibrary && iconLibraryAnchor ? /* @__PURE__ */ React88.createElement(
|
|
6255
6681
|
Popover6,
|
|
6256
6682
|
{
|
|
6257
6683
|
disableScrollLock: true,
|
|
@@ -6271,7 +6697,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
6271
6697
|
}
|
|
6272
6698
|
}
|
|
6273
6699
|
},
|
|
6274
|
-
/* @__PURE__ */
|
|
6700
|
+
/* @__PURE__ */ React88.createElement(
|
|
6275
6701
|
IconLibraryPopover,
|
|
6276
6702
|
{
|
|
6277
6703
|
open: iconLibraryPopoverState.isOpen,
|
|
@@ -6282,14 +6708,14 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
6282
6708
|
width: iconLibraryWidth
|
|
6283
6709
|
}
|
|
6284
6710
|
)
|
|
6285
|
-
) : null, /* @__PURE__ */
|
|
6286
|
-
|
|
6711
|
+
) : null, /* @__PURE__ */ React88.createElement(
|
|
6712
|
+
Box20,
|
|
6287
6713
|
{
|
|
6288
6714
|
ref: controlContainerRef,
|
|
6289
6715
|
"data-testid": SVG_MEDIA_CONTROL_CONTAINER_TEST_ID,
|
|
6290
6716
|
sx: { width: "100%" }
|
|
6291
6717
|
},
|
|
6292
|
-
/* @__PURE__ */
|
|
6718
|
+
/* @__PURE__ */ React88.createElement(ControlActions, null, /* @__PURE__ */ React88.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React88.createElement(StyledCardMediaContainer, null, /* @__PURE__ */ React88.createElement(
|
|
6293
6719
|
SvgMediaPreview,
|
|
6294
6720
|
{
|
|
6295
6721
|
isFetching,
|
|
@@ -6297,7 +6723,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
6297
6723
|
iconClassName: selectedIconClass,
|
|
6298
6724
|
iconLibrary: selectedIconLibrary
|
|
6299
6725
|
}
|
|
6300
|
-
)), /* @__PURE__ */
|
|
6726
|
+
)), /* @__PURE__ */ React88.createElement(
|
|
6301
6727
|
CardOverlay2,
|
|
6302
6728
|
{
|
|
6303
6729
|
sx: {
|
|
@@ -6306,7 +6732,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
6306
6732
|
}
|
|
6307
6733
|
}
|
|
6308
6734
|
},
|
|
6309
|
-
/* @__PURE__ */
|
|
6735
|
+
/* @__PURE__ */ React88.createElement(
|
|
6310
6736
|
SvgMediaOverlay,
|
|
6311
6737
|
{
|
|
6312
6738
|
isAdmin,
|
|
@@ -6315,22 +6741,22 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
6315
6741
|
onSelectSvg: handleSelectSvg,
|
|
6316
6742
|
onUpload: handleUpload,
|
|
6317
6743
|
onOpenIconLibrary: handleOpenIconLibrary,
|
|
6318
|
-
infotipTitle:
|
|
6319
|
-
infotipDescription: /* @__PURE__ */
|
|
6744
|
+
infotipTitle: __38("Sorry, you can't upload that file yet.", "elementor"),
|
|
6745
|
+
infotipDescription: /* @__PURE__ */ React88.createElement(UnfilteredUploadInfotipDescription, null)
|
|
6320
6746
|
}
|
|
6321
6747
|
)
|
|
6322
6748
|
)))
|
|
6323
6749
|
));
|
|
6324
6750
|
});
|
|
6325
|
-
var UnfilteredUploadInfotipDescription = () => /* @__PURE__ */
|
|
6751
|
+
var UnfilteredUploadInfotipDescription = () => /* @__PURE__ */ React88.createElement(React88.Fragment, null, __38("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React88.createElement("br", null), __38("file uploads.", "elementor"));
|
|
6326
6752
|
|
|
6327
6753
|
// src/controls/video-media-control.tsx
|
|
6328
|
-
import * as
|
|
6754
|
+
import * as React89 from "react";
|
|
6329
6755
|
import { urlPropTypeUtil as urlPropTypeUtil5, videoSrcPropTypeUtil } from "@elementor/editor-props";
|
|
6330
6756
|
import { UploadIcon as UploadIcon3 } from "@elementor/icons";
|
|
6331
|
-
import { Button as Button6, Card as Card3, CardMedia as CardMedia3, CardOverlay as CardOverlay3, CircularProgress as CircularProgress5, Stack as
|
|
6757
|
+
import { Button as Button6, Card as Card3, CardMedia as CardMedia3, CardOverlay as CardOverlay3, CircularProgress as CircularProgress5, Stack as Stack18 } from "@elementor/ui";
|
|
6332
6758
|
import { useWpMediaAttachment as useWpMediaAttachment3, useWpMediaFrame as useWpMediaFrame3 } from "@elementor/wp-media";
|
|
6333
|
-
import { __ as
|
|
6759
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
6334
6760
|
var PLACEHOLDER_IMAGE = window.elementorCommon?.config?.urls?.assets + "/shapes/play-triangle.svg";
|
|
6335
6761
|
var VideoMediaControl = createControl(() => {
|
|
6336
6762
|
const { value, setValue, propType } = useBoundProp(videoSrcPropTypeUtil);
|
|
@@ -6360,7 +6786,7 @@ var VideoMediaControl = createControl(() => {
|
|
|
6360
6786
|
});
|
|
6361
6787
|
}
|
|
6362
6788
|
});
|
|
6363
|
-
return /* @__PURE__ */
|
|
6789
|
+
return /* @__PURE__ */ React89.createElement(ControlActions, null, /* @__PURE__ */ React89.createElement(Card3, { variant: "outlined" }, /* @__PURE__ */ React89.createElement(
|
|
6364
6790
|
CardMedia3,
|
|
6365
6791
|
{
|
|
6366
6792
|
sx: {
|
|
@@ -6375,8 +6801,8 @@ var VideoMediaControl = createControl(() => {
|
|
|
6375
6801
|
alignItems: "center"
|
|
6376
6802
|
}
|
|
6377
6803
|
},
|
|
6378
|
-
/* @__PURE__ */
|
|
6379
|
-
), /* @__PURE__ */
|
|
6804
|
+
/* @__PURE__ */ React89.createElement(VideoPreview, { isFetching, videoUrl })
|
|
6805
|
+
), /* @__PURE__ */ React89.createElement(CardOverlay3, null, /* @__PURE__ */ React89.createElement(Stack18, { gap: 1 }, /* @__PURE__ */ React89.createElement(
|
|
6380
6806
|
Button6,
|
|
6381
6807
|
{
|
|
6382
6808
|
size: "tiny",
|
|
@@ -6384,18 +6810,18 @@ var VideoMediaControl = createControl(() => {
|
|
|
6384
6810
|
variant: "outlined",
|
|
6385
6811
|
onClick: () => open({ mode: "browse" })
|
|
6386
6812
|
},
|
|
6387
|
-
|
|
6388
|
-
), /* @__PURE__ */
|
|
6813
|
+
__39("Select video", "elementor")
|
|
6814
|
+
), /* @__PURE__ */ React89.createElement(
|
|
6389
6815
|
Button6,
|
|
6390
6816
|
{
|
|
6391
6817
|
size: "tiny",
|
|
6392
6818
|
variant: "text",
|
|
6393
6819
|
color: "inherit",
|
|
6394
|
-
startIcon: /* @__PURE__ */
|
|
6820
|
+
startIcon: /* @__PURE__ */ React89.createElement(UploadIcon3, null),
|
|
6395
6821
|
onClick: () => open({ mode: "upload" })
|
|
6396
6822
|
},
|
|
6397
|
-
|
|
6398
|
-
), /* @__PURE__ */
|
|
6823
|
+
__39("Upload", "elementor")
|
|
6824
|
+
), /* @__PURE__ */ React89.createElement(
|
|
6399
6825
|
Button6,
|
|
6400
6826
|
{
|
|
6401
6827
|
size: "tiny",
|
|
@@ -6403,18 +6829,18 @@ var VideoMediaControl = createControl(() => {
|
|
|
6403
6829
|
color: "inherit",
|
|
6404
6830
|
onClick: () => open({ mode: "url", currentUrl: currentUrlForModal })
|
|
6405
6831
|
},
|
|
6406
|
-
|
|
6832
|
+
__39("Insert from URL", "elementor")
|
|
6407
6833
|
)))));
|
|
6408
6834
|
});
|
|
6409
6835
|
var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
6410
6836
|
if (isFetching) {
|
|
6411
|
-
return /* @__PURE__ */
|
|
6837
|
+
return /* @__PURE__ */ React89.createElement(CircularProgress5, null);
|
|
6412
6838
|
}
|
|
6413
6839
|
if (videoUrl) {
|
|
6414
|
-
return /* @__PURE__ */
|
|
6840
|
+
return /* @__PURE__ */ React89.createElement(
|
|
6415
6841
|
"video",
|
|
6416
6842
|
{
|
|
6417
|
-
"aria-label":
|
|
6843
|
+
"aria-label": __39("Video preview", "elementor"),
|
|
6418
6844
|
src: videoUrl,
|
|
6419
6845
|
muted: true,
|
|
6420
6846
|
preload: "metadata",
|
|
@@ -6427,33 +6853,33 @@ var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
|
6427
6853
|
}
|
|
6428
6854
|
);
|
|
6429
6855
|
}
|
|
6430
|
-
return /* @__PURE__ */
|
|
6856
|
+
return /* @__PURE__ */ React89.createElement("img", { src: PLACEHOLDER_IMAGE, alt: "No video selected" });
|
|
6431
6857
|
};
|
|
6432
6858
|
|
|
6433
6859
|
// src/controls/background-control/background-control.tsx
|
|
6434
|
-
import * as
|
|
6860
|
+
import * as React96 from "react";
|
|
6435
6861
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
6436
6862
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
6437
|
-
import { __ as
|
|
6863
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
6438
6864
|
|
|
6439
6865
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
6440
|
-
import * as
|
|
6866
|
+
import * as React95 from "react";
|
|
6441
6867
|
import {
|
|
6442
6868
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
6443
6869
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
6444
6870
|
backgroundOverlayPropTypeUtil,
|
|
6445
6871
|
colorPropTypeUtil as colorPropTypeUtil3
|
|
6446
6872
|
} from "@elementor/editor-props";
|
|
6447
|
-
import { Box as
|
|
6873
|
+
import { Box as Box21, CardMedia as CardMedia4, styled as styled12, Tab, TabPanel, Tabs, UnstableColorIndicator as UnstableColorIndicator3 } from "@elementor/ui";
|
|
6448
6874
|
import { useWpMediaAttachment as useWpMediaAttachment4 } from "@elementor/wp-media";
|
|
6449
|
-
import { __ as
|
|
6875
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
6450
6876
|
|
|
6451
6877
|
// src/env.ts
|
|
6452
6878
|
import { parseEnv } from "@elementor/env";
|
|
6453
6879
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
6454
6880
|
|
|
6455
6881
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
6456
|
-
import * as
|
|
6882
|
+
import * as React90 from "react";
|
|
6457
6883
|
import {
|
|
6458
6884
|
backgroundGradientOverlayPropTypeUtil,
|
|
6459
6885
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -6500,7 +6926,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
6500
6926
|
positions: positions?.value.split(" ")
|
|
6501
6927
|
};
|
|
6502
6928
|
};
|
|
6503
|
-
return /* @__PURE__ */
|
|
6929
|
+
return /* @__PURE__ */ React90.createElement(
|
|
6504
6930
|
UnstableGradientBox,
|
|
6505
6931
|
{
|
|
6506
6932
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -6525,53 +6951,53 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
6525
6951
|
});
|
|
6526
6952
|
|
|
6527
6953
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
6528
|
-
import * as
|
|
6954
|
+
import * as React91 from "react";
|
|
6529
6955
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
6530
6956
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
6531
|
-
import { __ as
|
|
6957
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
6532
6958
|
var attachmentControlOptions = [
|
|
6533
6959
|
{
|
|
6534
6960
|
value: "fixed",
|
|
6535
|
-
label:
|
|
6536
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6961
|
+
label: __40("Fixed", "elementor"),
|
|
6962
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(PinIcon, { fontSize: size }),
|
|
6537
6963
|
showTooltip: true
|
|
6538
6964
|
},
|
|
6539
6965
|
{
|
|
6540
6966
|
value: "scroll",
|
|
6541
|
-
label:
|
|
6542
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6967
|
+
label: __40("Scroll", "elementor"),
|
|
6968
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(PinnedOffIcon, { fontSize: size }),
|
|
6543
6969
|
showTooltip: true
|
|
6544
6970
|
}
|
|
6545
6971
|
];
|
|
6546
6972
|
var BackgroundImageOverlayAttachment = () => {
|
|
6547
|
-
return /* @__PURE__ */
|
|
6973
|
+
return /* @__PURE__ */ React91.createElement(PopoverGridContainer, null, /* @__PURE__ */ React91.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, __40("Attachment", "elementor"))), /* @__PURE__ */ React91.createElement(Grid14, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React91.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
6548
6974
|
};
|
|
6549
6975
|
|
|
6550
6976
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
6551
|
-
import * as
|
|
6552
|
-
import { useRef as
|
|
6977
|
+
import * as React92 from "react";
|
|
6978
|
+
import { useRef as useRef17 } from "react";
|
|
6553
6979
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil16 } from "@elementor/editor-props";
|
|
6554
6980
|
import { MenuListItem as MenuListItem6 } from "@elementor/editor-ui";
|
|
6555
6981
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
6556
6982
|
import { Grid as Grid15, Select as Select4 } from "@elementor/ui";
|
|
6557
|
-
import { __ as
|
|
6983
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
6558
6984
|
var backgroundPositionOptions = [
|
|
6559
|
-
{ label:
|
|
6560
|
-
{ label:
|
|
6561
|
-
{ label:
|
|
6562
|
-
{ label:
|
|
6563
|
-
{ label:
|
|
6564
|
-
{ label:
|
|
6565
|
-
{ label:
|
|
6566
|
-
{ label:
|
|
6567
|
-
{ label:
|
|
6568
|
-
{ label:
|
|
6985
|
+
{ label: __41("Center center", "elementor"), value: "center center" },
|
|
6986
|
+
{ label: __41("Center left", "elementor"), value: "center left" },
|
|
6987
|
+
{ label: __41("Center right", "elementor"), value: "center right" },
|
|
6988
|
+
{ label: __41("Top center", "elementor"), value: "top center" },
|
|
6989
|
+
{ label: __41("Top left", "elementor"), value: "top left" },
|
|
6990
|
+
{ label: __41("Top right", "elementor"), value: "top right" },
|
|
6991
|
+
{ label: __41("Bottom center", "elementor"), value: "bottom center" },
|
|
6992
|
+
{ label: __41("Bottom left", "elementor"), value: "bottom left" },
|
|
6993
|
+
{ label: __41("Bottom right", "elementor"), value: "bottom right" },
|
|
6994
|
+
{ label: __41("Custom", "elementor"), value: "custom" }
|
|
6569
6995
|
];
|
|
6570
6996
|
var BackgroundImageOverlayPosition = () => {
|
|
6571
6997
|
const backgroundImageOffsetContext = useBoundProp(backgroundImagePositionOffsetPropTypeUtil);
|
|
6572
6998
|
const stringPropContext = useBoundProp(stringPropTypeUtil16);
|
|
6573
6999
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
6574
|
-
const rowRef =
|
|
7000
|
+
const rowRef = useRef17(null);
|
|
6575
7001
|
const handlePositionChange = (event) => {
|
|
6576
7002
|
const value = event.target.value || null;
|
|
6577
7003
|
if (value === "custom") {
|
|
@@ -6580,7 +7006,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
6580
7006
|
stringPropContext.setValue(value);
|
|
6581
7007
|
}
|
|
6582
7008
|
};
|
|
6583
|
-
return /* @__PURE__ */
|
|
7009
|
+
return /* @__PURE__ */ React92.createElement(Grid15, { container: true, spacing: 1.5 }, /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(PopoverGridContainer, null, /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React92.createElement(ControlFormLabel, null, __41("Position", "elementor"))), /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React92.createElement(ControlActions, null, /* @__PURE__ */ React92.createElement(
|
|
6584
7010
|
Select4,
|
|
6585
7011
|
{
|
|
6586
7012
|
fullWidth: true,
|
|
@@ -6589,18 +7015,18 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
6589
7015
|
disabled: stringPropContext.disabled,
|
|
6590
7016
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
6591
7017
|
},
|
|
6592
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
6593
|
-
))))), isCustom ? /* @__PURE__ */
|
|
7018
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React92.createElement(MenuListItem6, { key: value, value: value ?? "" }, label))
|
|
7019
|
+
))))), isCustom ? /* @__PURE__ */ React92.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(Grid15, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React92.createElement(
|
|
6594
7020
|
SizeControl,
|
|
6595
7021
|
{
|
|
6596
|
-
startIcon: /* @__PURE__ */
|
|
7022
|
+
startIcon: /* @__PURE__ */ React92.createElement(LetterXIcon, { fontSize: "tiny" }),
|
|
6597
7023
|
anchorRef: rowRef,
|
|
6598
7024
|
min: -Number.MAX_SAFE_INTEGER
|
|
6599
7025
|
}
|
|
6600
|
-
))), /* @__PURE__ */
|
|
7026
|
+
))), /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React92.createElement(
|
|
6601
7027
|
SizeControl,
|
|
6602
7028
|
{
|
|
6603
|
-
startIcon: /* @__PURE__ */
|
|
7029
|
+
startIcon: /* @__PURE__ */ React92.createElement(LetterYIcon, { fontSize: "tiny" }),
|
|
6604
7030
|
anchorRef: rowRef,
|
|
6605
7031
|
min: -Number.MAX_SAFE_INTEGER
|
|
6606
7032
|
}
|
|
@@ -6608,43 +7034,43 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
6608
7034
|
};
|
|
6609
7035
|
|
|
6610
7036
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
6611
|
-
import * as
|
|
7037
|
+
import * as React93 from "react";
|
|
6612
7038
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon3 } from "@elementor/icons";
|
|
6613
7039
|
import { Grid as Grid16 } from "@elementor/ui";
|
|
6614
|
-
import { __ as
|
|
7040
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
6615
7041
|
var repeatControlOptions = [
|
|
6616
7042
|
{
|
|
6617
7043
|
value: "repeat",
|
|
6618
|
-
label:
|
|
6619
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7044
|
+
label: __42("Repeat", "elementor"),
|
|
7045
|
+
renderContent: ({ size }) => /* @__PURE__ */ React93.createElement(GridDotsIcon, { fontSize: size }),
|
|
6620
7046
|
showTooltip: true
|
|
6621
7047
|
},
|
|
6622
7048
|
{
|
|
6623
7049
|
value: "repeat-x",
|
|
6624
|
-
label:
|
|
6625
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7050
|
+
label: __42("Repeat-x", "elementor"),
|
|
7051
|
+
renderContent: ({ size }) => /* @__PURE__ */ React93.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
6626
7052
|
showTooltip: true
|
|
6627
7053
|
},
|
|
6628
7054
|
{
|
|
6629
7055
|
value: "repeat-y",
|
|
6630
|
-
label:
|
|
6631
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7056
|
+
label: __42("Repeat-y", "elementor"),
|
|
7057
|
+
renderContent: ({ size }) => /* @__PURE__ */ React93.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
6632
7058
|
showTooltip: true
|
|
6633
7059
|
},
|
|
6634
7060
|
{
|
|
6635
7061
|
value: "no-repeat",
|
|
6636
|
-
label:
|
|
6637
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7062
|
+
label: __42("No-repeat", "elementor"),
|
|
7063
|
+
renderContent: ({ size }) => /* @__PURE__ */ React93.createElement(XIcon3, { fontSize: size }),
|
|
6638
7064
|
showTooltip: true
|
|
6639
7065
|
}
|
|
6640
7066
|
];
|
|
6641
7067
|
var BackgroundImageOverlayRepeat = () => {
|
|
6642
|
-
return /* @__PURE__ */
|
|
7068
|
+
return /* @__PURE__ */ React93.createElement(PopoverGridContainer, null, /* @__PURE__ */ React93.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ControlFormLabel, null, __42("Repeat", "elementor"))), /* @__PURE__ */ React93.createElement(Grid16, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React93.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
6643
7069
|
};
|
|
6644
7070
|
|
|
6645
7071
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
6646
|
-
import * as
|
|
6647
|
-
import { useRef as
|
|
7072
|
+
import * as React94 from "react";
|
|
7073
|
+
import { useRef as useRef18 } from "react";
|
|
6648
7074
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil17 } from "@elementor/editor-props";
|
|
6649
7075
|
import {
|
|
6650
7076
|
ArrowBarBothIcon,
|
|
@@ -6655,30 +7081,30 @@ import {
|
|
|
6655
7081
|
PencilIcon
|
|
6656
7082
|
} from "@elementor/icons";
|
|
6657
7083
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
6658
|
-
import { __ as
|
|
7084
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
6659
7085
|
var sizeControlOptions = [
|
|
6660
7086
|
{
|
|
6661
7087
|
value: "auto",
|
|
6662
|
-
label:
|
|
6663
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7088
|
+
label: __43("Auto", "elementor"),
|
|
7089
|
+
renderContent: ({ size }) => /* @__PURE__ */ React94.createElement(LetterAIcon, { fontSize: size }),
|
|
6664
7090
|
showTooltip: true
|
|
6665
7091
|
},
|
|
6666
7092
|
{
|
|
6667
7093
|
value: "cover",
|
|
6668
|
-
label:
|
|
6669
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7094
|
+
label: __43("Cover", "elementor"),
|
|
7095
|
+
renderContent: ({ size }) => /* @__PURE__ */ React94.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
6670
7096
|
showTooltip: true
|
|
6671
7097
|
},
|
|
6672
7098
|
{
|
|
6673
7099
|
value: "contain",
|
|
6674
|
-
label:
|
|
6675
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7100
|
+
label: __43("Contain", "elementor"),
|
|
7101
|
+
renderContent: ({ size }) => /* @__PURE__ */ React94.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
6676
7102
|
showTooltip: true
|
|
6677
7103
|
},
|
|
6678
7104
|
{
|
|
6679
7105
|
value: "custom",
|
|
6680
|
-
label:
|
|
6681
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7106
|
+
label: __43("Custom", "elementor"),
|
|
7107
|
+
renderContent: ({ size }) => /* @__PURE__ */ React94.createElement(PencilIcon, { fontSize: size }),
|
|
6682
7108
|
showTooltip: true
|
|
6683
7109
|
}
|
|
6684
7110
|
];
|
|
@@ -6686,7 +7112,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
6686
7112
|
const backgroundImageScaleContext = useBoundProp(backgroundImageSizeScalePropTypeUtil);
|
|
6687
7113
|
const stringPropContext = useBoundProp(stringPropTypeUtil17);
|
|
6688
7114
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
6689
|
-
const rowRef =
|
|
7115
|
+
const rowRef = useRef18(null);
|
|
6690
7116
|
const handleSizeChange = (size) => {
|
|
6691
7117
|
if (size === "custom") {
|
|
6692
7118
|
backgroundImageScaleContext.setValue({ width: null, height: null });
|
|
@@ -6694,7 +7120,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
6694
7120
|
stringPropContext.setValue(size);
|
|
6695
7121
|
}
|
|
6696
7122
|
};
|
|
6697
|
-
return /* @__PURE__ */
|
|
7123
|
+
return /* @__PURE__ */ React94.createElement(Grid17, { container: true, spacing: 1.5 }, /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 12 }, /* @__PURE__ */ React94.createElement(PopoverGridContainer, null, /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React94.createElement(ControlFormLabel, null, __43("Size", "elementor"))), /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React94.createElement(
|
|
6698
7124
|
ControlToggleButtonGroup,
|
|
6699
7125
|
{
|
|
6700
7126
|
exclusive: true,
|
|
@@ -6703,17 +7129,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
6703
7129
|
disabled: stringPropContext.disabled,
|
|
6704
7130
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
6705
7131
|
}
|
|
6706
|
-
)))), isCustom ? /* @__PURE__ */
|
|
7132
|
+
)))), isCustom ? /* @__PURE__ */ React94.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React94.createElement(PopoverGridContainer, null, /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React94.createElement(
|
|
6707
7133
|
SizeControl,
|
|
6708
7134
|
{
|
|
6709
|
-
startIcon: /* @__PURE__ */
|
|
7135
|
+
startIcon: /* @__PURE__ */ React94.createElement(ArrowsMoveHorizontalIcon2, { fontSize: "tiny" }),
|
|
6710
7136
|
extendedOptions: ["auto"],
|
|
6711
7137
|
anchorRef: rowRef
|
|
6712
7138
|
}
|
|
6713
|
-
))), /* @__PURE__ */
|
|
7139
|
+
))), /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React94.createElement(
|
|
6714
7140
|
SizeControl,
|
|
6715
7141
|
{
|
|
6716
|
-
startIcon: /* @__PURE__ */
|
|
7142
|
+
startIcon: /* @__PURE__ */ React94.createElement(ArrowsMoveVerticalIcon2, { fontSize: "tiny" }),
|
|
6717
7143
|
extendedOptions: ["auto"],
|
|
6718
7144
|
anchorRef: rowRef
|
|
6719
7145
|
}
|
|
@@ -6721,7 +7147,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
6721
7147
|
};
|
|
6722
7148
|
|
|
6723
7149
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
6724
|
-
import { useRef as
|
|
7150
|
+
import { useRef as useRef19 } from "react";
|
|
6725
7151
|
import {
|
|
6726
7152
|
backgroundColorOverlayPropTypeUtil,
|
|
6727
7153
|
backgroundGradientOverlayPropTypeUtil as backgroundGradientOverlayPropTypeUtil2,
|
|
@@ -6746,7 +7172,7 @@ var useBackgroundTabsHistory = ({
|
|
|
6746
7172
|
return "image";
|
|
6747
7173
|
};
|
|
6748
7174
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs(getCurrentOverlayType());
|
|
6749
|
-
const valuesHistory =
|
|
7175
|
+
const valuesHistory = useRef19({
|
|
6750
7176
|
image: initialBackgroundImageOverlay,
|
|
6751
7177
|
color: initialBackgroundColorOverlay2,
|
|
6752
7178
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -6814,29 +7240,29 @@ var getInitialBackgroundOverlay = () => ({
|
|
|
6814
7240
|
}
|
|
6815
7241
|
});
|
|
6816
7242
|
var backgroundResolutionOptions = [
|
|
6817
|
-
{ label:
|
|
6818
|
-
{ label:
|
|
6819
|
-
{ label:
|
|
6820
|
-
{ label:
|
|
7243
|
+
{ label: __44("Thumbnail - 150 x 150", "elementor"), value: "thumbnail" },
|
|
7244
|
+
{ label: __44("Medium - 300 x 300", "elementor"), value: "medium" },
|
|
7245
|
+
{ label: __44("Large 1024 x 1024", "elementor"), value: "large" },
|
|
7246
|
+
{ label: __44("Full", "elementor"), value: "full" }
|
|
6821
7247
|
];
|
|
6822
7248
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
6823
7249
|
const { propType, value: overlayValues, setValue } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
6824
|
-
return /* @__PURE__ */
|
|
7250
|
+
return /* @__PURE__ */ React95.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React95.createElement(
|
|
6825
7251
|
ControlRepeater,
|
|
6826
7252
|
{
|
|
6827
7253
|
initial: getInitialBackgroundOverlay(),
|
|
6828
7254
|
propTypeUtil: backgroundOverlayPropTypeUtil
|
|
6829
7255
|
},
|
|
6830
|
-
/* @__PURE__ */
|
|
6831
|
-
/* @__PURE__ */
|
|
7256
|
+
/* @__PURE__ */ React95.createElement(RepeaterHeader, { label: __44("Overlay", "elementor") }, /* @__PURE__ */ React95.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
7257
|
+
/* @__PURE__ */ React95.createElement(ItemsContainer, null, /* @__PURE__ */ React95.createElement(
|
|
6832
7258
|
Item,
|
|
6833
7259
|
{
|
|
6834
7260
|
Icon: ItemIcon2,
|
|
6835
7261
|
Label: ItemLabel3,
|
|
6836
|
-
actions: /* @__PURE__ */
|
|
7262
|
+
actions: /* @__PURE__ */ React95.createElement(React95.Fragment, null, /* @__PURE__ */ React95.createElement(DuplicateItemAction, null), /* @__PURE__ */ React95.createElement(DisableItemAction, null), /* @__PURE__ */ React95.createElement(RemoveItemAction, null))
|
|
6837
7263
|
}
|
|
6838
7264
|
)),
|
|
6839
|
-
/* @__PURE__ */
|
|
7265
|
+
/* @__PURE__ */ React95.createElement(EditItemPopover, null, /* @__PURE__ */ React95.createElement(ItemContent2, null))
|
|
6840
7266
|
));
|
|
6841
7267
|
});
|
|
6842
7268
|
var ItemContent2 = () => {
|
|
@@ -6846,27 +7272,27 @@ var ItemContent2 = () => {
|
|
|
6846
7272
|
gradient: initialBackgroundGradientOverlay.value
|
|
6847
7273
|
});
|
|
6848
7274
|
const { rowRef } = useRepeaterContext();
|
|
6849
|
-
return /* @__PURE__ */
|
|
7275
|
+
return /* @__PURE__ */ React95.createElement(Box21, { sx: { width: "100%" } }, /* @__PURE__ */ React95.createElement(Box21, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React95.createElement(
|
|
6850
7276
|
Tabs,
|
|
6851
7277
|
{
|
|
6852
7278
|
size: "small",
|
|
6853
7279
|
variant: "fullWidth",
|
|
6854
7280
|
...getTabsProps(),
|
|
6855
|
-
"aria-label":
|
|
7281
|
+
"aria-label": __44("Background Overlay", "elementor")
|
|
6856
7282
|
},
|
|
6857
|
-
/* @__PURE__ */
|
|
6858
|
-
/* @__PURE__ */
|
|
6859
|
-
/* @__PURE__ */
|
|
6860
|
-
)), /* @__PURE__ */
|
|
7283
|
+
/* @__PURE__ */ React95.createElement(Tab, { label: __44("Image", "elementor"), ...getTabProps("image") }),
|
|
7284
|
+
/* @__PURE__ */ React95.createElement(Tab, { label: __44("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
7285
|
+
/* @__PURE__ */ React95.createElement(Tab, { label: __44("Color", "elementor"), ...getTabProps("color") })
|
|
7286
|
+
)), /* @__PURE__ */ React95.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React95.createElement(PopoverContent, null, /* @__PURE__ */ React95.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React95.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React95.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React95.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React95.createElement(PopoverContent, null, /* @__PURE__ */ React95.createElement(ColorOverlayContent, { anchorEl: rowRef }))));
|
|
6861
7287
|
};
|
|
6862
7288
|
var ItemIcon2 = ({ value }) => {
|
|
6863
7289
|
switch (value.$$type) {
|
|
6864
7290
|
case "background-image-overlay":
|
|
6865
|
-
return /* @__PURE__ */
|
|
7291
|
+
return /* @__PURE__ */ React95.createElement(ItemIconImage, { value });
|
|
6866
7292
|
case "background-color-overlay":
|
|
6867
|
-
return /* @__PURE__ */
|
|
7293
|
+
return /* @__PURE__ */ React95.createElement(ItemIconColor, { value });
|
|
6868
7294
|
case "background-gradient-overlay":
|
|
6869
|
-
return /* @__PURE__ */
|
|
7295
|
+
return /* @__PURE__ */ React95.createElement(ItemIconGradient, { value });
|
|
6870
7296
|
default:
|
|
6871
7297
|
return null;
|
|
6872
7298
|
}
|
|
@@ -6879,11 +7305,11 @@ var extractColorFrom = (prop) => {
|
|
|
6879
7305
|
};
|
|
6880
7306
|
var ItemIconColor = ({ value: prop }) => {
|
|
6881
7307
|
const color = extractColorFrom(prop);
|
|
6882
|
-
return /* @__PURE__ */
|
|
7308
|
+
return /* @__PURE__ */ React95.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: color });
|
|
6883
7309
|
};
|
|
6884
7310
|
var ItemIconImage = ({ value }) => {
|
|
6885
7311
|
const { imageUrl } = useImage(value);
|
|
6886
|
-
return /* @__PURE__ */
|
|
7312
|
+
return /* @__PURE__ */ React95.createElement(
|
|
6887
7313
|
CardMedia4,
|
|
6888
7314
|
{
|
|
6889
7315
|
image: imageUrl,
|
|
@@ -6898,41 +7324,41 @@ var ItemIconImage = ({ value }) => {
|
|
|
6898
7324
|
};
|
|
6899
7325
|
var ItemIconGradient = ({ value }) => {
|
|
6900
7326
|
const gradient = getGradientValue(value);
|
|
6901
|
-
return /* @__PURE__ */
|
|
7327
|
+
return /* @__PURE__ */ React95.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: gradient });
|
|
6902
7328
|
};
|
|
6903
7329
|
var ItemLabel3 = ({ value }) => {
|
|
6904
7330
|
switch (value.$$type) {
|
|
6905
7331
|
case "background-image-overlay":
|
|
6906
|
-
return /* @__PURE__ */
|
|
7332
|
+
return /* @__PURE__ */ React95.createElement(ItemLabelImage, { value });
|
|
6907
7333
|
case "background-color-overlay":
|
|
6908
|
-
return /* @__PURE__ */
|
|
7334
|
+
return /* @__PURE__ */ React95.createElement(ItemLabelColor, { value });
|
|
6909
7335
|
case "background-gradient-overlay":
|
|
6910
|
-
return /* @__PURE__ */
|
|
7336
|
+
return /* @__PURE__ */ React95.createElement(ItemLabelGradient, { value });
|
|
6911
7337
|
default:
|
|
6912
7338
|
return null;
|
|
6913
7339
|
}
|
|
6914
7340
|
};
|
|
6915
7341
|
var ItemLabelColor = ({ value: prop }) => {
|
|
6916
7342
|
const color = extractColorFrom(prop);
|
|
6917
|
-
return /* @__PURE__ */
|
|
7343
|
+
return /* @__PURE__ */ React95.createElement("span", null, color);
|
|
6918
7344
|
};
|
|
6919
7345
|
var ItemLabelImage = ({ value }) => {
|
|
6920
7346
|
const { imageTitle } = useImage(value);
|
|
6921
|
-
return /* @__PURE__ */
|
|
7347
|
+
return /* @__PURE__ */ React95.createElement("span", null, imageTitle);
|
|
6922
7348
|
};
|
|
6923
7349
|
var ItemLabelGradient = ({ value }) => {
|
|
6924
7350
|
if (value.value.type.value === "linear") {
|
|
6925
|
-
return /* @__PURE__ */
|
|
7351
|
+
return /* @__PURE__ */ React95.createElement("span", null, __44("Linear Gradient", "elementor"));
|
|
6926
7352
|
}
|
|
6927
|
-
return /* @__PURE__ */
|
|
7353
|
+
return /* @__PURE__ */ React95.createElement("span", null, __44("Radial Gradient", "elementor"));
|
|
6928
7354
|
};
|
|
6929
7355
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
6930
7356
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
6931
|
-
return /* @__PURE__ */
|
|
7357
|
+
return /* @__PURE__ */ React95.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React95.createElement(ColorControl, { anchorEl })));
|
|
6932
7358
|
};
|
|
6933
7359
|
var ImageOverlayContent = () => {
|
|
6934
7360
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
6935
|
-
return /* @__PURE__ */
|
|
7361
|
+
return /* @__PURE__ */ React95.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React95.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React95.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React95.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React95.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React95.createElement(BackgroundImageOverlayAttachment, null)));
|
|
6936
7362
|
};
|
|
6937
7363
|
var StyledUnstableColorIndicator3 = styled12(UnstableColorIndicator3)(({ theme }) => ({
|
|
6938
7364
|
height: "1rem",
|
|
@@ -6973,29 +7399,29 @@ var getGradientValue = (value) => {
|
|
|
6973
7399
|
|
|
6974
7400
|
// src/controls/background-control/background-control.tsx
|
|
6975
7401
|
var clipOptions = [
|
|
6976
|
-
{ label:
|
|
6977
|
-
{ label:
|
|
6978
|
-
{ label:
|
|
6979
|
-
{ label:
|
|
7402
|
+
{ label: __45("Full element", "elementor"), value: "border-box" },
|
|
7403
|
+
{ label: __45("Padding edges", "elementor"), value: "padding-box" },
|
|
7404
|
+
{ label: __45("Content edges", "elementor"), value: "content-box" },
|
|
7405
|
+
{ label: __45("Text", "elementor"), value: "text" }
|
|
6980
7406
|
];
|
|
6981
|
-
var colorLabel =
|
|
6982
|
-
var clipLabel =
|
|
7407
|
+
var colorLabel = __45("Color", "elementor");
|
|
7408
|
+
var clipLabel = __45("Clipping", "elementor");
|
|
6983
7409
|
var BackgroundControl = createControl(() => {
|
|
6984
7410
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
6985
|
-
return /* @__PURE__ */
|
|
7411
|
+
return /* @__PURE__ */ React96.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React96.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React96.createElement(BackgroundColorField, null), /* @__PURE__ */ React96.createElement(BackgroundClipField, null));
|
|
6986
7412
|
});
|
|
6987
7413
|
var BackgroundColorField = () => {
|
|
6988
|
-
return /* @__PURE__ */
|
|
7414
|
+
return /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React96.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React96.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(ControlLabel, null, colorLabel)), /* @__PURE__ */ React96.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(ColorControl, null))));
|
|
6989
7415
|
};
|
|
6990
7416
|
var BackgroundClipField = () => {
|
|
6991
|
-
return /* @__PURE__ */
|
|
7417
|
+
return /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "clip" }, /* @__PURE__ */ React96.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React96.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(ControlLabel, null, clipLabel)), /* @__PURE__ */ React96.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(SelectControl, { options: clipOptions }))));
|
|
6992
7418
|
};
|
|
6993
7419
|
|
|
6994
7420
|
// src/controls/repeatable-control.tsx
|
|
6995
|
-
import * as
|
|
7421
|
+
import * as React97 from "react";
|
|
6996
7422
|
import { useMemo as useMemo13 } from "react";
|
|
6997
7423
|
import { createArrayPropUtils as createArrayPropUtils2 } from "@elementor/editor-props";
|
|
6998
|
-
import { Box as
|
|
7424
|
+
import { Box as Box22 } from "@elementor/ui";
|
|
6999
7425
|
var PLACEHOLDER_REGEX = /\$\{([^}]+)\}/g;
|
|
7000
7426
|
var RepeatableControl = createControl(
|
|
7001
7427
|
({
|
|
@@ -7028,14 +7454,14 @@ var RepeatableControl = createControl(
|
|
|
7028
7454
|
);
|
|
7029
7455
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil2);
|
|
7030
7456
|
const newItemIndex = addItemTooltipProps?.newItemIndex === null ? void 0 : 0;
|
|
7031
|
-
return /* @__PURE__ */
|
|
7457
|
+
return /* @__PURE__ */ React97.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React97.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React97.createElement(
|
|
7032
7458
|
ControlRepeater,
|
|
7033
7459
|
{
|
|
7034
7460
|
initial: childPropTypeUtil.create(initialValues || null),
|
|
7035
7461
|
propTypeUtil: childArrayPropTypeUtil2,
|
|
7036
7462
|
isItemDisabled: isItemDisabled2
|
|
7037
7463
|
},
|
|
7038
|
-
/* @__PURE__ */
|
|
7464
|
+
/* @__PURE__ */ React97.createElement(RepeaterHeader, { label: repeaterLabel }, /* @__PURE__ */ React97.createElement(
|
|
7039
7465
|
TooltipAddItemAction,
|
|
7040
7466
|
{
|
|
7041
7467
|
...addItemTooltipProps,
|
|
@@ -7043,22 +7469,22 @@ var RepeatableControl = createControl(
|
|
|
7043
7469
|
ariaLabel: repeaterLabel
|
|
7044
7470
|
}
|
|
7045
7471
|
)),
|
|
7046
|
-
/* @__PURE__ */
|
|
7472
|
+
/* @__PURE__ */ React97.createElement(ItemsContainer, { isSortable }, /* @__PURE__ */ React97.createElement(
|
|
7047
7473
|
Item,
|
|
7048
7474
|
{
|
|
7049
7475
|
Icon: ItemIcon3,
|
|
7050
7476
|
Label: ItemLabel4,
|
|
7051
|
-
actions: /* @__PURE__ */
|
|
7477
|
+
actions: /* @__PURE__ */ React97.createElement(React97.Fragment, null, showDuplicate && /* @__PURE__ */ React97.createElement(DuplicateItemAction, null), showToggle && /* @__PURE__ */ React97.createElement(DisableItemAction, null), /* @__PURE__ */ React97.createElement(RemoveItemAction, null))
|
|
7052
7478
|
}
|
|
7053
7479
|
)),
|
|
7054
|
-
/* @__PURE__ */
|
|
7480
|
+
/* @__PURE__ */ React97.createElement(EditItemPopover, null, /* @__PURE__ */ React97.createElement(Content2, null))
|
|
7055
7481
|
)));
|
|
7056
7482
|
}
|
|
7057
7483
|
);
|
|
7058
|
-
var ItemIcon3 = () => /* @__PURE__ */
|
|
7484
|
+
var ItemIcon3 = () => /* @__PURE__ */ React97.createElement(React97.Fragment, null);
|
|
7059
7485
|
var Content2 = () => {
|
|
7060
7486
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
7061
|
-
return /* @__PURE__ */
|
|
7487
|
+
return /* @__PURE__ */ React97.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React97.createElement(PopoverGridContainer, null, /* @__PURE__ */ React97.createElement(ChildControl, { ...props })));
|
|
7062
7488
|
};
|
|
7063
7489
|
var interpolate = (template, data) => {
|
|
7064
7490
|
if (!data) {
|
|
@@ -7141,7 +7567,7 @@ var ItemLabel4 = ({ value }) => {
|
|
|
7141
7567
|
const label = showPlaceholder ? placeholder : interpolate(patternLabel, value);
|
|
7142
7568
|
const isReadOnly = !!childProps?.readOnly;
|
|
7143
7569
|
const color = getTextColor(isReadOnly, showPlaceholder);
|
|
7144
|
-
return /* @__PURE__ */
|
|
7570
|
+
return /* @__PURE__ */ React97.createElement(Box22, { component: "span", color }, label);
|
|
7145
7571
|
};
|
|
7146
7572
|
var getAllProperties = (pattern) => {
|
|
7147
7573
|
const properties = pattern.match(PLACEHOLDER_REGEX)?.map((match) => match.slice(2, -1)) || [];
|
|
@@ -7149,15 +7575,15 @@ var getAllProperties = (pattern) => {
|
|
|
7149
7575
|
};
|
|
7150
7576
|
|
|
7151
7577
|
// src/controls/key-value-control.tsx
|
|
7152
|
-
import * as
|
|
7153
|
-
import { useMemo as useMemo14, useState as
|
|
7578
|
+
import * as React98 from "react";
|
|
7579
|
+
import { useMemo as useMemo14, useState as useState19 } from "react";
|
|
7154
7580
|
import {
|
|
7155
7581
|
isTransformable,
|
|
7156
7582
|
keyValuePropTypeUtil,
|
|
7157
7583
|
stringPropTypeUtil as stringPropTypeUtil18
|
|
7158
7584
|
} from "@elementor/editor-props";
|
|
7159
7585
|
import { FormHelperText, FormLabel as FormLabel3, Grid as Grid19 } from "@elementor/ui";
|
|
7160
|
-
import { __ as
|
|
7586
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
7161
7587
|
|
|
7162
7588
|
// src/utils/escape-html-attr.ts
|
|
7163
7589
|
var escapeHtmlAttr = (value) => {
|
|
@@ -7181,14 +7607,14 @@ var getInitialFieldValue = (fieldValue) => {
|
|
|
7181
7607
|
};
|
|
7182
7608
|
var KeyValueControl = createControl((props = {}) => {
|
|
7183
7609
|
const { value, setValue, ...propContext } = useBoundProp(keyValuePropTypeUtil);
|
|
7184
|
-
const [keyError, setKeyError] =
|
|
7185
|
-
const [valueError, setValueError] =
|
|
7186
|
-
const [sessionState, setSessionState] =
|
|
7610
|
+
const [keyError, setKeyError] = useState19("");
|
|
7611
|
+
const [valueError, setValueError] = useState19("");
|
|
7612
|
+
const [sessionState, setSessionState] = useState19({
|
|
7187
7613
|
key: getInitialFieldValue(value?.key),
|
|
7188
7614
|
value: getInitialFieldValue(value?.value)
|
|
7189
7615
|
});
|
|
7190
|
-
const keyLabel = props.keyName ||
|
|
7191
|
-
const valueLabel = props.valueName ||
|
|
7616
|
+
const keyLabel = props.keyName || __46("Key", "elementor");
|
|
7617
|
+
const valueLabel = props.valueName || __46("Value", "elementor");
|
|
7192
7618
|
const { keyHelper, valueHelper } = props.getHelperText?.(sessionState.key, sessionState.value) || {
|
|
7193
7619
|
keyHelper: void 0,
|
|
7194
7620
|
valueHelper: void 0
|
|
@@ -7197,7 +7623,7 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
7197
7623
|
() => [
|
|
7198
7624
|
props.regexKey ? new RegExp(props.regexKey) : void 0,
|
|
7199
7625
|
props.regexValue ? new RegExp(props.regexValue) : void 0,
|
|
7200
|
-
props.validationErrorMessage ||
|
|
7626
|
+
props.validationErrorMessage || __46("Invalid Format", "elementor")
|
|
7201
7627
|
],
|
|
7202
7628
|
[props.regexKey, props.regexValue, props.validationErrorMessage]
|
|
7203
7629
|
);
|
|
@@ -7246,14 +7672,14 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
7246
7672
|
});
|
|
7247
7673
|
}
|
|
7248
7674
|
};
|
|
7249
|
-
return /* @__PURE__ */
|
|
7675
|
+
return /* @__PURE__ */ React98.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React98.createElement(Grid19, { container: true, gap: 1.5 }, /* @__PURE__ */ React98.createElement(Grid19, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React98.createElement(FormLabel3, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React98.createElement(
|
|
7250
7676
|
TextControl,
|
|
7251
7677
|
{
|
|
7252
7678
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.key) : sessionState.key,
|
|
7253
7679
|
error: !!keyError,
|
|
7254
7680
|
helperText: keyHelper
|
|
7255
7681
|
}
|
|
7256
|
-
)), !!keyError && /* @__PURE__ */
|
|
7682
|
+
)), !!keyError && /* @__PURE__ */ React98.createElement(FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React98.createElement(Grid19, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React98.createElement(FormLabel3, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React98.createElement(
|
|
7257
7683
|
TextControl,
|
|
7258
7684
|
{
|
|
7259
7685
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.value) : sessionState.value,
|
|
@@ -7261,27 +7687,27 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
7261
7687
|
inputDisabled: !!keyError,
|
|
7262
7688
|
helperText: valueHelper
|
|
7263
7689
|
}
|
|
7264
|
-
)), !!valueError && /* @__PURE__ */
|
|
7690
|
+
)), !!valueError && /* @__PURE__ */ React98.createElement(FormHelperText, { error: true }, valueError))));
|
|
7265
7691
|
});
|
|
7266
7692
|
|
|
7267
7693
|
// src/controls/position-control.tsx
|
|
7268
|
-
import * as
|
|
7694
|
+
import * as React99 from "react";
|
|
7269
7695
|
import { positionPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil19 } from "@elementor/editor-props";
|
|
7270
7696
|
import { MenuListItem as MenuListItem7 } from "@elementor/editor-ui";
|
|
7271
7697
|
import { LetterXIcon as LetterXIcon2, LetterYIcon as LetterYIcon2 } from "@elementor/icons";
|
|
7272
7698
|
import { Grid as Grid20, Select as Select5 } from "@elementor/ui";
|
|
7273
|
-
import { __ as
|
|
7699
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
7274
7700
|
var positionOptions = [
|
|
7275
|
-
{ label:
|
|
7276
|
-
{ label:
|
|
7277
|
-
{ label:
|
|
7278
|
-
{ label:
|
|
7279
|
-
{ label:
|
|
7280
|
-
{ label:
|
|
7281
|
-
{ label:
|
|
7282
|
-
{ label:
|
|
7283
|
-
{ label:
|
|
7284
|
-
{ label:
|
|
7701
|
+
{ label: __47("Center center", "elementor"), value: "center center" },
|
|
7702
|
+
{ label: __47("Center left", "elementor"), value: "center left" },
|
|
7703
|
+
{ label: __47("Center right", "elementor"), value: "center right" },
|
|
7704
|
+
{ label: __47("Top center", "elementor"), value: "top center" },
|
|
7705
|
+
{ label: __47("Top left", "elementor"), value: "top left" },
|
|
7706
|
+
{ label: __47("Top right", "elementor"), value: "top right" },
|
|
7707
|
+
{ label: __47("Bottom center", "elementor"), value: "bottom center" },
|
|
7708
|
+
{ label: __47("Bottom left", "elementor"), value: "bottom left" },
|
|
7709
|
+
{ label: __47("Bottom right", "elementor"), value: "bottom right" },
|
|
7710
|
+
{ label: __47("Custom", "elementor"), value: "custom" }
|
|
7285
7711
|
];
|
|
7286
7712
|
var PositionControl = () => {
|
|
7287
7713
|
const positionContext = useBoundProp(positionPropTypeUtil);
|
|
@@ -7296,7 +7722,7 @@ var PositionControl = () => {
|
|
|
7296
7722
|
stringPropContext.setValue(value);
|
|
7297
7723
|
}
|
|
7298
7724
|
};
|
|
7299
|
-
return /* @__PURE__ */
|
|
7725
|
+
return /* @__PURE__ */ React99.createElement(Grid20, { container: true, spacing: 1.5 }, /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React99.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React99.createElement(ControlFormLabel, null, __47("Object position", "elementor"))), /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React99.createElement(
|
|
7300
7726
|
Select5,
|
|
7301
7727
|
{
|
|
7302
7728
|
size: "tiny",
|
|
@@ -7307,29 +7733,29 @@ var PositionControl = () => {
|
|
|
7307
7733
|
renderValue: (selectedValue) => getSelectRenderValue(positionOptions, placeholder, selectedValue),
|
|
7308
7734
|
fullWidth: true
|
|
7309
7735
|
},
|
|
7310
|
-
positionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
7311
|
-
)))), isCustom && /* @__PURE__ */
|
|
7736
|
+
positionOptions.map(({ label, value }) => /* @__PURE__ */ React99.createElement(MenuListItem7, { key: value, value: value ?? "" }, label))
|
|
7737
|
+
)))), isCustom && /* @__PURE__ */ React99.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React99.createElement(Grid20, { container: true, spacing: 1.5 }, /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React99.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React99.createElement(
|
|
7312
7738
|
SizeControl,
|
|
7313
7739
|
{
|
|
7314
|
-
startIcon: /* @__PURE__ */
|
|
7740
|
+
startIcon: /* @__PURE__ */ React99.createElement(LetterXIcon2, { fontSize: "tiny" }),
|
|
7315
7741
|
min: -Number.MAX_SAFE_INTEGER
|
|
7316
7742
|
}
|
|
7317
|
-
))), /* @__PURE__ */
|
|
7743
|
+
))), /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React99.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React99.createElement(
|
|
7318
7744
|
SizeControl,
|
|
7319
7745
|
{
|
|
7320
|
-
startIcon: /* @__PURE__ */
|
|
7746
|
+
startIcon: /* @__PURE__ */ React99.createElement(LetterYIcon2, { fontSize: "tiny" }),
|
|
7321
7747
|
min: -Number.MAX_SAFE_INTEGER
|
|
7322
7748
|
}
|
|
7323
7749
|
)))))));
|
|
7324
7750
|
};
|
|
7325
7751
|
|
|
7326
7752
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
7327
|
-
import * as
|
|
7328
|
-
import { useRef as
|
|
7753
|
+
import * as React112 from "react";
|
|
7754
|
+
import { useRef as useRef27 } from "react";
|
|
7329
7755
|
import { transformFunctionsPropTypeUtil, transformPropTypeUtil } from "@elementor/editor-props";
|
|
7330
7756
|
import { AdjustmentsIcon as AdjustmentsIcon2, InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
|
|
7331
|
-
import { bindTrigger as bindTrigger5, Box as
|
|
7332
|
-
import { __ as
|
|
7757
|
+
import { bindTrigger as bindTrigger5, Box as Box26, IconButton as IconButton8, Tooltip as Tooltip11, Typography as Typography11, usePopupState as usePopupState11 } from "@elementor/ui";
|
|
7758
|
+
import { __ as __57 } from "@wordpress/i18n";
|
|
7333
7759
|
|
|
7334
7760
|
// src/controls/transform-control/initial-values.ts
|
|
7335
7761
|
import {
|
|
@@ -7383,24 +7809,24 @@ var initialSkewValue = skewTransformPropTypeUtil.create({
|
|
|
7383
7809
|
});
|
|
7384
7810
|
|
|
7385
7811
|
// src/controls/transform-control/transform-content.tsx
|
|
7386
|
-
import * as
|
|
7387
|
-
import { Box as
|
|
7388
|
-
import { __ as
|
|
7812
|
+
import * as React106 from "react";
|
|
7813
|
+
import { Box as Box23, Tab as Tab2, TabPanel as TabPanel2, Tabs as Tabs2 } from "@elementor/ui";
|
|
7814
|
+
import { __ as __52 } from "@wordpress/i18n";
|
|
7389
7815
|
|
|
7390
7816
|
// src/controls/transform-control/functions/move.tsx
|
|
7391
|
-
import * as
|
|
7392
|
-
import { useRef as
|
|
7817
|
+
import * as React101 from "react";
|
|
7818
|
+
import { useRef as useRef20 } from "react";
|
|
7393
7819
|
import { moveTransformPropTypeUtil } from "@elementor/editor-props";
|
|
7394
7820
|
import { ArrowDownLeftIcon, ArrowDownSmallIcon, ArrowRightIcon } from "@elementor/icons";
|
|
7395
7821
|
import { Grid as Grid22 } from "@elementor/ui";
|
|
7396
|
-
import { __ as
|
|
7822
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
7397
7823
|
|
|
7398
7824
|
// src/controls/transform-control/functions/axis-row.tsx
|
|
7399
|
-
import * as
|
|
7825
|
+
import * as React100 from "react";
|
|
7400
7826
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
7401
7827
|
var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "angle" }) => {
|
|
7402
7828
|
const safeId = label.replace(/\s+/g, "-").toLowerCase();
|
|
7403
|
-
return /* @__PURE__ */
|
|
7829
|
+
return /* @__PURE__ */ React100.createElement(Grid21, { item: true, xs: 12 }, /* @__PURE__ */ React100.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React100.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(ControlLabel, { htmlFor: safeId }, label)), /* @__PURE__ */ React100.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React100.createElement(
|
|
7404
7830
|
SizeControl,
|
|
7405
7831
|
{
|
|
7406
7832
|
anchorRef,
|
|
@@ -7416,28 +7842,28 @@ var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "an
|
|
|
7416
7842
|
// src/controls/transform-control/functions/move.tsx
|
|
7417
7843
|
var moveAxisControls = [
|
|
7418
7844
|
{
|
|
7419
|
-
label:
|
|
7845
|
+
label: __48("Move X", "elementor"),
|
|
7420
7846
|
bind: "x",
|
|
7421
|
-
startIcon: /* @__PURE__ */
|
|
7847
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowRightIcon, { fontSize: "tiny" }),
|
|
7422
7848
|
units: ["px", "%", "em", "rem", "vw"]
|
|
7423
7849
|
},
|
|
7424
7850
|
{
|
|
7425
|
-
label:
|
|
7851
|
+
label: __48("Move Y", "elementor"),
|
|
7426
7852
|
bind: "y",
|
|
7427
|
-
startIcon: /* @__PURE__ */
|
|
7853
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowDownSmallIcon, { fontSize: "tiny" }),
|
|
7428
7854
|
units: ["px", "%", "em", "rem", "vh"]
|
|
7429
7855
|
},
|
|
7430
7856
|
{
|
|
7431
|
-
label:
|
|
7857
|
+
label: __48("Move Z", "elementor"),
|
|
7432
7858
|
bind: "z",
|
|
7433
|
-
startIcon: /* @__PURE__ */
|
|
7859
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowDownLeftIcon, { fontSize: "tiny" }),
|
|
7434
7860
|
units: ["px", "%", "em", "rem", "vw", "vh"]
|
|
7435
7861
|
}
|
|
7436
7862
|
];
|
|
7437
7863
|
var Move = () => {
|
|
7438
7864
|
const context = useBoundProp(moveTransformPropTypeUtil);
|
|
7439
|
-
const rowRefs = [
|
|
7440
|
-
return /* @__PURE__ */
|
|
7865
|
+
const rowRefs = [useRef20(null), useRef20(null), useRef20(null)];
|
|
7866
|
+
return /* @__PURE__ */ React101.createElement(Grid22, { container: true, spacing: 1.5 }, /* @__PURE__ */ React101.createElement(PropProvider, { ...context }, /* @__PURE__ */ React101.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React101.createElement(
|
|
7441
7867
|
AxisRow,
|
|
7442
7868
|
{
|
|
7443
7869
|
key: control.bind,
|
|
@@ -7450,34 +7876,34 @@ var Move = () => {
|
|
|
7450
7876
|
};
|
|
7451
7877
|
|
|
7452
7878
|
// src/controls/transform-control/functions/rotate.tsx
|
|
7453
|
-
import * as
|
|
7454
|
-
import { useRef as
|
|
7879
|
+
import * as React102 from "react";
|
|
7880
|
+
import { useRef as useRef21 } from "react";
|
|
7455
7881
|
import { rotateTransformPropTypeUtil as rotateTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
7456
7882
|
import { Arrow360Icon, RotateClockwiseIcon } from "@elementor/icons";
|
|
7457
7883
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
7458
|
-
import { __ as
|
|
7884
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
7459
7885
|
var rotateAxisControls = [
|
|
7460
7886
|
{
|
|
7461
|
-
label:
|
|
7887
|
+
label: __49("Rotate X", "elementor"),
|
|
7462
7888
|
bind: "x",
|
|
7463
|
-
startIcon: /* @__PURE__ */
|
|
7889
|
+
startIcon: /* @__PURE__ */ React102.createElement(Arrow360Icon, { fontSize: "tiny" })
|
|
7464
7890
|
},
|
|
7465
7891
|
{
|
|
7466
|
-
label:
|
|
7892
|
+
label: __49("Rotate Y", "elementor"),
|
|
7467
7893
|
bind: "y",
|
|
7468
|
-
startIcon: /* @__PURE__ */
|
|
7894
|
+
startIcon: /* @__PURE__ */ React102.createElement(Arrow360Icon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
7469
7895
|
},
|
|
7470
7896
|
{
|
|
7471
|
-
label:
|
|
7897
|
+
label: __49("Rotate Z", "elementor"),
|
|
7472
7898
|
bind: "z",
|
|
7473
|
-
startIcon: /* @__PURE__ */
|
|
7899
|
+
startIcon: /* @__PURE__ */ React102.createElement(RotateClockwiseIcon, { fontSize: "tiny" })
|
|
7474
7900
|
}
|
|
7475
7901
|
];
|
|
7476
7902
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
7477
7903
|
var Rotate = () => {
|
|
7478
7904
|
const context = useBoundProp(rotateTransformPropTypeUtil2);
|
|
7479
|
-
const rowRefs = [
|
|
7480
|
-
return /* @__PURE__ */
|
|
7905
|
+
const rowRefs = [useRef21(null), useRef21(null), useRef21(null)];
|
|
7906
|
+
return /* @__PURE__ */ React102.createElement(Grid23, { container: true, spacing: 1.5 }, /* @__PURE__ */ React102.createElement(PropProvider, { ...context }, /* @__PURE__ */ React102.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React102.createElement(
|
|
7481
7907
|
AxisRow,
|
|
7482
7908
|
{
|
|
7483
7909
|
key: control.bind,
|
|
@@ -7489,68 +7915,68 @@ var Rotate = () => {
|
|
|
7489
7915
|
};
|
|
7490
7916
|
|
|
7491
7917
|
// src/controls/transform-control/functions/scale.tsx
|
|
7492
|
-
import * as
|
|
7493
|
-
import { useRef as
|
|
7918
|
+
import * as React104 from "react";
|
|
7919
|
+
import { useRef as useRef22 } from "react";
|
|
7494
7920
|
import { scaleTransformPropTypeUtil as scaleTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
7495
7921
|
import { ArrowDownLeftIcon as ArrowDownLeftIcon2, ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
7496
7922
|
import { Grid as Grid25 } from "@elementor/ui";
|
|
7497
|
-
import { __ as
|
|
7923
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
7498
7924
|
|
|
7499
7925
|
// src/controls/transform-control/functions/scale-axis-row.tsx
|
|
7500
|
-
import * as
|
|
7926
|
+
import * as React103 from "react";
|
|
7501
7927
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
7502
7928
|
var ScaleAxisRow = ({ label, bind, startIcon, anchorRef }) => {
|
|
7503
|
-
return /* @__PURE__ */
|
|
7929
|
+
return /* @__PURE__ */ React103.createElement(Grid24, { item: true, xs: 12 }, /* @__PURE__ */ React103.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React103.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React103.createElement(ControlLabel, null, label)), /* @__PURE__ */ React103.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React103.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React103.createElement(NumberControl, { step: 0.1, placeholder: "1", startIcon })))));
|
|
7504
7930
|
};
|
|
7505
7931
|
|
|
7506
7932
|
// src/controls/transform-control/functions/scale.tsx
|
|
7507
7933
|
var scaleAxisControls = [
|
|
7508
7934
|
{
|
|
7509
|
-
label:
|
|
7935
|
+
label: __50("Scale X", "elementor"),
|
|
7510
7936
|
bind: "x",
|
|
7511
|
-
startIcon: /* @__PURE__ */
|
|
7937
|
+
startIcon: /* @__PURE__ */ React104.createElement(ArrowRightIcon2, { fontSize: "tiny" })
|
|
7512
7938
|
},
|
|
7513
7939
|
{
|
|
7514
|
-
label:
|
|
7940
|
+
label: __50("Scale Y", "elementor"),
|
|
7515
7941
|
bind: "y",
|
|
7516
|
-
startIcon: /* @__PURE__ */
|
|
7942
|
+
startIcon: /* @__PURE__ */ React104.createElement(ArrowDownSmallIcon2, { fontSize: "tiny" })
|
|
7517
7943
|
},
|
|
7518
7944
|
{
|
|
7519
|
-
label:
|
|
7945
|
+
label: __50("Scale Z", "elementor"),
|
|
7520
7946
|
bind: "z",
|
|
7521
|
-
startIcon: /* @__PURE__ */
|
|
7947
|
+
startIcon: /* @__PURE__ */ React104.createElement(ArrowDownLeftIcon2, { fontSize: "tiny" })
|
|
7522
7948
|
}
|
|
7523
7949
|
];
|
|
7524
7950
|
var Scale = () => {
|
|
7525
7951
|
const context = useBoundProp(scaleTransformPropTypeUtil2);
|
|
7526
|
-
const rowRefs = [
|
|
7527
|
-
return /* @__PURE__ */
|
|
7952
|
+
const rowRefs = [useRef22(null), useRef22(null), useRef22(null)];
|
|
7953
|
+
return /* @__PURE__ */ React104.createElement(Grid25, { container: true, spacing: 1.5 }, /* @__PURE__ */ React104.createElement(PropProvider, { ...context }, /* @__PURE__ */ React104.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React104.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
7528
7954
|
};
|
|
7529
7955
|
|
|
7530
7956
|
// src/controls/transform-control/functions/skew.tsx
|
|
7531
|
-
import * as
|
|
7532
|
-
import { useRef as
|
|
7957
|
+
import * as React105 from "react";
|
|
7958
|
+
import { useRef as useRef23 } from "react";
|
|
7533
7959
|
import { skewTransformPropTypeUtil as skewTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
7534
7960
|
import { ArrowLeftIcon, ArrowRightIcon as ArrowRightIcon3 } from "@elementor/icons";
|
|
7535
7961
|
import { Grid as Grid26 } from "@elementor/ui";
|
|
7536
|
-
import { __ as
|
|
7962
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
7537
7963
|
var skewAxisControls = [
|
|
7538
7964
|
{
|
|
7539
|
-
label:
|
|
7965
|
+
label: __51("Skew X", "elementor"),
|
|
7540
7966
|
bind: "x",
|
|
7541
|
-
startIcon: /* @__PURE__ */
|
|
7967
|
+
startIcon: /* @__PURE__ */ React105.createElement(ArrowRightIcon3, { fontSize: "tiny" })
|
|
7542
7968
|
},
|
|
7543
7969
|
{
|
|
7544
|
-
label:
|
|
7970
|
+
label: __51("Skew Y", "elementor"),
|
|
7545
7971
|
bind: "y",
|
|
7546
|
-
startIcon: /* @__PURE__ */
|
|
7972
|
+
startIcon: /* @__PURE__ */ React105.createElement(ArrowLeftIcon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
7547
7973
|
}
|
|
7548
7974
|
];
|
|
7549
7975
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
7550
7976
|
var Skew = () => {
|
|
7551
7977
|
const context = useBoundProp(skewTransformPropTypeUtil2);
|
|
7552
|
-
const rowRefs = [
|
|
7553
|
-
return /* @__PURE__ */
|
|
7978
|
+
const rowRefs = [useRef23(null), useRef23(null), useRef23(null)];
|
|
7979
|
+
return /* @__PURE__ */ React105.createElement(Grid26, { container: true, spacing: 1.5 }, /* @__PURE__ */ React105.createElement(PropProvider, { ...context }, /* @__PURE__ */ React105.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React105.createElement(
|
|
7554
7980
|
AxisRow,
|
|
7555
7981
|
{
|
|
7556
7982
|
key: control.bind,
|
|
@@ -7562,7 +7988,7 @@ var Skew = () => {
|
|
|
7562
7988
|
};
|
|
7563
7989
|
|
|
7564
7990
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
7565
|
-
import { useRef as
|
|
7991
|
+
import { useRef as useRef24 } from "react";
|
|
7566
7992
|
import {
|
|
7567
7993
|
moveTransformPropTypeUtil as moveTransformPropTypeUtil2,
|
|
7568
7994
|
rotateTransformPropTypeUtil as rotateTransformPropTypeUtil3,
|
|
@@ -7594,7 +8020,7 @@ var useTransformTabsHistory = ({
|
|
|
7594
8020
|
}
|
|
7595
8021
|
};
|
|
7596
8022
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs2(getCurrentTransformType());
|
|
7597
|
-
const valuesHistory =
|
|
8023
|
+
const valuesHistory = useRef24({
|
|
7598
8024
|
move: initialMove,
|
|
7599
8025
|
scale: initialScale,
|
|
7600
8026
|
rotate: initialRotate,
|
|
@@ -7655,7 +8081,7 @@ var TransformContent = () => {
|
|
|
7655
8081
|
rotate: initialRotateValue.value,
|
|
7656
8082
|
skew: initialSkewValue.value
|
|
7657
8083
|
});
|
|
7658
|
-
return /* @__PURE__ */
|
|
8084
|
+
return /* @__PURE__ */ React106.createElement(PopoverContent, null, /* @__PURE__ */ React106.createElement(Box23, { sx: { width: "100%" } }, /* @__PURE__ */ React106.createElement(Box23, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React106.createElement(
|
|
7659
8085
|
Tabs2,
|
|
7660
8086
|
{
|
|
7661
8087
|
size: "small",
|
|
@@ -7666,37 +8092,37 @@ var TransformContent = () => {
|
|
|
7666
8092
|
}
|
|
7667
8093
|
},
|
|
7668
8094
|
...getTabsProps(),
|
|
7669
|
-
"aria-label":
|
|
8095
|
+
"aria-label": __52("Transform", "elementor")
|
|
7670
8096
|
},
|
|
7671
|
-
/* @__PURE__ */
|
|
7672
|
-
/* @__PURE__ */
|
|
7673
|
-
/* @__PURE__ */
|
|
7674
|
-
/* @__PURE__ */
|
|
7675
|
-
)), /* @__PURE__ */
|
|
8097
|
+
/* @__PURE__ */ React106.createElement(Tab2, { label: __52("Move", "elementor"), ...getTabProps(TransformFunctionKeys.move) }),
|
|
8098
|
+
/* @__PURE__ */ React106.createElement(Tab2, { label: __52("Scale", "elementor"), ...getTabProps(TransformFunctionKeys.scale) }),
|
|
8099
|
+
/* @__PURE__ */ React106.createElement(Tab2, { label: __52("Rotate", "elementor"), ...getTabProps(TransformFunctionKeys.rotate) }),
|
|
8100
|
+
/* @__PURE__ */ React106.createElement(Tab2, { label: __52("Skew", "elementor"), ...getTabProps(TransformFunctionKeys.skew) })
|
|
8101
|
+
)), /* @__PURE__ */ React106.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.move) }, /* @__PURE__ */ React106.createElement(Move, null)), /* @__PURE__ */ React106.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.scale) }, /* @__PURE__ */ React106.createElement(Scale, null)), /* @__PURE__ */ React106.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.rotate) }, /* @__PURE__ */ React106.createElement(Rotate, null)), /* @__PURE__ */ React106.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.skew) }, /* @__PURE__ */ React106.createElement(Skew, null))));
|
|
7676
8102
|
};
|
|
7677
8103
|
|
|
7678
8104
|
// src/controls/transform-control/transform-icon.tsx
|
|
7679
|
-
import * as
|
|
8105
|
+
import * as React107 from "react";
|
|
7680
8106
|
import { ArrowAutofitHeightIcon, ArrowsMaximizeIcon as ArrowsMaximizeIcon2, RotateClockwise2Icon, SkewXIcon } from "@elementor/icons";
|
|
7681
8107
|
var TransformIcon = ({ value }) => {
|
|
7682
8108
|
switch (value.$$type) {
|
|
7683
8109
|
case TransformFunctionKeys.move:
|
|
7684
|
-
return /* @__PURE__ */
|
|
8110
|
+
return /* @__PURE__ */ React107.createElement(ArrowsMaximizeIcon2, { fontSize: "tiny" });
|
|
7685
8111
|
case TransformFunctionKeys.scale:
|
|
7686
|
-
return /* @__PURE__ */
|
|
8112
|
+
return /* @__PURE__ */ React107.createElement(ArrowAutofitHeightIcon, { fontSize: "tiny" });
|
|
7687
8113
|
case TransformFunctionKeys.rotate:
|
|
7688
|
-
return /* @__PURE__ */
|
|
8114
|
+
return /* @__PURE__ */ React107.createElement(RotateClockwise2Icon, { fontSize: "tiny" });
|
|
7689
8115
|
case TransformFunctionKeys.skew:
|
|
7690
|
-
return /* @__PURE__ */
|
|
8116
|
+
return /* @__PURE__ */ React107.createElement(SkewXIcon, { fontSize: "tiny" });
|
|
7691
8117
|
default:
|
|
7692
8118
|
return null;
|
|
7693
8119
|
}
|
|
7694
8120
|
};
|
|
7695
8121
|
|
|
7696
8122
|
// src/controls/transform-control/transform-label.tsx
|
|
7697
|
-
import * as
|
|
7698
|
-
import { Box as
|
|
7699
|
-
import { __ as
|
|
8123
|
+
import * as React108 from "react";
|
|
8124
|
+
import { Box as Box24 } from "@elementor/ui";
|
|
8125
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
7700
8126
|
var orderedAxis = ["x", "y", "z"];
|
|
7701
8127
|
var formatLabel = (value, functionType) => {
|
|
7702
8128
|
return orderedAxis.map((axisKey) => {
|
|
@@ -7714,98 +8140,98 @@ var TransformLabel = (props) => {
|
|
|
7714
8140
|
const { $$type, value } = props.value;
|
|
7715
8141
|
switch ($$type) {
|
|
7716
8142
|
case TransformFunctionKeys.move:
|
|
7717
|
-
return /* @__PURE__ */
|
|
8143
|
+
return /* @__PURE__ */ React108.createElement(Label2, { label: __53("Move", "elementor"), value: formatLabel(value, "move") });
|
|
7718
8144
|
case TransformFunctionKeys.scale:
|
|
7719
|
-
return /* @__PURE__ */
|
|
8145
|
+
return /* @__PURE__ */ React108.createElement(Label2, { label: __53("Scale", "elementor"), value: formatLabel(value, "scale") });
|
|
7720
8146
|
case TransformFunctionKeys.rotate:
|
|
7721
|
-
return /* @__PURE__ */
|
|
8147
|
+
return /* @__PURE__ */ React108.createElement(Label2, { label: __53("Rotate", "elementor"), value: formatLabel(value, "rotate") });
|
|
7722
8148
|
case TransformFunctionKeys.skew:
|
|
7723
|
-
return /* @__PURE__ */
|
|
8149
|
+
return /* @__PURE__ */ React108.createElement(Label2, { label: __53("Skew", "elementor"), value: formatLabel(value, "skew") });
|
|
7724
8150
|
default:
|
|
7725
8151
|
return "";
|
|
7726
8152
|
}
|
|
7727
8153
|
};
|
|
7728
8154
|
var Label2 = ({ label, value }) => {
|
|
7729
|
-
return /* @__PURE__ */
|
|
8155
|
+
return /* @__PURE__ */ React108.createElement(Box24, { component: "span" }, label, ": ", value);
|
|
7730
8156
|
};
|
|
7731
8157
|
|
|
7732
8158
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
7733
|
-
import * as
|
|
8159
|
+
import * as React111 from "react";
|
|
7734
8160
|
import { PopoverHeader as PopoverHeader5 } from "@elementor/editor-ui";
|
|
7735
8161
|
import { AdjustmentsIcon } from "@elementor/icons";
|
|
7736
|
-
import { bindPopover as bindPopover6, Box as
|
|
7737
|
-
import { __ as
|
|
8162
|
+
import { bindPopover as bindPopover6, Box as Box25, Divider as Divider5, Popover as Popover7 } from "@elementor/ui";
|
|
8163
|
+
import { __ as __56 } from "@wordpress/i18n";
|
|
7738
8164
|
|
|
7739
8165
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
7740
|
-
import * as
|
|
7741
|
-
import { useRef as
|
|
8166
|
+
import * as React109 from "react";
|
|
8167
|
+
import { useRef as useRef25 } from "react";
|
|
7742
8168
|
import { perspectiveOriginPropTypeUtil } from "@elementor/editor-props";
|
|
7743
|
-
import { Grid as Grid27, Stack as
|
|
7744
|
-
import { __ as
|
|
8169
|
+
import { Grid as Grid27, Stack as Stack19 } from "@elementor/ui";
|
|
8170
|
+
import { __ as __54 } from "@wordpress/i18n";
|
|
7745
8171
|
var ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
7746
8172
|
var PERSPECTIVE_CONTROL_FIELD = {
|
|
7747
|
-
label:
|
|
8173
|
+
label: __54("Perspective", "elementor"),
|
|
7748
8174
|
bind: "perspective",
|
|
7749
8175
|
units: ["px", "em", "rem", "vw", "vh"]
|
|
7750
8176
|
};
|
|
7751
8177
|
var CHILDREN_PERSPECTIVE_FIELDS = [
|
|
7752
8178
|
{
|
|
7753
|
-
label:
|
|
8179
|
+
label: __54("Origin X", "elementor"),
|
|
7754
8180
|
bind: "x",
|
|
7755
8181
|
units: ORIGIN_UNITS
|
|
7756
8182
|
},
|
|
7757
8183
|
{
|
|
7758
|
-
label:
|
|
8184
|
+
label: __54("Origin Y", "elementor"),
|
|
7759
8185
|
bind: "y",
|
|
7760
8186
|
units: ORIGIN_UNITS
|
|
7761
8187
|
}
|
|
7762
8188
|
];
|
|
7763
8189
|
var ChildrenPerspectiveControl = () => {
|
|
7764
|
-
return /* @__PURE__ */
|
|
8190
|
+
return /* @__PURE__ */ React109.createElement(Stack19, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React109.createElement(ControlFormLabel, null, __54("Children perspective", "elementor")), /* @__PURE__ */ React109.createElement(PerspectiveControl, null), /* @__PURE__ */ React109.createElement(PerspectiveOriginControl, null));
|
|
7765
8191
|
};
|
|
7766
|
-
var PerspectiveControl = () => /* @__PURE__ */
|
|
7767
|
-
var PerspectiveOriginControl = () => /* @__PURE__ */
|
|
8192
|
+
var PerspectiveControl = () => /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "perspective" }, /* @__PURE__ */ React109.createElement(ControlFields, { control: PERSPECTIVE_CONTROL_FIELD, key: PERSPECTIVE_CONTROL_FIELD.bind }));
|
|
8193
|
+
var PerspectiveOriginControl = () => /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "perspective-origin" }, /* @__PURE__ */ React109.createElement(PerspectiveOriginControlProvider, null));
|
|
7768
8194
|
var PerspectiveOriginControlProvider = () => {
|
|
7769
8195
|
const context = useBoundProp(perspectiveOriginPropTypeUtil);
|
|
7770
|
-
return /* @__PURE__ */
|
|
8196
|
+
return /* @__PURE__ */ React109.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React109.createElement(ControlFields, { control }))));
|
|
7771
8197
|
};
|
|
7772
8198
|
var ControlFields = ({ control }) => {
|
|
7773
|
-
const rowRef =
|
|
7774
|
-
return /* @__PURE__ */
|
|
8199
|
+
const rowRef = useRef25(null);
|
|
8200
|
+
return /* @__PURE__ */ React109.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React109.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React109.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React109.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React109.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
|
|
7775
8201
|
};
|
|
7776
8202
|
|
|
7777
8203
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
7778
|
-
import * as
|
|
7779
|
-
import { useRef as
|
|
8204
|
+
import * as React110 from "react";
|
|
8205
|
+
import { useRef as useRef26 } from "react";
|
|
7780
8206
|
import { transformOriginPropTypeUtil } from "@elementor/editor-props";
|
|
7781
|
-
import { Grid as Grid28, Stack as
|
|
7782
|
-
import { __ as
|
|
8207
|
+
import { Grid as Grid28, Stack as Stack20 } from "@elementor/ui";
|
|
8208
|
+
import { __ as __55 } from "@wordpress/i18n";
|
|
7783
8209
|
var TRANSFORM_ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
7784
8210
|
var TRANSFORM_ORIGIN_UNITS_Z_AXIS = TRANSFORM_ORIGIN_UNITS.filter((unit) => unit !== "%");
|
|
7785
8211
|
var TRANSFORM_ORIGIN_FIELDS = [
|
|
7786
8212
|
{
|
|
7787
|
-
label:
|
|
8213
|
+
label: __55("Origin X", "elementor"),
|
|
7788
8214
|
bind: "x",
|
|
7789
8215
|
units: TRANSFORM_ORIGIN_UNITS
|
|
7790
8216
|
},
|
|
7791
8217
|
{
|
|
7792
|
-
label:
|
|
8218
|
+
label: __55("Origin Y", "elementor"),
|
|
7793
8219
|
bind: "y",
|
|
7794
8220
|
units: TRANSFORM_ORIGIN_UNITS
|
|
7795
8221
|
},
|
|
7796
8222
|
{
|
|
7797
|
-
label:
|
|
8223
|
+
label: __55("Origin Z", "elementor"),
|
|
7798
8224
|
bind: "z",
|
|
7799
8225
|
units: TRANSFORM_ORIGIN_UNITS_Z_AXIS
|
|
7800
8226
|
}
|
|
7801
8227
|
];
|
|
7802
8228
|
var TransformOriginControl = () => {
|
|
7803
|
-
return /* @__PURE__ */
|
|
8229
|
+
return /* @__PURE__ */ React110.createElement(Stack20, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React110.createElement(ControlFormLabel, null, __55("Transform", "elementor")), TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React110.createElement(ControlFields2, { control, key: control.bind })));
|
|
7804
8230
|
};
|
|
7805
8231
|
var ControlFields2 = ({ control }) => {
|
|
7806
8232
|
const context = useBoundProp(transformOriginPropTypeUtil);
|
|
7807
|
-
const rowRef =
|
|
7808
|
-
return /* @__PURE__ */
|
|
8233
|
+
const rowRef = useRef26(null);
|
|
8234
|
+
return /* @__PURE__ */ React110.createElement(PropProvider, { ...context }, /* @__PURE__ */ React110.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React110.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React110.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React110.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React110.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React110.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef })))));
|
|
7809
8235
|
};
|
|
7810
8236
|
|
|
7811
8237
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
@@ -7819,7 +8245,7 @@ var TransformSettingsControl = ({
|
|
|
7819
8245
|
...popupState,
|
|
7820
8246
|
anchorEl: anchorRef.current ?? void 0
|
|
7821
8247
|
});
|
|
7822
|
-
return /* @__PURE__ */
|
|
8248
|
+
return /* @__PURE__ */ React111.createElement(
|
|
7823
8249
|
Popover7,
|
|
7824
8250
|
{
|
|
7825
8251
|
disablePortal: true,
|
|
@@ -7834,16 +8260,16 @@ var TransformSettingsControl = ({
|
|
|
7834
8260
|
},
|
|
7835
8261
|
...popupProps
|
|
7836
8262
|
},
|
|
7837
|
-
/* @__PURE__ */
|
|
8263
|
+
/* @__PURE__ */ React111.createElement(
|
|
7838
8264
|
PopoverHeader5,
|
|
7839
8265
|
{
|
|
7840
|
-
title:
|
|
8266
|
+
title: __56("Transform settings", "elementor"),
|
|
7841
8267
|
onClose: popupState.close,
|
|
7842
|
-
icon: /* @__PURE__ */
|
|
8268
|
+
icon: /* @__PURE__ */ React111.createElement(AdjustmentsIcon, { fontSize: SIZE10 })
|
|
7843
8269
|
}
|
|
7844
8270
|
),
|
|
7845
|
-
/* @__PURE__ */
|
|
7846
|
-
/* @__PURE__ */
|
|
8271
|
+
/* @__PURE__ */ React111.createElement(Divider5, null),
|
|
8272
|
+
/* @__PURE__ */ React111.createElement(PopoverContent, { sx: { px: 2, py: 1.5 } }, /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: "transform-origin" }, /* @__PURE__ */ React111.createElement(TransformOriginControl, null)), showChildrenPerspective && /* @__PURE__ */ React111.createElement(React111.Fragment, null, /* @__PURE__ */ React111.createElement(Box25, { sx: { my: 0.5 } }, /* @__PURE__ */ React111.createElement(Divider5, null)), /* @__PURE__ */ React111.createElement(ChildrenPerspectiveControl, null)))
|
|
7847
8273
|
);
|
|
7848
8274
|
};
|
|
7849
8275
|
|
|
@@ -7852,27 +8278,27 @@ var SIZE11 = "tiny";
|
|
|
7852
8278
|
var TransformRepeaterControl = createControl(
|
|
7853
8279
|
({ showChildrenPerspective }) => {
|
|
7854
8280
|
const context = useBoundProp(transformPropTypeUtil);
|
|
7855
|
-
const headerRef =
|
|
7856
|
-
const popupState =
|
|
7857
|
-
return /* @__PURE__ */
|
|
8281
|
+
const headerRef = useRef27(null);
|
|
8282
|
+
const popupState = usePopupState11({ variant: "popover" });
|
|
8283
|
+
return /* @__PURE__ */ React112.createElement(PropProvider, { ...context }, /* @__PURE__ */ React112.createElement(
|
|
7858
8284
|
TransformSettingsControl,
|
|
7859
8285
|
{
|
|
7860
8286
|
popupState,
|
|
7861
8287
|
anchorRef: headerRef,
|
|
7862
8288
|
showChildrenPerspective
|
|
7863
8289
|
}
|
|
7864
|
-
), /* @__PURE__ */
|
|
8290
|
+
), /* @__PURE__ */ React112.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React112.createElement(Repeater2, { headerRef, propType: context.propType, popupState })));
|
|
7865
8291
|
}
|
|
7866
8292
|
);
|
|
7867
|
-
var ToolTip = /* @__PURE__ */
|
|
7868
|
-
|
|
8293
|
+
var ToolTip = /* @__PURE__ */ React112.createElement(
|
|
8294
|
+
Box26,
|
|
7869
8295
|
{
|
|
7870
8296
|
component: "span",
|
|
7871
8297
|
"aria-label": void 0,
|
|
7872
8298
|
sx: { display: "flex", gap: 0.5, p: 2, width: 320, borderRadius: 1 }
|
|
7873
8299
|
},
|
|
7874
|
-
/* @__PURE__ */
|
|
7875
|
-
/* @__PURE__ */
|
|
8300
|
+
/* @__PURE__ */ React112.createElement(InfoCircleFilledIcon2, { sx: { color: "secondary.main" } }),
|
|
8301
|
+
/* @__PURE__ */ React112.createElement(Typography11, { variant: "body2", color: "text.secondary", fontSize: "14px" }, __57("You can use each kind of transform only once per element.", "elementor"))
|
|
7876
8302
|
);
|
|
7877
8303
|
var Repeater2 = ({
|
|
7878
8304
|
headerRef,
|
|
@@ -7886,21 +8312,21 @@ var Repeater2 = ({
|
|
|
7886
8312
|
return availableValues.find((value) => !transformValues?.some((item) => item.$$type === value.$$type));
|
|
7887
8313
|
};
|
|
7888
8314
|
const shouldDisableAddItem = !getInitialValue2();
|
|
7889
|
-
return /* @__PURE__ */
|
|
8315
|
+
return /* @__PURE__ */ React112.createElement(PropProvider, { ...transformFunctionsContext }, /* @__PURE__ */ React112.createElement(
|
|
7890
8316
|
ControlRepeater,
|
|
7891
8317
|
{
|
|
7892
8318
|
initial: getInitialValue2() ?? initialTransformValue,
|
|
7893
8319
|
propTypeUtil: transformFunctionsPropTypeUtil
|
|
7894
8320
|
},
|
|
7895
|
-
/* @__PURE__ */
|
|
8321
|
+
/* @__PURE__ */ React112.createElement(
|
|
7896
8322
|
RepeaterHeader,
|
|
7897
8323
|
{
|
|
7898
|
-
label:
|
|
7899
|
-
adornment: () => /* @__PURE__ */
|
|
8324
|
+
label: __57("Transform", "elementor"),
|
|
8325
|
+
adornment: () => /* @__PURE__ */ React112.createElement(ControlAdornments, { customContext: { path: ["transform"], propType } }),
|
|
7900
8326
|
ref: headerRef
|
|
7901
8327
|
},
|
|
7902
|
-
/* @__PURE__ */
|
|
7903
|
-
/* @__PURE__ */
|
|
8328
|
+
/* @__PURE__ */ React112.createElement(TransformBasePopoverTrigger, { popupState, repeaterBindKey: bind }),
|
|
8329
|
+
/* @__PURE__ */ React112.createElement(
|
|
7904
8330
|
TooltipAddItemAction,
|
|
7905
8331
|
{
|
|
7906
8332
|
disabled: shouldDisableAddItem,
|
|
@@ -7910,15 +8336,15 @@ var Repeater2 = ({
|
|
|
7910
8336
|
}
|
|
7911
8337
|
)
|
|
7912
8338
|
),
|
|
7913
|
-
/* @__PURE__ */
|
|
8339
|
+
/* @__PURE__ */ React112.createElement(ItemsContainer, null, /* @__PURE__ */ React112.createElement(
|
|
7914
8340
|
Item,
|
|
7915
8341
|
{
|
|
7916
8342
|
Icon: TransformIcon,
|
|
7917
8343
|
Label: TransformLabel,
|
|
7918
|
-
actions: /* @__PURE__ */
|
|
8344
|
+
actions: /* @__PURE__ */ React112.createElement(React112.Fragment, null, /* @__PURE__ */ React112.createElement(DisableItemAction, null), /* @__PURE__ */ React112.createElement(RemoveItemAction, null))
|
|
7919
8345
|
}
|
|
7920
8346
|
)),
|
|
7921
|
-
/* @__PURE__ */
|
|
8347
|
+
/* @__PURE__ */ React112.createElement(EditItemPopover, null, /* @__PURE__ */ React112.createElement(TransformContent, null))
|
|
7922
8348
|
));
|
|
7923
8349
|
};
|
|
7924
8350
|
var TransformBasePopoverTrigger = ({
|
|
@@ -7926,31 +8352,31 @@ var TransformBasePopoverTrigger = ({
|
|
|
7926
8352
|
repeaterBindKey
|
|
7927
8353
|
}) => {
|
|
7928
8354
|
const { bind } = useBoundProp();
|
|
7929
|
-
const titleLabel =
|
|
7930
|
-
return bind !== repeaterBindKey ? null : /* @__PURE__ */
|
|
8355
|
+
const titleLabel = __57("Transform settings", "elementor");
|
|
8356
|
+
return bind !== repeaterBindKey ? null : /* @__PURE__ */ React112.createElement(Tooltip11, { title: titleLabel, placement: "top" }, /* @__PURE__ */ React112.createElement(IconButton8, { size: SIZE11, "aria-label": titleLabel, ...bindTrigger5(popupState) }, /* @__PURE__ */ React112.createElement(AdjustmentsIcon2, { fontSize: SIZE11 })));
|
|
7931
8357
|
};
|
|
7932
8358
|
|
|
7933
8359
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
7934
|
-
import * as
|
|
7935
|
-
import { useEffect as useEffect17, useMemo as useMemo17, useState as
|
|
8360
|
+
import * as React115 from "react";
|
|
8361
|
+
import { useEffect as useEffect17, useMemo as useMemo17, useState as useState20 } from "react";
|
|
7936
8362
|
import {
|
|
7937
8363
|
createArrayPropUtils as createArrayPropUtils3,
|
|
7938
8364
|
selectionSizePropTypeUtil as selectionSizePropTypeUtil2
|
|
7939
8365
|
} from "@elementor/editor-props";
|
|
7940
8366
|
import { InfoCircleFilledIcon as InfoCircleFilledIcon3 } from "@elementor/icons";
|
|
7941
|
-
import { Alert as Alert2, AlertTitle as AlertTitle3, Box as
|
|
8367
|
+
import { Alert as Alert2, AlertTitle as AlertTitle3, Box as Box28, Typography as Typography12 } from "@elementor/ui";
|
|
7942
8368
|
import { hasProInstalled as hasProInstalled2 } from "@elementor/utils";
|
|
7943
|
-
import { __ as
|
|
8369
|
+
import { __ as __60 } from "@wordpress/i18n";
|
|
7944
8370
|
|
|
7945
8371
|
// src/controls/selection-size-control.tsx
|
|
7946
|
-
import * as
|
|
7947
|
-
import { useMemo as useMemo15, useRef as
|
|
8372
|
+
import * as React113 from "react";
|
|
8373
|
+
import { useMemo as useMemo15, useRef as useRef28 } from "react";
|
|
7948
8374
|
import { selectionSizePropTypeUtil } from "@elementor/editor-props";
|
|
7949
8375
|
import { Grid as Grid29 } from "@elementor/ui";
|
|
7950
8376
|
var SelectionSizeControl = createControl(
|
|
7951
8377
|
({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
|
|
7952
8378
|
const { value, setValue, propType } = useBoundProp(selectionSizePropTypeUtil);
|
|
7953
|
-
const rowRef =
|
|
8379
|
+
const rowRef = useRef28(null);
|
|
7954
8380
|
const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
|
|
7955
8381
|
const currentSizeConfig = useMemo15(() => {
|
|
7956
8382
|
switch (value.selection.$$type) {
|
|
@@ -7963,7 +8389,7 @@ var SelectionSizeControl = createControl(
|
|
|
7963
8389
|
}
|
|
7964
8390
|
}, [value, sizeConfigMap]);
|
|
7965
8391
|
const SelectionComponent = selectionConfig.component;
|
|
7966
|
-
return /* @__PURE__ */
|
|
8392
|
+
return /* @__PURE__ */ React113.createElement(PropProvider, { value, setValue, propType }, /* @__PURE__ */ React113.createElement(Grid29, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React113.createElement(Grid29, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React113.createElement(ControlFormLabel, null, selectionLabel)), /* @__PURE__ */ React113.createElement(Grid29, { item: true, xs: 6 }, /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: "selection" }, /* @__PURE__ */ React113.createElement(SelectionComponent, { ...selectionConfig.props }))), currentSizeConfig && /* @__PURE__ */ React113.createElement(React113.Fragment, null, /* @__PURE__ */ React113.createElement(Grid29, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React113.createElement(ControlFormLabel, { htmlFor: sizeFieldId }, sizeLabel)), /* @__PURE__ */ React113.createElement(Grid29, { item: true, xs: 6 }, /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React113.createElement(
|
|
7967
8393
|
SizeControl,
|
|
7968
8394
|
{
|
|
7969
8395
|
anchorRef: rowRef,
|
|
@@ -7978,12 +8404,12 @@ var SelectionSizeControl = createControl(
|
|
|
7978
8404
|
|
|
7979
8405
|
// src/controls/transition-control/data.ts
|
|
7980
8406
|
import { hasProInstalled, isVersionGreaterOrEqual } from "@elementor/utils";
|
|
7981
|
-
import { __ as
|
|
8407
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
7982
8408
|
var initialTransitionValue = {
|
|
7983
8409
|
selection: {
|
|
7984
8410
|
$$type: "key-value",
|
|
7985
8411
|
value: {
|
|
7986
|
-
key: { value:
|
|
8412
|
+
key: { value: __58("All properties", "elementor"), $$type: "string" },
|
|
7987
8413
|
value: { value: "all", $$type: "string" }
|
|
7988
8414
|
}
|
|
7989
8415
|
},
|
|
@@ -8007,128 +8433,128 @@ var createTransitionPropertiesList = () => {
|
|
|
8007
8433
|
const isSiteRtl = getIsSiteRtl();
|
|
8008
8434
|
const baseProperties = [
|
|
8009
8435
|
{
|
|
8010
|
-
label:
|
|
8436
|
+
label: __58("Default", "elementor"),
|
|
8011
8437
|
type: "category",
|
|
8012
|
-
properties: [{ label:
|
|
8438
|
+
properties: [{ label: __58("All properties", "elementor"), value: "all" }]
|
|
8013
8439
|
},
|
|
8014
8440
|
{
|
|
8015
|
-
label:
|
|
8441
|
+
label: __58("Margin", "elementor"),
|
|
8016
8442
|
type: "category",
|
|
8017
8443
|
properties: [
|
|
8018
|
-
{ label:
|
|
8019
|
-
{ label:
|
|
8444
|
+
{ label: __58("Margin (all)", "elementor"), value: "margin", isDisabled: true },
|
|
8445
|
+
{ label: __58("Margin bottom", "elementor"), value: "margin-block-end", isDisabled: true },
|
|
8020
8446
|
{
|
|
8021
|
-
label: isSiteRtl ?
|
|
8447
|
+
label: isSiteRtl ? __58("Margin right", "elementor") : __58("Margin left", "elementor"),
|
|
8022
8448
|
value: "margin-inline-start",
|
|
8023
8449
|
isDisabled: true
|
|
8024
8450
|
},
|
|
8025
8451
|
{
|
|
8026
|
-
label: isSiteRtl ?
|
|
8452
|
+
label: isSiteRtl ? __58("Margin left", "elementor") : __58("Margin right", "elementor"),
|
|
8027
8453
|
value: "margin-inline-end",
|
|
8028
8454
|
isDisabled: true
|
|
8029
8455
|
},
|
|
8030
|
-
{ label:
|
|
8456
|
+
{ label: __58("Margin top", "elementor"), value: "margin-block-start", isDisabled: true }
|
|
8031
8457
|
]
|
|
8032
8458
|
},
|
|
8033
8459
|
{
|
|
8034
|
-
label:
|
|
8460
|
+
label: __58("Padding", "elementor"),
|
|
8035
8461
|
type: "category",
|
|
8036
8462
|
properties: [
|
|
8037
|
-
{ label:
|
|
8038
|
-
{ label:
|
|
8463
|
+
{ label: __58("Padding (all)", "elementor"), value: "padding", isDisabled: true },
|
|
8464
|
+
{ label: __58("Padding bottom", "elementor"), value: "padding-block-end", isDisabled: true },
|
|
8039
8465
|
{
|
|
8040
|
-
label: isSiteRtl ?
|
|
8466
|
+
label: isSiteRtl ? __58("Padding right", "elementor") : __58("Padding left", "elementor"),
|
|
8041
8467
|
value: "padding-inline-start",
|
|
8042
8468
|
isDisabled: true
|
|
8043
8469
|
},
|
|
8044
8470
|
{
|
|
8045
|
-
label: isSiteRtl ?
|
|
8471
|
+
label: isSiteRtl ? __58("Padding left", "elementor") : __58("Padding right", "elementor"),
|
|
8046
8472
|
value: "padding-inline-end",
|
|
8047
8473
|
isDisabled: true
|
|
8048
8474
|
},
|
|
8049
|
-
{ label:
|
|
8475
|
+
{ label: __58("Padding top", "elementor"), value: "padding-block-start", isDisabled: true }
|
|
8050
8476
|
]
|
|
8051
8477
|
},
|
|
8052
8478
|
{
|
|
8053
|
-
label:
|
|
8479
|
+
label: __58("Flex", "elementor"),
|
|
8054
8480
|
type: "category",
|
|
8055
8481
|
properties: [
|
|
8056
|
-
{ label:
|
|
8057
|
-
{ label:
|
|
8058
|
-
{ label:
|
|
8059
|
-
{ label:
|
|
8482
|
+
{ label: __58("Flex (all)", "elementor"), value: "flex", isDisabled: true },
|
|
8483
|
+
{ label: __58("Flex grow", "elementor"), value: "flex-grow", isDisabled: true },
|
|
8484
|
+
{ label: __58("Flex shrink", "elementor"), value: "flex-shrink", isDisabled: true },
|
|
8485
|
+
{ label: __58("Flex basis", "elementor"), value: "flex-basis", isDisabled: true }
|
|
8060
8486
|
]
|
|
8061
8487
|
},
|
|
8062
8488
|
{
|
|
8063
|
-
label:
|
|
8489
|
+
label: __58("Size", "elementor"),
|
|
8064
8490
|
type: "category",
|
|
8065
8491
|
properties: [
|
|
8066
|
-
{ label:
|
|
8067
|
-
{ label:
|
|
8068
|
-
{ label:
|
|
8069
|
-
{ label:
|
|
8070
|
-
{ label:
|
|
8071
|
-
{ label:
|
|
8492
|
+
{ label: __58("Width", "elementor"), value: "width", isDisabled: true },
|
|
8493
|
+
{ label: __58("Height", "elementor"), value: "height", isDisabled: true },
|
|
8494
|
+
{ label: __58("Max height", "elementor"), value: "max-height", isDisabled: true },
|
|
8495
|
+
{ label: __58("Max width", "elementor"), value: "max-width", isDisabled: true },
|
|
8496
|
+
{ label: __58("Min height", "elementor"), value: "min-height", isDisabled: true },
|
|
8497
|
+
{ label: __58("Min width", "elementor"), value: "min-width", isDisabled: true }
|
|
8072
8498
|
]
|
|
8073
8499
|
},
|
|
8074
8500
|
{
|
|
8075
|
-
label:
|
|
8501
|
+
label: __58("Position", "elementor"),
|
|
8076
8502
|
type: "category",
|
|
8077
8503
|
properties: [
|
|
8078
|
-
{ label:
|
|
8504
|
+
{ label: __58("Top", "elementor"), value: "inset-block-start", isDisabled: true },
|
|
8079
8505
|
{
|
|
8080
|
-
label: isSiteRtl ?
|
|
8506
|
+
label: isSiteRtl ? __58("Right", "elementor") : __58("Left", "elementor"),
|
|
8081
8507
|
value: "inset-inline-start",
|
|
8082
8508
|
isDisabled: true
|
|
8083
8509
|
},
|
|
8084
8510
|
{
|
|
8085
|
-
label: isSiteRtl ?
|
|
8511
|
+
label: isSiteRtl ? __58("Left", "elementor") : __58("Right", "elementor"),
|
|
8086
8512
|
value: "inset-inline-end",
|
|
8087
8513
|
isDisabled: true
|
|
8088
8514
|
},
|
|
8089
|
-
{ label:
|
|
8090
|
-
{ label:
|
|
8515
|
+
{ label: __58("Bottom", "elementor"), value: "inset-block-end", isDisabled: true },
|
|
8516
|
+
{ label: __58("Z-index", "elementor"), value: "z-index", isDisabled: true }
|
|
8091
8517
|
]
|
|
8092
8518
|
},
|
|
8093
8519
|
{
|
|
8094
|
-
label:
|
|
8520
|
+
label: __58("Typography", "elementor"),
|
|
8095
8521
|
type: "category",
|
|
8096
8522
|
properties: [
|
|
8097
|
-
{ label:
|
|
8098
|
-
{ label:
|
|
8099
|
-
{ label:
|
|
8100
|
-
{ label:
|
|
8101
|
-
{ label:
|
|
8102
|
-
{ label:
|
|
8103
|
-
{ label:
|
|
8523
|
+
{ label: __58("Font color", "elementor"), value: "color", isDisabled: true },
|
|
8524
|
+
{ label: __58("Font size", "elementor"), value: "font-size", isDisabled: true },
|
|
8525
|
+
{ label: __58("Line height", "elementor"), value: "line-height", isDisabled: true },
|
|
8526
|
+
{ label: __58("Letter spacing", "elementor"), value: "letter-spacing", isDisabled: true },
|
|
8527
|
+
{ label: __58("Word spacing", "elementor"), value: "word-spacing", isDisabled: true },
|
|
8528
|
+
{ label: __58("Font variations", "elementor"), value: "font-variation-settings", isDisabled: true },
|
|
8529
|
+
{ label: __58("Text stroke color", "elementor"), value: "-webkit-text-stroke-color", isDisabled: true }
|
|
8104
8530
|
]
|
|
8105
8531
|
},
|
|
8106
8532
|
{
|
|
8107
|
-
label:
|
|
8533
|
+
label: __58("Background", "elementor"),
|
|
8108
8534
|
type: "category",
|
|
8109
8535
|
properties: [
|
|
8110
|
-
{ label:
|
|
8111
|
-
{ label:
|
|
8112
|
-
{ label:
|
|
8536
|
+
{ label: __58("Background color", "elementor"), value: "background-color", isDisabled: true },
|
|
8537
|
+
{ label: __58("Background position", "elementor"), value: "background-position", isDisabled: true },
|
|
8538
|
+
{ label: __58("Box shadow", "elementor"), value: "box-shadow", isDisabled: true }
|
|
8113
8539
|
]
|
|
8114
8540
|
},
|
|
8115
8541
|
{
|
|
8116
|
-
label:
|
|
8542
|
+
label: __58("Border", "elementor"),
|
|
8117
8543
|
type: "category",
|
|
8118
8544
|
properties: [
|
|
8119
|
-
{ label:
|
|
8120
|
-
{ label:
|
|
8121
|
-
{ label:
|
|
8122
|
-
{ label:
|
|
8545
|
+
{ label: __58("Border (all)", "elementor"), value: "border", isDisabled: true },
|
|
8546
|
+
{ label: __58("Border radius", "elementor"), value: "border-radius", isDisabled: true },
|
|
8547
|
+
{ label: __58("Border color", "elementor"), value: "border-color", isDisabled: true },
|
|
8548
|
+
{ label: __58("Border width", "elementor"), value: "border-width", isDisabled: true }
|
|
8123
8549
|
]
|
|
8124
8550
|
},
|
|
8125
8551
|
{
|
|
8126
|
-
label:
|
|
8552
|
+
label: __58("Effects", "elementor"),
|
|
8127
8553
|
type: "category",
|
|
8128
8554
|
properties: [
|
|
8129
|
-
{ label:
|
|
8130
|
-
{ label:
|
|
8131
|
-
{ label:
|
|
8555
|
+
{ label: __58("Opacity", "elementor"), value: "opacity", isDisabled: true },
|
|
8556
|
+
{ label: __58("Transform (all)", "elementor"), value: "transform", isDisabled: true },
|
|
8557
|
+
{ label: __58("Filter (all)", "elementor"), value: "filter", isDisabled: true }
|
|
8132
8558
|
]
|
|
8133
8559
|
}
|
|
8134
8560
|
];
|
|
@@ -8164,13 +8590,13 @@ function subscribeToTransitionEvent() {
|
|
|
8164
8590
|
}
|
|
8165
8591
|
|
|
8166
8592
|
// src/controls/transition-control/transition-selector.tsx
|
|
8167
|
-
import * as
|
|
8168
|
-
import { useMemo as useMemo16, useRef as
|
|
8593
|
+
import * as React114 from "react";
|
|
8594
|
+
import { useMemo as useMemo16, useRef as useRef29 } from "react";
|
|
8169
8595
|
import { keyValuePropTypeUtil as keyValuePropTypeUtil2 } from "@elementor/editor-props";
|
|
8170
8596
|
import { PromotionAlert, PromotionChip } from "@elementor/editor-ui";
|
|
8171
8597
|
import { ChevronDownIcon as ChevronDownIcon3, VariationsIcon } from "@elementor/icons";
|
|
8172
|
-
import { bindPopover as bindPopover7, bindTrigger as bindTrigger6, Box as
|
|
8173
|
-
import { __ as
|
|
8598
|
+
import { bindPopover as bindPopover7, bindTrigger as bindTrigger6, Box as Box27, Popover as Popover8, UnstableTag as UnstableTag3, usePopupState as usePopupState12 } from "@elementor/ui";
|
|
8599
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
8174
8600
|
|
|
8175
8601
|
// src/utils/tracking.ts
|
|
8176
8602
|
import { getSelectedElements as getSelectedElements2 } from "@elementor/editor-elements";
|
|
@@ -8251,8 +8677,8 @@ var TransitionSelector = ({
|
|
|
8251
8677
|
const {
|
|
8252
8678
|
key: { value: transitionLabel }
|
|
8253
8679
|
} = value;
|
|
8254
|
-
const defaultRef =
|
|
8255
|
-
const popoverState =
|
|
8680
|
+
const defaultRef = useRef29(null);
|
|
8681
|
+
const popoverState = usePopupState12({ variant: "popover" });
|
|
8256
8682
|
const disabledCategories = useMemo16(() => {
|
|
8257
8683
|
return new Set(
|
|
8258
8684
|
transitionProperties.filter((cat) => cat.properties.some((prop) => prop.isDisabled)).map((cat) => cat.label)
|
|
@@ -8273,7 +8699,7 @@ var TransitionSelector = ({
|
|
|
8273
8699
|
return [
|
|
8274
8700
|
first,
|
|
8275
8701
|
{
|
|
8276
|
-
label:
|
|
8702
|
+
label: __59("Recently Used", "elementor"),
|
|
8277
8703
|
items: recentItems
|
|
8278
8704
|
},
|
|
8279
8705
|
...rest
|
|
@@ -8297,16 +8723,16 @@ var TransitionSelector = ({
|
|
|
8297
8723
|
left: rect.right + 36
|
|
8298
8724
|
};
|
|
8299
8725
|
};
|
|
8300
|
-
return /* @__PURE__ */
|
|
8726
|
+
return /* @__PURE__ */ React114.createElement(Box27, { ref: defaultRef }, /* @__PURE__ */ React114.createElement(ControlActions, null, /* @__PURE__ */ React114.createElement(
|
|
8301
8727
|
UnstableTag3,
|
|
8302
8728
|
{
|
|
8303
8729
|
variant: "outlined",
|
|
8304
8730
|
label: transitionLabel,
|
|
8305
|
-
endIcon: /* @__PURE__ */
|
|
8731
|
+
endIcon: /* @__PURE__ */ React114.createElement(ChevronDownIcon3, { fontSize: "tiny" }),
|
|
8306
8732
|
...bindTrigger6(popoverState),
|
|
8307
8733
|
fullWidth: true
|
|
8308
8734
|
}
|
|
8309
|
-
)), /* @__PURE__ */
|
|
8735
|
+
)), /* @__PURE__ */ React114.createElement(
|
|
8310
8736
|
Popover8,
|
|
8311
8737
|
{
|
|
8312
8738
|
disablePortal: true,
|
|
@@ -8317,7 +8743,7 @@ var TransitionSelector = ({
|
|
|
8317
8743
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
8318
8744
|
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
8319
8745
|
},
|
|
8320
|
-
/* @__PURE__ */
|
|
8746
|
+
/* @__PURE__ */ React114.createElement(
|
|
8321
8747
|
ItemSelector,
|
|
8322
8748
|
{
|
|
8323
8749
|
itemsList: getItemList(),
|
|
@@ -8325,11 +8751,11 @@ var TransitionSelector = ({
|
|
|
8325
8751
|
onItemChange: handleTransitionPropertyChange,
|
|
8326
8752
|
onClose: popoverState.close,
|
|
8327
8753
|
sectionWidth: 268,
|
|
8328
|
-
title:
|
|
8754
|
+
title: __59("Transition Property", "elementor"),
|
|
8329
8755
|
icon: VariationsIcon,
|
|
8330
8756
|
disabledItems: includeCurrentValueInOptions(value, disabledItems),
|
|
8331
|
-
categoryItemContentTemplate: (item) => /* @__PURE__ */
|
|
8332
|
-
|
|
8757
|
+
categoryItemContentTemplate: (item) => /* @__PURE__ */ React114.createElement(
|
|
8758
|
+
Box27,
|
|
8333
8759
|
{
|
|
8334
8760
|
sx: {
|
|
8335
8761
|
display: "flex",
|
|
@@ -8338,13 +8764,13 @@ var TransitionSelector = ({
|
|
|
8338
8764
|
width: "100%"
|
|
8339
8765
|
}
|
|
8340
8766
|
},
|
|
8341
|
-
/* @__PURE__ */
|
|
8342
|
-
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */
|
|
8767
|
+
/* @__PURE__ */ React114.createElement("span", null, item.value),
|
|
8768
|
+
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */ React114.createElement(PromotionChip, null)
|
|
8343
8769
|
),
|
|
8344
|
-
footer: showPromotion ? /* @__PURE__ */
|
|
8770
|
+
footer: showPromotion ? /* @__PURE__ */ React114.createElement(
|
|
8345
8771
|
PromotionAlert,
|
|
8346
8772
|
{
|
|
8347
|
-
message:
|
|
8773
|
+
message: __59(
|
|
8348
8774
|
"Upgrade to customize transition properties and control effects.",
|
|
8349
8775
|
"elementor"
|
|
8350
8776
|
),
|
|
@@ -8383,8 +8809,8 @@ var areAllPropertiesUsed = (value = []) => {
|
|
|
8383
8809
|
};
|
|
8384
8810
|
var getSelectionSizeProps = (recentlyUsedList, disabledItems, showPromotion) => {
|
|
8385
8811
|
return {
|
|
8386
|
-
selectionLabel:
|
|
8387
|
-
sizeLabel:
|
|
8812
|
+
selectionLabel: __60("Type", "elementor"),
|
|
8813
|
+
sizeLabel: __60("Duration", "elementor"),
|
|
8388
8814
|
selectionConfig: {
|
|
8389
8815
|
component: TransitionSelector,
|
|
8390
8816
|
props: {
|
|
@@ -8460,7 +8886,7 @@ var getInitialValue = (values = []) => {
|
|
|
8460
8886
|
}
|
|
8461
8887
|
return initialTransitionValue;
|
|
8462
8888
|
};
|
|
8463
|
-
var disableAddItemTooltipContent = /* @__PURE__ */
|
|
8889
|
+
var disableAddItemTooltipContent = /* @__PURE__ */ React115.createElement(
|
|
8464
8890
|
Alert2,
|
|
8465
8891
|
{
|
|
8466
8892
|
sx: {
|
|
@@ -8468,10 +8894,10 @@ var disableAddItemTooltipContent = /* @__PURE__ */ React113.createElement(
|
|
|
8468
8894
|
gap: 0.5
|
|
8469
8895
|
},
|
|
8470
8896
|
color: "secondary",
|
|
8471
|
-
icon: /* @__PURE__ */
|
|
8897
|
+
icon: /* @__PURE__ */ React115.createElement(InfoCircleFilledIcon3, null)
|
|
8472
8898
|
},
|
|
8473
|
-
/* @__PURE__ */
|
|
8474
|
-
/* @__PURE__ */
|
|
8899
|
+
/* @__PURE__ */ React115.createElement(AlertTitle3, null, __60("Transitions", "elementor")),
|
|
8900
|
+
/* @__PURE__ */ React115.createElement(Box28, { component: "span" }, /* @__PURE__ */ React115.createElement(Typography12, { variant: "body2" }, __60("Switch to 'Normal' state to add a transition.", "elementor")))
|
|
8475
8901
|
);
|
|
8476
8902
|
var TransitionRepeaterControl = createControl(
|
|
8477
8903
|
({
|
|
@@ -8479,7 +8905,7 @@ var TransitionRepeaterControl = createControl(
|
|
|
8479
8905
|
currentStyleState
|
|
8480
8906
|
}) => {
|
|
8481
8907
|
const currentStyleIsNormal = currentStyleState === null;
|
|
8482
|
-
const [recentlyUsedList, setRecentlyUsedList] =
|
|
8908
|
+
const [recentlyUsedList, setRecentlyUsedList] = useState20([]);
|
|
8483
8909
|
const proInstalled = hasProInstalled2();
|
|
8484
8910
|
const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
8485
8911
|
const { allDisabled: disabledItems, proDisabled: proDisabledItems } = useMemo17(
|
|
@@ -8514,13 +8940,13 @@ var TransitionRepeaterControl = createControl(
|
|
|
8514
8940
|
}, [recentlyUsedListGetter]);
|
|
8515
8941
|
const allPropertiesUsed = useMemo17(() => areAllPropertiesUsed(value), [value]);
|
|
8516
8942
|
const isAddItemDisabled = !currentStyleIsNormal || allPropertiesUsed;
|
|
8517
|
-
return /* @__PURE__ */
|
|
8943
|
+
return /* @__PURE__ */ React115.createElement(
|
|
8518
8944
|
RepeatableControl,
|
|
8519
8945
|
{
|
|
8520
|
-
label:
|
|
8521
|
-
repeaterLabel:
|
|
8946
|
+
label: __60("Transitions", "elementor"),
|
|
8947
|
+
repeaterLabel: __60("Transitions", "elementor"),
|
|
8522
8948
|
patternLabel: "${value.selection.value.key.value}: ${value.size.value.size}${value.size.value.unit}",
|
|
8523
|
-
placeholder:
|
|
8949
|
+
placeholder: __60("Empty Transition", "elementor"),
|
|
8524
8950
|
showDuplicate: false,
|
|
8525
8951
|
showToggle: true,
|
|
8526
8952
|
initialValues: getInitialValue(value),
|
|
@@ -8541,11 +8967,11 @@ var TransitionRepeaterControl = createControl(
|
|
|
8541
8967
|
);
|
|
8542
8968
|
|
|
8543
8969
|
// src/controls/date-time-control.tsx
|
|
8544
|
-
import * as
|
|
8970
|
+
import * as React116 from "react";
|
|
8545
8971
|
import * as dayjs from "dayjs";
|
|
8546
8972
|
import { isTransformable as isTransformable2, stringPropTypeUtil as stringPropTypeUtil20 } from "@elementor/editor-props";
|
|
8547
8973
|
import { DateTimePropTypeUtil } from "@elementor/editor-props";
|
|
8548
|
-
import { Box as
|
|
8974
|
+
import { Box as Box29, DatePicker, LocalizationProvider, TimePicker } from "@elementor/ui";
|
|
8549
8975
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
8550
8976
|
var TIME_FORMAT = "HH:mm";
|
|
8551
8977
|
var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
@@ -8589,7 +9015,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
8589
9015
|
const base = dayjs.default();
|
|
8590
9016
|
return base.hour(h).minute(m).second(0).millisecond(0);
|
|
8591
9017
|
};
|
|
8592
|
-
return /* @__PURE__ */
|
|
9018
|
+
return /* @__PURE__ */ React116.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React116.createElement(ControlActions, null, /* @__PURE__ */ React116.createElement(LocalizationProvider, null, /* @__PURE__ */ React116.createElement(Box29, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React116.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React116.createElement(
|
|
8593
9019
|
DatePicker,
|
|
8594
9020
|
{
|
|
8595
9021
|
value: parseDateValue(stringPropTypeUtil20.extract(value?.date)),
|
|
@@ -8601,7 +9027,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
8601
9027
|
openPickerIcon: { fontSize: "tiny" }
|
|
8602
9028
|
}
|
|
8603
9029
|
}
|
|
8604
|
-
)), /* @__PURE__ */
|
|
9030
|
+
)), /* @__PURE__ */ React116.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React116.createElement(
|
|
8605
9031
|
TimePicker,
|
|
8606
9032
|
{
|
|
8607
9033
|
value: parseTimeValue(stringPropTypeUtil20.extract(value?.time)),
|
|
@@ -8617,13 +9043,13 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
8617
9043
|
});
|
|
8618
9044
|
|
|
8619
9045
|
// src/controls/date-range-control.tsx
|
|
8620
|
-
import * as
|
|
9046
|
+
import * as React118 from "react";
|
|
8621
9047
|
import { dateRangePropTypeUtil, dateStringPropTypeUtil as dateStringPropTypeUtil2 } from "@elementor/editor-props";
|
|
8622
|
-
import { FormHelperText as FormHelperText2, Grid as Grid30, Stack as
|
|
8623
|
-
import { __ as
|
|
9048
|
+
import { FormHelperText as FormHelperText2, Grid as Grid30, Stack as Stack21 } from "@elementor/ui";
|
|
9049
|
+
import { __ as __61 } from "@wordpress/i18n";
|
|
8624
9050
|
|
|
8625
9051
|
// src/controls/date-string-control.tsx
|
|
8626
|
-
import * as
|
|
9052
|
+
import * as React117 from "react";
|
|
8627
9053
|
import { dateStringPropTypeUtil } from "@elementor/editor-props";
|
|
8628
9054
|
import { DatePicker as DatePicker2, LocalizationProvider as LocalizationProvider2 } from "@elementor/ui";
|
|
8629
9055
|
|
|
@@ -8682,7 +9108,7 @@ var DateStringControl = createControl(
|
|
|
8682
9108
|
}
|
|
8683
9109
|
setValue(newValue.format(format));
|
|
8684
9110
|
};
|
|
8685
|
-
return /* @__PURE__ */
|
|
9111
|
+
return /* @__PURE__ */ React117.createElement(LocalizationProvider2, null, /* @__PURE__ */ React117.createElement(ControlActions, null, /* @__PURE__ */ React117.createElement(
|
|
8686
9112
|
DatePicker2,
|
|
8687
9113
|
{
|
|
8688
9114
|
value: parseDateString(value ?? ""),
|
|
@@ -8696,8 +9122,8 @@ var DateStringControl = createControl(
|
|
|
8696
9122
|
|
|
8697
9123
|
// src/controls/date-range-control.tsx
|
|
8698
9124
|
var RANGE_LABELS = {
|
|
8699
|
-
min:
|
|
8700
|
-
max:
|
|
9125
|
+
min: __61("Min date", "elementor"),
|
|
9126
|
+
max: __61("Max date", "elementor")
|
|
8701
9127
|
};
|
|
8702
9128
|
var isMaxBeforeMin = (minIso, maxIso) => {
|
|
8703
9129
|
if (!minIso || !maxIso) {
|
|
@@ -8705,38 +9131,38 @@ var isMaxBeforeMin = (minIso, maxIso) => {
|
|
|
8705
9131
|
}
|
|
8706
9132
|
return maxIso < minIso;
|
|
8707
9133
|
};
|
|
8708
|
-
var RANGE_ERROR_MESSAGE =
|
|
9134
|
+
var RANGE_ERROR_MESSAGE = __61("Max date must be on or after Min date", "elementor");
|
|
8709
9135
|
var DateRangeControl = createControl(() => {
|
|
8710
9136
|
const { value, setValue, ...propContext } = useBoundProp(dateRangePropTypeUtil);
|
|
8711
9137
|
const minString = dateStringPropTypeUtil2.extract(value?.min);
|
|
8712
9138
|
const maxString = dateStringPropTypeUtil2.extract(value?.max);
|
|
8713
9139
|
const hasInvalidRange = isMaxBeforeMin(minString, maxString);
|
|
8714
|
-
return /* @__PURE__ */
|
|
9140
|
+
return /* @__PURE__ */ React118.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React118.createElement(Stack21, { gap: 0.75 }, /* @__PURE__ */ React118.createElement(Stack21, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React118.createElement(Grid30, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React118.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React118.createElement(ControlFormLabel, null, RANGE_LABELS.min)), /* @__PURE__ */ React118.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React118.createElement(
|
|
8715
9141
|
BoundDateStringControl,
|
|
8716
9142
|
{
|
|
8717
9143
|
bind: "min",
|
|
8718
9144
|
ariaLabel: RANGE_LABELS.min,
|
|
8719
9145
|
error: hasInvalidRange
|
|
8720
9146
|
}
|
|
8721
|
-
))), /* @__PURE__ */
|
|
9147
|
+
))), /* @__PURE__ */ React118.createElement(Grid30, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React118.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React118.createElement(ControlFormLabel, null, RANGE_LABELS.max)), /* @__PURE__ */ React118.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React118.createElement(
|
|
8722
9148
|
BoundDateStringControl,
|
|
8723
9149
|
{
|
|
8724
9150
|
bind: "max",
|
|
8725
9151
|
ariaLabel: RANGE_LABELS.max,
|
|
8726
9152
|
error: hasInvalidRange
|
|
8727
9153
|
}
|
|
8728
|
-
)))), hasInvalidRange && /* @__PURE__ */
|
|
9154
|
+
)))), hasInvalidRange && /* @__PURE__ */ React118.createElement(FormHelperText2, { error: true }, RANGE_ERROR_MESSAGE)));
|
|
8729
9155
|
});
|
|
8730
9156
|
var BoundDateStringControl = ({
|
|
8731
9157
|
bind,
|
|
8732
9158
|
ariaLabel,
|
|
8733
9159
|
error
|
|
8734
9160
|
}) => {
|
|
8735
|
-
return /* @__PURE__ */
|
|
9161
|
+
return /* @__PURE__ */ React118.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React118.createElement(DateStringControl, { ariaLabel, error, coerceInvalidToNull: true }));
|
|
8736
9162
|
};
|
|
8737
9163
|
|
|
8738
9164
|
// src/controls/time-string-control.tsx
|
|
8739
|
-
import * as
|
|
9165
|
+
import * as React119 from "react";
|
|
8740
9166
|
import { timeStringPropTypeUtil } from "@elementor/editor-props";
|
|
8741
9167
|
import { LocalizationProvider as LocalizationProvider3, TimePicker as TimePicker2 } from "@elementor/ui";
|
|
8742
9168
|
var TimeStringControl = createControl(
|
|
@@ -8764,7 +9190,7 @@ var TimeStringControl = createControl(
|
|
|
8764
9190
|
}
|
|
8765
9191
|
setValue(newValue.format(format));
|
|
8766
9192
|
};
|
|
8767
|
-
return /* @__PURE__ */
|
|
9193
|
+
return /* @__PURE__ */ React119.createElement(LocalizationProvider3, null, /* @__PURE__ */ React119.createElement(ControlActions, null, /* @__PURE__ */ React119.createElement(
|
|
8768
9194
|
TimePicker2,
|
|
8769
9195
|
{
|
|
8770
9196
|
value: parseTimeString(value ?? ""),
|
|
@@ -8777,32 +9203,32 @@ var TimeStringControl = createControl(
|
|
|
8777
9203
|
);
|
|
8778
9204
|
|
|
8779
9205
|
// src/controls/time-range-control.tsx
|
|
8780
|
-
import * as
|
|
9206
|
+
import * as React120 from "react";
|
|
8781
9207
|
import { timeRangePropTypeUtil } from "@elementor/editor-props";
|
|
8782
|
-
import { Grid as Grid31, Stack as
|
|
8783
|
-
import { __ as
|
|
9208
|
+
import { Grid as Grid31, Stack as Stack22 } from "@elementor/ui";
|
|
9209
|
+
import { __ as __62 } from "@wordpress/i18n";
|
|
8784
9210
|
var RANGE_LABELS2 = {
|
|
8785
|
-
min:
|
|
8786
|
-
max:
|
|
9211
|
+
min: __62("Start time", "elementor"),
|
|
9212
|
+
max: __62("End time", "elementor")
|
|
8787
9213
|
};
|
|
8788
9214
|
var TimeRangeControl = createControl(() => {
|
|
8789
9215
|
const { value, setValue, ...propContext } = useBoundProp(timeRangePropTypeUtil);
|
|
8790
|
-
return /* @__PURE__ */
|
|
9216
|
+
return /* @__PURE__ */ React120.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React120.createElement(Stack22, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React120.createElement(Grid31, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React120.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React120.createElement(ControlFormLabel, null, RANGE_LABELS2.min)), /* @__PURE__ */ React120.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React120.createElement(BoundTimeStringControl, { bind: "min", ariaLabel: RANGE_LABELS2.min }))), /* @__PURE__ */ React120.createElement(Grid31, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React120.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React120.createElement(ControlFormLabel, null, RANGE_LABELS2.max)), /* @__PURE__ */ React120.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React120.createElement(BoundTimeStringControl, { bind: "max", ariaLabel: RANGE_LABELS2.max })))));
|
|
8791
9217
|
});
|
|
8792
9218
|
var BoundTimeStringControl = ({ bind, ariaLabel }) => {
|
|
8793
|
-
return /* @__PURE__ */
|
|
9219
|
+
return /* @__PURE__ */ React120.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React120.createElement(TimeStringControl, { ariaLabel, coerceInvalidToNull: true }));
|
|
8794
9220
|
};
|
|
8795
9221
|
|
|
8796
9222
|
// src/controls/inline-editing-control.tsx
|
|
8797
|
-
import * as
|
|
8798
|
-
import { useCallback as useCallback4, useState as
|
|
9223
|
+
import * as React124 from "react";
|
|
9224
|
+
import { useCallback as useCallback4, useState as useState22 } from "react";
|
|
8799
9225
|
import { escapedHtmlPropTypeUtil as escapedHtmlPropTypeUtil2 } from "@elementor/editor-props";
|
|
8800
|
-
import { Box as
|
|
9226
|
+
import { Box as Box32 } from "@elementor/ui";
|
|
8801
9227
|
|
|
8802
9228
|
// src/components/inline-editor.tsx
|
|
8803
|
-
import * as
|
|
8804
|
-
import { useEffect as useEffect18, useRef as
|
|
8805
|
-
import { Box as
|
|
9229
|
+
import * as React121 from "react";
|
|
9230
|
+
import { useEffect as useEffect18, useRef as useRef30 } from "react";
|
|
9231
|
+
import { Box as Box30 } from "@elementor/ui";
|
|
8806
9232
|
import Bold from "@tiptap/extension-bold";
|
|
8807
9233
|
import Document from "@tiptap/extension-document";
|
|
8808
9234
|
import HardBreak from "@tiptap/extension-hard-break";
|
|
@@ -8847,7 +9273,7 @@ function extractInlineHtmlContent(propValue) {
|
|
|
8847
9273
|
var ITALIC_KEYBOARD_SHORTCUT = "i";
|
|
8848
9274
|
var BOLD_KEYBOARD_SHORTCUT = "b";
|
|
8849
9275
|
var UNDERLINE_KEYBOARD_SHORTCUT = "u";
|
|
8850
|
-
var InlineEditor =
|
|
9276
|
+
var InlineEditor = React121.forwardRef((props, ref) => {
|
|
8851
9277
|
const {
|
|
8852
9278
|
value,
|
|
8853
9279
|
setValue,
|
|
@@ -8864,8 +9290,8 @@ var InlineEditor = React119.forwardRef((props, ref) => {
|
|
|
8864
9290
|
onSelectionEnd,
|
|
8865
9291
|
mountElement = null
|
|
8866
9292
|
} = props;
|
|
8867
|
-
const containerRef =
|
|
8868
|
-
const onBlurRef =
|
|
9293
|
+
const containerRef = useRef30(null);
|
|
9294
|
+
const onBlurRef = useRef30(onBlur);
|
|
8869
9295
|
onBlurRef.current = onBlur;
|
|
8870
9296
|
const documentContentSettings = !!expectedTag ? "block+" : "inline*";
|
|
8871
9297
|
const onUpdate = ({ editor: updatedEditor }) => {
|
|
@@ -8960,10 +9386,10 @@ var InlineEditor = React119.forwardRef((props, ref) => {
|
|
|
8960
9386
|
if (mountElement) {
|
|
8961
9387
|
return null;
|
|
8962
9388
|
}
|
|
8963
|
-
return /* @__PURE__ */
|
|
9389
|
+
return /* @__PURE__ */ React121.createElement(Box30, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React121.createElement(EditorContent, { ref, editor }));
|
|
8964
9390
|
});
|
|
8965
9391
|
var useOnUpdate = (callback, dependencies) => {
|
|
8966
|
-
const hasMounted =
|
|
9392
|
+
const hasMounted = useRef30(false);
|
|
8967
9393
|
useEffect18(() => {
|
|
8968
9394
|
if (hasMounted.current) {
|
|
8969
9395
|
callback();
|
|
@@ -8974,8 +9400,8 @@ var useOnUpdate = (callback, dependencies) => {
|
|
|
8974
9400
|
};
|
|
8975
9401
|
|
|
8976
9402
|
// src/components/inline-editor-toolbar.tsx
|
|
8977
|
-
import * as
|
|
8978
|
-
import { useEffect as useEffect20, useMemo as useMemo18, useRef as
|
|
9403
|
+
import * as React123 from "react";
|
|
9404
|
+
import { useEffect as useEffect20, useMemo as useMemo18, useRef as useRef32, useState as useState21 } from "react";
|
|
8979
9405
|
import { getContainer as getContainer2, getElementSetting } from "@elementor/editor-elements";
|
|
8980
9406
|
import {
|
|
8981
9407
|
BoldIcon,
|
|
@@ -8988,23 +9414,23 @@ import {
|
|
|
8988
9414
|
UnderlineIcon
|
|
8989
9415
|
} from "@elementor/icons";
|
|
8990
9416
|
import {
|
|
8991
|
-
Box as
|
|
9417
|
+
Box as Box31,
|
|
8992
9418
|
IconButton as IconButton9,
|
|
8993
|
-
ToggleButton as
|
|
9419
|
+
ToggleButton as ToggleButton5,
|
|
8994
9420
|
ToggleButtonGroup as ToggleButtonGroup2,
|
|
8995
9421
|
toggleButtonGroupClasses,
|
|
8996
|
-
Tooltip as
|
|
8997
|
-
usePopupState as
|
|
9422
|
+
Tooltip as Tooltip13,
|
|
9423
|
+
usePopupState as usePopupState13
|
|
8998
9424
|
} from "@elementor/ui";
|
|
8999
9425
|
import { useEditorState } from "@tiptap/react";
|
|
9000
|
-
import { __ as
|
|
9426
|
+
import { __ as __64 } from "@wordpress/i18n";
|
|
9001
9427
|
|
|
9002
9428
|
// src/components/url-popover.tsx
|
|
9003
|
-
import * as
|
|
9004
|
-
import { useEffect as useEffect19, useRef as
|
|
9429
|
+
import * as React122 from "react";
|
|
9430
|
+
import { useEffect as useEffect19, useRef as useRef31 } from "react";
|
|
9005
9431
|
import { ExternalLinkIcon } from "@elementor/icons";
|
|
9006
|
-
import { bindPopover as bindPopover8, Popover as Popover9, Stack as
|
|
9007
|
-
import { __ as
|
|
9432
|
+
import { bindPopover as bindPopover8, Popover as Popover9, Stack as Stack23, TextField as TextField11, ToggleButton as ToggleButton4, Tooltip as Tooltip12 } from "@elementor/ui";
|
|
9433
|
+
import { __ as __63 } from "@wordpress/i18n";
|
|
9008
9434
|
var UrlPopover = ({
|
|
9009
9435
|
popupState,
|
|
9010
9436
|
restoreValue,
|
|
@@ -9014,7 +9440,7 @@ var UrlPopover = ({
|
|
|
9014
9440
|
openInNewTab,
|
|
9015
9441
|
onToggleNewTab
|
|
9016
9442
|
}) => {
|
|
9017
|
-
const inputRef =
|
|
9443
|
+
const inputRef = useRef31(null);
|
|
9018
9444
|
useEffect19(() => {
|
|
9019
9445
|
if (popupState.isOpen) {
|
|
9020
9446
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
@@ -9024,7 +9450,7 @@ var UrlPopover = ({
|
|
|
9024
9450
|
restoreValue();
|
|
9025
9451
|
popupState.close();
|
|
9026
9452
|
};
|
|
9027
|
-
return /* @__PURE__ */
|
|
9453
|
+
return /* @__PURE__ */ React122.createElement(
|
|
9028
9454
|
Popover9,
|
|
9029
9455
|
{
|
|
9030
9456
|
slotProps: {
|
|
@@ -9035,30 +9461,30 @@ var UrlPopover = ({
|
|
|
9035
9461
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
9036
9462
|
onClose: handleClose
|
|
9037
9463
|
},
|
|
9038
|
-
/* @__PURE__ */
|
|
9464
|
+
/* @__PURE__ */ React122.createElement(Stack23, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React122.createElement(
|
|
9039
9465
|
TextField11,
|
|
9040
9466
|
{
|
|
9041
9467
|
value,
|
|
9042
9468
|
onChange,
|
|
9043
9469
|
size: "tiny",
|
|
9044
9470
|
fullWidth: true,
|
|
9045
|
-
placeholder:
|
|
9471
|
+
placeholder: __63("Type a URL", "elementor"),
|
|
9046
9472
|
inputProps: { ref: inputRef },
|
|
9047
9473
|
color: "secondary",
|
|
9048
9474
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
9049
9475
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
9050
9476
|
}
|
|
9051
|
-
), /* @__PURE__ */
|
|
9052
|
-
|
|
9477
|
+
), /* @__PURE__ */ React122.createElement(Tooltip12, { title: __63("Open in a new tab", "elementor") }, /* @__PURE__ */ React122.createElement(
|
|
9478
|
+
ToggleButton4,
|
|
9053
9479
|
{
|
|
9054
9480
|
size: "tiny",
|
|
9055
9481
|
value: "newTab",
|
|
9056
9482
|
selected: openInNewTab,
|
|
9057
9483
|
onClick: onToggleNewTab,
|
|
9058
|
-
"aria-label":
|
|
9484
|
+
"aria-label": __63("Open in a new tab", "elementor"),
|
|
9059
9485
|
sx: { borderRadius: "8px" }
|
|
9060
9486
|
},
|
|
9061
|
-
/* @__PURE__ */
|
|
9487
|
+
/* @__PURE__ */ React122.createElement(ExternalLinkIcon, { fontSize: "tiny" })
|
|
9062
9488
|
)))
|
|
9063
9489
|
);
|
|
9064
9490
|
};
|
|
@@ -9070,10 +9496,10 @@ var InlineEditorToolbar = ({
|
|
|
9070
9496
|
sx = {},
|
|
9071
9497
|
inControlPanel = false
|
|
9072
9498
|
}) => {
|
|
9073
|
-
const [urlValue, setUrlValue] =
|
|
9074
|
-
const [openInNewTab, setOpenInNewTab] =
|
|
9075
|
-
const toolbarRef =
|
|
9076
|
-
const linkPopupState =
|
|
9499
|
+
const [urlValue, setUrlValue] = useState21("");
|
|
9500
|
+
const [openInNewTab, setOpenInNewTab] = useState21(false);
|
|
9501
|
+
const toolbarRef = useRef32(null);
|
|
9502
|
+
const linkPopupState = usePopupState13({ variant: "popover" });
|
|
9077
9503
|
const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
|
|
9078
9504
|
const editorState = useEditorState({
|
|
9079
9505
|
editor,
|
|
@@ -9121,8 +9547,8 @@ var InlineEditorToolbar = ({
|
|
|
9121
9547
|
editor?.commands?.focus();
|
|
9122
9548
|
}
|
|
9123
9549
|
}, [editor, inControlPanel]);
|
|
9124
|
-
return /* @__PURE__ */
|
|
9125
|
-
|
|
9550
|
+
return /* @__PURE__ */ React123.createElement(
|
|
9551
|
+
Box31,
|
|
9126
9552
|
{
|
|
9127
9553
|
ref: toolbarRef,
|
|
9128
9554
|
sx: {
|
|
@@ -9155,8 +9581,8 @@ var InlineEditorToolbar = ({
|
|
|
9155
9581
|
}
|
|
9156
9582
|
}
|
|
9157
9583
|
},
|
|
9158
|
-
/* @__PURE__ */
|
|
9159
|
-
/* @__PURE__ */
|
|
9584
|
+
/* @__PURE__ */ React123.createElement(Tooltip13, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React123.createElement(IconButton9, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
9585
|
+
/* @__PURE__ */ React123.createElement(
|
|
9160
9586
|
ToggleButtonGroup2,
|
|
9161
9587
|
{
|
|
9162
9588
|
value: editorState,
|
|
@@ -9186,8 +9612,8 @@ var InlineEditorToolbar = ({
|
|
|
9186
9612
|
}
|
|
9187
9613
|
}
|
|
9188
9614
|
},
|
|
9189
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
9190
|
-
|
|
9615
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React123.createElement(Tooltip13, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React123.createElement(
|
|
9616
|
+
ToggleButton5,
|
|
9191
9617
|
{
|
|
9192
9618
|
value: button.action,
|
|
9193
9619
|
"aria-label": button.label,
|
|
@@ -9204,7 +9630,7 @@ var InlineEditorToolbar = ({
|
|
|
9204
9630
|
button.icon
|
|
9205
9631
|
)))
|
|
9206
9632
|
),
|
|
9207
|
-
/* @__PURE__ */
|
|
9633
|
+
/* @__PURE__ */ React123.createElement(
|
|
9208
9634
|
UrlPopover,
|
|
9209
9635
|
{
|
|
9210
9636
|
popupState: linkPopupState,
|
|
@@ -9227,64 +9653,64 @@ var checkIfElementIsClickable = (elementId) => {
|
|
|
9227
9653
|
};
|
|
9228
9654
|
var toolbarButtons = {
|
|
9229
9655
|
clear: {
|
|
9230
|
-
label:
|
|
9231
|
-
icon: /* @__PURE__ */
|
|
9656
|
+
label: __64("Clear", "elementor"),
|
|
9657
|
+
icon: /* @__PURE__ */ React123.createElement(MinusIcon2, { fontSize: "tiny" }),
|
|
9232
9658
|
action: "clear",
|
|
9233
9659
|
method: (editor) => {
|
|
9234
9660
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
9235
9661
|
}
|
|
9236
9662
|
},
|
|
9237
9663
|
bold: {
|
|
9238
|
-
label:
|
|
9239
|
-
icon: /* @__PURE__ */
|
|
9664
|
+
label: __64("Bold", "elementor"),
|
|
9665
|
+
icon: /* @__PURE__ */ React123.createElement(BoldIcon, { fontSize: "tiny" }),
|
|
9240
9666
|
action: "bold",
|
|
9241
9667
|
method: (editor) => {
|
|
9242
9668
|
editor.chain().focus().toggleBold().run();
|
|
9243
9669
|
}
|
|
9244
9670
|
},
|
|
9245
9671
|
italic: {
|
|
9246
|
-
label:
|
|
9247
|
-
icon: /* @__PURE__ */
|
|
9672
|
+
label: __64("Italic", "elementor"),
|
|
9673
|
+
icon: /* @__PURE__ */ React123.createElement(ItalicIcon, { fontSize: "tiny" }),
|
|
9248
9674
|
action: "italic",
|
|
9249
9675
|
method: (editor) => {
|
|
9250
9676
|
editor.chain().focus().toggleItalic().run();
|
|
9251
9677
|
}
|
|
9252
9678
|
},
|
|
9253
9679
|
underline: {
|
|
9254
|
-
label:
|
|
9255
|
-
icon: /* @__PURE__ */
|
|
9680
|
+
label: __64("Underline", "elementor"),
|
|
9681
|
+
icon: /* @__PURE__ */ React123.createElement(UnderlineIcon, { fontSize: "tiny" }),
|
|
9256
9682
|
action: "underline",
|
|
9257
9683
|
method: (editor) => {
|
|
9258
9684
|
editor.chain().focus().toggleUnderline().run();
|
|
9259
9685
|
}
|
|
9260
9686
|
},
|
|
9261
9687
|
strike: {
|
|
9262
|
-
label:
|
|
9263
|
-
icon: /* @__PURE__ */
|
|
9688
|
+
label: __64("Strikethrough", "elementor"),
|
|
9689
|
+
icon: /* @__PURE__ */ React123.createElement(StrikethroughIcon, { fontSize: "tiny" }),
|
|
9264
9690
|
action: "strike",
|
|
9265
9691
|
method: (editor) => {
|
|
9266
9692
|
editor.chain().focus().toggleStrike().run();
|
|
9267
9693
|
}
|
|
9268
9694
|
},
|
|
9269
9695
|
superscript: {
|
|
9270
|
-
label:
|
|
9271
|
-
icon: /* @__PURE__ */
|
|
9696
|
+
label: __64("Superscript", "elementor"),
|
|
9697
|
+
icon: /* @__PURE__ */ React123.createElement(SuperscriptIcon, { fontSize: "tiny" }),
|
|
9272
9698
|
action: "superscript",
|
|
9273
9699
|
method: (editor) => {
|
|
9274
9700
|
editor.chain().focus().toggleSuperscript().run();
|
|
9275
9701
|
}
|
|
9276
9702
|
},
|
|
9277
9703
|
subscript: {
|
|
9278
|
-
label:
|
|
9279
|
-
icon: /* @__PURE__ */
|
|
9704
|
+
label: __64("Subscript", "elementor"),
|
|
9705
|
+
icon: /* @__PURE__ */ React123.createElement(SubscriptIcon, { fontSize: "tiny" }),
|
|
9280
9706
|
action: "subscript",
|
|
9281
9707
|
method: (editor) => {
|
|
9282
9708
|
editor.chain().focus().toggleSubscript().run();
|
|
9283
9709
|
}
|
|
9284
9710
|
},
|
|
9285
9711
|
link: {
|
|
9286
|
-
label:
|
|
9287
|
-
icon: /* @__PURE__ */
|
|
9712
|
+
label: __64("Link", "elementor"),
|
|
9713
|
+
icon: /* @__PURE__ */ React123.createElement(LinkIcon3, { fontSize: "tiny" }),
|
|
9288
9714
|
action: "link",
|
|
9289
9715
|
method: null
|
|
9290
9716
|
}
|
|
@@ -9297,7 +9723,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
9297
9723
|
const { setValue, placeholder, value } = useBoundProp(escapedHtmlPropTypeUtil2);
|
|
9298
9724
|
const { value: rawValue } = usePropKeyContext();
|
|
9299
9725
|
const content = value ?? extractInlineHtmlContent(rawValue);
|
|
9300
|
-
const [editor, setEditor] =
|
|
9726
|
+
const [editor, setEditor] = useState22(null);
|
|
9301
9727
|
const handleChange = useCallback4(
|
|
9302
9728
|
(newValue) => {
|
|
9303
9729
|
const html = newValue ?? "";
|
|
@@ -9305,7 +9731,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
9305
9731
|
},
|
|
9306
9732
|
[setValue]
|
|
9307
9733
|
);
|
|
9308
|
-
return /* @__PURE__ */
|
|
9734
|
+
return /* @__PURE__ */ React124.createElement(ControlActions, null, /* @__PURE__ */ React124.createElement(Box32, { sx: { position: "relative" } }, editor && editor.isEditable && /* @__PURE__ */ React124.createElement(
|
|
9309
9735
|
InlineEditorToolbar,
|
|
9310
9736
|
{
|
|
9311
9737
|
editor,
|
|
@@ -9318,8 +9744,8 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
9318
9744
|
}),
|
|
9319
9745
|
inControlPanel: true
|
|
9320
9746
|
}
|
|
9321
|
-
), /* @__PURE__ */
|
|
9322
|
-
|
|
9747
|
+
), /* @__PURE__ */ React124.createElement(
|
|
9748
|
+
Box32,
|
|
9323
9749
|
{
|
|
9324
9750
|
sx: (theme) => ({
|
|
9325
9751
|
p: 0.8,
|
|
@@ -9363,7 +9789,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
9363
9789
|
...attributes,
|
|
9364
9790
|
...props
|
|
9365
9791
|
},
|
|
9366
|
-
/* @__PURE__ */
|
|
9792
|
+
/* @__PURE__ */ React124.createElement(
|
|
9367
9793
|
InlineEditor,
|
|
9368
9794
|
{
|
|
9369
9795
|
value: content,
|
|
@@ -9380,17 +9806,17 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
9380
9806
|
});
|
|
9381
9807
|
|
|
9382
9808
|
// src/controls/email-form-action-control/index.tsx
|
|
9383
|
-
import * as
|
|
9809
|
+
import * as React128 from "react";
|
|
9384
9810
|
import { emailsPropTypeUtil } from "@elementor/editor-props";
|
|
9385
9811
|
import { CollapsibleContent } from "@elementor/editor-ui";
|
|
9386
|
-
import { Box as
|
|
9387
|
-
import { __ as
|
|
9812
|
+
import { Box as Box33, Divider as Divider6, Stack as Stack25 } from "@elementor/ui";
|
|
9813
|
+
import { __ as __66 } from "@wordpress/i18n";
|
|
9388
9814
|
|
|
9389
9815
|
// src/controls/email-form-action-control/fields.tsx
|
|
9390
|
-
import * as
|
|
9816
|
+
import * as React127 from "react";
|
|
9391
9817
|
import { InfoAlert as InfoAlert2 } from "@elementor/editor-ui";
|
|
9392
|
-
import { Grid as Grid34, Stack as
|
|
9393
|
-
import { __ as
|
|
9818
|
+
import { Grid as Grid34, Stack as Stack24 } from "@elementor/ui";
|
|
9819
|
+
import { __ as __65 } from "@wordpress/i18n";
|
|
9394
9820
|
|
|
9395
9821
|
// src/hooks/use-form-field-suggestions.ts
|
|
9396
9822
|
import { getContainer as getContainer3, getSelectedElements as getSelectedElements3, getWidgetsCache } from "@elementor/editor-elements";
|
|
@@ -9479,8 +9905,8 @@ function useFormFieldSuggestions(options) {
|
|
|
9479
9905
|
}
|
|
9480
9906
|
|
|
9481
9907
|
// src/controls/email-form-action-control/email-chips-field.tsx
|
|
9482
|
-
import * as
|
|
9483
|
-
import { useMemo as useMemo19, useState as
|
|
9908
|
+
import * as React125 from "react";
|
|
9909
|
+
import { useMemo as useMemo19, useState as useState23 } from "react";
|
|
9484
9910
|
import { stringArrayPropTypeUtil as stringArrayPropTypeUtil3, stringPropTypeUtil as stringPropTypeUtil23 } from "@elementor/editor-props";
|
|
9485
9911
|
import { Autocomplete as Autocomplete4, Grid as Grid32, TextField as TextField12 } from "@elementor/ui";
|
|
9486
9912
|
|
|
@@ -9518,7 +9944,7 @@ function resolveMention(raw, suggestions) {
|
|
|
9518
9944
|
}
|
|
9519
9945
|
var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
9520
9946
|
const { value, setValue, disabled } = useBoundProp(stringArrayPropTypeUtil3);
|
|
9521
|
-
const [inputValue, setInputValue] =
|
|
9947
|
+
const [inputValue, setInputValue] = useState23("");
|
|
9522
9948
|
const items2 = value || [];
|
|
9523
9949
|
const selectedValues = items2.map((item) => stringPropTypeUtil23.extract(item)).filter((val) => val !== null);
|
|
9524
9950
|
const suggestionOptions = useMemo19(
|
|
@@ -9556,7 +9982,7 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
9556
9982
|
tryAddChip(inputValue);
|
|
9557
9983
|
}
|
|
9558
9984
|
};
|
|
9559
|
-
return /* @__PURE__ */
|
|
9985
|
+
return /* @__PURE__ */ React125.createElement(ControlActions, null, /* @__PURE__ */ React125.createElement(
|
|
9560
9986
|
Autocomplete4,
|
|
9561
9987
|
{
|
|
9562
9988
|
fullWidth: true,
|
|
@@ -9581,99 +10007,99 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
9581
10007
|
onBlur: handleBlur,
|
|
9582
10008
|
getOptionLabel: (option) => option,
|
|
9583
10009
|
isOptionEqualToValue: (option, val) => option === val,
|
|
9584
|
-
renderInput: (params) => /* @__PURE__ */
|
|
9585
|
-
renderTags: (tagValues, getTagProps) => /* @__PURE__ */
|
|
10010
|
+
renderInput: (params) => /* @__PURE__ */ React125.createElement(TextField12, { ...params, placeholder, onKeyDown: handleKeyDown }),
|
|
10011
|
+
renderTags: (tagValues, getTagProps) => /* @__PURE__ */ React125.createElement(ChipsList, { getLabel: (option) => option, getTagProps, values: tagValues })
|
|
9586
10012
|
}
|
|
9587
10013
|
));
|
|
9588
10014
|
});
|
|
9589
|
-
var EmailChipsField = ({ fieldLabel, placeholder, suggestions }) => /* @__PURE__ */
|
|
10015
|
+
var EmailChipsField = ({ fieldLabel, placeholder, suggestions }) => /* @__PURE__ */ React125.createElement(Grid32, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React125.createElement(Grid32, { item: true }, /* @__PURE__ */ React125.createElement(ControlFormLabel, null, fieldLabel)), /* @__PURE__ */ React125.createElement(Grid32, { item: true }, /* @__PURE__ */ React125.createElement(EmailChipsControl, { placeholder, suggestions })));
|
|
9590
10016
|
|
|
9591
10017
|
// src/controls/email-form-action-control/email-field.tsx
|
|
9592
|
-
import * as
|
|
10018
|
+
import * as React126 from "react";
|
|
9593
10019
|
import { Grid as Grid33 } from "@elementor/ui";
|
|
9594
|
-
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */
|
|
10020
|
+
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React126.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React126.createElement(Grid33, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React126.createElement(Grid33, { item: true }, /* @__PURE__ */ React126.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React126.createElement(Grid33, { item: true }, /* @__PURE__ */ React126.createElement(TextControl, { placeholder }))));
|
|
9595
10021
|
|
|
9596
10022
|
// src/controls/email-form-action-control/fields.tsx
|
|
9597
10023
|
var SendToField = ({ placeholder }) => {
|
|
9598
10024
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
9599
|
-
return /* @__PURE__ */
|
|
10025
|
+
return /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "to" }, /* @__PURE__ */ React127.createElement(Stack24, { gap: 0.5 }, /* @__PURE__ */ React127.createElement(
|
|
9600
10026
|
EmailChipsField,
|
|
9601
10027
|
{
|
|
9602
|
-
fieldLabel:
|
|
10028
|
+
fieldLabel: __65("Send to", "elementor"),
|
|
9603
10029
|
placeholder,
|
|
9604
10030
|
suggestions
|
|
9605
10031
|
}
|
|
9606
|
-
), shouldShowMentionsInfo() && /* @__PURE__ */
|
|
10032
|
+
), shouldShowMentionsInfo() && /* @__PURE__ */ React127.createElement(InfoAlert2, null, __65("Type @ or an email field name to insert its submitted value.", "elementor"))));
|
|
9607
10033
|
};
|
|
9608
|
-
var SubjectField = () => /* @__PURE__ */
|
|
10034
|
+
var SubjectField = () => /* @__PURE__ */ React127.createElement(
|
|
9609
10035
|
EmailField,
|
|
9610
10036
|
{
|
|
9611
10037
|
bind: "subject",
|
|
9612
|
-
label:
|
|
9613
|
-
placeholder:
|
|
10038
|
+
label: __65("Email subject", "elementor"),
|
|
10039
|
+
placeholder: __65("New form submission", "elementor")
|
|
9614
10040
|
}
|
|
9615
10041
|
);
|
|
9616
10042
|
var MessageField = () => {
|
|
9617
10043
|
const suggestions = useFormFieldSuggestions();
|
|
9618
|
-
return /* @__PURE__ */
|
|
10044
|
+
return /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "message" }, /* @__PURE__ */ React127.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(ControlFormLabel, null, __65("Message", "elementor"))), /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(MentionTextAreaControl, { suggestions })), /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(InfoAlert2, null, shouldShowMentionsInfo() ? __65(
|
|
9619
10045
|
"[all-fields] shortcode sends all fields. Type @ to insert specific fields and customize your message.",
|
|
9620
10046
|
"elementor"
|
|
9621
|
-
) :
|
|
10047
|
+
) : __65("[all-fields] shortcode sends all fields.", "elementor")))));
|
|
9622
10048
|
};
|
|
9623
|
-
var FromEmailField = () => /* @__PURE__ */
|
|
10049
|
+
var FromEmailField = () => /* @__PURE__ */ React127.createElement(
|
|
9624
10050
|
EmailField,
|
|
9625
10051
|
{
|
|
9626
10052
|
bind: "from",
|
|
9627
|
-
label:
|
|
9628
|
-
placeholder:
|
|
10053
|
+
label: __65("From email", "elementor"),
|
|
10054
|
+
placeholder: __65("What email should appear as the sender?", "elementor")
|
|
9629
10055
|
}
|
|
9630
10056
|
);
|
|
9631
|
-
var FromNameField = () => /* @__PURE__ */
|
|
10057
|
+
var FromNameField = () => /* @__PURE__ */ React127.createElement(
|
|
9632
10058
|
EmailField,
|
|
9633
10059
|
{
|
|
9634
10060
|
bind: "from-name",
|
|
9635
|
-
label:
|
|
9636
|
-
placeholder:
|
|
10061
|
+
label: __65("From name", "elementor"),
|
|
10062
|
+
placeholder: __65("What name should appear as the sender?", "elementor")
|
|
9637
10063
|
}
|
|
9638
10064
|
);
|
|
9639
10065
|
var ReplyToField = () => {
|
|
9640
10066
|
const emailSuggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
9641
|
-
return /* @__PURE__ */
|
|
10067
|
+
return /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "reply-to" }, /* @__PURE__ */ React127.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(ControlFormLabel, null, __65("Reply-to", "elementor"))), /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(
|
|
9642
10068
|
MentionTextAreaControl,
|
|
9643
10069
|
{
|
|
9644
10070
|
suggestions: emailSuggestions,
|
|
9645
10071
|
rows: 1,
|
|
9646
10072
|
triggerPosition: "start",
|
|
9647
|
-
placeholder:
|
|
10073
|
+
placeholder: __65("You can type @ to insert an email field", "elementor")
|
|
9648
10074
|
}
|
|
9649
10075
|
))));
|
|
9650
10076
|
};
|
|
9651
10077
|
var CcField = () => {
|
|
9652
10078
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
9653
|
-
return /* @__PURE__ */
|
|
10079
|
+
return /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "cc" }, /* @__PURE__ */ React127.createElement(EmailChipsField, { fieldLabel: __65("Cc", "elementor"), suggestions }));
|
|
9654
10080
|
};
|
|
9655
10081
|
var BccField = () => {
|
|
9656
10082
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
9657
|
-
return /* @__PURE__ */
|
|
10083
|
+
return /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "bcc" }, /* @__PURE__ */ React127.createElement(EmailChipsField, { fieldLabel: __65("Bcc", "elementor"), suggestions }));
|
|
9658
10084
|
};
|
|
9659
|
-
var MetaDataField = () => /* @__PURE__ */
|
|
10085
|
+
var MetaDataField = () => /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "meta-data" }, /* @__PURE__ */ React127.createElement(Stack24, { gap: 0.5 }, /* @__PURE__ */ React127.createElement(ControlFormLabel, null, __65("Metadata", "elementor")), /* @__PURE__ */ React127.createElement(
|
|
9660
10086
|
ChipsControl,
|
|
9661
10087
|
{
|
|
9662
10088
|
options: [
|
|
9663
|
-
{ label:
|
|
9664
|
-
{ label:
|
|
9665
|
-
{ label:
|
|
9666
|
-
{ label:
|
|
9667
|
-
{ label:
|
|
10089
|
+
{ label: __65("Date", "elementor"), value: "date" },
|
|
10090
|
+
{ label: __65("Time", "elementor"), value: "time" },
|
|
10091
|
+
{ label: __65("Page URL", "elementor"), value: "page-url" },
|
|
10092
|
+
{ label: __65("User agent", "elementor"), value: "user-agent" },
|
|
10093
|
+
{ label: __65("Credit", "elementor"), value: "credit" }
|
|
9668
10094
|
]
|
|
9669
10095
|
}
|
|
9670
10096
|
)));
|
|
9671
|
-
var SendAsField = () => /* @__PURE__ */
|
|
10097
|
+
var SendAsField = () => /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "send-as" }, /* @__PURE__ */ React127.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(ControlFormLabel, null, __65("Send as", "elementor"))), /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(
|
|
9672
10098
|
SelectControl,
|
|
9673
10099
|
{
|
|
9674
10100
|
options: [
|
|
9675
|
-
{ label:
|
|
9676
|
-
{ label:
|
|
10101
|
+
{ label: __65("HTML", "elementor"), value: "html" },
|
|
10102
|
+
{ label: __65("Plain Text", "elementor"), value: "plain" }
|
|
9677
10103
|
]
|
|
9678
10104
|
}
|
|
9679
10105
|
))));
|
|
@@ -9682,29 +10108,29 @@ var SendAsField = () => /* @__PURE__ */ React125.createElement(PropKeyProvider,
|
|
|
9682
10108
|
var EmailFormActionControl = createControl(
|
|
9683
10109
|
({ toPlaceholder, label }) => {
|
|
9684
10110
|
const { value, setValue, ...propContext } = useBoundProp(emailsPropTypeUtil);
|
|
9685
|
-
return /* @__PURE__ */
|
|
10111
|
+
return /* @__PURE__ */ React128.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React128.createElement(Stack25, { gap: 2 }, /* @__PURE__ */ React128.createElement(ControlLabel, null, label ? label + " " + __66("settings", "elementor") : __66("Email settings", "elementor")), /* @__PURE__ */ React128.createElement(SendToField, { placeholder: toPlaceholder }), /* @__PURE__ */ React128.createElement(SubjectField, null), /* @__PURE__ */ React128.createElement(MessageField, null), /* @__PURE__ */ React128.createElement(FromEmailField, null), /* @__PURE__ */ React128.createElement(AdvancedSettings, null)));
|
|
9686
10112
|
}
|
|
9687
10113
|
);
|
|
9688
|
-
var AdvancedSettings = () => /* @__PURE__ */
|
|
10114
|
+
var AdvancedSettings = () => /* @__PURE__ */ React128.createElement(CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React128.createElement(Box33, { sx: { pt: 2 } }, /* @__PURE__ */ React128.createElement(Stack25, { gap: 2 }, /* @__PURE__ */ React128.createElement(FromNameField, null), /* @__PURE__ */ React128.createElement(ReplyToField, null), /* @__PURE__ */ React128.createElement(CcField, null), /* @__PURE__ */ React128.createElement(BccField, null), /* @__PURE__ */ React128.createElement(Divider6, null), /* @__PURE__ */ React128.createElement(MetaDataField, null), /* @__PURE__ */ React128.createElement(SendAsField, null))));
|
|
9689
10115
|
|
|
9690
10116
|
// src/controls/attachment-type-control.tsx
|
|
9691
|
-
import * as
|
|
10117
|
+
import * as React129 from "react";
|
|
9692
10118
|
import { InfoAlert as InfoAlert3 } from "@elementor/editor-ui";
|
|
9693
10119
|
import { Grid as Grid35 } from "@elementor/ui";
|
|
9694
|
-
import { __ as
|
|
10120
|
+
import { __ as __67 } from "@wordpress/i18n";
|
|
9695
10121
|
var AttachmentTypeControl = createControl(({ label, options }) => {
|
|
9696
|
-
return /* @__PURE__ */
|
|
10122
|
+
return /* @__PURE__ */ React129.createElement(Grid35, { container: true, direction: "column", gap: 1 }, label && /* @__PURE__ */ React129.createElement(Grid35, { item: true }, /* @__PURE__ */ React129.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React129.createElement(Grid35, { item: true }, /* @__PURE__ */ React129.createElement(SelectControl, { options })), /* @__PURE__ */ React129.createElement(Grid35, { item: true }, /* @__PURE__ */ React129.createElement(InfoAlert3, null, __67(
|
|
9697
10123
|
"Linked uploads are saved to the server. Direct attachments will not appear under Submissions.",
|
|
9698
10124
|
"elementor"
|
|
9699
10125
|
))));
|
|
9700
10126
|
});
|
|
9701
10127
|
|
|
9702
10128
|
// src/controls/notice-control.tsx
|
|
9703
|
-
import * as
|
|
9704
|
-
import { useState as
|
|
10129
|
+
import * as React130 from "react";
|
|
10130
|
+
import { useState as useState24 } from "react";
|
|
9705
10131
|
import { ajax } from "@elementor/editor-v1-adapters";
|
|
9706
10132
|
import { BulbIcon } from "@elementor/icons";
|
|
9707
|
-
import { Alert as Alert3, AlertAction as AlertAction2, AlertTitle as AlertTitle4, styled as styled13, Typography as
|
|
10133
|
+
import { Alert as Alert3, AlertAction as AlertAction2, AlertTitle as AlertTitle4, styled as styled13, Typography as Typography13 } from "@elementor/ui";
|
|
9708
10134
|
var NoticeTitle = styled13(AlertTitle4)({
|
|
9709
10135
|
"&.MuiAlertTitle-root.MuiAlertTitle-root": {
|
|
9710
10136
|
marginBottom: 4,
|
|
@@ -9719,12 +10145,12 @@ var markNoticeAsDismissedInSession = (dismissId) => {
|
|
|
9719
10145
|
};
|
|
9720
10146
|
var NoticeControl = createControl(
|
|
9721
10147
|
({ noticeType = "info", heading, content, dismissible, buttonText, buttonUrl }) => {
|
|
9722
|
-
const [isDismissed, setIsDismissed] =
|
|
10148
|
+
const [isDismissed, setIsDismissed] = useState24(false);
|
|
9723
10149
|
if (isDismissed || !content) {
|
|
9724
10150
|
return null;
|
|
9725
10151
|
}
|
|
9726
10152
|
const severity = noticeType === "danger" ? "error" : noticeType;
|
|
9727
|
-
const icon = noticeType === "info" ? /* @__PURE__ */
|
|
10153
|
+
const icon = noticeType === "info" ? /* @__PURE__ */ React130.createElement(BulbIcon, { fontSize: "inherit" }) : void 0;
|
|
9728
10154
|
const handleDismiss = () => {
|
|
9729
10155
|
setIsDismissed(true);
|
|
9730
10156
|
if (!dismissible) {
|
|
@@ -9744,7 +10170,7 @@ var NoticeControl = createControl(
|
|
|
9744
10170
|
markNoticeAsDismissedInSession(dismissible);
|
|
9745
10171
|
}
|
|
9746
10172
|
};
|
|
9747
|
-
return /* @__PURE__ */
|
|
10173
|
+
return /* @__PURE__ */ React130.createElement(Alert3, { variant: "outlined", severity, icon, size: "small", onClose: handleDismiss }, heading && /* @__PURE__ */ React130.createElement(NoticeTitle, null, heading), /* @__PURE__ */ React130.createElement(Typography13, { variant: "caption", color: "textSecondary", sx: { fontStyle: "italic" } }, content), buttonText && buttonUrl && /* @__PURE__ */ React130.createElement(
|
|
9748
10174
|
AlertAction2,
|
|
9749
10175
|
{
|
|
9750
10176
|
variant: "contained",
|
|
@@ -9761,7 +10187,7 @@ var NoticeControl = createControl(
|
|
|
9761
10187
|
);
|
|
9762
10188
|
|
|
9763
10189
|
// src/controls/grid-span-control.tsx
|
|
9764
|
-
import * as
|
|
10190
|
+
import * as React131 from "react";
|
|
9765
10191
|
import { spanPropTypeUtil } from "@elementor/editor-props";
|
|
9766
10192
|
import { TextField as TextField13 } from "@elementor/ui";
|
|
9767
10193
|
var GridSpanControl = createControl(
|
|
@@ -9780,7 +10206,7 @@ var GridSpanControl = createControl(
|
|
|
9780
10206
|
setValue(next === "" ? null : next);
|
|
9781
10207
|
};
|
|
9782
10208
|
const placeholder = propPlaceholder ?? boundPlaceholder ?? `e.g: 'span 2' or '1 / 3'`;
|
|
9783
|
-
return /* @__PURE__ */
|
|
10209
|
+
return /* @__PURE__ */ React131.createElement(ControlActions, null, /* @__PURE__ */ React131.createElement(
|
|
9784
10210
|
TextField13,
|
|
9785
10211
|
{
|
|
9786
10212
|
size: "tiny",
|
|
@@ -9801,23 +10227,23 @@ var GridSpanControl = createControl(
|
|
|
9801
10227
|
);
|
|
9802
10228
|
|
|
9803
10229
|
// src/components/promotions/display-conditions-control.tsx
|
|
9804
|
-
import * as
|
|
9805
|
-
import { useRef as
|
|
10230
|
+
import * as React133 from "react";
|
|
10231
|
+
import { useRef as useRef33 } from "react";
|
|
9806
10232
|
import { SitemapIcon } from "@elementor/icons";
|
|
9807
|
-
import { IconButton as IconButton10, Stack as
|
|
9808
|
-
import { __ as
|
|
10233
|
+
import { IconButton as IconButton10, Stack as Stack26, Tooltip as Tooltip14 } from "@elementor/ui";
|
|
10234
|
+
import { __ as __68 } from "@wordpress/i18n";
|
|
9809
10235
|
|
|
9810
10236
|
// src/components/promotions/promotion-trigger.tsx
|
|
9811
|
-
import * as
|
|
9812
|
-
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as
|
|
10237
|
+
import * as React132 from "react";
|
|
10238
|
+
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as useState25 } from "react";
|
|
9813
10239
|
import { PromotionChip as PromotionChip2, PromotionInfotip } from "@elementor/editor-ui";
|
|
9814
|
-
import { Box as
|
|
10240
|
+
import { Box as Box34 } from "@elementor/ui";
|
|
9815
10241
|
function getV4Promotion(key) {
|
|
9816
10242
|
return window.elementor?.config?.v4Promotions?.[key];
|
|
9817
10243
|
}
|
|
9818
10244
|
var PromotionTrigger = forwardRef12(
|
|
9819
10245
|
({ promotionKey, children, trackingData }, ref) => {
|
|
9820
|
-
const [isOpen, setIsOpen] =
|
|
10246
|
+
const [isOpen, setIsOpen] = useState25(false);
|
|
9821
10247
|
const promotion = getV4Promotion(promotionKey);
|
|
9822
10248
|
const toggle = useCallback5(() => {
|
|
9823
10249
|
setIsOpen((prev) => {
|
|
@@ -9828,7 +10254,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
9828
10254
|
});
|
|
9829
10255
|
}, [trackingData]);
|
|
9830
10256
|
useImperativeHandle(ref, () => ({ toggle }), [toggle]);
|
|
9831
|
-
return /* @__PURE__ */
|
|
10257
|
+
return /* @__PURE__ */ React132.createElement(React132.Fragment, null, promotion && /* @__PURE__ */ React132.createElement(
|
|
9832
10258
|
PromotionInfotip,
|
|
9833
10259
|
{
|
|
9834
10260
|
title: promotion.title,
|
|
@@ -9842,8 +10268,8 @@ var PromotionTrigger = forwardRef12(
|
|
|
9842
10268
|
},
|
|
9843
10269
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
9844
10270
|
},
|
|
9845
|
-
/* @__PURE__ */
|
|
9846
|
-
|
|
10271
|
+
/* @__PURE__ */ React132.createElement(
|
|
10272
|
+
Box34,
|
|
9847
10273
|
{
|
|
9848
10274
|
onClick: (e) => {
|
|
9849
10275
|
e.stopPropagation();
|
|
@@ -9851,19 +10277,19 @@ var PromotionTrigger = forwardRef12(
|
|
|
9851
10277
|
},
|
|
9852
10278
|
sx: { cursor: "pointer", display: "inline-flex" }
|
|
9853
10279
|
},
|
|
9854
|
-
children ?? /* @__PURE__ */
|
|
10280
|
+
children ?? /* @__PURE__ */ React132.createElement(PromotionChip2, null)
|
|
9855
10281
|
)
|
|
9856
10282
|
));
|
|
9857
10283
|
}
|
|
9858
10284
|
);
|
|
9859
10285
|
|
|
9860
10286
|
// src/components/promotions/display-conditions-control.tsx
|
|
9861
|
-
var ARIA_LABEL =
|
|
10287
|
+
var ARIA_LABEL = __68("Display Conditions", "elementor");
|
|
9862
10288
|
var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
|
|
9863
10289
|
var DisplayConditionsControl = createControl(() => {
|
|
9864
|
-
const triggerRef =
|
|
9865
|
-
return /* @__PURE__ */
|
|
9866
|
-
|
|
10290
|
+
const triggerRef = useRef33(null);
|
|
10291
|
+
return /* @__PURE__ */ React133.createElement(
|
|
10292
|
+
Stack26,
|
|
9867
10293
|
{
|
|
9868
10294
|
direction: "row",
|
|
9869
10295
|
spacing: 2,
|
|
@@ -9872,8 +10298,8 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9872
10298
|
alignItems: "center"
|
|
9873
10299
|
}
|
|
9874
10300
|
},
|
|
9875
|
-
/* @__PURE__ */
|
|
9876
|
-
/* @__PURE__ */
|
|
10301
|
+
/* @__PURE__ */ React133.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
|
|
10302
|
+
/* @__PURE__ */ React133.createElement(Tooltip14, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React133.createElement(
|
|
9877
10303
|
IconButton10,
|
|
9878
10304
|
{
|
|
9879
10305
|
size: "tiny",
|
|
@@ -9886,23 +10312,23 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9886
10312
|
borderRadius: 1
|
|
9887
10313
|
}
|
|
9888
10314
|
},
|
|
9889
|
-
/* @__PURE__ */
|
|
10315
|
+
/* @__PURE__ */ React133.createElement(SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
9890
10316
|
))
|
|
9891
10317
|
);
|
|
9892
10318
|
});
|
|
9893
10319
|
|
|
9894
10320
|
// src/components/promotions/attributes-control.tsx
|
|
9895
|
-
import * as
|
|
9896
|
-
import { useRef as
|
|
10321
|
+
import * as React134 from "react";
|
|
10322
|
+
import { useRef as useRef34 } from "react";
|
|
9897
10323
|
import { PlusIcon as PlusIcon4 } from "@elementor/icons";
|
|
9898
|
-
import { Stack as
|
|
9899
|
-
import { __ as
|
|
9900
|
-
var ARIA_LABEL2 =
|
|
10324
|
+
import { Stack as Stack27, Tooltip as Tooltip15 } from "@elementor/ui";
|
|
10325
|
+
import { __ as __69 } from "@wordpress/i18n";
|
|
10326
|
+
var ARIA_LABEL2 = __69("Attributes", "elementor");
|
|
9901
10327
|
var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
|
|
9902
10328
|
var AttributesControl = createControl(() => {
|
|
9903
|
-
const triggerRef =
|
|
9904
|
-
return /* @__PURE__ */
|
|
9905
|
-
|
|
10329
|
+
const triggerRef = useRef34(null);
|
|
10330
|
+
return /* @__PURE__ */ React134.createElement(
|
|
10331
|
+
Stack27,
|
|
9906
10332
|
{
|
|
9907
10333
|
direction: "row",
|
|
9908
10334
|
spacing: 2,
|
|
@@ -9911,8 +10337,8 @@ var AttributesControl = createControl(() => {
|
|
|
9911
10337
|
alignItems: "center"
|
|
9912
10338
|
}
|
|
9913
10339
|
},
|
|
9914
|
-
/* @__PURE__ */
|
|
9915
|
-
/* @__PURE__ */
|
|
10340
|
+
/* @__PURE__ */ React134.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
|
|
10341
|
+
/* @__PURE__ */ React134.createElement(Tooltip15, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React134.createElement(
|
|
9916
10342
|
PlusIcon4,
|
|
9917
10343
|
{
|
|
9918
10344
|
"aria-label": ARIA_LABEL2,
|
|
@@ -9926,29 +10352,29 @@ var AttributesControl = createControl(() => {
|
|
|
9926
10352
|
});
|
|
9927
10353
|
|
|
9928
10354
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
9929
|
-
import * as
|
|
10355
|
+
import * as React135 from "react";
|
|
9930
10356
|
import { BrushBigIcon } from "@elementor/icons";
|
|
9931
|
-
import { IconButton as IconButton11, styled as styled14, Tooltip as
|
|
10357
|
+
import { IconButton as IconButton11, styled as styled14, Tooltip as Tooltip16 } from "@elementor/ui";
|
|
9932
10358
|
var CustomIconButton = styled14(IconButton11)(({ theme }) => ({
|
|
9933
10359
|
width: theme.spacing(2.5),
|
|
9934
10360
|
height: theme.spacing(2.5)
|
|
9935
10361
|
}));
|
|
9936
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
10362
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React135.createElement(Tooltip16, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React135.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React135.createElement(BrushBigIcon, { fontSize: size })));
|
|
9937
10363
|
|
|
9938
10364
|
// src/components/repeater/repeater.tsx
|
|
9939
|
-
import * as
|
|
9940
|
-
import { useEffect as useEffect21, useState as
|
|
10365
|
+
import * as React136 from "react";
|
|
10366
|
+
import { useEffect as useEffect21, useState as useState26 } from "react";
|
|
9941
10367
|
import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon5, XIcon as XIcon4 } from "@elementor/icons";
|
|
9942
10368
|
import {
|
|
9943
10369
|
bindPopover as bindPopover9,
|
|
9944
10370
|
bindTrigger as bindTrigger7,
|
|
9945
|
-
Box as
|
|
10371
|
+
Box as Box35,
|
|
9946
10372
|
IconButton as IconButton12,
|
|
9947
10373
|
Infotip as Infotip4,
|
|
9948
|
-
Tooltip as
|
|
9949
|
-
usePopupState as
|
|
10374
|
+
Tooltip as Tooltip17,
|
|
10375
|
+
usePopupState as usePopupState14
|
|
9950
10376
|
} from "@elementor/ui";
|
|
9951
|
-
import { __ as
|
|
10377
|
+
import { __ as __70 } from "@wordpress/i18n";
|
|
9952
10378
|
var SIZE12 = "tiny";
|
|
9953
10379
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
9954
10380
|
var Repeater3 = ({
|
|
@@ -9967,7 +10393,7 @@ var Repeater3 = ({
|
|
|
9967
10393
|
isSortable = true,
|
|
9968
10394
|
adornment = ControlAdornments
|
|
9969
10395
|
}) => {
|
|
9970
|
-
const [openItem, setOpenItem] =
|
|
10396
|
+
const [openItem, setOpenItem] = useState26(initialOpenItem);
|
|
9971
10397
|
const uniqueKeys = items2.map(
|
|
9972
10398
|
(item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
|
|
9973
10399
|
);
|
|
@@ -10030,7 +10456,7 @@ var Repeater3 = ({
|
|
|
10030
10456
|
};
|
|
10031
10457
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
10032
10458
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
10033
|
-
const addButton = /* @__PURE__ */
|
|
10459
|
+
const addButton = /* @__PURE__ */ React136.createElement(
|
|
10034
10460
|
IconButton12,
|
|
10035
10461
|
{
|
|
10036
10462
|
size: SIZE12,
|
|
@@ -10039,11 +10465,11 @@ var Repeater3 = ({
|
|
|
10039
10465
|
},
|
|
10040
10466
|
disabled: isButtonDisabled,
|
|
10041
10467
|
onClick: addRepeaterItem,
|
|
10042
|
-
"aria-label":
|
|
10468
|
+
"aria-label": __70("Add item", "elementor")
|
|
10043
10469
|
},
|
|
10044
|
-
/* @__PURE__ */
|
|
10470
|
+
/* @__PURE__ */ React136.createElement(PlusIcon5, { fontSize: SIZE12 })
|
|
10045
10471
|
);
|
|
10046
|
-
return /* @__PURE__ */
|
|
10472
|
+
return /* @__PURE__ */ React136.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React136.createElement(RepeaterHeader, { label, adornment }, shouldShowInfotip ? /* @__PURE__ */ React136.createElement(
|
|
10047
10473
|
Infotip4,
|
|
10048
10474
|
{
|
|
10049
10475
|
placement: "right",
|
|
@@ -10051,20 +10477,20 @@ var Repeater3 = ({
|
|
|
10051
10477
|
color: "secondary",
|
|
10052
10478
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
10053
10479
|
},
|
|
10054
|
-
/* @__PURE__ */
|
|
10055
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
10480
|
+
/* @__PURE__ */ React136.createElement(Box35, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
10481
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React136.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
10056
10482
|
const index = uniqueKeys.indexOf(key);
|
|
10057
10483
|
const value = items2[index];
|
|
10058
10484
|
if (!value) {
|
|
10059
10485
|
return null;
|
|
10060
10486
|
}
|
|
10061
|
-
return /* @__PURE__ */
|
|
10487
|
+
return /* @__PURE__ */ React136.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React136.createElement(
|
|
10062
10488
|
RepeaterItem,
|
|
10063
10489
|
{
|
|
10064
10490
|
disabled,
|
|
10065
10491
|
propDisabled: value?.disabled,
|
|
10066
|
-
label: /* @__PURE__ */
|
|
10067
|
-
startIcon: /* @__PURE__ */
|
|
10492
|
+
label: /* @__PURE__ */ React136.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React136.createElement(itemSettings.Label, { value, index })),
|
|
10493
|
+
startIcon: /* @__PURE__ */ React136.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React136.createElement(itemSettings.Icon, { value })),
|
|
10068
10494
|
removeItem: () => removeRepeaterItem(index),
|
|
10069
10495
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
10070
10496
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -10078,7 +10504,7 @@ var Repeater3 = ({
|
|
|
10078
10504
|
actions: itemSettings.actions,
|
|
10079
10505
|
value
|
|
10080
10506
|
},
|
|
10081
|
-
(props) => /* @__PURE__ */
|
|
10507
|
+
(props) => /* @__PURE__ */ React136.createElement(
|
|
10082
10508
|
itemSettings.Content,
|
|
10083
10509
|
{
|
|
10084
10510
|
...props,
|
|
@@ -10120,16 +10546,16 @@ var RepeaterItem = ({
|
|
|
10120
10546
|
);
|
|
10121
10547
|
const triggerProps = bindTrigger7(popoverState);
|
|
10122
10548
|
usePopoverDismiss({ isOpen: popoverState.isOpen, onClose: popoverProps.onClose });
|
|
10123
|
-
const duplicateLabel =
|
|
10124
|
-
const toggleLabel = propDisabled ?
|
|
10125
|
-
const removeLabel =
|
|
10126
|
-
return /* @__PURE__ */
|
|
10549
|
+
const duplicateLabel = __70("Duplicate", "elementor");
|
|
10550
|
+
const toggleLabel = propDisabled ? __70("Show", "elementor") : __70("Hide", "elementor");
|
|
10551
|
+
const removeLabel = __70("Remove", "elementor");
|
|
10552
|
+
return /* @__PURE__ */ React136.createElement(Box35, { sx: { display: "contents" } }, /* @__PURE__ */ React136.createElement(
|
|
10127
10553
|
RepeaterTag,
|
|
10128
10554
|
{
|
|
10129
10555
|
disabled,
|
|
10130
10556
|
label,
|
|
10131
10557
|
ref: setRef,
|
|
10132
|
-
"aria-label":
|
|
10558
|
+
"aria-label": __70("Open item", "elementor"),
|
|
10133
10559
|
...triggerProps,
|
|
10134
10560
|
onClick: (e) => {
|
|
10135
10561
|
triggerProps.onClick(e);
|
|
@@ -10138,13 +10564,13 @@ var RepeaterItem = ({
|
|
|
10138
10564
|
}
|
|
10139
10565
|
},
|
|
10140
10566
|
startIcon,
|
|
10141
|
-
actions: /* @__PURE__ */
|
|
10567
|
+
actions: /* @__PURE__ */ React136.createElement(React136.Fragment, null, showDuplicate && /* @__PURE__ */ React136.createElement(Tooltip17, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React136.createElement(IconButton12, { size: SIZE12, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React136.createElement(CopyIcon2, { fontSize: SIZE12 }))), showToggle && /* @__PURE__ */ React136.createElement(Tooltip17, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React136.createElement(IconButton12, { size: SIZE12, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React136.createElement(EyeOffIcon2, { fontSize: SIZE12 }) : /* @__PURE__ */ React136.createElement(EyeIcon2, { fontSize: SIZE12 }))), actions?.(value), showRemove && /* @__PURE__ */ React136.createElement(Tooltip17, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React136.createElement(IconButton12, { size: SIZE12, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React136.createElement(XIcon4, { fontSize: SIZE12 }))))
|
|
10142
10568
|
}
|
|
10143
|
-
), /* @__PURE__ */
|
|
10569
|
+
), /* @__PURE__ */ React136.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React136.createElement(Box35, null, children({ anchorEl: ref }))));
|
|
10144
10570
|
};
|
|
10145
10571
|
var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
10146
|
-
const [ref, setRef] =
|
|
10147
|
-
const popoverState =
|
|
10572
|
+
const [ref, setRef] = useState26(null);
|
|
10573
|
+
const popoverState = usePopupState14({ variant: "popover" });
|
|
10148
10574
|
const popoverProps = bindPopover9(popoverState);
|
|
10149
10575
|
useEffect21(() => {
|
|
10150
10576
|
if (openOnMount && ref) {
|
|
@@ -10165,7 +10591,7 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
|
10165
10591
|
};
|
|
10166
10592
|
|
|
10167
10593
|
// src/components/size/unstable-size-field.tsx
|
|
10168
|
-
import * as
|
|
10594
|
+
import * as React139 from "react";
|
|
10169
10595
|
import { InputAdornment as InputAdornment6 } from "@elementor/ui";
|
|
10170
10596
|
|
|
10171
10597
|
// src/hooks/use-size-value.ts
|
|
@@ -10208,25 +10634,25 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
10208
10634
|
};
|
|
10209
10635
|
|
|
10210
10636
|
// src/components/size/unit-select.tsx
|
|
10211
|
-
import * as
|
|
10212
|
-
import { useId as
|
|
10637
|
+
import * as React137 from "react";
|
|
10638
|
+
import { useId as useId6 } from "react";
|
|
10213
10639
|
import { MenuListItem as MenuListItem8 } from "@elementor/editor-ui";
|
|
10214
|
-
import { bindMenu as
|
|
10640
|
+
import { bindMenu as bindMenu5, bindTrigger as bindTrigger8, Button as Button7, Menu as Menu6, styled as styled15, usePopupState as usePopupState15 } from "@elementor/ui";
|
|
10215
10641
|
var menuItemContentStyles2 = {
|
|
10216
10642
|
display: "flex",
|
|
10217
10643
|
flexDirection: "column",
|
|
10218
10644
|
justifyContent: "center"
|
|
10219
10645
|
};
|
|
10220
10646
|
var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
10221
|
-
const popupState =
|
|
10647
|
+
const popupState = usePopupState15({
|
|
10222
10648
|
variant: "popover",
|
|
10223
|
-
popupId:
|
|
10649
|
+
popupId: useId6()
|
|
10224
10650
|
});
|
|
10225
10651
|
const handleMenuItemClick = (index) => {
|
|
10226
10652
|
onClick(options[index]);
|
|
10227
10653
|
popupState.close();
|
|
10228
10654
|
};
|
|
10229
|
-
return /* @__PURE__ */
|
|
10655
|
+
return /* @__PURE__ */ React137.createElement(React137.Fragment, null, /* @__PURE__ */ React137.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...bindTrigger8(popupState) }, value), /* @__PURE__ */ React137.createElement(Menu6, { MenuListProps: { dense: true }, ...bindMenu5(popupState) }, options.map((option, index) => /* @__PURE__ */ React137.createElement(
|
|
10230
10656
|
MenuListItem8,
|
|
10231
10657
|
{
|
|
10232
10658
|
key: option,
|
|
@@ -10255,11 +10681,11 @@ var StyledButton3 = styled15(Button7, {
|
|
|
10255
10681
|
}));
|
|
10256
10682
|
|
|
10257
10683
|
// src/components/size/unstable-size-input.tsx
|
|
10258
|
-
import * as
|
|
10684
|
+
import * as React138 from "react";
|
|
10259
10685
|
import { forwardRef as forwardRef13 } from "react";
|
|
10260
10686
|
var UnstableSizeInput = forwardRef13(
|
|
10261
10687
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
10262
|
-
return /* @__PURE__ */
|
|
10688
|
+
return /* @__PURE__ */ React138.createElement(
|
|
10263
10689
|
NumberInput,
|
|
10264
10690
|
{
|
|
10265
10691
|
ref,
|
|
@@ -10297,7 +10723,7 @@ var UnstableSizeField = ({
|
|
|
10297
10723
|
const shouldHighlightUnit2 = () => {
|
|
10298
10724
|
return hasValue(size);
|
|
10299
10725
|
};
|
|
10300
|
-
return /* @__PURE__ */
|
|
10726
|
+
return /* @__PURE__ */ React139.createElement(
|
|
10301
10727
|
UnstableSizeInput,
|
|
10302
10728
|
{
|
|
10303
10729
|
type: "number",
|
|
@@ -10306,8 +10732,8 @@ var UnstableSizeField = ({
|
|
|
10306
10732
|
onChange: (event) => setSize(event.target.value),
|
|
10307
10733
|
InputProps: {
|
|
10308
10734
|
...InputProps,
|
|
10309
|
-
startAdornment: startIcon && /* @__PURE__ */
|
|
10310
|
-
endAdornment: /* @__PURE__ */
|
|
10735
|
+
startAdornment: startIcon && /* @__PURE__ */ React139.createElement(InputAdornment6, { position: "start" }, startIcon),
|
|
10736
|
+
endAdornment: /* @__PURE__ */ React139.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React139.createElement(
|
|
10311
10737
|
UnitSelect,
|
|
10312
10738
|
{
|
|
10313
10739
|
options: units2,
|