@elementor/editor-controls 3.33.0-248 → 3.33.0-250
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.d.mts +1 -4
- package/dist/index.d.ts +1 -4
- package/dist/index.js +715 -729
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +487 -505
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/control-repeater/index.ts +0 -1
- package/src/components/control-repeater/items/edit-item-popover.tsx +4 -13
- package/src/components/control-repeater/items/item.tsx +25 -33
- package/src/components/control-repeater/items/items-container.tsx +1 -1
- package/src/components/{control-repeater/header/header.tsx → repeater/repeater-header.tsx} +3 -2
- package/src/components/repeater/repeater-popover.tsx +19 -0
- package/src/components/repeater/repeater-tag.tsx +16 -0
- package/src/components/{repeater.tsx → repeater/repeater.tsx} +16 -50
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +4 -3
- package/src/controls/box-shadow-repeater-control.tsx +4 -3
- package/src/controls/filter-control/filter-repeater-control.tsx +4 -3
- package/src/controls/repeatable-control.tsx +5 -5
- package/src/controls/transform-control/transform-repeater-control.tsx +4 -3
- package/src/index.ts +6 -1
- /package/src/components/{sortable.tsx → repeater/sortable.tsx} +0 -0
package/dist/index.js
CHANGED
|
@@ -1259,10 +1259,10 @@ var StrokeControl = createControl(() => {
|
|
|
1259
1259
|
var Control = (0, import_react14.forwardRef)(({ bind, label, children }, ref) => /* @__PURE__ */ React21.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React21.createElement(import_ui16.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React21.createElement(import_ui16.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React21.createElement(import_ui16.Grid, { item: true, xs: 6 }, children))));
|
|
1260
1260
|
|
|
1261
1261
|
// src/controls/box-shadow-repeater-control.tsx
|
|
1262
|
-
var
|
|
1263
|
-
var
|
|
1262
|
+
var React39 = __toESM(require("react"));
|
|
1263
|
+
var import_react21 = require("react");
|
|
1264
1264
|
var import_editor_props10 = require("@elementor/editor-props");
|
|
1265
|
-
var
|
|
1265
|
+
var import_ui30 = require("@elementor/ui");
|
|
1266
1266
|
var import_i18n11 = require("@wordpress/i18n");
|
|
1267
1267
|
|
|
1268
1268
|
// src/components/control-repeater/actions/tooltip-add-item-action.tsx
|
|
@@ -1436,70 +1436,20 @@ var ConditionalToolTip = ({
|
|
|
1436
1436
|
content
|
|
1437
1437
|
}) => enable && content ? /* @__PURE__ */ React23.createElement(import_ui18.Infotip, { placement: "right", color: "secondary", content }, children) : children;
|
|
1438
1438
|
|
|
1439
|
-
// src/components/control-repeater/
|
|
1440
|
-
var React26 = __toESM(require("react"));
|
|
1441
|
-
var import_ui19 = require("@elementor/ui");
|
|
1442
|
-
|
|
1443
|
-
// src/control-adornments/control-adornments.tsx
|
|
1439
|
+
// src/components/control-repeater/items/items-container.tsx
|
|
1444
1440
|
var React25 = __toESM(require("react"));
|
|
1445
1441
|
|
|
1446
|
-
// src/
|
|
1442
|
+
// src/components/repeater/sortable.tsx
|
|
1447
1443
|
var React24 = __toESM(require("react"));
|
|
1448
|
-
var import_react17 = require("react");
|
|
1449
|
-
var Context2 = (0, import_react17.createContext)(null);
|
|
1450
|
-
var ControlAdornmentsProvider = ({ children, items: items2 }) => /* @__PURE__ */ React24.createElement(Context2.Provider, { value: { items: items2 } }, children);
|
|
1451
|
-
var useControlAdornments = () => {
|
|
1452
|
-
const context = (0, import_react17.useContext)(Context2);
|
|
1453
|
-
return context?.items ?? [];
|
|
1454
|
-
};
|
|
1455
|
-
|
|
1456
|
-
// src/control-adornments/control-adornments.tsx
|
|
1457
|
-
function ControlAdornments({
|
|
1458
|
-
customContext
|
|
1459
|
-
}) {
|
|
1460
|
-
const items2 = useControlAdornments();
|
|
1461
|
-
if (items2?.length === 0) {
|
|
1462
|
-
return null;
|
|
1463
|
-
}
|
|
1464
|
-
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, items2.map(({ Adornment, id }) => /* @__PURE__ */ React25.createElement(Adornment, { key: id, customContext })));
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
// src/components/control-repeater/header/header.tsx
|
|
1468
|
-
var Header = React26.forwardRef(
|
|
1469
|
-
({
|
|
1470
|
-
label,
|
|
1471
|
-
children,
|
|
1472
|
-
adornment: Adornment = ControlAdornments
|
|
1473
|
-
}, ref) => {
|
|
1474
|
-
return /* @__PURE__ */ React26.createElement(
|
|
1475
|
-
import_ui19.Stack,
|
|
1476
|
-
{
|
|
1477
|
-
direction: "row",
|
|
1478
|
-
alignItems: "center",
|
|
1479
|
-
gap: 1,
|
|
1480
|
-
sx: { marginInlineEnd: -0.75, py: 0.25 },
|
|
1481
|
-
ref
|
|
1482
|
-
},
|
|
1483
|
-
/* @__PURE__ */ React26.createElement(import_ui19.Box, { display: "flex", alignItems: "center", gap: 1, sx: { flexGrow: 1 } }, /* @__PURE__ */ React26.createElement(import_ui19.Typography, { component: "label", variant: "caption", color: "text.secondary", sx: { lineHeight: 1 } }, label), /* @__PURE__ */ React26.createElement(Adornment, null)),
|
|
1484
|
-
children
|
|
1485
|
-
);
|
|
1486
|
-
}
|
|
1487
|
-
);
|
|
1488
|
-
|
|
1489
|
-
// src/components/control-repeater/items/items-container.tsx
|
|
1490
|
-
var React28 = __toESM(require("react"));
|
|
1491
|
-
|
|
1492
|
-
// src/components/sortable.tsx
|
|
1493
|
-
var React27 = __toESM(require("react"));
|
|
1494
1444
|
var import_icons5 = require("@elementor/icons");
|
|
1495
|
-
var
|
|
1445
|
+
var import_ui19 = require("@elementor/ui");
|
|
1496
1446
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1497
1447
|
var SortableProvider = (props) => {
|
|
1498
|
-
return /* @__PURE__ */
|
|
1448
|
+
return /* @__PURE__ */ React24.createElement(import_ui19.List, { sx: { p: 0, my: -0.5, mx: 0 } }, /* @__PURE__ */ React24.createElement(import_ui19.UnstableSortableProvider, { restrictAxis: true, disableDragOverlay: false, variant: "static", ...props }));
|
|
1499
1449
|
};
|
|
1500
1450
|
var SortableItem = ({ id, children, disabled }) => {
|
|
1501
|
-
return /* @__PURE__ */
|
|
1502
|
-
|
|
1451
|
+
return /* @__PURE__ */ React24.createElement(
|
|
1452
|
+
import_ui19.UnstableSortableItem,
|
|
1503
1453
|
{
|
|
1504
1454
|
id,
|
|
1505
1455
|
disabled,
|
|
@@ -1511,12 +1461,12 @@ var SortableItem = ({ id, children, disabled }) => {
|
|
|
1511
1461
|
showDropIndication,
|
|
1512
1462
|
dropIndicationStyle
|
|
1513
1463
|
}) => {
|
|
1514
|
-
return /* @__PURE__ */
|
|
1464
|
+
return /* @__PURE__ */ React24.createElement(StyledListItem, { ...itemProps, style: itemStyle, tabIndex: -1 }, !disabled && /* @__PURE__ */ React24.createElement(SortableTrigger, { ...triggerProps, style: triggerStyle }), children, showDropIndication && /* @__PURE__ */ React24.createElement(StyledDivider, { style: dropIndicationStyle }));
|
|
1515
1465
|
}
|
|
1516
1466
|
}
|
|
1517
1467
|
);
|
|
1518
1468
|
};
|
|
1519
|
-
var StyledListItem = (0,
|
|
1469
|
+
var StyledListItem = (0, import_ui19.styled)(import_ui19.ListItem)`
|
|
1520
1470
|
position: relative;
|
|
1521
1471
|
margin-inline: 0px;
|
|
1522
1472
|
padding-inline: 0px;
|
|
@@ -1546,7 +1496,7 @@ var StyledListItem = (0, import_ui20.styled)(import_ui20.ListItem)`
|
|
|
1546
1496
|
}
|
|
1547
1497
|
}
|
|
1548
1498
|
`;
|
|
1549
|
-
var SortableTrigger = (props) => /* @__PURE__ */
|
|
1499
|
+
var SortableTrigger = (props) => /* @__PURE__ */ React24.createElement(
|
|
1550
1500
|
"div",
|
|
1551
1501
|
{
|
|
1552
1502
|
...props,
|
|
@@ -1555,9 +1505,9 @@ var SortableTrigger = (props) => /* @__PURE__ */ React27.createElement(
|
|
|
1555
1505
|
tabIndex: 0,
|
|
1556
1506
|
"aria-label": (0, import_i18n6.__)("Drag item", "elementor")
|
|
1557
1507
|
},
|
|
1558
|
-
/* @__PURE__ */
|
|
1508
|
+
/* @__PURE__ */ React24.createElement(import_icons5.GripVerticalIcon, { fontSize: "tiny" })
|
|
1559
1509
|
);
|
|
1560
|
-
var StyledDivider = (0,
|
|
1510
|
+
var StyledDivider = (0, import_ui19.styled)(import_ui19.Divider)`
|
|
1561
1511
|
height: 0px;
|
|
1562
1512
|
border: none;
|
|
1563
1513
|
overflow: visible;
|
|
@@ -1592,17 +1542,35 @@ var ItemsContainer = ({
|
|
|
1592
1542
|
})
|
|
1593
1543
|
);
|
|
1594
1544
|
};
|
|
1595
|
-
return /* @__PURE__ */
|
|
1545
|
+
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(SortableProvider, { value: keys, onChange: onChangeOrder }, keys.map((key, index) => {
|
|
1596
1546
|
const value = items2[index].item;
|
|
1597
|
-
return /* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ React25.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React25.createElement(ItemContext.Provider, { value: { index, value } }, children));
|
|
1598
1548
|
})));
|
|
1599
1549
|
};
|
|
1600
1550
|
|
|
1601
1551
|
// src/components/control-repeater/items/item.tsx
|
|
1602
|
-
var
|
|
1552
|
+
var React27 = __toESM(require("react"));
|
|
1603
1553
|
var import_ui21 = require("@elementor/ui");
|
|
1604
1554
|
var import_i18n7 = require("@wordpress/i18n");
|
|
1605
1555
|
|
|
1556
|
+
// src/components/repeater/repeater-tag.tsx
|
|
1557
|
+
var React26 = __toESM(require("react"));
|
|
1558
|
+
var import_react17 = require("react");
|
|
1559
|
+
var import_ui20 = require("@elementor/ui");
|
|
1560
|
+
var RepeaterTag = (0, import_react17.forwardRef)((props, ref) => {
|
|
1561
|
+
return /* @__PURE__ */ React26.createElement(
|
|
1562
|
+
import_ui20.UnstableTag,
|
|
1563
|
+
{
|
|
1564
|
+
ref,
|
|
1565
|
+
fullWidth: true,
|
|
1566
|
+
showActionsOnHover: true,
|
|
1567
|
+
variant: "outlined",
|
|
1568
|
+
sx: { minHeight: (theme) => theme.spacing(3.5) },
|
|
1569
|
+
...props
|
|
1570
|
+
}
|
|
1571
|
+
);
|
|
1572
|
+
});
|
|
1573
|
+
|
|
1606
1574
|
// src/components/control-repeater/locations.ts
|
|
1607
1575
|
var import_locations = require("@elementor/locations");
|
|
1608
1576
|
var { Slot: RepeaterItemIconSlot, inject: injectIntoRepeaterItemIcon } = (0, import_locations.createReplaceableLocation)();
|
|
@@ -1611,9 +1579,8 @@ var { Slot: RepeaterItemActionsSlot, inject: injectIntoRepeaterItemActions } = (
|
|
|
1611
1579
|
|
|
1612
1580
|
// src/components/control-repeater/items/item.tsx
|
|
1613
1581
|
var Item = ({ Label: Label3, Icon, actions }) => {
|
|
1614
|
-
const {
|
|
1582
|
+
const { popoverState, setRowRef, openItemIndex, setOpenItemIndex, index = -1, value } = useRepeaterContext();
|
|
1615
1583
|
const triggerProps = (0, import_ui21.bindTrigger)(popoverState);
|
|
1616
|
-
const key = items2[index].key ?? -1;
|
|
1617
1584
|
const onClick = (ev) => {
|
|
1618
1585
|
triggerProps.onClick(ev);
|
|
1619
1586
|
setOpenItemIndex(index);
|
|
@@ -1625,38 +1592,32 @@ var Item = ({ Label: Label3, Icon, actions }) => {
|
|
|
1625
1592
|
setRowRef(ref);
|
|
1626
1593
|
popoverState.setAnchorEl(ref);
|
|
1627
1594
|
};
|
|
1628
|
-
return /* @__PURE__ */
|
|
1629
|
-
|
|
1595
|
+
return /* @__PURE__ */ React27.createElement(
|
|
1596
|
+
RepeaterTag,
|
|
1630
1597
|
{
|
|
1631
|
-
key,
|
|
1632
|
-
disabled: false,
|
|
1633
|
-
label: /* @__PURE__ */ React29.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React29.createElement(Label3, { value })),
|
|
1634
|
-
showActionsOnHover: true,
|
|
1635
|
-
fullWidth: true,
|
|
1636
1598
|
ref: setRef,
|
|
1637
|
-
|
|
1599
|
+
label: /* @__PURE__ */ React27.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React27.createElement(Label3, { value })),
|
|
1638
1600
|
"aria-label": (0, import_i18n7.__)("Open item", "elementor"),
|
|
1639
|
-
sx: { minHeight: (theme) => theme.spacing(3.5) },
|
|
1640
1601
|
...triggerProps,
|
|
1641
1602
|
onClick,
|
|
1642
|
-
startIcon: /* @__PURE__ */
|
|
1643
|
-
actions: /* @__PURE__ */
|
|
1603
|
+
startIcon: /* @__PURE__ */ React27.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React27.createElement(Icon, { value })),
|
|
1604
|
+
actions: /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement(RepeaterItemActionsSlot, { index: index ?? -1 }), actions)
|
|
1644
1605
|
}
|
|
1645
|
-
)
|
|
1606
|
+
);
|
|
1646
1607
|
};
|
|
1647
1608
|
|
|
1648
1609
|
// src/components/control-repeater/control-repeater.tsx
|
|
1649
|
-
var
|
|
1610
|
+
var React28 = __toESM(require("react"));
|
|
1650
1611
|
var ControlRepeater = ({
|
|
1651
1612
|
children,
|
|
1652
1613
|
initial,
|
|
1653
1614
|
propTypeUtil
|
|
1654
1615
|
}) => {
|
|
1655
|
-
return /* @__PURE__ */
|
|
1616
|
+
return /* @__PURE__ */ React28.createElement(SectionContent, null, /* @__PURE__ */ React28.createElement(RepeaterContextProvider, { initial, propTypeUtil }, children));
|
|
1656
1617
|
};
|
|
1657
1618
|
|
|
1658
1619
|
// src/components/control-repeater/actions/disable-item-action.tsx
|
|
1659
|
-
var
|
|
1620
|
+
var React29 = __toESM(require("react"));
|
|
1660
1621
|
var import_icons6 = require("@elementor/icons");
|
|
1661
1622
|
var import_ui22 = require("@elementor/ui");
|
|
1662
1623
|
var import_i18n8 = require("@wordpress/i18n");
|
|
@@ -1676,11 +1637,11 @@ var DisableItemAction = () => {
|
|
|
1676
1637
|
}
|
|
1677
1638
|
updateItem(self, index);
|
|
1678
1639
|
};
|
|
1679
|
-
return /* @__PURE__ */
|
|
1640
|
+
return /* @__PURE__ */ React29.createElement(import_ui22.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React29.createElement(import_ui22.IconButton, { size: SIZE3, onClick, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React29.createElement(import_icons6.EyeOffIcon, { fontSize: SIZE3 }) : /* @__PURE__ */ React29.createElement(import_icons6.EyeIcon, { fontSize: SIZE3 })));
|
|
1680
1641
|
};
|
|
1681
1642
|
|
|
1682
1643
|
// src/components/control-repeater/actions/duplicate-item-action.tsx
|
|
1683
|
-
var
|
|
1644
|
+
var React30 = __toESM(require("react"));
|
|
1684
1645
|
var import_icons7 = require("@elementor/icons");
|
|
1685
1646
|
var import_ui23 = require("@elementor/ui");
|
|
1686
1647
|
var import_i18n9 = require("@wordpress/i18n");
|
|
@@ -1695,11 +1656,11 @@ var DuplicateItemAction = () => {
|
|
|
1695
1656
|
const newItem = structuredClone(items2[index]?.item);
|
|
1696
1657
|
addItem(ev, { item: newItem, index: index + 1 });
|
|
1697
1658
|
};
|
|
1698
|
-
return /* @__PURE__ */
|
|
1659
|
+
return /* @__PURE__ */ React30.createElement(import_ui23.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React30.createElement(import_ui23.IconButton, { size: SIZE4, onClick, "aria-label": duplicateLabel }, /* @__PURE__ */ React30.createElement(import_icons7.CopyIcon, { fontSize: SIZE4 })));
|
|
1699
1660
|
};
|
|
1700
1661
|
|
|
1701
1662
|
// src/components/control-repeater/actions/remove-item-action.tsx
|
|
1702
|
-
var
|
|
1663
|
+
var React31 = __toESM(require("react"));
|
|
1703
1664
|
var import_icons8 = require("@elementor/icons");
|
|
1704
1665
|
var import_ui24 = require("@elementor/ui");
|
|
1705
1666
|
var import_i18n10 = require("@wordpress/i18n");
|
|
@@ -1711,12 +1672,34 @@ var RemoveItemAction = () => {
|
|
|
1711
1672
|
}
|
|
1712
1673
|
const removeLabel = (0, import_i18n10.__)("Remove", "elementor");
|
|
1713
1674
|
const onClick = () => removeItem(index);
|
|
1714
|
-
return /* @__PURE__ */
|
|
1675
|
+
return /* @__PURE__ */ React31.createElement(import_ui24.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React31.createElement(import_ui24.IconButton, { size: SIZE5, onClick, "aria-label": removeLabel }, /* @__PURE__ */ React31.createElement(import_icons8.XIcon, { fontSize: SIZE5 })));
|
|
1715
1676
|
};
|
|
1716
1677
|
|
|
1717
1678
|
// src/components/control-repeater/items/edit-item-popover.tsx
|
|
1718
|
-
var
|
|
1679
|
+
var React33 = __toESM(require("react"));
|
|
1680
|
+
var import_ui26 = require("@elementor/ui");
|
|
1681
|
+
|
|
1682
|
+
// src/components/repeater/repeater-popover.tsx
|
|
1683
|
+
var React32 = __toESM(require("react"));
|
|
1719
1684
|
var import_ui25 = require("@elementor/ui");
|
|
1685
|
+
var RepeaterPopover = ({ children, width, ...props }) => {
|
|
1686
|
+
return /* @__PURE__ */ React32.createElement(
|
|
1687
|
+
import_ui25.Popover,
|
|
1688
|
+
{
|
|
1689
|
+
disablePortal: true,
|
|
1690
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
1691
|
+
slotProps: {
|
|
1692
|
+
paper: {
|
|
1693
|
+
sx: { mt: 0.5, width }
|
|
1694
|
+
}
|
|
1695
|
+
},
|
|
1696
|
+
...props
|
|
1697
|
+
},
|
|
1698
|
+
children
|
|
1699
|
+
);
|
|
1700
|
+
};
|
|
1701
|
+
|
|
1702
|
+
// src/components/control-repeater/items/edit-item-popover.tsx
|
|
1720
1703
|
var EditItemPopover = ({ children }) => {
|
|
1721
1704
|
const { popoverState, openItemIndex, isOpen, rowRef, setOpenItemIndex, setRowRef } = useRepeaterContext();
|
|
1722
1705
|
if (!isOpen || !rowRef) {
|
|
@@ -1727,59 +1710,96 @@ var EditItemPopover = ({ children }) => {
|
|
|
1727
1710
|
popoverState.setAnchorEl(null);
|
|
1728
1711
|
setOpenItemIndex(EMPTY_OPEN_ITEM);
|
|
1729
1712
|
};
|
|
1730
|
-
return /* @__PURE__ */
|
|
1731
|
-
import_ui25.Popover,
|
|
1732
|
-
{
|
|
1733
|
-
disablePortal: true,
|
|
1734
|
-
slotProps: {
|
|
1735
|
-
paper: {
|
|
1736
|
-
sx: { mt: 0.5, width: rowRef.offsetWidth }
|
|
1737
|
-
}
|
|
1738
|
-
},
|
|
1739
|
-
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
1740
|
-
...(0, import_ui25.bindPopover)(popoverState),
|
|
1741
|
-
onClose
|
|
1742
|
-
},
|
|
1743
|
-
/* @__PURE__ */ React34.createElement(PropKeyProvider, { bind: String(openItemIndex) }, /* @__PURE__ */ React34.createElement(import_ui25.Box, null, children))
|
|
1744
|
-
);
|
|
1713
|
+
return /* @__PURE__ */ React33.createElement(RepeaterPopover, { width: rowRef.offsetWidth, ...(0, import_ui26.bindPopover)(popoverState), onClose }, /* @__PURE__ */ React33.createElement(PropKeyProvider, { bind: String(openItemIndex) }, /* @__PURE__ */ React33.createElement(import_ui26.Box, null, children)));
|
|
1745
1714
|
};
|
|
1746
1715
|
|
|
1747
1716
|
// src/components/popover-content.tsx
|
|
1748
|
-
var
|
|
1749
|
-
var
|
|
1750
|
-
var PopoverContent = ({ gap = 1.5, children, ...props }) => /* @__PURE__ */
|
|
1717
|
+
var React34 = __toESM(require("react"));
|
|
1718
|
+
var import_ui27 = require("@elementor/ui");
|
|
1719
|
+
var PopoverContent = ({ gap = 1.5, children, ...props }) => /* @__PURE__ */ React34.createElement(import_ui27.Stack, { ...props, gap }, children);
|
|
1751
1720
|
|
|
1752
1721
|
// src/components/popover-grid-container.tsx
|
|
1753
1722
|
var import_react18 = require("react");
|
|
1754
|
-
var
|
|
1755
|
-
var
|
|
1723
|
+
var React35 = __toESM(require("react"));
|
|
1724
|
+
var import_ui28 = require("@elementor/ui");
|
|
1756
1725
|
var PopoverGridContainer = (0, import_react18.forwardRef)(
|
|
1757
|
-
({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */
|
|
1726
|
+
({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */ React35.createElement(import_ui28.Grid, { container: true, gap, alignItems, flexWrap, ref }, children)
|
|
1727
|
+
);
|
|
1728
|
+
|
|
1729
|
+
// src/components/repeater/repeater-header.tsx
|
|
1730
|
+
var React38 = __toESM(require("react"));
|
|
1731
|
+
var import_react20 = require("react");
|
|
1732
|
+
var import_ui29 = require("@elementor/ui");
|
|
1733
|
+
|
|
1734
|
+
// src/control-adornments/control-adornments.tsx
|
|
1735
|
+
var React37 = __toESM(require("react"));
|
|
1736
|
+
|
|
1737
|
+
// src/control-adornments/control-adornments-context.tsx
|
|
1738
|
+
var React36 = __toESM(require("react"));
|
|
1739
|
+
var import_react19 = require("react");
|
|
1740
|
+
var Context2 = (0, import_react19.createContext)(null);
|
|
1741
|
+
var ControlAdornmentsProvider = ({ children, items: items2 }) => /* @__PURE__ */ React36.createElement(Context2.Provider, { value: { items: items2 } }, children);
|
|
1742
|
+
var useControlAdornments = () => {
|
|
1743
|
+
const context = (0, import_react19.useContext)(Context2);
|
|
1744
|
+
return context?.items ?? [];
|
|
1745
|
+
};
|
|
1746
|
+
|
|
1747
|
+
// src/control-adornments/control-adornments.tsx
|
|
1748
|
+
function ControlAdornments({
|
|
1749
|
+
customContext
|
|
1750
|
+
}) {
|
|
1751
|
+
const items2 = useControlAdornments();
|
|
1752
|
+
if (items2?.length === 0) {
|
|
1753
|
+
return null;
|
|
1754
|
+
}
|
|
1755
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, items2.map(({ Adornment, id }) => /* @__PURE__ */ React37.createElement(Adornment, { key: id, customContext })));
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
// src/components/repeater/repeater-header.tsx
|
|
1759
|
+
var RepeaterHeader = (0, import_react20.forwardRef)(
|
|
1760
|
+
({
|
|
1761
|
+
label,
|
|
1762
|
+
children,
|
|
1763
|
+
adornment: Adornment = ControlAdornments
|
|
1764
|
+
}, ref) => {
|
|
1765
|
+
return /* @__PURE__ */ React38.createElement(
|
|
1766
|
+
import_ui29.Stack,
|
|
1767
|
+
{
|
|
1768
|
+
direction: "row",
|
|
1769
|
+
alignItems: "center",
|
|
1770
|
+
gap: 1,
|
|
1771
|
+
sx: { marginInlineEnd: -0.75, py: 0.25 },
|
|
1772
|
+
ref
|
|
1773
|
+
},
|
|
1774
|
+
/* @__PURE__ */ React38.createElement(import_ui29.Box, { display: "flex", alignItems: "center", gap: 1, sx: { flexGrow: 1 } }, /* @__PURE__ */ React38.createElement(import_ui29.Typography, { component: "label", variant: "caption", color: "text.secondary", sx: { lineHeight: 1 } }, label), /* @__PURE__ */ React38.createElement(Adornment, null)),
|
|
1775
|
+
children
|
|
1776
|
+
);
|
|
1777
|
+
}
|
|
1758
1778
|
);
|
|
1759
1779
|
|
|
1760
1780
|
// src/controls/box-shadow-repeater-control.tsx
|
|
1761
1781
|
var BoxShadowRepeaterControl = createControl(() => {
|
|
1762
1782
|
const { propType, value, setValue, disabled } = useBoundProp(import_editor_props10.boxShadowPropTypeUtil);
|
|
1763
|
-
return /* @__PURE__ */
|
|
1783
|
+
return /* @__PURE__ */ React39.createElement(PropProvider, { propType, value, setValue, isDisabled: () => disabled }, /* @__PURE__ */ React39.createElement(ControlRepeater, { initial: initialShadow, propTypeUtil: import_editor_props10.boxShadowPropTypeUtil }, /* @__PURE__ */ React39.createElement(RepeaterHeader, { label: (0, import_i18n11.__)("Box shadow", "elementor") }, /* @__PURE__ */ React39.createElement(TooltipAddItemAction, { newItemIndex: 0, disabled, ariaLabel: "Box shadow" })), /* @__PURE__ */ React39.createElement(ItemsContainer, null, /* @__PURE__ */ React39.createElement(
|
|
1764
1784
|
Item,
|
|
1765
1785
|
{
|
|
1766
1786
|
Icon: ItemIcon,
|
|
1767
1787
|
Label: ItemLabel,
|
|
1768
|
-
actions: /* @__PURE__ */
|
|
1788
|
+
actions: /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(DuplicateItemAction, null), /* @__PURE__ */ React39.createElement(DisableItemAction, null), /* @__PURE__ */ React39.createElement(RemoveItemAction, null))
|
|
1769
1789
|
}
|
|
1770
|
-
)), /* @__PURE__ */
|
|
1790
|
+
)), /* @__PURE__ */ React39.createElement(EditItemPopover, null, /* @__PURE__ */ React39.createElement(Content, null))));
|
|
1771
1791
|
});
|
|
1772
|
-
var StyledUnstableColorIndicator = (0,
|
|
1792
|
+
var StyledUnstableColorIndicator = (0, import_ui30.styled)(import_ui30.UnstableColorIndicator)(({ theme }) => ({
|
|
1773
1793
|
height: "1rem",
|
|
1774
1794
|
width: "1rem",
|
|
1775
1795
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
1776
1796
|
}));
|
|
1777
|
-
var ItemIcon = ({ value }) => /* @__PURE__ */
|
|
1797
|
+
var ItemIcon = ({ value }) => /* @__PURE__ */ React39.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color?.value });
|
|
1778
1798
|
var Content = () => {
|
|
1779
1799
|
const context = useBoundProp(import_editor_props10.shadowPropTypeUtil);
|
|
1780
|
-
const rowRef = [(0,
|
|
1800
|
+
const rowRef = [(0, import_react21.useRef)(null), (0, import_react21.useRef)(null)];
|
|
1781
1801
|
const { rowRef: anchorEl } = useRepeaterContext();
|
|
1782
|
-
return /* @__PURE__ */
|
|
1802
|
+
return /* @__PURE__ */ React39.createElement(PropProvider, { ...context }, /* @__PURE__ */ React39.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React39.createElement(PopoverGridContainer, null, /* @__PURE__ */ React39.createElement(Control2, { bind: "color", label: (0, import_i18n11.__)("Color", "elementor") }, /* @__PURE__ */ React39.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React39.createElement(Control2, { bind: "position", label: (0, import_i18n11.__)("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React39.createElement(
|
|
1783
1803
|
SelectControl,
|
|
1784
1804
|
{
|
|
1785
1805
|
options: [
|
|
@@ -1787,14 +1807,14 @@ var Content = () => {
|
|
|
1787
1807
|
{ label: (0, import_i18n11.__)("Outset", "elementor"), value: null }
|
|
1788
1808
|
]
|
|
1789
1809
|
}
|
|
1790
|
-
))), /* @__PURE__ */
|
|
1810
|
+
))), /* @__PURE__ */ React39.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React39.createElement(Control2, { bind: "hOffset", label: (0, import_i18n11.__)("Horizontal", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[0] })), /* @__PURE__ */ React39.createElement(Control2, { bind: "vOffset", label: (0, import_i18n11.__)("Vertical", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[0] }))), /* @__PURE__ */ React39.createElement(PopoverGridContainer, { ref: rowRef[1] }, /* @__PURE__ */ React39.createElement(Control2, { bind: "blur", label: (0, import_i18n11.__)("Blur", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[1] })), /* @__PURE__ */ React39.createElement(Control2, { bind: "spread", label: (0, import_i18n11.__)("Spread", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[1] })))));
|
|
1791
1811
|
};
|
|
1792
1812
|
var Control2 = ({
|
|
1793
1813
|
label,
|
|
1794
1814
|
bind,
|
|
1795
1815
|
children,
|
|
1796
1816
|
sx
|
|
1797
|
-
}) => /* @__PURE__ */
|
|
1817
|
+
}) => /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6, sx }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(import_ui30.FormLabel, { size: "tiny" }, label)), /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 12 }, children))));
|
|
1798
1818
|
var ItemLabel = ({ value }) => {
|
|
1799
1819
|
const { position, hOffset, vOffset, blur, spread } = value.value;
|
|
1800
1820
|
const { size: blurSize = "", unit: blurUnit = "" } = blur?.value || {};
|
|
@@ -1813,7 +1833,7 @@ var ItemLabel = ({ value }) => {
|
|
|
1813
1833
|
}
|
|
1814
1834
|
return !size ? CUSTOM_SIZE_LABEL : size;
|
|
1815
1835
|
}).join(" ");
|
|
1816
|
-
return /* @__PURE__ */
|
|
1836
|
+
return /* @__PURE__ */ React39.createElement("span", { style: { textTransform: "capitalize" } }, positionLabel, ": ", sizes);
|
|
1817
1837
|
};
|
|
1818
1838
|
var initialShadow = {
|
|
1819
1839
|
$$type: "shadow",
|
|
@@ -1843,13 +1863,13 @@ var initialShadow = {
|
|
|
1843
1863
|
};
|
|
1844
1864
|
|
|
1845
1865
|
// src/controls/filter-control/filter-repeater-control.tsx
|
|
1846
|
-
var
|
|
1866
|
+
var React48 = __toESM(require("react"));
|
|
1847
1867
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
1848
1868
|
var import_i18n16 = require("@wordpress/i18n");
|
|
1849
1869
|
|
|
1850
1870
|
// src/controls/filter-control/context/filter-config-context.tsx
|
|
1851
|
-
var
|
|
1852
|
-
var
|
|
1871
|
+
var React40 = __toESM(require("react"));
|
|
1872
|
+
var import_react22 = require("react");
|
|
1853
1873
|
var import_editor_props11 = require("@elementor/editor-props");
|
|
1854
1874
|
|
|
1855
1875
|
// src/controls/filter-control/utils.ts
|
|
@@ -1948,10 +1968,10 @@ function extractPropType(propType, filterFunctionGroup) {
|
|
|
1948
1968
|
}
|
|
1949
1969
|
|
|
1950
1970
|
// src/controls/filter-control/context/filter-config-context.tsx
|
|
1951
|
-
var FilterConfigContext = (0,
|
|
1971
|
+
var FilterConfigContext = (0, import_react22.createContext)(null);
|
|
1952
1972
|
function FilterConfigProvider({ children }) {
|
|
1953
1973
|
const propContext = useBoundProp(import_editor_props11.cssFilterFunctionPropUtil);
|
|
1954
|
-
const contextValue = (0,
|
|
1974
|
+
const contextValue = (0, import_react22.useMemo)(() => {
|
|
1955
1975
|
const config = buildFilterConfig(propContext.propType.item_prop_type);
|
|
1956
1976
|
const filterOptions = Object.entries(config).map(([key, conf]) => ({
|
|
1957
1977
|
value: key,
|
|
@@ -1964,10 +1984,10 @@ function FilterConfigProvider({ children }) {
|
|
|
1964
1984
|
getInitialValue: () => config.blur.defaultValue
|
|
1965
1985
|
};
|
|
1966
1986
|
}, [propContext.propType]);
|
|
1967
|
-
return /* @__PURE__ */
|
|
1987
|
+
return /* @__PURE__ */ React40.createElement(FilterConfigContext.Provider, { value: contextValue }, children);
|
|
1968
1988
|
}
|
|
1969
1989
|
function useFilterConfig() {
|
|
1970
|
-
const context = (0,
|
|
1990
|
+
const context = (0, import_react22.useContext)(FilterConfigContext);
|
|
1971
1991
|
if (!context) {
|
|
1972
1992
|
throw new Error("useFilterConfig must be used within FilterConfigProvider");
|
|
1973
1993
|
}
|
|
@@ -1975,16 +1995,16 @@ function useFilterConfig() {
|
|
|
1975
1995
|
}
|
|
1976
1996
|
|
|
1977
1997
|
// src/controls/filter-control/filter-content.tsx
|
|
1978
|
-
var
|
|
1998
|
+
var React43 = __toESM(require("react"));
|
|
1979
1999
|
var import_editor_props14 = require("@elementor/editor-props");
|
|
1980
|
-
var
|
|
2000
|
+
var import_ui33 = require("@elementor/ui");
|
|
1981
2001
|
var import_i18n15 = require("@wordpress/i18n");
|
|
1982
2002
|
|
|
1983
2003
|
// src/controls/filter-control/drop-shadow/drop-shadow-item-content.tsx
|
|
1984
|
-
var
|
|
1985
|
-
var
|
|
2004
|
+
var React41 = __toESM(require("react"));
|
|
2005
|
+
var import_react23 = require("react");
|
|
1986
2006
|
var import_editor_props12 = require("@elementor/editor-props");
|
|
1987
|
-
var
|
|
2007
|
+
var import_ui31 = require("@elementor/ui");
|
|
1988
2008
|
var import_i18n14 = require("@wordpress/i18n");
|
|
1989
2009
|
var items = [
|
|
1990
2010
|
{
|
|
@@ -2010,8 +2030,8 @@ var items = [
|
|
|
2010
2030
|
];
|
|
2011
2031
|
var DropShadowItemContent = ({ anchorEl }) => {
|
|
2012
2032
|
const context = useBoundProp(import_editor_props12.dropShadowFilterPropTypeUtil);
|
|
2013
|
-
const rowRefs = [(0,
|
|
2014
|
-
return /* @__PURE__ */
|
|
2033
|
+
const rowRefs = [(0, import_react23.useRef)(null), (0, import_react23.useRef)(null)];
|
|
2034
|
+
return /* @__PURE__ */ React41.createElement(PropProvider, { ...context }, items.map((item) => /* @__PURE__ */ React41.createElement(PopoverGridContainer, { key: item.bind, ref: rowRefs[item.rowIndex] ?? null }, /* @__PURE__ */ React41.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React41.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React41.createElement(import_ui31.Grid, { item: true, xs: 6 }, item.bind === "color" ? /* @__PURE__ */ React41.createElement(ColorControl, { anchorEl }) : /* @__PURE__ */ React41.createElement(
|
|
2015
2035
|
SizeControl,
|
|
2016
2036
|
{
|
|
2017
2037
|
anchorRef: rowRefs[item.rowIndex],
|
|
@@ -2023,10 +2043,10 @@ var DropShadowItemContent = ({ anchorEl }) => {
|
|
|
2023
2043
|
};
|
|
2024
2044
|
|
|
2025
2045
|
// src/controls/filter-control/single-size/single-size-item-content.tsx
|
|
2026
|
-
var
|
|
2027
|
-
var
|
|
2046
|
+
var import_react24 = require("react");
|
|
2047
|
+
var React42 = __toESM(require("react"));
|
|
2028
2048
|
var import_editor_props13 = require("@elementor/editor-props");
|
|
2029
|
-
var
|
|
2049
|
+
var import_ui32 = require("@elementor/ui");
|
|
2030
2050
|
var propTypeMap = {
|
|
2031
2051
|
blur: import_editor_props13.blurFilterPropTypeUtil,
|
|
2032
2052
|
intensity: import_editor_props13.intensityFilterPropTypeUtil,
|
|
@@ -2034,11 +2054,11 @@ var propTypeMap = {
|
|
|
2034
2054
|
"color-tone": import_editor_props13.colorToneFilterPropTypeUtil
|
|
2035
2055
|
};
|
|
2036
2056
|
var SingleSizeItemContent = ({ filterFunc }) => {
|
|
2037
|
-
const rowRef = (0,
|
|
2057
|
+
const rowRef = (0, import_react24.useRef)(null);
|
|
2038
2058
|
const { getFilterFunctionConfig } = useFilterConfig();
|
|
2039
2059
|
const { valueName, filterFunctionGroup } = getFilterFunctionConfig(filterFunc);
|
|
2040
2060
|
const context = useBoundProp(propTypeMap[filterFunctionGroup]);
|
|
2041
|
-
return /* @__PURE__ */
|
|
2061
|
+
return /* @__PURE__ */ React42.createElement(PropProvider, { ...context }, /* @__PURE__ */ React42.createElement(PropKeyProvider, { bind: filterFunctionGroup }, /* @__PURE__ */ React42.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React42.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React42.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlFormLabel, null, valueName)), /* @__PURE__ */ React42.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeControl, { anchorRef: rowRef, enablePropTypeUnits: true, isRepeaterControl: true }))))));
|
|
2042
2062
|
};
|
|
2043
2063
|
|
|
2044
2064
|
// src/controls/filter-control/filter-content.tsx
|
|
@@ -2056,7 +2076,7 @@ var FilterContent = () => {
|
|
|
2056
2076
|
}
|
|
2057
2077
|
propContext.setValue(newValue);
|
|
2058
2078
|
};
|
|
2059
|
-
return /* @__PURE__ */
|
|
2079
|
+
return /* @__PURE__ */ React43.createElement(PropProvider, { ...propContext, setValue: handleValueChange }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "css-filter-func" }, /* @__PURE__ */ React43.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React43.createElement(PopoverGridContainer, null, /* @__PURE__ */ React43.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlFormLabel, null, (0, import_i18n15.__)("Filter", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "func" }, /* @__PURE__ */ React43.createElement(SelectControl, { options: filterOptions })))), /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "args" }, /* @__PURE__ */ React43.createElement(FilterValueContent, null)))));
|
|
2060
2080
|
};
|
|
2061
2081
|
var FilterValueContent = () => {
|
|
2062
2082
|
const { openItemIndex, items: items2 } = useRepeaterContext();
|
|
@@ -2064,19 +2084,19 @@ var FilterValueContent = () => {
|
|
|
2064
2084
|
const filterFunc = currentItem.item.value.func.value;
|
|
2065
2085
|
const isDropShadow = filterFunc === "drop-shadow";
|
|
2066
2086
|
if (isDropShadow) {
|
|
2067
|
-
return /* @__PURE__ */
|
|
2087
|
+
return /* @__PURE__ */ React43.createElement(DropShadowItemContent, null);
|
|
2068
2088
|
}
|
|
2069
|
-
return /* @__PURE__ */
|
|
2089
|
+
return /* @__PURE__ */ React43.createElement(SingleSizeItemContent, { filterFunc });
|
|
2070
2090
|
};
|
|
2071
2091
|
|
|
2072
2092
|
// src/controls/filter-control/filter-icon.tsx
|
|
2073
|
-
var
|
|
2074
|
-
var
|
|
2093
|
+
var React44 = __toESM(require("react"));
|
|
2094
|
+
var import_ui34 = require("@elementor/ui");
|
|
2075
2095
|
var FilterIcon = ({ value }) => {
|
|
2076
2096
|
if (value.value.func.value !== "drop-shadow") {
|
|
2077
2097
|
return null;
|
|
2078
2098
|
}
|
|
2079
|
-
return /* @__PURE__ */
|
|
2099
|
+
return /* @__PURE__ */ React44.createElement(
|
|
2080
2100
|
StyledUnstableColorIndicator2,
|
|
2081
2101
|
{
|
|
2082
2102
|
size: "inherit",
|
|
@@ -2085,44 +2105,44 @@ var FilterIcon = ({ value }) => {
|
|
|
2085
2105
|
}
|
|
2086
2106
|
);
|
|
2087
2107
|
};
|
|
2088
|
-
var StyledUnstableColorIndicator2 = (0,
|
|
2108
|
+
var StyledUnstableColorIndicator2 = (0, import_ui34.styled)(import_ui34.UnstableColorIndicator)(({ theme }) => ({
|
|
2089
2109
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
2090
2110
|
}));
|
|
2091
2111
|
|
|
2092
2112
|
// src/controls/filter-control/filter-label.tsx
|
|
2093
|
-
var
|
|
2113
|
+
var React47 = __toESM(require("react"));
|
|
2094
2114
|
|
|
2095
2115
|
// src/controls/filter-control/drop-shadow/drop-shadow-item-label.tsx
|
|
2096
|
-
var
|
|
2097
|
-
var
|
|
2116
|
+
var React45 = __toESM(require("react"));
|
|
2117
|
+
var import_ui35 = require("@elementor/ui");
|
|
2098
2118
|
var DropShadowItemLabel = ({ value }) => {
|
|
2099
2119
|
const values = value.value.args.value;
|
|
2100
2120
|
const keys = ["xAxis", "yAxis", "blur"];
|
|
2101
2121
|
const labels = keys.map(
|
|
2102
2122
|
(key) => values[key]?.value?.unit !== "custom" ? `${values[key]?.value?.size ?? 0}${values[key]?.value?.unit ?? "px"}` : values[key]?.value?.size || CUSTOM_SIZE_LABEL
|
|
2103
2123
|
);
|
|
2104
|
-
return /* @__PURE__ */
|
|
2124
|
+
return /* @__PURE__ */ React45.createElement(import_ui35.Box, { component: "span" }, /* @__PURE__ */ React45.createElement(import_ui35.Box, { component: "span", style: { textTransform: "capitalize" } }, "Drop shadow:"), ` ${labels.join(" ")}`);
|
|
2105
2125
|
};
|
|
2106
2126
|
|
|
2107
2127
|
// src/controls/filter-control/single-size/single-size-item-label.tsx
|
|
2108
|
-
var
|
|
2109
|
-
var
|
|
2128
|
+
var React46 = __toESM(require("react"));
|
|
2129
|
+
var import_ui36 = require("@elementor/ui");
|
|
2110
2130
|
var SingleSizeItemLabel = ({ value }) => {
|
|
2111
2131
|
const { func, args } = value.value;
|
|
2112
2132
|
const { getFilterFunctionConfig } = useFilterConfig();
|
|
2113
2133
|
const { defaultValue } = getFilterFunctionConfig(func.value ?? "");
|
|
2114
2134
|
const defaultUnit = defaultValue.value.args.value?.size?.value?.unit ?? lengthUnits[0];
|
|
2115
2135
|
const { unit, size } = args.value.size?.value ?? { unit: defaultUnit, size: 0 };
|
|
2116
|
-
const label = /* @__PURE__ */
|
|
2117
|
-
return /* @__PURE__ */
|
|
2136
|
+
const label = /* @__PURE__ */ React46.createElement(import_ui36.Box, { component: "span", style: { textTransform: "capitalize" } }, func.value ?? "", ":");
|
|
2137
|
+
return /* @__PURE__ */ React46.createElement(import_ui36.Box, { component: "span" }, label, " " + (unit !== "custom" ? `${size ?? 0}${unit ?? defaultUnit}` : size || CUSTOM_SIZE_LABEL));
|
|
2118
2138
|
};
|
|
2119
2139
|
|
|
2120
2140
|
// src/controls/filter-control/filter-label.tsx
|
|
2121
2141
|
var FilterLabel = ({ value }) => {
|
|
2122
2142
|
if (value.value.func.value === "drop-shadow") {
|
|
2123
|
-
return /* @__PURE__ */
|
|
2143
|
+
return /* @__PURE__ */ React47.createElement(DropShadowItemLabel, { value });
|
|
2124
2144
|
}
|
|
2125
|
-
return /* @__PURE__ */
|
|
2145
|
+
return /* @__PURE__ */ React47.createElement(SingleSizeItemLabel, { value });
|
|
2126
2146
|
};
|
|
2127
2147
|
|
|
2128
2148
|
// src/controls/filter-control/filter-repeater-control.tsx
|
|
@@ -2139,7 +2159,7 @@ var FILTER_CONFIG = {
|
|
|
2139
2159
|
var FilterRepeaterControl = createControl(({ filterPropName = "filter" }) => {
|
|
2140
2160
|
const { propTypeUtil, label } = ensureFilterConfig(filterPropName);
|
|
2141
2161
|
const { propType, value: filterValues, setValue } = useBoundProp(propTypeUtil);
|
|
2142
|
-
return /* @__PURE__ */
|
|
2162
|
+
return /* @__PURE__ */ React48.createElement(FilterConfigProvider, null, /* @__PURE__ */ React48.createElement(PropProvider, { propType, value: filterValues, setValue }, /* @__PURE__ */ React48.createElement(
|
|
2143
2163
|
Repeater,
|
|
2144
2164
|
{
|
|
2145
2165
|
propTypeUtil,
|
|
@@ -2150,20 +2170,20 @@ var FilterRepeaterControl = createControl(({ filterPropName = "filter" }) => {
|
|
|
2150
2170
|
});
|
|
2151
2171
|
var Repeater = ({ propTypeUtil, label, filterPropName }) => {
|
|
2152
2172
|
const { getInitialValue } = useFilterConfig();
|
|
2153
|
-
return /* @__PURE__ */
|
|
2173
|
+
return /* @__PURE__ */ React48.createElement(ControlRepeater, { initial: getInitialValue(), propTypeUtil }, /* @__PURE__ */ React48.createElement(RepeaterHeader, { label }, /* @__PURE__ */ React48.createElement(
|
|
2154
2174
|
TooltipAddItemAction,
|
|
2155
2175
|
{
|
|
2156
2176
|
newItemIndex: 0,
|
|
2157
2177
|
ariaLabel: filterPropName === "backdrop-filter" ? "backdrop filter" : "filter"
|
|
2158
2178
|
}
|
|
2159
|
-
)), /* @__PURE__ */
|
|
2179
|
+
)), /* @__PURE__ */ React48.createElement(ItemsContainer, null, /* @__PURE__ */ React48.createElement(
|
|
2160
2180
|
Item,
|
|
2161
2181
|
{
|
|
2162
2182
|
Label: FilterLabel,
|
|
2163
2183
|
Icon: FilterIcon,
|
|
2164
|
-
actions: /* @__PURE__ */
|
|
2184
|
+
actions: /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(DuplicateItemAction, null), /* @__PURE__ */ React48.createElement(DisableItemAction, null), /* @__PURE__ */ React48.createElement(RemoveItemAction, null))
|
|
2165
2185
|
}
|
|
2166
|
-
)), /* @__PURE__ */
|
|
2186
|
+
)), /* @__PURE__ */ React48.createElement(EditItemPopover, null, /* @__PURE__ */ React48.createElement(FilterContent, null)));
|
|
2167
2187
|
};
|
|
2168
2188
|
function ensureFilterConfig(name) {
|
|
2169
2189
|
if (name && name in FILTER_CONFIG) {
|
|
@@ -2173,8 +2193,8 @@ function ensureFilterConfig(name) {
|
|
|
2173
2193
|
}
|
|
2174
2194
|
|
|
2175
2195
|
// src/controls/select-control-wrapper.tsx
|
|
2176
|
-
var
|
|
2177
|
-
var
|
|
2196
|
+
var React49 = __toESM(require("react"));
|
|
2197
|
+
var import_react25 = require("react");
|
|
2178
2198
|
var getOffCanvasElements = () => {
|
|
2179
2199
|
const extendedWindow = window;
|
|
2180
2200
|
const documentId = extendedWindow.elementor.config.document.id;
|
|
@@ -2192,8 +2212,8 @@ var collectionMethods = {
|
|
|
2192
2212
|
"off-canvas": getOffCanvasElements
|
|
2193
2213
|
};
|
|
2194
2214
|
var useDynamicOptions = (collectionId, initialOptions) => {
|
|
2195
|
-
const [options, setOptions] = (0,
|
|
2196
|
-
(0,
|
|
2215
|
+
const [options, setOptions] = (0, import_react25.useState)(initialOptions ?? []);
|
|
2216
|
+
(0, import_react25.useEffect)(() => {
|
|
2197
2217
|
if (!collectionId || !collectionMethods[collectionId]) {
|
|
2198
2218
|
setOptions(initialOptions ?? []);
|
|
2199
2219
|
return;
|
|
@@ -2205,33 +2225,33 @@ var useDynamicOptions = (collectionId, initialOptions) => {
|
|
|
2205
2225
|
var SelectControlWrapper = createControl(
|
|
2206
2226
|
({ collectionId, options, ...props }) => {
|
|
2207
2227
|
const actualOptions = useDynamicOptions(collectionId, options);
|
|
2208
|
-
return /* @__PURE__ */
|
|
2228
|
+
return /* @__PURE__ */ React49.createElement(SelectControl, { options: actualOptions, ...props });
|
|
2209
2229
|
}
|
|
2210
2230
|
);
|
|
2211
2231
|
|
|
2212
2232
|
// src/controls/toggle-control.tsx
|
|
2213
|
-
var
|
|
2233
|
+
var React53 = __toESM(require("react"));
|
|
2214
2234
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
2215
2235
|
|
|
2216
2236
|
// src/components/control-toggle-button-group.tsx
|
|
2217
|
-
var
|
|
2218
|
-
var
|
|
2237
|
+
var React51 = __toESM(require("react"));
|
|
2238
|
+
var import_react26 = require("react");
|
|
2219
2239
|
var import_icons9 = require("@elementor/icons");
|
|
2220
|
-
var
|
|
2240
|
+
var import_ui38 = require("@elementor/ui");
|
|
2221
2241
|
|
|
2222
2242
|
// src/components/conditional-tooltip.tsx
|
|
2223
|
-
var
|
|
2224
|
-
var
|
|
2243
|
+
var React50 = __toESM(require("react"));
|
|
2244
|
+
var import_ui37 = require("@elementor/ui");
|
|
2225
2245
|
var ConditionalTooltip = ({
|
|
2226
2246
|
showTooltip,
|
|
2227
2247
|
children,
|
|
2228
2248
|
label
|
|
2229
2249
|
}) => {
|
|
2230
|
-
return showTooltip && label ? /* @__PURE__ */
|
|
2250
|
+
return showTooltip && label ? /* @__PURE__ */ React50.createElement(import_ui37.Tooltip, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
|
|
2231
2251
|
};
|
|
2232
2252
|
|
|
2233
2253
|
// src/components/control-toggle-button-group.tsx
|
|
2234
|
-
var StyledToggleButtonGroup = (0,
|
|
2254
|
+
var StyledToggleButtonGroup = (0, import_ui38.styled)(import_ui38.ToggleButtonGroup)`
|
|
2235
2255
|
${({ justify }) => `justify-content: ${justify};`}
|
|
2236
2256
|
button:not( :last-of-type ) {
|
|
2237
2257
|
border-start-end-radius: 0;
|
|
@@ -2246,7 +2266,7 @@ var StyledToggleButtonGroup = (0, import_ui36.styled)(import_ui36.ToggleButtonGr
|
|
|
2246
2266
|
border-end-end-radius: 8px;
|
|
2247
2267
|
}
|
|
2248
2268
|
`;
|
|
2249
|
-
var StyledToggleButton = (0,
|
|
2269
|
+
var StyledToggleButton = (0, import_ui38.styled)(import_ui38.ToggleButton, {
|
|
2250
2270
|
shouldForwardProp: (prop) => prop !== "isPlaceholder"
|
|
2251
2271
|
})`
|
|
2252
2272
|
${({ theme, isPlaceholder }) => isPlaceholder && `
|
|
@@ -2273,12 +2293,12 @@ var ControlToggleButtonGroup = ({
|
|
|
2273
2293
|
const shouldSliceItems = exclusive && maxItems !== void 0 && items2.length > maxItems;
|
|
2274
2294
|
const menuItems = shouldSliceItems ? items2.slice(maxItems - 1) : [];
|
|
2275
2295
|
const fixedItems = shouldSliceItems ? items2.slice(0, maxItems - 1) : items2;
|
|
2276
|
-
const theme = (0,
|
|
2296
|
+
const theme = (0, import_ui38.useTheme)();
|
|
2277
2297
|
const isRtl = "rtl" === theme.direction;
|
|
2278
2298
|
const handleChange = (_, newValue) => {
|
|
2279
2299
|
onChange(newValue);
|
|
2280
2300
|
};
|
|
2281
|
-
const getGridTemplateColumns = (0,
|
|
2301
|
+
const getGridTemplateColumns = (0, import_react26.useMemo)(() => {
|
|
2282
2302
|
const isOffLimits = menuItems?.length;
|
|
2283
2303
|
const itemsCount = isOffLimits ? fixedItems.length + 1 : fixedItems.length;
|
|
2284
2304
|
const templateColumnsSuffix = isOffLimits ? "auto" : "";
|
|
@@ -2302,7 +2322,7 @@ var ControlToggleButtonGroup = ({
|
|
|
2302
2322
|
return [];
|
|
2303
2323
|
};
|
|
2304
2324
|
const placeholderArray = getPlaceholderArray(placeholder);
|
|
2305
|
-
return /* @__PURE__ */
|
|
2325
|
+
return /* @__PURE__ */ React51.createElement(ControlActions, null, /* @__PURE__ */ React51.createElement(
|
|
2306
2326
|
StyledToggleButtonGroup,
|
|
2307
2327
|
{
|
|
2308
2328
|
justify,
|
|
@@ -2319,14 +2339,14 @@ var ControlToggleButtonGroup = ({
|
|
|
2319
2339
|
},
|
|
2320
2340
|
fixedItems.map(({ label, value: buttonValue, renderContent: Content3, showTooltip }) => {
|
|
2321
2341
|
const isPlaceholder = placeholderArray.length > 0 && placeholderArray.includes(buttonValue) && (shouldShowExclusivePlaceholder || shouldShowNonExclusivePlaceholder);
|
|
2322
|
-
return /* @__PURE__ */
|
|
2342
|
+
return /* @__PURE__ */ React51.createElement(
|
|
2323
2343
|
ConditionalTooltip,
|
|
2324
2344
|
{
|
|
2325
2345
|
key: buttonValue,
|
|
2326
2346
|
label,
|
|
2327
2347
|
showTooltip: showTooltip || false
|
|
2328
2348
|
},
|
|
2329
|
-
/* @__PURE__ */
|
|
2349
|
+
/* @__PURE__ */ React51.createElement(
|
|
2330
2350
|
StyledToggleButton,
|
|
2331
2351
|
{
|
|
2332
2352
|
value: buttonValue,
|
|
@@ -2335,11 +2355,11 @@ var ControlToggleButtonGroup = ({
|
|
|
2335
2355
|
fullWidth,
|
|
2336
2356
|
isPlaceholder
|
|
2337
2357
|
},
|
|
2338
|
-
/* @__PURE__ */
|
|
2358
|
+
/* @__PURE__ */ React51.createElement(Content3, { size })
|
|
2339
2359
|
)
|
|
2340
2360
|
);
|
|
2341
2361
|
}),
|
|
2342
|
-
menuItems.length && exclusive && /* @__PURE__ */
|
|
2362
|
+
menuItems.length && exclusive && /* @__PURE__ */ React51.createElement(
|
|
2343
2363
|
SplitButtonGroup,
|
|
2344
2364
|
{
|
|
2345
2365
|
size,
|
|
@@ -2359,8 +2379,8 @@ var SplitButtonGroup = ({
|
|
|
2359
2379
|
value
|
|
2360
2380
|
}) => {
|
|
2361
2381
|
const previewButton = usePreviewButton(items2, value);
|
|
2362
|
-
const [isMenuOpen, setIsMenuOpen] = (0,
|
|
2363
|
-
const menuButtonRef = (0,
|
|
2382
|
+
const [isMenuOpen, setIsMenuOpen] = (0, import_react26.useState)(false);
|
|
2383
|
+
const menuButtonRef = (0, import_react26.useRef)(null);
|
|
2364
2384
|
const onMenuToggle = (ev) => {
|
|
2365
2385
|
setIsMenuOpen((prev) => !prev);
|
|
2366
2386
|
ev.preventDefault();
|
|
@@ -2373,8 +2393,8 @@ var SplitButtonGroup = ({
|
|
|
2373
2393
|
const shouldRemove = newValue === value;
|
|
2374
2394
|
onChange(shouldRemove ? null : newValue);
|
|
2375
2395
|
};
|
|
2376
|
-
return /* @__PURE__ */
|
|
2377
|
-
|
|
2396
|
+
return /* @__PURE__ */ React51.createElement(React51.Fragment, null, /* @__PURE__ */ React51.createElement(
|
|
2397
|
+
import_ui38.ToggleButton,
|
|
2378
2398
|
{
|
|
2379
2399
|
value: previewButton.value,
|
|
2380
2400
|
"aria-label": previewButton.label,
|
|
@@ -2387,8 +2407,8 @@ var SplitButtonGroup = ({
|
|
|
2387
2407
|
ref: menuButtonRef
|
|
2388
2408
|
},
|
|
2389
2409
|
previewButton.renderContent({ size })
|
|
2390
|
-
), /* @__PURE__ */
|
|
2391
|
-
|
|
2410
|
+
), /* @__PURE__ */ React51.createElement(
|
|
2411
|
+
import_ui38.ToggleButton,
|
|
2392
2412
|
{
|
|
2393
2413
|
size,
|
|
2394
2414
|
"aria-expanded": isMenuOpen ? "true" : void 0,
|
|
@@ -2398,9 +2418,9 @@ var SplitButtonGroup = ({
|
|
|
2398
2418
|
ref: menuButtonRef,
|
|
2399
2419
|
value: "__chevron-icon-button__"
|
|
2400
2420
|
},
|
|
2401
|
-
/* @__PURE__ */
|
|
2402
|
-
), /* @__PURE__ */
|
|
2403
|
-
|
|
2421
|
+
/* @__PURE__ */ React51.createElement(import_icons9.ChevronDownIcon, { fontSize: size })
|
|
2422
|
+
), /* @__PURE__ */ React51.createElement(
|
|
2423
|
+
import_ui38.Menu,
|
|
2404
2424
|
{
|
|
2405
2425
|
open: isMenuOpen,
|
|
2406
2426
|
onClose: () => setIsMenuOpen(false),
|
|
@@ -2417,22 +2437,22 @@ var SplitButtonGroup = ({
|
|
|
2417
2437
|
mt: 0.5
|
|
2418
2438
|
}
|
|
2419
2439
|
},
|
|
2420
|
-
items2.map(({ label, value: buttonValue }) => /* @__PURE__ */
|
|
2421
|
-
|
|
2440
|
+
items2.map(({ label, value: buttonValue }) => /* @__PURE__ */ React51.createElement(
|
|
2441
|
+
import_ui38.MenuItem,
|
|
2422
2442
|
{
|
|
2423
2443
|
key: buttonValue,
|
|
2424
2444
|
selected: buttonValue === value,
|
|
2425
2445
|
onClick: () => onMenuItemClick(buttonValue)
|
|
2426
2446
|
},
|
|
2427
|
-
/* @__PURE__ */
|
|
2447
|
+
/* @__PURE__ */ React51.createElement(import_ui38.ListItemText, null, /* @__PURE__ */ React51.createElement(import_ui38.Typography, { sx: { fontSize: "14px" } }, label))
|
|
2428
2448
|
))
|
|
2429
2449
|
));
|
|
2430
2450
|
};
|
|
2431
2451
|
var usePreviewButton = (items2, value) => {
|
|
2432
|
-
const [previewButton, setPreviewButton] = (0,
|
|
2452
|
+
const [previewButton, setPreviewButton] = (0, import_react26.useState)(
|
|
2433
2453
|
items2.find((item) => item.value === value) ?? items2[0]
|
|
2434
2454
|
);
|
|
2435
|
-
(0,
|
|
2455
|
+
(0, import_react26.useEffect)(() => {
|
|
2436
2456
|
const selectedButton = items2.find((item) => item.value === value);
|
|
2437
2457
|
if (selectedButton) {
|
|
2438
2458
|
setPreviewButton(selectedButton);
|
|
@@ -2442,7 +2462,7 @@ var usePreviewButton = (items2, value) => {
|
|
|
2442
2462
|
};
|
|
2443
2463
|
|
|
2444
2464
|
// src/utils/convert-toggle-options-to-atomic.tsx
|
|
2445
|
-
var
|
|
2465
|
+
var React52 = __toESM(require("react"));
|
|
2446
2466
|
var Icons = __toESM(require("@elementor/icons"));
|
|
2447
2467
|
var convertToggleOptionsToAtomic = (options) => {
|
|
2448
2468
|
return options.map((option) => {
|
|
@@ -2453,7 +2473,7 @@ var convertToggleOptionsToAtomic = (options) => {
|
|
|
2453
2473
|
label: option.label,
|
|
2454
2474
|
renderContent: ({ size }) => {
|
|
2455
2475
|
if (IconComponent) {
|
|
2456
|
-
return /* @__PURE__ */
|
|
2476
|
+
return /* @__PURE__ */ React52.createElement(IconComponent, { fontSize: size });
|
|
2457
2477
|
}
|
|
2458
2478
|
return option.label;
|
|
2459
2479
|
},
|
|
@@ -2489,7 +2509,7 @@ var ToggleControl = createControl(
|
|
|
2489
2509
|
size,
|
|
2490
2510
|
placeholder
|
|
2491
2511
|
};
|
|
2492
|
-
return exclusive ? /* @__PURE__ */
|
|
2512
|
+
return exclusive ? /* @__PURE__ */ React53.createElement(
|
|
2493
2513
|
ControlToggleButtonGroup,
|
|
2494
2514
|
{
|
|
2495
2515
|
...toggleButtonGroupProps,
|
|
@@ -2498,7 +2518,7 @@ var ToggleControl = createControl(
|
|
|
2498
2518
|
disabled,
|
|
2499
2519
|
exclusive: true
|
|
2500
2520
|
}
|
|
2501
|
-
) : /* @__PURE__ */
|
|
2521
|
+
) : /* @__PURE__ */ React53.createElement(
|
|
2502
2522
|
ControlToggleButtonGroup,
|
|
2503
2523
|
{
|
|
2504
2524
|
...toggleButtonGroupProps,
|
|
@@ -2512,9 +2532,9 @@ var ToggleControl = createControl(
|
|
|
2512
2532
|
);
|
|
2513
2533
|
|
|
2514
2534
|
// src/controls/number-control.tsx
|
|
2515
|
-
var
|
|
2535
|
+
var React54 = __toESM(require("react"));
|
|
2516
2536
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
2517
|
-
var
|
|
2537
|
+
var import_ui39 = require("@elementor/ui");
|
|
2518
2538
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
2519
2539
|
var NumberControl = createControl(
|
|
2520
2540
|
({
|
|
@@ -2543,7 +2563,7 @@ var NumberControl = createControl(
|
|
|
2543
2563
|
}
|
|
2544
2564
|
setValue(updatedValue, void 0, { validation: () => isInputValid });
|
|
2545
2565
|
};
|
|
2546
|
-
return /* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ React54.createElement(ControlActions, null, /* @__PURE__ */ React54.createElement(
|
|
2547
2567
|
NumberInput,
|
|
2548
2568
|
{
|
|
2549
2569
|
size: "tiny",
|
|
@@ -2556,7 +2576,7 @@ var NumberControl = createControl(
|
|
|
2556
2576
|
placeholder: labelPlaceholder ?? (isEmptyOrNaN(placeholder) ? "" : String(placeholder)),
|
|
2557
2577
|
inputProps: { step, min },
|
|
2558
2578
|
InputProps: {
|
|
2559
|
-
startAdornment: startIcon ? /* @__PURE__ */
|
|
2579
|
+
startAdornment: startIcon ? /* @__PURE__ */ React54.createElement(import_ui39.InputAdornment, { position: "start", disabled }, startIcon) : void 0
|
|
2560
2580
|
}
|
|
2561
2581
|
}
|
|
2562
2582
|
));
|
|
@@ -2564,17 +2584,17 @@ var NumberControl = createControl(
|
|
|
2564
2584
|
);
|
|
2565
2585
|
|
|
2566
2586
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
2567
|
-
var
|
|
2568
|
-
var
|
|
2587
|
+
var React56 = __toESM(require("react"));
|
|
2588
|
+
var import_react27 = require("react");
|
|
2569
2589
|
var import_editor_props18 = require("@elementor/editor-props");
|
|
2570
|
-
var
|
|
2590
|
+
var import_ui41 = require("@elementor/ui");
|
|
2571
2591
|
var import_i18n17 = require("@wordpress/i18n");
|
|
2572
2592
|
|
|
2573
2593
|
// src/components/control-label.tsx
|
|
2574
|
-
var
|
|
2575
|
-
var
|
|
2594
|
+
var React55 = __toESM(require("react"));
|
|
2595
|
+
var import_ui40 = require("@elementor/ui");
|
|
2576
2596
|
var ControlLabel = ({ children, ...props }) => {
|
|
2577
|
-
return /* @__PURE__ */
|
|
2597
|
+
return /* @__PURE__ */ React55.createElement(import_ui40.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React55.createElement(ControlFormLabel, { ...props }, children), /* @__PURE__ */ React55.createElement(ControlAdornments, null));
|
|
2578
2598
|
};
|
|
2579
2599
|
|
|
2580
2600
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
@@ -2595,8 +2615,8 @@ function EqualUnequalSizesControl({
|
|
|
2595
2615
|
items: items2,
|
|
2596
2616
|
multiSizePropTypeUtil
|
|
2597
2617
|
}) {
|
|
2598
|
-
const popupId = (0,
|
|
2599
|
-
const popupState = (0,
|
|
2618
|
+
const popupId = (0, import_react27.useId)();
|
|
2619
|
+
const popupState = (0, import_ui41.usePopupState)({ variant: "popover", popupId });
|
|
2600
2620
|
const {
|
|
2601
2621
|
propType: multiSizePropType,
|
|
2602
2622
|
value: multiSizeValue,
|
|
@@ -2604,7 +2624,7 @@ function EqualUnequalSizesControl({
|
|
|
2604
2624
|
disabled: multiSizeDisabled
|
|
2605
2625
|
} = useBoundProp(multiSizePropTypeUtil);
|
|
2606
2626
|
const { value: sizeValue, setValue: setSizeValue } = useBoundProp(import_editor_props18.sizePropTypeUtil);
|
|
2607
|
-
const rowRefs = [(0,
|
|
2627
|
+
const rowRefs = [(0, import_react27.useRef)(null), (0, import_react27.useRef)(null)];
|
|
2608
2628
|
const splitEqualValue = () => {
|
|
2609
2629
|
if (!sizeValue) {
|
|
2610
2630
|
return null;
|
|
@@ -2633,25 +2653,25 @@ function EqualUnequalSizesControl({
|
|
|
2633
2653
|
};
|
|
2634
2654
|
const isShowingGeneralIndicator = !popupState.isOpen;
|
|
2635
2655
|
const isMixed = !!multiSizeValue;
|
|
2636
|
-
return /* @__PURE__ */
|
|
2656
|
+
return /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React56.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React56.createElement(ControlLabel, null, label)), /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_ui41.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React56.createElement(
|
|
2637
2657
|
SizeControl,
|
|
2638
2658
|
{
|
|
2639
2659
|
placeholder: isMixed ? (0, import_i18n17.__)("Mixed", "elementor") : void 0,
|
|
2640
2660
|
anchorRef: rowRefs[0]
|
|
2641
2661
|
}
|
|
2642
|
-
), /* @__PURE__ */
|
|
2643
|
-
|
|
2662
|
+
), /* @__PURE__ */ React56.createElement(import_ui41.Tooltip, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React56.createElement(
|
|
2663
|
+
import_ui41.ToggleButton,
|
|
2644
2664
|
{
|
|
2645
2665
|
size: "tiny",
|
|
2646
2666
|
value: "check",
|
|
2647
2667
|
sx: { marginLeft: "auto" },
|
|
2648
|
-
...(0,
|
|
2668
|
+
...(0, import_ui41.bindToggle)(popupState),
|
|
2649
2669
|
selected: popupState.isOpen,
|
|
2650
2670
|
"aria-label": tooltipLabel
|
|
2651
2671
|
},
|
|
2652
2672
|
icon
|
|
2653
|
-
))))), /* @__PURE__ */
|
|
2654
|
-
|
|
2673
|
+
))))), /* @__PURE__ */ React56.createElement(
|
|
2674
|
+
import_ui41.Popover,
|
|
2655
2675
|
{
|
|
2656
2676
|
disablePortal: true,
|
|
2657
2677
|
disableScrollLock: true,
|
|
@@ -2663,12 +2683,12 @@ function EqualUnequalSizesControl({
|
|
|
2663
2683
|
vertical: "top",
|
|
2664
2684
|
horizontal: "right"
|
|
2665
2685
|
},
|
|
2666
|
-
...(0,
|
|
2686
|
+
...(0, import_ui41.bindPopover)(popupState),
|
|
2667
2687
|
slotProps: {
|
|
2668
2688
|
paper: { sx: { mt: 0.5, width: rowRefs[0].current?.getBoundingClientRect().width } }
|
|
2669
2689
|
}
|
|
2670
2690
|
},
|
|
2671
|
-
/* @__PURE__ */
|
|
2691
|
+
/* @__PURE__ */ React56.createElement(
|
|
2672
2692
|
PropProvider,
|
|
2673
2693
|
{
|
|
2674
2694
|
propType: multiSizePropType,
|
|
@@ -2676,20 +2696,20 @@ function EqualUnequalSizesControl({
|
|
|
2676
2696
|
setValue: setNestedProp,
|
|
2677
2697
|
isDisabled: () => multiSizeDisabled
|
|
2678
2698
|
},
|
|
2679
|
-
/* @__PURE__ */
|
|
2699
|
+
/* @__PURE__ */ React56.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React56.createElement(PopoverGridContainer, { ref: rowRefs[1] }, /* @__PURE__ */ React56.createElement(MultiSizeValueControl, { item: items2[0], rowRef: rowRefs[1] }), /* @__PURE__ */ React56.createElement(MultiSizeValueControl, { item: items2[1], rowRef: rowRefs[1] })), /* @__PURE__ */ React56.createElement(PopoverGridContainer, { ref: rowRefs[2] }, /* @__PURE__ */ React56.createElement(MultiSizeValueControl, { item: items2[2], rowRef: rowRefs[2] }), /* @__PURE__ */ React56.createElement(MultiSizeValueControl, { item: items2[3], rowRef: rowRefs[2] })))
|
|
2680
2700
|
)
|
|
2681
2701
|
));
|
|
2682
2702
|
}
|
|
2683
2703
|
var MultiSizeValueControl = ({ item, rowRef }) => {
|
|
2684
|
-
return /* @__PURE__ */
|
|
2704
|
+
return /* @__PURE__ */ React56.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, item.label)), /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(SizeControl, { startIcon: item.icon, anchorRef: rowRef })))));
|
|
2685
2705
|
};
|
|
2686
2706
|
|
|
2687
2707
|
// src/controls/linked-dimensions-control.tsx
|
|
2688
|
-
var
|
|
2689
|
-
var
|
|
2708
|
+
var React57 = __toESM(require("react"));
|
|
2709
|
+
var import_react28 = require("react");
|
|
2690
2710
|
var import_editor_props19 = require("@elementor/editor-props");
|
|
2691
2711
|
var import_icons10 = require("@elementor/icons");
|
|
2692
|
-
var
|
|
2712
|
+
var import_ui42 = require("@elementor/ui");
|
|
2693
2713
|
var import_i18n18 = require("@wordpress/i18n");
|
|
2694
2714
|
var LinkedDimensionsControl = ({
|
|
2695
2715
|
label,
|
|
@@ -2703,7 +2723,7 @@ var LinkedDimensionsControl = ({
|
|
|
2703
2723
|
disabled: sizeDisabled,
|
|
2704
2724
|
placeholder: sizePlaceholder
|
|
2705
2725
|
} = useBoundProp(import_editor_props19.sizePropTypeUtil);
|
|
2706
|
-
const gridRowRefs = [(0,
|
|
2726
|
+
const gridRowRefs = [(0, import_react28.useRef)(null), (0, import_react28.useRef)(null)];
|
|
2707
2727
|
const {
|
|
2708
2728
|
value: dimensionsValue,
|
|
2709
2729
|
setValue: setDimensionsValue,
|
|
@@ -2732,7 +2752,7 @@ var LinkedDimensionsControl = ({
|
|
|
2732
2752
|
const linkedLabel = (0, import_i18n18.__)("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
2733
2753
|
const unlinkedLabel = (0, import_i18n18.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
2734
2754
|
const disabled = sizeDisabled || dimensionsDisabled;
|
|
2735
|
-
return /* @__PURE__ */
|
|
2755
|
+
return /* @__PURE__ */ React57.createElement(
|
|
2736
2756
|
PropProvider,
|
|
2737
2757
|
{
|
|
2738
2758
|
propType,
|
|
@@ -2741,7 +2761,7 @@ var LinkedDimensionsControl = ({
|
|
|
2741
2761
|
placeholder: dimensionsPlaceholder,
|
|
2742
2762
|
isDisabled: () => disabled
|
|
2743
2763
|
},
|
|
2744
|
-
/* @__PURE__ */
|
|
2764
|
+
/* @__PURE__ */ React57.createElement(import_ui42.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(ControlFormLabel, null, label), /* @__PURE__ */ React57.createElement(import_ui42.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React57.createElement(
|
|
2745
2765
|
StyledToggleButton,
|
|
2746
2766
|
{
|
|
2747
2767
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -2753,9 +2773,9 @@ var LinkedDimensionsControl = ({
|
|
|
2753
2773
|
disabled,
|
|
2754
2774
|
isPlaceholder: hasPlaceholders
|
|
2755
2775
|
},
|
|
2756
|
-
/* @__PURE__ */
|
|
2776
|
+
/* @__PURE__ */ React57.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2757
2777
|
))),
|
|
2758
|
-
getCssDimensionProps(isSiteRtl).map((row, index) => /* @__PURE__ */
|
|
2778
|
+
getCssDimensionProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React57.createElement(import_ui42.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React57.createElement(import_ui42.Grid, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React57.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(Label, { ...props })), /* @__PURE__ */ React57.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(
|
|
2759
2779
|
Control3,
|
|
2760
2780
|
{
|
|
2761
2781
|
bind: props.bind,
|
|
@@ -2777,7 +2797,7 @@ var Control3 = ({
|
|
|
2777
2797
|
min
|
|
2778
2798
|
}) => {
|
|
2779
2799
|
if (isLinked) {
|
|
2780
|
-
return /* @__PURE__ */
|
|
2800
|
+
return /* @__PURE__ */ React57.createElement(
|
|
2781
2801
|
SizeControl,
|
|
2782
2802
|
{
|
|
2783
2803
|
startIcon,
|
|
@@ -2787,7 +2807,7 @@ var Control3 = ({
|
|
|
2787
2807
|
}
|
|
2788
2808
|
);
|
|
2789
2809
|
}
|
|
2790
|
-
return /* @__PURE__ */
|
|
2810
|
+
return /* @__PURE__ */ React57.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React57.createElement(
|
|
2791
2811
|
SizeControl,
|
|
2792
2812
|
{
|
|
2793
2813
|
startIcon,
|
|
@@ -2798,7 +2818,7 @@ var Control3 = ({
|
|
|
2798
2818
|
));
|
|
2799
2819
|
};
|
|
2800
2820
|
var Label = ({ label, bind }) => {
|
|
2801
|
-
return /* @__PURE__ */
|
|
2821
|
+
return /* @__PURE__ */ React57.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React57.createElement(ControlLabel, null, label));
|
|
2802
2822
|
};
|
|
2803
2823
|
function getCssDimensionProps(isSiteRtl) {
|
|
2804
2824
|
return [
|
|
@@ -2806,41 +2826,41 @@ function getCssDimensionProps(isSiteRtl) {
|
|
|
2806
2826
|
{
|
|
2807
2827
|
bind: "block-start",
|
|
2808
2828
|
label: (0, import_i18n18.__)("Top", "elementor"),
|
|
2809
|
-
icon: /* @__PURE__ */
|
|
2829
|
+
icon: /* @__PURE__ */ React57.createElement(import_icons10.SideTopIcon, { fontSize: "tiny" })
|
|
2810
2830
|
},
|
|
2811
2831
|
{
|
|
2812
2832
|
bind: "inline-end",
|
|
2813
2833
|
label: isSiteRtl ? (0, import_i18n18.__)("Left", "elementor") : (0, import_i18n18.__)("Right", "elementor"),
|
|
2814
|
-
icon: isSiteRtl ? /* @__PURE__ */
|
|
2834
|
+
icon: isSiteRtl ? /* @__PURE__ */ React57.createElement(import_icons10.SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React57.createElement(import_icons10.SideRightIcon, { fontSize: "tiny" })
|
|
2815
2835
|
}
|
|
2816
2836
|
],
|
|
2817
2837
|
[
|
|
2818
2838
|
{
|
|
2819
2839
|
bind: "block-end",
|
|
2820
2840
|
label: (0, import_i18n18.__)("Bottom", "elementor"),
|
|
2821
|
-
icon: /* @__PURE__ */
|
|
2841
|
+
icon: /* @__PURE__ */ React57.createElement(import_icons10.SideBottomIcon, { fontSize: "tiny" })
|
|
2822
2842
|
},
|
|
2823
2843
|
{
|
|
2824
2844
|
bind: "inline-start",
|
|
2825
2845
|
label: isSiteRtl ? (0, import_i18n18.__)("Right", "elementor") : (0, import_i18n18.__)("Left", "elementor"),
|
|
2826
|
-
icon: isSiteRtl ? /* @__PURE__ */
|
|
2846
|
+
icon: isSiteRtl ? /* @__PURE__ */ React57.createElement(import_icons10.SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React57.createElement(import_icons10.SideLeftIcon, { fontSize: "tiny" })
|
|
2827
2847
|
}
|
|
2828
2848
|
]
|
|
2829
2849
|
];
|
|
2830
2850
|
}
|
|
2831
2851
|
|
|
2832
2852
|
// src/controls/font-family-control/font-family-control.tsx
|
|
2833
|
-
var
|
|
2853
|
+
var React59 = __toESM(require("react"));
|
|
2834
2854
|
var import_editor_props20 = require("@elementor/editor-props");
|
|
2835
2855
|
var import_icons11 = require("@elementor/icons");
|
|
2836
|
-
var
|
|
2856
|
+
var import_ui44 = require("@elementor/ui");
|
|
2837
2857
|
var import_i18n20 = require("@wordpress/i18n");
|
|
2838
2858
|
|
|
2839
2859
|
// src/components/item-selector.tsx
|
|
2840
|
-
var
|
|
2841
|
-
var
|
|
2860
|
+
var React58 = __toESM(require("react"));
|
|
2861
|
+
var import_react29 = require("react");
|
|
2842
2862
|
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
2843
|
-
var
|
|
2863
|
+
var import_ui43 = require("@elementor/ui");
|
|
2844
2864
|
var import_utils3 = require("@elementor/utils");
|
|
2845
2865
|
var import_i18n19 = require("@wordpress/i18n");
|
|
2846
2866
|
|
|
@@ -2875,7 +2895,7 @@ var ItemSelector = ({
|
|
|
2875
2895
|
disabledItems,
|
|
2876
2896
|
id = "item-selector"
|
|
2877
2897
|
}) => {
|
|
2878
|
-
const [searchValue, setSearchValue] = (0,
|
|
2898
|
+
const [searchValue, setSearchValue] = (0, import_react29.useState)("");
|
|
2879
2899
|
const filteredItemsList = useFilteredItemsList(itemsList, searchValue, disabledItems);
|
|
2880
2900
|
const IconComponent = icon;
|
|
2881
2901
|
const handleSearch = (value) => {
|
|
@@ -2885,7 +2905,7 @@ var ItemSelector = ({
|
|
|
2885
2905
|
setSearchValue("");
|
|
2886
2906
|
onClose();
|
|
2887
2907
|
};
|
|
2888
|
-
return /* @__PURE__ */
|
|
2908
|
+
return /* @__PURE__ */ React58.createElement(import_editor_ui4.PopoverBody, { width: sectionWidth, id }, /* @__PURE__ */ React58.createElement(import_editor_ui4.PopoverHeader, { title, onClose: handleClose, icon: /* @__PURE__ */ React58.createElement(IconComponent, { fontSize: "tiny" }) }), /* @__PURE__ */ React58.createElement(
|
|
2889
2909
|
import_editor_ui4.SearchField,
|
|
2890
2910
|
{
|
|
2891
2911
|
value: searchValue,
|
|
@@ -2893,7 +2913,7 @@ var ItemSelector = ({
|
|
|
2893
2913
|
placeholder: (0, import_i18n19.__)("Search", "elementor"),
|
|
2894
2914
|
id: id + "-search"
|
|
2895
2915
|
}
|
|
2896
|
-
), /* @__PURE__ */
|
|
2916
|
+
), /* @__PURE__ */ React58.createElement(import_ui43.Divider, null), filteredItemsList.length > 0 ? /* @__PURE__ */ React58.createElement(
|
|
2897
2917
|
ItemList,
|
|
2898
2918
|
{
|
|
2899
2919
|
itemListItems: filteredItemsList,
|
|
@@ -2903,8 +2923,8 @@ var ItemSelector = ({
|
|
|
2903
2923
|
itemStyle,
|
|
2904
2924
|
onDebounce
|
|
2905
2925
|
}
|
|
2906
|
-
) : /* @__PURE__ */
|
|
2907
|
-
|
|
2926
|
+
) : /* @__PURE__ */ React58.createElement(
|
|
2927
|
+
import_ui43.Stack,
|
|
2908
2928
|
{
|
|
2909
2929
|
alignItems: "center",
|
|
2910
2930
|
justifyContent: "center",
|
|
@@ -2913,27 +2933,27 @@ var ItemSelector = ({
|
|
|
2913
2933
|
gap: 1.5,
|
|
2914
2934
|
overflow: "hidden"
|
|
2915
2935
|
},
|
|
2916
|
-
/* @__PURE__ */
|
|
2917
|
-
/* @__PURE__ */
|
|
2918
|
-
|
|
2936
|
+
/* @__PURE__ */ React58.createElement(IconComponent, { fontSize: "large" }),
|
|
2937
|
+
/* @__PURE__ */ React58.createElement(import_ui43.Box, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React58.createElement(import_ui43.Typography, { align: "center", variant: "subtitle2", color: "text.secondary" }, (0, import_i18n19.__)("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React58.createElement(
|
|
2938
|
+
import_ui43.Typography,
|
|
2919
2939
|
{
|
|
2920
2940
|
variant: "subtitle2",
|
|
2921
2941
|
color: "text.secondary",
|
|
2922
2942
|
sx: { display: "flex", width: "100%", justifyContent: "center" }
|
|
2923
2943
|
},
|
|
2924
|
-
/* @__PURE__ */
|
|
2925
|
-
/* @__PURE__ */
|
|
2926
|
-
|
|
2944
|
+
/* @__PURE__ */ React58.createElement("span", null, "\u201C"),
|
|
2945
|
+
/* @__PURE__ */ React58.createElement(
|
|
2946
|
+
import_ui43.Box,
|
|
2927
2947
|
{
|
|
2928
2948
|
component: "span",
|
|
2929
2949
|
sx: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" }
|
|
2930
2950
|
},
|
|
2931
2951
|
searchValue
|
|
2932
2952
|
),
|
|
2933
|
-
/* @__PURE__ */
|
|
2953
|
+
/* @__PURE__ */ React58.createElement("span", null, "\u201D.")
|
|
2934
2954
|
)),
|
|
2935
|
-
/* @__PURE__ */
|
|
2936
|
-
|
|
2955
|
+
/* @__PURE__ */ React58.createElement(
|
|
2956
|
+
import_ui43.Typography,
|
|
2937
2957
|
{
|
|
2938
2958
|
align: "center",
|
|
2939
2959
|
variant: "caption",
|
|
@@ -2941,8 +2961,8 @@ var ItemSelector = ({
|
|
|
2941
2961
|
sx: { display: "flex", flexDirection: "column" }
|
|
2942
2962
|
},
|
|
2943
2963
|
(0, import_i18n19.__)("Try something else.", "elementor"),
|
|
2944
|
-
/* @__PURE__ */
|
|
2945
|
-
|
|
2964
|
+
/* @__PURE__ */ React58.createElement(
|
|
2965
|
+
import_ui43.Link,
|
|
2946
2966
|
{
|
|
2947
2967
|
color: "secondary",
|
|
2948
2968
|
variant: "caption",
|
|
@@ -2972,8 +2992,8 @@ var ItemList = ({
|
|
|
2972
2992
|
}
|
|
2973
2993
|
});
|
|
2974
2994
|
}, 100);
|
|
2975
|
-
const memoizedItemStyle = (0,
|
|
2976
|
-
return /* @__PURE__ */
|
|
2995
|
+
const memoizedItemStyle = (0, import_react29.useCallback)((item) => itemStyle(item), [itemStyle]);
|
|
2996
|
+
return /* @__PURE__ */ React58.createElement(
|
|
2977
2997
|
import_editor_ui4.PopoverMenuList,
|
|
2978
2998
|
{
|
|
2979
2999
|
items: itemListItems,
|
|
@@ -2987,8 +3007,8 @@ var ItemList = ({
|
|
|
2987
3007
|
);
|
|
2988
3008
|
};
|
|
2989
3009
|
var useDebounce = (fn, delay) => {
|
|
2990
|
-
const [debouncedFn] = (0,
|
|
2991
|
-
(0,
|
|
3010
|
+
const [debouncedFn] = (0, import_react29.useState)(() => (0, import_utils3.debounce)(fn, delay));
|
|
3011
|
+
(0, import_react29.useEffect)(() => () => debouncedFn.cancel(), [debouncedFn]);
|
|
2992
3012
|
return debouncedFn;
|
|
2993
3013
|
};
|
|
2994
3014
|
|
|
@@ -3007,22 +3027,22 @@ var FontFamilyControl = createControl(
|
|
|
3007
3027
|
disabled,
|
|
3008
3028
|
placeholder
|
|
3009
3029
|
} = useBoundProp(import_editor_props20.stringPropTypeUtil);
|
|
3010
|
-
const popoverState = (0,
|
|
3030
|
+
const popoverState = (0, import_ui44.usePopupState)({ variant: "popover" });
|
|
3011
3031
|
const isShowingPlaceholder = !fontFamily && placeholder;
|
|
3012
|
-
const mapFontSubs =
|
|
3032
|
+
const mapFontSubs = React59.useMemo(() => {
|
|
3013
3033
|
return fontFamilies.map(({ label, fonts }) => ({
|
|
3014
3034
|
label,
|
|
3015
3035
|
items: fonts
|
|
3016
3036
|
}));
|
|
3017
3037
|
}, [fontFamilies]);
|
|
3018
|
-
return /* @__PURE__ */
|
|
3019
|
-
|
|
3038
|
+
return /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(ControlActions, null, /* @__PURE__ */ React59.createElement(
|
|
3039
|
+
import_ui44.UnstableTag,
|
|
3020
3040
|
{
|
|
3021
3041
|
id: "font-family-control",
|
|
3022
3042
|
variant: "outlined",
|
|
3023
3043
|
label: fontFamily || placeholder,
|
|
3024
|
-
endIcon: /* @__PURE__ */
|
|
3025
|
-
...(0,
|
|
3044
|
+
endIcon: /* @__PURE__ */ React59.createElement(import_icons11.ChevronDownIcon, { fontSize: "tiny" }),
|
|
3045
|
+
...(0, import_ui44.bindTrigger)(popoverState),
|
|
3026
3046
|
fullWidth: true,
|
|
3027
3047
|
disabled,
|
|
3028
3048
|
"aria-label": ariaLabel,
|
|
@@ -3033,17 +3053,17 @@ var FontFamilyControl = createControl(
|
|
|
3033
3053
|
textTransform: "capitalize"
|
|
3034
3054
|
} : void 0
|
|
3035
3055
|
}
|
|
3036
|
-
)), /* @__PURE__ */
|
|
3037
|
-
|
|
3056
|
+
)), /* @__PURE__ */ React59.createElement(
|
|
3057
|
+
import_ui44.Popover,
|
|
3038
3058
|
{
|
|
3039
3059
|
disablePortal: true,
|
|
3040
3060
|
disableScrollLock: true,
|
|
3041
3061
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
3042
3062
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
3043
3063
|
sx: { my: 1.5 },
|
|
3044
|
-
...(0,
|
|
3064
|
+
...(0, import_ui44.bindPopover)(popoverState)
|
|
3045
3065
|
},
|
|
3046
|
-
/* @__PURE__ */
|
|
3066
|
+
/* @__PURE__ */ React59.createElement(
|
|
3047
3067
|
ItemSelector,
|
|
3048
3068
|
{
|
|
3049
3069
|
id: "font-family-selector",
|
|
@@ -3063,15 +3083,15 @@ var FontFamilyControl = createControl(
|
|
|
3063
3083
|
);
|
|
3064
3084
|
|
|
3065
3085
|
// src/controls/url-control.tsx
|
|
3066
|
-
var
|
|
3086
|
+
var React60 = __toESM(require("react"));
|
|
3067
3087
|
var import_editor_props21 = require("@elementor/editor-props");
|
|
3068
|
-
var
|
|
3088
|
+
var import_ui45 = require("@elementor/ui");
|
|
3069
3089
|
var UrlControl = createControl(
|
|
3070
3090
|
({ placeholder, ariaLabel }) => {
|
|
3071
3091
|
const { value, setValue, disabled } = useBoundProp(import_editor_props21.urlPropTypeUtil);
|
|
3072
3092
|
const handleChange = (event) => setValue(event.target.value);
|
|
3073
|
-
return /* @__PURE__ */
|
|
3074
|
-
|
|
3093
|
+
return /* @__PURE__ */ React60.createElement(ControlActions, null, /* @__PURE__ */ React60.createElement(
|
|
3094
|
+
import_ui45.TextField,
|
|
3075
3095
|
{
|
|
3076
3096
|
size: "tiny",
|
|
3077
3097
|
fullWidth: true,
|
|
@@ -3088,20 +3108,20 @@ var UrlControl = createControl(
|
|
|
3088
3108
|
);
|
|
3089
3109
|
|
|
3090
3110
|
// src/controls/link-control.tsx
|
|
3091
|
-
var
|
|
3092
|
-
var
|
|
3111
|
+
var React65 = __toESM(require("react"));
|
|
3112
|
+
var import_react32 = require("react");
|
|
3093
3113
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
3094
3114
|
var import_editor_props24 = require("@elementor/editor-props");
|
|
3095
3115
|
var import_icons15 = require("@elementor/icons");
|
|
3096
3116
|
var import_session = require("@elementor/session");
|
|
3097
|
-
var
|
|
3117
|
+
var import_ui49 = require("@elementor/ui");
|
|
3098
3118
|
var import_i18n23 = require("@wordpress/i18n");
|
|
3099
3119
|
|
|
3100
3120
|
// src/components/restricted-link-infotip.tsx
|
|
3101
|
-
var
|
|
3121
|
+
var React61 = __toESM(require("react"));
|
|
3102
3122
|
var import_editor_elements = require("@elementor/editor-elements");
|
|
3103
3123
|
var import_icons12 = require("@elementor/icons");
|
|
3104
|
-
var
|
|
3124
|
+
var import_ui46 = require("@elementor/ui");
|
|
3105
3125
|
var import_i18n21 = require("@wordpress/i18n");
|
|
3106
3126
|
var learnMoreButton = {
|
|
3107
3127
|
label: (0, import_i18n21.__)("Learn More", "elementor"),
|
|
@@ -3125,13 +3145,13 @@ var RestrictedLinkInfotip = ({
|
|
|
3125
3145
|
(0, import_editor_elements.selectElement)(elementId);
|
|
3126
3146
|
}
|
|
3127
3147
|
};
|
|
3128
|
-
const content = /* @__PURE__ */
|
|
3129
|
-
|
|
3148
|
+
const content = /* @__PURE__ */ React61.createElement(
|
|
3149
|
+
import_ui46.Alert,
|
|
3130
3150
|
{
|
|
3131
3151
|
color: "secondary",
|
|
3132
|
-
icon: /* @__PURE__ */
|
|
3133
|
-
action: /* @__PURE__ */
|
|
3134
|
-
|
|
3152
|
+
icon: /* @__PURE__ */ React61.createElement(import_icons12.InfoCircleFilledIcon, null),
|
|
3153
|
+
action: /* @__PURE__ */ React61.createElement(
|
|
3154
|
+
import_ui46.AlertAction,
|
|
3135
3155
|
{
|
|
3136
3156
|
sx: { width: "fit-content" },
|
|
3137
3157
|
variant: "contained",
|
|
@@ -3141,24 +3161,24 @@ var RestrictedLinkInfotip = ({
|
|
|
3141
3161
|
(0, import_i18n21.__)("Take me there", "elementor")
|
|
3142
3162
|
)
|
|
3143
3163
|
},
|
|
3144
|
-
/* @__PURE__ */
|
|
3145
|
-
/* @__PURE__ */
|
|
3164
|
+
/* @__PURE__ */ React61.createElement(import_ui46.AlertTitle, null, (0, import_i18n21.__)("Nested links", "elementor")),
|
|
3165
|
+
/* @__PURE__ */ React61.createElement(import_ui46.Box, { component: "span" }, INFOTIP_CONTENT[reason ?? "descendant"], " ", /* @__PURE__ */ React61.createElement(import_ui46.Link, { href: learnMoreButton.href, target: "_blank", color: "info.main" }, learnMoreButton.label))
|
|
3146
3166
|
);
|
|
3147
|
-
return shouldRestrict && isVisible ? /* @__PURE__ */
|
|
3148
|
-
|
|
3167
|
+
return shouldRestrict && isVisible ? /* @__PURE__ */ React61.createElement(
|
|
3168
|
+
import_ui46.Infotip,
|
|
3149
3169
|
{
|
|
3150
3170
|
placement: "right",
|
|
3151
3171
|
content,
|
|
3152
3172
|
color: "secondary",
|
|
3153
3173
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
3154
3174
|
},
|
|
3155
|
-
/* @__PURE__ */
|
|
3156
|
-
) : /* @__PURE__ */
|
|
3175
|
+
/* @__PURE__ */ React61.createElement(import_ui46.Box, null, children)
|
|
3176
|
+
) : /* @__PURE__ */ React61.createElement(React61.Fragment, null, children);
|
|
3157
3177
|
};
|
|
3158
3178
|
|
|
3159
3179
|
// src/controls/query-control.tsx
|
|
3160
|
-
var
|
|
3161
|
-
var
|
|
3180
|
+
var React63 = __toESM(require("react"));
|
|
3181
|
+
var import_react31 = require("react");
|
|
3162
3182
|
var import_editor_props22 = require("@elementor/editor-props");
|
|
3163
3183
|
var import_http_client2 = require("@elementor/http-client");
|
|
3164
3184
|
var import_icons14 = require("@elementor/icons");
|
|
@@ -3166,11 +3186,11 @@ var import_utils4 = require("@elementor/utils");
|
|
|
3166
3186
|
var import_i18n22 = require("@wordpress/i18n");
|
|
3167
3187
|
|
|
3168
3188
|
// src/components/autocomplete.tsx
|
|
3169
|
-
var
|
|
3170
|
-
var
|
|
3189
|
+
var React62 = __toESM(require("react"));
|
|
3190
|
+
var import_react30 = require("react");
|
|
3171
3191
|
var import_icons13 = require("@elementor/icons");
|
|
3172
|
-
var
|
|
3173
|
-
var Autocomplete = (0,
|
|
3192
|
+
var import_ui47 = require("@elementor/ui");
|
|
3193
|
+
var Autocomplete = (0, import_react30.forwardRef)((props, ref) => {
|
|
3174
3194
|
const {
|
|
3175
3195
|
options,
|
|
3176
3196
|
onOptionChange,
|
|
@@ -3191,8 +3211,8 @@ var Autocomplete = (0, import_react28.forwardRef)((props, ref) => {
|
|
|
3191
3211
|
const valueLength = value?.toString()?.length ?? 0;
|
|
3192
3212
|
const meetsMinLength = valueLength >= minInputLength;
|
|
3193
3213
|
const shouldOpen = meetsMinLength && (allowCustomValues ? optionKeys.length > 0 : true);
|
|
3194
|
-
return /* @__PURE__ */
|
|
3195
|
-
|
|
3214
|
+
return /* @__PURE__ */ React62.createElement(
|
|
3215
|
+
import_ui47.Autocomplete,
|
|
3196
3216
|
{
|
|
3197
3217
|
...restProps,
|
|
3198
3218
|
ref,
|
|
@@ -3212,8 +3232,8 @@ var Autocomplete = (0, import_react28.forwardRef)((props, ref) => {
|
|
|
3212
3232
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
3213
3233
|
isOptionEqualToValue,
|
|
3214
3234
|
filterOptions: () => optionKeys,
|
|
3215
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
3216
|
-
renderInput: (params) => /* @__PURE__ */
|
|
3235
|
+
renderOption: (optionProps, optionId) => /* @__PURE__ */ React62.createElement(import_ui47.Box, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
|
|
3236
|
+
renderInput: (params) => /* @__PURE__ */ React62.createElement(
|
|
3217
3237
|
TextInput,
|
|
3218
3238
|
{
|
|
3219
3239
|
params,
|
|
@@ -3240,8 +3260,8 @@ var TextInput = ({
|
|
|
3240
3260
|
const onChange = (event) => {
|
|
3241
3261
|
handleChange(event.target.value);
|
|
3242
3262
|
};
|
|
3243
|
-
return /* @__PURE__ */
|
|
3244
|
-
|
|
3263
|
+
return /* @__PURE__ */ React62.createElement(
|
|
3264
|
+
import_ui47.TextField,
|
|
3245
3265
|
{
|
|
3246
3266
|
...params,
|
|
3247
3267
|
placeholder,
|
|
@@ -3254,8 +3274,8 @@ var TextInput = ({
|
|
|
3254
3274
|
},
|
|
3255
3275
|
InputProps: {
|
|
3256
3276
|
...params.InputProps,
|
|
3257
|
-
startAdornment: startAdornment ? /* @__PURE__ */
|
|
3258
|
-
endAdornment: /* @__PURE__ */
|
|
3277
|
+
startAdornment: startAdornment ? /* @__PURE__ */ React62.createElement(import_ui47.InputAdornment, { position: "start" }, startAdornment) : params.InputProps.startAdornment,
|
|
3278
|
+
endAdornment: /* @__PURE__ */ React62.createElement(ClearButton, { params, allowClear, handleChange })
|
|
3259
3279
|
}
|
|
3260
3280
|
}
|
|
3261
3281
|
);
|
|
@@ -3264,7 +3284,7 @@ var ClearButton = ({
|
|
|
3264
3284
|
allowClear,
|
|
3265
3285
|
handleChange,
|
|
3266
3286
|
params
|
|
3267
|
-
}) => /* @__PURE__ */
|
|
3287
|
+
}) => /* @__PURE__ */ React62.createElement(import_ui47.InputAdornment, { position: "end" }, allowClear && /* @__PURE__ */ React62.createElement(import_ui47.IconButton, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React62.createElement(import_icons13.XIcon, { fontSize: params.size })));
|
|
3268
3288
|
function findMatchingOption(options, optionId = null) {
|
|
3269
3289
|
const formattedOption = (optionId || "").toString();
|
|
3270
3290
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -3301,7 +3321,7 @@ var QueryControl = createControl((props) => {
|
|
|
3301
3321
|
ariaLabel
|
|
3302
3322
|
} = props || {};
|
|
3303
3323
|
const normalizedPlaceholder = placeholder || (0, import_i18n22.__)("Search", "elementor");
|
|
3304
|
-
const [options, setOptions] = (0,
|
|
3324
|
+
const [options, setOptions] = (0, import_react31.useState)(
|
|
3305
3325
|
generateFirstLoadedOption(value?.value)
|
|
3306
3326
|
);
|
|
3307
3327
|
const onOptionChange = (newValue) => {
|
|
@@ -3339,7 +3359,7 @@ var QueryControl = createControl((props) => {
|
|
|
3339
3359
|
}
|
|
3340
3360
|
debounceFetch({ ...params, term: newValue });
|
|
3341
3361
|
};
|
|
3342
|
-
const debounceFetch = (0,
|
|
3362
|
+
const debounceFetch = (0, import_react31.useMemo)(
|
|
3343
3363
|
() => (0, import_utils4.debounce)(
|
|
3344
3364
|
(queryParams) => fetchOptions(url, queryParams).then((newOptions) => {
|
|
3345
3365
|
setOptions(formatOptions(newOptions));
|
|
@@ -3348,13 +3368,13 @@ var QueryControl = createControl((props) => {
|
|
|
3348
3368
|
),
|
|
3349
3369
|
[url]
|
|
3350
3370
|
);
|
|
3351
|
-
return /* @__PURE__ */
|
|
3371
|
+
return /* @__PURE__ */ React63.createElement(ControlActions, null, /* @__PURE__ */ React63.createElement(
|
|
3352
3372
|
Autocomplete,
|
|
3353
3373
|
{
|
|
3354
3374
|
options,
|
|
3355
3375
|
allowCustomValues,
|
|
3356
3376
|
placeholder: normalizedPlaceholder,
|
|
3357
|
-
startAdornment: /* @__PURE__ */
|
|
3377
|
+
startAdornment: /* @__PURE__ */ React63.createElement(import_icons14.SearchIcon, { fontSize: "tiny" }),
|
|
3358
3378
|
value: value?.value?.id?.value || value?.value,
|
|
3359
3379
|
onOptionChange,
|
|
3360
3380
|
onTextChange,
|
|
@@ -3396,16 +3416,16 @@ function generateFirstLoadedOption(unionValue) {
|
|
|
3396
3416
|
}
|
|
3397
3417
|
|
|
3398
3418
|
// src/controls/switch-control.tsx
|
|
3399
|
-
var
|
|
3419
|
+
var React64 = __toESM(require("react"));
|
|
3400
3420
|
var import_editor_props23 = require("@elementor/editor-props");
|
|
3401
|
-
var
|
|
3421
|
+
var import_ui48 = require("@elementor/ui");
|
|
3402
3422
|
var SwitchControl = createControl(() => {
|
|
3403
3423
|
const { value, setValue, disabled } = useBoundProp(import_editor_props23.booleanPropTypeUtil);
|
|
3404
3424
|
const handleChange = (event) => {
|
|
3405
3425
|
setValue(event.target.checked);
|
|
3406
3426
|
};
|
|
3407
|
-
return /* @__PURE__ */
|
|
3408
|
-
|
|
3427
|
+
return /* @__PURE__ */ React64.createElement(import_ui48.Box, { sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React64.createElement(
|
|
3428
|
+
import_ui48.Switch,
|
|
3409
3429
|
{
|
|
3410
3430
|
checked: !!value,
|
|
3411
3431
|
onChange: handleChange,
|
|
@@ -3423,7 +3443,7 @@ var SIZE6 = "tiny";
|
|
|
3423
3443
|
var LinkControl = createControl((props) => {
|
|
3424
3444
|
const { value, path, setValue, ...propContext } = useBoundProp(import_editor_props24.linkPropTypeUtil);
|
|
3425
3445
|
const [linkSessionValue, setLinkSessionValue] = (0, import_session.useSessionStorage)(path.join("/"));
|
|
3426
|
-
const [isActive, setIsActive] = (0,
|
|
3446
|
+
const [isActive, setIsActive] = (0, import_react32.useState)(!!value);
|
|
3427
3447
|
const {
|
|
3428
3448
|
allowCustomValues = true,
|
|
3429
3449
|
queryOptions,
|
|
@@ -3433,7 +3453,7 @@ var LinkControl = createControl((props) => {
|
|
|
3433
3453
|
label = (0, import_i18n23.__)("Link", "elementor"),
|
|
3434
3454
|
ariaLabel
|
|
3435
3455
|
} = props || {};
|
|
3436
|
-
const [linkInLinkRestriction, setLinkInLinkRestriction] = (0,
|
|
3456
|
+
const [linkInLinkRestriction, setLinkInLinkRestriction] = (0, import_react32.useState)((0, import_editor_elements2.getLinkInLinkRestriction)(elementId));
|
|
3437
3457
|
const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
|
|
3438
3458
|
const onEnabledChange = () => {
|
|
3439
3459
|
setLinkInLinkRestriction((0, import_editor_elements2.getLinkInLinkRestriction)(elementId));
|
|
@@ -3460,8 +3480,8 @@ var LinkControl = createControl((props) => {
|
|
|
3460
3480
|
} : null;
|
|
3461
3481
|
setLinkSessionValue({ ...linkSessionValue, value: valueToSave });
|
|
3462
3482
|
};
|
|
3463
|
-
return /* @__PURE__ */
|
|
3464
|
-
|
|
3483
|
+
return /* @__PURE__ */ React65.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React65.createElement(import_ui49.Stack, { gap: 1.5 }, /* @__PURE__ */ React65.createElement(
|
|
3484
|
+
import_ui49.Stack,
|
|
3465
3485
|
{
|
|
3466
3486
|
direction: "row",
|
|
3467
3487
|
sx: {
|
|
@@ -3470,8 +3490,8 @@ var LinkControl = createControl((props) => {
|
|
|
3470
3490
|
marginInlineEnd: -0.75
|
|
3471
3491
|
}
|
|
3472
3492
|
},
|
|
3473
|
-
/* @__PURE__ */
|
|
3474
|
-
/* @__PURE__ */
|
|
3493
|
+
/* @__PURE__ */ React65.createElement(ControlFormLabel, null, label),
|
|
3494
|
+
/* @__PURE__ */ React65.createElement(RestrictedLinkInfotip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React65.createElement(
|
|
3475
3495
|
ToggleIconControl,
|
|
3476
3496
|
{
|
|
3477
3497
|
disabled: shouldDisableAddingLink,
|
|
@@ -3480,7 +3500,7 @@ var LinkControl = createControl((props) => {
|
|
|
3480
3500
|
label: (0, import_i18n23.__)("Toggle link", "elementor")
|
|
3481
3501
|
}
|
|
3482
3502
|
))
|
|
3483
|
-
), /* @__PURE__ */
|
|
3503
|
+
), /* @__PURE__ */ React65.createElement(import_ui49.Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React65.createElement(import_ui49.Stack, { gap: 1.5 }, /* @__PURE__ */ React65.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React65.createElement(
|
|
3484
3504
|
QueryControl,
|
|
3485
3505
|
{
|
|
3486
3506
|
queryOptions,
|
|
@@ -3490,33 +3510,33 @@ var LinkControl = createControl((props) => {
|
|
|
3490
3510
|
onSetValue: onSaveValueToSession,
|
|
3491
3511
|
ariaLabel: ariaLabel || label
|
|
3492
3512
|
}
|
|
3493
|
-
)), /* @__PURE__ */
|
|
3513
|
+
)), /* @__PURE__ */ React65.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React65.createElement(import_ui49.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React65.createElement(import_ui49.Grid, { item: true }, /* @__PURE__ */ React65.createElement(ControlFormLabel, null, (0, import_i18n23.__)("Open in a new tab", "elementor"))), /* @__PURE__ */ React65.createElement(import_ui49.Grid, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React65.createElement(SwitchControl, null))))))));
|
|
3494
3514
|
});
|
|
3495
3515
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
3496
|
-
return /* @__PURE__ */
|
|
3516
|
+
return /* @__PURE__ */ React65.createElement(import_ui49.IconButton, { size: SIZE6, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React65.createElement(import_icons15.MinusIcon, { fontSize: SIZE6 }) : /* @__PURE__ */ React65.createElement(import_icons15.PlusIcon, { fontSize: SIZE6 }));
|
|
3497
3517
|
};
|
|
3498
3518
|
|
|
3499
3519
|
// src/controls/html-tag-control.tsx
|
|
3500
|
-
var
|
|
3520
|
+
var React67 = __toESM(require("react"));
|
|
3501
3521
|
var import_editor_elements3 = require("@elementor/editor-elements");
|
|
3502
3522
|
var import_editor_props25 = require("@elementor/editor-props");
|
|
3503
3523
|
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
3504
|
-
var
|
|
3524
|
+
var import_ui52 = require("@elementor/ui");
|
|
3505
3525
|
var import_i18n24 = require("@wordpress/i18n");
|
|
3506
3526
|
|
|
3507
3527
|
// src/components/conditional-control-infotip.tsx
|
|
3508
|
-
var
|
|
3528
|
+
var React66 = __toESM(require("react"));
|
|
3509
3529
|
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
3510
|
-
var
|
|
3511
|
-
var
|
|
3530
|
+
var import_ui50 = require("@elementor/ui");
|
|
3531
|
+
var import_ui51 = require("@elementor/ui");
|
|
3512
3532
|
var DEFAULT_COLOR = "secondary";
|
|
3513
|
-
var ConditionalControlInfotip =
|
|
3533
|
+
var ConditionalControlInfotip = React66.forwardRef(
|
|
3514
3534
|
({ children, title, description, alertProps, infotipProps, ...props }, ref) => {
|
|
3515
|
-
const theme = (0,
|
|
3535
|
+
const theme = (0, import_ui50.useTheme)();
|
|
3516
3536
|
const isUiRtl = "rtl" === theme.direction;
|
|
3517
3537
|
const isEnabled = props.isEnabled && (title || description);
|
|
3518
|
-
return /* @__PURE__ */
|
|
3519
|
-
|
|
3538
|
+
return /* @__PURE__ */ React66.createElement(import_ui50.Box, { ref }, isEnabled ? /* @__PURE__ */ React66.createElement(import_ui51.DirectionProvider, { rtl: isUiRtl }, /* @__PURE__ */ React66.createElement(
|
|
3539
|
+
import_ui50.Infotip,
|
|
3520
3540
|
{
|
|
3521
3541
|
placement: "right",
|
|
3522
3542
|
color: DEFAULT_COLOR,
|
|
@@ -3533,14 +3553,14 @@ var ConditionalControlInfotip = React64.forwardRef(
|
|
|
3533
3553
|
}
|
|
3534
3554
|
},
|
|
3535
3555
|
...infotipProps,
|
|
3536
|
-
content: /* @__PURE__ */
|
|
3556
|
+
content: /* @__PURE__ */ React66.createElement(
|
|
3537
3557
|
import_editor_ui5.InfoAlert,
|
|
3538
3558
|
{
|
|
3539
3559
|
color: DEFAULT_COLOR,
|
|
3540
3560
|
sx: { width: 300, px: 1.5, py: 2 },
|
|
3541
3561
|
...alertProps
|
|
3542
3562
|
},
|
|
3543
|
-
/* @__PURE__ */
|
|
3563
|
+
/* @__PURE__ */ React66.createElement(import_ui50.Box, { sx: { flexDirection: "column", display: "flex", gap: 0.5 } }, /* @__PURE__ */ React66.createElement(import_ui50.AlertTitle, null, title), /* @__PURE__ */ React66.createElement(import_ui50.Box, null, description))
|
|
3544
3564
|
)
|
|
3545
3565
|
},
|
|
3546
3566
|
children
|
|
@@ -3549,7 +3569,7 @@ var ConditionalControlInfotip = React64.forwardRef(
|
|
|
3549
3569
|
);
|
|
3550
3570
|
|
|
3551
3571
|
// src/controls/html-tag-control.tsx
|
|
3552
|
-
var StyledSelect = (0,
|
|
3572
|
+
var StyledSelect = (0, import_ui52.styled)(import_ui52.Select)(() => ({ ".MuiSelect-select.Mui-disabled": { cursor: "not-allowed" } }));
|
|
3553
3573
|
var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} }) => {
|
|
3554
3574
|
const { value, setValue, disabled, placeholder } = useBoundProp(import_editor_props25.stringPropTypeUtil);
|
|
3555
3575
|
const handleChange = (event) => {
|
|
@@ -3576,10 +3596,10 @@ var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} })
|
|
|
3576
3596
|
}
|
|
3577
3597
|
const placeholderOption = findOptionByValue(placeholder);
|
|
3578
3598
|
const displayText = placeholderOption?.label || placeholder;
|
|
3579
|
-
return /* @__PURE__ */
|
|
3599
|
+
return /* @__PURE__ */ React67.createElement(import_ui52.Typography, { component: "span", variant: "caption", color: "text.tertiary" }, displayText);
|
|
3580
3600
|
};
|
|
3581
3601
|
const findOptionByValue = (searchValue) => options.find((opt) => opt.value === searchValue);
|
|
3582
|
-
return /* @__PURE__ */
|
|
3602
|
+
return /* @__PURE__ */ React67.createElement(ControlActions, null, /* @__PURE__ */ React67.createElement(ConditionalControlInfotip, { ...infoTipProps }, /* @__PURE__ */ React67.createElement(
|
|
3583
3603
|
StyledSelect,
|
|
3584
3604
|
{
|
|
3585
3605
|
sx: { overflow: "hidden", cursor: disabled ? "not-allowed" : void 0 },
|
|
@@ -3591,16 +3611,16 @@ var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} })
|
|
|
3591
3611
|
disabled,
|
|
3592
3612
|
fullWidth: true
|
|
3593
3613
|
},
|
|
3594
|
-
options.map(({ label, ...props }) => /* @__PURE__ */
|
|
3614
|
+
options.map(({ label, ...props }) => /* @__PURE__ */ React67.createElement(import_editor_ui6.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, label))
|
|
3595
3615
|
)));
|
|
3596
3616
|
});
|
|
3597
3617
|
|
|
3598
3618
|
// src/controls/gap-control.tsx
|
|
3599
|
-
var
|
|
3600
|
-
var
|
|
3619
|
+
var React68 = __toESM(require("react"));
|
|
3620
|
+
var import_react33 = require("react");
|
|
3601
3621
|
var import_editor_props26 = require("@elementor/editor-props");
|
|
3602
3622
|
var import_icons16 = require("@elementor/icons");
|
|
3603
|
-
var
|
|
3623
|
+
var import_ui53 = require("@elementor/ui");
|
|
3604
3624
|
var import_i18n25 = require("@wordpress/i18n");
|
|
3605
3625
|
var GapControl = ({ label }) => {
|
|
3606
3626
|
const {
|
|
@@ -3609,7 +3629,7 @@ var GapControl = ({ label }) => {
|
|
|
3609
3629
|
propType,
|
|
3610
3630
|
disabled: directionDisabled
|
|
3611
3631
|
} = useBoundProp(import_editor_props26.layoutDirectionPropTypeUtil);
|
|
3612
|
-
const stackRef = (0,
|
|
3632
|
+
const stackRef = (0, import_react33.useRef)(null);
|
|
3613
3633
|
const { value: sizeValue, setValue: setSizeValue, disabled: sizeDisabled } = useBoundProp(import_editor_props26.sizePropTypeUtil);
|
|
3614
3634
|
const isLinked = !directionValue && !sizeValue ? true : !!sizeValue;
|
|
3615
3635
|
const onLinkToggle = () => {
|
|
@@ -3628,8 +3648,8 @@ var GapControl = ({ label }) => {
|
|
|
3628
3648
|
const linkedLabel = (0, import_i18n25.__)("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
3629
3649
|
const unlinkedLabel = (0, import_i18n25.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
3630
3650
|
const disabled = sizeDisabled || directionDisabled;
|
|
3631
|
-
return /* @__PURE__ */
|
|
3632
|
-
|
|
3651
|
+
return /* @__PURE__ */ React68.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React68.createElement(import_ui53.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React68.createElement(ControlLabel, null, label), /* @__PURE__ */ React68.createElement(import_ui53.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React68.createElement(
|
|
3652
|
+
import_ui53.ToggleButton,
|
|
3633
3653
|
{
|
|
3634
3654
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
3635
3655
|
size: "tiny",
|
|
@@ -3639,8 +3659,8 @@ var GapControl = ({ label }) => {
|
|
|
3639
3659
|
onChange: onLinkToggle,
|
|
3640
3660
|
disabled
|
|
3641
3661
|
},
|
|
3642
|
-
/* @__PURE__ */
|
|
3643
|
-
))), /* @__PURE__ */
|
|
3662
|
+
/* @__PURE__ */ React68.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
3663
|
+
))), /* @__PURE__ */ React68.createElement(import_ui53.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(ControlFormLabel, null, (0, import_i18n25.__)("Column", "elementor"))), /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(Control4, { bind: "column", isLinked, anchorRef: stackRef }))), /* @__PURE__ */ React68.createElement(import_ui53.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(ControlFormLabel, null, (0, import_i18n25.__)("Row", "elementor"))), /* @__PURE__ */ React68.createElement(import_ui53.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(Control4, { bind: "row", isLinked, anchorRef: stackRef })))));
|
|
3644
3664
|
};
|
|
3645
3665
|
var Control4 = ({
|
|
3646
3666
|
bind,
|
|
@@ -3648,18 +3668,18 @@ var Control4 = ({
|
|
|
3648
3668
|
anchorRef
|
|
3649
3669
|
}) => {
|
|
3650
3670
|
if (isLinked) {
|
|
3651
|
-
return /* @__PURE__ */
|
|
3671
|
+
return /* @__PURE__ */ React68.createElement(SizeControl, { anchorRef });
|
|
3652
3672
|
}
|
|
3653
|
-
return /* @__PURE__ */
|
|
3673
|
+
return /* @__PURE__ */ React68.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React68.createElement(SizeControl, { anchorRef }));
|
|
3654
3674
|
};
|
|
3655
3675
|
|
|
3656
3676
|
// src/controls/aspect-ratio-control.tsx
|
|
3657
|
-
var
|
|
3658
|
-
var
|
|
3677
|
+
var React69 = __toESM(require("react"));
|
|
3678
|
+
var import_react34 = require("react");
|
|
3659
3679
|
var import_editor_props27 = require("@elementor/editor-props");
|
|
3660
3680
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
3661
3681
|
var import_icons17 = require("@elementor/icons");
|
|
3662
|
-
var
|
|
3682
|
+
var import_ui54 = require("@elementor/ui");
|
|
3663
3683
|
var import_i18n26 = require("@wordpress/i18n");
|
|
3664
3684
|
var RATIO_OPTIONS = [
|
|
3665
3685
|
{ label: (0, import_i18n26.__)("Auto", "elementor"), value: "auto" },
|
|
@@ -3676,13 +3696,13 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3676
3696
|
const { value: aspectRatioValue, setValue: setAspectRatioValue, disabled } = useBoundProp(import_editor_props27.stringPropTypeUtil);
|
|
3677
3697
|
const isCustomSelected = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
3678
3698
|
const [initialWidth, initialHeight] = isCustomSelected ? aspectRatioValue.split("/") : ["", ""];
|
|
3679
|
-
const [isCustom, setIsCustom] = (0,
|
|
3680
|
-
const [customWidth, setCustomWidth] = (0,
|
|
3681
|
-
const [customHeight, setCustomHeight] = (0,
|
|
3682
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
3699
|
+
const [isCustom, setIsCustom] = (0, import_react34.useState)(isCustomSelected);
|
|
3700
|
+
const [customWidth, setCustomWidth] = (0, import_react34.useState)(initialWidth);
|
|
3701
|
+
const [customHeight, setCustomHeight] = (0, import_react34.useState)(initialHeight);
|
|
3702
|
+
const [selectedValue, setSelectedValue] = (0, import_react34.useState)(
|
|
3683
3703
|
isCustomSelected ? CUSTOM_RATIO : aspectRatioValue || ""
|
|
3684
3704
|
);
|
|
3685
|
-
(0,
|
|
3705
|
+
(0, import_react34.useEffect)(() => {
|
|
3686
3706
|
const isCustomValue = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
3687
3707
|
if (isCustomValue) {
|
|
3688
3708
|
const [width, height] = aspectRatioValue.split("/");
|
|
@@ -3721,8 +3741,8 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3721
3741
|
setAspectRatioValue(`${customWidth}/${newHeight}`);
|
|
3722
3742
|
}
|
|
3723
3743
|
};
|
|
3724
|
-
return /* @__PURE__ */
|
|
3725
|
-
|
|
3744
|
+
return /* @__PURE__ */ React69.createElement(ControlActions, null, /* @__PURE__ */ React69.createElement(import_ui54.Stack, { direction: "column", gap: 2 }, /* @__PURE__ */ React69.createElement(import_ui54.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React69.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(ControlLabel, null, label)), /* @__PURE__ */ React69.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(
|
|
3745
|
+
import_ui54.Select,
|
|
3726
3746
|
{
|
|
3727
3747
|
size: "tiny",
|
|
3728
3748
|
displayEmpty: true,
|
|
@@ -3733,10 +3753,10 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3733
3753
|
fullWidth: true
|
|
3734
3754
|
},
|
|
3735
3755
|
[...RATIO_OPTIONS, { label: (0, import_i18n26.__)("Custom", "elementor"), value: CUSTOM_RATIO }].map(
|
|
3736
|
-
({ label: optionLabel, ...props }) => /* @__PURE__ */
|
|
3756
|
+
({ label: optionLabel, ...props }) => /* @__PURE__ */ React69.createElement(import_editor_ui7.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
|
|
3737
3757
|
)
|
|
3738
|
-
))), isCustom && /* @__PURE__ */
|
|
3739
|
-
|
|
3758
|
+
))), isCustom && /* @__PURE__ */ React69.createElement(import_ui54.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React69.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(
|
|
3759
|
+
import_ui54.TextField,
|
|
3740
3760
|
{
|
|
3741
3761
|
size: "tiny",
|
|
3742
3762
|
type: "number",
|
|
@@ -3745,11 +3765,11 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3745
3765
|
value: customWidth,
|
|
3746
3766
|
onChange: handleCustomWidthChange,
|
|
3747
3767
|
InputProps: {
|
|
3748
|
-
startAdornment: /* @__PURE__ */
|
|
3768
|
+
startAdornment: /* @__PURE__ */ React69.createElement(import_icons17.ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
|
|
3749
3769
|
}
|
|
3750
3770
|
}
|
|
3751
|
-
)), /* @__PURE__ */
|
|
3752
|
-
|
|
3771
|
+
)), /* @__PURE__ */ React69.createElement(import_ui54.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React69.createElement(
|
|
3772
|
+
import_ui54.TextField,
|
|
3753
3773
|
{
|
|
3754
3774
|
size: "tiny",
|
|
3755
3775
|
type: "number",
|
|
@@ -3758,26 +3778,26 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3758
3778
|
value: customHeight,
|
|
3759
3779
|
onChange: handleCustomHeightChange,
|
|
3760
3780
|
InputProps: {
|
|
3761
|
-
startAdornment: /* @__PURE__ */
|
|
3781
|
+
startAdornment: /* @__PURE__ */ React69.createElement(import_icons17.ArrowsMoveVerticalIcon, { fontSize: "tiny" })
|
|
3762
3782
|
}
|
|
3763
3783
|
}
|
|
3764
3784
|
)))));
|
|
3765
3785
|
});
|
|
3766
3786
|
|
|
3767
3787
|
// src/controls/svg-media-control.tsx
|
|
3768
|
-
var
|
|
3769
|
-
var
|
|
3788
|
+
var React71 = __toESM(require("react"));
|
|
3789
|
+
var import_react36 = require("react");
|
|
3770
3790
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
3771
3791
|
var import_editor_props28 = require("@elementor/editor-props");
|
|
3772
3792
|
var import_icons18 = require("@elementor/icons");
|
|
3773
|
-
var
|
|
3793
|
+
var import_ui56 = require("@elementor/ui");
|
|
3774
3794
|
var import_wp_media2 = require("@elementor/wp-media");
|
|
3775
3795
|
var import_i18n28 = require("@wordpress/i18n");
|
|
3776
3796
|
|
|
3777
3797
|
// src/components/enable-unfiltered-modal.tsx
|
|
3778
|
-
var
|
|
3779
|
-
var
|
|
3780
|
-
var
|
|
3798
|
+
var React70 = __toESM(require("react"));
|
|
3799
|
+
var import_react35 = require("react");
|
|
3800
|
+
var import_ui55 = require("@elementor/ui");
|
|
3781
3801
|
var import_i18n27 = require("@wordpress/i18n");
|
|
3782
3802
|
var ADMIN_TITLE_TEXT = (0, import_i18n27.__)("Enable Unfiltered Uploads", "elementor");
|
|
3783
3803
|
var ADMIN_CONTENT_TEXT = (0, import_i18n27.__)(
|
|
@@ -3792,7 +3812,7 @@ var ADMIN_FAILED_CONTENT_TEXT_PT2 = (0, import_i18n27.__)(
|
|
|
3792
3812
|
var WAIT_FOR_CLOSE_TIMEOUT_MS = 300;
|
|
3793
3813
|
var EnableUnfilteredModal = (props) => {
|
|
3794
3814
|
const { mutateAsync, isPending } = useUpdateUnfilteredFilesUpload();
|
|
3795
|
-
const [isError, setIsError] = (0,
|
|
3815
|
+
const [isError, setIsError] = (0, import_react35.useState)(false);
|
|
3796
3816
|
const onClose = (enabled) => {
|
|
3797
3817
|
props.onClose(enabled);
|
|
3798
3818
|
setTimeout(() => setIsError(false), WAIT_FOR_CLOSE_TIMEOUT_MS);
|
|
@@ -3810,10 +3830,10 @@ var EnableUnfilteredModal = (props) => {
|
|
|
3810
3830
|
}
|
|
3811
3831
|
};
|
|
3812
3832
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
3813
|
-
return /* @__PURE__ */
|
|
3833
|
+
return /* @__PURE__ */ React70.createElement(AdminDialog, { ...dialogProps });
|
|
3814
3834
|
};
|
|
3815
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
3816
|
-
|
|
3835
|
+
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React70.createElement(import_ui55.Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React70.createElement(import_ui55.DialogHeader, { logo: false }, /* @__PURE__ */ React70.createElement(import_ui55.DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React70.createElement(import_ui55.Divider, null), /* @__PURE__ */ React70.createElement(import_ui55.DialogContent, null, /* @__PURE__ */ React70.createElement(import_ui55.DialogContentText, null, isError ? /* @__PURE__ */ React70.createElement(React70.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React70.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React70.createElement(import_ui55.DialogActions, null, /* @__PURE__ */ React70.createElement(import_ui55.Button, { size: "medium", color: "secondary", onClick: () => onClose(false) }, (0, import_i18n27.__)("Cancel", "elementor")), /* @__PURE__ */ React70.createElement(
|
|
3836
|
+
import_ui55.Button,
|
|
3817
3837
|
{
|
|
3818
3838
|
size: "medium",
|
|
3819
3839
|
onClick: () => handleEnable(),
|
|
@@ -3821,7 +3841,7 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
3821
3841
|
color: "primary",
|
|
3822
3842
|
disabled: isPending
|
|
3823
3843
|
},
|
|
3824
|
-
isPending ? /* @__PURE__ */
|
|
3844
|
+
isPending ? /* @__PURE__ */ React70.createElement(import_ui55.CircularProgress, { size: 24 }) : (0, import_i18n27.__)("Enable", "elementor")
|
|
3825
3845
|
)));
|
|
3826
3846
|
|
|
3827
3847
|
// src/controls/svg-media-control.tsx
|
|
@@ -3829,7 +3849,7 @@ var TILE_SIZE = 8;
|
|
|
3829
3849
|
var TILE_WHITE = "transparent";
|
|
3830
3850
|
var TILE_BLACK = "#c1c1c1";
|
|
3831
3851
|
var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
|
|
3832
|
-
var StyledCard = (0,
|
|
3852
|
+
var StyledCard = (0, import_ui56.styled)(import_ui56.Card)`
|
|
3833
3853
|
background-color: white;
|
|
3834
3854
|
background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
|
|
3835
3855
|
background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
|
|
@@ -3838,7 +3858,7 @@ var StyledCard = (0, import_ui54.styled)(import_ui54.Card)`
|
|
|
3838
3858
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
3839
3859
|
border: none;
|
|
3840
3860
|
`;
|
|
3841
|
-
var StyledCardMediaContainer = (0,
|
|
3861
|
+
var StyledCardMediaContainer = (0, import_ui56.styled)(import_ui56.Stack)`
|
|
3842
3862
|
position: relative;
|
|
3843
3863
|
height: 140px;
|
|
3844
3864
|
object-fit: contain;
|
|
@@ -3855,7 +3875,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
3855
3875
|
const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
|
|
3856
3876
|
const src = attachment?.url ?? url?.value ?? null;
|
|
3857
3877
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
3858
|
-
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0,
|
|
3878
|
+
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0, import_react36.useState)(false);
|
|
3859
3879
|
const { canUser } = (0, import_editor_current_user.useCurrentUserCapabilities)();
|
|
3860
3880
|
const canManageOptions = canUser("manage_options");
|
|
3861
3881
|
const { open } = (0, import_wp_media2.useWpMediaFrame)({
|
|
@@ -3887,19 +3907,19 @@ var SvgMediaControl = createControl(() => {
|
|
|
3887
3907
|
};
|
|
3888
3908
|
const infotipProps = {
|
|
3889
3909
|
title: (0, import_i18n28.__)("Sorry, you can't upload that file yet.", "elementor"),
|
|
3890
|
-
description: /* @__PURE__ */
|
|
3910
|
+
description: /* @__PURE__ */ React71.createElement(React71.Fragment, null, (0, import_i18n28.__)("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React71.createElement("br", null), (0, import_i18n28.__)("file uploads.", "elementor")),
|
|
3891
3911
|
isEnabled: !canManageOptions
|
|
3892
3912
|
};
|
|
3893
|
-
return /* @__PURE__ */
|
|
3894
|
-
|
|
3913
|
+
return /* @__PURE__ */ React71.createElement(import_ui56.Stack, { gap: 1 }, /* @__PURE__ */ React71.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React71.createElement(ControlActions, null, /* @__PURE__ */ React71.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React71.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React71.createElement(import_ui56.CircularProgress, { role: "progressbar" }) : /* @__PURE__ */ React71.createElement(
|
|
3914
|
+
import_ui56.CardMedia,
|
|
3895
3915
|
{
|
|
3896
3916
|
component: "img",
|
|
3897
3917
|
image: src,
|
|
3898
3918
|
alt: (0, import_i18n28.__)("Preview SVG", "elementor"),
|
|
3899
3919
|
sx: { maxHeight: "140px", width: "50px" }
|
|
3900
3920
|
}
|
|
3901
|
-
)), /* @__PURE__ */
|
|
3902
|
-
|
|
3921
|
+
)), /* @__PURE__ */ React71.createElement(
|
|
3922
|
+
import_ui56.CardOverlay,
|
|
3903
3923
|
{
|
|
3904
3924
|
sx: {
|
|
3905
3925
|
"&:hover": {
|
|
@@ -3907,8 +3927,8 @@ var SvgMediaControl = createControl(() => {
|
|
|
3907
3927
|
}
|
|
3908
3928
|
}
|
|
3909
3929
|
},
|
|
3910
|
-
/* @__PURE__ */
|
|
3911
|
-
|
|
3930
|
+
/* @__PURE__ */ React71.createElement(import_ui56.Stack, { gap: 1 }, /* @__PURE__ */ React71.createElement(
|
|
3931
|
+
import_ui56.Button,
|
|
3912
3932
|
{
|
|
3913
3933
|
size: "tiny",
|
|
3914
3934
|
color: "inherit",
|
|
@@ -3916,13 +3936,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
3916
3936
|
onClick: () => handleClick(MODE_BROWSE)
|
|
3917
3937
|
},
|
|
3918
3938
|
(0, import_i18n28.__)("Select SVG", "elementor")
|
|
3919
|
-
), /* @__PURE__ */
|
|
3920
|
-
|
|
3939
|
+
), /* @__PURE__ */ React71.createElement(ConditionalControlInfotip, { ...infotipProps }, /* @__PURE__ */ React71.createElement("span", null, /* @__PURE__ */ React71.createElement(import_ui56.ThemeProvider, { colorScheme: canManageOptions ? "light" : "dark" }, /* @__PURE__ */ React71.createElement(
|
|
3940
|
+
import_ui56.Button,
|
|
3921
3941
|
{
|
|
3922
3942
|
size: "tiny",
|
|
3923
3943
|
variant: "text",
|
|
3924
3944
|
color: "inherit",
|
|
3925
|
-
startIcon: /* @__PURE__ */
|
|
3945
|
+
startIcon: /* @__PURE__ */ React71.createElement(import_icons18.UploadIcon, null),
|
|
3926
3946
|
disabled: canManageOptions ? false : true,
|
|
3927
3947
|
onClick: () => canManageOptions && handleClick(MODE_UPLOAD)
|
|
3928
3948
|
},
|
|
@@ -3932,15 +3952,15 @@ var SvgMediaControl = createControl(() => {
|
|
|
3932
3952
|
});
|
|
3933
3953
|
|
|
3934
3954
|
// src/controls/background-control/background-control.tsx
|
|
3935
|
-
var
|
|
3955
|
+
var React78 = __toESM(require("react"));
|
|
3936
3956
|
var import_editor_props34 = require("@elementor/editor-props");
|
|
3937
|
-
var
|
|
3957
|
+
var import_ui64 = require("@elementor/ui");
|
|
3938
3958
|
var import_i18n34 = require("@wordpress/i18n");
|
|
3939
3959
|
|
|
3940
3960
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
3941
|
-
var
|
|
3961
|
+
var React77 = __toESM(require("react"));
|
|
3942
3962
|
var import_editor_props33 = require("@elementor/editor-props");
|
|
3943
|
-
var
|
|
3963
|
+
var import_ui63 = require("@elementor/ui");
|
|
3944
3964
|
var import_wp_media3 = require("@elementor/wp-media");
|
|
3945
3965
|
var import_i18n33 = require("@wordpress/i18n");
|
|
3946
3966
|
|
|
@@ -3949,9 +3969,9 @@ var import_env = require("@elementor/env");
|
|
|
3949
3969
|
var { env } = (0, import_env.parseEnv)("@elementor/editor-controls");
|
|
3950
3970
|
|
|
3951
3971
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
3952
|
-
var
|
|
3972
|
+
var React72 = __toESM(require("react"));
|
|
3953
3973
|
var import_editor_props29 = require("@elementor/editor-props");
|
|
3954
|
-
var
|
|
3974
|
+
var import_ui57 = require("@elementor/ui");
|
|
3955
3975
|
var BackgroundGradientColorControl = createControl(() => {
|
|
3956
3976
|
const { value, setValue } = useBoundProp(import_editor_props29.backgroundGradientOverlayPropTypeUtil);
|
|
3957
3977
|
const handleChange = (newValue) => {
|
|
@@ -3989,8 +4009,8 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
3989
4009
|
positions: positions?.value.split(" ")
|
|
3990
4010
|
};
|
|
3991
4011
|
};
|
|
3992
|
-
return /* @__PURE__ */
|
|
3993
|
-
|
|
4012
|
+
return /* @__PURE__ */ React72.createElement(
|
|
4013
|
+
import_ui57.UnstableGradientBox,
|
|
3994
4014
|
{
|
|
3995
4015
|
sx: { width: "auto", padding: 1.5 },
|
|
3996
4016
|
value: normalizeValue(),
|
|
@@ -4014,35 +4034,35 @@ var initialBackgroundGradientOverlay = import_editor_props29.backgroundGradientO
|
|
|
4014
4034
|
});
|
|
4015
4035
|
|
|
4016
4036
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
4017
|
-
var
|
|
4037
|
+
var React73 = __toESM(require("react"));
|
|
4018
4038
|
var import_icons19 = require("@elementor/icons");
|
|
4019
|
-
var
|
|
4039
|
+
var import_ui58 = require("@elementor/ui");
|
|
4020
4040
|
var import_i18n29 = require("@wordpress/i18n");
|
|
4021
4041
|
var attachmentControlOptions = [
|
|
4022
4042
|
{
|
|
4023
4043
|
value: "fixed",
|
|
4024
4044
|
label: (0, import_i18n29.__)("Fixed", "elementor"),
|
|
4025
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4045
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(import_icons19.PinIcon, { fontSize: size }),
|
|
4026
4046
|
showTooltip: true
|
|
4027
4047
|
},
|
|
4028
4048
|
{
|
|
4029
4049
|
value: "scroll",
|
|
4030
4050
|
label: (0, import_i18n29.__)("Scroll", "elementor"),
|
|
4031
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4051
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(import_icons19.PinnedOffIcon, { fontSize: size }),
|
|
4032
4052
|
showTooltip: true
|
|
4033
4053
|
}
|
|
4034
4054
|
];
|
|
4035
4055
|
var BackgroundImageOverlayAttachment = () => {
|
|
4036
|
-
return /* @__PURE__ */
|
|
4056
|
+
return /* @__PURE__ */ React73.createElement(PopoverGridContainer, null, /* @__PURE__ */ React73.createElement(import_ui58.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(ControlFormLabel, null, (0, import_i18n29.__)("Attachment", "elementor"))), /* @__PURE__ */ React73.createElement(import_ui58.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React73.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
4037
4057
|
};
|
|
4038
4058
|
|
|
4039
4059
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
4040
|
-
var
|
|
4041
|
-
var
|
|
4060
|
+
var React74 = __toESM(require("react"));
|
|
4061
|
+
var import_react37 = require("react");
|
|
4042
4062
|
var import_editor_props30 = require("@elementor/editor-props");
|
|
4043
4063
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
4044
4064
|
var import_icons20 = require("@elementor/icons");
|
|
4045
|
-
var
|
|
4065
|
+
var import_ui59 = require("@elementor/ui");
|
|
4046
4066
|
var import_i18n30 = require("@wordpress/i18n");
|
|
4047
4067
|
var backgroundPositionOptions = [
|
|
4048
4068
|
{ label: (0, import_i18n30.__)("Center center", "elementor"), value: "center center" },
|
|
@@ -4060,7 +4080,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4060
4080
|
const backgroundImageOffsetContext = useBoundProp(import_editor_props30.backgroundImagePositionOffsetPropTypeUtil);
|
|
4061
4081
|
const stringPropContext = useBoundProp(import_editor_props30.stringPropTypeUtil);
|
|
4062
4082
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
4063
|
-
const rowRef = (0,
|
|
4083
|
+
const rowRef = (0, import_react37.useRef)(null);
|
|
4064
4084
|
const handlePositionChange = (event) => {
|
|
4065
4085
|
const value = event.target.value || null;
|
|
4066
4086
|
if (value === "custom") {
|
|
@@ -4069,8 +4089,8 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4069
4089
|
stringPropContext.setValue(value);
|
|
4070
4090
|
}
|
|
4071
4091
|
};
|
|
4072
|
-
return /* @__PURE__ */
|
|
4073
|
-
|
|
4092
|
+
return /* @__PURE__ */ React74.createElement(import_ui59.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React74.createElement(import_ui59.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React74.createElement(PopoverGridContainer, null, /* @__PURE__ */ React74.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(ControlFormLabel, null, (0, import_i18n30.__)("Position", "elementor"))), /* @__PURE__ */ React74.createElement(import_ui59.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React74.createElement(ControlActions, null, /* @__PURE__ */ React74.createElement(
|
|
4093
|
+
import_ui59.Select,
|
|
4074
4094
|
{
|
|
4075
4095
|
fullWidth: true,
|
|
4076
4096
|
size: "tiny",
|
|
@@ -4078,18 +4098,18 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4078
4098
|
disabled: stringPropContext.disabled,
|
|
4079
4099
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
4080
4100
|
},
|
|
4081
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
4082
|
-
))))), isCustom ? /* @__PURE__ */
|
|
4101
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React74.createElement(import_editor_ui8.MenuListItem, { key: value, value: value ?? "" }, label))
|
|
4102
|
+
))))), isCustom ? /* @__PURE__ */ React74.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React74.createElement(import_ui59.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React74.createElement(import_ui59.Grid, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React74.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React74.createElement(
|
|
4083
4103
|
SizeControl,
|
|
4084
4104
|
{
|
|
4085
|
-
startIcon: /* @__PURE__ */
|
|
4105
|
+
startIcon: /* @__PURE__ */ React74.createElement(import_icons20.LetterXIcon, { fontSize: "tiny" }),
|
|
4086
4106
|
anchorRef: rowRef,
|
|
4087
4107
|
min: -Number.MAX_SAFE_INTEGER
|
|
4088
4108
|
}
|
|
4089
|
-
))), /* @__PURE__ */
|
|
4109
|
+
))), /* @__PURE__ */ React74.createElement(import_ui59.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React74.createElement(
|
|
4090
4110
|
SizeControl,
|
|
4091
4111
|
{
|
|
4092
|
-
startIcon: /* @__PURE__ */
|
|
4112
|
+
startIcon: /* @__PURE__ */ React74.createElement(import_icons20.LetterYIcon, { fontSize: "tiny" }),
|
|
4093
4113
|
anchorRef: rowRef,
|
|
4094
4114
|
min: -Number.MAX_SAFE_INTEGER
|
|
4095
4115
|
}
|
|
@@ -4097,70 +4117,70 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4097
4117
|
};
|
|
4098
4118
|
|
|
4099
4119
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
4100
|
-
var
|
|
4120
|
+
var React75 = __toESM(require("react"));
|
|
4101
4121
|
var import_icons21 = require("@elementor/icons");
|
|
4102
|
-
var
|
|
4122
|
+
var import_ui60 = require("@elementor/ui");
|
|
4103
4123
|
var import_i18n31 = require("@wordpress/i18n");
|
|
4104
4124
|
var repeatControlOptions = [
|
|
4105
4125
|
{
|
|
4106
4126
|
value: "repeat",
|
|
4107
4127
|
label: (0, import_i18n31.__)("Repeat", "elementor"),
|
|
4108
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4128
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.GridDotsIcon, { fontSize: size }),
|
|
4109
4129
|
showTooltip: true
|
|
4110
4130
|
},
|
|
4111
4131
|
{
|
|
4112
4132
|
value: "repeat-x",
|
|
4113
4133
|
label: (0, import_i18n31.__)("Repeat-x", "elementor"),
|
|
4114
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4134
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.DotsHorizontalIcon, { fontSize: size }),
|
|
4115
4135
|
showTooltip: true
|
|
4116
4136
|
},
|
|
4117
4137
|
{
|
|
4118
4138
|
value: "repeat-y",
|
|
4119
4139
|
label: (0, import_i18n31.__)("Repeat-y", "elementor"),
|
|
4120
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4140
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.DotsVerticalIcon, { fontSize: size }),
|
|
4121
4141
|
showTooltip: true
|
|
4122
4142
|
},
|
|
4123
4143
|
{
|
|
4124
4144
|
value: "no-repeat",
|
|
4125
4145
|
label: (0, import_i18n31.__)("No-repeat", "elementor"),
|
|
4126
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4146
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons21.XIcon, { fontSize: size }),
|
|
4127
4147
|
showTooltip: true
|
|
4128
4148
|
}
|
|
4129
4149
|
];
|
|
4130
4150
|
var BackgroundImageOverlayRepeat = () => {
|
|
4131
|
-
return /* @__PURE__ */
|
|
4151
|
+
return /* @__PURE__ */ React75.createElement(PopoverGridContainer, null, /* @__PURE__ */ React75.createElement(import_ui60.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlFormLabel, null, (0, import_i18n31.__)("Repeat", "elementor"))), /* @__PURE__ */ React75.createElement(import_ui60.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React75.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
4132
4152
|
};
|
|
4133
4153
|
|
|
4134
4154
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
4135
|
-
var
|
|
4136
|
-
var
|
|
4155
|
+
var React76 = __toESM(require("react"));
|
|
4156
|
+
var import_react38 = require("react");
|
|
4137
4157
|
var import_editor_props31 = require("@elementor/editor-props");
|
|
4138
4158
|
var import_icons22 = require("@elementor/icons");
|
|
4139
|
-
var
|
|
4159
|
+
var import_ui61 = require("@elementor/ui");
|
|
4140
4160
|
var import_i18n32 = require("@wordpress/i18n");
|
|
4141
4161
|
var sizeControlOptions = [
|
|
4142
4162
|
{
|
|
4143
4163
|
value: "auto",
|
|
4144
4164
|
label: (0, import_i18n32.__)("Auto", "elementor"),
|
|
4145
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4165
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons22.LetterAIcon, { fontSize: size }),
|
|
4146
4166
|
showTooltip: true
|
|
4147
4167
|
},
|
|
4148
4168
|
{
|
|
4149
4169
|
value: "cover",
|
|
4150
4170
|
label: (0, import_i18n32.__)("Cover", "elementor"),
|
|
4151
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4171
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons22.ArrowsMaximizeIcon, { fontSize: size }),
|
|
4152
4172
|
showTooltip: true
|
|
4153
4173
|
},
|
|
4154
4174
|
{
|
|
4155
4175
|
value: "contain",
|
|
4156
4176
|
label: (0, import_i18n32.__)("Contain", "elementor"),
|
|
4157
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4177
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons22.ArrowBarBothIcon, { fontSize: size }),
|
|
4158
4178
|
showTooltip: true
|
|
4159
4179
|
},
|
|
4160
4180
|
{
|
|
4161
4181
|
value: "custom",
|
|
4162
4182
|
label: (0, import_i18n32.__)("Custom", "elementor"),
|
|
4163
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4183
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(import_icons22.PencilIcon, { fontSize: size }),
|
|
4164
4184
|
showTooltip: true
|
|
4165
4185
|
}
|
|
4166
4186
|
];
|
|
@@ -4168,7 +4188,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4168
4188
|
const backgroundImageScaleContext = useBoundProp(import_editor_props31.backgroundImageSizeScalePropTypeUtil);
|
|
4169
4189
|
const stringPropContext = useBoundProp(import_editor_props31.stringPropTypeUtil);
|
|
4170
4190
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
4171
|
-
const rowRef = (0,
|
|
4191
|
+
const rowRef = (0, import_react38.useRef)(null);
|
|
4172
4192
|
const handleSizeChange = (size) => {
|
|
4173
4193
|
if (size === "custom") {
|
|
4174
4194
|
backgroundImageScaleContext.setValue({ width: null, height: null });
|
|
@@ -4176,7 +4196,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4176
4196
|
stringPropContext.setValue(size);
|
|
4177
4197
|
}
|
|
4178
4198
|
};
|
|
4179
|
-
return /* @__PURE__ */
|
|
4199
|
+
return /* @__PURE__ */ React76.createElement(import_ui61.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React76.createElement(import_ui61.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React76.createElement(PopoverGridContainer, null, /* @__PURE__ */ React76.createElement(import_ui61.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(ControlFormLabel, null, (0, import_i18n32.__)("Size", "elementor"))), /* @__PURE__ */ React76.createElement(import_ui61.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React76.createElement(
|
|
4180
4200
|
ControlToggleButtonGroup,
|
|
4181
4201
|
{
|
|
4182
4202
|
exclusive: true,
|
|
@@ -4185,17 +4205,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4185
4205
|
disabled: stringPropContext.disabled,
|
|
4186
4206
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
4187
4207
|
}
|
|
4188
|
-
)))), isCustom ? /* @__PURE__ */
|
|
4208
|
+
)))), isCustom ? /* @__PURE__ */ React76.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React76.createElement(import_ui61.Grid, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React76.createElement(PopoverGridContainer, null, /* @__PURE__ */ React76.createElement(import_ui61.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React76.createElement(
|
|
4189
4209
|
SizeControl,
|
|
4190
4210
|
{
|
|
4191
|
-
startIcon: /* @__PURE__ */
|
|
4211
|
+
startIcon: /* @__PURE__ */ React76.createElement(import_icons22.ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
|
|
4192
4212
|
extendedOptions: ["auto"],
|
|
4193
4213
|
anchorRef: rowRef
|
|
4194
4214
|
}
|
|
4195
|
-
))), /* @__PURE__ */
|
|
4215
|
+
))), /* @__PURE__ */ React76.createElement(import_ui61.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React76.createElement(
|
|
4196
4216
|
SizeControl,
|
|
4197
4217
|
{
|
|
4198
|
-
startIcon: /* @__PURE__ */
|
|
4218
|
+
startIcon: /* @__PURE__ */ React76.createElement(import_icons22.ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
|
|
4199
4219
|
extendedOptions: ["auto"],
|
|
4200
4220
|
anchorRef: rowRef
|
|
4201
4221
|
}
|
|
@@ -4203,9 +4223,9 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4203
4223
|
};
|
|
4204
4224
|
|
|
4205
4225
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
4206
|
-
var
|
|
4226
|
+
var import_react39 = require("react");
|
|
4207
4227
|
var import_editor_props32 = require("@elementor/editor-props");
|
|
4208
|
-
var
|
|
4228
|
+
var import_ui62 = require("@elementor/ui");
|
|
4209
4229
|
var useBackgroundTabsHistory = ({
|
|
4210
4230
|
color: initialBackgroundColorOverlay2,
|
|
4211
4231
|
image: initialBackgroundImageOverlay,
|
|
@@ -4223,8 +4243,8 @@ var useBackgroundTabsHistory = ({
|
|
|
4223
4243
|
}
|
|
4224
4244
|
return "image";
|
|
4225
4245
|
};
|
|
4226
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
4227
|
-
const valuesHistory = (0,
|
|
4246
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui62.useTabs)(getCurrentOverlayType());
|
|
4247
|
+
const valuesHistory = (0, import_react39.useRef)({
|
|
4228
4248
|
image: initialBackgroundImageOverlay,
|
|
4229
4249
|
color: initialBackgroundColorOverlay2,
|
|
4230
4250
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -4299,22 +4319,22 @@ var backgroundResolutionOptions = [
|
|
|
4299
4319
|
];
|
|
4300
4320
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
4301
4321
|
const { propType, value: overlayValues, setValue } = useBoundProp(import_editor_props33.backgroundOverlayPropTypeUtil);
|
|
4302
|
-
return /* @__PURE__ */
|
|
4322
|
+
return /* @__PURE__ */ React77.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React77.createElement(
|
|
4303
4323
|
ControlRepeater,
|
|
4304
4324
|
{
|
|
4305
4325
|
initial: getInitialBackgroundOverlay(),
|
|
4306
4326
|
propTypeUtil: import_editor_props33.backgroundOverlayPropTypeUtil
|
|
4307
4327
|
},
|
|
4308
|
-
/* @__PURE__ */
|
|
4309
|
-
/* @__PURE__ */
|
|
4328
|
+
/* @__PURE__ */ React77.createElement(RepeaterHeader, { label: (0, import_i18n33.__)("Overlay", "elementor") }, /* @__PURE__ */ React77.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
4329
|
+
/* @__PURE__ */ React77.createElement(ItemsContainer, null, /* @__PURE__ */ React77.createElement(
|
|
4310
4330
|
Item,
|
|
4311
4331
|
{
|
|
4312
4332
|
Icon: ItemIcon2,
|
|
4313
4333
|
Label: ItemLabel2,
|
|
4314
|
-
actions: /* @__PURE__ */
|
|
4334
|
+
actions: /* @__PURE__ */ React77.createElement(React77.Fragment, null, /* @__PURE__ */ React77.createElement(DuplicateItemAction, null), /* @__PURE__ */ React77.createElement(DisableItemAction, null), /* @__PURE__ */ React77.createElement(RemoveItemAction, null))
|
|
4315
4335
|
}
|
|
4316
4336
|
)),
|
|
4317
|
-
/* @__PURE__ */
|
|
4337
|
+
/* @__PURE__ */ React77.createElement(EditItemPopover, null, /* @__PURE__ */ React77.createElement(ItemContent, null))
|
|
4318
4338
|
));
|
|
4319
4339
|
});
|
|
4320
4340
|
var ItemContent = () => {
|
|
@@ -4324,27 +4344,27 @@ var ItemContent = () => {
|
|
|
4324
4344
|
gradient: initialBackgroundGradientOverlay.value
|
|
4325
4345
|
});
|
|
4326
4346
|
const { rowRef } = useRepeaterContext();
|
|
4327
|
-
return /* @__PURE__ */
|
|
4328
|
-
|
|
4347
|
+
return /* @__PURE__ */ React77.createElement(import_ui63.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React77.createElement(import_ui63.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React77.createElement(
|
|
4348
|
+
import_ui63.Tabs,
|
|
4329
4349
|
{
|
|
4330
4350
|
size: "small",
|
|
4331
4351
|
variant: "fullWidth",
|
|
4332
4352
|
...getTabsProps(),
|
|
4333
4353
|
"aria-label": (0, import_i18n33.__)("Background Overlay", "elementor")
|
|
4334
4354
|
},
|
|
4335
|
-
/* @__PURE__ */
|
|
4336
|
-
/* @__PURE__ */
|
|
4337
|
-
/* @__PURE__ */
|
|
4338
|
-
)), /* @__PURE__ */
|
|
4355
|
+
/* @__PURE__ */ React77.createElement(import_ui63.Tab, { label: (0, import_i18n33.__)("Image", "elementor"), ...getTabProps("image") }),
|
|
4356
|
+
/* @__PURE__ */ React77.createElement(import_ui63.Tab, { label: (0, import_i18n33.__)("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
4357
|
+
/* @__PURE__ */ React77.createElement(import_ui63.Tab, { label: (0, import_i18n33.__)("Color", "elementor"), ...getTabProps("color") })
|
|
4358
|
+
)), /* @__PURE__ */ React77.createElement(import_ui63.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React77.createElement(PopoverContent, null, /* @__PURE__ */ React77.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React77.createElement(import_ui63.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React77.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React77.createElement(import_ui63.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React77.createElement(PopoverContent, null, /* @__PURE__ */ React77.createElement(ColorOverlayContent, { anchorEl: rowRef }))));
|
|
4339
4359
|
};
|
|
4340
4360
|
var ItemIcon2 = ({ value }) => {
|
|
4341
4361
|
switch (value.$$type) {
|
|
4342
4362
|
case "background-image-overlay":
|
|
4343
|
-
return /* @__PURE__ */
|
|
4363
|
+
return /* @__PURE__ */ React77.createElement(ItemIconImage, { value });
|
|
4344
4364
|
case "background-color-overlay":
|
|
4345
|
-
return /* @__PURE__ */
|
|
4365
|
+
return /* @__PURE__ */ React77.createElement(ItemIconColor, { value });
|
|
4346
4366
|
case "background-gradient-overlay":
|
|
4347
|
-
return /* @__PURE__ */
|
|
4367
|
+
return /* @__PURE__ */ React77.createElement(ItemIconGradient, { value });
|
|
4348
4368
|
default:
|
|
4349
4369
|
return null;
|
|
4350
4370
|
}
|
|
@@ -4357,12 +4377,12 @@ var extractColorFrom = (prop) => {
|
|
|
4357
4377
|
};
|
|
4358
4378
|
var ItemIconColor = ({ value: prop }) => {
|
|
4359
4379
|
const color = extractColorFrom(prop);
|
|
4360
|
-
return /* @__PURE__ */
|
|
4380
|
+
return /* @__PURE__ */ React77.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: color });
|
|
4361
4381
|
};
|
|
4362
4382
|
var ItemIconImage = ({ value }) => {
|
|
4363
4383
|
const { imageUrl } = useImage(value);
|
|
4364
|
-
return /* @__PURE__ */
|
|
4365
|
-
|
|
4384
|
+
return /* @__PURE__ */ React77.createElement(
|
|
4385
|
+
import_ui63.CardMedia,
|
|
4366
4386
|
{
|
|
4367
4387
|
image: imageUrl,
|
|
4368
4388
|
sx: (theme) => ({
|
|
@@ -4376,43 +4396,43 @@ var ItemIconImage = ({ value }) => {
|
|
|
4376
4396
|
};
|
|
4377
4397
|
var ItemIconGradient = ({ value }) => {
|
|
4378
4398
|
const gradient = getGradientValue(value);
|
|
4379
|
-
return /* @__PURE__ */
|
|
4399
|
+
return /* @__PURE__ */ React77.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: gradient });
|
|
4380
4400
|
};
|
|
4381
4401
|
var ItemLabel2 = ({ value }) => {
|
|
4382
4402
|
switch (value.$$type) {
|
|
4383
4403
|
case "background-image-overlay":
|
|
4384
|
-
return /* @__PURE__ */
|
|
4404
|
+
return /* @__PURE__ */ React77.createElement(ItemLabelImage, { value });
|
|
4385
4405
|
case "background-color-overlay":
|
|
4386
|
-
return /* @__PURE__ */
|
|
4406
|
+
return /* @__PURE__ */ React77.createElement(ItemLabelColor, { value });
|
|
4387
4407
|
case "background-gradient-overlay":
|
|
4388
|
-
return /* @__PURE__ */
|
|
4408
|
+
return /* @__PURE__ */ React77.createElement(ItemLabelGradient, { value });
|
|
4389
4409
|
default:
|
|
4390
4410
|
return null;
|
|
4391
4411
|
}
|
|
4392
4412
|
};
|
|
4393
4413
|
var ItemLabelColor = ({ value: prop }) => {
|
|
4394
4414
|
const color = extractColorFrom(prop);
|
|
4395
|
-
return /* @__PURE__ */
|
|
4415
|
+
return /* @__PURE__ */ React77.createElement("span", null, color);
|
|
4396
4416
|
};
|
|
4397
4417
|
var ItemLabelImage = ({ value }) => {
|
|
4398
4418
|
const { imageTitle } = useImage(value);
|
|
4399
|
-
return /* @__PURE__ */
|
|
4419
|
+
return /* @__PURE__ */ React77.createElement("span", null, imageTitle);
|
|
4400
4420
|
};
|
|
4401
4421
|
var ItemLabelGradient = ({ value }) => {
|
|
4402
4422
|
if (value.value.type.value === "linear") {
|
|
4403
|
-
return /* @__PURE__ */
|
|
4423
|
+
return /* @__PURE__ */ React77.createElement("span", null, (0, import_i18n33.__)("Linear Gradient", "elementor"));
|
|
4404
4424
|
}
|
|
4405
|
-
return /* @__PURE__ */
|
|
4425
|
+
return /* @__PURE__ */ React77.createElement("span", null, (0, import_i18n33.__)("Radial Gradient", "elementor"));
|
|
4406
4426
|
};
|
|
4407
4427
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
4408
4428
|
const propContext = useBoundProp(import_editor_props33.backgroundColorOverlayPropTypeUtil);
|
|
4409
|
-
return /* @__PURE__ */
|
|
4429
|
+
return /* @__PURE__ */ React77.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React77.createElement(ColorControl, { anchorEl })));
|
|
4410
4430
|
};
|
|
4411
4431
|
var ImageOverlayContent = () => {
|
|
4412
4432
|
const propContext = useBoundProp(import_editor_props33.backgroundImageOverlayPropTypeUtil);
|
|
4413
|
-
return /* @__PURE__ */
|
|
4433
|
+
return /* @__PURE__ */ React77.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React77.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React77.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React77.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React77.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React77.createElement(BackgroundImageOverlayAttachment, null)));
|
|
4414
4434
|
};
|
|
4415
|
-
var StyledUnstableColorIndicator3 = (0,
|
|
4435
|
+
var StyledUnstableColorIndicator3 = (0, import_ui63.styled)(import_ui63.UnstableColorIndicator)(({ theme }) => ({
|
|
4416
4436
|
height: "1rem",
|
|
4417
4437
|
width: "1rem",
|
|
4418
4438
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -4458,26 +4478,26 @@ var colorLabel = (0, import_i18n34.__)("Color", "elementor");
|
|
|
4458
4478
|
var clipLabel = (0, import_i18n34.__)("Clipping", "elementor");
|
|
4459
4479
|
var BackgroundControl = createControl(() => {
|
|
4460
4480
|
const propContext = useBoundProp(import_editor_props34.backgroundPropTypeUtil);
|
|
4461
|
-
return /* @__PURE__ */
|
|
4481
|
+
return /* @__PURE__ */ React78.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React78.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React78.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React78.createElement(BackgroundColorField, null), /* @__PURE__ */ React78.createElement(BackgroundClipField, null));
|
|
4462
4482
|
});
|
|
4463
4483
|
var BackgroundColorField = () => {
|
|
4464
|
-
return /* @__PURE__ */
|
|
4484
|
+
return /* @__PURE__ */ React78.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React78.createElement(import_ui64.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React78.createElement(import_ui64.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React78.createElement(ControlLabel, null, colorLabel)), /* @__PURE__ */ React78.createElement(import_ui64.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React78.createElement(ColorControl, null))));
|
|
4465
4485
|
};
|
|
4466
4486
|
var BackgroundClipField = () => {
|
|
4467
|
-
return /* @__PURE__ */
|
|
4487
|
+
return /* @__PURE__ */ React78.createElement(PropKeyProvider, { bind: "clip" }, /* @__PURE__ */ React78.createElement(import_ui64.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React78.createElement(import_ui64.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React78.createElement(ControlLabel, null, clipLabel)), /* @__PURE__ */ React78.createElement(import_ui64.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React78.createElement(SelectControl, { options: clipOptions }))));
|
|
4468
4488
|
};
|
|
4469
4489
|
|
|
4470
4490
|
// src/controls/repeatable-control.tsx
|
|
4471
|
-
var
|
|
4472
|
-
var
|
|
4491
|
+
var React79 = __toESM(require("react"));
|
|
4492
|
+
var import_react41 = require("react");
|
|
4473
4493
|
var import_editor_props35 = require("@elementor/editor-props");
|
|
4474
|
-
var
|
|
4494
|
+
var import_ui65 = require("@elementor/ui");
|
|
4475
4495
|
|
|
4476
4496
|
// src/hooks/use-repeatable-control-context.ts
|
|
4477
|
-
var
|
|
4478
|
-
var RepeatableControlContext = (0,
|
|
4497
|
+
var import_react40 = require("react");
|
|
4498
|
+
var RepeatableControlContext = (0, import_react40.createContext)(void 0);
|
|
4479
4499
|
var useRepeatableControlContext = () => {
|
|
4480
|
-
const context = (0,
|
|
4500
|
+
const context = (0, import_react40.useContext)(RepeatableControlContext);
|
|
4481
4501
|
if (!context) {
|
|
4482
4502
|
throw new Error("useRepeatableControlContext must be used within RepeatableControl");
|
|
4483
4503
|
}
|
|
@@ -4502,11 +4522,11 @@ var RepeatableControl = createControl(
|
|
|
4502
4522
|
if (!childPropTypeUtil) {
|
|
4503
4523
|
return null;
|
|
4504
4524
|
}
|
|
4505
|
-
const childArrayPropTypeUtil = (0,
|
|
4525
|
+
const childArrayPropTypeUtil = (0, import_react41.useMemo)(
|
|
4506
4526
|
() => (0, import_editor_props35.createArrayPropUtils)(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
|
|
4507
4527
|
[childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
|
|
4508
4528
|
);
|
|
4509
|
-
const contextValue = (0,
|
|
4529
|
+
const contextValue = (0, import_react41.useMemo)(
|
|
4510
4530
|
() => ({
|
|
4511
4531
|
...childControlConfig,
|
|
4512
4532
|
placeholder: placeholder || "",
|
|
@@ -4515,13 +4535,13 @@ var RepeatableControl = createControl(
|
|
|
4515
4535
|
[childControlConfig, placeholder, patternLabel]
|
|
4516
4536
|
);
|
|
4517
4537
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
4518
|
-
return /* @__PURE__ */
|
|
4538
|
+
return /* @__PURE__ */ React79.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React79.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React79.createElement(
|
|
4519
4539
|
ControlRepeater,
|
|
4520
4540
|
{
|
|
4521
4541
|
initial: childPropTypeUtil.create(initialValues || null),
|
|
4522
4542
|
propTypeUtil: childArrayPropTypeUtil
|
|
4523
4543
|
},
|
|
4524
|
-
/* @__PURE__ */
|
|
4544
|
+
/* @__PURE__ */ React79.createElement(RepeaterHeader, { label: repeaterLabel }, /* @__PURE__ */ React79.createElement(
|
|
4525
4545
|
TooltipAddItemAction,
|
|
4526
4546
|
{
|
|
4527
4547
|
...addItemTooltipProps,
|
|
@@ -4529,22 +4549,22 @@ var RepeatableControl = createControl(
|
|
|
4529
4549
|
ariaLabel: repeaterLabel
|
|
4530
4550
|
}
|
|
4531
4551
|
)),
|
|
4532
|
-
/* @__PURE__ */
|
|
4552
|
+
/* @__PURE__ */ React79.createElement(ItemsContainer, { isSortable: false }, /* @__PURE__ */ React79.createElement(
|
|
4533
4553
|
Item,
|
|
4534
4554
|
{
|
|
4535
4555
|
Icon: ItemIcon3,
|
|
4536
4556
|
Label: ItemLabel3,
|
|
4537
|
-
actions: /* @__PURE__ */
|
|
4557
|
+
actions: /* @__PURE__ */ React79.createElement(React79.Fragment, null, showDuplicate && /* @__PURE__ */ React79.createElement(DuplicateItemAction, null), showToggle && /* @__PURE__ */ React79.createElement(DisableItemAction, null), /* @__PURE__ */ React79.createElement(RemoveItemAction, null))
|
|
4538
4558
|
}
|
|
4539
4559
|
)),
|
|
4540
|
-
/* @__PURE__ */
|
|
4560
|
+
/* @__PURE__ */ React79.createElement(EditItemPopover, null, /* @__PURE__ */ React79.createElement(Content2, null))
|
|
4541
4561
|
)));
|
|
4542
4562
|
}
|
|
4543
4563
|
);
|
|
4544
|
-
var ItemIcon3 = () => /* @__PURE__ */
|
|
4564
|
+
var ItemIcon3 = () => /* @__PURE__ */ React79.createElement(React79.Fragment, null);
|
|
4545
4565
|
var Content2 = () => {
|
|
4546
4566
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
4547
|
-
return /* @__PURE__ */
|
|
4567
|
+
return /* @__PURE__ */ React79.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React79.createElement(PopoverGridContainer, null, /* @__PURE__ */ React79.createElement(ChildControl, { ...props })));
|
|
4548
4568
|
};
|
|
4549
4569
|
var interpolate = (template, data) => {
|
|
4550
4570
|
if (!data) {
|
|
@@ -4620,7 +4640,7 @@ var ItemLabel3 = ({ value }) => {
|
|
|
4620
4640
|
const showPlaceholder = shouldShowPlaceholder(patternLabel, value);
|
|
4621
4641
|
const label = showPlaceholder ? placeholder : interpolate(patternLabel, value);
|
|
4622
4642
|
const color = showPlaceholder ? "text.tertiary" : "text.primary";
|
|
4623
|
-
return /* @__PURE__ */
|
|
4643
|
+
return /* @__PURE__ */ React79.createElement(import_ui65.Box, { component: "span", color }, label);
|
|
4624
4644
|
};
|
|
4625
4645
|
var getAllProperties = (pattern) => {
|
|
4626
4646
|
const properties = pattern.match(PLACEHOLDER_REGEX)?.map((match) => match.slice(2, -1)) || [];
|
|
@@ -4628,10 +4648,10 @@ var getAllProperties = (pattern) => {
|
|
|
4628
4648
|
};
|
|
4629
4649
|
|
|
4630
4650
|
// src/controls/key-value-control.tsx
|
|
4631
|
-
var
|
|
4632
|
-
var
|
|
4651
|
+
var React80 = __toESM(require("react"));
|
|
4652
|
+
var import_react42 = require("react");
|
|
4633
4653
|
var import_editor_props36 = require("@elementor/editor-props");
|
|
4634
|
-
var
|
|
4654
|
+
var import_ui66 = require("@elementor/ui");
|
|
4635
4655
|
var import_i18n35 = require("@wordpress/i18n");
|
|
4636
4656
|
|
|
4637
4657
|
// src/utils/escape-html-attr.ts
|
|
@@ -4649,9 +4669,9 @@ var escapeHtmlAttr = (value) => {
|
|
|
4649
4669
|
// src/controls/key-value-control.tsx
|
|
4650
4670
|
var KeyValueControl = createControl((props = {}) => {
|
|
4651
4671
|
const { value, setValue, ...propContext } = useBoundProp(import_editor_props36.keyValuePropTypeUtil);
|
|
4652
|
-
const [keyError, setKeyError] = (0,
|
|
4653
|
-
const [valueError, setValueError] = (0,
|
|
4654
|
-
const [sessionState, setSessionState] = (0,
|
|
4672
|
+
const [keyError, setKeyError] = (0, import_react42.useState)("");
|
|
4673
|
+
const [valueError, setValueError] = (0, import_react42.useState)("");
|
|
4674
|
+
const [sessionState, setSessionState] = (0, import_react42.useState)({
|
|
4655
4675
|
key: value?.key?.value || "",
|
|
4656
4676
|
value: value?.value?.value || ""
|
|
4657
4677
|
});
|
|
@@ -4661,7 +4681,7 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4661
4681
|
keyHelper: void 0,
|
|
4662
4682
|
valueHelper: void 0
|
|
4663
4683
|
};
|
|
4664
|
-
const [keyRegex, valueRegex, errMsg] = (0,
|
|
4684
|
+
const [keyRegex, valueRegex, errMsg] = (0, import_react42.useMemo)(
|
|
4665
4685
|
() => [
|
|
4666
4686
|
props.regexKey ? new RegExp(props.regexKey) : void 0,
|
|
4667
4687
|
props.regexValue ? new RegExp(props.regexValue) : void 0,
|
|
@@ -4714,14 +4734,14 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4714
4734
|
});
|
|
4715
4735
|
}
|
|
4716
4736
|
};
|
|
4717
|
-
return /* @__PURE__ */
|
|
4737
|
+
return /* @__PURE__ */ React80.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { container: true, gap: 1.5 }, /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React80.createElement(import_ui66.FormLabel, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React80.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React80.createElement(
|
|
4718
4738
|
TextControl,
|
|
4719
4739
|
{
|
|
4720
4740
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.key) : sessionState.key,
|
|
4721
4741
|
error: !!keyError,
|
|
4722
4742
|
helperText: keyHelper
|
|
4723
4743
|
}
|
|
4724
|
-
)), !!keyError && /* @__PURE__ */
|
|
4744
|
+
)), !!keyError && /* @__PURE__ */ React80.createElement(import_ui66.FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React80.createElement(import_ui66.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React80.createElement(import_ui66.FormLabel, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React80.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React80.createElement(
|
|
4725
4745
|
TextControl,
|
|
4726
4746
|
{
|
|
4727
4747
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.value) : sessionState.value,
|
|
@@ -4729,15 +4749,15 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4729
4749
|
inputDisabled: !!keyError,
|
|
4730
4750
|
helperText: valueHelper
|
|
4731
4751
|
}
|
|
4732
|
-
)), !!valueError && /* @__PURE__ */
|
|
4752
|
+
)), !!valueError && /* @__PURE__ */ React80.createElement(import_ui66.FormHelperText, { error: true }, valueError))));
|
|
4733
4753
|
});
|
|
4734
4754
|
|
|
4735
4755
|
// src/controls/position-control.tsx
|
|
4736
|
-
var
|
|
4756
|
+
var React81 = __toESM(require("react"));
|
|
4737
4757
|
var import_editor_props37 = require("@elementor/editor-props");
|
|
4738
4758
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
4739
4759
|
var import_icons23 = require("@elementor/icons");
|
|
4740
|
-
var
|
|
4760
|
+
var import_ui67 = require("@elementor/ui");
|
|
4741
4761
|
var import_i18n36 = require("@wordpress/i18n");
|
|
4742
4762
|
var positionOptions = [
|
|
4743
4763
|
{ label: (0, import_i18n36.__)("Center center", "elementor"), value: "center center" },
|
|
@@ -4763,8 +4783,8 @@ var PositionControl = () => {
|
|
|
4763
4783
|
stringPropContext.setValue(value);
|
|
4764
4784
|
}
|
|
4765
4785
|
};
|
|
4766
|
-
return /* @__PURE__ */
|
|
4767
|
-
|
|
4786
|
+
return /* @__PURE__ */ React81.createElement(import_ui67.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React81.createElement(import_ui67.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React81.createElement(import_ui67.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React81.createElement(import_ui67.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React81.createElement(ControlFormLabel, null, (0, import_i18n36.__)("Object position", "elementor"))), /* @__PURE__ */ React81.createElement(import_ui67.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React81.createElement(
|
|
4787
|
+
import_ui67.Select,
|
|
4768
4788
|
{
|
|
4769
4789
|
size: "tiny",
|
|
4770
4790
|
disabled: stringPropContext.disabled,
|
|
@@ -4772,28 +4792,28 @@ var PositionControl = () => {
|
|
|
4772
4792
|
onChange: handlePositionChange,
|
|
4773
4793
|
fullWidth: true
|
|
4774
4794
|
},
|
|
4775
|
-
positionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
4776
|
-
)))), isCustom && /* @__PURE__ */
|
|
4795
|
+
positionOptions.map(({ label, value }) => /* @__PURE__ */ React81.createElement(import_editor_ui9.MenuListItem, { key: value, value: value ?? "" }, label))
|
|
4796
|
+
)))), isCustom && /* @__PURE__ */ React81.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React81.createElement(import_ui67.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React81.createElement(import_ui67.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React81.createElement(import_ui67.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React81.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React81.createElement(
|
|
4777
4797
|
SizeControl,
|
|
4778
4798
|
{
|
|
4779
|
-
startIcon: /* @__PURE__ */
|
|
4799
|
+
startIcon: /* @__PURE__ */ React81.createElement(import_icons23.LetterXIcon, { fontSize: "tiny" }),
|
|
4780
4800
|
min: -Number.MAX_SAFE_INTEGER
|
|
4781
4801
|
}
|
|
4782
|
-
))), /* @__PURE__ */
|
|
4802
|
+
))), /* @__PURE__ */ React81.createElement(import_ui67.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React81.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React81.createElement(
|
|
4783
4803
|
SizeControl,
|
|
4784
4804
|
{
|
|
4785
|
-
startIcon: /* @__PURE__ */
|
|
4805
|
+
startIcon: /* @__PURE__ */ React81.createElement(import_icons23.LetterYIcon, { fontSize: "tiny" }),
|
|
4786
4806
|
min: -Number.MAX_SAFE_INTEGER
|
|
4787
4807
|
}
|
|
4788
4808
|
)))))));
|
|
4789
4809
|
};
|
|
4790
4810
|
|
|
4791
4811
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
4792
|
-
var
|
|
4793
|
-
var
|
|
4812
|
+
var React94 = __toESM(require("react"));
|
|
4813
|
+
var import_react48 = require("react");
|
|
4794
4814
|
var import_editor_props46 = require("@elementor/editor-props");
|
|
4795
4815
|
var import_icons30 = require("@elementor/icons");
|
|
4796
|
-
var
|
|
4816
|
+
var import_ui80 = require("@elementor/ui");
|
|
4797
4817
|
var import_i18n46 = require("@wordpress/i18n");
|
|
4798
4818
|
|
|
4799
4819
|
// src/controls/transform-control/initial-values.ts
|
|
@@ -4843,24 +4863,24 @@ var initialSkewValue = import_editor_props38.skewTransformPropTypeUtil.create({
|
|
|
4843
4863
|
});
|
|
4844
4864
|
|
|
4845
4865
|
// src/controls/transform-control/transform-content.tsx
|
|
4846
|
-
var
|
|
4847
|
-
var
|
|
4866
|
+
var React88 = __toESM(require("react"));
|
|
4867
|
+
var import_ui75 = require("@elementor/ui");
|
|
4848
4868
|
var import_i18n41 = require("@wordpress/i18n");
|
|
4849
4869
|
|
|
4850
4870
|
// src/controls/transform-control/functions/move.tsx
|
|
4851
|
-
var
|
|
4852
|
-
var
|
|
4871
|
+
var React83 = __toESM(require("react"));
|
|
4872
|
+
var import_react43 = require("react");
|
|
4853
4873
|
var import_editor_props39 = require("@elementor/editor-props");
|
|
4854
4874
|
var import_icons24 = require("@elementor/icons");
|
|
4855
|
-
var
|
|
4875
|
+
var import_ui69 = require("@elementor/ui");
|
|
4856
4876
|
var import_i18n37 = require("@wordpress/i18n");
|
|
4857
4877
|
|
|
4858
4878
|
// src/controls/transform-control/functions/axis-row.tsx
|
|
4859
|
-
var
|
|
4860
|
-
var
|
|
4879
|
+
var React82 = __toESM(require("react"));
|
|
4880
|
+
var import_ui68 = require("@elementor/ui");
|
|
4861
4881
|
var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "angle" }) => {
|
|
4862
4882
|
const safeId = label.replace(/\s+/g, "-").toLowerCase();
|
|
4863
|
-
return /* @__PURE__ */
|
|
4883
|
+
return /* @__PURE__ */ React82.createElement(import_ui68.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React82.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React82.createElement(import_ui68.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React82.createElement(ControlLabel, { htmlFor: safeId }, label)), /* @__PURE__ */ React82.createElement(import_ui68.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React82.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React82.createElement(
|
|
4864
4884
|
SizeControl,
|
|
4865
4885
|
{
|
|
4866
4886
|
anchorRef,
|
|
@@ -4879,26 +4899,26 @@ var moveAxisControls = [
|
|
|
4879
4899
|
{
|
|
4880
4900
|
label: (0, import_i18n37.__)("Move X", "elementor"),
|
|
4881
4901
|
bind: "x",
|
|
4882
|
-
startIcon: /* @__PURE__ */
|
|
4902
|
+
startIcon: /* @__PURE__ */ React83.createElement(import_icons24.ArrowRightIcon, { fontSize: "tiny" }),
|
|
4883
4903
|
units: ["px", "%", "em", "rem", "vw"]
|
|
4884
4904
|
},
|
|
4885
4905
|
{
|
|
4886
4906
|
label: (0, import_i18n37.__)("Move Y", "elementor"),
|
|
4887
4907
|
bind: "y",
|
|
4888
|
-
startIcon: /* @__PURE__ */
|
|
4908
|
+
startIcon: /* @__PURE__ */ React83.createElement(import_icons24.ArrowDownSmallIcon, { fontSize: "tiny" }),
|
|
4889
4909
|
units: ["px", "%", "em", "rem", "vh"]
|
|
4890
4910
|
},
|
|
4891
4911
|
{
|
|
4892
4912
|
label: (0, import_i18n37.__)("Move Z", "elementor"),
|
|
4893
4913
|
bind: "z",
|
|
4894
|
-
startIcon: /* @__PURE__ */
|
|
4914
|
+
startIcon: /* @__PURE__ */ React83.createElement(import_icons24.ArrowDownLeftIcon, { fontSize: "tiny" }),
|
|
4895
4915
|
units: ["px", "%", "em", "rem", "vw", "vh"]
|
|
4896
4916
|
}
|
|
4897
4917
|
];
|
|
4898
4918
|
var Move = () => {
|
|
4899
4919
|
const context = useBoundProp(import_editor_props39.moveTransformPropTypeUtil);
|
|
4900
|
-
const rowRefs = [(0,
|
|
4901
|
-
return /* @__PURE__ */
|
|
4920
|
+
const rowRefs = [(0, import_react43.useRef)(null), (0, import_react43.useRef)(null), (0, import_react43.useRef)(null)];
|
|
4921
|
+
return /* @__PURE__ */ React83.createElement(import_ui69.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React83.createElement(PropProvider, { ...context }, /* @__PURE__ */ React83.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React83.createElement(
|
|
4902
4922
|
AxisRow,
|
|
4903
4923
|
{
|
|
4904
4924
|
key: control.bind,
|
|
@@ -4911,34 +4931,34 @@ var Move = () => {
|
|
|
4911
4931
|
};
|
|
4912
4932
|
|
|
4913
4933
|
// src/controls/transform-control/functions/rotate.tsx
|
|
4914
|
-
var
|
|
4915
|
-
var
|
|
4934
|
+
var React84 = __toESM(require("react"));
|
|
4935
|
+
var import_react44 = require("react");
|
|
4916
4936
|
var import_editor_props40 = require("@elementor/editor-props");
|
|
4917
4937
|
var import_icons25 = require("@elementor/icons");
|
|
4918
|
-
var
|
|
4938
|
+
var import_ui70 = require("@elementor/ui");
|
|
4919
4939
|
var import_i18n38 = require("@wordpress/i18n");
|
|
4920
4940
|
var rotateAxisControls = [
|
|
4921
4941
|
{
|
|
4922
4942
|
label: (0, import_i18n38.__)("Rotate X", "elementor"),
|
|
4923
4943
|
bind: "x",
|
|
4924
|
-
startIcon: /* @__PURE__ */
|
|
4944
|
+
startIcon: /* @__PURE__ */ React84.createElement(import_icons25.Arrow360Icon, { fontSize: "tiny" })
|
|
4925
4945
|
},
|
|
4926
4946
|
{
|
|
4927
4947
|
label: (0, import_i18n38.__)("Rotate Y", "elementor"),
|
|
4928
4948
|
bind: "y",
|
|
4929
|
-
startIcon: /* @__PURE__ */
|
|
4949
|
+
startIcon: /* @__PURE__ */ React84.createElement(import_icons25.Arrow360Icon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
4930
4950
|
},
|
|
4931
4951
|
{
|
|
4932
4952
|
label: (0, import_i18n38.__)("Rotate Z", "elementor"),
|
|
4933
4953
|
bind: "z",
|
|
4934
|
-
startIcon: /* @__PURE__ */
|
|
4954
|
+
startIcon: /* @__PURE__ */ React84.createElement(import_icons25.RotateClockwiseIcon, { fontSize: "tiny" })
|
|
4935
4955
|
}
|
|
4936
4956
|
];
|
|
4937
4957
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
4938
4958
|
var Rotate = () => {
|
|
4939
4959
|
const context = useBoundProp(import_editor_props40.rotateTransformPropTypeUtil);
|
|
4940
|
-
const rowRefs = [(0,
|
|
4941
|
-
return /* @__PURE__ */
|
|
4960
|
+
const rowRefs = [(0, import_react44.useRef)(null), (0, import_react44.useRef)(null), (0, import_react44.useRef)(null)];
|
|
4961
|
+
return /* @__PURE__ */ React84.createElement(import_ui70.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React84.createElement(PropProvider, { ...context }, /* @__PURE__ */ React84.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React84.createElement(
|
|
4942
4962
|
AxisRow,
|
|
4943
4963
|
{
|
|
4944
4964
|
key: control.bind,
|
|
@@ -4950,18 +4970,18 @@ var Rotate = () => {
|
|
|
4950
4970
|
};
|
|
4951
4971
|
|
|
4952
4972
|
// src/controls/transform-control/functions/scale.tsx
|
|
4953
|
-
var
|
|
4954
|
-
var
|
|
4973
|
+
var React86 = __toESM(require("react"));
|
|
4974
|
+
var import_react45 = require("react");
|
|
4955
4975
|
var import_editor_props41 = require("@elementor/editor-props");
|
|
4956
4976
|
var import_icons26 = require("@elementor/icons");
|
|
4957
|
-
var
|
|
4977
|
+
var import_ui72 = require("@elementor/ui");
|
|
4958
4978
|
var import_i18n39 = require("@wordpress/i18n");
|
|
4959
4979
|
|
|
4960
4980
|
// src/controls/transform-control/functions/scale-axis-row.tsx
|
|
4961
|
-
var
|
|
4962
|
-
var
|
|
4981
|
+
var React85 = __toESM(require("react"));
|
|
4982
|
+
var import_ui71 = require("@elementor/ui");
|
|
4963
4983
|
var ScaleAxisRow = ({ label, bind, startIcon, anchorRef }) => {
|
|
4964
|
-
return /* @__PURE__ */
|
|
4984
|
+
return /* @__PURE__ */ React85.createElement(import_ui71.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React85.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React85.createElement(import_ui71.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React85.createElement(ControlLabel, null, label)), /* @__PURE__ */ React85.createElement(import_ui71.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React85.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React85.createElement(NumberControl, { step: 0.1, placeholder: "1", startIcon })))));
|
|
4965
4985
|
};
|
|
4966
4986
|
|
|
4967
4987
|
// src/controls/transform-control/functions/scale.tsx
|
|
@@ -4969,49 +4989,49 @@ var scaleAxisControls = [
|
|
|
4969
4989
|
{
|
|
4970
4990
|
label: (0, import_i18n39.__)("Scale X", "elementor"),
|
|
4971
4991
|
bind: "x",
|
|
4972
|
-
startIcon: /* @__PURE__ */
|
|
4992
|
+
startIcon: /* @__PURE__ */ React86.createElement(import_icons26.ArrowRightIcon, { fontSize: "tiny" })
|
|
4973
4993
|
},
|
|
4974
4994
|
{
|
|
4975
4995
|
label: (0, import_i18n39.__)("Scale Y", "elementor"),
|
|
4976
4996
|
bind: "y",
|
|
4977
|
-
startIcon: /* @__PURE__ */
|
|
4997
|
+
startIcon: /* @__PURE__ */ React86.createElement(import_icons26.ArrowDownSmallIcon, { fontSize: "tiny" })
|
|
4978
4998
|
},
|
|
4979
4999
|
{
|
|
4980
5000
|
label: (0, import_i18n39.__)("Scale Z", "elementor"),
|
|
4981
5001
|
bind: "z",
|
|
4982
|
-
startIcon: /* @__PURE__ */
|
|
5002
|
+
startIcon: /* @__PURE__ */ React86.createElement(import_icons26.ArrowDownLeftIcon, { fontSize: "tiny" })
|
|
4983
5003
|
}
|
|
4984
5004
|
];
|
|
4985
5005
|
var Scale = () => {
|
|
4986
5006
|
const context = useBoundProp(import_editor_props41.scaleTransformPropTypeUtil);
|
|
4987
|
-
const rowRefs = [(0,
|
|
4988
|
-
return /* @__PURE__ */
|
|
5007
|
+
const rowRefs = [(0, import_react45.useRef)(null), (0, import_react45.useRef)(null), (0, import_react45.useRef)(null)];
|
|
5008
|
+
return /* @__PURE__ */ React86.createElement(import_ui72.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React86.createElement(PropProvider, { ...context }, /* @__PURE__ */ React86.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React86.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
4989
5009
|
};
|
|
4990
5010
|
|
|
4991
5011
|
// src/controls/transform-control/functions/skew.tsx
|
|
4992
|
-
var
|
|
4993
|
-
var
|
|
5012
|
+
var React87 = __toESM(require("react"));
|
|
5013
|
+
var import_react46 = require("react");
|
|
4994
5014
|
var import_editor_props42 = require("@elementor/editor-props");
|
|
4995
5015
|
var import_icons27 = require("@elementor/icons");
|
|
4996
|
-
var
|
|
5016
|
+
var import_ui73 = require("@elementor/ui");
|
|
4997
5017
|
var import_i18n40 = require("@wordpress/i18n");
|
|
4998
5018
|
var skewAxisControls = [
|
|
4999
5019
|
{
|
|
5000
5020
|
label: (0, import_i18n40.__)("Skew X", "elementor"),
|
|
5001
5021
|
bind: "x",
|
|
5002
|
-
startIcon: /* @__PURE__ */
|
|
5022
|
+
startIcon: /* @__PURE__ */ React87.createElement(import_icons27.ArrowRightIcon, { fontSize: "tiny" })
|
|
5003
5023
|
},
|
|
5004
5024
|
{
|
|
5005
5025
|
label: (0, import_i18n40.__)("Skew Y", "elementor"),
|
|
5006
5026
|
bind: "y",
|
|
5007
|
-
startIcon: /* @__PURE__ */
|
|
5027
|
+
startIcon: /* @__PURE__ */ React87.createElement(import_icons27.ArrowLeftIcon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
5008
5028
|
}
|
|
5009
5029
|
];
|
|
5010
5030
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
5011
5031
|
var Skew = () => {
|
|
5012
5032
|
const context = useBoundProp(import_editor_props42.skewTransformPropTypeUtil);
|
|
5013
|
-
const rowRefs = [(0,
|
|
5014
|
-
return /* @__PURE__ */
|
|
5033
|
+
const rowRefs = [(0, import_react46.useRef)(null), (0, import_react46.useRef)(null), (0, import_react46.useRef)(null)];
|
|
5034
|
+
return /* @__PURE__ */ React87.createElement(import_ui73.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React87.createElement(PropProvider, { ...context }, /* @__PURE__ */ React87.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React87.createElement(
|
|
5015
5035
|
AxisRow,
|
|
5016
5036
|
{
|
|
5017
5037
|
key: control.bind,
|
|
@@ -5023,9 +5043,9 @@ var Skew = () => {
|
|
|
5023
5043
|
};
|
|
5024
5044
|
|
|
5025
5045
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
5026
|
-
var
|
|
5046
|
+
var import_react47 = require("react");
|
|
5027
5047
|
var import_editor_props43 = require("@elementor/editor-props");
|
|
5028
|
-
var
|
|
5048
|
+
var import_ui74 = require("@elementor/ui");
|
|
5029
5049
|
var useTransformTabsHistory = ({
|
|
5030
5050
|
move: initialMove,
|
|
5031
5051
|
scale: initialScale,
|
|
@@ -5049,8 +5069,8 @@ var useTransformTabsHistory = ({
|
|
|
5049
5069
|
return TransformFunctionKeys.move;
|
|
5050
5070
|
}
|
|
5051
5071
|
};
|
|
5052
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
5053
|
-
const valuesHistory = (0,
|
|
5072
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui74.useTabs)(getCurrentTransformType());
|
|
5073
|
+
const valuesHistory = (0, import_react47.useRef)({
|
|
5054
5074
|
move: initialMove,
|
|
5055
5075
|
scale: initialScale,
|
|
5056
5076
|
rotate: initialRotate,
|
|
@@ -5111,8 +5131,8 @@ var TransformContent = () => {
|
|
|
5111
5131
|
rotate: initialRotateValue.value,
|
|
5112
5132
|
skew: initialSkewValue.value
|
|
5113
5133
|
});
|
|
5114
|
-
return /* @__PURE__ */
|
|
5115
|
-
|
|
5134
|
+
return /* @__PURE__ */ React88.createElement(PopoverContent, null, /* @__PURE__ */ React88.createElement(import_ui75.Box, { sx: { width: "100%" } }, /* @__PURE__ */ React88.createElement(import_ui75.Box, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React88.createElement(
|
|
5135
|
+
import_ui75.Tabs,
|
|
5116
5136
|
{
|
|
5117
5137
|
size: "small",
|
|
5118
5138
|
variant: "fullWidth",
|
|
@@ -5124,34 +5144,34 @@ var TransformContent = () => {
|
|
|
5124
5144
|
...getTabsProps(),
|
|
5125
5145
|
"aria-label": (0, import_i18n41.__)("Transform", "elementor")
|
|
5126
5146
|
},
|
|
5127
|
-
/* @__PURE__ */
|
|
5128
|
-
/* @__PURE__ */
|
|
5129
|
-
/* @__PURE__ */
|
|
5130
|
-
/* @__PURE__ */
|
|
5131
|
-
)), /* @__PURE__ */
|
|
5147
|
+
/* @__PURE__ */ React88.createElement(import_ui75.Tab, { label: (0, import_i18n41.__)("Move", "elementor"), ...getTabProps(TransformFunctionKeys.move) }),
|
|
5148
|
+
/* @__PURE__ */ React88.createElement(import_ui75.Tab, { label: (0, import_i18n41.__)("Scale", "elementor"), ...getTabProps(TransformFunctionKeys.scale) }),
|
|
5149
|
+
/* @__PURE__ */ React88.createElement(import_ui75.Tab, { label: (0, import_i18n41.__)("Rotate", "elementor"), ...getTabProps(TransformFunctionKeys.rotate) }),
|
|
5150
|
+
/* @__PURE__ */ React88.createElement(import_ui75.Tab, { label: (0, import_i18n41.__)("Skew", "elementor"), ...getTabProps(TransformFunctionKeys.skew) })
|
|
5151
|
+
)), /* @__PURE__ */ React88.createElement(import_ui75.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.move) }, /* @__PURE__ */ React88.createElement(Move, null)), /* @__PURE__ */ React88.createElement(import_ui75.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.scale) }, /* @__PURE__ */ React88.createElement(Scale, null)), /* @__PURE__ */ React88.createElement(import_ui75.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.rotate) }, /* @__PURE__ */ React88.createElement(Rotate, null)), /* @__PURE__ */ React88.createElement(import_ui75.TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.skew) }, /* @__PURE__ */ React88.createElement(Skew, null))));
|
|
5132
5152
|
};
|
|
5133
5153
|
|
|
5134
5154
|
// src/controls/transform-control/transform-icon.tsx
|
|
5135
|
-
var
|
|
5155
|
+
var React89 = __toESM(require("react"));
|
|
5136
5156
|
var import_icons28 = require("@elementor/icons");
|
|
5137
5157
|
var TransformIcon = ({ value }) => {
|
|
5138
5158
|
switch (value.$$type) {
|
|
5139
5159
|
case TransformFunctionKeys.move:
|
|
5140
|
-
return /* @__PURE__ */
|
|
5160
|
+
return /* @__PURE__ */ React89.createElement(import_icons28.ArrowsMaximizeIcon, { fontSize: "tiny" });
|
|
5141
5161
|
case TransformFunctionKeys.scale:
|
|
5142
|
-
return /* @__PURE__ */
|
|
5162
|
+
return /* @__PURE__ */ React89.createElement(import_icons28.ArrowAutofitHeightIcon, { fontSize: "tiny" });
|
|
5143
5163
|
case TransformFunctionKeys.rotate:
|
|
5144
|
-
return /* @__PURE__ */
|
|
5164
|
+
return /* @__PURE__ */ React89.createElement(import_icons28.RotateClockwise2Icon, { fontSize: "tiny" });
|
|
5145
5165
|
case TransformFunctionKeys.skew:
|
|
5146
|
-
return /* @__PURE__ */
|
|
5166
|
+
return /* @__PURE__ */ React89.createElement(import_icons28.SkewXIcon, { fontSize: "tiny" });
|
|
5147
5167
|
default:
|
|
5148
5168
|
return null;
|
|
5149
5169
|
}
|
|
5150
5170
|
};
|
|
5151
5171
|
|
|
5152
5172
|
// src/controls/transform-control/transform-label.tsx
|
|
5153
|
-
var
|
|
5154
|
-
var
|
|
5173
|
+
var React90 = __toESM(require("react"));
|
|
5174
|
+
var import_ui76 = require("@elementor/ui");
|
|
5155
5175
|
var import_i18n42 = require("@wordpress/i18n");
|
|
5156
5176
|
var formatLabel = (value, functionType) => {
|
|
5157
5177
|
return Object.values(value).map((axis) => {
|
|
@@ -5168,32 +5188,32 @@ var TransformLabel = (props) => {
|
|
|
5168
5188
|
const { $$type, value } = props.value;
|
|
5169
5189
|
switch ($$type) {
|
|
5170
5190
|
case TransformFunctionKeys.move:
|
|
5171
|
-
return /* @__PURE__ */
|
|
5191
|
+
return /* @__PURE__ */ React90.createElement(Label2, { label: (0, import_i18n42.__)("Move", "elementor"), value: formatLabel(value, "move") });
|
|
5172
5192
|
case TransformFunctionKeys.scale:
|
|
5173
|
-
return /* @__PURE__ */
|
|
5193
|
+
return /* @__PURE__ */ React90.createElement(Label2, { label: (0, import_i18n42.__)("Scale", "elementor"), value: formatLabel(value, "scale") });
|
|
5174
5194
|
case TransformFunctionKeys.rotate:
|
|
5175
|
-
return /* @__PURE__ */
|
|
5195
|
+
return /* @__PURE__ */ React90.createElement(Label2, { label: (0, import_i18n42.__)("Rotate", "elementor"), value: formatLabel(value, "rotate") });
|
|
5176
5196
|
case TransformFunctionKeys.skew:
|
|
5177
|
-
return /* @__PURE__ */
|
|
5197
|
+
return /* @__PURE__ */ React90.createElement(Label2, { label: (0, import_i18n42.__)("Skew", "elementor"), value: formatLabel(value, "skew") });
|
|
5178
5198
|
default:
|
|
5179
5199
|
return "";
|
|
5180
5200
|
}
|
|
5181
5201
|
};
|
|
5182
5202
|
var Label2 = ({ label, value }) => {
|
|
5183
|
-
return /* @__PURE__ */
|
|
5203
|
+
return /* @__PURE__ */ React90.createElement(import_ui76.Box, { component: "span" }, label, ": ", value);
|
|
5184
5204
|
};
|
|
5185
5205
|
|
|
5186
5206
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
5187
|
-
var
|
|
5207
|
+
var React93 = __toESM(require("react"));
|
|
5188
5208
|
var import_editor_ui10 = require("@elementor/editor-ui");
|
|
5189
5209
|
var import_icons29 = require("@elementor/icons");
|
|
5190
|
-
var
|
|
5210
|
+
var import_ui79 = require("@elementor/ui");
|
|
5191
5211
|
var import_i18n45 = require("@wordpress/i18n");
|
|
5192
5212
|
|
|
5193
5213
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
5194
|
-
var
|
|
5214
|
+
var React91 = __toESM(require("react"));
|
|
5195
5215
|
var import_editor_props44 = require("@elementor/editor-props");
|
|
5196
|
-
var
|
|
5216
|
+
var import_ui77 = require("@elementor/ui");
|
|
5197
5217
|
var import_i18n43 = require("@wordpress/i18n");
|
|
5198
5218
|
var ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
5199
5219
|
var PERSPECTIVE_CONTROL_FIELD = {
|
|
@@ -5214,23 +5234,23 @@ var CHILDREN_PERSPECTIVE_FIELDS = [
|
|
|
5214
5234
|
}
|
|
5215
5235
|
];
|
|
5216
5236
|
var ChildrenPerspectiveControl = () => {
|
|
5217
|
-
return /* @__PURE__ */
|
|
5237
|
+
return /* @__PURE__ */ React91.createElement(import_ui77.Stack, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, (0, import_i18n43.__)("Children perspective", "elementor")), /* @__PURE__ */ React91.createElement(PerspectiveControl, null), /* @__PURE__ */ React91.createElement(PerspectiveOriginControl, null));
|
|
5218
5238
|
};
|
|
5219
|
-
var PerspectiveControl = () => /* @__PURE__ */
|
|
5220
|
-
var PerspectiveOriginControl = () => /* @__PURE__ */
|
|
5239
|
+
var PerspectiveControl = () => /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: "perspective" }, /* @__PURE__ */ React91.createElement(ControlFields, { control: PERSPECTIVE_CONTROL_FIELD, key: PERSPECTIVE_CONTROL_FIELD.bind }));
|
|
5240
|
+
var PerspectiveOriginControl = () => /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: "perspective-origin" }, /* @__PURE__ */ React91.createElement(PerspectiveOriginControlProvider, null));
|
|
5221
5241
|
var PerspectiveOriginControlProvider = () => {
|
|
5222
5242
|
const context = useBoundProp(import_editor_props44.perspectiveOriginPropTypeUtil);
|
|
5223
|
-
return /* @__PURE__ */
|
|
5243
|
+
return /* @__PURE__ */ React91.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React91.createElement(ControlFields, { control }))));
|
|
5224
5244
|
};
|
|
5225
5245
|
var ControlFields = ({ control }) => {
|
|
5226
|
-
const rowRef =
|
|
5227
|
-
return /* @__PURE__ */
|
|
5246
|
+
const rowRef = React91.useRef(null);
|
|
5247
|
+
return /* @__PURE__ */ React91.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React91.createElement(import_ui77.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React91.createElement(import_ui77.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
|
|
5228
5248
|
};
|
|
5229
5249
|
|
|
5230
5250
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
5231
|
-
var
|
|
5251
|
+
var React92 = __toESM(require("react"));
|
|
5232
5252
|
var import_editor_props45 = require("@elementor/editor-props");
|
|
5233
|
-
var
|
|
5253
|
+
var import_ui78 = require("@elementor/ui");
|
|
5234
5254
|
var import_i18n44 = require("@wordpress/i18n");
|
|
5235
5255
|
var TRANSFORM_ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
5236
5256
|
var TRANSFORM_ORIGIN_UNITS_Z_AXIS = TRANSFORM_ORIGIN_UNITS.filter((unit) => unit !== "%");
|
|
@@ -5252,12 +5272,12 @@ var TRANSFORM_ORIGIN_FIELDS = [
|
|
|
5252
5272
|
}
|
|
5253
5273
|
];
|
|
5254
5274
|
var TransformOriginControl = () => {
|
|
5255
|
-
return /* @__PURE__ */
|
|
5275
|
+
return /* @__PURE__ */ React92.createElement(import_ui78.Stack, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React92.createElement(ControlFormLabel, null, (0, import_i18n44.__)("Transform", "elementor")), TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React92.createElement(ControlFields2, { control, key: control.bind })));
|
|
5256
5276
|
};
|
|
5257
5277
|
var ControlFields2 = ({ control }) => {
|
|
5258
5278
|
const context = useBoundProp(import_editor_props45.transformOriginPropTypeUtil);
|
|
5259
|
-
const rowRef =
|
|
5260
|
-
return /* @__PURE__ */
|
|
5279
|
+
const rowRef = React92.useRef(null);
|
|
5280
|
+
return /* @__PURE__ */ React92.createElement(PropProvider, { ...context }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React92.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React92.createElement(import_ui78.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React92.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React92.createElement(import_ui78.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React92.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })))));
|
|
5261
5281
|
};
|
|
5262
5282
|
|
|
5263
5283
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
@@ -5266,12 +5286,12 @@ var TransformSettingsControl = ({
|
|
|
5266
5286
|
popupState,
|
|
5267
5287
|
anchorRef
|
|
5268
5288
|
}) => {
|
|
5269
|
-
const popupProps = (0,
|
|
5289
|
+
const popupProps = (0, import_ui79.bindPopover)({
|
|
5270
5290
|
...popupState,
|
|
5271
5291
|
anchorEl: anchorRef.current ?? void 0
|
|
5272
5292
|
});
|
|
5273
|
-
return /* @__PURE__ */
|
|
5274
|
-
|
|
5293
|
+
return /* @__PURE__ */ React93.createElement(
|
|
5294
|
+
import_ui79.Popover,
|
|
5275
5295
|
{
|
|
5276
5296
|
disablePortal: true,
|
|
5277
5297
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
@@ -5285,16 +5305,16 @@ var TransformSettingsControl = ({
|
|
|
5285
5305
|
},
|
|
5286
5306
|
...popupProps
|
|
5287
5307
|
},
|
|
5288
|
-
/* @__PURE__ */
|
|
5308
|
+
/* @__PURE__ */ React93.createElement(
|
|
5289
5309
|
import_editor_ui10.PopoverHeader,
|
|
5290
5310
|
{
|
|
5291
5311
|
title: (0, import_i18n45.__)("Transform settings", "elementor"),
|
|
5292
5312
|
onClose: popupState.close,
|
|
5293
|
-
icon: /* @__PURE__ */
|
|
5313
|
+
icon: /* @__PURE__ */ React93.createElement(import_icons29.AdjustmentsIcon, { fontSize: SIZE7 })
|
|
5294
5314
|
}
|
|
5295
5315
|
),
|
|
5296
|
-
/* @__PURE__ */
|
|
5297
|
-
/* @__PURE__ */
|
|
5316
|
+
/* @__PURE__ */ React93.createElement(import_ui79.Divider, null),
|
|
5317
|
+
/* @__PURE__ */ React93.createElement(PopoverContent, { sx: { px: 2, py: 1.5 } }, /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "transform-origin" }, /* @__PURE__ */ React93.createElement(TransformOriginControl, null)), /* @__PURE__ */ React93.createElement(import_ui79.Box, { sx: { my: 0.5 } }, /* @__PURE__ */ React93.createElement(import_ui79.Divider, null)), /* @__PURE__ */ React93.createElement(ChildrenPerspectiveControl, null))
|
|
5298
5318
|
);
|
|
5299
5319
|
};
|
|
5300
5320
|
|
|
@@ -5302,19 +5322,19 @@ var TransformSettingsControl = ({
|
|
|
5302
5322
|
var SIZE8 = "tiny";
|
|
5303
5323
|
var TransformRepeaterControl = createControl(() => {
|
|
5304
5324
|
const context = useBoundProp(import_editor_props46.transformPropTypeUtil);
|
|
5305
|
-
const headerRef = (0,
|
|
5306
|
-
const popupState = (0,
|
|
5307
|
-
return /* @__PURE__ */
|
|
5325
|
+
const headerRef = (0, import_react48.useRef)(null);
|
|
5326
|
+
const popupState = (0, import_ui80.usePopupState)({ variant: "popover" });
|
|
5327
|
+
return /* @__PURE__ */ React94.createElement(PropProvider, { ...context }, /* @__PURE__ */ React94.createElement(TransformSettingsControl, { popupState, anchorRef: headerRef }), /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React94.createElement(Repeater2, { headerRef, propType: context.propType, popupState })));
|
|
5308
5328
|
});
|
|
5309
|
-
var ToolTip = /* @__PURE__ */
|
|
5310
|
-
|
|
5329
|
+
var ToolTip = /* @__PURE__ */ React94.createElement(
|
|
5330
|
+
import_ui80.Box,
|
|
5311
5331
|
{
|
|
5312
5332
|
component: "span",
|
|
5313
5333
|
"aria-label": void 0,
|
|
5314
5334
|
sx: { display: "flex", gap: 0.5, p: 2, width: 320, borderRadius: 1 }
|
|
5315
5335
|
},
|
|
5316
|
-
/* @__PURE__ */
|
|
5317
|
-
/* @__PURE__ */
|
|
5336
|
+
/* @__PURE__ */ React94.createElement(import_icons30.InfoCircleFilledIcon, { sx: { color: "secondary.main" } }),
|
|
5337
|
+
/* @__PURE__ */ React94.createElement(import_ui80.Typography, { variant: "body2", color: "text.secondary", fontSize: "14px" }, (0, import_i18n46.__)("You can use each kind of transform only once per element.", "elementor"))
|
|
5318
5338
|
);
|
|
5319
5339
|
var Repeater2 = ({
|
|
5320
5340
|
headerRef,
|
|
@@ -5328,21 +5348,21 @@ var Repeater2 = ({
|
|
|
5328
5348
|
return availableValues.find((value) => !transformValues?.some((item) => item.$$type === value.$$type));
|
|
5329
5349
|
};
|
|
5330
5350
|
const shouldDisableAddItem = !getInitialValue();
|
|
5331
|
-
return /* @__PURE__ */
|
|
5351
|
+
return /* @__PURE__ */ React94.createElement(PropProvider, { ...transformFunctionsContext }, /* @__PURE__ */ React94.createElement(
|
|
5332
5352
|
ControlRepeater,
|
|
5333
5353
|
{
|
|
5334
5354
|
initial: getInitialValue() ?? initialTransformValue,
|
|
5335
5355
|
propTypeUtil: import_editor_props46.transformFunctionsPropTypeUtil
|
|
5336
5356
|
},
|
|
5337
|
-
/* @__PURE__ */
|
|
5338
|
-
|
|
5357
|
+
/* @__PURE__ */ React94.createElement(
|
|
5358
|
+
RepeaterHeader,
|
|
5339
5359
|
{
|
|
5340
5360
|
label: (0, import_i18n46.__)("Transform", "elementor"),
|
|
5341
|
-
adornment: () => /* @__PURE__ */
|
|
5361
|
+
adornment: () => /* @__PURE__ */ React94.createElement(ControlAdornments, { customContext: { path: ["transform"], propType } }),
|
|
5342
5362
|
ref: headerRef
|
|
5343
5363
|
},
|
|
5344
|
-
/* @__PURE__ */
|
|
5345
|
-
/* @__PURE__ */
|
|
5364
|
+
/* @__PURE__ */ React94.createElement(TransformBasePopoverTrigger, { popupState, repeaterBindKey: bind }),
|
|
5365
|
+
/* @__PURE__ */ React94.createElement(
|
|
5346
5366
|
TooltipAddItemAction,
|
|
5347
5367
|
{
|
|
5348
5368
|
disabled: shouldDisableAddItem,
|
|
@@ -5352,15 +5372,15 @@ var Repeater2 = ({
|
|
|
5352
5372
|
}
|
|
5353
5373
|
)
|
|
5354
5374
|
),
|
|
5355
|
-
/* @__PURE__ */
|
|
5375
|
+
/* @__PURE__ */ React94.createElement(ItemsContainer, null, /* @__PURE__ */ React94.createElement(
|
|
5356
5376
|
Item,
|
|
5357
5377
|
{
|
|
5358
5378
|
Icon: TransformIcon,
|
|
5359
5379
|
Label: TransformLabel,
|
|
5360
|
-
actions: /* @__PURE__ */
|
|
5380
|
+
actions: /* @__PURE__ */ React94.createElement(React94.Fragment, null, /* @__PURE__ */ React94.createElement(DisableItemAction, null), /* @__PURE__ */ React94.createElement(RemoveItemAction, null))
|
|
5361
5381
|
}
|
|
5362
5382
|
)),
|
|
5363
|
-
/* @__PURE__ */
|
|
5383
|
+
/* @__PURE__ */ React94.createElement(EditItemPopover, null, /* @__PURE__ */ React94.createElement(TransformContent, null))
|
|
5364
5384
|
));
|
|
5365
5385
|
};
|
|
5366
5386
|
var TransformBasePopoverTrigger = ({
|
|
@@ -5369,22 +5389,22 @@ var TransformBasePopoverTrigger = ({
|
|
|
5369
5389
|
}) => {
|
|
5370
5390
|
const { bind } = useBoundProp();
|
|
5371
5391
|
const titleLabel = (0, import_i18n46.__)("Transform settings", "elementor");
|
|
5372
|
-
return bind !== repeaterBindKey ? null : /* @__PURE__ */
|
|
5392
|
+
return bind !== repeaterBindKey ? null : /* @__PURE__ */ React94.createElement(import_ui80.Tooltip, { title: titleLabel, placement: "top" }, /* @__PURE__ */ React94.createElement(import_ui80.IconButton, { size: SIZE8, "aria-label": titleLabel, ...(0, import_ui80.bindTrigger)(popupState) }, /* @__PURE__ */ React94.createElement(import_icons30.AdjustmentsIcon, { fontSize: SIZE8 })));
|
|
5373
5393
|
};
|
|
5374
5394
|
|
|
5375
5395
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
5376
|
-
var
|
|
5377
|
-
var
|
|
5396
|
+
var React97 = __toESM(require("react"));
|
|
5397
|
+
var import_react51 = require("react");
|
|
5378
5398
|
var import_editor_props49 = require("@elementor/editor-props");
|
|
5379
5399
|
var import_icons32 = require("@elementor/icons");
|
|
5380
|
-
var
|
|
5400
|
+
var import_ui83 = require("@elementor/ui");
|
|
5381
5401
|
var import_i18n49 = require("@wordpress/i18n");
|
|
5382
5402
|
|
|
5383
5403
|
// src/controls/selection-size-control.tsx
|
|
5384
|
-
var
|
|
5385
|
-
var
|
|
5404
|
+
var React95 = __toESM(require("react"));
|
|
5405
|
+
var import_react49 = require("react");
|
|
5386
5406
|
var import_editor_props47 = require("@elementor/editor-props");
|
|
5387
|
-
var
|
|
5407
|
+
var import_ui81 = require("@elementor/ui");
|
|
5388
5408
|
var SelectionSizeControl = createControl(
|
|
5389
5409
|
({
|
|
5390
5410
|
selectionLabel,
|
|
@@ -5394,9 +5414,9 @@ var SelectionSizeControl = createControl(
|
|
|
5394
5414
|
isRepeaterControl = false
|
|
5395
5415
|
}) => {
|
|
5396
5416
|
const { value, setValue, propType } = useBoundProp(import_editor_props47.selectionSizePropTypeUtil);
|
|
5397
|
-
const rowRef = (0,
|
|
5417
|
+
const rowRef = (0, import_react49.useRef)(null);
|
|
5398
5418
|
const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
|
|
5399
|
-
const currentSizeConfig = (0,
|
|
5419
|
+
const currentSizeConfig = (0, import_react49.useMemo)(() => {
|
|
5400
5420
|
switch (value.selection.$$type) {
|
|
5401
5421
|
case "key-value":
|
|
5402
5422
|
return sizeConfigMap[value?.selection?.value.value.value || ""];
|
|
@@ -5407,7 +5427,7 @@ var SelectionSizeControl = createControl(
|
|
|
5407
5427
|
}
|
|
5408
5428
|
}, [value, sizeConfigMap]);
|
|
5409
5429
|
const SelectionComponent = selectionConfig.component;
|
|
5410
|
-
return /* @__PURE__ */
|
|
5430
|
+
return /* @__PURE__ */ React95.createElement(PropProvider, { value, setValue, propType }, /* @__PURE__ */ React95.createElement(import_ui81.Grid, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React95.createElement(import_ui81.Grid, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React95.createElement(ControlFormLabel, null, selectionLabel)), /* @__PURE__ */ React95.createElement(import_ui81.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "selection" }, /* @__PURE__ */ React95.createElement(SelectionComponent, { ...selectionConfig.props }))), currentSizeConfig && /* @__PURE__ */ React95.createElement(React95.Fragment, null, /* @__PURE__ */ React95.createElement(import_ui81.Grid, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React95.createElement(ControlFormLabel, { htmlFor: sizeFieldId }, sizeLabel)), /* @__PURE__ */ React95.createElement(import_ui81.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React95.createElement(
|
|
5411
5431
|
SizeControl,
|
|
5412
5432
|
{
|
|
5413
5433
|
anchorRef: rowRef,
|
|
@@ -5469,11 +5489,11 @@ function subscribeToTransitionEvent() {
|
|
|
5469
5489
|
}
|
|
5470
5490
|
|
|
5471
5491
|
// src/controls/transition-control/transition-selector.tsx
|
|
5472
|
-
var
|
|
5473
|
-
var
|
|
5492
|
+
var React96 = __toESM(require("react"));
|
|
5493
|
+
var import_react50 = require("react");
|
|
5474
5494
|
var import_editor_props48 = require("@elementor/editor-props");
|
|
5475
5495
|
var import_icons31 = require("@elementor/icons");
|
|
5476
|
-
var
|
|
5496
|
+
var import_ui82 = require("@elementor/ui");
|
|
5477
5497
|
var import_i18n48 = require("@wordpress/i18n");
|
|
5478
5498
|
var toTransitionSelectorValue = (label) => {
|
|
5479
5499
|
for (const category of transitionProperties) {
|
|
@@ -5503,8 +5523,8 @@ var TransitionSelector = ({
|
|
|
5503
5523
|
const {
|
|
5504
5524
|
key: { value: transitionLabel }
|
|
5505
5525
|
} = value;
|
|
5506
|
-
const defaultRef = (0,
|
|
5507
|
-
const popoverState = (0,
|
|
5526
|
+
const defaultRef = (0, import_react50.useRef)(null);
|
|
5527
|
+
const popoverState = (0, import_ui82.usePopupState)({ variant: "popover" });
|
|
5508
5528
|
const getItemList = () => {
|
|
5509
5529
|
const recentItems = recentlyUsedList.map((item) => findByValue(item)).filter((item) => !!item);
|
|
5510
5530
|
const filteredItems = transitionsItemsList.map((category) => {
|
|
@@ -5544,27 +5564,27 @@ var TransitionSelector = ({
|
|
|
5544
5564
|
left: rect.right + 36
|
|
5545
5565
|
};
|
|
5546
5566
|
};
|
|
5547
|
-
return /* @__PURE__ */
|
|
5548
|
-
|
|
5567
|
+
return /* @__PURE__ */ React96.createElement(import_ui82.Box, { ref: defaultRef }, /* @__PURE__ */ React96.createElement(
|
|
5568
|
+
import_ui82.UnstableTag,
|
|
5549
5569
|
{
|
|
5550
5570
|
variant: "outlined",
|
|
5551
5571
|
label: transitionLabel,
|
|
5552
|
-
endIcon: /* @__PURE__ */
|
|
5553
|
-
...(0,
|
|
5572
|
+
endIcon: /* @__PURE__ */ React96.createElement(import_icons31.ChevronDownIcon, { fontSize: "tiny" }),
|
|
5573
|
+
...(0, import_ui82.bindTrigger)(popoverState),
|
|
5554
5574
|
fullWidth: true
|
|
5555
5575
|
}
|
|
5556
|
-
), /* @__PURE__ */
|
|
5557
|
-
|
|
5576
|
+
), /* @__PURE__ */ React96.createElement(
|
|
5577
|
+
import_ui82.Popover,
|
|
5558
5578
|
{
|
|
5559
5579
|
disablePortal: true,
|
|
5560
5580
|
disableScrollLock: true,
|
|
5561
|
-
...(0,
|
|
5581
|
+
...(0, import_ui82.bindPopover)(popoverState),
|
|
5562
5582
|
anchorReference: "anchorPosition",
|
|
5563
5583
|
anchorPosition: getAnchorPosition(),
|
|
5564
5584
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
5565
5585
|
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
5566
5586
|
},
|
|
5567
|
-
/* @__PURE__ */
|
|
5587
|
+
/* @__PURE__ */ React96.createElement(
|
|
5568
5588
|
ItemSelector,
|
|
5569
5589
|
{
|
|
5570
5590
|
itemsList: getItemList(),
|
|
@@ -5618,18 +5638,18 @@ function getChildControlConfig(recentlyUsedList, disabledItems) {
|
|
|
5618
5638
|
props: getSelectionSizeProps(recentlyUsedList, disabledItems)
|
|
5619
5639
|
};
|
|
5620
5640
|
}
|
|
5621
|
-
var disableAddItemTooltipContent = /* @__PURE__ */
|
|
5622
|
-
|
|
5641
|
+
var disableAddItemTooltipContent = /* @__PURE__ */ React97.createElement(
|
|
5642
|
+
import_ui83.Alert,
|
|
5623
5643
|
{
|
|
5624
5644
|
sx: {
|
|
5625
5645
|
width: 280,
|
|
5626
5646
|
gap: 0.5
|
|
5627
5647
|
},
|
|
5628
5648
|
color: "secondary",
|
|
5629
|
-
icon: /* @__PURE__ */
|
|
5649
|
+
icon: /* @__PURE__ */ React97.createElement(import_icons32.InfoCircleFilledIcon, null)
|
|
5630
5650
|
},
|
|
5631
|
-
/* @__PURE__ */
|
|
5632
|
-
/* @__PURE__ */
|
|
5651
|
+
/* @__PURE__ */ React97.createElement(import_ui83.AlertTitle, null, (0, import_i18n49.__)("Transitions", "elementor")),
|
|
5652
|
+
/* @__PURE__ */ React97.createElement(import_ui83.Box, { component: "span" }, /* @__PURE__ */ React97.createElement(import_ui83.Typography, { variant: "body2" }, (0, import_i18n49.__)("Switch to 'Normal' state to add a transition.", "elementor")))
|
|
5633
5653
|
);
|
|
5634
5654
|
subscribeToTransitionEvent();
|
|
5635
5655
|
var getTransitionLabel = (item) => {
|
|
@@ -5644,21 +5664,21 @@ var TransitionRepeaterControl = createControl(
|
|
|
5644
5664
|
currentStyleState
|
|
5645
5665
|
}) => {
|
|
5646
5666
|
const currentStyleIsNormal = currentStyleState === null;
|
|
5647
|
-
const [recentlyUsedList, setRecentlyUsedList] = (0,
|
|
5648
|
-
const childArrayPropTypeUtil = (0,
|
|
5667
|
+
const [recentlyUsedList, setRecentlyUsedList] = (0, import_react51.useState)([]);
|
|
5668
|
+
const childArrayPropTypeUtil = (0, import_react51.useMemo)(
|
|
5649
5669
|
() => (0, import_editor_props49.createArrayPropUtils)(import_editor_props49.selectionSizePropTypeUtil.key, import_editor_props49.selectionSizePropTypeUtil.schema, "transition"),
|
|
5650
5670
|
[]
|
|
5651
5671
|
);
|
|
5652
5672
|
const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
5653
|
-
const disabledItems = (0,
|
|
5654
|
-
const allowedTransitionSet = (0,
|
|
5673
|
+
const disabledItems = (0, import_react51.useMemo)(() => getDisabledItems(value), [value]);
|
|
5674
|
+
const allowedTransitionSet = (0, import_react51.useMemo)(() => {
|
|
5655
5675
|
const set = /* @__PURE__ */ new Set();
|
|
5656
5676
|
transitionProperties.forEach((category) => {
|
|
5657
5677
|
category.properties.forEach((prop) => set.add(prop.value));
|
|
5658
5678
|
});
|
|
5659
5679
|
return set;
|
|
5660
5680
|
}, []);
|
|
5661
|
-
(0,
|
|
5681
|
+
(0, import_react51.useEffect)(() => {
|
|
5662
5682
|
if (!value || value.length === 0) {
|
|
5663
5683
|
return;
|
|
5664
5684
|
}
|
|
@@ -5670,12 +5690,12 @@ var TransitionRepeaterControl = createControl(
|
|
|
5670
5690
|
setValue(sanitized);
|
|
5671
5691
|
}
|
|
5672
5692
|
}, [allowedTransitionSet]);
|
|
5673
|
-
(0,
|
|
5693
|
+
(0, import_react51.useEffect)(() => {
|
|
5674
5694
|
recentlyUsedListGetter().then(setRecentlyUsedList);
|
|
5675
5695
|
}, [recentlyUsedListGetter]);
|
|
5676
5696
|
const allPropertiesUsed = value?.length === transitionProperties.length;
|
|
5677
5697
|
const isAddItemDisabled = !currentStyleIsNormal || allPropertiesUsed;
|
|
5678
|
-
return /* @__PURE__ */
|
|
5698
|
+
return /* @__PURE__ */ React97.createElement(
|
|
5679
5699
|
RepeatableControl,
|
|
5680
5700
|
{
|
|
5681
5701
|
label: (0, import_i18n49.__)("Transitions", "elementor"),
|
|
@@ -5698,11 +5718,11 @@ var TransitionRepeaterControl = createControl(
|
|
|
5698
5718
|
);
|
|
5699
5719
|
|
|
5700
5720
|
// src/controls/date-time-control.tsx
|
|
5701
|
-
var
|
|
5721
|
+
var React98 = __toESM(require("react"));
|
|
5702
5722
|
var dayjs = __toESM(require("dayjs"));
|
|
5703
5723
|
var import_editor_props50 = require("@elementor/editor-props");
|
|
5704
5724
|
var import_editor_props51 = require("@elementor/editor-props");
|
|
5705
|
-
var
|
|
5725
|
+
var import_ui84 = require("@elementor/ui");
|
|
5706
5726
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
5707
5727
|
var TIME_FORMAT = "HH:mm";
|
|
5708
5728
|
var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
@@ -5746,8 +5766,8 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
5746
5766
|
const base = dayjs.default();
|
|
5747
5767
|
return base.hour(h).minute(m).second(0).millisecond(0);
|
|
5748
5768
|
};
|
|
5749
|
-
return /* @__PURE__ */
|
|
5750
|
-
|
|
5769
|
+
return /* @__PURE__ */ React98.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React98.createElement(ControlActions, null, /* @__PURE__ */ React98.createElement(import_ui84.LocalizationProvider, null, /* @__PURE__ */ React98.createElement(import_ui84.Box, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React98.createElement(
|
|
5770
|
+
import_ui84.DatePicker,
|
|
5751
5771
|
{
|
|
5752
5772
|
value: parseDateValue(import_editor_props50.stringPropTypeUtil.extract(value?.date)),
|
|
5753
5773
|
onChange: (v) => handleChange({ date: v }, { bind: "date" }),
|
|
@@ -5758,8 +5778,8 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
5758
5778
|
openPickerIcon: { fontSize: "tiny" }
|
|
5759
5779
|
}
|
|
5760
5780
|
}
|
|
5761
|
-
)), /* @__PURE__ */
|
|
5762
|
-
|
|
5781
|
+
)), /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React98.createElement(
|
|
5782
|
+
import_ui84.TimePicker,
|
|
5763
5783
|
{
|
|
5764
5784
|
value: parseTimeValue(import_editor_props50.stringPropTypeUtil.extract(value?.time)),
|
|
5765
5785
|
onChange: (v) => handleChange({ time: v }, { bind: "time" }),
|
|
@@ -5774,12 +5794,12 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
5774
5794
|
});
|
|
5775
5795
|
|
|
5776
5796
|
// src/controls/inline-editing-control.tsx
|
|
5777
|
-
var
|
|
5797
|
+
var React100 = __toESM(require("react"));
|
|
5778
5798
|
var import_editor_props52 = require("@elementor/editor-props");
|
|
5779
5799
|
|
|
5780
5800
|
// src/components/inline-editor.tsx
|
|
5781
|
-
var
|
|
5782
|
-
var
|
|
5801
|
+
var React99 = __toESM(require("react"));
|
|
5802
|
+
var import_ui85 = require("@elementor/ui");
|
|
5783
5803
|
var import_extension_bold = __toESM(require("@tiptap/extension-bold"));
|
|
5784
5804
|
var import_extension_document = __toESM(require("@tiptap/extension-document"));
|
|
5785
5805
|
var import_extension_hard_break = __toESM(require("@tiptap/extension-hard-break"));
|
|
@@ -5787,10 +5807,10 @@ var import_extension_italic = __toESM(require("@tiptap/extension-italic"));
|
|
|
5787
5807
|
var import_extension_strike = __toESM(require("@tiptap/extension-strike"));
|
|
5788
5808
|
var import_extension_text = __toESM(require("@tiptap/extension-text"));
|
|
5789
5809
|
var import_extension_underline = __toESM(require("@tiptap/extension-underline"));
|
|
5790
|
-
var
|
|
5791
|
-
var InlineEditor =
|
|
5810
|
+
var import_react52 = require("@tiptap/react");
|
|
5811
|
+
var InlineEditor = React99.forwardRef(
|
|
5792
5812
|
({ value, setValue, attributes = {}, sx }, ref) => {
|
|
5793
|
-
const editor = (0,
|
|
5813
|
+
const editor = (0, import_react52.useEditor)({
|
|
5794
5814
|
extensions: [
|
|
5795
5815
|
import_extension_document.default.extend({
|
|
5796
5816
|
content: "inline*"
|
|
@@ -5811,8 +5831,8 @@ var InlineEditor = React97.forwardRef(
|
|
|
5811
5831
|
content: value,
|
|
5812
5832
|
onUpdate: ({ editor: updatedEditor }) => setValue(updatedEditor.getHTML())
|
|
5813
5833
|
});
|
|
5814
|
-
return /* @__PURE__ */
|
|
5815
|
-
|
|
5834
|
+
return /* @__PURE__ */ React99.createElement(
|
|
5835
|
+
import_ui85.Box,
|
|
5816
5836
|
{
|
|
5817
5837
|
ref,
|
|
5818
5838
|
sx: {
|
|
@@ -5839,7 +5859,7 @@ var InlineEditor = React97.forwardRef(
|
|
|
5839
5859
|
},
|
|
5840
5860
|
...attributes
|
|
5841
5861
|
},
|
|
5842
|
-
/* @__PURE__ */
|
|
5862
|
+
/* @__PURE__ */ React99.createElement(import_react52.EditorContent, { editor })
|
|
5843
5863
|
);
|
|
5844
5864
|
}
|
|
5845
5865
|
);
|
|
@@ -5848,24 +5868,24 @@ var InlineEditor = React97.forwardRef(
|
|
|
5848
5868
|
var InlineEditingControl = createControl(() => {
|
|
5849
5869
|
const { value, setValue } = useBoundProp(import_editor_props52.htmlPropTypeUtil);
|
|
5850
5870
|
const handleChange = (newValue) => setValue(newValue);
|
|
5851
|
-
return /* @__PURE__ */
|
|
5871
|
+
return /* @__PURE__ */ React100.createElement(ControlActions, null, /* @__PURE__ */ React100.createElement(InlineEditor, { value: value || "", setValue: handleChange }));
|
|
5852
5872
|
});
|
|
5853
5873
|
|
|
5854
5874
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
5855
|
-
var
|
|
5875
|
+
var React101 = __toESM(require("react"));
|
|
5856
5876
|
var import_icons33 = require("@elementor/icons");
|
|
5857
|
-
var
|
|
5858
|
-
var CustomIconButton = (0,
|
|
5877
|
+
var import_ui86 = require("@elementor/ui");
|
|
5878
|
+
var CustomIconButton = (0, import_ui86.styled)(import_ui86.IconButton)(({ theme }) => ({
|
|
5859
5879
|
width: theme.spacing(2.5),
|
|
5860
5880
|
height: theme.spacing(2.5)
|
|
5861
5881
|
}));
|
|
5862
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
5882
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React101.createElement(import_ui86.Tooltip, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React101.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React101.createElement(import_icons33.BrushBigIcon, { fontSize: size })));
|
|
5863
5883
|
|
|
5864
|
-
// src/components/repeater.tsx
|
|
5865
|
-
var
|
|
5866
|
-
var
|
|
5884
|
+
// src/components/repeater/repeater.tsx
|
|
5885
|
+
var React102 = __toESM(require("react"));
|
|
5886
|
+
var import_react53 = require("react");
|
|
5867
5887
|
var import_icons34 = require("@elementor/icons");
|
|
5868
|
-
var
|
|
5888
|
+
var import_ui87 = require("@elementor/ui");
|
|
5869
5889
|
var import_i18n50 = require("@wordpress/i18n");
|
|
5870
5890
|
var SIZE9 = "tiny";
|
|
5871
5891
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
@@ -5879,17 +5899,16 @@ var Repeater3 = ({
|
|
|
5879
5899
|
setValues: setRepeaterValues,
|
|
5880
5900
|
showDuplicate = true,
|
|
5881
5901
|
showToggle = true,
|
|
5882
|
-
isSortable = true
|
|
5883
|
-
collectionPropUtil
|
|
5902
|
+
isSortable = true
|
|
5884
5903
|
}) => {
|
|
5885
|
-
const [openItem, setOpenItem] = (0,
|
|
5904
|
+
const [openItem, setOpenItem] = (0, import_react53.useState)(EMPTY_OPEN_ITEM2);
|
|
5886
5905
|
const [items2, setItems] = useSyncExternalState({
|
|
5887
5906
|
external: repeaterValues,
|
|
5888
5907
|
// @ts-expect-error - as long as persistWhen => true, value will never be null
|
|
5889
5908
|
setExternal: setRepeaterValues,
|
|
5890
5909
|
persistWhen: () => true
|
|
5891
5910
|
});
|
|
5892
|
-
const [uniqueKeys, setUniqueKeys] = (0,
|
|
5911
|
+
const [uniqueKeys, setUniqueKeys] = (0, import_react53.useState)(items2.map((_, index) => index));
|
|
5893
5912
|
const generateNextKey = (source) => {
|
|
5894
5913
|
return 1 + Math.max(0, ...source);
|
|
5895
5914
|
};
|
|
@@ -5961,50 +5980,37 @@ var Repeater3 = ({
|
|
|
5961
5980
|
{ action: { type: "reorder", payload: { ...meta } } }
|
|
5962
5981
|
);
|
|
5963
5982
|
};
|
|
5964
|
-
return /* @__PURE__ */
|
|
5965
|
-
|
|
5983
|
+
return /* @__PURE__ */ React102.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React102.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, /* @__PURE__ */ React102.createElement(
|
|
5984
|
+
import_ui87.IconButton,
|
|
5966
5985
|
{
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5986
|
+
size: SIZE9,
|
|
5987
|
+
sx: { ml: "auto" },
|
|
5988
|
+
disabled,
|
|
5989
|
+
onClick: addRepeaterItem,
|
|
5990
|
+
"aria-label": (0, import_i18n50.__)("Add item", "elementor")
|
|
5972
5991
|
},
|
|
5973
|
-
/* @__PURE__ */
|
|
5974
|
-
|
|
5975
|
-
/* @__PURE__ */ React100.createElement(
|
|
5976
|
-
import_ui85.IconButton,
|
|
5977
|
-
{
|
|
5978
|
-
size: SIZE9,
|
|
5979
|
-
sx: { ml: "auto" },
|
|
5980
|
-
disabled,
|
|
5981
|
-
onClick: addRepeaterItem,
|
|
5982
|
-
"aria-label": (0, import_i18n50.__)("Add item", "elementor")
|
|
5983
|
-
},
|
|
5984
|
-
/* @__PURE__ */ React100.createElement(import_icons34.PlusIcon, { fontSize: SIZE9 })
|
|
5985
|
-
)
|
|
5986
|
-
), 0 < uniqueKeys.length && /* @__PURE__ */ React100.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key, index) => {
|
|
5992
|
+
/* @__PURE__ */ React102.createElement(import_icons34.PlusIcon, { fontSize: SIZE9 })
|
|
5993
|
+
)), 0 < uniqueKeys.length && /* @__PURE__ */ React102.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key, index) => {
|
|
5987
5994
|
const value = items2[index];
|
|
5988
5995
|
if (!value) {
|
|
5989
5996
|
return null;
|
|
5990
5997
|
}
|
|
5991
|
-
return /* @__PURE__ */
|
|
5998
|
+
return /* @__PURE__ */ React102.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React102.createElement(
|
|
5992
5999
|
RepeaterItem,
|
|
5993
6000
|
{
|
|
5994
6001
|
disabled,
|
|
5995
6002
|
propDisabled: value?.disabled,
|
|
5996
|
-
label: /* @__PURE__ */
|
|
5997
|
-
startIcon: /* @__PURE__ */
|
|
6003
|
+
label: /* @__PURE__ */ React102.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React102.createElement(itemSettings.Label, { value, index })),
|
|
6004
|
+
startIcon: /* @__PURE__ */ React102.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React102.createElement(itemSettings.Icon, { value })),
|
|
5998
6005
|
removeItem: () => removeRepeaterItem(index),
|
|
5999
6006
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
6000
6007
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
6001
6008
|
openOnMount: openOnAdd && openItem === key,
|
|
6002
6009
|
onOpen: () => setOpenItem(EMPTY_OPEN_ITEM2),
|
|
6003
6010
|
showDuplicate,
|
|
6004
|
-
showToggle
|
|
6005
|
-
collectionPropUtil
|
|
6011
|
+
showToggle
|
|
6006
6012
|
},
|
|
6007
|
-
(props) => /* @__PURE__ */
|
|
6013
|
+
(props) => /* @__PURE__ */ React102.createElement(
|
|
6008
6014
|
itemSettings.Content,
|
|
6009
6015
|
{
|
|
6010
6016
|
...props,
|
|
@@ -6028,50 +6034,30 @@ var RepeaterItem = ({
|
|
|
6028
6034
|
onOpen,
|
|
6029
6035
|
showDuplicate,
|
|
6030
6036
|
showToggle,
|
|
6031
|
-
disabled
|
|
6032
|
-
collectionPropUtil
|
|
6037
|
+
disabled
|
|
6033
6038
|
}) => {
|
|
6034
|
-
const [anchorEl, setAnchorEl] = (0, import_react51.useState)(null);
|
|
6035
6039
|
const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount, onOpen);
|
|
6036
6040
|
const duplicateLabel = (0, import_i18n50.__)("Duplicate", "elementor");
|
|
6037
6041
|
const toggleLabel = propDisabled ? (0, import_i18n50.__)("Show", "elementor") : (0, import_i18n50.__)("Hide", "elementor");
|
|
6038
6042
|
const removeLabel = (0, import_i18n50.__)("Remove", "elementor");
|
|
6039
|
-
return /* @__PURE__ */
|
|
6040
|
-
|
|
6043
|
+
return /* @__PURE__ */ React102.createElement(React102.Fragment, null, /* @__PURE__ */ React102.createElement(
|
|
6044
|
+
RepeaterTag,
|
|
6041
6045
|
{
|
|
6042
6046
|
disabled,
|
|
6043
6047
|
label,
|
|
6044
|
-
showActionsOnHover: true,
|
|
6045
|
-
fullWidth: true,
|
|
6046
6048
|
ref: setRef,
|
|
6047
|
-
variant: "outlined",
|
|
6048
6049
|
"aria-label": (0, import_i18n50.__)("Open item", "elementor"),
|
|
6049
|
-
...(0,
|
|
6050
|
+
...(0, import_ui87.bindTrigger)(popoverState),
|
|
6050
6051
|
startIcon,
|
|
6051
|
-
actions: /* @__PURE__ */
|
|
6052
|
+
actions: /* @__PURE__ */ React102.createElement(React102.Fragment, null, showDuplicate && /* @__PURE__ */ React102.createElement(import_ui87.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(import_ui87.IconButton, { size: SIZE9, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React102.createElement(import_icons34.CopyIcon, { fontSize: SIZE9 }))), showToggle && /* @__PURE__ */ React102.createElement(import_ui87.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(import_ui87.IconButton, { size: SIZE9, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React102.createElement(import_icons34.EyeOffIcon, { fontSize: SIZE9 }) : /* @__PURE__ */ React102.createElement(import_icons34.EyeIcon, { fontSize: SIZE9 }))), /* @__PURE__ */ React102.createElement(import_ui87.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(import_ui87.IconButton, { size: SIZE9, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React102.createElement(import_icons34.XIcon, { fontSize: SIZE9 }))))
|
|
6052
6053
|
}
|
|
6053
|
-
), /* @__PURE__ */
|
|
6054
|
-
import_ui85.Popover,
|
|
6055
|
-
{
|
|
6056
|
-
disablePortal: true,
|
|
6057
|
-
slotProps: {
|
|
6058
|
-
paper: {
|
|
6059
|
-
ref: setAnchorEl,
|
|
6060
|
-
sx: { mt: 0.5, width: ref?.getBoundingClientRect().width }
|
|
6061
|
-
}
|
|
6062
|
-
},
|
|
6063
|
-
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
6064
|
-
...popoverProps,
|
|
6065
|
-
anchorEl: ref
|
|
6066
|
-
},
|
|
6067
|
-
/* @__PURE__ */ React100.createElement(import_ui85.Box, null, children({ anchorEl, collectionPropUtil }))
|
|
6068
|
-
));
|
|
6054
|
+
), /* @__PURE__ */ React102.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React102.createElement(import_ui87.Box, null, children({ anchorEl: ref }))));
|
|
6069
6055
|
};
|
|
6070
6056
|
var usePopover = (openOnMount, onOpen) => {
|
|
6071
|
-
const [ref, setRef] = (0,
|
|
6072
|
-
const popoverState = (0,
|
|
6073
|
-
const popoverProps = (0,
|
|
6074
|
-
(0,
|
|
6057
|
+
const [ref, setRef] = (0, import_react53.useState)(null);
|
|
6058
|
+
const popoverState = (0, import_ui87.usePopupState)({ variant: "popover" });
|
|
6059
|
+
const popoverProps = (0, import_ui87.bindPopover)(popoverState);
|
|
6060
|
+
(0, import_react53.useEffect)(() => {
|
|
6075
6061
|
if (openOnMount && ref) {
|
|
6076
6062
|
popoverState.open(ref);
|
|
6077
6063
|
onOpen?.();
|