@elementor/editor-global-classes 3.32.0-71 → 3.32.0-73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +32 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/class-manager/class-item.tsx +11 -6
- package/src/components/class-manager/global-classes-list.tsx +24 -25
- package/src/components/class-manager/sortable.tsx +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1253,7 +1253,7 @@ import {
|
|
|
1253
1253
|
UnstableSortableProvider
|
|
1254
1254
|
} from "@elementor/ui";
|
|
1255
1255
|
var SortableProvider = (props) => /* @__PURE__ */ React12.createElement(UnstableSortableProvider, { restrictAxis: true, variant: "static", dragPlaceholderStyle: { opacity: "1" }, ...props });
|
|
1256
|
-
var SortableTrigger = (props) => /* @__PURE__ */ React12.createElement(StyledSortableTrigger, { ...props, role: "button", className: "class-item-sortable-trigger" }, /* @__PURE__ */ React12.createElement(GripVerticalIcon, { fontSize: "tiny" }));
|
|
1256
|
+
var SortableTrigger = (props) => /* @__PURE__ */ React12.createElement(StyledSortableTrigger, { ...props, role: "button", className: "class-item-sortable-trigger", "aria-label": "sort" }, /* @__PURE__ */ React12.createElement(GripVerticalIcon, { fontSize: "tiny" }));
|
|
1257
1257
|
var SortableItem = ({ children, id: id2, ...props }) => {
|
|
1258
1258
|
return /* @__PURE__ */ React12.createElement(
|
|
1259
1259
|
UnstableSortableItem,
|
|
@@ -1310,11 +1310,16 @@ var SortableItemIndicator = styled4(Box6)`
|
|
|
1310
1310
|
`;
|
|
1311
1311
|
|
|
1312
1312
|
// src/components/class-manager/class-item.tsx
|
|
1313
|
-
var ClassItem = ({
|
|
1313
|
+
var ClassItem = ({
|
|
1314
|
+
id: id2,
|
|
1315
|
+
label,
|
|
1316
|
+
renameClass,
|
|
1317
|
+
selected,
|
|
1318
|
+
disabled,
|
|
1319
|
+
sortableTriggerProps,
|
|
1320
|
+
showSortIndicator
|
|
1321
|
+
}) => {
|
|
1314
1322
|
const itemRef = useRef(null);
|
|
1315
|
-
const {
|
|
1316
|
-
search: { inputValue }
|
|
1317
|
-
} = useSearchAndFilters();
|
|
1318
1323
|
const {
|
|
1319
1324
|
ref: editableRef,
|
|
1320
1325
|
openEditMode,
|
|
@@ -1348,7 +1353,7 @@ var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTrig
|
|
|
1348
1353
|
ref: itemRef,
|
|
1349
1354
|
dense: true,
|
|
1350
1355
|
disableGutters: true,
|
|
1351
|
-
showSortIndicator
|
|
1356
|
+
showSortIndicator,
|
|
1352
1357
|
showActions: isSelected || isEditing,
|
|
1353
1358
|
shape: "rounded",
|
|
1354
1359
|
onDoubleClick: openEditMode,
|
|
@@ -1614,28 +1619,27 @@ var GlobalClassesList = ({ disabled }) => {
|
|
|
1614
1619
|
if (notFoundType) {
|
|
1615
1620
|
return /* @__PURE__ */ React15.createElement(NotFound, { notFoundType });
|
|
1616
1621
|
}
|
|
1617
|
-
return /* @__PURE__ */ React15.createElement(DeleteConfirmationProvider, null, /* @__PURE__ */ React15.createElement(List, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React15.createElement(SortableProvider, { value: classesOrder, onChange: reorderClasses }, filteredCssClasses?.map(({ id: id2, label }) => {
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
}))));
|
|
1622
|
+
return /* @__PURE__ */ React15.createElement(DeleteConfirmationProvider, null, /* @__PURE__ */ React15.createElement(List, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React15.createElement(SortableProvider, { value: classesOrder, onChange: reorderClasses }, filteredCssClasses?.map(({ id: id2, label }) => /* @__PURE__ */ React15.createElement(SortableItem, { key: id2, id: id2 }, ({ isDragged, isDragPlaceholder, triggerProps, triggerStyle }) => /* @__PURE__ */ React15.createElement(
|
|
1623
|
+
ClassItem,
|
|
1624
|
+
{
|
|
1625
|
+
id: id2,
|
|
1626
|
+
label,
|
|
1627
|
+
renameClass: (newLabel) => {
|
|
1628
|
+
dispatch5(
|
|
1629
|
+
slice.actions.update({
|
|
1630
|
+
style: {
|
|
1631
|
+
id: id2,
|
|
1632
|
+
label: newLabel
|
|
1633
|
+
}
|
|
1634
|
+
})
|
|
1635
|
+
);
|
|
1636
|
+
},
|
|
1637
|
+
selected: isDragged,
|
|
1638
|
+
disabled: disabled || isDragPlaceholder,
|
|
1639
|
+
sortableTriggerProps: { ...triggerProps, style: triggerStyle },
|
|
1640
|
+
showSortIndicator: filteredCssClasses.length > 1
|
|
1641
|
+
}
|
|
1642
|
+
))))));
|
|
1639
1643
|
};
|
|
1640
1644
|
var EmptyState = () => /* @__PURE__ */ React15.createElement(Stack7, { alignItems: "center", gap: 1.5, pt: 10, px: 0.5, maxWidth: "260px", margin: "auto" }, /* @__PURE__ */ React15.createElement(FlippedColorSwatchIcon, { fontSize: "large" }), /* @__PURE__ */ React15.createElement(StyledHeader, { variant: "subtitle2", component: "h2", color: "text.secondary" }, __12("There are no global classes yet.", "elementor")), /* @__PURE__ */ React15.createElement(Typography7, { align: "center", variant: "caption", color: "text.secondary" }, __12(
|
|
1641
1645
|
"CSS classes created in the editor panel will appear here. Once they are available, you can arrange their hierarchy, rename them, or delete them as needed.",
|