@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.
Files changed (194) hide show
  1. package/dist/blocks/dashboard/index.d.ts +4 -1
  2. package/dist/blocks/empty-states/index.d.ts +4 -1
  3. package/dist/blocks/error-pages/index.d.ts +4 -1
  4. package/dist/blocks/index.d.ts +1 -1
  5. package/dist/blocks/landing/index.d.ts +4 -1
  6. package/dist/blocks/pricing/index.d.ts +5 -1
  7. package/dist/blocks/sidebar/index.d.ts +5 -1
  8. package/dist/index.cjs.js +130 -130
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.es.js +7905 -7856
  11. package/dist/stories/Button.d.ts +14 -0
  12. package/dist/stories/Button.stories.d.ts +8 -0
  13. package/dist/stories/Header.d.ts +11 -0
  14. package/dist/stories/Header.stories.d.ts +6 -0
  15. package/dist/stories/Page.d.ts +2 -0
  16. package/dist/stories/Page.stories.d.ts +6 -0
  17. package/dist/types/index.d.ts +1 -0
  18. package/dist/types/link.d.ts +23 -0
  19. package/package.json +11 -3
  20. package/src/blocks/activity-timeline/ActivityTimeline.stories.tsx +460 -0
  21. package/src/blocks/apm-overview/APMOverview.stories.tsx +435 -0
  22. package/src/blocks/auth-2fa/Auth2FA.stories.tsx +308 -0
  23. package/src/blocks/calendar-view/CalendarView.stories.tsx +398 -0
  24. package/src/blocks/chat/Chat.stories.tsx +466 -0
  25. package/src/blocks/chat-interface/ChatInterface.stories.tsx +412 -0
  26. package/src/blocks/checkout-flow/CheckoutFlow.stories.tsx +408 -0
  27. package/src/blocks/cicd-builder/CICDBuilder.stories.tsx +499 -0
  28. package/src/blocks/cloud-cost-dashboard/CloudCostDashboard.stories.tsx +356 -0
  29. package/src/blocks/container-orchestrator/ContainerOrchestrator.stories.tsx +461 -0
  30. package/src/blocks/dashboard/Dashboard.stories.tsx +559 -0
  31. package/src/blocks/dashboard/index.tsx +68 -27
  32. package/src/blocks/dashboard-kpi/DashboardKPI.stories.tsx +422 -0
  33. package/src/blocks/database-admin/DatabaseAdmin.stories.tsx +393 -0
  34. package/src/blocks/deployment-dashboard/DeploymentDashboard.stories.tsx +457 -0
  35. package/src/blocks/empty-states/EmptyStates.stories.tsx +467 -0
  36. package/src/blocks/empty-states/index.tsx +26 -8
  37. package/src/blocks/error-pages/ErrorPages.stories.tsx +401 -0
  38. package/src/blocks/error-pages/index.tsx +26 -8
  39. package/src/blocks/faq/FAQ.stories.tsx +416 -0
  40. package/src/blocks/file-manager/FileManager.stories.tsx +413 -0
  41. package/src/blocks/footer/Footer.stories.tsx +328 -0
  42. package/src/blocks/gitops-sync-status/GitOpsSyncStatus.stories.tsx +529 -0
  43. package/src/blocks/header/WakaHeader.stories.tsx +455 -0
  44. package/src/blocks/headtab/Headtab.stories.tsx +369 -0
  45. package/src/blocks/i18n-editor/I18nEditor.stories.tsx +451 -0
  46. package/src/blocks/incident-manager/IncidentManager.stories.tsx +464 -0
  47. package/src/blocks/index.ts +1 -1
  48. package/src/blocks/infrastructure-map/InfrastructureMap.stories.tsx +533 -0
  49. package/src/blocks/kanban-board/KanbanBoard.stories.tsx +494 -0
  50. package/src/blocks/landing/WakaLanding.stories.tsx +449 -0
  51. package/src/blocks/landing/index.tsx +125 -66
  52. package/src/blocks/language-selector/LanguageSelector.stories.tsx +345 -0
  53. package/src/blocks/layout/Layout.stories.tsx +373 -0
  54. package/src/blocks/login/Login.stories.tsx +443 -0
  55. package/src/blocks/on-call-schedule/OnCallSchedule.stories.tsx +381 -0
  56. package/src/blocks/player-profile/PlayerProfile.stories.tsx +316 -0
  57. package/src/blocks/pricing/WakaPricing.stories.tsx +530 -0
  58. package/src/blocks/pricing/index.tsx +38 -4
  59. package/src/blocks/profile/Profile.stories.tsx +371 -0
  60. package/src/blocks/release-notes/ReleaseNotes.stories.tsx +431 -0
  61. package/src/blocks/settings/Settings.stories.tsx +520 -0
  62. package/src/blocks/sidebar/WakaSidebar.stories.tsx +513 -0
  63. package/src/blocks/sidebar/index.tsx +49 -20
  64. package/src/blocks/theme-creator-block/ThemeCreatorBlock.stories.tsx +370 -0
  65. package/src/blocks/user-management/UserManagement.stories.tsx +411 -0
  66. package/src/blocks/wizard/Wizard.stories.tsx +683 -0
  67. package/src/components/accordion/Accordion.stories.tsx +93 -0
  68. package/src/components/alert/Alert.stories.tsx +95 -0
  69. package/src/components/alert-dialog/AlertDialog.stories.tsx +126 -0
  70. package/src/components/aspect-ratio/AspectRatio.stories.tsx +118 -0
  71. package/src/components/avatar/Avatar.stories.tsx +104 -0
  72. package/src/components/button/Button.stories.tsx +12 -1
  73. package/src/components/calendar/Calendar.stories.tsx +102 -0
  74. package/src/components/card/Card.stories.tsx +125 -0
  75. package/src/components/checkbox/Checkbox.stories.tsx +100 -0
  76. package/src/components/code/Code.stories.tsx +402 -0
  77. package/src/components/collapsible/Collapsible.stories.tsx +123 -0
  78. package/src/components/command/Command.stories.tsx +207 -0
  79. package/src/components/context-menu/ContextMenu.stories.tsx +220 -0
  80. package/src/components/dialog/Dialog.stories.tsx +157 -0
  81. package/src/components/dropdown-menu/DropdownMenu.stories.tsx +225 -0
  82. package/src/components/form/Form.stories.tsx +413 -0
  83. package/src/components/hover-card/HoverCard.stories.tsx +148 -0
  84. package/src/components/input-otp/InputOTP.stories.tsx +255 -0
  85. package/src/components/label/Label.stories.tsx +68 -0
  86. package/src/components/menubar/Menubar.stories.tsx +278 -0
  87. package/src/components/navigation-menu/NavigationMenu.stories.tsx +202 -0
  88. package/src/components/popover/Popover.stories.tsx +199 -0
  89. package/src/components/progress/Progress.stories.tsx +104 -0
  90. package/src/components/radio-group/RadioGroup.stories.tsx +138 -0
  91. package/src/components/scroll-area/ScrollArea.stories.tsx +153 -0
  92. package/src/components/select/Select.stories.tsx +146 -0
  93. package/src/components/separator/Separator.stories.tsx +117 -0
  94. package/src/components/sheet/Sheet.stories.tsx +195 -0
  95. package/src/components/skeleton/Skeleton.stories.tsx +114 -0
  96. package/src/components/slider/Slider.stories.tsx +157 -0
  97. package/src/components/switch/Switch.stories.tsx +114 -0
  98. package/src/components/table/Table.stories.tsx +153 -0
  99. package/src/components/tabs/Tabs.stories.tsx +155 -0
  100. package/src/components/textarea/Textarea.stories.tsx +116 -0
  101. package/src/components/toast/Toast.stories.tsx +160 -0
  102. package/src/components/toggle/Toggle.stories.tsx +125 -0
  103. package/src/components/tooltip/Tooltip.stories.tsx +133 -0
  104. package/src/components/typography/Typography.stories.tsx +207 -0
  105. package/src/components/waka-3d-pie-chart/Waka3DPieChart.stories.tsx +308 -0
  106. package/src/components/waka-achievement-unlock/WakaAchievementUnlock.stories.tsx +353 -0
  107. package/src/components/waka-artifact-list/WakaArtifactList.stories.tsx +258 -0
  108. package/src/components/waka-autocomplete/WakaAutocomplete.stories.tsx +224 -0
  109. package/src/components/waka-badge-showcase/WakaBadgeShowcase.stories.tsx +269 -0
  110. package/src/components/waka-barcode/WakaBarcode.stories.tsx +227 -0
  111. package/src/components/waka-bottom-sheet/WakaBottomSheet.stories.tsx +408 -0
  112. package/src/components/waka-breadcrumb/WakaBreadcrumb.stories.tsx +237 -0
  113. package/src/components/waka-build-matrix/WakaBuildMatrix.stories.tsx +328 -0
  114. package/src/components/waka-carousel/WakaCarousel.stories.tsx +296 -0
  115. package/src/components/waka-charts/WakaCharts.stories.tsx +519 -0
  116. package/src/components/waka-color-picker/WakaColorPicker.stories.tsx +200 -0
  117. package/src/components/waka-combobox/WakaCombobox.stories.tsx +250 -0
  118. package/src/components/waka-container-list/WakaContainerList.stories.tsx +315 -0
  119. package/src/components/waka-contribution-graph/WakaContributionGraph.stories.tsx +354 -0
  120. package/src/components/waka-cost-breakdown/WakaCostBreakdown.stories.tsx +348 -0
  121. package/src/components/waka-daily-reward/WakaDailyReward.stories.tsx +365 -0
  122. package/src/components/waka-database-card/WakaDatabaseCard.stories.tsx +306 -0
  123. package/src/components/waka-date-range-picker/WakaDateRangePicker.stories.tsx +339 -0
  124. package/src/components/waka-datetime-picker/WakaDateTimePicker.stories.tsx +317 -0
  125. package/src/components/waka-deployment-lane/WakaDeploymentLane.stories.tsx +292 -0
  126. package/src/components/waka-dock/WakaDock.stories.tsx +332 -0
  127. package/src/components/waka-drawer/WakaDrawer.stories.tsx +437 -0
  128. package/src/components/waka-env-var-editor/WakaEnvVarEditor.stories.tsx +263 -0
  129. package/src/components/waka-error-shake/WakaErrorShake.stories.tsx +410 -0
  130. package/src/components/waka-file-upload/WakaFileUpload.stories.tsx +239 -0
  131. package/src/components/waka-flow-diagram/WakaFlowDiagram.stories.tsx +365 -0
  132. package/src/components/waka-funnel-chart/WakaFunnelChart.stories.tsx +281 -0
  133. package/src/components/waka-glow-card/WakaGlowCard.stories.tsx +274 -0
  134. package/src/components/waka-haptic-button/WakaHapticButton.stories.tsx +349 -0
  135. package/src/components/waka-health-pulse/WakaHealthPulse.stories.tsx +293 -0
  136. package/src/components/waka-heatmap/WakaHeatmap.stories.tsx +376 -0
  137. package/src/components/waka-image/WakaImage.stories.tsx +255 -0
  138. package/src/components/waka-incident-timeline/WakaIncidentTimeline.stories.tsx +300 -0
  139. package/src/components/waka-kanban/WakaKanban.stories.tsx +399 -0
  140. package/src/components/waka-kubernetes-overview/WakaKubernetesOverview.stories.tsx +281 -0
  141. package/src/components/waka-leaderboard/WakaLeaderboard.stories.tsx +300 -0
  142. package/src/components/waka-level-progress/WakaLevelProgress.stories.tsx +313 -0
  143. package/src/components/waka-loading-orbit/WakaLoadingOrbit.stories.tsx +413 -0
  144. package/src/components/waka-log-viewer/WakaLogViewer.stories.tsx +312 -0
  145. package/src/components/waka-loot-box/WakaLootBox.stories.tsx +374 -0
  146. package/src/components/waka-metric-sparkline/WakaMetricSparkline.stories.tsx +312 -0
  147. package/src/components/waka-migration-list/WakaMigrationList.stories.tsx +289 -0
  148. package/src/components/waka-modal/WakaModal.stories.tsx +434 -0
  149. package/src/components/waka-morph-button/WakaMorphButton.stories.tsx +405 -0
  150. package/src/components/waka-network-topology/WakaNetworkTopology.stories.tsx +364 -0
  151. package/src/components/waka-notifications/WakaNotifications.stories.tsx +290 -0
  152. package/src/components/waka-number-input/WakaNumberInput.stories.tsx +282 -0
  153. package/src/components/waka-pagination/WakaPagination.stories.tsx +328 -0
  154. package/src/components/waka-password-strength/WakaPasswordStrength.stories.tsx +318 -0
  155. package/src/components/waka-pipeline-view/WakaPipelineView.stories.tsx +386 -0
  156. package/src/components/waka-player-card/WakaPlayerCard.stories.tsx +333 -0
  157. package/src/components/waka-pod-card/WakaPodCard.stories.tsx +435 -0
  158. package/src/components/waka-qrcode/WakaQRCode.stories.tsx +232 -0
  159. package/src/components/waka-query-explain/WakaQueryExplain.stories.tsx +407 -0
  160. package/src/components/waka-quest-card/WakaQuestCard.stories.tsx +394 -0
  161. package/src/components/waka-quota-bar/WakaQuotaBar.stories.tsx +435 -0
  162. package/src/components/waka-radar-score/WakaRadarScore.stories.tsx +372 -0
  163. package/src/components/waka-resource-gauge/WakaResourceGauge.stories.tsx +366 -0
  164. package/src/components/waka-rich-text-editor/WakaRichTextEditor.stories.tsx +238 -0
  165. package/src/components/waka-sankey-diagram/WakaSankeyDiagram.stories.tsx +389 -0
  166. package/src/components/waka-scratch-card/WakaScratchCard.stories.tsx +388 -0
  167. package/src/components/waka-secret-card/WakaSecretCard.stories.tsx +314 -0
  168. package/src/components/waka-segmented-control/WakaSegmentedControl.stories.tsx +309 -0
  169. package/src/components/waka-server-rack/WakaServerRack.stories.tsx +382 -0
  170. package/src/components/waka-service-graph/WakaServiceGraph.stories.tsx +262 -0
  171. package/src/components/waka-skeleton-wave/WakaSkeletonWave.stories.tsx +321 -0
  172. package/src/components/waka-skill-tree/WakaSkillTree.stories.tsx +308 -0
  173. package/src/components/waka-spin-wheel/WakaSpinWheel.stories.tsx +368 -0
  174. package/src/components/waka-spinner/WakaSpinner.stories.tsx +156 -0
  175. package/src/components/waka-stat/WakaStat.stories.tsx +334 -0
  176. package/src/components/waka-status-matrix/WakaStatusMatrix.stories.tsx +331 -0
  177. package/src/components/waka-stepper/WakaStepper.stories.tsx +468 -0
  178. package/src/components/waka-streak-counter/WakaStreakCounter.stories.tsx +235 -0
  179. package/src/components/waka-success-explosion/WakaSuccessExplosion.stories.tsx +389 -0
  180. package/src/components/waka-tabs-morph/WakaTabsMorph.stories.tsx +471 -0
  181. package/src/components/waka-terminal-output/WakaTerminalOutput.stories.tsx +351 -0
  182. package/src/components/waka-test-report/WakaTestReport.stories.tsx +322 -0
  183. package/src/components/waka-tilt-card/WakaTiltCard.stories.tsx +300 -0
  184. package/src/components/waka-time-picker/WakaTimePicker.stories.tsx +227 -0
  185. package/src/components/waka-timeline/WakaTimeline.stories.tsx +383 -0
  186. package/src/components/waka-tournament-bracket/WakaTournamentBracket.stories.tsx +375 -0
  187. package/src/components/waka-trace-viewer/WakaTraceViewer.stories.tsx +445 -0
  188. package/src/components/waka-tree/WakaTree.stories.tsx +359 -0
  189. package/src/components/waka-treemap-chart/WakaTreemapChart.stories.tsx +378 -0
  190. package/src/components/waka-typewriter/WakaTypewriter.stories.tsx +366 -0
  191. package/src/components/waka-versus-card/WakaVersusCard.stories.tsx +530 -0
  192. package/src/components/waka-video/WakaVideo.stories.tsx +203 -0
  193. package/src/components/waka-virtual-list/WakaVirtualList.stories.tsx +273 -0
  194. package/src/components/waka-xp-bar/WakaXPBar.stories.tsx +305 -0
@@ -0,0 +1,519 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+ import { WakaBarChart } from './WakaBarChart'
3
+ import { WakaLineChart } from './WakaLineChart'
4
+ import { WakaAreaChart } from './WakaAreaChart'
5
+ import { WakaPieChart } from './WakaPieChart'
6
+ import { WakaSparkline } from './WakaSparkline'
7
+ import * as React from 'react'
8
+
9
+ // Sample data
10
+ const barData = [
11
+ { name: 'Jan', value: 400, sales: 240, profit: 160 },
12
+ { name: 'Feb', value: 300, sales: 139, profit: 221 },
13
+ { name: 'Mar', value: 200, sales: 980, profit: 290 },
14
+ { name: 'Apr', value: 278, sales: 390, profit: 200 },
15
+ { name: 'May', value: 189, sales: 480, profit: 181 },
16
+ { name: 'Jun', value: 239, sales: 380, profit: 250 },
17
+ ]
18
+
19
+ const lineData = [
20
+ { name: 'Mon', users: 4000, sessions: 2400, pageviews: 2400 },
21
+ { name: 'Tue', users: 3000, sessions: 1398, pageviews: 2210 },
22
+ { name: 'Wed', users: 2000, sessions: 9800, pageviews: 2290 },
23
+ { name: 'Thu', users: 2780, sessions: 3908, pageviews: 2000 },
24
+ { name: 'Fri', users: 1890, sessions: 4800, pageviews: 2181 },
25
+ { name: 'Sat', users: 2390, sessions: 3800, pageviews: 2500 },
26
+ { name: 'Sun', users: 3490, sessions: 4300, pageviews: 2100 },
27
+ ]
28
+
29
+ const pieData = [
30
+ { name: 'Chrome', value: 45 },
31
+ { name: 'Firefox', value: 20 },
32
+ { name: 'Safari', value: 15 },
33
+ { name: 'Edge', value: 12 },
34
+ { name: 'Other', value: 8 },
35
+ ]
36
+
37
+ const sparklineData = [12, 19, 3, 5, 2, 3, 15, 20, 25, 18, 12, 8]
38
+
39
+ const meta: Meta = {
40
+ title: 'Components/Charts/WakaCharts',
41
+ parameters: {
42
+ layout: 'centered',
43
+ docs: {
44
+ description: {
45
+ component: 'A comprehensive charting library built on Recharts with Bar, Line, Area, Pie and Sparkline charts.',
46
+ },
47
+ },
48
+ },
49
+ tags: ['autodocs'],
50
+ }
51
+
52
+ export default meta
53
+
54
+ // =============================================
55
+ // Bar Chart Stories
56
+ // =============================================
57
+
58
+ export const BarChartDefault: StoryObj = {
59
+ render: () => (
60
+ <div className="w-[600px]">
61
+ <WakaBarChart
62
+ data={barData}
63
+ dataKeys={['value']}
64
+ title="Monthly Revenue"
65
+ description="Revenue by month"
66
+ />
67
+ </div>
68
+ ),
69
+ }
70
+
71
+ export const BarChartMultiSeries: StoryObj = {
72
+ render: () => (
73
+ <div className="w-[600px]">
74
+ <WakaBarChart
75
+ data={barData}
76
+ dataKeys={['sales', 'profit']}
77
+ title="Sales vs Profit"
78
+ legend
79
+ tooltip
80
+ />
81
+ </div>
82
+ ),
83
+ }
84
+
85
+ export const BarChartStacked: StoryObj = {
86
+ render: () => (
87
+ <div className="w-[600px]">
88
+ <WakaBarChart
89
+ data={barData}
90
+ dataKeys={['sales', 'profit']}
91
+ stacked
92
+ title="Stacked Revenue"
93
+ legend
94
+ />
95
+ </div>
96
+ ),
97
+ }
98
+
99
+ export const BarChartSizes: StoryObj = {
100
+ render: () => (
101
+ <div className="space-y-8">
102
+ <div className="w-[500px]">
103
+ <WakaBarChart data={barData} dataKeys={['value']} size="sm" title="Small" />
104
+ </div>
105
+ <div className="w-[500px]">
106
+ <WakaBarChart data={barData} dataKeys={['value']} size="md" title="Medium" />
107
+ </div>
108
+ <div className="w-[500px]">
109
+ <WakaBarChart data={barData} dataKeys={['value']} size="lg" title="Large" />
110
+ </div>
111
+ </div>
112
+ ),
113
+ }
114
+
115
+ // =============================================
116
+ // Line Chart Stories
117
+ // =============================================
118
+
119
+ export const LineChartDefault: StoryObj = {
120
+ render: () => (
121
+ <div className="w-[600px]">
122
+ <WakaLineChart
123
+ data={lineData}
124
+ dataKeys={['users']}
125
+ title="Weekly Users"
126
+ description="Active users over the week"
127
+ />
128
+ </div>
129
+ ),
130
+ }
131
+
132
+ export const LineChartMultiSeries: StoryObj = {
133
+ render: () => (
134
+ <div className="w-[600px]">
135
+ <WakaLineChart
136
+ data={lineData}
137
+ dataKeys={['users', 'sessions', 'pageviews']}
138
+ title="Website Analytics"
139
+ legend
140
+ tooltip
141
+ />
142
+ </div>
143
+ ),
144
+ }
145
+
146
+ export const LineChartCurves: StoryObj = {
147
+ render: () => (
148
+ <div className="space-y-8">
149
+ <div className="w-[500px]">
150
+ <WakaLineChart
151
+ data={lineData}
152
+ dataKeys={['users']}
153
+ curve="monotone"
154
+ title="Monotone (Smooth)"
155
+ />
156
+ </div>
157
+ <div className="w-[500px]">
158
+ <WakaLineChart
159
+ data={lineData}
160
+ dataKeys={['users']}
161
+ curve="linear"
162
+ title="Linear"
163
+ />
164
+ </div>
165
+ <div className="w-[500px]">
166
+ <WakaLineChart
167
+ data={lineData}
168
+ dataKeys={['users']}
169
+ curve="step"
170
+ title="Step"
171
+ />
172
+ </div>
173
+ </div>
174
+ ),
175
+ }
176
+
177
+ export const LineChartDots: StoryObj = {
178
+ render: () => (
179
+ <div className="flex gap-8">
180
+ <div className="w-[400px]">
181
+ <WakaLineChart
182
+ data={lineData}
183
+ dataKeys={['users']}
184
+ dots
185
+ dotSize={4}
186
+ title="With Dots"
187
+ />
188
+ </div>
189
+ <div className="w-[400px]">
190
+ <WakaLineChart
191
+ data={lineData}
192
+ dataKeys={['users']}
193
+ dots={false}
194
+ title="Without Dots"
195
+ />
196
+ </div>
197
+ </div>
198
+ ),
199
+ }
200
+
201
+ // =============================================
202
+ // Area Chart Stories
203
+ // =============================================
204
+
205
+ export const AreaChartDefault: StoryObj = {
206
+ render: () => (
207
+ <div className="w-[600px]">
208
+ <WakaAreaChart
209
+ data={lineData}
210
+ dataKeys={['users']}
211
+ title="Weekly Traffic"
212
+ description="User traffic with area fill"
213
+ />
214
+ </div>
215
+ ),
216
+ }
217
+
218
+ export const AreaChartStacked: StoryObj = {
219
+ render: () => (
220
+ <div className="w-[600px]">
221
+ <WakaAreaChart
222
+ data={lineData}
223
+ dataKeys={['users', 'sessions']}
224
+ stacked
225
+ title="Stacked Area"
226
+ legend
227
+ />
228
+ </div>
229
+ ),
230
+ }
231
+
232
+ export const AreaChartGradient: StoryObj = {
233
+ render: () => (
234
+ <div className="flex gap-8">
235
+ <div className="w-[400px]">
236
+ <WakaAreaChart
237
+ data={lineData}
238
+ dataKeys={['users']}
239
+ gradientDirection="vertical"
240
+ title="Vertical Gradient"
241
+ />
242
+ </div>
243
+ <div className="w-[400px]">
244
+ <WakaAreaChart
245
+ data={lineData}
246
+ dataKeys={['users']}
247
+ gradientDirection="horizontal"
248
+ title="Horizontal Gradient"
249
+ />
250
+ </div>
251
+ </div>
252
+ ),
253
+ }
254
+
255
+ export const AreaChartFillOpacity: StoryObj = {
256
+ render: () => (
257
+ <div className="space-y-8">
258
+ <div className="w-[500px]">
259
+ <WakaAreaChart
260
+ data={lineData}
261
+ dataKeys={['users']}
262
+ fillOpacity={0.1}
263
+ title="Light Fill (10%)"
264
+ />
265
+ </div>
266
+ <div className="w-[500px]">
267
+ <WakaAreaChart
268
+ data={lineData}
269
+ dataKeys={['users']}
270
+ fillOpacity={0.5}
271
+ title="Medium Fill (50%)"
272
+ />
273
+ </div>
274
+ <div className="w-[500px]">
275
+ <WakaAreaChart
276
+ data={lineData}
277
+ dataKeys={['users']}
278
+ fillOpacity={0.8}
279
+ title="Heavy Fill (80%)"
280
+ />
281
+ </div>
282
+ </div>
283
+ ),
284
+ }
285
+
286
+ // =============================================
287
+ // Pie Chart Stories
288
+ // =============================================
289
+
290
+ export const PieChartDefault: StoryObj = {
291
+ render: () => (
292
+ <div className="w-[400px]">
293
+ <WakaPieChart
294
+ data={pieData}
295
+ title="Browser Share"
296
+ description="Market share by browser"
297
+ />
298
+ </div>
299
+ ),
300
+ }
301
+
302
+ export const PieChartDonut: StoryObj = {
303
+ render: () => (
304
+ <div className="flex gap-8">
305
+ <div className="w-[300px]">
306
+ <WakaPieChart data={pieData} innerRadius={0} title="Pie" />
307
+ </div>
308
+ <div className="w-[300px]">
309
+ <WakaPieChart data={pieData} innerRadius="50%" title="Donut" />
310
+ </div>
311
+ </div>
312
+ ),
313
+ }
314
+
315
+ export const PieChartLabels: StoryObj = {
316
+ render: () => (
317
+ <div className="space-y-8">
318
+ <div className="w-[400px]">
319
+ <WakaPieChart data={pieData} label="percent" title="With Percent Labels" />
320
+ </div>
321
+ <div className="w-[400px]">
322
+ <WakaPieChart data={pieData} label="value" title="With Value Labels" />
323
+ </div>
324
+ <div className="w-[400px]">
325
+ <WakaPieChart data={pieData} label="name" title="With Name Labels" />
326
+ </div>
327
+ </div>
328
+ ),
329
+ }
330
+
331
+ export const PieChartSizes: StoryObj = {
332
+ render: () => (
333
+ <div className="flex items-center gap-8">
334
+ <WakaPieChart data={pieData} size="sm" title="Small" />
335
+ <WakaPieChart data={pieData} size="md" title="Medium" />
336
+ <WakaPieChart data={pieData} size="lg" title="Large" />
337
+ </div>
338
+ ),
339
+ }
340
+
341
+ // =============================================
342
+ // Sparkline Stories
343
+ // =============================================
344
+
345
+ export const SparklineDefault: StoryObj = {
346
+ render: () => (
347
+ <div className="space-y-4">
348
+ <div className="flex items-center gap-4">
349
+ <span className="text-sm text-muted-foreground w-24">Line:</span>
350
+ <WakaSparkline data={sparklineData} type="line" />
351
+ </div>
352
+ <div className="flex items-center gap-4">
353
+ <span className="text-sm text-muted-foreground w-24">Area:</span>
354
+ <WakaSparkline data={sparklineData} type="area" />
355
+ </div>
356
+ <div className="flex items-center gap-4">
357
+ <span className="text-sm text-muted-foreground w-24">Bar:</span>
358
+ <WakaSparkline data={sparklineData} type="bar" />
359
+ </div>
360
+ </div>
361
+ ),
362
+ }
363
+
364
+ export const SparklineSizes: StoryObj = {
365
+ render: () => (
366
+ <div className="space-y-4">
367
+ <div className="flex items-center gap-4">
368
+ <WakaSparkline data={sparklineData} width={80} height={20} />
369
+ <span className="text-sm text-muted-foreground">80x20</span>
370
+ </div>
371
+ <div className="flex items-center gap-4">
372
+ <WakaSparkline data={sparklineData} width={120} height={30} />
373
+ <span className="text-sm text-muted-foreground">120x30</span>
374
+ </div>
375
+ <div className="flex items-center gap-4">
376
+ <WakaSparkline data={sparklineData} width={200} height={50} />
377
+ <span className="text-sm text-muted-foreground">200x50</span>
378
+ </div>
379
+ </div>
380
+ ),
381
+ }
382
+
383
+ export const SparklineColors: StoryObj = {
384
+ render: () => (
385
+ <div className="space-y-4">
386
+ <div className="flex items-center gap-4">
387
+ <WakaSparkline data={sparklineData} color="#22c55e" type="area" />
388
+ <span className="text-sm text-muted-foreground">Green</span>
389
+ </div>
390
+ <div className="flex items-center gap-4">
391
+ <WakaSparkline data={sparklineData} color="#3b82f6" type="area" />
392
+ <span className="text-sm text-muted-foreground">Blue</span>
393
+ </div>
394
+ <div className="flex items-center gap-4">
395
+ <WakaSparkline data={sparklineData} color="#ef4444" type="area" />
396
+ <span className="text-sm text-muted-foreground">Red</span>
397
+ </div>
398
+ </div>
399
+ ),
400
+ }
401
+
402
+ export const SparklineWithMetrics: StoryObj = {
403
+ render: () => (
404
+ <div className="space-y-4">
405
+ <div className="flex items-center gap-4">
406
+ <WakaSparkline data={sparklineData} showValue />
407
+ <span className="text-sm text-muted-foreground">With value</span>
408
+ </div>
409
+ <div className="flex items-center gap-4">
410
+ <WakaSparkline data={sparklineData} showMinMax />
411
+ <span className="text-sm text-muted-foreground">With min/max</span>
412
+ </div>
413
+ <div className="flex items-center gap-4">
414
+ <WakaSparkline data={sparklineData} showValue showMinMax />
415
+ <span className="text-sm text-muted-foreground">Both</span>
416
+ </div>
417
+ </div>
418
+ ),
419
+ }
420
+
421
+ export const SparklineInTable: StoryObj = {
422
+ render: () => (
423
+ <table className="w-[500px] text-sm">
424
+ <thead>
425
+ <tr className="border-b">
426
+ <th className="text-left p-2">Metric</th>
427
+ <th className="text-left p-2">Trend</th>
428
+ <th className="text-right p-2">Value</th>
429
+ </tr>
430
+ </thead>
431
+ <tbody>
432
+ <tr className="border-b">
433
+ <td className="p-2">Users</td>
434
+ <td className="p-2">
435
+ <WakaSparkline data={[12, 19, 3, 5, 2, 3, 15, 20]} color="#22c55e" />
436
+ </td>
437
+ <td className="text-right p-2 font-medium">2,450</td>
438
+ </tr>
439
+ <tr className="border-b">
440
+ <td className="p-2">Revenue</td>
441
+ <td className="p-2">
442
+ <WakaSparkline data={[8, 12, 15, 14, 18, 22, 25, 28]} color="#3b82f6" />
443
+ </td>
444
+ <td className="text-right p-2 font-medium">$45.2k</td>
445
+ </tr>
446
+ <tr className="border-b">
447
+ <td className="p-2">Errors</td>
448
+ <td className="p-2">
449
+ <WakaSparkline data={[25, 20, 18, 15, 12, 8, 5, 3]} color="#ef4444" />
450
+ </td>
451
+ <td className="text-right p-2 font-medium">23</td>
452
+ </tr>
453
+ </tbody>
454
+ </table>
455
+ ),
456
+ }
457
+
458
+ // =============================================
459
+ // Combined / Dashboard Example
460
+ // =============================================
461
+
462
+ export const DashboardExample: StoryObj = {
463
+ render: () => (
464
+ <div className="w-[900px] space-y-8 p-6 border rounded-lg">
465
+ <h2 className="text-2xl font-bold">Analytics Dashboard</h2>
466
+
467
+ {/* KPI Row */}
468
+ <div className="grid grid-cols-4 gap-4">
469
+ {[
470
+ { label: 'Users', value: '2,450', trend: [12, 19, 15, 25, 22, 30], color: '#22c55e' },
471
+ { label: 'Revenue', value: '$45.2k', trend: [8, 12, 15, 14, 18, 22], color: '#3b82f6' },
472
+ { label: 'Orders', value: '1,234', trend: [5, 8, 12, 10, 15, 18], color: '#8b5cf6' },
473
+ { label: 'Conversion', value: '3.2%', trend: [2, 3, 2.5, 3.5, 4, 3.8], color: '#f59e0b' },
474
+ ].map((kpi) => (
475
+ <div key={kpi.label} className="p-4 border rounded-lg">
476
+ <p className="text-sm text-muted-foreground">{kpi.label}</p>
477
+ <p className="text-2xl font-bold">{kpi.value}</p>
478
+ <WakaSparkline data={kpi.trend} color={kpi.color} type="area" width={120} height={30} />
479
+ </div>
480
+ ))}
481
+ </div>
482
+
483
+ {/* Charts Row */}
484
+ <div className="grid grid-cols-2 gap-6">
485
+ <WakaAreaChart
486
+ data={lineData}
487
+ dataKeys={['users', 'sessions']}
488
+ title="Traffic Overview"
489
+ legend
490
+ size="md"
491
+ />
492
+ <WakaBarChart
493
+ data={barData}
494
+ dataKeys={['sales', 'profit']}
495
+ title="Revenue Breakdown"
496
+ legend
497
+ size="md"
498
+ />
499
+ </div>
500
+
501
+ {/* Bottom Row */}
502
+ <div className="grid grid-cols-3 gap-6">
503
+ <WakaPieChart
504
+ data={pieData}
505
+ title="Browser Distribution"
506
+ size="sm"
507
+ />
508
+ <div className="col-span-2">
509
+ <WakaLineChart
510
+ data={lineData}
511
+ dataKeys={['pageviews']}
512
+ title="Page Views Trend"
513
+ size="sm"
514
+ />
515
+ </div>
516
+ </div>
517
+ </div>
518
+ ),
519
+ }