@elementor/editor-variables 3.35.0-427 → 3.35.0-428
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 +72 -78
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/ui/delete-confirmation-dialog.tsx +14 -37
package/dist/index.js
CHANGED
|
@@ -50,9 +50,9 @@ var import_editor_props7 = require("@elementor/editor-props");
|
|
|
50
50
|
var React12 = __toESM(require("react"));
|
|
51
51
|
var import_react11 = require("react");
|
|
52
52
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
53
|
-
var
|
|
53
|
+
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
54
54
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
55
|
-
var
|
|
55
|
+
var import_icons5 = require("@elementor/icons");
|
|
56
56
|
var import_ui12 = require("@elementor/ui");
|
|
57
57
|
var import_i18n9 = require("@wordpress/i18n");
|
|
58
58
|
|
|
@@ -745,17 +745,11 @@ var { registerVariableType, getVariableType, getVariableTypes, hasVariableType }
|
|
|
745
745
|
|
|
746
746
|
// src/components/ui/delete-confirmation-dialog.tsx
|
|
747
747
|
var React2 = __toESM(require("react"));
|
|
748
|
-
var
|
|
748
|
+
var import_editor_ui = require("@elementor/editor-ui");
|
|
749
749
|
var import_ui3 = require("@elementor/ui");
|
|
750
750
|
var import_i18n4 = require("@wordpress/i18n");
|
|
751
|
-
var
|
|
752
|
-
|
|
753
|
-
open,
|
|
754
|
-
label,
|
|
755
|
-
closeDialog,
|
|
756
|
-
onConfirm
|
|
757
|
-
}) => {
|
|
758
|
-
return /* @__PURE__ */ React2.createElement(import_ui3.Dialog, { open, onClose: closeDialog, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, /* @__PURE__ */ React2.createElement(import_ui3.DialogTitle, { id: TITLE_ID, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React2.createElement(import_icons2.AlertOctagonFilledIcon, { color: "error" }), (0, import_i18n4.__)("Delete this variable?", "elementor")), /* @__PURE__ */ React2.createElement(import_ui3.DialogContent, null, /* @__PURE__ */ React2.createElement(import_ui3.DialogContentText, { variant: "body2", color: "textPrimary" }, (0, import_i18n4.__)("All elements using", "elementor"), "\xA0", /* @__PURE__ */ React2.createElement(import_ui3.Typography, { variant: "subtitle2", component: "span", sx: { lineBreak: "anywhere" } }, label), "\xA0", (0, import_i18n4.__)("will keep their current values, but the variable itself will be removed.", "elementor"))), /* @__PURE__ */ React2.createElement(import_ui3.DialogActions, null, /* @__PURE__ */ React2.createElement(import_ui3.Button, { color: "secondary", onClick: closeDialog }, (0, import_i18n4.__)("Not now", "elementor")), /* @__PURE__ */ React2.createElement(import_ui3.Button, { variant: "contained", color: "error", onClick: onConfirm }, (0, import_i18n4.__)("Delete", "elementor"))));
|
|
751
|
+
var DeleteConfirmationDialog = ({ open, label, closeDialog, onConfirm }) => {
|
|
752
|
+
return /* @__PURE__ */ React2.createElement(import_editor_ui.ConfirmationDialog, { open, onClose: closeDialog }, /* @__PURE__ */ React2.createElement(import_editor_ui.ConfirmationDialog.Title, null, (0, import_i18n4.__)("Delete this variable?", "elementor")), /* @__PURE__ */ React2.createElement(import_editor_ui.ConfirmationDialog.Content, null, /* @__PURE__ */ React2.createElement(import_editor_ui.ConfirmationDialog.ContentText, null, (0, import_i18n4.__)("All elements using", "elementor"), "\xA0", /* @__PURE__ */ React2.createElement(import_ui3.Typography, { variant: "subtitle2", component: "span", sx: { lineBreak: "anywhere" } }, label), "\xA0", (0, import_i18n4.__)("will keep their current values, but the variable itself will be removed.", "elementor"))), /* @__PURE__ */ React2.createElement(import_editor_ui.ConfirmationDialog.Actions, { onClose: closeDialog, onConfirm }));
|
|
759
753
|
};
|
|
760
754
|
|
|
761
755
|
// src/components/ui/empty-state.tsx
|
|
@@ -1056,8 +1050,8 @@ var useVariablesManagerState = () => {
|
|
|
1056
1050
|
// src/components/variables-manager/variables-manager-create-menu.tsx
|
|
1057
1051
|
var React6 = __toESM(require("react"));
|
|
1058
1052
|
var import_react6 = require("react");
|
|
1059
|
-
var
|
|
1060
|
-
var
|
|
1053
|
+
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
1054
|
+
var import_icons2 = require("@elementor/icons");
|
|
1061
1055
|
var import_ui6 = require("@elementor/ui");
|
|
1062
1056
|
var import_utils = require("@elementor/utils");
|
|
1063
1057
|
var import_i18n7 = require("@wordpress/i18n");
|
|
@@ -1110,7 +1104,7 @@ var VariableManagerCreateMenu = ({
|
|
|
1110
1104
|
size: SIZE,
|
|
1111
1105
|
"aria-label": (0, import_i18n7.__)("Add variable", "elementor")
|
|
1112
1106
|
},
|
|
1113
|
-
/* @__PURE__ */ React6.createElement(
|
|
1107
|
+
/* @__PURE__ */ React6.createElement(import_icons2.PlusIcon, { fontSize: SIZE })
|
|
1114
1108
|
), /* @__PURE__ */ React6.createElement(
|
|
1115
1109
|
import_ui6.Menu,
|
|
1116
1110
|
{
|
|
@@ -1182,7 +1176,7 @@ var MenuOption = ({
|
|
|
1182
1176
|
}
|
|
1183
1177
|
},
|
|
1184
1178
|
/* @__PURE__ */ React6.createElement(
|
|
1185
|
-
|
|
1179
|
+
import_editor_ui2.PromotionPopover,
|
|
1186
1180
|
{
|
|
1187
1181
|
open: isPopoverOpen,
|
|
1188
1182
|
title,
|
|
@@ -1194,7 +1188,7 @@ var MenuOption = ({
|
|
|
1194
1188
|
}
|
|
1195
1189
|
},
|
|
1196
1190
|
/* @__PURE__ */ React6.createElement(
|
|
1197
|
-
|
|
1191
|
+
import_editor_ui2.PromotionChip,
|
|
1198
1192
|
{
|
|
1199
1193
|
onClick: () => {
|
|
1200
1194
|
setIsPopoverOpen(true);
|
|
@@ -1218,15 +1212,15 @@ var getDefaultName = (variables, type, baseName) => {
|
|
|
1218
1212
|
// src/components/variables-manager/variables-manager-table.tsx
|
|
1219
1213
|
var React11 = __toESM(require("react"));
|
|
1220
1214
|
var import_react10 = require("react");
|
|
1221
|
-
var
|
|
1222
|
-
var
|
|
1215
|
+
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
1216
|
+
var import_icons4 = require("@elementor/icons");
|
|
1223
1217
|
var import_ui11 = require("@elementor/ui");
|
|
1224
1218
|
var import_i18n8 = require("@wordpress/i18n");
|
|
1225
1219
|
|
|
1226
1220
|
// src/components/fields/label-field.tsx
|
|
1227
1221
|
var React7 = __toESM(require("react"));
|
|
1228
1222
|
var import_react7 = require("react");
|
|
1229
|
-
var
|
|
1223
|
+
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
1230
1224
|
var import_ui7 = require("@elementor/ui");
|
|
1231
1225
|
function isLabelEqual(a, b) {
|
|
1232
1226
|
return a.trim().toLowerCase() === b.trim().toLowerCase();
|
|
@@ -1286,7 +1280,7 @@ var LabelField = ({
|
|
|
1286
1280
|
if (showWarningInfotip) {
|
|
1287
1281
|
const tooltipWidth = Math.max(240, fieldRef.current?.getBoundingClientRect().width ?? 240);
|
|
1288
1282
|
return /* @__PURE__ */ React7.createElement(
|
|
1289
|
-
|
|
1283
|
+
import_editor_ui3.WarningInfotip,
|
|
1290
1284
|
{
|
|
1291
1285
|
open: Boolean(errorMsg || hintMsg),
|
|
1292
1286
|
text: errorMsg || hintMsg,
|
|
@@ -1304,13 +1298,13 @@ var LabelField = ({
|
|
|
1304
1298
|
// src/components/variables-manager/ui/variable-edit-menu.tsx
|
|
1305
1299
|
var React8 = __toESM(require("react"));
|
|
1306
1300
|
var import_react8 = require("react");
|
|
1307
|
-
var
|
|
1301
|
+
var import_icons3 = require("@elementor/icons");
|
|
1308
1302
|
var import_ui8 = require("@elementor/ui");
|
|
1309
1303
|
var VariableEditMenu = ({ menuActions, disabled, itemId }) => {
|
|
1310
1304
|
const menuState = (0, import_ui8.usePopupState)({
|
|
1311
1305
|
variant: "popover"
|
|
1312
1306
|
});
|
|
1313
|
-
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui8.IconButton, { ...(0, import_ui8.bindTrigger)(menuState), disabled, size: "tiny" }, /* @__PURE__ */ React8.createElement(
|
|
1307
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui8.IconButton, { ...(0, import_ui8.bindTrigger)(menuState), disabled, size: "tiny" }, /* @__PURE__ */ React8.createElement(import_icons3.DotsVerticalIcon, { fontSize: "tiny" })), /* @__PURE__ */ React8.createElement(
|
|
1314
1308
|
import_ui8.Menu,
|
|
1315
1309
|
{
|
|
1316
1310
|
disablePortal: true,
|
|
@@ -1625,7 +1619,7 @@ var VariablesManagerTable = ({
|
|
|
1625
1619
|
disabled: isSorting,
|
|
1626
1620
|
draggable: true
|
|
1627
1621
|
},
|
|
1628
|
-
/* @__PURE__ */ React11.createElement(
|
|
1622
|
+
/* @__PURE__ */ React11.createElement(import_icons4.GripVerticalIcon, { fontSize: "inherit" })
|
|
1629
1623
|
)),
|
|
1630
1624
|
/* @__PURE__ */ React11.createElement(VariableTableCell, null, /* @__PURE__ */ React11.createElement(
|
|
1631
1625
|
VariableEditableCell,
|
|
@@ -1669,7 +1663,7 @@ var VariablesManagerTable = ({
|
|
|
1669
1663
|
fieldType: "label"
|
|
1670
1664
|
},
|
|
1671
1665
|
/* @__PURE__ */ React11.createElement(
|
|
1672
|
-
|
|
1666
|
+
import_editor_ui4.EllipsisWithTooltip,
|
|
1673
1667
|
{
|
|
1674
1668
|
title: row.name,
|
|
1675
1669
|
sx: { border: "4px solid transparent" }
|
|
@@ -1721,7 +1715,7 @@ var VariablesManagerTable = ({
|
|
|
1721
1715
|
},
|
|
1722
1716
|
row.startIcon && row.startIcon({ value: row.value }),
|
|
1723
1717
|
/* @__PURE__ */ React11.createElement(
|
|
1724
|
-
|
|
1718
|
+
import_editor_ui4.EllipsisWithTooltip,
|
|
1725
1719
|
{
|
|
1726
1720
|
title: row.value,
|
|
1727
1721
|
sx: {
|
|
@@ -1781,7 +1775,7 @@ var { panel, usePanelActions } = (0, import_editor_panels.__createPanel)({
|
|
|
1781
1775
|
});
|
|
1782
1776
|
function VariablesManagerPanel() {
|
|
1783
1777
|
const { close: closePanel } = usePanelActions();
|
|
1784
|
-
const { open: openSaveChangesDialog, close: closeSaveChangesDialog, isOpen: isSaveChangesDialogOpen } = (0,
|
|
1778
|
+
const { open: openSaveChangesDialog, close: closeSaveChangesDialog, isOpen: isSaveChangesDialogOpen } = (0, import_editor_ui5.useDialog)();
|
|
1785
1779
|
const createMenuState = (0, import_ui12.usePopupState)({
|
|
1786
1780
|
variant: "popover"
|
|
1787
1781
|
});
|
|
@@ -1855,7 +1849,7 @@ function VariablesManagerPanel() {
|
|
|
1855
1849
|
const menuActions = [
|
|
1856
1850
|
{
|
|
1857
1851
|
name: (0, import_i18n9.__)("Delete", "elementor"),
|
|
1858
|
-
icon:
|
|
1852
|
+
icon: import_icons5.TrashIcon,
|
|
1859
1853
|
color: "error.main",
|
|
1860
1854
|
onClick: (itemId) => {
|
|
1861
1855
|
const variable = variables[itemId];
|
|
@@ -1868,14 +1862,14 @@ function VariablesManagerPanel() {
|
|
|
1868
1862
|
}
|
|
1869
1863
|
];
|
|
1870
1864
|
const hasVariables = Object.values(variables).some((variable) => !variable.deleted);
|
|
1871
|
-
return /* @__PURE__ */ React12.createElement(
|
|
1865
|
+
return /* @__PURE__ */ React12.createElement(import_editor_ui5.ThemeProvider, null, /* @__PURE__ */ React12.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React12.createElement(
|
|
1872
1866
|
import_editor_panels.PanelHeader,
|
|
1873
1867
|
{
|
|
1874
1868
|
sx: {
|
|
1875
1869
|
height: "unset"
|
|
1876
1870
|
}
|
|
1877
1871
|
},
|
|
1878
|
-
/* @__PURE__ */ React12.createElement(import_ui12.Stack, { width: "100%", direction: "column", alignItems: "center" }, /* @__PURE__ */ React12.createElement(import_ui12.Stack, { p: 1, pl: 2, width: "100%", direction: "row", alignItems: "center" }, /* @__PURE__ */ React12.createElement(import_ui12.Stack, { width: "100%", direction: "row", gap: 1 }, /* @__PURE__ */ React12.createElement(import_editor_panels.PanelHeaderTitle, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React12.createElement(
|
|
1872
|
+
/* @__PURE__ */ React12.createElement(import_ui12.Stack, { width: "100%", direction: "column", alignItems: "center" }, /* @__PURE__ */ React12.createElement(import_ui12.Stack, { p: 1, pl: 2, width: "100%", direction: "row", alignItems: "center" }, /* @__PURE__ */ React12.createElement(import_ui12.Stack, { width: "100%", direction: "row", gap: 1 }, /* @__PURE__ */ React12.createElement(import_editor_panels.PanelHeaderTitle, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React12.createElement(import_icons5.ColorFilterIcon, { fontSize: "inherit" }), (0, import_i18n9.__)("Variables Manager", "elementor"))), /* @__PURE__ */ React12.createElement(import_ui12.Stack, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React12.createElement(
|
|
1879
1873
|
VariableManagerCreateMenu,
|
|
1880
1874
|
{
|
|
1881
1875
|
onCreate: handleCreateVariable,
|
|
@@ -1892,7 +1886,7 @@ function VariablesManagerPanel() {
|
|
|
1892
1886
|
}
|
|
1893
1887
|
}
|
|
1894
1888
|
))), /* @__PURE__ */ React12.createElement(import_ui12.Stack, { width: "100%", direction: "row", gap: 1 }, /* @__PURE__ */ React12.createElement(
|
|
1895
|
-
|
|
1889
|
+
import_editor_ui5.SearchField,
|
|
1896
1890
|
{
|
|
1897
1891
|
sx: {
|
|
1898
1892
|
display: "flex",
|
|
@@ -1928,7 +1922,7 @@ function VariablesManagerPanel() {
|
|
|
1928
1922
|
{
|
|
1929
1923
|
searchValue,
|
|
1930
1924
|
onClear: () => handleSearch(""),
|
|
1931
|
-
icon: /* @__PURE__ */ React12.createElement(
|
|
1925
|
+
icon: /* @__PURE__ */ React12.createElement(import_icons5.ColorFilterIcon, { fontSize: "large" })
|
|
1932
1926
|
}
|
|
1933
1927
|
),
|
|
1934
1928
|
!hasVariables && !searchValue && /* @__PURE__ */ React12.createElement(
|
|
@@ -1939,7 +1933,7 @@ function VariablesManagerPanel() {
|
|
|
1939
1933
|
"Variables are saved attributes that you can apply anywhere on your site.",
|
|
1940
1934
|
"elementor"
|
|
1941
1935
|
),
|
|
1942
|
-
icon: /* @__PURE__ */ React12.createElement(
|
|
1936
|
+
icon: /* @__PURE__ */ React12.createElement(import_icons5.ColorFilterIcon, { fontSize: "large" }),
|
|
1943
1937
|
onAdd: createMenuState.open
|
|
1944
1938
|
}
|
|
1945
1939
|
)
|
|
@@ -1957,7 +1951,7 @@ function VariablesManagerPanel() {
|
|
|
1957
1951
|
setServerError(null);
|
|
1958
1952
|
setIsSaveDisabled(false);
|
|
1959
1953
|
} : void 0,
|
|
1960
|
-
icon: serverError.IconComponent ? /* @__PURE__ */ React12.createElement(serverError.IconComponent, null) : /* @__PURE__ */ React12.createElement(
|
|
1954
|
+
icon: serverError.IconComponent ? /* @__PURE__ */ React12.createElement(serverError.IconComponent, null) : /* @__PURE__ */ React12.createElement(import_icons5.AlertTriangleFilledIcon, null)
|
|
1961
1955
|
},
|
|
1962
1956
|
/* @__PURE__ */ React12.createElement(import_ui12.AlertTitle, null, serverError.message),
|
|
1963
1957
|
serverError.action?.message
|
|
@@ -1995,8 +1989,8 @@ function VariablesManagerPanel() {
|
|
|
1995
1989
|
onConfirm: () => handleDeleteVariableWithConfirmation(deleteConfirmation.id),
|
|
1996
1990
|
closeDialog: () => setDeleteConfirmation(null)
|
|
1997
1991
|
}
|
|
1998
|
-
), isSaveChangesDialogOpen && /* @__PURE__ */ React12.createElement(
|
|
1999
|
-
|
|
1992
|
+
), isSaveChangesDialogOpen && /* @__PURE__ */ React12.createElement(import_editor_ui5.SaveChangesDialog, null, /* @__PURE__ */ React12.createElement(import_editor_ui5.SaveChangesDialog.Title, { onClose: closeSaveChangesDialog }, (0, import_i18n9.__)("You have unsaved changes", "elementor")), /* @__PURE__ */ React12.createElement(import_editor_ui5.SaveChangesDialog.Content, null, /* @__PURE__ */ React12.createElement(import_editor_ui5.SaveChangesDialog.ContentText, null, (0, import_i18n9.__)("To avoid losing your updates, save your changes before leaving.", "elementor"))), /* @__PURE__ */ React12.createElement(
|
|
1993
|
+
import_editor_ui5.SaveChangesDialog.Actions,
|
|
2000
1994
|
{
|
|
2001
1995
|
actions: {
|
|
2002
1996
|
discard: {
|
|
@@ -2042,7 +2036,7 @@ var import_editor_controls11 = require("@elementor/editor-controls");
|
|
|
2042
2036
|
var import_react18 = require("react");
|
|
2043
2037
|
var React22 = __toESM(require("react"));
|
|
2044
2038
|
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
2045
|
-
var
|
|
2039
|
+
var import_icons12 = require("@elementor/icons");
|
|
2046
2040
|
var import_ui22 = require("@elementor/ui");
|
|
2047
2041
|
|
|
2048
2042
|
// src/utils/unlink-variable.ts
|
|
@@ -2084,8 +2078,8 @@ var React15 = __toESM(require("react"));
|
|
|
2084
2078
|
var import_react13 = require("react");
|
|
2085
2079
|
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
2086
2080
|
var import_editor_editing_panel2 = require("@elementor/editor-editing-panel");
|
|
2087
|
-
var
|
|
2088
|
-
var
|
|
2081
|
+
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
2082
|
+
var import_icons6 = require("@elementor/icons");
|
|
2089
2083
|
var import_ui15 = require("@elementor/ui");
|
|
2090
2084
|
var import_i18n10 = require("@wordpress/i18n");
|
|
2091
2085
|
|
|
@@ -2199,9 +2193,9 @@ var VariableCreation = ({ onGoBack, onClose }) => {
|
|
|
2199
2193
|
};
|
|
2200
2194
|
const isSubmitDisabled = hasEmptyFields() || hasErrors();
|
|
2201
2195
|
return /* @__PURE__ */ React15.createElement(import_editor_editing_panel2.PopoverBody, { height: "auto" }, /* @__PURE__ */ React15.createElement(
|
|
2202
|
-
|
|
2196
|
+
import_editor_ui6.PopoverHeader,
|
|
2203
2197
|
{
|
|
2204
|
-
icon: /* @__PURE__ */ React15.createElement(React15.Fragment, null, onGoBack && /* @__PURE__ */ React15.createElement(import_ui15.IconButton, { size: SIZE2, "aria-label": (0, import_i18n10.__)("Go Back", "elementor"), onClick: onGoBack }, /* @__PURE__ */ React15.createElement(
|
|
2198
|
+
icon: /* @__PURE__ */ React15.createElement(React15.Fragment, null, onGoBack && /* @__PURE__ */ React15.createElement(import_ui15.IconButton, { size: SIZE2, "aria-label": (0, import_i18n10.__)("Go Back", "elementor"), onClick: onGoBack }, /* @__PURE__ */ React15.createElement(import_icons6.ArrowLeftIcon, { fontSize: SIZE2 })), /* @__PURE__ */ React15.createElement(VariableIcon, { fontSize: SIZE2 })),
|
|
2205
2199
|
title: (0, import_i18n10.__)("Create variable", "elementor"),
|
|
2206
2200
|
onClose: closePopover
|
|
2207
2201
|
}
|
|
@@ -2263,15 +2257,15 @@ var import_react15 = require("react");
|
|
|
2263
2257
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
2264
2258
|
var import_editor_current_user2 = require("@elementor/editor-current-user");
|
|
2265
2259
|
var import_editor_editing_panel3 = require("@elementor/editor-editing-panel");
|
|
2266
|
-
var
|
|
2267
|
-
var
|
|
2260
|
+
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
2261
|
+
var import_icons8 = require("@elementor/icons");
|
|
2268
2262
|
var import_ui17 = require("@elementor/ui");
|
|
2269
2263
|
var import_i18n12 = require("@wordpress/i18n");
|
|
2270
2264
|
|
|
2271
2265
|
// src/components/ui/edit-confirmation-dialog.tsx
|
|
2272
2266
|
var React16 = __toESM(require("react"));
|
|
2273
2267
|
var import_react14 = require("react");
|
|
2274
|
-
var
|
|
2268
|
+
var import_icons7 = require("@elementor/icons");
|
|
2275
2269
|
var import_ui16 = require("@elementor/ui");
|
|
2276
2270
|
var import_i18n11 = require("@wordpress/i18n");
|
|
2277
2271
|
var EDIT_CONFIRMATION_DIALOG_ID = "edit-confirmation-dialog";
|
|
@@ -2287,7 +2281,7 @@ var EditConfirmationDialog = ({
|
|
|
2287
2281
|
}
|
|
2288
2282
|
onConfirm?.();
|
|
2289
2283
|
};
|
|
2290
|
-
return /* @__PURE__ */ React16.createElement(import_ui16.Dialog, { open: true, onClose: closeDialog, maxWidth: "xs" }, /* @__PURE__ */ React16.createElement(import_ui16.DialogTitle, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React16.createElement(
|
|
2284
|
+
return /* @__PURE__ */ React16.createElement(import_ui16.Dialog, { open: true, onClose: closeDialog, maxWidth: "xs" }, /* @__PURE__ */ React16.createElement(import_ui16.DialogTitle, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React16.createElement(import_icons7.AlertTriangleFilledIcon, { color: "secondary" }), (0, import_i18n11.__)("Changes to variables go live right away.", "elementor")), /* @__PURE__ */ React16.createElement(import_ui16.DialogContent, null, /* @__PURE__ */ React16.createElement(import_ui16.DialogContentText, { variant: "body2", color: "textPrimary" }, (0, import_i18n11.__)(
|
|
2291
2285
|
"Don't worry - all other changes you make will wait until you publish your site.",
|
|
2292
2286
|
"elementor"
|
|
2293
2287
|
))), /* @__PURE__ */ React16.createElement(import_ui16.DialogActions, { sx: { justifyContent: "space-between", alignItems: "center" } }, /* @__PURE__ */ React16.createElement(
|
|
@@ -2389,7 +2383,7 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
|
|
|
2389
2383
|
const actions = [];
|
|
2390
2384
|
if (userPermissions.canDelete()) {
|
|
2391
2385
|
actions.push(
|
|
2392
|
-
/* @__PURE__ */ React17.createElement(import_ui17.Tooltip, { key: "delete", placement: "top", title: DELETE_LABEL }, /* @__PURE__ */ React17.createElement(import_ui17.IconButton, { size: SIZE3, onClick: handleDeleteConfirmation, "aria-label": DELETE_LABEL }, /* @__PURE__ */ React17.createElement(
|
|
2386
|
+
/* @__PURE__ */ React17.createElement(import_ui17.Tooltip, { key: "delete", placement: "top", title: DELETE_LABEL }, /* @__PURE__ */ React17.createElement(import_ui17.IconButton, { size: SIZE3, onClick: handleDeleteConfirmation, "aria-label": DELETE_LABEL }, /* @__PURE__ */ React17.createElement(import_icons8.TrashIcon, { fontSize: SIZE3 })))
|
|
2393
2387
|
);
|
|
2394
2388
|
}
|
|
2395
2389
|
const hasEmptyFields = () => {
|
|
@@ -2409,7 +2403,7 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
|
|
|
2409
2403
|
};
|
|
2410
2404
|
const isSubmitDisabled = noValueChanged() || hasEmptyFields() || hasErrors();
|
|
2411
2405
|
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(import_editor_editing_panel3.PopoverBody, { height: "auto" }, /* @__PURE__ */ React17.createElement(
|
|
2412
|
-
|
|
2406
|
+
import_editor_ui7.PopoverHeader,
|
|
2413
2407
|
{
|
|
2414
2408
|
title: (0, import_i18n12.__)("Edit variable", "elementor"),
|
|
2415
2409
|
onClose,
|
|
@@ -2420,7 +2414,7 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
|
|
|
2420
2414
|
"aria-label": (0, import_i18n12.__)("Go Back", "elementor"),
|
|
2421
2415
|
onClick: onGoBack
|
|
2422
2416
|
},
|
|
2423
|
-
/* @__PURE__ */ React17.createElement(
|
|
2417
|
+
/* @__PURE__ */ React17.createElement(import_icons8.ArrowLeftIcon, { fontSize: SIZE3 })
|
|
2424
2418
|
), /* @__PURE__ */ React17.createElement(VariableIcon, { fontSize: SIZE3 })),
|
|
2425
2419
|
actions
|
|
2426
2420
|
}
|
|
@@ -2486,15 +2480,15 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
|
|
|
2486
2480
|
var React19 = __toESM(require("react"));
|
|
2487
2481
|
var import_react16 = require("react");
|
|
2488
2482
|
var import_editor_editing_panel4 = require("@elementor/editor-editing-panel");
|
|
2489
|
-
var
|
|
2490
|
-
var
|
|
2483
|
+
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
2484
|
+
var import_icons10 = require("@elementor/icons");
|
|
2491
2485
|
var import_ui20 = require("@elementor/ui");
|
|
2492
2486
|
var import_i18n14 = require("@wordpress/i18n");
|
|
2493
2487
|
|
|
2494
2488
|
// src/components/ui/menu-item-content.tsx
|
|
2495
2489
|
var React18 = __toESM(require("react"));
|
|
2496
|
-
var
|
|
2497
|
-
var
|
|
2490
|
+
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
2491
|
+
var import_icons9 = require("@elementor/icons");
|
|
2498
2492
|
var import_ui18 = require("@elementor/ui");
|
|
2499
2493
|
var import_i18n13 = require("@wordpress/i18n");
|
|
2500
2494
|
var SIZE4 = "tiny";
|
|
@@ -2513,7 +2507,7 @@ var MenuItemContent = ({ item }) => {
|
|
|
2513
2507
|
}
|
|
2514
2508
|
},
|
|
2515
2509
|
/* @__PURE__ */ React18.createElement(
|
|
2516
|
-
|
|
2510
|
+
import_editor_ui8.EllipsisWithTooltip,
|
|
2517
2511
|
{
|
|
2518
2512
|
title: item.label || item.value,
|
|
2519
2513
|
as: import_ui18.Typography,
|
|
@@ -2524,7 +2518,7 @@ var MenuItemContent = ({ item }) => {
|
|
|
2524
2518
|
}
|
|
2525
2519
|
),
|
|
2526
2520
|
item.secondaryText && /* @__PURE__ */ React18.createElement(
|
|
2527
|
-
|
|
2521
|
+
import_editor_ui8.EllipsisWithTooltip,
|
|
2528
2522
|
{
|
|
2529
2523
|
title: item.secondaryText,
|
|
2530
2524
|
as: import_ui18.Typography,
|
|
@@ -2544,7 +2538,7 @@ var MenuItemContent = ({ item }) => {
|
|
|
2544
2538
|
},
|
|
2545
2539
|
"aria-label": EDIT_LABEL
|
|
2546
2540
|
},
|
|
2547
|
-
/* @__PURE__ */ React18.createElement(
|
|
2541
|
+
/* @__PURE__ */ React18.createElement(import_icons9.EditIcon, { color: "action", fontSize: SIZE4 })
|
|
2548
2542
|
)));
|
|
2549
2543
|
};
|
|
2550
2544
|
|
|
@@ -2623,7 +2617,7 @@ var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings, disabled =
|
|
|
2623
2617
|
"aria-label": CREATE_LABEL,
|
|
2624
2618
|
disabled
|
|
2625
2619
|
},
|
|
2626
|
-
/* @__PURE__ */ React19.createElement(
|
|
2620
|
+
/* @__PURE__ */ React19.createElement(import_icons10.PlusIcon, { fontSize: SIZE5 })
|
|
2627
2621
|
)))
|
|
2628
2622
|
);
|
|
2629
2623
|
}
|
|
@@ -2645,7 +2639,7 @@ var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings, disabled =
|
|
|
2645
2639
|
onClick: handleOpenManager,
|
|
2646
2640
|
"aria-label": MANAGER_LABEL
|
|
2647
2641
|
},
|
|
2648
|
-
/* @__PURE__ */ React19.createElement(
|
|
2642
|
+
/* @__PURE__ */ React19.createElement(import_icons10.SettingsIcon, { fontSize: SIZE5 })
|
|
2649
2643
|
))
|
|
2650
2644
|
);
|
|
2651
2645
|
}
|
|
@@ -2665,22 +2659,22 @@ var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings, disabled =
|
|
|
2665
2659
|
setSearchValue("");
|
|
2666
2660
|
};
|
|
2667
2661
|
return /* @__PURE__ */ React19.createElement(import_editor_editing_panel4.PopoverBody, null, /* @__PURE__ */ React19.createElement(
|
|
2668
|
-
|
|
2662
|
+
import_editor_ui9.PopoverHeader,
|
|
2669
2663
|
{
|
|
2670
2664
|
title: (0, import_i18n14.__)("Variables", "elementor"),
|
|
2671
|
-
icon: /* @__PURE__ */ React19.createElement(
|
|
2665
|
+
icon: /* @__PURE__ */ React19.createElement(import_icons10.ColorFilterIcon, { fontSize: SIZE5 }),
|
|
2672
2666
|
onClose: closePopover,
|
|
2673
2667
|
actions
|
|
2674
2668
|
}
|
|
2675
2669
|
), hasVariables && /* @__PURE__ */ React19.createElement(
|
|
2676
|
-
|
|
2670
|
+
import_editor_ui9.SearchField,
|
|
2677
2671
|
{
|
|
2678
2672
|
value: searchValue,
|
|
2679
2673
|
onSearch: handleSearch,
|
|
2680
2674
|
placeholder: (0, import_i18n14.__)("Search", "elementor")
|
|
2681
2675
|
}
|
|
2682
2676
|
), /* @__PURE__ */ React19.createElement(import_ui20.Divider, null), hasVariables && hasSearchResults && /* @__PURE__ */ React19.createElement(
|
|
2683
|
-
|
|
2677
|
+
import_editor_ui9.PopoverMenuList,
|
|
2684
2678
|
{
|
|
2685
2679
|
items,
|
|
2686
2680
|
onSelect: handleSetVariable,
|
|
@@ -2831,7 +2825,7 @@ function RenderView(props) {
|
|
|
2831
2825
|
|
|
2832
2826
|
// src/components/ui/tags/assigned-tag.tsx
|
|
2833
2827
|
var React21 = __toESM(require("react"));
|
|
2834
|
-
var
|
|
2828
|
+
var import_icons11 = require("@elementor/icons");
|
|
2835
2829
|
var import_ui21 = require("@elementor/ui");
|
|
2836
2830
|
var import_i18n15 = require("@wordpress/i18n");
|
|
2837
2831
|
var SIZE6 = "tiny";
|
|
@@ -2840,7 +2834,7 @@ var AssignedTag = ({ startIcon, label, onUnlink, ...props }) => {
|
|
|
2840
2834
|
const actions = [];
|
|
2841
2835
|
if (onUnlink) {
|
|
2842
2836
|
actions.push(
|
|
2843
|
-
/* @__PURE__ */ React21.createElement(import_ui21.Tooltip, { key: "unlink", title: UNLINK_LABEL, placement: "bottom" }, /* @__PURE__ */ React21.createElement(import_ui21.IconButton, { size: SIZE6, onClick: onUnlink, "aria-label": UNLINK_LABEL }, /* @__PURE__ */ React21.createElement(
|
|
2837
|
+
/* @__PURE__ */ React21.createElement(import_ui21.Tooltip, { key: "unlink", title: UNLINK_LABEL, placement: "bottom" }, /* @__PURE__ */ React21.createElement(import_ui21.IconButton, { size: SIZE6, onClick: onUnlink, "aria-label": UNLINK_LABEL }, /* @__PURE__ */ React21.createElement(import_icons11.DetachIcon, { fontSize: SIZE6 })))
|
|
2844
2838
|
);
|
|
2845
2839
|
}
|
|
2846
2840
|
return /* @__PURE__ */ React21.createElement(import_ui21.Tooltip, { title: label, placement: "top" }, /* @__PURE__ */ React21.createElement(
|
|
@@ -2872,7 +2866,7 @@ var AssignedVariable = ({ variable, propTypeKey }) => {
|
|
|
2872
2866
|
AssignedTag,
|
|
2873
2867
|
{
|
|
2874
2868
|
label: variable.label,
|
|
2875
|
-
startIcon: /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(
|
|
2869
|
+
startIcon: /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(import_icons12.ColorFilterIcon, { fontSize: SIZE6 }), /* @__PURE__ */ React22.createElement(StartIcon, { value: variable.value })),
|
|
2876
2870
|
onUnlink: unlinkVariable,
|
|
2877
2871
|
...(0, import_ui22.bindTrigger)(popupState)
|
|
2878
2872
|
}
|
|
@@ -2911,7 +2905,7 @@ var React23 = __toESM(require("react"));
|
|
|
2911
2905
|
var import_react19 = require("react");
|
|
2912
2906
|
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
2913
2907
|
var import_editor_editing_panel5 = require("@elementor/editor-editing-panel");
|
|
2914
|
-
var
|
|
2908
|
+
var import_editor_ui10 = require("@elementor/editor-ui");
|
|
2915
2909
|
var import_ui23 = require("@elementor/ui");
|
|
2916
2910
|
var import_i18n16 = require("@wordpress/i18n");
|
|
2917
2911
|
var SIZE7 = "tiny";
|
|
@@ -2968,7 +2962,7 @@ var VariableRestore = ({ variableId, onClose, onSubmit }) => {
|
|
|
2968
2962
|
};
|
|
2969
2963
|
const isSubmitDisabled = noValueChanged() || hasEmptyFields() || hasErrors();
|
|
2970
2964
|
return /* @__PURE__ */ React23.createElement(PopoverContentRefContextProvider, null, /* @__PURE__ */ React23.createElement(import_editor_editing_panel5.PopoverBody, { height: "auto" }, /* @__PURE__ */ React23.createElement(
|
|
2971
|
-
|
|
2965
|
+
import_editor_ui10.PopoverHeader,
|
|
2972
2966
|
{
|
|
2973
2967
|
icon: /* @__PURE__ */ React23.createElement(VariableIcon, { fontSize: SIZE7 }),
|
|
2974
2968
|
title: (0, import_i18n16.__)("Restore variable", "elementor"),
|
|
@@ -3041,7 +3035,7 @@ var DeletedVariableAlert = ({ onClose, onUnlink, onRestore, label }) => {
|
|
|
3041
3035
|
|
|
3042
3036
|
// src/components/ui/tags/warning-variable-tag.tsx
|
|
3043
3037
|
var React25 = __toESM(require("react"));
|
|
3044
|
-
var
|
|
3038
|
+
var import_icons13 = require("@elementor/icons");
|
|
3045
3039
|
var import_ui25 = require("@elementor/ui");
|
|
3046
3040
|
var WarningVariableTag = React25.forwardRef(
|
|
3047
3041
|
({ label, suffix, onClick, icon, ...props }, ref) => {
|
|
@@ -3055,7 +3049,7 @@ var WarningVariableTag = React25.forwardRef(
|
|
|
3055
3049
|
shape: "rounded",
|
|
3056
3050
|
variant: "standard",
|
|
3057
3051
|
onClick,
|
|
3058
|
-
icon: /* @__PURE__ */ React25.createElement(
|
|
3052
|
+
icon: /* @__PURE__ */ React25.createElement(import_icons13.AlertTriangleFilledIcon, null),
|
|
3059
3053
|
label: /* @__PURE__ */ React25.createElement(import_ui25.Tooltip, { title: displayText, placement: "top" }, /* @__PURE__ */ React25.createElement(import_ui25.Box, { sx: { display: "inline-grid", minWidth: 0 } }, /* @__PURE__ */ React25.createElement(import_ui25.Typography, { variant: "caption", noWrap: true, sx: { lineHeight: 1.34 } }, displayText))),
|
|
3060
3054
|
sx: {
|
|
3061
3055
|
height: (theme) => theme.spacing(3.5),
|
|
@@ -3363,14 +3357,14 @@ var VariableControl = () => {
|
|
|
3363
3357
|
// src/hooks/use-prop-variable-action.tsx
|
|
3364
3358
|
var React32 = __toESM(require("react"));
|
|
3365
3359
|
var import_editor_editing_panel6 = require("@elementor/editor-editing-panel");
|
|
3366
|
-
var
|
|
3360
|
+
var import_icons14 = require("@elementor/icons");
|
|
3367
3361
|
var import_i18n23 = require("@wordpress/i18n");
|
|
3368
3362
|
var usePropVariableAction = () => {
|
|
3369
3363
|
const { propType, path } = (0, import_editor_editing_panel6.useBoundProp)();
|
|
3370
3364
|
const variable = resolveVariableFromPropType(propType);
|
|
3371
3365
|
return {
|
|
3372
3366
|
visible: Boolean(variable),
|
|
3373
|
-
icon:
|
|
3367
|
+
icon: import_icons14.ColorFilterIcon,
|
|
3374
3368
|
title: (0, import_i18n23.__)("Variables", "elementor"),
|
|
3375
3369
|
content: ({ close: closePopover }) => {
|
|
3376
3370
|
if (!variable) {
|
|
@@ -3641,8 +3635,8 @@ function initMcp() {
|
|
|
3641
3635
|
// src/register-variable-types.tsx
|
|
3642
3636
|
var React35 = __toESM(require("react"));
|
|
3643
3637
|
var import_editor_props5 = require("@elementor/editor-props");
|
|
3644
|
-
var
|
|
3645
|
-
var
|
|
3638
|
+
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
3639
|
+
var import_icons16 = require("@elementor/icons");
|
|
3646
3640
|
|
|
3647
3641
|
// src/components/fields/color-field.tsx
|
|
3648
3642
|
var React33 = __toESM(require("react"));
|
|
@@ -3693,7 +3687,7 @@ var React34 = __toESM(require("react"));
|
|
|
3693
3687
|
var import_react24 = require("react");
|
|
3694
3688
|
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
3695
3689
|
var import_editor_editing_panel7 = require("@elementor/editor-editing-panel");
|
|
3696
|
-
var
|
|
3690
|
+
var import_icons15 = require("@elementor/icons");
|
|
3697
3691
|
var import_ui32 = require("@elementor/ui");
|
|
3698
3692
|
var import_i18n24 = require("@wordpress/i18n");
|
|
3699
3693
|
var FontField = ({ value, onChange, onValidationChange }) => {
|
|
@@ -3726,7 +3720,7 @@ var FontField = ({ value, onChange, onValidationChange }) => {
|
|
|
3726
3720
|
id: id2,
|
|
3727
3721
|
variant: "outlined",
|
|
3728
3722
|
label: fontFamily,
|
|
3729
|
-
endIcon: /* @__PURE__ */ React34.createElement(
|
|
3723
|
+
endIcon: /* @__PURE__ */ React34.createElement(import_icons15.ChevronDownIcon, { fontSize: "tiny" }),
|
|
3730
3724
|
...(0, import_ui32.bindTrigger)(fontPopoverState),
|
|
3731
3725
|
fullWidth: true
|
|
3732
3726
|
}
|
|
@@ -3752,7 +3746,7 @@ var FontField = ({ value, onChange, onValidationChange }) => {
|
|
|
3752
3746
|
title: (0, import_i18n24.__)("Font family", "elementor"),
|
|
3753
3747
|
itemStyle: (item) => ({ fontFamily: item.value }),
|
|
3754
3748
|
onDebounce: import_editor_controls12.enqueueFont,
|
|
3755
|
-
icon:
|
|
3749
|
+
icon: import_icons15.TextIcon
|
|
3756
3750
|
}
|
|
3757
3751
|
)
|
|
3758
3752
|
));
|
|
@@ -3774,7 +3768,7 @@ function registerVariableTypes() {
|
|
|
3774
3768
|
registerVariableType({
|
|
3775
3769
|
key: colorVariablePropTypeUtil.key,
|
|
3776
3770
|
valueField: ColorField,
|
|
3777
|
-
icon:
|
|
3771
|
+
icon: import_icons16.BrushIcon,
|
|
3778
3772
|
propTypeUtil: colorVariablePropTypeUtil,
|
|
3779
3773
|
fallbackPropTypeUtil: import_editor_props5.colorPropTypeUtil,
|
|
3780
3774
|
variableType: "color",
|
|
@@ -3784,20 +3778,20 @@ function registerVariableTypes() {
|
|
|
3784
3778
|
registerVariableType({
|
|
3785
3779
|
key: fontVariablePropTypeUtil.key,
|
|
3786
3780
|
valueField: FontField,
|
|
3787
|
-
icon:
|
|
3781
|
+
icon: import_icons16.TextIcon,
|
|
3788
3782
|
propTypeUtil: fontVariablePropTypeUtil,
|
|
3789
3783
|
fallbackPropTypeUtil: import_editor_props5.stringPropTypeUtil,
|
|
3790
3784
|
variableType: "font",
|
|
3791
3785
|
defaultValue: "Roboto"
|
|
3792
3786
|
});
|
|
3793
3787
|
const sizePromotions = {
|
|
3794
|
-
icon:
|
|
3788
|
+
icon: import_icons16.ExpandDiagonalIcon,
|
|
3795
3789
|
propTypeUtil: sizeVariablePropTypeUtil,
|
|
3796
3790
|
fallbackPropTypeUtil: import_editor_props5.sizePropTypeUtil,
|
|
3797
3791
|
styleTransformer: EmptyTransformer,
|
|
3798
3792
|
variableType: "size",
|
|
3799
3793
|
selectionFilter: () => [],
|
|
3800
|
-
emptyState: /* @__PURE__ */ React35.createElement(
|
|
3794
|
+
emptyState: /* @__PURE__ */ React35.createElement(import_editor_ui11.CtaButton, { size: "small", href: "https://go.elementor.com/go-pro-panel-size-variable/" })
|
|
3801
3795
|
};
|
|
3802
3796
|
registerVariableType({
|
|
3803
3797
|
...sizePromotions,
|