@elementor/editor-variables 3.33.0-152 → 3.33.0-154
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 +34 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -30
- 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/variables-manager-table.tsx +2 -2
- /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,
|
|
@@ -1119,8 +1144,8 @@ var VariableEditableCell = React7.memo(
|
|
|
1119
1144
|
error: currentError
|
|
1120
1145
|
});
|
|
1121
1146
|
if (isEditing) {
|
|
1122
|
-
return /* @__PURE__ */
|
|
1123
|
-
|
|
1147
|
+
return /* @__PURE__ */ React8.createElement(import_ui8.ClickAwayListener, { onClickAway: handleSave }, /* @__PURE__ */ React8.createElement(
|
|
1148
|
+
import_ui8.Stack,
|
|
1124
1149
|
{
|
|
1125
1150
|
ref: rowRef,
|
|
1126
1151
|
direction: "row",
|
|
@@ -1136,8 +1161,8 @@ var VariableEditableCell = React7.memo(
|
|
|
1136
1161
|
editableContent
|
|
1137
1162
|
));
|
|
1138
1163
|
}
|
|
1139
|
-
return /* @__PURE__ */
|
|
1140
|
-
|
|
1164
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1165
|
+
import_ui8.Stack,
|
|
1141
1166
|
{
|
|
1142
1167
|
ref: rowRef,
|
|
1143
1168
|
direction: "row",
|
|
@@ -1155,30 +1180,6 @@ var VariableEditableCell = React7.memo(
|
|
|
1155
1180
|
}
|
|
1156
1181
|
);
|
|
1157
1182
|
|
|
1158
|
-
// src/components/variables-manager/variable-table-cell.tsx
|
|
1159
|
-
var React8 = __toESM(require("react"));
|
|
1160
|
-
var import_ui8 = require("@elementor/ui");
|
|
1161
|
-
var VariableTableCell = ({
|
|
1162
|
-
children,
|
|
1163
|
-
isHeader,
|
|
1164
|
-
width,
|
|
1165
|
-
maxWidth,
|
|
1166
|
-
align,
|
|
1167
|
-
noPadding,
|
|
1168
|
-
sx
|
|
1169
|
-
}) => {
|
|
1170
|
-
const baseSx = {
|
|
1171
|
-
maxWidth: maxWidth ?? 150,
|
|
1172
|
-
cursor: "initial",
|
|
1173
|
-
typography: "caption",
|
|
1174
|
-
...isHeader && { color: "text.primary", fontWeight: "bold" },
|
|
1175
|
-
...isHeader && !noPadding && { padding: "10px 16px" },
|
|
1176
|
-
...width && { width },
|
|
1177
|
-
...sx
|
|
1178
|
-
};
|
|
1179
|
-
return /* @__PURE__ */ React8.createElement(import_ui8.TableCell, { size: "small", padding: noPadding ? "none" : void 0, align, sx: baseSx }, children);
|
|
1180
|
-
};
|
|
1181
|
-
|
|
1182
1183
|
// src/components/variables-manager/variables-manager-table.tsx
|
|
1183
1184
|
var VariablesManagerTable = ({
|
|
1184
1185
|
menuActions,
|