@expcat/tigercat-vue 0.3.70 → 0.4.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.
Files changed (137) hide show
  1. package/dist/chunk-HFBRO2IF.mjs +440 -0
  2. package/dist/chunk-YQGKXFV5.js +443 -0
  3. package/dist/components/ActivityFeed.d.mts +1 -1
  4. package/dist/components/ActivityFeed.d.ts +1 -1
  5. package/dist/components/Alert.d.mts +1 -1
  6. package/dist/components/Alert.d.ts +1 -1
  7. package/dist/components/Anchor.d.mts +5 -5
  8. package/dist/components/Anchor.d.ts +5 -5
  9. package/dist/components/AnchorLink.d.mts +1 -1
  10. package/dist/components/AnchorLink.d.ts +1 -1
  11. package/dist/components/Avatar.d.mts +2 -2
  12. package/dist/components/Avatar.d.ts +2 -2
  13. package/dist/components/BackTop.d.mts +1 -1
  14. package/dist/components/BackTop.d.ts +1 -1
  15. package/dist/components/Badge.d.mts +1 -1
  16. package/dist/components/Badge.d.ts +1 -1
  17. package/dist/components/Breadcrumb.d.mts +1 -1
  18. package/dist/components/Breadcrumb.d.ts +1 -1
  19. package/dist/components/BreadcrumbItem.d.mts +1 -1
  20. package/dist/components/BreadcrumbItem.d.ts +1 -1
  21. package/dist/components/Button.d.mts +2 -2
  22. package/dist/components/Button.d.ts +2 -2
  23. package/dist/components/Card.d.mts +1 -1
  24. package/dist/components/Card.d.ts +1 -1
  25. package/dist/components/Carousel.d.mts +2 -2
  26. package/dist/components/Carousel.d.ts +2 -2
  27. package/dist/components/ChartAxis.d.mts +1 -1
  28. package/dist/components/ChartAxis.d.ts +1 -1
  29. package/dist/components/ChartGrid.d.mts +2 -2
  30. package/dist/components/ChartGrid.d.ts +2 -2
  31. package/dist/components/ChartTooltip.d.mts +1 -1
  32. package/dist/components/ChartTooltip.d.ts +1 -1
  33. package/dist/components/ChatWindow.d.mts +1 -1
  34. package/dist/components/ChatWindow.d.ts +1 -1
  35. package/dist/components/Code.d.mts +1 -1
  36. package/dist/components/Code.d.ts +1 -1
  37. package/dist/components/Collapse.d.mts +2 -2
  38. package/dist/components/Collapse.d.ts +2 -2
  39. package/dist/components/CollapsePanel.d.mts +2 -2
  40. package/dist/components/CollapsePanel.d.ts +2 -2
  41. package/dist/components/CommentThread.d.mts +1 -1
  42. package/dist/components/CommentThread.d.ts +1 -1
  43. package/dist/components/Content.d.mts +1 -1
  44. package/dist/components/Content.d.ts +1 -1
  45. package/dist/components/CropUpload.d.mts +1 -1
  46. package/dist/components/CropUpload.d.ts +1 -1
  47. package/dist/components/DataTableWithToolbar.d.mts +3 -3
  48. package/dist/components/DataTableWithToolbar.d.ts +3 -3
  49. package/dist/components/DatePicker.d.mts +1 -1
  50. package/dist/components/DatePicker.d.ts +1 -1
  51. package/dist/components/Descriptions.d.mts +1 -1
  52. package/dist/components/Descriptions.d.ts +1 -1
  53. package/dist/components/Drawer.d.mts +3 -3
  54. package/dist/components/Drawer.d.ts +3 -3
  55. package/dist/components/Dropdown.d.mts +1 -1
  56. package/dist/components/Dropdown.d.ts +1 -1
  57. package/dist/components/DropdownItem.d.mts +1 -1
  58. package/dist/components/DropdownItem.d.ts +1 -1
  59. package/dist/components/DropdownMenu.d.mts +1 -1
  60. package/dist/components/DropdownMenu.d.ts +1 -1
  61. package/dist/components/Footer.d.mts +1 -1
  62. package/dist/components/Footer.d.ts +1 -1
  63. package/dist/components/FormWizard.d.mts +3 -3
  64. package/dist/components/FormWizard.d.ts +3 -3
  65. package/dist/components/Header.d.mts +1 -1
  66. package/dist/components/Header.d.ts +1 -1
  67. package/dist/components/Image.d.mts +1 -1
  68. package/dist/components/Image.d.ts +1 -1
  69. package/dist/components/ImageCropper.d.mts +1 -1
  70. package/dist/components/ImageCropper.d.ts +1 -1
  71. package/dist/components/Input.d.mts +1 -1
  72. package/dist/components/Input.d.ts +1 -1
  73. package/dist/components/Layout.d.mts +1 -1
  74. package/dist/components/Layout.d.ts +1 -1
  75. package/dist/components/List.d.mts +2 -2
  76. package/dist/components/List.d.ts +2 -2
  77. package/dist/components/Loading.d.mts +2 -2
  78. package/dist/components/Loading.d.ts +2 -2
  79. package/dist/components/Menu.d.mts +1 -1
  80. package/dist/components/Menu.d.ts +1 -1
  81. package/dist/components/MenuItem.d.mts +1 -1
  82. package/dist/components/MenuItem.d.ts +1 -1
  83. package/dist/components/MenuItemGroup.d.mts +1 -1
  84. package/dist/components/MenuItemGroup.d.ts +1 -1
  85. package/dist/components/Modal.d.mts +3 -3
  86. package/dist/components/Modal.d.ts +3 -3
  87. package/dist/components/NotificationCenter.d.mts +1 -1
  88. package/dist/components/NotificationCenter.d.ts +1 -1
  89. package/dist/components/Pagination.d.mts +2 -2
  90. package/dist/components/Pagination.d.ts +2 -2
  91. package/dist/components/Popconfirm.d.mts +1 -1
  92. package/dist/components/Popconfirm.d.ts +1 -1
  93. package/dist/components/Popover.d.mts +3 -3
  94. package/dist/components/Popover.d.ts +3 -3
  95. package/dist/components/Progress.d.mts +4 -4
  96. package/dist/components/Progress.d.ts +4 -4
  97. package/dist/components/Select.d.mts +1 -1
  98. package/dist/components/Select.d.ts +1 -1
  99. package/dist/components/Sidebar.d.mts +1 -1
  100. package/dist/components/Sidebar.d.ts +1 -1
  101. package/dist/components/Skeleton.d.mts +1 -1
  102. package/dist/components/Skeleton.d.ts +1 -1
  103. package/dist/components/Slider.d.mts +1 -1
  104. package/dist/components/Slider.d.ts +1 -1
  105. package/dist/components/Space.d.mts +1 -1
  106. package/dist/components/Space.d.ts +1 -1
  107. package/dist/components/Steps.d.mts +2 -2
  108. package/dist/components/Steps.d.ts +2 -2
  109. package/dist/components/StepsItem.d.mts +1 -1
  110. package/dist/components/StepsItem.d.ts +1 -1
  111. package/dist/components/SubMenu.d.mts +1 -1
  112. package/dist/components/SubMenu.d.ts +1 -1
  113. package/dist/components/TabPane.d.mts +1 -1
  114. package/dist/components/TabPane.d.ts +1 -1
  115. package/dist/components/Tabs.d.mts +1 -1
  116. package/dist/components/Tabs.d.ts +1 -1
  117. package/dist/components/Tag.d.mts +1 -1
  118. package/dist/components/Tag.d.ts +1 -1
  119. package/dist/components/TaskBoard.d.mts +129 -0
  120. package/dist/components/TaskBoard.d.ts +129 -0
  121. package/dist/components/TaskBoard.js +18 -0
  122. package/dist/components/TaskBoard.mjs +3 -0
  123. package/dist/components/Textarea.d.mts +1 -1
  124. package/dist/components/Textarea.d.ts +1 -1
  125. package/dist/components/TimePicker.d.mts +2 -2
  126. package/dist/components/TimePicker.d.ts +2 -2
  127. package/dist/components/Timeline.d.mts +2 -2
  128. package/dist/components/Timeline.d.ts +2 -2
  129. package/dist/components/Tooltip.d.mts +1 -1
  130. package/dist/components/Tooltip.d.ts +1 -1
  131. package/dist/components/Upload.d.mts +3 -3
  132. package/dist/components/Upload.d.ts +3 -3
  133. package/dist/index.d.mts +1 -0
  134. package/dist/index.d.ts +1 -0
  135. package/dist/index.js +5 -0
  136. package/dist/index.mjs +1 -0
  137. package/package.json +2 -2
@@ -0,0 +1,443 @@
1
+ 'use strict';
2
+
3
+ var chunkLUN3PRLX_js = require('./chunk-LUN3PRLX.js');
4
+ var vue = require('vue');
5
+ var tigercatCore = require('@expcat/tigercat-core');
6
+
7
+ var TaskBoard = vue.defineComponent({
8
+ name: "TigerTaskBoard",
9
+ inheritAttrs: false,
10
+ props: {
11
+ columns: {
12
+ type: Array,
13
+ default: void 0
14
+ },
15
+ defaultColumns: {
16
+ type: Array,
17
+ default: () => []
18
+ },
19
+ draggable: {
20
+ type: Boolean,
21
+ default: true
22
+ },
23
+ columnDraggable: {
24
+ type: Boolean,
25
+ default: true
26
+ },
27
+ enforceWipLimit: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ beforeCardMove: {
32
+ type: Function,
33
+ default: void 0
34
+ },
35
+ beforeColumnMove: {
36
+ type: Function,
37
+ default: void 0
38
+ },
39
+ onCardAdd: {
40
+ type: Function,
41
+ default: void 0
42
+ },
43
+ locale: {
44
+ type: Object,
45
+ default: void 0
46
+ },
47
+ className: {
48
+ type: String,
49
+ default: void 0
50
+ },
51
+ style: {
52
+ type: Object,
53
+ default: void 0
54
+ }
55
+ },
56
+ emits: ["card-move", "column-move", "card-add", "update:columns"],
57
+ setup(props, { slots, attrs, emit }) {
58
+ const config = chunkLUN3PRLX_js.useTigerConfig();
59
+ const mergedLocale = vue.computed(() => tigercatCore.mergeTigerLocale(config.value.locale, props.locale));
60
+ const labels = vue.computed(() => tigercatCore.getTaskBoardLabels(mergedLocale.value));
61
+ const innerColumns = vue.ref(props.columns ?? props.defaultColumns ?? []);
62
+ vue.watch(
63
+ () => props.columns,
64
+ (value) => {
65
+ if (value !== void 0) innerColumns.value = value;
66
+ }
67
+ );
68
+ vue.watch(
69
+ () => props.defaultColumns,
70
+ (value) => {
71
+ if (props.columns === void 0 && value !== void 0) {
72
+ innerColumns.value = value;
73
+ }
74
+ }
75
+ );
76
+ const currentColumns = vue.computed(() => props.columns ?? innerColumns.value);
77
+ const updateColumns = (next) => {
78
+ innerColumns.value = next;
79
+ emit("update:columns", next);
80
+ };
81
+ const dragState = vue.ref(null);
82
+ const dropTargetColumnId = vue.ref(null);
83
+ const dropIndex = vue.ref(-1);
84
+ const boardRef = vue.ref(null);
85
+ let touchTracker = null;
86
+ let touchRaf = 0;
87
+ const isTouchDevice = () => typeof window !== "undefined" && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
88
+ const applyCardMove = async (cardId, fromColumnId, toColumnId, toIdx) => {
89
+ const result = tigercatCore.moveCard(currentColumns.value, cardId, fromColumnId, toColumnId, toIdx, {
90
+ enforceWipLimit: props.enforceWipLimit
91
+ });
92
+ if (!result) return;
93
+ if (props.beforeCardMove) {
94
+ const ok = await props.beforeCardMove(result.event);
95
+ if (!ok) return;
96
+ }
97
+ updateColumns(result.columns);
98
+ emit("card-move", result.event);
99
+ };
100
+ const applyColumnMove = async (fromIdx, toIdx) => {
101
+ const result = tigercatCore.reorderColumns(
102
+ currentColumns.value,
103
+ fromIdx,
104
+ Math.min(toIdx, currentColumns.value.length - 1)
105
+ );
106
+ if (!result) return;
107
+ if (props.beforeColumnMove) {
108
+ const ok = await props.beforeColumnMove(result.event);
109
+ if (!ok) return;
110
+ }
111
+ updateColumns(result.columns);
112
+ emit("column-move", result.event);
113
+ };
114
+ const handleCardDragStart = (e, card, column) => {
115
+ if (!props.draggable || !e.dataTransfer) return;
116
+ const idx = column.cards.findIndex((c) => c.id === card.id);
117
+ tigercatCore.setDragData(e.dataTransfer, tigercatCore.createCardDragData(card.id, column.id, idx));
118
+ dragState.value = { type: "card", id: card.id, fromColumnId: column.id, fromIndex: idx };
119
+ };
120
+ const handleCardDragOver = (e, column) => {
121
+ e.preventDefault();
122
+ if (!dragState.value || dragState.value.type !== "card") return;
123
+ dropTargetColumnId.value = column.id;
124
+ const target = e.currentTarget;
125
+ const cardEls = target.querySelectorAll("[data-tiger-taskboard-card]");
126
+ const rects = [];
127
+ cardEls.forEach((el) => rects.push(el.getBoundingClientRect()));
128
+ dropIndex.value = tigercatCore.getDropIndex(e.clientY, rects);
129
+ };
130
+ const handleCardDrop = (e, column) => {
131
+ e.preventDefault();
132
+ if (!e.dataTransfer) return;
133
+ const data = tigercatCore.parseDragData(e.dataTransfer);
134
+ if (!data || data.type !== "card") return;
135
+ applyCardMove(
136
+ data.cardId,
137
+ data.columnId,
138
+ column.id,
139
+ dropIndex.value >= 0 ? dropIndex.value : column.cards.length
140
+ );
141
+ resetDragState();
142
+ };
143
+ const handleColumnDragStart = (e, column, index) => {
144
+ if (!props.columnDraggable || !e.dataTransfer) return;
145
+ tigercatCore.setDragData(e.dataTransfer, tigercatCore.createColumnDragData(column.id, index));
146
+ dragState.value = { type: "column", id: column.id, fromIndex: index };
147
+ };
148
+ const handleColumnDragOver = (e) => {
149
+ if (!dragState.value || dragState.value.type !== "column") return;
150
+ e.preventDefault();
151
+ };
152
+ const handleColumnDrop = (e) => {
153
+ e.preventDefault();
154
+ if (!e.dataTransfer) return;
155
+ const data = tigercatCore.parseDragData(e.dataTransfer);
156
+ if (!data || data.type !== "column") return;
157
+ const colEls = boardRef.value?.querySelectorAll("[data-tiger-taskboard-column]");
158
+ if (!colEls) return;
159
+ const rects = [];
160
+ colEls.forEach((el) => rects.push(el.getBoundingClientRect()));
161
+ const toIdx = tigercatCore.getColumnDropIndex(e.clientX, rects);
162
+ applyColumnMove(data.index, toIdx);
163
+ resetDragState();
164
+ };
165
+ const handleDragEnd = () => {
166
+ resetDragState();
167
+ };
168
+ const handleDragLeave = (e) => {
169
+ const related = e.relatedTarget;
170
+ if (!related || !e.currentTarget.contains(related)) {
171
+ if (dragState.value?.type === "card") {
172
+ dropTargetColumnId.value = null;
173
+ dropIndex.value = -1;
174
+ }
175
+ }
176
+ };
177
+ const resetDragState = () => {
178
+ dragState.value = null;
179
+ dropTargetColumnId.value = null;
180
+ dropIndex.value = -1;
181
+ };
182
+ const setupTouch = () => {
183
+ if (!isTouchDevice()) return;
184
+ touchTracker = tigercatCore.createTouchDragTracker();
185
+ };
186
+ const handleTouchStart = (e, card, column) => {
187
+ if (!props.draggable || !touchTracker) return;
188
+ const idx = column.cards.findIndex((c) => c.id === card.id);
189
+ touchTracker.onTouchStart(e, e.currentTarget);
190
+ dragState.value = { type: "card", id: card.id, fromColumnId: column.id, fromIndex: idx };
191
+ };
192
+ const handleTouchMove = (e) => {
193
+ if (!touchTracker || !dragState.value) return;
194
+ touchTracker.onTouchMove(e);
195
+ cancelAnimationFrame(touchRaf);
196
+ touchRaf = requestAnimationFrame(() => {
197
+ const st = touchTracker.getState();
198
+ if (dragState.value?.type === "card") {
199
+ const colEl = tigercatCore.findColumnFromPoint(st.currentX, st.currentY, boardRef.value);
200
+ if (colEl) {
201
+ const colId = colEl.getAttribute("data-tiger-taskboard-column-id");
202
+ dropTargetColumnId.value = colId ?? null;
203
+ const cardEls = colEl.querySelectorAll("[data-tiger-taskboard-card]");
204
+ const rects = [];
205
+ cardEls.forEach((el) => rects.push(el.getBoundingClientRect()));
206
+ dropIndex.value = tigercatCore.getDropIndex(st.currentY, rects);
207
+ }
208
+ }
209
+ });
210
+ };
211
+ const handleTouchEnd = () => {
212
+ if (!touchTracker || !dragState.value) return;
213
+ touchTracker.onTouchEnd();
214
+ if (dragState.value.type === "card" && dropTargetColumnId.value != null) {
215
+ applyCardMove(
216
+ dragState.value.id,
217
+ dragState.value.fromColumnId,
218
+ dropTargetColumnId.value,
219
+ dropIndex.value >= 0 ? dropIndex.value : 0
220
+ );
221
+ }
222
+ resetDragState();
223
+ };
224
+ const handleColumnTouchStart = (e, column, index) => {
225
+ if (!props.columnDraggable || !touchTracker) return;
226
+ touchTracker.onTouchStart(e, e.currentTarget);
227
+ dragState.value = { type: "column", id: column.id, fromIndex: index };
228
+ };
229
+ const handleColumnTouchMove = (e) => {
230
+ if (!touchTracker || !dragState.value || dragState.value.type !== "column") return;
231
+ touchTracker.onTouchMove(e);
232
+ };
233
+ const handleColumnTouchEnd = () => {
234
+ if (!touchTracker || !dragState.value || dragState.value.type !== "column") return;
235
+ const st = touchTracker.onTouchEnd();
236
+ const colEls = boardRef.value?.querySelectorAll("[data-tiger-taskboard-column]");
237
+ if (!colEls) {
238
+ resetDragState();
239
+ return;
240
+ }
241
+ const rects = [];
242
+ colEls.forEach((el) => rects.push(el.getBoundingClientRect()));
243
+ const toIdx = tigercatCore.getColumnDropIndex(st.currentX, rects);
244
+ applyColumnMove(dragState.value.fromIndex, Math.min(toIdx, currentColumns.value.length - 1));
245
+ resetDragState();
246
+ };
247
+ const kbDragState = vue.ref(null);
248
+ const handleCardKeyDown = (e, card, column) => {
249
+ if (!props.draggable) return;
250
+ if (e.key === "Enter" || e.key === " ") {
251
+ e.preventDefault();
252
+ if (!kbDragState.value) {
253
+ const idx = column.cards.findIndex((c) => c.id === card.id);
254
+ kbDragState.value = { type: "card", id: card.id, fromColumnId: column.id, fromIndex: idx };
255
+ } else {
256
+ const cardIdx = column.cards.findIndex((c) => c.id === card.id);
257
+ if (kbDragState.value.fromColumnId !== void 0) {
258
+ applyCardMove(kbDragState.value.id, kbDragState.value.fromColumnId, column.id, cardIdx);
259
+ }
260
+ kbDragState.value = null;
261
+ }
262
+ return;
263
+ }
264
+ if (e.key === "Escape" && kbDragState.value) {
265
+ e.preventDefault();
266
+ kbDragState.value = null;
267
+ }
268
+ };
269
+ vue.onMounted(() => {
270
+ setupTouch();
271
+ });
272
+ vue.onBeforeUnmount(() => {
273
+ cancelAnimationFrame(touchRaf);
274
+ });
275
+ const wrapperClasses = vue.computed(
276
+ () => tigercatCore.classNames(
277
+ tigercatCore.taskBoardBaseClasses,
278
+ props.className,
279
+ tigercatCore.coerceClassValue(attrs.class)
280
+ )
281
+ );
282
+ const wrapperStyle = vue.computed(
283
+ () => tigercatCore.mergeStyleValues(attrs.style, props.style)
284
+ );
285
+ const renderCard = (card, column) => {
286
+ const isDragging = dragState.value?.type === "card" && dragState.value.id === card.id;
287
+ const isKbGrabbed = kbDragState.value?.id === card.id;
288
+ const cardClasses = tigercatCore.classNames(
289
+ tigercatCore.taskBoardCardClasses,
290
+ isDragging && tigercatCore.taskBoardCardDraggingClasses,
291
+ isKbGrabbed && "ring-2 ring-[var(--tiger-primary,#2563eb)]"
292
+ );
293
+ const cardAttrs = {
294
+ key: String(card.id),
295
+ class: cardClasses,
296
+ draggable: props.draggable,
297
+ tabindex: 0,
298
+ role: "listitem",
299
+ "aria-roledescription": labels.value.dragHintText,
300
+ "aria-grabbed": isKbGrabbed ? "true" : void 0,
301
+ "data-tiger-taskboard-card": "",
302
+ "data-tiger-taskboard-card-id": String(card.id),
303
+ onDragstart: (e) => handleCardDragStart(e, card, column),
304
+ onDragend: handleDragEnd,
305
+ onTouchstart: (e) => handleTouchStart(e, card, column),
306
+ onTouchmove: handleTouchMove,
307
+ onTouchend: handleTouchEnd,
308
+ onKeydown: (e) => handleCardKeyDown(e, card, column)
309
+ };
310
+ if (slots.card) {
311
+ return vue.h("div", cardAttrs, slots.card({ card, column, isDragging }));
312
+ }
313
+ return vue.h("div", cardAttrs, [
314
+ vue.h("div", { class: "font-medium text-sm text-[var(--tiger-text,#1f2937)]" }, card.title),
315
+ card.description ? vue.h(
316
+ "div",
317
+ { class: "mt-1 text-xs text-[var(--tiger-text-muted,#6b7280)] line-clamp-2" },
318
+ card.description
319
+ ) : null
320
+ ]);
321
+ };
322
+ const renderColumnNode = (column, colIndex) => {
323
+ const isDropTarget = dragState.value?.type === "card" && dropTargetColumnId.value === column.id;
324
+ const isColDragging = dragState.value?.type === "column" && dragState.value.id === column.id;
325
+ const wipOver = tigercatCore.isWipExceeded(column);
326
+ const colClasses = tigercatCore.classNames(
327
+ tigercatCore.taskBoardColumnClasses,
328
+ isDropTarget && tigercatCore.taskBoardColumnDropTargetClasses,
329
+ isColDragging && tigercatCore.taskBoardColumnDraggingClasses
330
+ );
331
+ const headerContent = slots["column-header"] ? slots["column-header"]({ column }) : [
332
+ vue.h("span", { class: wipOver ? tigercatCore.taskBoardWipExceededClasses : void 0 }, [
333
+ column.title,
334
+ column.wipLimit != null ? vue.h(
335
+ "span",
336
+ {
337
+ class: "ml-2 text-xs font-normal opacity-70",
338
+ title: tigercatCore.resolveLocaleText(
339
+ labels.value.wipLimitText.replace("{limit}", String(column.wipLimit))
340
+ )
341
+ },
342
+ `(${column.cards.length}/${column.wipLimit})`
343
+ ) : vue.h(
344
+ "span",
345
+ { class: "ml-2 text-xs font-normal opacity-50" },
346
+ String(column.cards.length)
347
+ )
348
+ ]),
349
+ column.description ? vue.h(
350
+ "span",
351
+ {
352
+ class: "text-xs font-normal text-[var(--tiger-text-muted,#6b7280)] truncate max-w-[120px]"
353
+ },
354
+ column.description
355
+ ) : null
356
+ ];
357
+ const header = vue.h(
358
+ "div",
359
+ {
360
+ class: tigercatCore.taskBoardColumnHeaderClasses,
361
+ draggable: props.columnDraggable,
362
+ onDragstart: (e) => handleColumnDragStart(e, column, colIndex),
363
+ onDragend: handleDragEnd,
364
+ onTouchstart: (e) => handleColumnTouchStart(e, column, colIndex),
365
+ onTouchmove: handleColumnTouchMove,
366
+ onTouchend: handleColumnTouchEnd,
367
+ style: props.columnDraggable ? "cursor: grab" : void 0
368
+ },
369
+ headerContent
370
+ );
371
+ const cards = column.cards.length > 0 ? column.cards.flatMap((card, i) => {
372
+ const nodes = [];
373
+ if (isDropTarget && dropIndex.value === i) {
374
+ nodes.push(vue.h("div", { key: `drop-${i}`, class: tigercatCore.taskBoardDropIndicatorClasses }));
375
+ }
376
+ nodes.push(renderCard(card, column));
377
+ return nodes;
378
+ }).concat(
379
+ isDropTarget && dropIndex.value >= column.cards.length ? [vue.h("div", { key: "drop-end", class: tigercatCore.taskBoardDropIndicatorClasses })] : []
380
+ ) : [
381
+ isDropTarget ? vue.h("div", { key: "drop-empty", class: tigercatCore.taskBoardDropIndicatorClasses }) : slots["empty-column"] ? slots["empty-column"]({ column }) : vue.h(
382
+ "div",
383
+ { class: tigercatCore.taskBoardEmptyClasses },
384
+ tigercatCore.resolveLocaleText(labels.value.emptyColumnText)
385
+ )
386
+ ];
387
+ const body = vue.h(
388
+ "div",
389
+ {
390
+ class: tigercatCore.taskBoardColumnBodyClasses,
391
+ role: "list",
392
+ "aria-label": column.title,
393
+ onDragover: (e) => handleCardDragOver(e, column),
394
+ onDrop: (e) => handleCardDrop(e, column),
395
+ onDragleave: handleDragLeave
396
+ },
397
+ cards
398
+ );
399
+ const footer = slots["column-footer"] ? slots["column-footer"]({ column }) : props.onCardAdd ? vue.h(
400
+ "div",
401
+ {
402
+ class: tigercatCore.classNames(
403
+ "border-t border-[var(--tiger-border,#e5e7eb)]",
404
+ tigercatCore.taskBoardAddCardClasses
405
+ ),
406
+ onClick: () => {
407
+ emit("card-add", column.id);
408
+ }
409
+ },
410
+ [vue.h("span", null, "+"), vue.h("span", null, tigercatCore.resolveLocaleText(labels.value.addCardText))]
411
+ ) : null;
412
+ return vue.h(
413
+ "div",
414
+ {
415
+ key: String(column.id),
416
+ class: colClasses,
417
+ "data-tiger-taskboard-column": "",
418
+ "data-tiger-taskboard-column-id": String(column.id),
419
+ onDragover: dragState.value?.type === "column" ? handleColumnDragOver : void 0,
420
+ onDrop: dragState.value?.type === "column" ? handleColumnDrop : void 0
421
+ },
422
+ [header, body, footer]
423
+ );
424
+ };
425
+ return () => vue.h(
426
+ "div",
427
+ {
428
+ ...attrs,
429
+ ref: boardRef,
430
+ class: wrapperClasses.value,
431
+ style: wrapperStyle.value,
432
+ role: "region",
433
+ "aria-label": tigercatCore.resolveLocaleText(labels.value.boardAriaLabel),
434
+ "data-tiger-task-board": ""
435
+ },
436
+ currentColumns.value.map((col, i) => renderColumnNode(col, i))
437
+ );
438
+ }
439
+ });
440
+ var TaskBoard_default = TaskBoard;
441
+
442
+ exports.TaskBoard = TaskBoard;
443
+ exports.TaskBoard_default = TaskBoard_default;
@@ -107,9 +107,9 @@ declare const ActivityFeed: vue.DefineComponent<vue.ExtractPropTypes<{
107
107
  default: undefined;
108
108
  };
109
109
  }>> & Readonly<{}>, {
110
+ className: string;
110
111
  style: Record<string, string | number>;
111
112
  loading: boolean;
112
- className: string;
113
113
  emptyText: string;
114
114
  items: ActivityItem[];
115
115
  groups: ActivityGroup[];
@@ -107,9 +107,9 @@ declare const ActivityFeed: vue.DefineComponent<vue.ExtractPropTypes<{
107
107
  default: undefined;
108
108
  };
109
109
  }>> & Readonly<{}>, {
110
+ className: string;
110
111
  style: Record<string, string | number>;
111
112
  loading: boolean;
112
- className: string;
113
113
  emptyText: string;
114
114
  items: ActivityItem[];
115
115
  groups: ActivityGroup[];
@@ -157,10 +157,10 @@ declare const Alert: vue.DefineComponent<vue.ExtractPropTypes<{
157
157
  onClose?: ((...args: any[]) => any) | undefined;
158
158
  }>, {
159
159
  type: AlertType;
160
+ className: string;
160
161
  style: Record<string, string | number>;
161
162
  title: string;
162
163
  size: AlertSize;
163
- className: string;
164
164
  closable: boolean;
165
165
  closeAriaLabel: string;
166
166
  showIcon: boolean;
@@ -157,10 +157,10 @@ declare const Alert: vue.DefineComponent<vue.ExtractPropTypes<{
157
157
  onClose?: ((...args: any[]) => any) | undefined;
158
158
  }>, {
159
159
  type: AlertType;
160
+ className: string;
160
161
  style: Record<string, string | number>;
161
162
  title: string;
162
163
  size: AlertSize;
163
- className: string;
164
164
  closable: boolean;
165
165
  closeAriaLabel: string;
166
166
  showIcon: boolean;
@@ -96,7 +96,7 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
96
96
  };
97
97
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
98
98
  [key: string]: any;
99
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("change" | "click")[], "change" | "click", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
99
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("click" | "change")[], "click" | "change", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
100
100
  /**
101
101
  * Whether to fix the anchor to the viewport
102
102
  * @default true
@@ -168,12 +168,9 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
168
168
  default: undefined;
169
169
  };
170
170
  }>> & Readonly<{
171
- onChange?: ((...args: any[]) => any) | undefined;
172
171
  onClick?: ((...args: any[]) => any) | undefined;
172
+ onChange?: ((...args: any[]) => any) | undefined;
173
173
  }>, {
174
- style: Record<string, unknown>;
175
- className: string;
176
- direction: AnchorDirection;
177
174
  affix: boolean;
178
175
  bounds: number;
179
176
  offsetTop: number;
@@ -181,6 +178,9 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
181
178
  targetOffset: number;
182
179
  getCurrentAnchor: (activeLink: string) => string;
183
180
  getContainer: () => HTMLElement | Window;
181
+ direction: AnchorDirection;
182
+ className: string;
183
+ style: Record<string, unknown>;
184
184
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
185
185
 
186
186
  export { Anchor, type AnchorContext, AnchorContextKey, type VueAnchorProps, Anchor as default };
@@ -96,7 +96,7 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
96
96
  };
97
97
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
98
98
  [key: string]: any;
99
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("change" | "click")[], "change" | "click", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
99
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("click" | "change")[], "click" | "change", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
100
100
  /**
101
101
  * Whether to fix the anchor to the viewport
102
102
  * @default true
@@ -168,12 +168,9 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
168
168
  default: undefined;
169
169
  };
170
170
  }>> & Readonly<{
171
- onChange?: ((...args: any[]) => any) | undefined;
172
171
  onClick?: ((...args: any[]) => any) | undefined;
172
+ onChange?: ((...args: any[]) => any) | undefined;
173
173
  }>, {
174
- style: Record<string, unknown>;
175
- className: string;
176
- direction: AnchorDirection;
177
174
  affix: boolean;
178
175
  bounds: number;
179
176
  offsetTop: number;
@@ -181,6 +178,9 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
181
178
  targetOffset: number;
182
179
  getCurrentAnchor: (activeLink: string) => string;
183
180
  getContainer: () => HTMLElement | Window;
181
+ direction: AnchorDirection;
182
+ className: string;
183
+ style: Record<string, unknown>;
184
184
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
185
185
 
186
186
  export { Anchor, type AnchorContext, AnchorContextKey, type VueAnchorProps, Anchor as default };
@@ -61,8 +61,8 @@ declare const AnchorLink: vue.DefineComponent<vue.ExtractPropTypes<{
61
61
  default: undefined;
62
62
  };
63
63
  }>> & Readonly<{}>, {
64
- title: string;
65
64
  className: string;
65
+ title: string;
66
66
  target: string;
67
67
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
68
68
 
@@ -61,8 +61,8 @@ declare const AnchorLink: vue.DefineComponent<vue.ExtractPropTypes<{
61
61
  default: undefined;
62
62
  };
63
63
  }>> & Readonly<{}>, {
64
- title: string;
65
64
  className: string;
65
+ title: string;
66
66
  target: string;
67
67
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
68
68
 
@@ -148,10 +148,10 @@ declare const Avatar: vue.DefineComponent<vue.ExtractPropTypes<{
148
148
  default: undefined;
149
149
  };
150
150
  }>> & Readonly<{}>, {
151
- style: Record<string, string | number>;
152
- size: AvatarSize;
153
151
  className: string;
152
+ style: Record<string, string | number>;
154
153
  text: string;
154
+ size: AvatarSize;
155
155
  src: string;
156
156
  alt: string;
157
157
  shape: AvatarShape;
@@ -148,10 +148,10 @@ declare const Avatar: vue.DefineComponent<vue.ExtractPropTypes<{
148
148
  default: undefined;
149
149
  };
150
150
  }>> & Readonly<{}>, {
151
- style: Record<string, string | number>;
152
- size: AvatarSize;
153
151
  className: string;
152
+ style: Record<string, string | number>;
154
153
  text: string;
154
+ size: AvatarSize;
155
155
  src: string;
156
156
  alt: string;
157
157
  shape: AvatarShape;
@@ -78,8 +78,8 @@ declare const BackTop: vue.DefineComponent<vue.ExtractPropTypes<{
78
78
  }>> & Readonly<{
79
79
  onClick?: ((...args: any[]) => any) | undefined;
80
80
  }>, {
81
- style: Record<string, unknown>;
82
81
  className: string;
82
+ style: Record<string, unknown>;
83
83
  target: () => HTMLElement | Window | null;
84
84
  duration: number;
85
85
  visibilityHeight: number;
@@ -78,8 +78,8 @@ declare const BackTop: vue.DefineComponent<vue.ExtractPropTypes<{
78
78
  }>> & Readonly<{
79
79
  onClick?: ((...args: any[]) => any) | undefined;
80
80
  }>, {
81
- style: Record<string, unknown>;
82
81
  className: string;
82
+ style: Record<string, unknown>;
83
83
  target: () => HTMLElement | Window | null;
84
84
  duration: number;
85
85
  visibilityHeight: number;
@@ -93,10 +93,10 @@ declare const Badge: vue.DefineComponent<vue.ExtractPropTypes<{
93
93
  };
94
94
  }>> & Readonly<{}>, {
95
95
  type: BadgeType;
96
+ className: string;
96
97
  style: Record<string, string | number>;
97
98
  size: BadgeSize;
98
99
  variant: BadgeVariant;
99
- className: string;
100
100
  max: number;
101
101
  content: string | number;
102
102
  position: BadgePosition;
@@ -93,10 +93,10 @@ declare const Badge: vue.DefineComponent<vue.ExtractPropTypes<{
93
93
  };
94
94
  }>> & Readonly<{}>, {
95
95
  type: BadgeType;
96
+ className: string;
96
97
  style: Record<string, string | number>;
97
98
  size: BadgeSize;
98
99
  variant: BadgeVariant;
99
- className: string;
100
100
  max: number;
101
101
  content: string | number;
102
102
  position: BadgePosition;
@@ -75,8 +75,8 @@ declare const Breadcrumb: vue.DefineComponent<vue.ExtractPropTypes<{
75
75
  default: undefined;
76
76
  };
77
77
  }>> & Readonly<{}>, {
78
- style: Record<string, unknown>;
79
78
  className: string;
79
+ style: Record<string, unknown>;
80
80
  separator: string;
81
81
  extra: VNodeChild | VNodeChild[];
82
82
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
@@ -75,8 +75,8 @@ declare const Breadcrumb: vue.DefineComponent<vue.ExtractPropTypes<{
75
75
  default: undefined;
76
76
  };
77
77
  }>> & Readonly<{}>, {
78
- style: Record<string, unknown>;
79
78
  className: string;
79
+ style: Record<string, unknown>;
80
80
  separator: string;
81
81
  extra: VNodeChild | VNodeChild[];
82
82
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;