@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,333 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { WakaPlayerCard } from './index'
|
|
3
|
+
import type { Player, PlayerRarity } from './index'
|
|
4
|
+
import * as React from 'react'
|
|
5
|
+
import { Swords, Shield, Heart, Zap, Crown, Star, Flame } from 'lucide-react'
|
|
6
|
+
|
|
7
|
+
const samplePlayer: Player = {
|
|
8
|
+
id: '1',
|
|
9
|
+
name: 'DragonSlayer99',
|
|
10
|
+
avatar: 'https://i.pravatar.cc/150?img=1',
|
|
11
|
+
title: 'Master of Fire',
|
|
12
|
+
level: 42,
|
|
13
|
+
rarity: 'legendary',
|
|
14
|
+
stats: [
|
|
15
|
+
{ name: 'ATK', value: 850, max: 1000 },
|
|
16
|
+
{ name: 'DEF', value: 720, max: 1000 },
|
|
17
|
+
{ name: 'SPD', value: 680, max: 1000 },
|
|
18
|
+
],
|
|
19
|
+
achievements: 156,
|
|
20
|
+
joinedAt: new Date('2022-03-15'),
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const playersByRarity: Record<PlayerRarity, Player> = {
|
|
24
|
+
common: {
|
|
25
|
+
id: 'common-1',
|
|
26
|
+
name: 'Rookie123',
|
|
27
|
+
avatar: 'https://i.pravatar.cc/150?img=10',
|
|
28
|
+
title: 'Beginner',
|
|
29
|
+
level: 5,
|
|
30
|
+
rarity: 'common',
|
|
31
|
+
stats: [
|
|
32
|
+
{ name: 'ATK', value: 120, max: 1000 },
|
|
33
|
+
{ name: 'DEF', value: 100, max: 1000 },
|
|
34
|
+
{ name: 'SPD', value: 150, max: 1000 },
|
|
35
|
+
],
|
|
36
|
+
achievements: 3,
|
|
37
|
+
},
|
|
38
|
+
rare: {
|
|
39
|
+
id: 'rare-1',
|
|
40
|
+
name: 'BladeRunner',
|
|
41
|
+
avatar: 'https://i.pravatar.cc/150?img=12',
|
|
42
|
+
title: 'Swift Striker',
|
|
43
|
+
level: 18,
|
|
44
|
+
rarity: 'rare',
|
|
45
|
+
stats: [
|
|
46
|
+
{ name: 'ATK', value: 350, max: 1000 },
|
|
47
|
+
{ name: 'DEF', value: 280, max: 1000 },
|
|
48
|
+
{ name: 'SPD', value: 420, max: 1000 },
|
|
49
|
+
],
|
|
50
|
+
achievements: 24,
|
|
51
|
+
},
|
|
52
|
+
epic: {
|
|
53
|
+
id: 'epic-1',
|
|
54
|
+
name: 'ShadowMage',
|
|
55
|
+
avatar: 'https://i.pravatar.cc/150?img=15',
|
|
56
|
+
title: 'Arcane Master',
|
|
57
|
+
level: 35,
|
|
58
|
+
rarity: 'epic',
|
|
59
|
+
stats: [
|
|
60
|
+
{ name: 'ATK', value: 620, max: 1000 },
|
|
61
|
+
{ name: 'DEF', value: 450, max: 1000 },
|
|
62
|
+
{ name: 'SPD', value: 580, max: 1000 },
|
|
63
|
+
],
|
|
64
|
+
achievements: 87,
|
|
65
|
+
},
|
|
66
|
+
legendary: samplePlayer,
|
|
67
|
+
mythic: {
|
|
68
|
+
id: 'mythic-1',
|
|
69
|
+
name: 'CosmicOverlord',
|
|
70
|
+
avatar: 'https://i.pravatar.cc/150?img=20',
|
|
71
|
+
title: 'Dimensional Conqueror',
|
|
72
|
+
level: 100,
|
|
73
|
+
rarity: 'mythic',
|
|
74
|
+
stats: [
|
|
75
|
+
{ name: 'ATK', value: 999, max: 1000 },
|
|
76
|
+
{ name: 'DEF', value: 950, max: 1000 },
|
|
77
|
+
{ name: 'SPD', value: 980, max: 1000 },
|
|
78
|
+
],
|
|
79
|
+
achievements: 500,
|
|
80
|
+
joinedAt: new Date('2021-01-01'),
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const meta: Meta<typeof WakaPlayerCard> = {
|
|
85
|
+
title: 'Components/Gamification/WakaPlayerCard',
|
|
86
|
+
component: WakaPlayerCard,
|
|
87
|
+
parameters: {
|
|
88
|
+
layout: 'centered',
|
|
89
|
+
docs: {
|
|
90
|
+
description: {
|
|
91
|
+
component: 'A collectible player card with rarity tiers, holographic effects, stats display, and flip animation.',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
tags: ['autodocs'],
|
|
96
|
+
argTypes: {
|
|
97
|
+
variant: {
|
|
98
|
+
control: 'select',
|
|
99
|
+
options: ['default', 'compact', 'full'],
|
|
100
|
+
description: 'Card display variant',
|
|
101
|
+
},
|
|
102
|
+
size: {
|
|
103
|
+
control: 'select',
|
|
104
|
+
options: ['sm', 'md', 'lg'],
|
|
105
|
+
description: 'Card size',
|
|
106
|
+
},
|
|
107
|
+
showBack: {
|
|
108
|
+
control: 'boolean',
|
|
109
|
+
description: 'Enable flip to show back side',
|
|
110
|
+
},
|
|
111
|
+
animated: {
|
|
112
|
+
control: 'boolean',
|
|
113
|
+
description: 'Enable animations and effects',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export default meta
|
|
119
|
+
type Story = StoryObj<typeof WakaPlayerCard>
|
|
120
|
+
|
|
121
|
+
export const Default: Story = {
|
|
122
|
+
args: {
|
|
123
|
+
player: samplePlayer,
|
|
124
|
+
variant: 'default',
|
|
125
|
+
size: 'md',
|
|
126
|
+
showStats: true,
|
|
127
|
+
showHolographic: true,
|
|
128
|
+
flippable: true,
|
|
129
|
+
animated: true,
|
|
130
|
+
},
|
|
131
|
+
render: (args) => <WakaPlayerCard {...args} />,
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export const Rarities: Story = {
|
|
135
|
+
render: () => (
|
|
136
|
+
<div className="flex flex-wrap gap-6 items-start">
|
|
137
|
+
{(['common', 'rare', 'epic', 'legendary', 'mythic'] as PlayerRarity[]).map((rarity) => (
|
|
138
|
+
<div key={rarity} className="text-center">
|
|
139
|
+
<p className="text-sm text-muted-foreground mb-2 capitalize">{rarity}</p>
|
|
140
|
+
<WakaPlayerCard player={playersByRarity[rarity]} size="sm" />
|
|
141
|
+
</div>
|
|
142
|
+
))}
|
|
143
|
+
</div>
|
|
144
|
+
),
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export const Variants: Story = {
|
|
148
|
+
render: () => (
|
|
149
|
+
<div className="space-y-8">
|
|
150
|
+
<div>
|
|
151
|
+
<p className="text-sm text-muted-foreground mb-2">Default (with flip)</p>
|
|
152
|
+
<WakaPlayerCard player={samplePlayer} showBack />
|
|
153
|
+
</div>
|
|
154
|
+
<div>
|
|
155
|
+
<p className="text-sm text-muted-foreground mb-2">Compact</p>
|
|
156
|
+
<div className="w-[350px]">
|
|
157
|
+
<WakaPlayerCard player={samplePlayer} variant="compact" />
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
<div>
|
|
161
|
+
<p className="text-sm text-muted-foreground mb-2">Full</p>
|
|
162
|
+
<div className="w-[400px]">
|
|
163
|
+
<WakaPlayerCard player={samplePlayer} variant="full" />
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
),
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export const Sizes: Story = {
|
|
171
|
+
render: () => (
|
|
172
|
+
<div className="flex flex-wrap gap-6 items-end">
|
|
173
|
+
<div className="text-center">
|
|
174
|
+
<p className="text-sm text-muted-foreground mb-2">Small</p>
|
|
175
|
+
<WakaPlayerCard player={samplePlayer} size="sm" />
|
|
176
|
+
</div>
|
|
177
|
+
<div className="text-center">
|
|
178
|
+
<p className="text-sm text-muted-foreground mb-2">Medium</p>
|
|
179
|
+
<WakaPlayerCard player={samplePlayer} size="md" />
|
|
180
|
+
</div>
|
|
181
|
+
<div className="text-center">
|
|
182
|
+
<p className="text-sm text-muted-foreground mb-2">Large</p>
|
|
183
|
+
<WakaPlayerCard player={samplePlayer} size="lg" />
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
),
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export const WithFlip: Story = {
|
|
190
|
+
render: () => (
|
|
191
|
+
<div className="space-y-4">
|
|
192
|
+
<p className="text-sm text-muted-foreground text-center">Click the card to flip it</p>
|
|
193
|
+
<div className="flex gap-6">
|
|
194
|
+
<WakaPlayerCard player={playersByRarity.epic} showBack />
|
|
195
|
+
<WakaPlayerCard player={playersByRarity.legendary} showBack />
|
|
196
|
+
<WakaPlayerCard player={playersByRarity.mythic} showBack />
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
),
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export const HolographicEffects: Story = {
|
|
203
|
+
render: () => (
|
|
204
|
+
<div className="space-y-4">
|
|
205
|
+
<p className="text-sm text-muted-foreground text-center">
|
|
206
|
+
Move your mouse over the legendary and mythic cards to see holographic effects
|
|
207
|
+
</p>
|
|
208
|
+
<div className="flex gap-6">
|
|
209
|
+
<WakaPlayerCard player={playersByRarity.legendary} />
|
|
210
|
+
<WakaPlayerCard player={playersByRarity.mythic} />
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
),
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export const Interactive: Story = {
|
|
217
|
+
render: () => {
|
|
218
|
+
const [selectedPlayer, setSelectedPlayer] = React.useState<Player | null>(null)
|
|
219
|
+
|
|
220
|
+
return (
|
|
221
|
+
<div className="space-y-6">
|
|
222
|
+
<div className="flex flex-wrap gap-4">
|
|
223
|
+
{Object.values(playersByRarity).map((player) => (
|
|
224
|
+
<WakaPlayerCard
|
|
225
|
+
key={player.id}
|
|
226
|
+
player={player}
|
|
227
|
+
size="sm"
|
|
228
|
+
onClick={() => setSelectedPlayer(player)}
|
|
229
|
+
/>
|
|
230
|
+
))}
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
{selectedPlayer && (
|
|
234
|
+
<div className="p-4 rounded-lg border bg-muted/30">
|
|
235
|
+
<h4 className="font-semibold mb-2">Selected Player</h4>
|
|
236
|
+
<div className="grid grid-cols-2 gap-2 text-sm">
|
|
237
|
+
<div>Name: {selectedPlayer.name}</div>
|
|
238
|
+
<div>Level: {selectedPlayer.level}</div>
|
|
239
|
+
<div>Rarity: {selectedPlayer.rarity}</div>
|
|
240
|
+
<div>Achievements: {selectedPlayer.achievements}</div>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
)}
|
|
244
|
+
</div>
|
|
245
|
+
)
|
|
246
|
+
},
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export const CompactCollection: Story = {
|
|
250
|
+
render: () => (
|
|
251
|
+
<div className="w-[500px] p-4 rounded-xl border bg-card">
|
|
252
|
+
<h3 className="font-semibold mb-4">My Collection</h3>
|
|
253
|
+
<div className="space-y-3">
|
|
254
|
+
{Object.values(playersByRarity).map((player) => (
|
|
255
|
+
<WakaPlayerCard
|
|
256
|
+
key={player.id}
|
|
257
|
+
player={player}
|
|
258
|
+
variant="compact"
|
|
259
|
+
/>
|
|
260
|
+
))}
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
),
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export const FullCardShowcase: Story = {
|
|
267
|
+
render: () => (
|
|
268
|
+
<div className="w-[450px]">
|
|
269
|
+
<WakaPlayerCard player={playersByRarity.mythic} variant="full" />
|
|
270
|
+
</div>
|
|
271
|
+
),
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export const TeamRoster: Story = {
|
|
275
|
+
render: () => (
|
|
276
|
+
<div className="w-[600px] p-6 rounded-xl border bg-gradient-to-br from-violet-500/10 to-purple-500/10">
|
|
277
|
+
<div className="flex items-center justify-between mb-6">
|
|
278
|
+
<div>
|
|
279
|
+
<h2 className="text-xl font-bold">Elite Squad</h2>
|
|
280
|
+
<p className="text-sm text-muted-foreground">5 Members • Power: 4,250</p>
|
|
281
|
+
</div>
|
|
282
|
+
<div className="flex items-center gap-2">
|
|
283
|
+
<Crown className="h-5 w-5 text-amber-500" />
|
|
284
|
+
<span className="font-semibold">Rank #12</span>
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
<div className="flex justify-center gap-4">
|
|
289
|
+
{[playersByRarity.mythic, playersByRarity.legendary, playersByRarity.epic].map((player) => (
|
|
290
|
+
<WakaPlayerCard key={player.id} player={player} size="sm" />
|
|
291
|
+
))}
|
|
292
|
+
</div>
|
|
293
|
+
|
|
294
|
+
<div className="mt-6 pt-4 border-t">
|
|
295
|
+
<div className="flex justify-between text-sm">
|
|
296
|
+
<span className="text-muted-foreground">Team Average Level</span>
|
|
297
|
+
<span className="font-medium">Level 59</span>
|
|
298
|
+
</div>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
),
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export const CustomBackContent: Story = {
|
|
305
|
+
render: () => (
|
|
306
|
+
<WakaPlayerCard
|
|
307
|
+
player={samplePlayer}
|
|
308
|
+
showBack
|
|
309
|
+
backContent={
|
|
310
|
+
<div className="h-full flex flex-col items-center justify-center p-4 text-center">
|
|
311
|
+
<Flame className="h-8 w-8 text-orange-500 mb-2" />
|
|
312
|
+
<h4 className="font-bold text-lg">Special Ability</h4>
|
|
313
|
+
<p className="text-sm text-muted-foreground mt-1">Dragon's Breath</p>
|
|
314
|
+
<p className="text-xs text-muted-foreground mt-2">
|
|
315
|
+
Deals 500% damage to all enemies in a cone
|
|
316
|
+
</p>
|
|
317
|
+
<div className="mt-4 px-3 py-1 rounded-full bg-orange-500/10 text-orange-500 text-xs font-medium">
|
|
318
|
+
5 Turn Cooldown
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
}
|
|
322
|
+
/>
|
|
323
|
+
),
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export const NoAnimation: Story = {
|
|
327
|
+
render: () => (
|
|
328
|
+
<div className="flex gap-6">
|
|
329
|
+
<WakaPlayerCard player={playersByRarity.legendary} animated={false} />
|
|
330
|
+
<WakaPlayerCard player={playersByRarity.mythic} animated={false} />
|
|
331
|
+
</div>
|
|
332
|
+
),
|
|
333
|
+
}
|