hazo_ui 6.9.0 → 6.10.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/CHANGE_LOG.md +34 -0
- package/dist/index.cjs +24 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +24 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGE_LOG.md
CHANGED
|
@@ -5,6 +5,40 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## v6.10.0 (2026-08-15)
|
|
9
|
+
|
|
10
|
+
### Added — `HazoUiKanban.renderColumnHeaderExtra`
|
|
11
|
+
|
|
12
|
+
`renderColumnFooter` already gave consumers a slot under a column's body;
|
|
13
|
+
there was no equivalent for the header. `renderColumnHeaderExtra` fills that
|
|
14
|
+
gap — a render-prop that fires once per rendered copy of a column and returns
|
|
15
|
+
a node placed inline in the header, next to the title and count badge:
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<HazoUiKanban
|
|
19
|
+
columns={columns}
|
|
20
|
+
items={items}
|
|
21
|
+
renderCard={(item) => <Card item={item} />}
|
|
22
|
+
renderColumnHeaderExtra={({ columnKey, laneKey }) =>
|
|
23
|
+
columnKey !== "todo" ? null : (
|
|
24
|
+
<SegmentedToggle value={view} onChange={setView} options={["All", "Recent"]} />
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
/>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Same lane-scoping caveat as `renderColumnFooter`: on a laned board it fires
|
|
31
|
+
once per (lane, column) pair, and the unmatched-lane sentinel row never gets
|
|
32
|
+
one. The internal `render_column` parameter that gated this (`with_footer`)
|
|
33
|
+
is renamed `with_consumer_callbacks` since it now gates both render-props for
|
|
34
|
+
the same reason — leaking `UNMATCHED_LANE_KEY` to a consumer callback isn't
|
|
35
|
+
specific to the footer.
|
|
36
|
+
|
|
37
|
+
The returned node is wrapped so its pointer/mouse/key events stop
|
|
38
|
+
propagation before reaching dnd-kit, the same guard already used by the
|
|
39
|
+
card's pencil-edit affordance — this matters on a sectioned column, where the
|
|
40
|
+
header is itself a droppable, and is a harmless no-op elsewhere.
|
|
41
|
+
|
|
8
42
|
## v6.9.0 (2026-08-06)
|
|
9
43
|
|
|
10
44
|
### Added — `Badge`, `StatusBadge`, `makeStatusBadge`
|
package/dist/index.cjs
CHANGED
|
@@ -9217,6 +9217,7 @@ function KanbanColumn({
|
|
|
9217
9217
|
renderCard,
|
|
9218
9218
|
emptyColumn,
|
|
9219
9219
|
footer,
|
|
9220
|
+
headerExtra,
|
|
9220
9221
|
cardClassName,
|
|
9221
9222
|
showEdit,
|
|
9222
9223
|
onEditRequest,
|
|
@@ -9277,7 +9278,8 @@ function KanbanColumn({
|
|
|
9277
9278
|
treeKey,
|
|
9278
9279
|
title: column.title,
|
|
9279
9280
|
count: items.length,
|
|
9280
|
-
droppable: sections != null
|
|
9281
|
+
droppable: sections != null,
|
|
9282
|
+
headerExtra
|
|
9281
9283
|
}
|
|
9282
9284
|
),
|
|
9283
9285
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9332,7 +9334,8 @@ function KanbanColumnHead({
|
|
|
9332
9334
|
treeKey,
|
|
9333
9335
|
title,
|
|
9334
9336
|
count,
|
|
9335
|
-
droppable
|
|
9337
|
+
droppable,
|
|
9338
|
+
headerExtra
|
|
9336
9339
|
}) {
|
|
9337
9340
|
const { setNodeRef, isOver } = core$1.useDroppable({
|
|
9338
9341
|
id: tree_droppable_id("columnhead", treeKey, laneKey, columnKey),
|
|
@@ -9346,13 +9349,25 @@ function KanbanColumnHead({
|
|
|
9346
9349
|
"data-column-key": columnKey,
|
|
9347
9350
|
"data-lane-key": laneKey,
|
|
9348
9351
|
className: cn(
|
|
9349
|
-
"cls_hazo_kanban_column_head mb-2 flex items-center justify-between rounded-sm px-1 text-xs uppercase tracking-wider text-muted-foreground",
|
|
9352
|
+
"cls_hazo_kanban_column_head mb-2 flex items-center justify-between gap-2 rounded-sm px-1 text-xs uppercase tracking-wider text-muted-foreground",
|
|
9350
9353
|
droppable && "py-1",
|
|
9351
9354
|
isOver && "cls_hazo_kanban_column_head_over bg-accent/30 text-foreground ring-1 ring-ring/40"
|
|
9352
9355
|
),
|
|
9353
9356
|
children: [
|
|
9354
|
-
/* @__PURE__ */ jsxRuntime.
|
|
9355
|
-
|
|
9357
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "cls_hazo_kanban_column_head_title_group flex min-w-0 items-center gap-2", children: [
|
|
9358
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "cls_hazo_kanban_column_title truncate", children: title }),
|
|
9359
|
+
headerExtra ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9360
|
+
"span",
|
|
9361
|
+
{
|
|
9362
|
+
className: "cls_hazo_kanban_column_head_extra shrink-0",
|
|
9363
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
9364
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
9365
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
9366
|
+
children: headerExtra
|
|
9367
|
+
}
|
|
9368
|
+
) : null
|
|
9369
|
+
] }),
|
|
9370
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "cls_hazo_kanban_column_count shrink-0 rounded-full bg-muted px-2 py-0.5 text-foreground", children: count })
|
|
9356
9371
|
]
|
|
9357
9372
|
}
|
|
9358
9373
|
);
|
|
@@ -9933,6 +9948,7 @@ function HazoUiKanban({
|
|
|
9933
9948
|
announcements,
|
|
9934
9949
|
emptyColumn = "\u2014",
|
|
9935
9950
|
renderColumnFooter,
|
|
9951
|
+
renderColumnHeaderExtra,
|
|
9936
9952
|
className,
|
|
9937
9953
|
cardClassName,
|
|
9938
9954
|
itemLabel,
|
|
@@ -10186,7 +10202,7 @@ function HazoUiKanban({
|
|
|
10186
10202
|
total += (grouped.get(bucket_key(lane_key, col.key)) ?? []).length;
|
|
10187
10203
|
return total;
|
|
10188
10204
|
}
|
|
10189
|
-
function render_column(col, tree_key, lane_key,
|
|
10205
|
+
function render_column(col, tree_key, lane_key, with_consumer_callbacks = true) {
|
|
10190
10206
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10191
10207
|
KanbanColumn,
|
|
10192
10208
|
{
|
|
@@ -10196,7 +10212,8 @@ function HazoUiKanban({
|
|
|
10196
10212
|
items: grouped.get(bucket_key(lane_key, col.key)) ?? [],
|
|
10197
10213
|
renderCard,
|
|
10198
10214
|
emptyColumn,
|
|
10199
|
-
footer:
|
|
10215
|
+
footer: with_consumer_callbacks ? renderColumnFooter?.({ columnKey: col.key, laneKey: lane_key }) ?? null : null,
|
|
10216
|
+
headerExtra: with_consumer_callbacks ? renderColumnHeaderExtra?.({ columnKey: col.key, laneKey: lane_key }) ?? null : null,
|
|
10200
10217
|
cardClassName,
|
|
10201
10218
|
showEdit: show_edit,
|
|
10202
10219
|
onEditRequest: handle_edit_request
|