@elementor/editor-variables 3.33.0-101 → 3.33.0-102
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 +16 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
- package/src/components/ui/deleted-variable-alert.tsx +14 -10
- package/src/components/ui/mismatch-variable-alert.tsx +5 -9
- package/src/components/ui/missing-variable-alert.tsx +8 -9
package/dist/index.mjs
CHANGED
|
@@ -2040,11 +2040,9 @@ var VariableRestore = ({ variableId, onClose, onSubmit }) => {
|
|
|
2040
2040
|
|
|
2041
2041
|
// src/components/ui/deleted-variable-alert.tsx
|
|
2042
2042
|
import * as React23 from "react";
|
|
2043
|
-
import {
|
|
2044
|
-
import { Alert as Alert2, AlertAction, AlertTitle, ClickAwayListener as ClickAwayListener2 } from "@elementor/ui";
|
|
2043
|
+
import { Alert as Alert2, AlertAction, AlertTitle, ClickAwayListener as ClickAwayListener2, Typography as Typography11 } from "@elementor/ui";
|
|
2045
2044
|
import { __ as __16 } from "@wordpress/i18n";
|
|
2046
2045
|
var DeletedVariableAlert = ({ onClose, onUnlink, onRestore, label }) => {
|
|
2047
|
-
const sectionWidth = useSectionWidth();
|
|
2048
2046
|
return /* @__PURE__ */ React23.createElement(ClickAwayListener2, { onClickAway: onClose }, /* @__PURE__ */ React23.createElement(
|
|
2049
2047
|
Alert2,
|
|
2050
2048
|
{
|
|
@@ -2052,25 +2050,20 @@ var DeletedVariableAlert = ({ onClose, onUnlink, onRestore, label }) => {
|
|
|
2052
2050
|
severity: "warning",
|
|
2053
2051
|
onClose,
|
|
2054
2052
|
action: /* @__PURE__ */ React23.createElement(React23.Fragment, null, onUnlink && /* @__PURE__ */ React23.createElement(AlertAction, { variant: "contained", onClick: onUnlink }, __16("Unlink", "elementor")), onRestore && /* @__PURE__ */ React23.createElement(AlertAction, { variant: "outlined", onClick: onRestore }, __16("Restore", "elementor"))),
|
|
2055
|
-
sx: {
|
|
2053
|
+
sx: { maxWidth: 300 }
|
|
2056
2054
|
},
|
|
2057
2055
|
/* @__PURE__ */ React23.createElement(AlertTitle, null, __16("Deleted variable", "elementor")),
|
|
2058
|
-
__16("The variable", "elementor"),
|
|
2059
|
-
" '",
|
|
2060
|
-
label,
|
|
2061
|
-
"'",
|
|
2062
|
-
" ",
|
|
2063
|
-
__16(
|
|
2056
|
+
/* @__PURE__ */ React23.createElement(Typography11, { variant: "body2", color: "textPrimary" }, __16("The variable", "elementor"), "\xA0'", /* @__PURE__ */ React23.createElement(Typography11, { variant: "body2", component: "span", sx: { lineBreak: "anywhere" } }, label), "'\xA0", __16(
|
|
2064
2057
|
"has been deleted, but it is still referenced in this location. You may restore the variable or unlink it to assign a different value.",
|
|
2065
2058
|
"elementor"
|
|
2066
|
-
)
|
|
2059
|
+
))
|
|
2067
2060
|
));
|
|
2068
2061
|
};
|
|
2069
2062
|
|
|
2070
2063
|
// src/components/ui/tags/deleted-tag.tsx
|
|
2071
2064
|
import * as React24 from "react";
|
|
2072
2065
|
import { AlertTriangleFilledIcon as AlertTriangleFilledIcon2 } from "@elementor/icons";
|
|
2073
|
-
import { Box as Box6, Chip, Tooltip as Tooltip2, Typography as
|
|
2066
|
+
import { Box as Box6, Chip, Tooltip as Tooltip2, Typography as Typography12 } from "@elementor/ui";
|
|
2074
2067
|
import { __ as __17 } from "@wordpress/i18n";
|
|
2075
2068
|
var DeletedTag = React24.forwardRef(({ label, onClick, ...props }, ref) => {
|
|
2076
2069
|
return /* @__PURE__ */ React24.createElement(
|
|
@@ -2083,7 +2076,7 @@ var DeletedTag = React24.forwardRef(({ label, onClick, ...props }, ref) => {
|
|
|
2083
2076
|
variant: "standard",
|
|
2084
2077
|
onClick,
|
|
2085
2078
|
icon: /* @__PURE__ */ React24.createElement(AlertTriangleFilledIcon2, null),
|
|
2086
|
-
label: /* @__PURE__ */ React24.createElement(Tooltip2, { title: label, placement: "top" }, /* @__PURE__ */ React24.createElement(Box6, { sx: { display: "flex", gap: 0.5, alignItems: "center" } }, /* @__PURE__ */ React24.createElement(
|
|
2079
|
+
label: /* @__PURE__ */ React24.createElement(Tooltip2, { title: label, placement: "top" }, /* @__PURE__ */ React24.createElement(Box6, { sx: { display: "flex", gap: 0.5, alignItems: "center" } }, /* @__PURE__ */ React24.createElement(Typography12, { variant: "caption", noWrap: true }, label), /* @__PURE__ */ React24.createElement(Typography12, { variant: "caption", noWrap: true, sx: { textOverflow: "initial", overflow: "visible" } }, "(", __17("deleted", "elementor"), ")"))),
|
|
2087
2080
|
sx: {
|
|
2088
2081
|
height: (theme) => theme.spacing(3.5),
|
|
2089
2082
|
borderRadius: (theme) => theme.spacing(1),
|
|
@@ -2190,8 +2183,7 @@ import { Backdrop as Backdrop2, bindPopover as bindPopover3, Box as Box9, Infoti
|
|
|
2190
2183
|
|
|
2191
2184
|
// src/components/ui/mismatch-variable-alert.tsx
|
|
2192
2185
|
import * as React26 from "react";
|
|
2193
|
-
import {
|
|
2194
|
-
import { Alert as Alert3, AlertAction as AlertAction2, AlertTitle as AlertTitle2, ClickAwayListener as ClickAwayListener3 } from "@elementor/ui";
|
|
2186
|
+
import { Alert as Alert3, AlertAction as AlertAction2, AlertTitle as AlertTitle2, ClickAwayListener as ClickAwayListener3, Typography as Typography13 } from "@elementor/ui";
|
|
2195
2187
|
import { __ as __18 } from "@wordpress/i18n";
|
|
2196
2188
|
var i18n = {
|
|
2197
2189
|
title: __18("Variable has changed", "elementor"),
|
|
@@ -2205,7 +2197,6 @@ var i18n = {
|
|
|
2205
2197
|
}
|
|
2206
2198
|
};
|
|
2207
2199
|
var MismatchVariableAlert = ({ onClose, onClear, triggerSelect }) => {
|
|
2208
|
-
const sectionWidth = useSectionWidth2();
|
|
2209
2200
|
return /* @__PURE__ */ React26.createElement(ClickAwayListener3, { onClickAway: onClose }, /* @__PURE__ */ React26.createElement(
|
|
2210
2201
|
Alert3,
|
|
2211
2202
|
{
|
|
@@ -2213,20 +2204,17 @@ var MismatchVariableAlert = ({ onClose, onClear, triggerSelect }) => {
|
|
|
2213
2204
|
severity: "warning",
|
|
2214
2205
|
onClose,
|
|
2215
2206
|
action: /* @__PURE__ */ React26.createElement(React26.Fragment, null, onClear && /* @__PURE__ */ React26.createElement(AlertAction2, { variant: "contained", onClick: onClear }, i18n.buttons.clear), triggerSelect && /* @__PURE__ */ React26.createElement(AlertAction2, { variant: "outlined", onClick: triggerSelect }, i18n.buttons.select)),
|
|
2216
|
-
sx: {
|
|
2217
|
-
width: sectionWidth,
|
|
2218
|
-
minWidth: 300
|
|
2219
|
-
}
|
|
2207
|
+
sx: { maxWidth: 300 }
|
|
2220
2208
|
},
|
|
2221
2209
|
/* @__PURE__ */ React26.createElement(AlertTitle2, null, i18n.title),
|
|
2222
|
-
i18n.message
|
|
2210
|
+
/* @__PURE__ */ React26.createElement(Typography13, { variant: "body2", color: "textPrimary" }, i18n.message)
|
|
2223
2211
|
));
|
|
2224
2212
|
};
|
|
2225
2213
|
|
|
2226
2214
|
// src/components/ui/tags/mismatch-tag.tsx
|
|
2227
2215
|
import * as React27 from "react";
|
|
2228
2216
|
import { AlertTriangleFilledIcon as AlertTriangleFilledIcon3 } from "@elementor/icons";
|
|
2229
|
-
import { Box as Box8, Chip as Chip2, Tooltip as Tooltip3, Typography as
|
|
2217
|
+
import { Box as Box8, Chip as Chip2, Tooltip as Tooltip3, Typography as Typography14 } from "@elementor/ui";
|
|
2230
2218
|
import { __ as __19 } from "@wordpress/i18n";
|
|
2231
2219
|
var MismatchTag = React27.forwardRef(({ label, onClick, ...props }, ref) => {
|
|
2232
2220
|
return /* @__PURE__ */ React27.createElement(
|
|
@@ -2239,7 +2227,7 @@ var MismatchTag = React27.forwardRef(({ label, onClick, ...props }, ref) => {
|
|
|
2239
2227
|
variant: "standard",
|
|
2240
2228
|
onClick,
|
|
2241
2229
|
icon: /* @__PURE__ */ React27.createElement(AlertTriangleFilledIcon3, null),
|
|
2242
|
-
label: /* @__PURE__ */ React27.createElement(Tooltip3, { title: label, placement: "top" }, /* @__PURE__ */ React27.createElement(Box8, { sx: { display: "flex", gap: 0.5, alignItems: "center" } }, /* @__PURE__ */ React27.createElement(
|
|
2230
|
+
label: /* @__PURE__ */ React27.createElement(Tooltip3, { title: label, placement: "top" }, /* @__PURE__ */ React27.createElement(Box8, { sx: { display: "flex", gap: 0.5, alignItems: "center" } }, /* @__PURE__ */ React27.createElement(Typography14, { variant: "caption", noWrap: true }, label), /* @__PURE__ */ React27.createElement(Typography14, { variant: "caption", noWrap: true, sx: { textOverflow: "initial", overflow: "visible" } }, "(", __19("changed", "elementor"), ")"))),
|
|
2243
2231
|
sx: {
|
|
2244
2232
|
height: (theme) => theme.spacing(3.5),
|
|
2245
2233
|
borderRadius: (theme) => theme.spacing(1),
|
|
@@ -2332,11 +2320,9 @@ import { __ as __21 } from "@wordpress/i18n";
|
|
|
2332
2320
|
|
|
2333
2321
|
// src/components/ui/missing-variable-alert.tsx
|
|
2334
2322
|
import * as React29 from "react";
|
|
2335
|
-
import {
|
|
2336
|
-
import { Alert as Alert4, AlertAction as AlertAction3, AlertTitle as AlertTitle3, ClickAwayListener as ClickAwayListener4 } from "@elementor/ui";
|
|
2323
|
+
import { Alert as Alert4, AlertAction as AlertAction3, AlertTitle as AlertTitle3, ClickAwayListener as ClickAwayListener4, Typography as Typography15 } from "@elementor/ui";
|
|
2337
2324
|
import { __ as __20 } from "@wordpress/i18n";
|
|
2338
2325
|
var MissingVariableAlert = ({ onClose, onClear }) => {
|
|
2339
|
-
const sectionWidth = useSectionWidth3();
|
|
2340
2326
|
return /* @__PURE__ */ React29.createElement(ClickAwayListener4, { onClickAway: onClose }, /* @__PURE__ */ React29.createElement(
|
|
2341
2327
|
Alert4,
|
|
2342
2328
|
{
|
|
@@ -2344,13 +2330,13 @@ var MissingVariableAlert = ({ onClose, onClear }) => {
|
|
|
2344
2330
|
severity: "warning",
|
|
2345
2331
|
onClose,
|
|
2346
2332
|
action: /* @__PURE__ */ React29.createElement(React29.Fragment, null, onClear && /* @__PURE__ */ React29.createElement(AlertAction3, { variant: "contained", onClick: onClear }, __20("Clear", "elementor"))),
|
|
2347
|
-
sx: {
|
|
2333
|
+
sx: { maxWidth: 300 }
|
|
2348
2334
|
},
|
|
2349
2335
|
/* @__PURE__ */ React29.createElement(AlertTitle3, null, __20("This variable is missing", "elementor")),
|
|
2350
|
-
__20(
|
|
2336
|
+
/* @__PURE__ */ React29.createElement(Typography15, { variant: "body2", color: "textPrimary" }, __20(
|
|
2351
2337
|
"It may have been deleted. Try clearing this field and select a different value or variable.",
|
|
2352
2338
|
"elementor"
|
|
2353
|
-
)
|
|
2339
|
+
))
|
|
2354
2340
|
));
|
|
2355
2341
|
};
|
|
2356
2342
|
|
|
@@ -2524,7 +2510,7 @@ var ColorField = ({ value, onChange, onValidationChange }) => {
|
|
|
2524
2510
|
import * as React35 from "react";
|
|
2525
2511
|
import { useId as useId4, useRef as useRef5, useState as useState16 } from "react";
|
|
2526
2512
|
import { enqueueFont as enqueueFont2, ItemSelector } from "@elementor/editor-controls";
|
|
2527
|
-
import { useFontFamilies, useSectionWidth
|
|
2513
|
+
import { useFontFamilies, useSectionWidth } from "@elementor/editor-editing-panel";
|
|
2528
2514
|
import { ChevronDownIcon, TextIcon } from "@elementor/icons";
|
|
2529
2515
|
import { bindPopover as bindPopover4, bindTrigger as bindTrigger3, Popover as Popover4, UnstableTag, usePopupState as usePopupState5 } from "@elementor/ui";
|
|
2530
2516
|
import { __ as __23 } from "@wordpress/i18n";
|
|
@@ -2534,7 +2520,7 @@ var FontField = ({ value, onChange, onValidationChange }) => {
|
|
|
2534
2520
|
const anchorRef = usePopoverContentRef() ?? defaultRef.current;
|
|
2535
2521
|
const fontPopoverState = usePopupState5({ variant: "popover" });
|
|
2536
2522
|
const fontFamilies = useFontFamilies();
|
|
2537
|
-
const sectionWidth =
|
|
2523
|
+
const sectionWidth = useSectionWidth();
|
|
2538
2524
|
const mapFontSubs = React35.useMemo(() => {
|
|
2539
2525
|
return fontFamilies.map(({ label, fonts }) => ({
|
|
2540
2526
|
label,
|