@particle-academy/react-fancy 2.7.0 → 2.7.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/docs/AccordionPanel.md +6 -0
- package/docs/Kanban.md +23 -0
- package/package.json +1 -1
package/docs/AccordionPanel.md
CHANGED
|
@@ -118,6 +118,7 @@ const [open, setOpen] = useState<string[]>(["wishlist"]);
|
|
|
118
118
|
| `pinned` | `boolean` | `false` | Never collapses; doesn't need a Trigger |
|
|
119
119
|
| `className` | `string` | - | Class on the section's outer container |
|
|
120
120
|
| `openClassName` / `closedClassName` | `string` | - | Class applied per state |
|
|
121
|
+
| `unstyled` | `boolean` | `false` | Skip the default flex layout (`items-center`, `gap-1`, row/col by orientation). Use for full-bleed panel sections where the trigger should stretch to fill the panel. *Since v2.7.0.* |
|
|
121
122
|
|
|
122
123
|
### AccordionPanel.Trigger
|
|
123
124
|
|
|
@@ -133,3 +134,8 @@ const [open, setOpen] = useState<string[]>(["wishlist"]);
|
|
|
133
134
|
|------|------|---------|-------------|
|
|
134
135
|
| `children` | `ReactNode` | **required** | Open-state content |
|
|
135
136
|
| `className` | `string` | - | Layout class on the content container |
|
|
137
|
+
| `unstyled` | `boolean` | `false` | Skip the default flex layout. Same intent as `Section.unstyled` — for full-bleed panel content (chat panes, canvas surfaces). *Since v2.7.0.* |
|
|
138
|
+
|
|
139
|
+
## Hitbox
|
|
140
|
+
|
|
141
|
+
The default open-state Trigger renders as a thin 1px divider on the section's trailing edge, but the **clickable hitbox is 12px wide** (`w-3` / `h-3`) so users don't have to land pixel-perfect on the line. The visible 1px line darkens on hover and an inset chevron fades in. *Since v2.7.0.*
|
package/docs/Kanban.md
CHANGED
|
@@ -41,6 +41,7 @@ import { Kanban } from "@particle-academy/react-fancy";
|
|
|
41
41
|
| id | `string` | - | Unique column identifier (required) |
|
|
42
42
|
| title | `string` | - | Column header text |
|
|
43
43
|
| className | `string` | - | Additional CSS classes |
|
|
44
|
+
| unstyled | `boolean` | `false` | Skip the default visuals (background, padding, min-height, fixed `w-72`) so you can render your own surface around the children. The drop target, drag-over ring, and column id wiring are kept. *Since v2.7.0.* |
|
|
44
45
|
|
|
45
46
|
### Kanban.Card
|
|
46
47
|
|
|
@@ -49,6 +50,28 @@ import { Kanban } from "@particle-academy/react-fancy";
|
|
|
49
50
|
| id | `string` | - | Unique card identifier (required) |
|
|
50
51
|
| children | `ReactNode` | - | Card content |
|
|
51
52
|
| className | `string` | - | Additional CSS classes |
|
|
53
|
+
| unstyled | `boolean` | `false` | Skip the default border / padding / shadow so you can wrap your own `<Card>` (or any surface) inside. Drag handlers and `draggable` stay in place. *Since v2.7.0.* |
|
|
54
|
+
|
|
55
|
+
## Composing custom card visuals
|
|
56
|
+
|
|
57
|
+
When you want full control over the card body — e.g. wrapping a `<Card>` with avatars, badges, dropdown menus — pass `unstyled` so the Kanban wrapper just provides drag plumbing:
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
<Kanban.Card id={card.id} unstyled>
|
|
61
|
+
<Card variant="elevated" padding="none" className="overflow-hidden">
|
|
62
|
+
{/* your fancy card body */}
|
|
63
|
+
</Card>
|
|
64
|
+
</Kanban.Card>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Same pattern works for columns when you want a custom column shell:
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
<Kanban.Column id="doing" unstyled className="w-80 rounded-xl bg-zinc-50 p-3 ring-1 ring-zinc-200">
|
|
71
|
+
<MyColumnHeader title="In progress" wipLimit={3} />
|
|
72
|
+
{cards.map((c) => <Kanban.Card key={c.id} id={c.id} unstyled>...</Kanban.Card>)}
|
|
73
|
+
</Kanban.Column>
|
|
74
|
+
```
|
|
52
75
|
|
|
53
76
|
## Stateful Example
|
|
54
77
|
|