@uzum-tech/ui 2.0.8 → 2.1.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/dist/index.js +1787 -467
- package/dist/index.mjs +1782 -468
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/carousel/src/Carousel.d.ts +1 -1
- package/es/components.d.ts +655 -5
- package/es/components.mjs +5 -0
- package/es/config-provider/src/internal-interface.d.ts +3 -1
- package/es/data-table/src/DataTable.d.ts +1 -1
- package/es/descriptions/src/Descriptions.d.ts +1 -1
- package/es/kanban/index.d.ts +7 -0
- package/es/kanban/index.mjs +5 -0
- package/es/kanban/src/Kanban.d.ts +570 -0
- package/es/kanban/src/Kanban.mjs +349 -0
- package/es/kanban/src/KanbanCard.d.ts +39 -0
- package/es/kanban/src/KanbanCard.mjs +86 -0
- package/es/kanban/src/KanbanColumn.d.ts +45 -0
- package/es/kanban/src/KanbanColumn.mjs +176 -0
- package/es/kanban/src/injection.d.ts +28 -0
- package/es/kanban/src/injection.mjs +2 -0
- package/es/kanban/src/interface.d.ts +215 -0
- package/es/kanban/src/interface.mjs +84 -0
- package/es/kanban/src/styles/index.cssr.d.ts +2 -0
- package/es/kanban/src/styles/index.cssr.mjs +165 -0
- package/es/kanban/src/use-kanban-data.d.ts +4 -0
- package/es/kanban/src/use-kanban-data.mjs +69 -0
- package/es/kanban/src/use-kanban-drag.d.ts +2 -0
- package/es/kanban/src/use-kanban-drag.mjs +238 -0
- package/es/kanban/styles/dark.d.ts +73 -0
- package/es/kanban/styles/dark.mjs +15 -0
- package/es/kanban/styles/index.d.ts +3 -0
- package/es/kanban/styles/index.mjs +2 -0
- package/es/kanban/styles/light.d.ts +109 -0
- package/es/kanban/styles/light.mjs +64 -0
- package/es/modal/src/BodyWrapper.d.ts +1 -1
- package/es/themes/dark.mjs +2 -0
- package/es/themes/light.mjs +2 -0
- package/es/tree/src/Tree.d.ts +1 -1
- package/es/tree/src/TreeNode.d.ts +1 -1
- package/es/tree/src/TreeNode.mjs +2 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/carousel/src/Carousel.d.ts +1 -1
- package/lib/components.d.ts +655 -5
- package/lib/components.js +13 -5
- package/lib/config-provider/src/internal-interface.d.ts +3 -1
- package/lib/data-table/src/DataTable.d.ts +1 -1
- package/lib/descriptions/src/Descriptions.d.ts +1 -1
- package/lib/kanban/index.d.ts +7 -0
- package/lib/kanban/index.js +17 -0
- package/lib/kanban/src/Kanban.d.ts +570 -0
- package/lib/kanban/src/Kanban.js +291 -0
- package/lib/kanban/src/KanbanCard.d.ts +39 -0
- package/lib/kanban/src/KanbanCard.js +63 -0
- package/lib/kanban/src/KanbanColumn.d.ts +45 -0
- package/lib/kanban/src/KanbanColumn.js +141 -0
- package/lib/kanban/src/injection.d.ts +28 -0
- package/lib/kanban/src/injection.js +5 -0
- package/lib/kanban/src/interface.d.ts +215 -0
- package/lib/kanban/src/interface.js +87 -0
- package/lib/kanban/src/styles/index.cssr.d.ts +2 -0
- package/lib/kanban/src/styles/index.cssr.js +170 -0
- package/lib/kanban/src/use-kanban-data.d.ts +4 -0
- package/lib/kanban/src/use-kanban-data.js +70 -0
- package/lib/kanban/src/use-kanban-drag.d.ts +2 -0
- package/lib/kanban/src/use-kanban-drag.js +220 -0
- package/lib/kanban/styles/dark.d.ts +73 -0
- package/lib/kanban/styles/dark.js +17 -0
- package/lib/kanban/styles/index.d.ts +3 -0
- package/lib/kanban/styles/index.js +10 -0
- package/lib/kanban/styles/light.d.ts +109 -0
- package/lib/kanban/styles/light.js +54 -0
- package/lib/modal/src/BodyWrapper.d.ts +1 -1
- package/lib/themes/dark.js +98 -96
- package/lib/themes/light.js +96 -94
- package/lib/tree/src/Tree.d.ts +1 -1
- package/lib/tree/src/TreeNode.d.ts +1 -1
- package/lib/tree/src/TreeNode.js +2 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/volar.d.ts +3 -0
- package/web-types.json +171 -1
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { computed, ref } from 'vue';
|
|
2
|
+
import { moveItem, reorderColumns } from "./use-kanban-data.mjs";
|
|
3
|
+
const DROP_HALF_DIVISOR = 2;
|
|
4
|
+
export function useKanbanDrag(deps) {
|
|
5
|
+
const {
|
|
6
|
+
dataRef,
|
|
7
|
+
columnsRef,
|
|
8
|
+
columnFieldRef,
|
|
9
|
+
orientationRef,
|
|
10
|
+
getItemKey,
|
|
11
|
+
isItemDraggable,
|
|
12
|
+
isColumnDraggable,
|
|
13
|
+
allowDropRef
|
|
14
|
+
} = deps;
|
|
15
|
+
const draggingItemKeySetRef = ref(new Set());
|
|
16
|
+
const draggingItemRef = ref(null);
|
|
17
|
+
const draggingColumnKeyRef = ref(null);
|
|
18
|
+
const droppingColumnKeyRef = ref(null);
|
|
19
|
+
const droppingItemKeyRef = ref(null);
|
|
20
|
+
const droppingPositionRef = ref(null);
|
|
21
|
+
const columnByKeyRef = computed(() => {
|
|
22
|
+
const map = new Map();
|
|
23
|
+
for (const column of columnsRef.value) {
|
|
24
|
+
map.set(column.key, column);
|
|
25
|
+
}
|
|
26
|
+
return map;
|
|
27
|
+
});
|
|
28
|
+
function resetDropState() {
|
|
29
|
+
droppingColumnKeyRef.value = null;
|
|
30
|
+
droppingItemKeyRef.value = null;
|
|
31
|
+
droppingPositionRef.value = null;
|
|
32
|
+
}
|
|
33
|
+
function handleDragEnd() {
|
|
34
|
+
draggingItemKeySetRef.value = new Set();
|
|
35
|
+
draggingItemRef.value = null;
|
|
36
|
+
draggingColumnKeyRef.value = null;
|
|
37
|
+
resetDropState();
|
|
38
|
+
}
|
|
39
|
+
function getColumnOf(item) {
|
|
40
|
+
return columnByKeyRef.value.get(item[columnFieldRef.value]);
|
|
41
|
+
}
|
|
42
|
+
function resolvePosition(event, target) {
|
|
43
|
+
const rect = target.getBoundingClientRect();
|
|
44
|
+
if (orientationRef.value === 'vertical') {
|
|
45
|
+
const offset = event.clientX - rect.left;
|
|
46
|
+
return offset < rect.width / DROP_HALF_DIVISOR ? 'before' : 'after';
|
|
47
|
+
}
|
|
48
|
+
const offset = event.clientY - rect.top;
|
|
49
|
+
return offset < rect.height / DROP_HALF_DIVISOR ? 'before' : 'after';
|
|
50
|
+
}
|
|
51
|
+
function handleItemDragStart(event, item) {
|
|
52
|
+
const column = getColumnOf(item);
|
|
53
|
+
if (!column || !isItemDraggable(item, column)) {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
draggingItemKeySetRef.value = new Set([getItemKey(item)]);
|
|
58
|
+
draggingItemRef.value = item;
|
|
59
|
+
draggingColumnKeyRef.value = null;
|
|
60
|
+
if (event.dataTransfer) {
|
|
61
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
62
|
+
event.dataTransfer.setData('text/plain', String(getItemKey(item)));
|
|
63
|
+
}
|
|
64
|
+
deps.emitDragStart({
|
|
65
|
+
type: 'item',
|
|
66
|
+
item,
|
|
67
|
+
column
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function handleItemDragOver(event, item) {
|
|
71
|
+
if (!draggingItemKeySetRef.value.size) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
event.stopPropagation();
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
if (event.dataTransfer) {
|
|
77
|
+
event.dataTransfer.dropEffect = 'move';
|
|
78
|
+
}
|
|
79
|
+
const column = getColumnOf(item);
|
|
80
|
+
if (column === null || column === void 0 ? void 0 : column.frozen) {
|
|
81
|
+
resetDropState();
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
droppingColumnKeyRef.value = item[columnFieldRef.value];
|
|
85
|
+
if (draggingItemKeySetRef.value.has(getItemKey(item))) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const target = event.currentTarget;
|
|
89
|
+
if (!target) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
droppingItemKeyRef.value = getItemKey(item);
|
|
93
|
+
droppingPositionRef.value = resolvePosition(event, target);
|
|
94
|
+
}
|
|
95
|
+
function handleItemDrop(event, item) {
|
|
96
|
+
if (!draggingItemKeySetRef.value.size) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
event.stopPropagation();
|
|
100
|
+
event.preventDefault();
|
|
101
|
+
finishItemDrop(item[columnFieldRef.value]);
|
|
102
|
+
}
|
|
103
|
+
function handleColumnDragStart(event, column) {
|
|
104
|
+
if (!isColumnDraggable(column)) {
|
|
105
|
+
event.preventDefault();
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
draggingColumnKeyRef.value = column.key;
|
|
109
|
+
draggingItemKeySetRef.value = new Set();
|
|
110
|
+
if (event.dataTransfer) {
|
|
111
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
112
|
+
event.dataTransfer.setData('text/plain', String(column.key));
|
|
113
|
+
}
|
|
114
|
+
deps.emitDragStart({
|
|
115
|
+
type: 'column',
|
|
116
|
+
column
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function handleColumnDragOver(event, column) {
|
|
120
|
+
if (draggingColumnKeyRef.value != null) {
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
if (event.dataTransfer) {
|
|
123
|
+
event.dataTransfer.dropEffect = 'move';
|
|
124
|
+
}
|
|
125
|
+
const target = event.currentTarget;
|
|
126
|
+
droppingColumnKeyRef.value = column.key;
|
|
127
|
+
droppingItemKeyRef.value = null;
|
|
128
|
+
droppingPositionRef.value = target ? resolvePosition(event, target) : null;
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (draggingItemKeySetRef.value.size) {
|
|
132
|
+
if (column.frozen) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
event.preventDefault();
|
|
136
|
+
if (event.dataTransfer) {
|
|
137
|
+
event.dataTransfer.dropEffect = 'move';
|
|
138
|
+
}
|
|
139
|
+
if (droppingColumnKeyRef.value !== column.key) {
|
|
140
|
+
droppingColumnKeyRef.value = column.key;
|
|
141
|
+
droppingItemKeyRef.value = null;
|
|
142
|
+
droppingPositionRef.value = null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function handleColumnDrop(event, column) {
|
|
147
|
+
var _a;
|
|
148
|
+
event.preventDefault();
|
|
149
|
+
if (draggingColumnKeyRef.value != null) {
|
|
150
|
+
const next = reorderColumns(columnsRef.value, draggingColumnKeyRef.value, column.key, (_a = droppingPositionRef.value) !== null && _a !== void 0 ? _a : 'before');
|
|
151
|
+
const movedColumn = columnByKeyRef.value.get(draggingColumnKeyRef.value);
|
|
152
|
+
handleDragEnd();
|
|
153
|
+
if (next && movedColumn) {
|
|
154
|
+
deps.emitColumnsReorder(next);
|
|
155
|
+
deps.emitDragEnd({
|
|
156
|
+
type: 'column',
|
|
157
|
+
column: movedColumn
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
finishItemDrop(column.key);
|
|
163
|
+
}
|
|
164
|
+
function finishItemDrop(targetColumnKey) {
|
|
165
|
+
const draggingKey = draggingItemKeySetRef.value.values().next().value;
|
|
166
|
+
const targetColumn = columnByKeyRef.value.get(targetColumnKey);
|
|
167
|
+
if (draggingKey === undefined || !targetColumn || targetColumn.frozen) {
|
|
168
|
+
handleDragEnd();
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const columnField = columnFieldRef.value;
|
|
172
|
+
const targetIndex = computeTargetIndex(targetColumnKey, draggingKey);
|
|
173
|
+
const result = moveItem(dataRef.value, getItemKey, columnField, draggingKey, targetColumnKey, targetIndex);
|
|
174
|
+
if (!result) {
|
|
175
|
+
handleDragEnd();
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const ctx = {
|
|
179
|
+
item: result.item,
|
|
180
|
+
from: result.from,
|
|
181
|
+
to: result.to
|
|
182
|
+
};
|
|
183
|
+
if (ctx.from.column === ctx.to.column && ctx.from.index === ctx.to.index) {
|
|
184
|
+
handleDragEnd();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (ctx.from.column !== ctx.to.column && typeof targetColumn.max === 'number') {
|
|
188
|
+
const targetCount = dataRef.value.filter(item => item[columnField] === targetColumnKey).length;
|
|
189
|
+
if (targetCount >= targetColumn.max) {
|
|
190
|
+
handleDragEnd();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (allowDropRef.value && !allowDropRef.value(ctx)) {
|
|
195
|
+
handleDragEnd();
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
const movedColumn = columnByKeyRef.value.get(ctx.from.column);
|
|
199
|
+
handleDragEnd();
|
|
200
|
+
deps.emitUpdateData(result.data);
|
|
201
|
+
deps.emitMove(ctx);
|
|
202
|
+
if (movedColumn) {
|
|
203
|
+
deps.emitDragEnd({
|
|
204
|
+
type: 'item',
|
|
205
|
+
item: ctx.item,
|
|
206
|
+
column: movedColumn
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function computeTargetIndex(targetColumnKey, draggingKey) {
|
|
211
|
+
const columnField = columnFieldRef.value;
|
|
212
|
+
const columnItems = dataRef.value.filter(item => item[columnField] === targetColumnKey && getItemKey(item) !== draggingKey);
|
|
213
|
+
const dropItemKey = droppingItemKeyRef.value;
|
|
214
|
+
if (dropItemKey == null) {
|
|
215
|
+
return columnItems.length;
|
|
216
|
+
}
|
|
217
|
+
const index = columnItems.findIndex(item => getItemKey(item) === dropItemKey);
|
|
218
|
+
if (index < 0) {
|
|
219
|
+
return columnItems.length;
|
|
220
|
+
}
|
|
221
|
+
return droppingPositionRef.value === 'after' ? index + 1 : index;
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
draggingItemKeySetRef,
|
|
225
|
+
draggingItemRef,
|
|
226
|
+
draggingColumnKeyRef,
|
|
227
|
+
droppingColumnKeyRef,
|
|
228
|
+
droppingItemKeyRef,
|
|
229
|
+
droppingPositionRef,
|
|
230
|
+
handleItemDragStart,
|
|
231
|
+
handleItemDragOver,
|
|
232
|
+
handleItemDrop,
|
|
233
|
+
handleColumnDragStart,
|
|
234
|
+
handleColumnDragOver,
|
|
235
|
+
handleColumnDrop,
|
|
236
|
+
handleDragEnd
|
|
237
|
+
};
|
|
238
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
declare const kanbanDark: import("../../_mixins").Theme<"Kanban", {
|
|
2
|
+
columnWidth: string;
|
|
3
|
+
columnGap: string;
|
|
4
|
+
cardGap: string;
|
|
5
|
+
boardPadding: string;
|
|
6
|
+
columnHeaderPadding: string;
|
|
7
|
+
columnBodyPadding: string;
|
|
8
|
+
columnBackgroundColor: string;
|
|
9
|
+
columnBorderRadius: string;
|
|
10
|
+
columnHeaderColor: string;
|
|
11
|
+
countBackgroundColor: string;
|
|
12
|
+
countTextColor: string;
|
|
13
|
+
statusSuccessHeaderColor: string;
|
|
14
|
+
statusSuccessCountColor: string;
|
|
15
|
+
statusProgressHeaderColor: string;
|
|
16
|
+
statusProgressCountColor: string;
|
|
17
|
+
statusPendingHeaderColor: string;
|
|
18
|
+
statusPendingCountColor: string;
|
|
19
|
+
statusErrorHeaderColor: string;
|
|
20
|
+
statusErrorCountColor: string;
|
|
21
|
+
columnDraggingOpacity: string;
|
|
22
|
+
cardBackgroundColor: string;
|
|
23
|
+
cardBackgroundColorDragging: string;
|
|
24
|
+
cardBorderColorDragging: string;
|
|
25
|
+
cardBorderRadius: string;
|
|
26
|
+
cardPadding: string;
|
|
27
|
+
cardColor: string;
|
|
28
|
+
cardSubColor: string;
|
|
29
|
+
cardBoxShadow: string;
|
|
30
|
+
cardBoxShadowHover: string;
|
|
31
|
+
cardBoxShadowDragging: string;
|
|
32
|
+
dropIndicatorColor: string;
|
|
33
|
+
maxReachedColor: string;
|
|
34
|
+
}, {
|
|
35
|
+
Empty: import("../../_mixins").Theme<"Empty", {
|
|
36
|
+
iconSizeSmall: string;
|
|
37
|
+
iconSizeMedium: string;
|
|
38
|
+
iconSizeLarge: string;
|
|
39
|
+
iconSizeHuge: string;
|
|
40
|
+
titleFontSizeSmall: string;
|
|
41
|
+
titleFontSizeMedium: string;
|
|
42
|
+
titleFontSizeLarge: string;
|
|
43
|
+
titleFontSizeHuge: string;
|
|
44
|
+
descriptionFontSizeSmall: string;
|
|
45
|
+
descriptionFontSizeMedium: string;
|
|
46
|
+
descriptionFontSizeLarge: string;
|
|
47
|
+
descriptionFontSizeHuge: string;
|
|
48
|
+
titleColor: string;
|
|
49
|
+
descriptionColor: string;
|
|
50
|
+
iconColor: string;
|
|
51
|
+
iconBgColor: string;
|
|
52
|
+
extraTextColor: string;
|
|
53
|
+
}, any>;
|
|
54
|
+
Badge: import("../../_mixins").Theme<"Badge", {
|
|
55
|
+
color: string;
|
|
56
|
+
colorPrime: string;
|
|
57
|
+
colorInfo: string;
|
|
58
|
+
colorSuccess: string;
|
|
59
|
+
colorError: string;
|
|
60
|
+
colorWarning: string;
|
|
61
|
+
fontSize: string;
|
|
62
|
+
textColor: string;
|
|
63
|
+
textColorPrime: string;
|
|
64
|
+
textColorInfo: string;
|
|
65
|
+
textColorSuccess: string;
|
|
66
|
+
textColorError: string;
|
|
67
|
+
textColorWarning: string;
|
|
68
|
+
borderColor: string;
|
|
69
|
+
dotSize: string;
|
|
70
|
+
}, any>;
|
|
71
|
+
}>;
|
|
72
|
+
export default kanbanDark;
|
|
73
|
+
export type KanbanTheme = typeof kanbanDark;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createTheme } from "../../_mixins/index.mjs";
|
|
2
|
+
import { commonDark } from "../../_styles/common/index.mjs";
|
|
3
|
+
import { badgeDark } from "../../badge/styles/index.mjs";
|
|
4
|
+
import { emptyDark } from "../../empty/styles/index.mjs";
|
|
5
|
+
import { self } from "./light.mjs";
|
|
6
|
+
const kanbanDark = createTheme({
|
|
7
|
+
name: 'Kanban',
|
|
8
|
+
common: commonDark,
|
|
9
|
+
peers: {
|
|
10
|
+
Empty: emptyDark,
|
|
11
|
+
Badge: badgeDark
|
|
12
|
+
},
|
|
13
|
+
self
|
|
14
|
+
});
|
|
15
|
+
export default kanbanDark;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { ThemeCommonVars } from '../../_styles/common';
|
|
2
|
+
export declare function self(vars: ThemeCommonVars): {
|
|
3
|
+
columnWidth: string;
|
|
4
|
+
columnGap: string;
|
|
5
|
+
cardGap: string;
|
|
6
|
+
boardPadding: string;
|
|
7
|
+
columnHeaderPadding: string;
|
|
8
|
+
columnBodyPadding: string;
|
|
9
|
+
columnBackgroundColor: string;
|
|
10
|
+
columnBorderRadius: string;
|
|
11
|
+
columnHeaderColor: string;
|
|
12
|
+
countBackgroundColor: string;
|
|
13
|
+
countTextColor: string;
|
|
14
|
+
statusSuccessHeaderColor: string;
|
|
15
|
+
statusSuccessCountColor: string;
|
|
16
|
+
statusProgressHeaderColor: string;
|
|
17
|
+
statusProgressCountColor: string;
|
|
18
|
+
statusPendingHeaderColor: string;
|
|
19
|
+
statusPendingCountColor: string;
|
|
20
|
+
statusErrorHeaderColor: string;
|
|
21
|
+
statusErrorCountColor: string;
|
|
22
|
+
columnDraggingOpacity: string;
|
|
23
|
+
cardBackgroundColor: string;
|
|
24
|
+
cardBackgroundColorDragging: string;
|
|
25
|
+
cardBorderColorDragging: string;
|
|
26
|
+
cardBorderRadius: string;
|
|
27
|
+
cardPadding: string;
|
|
28
|
+
cardColor: string;
|
|
29
|
+
cardSubColor: string;
|
|
30
|
+
cardBoxShadow: string;
|
|
31
|
+
cardBoxShadowHover: string;
|
|
32
|
+
cardBoxShadowDragging: string;
|
|
33
|
+
dropIndicatorColor: string;
|
|
34
|
+
maxReachedColor: string;
|
|
35
|
+
};
|
|
36
|
+
export type KanbanThemeVars = ReturnType<typeof self>;
|
|
37
|
+
declare const kanbanLight: import("../../_mixins").Theme<"Kanban", {
|
|
38
|
+
columnWidth: string;
|
|
39
|
+
columnGap: string;
|
|
40
|
+
cardGap: string;
|
|
41
|
+
boardPadding: string;
|
|
42
|
+
columnHeaderPadding: string;
|
|
43
|
+
columnBodyPadding: string;
|
|
44
|
+
columnBackgroundColor: string;
|
|
45
|
+
columnBorderRadius: string;
|
|
46
|
+
columnHeaderColor: string;
|
|
47
|
+
countBackgroundColor: string;
|
|
48
|
+
countTextColor: string;
|
|
49
|
+
statusSuccessHeaderColor: string;
|
|
50
|
+
statusSuccessCountColor: string;
|
|
51
|
+
statusProgressHeaderColor: string;
|
|
52
|
+
statusProgressCountColor: string;
|
|
53
|
+
statusPendingHeaderColor: string;
|
|
54
|
+
statusPendingCountColor: string;
|
|
55
|
+
statusErrorHeaderColor: string;
|
|
56
|
+
statusErrorCountColor: string;
|
|
57
|
+
columnDraggingOpacity: string;
|
|
58
|
+
cardBackgroundColor: string;
|
|
59
|
+
cardBackgroundColorDragging: string;
|
|
60
|
+
cardBorderColorDragging: string;
|
|
61
|
+
cardBorderRadius: string;
|
|
62
|
+
cardPadding: string;
|
|
63
|
+
cardColor: string;
|
|
64
|
+
cardSubColor: string;
|
|
65
|
+
cardBoxShadow: string;
|
|
66
|
+
cardBoxShadowHover: string;
|
|
67
|
+
cardBoxShadowDragging: string;
|
|
68
|
+
dropIndicatorColor: string;
|
|
69
|
+
maxReachedColor: string;
|
|
70
|
+
}, {
|
|
71
|
+
Empty: import("../../_mixins").Theme<"Empty", {
|
|
72
|
+
iconSizeSmall: string;
|
|
73
|
+
iconSizeMedium: string;
|
|
74
|
+
iconSizeLarge: string;
|
|
75
|
+
iconSizeHuge: string;
|
|
76
|
+
titleFontSizeSmall: string;
|
|
77
|
+
titleFontSizeMedium: string;
|
|
78
|
+
titleFontSizeLarge: string;
|
|
79
|
+
titleFontSizeHuge: string;
|
|
80
|
+
descriptionFontSizeSmall: string;
|
|
81
|
+
descriptionFontSizeMedium: string;
|
|
82
|
+
descriptionFontSizeLarge: string;
|
|
83
|
+
descriptionFontSizeHuge: string;
|
|
84
|
+
titleColor: string;
|
|
85
|
+
descriptionColor: string;
|
|
86
|
+
iconColor: string;
|
|
87
|
+
iconBgColor: string;
|
|
88
|
+
extraTextColor: string;
|
|
89
|
+
}, any>;
|
|
90
|
+
Badge: import("../../_mixins").Theme<"Badge", {
|
|
91
|
+
color: string;
|
|
92
|
+
colorPrime: string;
|
|
93
|
+
colorInfo: string;
|
|
94
|
+
colorSuccess: string;
|
|
95
|
+
colorError: string;
|
|
96
|
+
colorWarning: string;
|
|
97
|
+
fontSize: string;
|
|
98
|
+
textColor: string;
|
|
99
|
+
textColorPrime: string;
|
|
100
|
+
textColorInfo: string;
|
|
101
|
+
textColorSuccess: string;
|
|
102
|
+
textColorError: string;
|
|
103
|
+
textColorWarning: string;
|
|
104
|
+
borderColor: string;
|
|
105
|
+
dotSize: string;
|
|
106
|
+
}, any>;
|
|
107
|
+
}>;
|
|
108
|
+
export default kanbanLight;
|
|
109
|
+
export type KanbanTheme = typeof kanbanLight;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { createTheme } from "../../_mixins/index.mjs";
|
|
2
|
+
import { commonLight } from "../../_styles/common/index.mjs";
|
|
3
|
+
import { badgeLight } from "../../badge/styles/index.mjs";
|
|
4
|
+
import { emptyLight } from "../../empty/styles/index.mjs";
|
|
5
|
+
export function self(vars) {
|
|
6
|
+
const {
|
|
7
|
+
borderRadiusLarge,
|
|
8
|
+
surfacePrimary,
|
|
9
|
+
containerSecondary,
|
|
10
|
+
elementsQuinary,
|
|
11
|
+
staticBlack,
|
|
12
|
+
staticWhite,
|
|
13
|
+
staticDeepBlue,
|
|
14
|
+
textPrimary,
|
|
15
|
+
successColor,
|
|
16
|
+
warningColor,
|
|
17
|
+
errorColor,
|
|
18
|
+
staticErrorAccent
|
|
19
|
+
} = vars;
|
|
20
|
+
return {
|
|
21
|
+
columnWidth: '316px',
|
|
22
|
+
columnGap: '4px',
|
|
23
|
+
cardGap: '8px',
|
|
24
|
+
boardPadding: '4px',
|
|
25
|
+
columnHeaderPadding: '16px 16px 12px',
|
|
26
|
+
columnBodyPadding: '8px',
|
|
27
|
+
columnBackgroundColor: containerSecondary,
|
|
28
|
+
columnBorderRadius: borderRadiusLarge,
|
|
29
|
+
columnHeaderColor: textPrimary,
|
|
30
|
+
countBackgroundColor: staticBlack,
|
|
31
|
+
countTextColor: staticWhite,
|
|
32
|
+
statusSuccessHeaderColor: '#eefaf2',
|
|
33
|
+
statusSuccessCountColor: successColor,
|
|
34
|
+
statusProgressHeaderColor: '#f0f3fb',
|
|
35
|
+
statusProgressCountColor: staticDeepBlue,
|
|
36
|
+
statusPendingHeaderColor: '#fef7f0',
|
|
37
|
+
statusPendingCountColor: warningColor,
|
|
38
|
+
statusErrorHeaderColor: '#fef2f1',
|
|
39
|
+
statusErrorCountColor: staticErrorAccent,
|
|
40
|
+
columnDraggingOpacity: '0.5',
|
|
41
|
+
cardBackgroundColor: surfacePrimary,
|
|
42
|
+
cardBackgroundColorDragging: containerSecondary,
|
|
43
|
+
cardBorderColorDragging: elementsQuinary,
|
|
44
|
+
cardBorderRadius: borderRadiusLarge,
|
|
45
|
+
cardPadding: '16px',
|
|
46
|
+
cardColor: textPrimary,
|
|
47
|
+
cardSubColor: '#83888b',
|
|
48
|
+
cardBoxShadow: '0px 2px 4px 0px rgba(68, 83, 113, 0.05), 0px 0px 8px 0px rgba(68, 83, 113, 0.1)',
|
|
49
|
+
cardBoxShadowHover: '0px 4px 8px 0px rgba(68, 83, 113, 0.05), 0px 0px 16px 0px rgba(68, 83, 113, 0.1)',
|
|
50
|
+
cardBoxShadowDragging: '0px 12px 20px 0px rgba(68, 83, 113, 0.05), 0px 0px 20px 0px rgba(68, 83, 113, 0.1)',
|
|
51
|
+
dropIndicatorColor: containerSecondary,
|
|
52
|
+
maxReachedColor: errorColor
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const kanbanLight = createTheme({
|
|
56
|
+
name: 'Kanban',
|
|
57
|
+
common: commonLight,
|
|
58
|
+
peers: {
|
|
59
|
+
Empty: emptyLight,
|
|
60
|
+
Badge: badgeLight
|
|
61
|
+
},
|
|
62
|
+
self
|
|
63
|
+
});
|
|
64
|
+
export default kanbanLight;
|
|
@@ -1347,11 +1347,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1347
1347
|
tag: keyof HTMLElementTagNameMap;
|
|
1348
1348
|
showIcon: boolean;
|
|
1349
1349
|
closable: boolean;
|
|
1350
|
+
draggable: boolean | ModalDraggableOptions;
|
|
1350
1351
|
contentScrollable: boolean;
|
|
1351
1352
|
embedded: boolean;
|
|
1352
1353
|
segmented: boolean | import("../..").CardSegmented;
|
|
1353
1354
|
hoverable: boolean;
|
|
1354
|
-
draggable: boolean | ModalDraggableOptions;
|
|
1355
1355
|
trapFocus: boolean;
|
|
1356
1356
|
autoFocus: boolean;
|
|
1357
1357
|
blockScroll: boolean;
|
package/es/themes/dark.mjs
CHANGED
|
@@ -51,6 +51,7 @@ import { iconDark } from "../icon/styles/index.mjs";
|
|
|
51
51
|
import { imageDark } from "../image/styles/index.mjs";
|
|
52
52
|
import { inputNumberDark } from "../input-number/styles/index.mjs";
|
|
53
53
|
import { inputDark } from "../input/styles/index.mjs";
|
|
54
|
+
import { kanbanDark } from "../kanban/styles/index.mjs";
|
|
54
55
|
import { layoutDark } from "../layout/styles/index.mjs";
|
|
55
56
|
import { rowDark } from "../legacy-grid/styles/index.mjs";
|
|
56
57
|
import { legacyTransferDark } from "../legacy-transfer/styles/index.mjs";
|
|
@@ -105,6 +106,7 @@ export const darkTheme = {
|
|
|
105
106
|
AccountOption: accountOptionDark,
|
|
106
107
|
ActionCard: actionCardDark,
|
|
107
108
|
MappingCard: mappingCardDark,
|
|
109
|
+
Kanban: kanbanDark,
|
|
108
110
|
Alert: alertDark,
|
|
109
111
|
Anchor: anchorDark,
|
|
110
112
|
AutoComplete: autoCompleteDark,
|
package/es/themes/light.mjs
CHANGED
|
@@ -54,6 +54,7 @@ import { imageLight } from "../image/styles/index.mjs";
|
|
|
54
54
|
import { inputNumberLight } from "../input-number/styles/index.mjs";
|
|
55
55
|
import { inputOtpLight } from "../input-otp/styles/index.mjs";
|
|
56
56
|
import { inputLight } from "../input/styles/index.mjs";
|
|
57
|
+
import { kanbanLight } from "../kanban/styles/index.mjs";
|
|
57
58
|
import { layoutLight } from "../layout/styles/index.mjs";
|
|
58
59
|
import { rowLight } from "../legacy-grid/styles/index.mjs";
|
|
59
60
|
import { legacyTransferLight } from "../legacy-transfer/styles/index.mjs";
|
|
@@ -107,6 +108,7 @@ export const lightTheme = {
|
|
|
107
108
|
AccountOption: accountOptionLight,
|
|
108
109
|
ActionCard: actionCardLight,
|
|
109
110
|
MappingCard: mappingCardLight,
|
|
111
|
+
Kanban: kanbanLight,
|
|
110
112
|
Alert: alertLight,
|
|
111
113
|
Anchor: anchorLight,
|
|
112
114
|
AutoComplete: autoCompleteLight,
|
package/es/tree/src/Tree.d.ts
CHANGED
|
@@ -1875,6 +1875,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1875
1875
|
readonly internalScrollable: boolean;
|
|
1876
1876
|
readonly keyboard: boolean;
|
|
1877
1877
|
readonly draggable: boolean;
|
|
1878
|
+
readonly allowDrop: AllowDrop;
|
|
1878
1879
|
readonly allowCheckingNotLoaded: boolean;
|
|
1879
1880
|
readonly multiple: boolean;
|
|
1880
1881
|
readonly disabledField: string;
|
|
@@ -1906,7 +1907,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1906
1907
|
readonly blockLine: boolean;
|
|
1907
1908
|
readonly showLine: boolean;
|
|
1908
1909
|
readonly selectable: boolean;
|
|
1909
|
-
readonly allowDrop: AllowDrop;
|
|
1910
1910
|
readonly ellipsis: boolean;
|
|
1911
1911
|
readonly checkboxPlacement: "left" | "right";
|
|
1912
1912
|
}, SlotsType<TreeSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -51,7 +51,7 @@ declare const TreeNode: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
51
51
|
handleDragLeave: (e: DragEvent) => void;
|
|
52
52
|
handleLineClick: (e: PointerEvent) => void;
|
|
53
53
|
handleContentClick: (e: PointerEvent) => void;
|
|
54
|
-
handleSwitcherClick: () => void;
|
|
54
|
+
handleSwitcherClick: (e?: MouseEvent) => void;
|
|
55
55
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
56
56
|
clsPrefix: {
|
|
57
57
|
type: StringConstructor;
|
package/es/tree/src/TreeNode.mjs
CHANGED
|
@@ -61,7 +61,8 @@ const TreeNode = defineComponent({
|
|
|
61
61
|
onMounted(() => {
|
|
62
62
|
contentElRef.value = contentInstRef.value.$el;
|
|
63
63
|
});
|
|
64
|
-
function handleSwitcherClick() {
|
|
64
|
+
function handleSwitcherClick(e) {
|
|
65
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
65
66
|
const callback = () => {
|
|
66
67
|
const {
|
|
67
68
|
tmNode
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.0
|
|
1
|
+
declare const _default: "2.1.0";
|
|
2
2
|
export default _default;
|
package/es/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '2.0
|
|
1
|
+
export default '2.1.0';
|
|
@@ -332,6 +332,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
332
332
|
}>> & Readonly<{}>, {
|
|
333
333
|
trigger: "click" | "hover";
|
|
334
334
|
keyboard: boolean;
|
|
335
|
+
draggable: boolean;
|
|
335
336
|
defaultIndex: number;
|
|
336
337
|
showArrow: boolean;
|
|
337
338
|
dotType: "line" | "dot";
|
|
@@ -346,7 +347,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
346
347
|
effect: "card" | "slide" | "fade" | "custom";
|
|
347
348
|
showDots: boolean;
|
|
348
349
|
transitionStyle: Partial<Pick<CSSProperties, "transitionDuration" | "transitionTimingFunction">>;
|
|
349
|
-
draggable: boolean;
|
|
350
350
|
touchable: boolean;
|
|
351
351
|
mousewheel: boolean;
|
|
352
352
|
}, SlotsType<CarouselSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|