@particle-academy/react-fancy 4.14.0 → 4.14.1
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.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -12963,6 +12963,7 @@ function TreeNode({ node, depth }) {
|
|
|
12963
12963
|
indentSize,
|
|
12964
12964
|
showIcons,
|
|
12965
12965
|
draggable,
|
|
12966
|
+
dragCursor,
|
|
12966
12967
|
dragState,
|
|
12967
12968
|
setDragState,
|
|
12968
12969
|
onNodeMove,
|
|
@@ -13093,7 +13094,12 @@ function TreeNode({ node, depth }) {
|
|
|
13093
13094
|
isSelected ? "bg-blue-500/15 text-blue-600 dark:text-blue-400" : "text-zinc-700 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-zinc-800",
|
|
13094
13095
|
node.disabled && "pointer-events-none opacity-40",
|
|
13095
13096
|
isDragging && "opacity-50",
|
|
13096
|
-
|
|
13097
|
+
// Grab affordance. By default (`dragCursor="none"`) the row keeps its
|
|
13098
|
+
// normal click cursor on hover — no open-hand "move me" cursor before
|
|
13099
|
+
// any drag — and only shows the closed-hand `grabbing` cursor while a
|
|
13100
|
+
// drag is actually underway (mousedown/drag). `dragCursor="grab"` opts
|
|
13101
|
+
// back into the always-on grab cursor for whole-row drag handles (#14).
|
|
13102
|
+
canDrag && (dragCursor === "grab" ? "cursor-grab active:cursor-grabbing" : "active:cursor-grabbing"),
|
|
13097
13103
|
isDropTarget && dropPosition === "inside" && "bg-blue-500/10 ring-1 ring-blue-500/30 ring-inset"
|
|
13098
13104
|
),
|
|
13099
13105
|
style: { paddingLeft },
|
|
@@ -13149,6 +13155,7 @@ function TreeNavRoot({
|
|
|
13149
13155
|
defaultExpandAll = false,
|
|
13150
13156
|
indentSize = 16,
|
|
13151
13157
|
showIcons = true,
|
|
13158
|
+
dragCursor = "none",
|
|
13152
13159
|
className
|
|
13153
13160
|
}) {
|
|
13154
13161
|
const [internalExpanded, setInternalExpanded] = react.useState(() => {
|
|
@@ -13193,6 +13200,7 @@ function TreeNavRoot({
|
|
|
13193
13200
|
indentSize,
|
|
13194
13201
|
showIcons,
|
|
13195
13202
|
draggable,
|
|
13203
|
+
dragCursor,
|
|
13196
13204
|
dragState,
|
|
13197
13205
|
setDragState,
|
|
13198
13206
|
onNodeMove,
|
|
@@ -13210,6 +13218,7 @@ function TreeNavRoot({
|
|
|
13210
13218
|
indentSize,
|
|
13211
13219
|
showIcons,
|
|
13212
13220
|
draggable,
|
|
13221
|
+
dragCursor,
|
|
13213
13222
|
dragState,
|
|
13214
13223
|
onNodeMove,
|
|
13215
13224
|
acceptExternalDrops,
|