@elementor/editor-variables 3.33.0-175 → 3.33.0-176

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 CHANGED
@@ -2144,6 +2144,7 @@ var EditConfirmationDialog = ({
2144
2144
 
2145
2145
  // src/components/variable-edit.tsx
2146
2146
  var SIZE3 = "tiny";
2147
+ var DELETE_LABEL = (0, import_i18n12.__)("Delete variable", "elementor");
2147
2148
  var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
2148
2149
  const { icon: VariableIcon, valueField: ValueField, variableType } = useVariableType();
2149
2150
  const { setVariableValue: notifyBoundPropChange, variableId } = useVariableBoundProp();
@@ -2224,16 +2225,7 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
2224
2225
  const actions = [];
2225
2226
  if (userPermissions.canDelete()) {
2226
2227
  actions.push(
2227
- /* @__PURE__ */ React17.createElement(
2228
- import_ui17.IconButton,
2229
- {
2230
- key: "delete",
2231
- size: SIZE3,
2232
- "aria-label": (0, import_i18n12.__)("Delete", "elementor"),
2233
- onClick: handleDeleteConfirmation
2234
- },
2235
- /* @__PURE__ */ React17.createElement(import_icons8.TrashIcon, { fontSize: SIZE3 })
2236
- )
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(import_icons8.TrashIcon, { fontSize: SIZE3 })))
2237
2229
  );
2238
2230
  }
2239
2231
  const hasEmptyFields = () => {
@@ -2340,6 +2332,7 @@ var import_icons9 = require("@elementor/icons");
2340
2332
  var import_ui18 = require("@elementor/ui");
2341
2333
  var import_i18n13 = require("@wordpress/i18n");
2342
2334
  var SIZE4 = "tiny";
2335
+ var EDIT_LABEL = (0, import_i18n13.__)("Edit variable", "elementor");
2343
2336
  var MenuItemContent = ({ item }) => {
2344
2337
  const onEdit = item.onEdit;
2345
2338
  return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(import_ui18.ListItemIcon, null, item.icon), /* @__PURE__ */ React18.createElement(
@@ -2375,7 +2368,7 @@ var MenuItemContent = ({ item }) => {
2375
2368
  maxWidth: "50%"
2376
2369
  }
2377
2370
  )
2378
- ), !!onEdit && /* @__PURE__ */ React18.createElement(
2371
+ ), !!onEdit && /* @__PURE__ */ React18.createElement(import_ui18.Tooltip, { placement: "top", title: EDIT_LABEL }, /* @__PURE__ */ React18.createElement(
2379
2372
  import_ui18.IconButton,
2380
2373
  {
2381
2374
  sx: { mx: 1, opacity: "0" },
@@ -2383,10 +2376,10 @@ var MenuItemContent = ({ item }) => {
2383
2376
  e.stopPropagation();
2384
2377
  onEdit(item.value);
2385
2378
  },
2386
- "aria-label": (0, import_i18n13.__)("Edit", "elementor")
2379
+ "aria-label": EDIT_LABEL
2387
2380
  },
2388
2381
  /* @__PURE__ */ React18.createElement(import_icons9.EditIcon, { color: "action", fontSize: SIZE4 })
2389
- ));
2382
+ )));
2390
2383
  };
2391
2384
 
2392
2385
  // src/components/ui/styled-menu-list.tsx
@@ -2423,6 +2416,8 @@ var VariablesStyledMenuList = (0, import_ui19.styled)(import_ui19.MenuList)(({ t
2423
2416
 
2424
2417
  // src/components/variables-selection.tsx
2425
2418
  var SIZE5 = "tiny";
2419
+ var CREATE_LABEL = (0, import_i18n14.__)("Create variable", "elementor");
2420
+ var MANAGER_LABEL = (0, import_i18n14.__)("Variable Manager", "elementor");
2426
2421
  var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings }) => {
2427
2422
  const { icon: VariableIcon, startIcon, variableType, propTypeUtil } = useVariableType();
2428
2423
  const { value: variable, setValue: setVariable, path } = useVariableBoundProp();
@@ -2453,12 +2448,30 @@ var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings }) => {
2453
2448
  const actions = [];
2454
2449
  if (onAdd) {
2455
2450
  actions.push(
2456
- /* @__PURE__ */ React19.createElement(import_ui20.IconButton, { id: "add-variable-button", key: "add", size: SIZE5, onClick: onAddAndTrack }, /* @__PURE__ */ React19.createElement(import_icons10.PlusIcon, { fontSize: SIZE5 }))
2451
+ /* @__PURE__ */ React19.createElement(import_ui20.Tooltip, { key: "add", placement: "top", title: CREATE_LABEL }, /* @__PURE__ */ React19.createElement(
2452
+ import_ui20.IconButton,
2453
+ {
2454
+ id: "add-variable-button",
2455
+ size: SIZE5,
2456
+ onClick: onAddAndTrack,
2457
+ "aria-label": CREATE_LABEL
2458
+ },
2459
+ /* @__PURE__ */ React19.createElement(import_icons10.PlusIcon, { fontSize: SIZE5 })
2460
+ ))
2457
2461
  );
2458
2462
  }
2459
2463
  if (onSettings) {
2460
2464
  actions.push(
2461
- /* @__PURE__ */ React19.createElement(import_ui20.IconButton, { id: "variables-manager-button", key: "settings", size: SIZE5, onClick: onSettings }, /* @__PURE__ */ React19.createElement(import_icons10.SettingsIcon, { fontSize: SIZE5 }))
2465
+ /* @__PURE__ */ React19.createElement(import_ui20.Tooltip, { key: "settings", placement: "top", title: MANAGER_LABEL }, /* @__PURE__ */ React19.createElement(
2466
+ import_ui20.IconButton,
2467
+ {
2468
+ id: "variables-manager-button",
2469
+ size: SIZE5,
2470
+ onClick: onSettings,
2471
+ "aria-label": MANAGER_LABEL
2472
+ },
2473
+ /* @__PURE__ */ React19.createElement(import_icons10.SettingsIcon, { fontSize: SIZE5 })
2474
+ ))
2462
2475
  );
2463
2476
  }
2464
2477
  const StartIcon = startIcon || (() => /* @__PURE__ */ React19.createElement(VariableIcon, { fontSize: SIZE5 }));
@@ -2630,11 +2643,12 @@ var import_icons11 = require("@elementor/icons");
2630
2643
  var import_ui21 = require("@elementor/ui");
2631
2644
  var import_i18n15 = require("@wordpress/i18n");
2632
2645
  var SIZE6 = "tiny";
2646
+ var UNLINK_LABEL = (0, import_i18n15.__)("Unlink variable", "elementor");
2633
2647
  var AssignedTag = ({ startIcon, label, onUnlink, ...props }) => {
2634
2648
  const actions = [];
2635
2649
  if (onUnlink) {
2636
2650
  actions.push(
2637
- /* @__PURE__ */ React21.createElement(import_ui21.IconButton, { key: "unlink", size: SIZE6, onClick: onUnlink, "aria-label": (0, import_i18n15.__)("Unlink", "elementor") }, /* @__PURE__ */ React21.createElement(import_icons11.DetachIcon, { fontSize: SIZE6 }))
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(import_icons11.DetachIcon, { fontSize: SIZE6 })))
2638
2652
  );
2639
2653
  }
2640
2654
  return /* @__PURE__ */ React21.createElement(import_ui21.Tooltip, { title: label, placement: "top" }, /* @__PURE__ */ React21.createElement(