@moontra/moonui-pro 2.0.7 → 2.0.8
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 +0 -78
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -78
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -9
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,6 @@ import * as ReactDOM from 'react-dom';
|
|
|
10
10
|
import ReactDOM__default, { createPortal, flushSync } from 'react-dom';
|
|
11
11
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
12
12
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
13
|
-
import { DragDropContext, Droppable, Draggable } from '@hello-pangea/dnd';
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* @moontra/moonui-pro v2.0.7
|
|
@@ -54626,82 +54625,6 @@ var SwipeableCard = React50__default.forwardRef(
|
|
|
54626
54625
|
}
|
|
54627
54626
|
);
|
|
54628
54627
|
SwipeableCard.displayName = "SwipeableCard";
|
|
54629
|
-
function DraggableList({
|
|
54630
|
-
items,
|
|
54631
|
-
onReorder,
|
|
54632
|
-
renderItem,
|
|
54633
|
-
keyExtractor,
|
|
54634
|
-
direction = "vertical",
|
|
54635
|
-
className,
|
|
54636
|
-
droppableId = "draggable-list",
|
|
54637
|
-
disabled = false
|
|
54638
|
-
}) {
|
|
54639
|
-
const handleDragEnd = (result) => {
|
|
54640
|
-
if (!result.destination || disabled) {
|
|
54641
|
-
return;
|
|
54642
|
-
}
|
|
54643
|
-
const sourceIndex = result.source.index;
|
|
54644
|
-
const destinationIndex = result.destination.index;
|
|
54645
|
-
if (sourceIndex === destinationIndex) {
|
|
54646
|
-
return;
|
|
54647
|
-
}
|
|
54648
|
-
const newItems = Array.from(items);
|
|
54649
|
-
const [reorderedItem] = newItems.splice(sourceIndex, 1);
|
|
54650
|
-
newItems.splice(destinationIndex, 0, reorderedItem);
|
|
54651
|
-
onReorder(newItems);
|
|
54652
|
-
};
|
|
54653
|
-
return /* @__PURE__ */ jsx(DragDropContext, { onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsx(
|
|
54654
|
-
Droppable,
|
|
54655
|
-
{
|
|
54656
|
-
droppableId,
|
|
54657
|
-
direction,
|
|
54658
|
-
isDropDisabled: disabled,
|
|
54659
|
-
children: (provided, snapshot) => /* @__PURE__ */ jsxs(
|
|
54660
|
-
"div",
|
|
54661
|
-
{
|
|
54662
|
-
...provided.droppableProps,
|
|
54663
|
-
ref: provided.innerRef,
|
|
54664
|
-
className: cn(
|
|
54665
|
-
"space-y-2",
|
|
54666
|
-
direction === "horizontal" && "flex space-y-0 space-x-2",
|
|
54667
|
-
snapshot.isDraggingOver && "bg-muted/50 rounded-lg",
|
|
54668
|
-
className
|
|
54669
|
-
),
|
|
54670
|
-
children: [
|
|
54671
|
-
items.map((item, index2) => /* @__PURE__ */ jsx(
|
|
54672
|
-
Draggable,
|
|
54673
|
-
{
|
|
54674
|
-
draggableId: keyExtractor(item),
|
|
54675
|
-
index: index2,
|
|
54676
|
-
isDragDisabled: disabled,
|
|
54677
|
-
children: (provided2, snapshot2) => /* @__PURE__ */ jsx(
|
|
54678
|
-
"div",
|
|
54679
|
-
{
|
|
54680
|
-
ref: provided2.innerRef,
|
|
54681
|
-
...provided2.draggableProps,
|
|
54682
|
-
...provided2.dragHandleProps,
|
|
54683
|
-
className: cn(
|
|
54684
|
-
"transition-all duration-200",
|
|
54685
|
-
snapshot2.isDragging && "rotate-2 scale-105 shadow-lg z-50",
|
|
54686
|
-
disabled && "cursor-not-allowed opacity-50"
|
|
54687
|
-
),
|
|
54688
|
-
style: {
|
|
54689
|
-
...provided2.draggableProps.style,
|
|
54690
|
-
transform: snapshot2.isDragging ? provided2.draggableProps.style?.transform : "none"
|
|
54691
|
-
},
|
|
54692
|
-
children: renderItem(item, index2)
|
|
54693
|
-
}
|
|
54694
|
-
)
|
|
54695
|
-
},
|
|
54696
|
-
keyExtractor(item)
|
|
54697
|
-
)),
|
|
54698
|
-
provided.placeholder
|
|
54699
|
-
]
|
|
54700
|
-
}
|
|
54701
|
-
)
|
|
54702
|
-
}
|
|
54703
|
-
) });
|
|
54704
|
-
}
|
|
54705
54628
|
/*! Bundled license information:
|
|
54706
54629
|
|
|
54707
54630
|
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
@@ -54749,6 +54672,6 @@ use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.developme
|
|
|
54749
54672
|
*)
|
|
54750
54673
|
*/
|
|
54751
54674
|
|
|
54752
|
-
export { Calendar2 as Calendar,
|
|
54675
|
+
export { Calendar2 as Calendar, Kanban, MemoryAnalytics, MemoryEfficientData, RichTextEditor, SelectableVirtualList, SwipeableCard, VirtualList, useStreamingData, useVirtualList };
|
|
54753
54676
|
//# sourceMappingURL=out.js.map
|
|
54754
54677
|
//# sourceMappingURL=index.mjs.map
|