@elementor/editor-variables 3.35.0-394 → 3.35.0-396

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
@@ -50,7 +50,7 @@ var import_editor_props7 = require("@elementor/editor-props");
50
50
  var React12 = __toESM(require("react"));
51
51
  var import_react11 = require("react");
52
52
  var import_editor_panels = require("@elementor/editor-panels");
53
- var import_editor_ui3 = require("@elementor/editor-ui");
53
+ var import_editor_ui4 = require("@elementor/editor-ui");
54
54
  var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
55
55
  var import_icons6 = require("@elementor/icons");
56
56
  var import_ui12 = require("@elementor/ui");
@@ -1056,9 +1056,31 @@ var useVariablesManagerState = () => {
1056
1056
  // src/components/variables-manager/variables-manager-create-menu.tsx
1057
1057
  var React6 = __toESM(require("react"));
1058
1058
  var import_react6 = require("react");
1059
+ var import_editor_ui = require("@elementor/editor-ui");
1059
1060
  var import_icons3 = require("@elementor/icons");
1060
1061
  var import_ui6 = require("@elementor/ui");
1061
1062
  var import_i18n7 = require("@wordpress/i18n");
1063
+
1064
+ // src/sync/license-info.ts
1065
+ function getLicenseInfo() {
1066
+ const extendedWindow = window;
1067
+ return {
1068
+ hasPro: !!extendedWindow.elementorPro
1069
+ };
1070
+ }
1071
+
1072
+ // src/hooks/use-quota-permissions.ts
1073
+ var useQuotaPermissions = (variableType) => {
1074
+ const quotaConfig = window.ElementorVariablesQuotaConfig || {};
1075
+ const limit = quotaConfig[variableType] || 0;
1076
+ const hasQuota = limit > 0;
1077
+ return {
1078
+ canAdd: () => hasQuota || getLicenseInfo().hasPro,
1079
+ canEdit: () => hasQuota || getLicenseInfo().hasPro
1080
+ };
1081
+ };
1082
+
1083
+ // src/components/variables-manager/variables-manager-create-menu.tsx
1062
1084
  var SIZE = "tiny";
1063
1085
  var VariableManagerCreateMenu = ({
1064
1086
  variables,
@@ -1068,19 +1090,16 @@ var VariableManagerCreateMenu = ({
1068
1090
  }) => {
1069
1091
  const buttonRef = (0, import_react6.useRef)(null);
1070
1092
  const variableTypes = getVariableTypes();
1071
- const menuOptions = Object.entries(variableTypes).filter(([, variable]) => !!variable.defaultValue).map(([key, variable]) => {
1072
- const displayName = variable.variableType.charAt(0).toUpperCase() + variable.variableType.slice(1);
1073
- return {
1093
+ const menuOptionConfigs = (0, import_react6.useMemo)(
1094
+ () => Object.entries(variableTypes).filter(([, variable]) => !!variable.defaultValue).map(([key, variable]) => ({
1074
1095
  key,
1075
- name: displayName,
1076
- icon: variable.icon,
1077
- onClick: () => {
1078
- const defaultName = getDefaultName(variables, key, variable.variableType);
1079
- onCreate(key, defaultName, variable.defaultValue || "");
1080
- trackVariablesManagerEvent({ action: "add", varType: variable.variableType });
1081
- }
1082
- };
1083
- });
1096
+ propTypeKey: variable.propTypeUtil.key,
1097
+ variableType: variable.variableType,
1098
+ defaultValue: variable.defaultValue || "",
1099
+ icon: variable.icon
1100
+ })),
1101
+ [variableTypes]
1102
+ );
1084
1103
  return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
1085
1104
  import_ui6.IconButton,
1086
1105
  {
@@ -1113,26 +1132,47 @@ var VariableManagerCreateMenu = ({
1113
1132
  },
1114
1133
  "data-testid": "variable-manager-create-menu"
1115
1134
  },
1116
- menuOptions.map((option) => /* @__PURE__ */ React6.createElement(
1117
- import_ui6.MenuItem,
1135
+ menuOptionConfigs.map((config) => /* @__PURE__ */ React6.createElement(
1136
+ MenuOption,
1118
1137
  {
1119
- key: option.key,
1120
- onClick: () => {
1121
- option.onClick?.();
1122
- menuState.close();
1123
- },
1124
- sx: {
1125
- gap: 1.5
1126
- }
1127
- },
1128
- (0, import_react6.createElement)(option.icon, {
1129
- fontSize: SIZE,
1130
- color: "action"
1131
- }),
1132
- /* @__PURE__ */ React6.createElement(import_ui6.Typography, { variant: "caption", color: "text.primary" }, option.name)
1138
+ key: config.key,
1139
+ config,
1140
+ variables,
1141
+ onCreate,
1142
+ onClose: menuState.close
1143
+ }
1133
1144
  ))
1134
1145
  ));
1135
1146
  };
1147
+ var MenuOption = ({
1148
+ config,
1149
+ variables,
1150
+ onCreate,
1151
+ onClose
1152
+ }) => {
1153
+ const displayName = config.variableType.charAt(0).toUpperCase() + config.variableType.slice(1);
1154
+ const userQuotaPermissions = useQuotaPermissions(config.propTypeKey);
1155
+ const isDisabled = !userQuotaPermissions.canAdd();
1156
+ const handleClick = () => {
1157
+ if (isDisabled) {
1158
+ return;
1159
+ }
1160
+ const defaultName = getDefaultName(variables, config.key, config.variableType);
1161
+ onCreate(config.key, defaultName, config.defaultValue);
1162
+ trackVariablesManagerEvent({ action: "add", varType: config.variableType });
1163
+ onClose();
1164
+ };
1165
+ return /* @__PURE__ */ React6.createElement(import_ui6.MenuItem, { onClick: handleClick, sx: { gap: 1.5, cursor: isDisabled ? "default" : "pointer" } }, (0, import_react6.createElement)(config.icon, { fontSize: SIZE, color: isDisabled ? "disabled" : "action" }), /* @__PURE__ */ React6.createElement(import_ui6.Typography, { variant: "caption", color: isDisabled ? "text.disabled" : "text.primary" }, displayName), isDisabled && /* @__PURE__ */ React6.createElement(
1166
+ import_ui6.Box,
1167
+ {
1168
+ onClick: () => {
1169
+ event?.stopPropagation();
1170
+ }
1171
+ },
1172
+ /* @__PURE__ */ React6.createElement(import_editor_ui.PromotionChip, { onClick: () => {
1173
+ } })
1174
+ ));
1175
+ };
1136
1176
  var getDefaultName = (variables, type, baseName) => {
1137
1177
  const existingNames = Object.values(variables).filter((variable) => variable.type === type).map((variable) => variable.label);
1138
1178
  let counter = 1;
@@ -1147,7 +1187,7 @@ var getDefaultName = (variables, type, baseName) => {
1147
1187
  // src/components/variables-manager/variables-manager-table.tsx
1148
1188
  var React11 = __toESM(require("react"));
1149
1189
  var import_react10 = require("react");
1150
- var import_editor_ui2 = require("@elementor/editor-ui");
1190
+ var import_editor_ui3 = require("@elementor/editor-ui");
1151
1191
  var import_icons5 = require("@elementor/icons");
1152
1192
  var import_ui11 = require("@elementor/ui");
1153
1193
  var import_i18n8 = require("@wordpress/i18n");
@@ -1155,7 +1195,7 @@ var import_i18n8 = require("@wordpress/i18n");
1155
1195
  // src/components/fields/label-field.tsx
1156
1196
  var React7 = __toESM(require("react"));
1157
1197
  var import_react7 = require("react");
1158
- var import_editor_ui = require("@elementor/editor-ui");
1198
+ var import_editor_ui2 = require("@elementor/editor-ui");
1159
1199
  var import_ui7 = require("@elementor/ui");
1160
1200
  function isLabelEqual(a, b) {
1161
1201
  return a.trim().toLowerCase() === b.trim().toLowerCase();
@@ -1215,7 +1255,7 @@ var LabelField = ({
1215
1255
  if (showWarningInfotip) {
1216
1256
  const tooltipWidth = Math.max(240, fieldRef.current?.getBoundingClientRect().width ?? 240);
1217
1257
  return /* @__PURE__ */ React7.createElement(
1218
- import_editor_ui.WarningInfotip,
1258
+ import_editor_ui2.WarningInfotip,
1219
1259
  {
1220
1260
  open: Boolean(errorMsg || hintMsg),
1221
1261
  text: errorMsg || hintMsg,
@@ -1349,14 +1389,14 @@ var VariableEditableCell = React10.memo(
1349
1389
  const handleDoubleClick = () => {
1350
1390
  setIsEditing(true);
1351
1391
  };
1352
- const handleKeyDown = (event) => {
1353
- if (event.key === "Enter") {
1392
+ const handleKeyDown = (event2) => {
1393
+ if (event2.key === "Enter") {
1354
1394
  handleSave();
1355
- } else if (event.key === "Escape") {
1395
+ } else if (event2.key === "Escape") {
1356
1396
  setIsEditing(false);
1357
1397
  }
1358
- if (event.key === " " && !isEditing) {
1359
- event.preventDefault();
1398
+ if (event2.key === " " && !isEditing) {
1399
+ event2.preventDefault();
1360
1400
  setIsEditing(true);
1361
1401
  }
1362
1402
  };
@@ -1598,7 +1638,7 @@ var VariablesManagerTable = ({
1598
1638
  fieldType: "label"
1599
1639
  },
1600
1640
  /* @__PURE__ */ React11.createElement(
1601
- import_editor_ui2.EllipsisWithTooltip,
1641
+ import_editor_ui3.EllipsisWithTooltip,
1602
1642
  {
1603
1643
  title: row.name,
1604
1644
  sx: { border: "4px solid transparent" }
@@ -1650,7 +1690,7 @@ var VariablesManagerTable = ({
1650
1690
  },
1651
1691
  row.startIcon && row.startIcon({ value: row.value }),
1652
1692
  /* @__PURE__ */ React11.createElement(
1653
- import_editor_ui2.EllipsisWithTooltip,
1693
+ import_editor_ui3.EllipsisWithTooltip,
1654
1694
  {
1655
1695
  title: row.value,
1656
1696
  sx: {
@@ -1710,7 +1750,7 @@ var { panel, usePanelActions } = (0, import_editor_panels.__createPanel)({
1710
1750
  });
1711
1751
  function VariablesManagerPanel() {
1712
1752
  const { close: closePanel } = usePanelActions();
1713
- const { open: openSaveChangesDialog, close: closeSaveChangesDialog, isOpen: isSaveChangesDialogOpen } = (0, import_editor_ui3.useDialog)();
1753
+ const { open: openSaveChangesDialog, close: closeSaveChangesDialog, isOpen: isSaveChangesDialogOpen } = (0, import_editor_ui4.useDialog)();
1714
1754
  const createMenuState = (0, import_ui12.usePopupState)({
1715
1755
  variant: "popover"
1716
1756
  });
@@ -1797,7 +1837,7 @@ function VariablesManagerPanel() {
1797
1837
  }
1798
1838
  ];
1799
1839
  const hasVariables = Object.values(variables).some((variable) => !variable.deleted);
1800
- return /* @__PURE__ */ React12.createElement(import_editor_ui3.ThemeProvider, null, /* @__PURE__ */ React12.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React12.createElement(
1840
+ return /* @__PURE__ */ React12.createElement(import_editor_ui4.ThemeProvider, null, /* @__PURE__ */ React12.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React12.createElement(
1801
1841
  import_editor_panels.PanelHeader,
1802
1842
  {
1803
1843
  sx: {
@@ -1821,7 +1861,7 @@ function VariablesManagerPanel() {
1821
1861
  }
1822
1862
  }
1823
1863
  ))), /* @__PURE__ */ React12.createElement(import_ui12.Stack, { width: "100%", direction: "row", gap: 1 }, /* @__PURE__ */ React12.createElement(
1824
- import_editor_ui3.SearchField,
1864
+ import_editor_ui4.SearchField,
1825
1865
  {
1826
1866
  sx: {
1827
1867
  display: "flex",
@@ -1924,8 +1964,8 @@ function VariablesManagerPanel() {
1924
1964
  onConfirm: () => handleDeleteVariableWithConfirmation(deleteConfirmation.id),
1925
1965
  closeDialog: () => setDeleteConfirmation(null)
1926
1966
  }
1927
- ), isSaveChangesDialogOpen && /* @__PURE__ */ React12.createElement(import_editor_ui3.SaveChangesDialog, null, /* @__PURE__ */ React12.createElement(import_editor_ui3.SaveChangesDialog.Title, { onClose: closeSaveChangesDialog }, (0, import_i18n9.__)("You have unsaved changes", "elementor")), /* @__PURE__ */ React12.createElement(import_editor_ui3.SaveChangesDialog.Content, null, /* @__PURE__ */ React12.createElement(import_editor_ui3.SaveChangesDialog.ContentText, null, (0, import_i18n9.__)("To avoid losing your updates, save your changes before leaving.", "elementor"))), /* @__PURE__ */ React12.createElement(
1928
- import_editor_ui3.SaveChangesDialog.Actions,
1967
+ ), isSaveChangesDialogOpen && /* @__PURE__ */ React12.createElement(import_editor_ui4.SaveChangesDialog, null, /* @__PURE__ */ React12.createElement(import_editor_ui4.SaveChangesDialog.Title, { onClose: closeSaveChangesDialog }, (0, import_i18n9.__)("You have unsaved changes", "elementor")), /* @__PURE__ */ React12.createElement(import_editor_ui4.SaveChangesDialog.Content, null, /* @__PURE__ */ React12.createElement(import_editor_ui4.SaveChangesDialog.ContentText, null, (0, import_i18n9.__)("To avoid losing your updates, save your changes before leaving.", "elementor"))), /* @__PURE__ */ React12.createElement(
1968
+ import_editor_ui4.SaveChangesDialog.Actions,
1929
1969
  {
1930
1970
  actions: {
1931
1971
  discard: {
@@ -1951,9 +1991,9 @@ function VariablesManagerPanel() {
1951
1991
  }
1952
1992
  var usePreventUnload = (isDirty) => {
1953
1993
  (0, import_react11.useEffect)(() => {
1954
- const handleBeforeUnload = (event) => {
1994
+ const handleBeforeUnload = (event2) => {
1955
1995
  if (isDirty) {
1956
- event.preventDefault();
1996
+ event2.preventDefault();
1957
1997
  }
1958
1998
  };
1959
1999
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -2008,31 +2048,12 @@ var usePopoverContentRef = () => {
2008
2048
  return (0, import_react12.useContext)(PopoverContentRefContext);
2009
2049
  };
2010
2050
 
2011
- // src/sync/license-info.ts
2012
- function getLicenseInfo() {
2013
- const extendedWindow = window;
2014
- return {
2015
- hasPro: !!extendedWindow.elementorPro
2016
- };
2017
- }
2018
-
2019
- // src/hooks/use-quota-permissions.ts
2020
- var useQuotaPermissions = (variableType) => {
2021
- const quotaConfig = window.ElementorVariablesQuotaConfig || {};
2022
- const limit = quotaConfig[variableType] || 0;
2023
- const hasQuota = limit > 0;
2024
- return {
2025
- canAdd: () => hasQuota || getLicenseInfo().hasPro,
2026
- canEdit: () => hasQuota || getLicenseInfo().hasPro
2027
- };
2028
- };
2029
-
2030
2051
  // src/components/variable-creation.tsx
2031
2052
  var React15 = __toESM(require("react"));
2032
2053
  var import_react13 = require("react");
2033
2054
  var import_editor_controls4 = require("@elementor/editor-controls");
2034
2055
  var import_editor_editing_panel2 = require("@elementor/editor-editing-panel");
2035
- var import_editor_ui4 = require("@elementor/editor-ui");
2056
+ var import_editor_ui5 = require("@elementor/editor-ui");
2036
2057
  var import_icons7 = require("@elementor/icons");
2037
2058
  var import_ui15 = require("@elementor/ui");
2038
2059
  var import_i18n10 = require("@wordpress/i18n");
@@ -2147,7 +2168,7 @@ var VariableCreation = ({ onGoBack, onClose }) => {
2147
2168
  };
2148
2169
  const isSubmitDisabled = hasEmptyFields() || hasErrors();
2149
2170
  return /* @__PURE__ */ React15.createElement(import_editor_editing_panel2.PopoverBody, { height: "auto" }, /* @__PURE__ */ React15.createElement(
2150
- import_editor_ui4.PopoverHeader,
2171
+ import_editor_ui5.PopoverHeader,
2151
2172
  {
2152
2173
  icon: /* @__PURE__ */ React15.createElement(React15.Fragment, null, onGoBack && /* @__PURE__ */ React15.createElement(import_ui15.IconButton, { size: SIZE2, "aria-label": (0, import_i18n10.__)("Go Back", "elementor"), onClick: onGoBack }, /* @__PURE__ */ React15.createElement(import_icons7.ArrowLeftIcon, { fontSize: SIZE2 })), /* @__PURE__ */ React15.createElement(VariableIcon, { fontSize: SIZE2 })),
2153
2174
  title: (0, import_i18n10.__)("Create variable", "elementor"),
@@ -2211,7 +2232,7 @@ var import_react15 = require("react");
2211
2232
  var import_editor_controls5 = require("@elementor/editor-controls");
2212
2233
  var import_editor_current_user2 = require("@elementor/editor-current-user");
2213
2234
  var import_editor_editing_panel3 = require("@elementor/editor-editing-panel");
2214
- var import_editor_ui5 = require("@elementor/editor-ui");
2235
+ var import_editor_ui6 = require("@elementor/editor-ui");
2215
2236
  var import_icons9 = require("@elementor/icons");
2216
2237
  var import_ui17 = require("@elementor/ui");
2217
2238
  var import_i18n12 = require("@wordpress/i18n");
@@ -2245,7 +2266,7 @@ var EditConfirmationDialog = ({
2245
2266
  import_ui16.Checkbox,
2246
2267
  {
2247
2268
  checked: dontShowAgain,
2248
- onChange: (event) => setDontShowAgain(event.target.checked),
2269
+ onChange: (event2) => setDontShowAgain(event2.target.checked),
2249
2270
  size: "small"
2250
2271
  }
2251
2272
  ),
@@ -2357,7 +2378,7 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
2357
2378
  };
2358
2379
  const isSubmitDisabled = noValueChanged() || hasEmptyFields() || hasErrors();
2359
2380
  return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(import_editor_editing_panel3.PopoverBody, { height: "auto" }, /* @__PURE__ */ React17.createElement(
2360
- import_editor_ui5.PopoverHeader,
2381
+ import_editor_ui6.PopoverHeader,
2361
2382
  {
2362
2383
  title: (0, import_i18n12.__)("Edit variable", "elementor"),
2363
2384
  onClose,
@@ -2434,14 +2455,14 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
2434
2455
  var React19 = __toESM(require("react"));
2435
2456
  var import_react16 = require("react");
2436
2457
  var import_editor_editing_panel4 = require("@elementor/editor-editing-panel");
2437
- var import_editor_ui7 = require("@elementor/editor-ui");
2458
+ var import_editor_ui8 = require("@elementor/editor-ui");
2438
2459
  var import_icons11 = require("@elementor/icons");
2439
2460
  var import_ui20 = require("@elementor/ui");
2440
2461
  var import_i18n14 = require("@wordpress/i18n");
2441
2462
 
2442
2463
  // src/components/ui/menu-item-content.tsx
2443
2464
  var React18 = __toESM(require("react"));
2444
- var import_editor_ui6 = require("@elementor/editor-ui");
2465
+ var import_editor_ui7 = require("@elementor/editor-ui");
2445
2466
  var import_icons10 = require("@elementor/icons");
2446
2467
  var import_ui18 = require("@elementor/ui");
2447
2468
  var import_i18n13 = require("@wordpress/i18n");
@@ -2461,7 +2482,7 @@ var MenuItemContent = ({ item }) => {
2461
2482
  }
2462
2483
  },
2463
2484
  /* @__PURE__ */ React18.createElement(
2464
- import_editor_ui6.EllipsisWithTooltip,
2485
+ import_editor_ui7.EllipsisWithTooltip,
2465
2486
  {
2466
2487
  title: item.label || item.value,
2467
2488
  as: import_ui18.Typography,
@@ -2472,7 +2493,7 @@ var MenuItemContent = ({ item }) => {
2472
2493
  }
2473
2494
  ),
2474
2495
  item.secondaryText && /* @__PURE__ */ React18.createElement(
2475
- import_editor_ui6.EllipsisWithTooltip,
2496
+ import_editor_ui7.EllipsisWithTooltip,
2476
2497
  {
2477
2498
  title: item.secondaryText,
2478
2499
  as: import_ui18.Typography,
@@ -2613,7 +2634,7 @@ var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings, disabled =
2613
2634
  setSearchValue("");
2614
2635
  };
2615
2636
  return /* @__PURE__ */ React19.createElement(import_editor_editing_panel4.PopoverBody, null, /* @__PURE__ */ React19.createElement(
2616
- import_editor_ui7.PopoverHeader,
2637
+ import_editor_ui8.PopoverHeader,
2617
2638
  {
2618
2639
  title: (0, import_i18n14.__)("Variables", "elementor"),
2619
2640
  icon: /* @__PURE__ */ React19.createElement(import_icons11.ColorFilterIcon, { fontSize: SIZE5 }),
@@ -2621,14 +2642,14 @@ var VariablesSelection = ({ closePopover, onAdd, onEdit, onSettings, disabled =
2621
2642
  actions
2622
2643
  }
2623
2644
  ), hasVariables && /* @__PURE__ */ React19.createElement(
2624
- import_editor_ui7.SearchField,
2645
+ import_editor_ui8.SearchField,
2625
2646
  {
2626
2647
  value: searchValue,
2627
2648
  onSearch: handleSearch,
2628
2649
  placeholder: (0, import_i18n14.__)("Search", "elementor")
2629
2650
  }
2630
2651
  ), /* @__PURE__ */ React19.createElement(import_ui20.Divider, null), hasVariables && hasSearchResults && /* @__PURE__ */ React19.createElement(
2631
- import_editor_ui7.PopoverMenuList,
2652
+ import_editor_ui8.PopoverMenuList,
2632
2653
  {
2633
2654
  items,
2634
2655
  onSelect: handleSetVariable,
@@ -2859,7 +2880,7 @@ var React23 = __toESM(require("react"));
2859
2880
  var import_react19 = require("react");
2860
2881
  var import_editor_controls7 = require("@elementor/editor-controls");
2861
2882
  var import_editor_editing_panel5 = require("@elementor/editor-editing-panel");
2862
- var import_editor_ui8 = require("@elementor/editor-ui");
2883
+ var import_editor_ui9 = require("@elementor/editor-ui");
2863
2884
  var import_ui23 = require("@elementor/ui");
2864
2885
  var import_i18n16 = require("@wordpress/i18n");
2865
2886
  var SIZE7 = "tiny";
@@ -2916,7 +2937,7 @@ var VariableRestore = ({ variableId, onClose, onSubmit }) => {
2916
2937
  };
2917
2938
  const isSubmitDisabled = noValueChanged() || hasEmptyFields() || hasErrors();
2918
2939
  return /* @__PURE__ */ React23.createElement(PopoverContentRefContextProvider, null, /* @__PURE__ */ React23.createElement(import_editor_editing_panel5.PopoverBody, { height: "auto" }, /* @__PURE__ */ React23.createElement(
2919
- import_editor_ui8.PopoverHeader,
2940
+ import_editor_ui9.PopoverHeader,
2920
2941
  {
2921
2942
  icon: /* @__PURE__ */ React23.createElement(VariableIcon, { fontSize: SIZE7 }),
2922
2943
  title: (0, import_i18n16.__)("Restore variable", "elementor"),
@@ -3589,7 +3610,7 @@ function initMcp() {
3589
3610
  // src/register-variable-types.tsx
3590
3611
  var React35 = __toESM(require("react"));
3591
3612
  var import_editor_props5 = require("@elementor/editor-props");
3592
- var import_editor_ui9 = require("@elementor/editor-ui");
3613
+ var import_editor_ui10 = require("@elementor/editor-ui");
3593
3614
  var import_icons17 = require("@elementor/icons");
3594
3615
 
3595
3616
  // src/components/fields/color-field.tsx
@@ -3745,11 +3766,12 @@ function registerVariableTypes() {
3745
3766
  styleTransformer: EmptyTransformer,
3746
3767
  variableType: "size",
3747
3768
  selectionFilter: () => [],
3748
- emptyState: /* @__PURE__ */ React35.createElement(import_editor_ui9.CtaButton, { size: "small", href: "https://go.elementor.com/go-pro-panel-size-variable/" })
3769
+ emptyState: /* @__PURE__ */ React35.createElement(import_editor_ui10.CtaButton, { size: "small", href: "https://go.elementor.com/go-pro-panel-size-variable/" })
3749
3770
  };
3750
3771
  registerVariableType({
3751
3772
  ...sizePromotions,
3752
- key: sizeVariablePropTypeUtil.key
3773
+ key: sizeVariablePropTypeUtil.key,
3774
+ defaultValue: "0px"
3753
3775
  });
3754
3776
  registerVariableType({
3755
3777
  ...sizePromotions,