@elementor/editor-variables 3.33.0-178 → 3.33.0-180
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 +57 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/components/variables-manager/variables-manager-panel.tsx +19 -3
- package/src/utils/validations.ts +13 -2
package/dist/index.js
CHANGED
|
@@ -48,11 +48,12 @@ var import_react11 = require("react");
|
|
|
48
48
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
49
49
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
50
50
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
51
|
-
var
|
|
51
|
+
var import_icons6 = require("@elementor/icons");
|
|
52
52
|
var import_ui12 = require("@elementor/ui");
|
|
53
53
|
var import_i18n9 = require("@wordpress/i18n");
|
|
54
54
|
|
|
55
55
|
// src/utils/validations.ts
|
|
56
|
+
var import_icons = require("@elementor/icons");
|
|
56
57
|
var import_i18n = require("@wordpress/i18n");
|
|
57
58
|
var ERROR_MESSAGES = {
|
|
58
59
|
MISSING_VARIABLE_NAME: (0, import_i18n.__)("Give your variable a name.", "elementor"),
|
|
@@ -67,7 +68,7 @@ var ERROR_MESSAGES = {
|
|
|
67
68
|
// eslint-disable-next-line @wordpress/i18n-translator-comments
|
|
68
69
|
(0, import_i18n.sprintf)((0, import_i18n.__)("We found %1$d duplicated %2$s.", "elementor"), count, name)
|
|
69
70
|
),
|
|
70
|
-
UNEXPECTED_ERROR: (0, import_i18n.__)("
|
|
71
|
+
UNEXPECTED_ERROR: (0, import_i18n.__)("There was a glitch.", "elementor"),
|
|
71
72
|
DUPLICATED_LABEL_ACTION: (0, import_i18n.__)("Take me there", "elementor"),
|
|
72
73
|
DUPLICATED_LABEL_ACTION_MESSAGE: (0, import_i18n.__)("Please rename the variables.", "elementor"),
|
|
73
74
|
UNEXPECTED_ERROR_ACTION_MESSAGE: (0, import_i18n.__)("Try saving your variables again.", "elementor")
|
|
@@ -89,6 +90,8 @@ var mapServerError = (error) => {
|
|
|
89
90
|
return {
|
|
90
91
|
field: "label",
|
|
91
92
|
message: ERROR_MESSAGES.BATCH.DUPLICATED_LABELS(count, name),
|
|
93
|
+
severity: "error",
|
|
94
|
+
IconComponent: import_icons.AlertTriangleFilledIcon,
|
|
92
95
|
action: {
|
|
93
96
|
label: ERROR_MESSAGES.BATCH.DUPLICATED_LABEL_ACTION,
|
|
94
97
|
message: ERROR_MESSAGES.BATCH.DUPLICATED_LABEL_ACTION_MESSAGE,
|
|
@@ -101,7 +104,12 @@ var mapServerError = (error) => {
|
|
|
101
104
|
if (error?.response?.data?.code === "batch_operation_failed") {
|
|
102
105
|
return {
|
|
103
106
|
field: "label",
|
|
104
|
-
message: ERROR_MESSAGES.BATCH.UNEXPECTED_ERROR
|
|
107
|
+
message: ERROR_MESSAGES.BATCH.UNEXPECTED_ERROR,
|
|
108
|
+
severity: "secondary",
|
|
109
|
+
IconComponent: import_icons.InfoCircleFilledIcon,
|
|
110
|
+
action: {
|
|
111
|
+
message: ERROR_MESSAGES.BATCH.UNEXPECTED_ERROR_ACTION_MESSAGE
|
|
112
|
+
}
|
|
105
113
|
};
|
|
106
114
|
}
|
|
107
115
|
return void 0;
|
|
@@ -142,7 +150,7 @@ var validateValue = (value) => {
|
|
|
142
150
|
|
|
143
151
|
// src/components/ui/delete-confirmation-dialog.tsx
|
|
144
152
|
var React = __toESM(require("react"));
|
|
145
|
-
var
|
|
153
|
+
var import_icons2 = require("@elementor/icons");
|
|
146
154
|
var import_ui = require("@elementor/ui");
|
|
147
155
|
var import_i18n2 = require("@wordpress/i18n");
|
|
148
156
|
var TITLE_ID = "delete-variable-dialog";
|
|
@@ -152,7 +160,7 @@ var DeleteConfirmationDialog = ({
|
|
|
152
160
|
closeDialog,
|
|
153
161
|
onConfirm
|
|
154
162
|
}) => {
|
|
155
|
-
return /* @__PURE__ */ React.createElement(import_ui.Dialog, { open, onClose: closeDialog, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, /* @__PURE__ */ React.createElement(import_ui.DialogTitle, { id: TITLE_ID, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React.createElement(
|
|
163
|
+
return /* @__PURE__ */ React.createElement(import_ui.Dialog, { open, onClose: closeDialog, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, /* @__PURE__ */ React.createElement(import_ui.DialogTitle, { id: TITLE_ID, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React.createElement(import_icons2.AlertOctagonFilledIcon, { color: "error" }), (0, import_i18n2.__)("Delete this variable?", "elementor")), /* @__PURE__ */ React.createElement(import_ui.DialogContent, null, /* @__PURE__ */ React.createElement(import_ui.DialogContentText, { variant: "body2", color: "textPrimary" }, (0, import_i18n2.__)("All elements using", "elementor"), "\xA0", /* @__PURE__ */ React.createElement(import_ui.Typography, { variant: "subtitle2", component: "span", sx: { lineBreak: "anywhere" } }, label), "\xA0", (0, import_i18n2.__)("will keep their current values, but the variable itself will be removed.", "elementor"))), /* @__PURE__ */ React.createElement(import_ui.DialogActions, null, /* @__PURE__ */ React.createElement(import_ui.Button, { color: "secondary", onClick: closeDialog }, (0, import_i18n2.__)("Not now", "elementor")), /* @__PURE__ */ React.createElement(import_ui.Button, { variant: "contained", color: "error", onClick: onConfirm }, (0, import_i18n2.__)("Delete", "elementor"))));
|
|
156
164
|
};
|
|
157
165
|
|
|
158
166
|
// src/components/ui/empty-state.tsx
|
|
@@ -974,7 +982,7 @@ var useVariablesManagerState = () => {
|
|
|
974
982
|
// src/components/variables-manager/variables-manager-create-menu.tsx
|
|
975
983
|
var React6 = __toESM(require("react"));
|
|
976
984
|
var import_react6 = require("react");
|
|
977
|
-
var
|
|
985
|
+
var import_icons3 = require("@elementor/icons");
|
|
978
986
|
var import_ui6 = require("@elementor/ui");
|
|
979
987
|
var import_i18n7 = require("@wordpress/i18n");
|
|
980
988
|
var SIZE = "tiny";
|
|
@@ -1007,7 +1015,7 @@ var VariableManagerCreateMenu = ({
|
|
|
1007
1015
|
size: SIZE,
|
|
1008
1016
|
"aria-label": (0, import_i18n7.__)("Add variable", "elementor")
|
|
1009
1017
|
},
|
|
1010
|
-
/* @__PURE__ */ React6.createElement(
|
|
1018
|
+
/* @__PURE__ */ React6.createElement(import_icons3.PlusIcon, { fontSize: SIZE })
|
|
1011
1019
|
), /* @__PURE__ */ React6.createElement(
|
|
1012
1020
|
import_ui6.Menu,
|
|
1013
1021
|
{
|
|
@@ -1065,7 +1073,7 @@ var getDefaultName = (variables, type, baseName) => {
|
|
|
1065
1073
|
var React11 = __toESM(require("react"));
|
|
1066
1074
|
var import_react10 = require("react");
|
|
1067
1075
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
1068
|
-
var
|
|
1076
|
+
var import_icons5 = require("@elementor/icons");
|
|
1069
1077
|
var import_ui11 = require("@elementor/ui");
|
|
1070
1078
|
var import_i18n8 = require("@wordpress/i18n");
|
|
1071
1079
|
|
|
@@ -1150,13 +1158,13 @@ var LabelField = ({
|
|
|
1150
1158
|
// src/components/variables-manager/ui/variable-edit-menu.tsx
|
|
1151
1159
|
var React8 = __toESM(require("react"));
|
|
1152
1160
|
var import_react8 = require("react");
|
|
1153
|
-
var
|
|
1161
|
+
var import_icons4 = require("@elementor/icons");
|
|
1154
1162
|
var import_ui8 = require("@elementor/ui");
|
|
1155
1163
|
var VariableEditMenu = ({ menuActions, disabled, itemId }) => {
|
|
1156
1164
|
const menuState = (0, import_ui8.usePopupState)({
|
|
1157
1165
|
variant: "popover"
|
|
1158
1166
|
});
|
|
1159
|
-
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui8.IconButton, { ...(0, import_ui8.bindTrigger)(menuState), disabled, size: "tiny" }, /* @__PURE__ */ React8.createElement(
|
|
1167
|
+
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_icons4.DotsVerticalIcon, { fontSize: "tiny" })), /* @__PURE__ */ React8.createElement(
|
|
1160
1168
|
import_ui8.Menu,
|
|
1161
1169
|
{
|
|
1162
1170
|
disablePortal: true,
|
|
@@ -1467,7 +1475,7 @@ var VariablesManagerTable = ({
|
|
|
1467
1475
|
disabled: isSorting,
|
|
1468
1476
|
draggable: true
|
|
1469
1477
|
},
|
|
1470
|
-
/* @__PURE__ */ React11.createElement(
|
|
1478
|
+
/* @__PURE__ */ React11.createElement(import_icons5.GripVerticalIcon, { fontSize: "inherit" })
|
|
1471
1479
|
)),
|
|
1472
1480
|
/* @__PURE__ */ React11.createElement(VariableTableCell, null, /* @__PURE__ */ React11.createElement(
|
|
1473
1481
|
VariableEditableCell,
|
|
@@ -1682,7 +1690,7 @@ function VariablesManagerPanel() {
|
|
|
1682
1690
|
const menuActions = [
|
|
1683
1691
|
{
|
|
1684
1692
|
name: (0, import_i18n9.__)("Delete", "elementor"),
|
|
1685
|
-
icon:
|
|
1693
|
+
icon: import_icons6.TrashIcon,
|
|
1686
1694
|
color: "error.main",
|
|
1687
1695
|
onClick: (itemId) => {
|
|
1688
1696
|
if (variables[itemId]) {
|
|
@@ -1699,7 +1707,7 @@ function VariablesManagerPanel() {
|
|
|
1699
1707
|
height: "unset"
|
|
1700
1708
|
}
|
|
1701
1709
|
},
|
|
1702
|
-
/* @__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(
|
|
1710
|
+
/* @__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_icons6.ColorFilterIcon, { fontSize: "inherit" }), (0, import_i18n9.__)("Variable Manager", "elementor"))), /* @__PURE__ */ React12.createElement(import_ui12.Stack, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React12.createElement(
|
|
1703
1711
|
VariableManagerCreateMenu,
|
|
1704
1712
|
{
|
|
1705
1713
|
onCreate: handleCreateVariable,
|
|
@@ -1752,7 +1760,7 @@ function VariablesManagerPanel() {
|
|
|
1752
1760
|
{
|
|
1753
1761
|
searchValue,
|
|
1754
1762
|
onClear: () => handleSearch(""),
|
|
1755
|
-
icon: /* @__PURE__ */ React12.createElement(
|
|
1763
|
+
icon: /* @__PURE__ */ React12.createElement(import_icons6.ColorFilterIcon, { fontSize: "large" })
|
|
1756
1764
|
}
|
|
1757
1765
|
),
|
|
1758
1766
|
!hasVariables && !searchValue && /* @__PURE__ */ React12.createElement(
|
|
@@ -1763,7 +1771,7 @@ function VariablesManagerPanel() {
|
|
|
1763
1771
|
"Variables are saved attributes that you can apply anywhere on your site.",
|
|
1764
1772
|
"elementor"
|
|
1765
1773
|
),
|
|
1766
|
-
icon: /* @__PURE__ */ React12.createElement(
|
|
1774
|
+
icon: /* @__PURE__ */ React12.createElement(import_icons6.ColorFilterIcon, { fontSize: "large" }),
|
|
1767
1775
|
onAdd: createMenuState.open
|
|
1768
1776
|
}
|
|
1769
1777
|
)
|
|
@@ -1775,9 +1783,13 @@ function VariablesManagerPanel() {
|
|
|
1775
1783
|
content: serverError ? /* @__PURE__ */ React12.createElement(
|
|
1776
1784
|
import_ui12.Alert,
|
|
1777
1785
|
{
|
|
1778
|
-
severity: "error",
|
|
1779
|
-
action: serverError.action ? /* @__PURE__ */ React12.createElement(import_ui12.AlertAction, { onClick: serverError.action.callback }, serverError.action.label) : void 0,
|
|
1780
|
-
|
|
1786
|
+
severity: serverError.severity ?? "error",
|
|
1787
|
+
action: serverError.action?.label ? /* @__PURE__ */ React12.createElement(import_ui12.AlertAction, { onClick: serverError.action.callback }, serverError.action.label) : void 0,
|
|
1788
|
+
onClose: !serverError.action?.label ? () => {
|
|
1789
|
+
setServerError(null);
|
|
1790
|
+
setIsSaveDisabled(false);
|
|
1791
|
+
} : void 0,
|
|
1792
|
+
icon: serverError.IconComponent ? /* @__PURE__ */ React12.createElement(serverError.IconComponent, null) : /* @__PURE__ */ React12.createElement(import_icons6.AlertTriangleFilledIcon, null)
|
|
1781
1793
|
},
|
|
1782
1794
|
/* @__PURE__ */ React12.createElement(import_ui12.AlertTitle, null, serverError.message),
|
|
1783
1795
|
serverError.action?.message
|
|
@@ -1862,7 +1874,7 @@ var import_editor_controls11 = require("@elementor/editor-controls");
|
|
|
1862
1874
|
var import_react18 = require("react");
|
|
1863
1875
|
var React22 = __toESM(require("react"));
|
|
1864
1876
|
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
1865
|
-
var
|
|
1877
|
+
var import_icons13 = require("@elementor/icons");
|
|
1866
1878
|
var import_ui22 = require("@elementor/ui");
|
|
1867
1879
|
|
|
1868
1880
|
// src/utils/unlink-variable.ts
|
|
@@ -1905,7 +1917,7 @@ var import_react13 = require("react");
|
|
|
1905
1917
|
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
1906
1918
|
var import_editor_editing_panel2 = require("@elementor/editor-editing-panel");
|
|
1907
1919
|
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
1908
|
-
var
|
|
1920
|
+
var import_icons7 = require("@elementor/icons");
|
|
1909
1921
|
var import_ui15 = require("@elementor/ui");
|
|
1910
1922
|
var import_i18n10 = require("@wordpress/i18n");
|
|
1911
1923
|
|
|
@@ -2038,7 +2050,7 @@ var VariableCreation = ({ onGoBack, onClose }) => {
|
|
|
2038
2050
|
return /* @__PURE__ */ React15.createElement(import_editor_editing_panel2.PopoverBody, { height: "auto" }, /* @__PURE__ */ React15.createElement(
|
|
2039
2051
|
import_editor_ui4.PopoverHeader,
|
|
2040
2052
|
{
|
|
2041
|
-
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(
|
|
2053
|
+
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_icons7.ArrowLeftIcon, { fontSize: SIZE2 })), /* @__PURE__ */ React15.createElement(VariableIcon, { fontSize: SIZE2 })),
|
|
2042
2054
|
title: (0, import_i18n10.__)("Create variable", "elementor"),
|
|
2043
2055
|
onClose: closePopover
|
|
2044
2056
|
}
|
|
@@ -2100,14 +2112,14 @@ var import_editor_controls5 = require("@elementor/editor-controls");
|
|
|
2100
2112
|
var import_editor_current_user2 = require("@elementor/editor-current-user");
|
|
2101
2113
|
var import_editor_editing_panel3 = require("@elementor/editor-editing-panel");
|
|
2102
2114
|
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
2103
|
-
var
|
|
2115
|
+
var import_icons9 = require("@elementor/icons");
|
|
2104
2116
|
var import_ui17 = require("@elementor/ui");
|
|
2105
2117
|
var import_i18n12 = require("@wordpress/i18n");
|
|
2106
2118
|
|
|
2107
2119
|
// src/components/ui/edit-confirmation-dialog.tsx
|
|
2108
2120
|
var React16 = __toESM(require("react"));
|
|
2109
2121
|
var import_react14 = require("react");
|
|
2110
|
-
var
|
|
2122
|
+
var import_icons8 = require("@elementor/icons");
|
|
2111
2123
|
var import_ui16 = require("@elementor/ui");
|
|
2112
2124
|
var import_i18n11 = require("@wordpress/i18n");
|
|
2113
2125
|
var EDIT_CONFIRMATION_DIALOG_ID = "edit-confirmation-dialog";
|
|
@@ -2123,7 +2135,7 @@ var EditConfirmationDialog = ({
|
|
|
2123
2135
|
}
|
|
2124
2136
|
onConfirm?.();
|
|
2125
2137
|
};
|
|
2126
|
-
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(
|
|
2138
|
+
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_icons8.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.__)(
|
|
2127
2139
|
"Don't worry - all other changes you make will wait until you publish your site.",
|
|
2128
2140
|
"elementor"
|
|
2129
2141
|
))), /* @__PURE__ */ React16.createElement(import_ui16.DialogActions, { sx: { justifyContent: "space-between", alignItems: "center" } }, /* @__PURE__ */ React16.createElement(
|
|
@@ -2225,7 +2237,7 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
|
|
|
2225
2237
|
const actions = [];
|
|
2226
2238
|
if (userPermissions.canDelete()) {
|
|
2227
2239
|
actions.push(
|
|
2228
|
-
/* @__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(
|
|
2240
|
+
/* @__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_icons9.TrashIcon, { fontSize: SIZE3 })))
|
|
2229
2241
|
);
|
|
2230
2242
|
}
|
|
2231
2243
|
const hasEmptyFields = () => {
|
|
@@ -2256,7 +2268,7 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
|
|
|
2256
2268
|
"aria-label": (0, import_i18n12.__)("Go Back", "elementor"),
|
|
2257
2269
|
onClick: onGoBack
|
|
2258
2270
|
},
|
|
2259
|
-
/* @__PURE__ */ React17.createElement(
|
|
2271
|
+
/* @__PURE__ */ React17.createElement(import_icons9.ArrowLeftIcon, { fontSize: SIZE3 })
|
|
2260
2272
|
), /* @__PURE__ */ React17.createElement(VariableIcon, { fontSize: SIZE3 })),
|
|
2261
2273
|
actions
|
|
2262
2274
|
}
|
|
@@ -2321,14 +2333,14 @@ var React19 = __toESM(require("react"));
|
|
|
2321
2333
|
var import_react16 = require("react");
|
|
2322
2334
|
var import_editor_editing_panel4 = require("@elementor/editor-editing-panel");
|
|
2323
2335
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
2324
|
-
var
|
|
2336
|
+
var import_icons11 = require("@elementor/icons");
|
|
2325
2337
|
var import_ui20 = require("@elementor/ui");
|
|
2326
2338
|
var import_i18n14 = require("@wordpress/i18n");
|
|
2327
2339
|
|
|
2328
2340
|
// src/components/ui/menu-item-content.tsx
|
|
2329
2341
|
var React18 = __toESM(require("react"));
|
|
2330
2342
|
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
2331
|
-
var
|
|
2343
|
+
var import_icons10 = require("@elementor/icons");
|
|
2332
2344
|
var import_ui18 = require("@elementor/ui");
|
|
2333
2345
|
var import_i18n13 = require("@wordpress/i18n");
|
|
2334
2346
|
var SIZE4 = "tiny";
|
|
@@ -2378,7 +2390,7 @@ var MenuItemContent = ({ item }) => {
|
|
|
2378
2390
|
},
|
|
2379
2391
|
"aria-label": EDIT_LABEL
|
|
2380
2392
|
},
|
|
2381
|
-
/* @__PURE__ */ React18.createElement(
|
|
2393
|
+
/* @__PURE__ */ React18.createElement(import_icons10.EditIcon, { color: "action", fontSize: SIZE4 })
|
|
2382
2394
|
)));
|
|
2383
2395
|
};
|
|
2384
2396
|
|
|
@@ -2456,7 +2468,7 @@ var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings }) => {
|
|
|
2456
2468
|
onClick: onAddAndTrack,
|
|
2457
2469
|
"aria-label": CREATE_LABEL
|
|
2458
2470
|
},
|
|
2459
|
-
/* @__PURE__ */ React19.createElement(
|
|
2471
|
+
/* @__PURE__ */ React19.createElement(import_icons11.PlusIcon, { fontSize: SIZE5 })
|
|
2460
2472
|
))
|
|
2461
2473
|
);
|
|
2462
2474
|
}
|
|
@@ -2470,7 +2482,7 @@ var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings }) => {
|
|
|
2470
2482
|
onClick: onSettings,
|
|
2471
2483
|
"aria-label": MANAGER_LABEL
|
|
2472
2484
|
},
|
|
2473
|
-
/* @__PURE__ */ React19.createElement(
|
|
2485
|
+
/* @__PURE__ */ React19.createElement(import_icons11.SettingsIcon, { fontSize: SIZE5 })
|
|
2474
2486
|
))
|
|
2475
2487
|
);
|
|
2476
2488
|
}
|
|
@@ -2498,7 +2510,7 @@ var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings }) => {
|
|
|
2498
2510
|
import_editor_ui7.PopoverHeader,
|
|
2499
2511
|
{
|
|
2500
2512
|
title: (0, import_i18n14.__)("Variables", "elementor"),
|
|
2501
|
-
icon: /* @__PURE__ */ React19.createElement(
|
|
2513
|
+
icon: /* @__PURE__ */ React19.createElement(import_icons11.ColorFilterIcon, { fontSize: SIZE5 }),
|
|
2502
2514
|
onClose: closePopover,
|
|
2503
2515
|
actions
|
|
2504
2516
|
}
|
|
@@ -2639,7 +2651,7 @@ function RenderView(props) {
|
|
|
2639
2651
|
|
|
2640
2652
|
// src/components/ui/tags/assigned-tag.tsx
|
|
2641
2653
|
var React21 = __toESM(require("react"));
|
|
2642
|
-
var
|
|
2654
|
+
var import_icons12 = require("@elementor/icons");
|
|
2643
2655
|
var import_ui21 = require("@elementor/ui");
|
|
2644
2656
|
var import_i18n15 = require("@wordpress/i18n");
|
|
2645
2657
|
var SIZE6 = "tiny";
|
|
@@ -2648,7 +2660,7 @@ var AssignedTag = ({ startIcon, label, onUnlink, ...props }) => {
|
|
|
2648
2660
|
const actions = [];
|
|
2649
2661
|
if (onUnlink) {
|
|
2650
2662
|
actions.push(
|
|
2651
|
-
/* @__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(
|
|
2663
|
+
/* @__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_icons12.DetachIcon, { fontSize: SIZE6 })))
|
|
2652
2664
|
);
|
|
2653
2665
|
}
|
|
2654
2666
|
return /* @__PURE__ */ React21.createElement(import_ui21.Tooltip, { title: label, placement: "top" }, /* @__PURE__ */ React21.createElement(
|
|
@@ -2680,7 +2692,7 @@ var AssignedVariable = ({ variable, propTypeKey }) => {
|
|
|
2680
2692
|
AssignedTag,
|
|
2681
2693
|
{
|
|
2682
2694
|
label: variable.label,
|
|
2683
|
-
startIcon: /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(
|
|
2695
|
+
startIcon: /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(import_icons13.ColorFilterIcon, { fontSize: SIZE6 }), /* @__PURE__ */ React22.createElement(StartIcon, { value: variable.value })),
|
|
2684
2696
|
onUnlink: unlinkVariable,
|
|
2685
2697
|
...(0, import_ui22.bindTrigger)(popupState)
|
|
2686
2698
|
}
|
|
@@ -2844,7 +2856,7 @@ var DeletedVariableAlert = ({ onClose, onUnlink, onRestore, label }) => {
|
|
|
2844
2856
|
|
|
2845
2857
|
// src/components/ui/tags/warning-variable-tag.tsx
|
|
2846
2858
|
var React25 = __toESM(require("react"));
|
|
2847
|
-
var
|
|
2859
|
+
var import_icons14 = require("@elementor/icons");
|
|
2848
2860
|
var import_ui25 = require("@elementor/ui");
|
|
2849
2861
|
var WarningVariableTag = React25.forwardRef(
|
|
2850
2862
|
({ label, suffix, onClick, icon, ...props }, ref) => {
|
|
@@ -2858,7 +2870,7 @@ var WarningVariableTag = React25.forwardRef(
|
|
|
2858
2870
|
shape: "rounded",
|
|
2859
2871
|
variant: "standard",
|
|
2860
2872
|
onClick,
|
|
2861
|
-
icon: /* @__PURE__ */ React25.createElement(
|
|
2873
|
+
icon: /* @__PURE__ */ React25.createElement(import_icons14.AlertTriangleFilledIcon, null),
|
|
2862
2874
|
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))),
|
|
2863
2875
|
sx: {
|
|
2864
2876
|
height: (theme) => theme.spacing(3.5),
|
|
@@ -3166,14 +3178,14 @@ var VariableControl = () => {
|
|
|
3166
3178
|
// src/hooks/use-prop-variable-action.tsx
|
|
3167
3179
|
var React32 = __toESM(require("react"));
|
|
3168
3180
|
var import_editor_editing_panel6 = require("@elementor/editor-editing-panel");
|
|
3169
|
-
var
|
|
3181
|
+
var import_icons15 = require("@elementor/icons");
|
|
3170
3182
|
var import_i18n23 = require("@wordpress/i18n");
|
|
3171
3183
|
var usePropVariableAction = () => {
|
|
3172
3184
|
const { propType, path } = (0, import_editor_editing_panel6.useBoundProp)();
|
|
3173
3185
|
const variable = resolveVariableFromPropType(propType);
|
|
3174
3186
|
return {
|
|
3175
3187
|
visible: Boolean(variable),
|
|
3176
|
-
icon:
|
|
3188
|
+
icon: import_icons15.ColorFilterIcon,
|
|
3177
3189
|
title: (0, import_i18n23.__)("Variables", "elementor"),
|
|
3178
3190
|
content: ({ close: closePopover }) => {
|
|
3179
3191
|
if (!variable) {
|
|
@@ -3459,7 +3471,7 @@ function initMcp() {
|
|
|
3459
3471
|
// src/register-variable-types.tsx
|
|
3460
3472
|
var React35 = __toESM(require("react"));
|
|
3461
3473
|
var import_editor_props4 = require("@elementor/editor-props");
|
|
3462
|
-
var
|
|
3474
|
+
var import_icons17 = require("@elementor/icons");
|
|
3463
3475
|
|
|
3464
3476
|
// src/components/fields/color-field.tsx
|
|
3465
3477
|
var React33 = __toESM(require("react"));
|
|
@@ -3510,7 +3522,7 @@ var React34 = __toESM(require("react"));
|
|
|
3510
3522
|
var import_react24 = require("react");
|
|
3511
3523
|
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
3512
3524
|
var import_editor_editing_panel7 = require("@elementor/editor-editing-panel");
|
|
3513
|
-
var
|
|
3525
|
+
var import_icons16 = require("@elementor/icons");
|
|
3514
3526
|
var import_ui32 = require("@elementor/ui");
|
|
3515
3527
|
var import_i18n24 = require("@wordpress/i18n");
|
|
3516
3528
|
var FontField = ({ value, onChange, onValidationChange }) => {
|
|
@@ -3543,7 +3555,7 @@ var FontField = ({ value, onChange, onValidationChange }) => {
|
|
|
3543
3555
|
id: id2,
|
|
3544
3556
|
variant: "outlined",
|
|
3545
3557
|
label: fontFamily,
|
|
3546
|
-
endIcon: /* @__PURE__ */ React34.createElement(
|
|
3558
|
+
endIcon: /* @__PURE__ */ React34.createElement(import_icons16.ChevronDownIcon, { fontSize: "tiny" }),
|
|
3547
3559
|
...(0, import_ui32.bindTrigger)(fontPopoverState),
|
|
3548
3560
|
fullWidth: true
|
|
3549
3561
|
}
|
|
@@ -3569,7 +3581,7 @@ var FontField = ({ value, onChange, onValidationChange }) => {
|
|
|
3569
3581
|
title: (0, import_i18n24.__)("Font Family", "elementor"),
|
|
3570
3582
|
itemStyle: (item) => ({ fontFamily: item.value }),
|
|
3571
3583
|
onDebounce: import_editor_controls12.enqueueFont,
|
|
3572
|
-
icon:
|
|
3584
|
+
icon: import_icons16.TextIcon
|
|
3573
3585
|
}
|
|
3574
3586
|
)
|
|
3575
3587
|
));
|
|
@@ -3579,7 +3591,7 @@ var FontField = ({ value, onChange, onValidationChange }) => {
|
|
|
3579
3591
|
function registerVariableTypes() {
|
|
3580
3592
|
registerVariableType({
|
|
3581
3593
|
valueField: ColorField,
|
|
3582
|
-
icon:
|
|
3594
|
+
icon: import_icons17.BrushIcon,
|
|
3583
3595
|
propTypeUtil: colorVariablePropTypeUtil,
|
|
3584
3596
|
fallbackPropTypeUtil: import_editor_props4.colorPropTypeUtil,
|
|
3585
3597
|
variableType: "color",
|
|
@@ -3588,7 +3600,7 @@ function registerVariableTypes() {
|
|
|
3588
3600
|
});
|
|
3589
3601
|
registerVariableType({
|
|
3590
3602
|
valueField: FontField,
|
|
3591
|
-
icon:
|
|
3603
|
+
icon: import_icons17.TextIcon,
|
|
3592
3604
|
propTypeUtil: fontVariablePropTypeUtil,
|
|
3593
3605
|
fallbackPropTypeUtil: import_editor_props4.stringPropTypeUtil,
|
|
3594
3606
|
variableType: "font",
|