@svar-ui/svelte-kanban 2.6.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/components/Avatar.svelte +87 -0
- package/dist/components/Avatar.svelte.d.ts +17 -0
- package/dist/components/Card.svelte +346 -0
- package/dist/components/Card.svelte.d.ts +9 -0
- package/dist/components/CardList.svelte +343 -0
- package/dist/components/CardList.svelte.d.ts +21 -0
- package/dist/components/CardWrapper.svelte +49 -0
- package/dist/components/CardWrapper.svelte.d.ts +15 -0
- package/dist/components/Column.svelte +230 -0
- package/dist/components/Column.svelte.d.ts +24 -0
- package/dist/components/ContextMenu.svelte +111 -0
- package/dist/components/ContextMenu.svelte.d.ts +18 -0
- package/dist/components/DragGhost.svelte +57 -0
- package/dist/components/DragGhost.svelte.d.ts +14 -0
- package/dist/components/Editor.svelte +108 -0
- package/dist/components/Editor.svelte.d.ts +10 -0
- package/dist/components/ExportLayout.svelte +52 -0
- package/dist/components/ExportLayout.svelte.d.ts +15 -0
- package/dist/components/Kanban.svelte +100 -0
- package/dist/components/Kanban.svelte.d.ts +186 -0
- package/dist/components/Layout.svelte +362 -0
- package/dist/components/Layout.svelte.d.ts +19 -0
- package/dist/components/Toolbar.svelte +97 -0
- package/dist/components/Toolbar.svelte.d.ts +12 -0
- package/dist/components/useCardOverlay.svelte.d.ts +24 -0
- package/dist/components/useCardOverlay.svelte.js +60 -0
- package/dist/components/useDrag.svelte.d.ts +22 -0
- package/dist/components/useDrag.svelte.js +16 -0
- package/dist/context.d.ts +3 -0
- package/dist/context.js +3 -0
- package/dist/defaults.d.ts +8 -0
- package/dist/defaults.js +85 -0
- package/dist/directives/dblclick.d.ts +13 -0
- package/dist/directives/dblclick.js +26 -0
- package/dist/directives/drag.d.ts +11 -0
- package/dist/directives/drag.js +183 -0
- package/dist/env.d.ts +9 -0
- package/dist/export/Card.svelte +5 -0
- package/dist/export/Card.svelte.d.ts +11 -0
- package/dist/export/Kanban.svelte +30 -0
- package/dist/export/Kanban.svelte.d.ts +16 -0
- package/dist/export.d.ts +3 -0
- package/dist/export.js +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +15 -0
- package/dist/themes/Print.svelte +126 -0
- package/dist/themes/Print.svelte.d.ts +13 -0
- package/dist/themes/PrintBW.svelte +153 -0
- package/dist/themes/PrintBW.svelte.d.ts +13 -0
- package/dist/themes/Willow.svelte +45 -0
- package/dist/themes/Willow.svelte.d.ts +7 -0
- package/dist/themes/WillowDark.svelte +49 -0
- package/dist/themes/WillowDark.svelte.d.ts +7 -0
- package/dist/types.d.ts +86 -0
- package/dist/types.js +1 -0
- package/license.txt +21 -0
- package/package.json +59 -0
- package/readme.md +100 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Willow from "./Willow.svelte";
|
|
3
|
+
let { fonts = true, children } = $props();
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
{#if children}
|
|
7
|
+
<Willow {fonts}>
|
|
8
|
+
<div class="wx-bw-theme">
|
|
9
|
+
{@render children()}
|
|
10
|
+
</div>
|
|
11
|
+
</Willow>
|
|
12
|
+
{:else}
|
|
13
|
+
<Willow {fonts} />
|
|
14
|
+
{/if}
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
|
+
.wx-bw-theme {
|
|
18
|
+
height: 100%;
|
|
19
|
+
width: 100%;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
|
|
22
|
+
/* base palette - black with gray shades for print legibility */
|
|
23
|
+
--wx-background: #ffffff;
|
|
24
|
+
--wx-background-alt: #ffffff;
|
|
25
|
+
--wx-background-hover: transparent;
|
|
26
|
+
--wx-color-font: #000000;
|
|
27
|
+
--wx-color-font-alt: #555555;
|
|
28
|
+
--wx-color-font-disabled: #888888;
|
|
29
|
+
--wx-color-primary: #000000;
|
|
30
|
+
--wx-color-primary-selected: transparent;
|
|
31
|
+
--wx-color-primary-font: #000000;
|
|
32
|
+
--wx-color-link: #000000;
|
|
33
|
+
--wx-icon-color: #000000;
|
|
34
|
+
|
|
35
|
+
/* kanban surfaces */
|
|
36
|
+
--wx-kanban-bg: #ffffff;
|
|
37
|
+
--wx-kanban-column-bg: #ffffff;
|
|
38
|
+
--wx-kanban-column-over-limit-bg: #ffffff;
|
|
39
|
+
--wx-kanban-card-bg: #ffffff;
|
|
40
|
+
--wx-kanban-tag-bg: #ffffff;
|
|
41
|
+
--wx-kanban-avatar-bg: #ffffff;
|
|
42
|
+
|
|
43
|
+
/* kanban progress */
|
|
44
|
+
--wx-kanban-progress-bg: #ffffff;
|
|
45
|
+
--wx-kanban-progress-fill: #777777;
|
|
46
|
+
|
|
47
|
+
/* kanban borders and shadows */
|
|
48
|
+
--wx-kanban-border-color: #999999;
|
|
49
|
+
--wx-kanban-card-shadow: none;
|
|
50
|
+
--wx-kanban-card-shadow-hover: none;
|
|
51
|
+
--wx-kanban-card-shadow-drag: none;
|
|
52
|
+
--wx-kanban-drop-placeholder-bg: transparent;
|
|
53
|
+
|
|
54
|
+
/* priority badges - gray/black borders instead of color fills */
|
|
55
|
+
--wx-kanban-priority-low-bg: #ffffff;
|
|
56
|
+
--wx-kanban-priority-low-color: #555555;
|
|
57
|
+
--wx-kanban-priority-medium-bg: #ffffff;
|
|
58
|
+
--wx-kanban-priority-medium-color: #333333;
|
|
59
|
+
--wx-kanban-priority-high-bg: #ffffff;
|
|
60
|
+
--wx-kanban-priority-high-color: #000000;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.wx-bw-theme :global(.wx-kanban),
|
|
64
|
+
.wx-bw-theme :global(.wx-board),
|
|
65
|
+
.wx-bw-theme :global(.wx-scroll),
|
|
66
|
+
.wx-bw-theme :global(.wx-content) {
|
|
67
|
+
background: #ffffff;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.wx-bw-theme :global(.wx-column) {
|
|
71
|
+
background: #ffffff;
|
|
72
|
+
border-right: 1px solid #fff;
|
|
73
|
+
border-bottom: 1px solid #fff;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.wx-bw-theme :global(.wx-column-header),
|
|
77
|
+
.wx-bw-theme :global(.wx-scroll-board .wx-column-header),
|
|
78
|
+
.wx-bw-theme :global(.wx-over-limit .wx-column-header),
|
|
79
|
+
.wx-bw-theme :global(.wx-over-limit .wx-body) {
|
|
80
|
+
background: #ffffff;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.wx-bw-theme :global(.wx-over-limit.wx-column) {
|
|
84
|
+
border-color: #000000;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.wx-bw-theme :global(.wx-card) {
|
|
88
|
+
background: #ffffff;
|
|
89
|
+
border: 1px solid var(--wx-kanban-border-color);
|
|
90
|
+
box-shadow: none;
|
|
91
|
+
break-inside: avoid;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.wx-bw-theme :global(.wx-card:hover) {
|
|
95
|
+
box-shadow: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.wx-bw-theme :global(.wx-cover),
|
|
99
|
+
.wx-bw-theme :global(.wx-image) {
|
|
100
|
+
filter: grayscale(1) contrast(1.08);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.wx-bw-theme :global(.wx-cover) {
|
|
104
|
+
box-shadow: inset 0 0 0 1px var(--wx-kanban-border-color);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.wx-bw-theme :global(.wx-priority),
|
|
108
|
+
.wx-bw-theme :global(.wx-tag) {
|
|
109
|
+
background: #ffffff;
|
|
110
|
+
border: 1px solid currentColor;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.wx-bw-theme :global(.wx-card-priority-medium) {
|
|
114
|
+
border-style: dashed;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.wx-bw-theme :global(.wx-card-priority-high) {
|
|
118
|
+
border-width: 2px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.wx-bw-theme :global(.wx-progress) {
|
|
122
|
+
height: 6px;
|
|
123
|
+
background: #ffffff;
|
|
124
|
+
border: 1px solid #777777;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* diagonal stripes so progress reads on paper without color */
|
|
128
|
+
.wx-bw-theme :global(.wx-progress-fill) {
|
|
129
|
+
background: repeating-linear-gradient(
|
|
130
|
+
45deg,
|
|
131
|
+
#777777 0,
|
|
132
|
+
#777777 1px,
|
|
133
|
+
transparent 1px,
|
|
134
|
+
transparent 6px
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.wx-bw-theme :global(.wx-avatar) {
|
|
139
|
+
background: #ffffff;
|
|
140
|
+
border: 1px solid var(--wx-kanban-border-color);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.wx-bw-theme :global(.wx-drop-placeholder) {
|
|
144
|
+
background: transparent;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.wx-bw-theme :global(.wx-add:hover),
|
|
148
|
+
.wx-bw-theme :global(.wx-toggle:hover),
|
|
149
|
+
.wx-bw-theme :global(.wx-expand:hover),
|
|
150
|
+
.wx-bw-theme :global(.wx-menu:hover) {
|
|
151
|
+
background: transparent;
|
|
152
|
+
}
|
|
153
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default PrintBW;
|
|
2
|
+
type PrintBW = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const PrintBW: import("svelte").Component<{
|
|
7
|
+
fonts?: boolean;
|
|
8
|
+
children: any;
|
|
9
|
+
}, {}, "">;
|
|
10
|
+
type $$ComponentProps = {
|
|
11
|
+
fonts?: boolean;
|
|
12
|
+
children: any;
|
|
13
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script lang="ts">import { Willow } from "@svar-ui/svelte-core";
|
|
2
|
+
let { fonts = true, children } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
{#if children}
|
|
6
|
+
<Willow {fonts}>{@render children()}</Willow>
|
|
7
|
+
{:else}
|
|
8
|
+
<Willow {fonts} />
|
|
9
|
+
{/if}
|
|
10
|
+
|
|
11
|
+
<style>
|
|
12
|
+
:global(.wx-willow-theme) {
|
|
13
|
+
height: 100%;
|
|
14
|
+
width: 100%;
|
|
15
|
+
|
|
16
|
+
/* kanban surfaces */
|
|
17
|
+
--wx-kanban-bg: var(--wx-background-alt);
|
|
18
|
+
--wx-kanban-column-bg: #ebecef;
|
|
19
|
+
--wx-kanban-column-over-limit-bg: #fde1d6;
|
|
20
|
+
--wx-kanban-card-bg: var(--wx-background);
|
|
21
|
+
--wx-kanban-tag-bg: var(--wx-background-alt);
|
|
22
|
+
--wx-kanban-avatar-bg: #d0d4dc;
|
|
23
|
+
|
|
24
|
+
/* kanban progress bar */
|
|
25
|
+
--wx-kanban-progress-bg: #e5e7eb;
|
|
26
|
+
--wx-kanban-progress-fill: #3b82f6;
|
|
27
|
+
|
|
28
|
+
/* kanban borders and shadows */
|
|
29
|
+
--wx-kanban-border-color: #d6d8de;
|
|
30
|
+
--wx-kanban-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
|
31
|
+
--wx-kanban-card-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.12);
|
|
32
|
+
--wx-kanban-card-shadow-drag: 0 8px 20px rgba(0, 0, 0, 0.18);
|
|
33
|
+
|
|
34
|
+
/* drop-target placeholder */
|
|
35
|
+
--wx-kanban-drop-placeholder-bg: rgba(59, 130, 246, 0.08);
|
|
36
|
+
|
|
37
|
+
/* card priority badges */
|
|
38
|
+
--wx-kanban-priority-low-bg: #dcfce7;
|
|
39
|
+
--wx-kanban-priority-low-color: #166534;
|
|
40
|
+
--wx-kanban-priority-medium-bg: #fef3c7;
|
|
41
|
+
--wx-kanban-priority-medium-color: #92400e;
|
|
42
|
+
--wx-kanban-priority-high-bg: #fee2e2;
|
|
43
|
+
--wx-kanban-priority-high-color: #991b1b;
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script lang="ts">import { WillowDark } from "@svar-ui/svelte-core";
|
|
2
|
+
let { fonts = true, children } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
{#if children}
|
|
6
|
+
<WillowDark {fonts}>{@render children()}</WillowDark>
|
|
7
|
+
{:else}
|
|
8
|
+
<WillowDark {fonts} />
|
|
9
|
+
{/if}
|
|
10
|
+
|
|
11
|
+
<style>
|
|
12
|
+
:global(.wx-willow-dark-theme) {
|
|
13
|
+
height: 100%;
|
|
14
|
+
width: 100%;
|
|
15
|
+
|
|
16
|
+
/* kanban surfaces */
|
|
17
|
+
--wx-kanban-bg: var(--wx-background);
|
|
18
|
+
--wx-kanban-column-bg: var(--wx-background-alt);
|
|
19
|
+
--wx-kanban-column-over-limit-bg: #5a2d2d;
|
|
20
|
+
--wx-kanban-card-bg: var(--wx-background);
|
|
21
|
+
--wx-kanban-tag-bg: #434863;
|
|
22
|
+
--wx-kanban-avatar-bg: #4a5070;
|
|
23
|
+
|
|
24
|
+
/* kanban progress bar */
|
|
25
|
+
--wx-kanban-progress-bg: #434863;
|
|
26
|
+
--wx-kanban-progress-fill: #60a5fa;
|
|
27
|
+
|
|
28
|
+
/* kanban borders and shadows */
|
|
29
|
+
--wx-kanban-border-color: #40455a;
|
|
30
|
+
--wx-kanban-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
31
|
+
--wx-kanban-card-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.4);
|
|
32
|
+
--wx-kanban-card-shadow-drag: 0 8px 20px rgba(0, 0, 0, 0.5);
|
|
33
|
+
|
|
34
|
+
/* drop-target placeholder */
|
|
35
|
+
--wx-kanban-drop-placeholder-bg: rgba(96, 165, 250, 0.16);
|
|
36
|
+
|
|
37
|
+
/* card priority badges */
|
|
38
|
+
--wx-kanban-priority-low-bg: #1f3a2a;
|
|
39
|
+
--wx-kanban-priority-low-color: #86efac;
|
|
40
|
+
--wx-kanban-priority-medium-bg: #3a2f1a;
|
|
41
|
+
--wx-kanban-priority-medium-color: #fcd34d;
|
|
42
|
+
--wx-kanban-priority-high-bg: #3a1f1f;
|
|
43
|
+
--wx-kanban-priority-high-color: #fca5a5;
|
|
44
|
+
|
|
45
|
+
/* secondary text shade tuned for kanban surfaces */
|
|
46
|
+
--wx-color-font: #e8e9ef;
|
|
47
|
+
--wx-color-font-alt: #a0a3b0;
|
|
48
|
+
}
|
|
49
|
+
</style>
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { EventBus } from "@svar-ui/lib-state";
|
|
2
|
+
import type { Brandmark, KanbanStore, StoreActions, KanbanCard, CardID, ColumnID, ColumnView } from "@svar-ui/kanban-store";
|
|
3
|
+
export type CardCssFn = (card: KanbanCard, column: ColumnView) => string;
|
|
4
|
+
export type ColumnCssFn = (cards: KanbanCard[], column: ColumnView) => string;
|
|
5
|
+
type ShapeConfig<T> = boolean | T;
|
|
6
|
+
export type CardShapeItem = {
|
|
7
|
+
id: CardID;
|
|
8
|
+
label: string;
|
|
9
|
+
css?: string;
|
|
10
|
+
};
|
|
11
|
+
export type CardShapeUserItem = CardShapeItem & {
|
|
12
|
+
img?: string;
|
|
13
|
+
};
|
|
14
|
+
export type CardPriorityShape = {
|
|
15
|
+
data?: CardShapeItem[];
|
|
16
|
+
};
|
|
17
|
+
export type CardTagsShape = {
|
|
18
|
+
max?: number;
|
|
19
|
+
data?: CardShapeItem[];
|
|
20
|
+
};
|
|
21
|
+
export type CardUsersShape = {
|
|
22
|
+
max?: number;
|
|
23
|
+
size?: "sm" | "md";
|
|
24
|
+
data?: CardShapeUserItem[];
|
|
25
|
+
};
|
|
26
|
+
export type CardDeadlineShape = {
|
|
27
|
+
format?: string;
|
|
28
|
+
};
|
|
29
|
+
export type CardMenuShape = {
|
|
30
|
+
options?: any[];
|
|
31
|
+
filter?: (item: any, card: KanbanCard) => boolean;
|
|
32
|
+
onclick?: (e: any) => void;
|
|
33
|
+
};
|
|
34
|
+
export type CardShape = {
|
|
35
|
+
cover?: boolean;
|
|
36
|
+
priority?: ShapeConfig<CardPriorityShape>;
|
|
37
|
+
progress?: ShapeConfig<{
|
|
38
|
+
showLabel?: boolean;
|
|
39
|
+
}>;
|
|
40
|
+
deadline?: ShapeConfig<CardDeadlineShape>;
|
|
41
|
+
users?: ShapeConfig<CardUsersShape>;
|
|
42
|
+
tags?: ShapeConfig<CardTagsShape>;
|
|
43
|
+
attachments?: boolean;
|
|
44
|
+
comments?: boolean;
|
|
45
|
+
description?: boolean;
|
|
46
|
+
menu?: ShapeConfig<CardMenuShape>;
|
|
47
|
+
};
|
|
48
|
+
export type EditorShape = {
|
|
49
|
+
description?: boolean;
|
|
50
|
+
priority?: ShapeConfig<CardPriorityShape>;
|
|
51
|
+
progress?: ShapeConfig<{
|
|
52
|
+
showLabel?: boolean;
|
|
53
|
+
}>;
|
|
54
|
+
deadline?: ShapeConfig<CardDeadlineShape>;
|
|
55
|
+
tags?: ShapeConfig<CardTagsShape>;
|
|
56
|
+
users?: ShapeConfig<CardUsersShape>;
|
|
57
|
+
};
|
|
58
|
+
export type RenderConfig = {
|
|
59
|
+
columnScroll?: boolean;
|
|
60
|
+
fixedColumnWidth?: boolean;
|
|
61
|
+
virtualizeCards?: boolean;
|
|
62
|
+
virtualizeColumns?: boolean;
|
|
63
|
+
estimatedCardHeight?: number;
|
|
64
|
+
cardOverscan?: number;
|
|
65
|
+
columnOverscan?: number;
|
|
66
|
+
};
|
|
67
|
+
export type { KanbanCard, CardID, ColumnID };
|
|
68
|
+
type KanbanEventBus = EventBus<StoreActions, keyof StoreActions>;
|
|
69
|
+
type KanbanApi = {
|
|
70
|
+
getState: KanbanStore["getState"];
|
|
71
|
+
getReactiveState: KanbanStore["getReactive"];
|
|
72
|
+
exec: KanbanEventBus["exec"];
|
|
73
|
+
};
|
|
74
|
+
export type KanbanContextApi = KanbanApi & {
|
|
75
|
+
getBrandmark: () => Brandmark | null;
|
|
76
|
+
};
|
|
77
|
+
export type KanbanInstanceApi = KanbanApi & {
|
|
78
|
+
getStores: () => {
|
|
79
|
+
data: KanbanStore;
|
|
80
|
+
};
|
|
81
|
+
setNext: (handler: any) => any;
|
|
82
|
+
intercept: KanbanEventBus["intercept"];
|
|
83
|
+
on: KanbanEventBus["on"];
|
|
84
|
+
detach: KanbanEventBus["detach"];
|
|
85
|
+
getCards: KanbanStore["getCards"];
|
|
86
|
+
};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/license.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 XB Software Sp. z o.o.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@svar-ui/svelte-kanban",
|
|
3
|
+
"version": "2.6.0",
|
|
4
|
+
"description": "SVAR UI Kanban board widget",
|
|
5
|
+
"homepage": "https://svar.dev/svelte/kanban/",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://forum.svar.dev"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/svar-widgets/kanban.git"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"readme.md",
|
|
17
|
+
"license.txt"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"svelte": "./dist/index.js",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"svelte": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts"
|
|
26
|
+
},
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@svar-ui/core-locales": "2.6.0",
|
|
31
|
+
"@svar-ui/lib-dom": "0.13.1",
|
|
32
|
+
"@svar-ui/lib-state": "1.9.7",
|
|
33
|
+
"@svar-ui/svelte-core": "2.6.0",
|
|
34
|
+
"@svar-ui/svelte-editor": "2.6.0",
|
|
35
|
+
"@svar-ui/svelte-menu": "2.6.0",
|
|
36
|
+
"@svar-ui/svelte-toolbar": "2.6.0",
|
|
37
|
+
"svelte-check": "^4.4.6",
|
|
38
|
+
"@svar-ui/kanban-store": "2.6.0",
|
|
39
|
+
"@svar-ui/kanban-locales": "2.6.0",
|
|
40
|
+
"@svar-ui/kanban-provider": "2.6.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@sveltejs/package": "^2.5.7",
|
|
44
|
+
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
|
45
|
+
"svelte": "^5.54.0",
|
|
46
|
+
"svelte-check": "^4.4.6"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"svelte": "^5.54.0"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
53
|
+
"build": "svelte-package -i ./src",
|
|
54
|
+
"build:export": "vp build --mode export",
|
|
55
|
+
"lint": "vp lint ./demos ./src",
|
|
56
|
+
"start": "vp dev --open",
|
|
57
|
+
"dev": "svelte-package -i ./src --watch"
|
|
58
|
+
}
|
|
59
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# SVAR Svelte Kanban
|
|
4
|
+
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div align="center">
|
|
8
|
+
|
|
9
|
+
[Homepage](https://svar.dev/svelte/kanban/) • [Getting Started](https://docs.svar.dev/svelte/kanban/getting-started/quick-start/) • [Demos](https://docs.svar.dev/svelte/kanban/samples/)
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div align="center">
|
|
14
|
+
|
|
15
|
+
[](https://www.npmjs.com/package/@svar-ui/svelte-kanban)
|
|
16
|
+
[](https://github.com/svar-widgets/kanban/blob/main/license.txt)
|
|
17
|
+
[](https://www.npmjs.com/package/@svar-ui/svelte-kanban)
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
[SVAR Svelte Kanban](https://svar.dev/svelte/kanban/) is a customizable, interactive Kanban board component for Svelte and SvelteKit apps. It supports drag-and-drop, card editing, filtering, sorting, flexible layouts, and rich customization options. Use it to add clear visualization of tasks and project workflows.
|
|
22
|
+
|
|
23
|
+
The kanban component comes with full TypeScript support, rich API, and easy CSS styling. The PRO Edition offers extra features for enterprise projects (see below).
|
|
24
|
+
|
|
25
|
+
<div align="center">
|
|
26
|
+
<img src="https://svar.dev/images/github/github_kanban.gif" alt="SVAR Svelte Kanban Preview">
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
### ✨ Key Features
|
|
30
|
+
|
|
31
|
+
- Drag-and-drop cards between columns and rows
|
|
32
|
+
- Built-in card editor
|
|
33
|
+
- Context menu and toolbar
|
|
34
|
+
- Card filtering, sorting, grouping
|
|
35
|
+
- REST data provider for backend integration
|
|
36
|
+
- Custom card templates
|
|
37
|
+
- Localization
|
|
38
|
+
- Light and dark themes
|
|
39
|
+
- Full TypeScript support
|
|
40
|
+
|
|
41
|
+
### 🚀 PRO Edition
|
|
42
|
+
|
|
43
|
+
SVAR Svelte Kanban is available in open-source and [PRO Editions](https://svar.dev/svelte/kanban/#pro). The PRO Edition offers extra features for enterprise projects:
|
|
44
|
+
|
|
45
|
+
- Export to PDF/PNG/Excel
|
|
46
|
+
- Dynamic data loading
|
|
47
|
+
- Undo/redo
|
|
48
|
+
|
|
49
|
+
Visit the [pricing page](https://svar.dev/svelte/kanban/pricing/) for full feature comparison, licensing details, and **free trial**.
|
|
50
|
+
|
|
51
|
+
Or [see the live demo](https://svar.dev/demos/kanban/).
|
|
52
|
+
|
|
53
|
+
### 🛠️ How to Use
|
|
54
|
+
|
|
55
|
+
To use SVAR Svelte Kanban, simply import the package and include the component in your Svelte file:
|
|
56
|
+
|
|
57
|
+
```svelte
|
|
58
|
+
<script>
|
|
59
|
+
import { Kanban } from "@svar-ui/svelte-kanban";
|
|
60
|
+
|
|
61
|
+
const cards = [
|
|
62
|
+
{ id: 1, label: "Design", column: "todo" },
|
|
63
|
+
{ id: 2, label: "Implement", column: "doing" },
|
|
64
|
+
];
|
|
65
|
+
const columns = [
|
|
66
|
+
{ id: "todo", label: "To Do" },
|
|
67
|
+
{ id: "doing", label: "Doing" },
|
|
68
|
+
{ id: "done", label: "Done" },
|
|
69
|
+
];
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<Kanban {cards} {columns} />
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For further instructions, follow the detailed [quick start guide](https://docs.svar.dev/svelte/kanban/getting-started/quick-start/).
|
|
76
|
+
|
|
77
|
+
### How to Modify
|
|
78
|
+
|
|
79
|
+
Typically, you don't need to modify the code. However, if you wish to do so, follow these steps:
|
|
80
|
+
|
|
81
|
+
1. Install [vite-plus](https://vite.plus) (`curl -fsSL https://vite.plus | bash` on Mac/Linux, `irm https://vite.plus/ps1 | iex` on Windows). The project uses `pnpm` workspaces under the hood, so plain `npm` will not work.
|
|
82
|
+
2. Run `vp i` from the project root to install dependencies.
|
|
83
|
+
3. Run `vp run build` to build all packages.
|
|
84
|
+
4. Start the demo app in development mode with `vp run start`.
|
|
85
|
+
|
|
86
|
+
### Run Tests
|
|
87
|
+
|
|
88
|
+
To run the tests:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
vp test
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### ⭐ Show Your Support
|
|
95
|
+
|
|
96
|
+
If SVAR Svelte Kanban helps your project, [give us a star](https://github.com/svar-widgets/kanban/) to support us!
|
|
97
|
+
|
|
98
|
+
### :speech_balloon: Need Help?
|
|
99
|
+
|
|
100
|
+
[Post an Issue](https://github.com/svar-widgets/kanban/issues/) or use our [community forum](https://forum.svar.dev).
|