@wakastellar/ui 2.3.4 → 2.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.
- package/dist/blocks/dashboard/index.d.ts +4 -1
- package/dist/blocks/empty-states/index.d.ts +4 -1
- package/dist/blocks/error-pages/index.d.ts +4 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/landing/index.d.ts +4 -1
- package/dist/blocks/pricing/index.d.ts +5 -1
- package/dist/blocks/sidebar/index.d.ts +5 -1
- package/dist/index.cjs.js +130 -130
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +7905 -7856
- package/dist/stories/Button.d.ts +14 -0
- package/dist/stories/Button.stories.d.ts +8 -0
- package/dist/stories/Header.d.ts +11 -0
- package/dist/stories/Header.stories.d.ts +6 -0
- package/dist/stories/Page.d.ts +2 -0
- package/dist/stories/Page.stories.d.ts +6 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/link.d.ts +23 -0
- package/package.json +11 -3
- package/src/blocks/activity-timeline/ActivityTimeline.stories.tsx +460 -0
- package/src/blocks/apm-overview/APMOverview.stories.tsx +435 -0
- package/src/blocks/auth-2fa/Auth2FA.stories.tsx +308 -0
- package/src/blocks/calendar-view/CalendarView.stories.tsx +398 -0
- package/src/blocks/chat/Chat.stories.tsx +466 -0
- package/src/blocks/chat-interface/ChatInterface.stories.tsx +412 -0
- package/src/blocks/checkout-flow/CheckoutFlow.stories.tsx +408 -0
- package/src/blocks/cicd-builder/CICDBuilder.stories.tsx +499 -0
- package/src/blocks/cloud-cost-dashboard/CloudCostDashboard.stories.tsx +356 -0
- package/src/blocks/container-orchestrator/ContainerOrchestrator.stories.tsx +461 -0
- package/src/blocks/dashboard/Dashboard.stories.tsx +559 -0
- package/src/blocks/dashboard/index.tsx +68 -27
- package/src/blocks/dashboard-kpi/DashboardKPI.stories.tsx +422 -0
- package/src/blocks/database-admin/DatabaseAdmin.stories.tsx +393 -0
- package/src/blocks/deployment-dashboard/DeploymentDashboard.stories.tsx +457 -0
- package/src/blocks/empty-states/EmptyStates.stories.tsx +467 -0
- package/src/blocks/empty-states/index.tsx +26 -8
- package/src/blocks/error-pages/ErrorPages.stories.tsx +401 -0
- package/src/blocks/error-pages/index.tsx +26 -8
- package/src/blocks/faq/FAQ.stories.tsx +416 -0
- package/src/blocks/file-manager/FileManager.stories.tsx +413 -0
- package/src/blocks/footer/Footer.stories.tsx +328 -0
- package/src/blocks/gitops-sync-status/GitOpsSyncStatus.stories.tsx +529 -0
- package/src/blocks/header/WakaHeader.stories.tsx +455 -0
- package/src/blocks/headtab/Headtab.stories.tsx +369 -0
- package/src/blocks/i18n-editor/I18nEditor.stories.tsx +451 -0
- package/src/blocks/incident-manager/IncidentManager.stories.tsx +464 -0
- package/src/blocks/index.ts +1 -1
- package/src/blocks/infrastructure-map/InfrastructureMap.stories.tsx +533 -0
- package/src/blocks/kanban-board/KanbanBoard.stories.tsx +494 -0
- package/src/blocks/landing/WakaLanding.stories.tsx +449 -0
- package/src/blocks/landing/index.tsx +125 -66
- package/src/blocks/language-selector/LanguageSelector.stories.tsx +345 -0
- package/src/blocks/layout/Layout.stories.tsx +373 -0
- package/src/blocks/login/Login.stories.tsx +443 -0
- package/src/blocks/on-call-schedule/OnCallSchedule.stories.tsx +381 -0
- package/src/blocks/player-profile/PlayerProfile.stories.tsx +316 -0
- package/src/blocks/pricing/WakaPricing.stories.tsx +530 -0
- package/src/blocks/pricing/index.tsx +38 -4
- package/src/blocks/profile/Profile.stories.tsx +371 -0
- package/src/blocks/release-notes/ReleaseNotes.stories.tsx +431 -0
- package/src/blocks/settings/Settings.stories.tsx +520 -0
- package/src/blocks/sidebar/WakaSidebar.stories.tsx +513 -0
- package/src/blocks/sidebar/index.tsx +49 -20
- package/src/blocks/theme-creator-block/ThemeCreatorBlock.stories.tsx +370 -0
- package/src/blocks/user-management/UserManagement.stories.tsx +411 -0
- package/src/blocks/wizard/Wizard.stories.tsx +683 -0
- package/src/components/accordion/Accordion.stories.tsx +93 -0
- package/src/components/alert/Alert.stories.tsx +95 -0
- package/src/components/alert-dialog/AlertDialog.stories.tsx +126 -0
- package/src/components/aspect-ratio/AspectRatio.stories.tsx +118 -0
- package/src/components/avatar/Avatar.stories.tsx +104 -0
- package/src/components/button/Button.stories.tsx +12 -1
- package/src/components/calendar/Calendar.stories.tsx +102 -0
- package/src/components/card/Card.stories.tsx +125 -0
- package/src/components/checkbox/Checkbox.stories.tsx +100 -0
- package/src/components/code/Code.stories.tsx +402 -0
- package/src/components/collapsible/Collapsible.stories.tsx +123 -0
- package/src/components/command/Command.stories.tsx +207 -0
- package/src/components/context-menu/ContextMenu.stories.tsx +220 -0
- package/src/components/dialog/Dialog.stories.tsx +157 -0
- package/src/components/dropdown-menu/DropdownMenu.stories.tsx +225 -0
- package/src/components/form/Form.stories.tsx +413 -0
- package/src/components/hover-card/HoverCard.stories.tsx +148 -0
- package/src/components/input-otp/InputOTP.stories.tsx +255 -0
- package/src/components/label/Label.stories.tsx +68 -0
- package/src/components/menubar/Menubar.stories.tsx +278 -0
- package/src/components/navigation-menu/NavigationMenu.stories.tsx +202 -0
- package/src/components/popover/Popover.stories.tsx +199 -0
- package/src/components/progress/Progress.stories.tsx +104 -0
- package/src/components/radio-group/RadioGroup.stories.tsx +138 -0
- package/src/components/scroll-area/ScrollArea.stories.tsx +153 -0
- package/src/components/select/Select.stories.tsx +146 -0
- package/src/components/separator/Separator.stories.tsx +117 -0
- package/src/components/sheet/Sheet.stories.tsx +195 -0
- package/src/components/skeleton/Skeleton.stories.tsx +114 -0
- package/src/components/slider/Slider.stories.tsx +157 -0
- package/src/components/switch/Switch.stories.tsx +114 -0
- package/src/components/table/Table.stories.tsx +153 -0
- package/src/components/tabs/Tabs.stories.tsx +155 -0
- package/src/components/textarea/Textarea.stories.tsx +116 -0
- package/src/components/toast/Toast.stories.tsx +160 -0
- package/src/components/toggle/Toggle.stories.tsx +125 -0
- package/src/components/tooltip/Tooltip.stories.tsx +133 -0
- package/src/components/typography/Typography.stories.tsx +207 -0
- package/src/components/waka-3d-pie-chart/Waka3DPieChart.stories.tsx +308 -0
- package/src/components/waka-achievement-unlock/WakaAchievementUnlock.stories.tsx +353 -0
- package/src/components/waka-artifact-list/WakaArtifactList.stories.tsx +258 -0
- package/src/components/waka-autocomplete/WakaAutocomplete.stories.tsx +224 -0
- package/src/components/waka-badge-showcase/WakaBadgeShowcase.stories.tsx +269 -0
- package/src/components/waka-barcode/WakaBarcode.stories.tsx +227 -0
- package/src/components/waka-bottom-sheet/WakaBottomSheet.stories.tsx +408 -0
- package/src/components/waka-breadcrumb/WakaBreadcrumb.stories.tsx +237 -0
- package/src/components/waka-build-matrix/WakaBuildMatrix.stories.tsx +328 -0
- package/src/components/waka-carousel/WakaCarousel.stories.tsx +296 -0
- package/src/components/waka-charts/WakaCharts.stories.tsx +519 -0
- package/src/components/waka-color-picker/WakaColorPicker.stories.tsx +200 -0
- package/src/components/waka-combobox/WakaCombobox.stories.tsx +250 -0
- package/src/components/waka-container-list/WakaContainerList.stories.tsx +315 -0
- package/src/components/waka-contribution-graph/WakaContributionGraph.stories.tsx +354 -0
- package/src/components/waka-cost-breakdown/WakaCostBreakdown.stories.tsx +348 -0
- package/src/components/waka-daily-reward/WakaDailyReward.stories.tsx +365 -0
- package/src/components/waka-database-card/WakaDatabaseCard.stories.tsx +306 -0
- package/src/components/waka-date-range-picker/WakaDateRangePicker.stories.tsx +339 -0
- package/src/components/waka-datetime-picker/WakaDateTimePicker.stories.tsx +317 -0
- package/src/components/waka-deployment-lane/WakaDeploymentLane.stories.tsx +292 -0
- package/src/components/waka-dock/WakaDock.stories.tsx +332 -0
- package/src/components/waka-drawer/WakaDrawer.stories.tsx +437 -0
- package/src/components/waka-env-var-editor/WakaEnvVarEditor.stories.tsx +263 -0
- package/src/components/waka-error-shake/WakaErrorShake.stories.tsx +410 -0
- package/src/components/waka-file-upload/WakaFileUpload.stories.tsx +239 -0
- package/src/components/waka-flow-diagram/WakaFlowDiagram.stories.tsx +365 -0
- package/src/components/waka-funnel-chart/WakaFunnelChart.stories.tsx +281 -0
- package/src/components/waka-glow-card/WakaGlowCard.stories.tsx +274 -0
- package/src/components/waka-haptic-button/WakaHapticButton.stories.tsx +349 -0
- package/src/components/waka-health-pulse/WakaHealthPulse.stories.tsx +293 -0
- package/src/components/waka-heatmap/WakaHeatmap.stories.tsx +376 -0
- package/src/components/waka-image/WakaImage.stories.tsx +255 -0
- package/src/components/waka-incident-timeline/WakaIncidentTimeline.stories.tsx +300 -0
- package/src/components/waka-kanban/WakaKanban.stories.tsx +399 -0
- package/src/components/waka-kubernetes-overview/WakaKubernetesOverview.stories.tsx +281 -0
- package/src/components/waka-leaderboard/WakaLeaderboard.stories.tsx +300 -0
- package/src/components/waka-level-progress/WakaLevelProgress.stories.tsx +313 -0
- package/src/components/waka-loading-orbit/WakaLoadingOrbit.stories.tsx +413 -0
- package/src/components/waka-log-viewer/WakaLogViewer.stories.tsx +312 -0
- package/src/components/waka-loot-box/WakaLootBox.stories.tsx +374 -0
- package/src/components/waka-metric-sparkline/WakaMetricSparkline.stories.tsx +312 -0
- package/src/components/waka-migration-list/WakaMigrationList.stories.tsx +289 -0
- package/src/components/waka-modal/WakaModal.stories.tsx +434 -0
- package/src/components/waka-morph-button/WakaMorphButton.stories.tsx +405 -0
- package/src/components/waka-network-topology/WakaNetworkTopology.stories.tsx +364 -0
- package/src/components/waka-notifications/WakaNotifications.stories.tsx +290 -0
- package/src/components/waka-number-input/WakaNumberInput.stories.tsx +282 -0
- package/src/components/waka-pagination/WakaPagination.stories.tsx +328 -0
- package/src/components/waka-password-strength/WakaPasswordStrength.stories.tsx +318 -0
- package/src/components/waka-pipeline-view/WakaPipelineView.stories.tsx +386 -0
- package/src/components/waka-player-card/WakaPlayerCard.stories.tsx +333 -0
- package/src/components/waka-pod-card/WakaPodCard.stories.tsx +435 -0
- package/src/components/waka-qrcode/WakaQRCode.stories.tsx +232 -0
- package/src/components/waka-query-explain/WakaQueryExplain.stories.tsx +407 -0
- package/src/components/waka-quest-card/WakaQuestCard.stories.tsx +394 -0
- package/src/components/waka-quota-bar/WakaQuotaBar.stories.tsx +435 -0
- package/src/components/waka-radar-score/WakaRadarScore.stories.tsx +372 -0
- package/src/components/waka-resource-gauge/WakaResourceGauge.stories.tsx +366 -0
- package/src/components/waka-rich-text-editor/WakaRichTextEditor.stories.tsx +238 -0
- package/src/components/waka-sankey-diagram/WakaSankeyDiagram.stories.tsx +389 -0
- package/src/components/waka-scratch-card/WakaScratchCard.stories.tsx +388 -0
- package/src/components/waka-secret-card/WakaSecretCard.stories.tsx +314 -0
- package/src/components/waka-segmented-control/WakaSegmentedControl.stories.tsx +309 -0
- package/src/components/waka-server-rack/WakaServerRack.stories.tsx +382 -0
- package/src/components/waka-service-graph/WakaServiceGraph.stories.tsx +262 -0
- package/src/components/waka-skeleton-wave/WakaSkeletonWave.stories.tsx +321 -0
- package/src/components/waka-skill-tree/WakaSkillTree.stories.tsx +308 -0
- package/src/components/waka-spin-wheel/WakaSpinWheel.stories.tsx +368 -0
- package/src/components/waka-spinner/WakaSpinner.stories.tsx +156 -0
- package/src/components/waka-stat/WakaStat.stories.tsx +334 -0
- package/src/components/waka-status-matrix/WakaStatusMatrix.stories.tsx +331 -0
- package/src/components/waka-stepper/WakaStepper.stories.tsx +468 -0
- package/src/components/waka-streak-counter/WakaStreakCounter.stories.tsx +235 -0
- package/src/components/waka-success-explosion/WakaSuccessExplosion.stories.tsx +389 -0
- package/src/components/waka-tabs-morph/WakaTabsMorph.stories.tsx +471 -0
- package/src/components/waka-terminal-output/WakaTerminalOutput.stories.tsx +351 -0
- package/src/components/waka-test-report/WakaTestReport.stories.tsx +322 -0
- package/src/components/waka-tilt-card/WakaTiltCard.stories.tsx +300 -0
- package/src/components/waka-time-picker/WakaTimePicker.stories.tsx +227 -0
- package/src/components/waka-timeline/WakaTimeline.stories.tsx +383 -0
- package/src/components/waka-tournament-bracket/WakaTournamentBracket.stories.tsx +375 -0
- package/src/components/waka-trace-viewer/WakaTraceViewer.stories.tsx +445 -0
- package/src/components/waka-tree/WakaTree.stories.tsx +359 -0
- package/src/components/waka-treemap-chart/WakaTreemapChart.stories.tsx +378 -0
- package/src/components/waka-typewriter/WakaTypewriter.stories.tsx +366 -0
- package/src/components/waka-versus-card/WakaVersusCard.stories.tsx +530 -0
- package/src/components/waka-video/WakaVideo.stories.tsx +203 -0
- package/src/components/waka-virtual-list/WakaVirtualList.stories.tsx +273 -0
- package/src/components/waka-xp-bar/WakaXPBar.stories.tsx +305 -0
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { WakaKanbanBoard, defaultKanbanColumns, defaultKanbanLabels } from './index'
|
|
3
|
+
import type { KanbanColumn, KanbanCard, KanbanCardLabel, KanbanCardAssignee } from './index'
|
|
4
|
+
import * as React from 'react'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof WakaKanbanBoard> = {
|
|
7
|
+
title: 'Blocks/KanbanBoard',
|
|
8
|
+
component: WakaKanbanBoard,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'fullscreen',
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component:
|
|
14
|
+
'A Kanban board component with drag-and-drop support, card management, labels, assignees, priorities, and due dates.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
argTypes: {
|
|
20
|
+
showAddCard: {
|
|
21
|
+
control: 'boolean',
|
|
22
|
+
},
|
|
23
|
+
showAddColumn: {
|
|
24
|
+
control: 'boolean',
|
|
25
|
+
},
|
|
26
|
+
showCardCount: {
|
|
27
|
+
control: 'boolean',
|
|
28
|
+
},
|
|
29
|
+
showAssignees: {
|
|
30
|
+
control: 'boolean',
|
|
31
|
+
},
|
|
32
|
+
showLabels: {
|
|
33
|
+
control: 'boolean',
|
|
34
|
+
},
|
|
35
|
+
showPriority: {
|
|
36
|
+
control: 'boolean',
|
|
37
|
+
},
|
|
38
|
+
showDueDate: {
|
|
39
|
+
control: 'boolean',
|
|
40
|
+
},
|
|
41
|
+
draggable: {
|
|
42
|
+
control: 'boolean',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default meta
|
|
48
|
+
type Story = StoryObj<typeof WakaKanbanBoard>
|
|
49
|
+
|
|
50
|
+
export const Default: Story = {
|
|
51
|
+
render: () => (
|
|
52
|
+
<WakaKanbanBoard
|
|
53
|
+
columns={defaultKanbanColumns}
|
|
54
|
+
availableLabels={defaultKanbanLabels}
|
|
55
|
+
onCardClick={(card) => console.log('Card clicked:', card)}
|
|
56
|
+
onCardAdd={(columnId, card) => console.log('Add card:', columnId, card)}
|
|
57
|
+
onCardDelete={(cardId, columnId) => console.log('Delete card:', cardId, columnId)}
|
|
58
|
+
onColumnAdd={(column) => console.log('Add column:', column)}
|
|
59
|
+
onColumnDelete={(columnId) => console.log('Delete column:', columnId)}
|
|
60
|
+
/>
|
|
61
|
+
),
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const SimpleBoard: Story = {
|
|
65
|
+
render: () => {
|
|
66
|
+
const simpleColumns: KanbanColumn[] = [
|
|
67
|
+
{
|
|
68
|
+
id: 'todo',
|
|
69
|
+
title: 'To Do',
|
|
70
|
+
cards: [
|
|
71
|
+
{ id: '1', title: 'Task 1' },
|
|
72
|
+
{ id: '2', title: 'Task 2' },
|
|
73
|
+
{ id: '3', title: 'Task 3' },
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'doing',
|
|
78
|
+
title: 'Doing',
|
|
79
|
+
cards: [
|
|
80
|
+
{ id: '4', title: 'Task 4' },
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: 'done',
|
|
85
|
+
title: 'Done',
|
|
86
|
+
cards: [],
|
|
87
|
+
},
|
|
88
|
+
]
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<WakaKanbanBoard
|
|
92
|
+
columns={simpleColumns}
|
|
93
|
+
showLabels={false}
|
|
94
|
+
showAssignees={false}
|
|
95
|
+
showPriority={false}
|
|
96
|
+
showDueDate={false}
|
|
97
|
+
/>
|
|
98
|
+
)
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const WithAllFeatures: Story = {
|
|
103
|
+
render: () => {
|
|
104
|
+
const richColumns: KanbanColumn[] = [
|
|
105
|
+
{
|
|
106
|
+
id: 'backlog',
|
|
107
|
+
title: 'Backlog',
|
|
108
|
+
color: '#6b7280',
|
|
109
|
+
cards: [
|
|
110
|
+
{
|
|
111
|
+
id: '1',
|
|
112
|
+
title: 'Design new landing page',
|
|
113
|
+
description: 'Create mockups for the new marketing landing page with A/B test variants',
|
|
114
|
+
priority: 'medium',
|
|
115
|
+
labels: [
|
|
116
|
+
{ id: 'design', name: 'Design', color: '#8b5cf6' },
|
|
117
|
+
],
|
|
118
|
+
assignees: [
|
|
119
|
+
{ id: '1', name: 'Alice Johnson', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=Alice' },
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: '2',
|
|
124
|
+
title: 'Setup CI/CD pipeline',
|
|
125
|
+
description: 'Configure GitHub Actions for automated testing and deployment',
|
|
126
|
+
priority: 'high',
|
|
127
|
+
labels: [
|
|
128
|
+
{ id: 'dev', name: 'Dev', color: '#3b82f6' },
|
|
129
|
+
{ id: 'infra', name: 'Infra', color: '#f59e0b' },
|
|
130
|
+
],
|
|
131
|
+
dueDate: new Date(Date.now() + 1000 * 60 * 60 * 24 * 3),
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'in-progress',
|
|
137
|
+
title: 'In Progress',
|
|
138
|
+
color: '#3b82f6',
|
|
139
|
+
limit: 3,
|
|
140
|
+
cards: [
|
|
141
|
+
{
|
|
142
|
+
id: '3',
|
|
143
|
+
title: 'Implement authentication',
|
|
144
|
+
description: 'Add OAuth2 login with Google and GitHub providers',
|
|
145
|
+
priority: 'urgent',
|
|
146
|
+
labels: [
|
|
147
|
+
{ id: 'dev', name: 'Dev', color: '#3b82f6' },
|
|
148
|
+
{ id: 'security', name: 'Security', color: '#ef4444' },
|
|
149
|
+
],
|
|
150
|
+
assignees: [
|
|
151
|
+
{ id: '2', name: 'Bob Smith', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=Bob' },
|
|
152
|
+
{ id: '3', name: 'Carol Williams', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=Carol' },
|
|
153
|
+
],
|
|
154
|
+
dueDate: new Date(Date.now() + 1000 * 60 * 60 * 24),
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
id: 'review',
|
|
160
|
+
title: 'In Review',
|
|
161
|
+
color: '#f59e0b',
|
|
162
|
+
cards: [
|
|
163
|
+
{
|
|
164
|
+
id: '4',
|
|
165
|
+
title: 'Update documentation',
|
|
166
|
+
priority: 'low',
|
|
167
|
+
labels: [
|
|
168
|
+
{ id: 'docs', name: 'Docs', color: '#10b981' },
|
|
169
|
+
],
|
|
170
|
+
assignees: [
|
|
171
|
+
{ id: '1', name: 'Alice Johnson', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=Alice' },
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
id: 'done',
|
|
178
|
+
title: 'Done',
|
|
179
|
+
color: '#10b981',
|
|
180
|
+
cards: [
|
|
181
|
+
{
|
|
182
|
+
id: '5',
|
|
183
|
+
title: 'Project setup',
|
|
184
|
+
priority: 'medium',
|
|
185
|
+
labels: [
|
|
186
|
+
{ id: 'dev', name: 'Dev', color: '#3b82f6' },
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: '6',
|
|
191
|
+
title: 'Define requirements',
|
|
192
|
+
priority: 'high',
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
},
|
|
196
|
+
]
|
|
197
|
+
|
|
198
|
+
const labels: KanbanCardLabel[] = [
|
|
199
|
+
{ id: 'dev', name: 'Dev', color: '#3b82f6' },
|
|
200
|
+
{ id: 'design', name: 'Design', color: '#8b5cf6' },
|
|
201
|
+
{ id: 'docs', name: 'Docs', color: '#10b981' },
|
|
202
|
+
{ id: 'bug', name: 'Bug', color: '#ef4444' },
|
|
203
|
+
{ id: 'feature', name: 'Feature', color: '#f59e0b' },
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
const assignees: KanbanCardAssignee[] = [
|
|
207
|
+
{ id: '1', name: 'Alice Johnson', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=Alice' },
|
|
208
|
+
{ id: '2', name: 'Bob Smith', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=Bob' },
|
|
209
|
+
{ id: '3', name: 'Carol Williams', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=Carol' },
|
|
210
|
+
]
|
|
211
|
+
|
|
212
|
+
return (
|
|
213
|
+
<WakaKanbanBoard
|
|
214
|
+
columns={richColumns}
|
|
215
|
+
availableLabels={labels}
|
|
216
|
+
availableAssignees={assignees}
|
|
217
|
+
onCardClick={(card, columnId) => console.log('Clicked:', card.title, 'in', columnId)}
|
|
218
|
+
onCardMove={(cardId, from, to) => console.log('Move:', cardId, 'from', from, 'to', to)}
|
|
219
|
+
/>
|
|
220
|
+
)
|
|
221
|
+
},
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export const WithColumnLimits: Story = {
|
|
225
|
+
render: () => {
|
|
226
|
+
const limitedColumns: KanbanColumn[] = [
|
|
227
|
+
{
|
|
228
|
+
id: 'todo',
|
|
229
|
+
title: 'To Do',
|
|
230
|
+
color: '#6b7280',
|
|
231
|
+
cards: [
|
|
232
|
+
{ id: '1', title: 'Task 1' },
|
|
233
|
+
{ id: '2', title: 'Task 2' },
|
|
234
|
+
],
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
id: 'in-progress',
|
|
238
|
+
title: 'In Progress',
|
|
239
|
+
color: '#3b82f6',
|
|
240
|
+
limit: 2,
|
|
241
|
+
cards: [
|
|
242
|
+
{ id: '3', title: 'Task 3' },
|
|
243
|
+
{ id: '4', title: 'Task 4' },
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: 'done',
|
|
248
|
+
title: 'Done',
|
|
249
|
+
color: '#10b981',
|
|
250
|
+
cards: [],
|
|
251
|
+
},
|
|
252
|
+
]
|
|
253
|
+
|
|
254
|
+
return (
|
|
255
|
+
<WakaKanbanBoard
|
|
256
|
+
columns={limitedColumns}
|
|
257
|
+
showLabels={false}
|
|
258
|
+
showAssignees={false}
|
|
259
|
+
/>
|
|
260
|
+
)
|
|
261
|
+
},
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export const NoDragAndDrop: Story = {
|
|
265
|
+
render: () => (
|
|
266
|
+
<WakaKanbanBoard
|
|
267
|
+
columns={defaultKanbanColumns}
|
|
268
|
+
draggable={false}
|
|
269
|
+
onCardClick={(card) => console.log('View card:', card)}
|
|
270
|
+
/>
|
|
271
|
+
),
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export const ReadOnly: Story = {
|
|
275
|
+
render: () => (
|
|
276
|
+
<WakaKanbanBoard
|
|
277
|
+
columns={defaultKanbanColumns}
|
|
278
|
+
showAddCard={false}
|
|
279
|
+
showAddColumn={false}
|
|
280
|
+
draggable={false}
|
|
281
|
+
/>
|
|
282
|
+
),
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export const MinimalUI: Story = {
|
|
286
|
+
render: () => (
|
|
287
|
+
<WakaKanbanBoard
|
|
288
|
+
columns={defaultKanbanColumns}
|
|
289
|
+
showLabels={false}
|
|
290
|
+
showAssignees={false}
|
|
291
|
+
showPriority={false}
|
|
292
|
+
showDueDate={false}
|
|
293
|
+
showCardCount={false}
|
|
294
|
+
/>
|
|
295
|
+
),
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export const Interactive: Story = {
|
|
299
|
+
render: () => {
|
|
300
|
+
const [columns, setColumns] = React.useState<KanbanColumn[]>(defaultKanbanColumns)
|
|
301
|
+
|
|
302
|
+
const handleColumnsChange = (newColumns: KanbanColumn[]) => {
|
|
303
|
+
setColumns(newColumns)
|
|
304
|
+
console.log('Columns updated:', newColumns)
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
return (
|
|
308
|
+
<div>
|
|
309
|
+
<div className="p-4 bg-muted/50 border-b">
|
|
310
|
+
<p className="text-sm text-muted-foreground">
|
|
311
|
+
Try dragging cards between columns, adding new cards, or creating new columns.
|
|
312
|
+
</p>
|
|
313
|
+
</div>
|
|
314
|
+
<WakaKanbanBoard
|
|
315
|
+
columns={columns}
|
|
316
|
+
onColumnsChange={handleColumnsChange}
|
|
317
|
+
availableLabels={defaultKanbanLabels}
|
|
318
|
+
onCardClick={(card) => alert(`Clicked: ${card.title}`)}
|
|
319
|
+
/>
|
|
320
|
+
</div>
|
|
321
|
+
)
|
|
322
|
+
},
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export const ProjectManagement: Story = {
|
|
326
|
+
render: () => {
|
|
327
|
+
const projectColumns: KanbanColumn[] = [
|
|
328
|
+
{
|
|
329
|
+
id: 'backlog',
|
|
330
|
+
title: 'Backlog',
|
|
331
|
+
color: '#6b7280',
|
|
332
|
+
cards: [
|
|
333
|
+
{
|
|
334
|
+
id: '1',
|
|
335
|
+
title: 'User authentication',
|
|
336
|
+
description: 'Implement login/logout functionality',
|
|
337
|
+
priority: 'high',
|
|
338
|
+
labels: [{ id: 'feature', name: 'Feature', color: '#10b981' }],
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
id: '2',
|
|
342
|
+
title: 'Database optimization',
|
|
343
|
+
description: 'Improve query performance',
|
|
344
|
+
priority: 'medium',
|
|
345
|
+
labels: [{ id: 'improvement', name: 'Improvement', color: '#3b82f6' }],
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
id: '3',
|
|
349
|
+
title: 'Fix payment bug',
|
|
350
|
+
description: 'Checkout fails on mobile',
|
|
351
|
+
priority: 'urgent',
|
|
352
|
+
labels: [{ id: 'bug', name: 'Bug', color: '#ef4444' }],
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
id: 'sprint',
|
|
358
|
+
title: 'Sprint Backlog',
|
|
359
|
+
color: '#8b5cf6',
|
|
360
|
+
cards: [
|
|
361
|
+
{
|
|
362
|
+
id: '4',
|
|
363
|
+
title: 'API documentation',
|
|
364
|
+
priority: 'medium',
|
|
365
|
+
labels: [{ id: 'docs', name: 'Docs', color: '#f59e0b' }],
|
|
366
|
+
assignees: [{ id: '1', name: 'Dev Team' }],
|
|
367
|
+
},
|
|
368
|
+
],
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
id: 'progress',
|
|
372
|
+
title: 'In Progress',
|
|
373
|
+
color: '#3b82f6',
|
|
374
|
+
limit: 3,
|
|
375
|
+
cards: [
|
|
376
|
+
{
|
|
377
|
+
id: '5',
|
|
378
|
+
title: 'Dashboard redesign',
|
|
379
|
+
priority: 'high',
|
|
380
|
+
labels: [{ id: 'design', name: 'Design', color: '#8b5cf6' }],
|
|
381
|
+
assignees: [
|
|
382
|
+
{ id: '2', name: 'Sarah', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=Sarah' },
|
|
383
|
+
],
|
|
384
|
+
dueDate: new Date(Date.now() + 1000 * 60 * 60 * 24 * 2),
|
|
385
|
+
},
|
|
386
|
+
],
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
id: 'review',
|
|
390
|
+
title: 'Code Review',
|
|
391
|
+
color: '#f59e0b',
|
|
392
|
+
cards: [],
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
id: 'testing',
|
|
396
|
+
title: 'Testing',
|
|
397
|
+
color: '#ec4899',
|
|
398
|
+
cards: [
|
|
399
|
+
{
|
|
400
|
+
id: '6',
|
|
401
|
+
title: 'E2E test suite',
|
|
402
|
+
priority: 'medium',
|
|
403
|
+
labels: [{ id: 'test', name: 'Test', color: '#ec4899' }],
|
|
404
|
+
},
|
|
405
|
+
],
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
id: 'done',
|
|
409
|
+
title: 'Done',
|
|
410
|
+
color: '#10b981',
|
|
411
|
+
cards: [
|
|
412
|
+
{
|
|
413
|
+
id: '7',
|
|
414
|
+
title: 'Project setup',
|
|
415
|
+
priority: 'low',
|
|
416
|
+
},
|
|
417
|
+
],
|
|
418
|
+
},
|
|
419
|
+
]
|
|
420
|
+
|
|
421
|
+
return (
|
|
422
|
+
<div className="min-h-screen bg-muted/30">
|
|
423
|
+
<header className="bg-background border-b px-6 py-4">
|
|
424
|
+
<div className="flex items-center justify-between">
|
|
425
|
+
<div>
|
|
426
|
+
<h1 className="font-bold text-xl">Project Alpha</h1>
|
|
427
|
+
<p className="text-sm text-muted-foreground">Sprint 5 - Jan 15 to Jan 29</p>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
</header>
|
|
431
|
+
<WakaKanbanBoard
|
|
432
|
+
columns={projectColumns}
|
|
433
|
+
onCardClick={(card) => console.log('Open card:', card)}
|
|
434
|
+
/>
|
|
435
|
+
</div>
|
|
436
|
+
)
|
|
437
|
+
},
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export const EmptyBoard: Story = {
|
|
441
|
+
render: () => {
|
|
442
|
+
const emptyColumns: KanbanColumn[] = [
|
|
443
|
+
{ id: 'todo', title: 'To Do', cards: [] },
|
|
444
|
+
{ id: 'doing', title: 'Doing', cards: [] },
|
|
445
|
+
{ id: 'done', title: 'Done', cards: [] },
|
|
446
|
+
]
|
|
447
|
+
|
|
448
|
+
return (
|
|
449
|
+
<WakaKanbanBoard
|
|
450
|
+
columns={emptyColumns}
|
|
451
|
+
onCardAdd={(columnId, card) => console.log('Add card:', columnId, card)}
|
|
452
|
+
/>
|
|
453
|
+
)
|
|
454
|
+
},
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export const ManyCards: Story = {
|
|
458
|
+
render: () => {
|
|
459
|
+
const manyCardsColumns: KanbanColumn[] = [
|
|
460
|
+
{
|
|
461
|
+
id: 'backlog',
|
|
462
|
+
title: 'Backlog',
|
|
463
|
+
cards: Array.from({ length: 15 }, (_, i) => ({
|
|
464
|
+
id: `card-${i + 1}`,
|
|
465
|
+
title: `Task ${i + 1}`,
|
|
466
|
+
description: `Description for task ${i + 1}`,
|
|
467
|
+
priority: (['low', 'medium', 'high', 'urgent'] as const)[i % 4],
|
|
468
|
+
})),
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
id: 'progress',
|
|
472
|
+
title: 'In Progress',
|
|
473
|
+
cards: Array.from({ length: 5 }, (_, i) => ({
|
|
474
|
+
id: `progress-${i + 1}`,
|
|
475
|
+
title: `Active Task ${i + 1}`,
|
|
476
|
+
})),
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
id: 'done',
|
|
480
|
+
title: 'Done',
|
|
481
|
+
cards: Array.from({ length: 10 }, (_, i) => ({
|
|
482
|
+
id: `done-${i + 1}`,
|
|
483
|
+
title: `Completed ${i + 1}`,
|
|
484
|
+
})),
|
|
485
|
+
},
|
|
486
|
+
]
|
|
487
|
+
|
|
488
|
+
return (
|
|
489
|
+
<div className="h-[600px]">
|
|
490
|
+
<WakaKanbanBoard columns={manyCardsColumns} />
|
|
491
|
+
</div>
|
|
492
|
+
)
|
|
493
|
+
},
|
|
494
|
+
}
|