@umituz/web-dashboard 11.10.1 → 11.12.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.
@@ -0,0 +1,406 @@
1
+ .udb-kanban-page {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 100%;
5
+ gap: var(--udb-space-5, 20px);
6
+ }
7
+
8
+ .udb-kanban-callout {
9
+ width: 100%;
10
+ }
11
+
12
+ .udb-kanban-kpis {
13
+ display: grid;
14
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
15
+ gap: 16px;
16
+ width: 100%;
17
+ }
18
+
19
+ .udb-kanban-kpi-card {
20
+ padding: 16px 20px;
21
+ border-radius: var(--radius-lg, 12px);
22
+ border: 1px solid var(--color-border, #e2e8f0);
23
+ background: var(--color-card, #ffffff);
24
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
25
+ }
26
+
27
+ .udb-kanban-kpi-label {
28
+ font-size: 13px;
29
+ font-weight: 500;
30
+ color: var(--color-muted-foreground, #64748b);
31
+ margin-bottom: 6px;
32
+ }
33
+
34
+ .udb-kanban-kpi-value {
35
+ font-size: 24px;
36
+ font-weight: 700;
37
+ color: var(--color-foreground, #0f172a);
38
+ letter-spacing: -0.02em;
39
+ }
40
+
41
+ .udb-kanban-kpi-hint {
42
+ font-size: 12px;
43
+ color: var(--color-muted-foreground, #64748b);
44
+ margin-top: 4px;
45
+ }
46
+
47
+ .udb-kanban-toolbar {
48
+ display: flex;
49
+ flex-wrap: wrap;
50
+ align-items: center;
51
+ justify-content: space-between;
52
+ gap: 12px;
53
+ }
54
+
55
+ .udb-kanban-search-box {
56
+ position: relative;
57
+ min-width: 260px;
58
+ max-width: 380px;
59
+ flex: 1;
60
+ }
61
+
62
+ .udb-kanban-search-icon {
63
+ position: absolute;
64
+ left: 10px;
65
+ top: 50%;
66
+ transform: translateY(-50%);
67
+ pointer-events: none;
68
+ color: var(--color-muted-foreground, #64748b);
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ }
73
+
74
+ .udb-kanban-search-input {
75
+ width: 100%;
76
+ height: 36px;
77
+ padding: 0 12px 0 34px;
78
+ font-size: 13px;
79
+ border-radius: var(--radius-md, 8px);
80
+ border: 1px solid var(--color-border, #e2e8f0);
81
+ background: var(--color-card, #ffffff);
82
+ color: var(--color-foreground, #0f172a);
83
+ transition: all 0.15s ease;
84
+ }
85
+
86
+ .udb-kanban-search-input:focus {
87
+ outline: none;
88
+ border-color: var(--color-primary, #2563eb);
89
+ box-shadow: 0 0 0 1px var(--color-primary, #2563eb);
90
+ }
91
+
92
+ .udb-kanban-board {
93
+ display: flex;
94
+ align-items: flex-start;
95
+ gap: 16px;
96
+ width: 100%;
97
+ overflow-x: auto;
98
+ padding-bottom: 16px;
99
+ scroll-behavior: smooth;
100
+ -webkit-overflow-scrolling: touch;
101
+ }
102
+
103
+ .udb-kanban-col {
104
+ display: flex;
105
+ flex-direction: column;
106
+ flex: 1 0 300px;
107
+ max-width: 360px;
108
+ min-width: 280px;
109
+ background: var(--color-muted, #f8fafc);
110
+ border: 1px solid var(--color-border, #e2e8f0);
111
+ border-radius: var(--radius-xl, 14px);
112
+ padding: 12px;
113
+ transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
114
+ }
115
+
116
+ .udb-kanban-col.is-drag-over {
117
+ border-color: var(--color-primary, #2563eb);
118
+ background: rgba(37, 99, 235, 0.04);
119
+ box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
120
+ }
121
+
122
+ .udb-kanban-col-head {
123
+ display: flex;
124
+ align-items: center;
125
+ justify-content: space-between;
126
+ padding: 4px 6px 12px 6px;
127
+ gap: 8px;
128
+ }
129
+
130
+ .udb-kanban-col-title-wrap {
131
+ display: flex;
132
+ align-items: center;
133
+ gap: 8px;
134
+ min-width: 0;
135
+ }
136
+
137
+ .udb-kanban-tone-dot {
138
+ width: 8px;
139
+ height: 8px;
140
+ border-radius: 9999px;
141
+ flex-shrink: 0;
142
+ background: var(--color-muted-foreground, #94a3b8);
143
+ }
144
+
145
+ .udb-kanban-tone-dot.tone-primary {
146
+ background: var(--color-primary, #2563eb);
147
+ }
148
+
149
+ .udb-kanban-tone-dot.tone-success {
150
+ background: #16a34a;
151
+ }
152
+
153
+ .udb-kanban-tone-dot.tone-warning {
154
+ background: #d97706;
155
+ }
156
+
157
+ .udb-kanban-tone-dot.tone-danger {
158
+ background: #dc2626;
159
+ }
160
+
161
+ .udb-kanban-tone-dot.tone-info {
162
+ background: #0284c7;
163
+ }
164
+
165
+ .udb-kanban-col-title {
166
+ font-size: 14px;
167
+ font-weight: 600;
168
+ color: var(--color-foreground, #0f172a);
169
+ white-space: nowrap;
170
+ overflow: hidden;
171
+ text-overflow: ellipsis;
172
+ }
173
+
174
+ .udb-kanban-col-count {
175
+ display: inline-flex;
176
+ align-items: center;
177
+ justify-content: center;
178
+ padding: 2px 7px;
179
+ font-size: 11px;
180
+ font-weight: 600;
181
+ border-radius: 9999px;
182
+ background: var(--color-border, #e2e8f0);
183
+ color: var(--color-muted-foreground, #64748b);
184
+ font-variant-numeric: tabular-nums;
185
+ }
186
+
187
+ .udb-kanban-col-limit {
188
+ font-size: 11px;
189
+ font-weight: 600;
190
+ color: var(--color-muted-foreground, #64748b);
191
+ font-variant-numeric: tabular-nums;
192
+ }
193
+
194
+ .udb-kanban-col-limit.is-exceeded {
195
+ color: #dc2626;
196
+ font-weight: 700;
197
+ }
198
+
199
+ .udb-kanban-col-actions {
200
+ display: flex;
201
+ align-items: center;
202
+ gap: 4px;
203
+ flex-shrink: 0;
204
+ }
205
+
206
+ .udb-kanban-col-btn {
207
+ display: inline-flex;
208
+ align-items: center;
209
+ justify-content: center;
210
+ width: 26px;
211
+ height: 26px;
212
+ border-radius: var(--radius-sm, 6px);
213
+ border: none;
214
+ background: transparent;
215
+ color: var(--color-muted-foreground, #64748b);
216
+ cursor: pointer;
217
+ transition: all 0.15s ease;
218
+ }
219
+
220
+ .udb-kanban-col-btn:hover {
221
+ background: var(--color-border, #e2e8f0);
222
+ color: var(--color-foreground, #0f172a);
223
+ }
224
+
225
+ .udb-kanban-col-body {
226
+ display: flex;
227
+ flex-direction: column;
228
+ gap: 10px;
229
+ min-height: 120px;
230
+ flex: 1;
231
+ }
232
+
233
+ .udb-kanban-card {
234
+ position: relative;
235
+ display: flex;
236
+ flex-direction: column;
237
+ gap: 8px;
238
+ padding: 14px;
239
+ border-radius: var(--radius-lg, 10px);
240
+ border: 1px solid var(--color-border, #e2e8f0);
241
+ background: var(--color-card, #ffffff);
242
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
243
+ cursor: grab;
244
+ user-select: none;
245
+ transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
246
+ }
247
+
248
+ .udb-kanban-card:active {
249
+ cursor: grabbing;
250
+ }
251
+
252
+ .udb-kanban-card:hover {
253
+ border-color: #cbd5e1;
254
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
255
+ transform: translateY(-1px);
256
+ }
257
+
258
+ .udb-kanban-card.is-dragging {
259
+ opacity: 0.35;
260
+ transform: scale(0.98);
261
+ }
262
+
263
+ .udb-kanban-card.is-disabled {
264
+ cursor: default;
265
+ opacity: 0.7;
266
+ }
267
+
268
+ .udb-kanban-card-head {
269
+ display: flex;
270
+ align-items: flex-start;
271
+ justify-content: space-between;
272
+ gap: 8px;
273
+ }
274
+
275
+ .udb-kanban-card-title {
276
+ font-size: 13px;
277
+ font-weight: 600;
278
+ line-height: 1.35;
279
+ color: var(--color-foreground, #0f172a);
280
+ word-break: break-word;
281
+ }
282
+
283
+ .udb-kanban-card-desc {
284
+ font-size: 12px;
285
+ line-height: 1.45;
286
+ color: var(--color-muted-foreground, #64748b);
287
+ display: -webkit-box;
288
+ -webkit-line-clamp: 2;
289
+ -webkit-box-orient: vertical;
290
+ overflow: hidden;
291
+ }
292
+
293
+ .udb-kanban-card-tags {
294
+ display: flex;
295
+ flex-wrap: wrap;
296
+ gap: 4px;
297
+ margin-top: 2px;
298
+ }
299
+
300
+ .udb-kanban-card-tag {
301
+ display: inline-flex;
302
+ align-items: center;
303
+ padding: 1px 7px;
304
+ font-size: 10.5px;
305
+ font-weight: 500;
306
+ border-radius: var(--radius-sm, 5px);
307
+ background: var(--color-muted, #f1f5f9);
308
+ color: var(--color-muted-foreground, #475569);
309
+ border: 1px solid var(--color-border, #e2e8f0);
310
+ }
311
+
312
+ .udb-kanban-card-foot {
313
+ display: flex;
314
+ align-items: center;
315
+ justify-content: space-between;
316
+ gap: 8px;
317
+ margin-top: 4px;
318
+ padding-top: 8px;
319
+ border-top: 1px solid rgba(226, 232, 240, 0.6);
320
+ }
321
+
322
+ .udb-kanban-card-meta {
323
+ display: flex;
324
+ align-items: center;
325
+ gap: 6px;
326
+ font-size: 11.5px;
327
+ color: var(--color-muted-foreground, #64748b);
328
+ min-width: 0;
329
+ }
330
+
331
+ .udb-kanban-card-assignee {
332
+ display: inline-flex;
333
+ align-items: center;
334
+ gap: 5px;
335
+ font-size: 11.5px;
336
+ font-weight: 500;
337
+ color: var(--color-foreground, #0f172a);
338
+ }
339
+
340
+ .udb-kanban-card-avatar {
341
+ display: inline-flex;
342
+ align-items: center;
343
+ justify-content: center;
344
+ width: 20px;
345
+ height: 20px;
346
+ border-radius: 9999px;
347
+ background: var(--color-primary, #2563eb);
348
+ color: #ffffff;
349
+ font-size: 9px;
350
+ font-weight: 700;
351
+ overflow: hidden;
352
+ text-transform: uppercase;
353
+ }
354
+
355
+ .udb-kanban-card-avatar img {
356
+ width: 100%;
357
+ height: 100%;
358
+ object-fit: cover;
359
+ }
360
+
361
+ .udb-kanban-stage-actions {
362
+ display: inline-flex;
363
+ align-items: center;
364
+ gap: 3px;
365
+ margin-left: auto;
366
+ }
367
+
368
+ .udb-kanban-stage-btn {
369
+ display: inline-flex;
370
+ align-items: center;
371
+ justify-content: center;
372
+ width: 22px;
373
+ height: 22px;
374
+ border-radius: var(--radius-sm, 4px);
375
+ border: 1px solid var(--color-border, #e2e8f0);
376
+ background: var(--color-card, #ffffff);
377
+ color: var(--color-muted-foreground, #64748b);
378
+ cursor: pointer;
379
+ transition: all 0.15s ease;
380
+ font-size: 12px;
381
+ }
382
+
383
+ .udb-kanban-stage-btn:hover:not(:disabled) {
384
+ background: var(--color-muted, #f1f5f9);
385
+ color: var(--color-foreground, #0f172a);
386
+ border-color: #cbd5e1;
387
+ }
388
+
389
+ .udb-kanban-stage-btn:disabled {
390
+ opacity: 0.3;
391
+ cursor: not-allowed;
392
+ }
393
+
394
+ .udb-kanban-empty-col {
395
+ display: flex;
396
+ align-items: center;
397
+ justify-content: center;
398
+ min-height: 80px;
399
+ border-radius: var(--radius-md, 8px);
400
+ border: 1px dashed var(--color-border, #cbd5e1);
401
+ color: var(--color-muted-foreground, #94a3b8);
402
+ font-size: 12px;
403
+ font-weight: 500;
404
+ text-align: center;
405
+ padding: 12px;
406
+ }
@@ -0,0 +1,103 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export type KanbanTone = 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
4
+
5
+ export interface KanbanTag {
6
+ readonly label: string;
7
+ readonly tone?: KanbanTone | string;
8
+ }
9
+
10
+ export interface KanbanAssignee {
11
+ readonly name: string;
12
+ readonly avatarUrl?: string;
13
+ readonly initials?: string;
14
+ }
15
+
16
+ export interface KanbanItem<T = unknown> {
17
+ readonly id: string;
18
+ readonly columnId: string;
19
+ readonly title: ReactNode;
20
+ readonly description?: ReactNode;
21
+ readonly tone?: KanbanTone;
22
+ readonly badge?: ReactNode;
23
+ readonly tags?: readonly KanbanTag[];
24
+ readonly assignee?: KanbanAssignee;
25
+ readonly meta?: ReactNode;
26
+ readonly disabled?: boolean;
27
+ readonly payload?: T;
28
+ }
29
+
30
+ export interface KanbanColumn<T = unknown> {
31
+ readonly id: string;
32
+ readonly title: ReactNode;
33
+ readonly tone?: KanbanTone;
34
+ readonly limit?: number;
35
+ readonly badge?: ReactNode;
36
+ readonly icon?: ReactNode;
37
+ readonly headerActions?: ReactNode;
38
+ readonly canDrop?: boolean | ((draggedItem: KanbanItem<T>) => boolean);
39
+ readonly meta?: ReactNode;
40
+ }
41
+
42
+ export interface KanbanCardActions {
43
+ readonly canMoveBack: boolean;
44
+ readonly canMoveForward: boolean;
45
+ readonly moveBack: () => void;
46
+ readonly moveForward: () => void;
47
+ }
48
+
49
+ export interface KanbanBoardProps<T = unknown> {
50
+ readonly columns: readonly KanbanColumn<T>[];
51
+ readonly items: readonly KanbanItem<T>[];
52
+ readonly onMoveItem?: (
53
+ itemId: string,
54
+ targetColumnId: string,
55
+ sourceColumnId: string,
56
+ targetIndex?: number,
57
+ ) => void;
58
+ readonly onSelectItem?: (item: KanbanItem<T>) => void;
59
+ readonly onColumnAction?: (columnId: string) => void;
60
+ readonly renderCard?: (
61
+ item: KanbanItem<T>,
62
+ column: KanbanColumn<T>,
63
+ actions?: KanbanCardActions,
64
+ ) => ReactNode;
65
+ readonly renderColumnHeader?: (
66
+ column: KanbanColumn<T>,
67
+ items: readonly KanbanItem<T>[],
68
+ ) => ReactNode;
69
+ readonly renderColumnFooter?: (column: KanbanColumn<T>) => ReactNode;
70
+ readonly renderEmptyColumn?: (column: KanbanColumn<T>) => ReactNode;
71
+ readonly showStageActions?: boolean;
72
+ readonly emptyText?: string;
73
+ readonly className?: string;
74
+ readonly columnClassName?: string;
75
+ readonly cardClassName?: string;
76
+ }
77
+
78
+ export interface KanbanKpi {
79
+ readonly label: string;
80
+ readonly value: ReactNode;
81
+ readonly hint?: ReactNode;
82
+ readonly change?: string;
83
+ readonly tone?: KanbanTone;
84
+ readonly icon?: ReactNode;
85
+ }
86
+
87
+ export interface KanbanPageProps<T = unknown> extends KanbanBoardProps<T> {
88
+ readonly kicker?: ReactNode;
89
+ readonly title: ReactNode;
90
+ readonly subtitle?: ReactNode;
91
+ readonly actions?: ReactNode;
92
+ readonly callout?: ReactNode;
93
+ readonly kpis?: readonly KanbanKpi[];
94
+ readonly search?: {
95
+ readonly value: string;
96
+ readonly onChange: (value: string) => void;
97
+ readonly placeholder?: string;
98
+ };
99
+ readonly filterBar?: ReactNode;
100
+ readonly loading?: boolean;
101
+ readonly footer?: ReactNode;
102
+ readonly children?: ReactNode;
103
+ }
@@ -196,7 +196,12 @@ export const DashboardLayout = ({
196
196
 
197
197
  {mobileOpen && (
198
198
  <div className="udb-layout__mobile">
199
- <div className="udb-layout__backdrop" onClick={() => setMobileOpen(false)} />
199
+ <button
200
+ type="button"
201
+ className="udb-layout__backdrop"
202
+ onClick={() => setMobileOpen(false)}
203
+ aria-label={labels.header.collapseSidebar}
204
+ />
200
205
  <aside
201
206
  className="udb-layout__mobile-sidebar"
202
207
  role="dialog"
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@ export * from './domains/layouts';
2
2
  export * from './domains/pages';
3
3
  export * from './domains/settings';
4
4
  export * from './domains/calendar';
5
+ export * from './domains/kanban';
5
6
  export * from './domains/permissions';
6
7
  export * from './domains/organization';
7
8
  export * from './domains/tour';
@@ -100,7 +100,11 @@
100
100
  .udb-layout__backdrop {
101
101
  position: absolute;
102
102
  inset: 0;
103
+ border: 0;
104
+ padding: 0;
105
+ margin: 0;
103
106
  background: rgba(15, 23, 42, 0.45);
107
+ cursor: pointer;
104
108
  }
105
109
  .udb-layout__mobile-sidebar {
106
110
  position: absolute;
@@ -1,2 +1,4 @@
1
1
  @import "@umituz/web-design-system/styles.css";
2
2
  @import "./chrome.css";
3
+ @import "../domains/calendar/calendar.css";
4
+ @import "../domains/kanban/kanban.css";