@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.mjs CHANGED
@@ -959,7 +959,8 @@ var LabelField = ({
959
959
  onChange: (e) => handleChange(e.target.value),
960
960
  inputProps: {
961
961
  maxLength: VARIABLE_LABEL_MAX_LENGTH,
962
- ...selectOnShow && { onFocus: (e) => e.target.select() }
962
+ ...selectOnShow && { onFocus: (e) => e.target.select() },
963
+ "aria-label": "Name"
963
964
  },
964
965
  autoFocus: focusOnShow
965
966
  }
@@ -982,7 +983,7 @@ var LabelField = ({
982
983
  return textField;
983
984
  };
984
985
 
985
- // src/components/variables-manager/variable-edit-menu.tsx
986
+ // src/components/variables-manager/utils/variable-edit-menu.tsx
986
987
  import * as React6 from "react";
987
988
  import { createElement as createElement8 } from "react";
988
989
  import { DotsVerticalIcon } from "@elementor/icons";
@@ -1036,11 +1037,35 @@ var VariableEditMenu = ({ menuActions, disabled, itemId }) => {
1036
1037
  ));
1037
1038
  };
1038
1039
 
1039
- // src/components/variables-manager/variable-editable-cell.tsx
1040
+ // src/components/variables-manager/utils/variable-table-cell.tsx
1040
1041
  import * as React7 from "react";
1042
+ import { TableCell } from "@elementor/ui";
1043
+ var VariableTableCell = ({
1044
+ children,
1045
+ isHeader,
1046
+ width,
1047
+ maxWidth,
1048
+ align,
1049
+ noPadding,
1050
+ sx
1051
+ }) => {
1052
+ const baseSx = {
1053
+ maxWidth: maxWidth ?? 150,
1054
+ cursor: "initial",
1055
+ typography: "caption",
1056
+ ...isHeader && { color: "text.primary", fontWeight: "bold" },
1057
+ ...isHeader && !noPadding && { padding: "10px 16px" },
1058
+ ...width && { width },
1059
+ ...sx
1060
+ };
1061
+ return /* @__PURE__ */ React7.createElement(TableCell, { size: "small", padding: noPadding ? "none" : void 0, align, sx: baseSx }, children);
1062
+ };
1063
+
1064
+ // src/components/variables-manager/variable-editable-cell.tsx
1065
+ import * as React8 from "react";
1041
1066
  import { useCallback as useCallback3, useEffect, useRef as useRef2, useState as useState4 } from "react";
1042
1067
  import { ClickAwayListener, Stack as Stack2 } from "@elementor/ui";
1043
- var VariableEditableCell = React7.memo(
1068
+ var VariableEditableCell = React8.memo(
1044
1069
  ({
1045
1070
  initialValue,
1046
1071
  children,
@@ -1106,7 +1131,7 @@ var VariableEditableCell = React7.memo(
1106
1131
  error: currentError
1107
1132
  });
1108
1133
  if (isEditing) {
1109
- return /* @__PURE__ */ React7.createElement(ClickAwayListener, { onClickAway: handleSave }, /* @__PURE__ */ React7.createElement(
1134
+ return /* @__PURE__ */ React8.createElement(ClickAwayListener, { onClickAway: handleSave }, /* @__PURE__ */ React8.createElement(
1110
1135
  Stack2,
1111
1136
  {
1112
1137
  ref: rowRef,
@@ -1123,7 +1148,7 @@ var VariableEditableCell = React7.memo(
1123
1148
  editableContent
1124
1149
  ));
1125
1150
  }
1126
- return /* @__PURE__ */ React7.createElement(
1151
+ return /* @__PURE__ */ React8.createElement(
1127
1152
  Stack2,
1128
1153
  {
1129
1154
  ref: rowRef,
@@ -1142,30 +1167,6 @@ var VariableEditableCell = React7.memo(
1142
1167
  }
1143
1168
  );
1144
1169
 
1145
- // src/components/variables-manager/variable-table-cell.tsx
1146
- import * as React8 from "react";
1147
- import { TableCell } from "@elementor/ui";
1148
- var VariableTableCell = ({
1149
- children,
1150
- isHeader,
1151
- width,
1152
- maxWidth,
1153
- align,
1154
- noPadding,
1155
- sx
1156
- }) => {
1157
- const baseSx = {
1158
- maxWidth: maxWidth ?? 150,
1159
- cursor: "initial",
1160
- typography: "caption",
1161
- ...isHeader && { color: "text.primary", fontWeight: "bold" },
1162
- ...isHeader && !noPadding && { padding: "10px 16px" },
1163
- ...width && { width },
1164
- ...sx
1165
- };
1166
- return /* @__PURE__ */ React8.createElement(TableCell, { size: "small", padding: noPadding ? "none" : void 0, align, sx: baseSx }, children);
1167
- };
1168
-
1169
1170
  // src/components/variables-manager/variables-manager-table.tsx
1170
1171
  var VariablesManagerTable = ({
1171
1172
  menuActions,