@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,443 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+ import { Login } from './index'
3
+ import type { LoginConfig, LoginFormData } from './index'
4
+ import * as React from 'react'
5
+
6
+ const meta: Meta<typeof Login> = {
7
+ title: 'Blocks/Login',
8
+ component: Login,
9
+ parameters: {
10
+ layout: 'fullscreen',
11
+ docs: {
12
+ description: {
13
+ component:
14
+ 'A login form component with email/password authentication, SSO options (Google, Microsoft, Apple, GitHub, etc.), remember me, forgot password, and customizable branding.',
15
+ },
16
+ },
17
+ },
18
+ tags: ['autodocs'],
19
+ argTypes: {
20
+ showSocialLogin: {
21
+ control: 'boolean',
22
+ description: 'Show social login buttons (legacy mode)',
23
+ },
24
+ },
25
+ }
26
+
27
+ export default meta
28
+ type Story = StoryObj<typeof Login>
29
+
30
+ export const Default: Story = {
31
+ render: () => (
32
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
33
+ <Login
34
+ onSubmit={(data) => console.log('Login:', data)}
35
+ onForgotPassword={() => console.log('Forgot password')}
36
+ onSignUp={() => console.log('Sign up')}
37
+ />
38
+ </div>
39
+ ),
40
+ }
41
+
42
+ export const WithSocialLogin: Story = {
43
+ render: () => (
44
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
45
+ <Login
46
+ showSocialLogin
47
+ onSubmit={(data) => console.log('Login:', data)}
48
+ onForgotPassword={() => console.log('Forgot password')}
49
+ onSignUp={() => console.log('Sign up')}
50
+ onSSOGoogle={() => console.log('Google SSO')}
51
+ onSSOGithub={() => console.log('GitHub SSO')}
52
+ />
53
+ </div>
54
+ ),
55
+ }
56
+
57
+ export const WithConfig: Story = {
58
+ render: () => {
59
+ const config: LoginConfig = {
60
+ color_json: {
61
+ primary: '#6366f1',
62
+ secondary: '#ffffff',
63
+ accent: '#818cf8',
64
+ },
65
+ theme_json: {
66
+ name: 'MyApp',
67
+ dark_mode: false,
68
+ },
69
+ assets: {
70
+ theme_logo_light: 'https://placehold.co/120x40/6366f1/white?text=MyApp',
71
+ theme_logo_dark: 'https://placehold.co/120x40/white/6366f1?text=MyApp',
72
+ },
73
+ waka_powered: true,
74
+ lang_code: 'fr_FR',
75
+ signup_options: {
76
+ allow_login: true,
77
+ allow_sso_google: true,
78
+ allow_sso_github: true,
79
+ allow_sso_microsoft: false,
80
+ allow_sso_apple: false,
81
+ allow_sso_linkedIn: false,
82
+ allow_sso_facebook: false,
83
+ allow_sso_instagram: false,
84
+ allow_sso_france_connect: false,
85
+ allow_mfa: false,
86
+ },
87
+ }
88
+
89
+ return (
90
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
91
+ <Login
92
+ config={config}
93
+ onSubmit={(data) => console.log('Login:', data)}
94
+ onForgotPassword={() => console.log('Forgot password')}
95
+ onSignUp={() => console.log('Sign up')}
96
+ onSSOGoogle={() => console.log('Google SSO')}
97
+ onSSOGithub={() => console.log('GitHub SSO')}
98
+ />
99
+ </div>
100
+ )
101
+ },
102
+ }
103
+
104
+ export const AllSSOProviders: Story = {
105
+ render: () => {
106
+ const config: LoginConfig = {
107
+ signup_options: {
108
+ allow_login: true,
109
+ allow_sso_google: true,
110
+ allow_sso_github: true,
111
+ allow_sso_microsoft: true,
112
+ allow_sso_apple: true,
113
+ allow_sso_linkedIn: true,
114
+ allow_sso_facebook: true,
115
+ allow_sso_instagram: false,
116
+ allow_sso_france_connect: false,
117
+ allow_mfa: false,
118
+ },
119
+ }
120
+
121
+ return (
122
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
123
+ <Login
124
+ config={config}
125
+ onSubmit={(data) => console.log('Login:', data)}
126
+ onSSOGoogle={() => console.log('Google')}
127
+ onSSOGithub={() => console.log('GitHub')}
128
+ onSSOMicrosoft={() => console.log('Microsoft')}
129
+ onSSOApple={() => console.log('Apple')}
130
+ onSSOLinkedIn={() => console.log('LinkedIn')}
131
+ onSSOFacebook={() => console.log('Facebook')}
132
+ />
133
+ </div>
134
+ )
135
+ },
136
+ }
137
+
138
+ export const SSOOnly: Story = {
139
+ render: () => {
140
+ const config: LoginConfig = {
141
+ signup_options: {
142
+ allow_login: false,
143
+ allow_sso_google: true,
144
+ allow_sso_microsoft: true,
145
+ allow_sso_github: false,
146
+ allow_sso_apple: false,
147
+ allow_sso_linkedIn: false,
148
+ allow_sso_facebook: false,
149
+ allow_sso_instagram: false,
150
+ allow_sso_france_connect: false,
151
+ allow_mfa: false,
152
+ },
153
+ }
154
+
155
+ return (
156
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
157
+ <Login
158
+ config={config}
159
+ onSSOGoogle={() => console.log('Google')}
160
+ onSSOMicrosoft={() => console.log('Microsoft')}
161
+ />
162
+ </div>
163
+ )
164
+ },
165
+ }
166
+
167
+ export const WithCustomLogo: Story = {
168
+ render: () => {
169
+ const config: LoginConfig = {
170
+ theme_json: {
171
+ name: 'Acme Inc',
172
+ dark_mode: false,
173
+ },
174
+ assets: {
175
+ theme_logo_light: 'https://placehold.co/160x50/1f2937/white?text=ACME+INC',
176
+ theme_logo_dark: 'https://placehold.co/160x50/f3f4f6/1f2937?text=ACME+INC',
177
+ },
178
+ signup_options: {
179
+ allow_login: true,
180
+ allow_sso_google: true,
181
+ allow_sso_github: false,
182
+ allow_sso_microsoft: false,
183
+ allow_sso_apple: false,
184
+ allow_sso_linkedIn: false,
185
+ allow_sso_facebook: false,
186
+ allow_sso_instagram: false,
187
+ allow_sso_france_connect: false,
188
+ allow_mfa: false,
189
+ },
190
+ }
191
+
192
+ return (
193
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
194
+ <Login
195
+ config={config}
196
+ onSubmit={(data) => console.log('Login:', data)}
197
+ onForgotPassword={() => console.log('Forgot password')}
198
+ onSignUp={() => console.log('Sign up')}
199
+ onSSOGoogle={() => console.log('Google')}
200
+ />
201
+ </div>
202
+ )
203
+ },
204
+ }
205
+
206
+ export const WithCustomColors: Story = {
207
+ render: () => {
208
+ const config: LoginConfig = {
209
+ color_json: {
210
+ primary: '#10b981',
211
+ secondary: '#ffffff',
212
+ accent: '#34d399',
213
+ },
214
+ theme_json: {
215
+ name: 'GreenApp',
216
+ dark_mode: false,
217
+ },
218
+ signup_options: {
219
+ allow_login: true,
220
+ allow_sso_google: false,
221
+ allow_sso_github: false,
222
+ allow_sso_microsoft: false,
223
+ allow_sso_apple: false,
224
+ allow_sso_linkedIn: false,
225
+ allow_sso_facebook: false,
226
+ allow_sso_instagram: false,
227
+ allow_sso_france_connect: false,
228
+ allow_mfa: false,
229
+ },
230
+ }
231
+
232
+ return (
233
+ <div className="min-h-screen bg-emerald-50 flex items-center justify-center">
234
+ <Login
235
+ config={config}
236
+ onSubmit={(data) => console.log('Login:', data)}
237
+ onForgotPassword={() => console.log('Forgot password')}
238
+ onSignUp={() => console.log('Sign up')}
239
+ />
240
+ </div>
241
+ )
242
+ },
243
+ }
244
+
245
+ export const DarkMode: Story = {
246
+ render: () => {
247
+ const config: LoginConfig = {
248
+ theme_json: {
249
+ name: 'DarkApp',
250
+ dark_mode: true,
251
+ },
252
+ assets: {
253
+ theme_logo_light: 'https://placehold.co/120x40/1f2937/white?text=DARK',
254
+ theme_logo_dark: 'https://placehold.co/120x40/f3f4f6/1f2937?text=DARK',
255
+ },
256
+ signup_options: {
257
+ allow_login: true,
258
+ allow_sso_google: true,
259
+ allow_sso_github: true,
260
+ allow_sso_microsoft: false,
261
+ allow_sso_apple: false,
262
+ allow_sso_linkedIn: false,
263
+ allow_sso_facebook: false,
264
+ allow_sso_instagram: false,
265
+ allow_sso_france_connect: false,
266
+ allow_mfa: false,
267
+ },
268
+ }
269
+
270
+ return (
271
+ <div className="min-h-screen bg-gray-950 flex items-center justify-center dark">
272
+ <Login
273
+ config={config}
274
+ onSubmit={(data) => console.log('Login:', data)}
275
+ onForgotPassword={() => console.log('Forgot password')}
276
+ onSignUp={() => console.log('Sign up')}
277
+ onSSOGoogle={() => console.log('Google')}
278
+ onSSOGithub={() => console.log('GitHub')}
279
+ />
280
+ </div>
281
+ )
282
+ },
283
+ }
284
+
285
+ export const NoSignUp: Story = {
286
+ render: () => (
287
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
288
+ <Login
289
+ onSubmit={(data) => console.log('Login:', data)}
290
+ onForgotPassword={() => console.log('Forgot password')}
291
+ />
292
+ </div>
293
+ ),
294
+ }
295
+
296
+ export const NoForgotPassword: Story = {
297
+ render: () => (
298
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
299
+ <Login
300
+ onSubmit={(data) => console.log('Login:', data)}
301
+ onSignUp={() => console.log('Sign up')}
302
+ />
303
+ </div>
304
+ ),
305
+ }
306
+
307
+ export const Interactive: Story = {
308
+ render: () => {
309
+ const [isLoading, setIsLoading] = React.useState(false)
310
+ const [error, setError] = React.useState<string | null>(null)
311
+
312
+ const handleSubmit = async (data: LoginFormData) => {
313
+ setIsLoading(true)
314
+ setError(null)
315
+
316
+ // Simulate API call
317
+ await new Promise((resolve) => setTimeout(resolve, 1500))
318
+
319
+ if (data.email === 'test@example.com' && data.password === 'password') {
320
+ alert('Login successful!')
321
+ } else {
322
+ setError('Invalid email or password')
323
+ }
324
+
325
+ setIsLoading(false)
326
+ }
327
+
328
+ return (
329
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
330
+ <div className="space-y-4">
331
+ {error && (
332
+ <div className="bg-destructive/10 text-destructive px-4 py-2 rounded-md text-sm text-center">
333
+ {error}
334
+ </div>
335
+ )}
336
+ <Login
337
+ onSubmit={handleSubmit}
338
+ onForgotPassword={() => alert('Password reset email sent!')}
339
+ onSignUp={() => alert('Redirecting to signup...')}
340
+ />
341
+ <p className="text-xs text-muted-foreground text-center">
342
+ Test: test@example.com / password
343
+ </p>
344
+ </div>
345
+ </div>
346
+ )
347
+ },
348
+ }
349
+
350
+ export const WithWakaPowered: Story = {
351
+ render: () => {
352
+ const config: LoginConfig = {
353
+ waka_powered: true,
354
+ signup_options: {
355
+ allow_login: true,
356
+ allow_sso_google: false,
357
+ allow_sso_github: false,
358
+ allow_sso_microsoft: false,
359
+ allow_sso_apple: false,
360
+ allow_sso_linkedIn: false,
361
+ allow_sso_facebook: false,
362
+ allow_sso_instagram: false,
363
+ allow_sso_france_connect: false,
364
+ allow_mfa: false,
365
+ },
366
+ }
367
+
368
+ return (
369
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
370
+ <Login
371
+ config={config}
372
+ onSubmit={(data) => console.log('Login:', data)}
373
+ />
374
+ </div>
375
+ )
376
+ },
377
+ }
378
+
379
+ export const FranceConnect: Story = {
380
+ render: () => {
381
+ const config: LoginConfig = {
382
+ signup_options: {
383
+ allow_login: true,
384
+ allow_sso_google: false,
385
+ allow_sso_github: false,
386
+ allow_sso_microsoft: false,
387
+ allow_sso_apple: false,
388
+ allow_sso_linkedIn: false,
389
+ allow_sso_facebook: false,
390
+ allow_sso_instagram: false,
391
+ allow_sso_france_connect: true,
392
+ allow_mfa: false,
393
+ },
394
+ }
395
+
396
+ return (
397
+ <div className="min-h-screen bg-muted/30 flex items-center justify-center">
398
+ <Login
399
+ config={config}
400
+ onSubmit={(data) => console.log('Login:', data)}
401
+ onSSOFranceConnect={() => console.log('France Connect')}
402
+ />
403
+ </div>
404
+ )
405
+ },
406
+ }
407
+
408
+ export const SplitLayout: Story = {
409
+ render: () => (
410
+ <div className="min-h-screen flex">
411
+ <div className="flex-1 bg-gradient-to-br from-primary/20 via-primary/10 to-background flex items-center justify-center">
412
+ <div className="max-w-md text-center p-8">
413
+ <h1 className="text-4xl font-bold mb-4">Welcome Back</h1>
414
+ <p className="text-muted-foreground">
415
+ Sign in to access your dashboard and manage your projects.
416
+ </p>
417
+ <div className="mt-8 grid grid-cols-3 gap-4 text-center">
418
+ {[
419
+ { value: '10K+', label: 'Users' },
420
+ { value: '99.9%', label: 'Uptime' },
421
+ { value: '24/7', label: 'Support' },
422
+ ].map((stat) => (
423
+ <div key={stat.label}>
424
+ <div className="text-2xl font-bold">{stat.value}</div>
425
+ <div className="text-xs text-muted-foreground">{stat.label}</div>
426
+ </div>
427
+ ))}
428
+ </div>
429
+ </div>
430
+ </div>
431
+ <div className="flex-1 flex items-center justify-center">
432
+ <Login
433
+ showSocialLogin
434
+ onSubmit={(data) => console.log('Login:', data)}
435
+ onForgotPassword={() => console.log('Forgot password')}
436
+ onSignUp={() => console.log('Sign up')}
437
+ onSSOGoogle={() => console.log('Google')}
438
+ onSSOGithub={() => console.log('GitHub')}
439
+ />
440
+ </div>
441
+ </div>
442
+ ),
443
+ }