@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.mjs CHANGED
@@ -2098,7 +2098,7 @@ import { useSuppressedMessage } from "@elementor/editor-current-user";
2098
2098
  import { PopoverBody as PopoverBody2 } from "@elementor/editor-editing-panel";
2099
2099
  import { PopoverHeader as PopoverHeader2 } from "@elementor/editor-ui";
2100
2100
  import { ArrowLeftIcon as ArrowLeftIcon2, TrashIcon as TrashIcon2 } from "@elementor/icons";
2101
- import { Button as Button6, CardActions as CardActions2, Divider as Divider3, FormHelperText as FormHelperText3, IconButton as IconButton5, Typography as Typography8 } from "@elementor/ui";
2101
+ import { Button as Button6, CardActions as CardActions2, Divider as Divider3, FormHelperText as FormHelperText3, IconButton as IconButton5, Tooltip, Typography as Typography8 } from "@elementor/ui";
2102
2102
  import { __ as __12 } from "@wordpress/i18n";
2103
2103
 
2104
2104
  // src/components/ui/edit-confirmation-dialog.tsx
@@ -2151,6 +2151,7 @@ var EditConfirmationDialog = ({
2151
2151
 
2152
2152
  // src/components/variable-edit.tsx
2153
2153
  var SIZE3 = "tiny";
2154
+ var DELETE_LABEL = __12("Delete variable", "elementor");
2154
2155
  var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
2155
2156
  const { icon: VariableIcon, valueField: ValueField, variableType } = useVariableType();
2156
2157
  const { setVariableValue: notifyBoundPropChange, variableId } = useVariableBoundProp();
@@ -2231,16 +2232,7 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
2231
2232
  const actions = [];
2232
2233
  if (userPermissions.canDelete()) {
2233
2234
  actions.push(
2234
- /* @__PURE__ */ React17.createElement(
2235
- IconButton5,
2236
- {
2237
- key: "delete",
2238
- size: SIZE3,
2239
- "aria-label": __12("Delete", "elementor"),
2240
- onClick: handleDeleteConfirmation
2241
- },
2242
- /* @__PURE__ */ React17.createElement(TrashIcon2, { fontSize: SIZE3 })
2243
- )
2235
+ /* @__PURE__ */ React17.createElement(Tooltip, { key: "delete", placement: "top", title: DELETE_LABEL }, /* @__PURE__ */ React17.createElement(IconButton5, { size: SIZE3, onClick: handleDeleteConfirmation, "aria-label": DELETE_LABEL }, /* @__PURE__ */ React17.createElement(TrashIcon2, { fontSize: SIZE3 })))
2244
2236
  );
2245
2237
  }
2246
2238
  const hasEmptyFields = () => {
@@ -2337,16 +2329,17 @@ import { useState as useState10 } from "react";
2337
2329
  import { PopoverBody as PopoverBody3 } from "@elementor/editor-editing-panel";
2338
2330
  import { PopoverHeader as PopoverHeader3, PopoverMenuList, SearchField as SearchField2 } from "@elementor/editor-ui";
2339
2331
  import { ColorFilterIcon as ColorFilterIcon2, PlusIcon as PlusIcon2, SettingsIcon } from "@elementor/icons";
2340
- import { Divider as Divider4, IconButton as IconButton7 } from "@elementor/ui";
2332
+ import { Divider as Divider4, IconButton as IconButton7, Tooltip as Tooltip3 } from "@elementor/ui";
2341
2333
  import { __ as __14, sprintf as sprintf2 } from "@wordpress/i18n";
2342
2334
 
2343
2335
  // src/components/ui/menu-item-content.tsx
2344
2336
  import * as React18 from "react";
2345
2337
  import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
2346
2338
  import { EditIcon } from "@elementor/icons";
2347
- import { Box as Box2, IconButton as IconButton6, ListItemIcon, Typography as Typography9 } from "@elementor/ui";
2339
+ import { Box as Box2, IconButton as IconButton6, ListItemIcon, Tooltip as Tooltip2, Typography as Typography9 } from "@elementor/ui";
2348
2340
  import { __ as __13 } from "@wordpress/i18n";
2349
2341
  var SIZE4 = "tiny";
2342
+ var EDIT_LABEL = __13("Edit variable", "elementor");
2350
2343
  var MenuItemContent = ({ item }) => {
2351
2344
  const onEdit = item.onEdit;
2352
2345
  return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(ListItemIcon, null, item.icon), /* @__PURE__ */ React18.createElement(
@@ -2382,7 +2375,7 @@ var MenuItemContent = ({ item }) => {
2382
2375
  maxWidth: "50%"
2383
2376
  }
2384
2377
  )
2385
- ), !!onEdit && /* @__PURE__ */ React18.createElement(
2378
+ ), !!onEdit && /* @__PURE__ */ React18.createElement(Tooltip2, { placement: "top", title: EDIT_LABEL }, /* @__PURE__ */ React18.createElement(
2386
2379
  IconButton6,
2387
2380
  {
2388
2381
  sx: { mx: 1, opacity: "0" },
@@ -2390,10 +2383,10 @@ var MenuItemContent = ({ item }) => {
2390
2383
  e.stopPropagation();
2391
2384
  onEdit(item.value);
2392
2385
  },
2393
- "aria-label": __13("Edit", "elementor")
2386
+ "aria-label": EDIT_LABEL
2394
2387
  },
2395
2388
  /* @__PURE__ */ React18.createElement(EditIcon, { color: "action", fontSize: SIZE4 })
2396
- ));
2389
+ )));
2397
2390
  };
2398
2391
 
2399
2392
  // src/components/ui/styled-menu-list.tsx
@@ -2430,6 +2423,8 @@ var VariablesStyledMenuList = styled2(MenuList)(({ theme }) => ({
2430
2423
 
2431
2424
  // src/components/variables-selection.tsx
2432
2425
  var SIZE5 = "tiny";
2426
+ var CREATE_LABEL = __14("Create variable", "elementor");
2427
+ var MANAGER_LABEL = __14("Variable Manager", "elementor");
2433
2428
  var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings }) => {
2434
2429
  const { icon: VariableIcon, startIcon, variableType, propTypeUtil } = useVariableType();
2435
2430
  const { value: variable, setValue: setVariable, path } = useVariableBoundProp();
@@ -2460,12 +2455,30 @@ var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings }) => {
2460
2455
  const actions = [];
2461
2456
  if (onAdd) {
2462
2457
  actions.push(
2463
- /* @__PURE__ */ React19.createElement(IconButton7, { id: "add-variable-button", key: "add", size: SIZE5, onClick: onAddAndTrack }, /* @__PURE__ */ React19.createElement(PlusIcon2, { fontSize: SIZE5 }))
2458
+ /* @__PURE__ */ React19.createElement(Tooltip3, { key: "add", placement: "top", title: CREATE_LABEL }, /* @__PURE__ */ React19.createElement(
2459
+ IconButton7,
2460
+ {
2461
+ id: "add-variable-button",
2462
+ size: SIZE5,
2463
+ onClick: onAddAndTrack,
2464
+ "aria-label": CREATE_LABEL
2465
+ },
2466
+ /* @__PURE__ */ React19.createElement(PlusIcon2, { fontSize: SIZE5 })
2467
+ ))
2464
2468
  );
2465
2469
  }
2466
2470
  if (onSettings) {
2467
2471
  actions.push(
2468
- /* @__PURE__ */ React19.createElement(IconButton7, { id: "variables-manager-button", key: "settings", size: SIZE5, onClick: onSettings }, /* @__PURE__ */ React19.createElement(SettingsIcon, { fontSize: SIZE5 }))
2472
+ /* @__PURE__ */ React19.createElement(Tooltip3, { key: "settings", placement: "top", title: MANAGER_LABEL }, /* @__PURE__ */ React19.createElement(
2473
+ IconButton7,
2474
+ {
2475
+ id: "variables-manager-button",
2476
+ size: SIZE5,
2477
+ onClick: onSettings,
2478
+ "aria-label": MANAGER_LABEL
2479
+ },
2480
+ /* @__PURE__ */ React19.createElement(SettingsIcon, { fontSize: SIZE5 })
2481
+ ))
2469
2482
  );
2470
2483
  }
2471
2484
  const StartIcon = startIcon || (() => /* @__PURE__ */ React19.createElement(VariableIcon, { fontSize: SIZE5 }));
@@ -2634,17 +2647,18 @@ function RenderView(props) {
2634
2647
  // src/components/ui/tags/assigned-tag.tsx
2635
2648
  import * as React21 from "react";
2636
2649
  import { DetachIcon } from "@elementor/icons";
2637
- import { Box as Box3, IconButton as IconButton8, Stack as Stack7, Tooltip, Typography as Typography10, UnstableTag as Tag } from "@elementor/ui";
2650
+ import { Box as Box3, IconButton as IconButton8, Stack as Stack7, Tooltip as Tooltip4, Typography as Typography10, UnstableTag as Tag } from "@elementor/ui";
2638
2651
  import { __ as __15 } from "@wordpress/i18n";
2639
2652
  var SIZE6 = "tiny";
2653
+ var UNLINK_LABEL = __15("Unlink variable", "elementor");
2640
2654
  var AssignedTag = ({ startIcon, label, onUnlink, ...props }) => {
2641
2655
  const actions = [];
2642
2656
  if (onUnlink) {
2643
2657
  actions.push(
2644
- /* @__PURE__ */ React21.createElement(IconButton8, { key: "unlink", size: SIZE6, onClick: onUnlink, "aria-label": __15("Unlink", "elementor") }, /* @__PURE__ */ React21.createElement(DetachIcon, { fontSize: SIZE6 }))
2658
+ /* @__PURE__ */ React21.createElement(Tooltip4, { key: "unlink", title: UNLINK_LABEL, placement: "bottom" }, /* @__PURE__ */ React21.createElement(IconButton8, { size: SIZE6, onClick: onUnlink, "aria-label": UNLINK_LABEL }, /* @__PURE__ */ React21.createElement(DetachIcon, { fontSize: SIZE6 })))
2645
2659
  );
2646
2660
  }
2647
- return /* @__PURE__ */ React21.createElement(Tooltip, { title: label, placement: "top" }, /* @__PURE__ */ React21.createElement(
2661
+ return /* @__PURE__ */ React21.createElement(Tooltip4, { title: label, placement: "top" }, /* @__PURE__ */ React21.createElement(
2648
2662
  Tag,
2649
2663
  {
2650
2664
  fullWidth: true,
@@ -2838,7 +2852,7 @@ var DeletedVariableAlert = ({ onClose, onUnlink, onRestore, label }) => {
2838
2852
  // src/components/ui/tags/warning-variable-tag.tsx
2839
2853
  import * as React25 from "react";
2840
2854
  import { AlertTriangleFilledIcon as AlertTriangleFilledIcon3 } from "@elementor/icons";
2841
- import { Box as Box5, Chip, Tooltip as Tooltip2, Typography as Typography13 } from "@elementor/ui";
2855
+ import { Box as Box5, Chip, Tooltip as Tooltip5, Typography as Typography13 } from "@elementor/ui";
2842
2856
  var WarningVariableTag = React25.forwardRef(
2843
2857
  ({ label, suffix, onClick, icon, ...props }, ref) => {
2844
2858
  const displayText = suffix ? `${label} (${suffix})` : label;
@@ -2852,7 +2866,7 @@ var WarningVariableTag = React25.forwardRef(
2852
2866
  variant: "standard",
2853
2867
  onClick,
2854
2868
  icon: /* @__PURE__ */ React25.createElement(AlertTriangleFilledIcon3, null),
2855
- label: /* @__PURE__ */ React25.createElement(Tooltip2, { title: displayText, placement: "top" }, /* @__PURE__ */ React25.createElement(Box5, { sx: { display: "inline-grid", minWidth: 0 } }, /* @__PURE__ */ React25.createElement(Typography13, { variant: "caption", noWrap: true, sx: { lineHeight: 1.34 } }, displayText))),
2869
+ label: /* @__PURE__ */ React25.createElement(Tooltip5, { title: displayText, placement: "top" }, /* @__PURE__ */ React25.createElement(Box5, { sx: { display: "inline-grid", minWidth: 0 } }, /* @__PURE__ */ React25.createElement(Typography13, { variant: "caption", noWrap: true, sx: { lineHeight: 1.34 } }, displayText))),
2856
2870
  sx: {
2857
2871
  height: (theme) => theme.spacing(3.5),
2858
2872
  borderRadius: (theme) => theme.spacing(1),