@elementor/editor-variables 3.33.0-151 → 3.33.0-153
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 +44 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
- package/src/components/fields/label-field.tsx +2 -1
- package/src/components/variables-manager/variable-editable-cell.tsx +4 -2
- package/src/components/variables-manager/variables-manager-table.tsx +8 -3
- /package/src/components/variables-manager/{variable-edit-menu.tsx → utils/variable-edit-menu.tsx} +0 -0
- /package/src/components/variables-manager/{variable-table-cell.tsx → utils/variable-table-cell.tsx} +0 -0
package/dist/index.js
CHANGED
|
@@ -972,7 +972,8 @@ var LabelField = ({
|
|
|
972
972
|
onChange: (e) => handleChange(e.target.value),
|
|
973
973
|
inputProps: {
|
|
974
974
|
maxLength: VARIABLE_LABEL_MAX_LENGTH,
|
|
975
|
-
...selectOnShow && { onFocus: (e) => e.target.select() }
|
|
975
|
+
...selectOnShow && { onFocus: (e) => e.target.select() },
|
|
976
|
+
"aria-label": "Name"
|
|
976
977
|
},
|
|
977
978
|
autoFocus: focusOnShow
|
|
978
979
|
}
|
|
@@ -995,7 +996,7 @@ var LabelField = ({
|
|
|
995
996
|
return textField;
|
|
996
997
|
};
|
|
997
998
|
|
|
998
|
-
// src/components/variables-manager/variable-edit-menu.tsx
|
|
999
|
+
// src/components/variables-manager/utils/variable-edit-menu.tsx
|
|
999
1000
|
var React6 = __toESM(require("react"));
|
|
1000
1001
|
var import_react7 = require("react");
|
|
1001
1002
|
var import_icons3 = require("@elementor/icons");
|
|
@@ -1049,11 +1050,35 @@ var VariableEditMenu = ({ menuActions, disabled, itemId }) => {
|
|
|
1049
1050
|
));
|
|
1050
1051
|
};
|
|
1051
1052
|
|
|
1052
|
-
// src/components/variables-manager/variable-
|
|
1053
|
+
// src/components/variables-manager/utils/variable-table-cell.tsx
|
|
1053
1054
|
var React7 = __toESM(require("react"));
|
|
1054
|
-
var import_react8 = require("react");
|
|
1055
1055
|
var import_ui7 = require("@elementor/ui");
|
|
1056
|
-
var
|
|
1056
|
+
var VariableTableCell = ({
|
|
1057
|
+
children,
|
|
1058
|
+
isHeader,
|
|
1059
|
+
width,
|
|
1060
|
+
maxWidth,
|
|
1061
|
+
align,
|
|
1062
|
+
noPadding,
|
|
1063
|
+
sx
|
|
1064
|
+
}) => {
|
|
1065
|
+
const baseSx = {
|
|
1066
|
+
maxWidth: maxWidth ?? 150,
|
|
1067
|
+
cursor: "initial",
|
|
1068
|
+
typography: "caption",
|
|
1069
|
+
...isHeader && { color: "text.primary", fontWeight: "bold" },
|
|
1070
|
+
...isHeader && !noPadding && { padding: "10px 16px" },
|
|
1071
|
+
...width && { width },
|
|
1072
|
+
...sx
|
|
1073
|
+
};
|
|
1074
|
+
return /* @__PURE__ */ React7.createElement(import_ui7.TableCell, { size: "small", padding: noPadding ? "none" : void 0, align, sx: baseSx }, children);
|
|
1075
|
+
};
|
|
1076
|
+
|
|
1077
|
+
// src/components/variables-manager/variable-editable-cell.tsx
|
|
1078
|
+
var React8 = __toESM(require("react"));
|
|
1079
|
+
var import_react8 = require("react");
|
|
1080
|
+
var import_ui8 = require("@elementor/ui");
|
|
1081
|
+
var VariableEditableCell = React8.memo(
|
|
1057
1082
|
({
|
|
1058
1083
|
initialValue,
|
|
1059
1084
|
children,
|
|
@@ -1063,6 +1088,7 @@ var VariableEditableCell = React7.memo(
|
|
|
1063
1088
|
autoEdit = false,
|
|
1064
1089
|
onRowRef,
|
|
1065
1090
|
onAutoEditComplete,
|
|
1091
|
+
gap = 1,
|
|
1066
1092
|
fieldType
|
|
1067
1093
|
}) => {
|
|
1068
1094
|
const [value, setValue] = (0, import_react8.useState)(initialValue);
|
|
@@ -1118,13 +1144,13 @@ var VariableEditableCell = React7.memo(
|
|
|
1118
1144
|
error: currentError
|
|
1119
1145
|
});
|
|
1120
1146
|
if (isEditing) {
|
|
1121
|
-
return /* @__PURE__ */
|
|
1122
|
-
|
|
1147
|
+
return /* @__PURE__ */ React8.createElement(import_ui8.ClickAwayListener, { onClickAway: handleSave }, /* @__PURE__ */ React8.createElement(
|
|
1148
|
+
import_ui8.Stack,
|
|
1123
1149
|
{
|
|
1124
1150
|
ref: rowRef,
|
|
1125
1151
|
direction: "row",
|
|
1126
1152
|
alignItems: "center",
|
|
1127
|
-
gap
|
|
1153
|
+
gap,
|
|
1128
1154
|
onDoubleClick: handleDoubleClick,
|
|
1129
1155
|
onKeyDown: handleKeyDown,
|
|
1130
1156
|
tabIndex: 0,
|
|
@@ -1135,13 +1161,13 @@ var VariableEditableCell = React7.memo(
|
|
|
1135
1161
|
editableContent
|
|
1136
1162
|
));
|
|
1137
1163
|
}
|
|
1138
|
-
return /* @__PURE__ */
|
|
1139
|
-
|
|
1164
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1165
|
+
import_ui8.Stack,
|
|
1140
1166
|
{
|
|
1141
1167
|
ref: rowRef,
|
|
1142
1168
|
direction: "row",
|
|
1143
1169
|
alignItems: "center",
|
|
1144
|
-
gap
|
|
1170
|
+
gap,
|
|
1145
1171
|
onDoubleClick: handleDoubleClick,
|
|
1146
1172
|
onKeyDown: handleKeyDown,
|
|
1147
1173
|
tabIndex: 0,
|
|
@@ -1154,30 +1180,6 @@ var VariableEditableCell = React7.memo(
|
|
|
1154
1180
|
}
|
|
1155
1181
|
);
|
|
1156
1182
|
|
|
1157
|
-
// src/components/variables-manager/variable-table-cell.tsx
|
|
1158
|
-
var React8 = __toESM(require("react"));
|
|
1159
|
-
var import_ui8 = require("@elementor/ui");
|
|
1160
|
-
var VariableTableCell = ({
|
|
1161
|
-
children,
|
|
1162
|
-
isHeader,
|
|
1163
|
-
width,
|
|
1164
|
-
maxWidth,
|
|
1165
|
-
align,
|
|
1166
|
-
noPadding,
|
|
1167
|
-
sx
|
|
1168
|
-
}) => {
|
|
1169
|
-
const baseSx = {
|
|
1170
|
-
maxWidth: maxWidth ?? 150,
|
|
1171
|
-
cursor: "initial",
|
|
1172
|
-
typography: "caption",
|
|
1173
|
-
...isHeader && { color: "text.primary", fontWeight: "bold" },
|
|
1174
|
-
...isHeader && !noPadding && { padding: "10px 16px" },
|
|
1175
|
-
...width && { width },
|
|
1176
|
-
...sx
|
|
1177
|
-
};
|
|
1178
|
-
return /* @__PURE__ */ React8.createElement(import_ui8.TableCell, { size: "small", padding: noPadding ? "none" : void 0, align, sx: baseSx }, children);
|
|
1179
|
-
};
|
|
1180
|
-
|
|
1181
1183
|
// src/components/variables-manager/variables-manager-table.tsx
|
|
1182
1184
|
var VariablesManagerTable = ({
|
|
1183
1185
|
menuActions,
|
|
@@ -1375,14 +1377,19 @@ var VariablesManagerTable = ({
|
|
|
1375
1377
|
}
|
|
1376
1378
|
},
|
|
1377
1379
|
editableElement: row.valueField,
|
|
1378
|
-
onRowRef: handleRowRef(row.id)
|
|
1380
|
+
onRowRef: handleRowRef(row.id),
|
|
1381
|
+
gap: 0.25
|
|
1379
1382
|
},
|
|
1380
1383
|
row.startIcon && row.startIcon({ value: row.value }),
|
|
1381
1384
|
/* @__PURE__ */ React9.createElement(
|
|
1382
1385
|
import_editor_ui2.EllipsisWithTooltip,
|
|
1383
1386
|
{
|
|
1384
1387
|
title: row.value,
|
|
1385
|
-
sx: {
|
|
1388
|
+
sx: {
|
|
1389
|
+
border: "4px solid transparent",
|
|
1390
|
+
lineHeight: "1",
|
|
1391
|
+
pt: 0.25
|
|
1392
|
+
}
|
|
1386
1393
|
},
|
|
1387
1394
|
row.value
|
|
1388
1395
|
)
|