react-drag-drop-kanban 1.0.0
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/LICENSE.txt +21 -0
- package/README.md +158 -0
- package/build/index.js +291 -0
- package/build/index.js.map +1 -0
- package/build/react-drag-drop-kanban.css +1 -0
- package/package.json +81 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Bibin antony
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
## react-drag-drop-kanban | A React component by **Bibin Antony**
|
|
2
|
+
|
|
3
|
+
A highly customizable, multiple-column drag-and-drop board component built with the **native HTML5 drag-and-drop API**.
|
|
4
|
+
|
|
5
|
+
**Key Features:**
|
|
6
|
+
- Uses native HTML5 drag-and-drop—fully compatible with React 18/19 and StrictMode!
|
|
7
|
+
- **Board Dragging:** Drag and reorder entire columns seamlessly!
|
|
8
|
+
- **Custom Rendering:** Render absolutely anything inside the drag items using the `renderItem` prop.
|
|
9
|
+
|
|
10
|
+
Just send a JSON array to create draggable and droppable columns. The component will dynamically render the columns based on the provided data structure.
|
|
11
|
+
|
|
12
|
+
## Demo
|
|
13
|
+
|
|
14
|
+
[Live demo](https://bibinantony1998.github.io/react-drag-and-drop-multiple/)
|
|
15
|
+
|
|
16
|
+
### Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install react-drag-drop-kanban
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
<sup>\* Requires `react` and `react-dom` version 18+ or 19+ as peer dependencies</sup>
|
|
23
|
+
|
|
24
|
+
**Compatible with:**
|
|
25
|
+
- ✅ React 18.0.0+
|
|
26
|
+
- ✅ React 19.0.0+
|
|
27
|
+
- ✅ Works with both React 18 and React 19 APIs
|
|
28
|
+
- ✅ StrictMode compatible in both versions
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
✅ **Zero external drag-drop dependencies** - Uses native HTML5 APIs
|
|
35
|
+
✅ **React 18 & 19 compatible** - Works seamlessly with modern React
|
|
36
|
+
✅ **Board Dragging** - Reorder entire boards/columns by dragging them
|
|
37
|
+
✅ **Custom Rendering** - Full control over item rendering with `renderItem`
|
|
38
|
+
✅ **Multiple item selection** - Select and drag multiple items at once
|
|
39
|
+
✅ **Custom drag preview** - Beautiful SVG badge shows item count when dragging multiple items
|
|
40
|
+
✅ **Rich animations** - Smooth hover effects, pulse animations, and visual feedback
|
|
41
|
+
✅ **Cross-column dragging** - Move items between different columns
|
|
42
|
+
✅ **Lightweight** - No heavy dependencies
|
|
43
|
+
|
|
44
|
+
### Visual Features
|
|
45
|
+
|
|
46
|
+
🎨 **Custom Multi-Drag Badge** - When dragging multiple items, see a stunning SVG badge with:
|
|
47
|
+
- Stacked cards icon
|
|
48
|
+
- Item count in a sleek badge
|
|
49
|
+
- Beautiful shadow effects
|
|
50
|
+
|
|
51
|
+
🎯 **Smart Hover Effects** - Hover animations work on both selected and unselected items
|
|
52
|
+
|
|
53
|
+
✨ **Multi-Drag Animation** - All selected items pulse during drag operations
|
|
54
|
+
|
|
55
|
+
🌈 **Visual Feedback** - Clear indicators for selected items, drop zones (for both items and boards), and drag states
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### Usage
|
|
60
|
+
|
|
61
|
+
```jsx
|
|
62
|
+
import DragDropComponent from "react-drag-drop-kanban";
|
|
63
|
+
|
|
64
|
+
const data = [
|
|
65
|
+
{
|
|
66
|
+
id: "1",
|
|
67
|
+
name: "Todo",
|
|
68
|
+
data: [
|
|
69
|
+
{
|
|
70
|
+
id: "1",
|
|
71
|
+
title: "Design System",
|
|
72
|
+
description: "Create component library",
|
|
73
|
+
priority: "high",
|
|
74
|
+
assignee: "John Doe",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "2",
|
|
78
|
+
title: "API Integration",
|
|
79
|
+
description: "Connect backend endpoints",
|
|
80
|
+
priority: "medium",
|
|
81
|
+
assignee: "Jane Smith",
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "2",
|
|
87
|
+
name: "In Progress",
|
|
88
|
+
data: [
|
|
89
|
+
{
|
|
90
|
+
id: "3",
|
|
91
|
+
title: "Authentication",
|
|
92
|
+
description: "Implement OAuth2",
|
|
93
|
+
priority: "high",
|
|
94
|
+
assignee: "Alice Brown",
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
}
|
|
98
|
+
];
|
|
99
|
+
|
|
100
|
+
// Define your custom render function to render anything you want!
|
|
101
|
+
const renderTaskCard = (item, index, listId) => (
|
|
102
|
+
<div style={{ padding: "16px", backgroundColor: "white", borderRadius: "8px", border: "1px solid #e0e0e0" }}>
|
|
103
|
+
<h3>{item.title}</h3>
|
|
104
|
+
<p>{item.description}</p>
|
|
105
|
+
<div style={{ display: "flex", justifyContent: "space-between" }}>
|
|
106
|
+
<span>👤 {item.assignee}</span>
|
|
107
|
+
<span style={{ color: item.priority === "high" ? "#ff4757" : "#2ed573" }}>
|
|
108
|
+
{item.priority}
|
|
109
|
+
</span>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
const App = () => (
|
|
115
|
+
<DragDropComponent
|
|
116
|
+
data={data}
|
|
117
|
+
renderItem={renderTaskCard}
|
|
118
|
+
onChange={(newData) => console.log(newData)}
|
|
119
|
+
width="100%"
|
|
120
|
+
height="600px"
|
|
121
|
+
multiple={true} // Enable multi-drag
|
|
122
|
+
boardDraggable={true} // Enable dragging entire columns
|
|
123
|
+
title={true}
|
|
124
|
+
/>
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
export default App;
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**You can render:**
|
|
131
|
+
- 📋 Kanban cards with rich content
|
|
132
|
+
- ✅ Task items with checkboxes and metadata
|
|
133
|
+
- 📁 File manager items with icons
|
|
134
|
+
- 🛒 Shopping cart products with images
|
|
135
|
+
- 👥 User cards with avatars
|
|
136
|
+
- **Anything you can imagine!**
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### Props
|
|
141
|
+
|
|
142
|
+
| Prop Name | Type | Default Value | Description |
|
|
143
|
+
| ---------------- | ---------------------------------------- | ------------- | -------------------------------------------------------------------------------------------- |
|
|
144
|
+
| `data` | array | **required** | Array of lists with items to display |
|
|
145
|
+
| `onChange` | function | **required** | Callback function that receives updated data when items or boards are moved |
|
|
146
|
+
| `width` | number/string | `"100%"` | Width of the component |
|
|
147
|
+
| `height` | number/string | `"100%"` | Height of the component |
|
|
148
|
+
| `renderItem` | `(item, index, listId) => ReactNode` | optional | Custom render function for each item - render anything you want! |
|
|
149
|
+
| `boardDraggable` | boolean | false | Enable dragging and reordering entire columns/boards |
|
|
150
|
+
| `multiple` | boolean | false | Enable multi-select mode (select and drag multiple items at once using checkboxes) |
|
|
151
|
+
| `title` | boolean | false | Show list titles |
|
|
152
|
+
| `centerTitle` | boolean | false | Center-align list titles |
|
|
153
|
+
| `draggerImg` | boolean | false | Show drag handle image on items (only used when fallback rendering is active) |
|
|
154
|
+
| `children` | ReactNode | optional | Legacy prop - use `renderItem` instead for custom rendering |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
[Bibin Antony](https://github.com/bibinantony1998)
|
package/build/index.js
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { jsx as u, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y } from "react";
|
|
3
|
+
const z = (n) => /* @__PURE__ */ u("div", { className: "cursor-pointer drag_item_content", onClick: () => {
|
|
4
|
+
var w;
|
|
5
|
+
(w = document.getElementById(n.inputId)) == null || w.click();
|
|
6
|
+
}, children: n.children ? n.children : /* @__PURE__ */ u("main", { className: `drag_item ${n.draggerImg ? "drag_item_drag_img" : ""}`, children: /* @__PURE__ */ u("span", { className: "", children: /* @__PURE__ */ u("div", { children: n.data.value }) }) }) }), G = ({
|
|
7
|
+
children: n,
|
|
8
|
+
title: f,
|
|
9
|
+
centerTitle: w,
|
|
10
|
+
onDrop: g,
|
|
11
|
+
onDragOver: A,
|
|
12
|
+
draggable: b,
|
|
13
|
+
onDragStart: v,
|
|
14
|
+
onDragEnd: x,
|
|
15
|
+
isDragged: I,
|
|
16
|
+
isDragOver: N
|
|
17
|
+
}) => /* @__PURE__ */ u("div", { className: `h-100 w-100 ${I ? "dragging-board" : ""} ${N ? "board-drag-over" : ""}`, children: /* @__PURE__ */ u("div", { className: "h-100", children: /* @__PURE__ */ u("div", { className: "h-100", onDrop: g, onDragOver: A, children: /* @__PURE__ */ L(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: "h-100 drag_box_container",
|
|
21
|
+
draggable: b,
|
|
22
|
+
onDragStart: v,
|
|
23
|
+
onDragEnd: x,
|
|
24
|
+
children: [
|
|
25
|
+
f ? /* @__PURE__ */ u(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: `dragger_title ${w ? "center_title" : ""}`,
|
|
29
|
+
children: f
|
|
30
|
+
}
|
|
31
|
+
) : "",
|
|
32
|
+
/* @__PURE__ */ u(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
className: `drag_box ${f ? "drag_box_on_drag_tittle" : ""}`,
|
|
36
|
+
children: n
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
) }) }) }), K = (n) => {
|
|
42
|
+
const [f, w] = y(n.data), [g, A] = y({ items: [], selectedArray: "" }), [b, v] = y(null), [x, I] = y(null), [N, _] = y(null), k = (t, e) => {
|
|
43
|
+
const i = Array.from(t), [r] = i.splice(e, 1);
|
|
44
|
+
return [r, i];
|
|
45
|
+
}, $ = (t, e, i, r) => {
|
|
46
|
+
let o = { ...g };
|
|
47
|
+
g.selectedArray !== r && (A({ items: [], selectedArray: r }), o = { items: [], selectedArray: r });
|
|
48
|
+
let a = [];
|
|
49
|
+
if (t.target.checked) {
|
|
50
|
+
let s = [];
|
|
51
|
+
s.push({ ...e, sourceIndex: i }), a = [...o.items, ...s];
|
|
52
|
+
} else {
|
|
53
|
+
let s = [...o.items];
|
|
54
|
+
var l = s.findIndex((d) => d.id === e.id);
|
|
55
|
+
s.splice(l, 1), a = [...s];
|
|
56
|
+
}
|
|
57
|
+
a.sort((s, d) => s.sourceIndex - d.sourceIndex), A({ items: a, selectedArray: r });
|
|
58
|
+
}, T = (t, e, i) => {
|
|
59
|
+
const r = Array.from(t);
|
|
60
|
+
return r.splice(e, 0, i), r;
|
|
61
|
+
}, B = (t, e, i, r) => {
|
|
62
|
+
t.stopPropagation(), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/html", t.currentTarget.innerHTML), t.dataTransfer.setData(
|
|
63
|
+
"application/json",
|
|
64
|
+
JSON.stringify({
|
|
65
|
+
item: e,
|
|
66
|
+
sourceListId: i,
|
|
67
|
+
sourceIndex: r
|
|
68
|
+
})
|
|
69
|
+
);
|
|
70
|
+
const o = g.items.findIndex((a) => a.sourceIndex === r) !== -1 && g.selectedArray === i;
|
|
71
|
+
if (o && g.items.length > 1) {
|
|
72
|
+
const a = j(g.items.length);
|
|
73
|
+
document.body.appendChild(a), t.dataTransfer.setDragImage(a, 40, 40), setTimeout(() => {
|
|
74
|
+
document.body.removeChild(a);
|
|
75
|
+
}, 0);
|
|
76
|
+
}
|
|
77
|
+
t.currentTarget.classList.add("dragging"), o && g.items.length > 1 && g.items.forEach((a) => {
|
|
78
|
+
var s;
|
|
79
|
+
const l = document.getElementById(
|
|
80
|
+
`${i}_${a.sourceIndex}`
|
|
81
|
+
);
|
|
82
|
+
l && ((s = l.closest(".drag_item_wrapper")) == null || s.classList.add("multi-dragging"));
|
|
83
|
+
});
|
|
84
|
+
}, j = (t) => {
|
|
85
|
+
const e = document.createElement("div");
|
|
86
|
+
e.style.cssText = `
|
|
87
|
+
position: absolute;
|
|
88
|
+
top: -1000px;
|
|
89
|
+
left: -1000px;
|
|
90
|
+
width: 100px;
|
|
91
|
+
height: 100px;
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
|
|
96
|
+
`;
|
|
97
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
98
|
+
i.setAttribute("width", "70"), i.setAttribute("height", "70"), i.setAttribute("viewBox", "0 0 70 70"), i.style.cssText = "pointer-events: none;";
|
|
99
|
+
const r = document.createElementNS(
|
|
100
|
+
"http://www.w3.org/2000/svg",
|
|
101
|
+
"rect"
|
|
102
|
+
);
|
|
103
|
+
r.setAttribute("x", "10"), r.setAttribute("y", "10"), r.setAttribute("width", "50"), r.setAttribute("height", "50"), r.setAttribute("rx", "8"), r.setAttribute("fill", "white"), r.setAttribute("stroke", "#e0e0e0"), r.setAttribute("stroke-width", "2"), i.appendChild(r);
|
|
104
|
+
const o = document.createElementNS(
|
|
105
|
+
"http://www.w3.org/2000/svg",
|
|
106
|
+
"g"
|
|
107
|
+
), a = document.createElementNS(
|
|
108
|
+
"http://www.w3.org/2000/svg",
|
|
109
|
+
"rect"
|
|
110
|
+
);
|
|
111
|
+
a.setAttribute("x", "28"), a.setAttribute("y", "20"), a.setAttribute("width", "22"), a.setAttribute("height", "28"), a.setAttribute("rx", "2"), a.setAttribute("fill", "#f5f5f5"), a.setAttribute("stroke", "#ccc"), a.setAttribute("stroke-width", "1");
|
|
112
|
+
const l = document.createElementNS(
|
|
113
|
+
"http://www.w3.org/2000/svg",
|
|
114
|
+
"rect"
|
|
115
|
+
);
|
|
116
|
+
l.setAttribute("x", "26"), l.setAttribute("y", "23"), l.setAttribute("width", "22"), l.setAttribute("height", "28"), l.setAttribute("rx", "2"), l.setAttribute("fill", "#fafafa"), l.setAttribute("stroke", "#bbb"), l.setAttribute("stroke-width", "1");
|
|
117
|
+
const s = document.createElementNS(
|
|
118
|
+
"http://www.w3.org/2000/svg",
|
|
119
|
+
"rect"
|
|
120
|
+
);
|
|
121
|
+
s.setAttribute("x", "24"), s.setAttribute("y", "26"), s.setAttribute("width", "22"), s.setAttribute("height", "28"), s.setAttribute("rx", "2"), s.setAttribute("fill", "white"), s.setAttribute("stroke", "#999"), s.setAttribute("stroke-width", "1.5"), o.appendChild(a), o.appendChild(l), o.appendChild(s), i.appendChild(o);
|
|
122
|
+
const d = document.createElementNS(
|
|
123
|
+
"http://www.w3.org/2000/svg",
|
|
124
|
+
"circle"
|
|
125
|
+
);
|
|
126
|
+
d.setAttribute("cx", "52"), d.setAttribute("cy", "18"), d.setAttribute("r", "12"), d.setAttribute("fill", "#666"), d.setAttribute("stroke", "white"), d.setAttribute("stroke-width", "2");
|
|
127
|
+
const c = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
128
|
+
return c.setAttribute("x", "52"), c.setAttribute("y", "23"), c.setAttribute("text-anchor", "middle"), c.setAttribute("fill", "white"), c.setAttribute("font-size", "13"), c.setAttribute("font-weight", "700"), c.setAttribute("font-family", "system-ui, -apple-system, sans-serif"), c.textContent = t.toString(), i.appendChild(d), i.appendChild(c), e.appendChild(i), e;
|
|
129
|
+
}, O = (t) => {
|
|
130
|
+
t.currentTarget.classList.remove("dragging"), document.querySelectorAll(".multi-dragging").forEach((e) => {
|
|
131
|
+
e.classList.remove("multi-dragging");
|
|
132
|
+
}), v(null);
|
|
133
|
+
}, J = (t, e, i) => {
|
|
134
|
+
t.preventDefault(), t.dataTransfer.dropEffect = "move", v({ listId: e, index: i });
|
|
135
|
+
}, S = (t, e, i) => {
|
|
136
|
+
t.preventDefault(), t.stopPropagation();
|
|
137
|
+
const r = t.dataTransfer.getData("application/json");
|
|
138
|
+
if (!r) return;
|
|
139
|
+
const o = JSON.parse(r);
|
|
140
|
+
if (o.type === "board") {
|
|
141
|
+
const d = o.sourceListId;
|
|
142
|
+
if (d === e) return;
|
|
143
|
+
const c = [...f], h = c.findIndex((m) => m.id === d), p = c.findIndex((m) => m.id === e);
|
|
144
|
+
if (h !== -1 && p !== -1) {
|
|
145
|
+
const [m] = c.splice(h, 1);
|
|
146
|
+
c.splice(p, 0, m), w(c), n.onChange(c);
|
|
147
|
+
}
|
|
148
|
+
_(null), I(null);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const { sourceListId: a, sourceIndex: l } = o, s = [...f];
|
|
152
|
+
if (g.items.findIndex((d) => d.sourceIndex === l) !== -1 && g.selectedArray === a)
|
|
153
|
+
g.items.forEach((d, c) => {
|
|
154
|
+
let h = s.findIndex((p) => p.id === a);
|
|
155
|
+
if (h !== -1) {
|
|
156
|
+
const p = s[h].data;
|
|
157
|
+
let m = d.sourceIndex - c;
|
|
158
|
+
const [D, q] = k(
|
|
159
|
+
p,
|
|
160
|
+
m
|
|
161
|
+
);
|
|
162
|
+
s[h].data = q;
|
|
163
|
+
let E = s.findIndex(
|
|
164
|
+
(C) => C.id === e
|
|
165
|
+
);
|
|
166
|
+
if (E !== -1) {
|
|
167
|
+
const C = s[E].data;
|
|
168
|
+
s[E].data = T(
|
|
169
|
+
C,
|
|
170
|
+
i + c,
|
|
171
|
+
D
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}), A({ items: [], selectedArray: "" });
|
|
176
|
+
else {
|
|
177
|
+
let d = s.findIndex((h) => h.id === a);
|
|
178
|
+
const c = s[d].data;
|
|
179
|
+
if (d !== -1) {
|
|
180
|
+
const [h, p] = k(
|
|
181
|
+
c,
|
|
182
|
+
l
|
|
183
|
+
);
|
|
184
|
+
s[d].data = p;
|
|
185
|
+
let m = s.findIndex(
|
|
186
|
+
(D) => D.id === e
|
|
187
|
+
);
|
|
188
|
+
if (m !== -1) {
|
|
189
|
+
const D = s[m].data;
|
|
190
|
+
s[m].data = T(
|
|
191
|
+
D,
|
|
192
|
+
i,
|
|
193
|
+
h
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
w(s), v(null), n.onChange(s);
|
|
199
|
+
}, M = (t, e) => {
|
|
200
|
+
_(null);
|
|
201
|
+
const i = t.dataTransfer.getData("application/json");
|
|
202
|
+
if (i && JSON.parse(i).type === "board") {
|
|
203
|
+
S(t, e, 0);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
const r = f.find((o) => o.id === e);
|
|
207
|
+
r && S(t, e, r.data.length);
|
|
208
|
+
}, P = (t, e) => {
|
|
209
|
+
if (!n.boardDraggable) {
|
|
210
|
+
t.preventDefault();
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(
|
|
214
|
+
"application/json",
|
|
215
|
+
JSON.stringify({ type: "board", sourceListId: e })
|
|
216
|
+
), I(e);
|
|
217
|
+
}, F = (t) => {
|
|
218
|
+
I(null), _(null);
|
|
219
|
+
};
|
|
220
|
+
return /* @__PURE__ */ u("div", { style: { width: n.width, height: n.height }, children: /* @__PURE__ */ u("div", { className: "d-flex h-100 p-2", children: f.map((t) => /* @__PURE__ */ u(
|
|
221
|
+
G,
|
|
222
|
+
{
|
|
223
|
+
centerTitle: n.centerTitle,
|
|
224
|
+
title: n.title ? t.name : "",
|
|
225
|
+
id: t.id,
|
|
226
|
+
draggable: n.boardDraggable,
|
|
227
|
+
onDragStart: (e) => P(e, t.id),
|
|
228
|
+
onDragEnd: F,
|
|
229
|
+
isDragged: x === t.id,
|
|
230
|
+
isDragOver: N === t.id,
|
|
231
|
+
onDrop: (e) => M(e, t.id),
|
|
232
|
+
onDragOver: (e) => {
|
|
233
|
+
e.preventDefault(), e.stopPropagation(), e.dataTransfer.dropEffect = "move", x && x !== t.id && _(t.id);
|
|
234
|
+
},
|
|
235
|
+
children: t.data.map((e, i) => /* @__PURE__ */ u(
|
|
236
|
+
"div",
|
|
237
|
+
{
|
|
238
|
+
draggable: !0,
|
|
239
|
+
onDragStart: (r) => B(r, e, t.id, i),
|
|
240
|
+
onDragEnd: O,
|
|
241
|
+
onDragOver: (r) => J(r, t.id, i),
|
|
242
|
+
onDrop: (r) => S(r, t.id, i),
|
|
243
|
+
className: `drag_item_wrapper ${(b == null ? void 0 : b.listId) === t.id && (b == null ? void 0 : b.index) === i ? "drag-over" : ""}`,
|
|
244
|
+
children: /* @__PURE__ */ L("div", { className: "drag_item_container", children: [
|
|
245
|
+
/* @__PURE__ */ u(
|
|
246
|
+
"input",
|
|
247
|
+
{
|
|
248
|
+
disabled: !n.multiple,
|
|
249
|
+
id: `${t.id}_${i}`,
|
|
250
|
+
type: "checkbox",
|
|
251
|
+
checked: g.selectedArray === t.id && g.items.findIndex((r) => r.id === e.id) !== -1,
|
|
252
|
+
onChange: (r) => $(r, e, i, t.id)
|
|
253
|
+
}
|
|
254
|
+
),
|
|
255
|
+
/* @__PURE__ */ u(
|
|
256
|
+
"div",
|
|
257
|
+
{
|
|
258
|
+
className: "drag_item_content",
|
|
259
|
+
onClick: () => {
|
|
260
|
+
var r;
|
|
261
|
+
(r = document.getElementById(`${t.id}_${i}`)) == null || r.click();
|
|
262
|
+
},
|
|
263
|
+
children: n.renderItem ? (
|
|
264
|
+
// Use custom render function if provided
|
|
265
|
+
n.renderItem(e, i, t.id)
|
|
266
|
+
) : (
|
|
267
|
+
// Fallback to default Card component for backward compatibility
|
|
268
|
+
/* @__PURE__ */ u(
|
|
269
|
+
z,
|
|
270
|
+
{
|
|
271
|
+
draggerImg: n.draggerImg,
|
|
272
|
+
data: e,
|
|
273
|
+
inputId: `${t.id}_${i}`,
|
|
274
|
+
children: n.children ? n.children : null
|
|
275
|
+
}
|
|
276
|
+
)
|
|
277
|
+
)
|
|
278
|
+
}
|
|
279
|
+
)
|
|
280
|
+
] })
|
|
281
|
+
},
|
|
282
|
+
e.id
|
|
283
|
+
))
|
|
284
|
+
},
|
|
285
|
+
`drop_box_${t.id}`
|
|
286
|
+
)) }) });
|
|
287
|
+
};
|
|
288
|
+
export {
|
|
289
|
+
K as default
|
|
290
|
+
};
|
|
291
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/lib/components/card/index.tsx","../src/lib/components/list/index.tsx","../src/lib/index.tsx"],"sourcesContent":["import React, { FunctionComponent } from \"react\";\nimport { CardProps } from \"../../model\";\n\nconst Card: FunctionComponent<CardProps> = (props) => {\n\n const itemClicked = (): void => {\n document.getElementById(props.inputId)?.click()\n }\n\n return (\n <div className=\"cursor-pointer drag_item_content\" onClick={itemClicked}>\n \n {props.children ? props.children : \n <main className={`drag_item ${props.draggerImg ? \"drag_item_drag_img\" : \"\"}`}>\n <span className=\"\">\n <div>{props.data.value}</div>\n </span>\n </main>\n }\n \n </div>\n );\n};\n\nexport default Card;\n","import React from \"react\";\n\ntype ListProps = {\n children?: React.ReactNode;\n title: string;\n id: string;\n centerTitle?: boolean;\n onDrop: (e: React.DragEvent) => void;\n onDragOver: (e: React.DragEvent) => void;\n draggable?: boolean;\n onDragStart?: (e: React.DragEvent) => void;\n onDragEnd?: (e: React.DragEvent) => void;\n isDragged?: boolean;\n isDragOver?: boolean;\n};\n\nconst List = ({\n children,\n title,\n centerTitle,\n onDrop,\n onDragOver,\n draggable,\n onDragStart,\n onDragEnd,\n isDragged,\n isDragOver,\n}: ListProps) => {\n return (\n <div className={`h-100 w-100 ${isDragged ? \"dragging-board\" : \"\"} ${isDragOver ? \"board-drag-over\" : \"\"}`}>\n <div className=\"h-100\">\n <div className=\"h-100\" onDrop={onDrop} onDragOver={onDragOver}>\n <div\n className=\"h-100 drag_box_container\"\n draggable={draggable}\n onDragStart={onDragStart}\n onDragEnd={onDragEnd}\n >\n {title ? (\n <div\n className={`dragger_title ${centerTitle ? \"center_title\" : \"\"}`}\n >\n {title}\n </div>\n ) : (\n \"\"\n )}\n <div\n className={`drag_box ${title ? \"drag_box_on_drag_tittle\" : \"\"}`}\n >\n {children}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default List;\n","import Card from \"./components/card\";\nimport List from \"./components/list\";\nimport { FunctionComponent, useState } from \"react\";\nimport { MainContainerProps } from \"./model\";\nimport \"./react-drag-drop-style.css\";\n\nconst MainContainer: FunctionComponent<MainContainerProps> = (props) => {\n const [items, setItems] = useState(props.data);\n const [selectItems, setSelectItems] = useState<{\n items: any[];\n selectedArray: string;\n }>({ items: [], selectedArray: \"\" });\n const [draggedOver, setDraggedOver] = useState<{\n listId: string;\n index: number;\n } | null>(null);\n const [draggedBoardId, setDraggedBoardId] = useState<string | null>(null);\n const [boardDragOverId, setBoardDragOverId] = useState<string | null>(null);\n\n const removeFromList = (list: any, index: any) => {\n const result = Array.from(list);\n const [removed] = result.splice(index, 1);\n return [removed, result];\n };\n\n const selectFromList = (\n event: any,\n item: any,\n index: number,\n draggedArray: string\n ) => {\n let currentSelectedItems = { ...selectItems };\n if (selectItems.selectedArray !== draggedArray) {\n setSelectItems({ items: [], selectedArray: draggedArray });\n currentSelectedItems = { items: [], selectedArray: draggedArray };\n }\n\n let result = [];\n if (event.target.checked) {\n let data = [];\n data.push({ ...item, sourceIndex: index });\n result = [...currentSelectedItems.items, ...data];\n } else {\n let data = [...currentSelectedItems.items];\n var itemIndex = data.findIndex((el) => el.id === item.id);\n data.splice(itemIndex, 1);\n result = [...data];\n }\n result.sort((a, b) => {\n return a.sourceIndex - b.sourceIndex;\n });\n setSelectItems({ items: result, selectedArray: draggedArray });\n };\n\n const addToList = (list: any, index: any, element: any) => {\n const result = Array.from(list);\n result.splice(index, 0, element);\n return result;\n };\n\n const handleDragStart = (\n e: React.DragEvent,\n item: any,\n listId: string,\n index: number\n ) => {\n e.stopPropagation();\n e.dataTransfer.effectAllowed = \"move\";\n e.dataTransfer.setData(\"text/html\", e.currentTarget.innerHTML);\n e.dataTransfer.setData(\n \"application/json\",\n JSON.stringify({\n item,\n sourceListId: listId,\n sourceIndex: index,\n })\n );\n\n // Check if this item is part of a multi-selection\n const isMultiDrag =\n selectItems.items.findIndex((d) => d.sourceIndex === index) !== -1 &&\n selectItems.selectedArray === listId;\n\n if (isMultiDrag && selectItems.items.length > 1) {\n // Create custom drag image for multiple items\n const dragImage = createMultiDragImage(selectItems.items.length);\n document.body.appendChild(dragImage);\n e.dataTransfer.setDragImage(dragImage, 40, 40);\n\n // Clean up the drag image after a short delay\n setTimeout(() => {\n document.body.removeChild(dragImage);\n }, 0);\n }\n\n // Add dragging class for visual feedback\n (e.currentTarget as HTMLElement).classList.add(\"dragging\");\n\n // If dragging multiple items, add visual feedback to all selected items\n if (isMultiDrag && selectItems.items.length > 1) {\n selectItems.items.forEach((selectedItem) => {\n const element = document.getElementById(\n `${listId}_${selectedItem.sourceIndex}`\n );\n if (element) {\n element\n .closest(\".drag_item_wrapper\")\n ?.classList.add(\"multi-dragging\");\n }\n });\n }\n };\n\n const createMultiDragImage = (count: number): HTMLElement => {\n const container = document.createElement(\"div\");\n container.style.cssText = `\n position: absolute;\n top: -1000px;\n left: -1000px;\n width: 100px;\n height: 100px;\n display: flex;\n align-items: center;\n justify-content: center;\n filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));\n `;\n\n const svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n svg.setAttribute(\"width\", \"70\");\n svg.setAttribute(\"height\", \"70\");\n svg.setAttribute(\"viewBox\", \"0 0 70 70\");\n svg.style.cssText = \"pointer-events: none;\";\n\n // Background card\n const bgRect = document.createElementNS(\n \"http://www.w3.org/2000/svg\",\n \"rect\"\n );\n bgRect.setAttribute(\"x\", \"10\");\n bgRect.setAttribute(\"y\", \"10\");\n bgRect.setAttribute(\"width\", \"50\");\n bgRect.setAttribute(\"height\", \"50\");\n bgRect.setAttribute(\"rx\", \"8\");\n bgRect.setAttribute(\"fill\", \"white\");\n bgRect.setAttribute(\"stroke\", \"#e0e0e0\");\n bgRect.setAttribute(\"stroke-width\", \"2\");\n svg.appendChild(bgRect);\n\n // Add stacked cards icon (simple, minimal)\n const stackGroup = document.createElementNS(\n \"http://www.w3.org/2000/svg\",\n \"g\"\n );\n\n // Back card (subtle gray)\n const rect1 = document.createElementNS(\n \"http://www.w3.org/2000/svg\",\n \"rect\"\n );\n rect1.setAttribute(\"x\", \"28\");\n rect1.setAttribute(\"y\", \"20\");\n rect1.setAttribute(\"width\", \"22\");\n rect1.setAttribute(\"height\", \"28\");\n rect1.setAttribute(\"rx\", \"2\");\n rect1.setAttribute(\"fill\", \"#f5f5f5\");\n rect1.setAttribute(\"stroke\", \"#ccc\");\n rect1.setAttribute(\"stroke-width\", \"1\");\n\n // Middle card\n const rect2 = document.createElementNS(\n \"http://www.w3.org/2000/svg\",\n \"rect\"\n );\n rect2.setAttribute(\"x\", \"26\");\n rect2.setAttribute(\"y\", \"23\");\n rect2.setAttribute(\"width\", \"22\");\n rect2.setAttribute(\"height\", \"28\");\n rect2.setAttribute(\"rx\", \"2\");\n rect2.setAttribute(\"fill\", \"#fafafa\");\n rect2.setAttribute(\"stroke\", \"#bbb\");\n rect2.setAttribute(\"stroke-width\", \"1\");\n\n // Front card (white, most prominent)\n const rect3 = document.createElementNS(\n \"http://www.w3.org/2000/svg\",\n \"rect\"\n );\n rect3.setAttribute(\"x\", \"24\");\n rect3.setAttribute(\"y\", \"26\");\n rect3.setAttribute(\"width\", \"22\");\n rect3.setAttribute(\"height\", \"28\");\n rect3.setAttribute(\"rx\", \"2\");\n rect3.setAttribute(\"fill\", \"white\");\n rect3.setAttribute(\"stroke\", \"#999\");\n rect3.setAttribute(\"stroke-width\", \"1.5\");\n\n stackGroup.appendChild(rect1);\n stackGroup.appendChild(rect2);\n stackGroup.appendChild(rect3);\n svg.appendChild(stackGroup);\n\n // Add count badge (simple gray circle)\n const badge = document.createElementNS(\n \"http://www.w3.org/2000/svg\",\n \"circle\"\n );\n badge.setAttribute(\"cx\", \"52\");\n badge.setAttribute(\"cy\", \"18\");\n badge.setAttribute(\"r\", \"12\");\n badge.setAttribute(\"fill\", \"#666\");\n badge.setAttribute(\"stroke\", \"white\");\n badge.setAttribute(\"stroke-width\", \"2\");\n\n const text = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n text.setAttribute(\"x\", \"52\");\n text.setAttribute(\"y\", \"23\");\n text.setAttribute(\"text-anchor\", \"middle\");\n text.setAttribute(\"fill\", \"white\");\n text.setAttribute(\"font-size\", \"13\");\n text.setAttribute(\"font-weight\", \"700\");\n text.setAttribute(\"font-family\", \"system-ui, -apple-system, sans-serif\");\n text.textContent = count.toString();\n\n svg.appendChild(badge);\n svg.appendChild(text);\n container.appendChild(svg);\n\n return container;\n };\n\n const handleDragEnd = (e: React.DragEvent) => {\n (e.currentTarget as HTMLElement).classList.remove(\"dragging\");\n\n // Remove multi-dragging class from all items\n document.querySelectorAll(\".multi-dragging\").forEach((el) => {\n el.classList.remove(\"multi-dragging\");\n });\n\n setDraggedOver(null);\n };\n\n const handleDragOver = (\n e: React.DragEvent,\n listId: string,\n index: number\n ) => {\n e.preventDefault();\n e.dataTransfer.dropEffect = \"move\";\n setDraggedOver({ listId, index });\n };\n\n const handleDrop = (\n e: React.DragEvent,\n destinationListId: string,\n destinationIndex: number\n ) => {\n e.preventDefault();\n e.stopPropagation();\n\n const data = e.dataTransfer.getData(\"application/json\");\n if (!data) return;\n\n const parsedData = JSON.parse(data);\n\n if (parsedData.type === \"board\") {\n const sourceListId = parsedData.sourceListId;\n if (sourceListId === destinationListId) return;\n \n const listCopy = [...items];\n const sourceIndex = listCopy.findIndex((l) => l.id === sourceListId);\n const destIndex = listCopy.findIndex((l) => l.id === destinationListId);\n \n if (sourceIndex !== -1 && destIndex !== -1) {\n const [removedBoard] = listCopy.splice(sourceIndex, 1);\n listCopy.splice(destIndex, 0, removedBoard);\n setItems(listCopy);\n props.onChange(listCopy);\n }\n setBoardDragOverId(null);\n setDraggedBoardId(null);\n return;\n }\n\n const { sourceListId, sourceIndex } = parsedData;\n\n const listCopy: any[] = [...items];\n\n // Check if multiple items are selected and being dragged\n if (\n selectItems.items.findIndex((d) => d.sourceIndex === sourceIndex) !==\n -1 &&\n selectItems.selectedArray === sourceListId\n ) {\n // Handle multiple items\n selectItems.items.forEach((el, i) => {\n let sourceId = listCopy.findIndex((list) => list.id === sourceListId);\n if (sourceId !== -1) {\n const sourceList = listCopy[sourceId].data;\n let adjustedSourceIndex = el.sourceIndex - i;\n const [removedElement, newSourceList] = removeFromList(\n sourceList,\n adjustedSourceIndex\n );\n listCopy[sourceId].data = newSourceList;\n\n let destinationId = listCopy.findIndex(\n (list) => list.id === destinationListId\n );\n if (destinationId !== -1) {\n const destinationList = listCopy[destinationId].data;\n listCopy[destinationId].data = addToList(\n destinationList,\n destinationIndex + i,\n removedElement\n );\n }\n }\n });\n setSelectItems({ items: [], selectedArray: \"\" });\n } else {\n // Handle single item\n let sourceId = listCopy.findIndex((list) => list.id === sourceListId);\n const sourceList = listCopy[sourceId].data;\n if (sourceId !== -1) {\n const [removedElement, newSourceList] = removeFromList(\n sourceList,\n sourceIndex\n );\n\n listCopy[sourceId].data = newSourceList;\n\n let destId = listCopy.findIndex(\n (list) => list.id === destinationListId\n );\n if (destId !== -1) {\n const destinationList = listCopy[destId].data;\n listCopy[destId].data = addToList(\n destinationList,\n destinationIndex,\n removedElement\n );\n }\n }\n }\n\n setItems(listCopy);\n setDraggedOver(null);\n props.onChange(listCopy);\n };\n\n const handleListDrop = (e: React.DragEvent, listId: string) => {\n setBoardDragOverId(null);\n const dataStr = e.dataTransfer.getData(\"application/json\");\n if (dataStr) {\n const parsedData = JSON.parse(dataStr);\n if (parsedData.type === \"board\") {\n handleDrop(e, listId, 0); \n return;\n }\n }\n\n // Get the list and drop at the end\n const list = items.find((l) => l.id === listId);\n if (list) {\n handleDrop(e, listId, list.data.length);\n }\n };\n\n const handleBoardDragStart = (e: React.DragEvent, listId: string) => {\n if (!props.boardDraggable) {\n e.preventDefault();\n return;\n }\n e.dataTransfer.effectAllowed = \"move\";\n e.dataTransfer.setData(\n \"application/json\",\n JSON.stringify({ type: \"board\", sourceListId: listId })\n );\n setDraggedBoardId(listId);\n };\n\n const handleBoardDragEnd = (e: React.DragEvent) => {\n setDraggedBoardId(null);\n setBoardDragOverId(null);\n };\n\n return (\n <div style={{ width: props.width, height: props.height }}>\n <div className=\"d-flex h-100 p-2\">\n {items.map((el) => {\n return (\n <List\n key={`drop_box_${el.id}`}\n centerTitle={props.centerTitle}\n title={props.title ? el.name : \"\"}\n id={el.id}\n draggable={props.boardDraggable}\n onDragStart={(e) => handleBoardDragStart(e, el.id)}\n onDragEnd={handleBoardDragEnd}\n isDragged={draggedBoardId === el.id}\n isDragOver={boardDragOverId === el.id}\n onDrop={(e) => handleListDrop(e, el.id)}\n onDragOver={(e) => {\n e.preventDefault();\n e.stopPropagation();\n e.dataTransfer.dropEffect = \"move\";\n if (draggedBoardId && draggedBoardId !== el.id) {\n setBoardDragOverId(el.id);\n }\n }}\n >\n {el.data.map((item: any, index: number) => (\n <div\n key={item.id}\n draggable\n onDragStart={(e) => handleDragStart(e, item, el.id, index)}\n onDragEnd={handleDragEnd}\n onDragOver={(e) => handleDragOver(e, el.id, index)}\n onDrop={(e) => handleDrop(e, el.id, index)}\n className={`drag_item_wrapper ${\n draggedOver?.listId === el.id &&\n draggedOver?.index === index\n ? \"drag-over\"\n : \"\"\n }`}\n >\n <div className=\"drag_item_container\">\n <input\n disabled={!props.multiple}\n id={`${el.id}_${index}`}\n type={\"checkbox\"}\n checked={\n selectItems.selectedArray === el.id &&\n selectItems.items.findIndex((e) => e.id === item.id) !==\n -1\n }\n onChange={(event) =>\n selectFromList(event, item, index, el.id)\n }\n />\n <div\n className=\"drag_item_content\"\n onClick={() => {\n document.getElementById(`${el.id}_${index}`)?.click();\n }}\n >\n {props.renderItem ? (\n // Use custom render function if provided\n props.renderItem(item, index, el.id)\n ) : (\n // Fallback to default Card component for backward compatibility\n <Card\n draggerImg={props.draggerImg}\n data={item}\n inputId={`${el.id}_${index}`}\n >\n {props.children ? props.children : null}\n </Card>\n )}\n </div>\n </div>\n </div>\n ))}\n </List>\n );\n })}\n </div>\n </div>\n );\n};\n\nexport default MainContainer;\n"],"names":["Card","props","jsx","_a","List","children","title","centerTitle","onDrop","onDragOver","draggable","onDragStart","onDragEnd","isDragged","isDragOver","jsxs","MainContainer","items","setItems","useState","selectItems","setSelectItems","draggedOver","setDraggedOver","draggedBoardId","setDraggedBoardId","boardDragOverId","setBoardDragOverId","removeFromList","list","index","result","removed","selectFromList","event","item","draggedArray","currentSelectedItems","data","itemIndex","el","a","b","addToList","element","handleDragStart","e","listId","isMultiDrag","d","dragImage","createMultiDragImage","selectedItem","count","container","svg","bgRect","stackGroup","rect1","rect2","rect3","badge","text","handleDragEnd","handleDragOver","handleDrop","destinationListId","destinationIndex","parsedData","sourceListId","listCopy","sourceIndex","l","destIndex","removedBoard","i","sourceId","sourceList","adjustedSourceIndex","removedElement","newSourceList","destinationId","destinationList","destId","handleListDrop","dataStr","handleBoardDragStart","handleBoardDragEnd"],"mappings":";;AAGA,MAAMA,IAAqC,CAACC,MAOxC,gBAAAC,EAAC,OAAA,EAAI,WAAU,oCAAmC,SALhC,MAAY;;AAC9B,GAAAC,IAAA,SAAS,eAAeF,EAAM,OAAO,MAArC,QAAAE,EAAwC;AAC1C,GAKS,UAAAF,EAAM,WAAWA,EAAM,WACtB,gBAAAC,EAAC,QAAA,EAAK,WAAW,aAAaD,EAAM,aAAa,uBAAuB,EAAE,IACxE,UAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,IACZ,UAAA,gBAAAA,EAAC,OAAA,EAAK,UAAAD,EAAM,KAAK,MAAA,CAAM,EAAA,CAC3B,GACF,GAGR,GCJEG,IAAO,CAAC;AAAA,EACZ,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AACF,MAEI,gBAAAZ,EAAC,SAAI,WAAW,eAAeW,IAAY,mBAAmB,EAAE,IAAIC,IAAa,oBAAoB,EAAE,IACrG,UAAA,gBAAAZ,EAAC,SAAI,WAAU,SACb,4BAAC,OAAA,EAAI,WAAU,SAAQ,QAAAM,GAAgB,YAAAC,GACrC,UAAA,gBAAAM;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,WAAAL;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IAEC,UAAA;AAAA,MAAAN,IACC,gBAAAJ;AAAA,QAAC;AAAA,QAA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AY,kBAAkBoB,EAAG,MACjCpB,EAAY,MAAM,UAAU,CAAC0B,MAAMA,EAAE,OAAOX,EAAK,EAAE,MACjD;AAAA,gBAEJ,UAAU,CAACD,MACTD,EAAeC,GAAOC,GAAML,GAAOU,EAAG,EAAE;AAAA,cAAA;AAAA,YAAA;AAAA,YAG5C,gBAAAtC;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS,MAAM;;AACb,mBAAAC,IAAA,SAAS,eAAe,GAAGqC,EAAG,EAAE,IAAIV,CAAK,EAAE,MAA3C,QAAA3B,EAA8C;AAAA,gBAChD;AAAA,gBAEC,UAAAF,EAAM;AAAA;AAAA,kBAELA,EAAM,WAAWkC,GAAML,GAAOU,EAAG,EAAE;AAAA;AAAA;AAAA,kBAGnC,gBAAAtC;AAAA,oBAACF;AAAA,oBAAA;AAAA,sBACC,YAAYC,EAAM;AAAA,sBAClB,MAAMkC;AAAA,sBACN,SAAS,GAAGK,EAAG,EAAE,IAAIV,CAAK;AAAA,sBAEzB,UAAA7B,EAAM,WAAWA,EAAM,WAAW;AAAA,oBAAA;AAAA,kBAAA;AAAA;AAAA,cACrC;AAAA,YAAA;AAAA,UAEJ,EAAA,CACF;AAAA,QAAA;AAAA,QA/CKkC,EAAK;AAAA,MAAA,CAiDb;AAAA,IAAA;AAAA,IAtEI,YAAYK,EAAG,EAAE;AAAA,EAAA,CAyE3B,GACH,GACF;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.drag_box_container{border:1px solid black;margin-left:.5rem;margin-right:.5rem;border-radius:.375rem}.drag_box{padding:10px;overflow:auto;height:100%}.dragger_title{border-bottom:1px solid black;padding:10px;-webkit-user-select:none;user-select:none}.drag_box_on_drag_tittle{height:calc(100% - 52px);overflow:auto}.drag_item{position:relative;border:1px solid #dddddd;border-radius:4px;overflow:hidden;-webkit-user-select:none;user-select:none;padding:10px;margin-bottom:10px;background-color:#fff}.drag_item.drag_item_drag_img{padding-left:40px}.drag_item_drag_img:before{content:"";background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAC9JJREFUeJzt3WuQl2UZx/Hvf1l25bCCKGSm4qCYoagIY6N4GtGmUtMOmmY6OZ2srCanw0wvtXLGN1la2uCpscysXpiJOkmTjVLiookiCmqIeEJNDWVhF/j34vrv8Gd3hT08931d+zy/z8zzBnhxXdfN9X9O93PfICIiIiIiIiIiIiIiIiIiItuN8Q4gkRowHmgDtjjHUma7AROAFmCrcyxJ1LwDKMghwOnACcChwHS2N38dWAesBB4A7gaWNf5cBq8D+DiwAJgHzAQmNv39u8CzQCewGLgLeDtzjNJkDHAusBT7zz6UYyVwMfYLKDt3MLAQ2MjQarwJuBmYlT1iYT6wnKE3Rt/jeeCszLGPFrsD12CXTiOp8TaswabkDb+aWoHLsaKPtDmaj5uwa2kxRwNrKLbGLwLHZ8yhcsYBd1DsoDUfDwF7Zcsmrk9jl0cpatwDfD5fKtXRBtxDuuboPZYDkzPlFNGnsKd+KWu8DbggV0JVcQPpm6P3+Bt2KVc1R5PuzDHQmeTEPGmV34Xka47e47IsmcWxO8Xfc+zqeAnYM0NupTYV+C/5G6QHOCxDflH8nPw1rgM35kiuzLwGrg4sypBfBDNJf9+xs+OI9CmW01SgC7+BqwNzkmfp71f41vjW9CmW07fxHbg69qKszCZiU0Q8a9yN7kWGZQn+DbIem4hXVp/Bv8Z14KLUiQ5X1MHvwB47eptKuW/WF3gH0HCKdwDvJWqDHEGcqfhzvQNIaJ53AA1haxy1QWZ6B9DkYO8AEopS5wOJ84O4g6gNEummLVIsRRoLTPIOoqGVoFN8ojbIeO8AmpR1lm+bdwB9tHsHMJCoDdLlHUCTjd4BJNLtHUAfm70DGEjUBnnDO4AmkWIpUg9xPondArzlHcRAojbIKu8AmjztHUBCz3gH0PAcQRd9iNogjxGnYI94B5BQp3cADVHi6C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6z2WYA8AquZY0p05BjqTnJInrfL7Cvmao/e4MktmcUwGXiBvjV+l2mfrQuwD/I/8DbIVe7dSFdeSv8Z17OmWjMB1+AxcHXvZVQWHYD8IXnWu0g9RofZm6C+nij6OTp6lvxvwrfHt6VMspx/gO3B1YGHyLH11ABvxrXEPeok4LA/j3yBvUN4JnQCfxb/GdQI/9m3xDuA9TAbmegeBTbc40juIhE72DqAh7CPfqA0yhzjzo8p8EznPO4CGsDWO2iAHegfQZKZ3AAlFqfMMgl7KRm2QSDdtkWIpUhv2sVMErdhldThRGyTSVI927wASGbvrf5JVyDpHbZBu7wCabPYOIJFINYagdY7aIOu9A2gSKZYi9QBveQfRECmWHURtkNXeATRZ5R1AQlHq/Cw23SWcqA3yKHEWVej0DiChKLlFiaOfqA2yAVjqHQTwGvC4dxAJRZmQeZ93AKPRpfhPgbg2eZa+JmA/Rp413ozNWJAh2gvownfwqrBkjde3IL3Hb9KnWF4/w2/gFmXIL4IZ2FMkjxpvAw5Ln2J5TcVWRcw9cD1Ua+B+ik+DlP1zgiwuIP/AXZYlszg6sEetOWu8Dt17FKJG3q/eFmNzg6pmLvnu+bqB+XnSqoY24F7SD9xyYI9MOUV0JrYkT8oabwM+lyuhKhkH3EG6gVuKPTmrujNJdybZjK3cKImMAX5E8av/3Yg1oJi52FYGRdZ4LbY4nWQwH3iMkQ/af7BfTOmvA1sofKSXXFuBXxL0e48yG4OtJbuUoQ/aSuBign6DEMxB2Ppk7zC0Gm/EHq58MH/IxYny3fdIHQKcDhyPbfiyH9ufRNWxpfxXAA9iLwAfafy5DN4E4KPY3ixzsU+Rm79I3IDNDl6GPQlc1PizUa0sDdJXDRvQFuBdgk6lLoH2xtENbHKORURERERERERERERERERERJL7P4FXosobB0UFAAAAAElFTkSuQmCC);position:absolute;left:0;top:0;bottom:0;width:30px;background-size:100%;background-repeat:no-repeat;background-position:center;background-color:#efefef;padding:0}.drag_item_container{position:relative}.drag_item_container input{position:absolute;opacity:0}.drag_item_container input:checked~.drag_item_content .drag_item{border-color:#00f}.drag_item_wrapper{cursor:move;position:relative}.drag_item_wrapper:hover{z-index:10}.drag_item_wrapper.dragging{opacity:.5}.drag_item_wrapper.multi-dragging{opacity:.6}.drag_item_container input:checked~.drag_item_content{position:relative}.drag_item_container input:checked~.drag_item_content>div{box-shadow:0 0 0 1px #667eea}.drag_item_container input:checked~.drag_item_content:hover:before{background:#667eea1a}.drag_item_wrapper.drag-over{border-top:3px solid #4CAF50;padding-top:5px}.cursor-pointer{cursor:pointer}.h-100{height:100%}.w-100{width:100%}.d-flex{display:flex}.flex-col{flex-direction:column}.p-2{padding:.5rem}.center_title{text-align:center}.dragging-board{opacity:.4}.board-drag-over{border:2px dashed #4CAF50;border-radius:.375rem;box-sizing:border-box}
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-drag-drop-kanban",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "React 18/19 drag and drop component with native HTML5 APIs - multiple columns support",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"React drag and drop",
|
|
7
|
+
"Drag and drop",
|
|
8
|
+
"Multiple drag and drop",
|
|
9
|
+
"Multi drag drop",
|
|
10
|
+
"React multiple drag drop",
|
|
11
|
+
"React multiple box drag drop",
|
|
12
|
+
"React horizontal and vertical drag and drop",
|
|
13
|
+
"Javascript drag and drop",
|
|
14
|
+
"React drag and drop multiple",
|
|
15
|
+
"React drag",
|
|
16
|
+
"React dnd",
|
|
17
|
+
"React multiple dnd",
|
|
18
|
+
"Dnd",
|
|
19
|
+
"Kanban board",
|
|
20
|
+
"Kanban board dnd"
|
|
21
|
+
],
|
|
22
|
+
"author": "Bibin antony",
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "build/index.js",
|
|
25
|
+
"module": "build/index.js",
|
|
26
|
+
"files": [
|
|
27
|
+
"build/*.js",
|
|
28
|
+
"build/*.js.map",
|
|
29
|
+
"build/*.css",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"homepage": "https://bibinantony1998.github.io/react-drag-and-drop-multiple",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/bibinantony1998/react-drag-and-drop-multiple.git"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
39
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
43
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
44
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
45
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
46
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
47
|
+
"@testing-library/react": "^16.1.0",
|
|
48
|
+
"@testing-library/user-event": "^14.5.2",
|
|
49
|
+
"@types/node": "^22.10.2",
|
|
50
|
+
"@types/react": "^19.0.6",
|
|
51
|
+
"@types/react-dom": "^19.0.2",
|
|
52
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
53
|
+
"gh-pages": "^6.3.0",
|
|
54
|
+
"postcss": "^8.4.49",
|
|
55
|
+
"react": "^19.0.0",
|
|
56
|
+
"react-dom": "^19.0.0",
|
|
57
|
+
"rollup": "^4.28.1",
|
|
58
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
59
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
60
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
61
|
+
"sass": "^1.83.0",
|
|
62
|
+
"typescript": "^5.7.2",
|
|
63
|
+
"vite": "^6.0.5",
|
|
64
|
+
"vitest": "^2.1.8"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"dev": "vite",
|
|
68
|
+
"start": "vite",
|
|
69
|
+
"build": "vite build --config vite.config.lib.ts",
|
|
70
|
+
"build:demo": "vite build",
|
|
71
|
+
"preview": "vite preview",
|
|
72
|
+
"test": "vitest",
|
|
73
|
+
"deploy": "npm run build:demo && gh-pages -d dist",
|
|
74
|
+
"prepublishOnly": "npm run build"
|
|
75
|
+
},
|
|
76
|
+
"engines": {
|
|
77
|
+
"node": ">=18.0.0",
|
|
78
|
+
"npm": ">=9.0.0"
|
|
79
|
+
},
|
|
80
|
+
"license": "ISC"
|
|
81
|
+
}
|