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