@breakergames/design-system 0.1.0 → 0.2.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.
@@ -12,8 +12,8 @@ Design system for **makabaka.io**, a UGC game discovery and creation platform.
12
12
 
13
13
  ## Installation
14
14
  ```tsx
15
- import '@makabaka/design-system/theme.css';
16
- import { Button, Card, Header, ... } from '@makabaka/design-system';
15
+ import '@breakergames/design-system/theme.css';
16
+ import { Button, Card, Header, ... } from '@breakergames/design-system';
17
17
  ```
18
18
 
19
19
  ## Rules
@@ -39,3 +39,11 @@ import { Button, Card, Header, ... } from '@makabaka/design-system';
39
39
  - See `design-tokens/typography.md` for typography scale
40
40
  - See `design-tokens/spacing.md` for spacing and radius
41
41
  - See `components/*.md` for individual component guides
42
+
43
+ ## Page Design Guides
44
+ - See `pages/discover.md` for the Discovery homepage
45
+ - See `pages/dashboard.md` for the "My Games" dashboard
46
+ - See `pages/game-detail.md` for the game detail modal/page
47
+ - See `pages/login.md` for the login page
48
+ - See `pages/register.md` for the registration page
49
+ - See `pages/games-list.md` for the games listing page
@@ -0,0 +1,120 @@
1
+ # Dashboard Page ("My Games" / "我的")
2
+
3
+ Personal game management hub where users view and manage their created game scenarios.
4
+
5
+ ## Layout
6
+
7
+ ```
8
+ ┌──────────────────────────────────┐
9
+ │ Header (fixed, frosted glass) │
10
+ ├──────────────────────────────────┤
11
+ │ │
12
+ │ My Games │
13
+ │ Manage your game creations │
14
+ │ │
15
+ │ ┌─────────┬─────────┬─────────┐ │
16
+ │ │ 📊 12 │ 🎮 856 │ 🌐 5 │ │
17
+ │ │Scenarios│ Plays │Published│ │
18
+ │ └─────────┴─────────┴─────────┘ │
19
+ │ │
20
+ │ 🦙 In Progress (2) │
21
+ │ ┌────────────────────────────┐ │
22
+ │ │ ⟳ "Medieval Quest" │ │
23
+ │ │ Generating... 45% │ │
24
+ │ │ [Resume] [Delete] │ │
25
+ │ └────────────────────────────┘ │
26
+ │ ┌────────────────────────────┐ │
27
+ │ │ ✕ "Space Wars" │ │
28
+ │ │ Failed │ │
29
+ │ │ [Retry] [Delete] │ │
30
+ │ └────────────────────────────┘ │
31
+ │ │
32
+ │ 📝 Drafts (4) │
33
+ │ ┌──────────┐ ┌──────────┐ │
34
+ │ │ Draft │ │ Draft │ │
35
+ │ │ Card │ │ Card │ │
36
+ │ │ [Yellow │ │ [Yellow │ │
37
+ │ │ Badge] │ │ Badge] │ │
38
+ │ └──────────┘ └──────────┘ │
39
+ │ ┌──────────┐ ┌──────────┐ │
40
+ │ │ Draft │ │ Draft │ │
41
+ │ │ Card │ │ Card │ │
42
+ │ └──────────┘ └──────────┘ │
43
+ │ │
44
+ │ 🌐 Published (5) │
45
+ │ ┌──────────┐ ┌──────────┐ │
46
+ │ │ Live │ │ Live │ │
47
+ │ │ Card │ │ Card │ │
48
+ │ │ [Green │ │ [Green │ │
49
+ │ │ Badge] │ │ Badge] │ │
50
+ │ └──────────┘ └──────────┘ │
51
+ │ │
52
+ └──────────────────────────────────┘
53
+ ```
54
+
55
+ ## Components Used
56
+
57
+ ```tsx
58
+ import {
59
+ Header,
60
+ StatCard,
61
+ ScenarioCard,
62
+ Badge,
63
+ Button,
64
+ Modal,
65
+ } from '@breakergames/design-system';
66
+ ```
67
+
68
+ ## Sections
69
+
70
+ ### 1. Header
71
+ - Same as all pages: fixed top, frosted glass
72
+ - "My Games" tab active (or navigate from Discover)
73
+
74
+ ### 2. Page Title
75
+ - Title: "My Games" / "我的游戏" — large text (text-2xl, bold)
76
+ - Subtitle: "Manage your game creations" / "管理你的游戏创作" — muted text
77
+
78
+ ### 3. Stats Row (3 columns)
79
+ - Three `StatCard` components in a row
80
+ - Card 1: Scenario count (purple value) with 📊 icon
81
+ - Card 2: Total plays (pink value) with 🎮 icon
82
+ - Card 3: Published count (green value) with 🌐 icon
83
+ - Each card: dark surface (`--maka-bg-card`), subtle border, rounded-lg
84
+
85
+ ### 4. In-Progress Section
86
+ - Section header: "🦙 In Progress" + count badge
87
+ - Only shown if there are generating/failed drafts
88
+ - Each draft is a custom status card:
89
+ - **Generating**: spinning icon, scenario name, progress percentage, [Resume] + [Delete] buttons
90
+ - **Failed**: red X icon, scenario name, error text, [Retry] + [Delete] buttons
91
+ - **Preview**: game icon, scenario name, "Ready to preview", [Preview] + [Delete] buttons
92
+ - Cards have left border accent (purple for generating, red for failed, green for preview)
93
+
94
+ ### 5. Drafts Section
95
+ - Section header: "📝 Drafts" + count
96
+ - 2-column grid of `ScenarioCard` components
97
+ - Each card has a yellow "Draft" `Badge` in top-left corner
98
+ - Cards show: cover image (or gradient placeholder), title, template type
99
+ - Click opens game detail modal with Publish/Delete actions
100
+
101
+ ### 6. Published Section
102
+ - Section header: "🌐 Published" + count
103
+ - 2-column grid of `ScenarioCard` components
104
+ - Each card has a green "Live" `Badge`
105
+ - Cards show: cover image, title, play count, like count
106
+ - Click opens game detail modal with Unpublish/Upgrade/Delete actions
107
+
108
+ ### 7. Empty State
109
+ - Shown when user has zero scenarios
110
+ - Center-aligned: large emoji (🎮), "No games yet" text
111
+ - "Create your first game" `Button` (primary variant)
112
+ - Button navigates to MakaAI chat
113
+
114
+ ## Design Notes
115
+ - Background: `var(--maka-bg-dark)` (#1b2838)
116
+ - Max-width: 672px centered on desktop
117
+ - Stats cards use colored values: purple (#7c5cfa), pink (#f43f5e), green (#22c55e)
118
+ - Draft status cards have colored left border for quick status scanning
119
+ - Game detail opens as a `Modal` with action buttons at bottom
120
+ - ASG games show "Upgrade" button (quick→standard→deep) in detail modal
@@ -0,0 +1,115 @@
1
+ # Discover Page (Homepage)
2
+
3
+ The main landing page of makabaka.io. A dark-themed game discovery feed inspired by Steam/Epic Games Store.
4
+
5
+ ## Layout
6
+
7
+ ```
8
+ ┌──────────────────────────────────┐
9
+ │ Header (fixed, frosted glass) │
10
+ │ Logo | Recommend·Community·Msgs │
11
+ │ Avatar │
12
+ ├──────────────────────────────────┤
13
+ │ │
14
+ │ ┌────────────────────────────┐ │
15
+ │ │ FeaturedCard (hero) │ │
16
+ │ │ aspect-ratio: 4/5 │ │
17
+ │ │ cover image + gradient │ │
18
+ │ │ overlay + Badge + title │ │
19
+ │ │ + play/like stats │ │
20
+ │ └────────────────────────────┘ │
21
+ │ │
22
+ │ 🔥 Hot Games │
23
+ │ ┌──────────┐ ┌──────────┐ │
24
+ │ │ Large │ │ Small 1 │ │
25
+ │ │ Card │ ├──────────┤ │
26
+ │ │ │ │ Small 2 │ │
27
+ │ └──────────┘ └──────────┘ │
28
+ │ │
29
+ │ ✨ New Games │
30
+ │ ┌──────────┐ ┌──────────┐ │
31
+ │ │ Large │ │ Small 1 │ │
32
+ │ │ Card │ ├──────────┤ │
33
+ │ │ │ │ Small 2 │ │
34
+ │ └──────────┘ └──────────┘ │
35
+ │ │
36
+ │ 📋 More Recommendations │
37
+ │ ┌─────┐ ┌─────┐ │
38
+ │ │ │ │ │ Waterfall │
39
+ │ │ │ │ │ 2 columns │
40
+ │ │ │ └─────┘ right column │
41
+ │ └─────┘ ┌─────┐ offset 24px │
42
+ │ ┌─────┐ │ │ │
43
+ │ │ │ │ │ │
44
+ │ └─────┘ └─────┘ │
45
+ │ │
46
+ ├──────────────────────────────────┤
47
+ │ BottomInputBar (fixed bottom) │
48
+ │ 🦙 "Ask Maka to find games" │
49
+ │ [Send ▶] │
50
+ └──────────────────────────────────┘
51
+ ```
52
+
53
+ ## Components Used
54
+
55
+ ```tsx
56
+ import {
57
+ Header,
58
+ FeaturedCard,
59
+ HotGrid,
60
+ WaterfallGrid,
61
+ Badge,
62
+ BottomInputBar,
63
+ ScenarioCard,
64
+ } from '@breakergames/design-system';
65
+ ```
66
+
67
+ ## Sections
68
+
69
+ ### 1. Header
70
+ - Fixed top, `backdrop-filter: blur(12px)`, semi-transparent dark background
71
+ - Left: Logo text "makabaka"
72
+ - Center: 3 tab buttons — "Recommend" (active, purple underline), "Community", "Messages"
73
+ - Right: User Avatar (gradient circle with initial letter) or "Login" button
74
+
75
+ ### 2. Featured Card (Hero)
76
+ - Full-width `FeaturedCard` component
77
+ - Aspect ratio 4:5 on mobile, 3:1 on desktop
78
+ - Cover image with bottom gradient overlay (transparent → dark)
79
+ - `Badge` component in top-left (e.g., "Staff Pick", "Hot")
80
+ - Title overlay at bottom with play count + like count
81
+ - Click opens game detail
82
+
83
+ ### 3. Hot Games Grid
84
+ - Section label: "🔥 Hot Games" or "🔥 热门游戏"
85
+ - `HotGrid` component: 2-column layout
86
+ - Left column: 1 large card (aspect 3:4)
87
+ - Right column: 2 stacked smaller cards
88
+ - Each card is a `ScenarioCard` with cover image, title, stats
89
+
90
+ ### 4. New Games Section
91
+ - Section label: "✨ New Games" or "✨ 新鲜出炉"
92
+ - Same layout as Hot Games (HotGrid)
93
+ - Shows recently created scenarios
94
+
95
+ ### 5. Waterfall Grid (More Recommendations)
96
+ - Section label: "📋 More" or "📋 更多推荐"
97
+ - `WaterfallGrid` component: 2-column masonry layout
98
+ - Right column offset 24px downward
99
+ - Cards have varying aspect ratios (3:4, 1:1, 4:5)
100
+ - Infinite scroll pattern
101
+
102
+ ### 6. Bottom Input Bar
103
+ - Fixed to bottom of viewport
104
+ - Frosted glass background (`backdrop-filter: blur(12px)`)
105
+ - Left: Llama emoji icon 🦙
106
+ - Center: Placeholder text "Ask Maka to find games..."
107
+ - Right: Purple circular send button
108
+ - Tapping opens the MakaAI chat sheet
109
+
110
+ ## Design Notes
111
+ - Background: `var(--maka-bg-dark)` (#1b2838)
112
+ - Cards animate in with slam-in effect on first load
113
+ - All cards show hover glow effect (purple border)
114
+ - Mobile: full viewport width, no horizontal padding on cards
115
+ - Desktop: max-width 672px centered (`lg:max-w-2xl lg:mx-auto`)
@@ -0,0 +1,115 @@
1
+ # Game Detail Page / Modal
2
+
3
+ Shows full game information. Appears as a centered modal overlay on desktop, or a full-screen sheet on mobile.
4
+
5
+ ## Layout
6
+
7
+ ```
8
+ ┌──────────────────────────────────┐
9
+ │ ╔══════════════════════════════╗│
10
+ │ ║ [X] Close ║│
11
+ │ ║ ║│
12
+ │ ║ ┌────────────────────────┐ ║│
13
+ │ ║ │ Hero Image │ ║│
14
+ │ ║ │ (cover, aspect 16:9) │ ║│
15
+ │ ║ │ + gradient overlay │ ║│
16
+ │ ║ └────────────────────────┘ ║│
17
+ │ ║ ║│
18
+ │ ║ Game Title ║│
19
+ │ ║ by AuthorName ║│
20
+ │ ║ ║│
21
+ │ ║ ┌─────┬──────┬─────┬─────┐ ║│
22
+ │ ║ │ ⭐ │ ▶ │ ❤ │ 💬 │ ║│
23
+ │ ║ │ 4.5 │ 1.2k │ 89 │ 23 │ ║│
24
+ │ ║ │Rate │Plays │Likes│Cmts │ ║│
25
+ │ ║ └─────┴──────┴─────┴─────┘ ║│
26
+ │ ║ ║│
27
+ │ ║ [ASG] [Adventure] [Fantasy] ║│
28
+ │ ║ ↑ tag pills ║│
29
+ │ ║ ║│
30
+ │ ║ Description text... ║│
31
+ │ ║ Multi-line game description ║│
32
+ │ ║ ║│
33
+ │ ║ 💬 Comments ║│
34
+ │ ║ ┌────────────────────────┐ ║│
35
+ │ ║ │ User1: Great game! │ ║│
36
+ │ ║ │ User2: Love the story │ ║│
37
+ │ ║ └────────────────────────┘ ║│
38
+ │ ║ ║│
39
+ │ ║ ┌────────────────────────┐ ║│
40
+ │ ║ │ [▶ Play Now] [❤ Like] │ ║│
41
+ │ ║ └────────────────────────┘ ║│
42
+ │ ╚══════════════════════════════╝│
43
+ └──────────────────────────────────┘
44
+ ```
45
+
46
+ ## Components Used
47
+
48
+ ```tsx
49
+ import {
50
+ Modal,
51
+ Button,
52
+ Badge,
53
+ LikeButton,
54
+ Avatar,
55
+ ChatBubble,
56
+ } from '@breakergames/design-system';
57
+ ```
58
+
59
+ ## Sections
60
+
61
+ ### 1. Modal Container
62
+ - `Modal` component with dark overlay backdrop (`rgba(0,0,0,0.6)`)
63
+ - Close button (X) in top-right corner
64
+ - Max-width: 640px on desktop, full-screen on mobile
65
+ - Scrollable content area
66
+
67
+ ### 2. Hero Image
68
+ - Cover image with aspect-ratio 16:9
69
+ - Bottom gradient overlay (transparent → modal background)
70
+ - `Badge` component overlay showing game type (e.g., "Hot", "Staff Pick")
71
+ - Fallback: gradient placeholder if no cover image
72
+
73
+ ### 3. Title & Author
74
+ - Game title: large text (text-2xl, bold, display font)
75
+ - Author: "by {authorName}" with `Avatar` (small) inline
76
+ - Template type indicator: "Multiplayer" or "Singleplayer" subtle text
77
+
78
+ ### 4. Stats Row (4 columns)
79
+ - 4 stat columns evenly spaced
80
+ - Each column: icon + number + label (stacked vertically, centered)
81
+ - ⭐ Rating (yellow)
82
+ - ▶ Plays (purple)
83
+ - ❤ Likes (pink)
84
+ - 💬 Comments (blue)
85
+ - Divided by subtle vertical borders
86
+
87
+ ### 5. Tag Pills
88
+ - Horizontal scrollable row of pill-shaped tags
89
+ - Tags include: template type, genre, themes
90
+ - Pill style: `--maka-bg-hover` background, rounded-full, small text
91
+
92
+ ### 6. Description
93
+ - Multi-line text with `--maka-text-secondary` color
94
+ - Max 3 lines collapsed, "Read more" to expand
95
+
96
+ ### 7. Comments Section
97
+ - Section title: "💬 Comments" + count
98
+ - List of comment entries: Avatar + username + text + timestamp
99
+ - Empty state: "No comments yet"
100
+
101
+ ### 8. Action Bar (fixed bottom of modal)
102
+ - Frosted glass background
103
+ - Primary action: "▶ Play Now" `Button` (primary, large)
104
+ - Multiplayer games: "Create Room" + "Join Room" buttons
105
+ - Singleplayer games: Single "Play" button
106
+ - Secondary action: `LikeButton` (heart toggle with count)
107
+ - Dashboard variant adds: "Publish/Unpublish" + "Delete" + "Upgrade" buttons
108
+
109
+ ## Design Notes
110
+ - Modal backdrop: `rgba(0,0,0,0.6)` with `backdrop-filter: blur(4px)`
111
+ - Modal surface: `var(--maka-bg-card)` (#1e2a3a)
112
+ - On mobile: modal becomes full-screen bottom sheet
113
+ - Stats use colored icons matching their semantic meaning
114
+ - Action bar sticks to bottom of modal, always visible
115
+ - Smooth slide-up animation on open
@@ -0,0 +1,103 @@
1
+ # Games List Page
2
+
3
+ Community game gallery showing all published game scenarios in a grid layout.
4
+
5
+ ## Layout
6
+
7
+ ```
8
+ ┌──────────────────────────────────┐
9
+ │ Header (fixed, frosted glass) │
10
+ ├──────────────────────────────────┤
11
+ │ │
12
+ │ Home / Custom Games │
13
+ │ ↑ breadcrumb │
14
+ │ │
15
+ │ ═══════════════════════════════ │
16
+ │ Custom Games Gallery │
17
+ │ Explore community-created │
18
+ │ game scenarios │
19
+ │ ═══════════════════════════════ │
20
+ │ │
21
+ │ Games Gallery │
22
+ │ Browse all scenarios │
23
+ │ │
24
+ │ ┌─────┐ ┌─────┐ ┌─────┐ ┌────┐│
25
+ │ │ │ │ │ │ │ │ ││
26
+ │ │Card │ │Card │ │Card │ │Card││
27
+ │ │ │ │ │ │ │ │ ││
28
+ │ └─────┘ └─────┘ └─────┘ └────┘│
29
+ │ ┌─────┐ ┌─────┐ ┌─────┐ ┌────┐│
30
+ │ │ │ │ │ │ │ │ ││
31
+ │ │Card │ │Card │ │Card │ │Card││
32
+ │ │ │ │ │ │ │ │ ││
33
+ │ └─────┘ └─────┘ └─────┘ └────┘│
34
+ │ ┌─────┐ ┌─────┐ ┌─────┐ ┌────┐│
35
+ │ │ │ │ │ │ │ │ ││
36
+ │ │Card │ │Card │ │Card │ │Card││
37
+ │ └─────┘ └─────┘ └─────┘ └────┘│
38
+ │ │
39
+ │ ─────────────────────────────── │
40
+ │ Created with makabaka.io │
41
+ │ ─────────────────────────────── │
42
+ │ │
43
+ └──────────────────────────────────┘
44
+ ```
45
+
46
+ ## Components Used
47
+
48
+ ```tsx
49
+ import {
50
+ Header,
51
+ ScenarioCard,
52
+ GameGrid,
53
+ Badge,
54
+ } from '@breakergames/design-system';
55
+ ```
56
+
57
+ ## Sections
58
+
59
+ ### 1. Header
60
+ - Fixed top, frosted glass, same as all pages
61
+
62
+ ### 2. Breadcrumb
63
+ - Small navigation: "Home" (link, cyan) → "/" → "Custom Games" (current, muted)
64
+ - Below header, left-aligned
65
+ - Font size: small, `var(--maka-text-muted)` color
66
+
67
+ ### 3. Hero Section
68
+ - Top and bottom border separators (`var(--maka-border-subtle)`)
69
+ - Title: "Custom Games Gallery" / "自定义游戏库" — text-3xl, display font, bold
70
+ - Subtitle: "Explore community-created custom game scenarios" — `var(--maka-text-secondary)`
71
+ - Vertical padding: 48px
72
+ - Horizontal padding: 24px
73
+ - Max-width container centered
74
+
75
+ ### 4. Gallery Grid
76
+ - Section header:
77
+ - Title: "Games Gallery" / "游戏列表" — text-2xl
78
+ - Subtitle: "Browse all scenarios" / "浏览所有场景"
79
+ - `GameGrid` component with responsive columns:
80
+ - Mobile: 2 columns
81
+ - Tablet: 3 columns
82
+ - Desktop: 4 columns
83
+ - Each cell is a `ScenarioCard`:
84
+ - Cover image with gradient overlay
85
+ - `Badge` in top-left (template type or status)
86
+ - Title at bottom
87
+ - Play count + like count
88
+ - Aspect ratio: 3:4
89
+ - Click opens game detail modal
90
+
91
+ ### 5. Footer
92
+ - Top border separator
93
+ - Centered tagline: "Created with makabaka.io" — small, muted
94
+ - Bottom padding: 32px
95
+
96
+ ## Design Notes
97
+ - Background: `var(--maka-bg-dark)` (#1b2838)
98
+ - Grid gap: 16px
99
+ - Cards have hover glow effect (purple border)
100
+ - Responsive: 2 cols mobile → 3 cols tablet → 4 cols desktop
101
+ - Max-width container: 1200px on large screens
102
+ - All cards are same height within a row (uniform grid, not masonry)
103
+ - Loading state: skeleton cards or centered spinner
@@ -0,0 +1,127 @@
1
+ # Login Page
2
+
3
+ User authentication entry point. Clean centered card design.
4
+
5
+ ## Layout
6
+
7
+ ```
8
+ ┌──────────────────────────────────┐
9
+ │ Header (fixed, frosted glass) │
10
+ ├──────────────────────────────────┤
11
+ │ │
12
+ │ │
13
+ │ Welcome Back │
14
+ │ │
15
+ │ ╔══════════════════════════╗ │
16
+ │ ║ ║ │
17
+ │ ║ ┌────────────────────┐ ║ │
18
+ │ ║ │ 🔵 Continue with │ ║ │
19
+ │ ║ │ Google │ ║ │
20
+ │ ║ └────────────────────┘ ║ │
21
+ │ ║ ┌────────────────────┐ ║ │
22
+ │ ║ │ 🟢 Continue with │ ║ │
23
+ │ ║ │ WeChat │ ║ │
24
+ │ ║ └────────────────────┘ ║ │
25
+ │ ║ ║ │
26
+ │ ║ ──── or continue ──── ║ │
27
+ │ ║ with email ║ │
28
+ │ ║ ║ │
29
+ │ ║ Email ║ │
30
+ │ ║ ┌────────────────────┐ ║ │
31
+ │ ║ │ your@email.com │ ║ │
32
+ │ ║ └────────────────────┘ ║ │
33
+ │ ║ ║ │
34
+ │ ║ Password ║ │
35
+ │ ║ ┌────────────────────┐ ║ │
36
+ │ ║ │ •••••••• │ ║ │
37
+ │ ║ └────────────────────┘ ║ │
38
+ │ ║ ║ │
39
+ │ ║ ┌────────────────────┐ ║ │
40
+ │ ║ │ Sign In │ ║ │
41
+ │ ║ └────────────────────┘ ║ │
42
+ │ ║ ║ │
43
+ │ ║ Don't have an account? ║ │
44
+ │ ║ Sign up ║ │
45
+ │ ║ ║ │
46
+ │ ║ ──────── or ──────── ║ │
47
+ │ ║ ║ │
48
+ │ ║ ┌────────────────────┐ ║ │
49
+ │ ║ │ Continue as Guest │ ║ │
50
+ │ ║ └────────────────────┘ ║ │
51
+ │ ║ No registration needed ║ │
52
+ │ ║ ║ │
53
+ │ ╚══════════════════════════╝ │
54
+ │ │
55
+ └──────────────────────────────────┘
56
+ ```
57
+
58
+ ## Components Used
59
+
60
+ ```tsx
61
+ import {
62
+ Header,
63
+ Button,
64
+ Input,
65
+ Card,
66
+ } from '@breakergames/design-system';
67
+ ```
68
+
69
+ ## Sections
70
+
71
+ ### 1. Header
72
+ - Fixed top, frosted glass, same as all pages
73
+ - No tabs highlighted (auth pages are standalone)
74
+
75
+ ### 2. Page Title
76
+ - "Welcome Back" / "欢迎回来" — centered, large (text-3xl), bold, display font
77
+ - Below header with comfortable spacing (py-16)
78
+
79
+ ### 3. Login Card
80
+ - `Card` component centered, max-width 448px (`max-w-md`)
81
+ - Surface color: `var(--maka-bg-card)`
82
+ - Padding: 24px–32px
83
+ - Rounded corners: `var(--maka-radius-xl)` (16px)
84
+
85
+ ### 4. OAuth Buttons
86
+ - Two full-width `Button` components (secondary variant)
87
+ - Google button: Google icon + "Continue with Google"
88
+ - WeChat button: WeChat icon + "Continue with WeChat" / "微信登录"
89
+ - Gap: 12px between buttons
90
+
91
+ ### 5. Divider
92
+ - Horizontal line with centered text: "or continue with email" / "或使用邮箱"
93
+ - Line: `var(--maka-border-subtle)` color
94
+ - Text: `var(--maka-text-muted)` color, small size
95
+
96
+ ### 6. Email/Password Form
97
+ - Two `Input` components stacked:
98
+ - Email: type="email", label="Email" / "邮箱", placeholder
99
+ - Password: type="password", label="Password" / "密码", placeholder
100
+ - Gap: 16px between inputs
101
+ - Error message area: red background card if login fails
102
+
103
+ ### 7. Submit Button
104
+ - Full-width `Button` (primary variant, large)
105
+ - Text: "Sign In" / "登录"
106
+ - Loading state: shows spinner when submitting
107
+ - Margin-top: 24px
108
+
109
+ ### 8. Sign Up Link
110
+ - Centered text: "Don't have an account?" + purple link "Sign up"
111
+ - Link navigates to `/register`
112
+ - Margin-top: 16px
113
+
114
+ ### 9. Guest Login Section
115
+ - Divider with "or" text
116
+ - Full-width `Button` (ghost variant)
117
+ - Text: "Continue as Guest" / "游客登录"
118
+ - Helper text below: "No registration needed" / "无需注册" — small, muted
119
+ - Loading state on button
120
+
121
+ ## Design Notes
122
+ - Background: `var(--maka-bg-dark)` (#1b2838)
123
+ - Card has subtle border: `var(--maka-border-subtle)`
124
+ - Focus states on inputs: purple border glow
125
+ - Error messages appear as red-tinted alert box above the form or below inputs
126
+ - Responsive: card takes full width on mobile with horizontal padding
127
+ - All buttons have hover and active states
@@ -0,0 +1,137 @@
1
+ # Register Page
2
+
3
+ Account creation page with email verification flow. Similar layout to Login but with more fields.
4
+
5
+ ## Layout
6
+
7
+ ```
8
+ ┌──────────────────────────────────┐
9
+ │ Header (fixed, frosted glass) │
10
+ ├──────────────────────────────────┤
11
+ │ │
12
+ │ Create Account │
13
+ │ │
14
+ │ ╔══════════════════════════╗ │
15
+ │ ║ ║ │
16
+ │ ║ [🔵 Google] [🟢 WeChat] ║ │
17
+ │ ║ ║ │
18
+ │ ║ ── or register with ── ║ │
19
+ │ ║ email ║ │
20
+ │ ║ ║ │
21
+ │ ║ Display Name ║ │
22
+ │ ║ ┌────────────────────┐ ║ │
23
+ │ ║ │ Your nickname │ ║ │
24
+ │ ║ └────────────────────┘ ║ │
25
+ │ ║ ║ │
26
+ │ ║ Email ║ │
27
+ │ ║ ┌──────────────┬─────┐ ║ │
28
+ │ ║ │ your@email │Send │ ║ │
29
+ │ ║ │ │Code │ ║ │
30
+ │ ║ └──────────────┴─────┘ ║ │
31
+ │ ║ ║ │
32
+ │ ║ Verification Code ║ │
33
+ │ ║ ┌────────────────────┐ ║ │
34
+ │ ║ │ 1 2 3 4 5 6 │ ║ │
35
+ │ ║ └────────────────────┘ ║ │
36
+ │ ║ ✅ Code sent to email ║ │
37
+ │ ║ ║ │
38
+ │ ║ Password ║ │
39
+ │ ║ ┌────────────────────┐ ║ │
40
+ │ ║ │ •••••••• │ ║ │
41
+ │ ║ └────────────────────┘ ║ │
42
+ │ ║ ║ │
43
+ │ ║ Confirm Password ║ │
44
+ │ ║ ┌────────────────────┐ ║ │
45
+ │ ║ │ •••••••• │ ║ │
46
+ │ ║ └────────────────────┘ ║ │
47
+ │ ║ ║ │
48
+ │ ║ ┌────────────────────┐ ║ │
49
+ │ ║ │ Create Account │ ║ │
50
+ │ ║ └────────────────────┘ ║ │
51
+ │ ║ ║ │
52
+ │ ║ Already have an account?║ │
53
+ │ ║ Sign in ║ │
54
+ │ ║ ║ │
55
+ │ ╚══════════════════════════╝ │
56
+ │ │
57
+ └──────────────────────────────────┘
58
+ ```
59
+
60
+ ## Components Used
61
+
62
+ ```tsx
63
+ import {
64
+ Header,
65
+ Button,
66
+ Input,
67
+ Card,
68
+ } from '@breakergames/design-system';
69
+ ```
70
+
71
+ ## Sections
72
+
73
+ ### 1. Header
74
+ - Same as all pages: fixed, frosted glass
75
+
76
+ ### 2. Page Title
77
+ - "Create Account" / "创建账号" — centered, text-3xl, bold
78
+
79
+ ### 3. Register Card
80
+ - `Card` component centered, max-width 448px
81
+ - Same styling as login card
82
+
83
+ ### 4. OAuth Buttons
84
+ - Same as login: Google + WeChat buttons (secondary variant)
85
+
86
+ ### 5. Divider
87
+ - "or register with email" / "或使用邮箱注册"
88
+
89
+ ### 6. Registration Form (5 fields)
90
+
91
+ **Display Name**
92
+ - `Input` with label "Display Name" / "昵称"
93
+ - minLength: 2 characters
94
+ - Placeholder: "Your nickname"
95
+
96
+ **Email + Send Code**
97
+ - `Input` with label "Email" / "邮箱"
98
+ - Inline `Button` (small, secondary) on the right: "Send Code" / "发送验证码"
99
+ - Send Code button has 60-second countdown timer after click
100
+ - Button disabled until valid email is entered
101
+
102
+ **Verification Code**
103
+ - `Input` with label "Verification Code" / "验证码"
104
+ - Monospace font, center-aligned, letter-spacing wide
105
+ - 6 digits
106
+ - Success text below in green: "✅ Code sent to your email" when code is sent
107
+
108
+ **Password**
109
+ - `Input` type="password", label "Password" / "密码"
110
+ - minLength: 6 characters
111
+
112
+ **Confirm Password**
113
+ - `Input` type="password", label "Confirm Password" / "确认密码"
114
+ - Must match password field
115
+ - Error shown if mismatch
116
+
117
+ ### 7. Submit Button
118
+ - Full-width `Button` (primary variant, large)
119
+ - Text: "Create Account" / "创建账号"
120
+ - Loading state with spinner
121
+ - Disabled until all fields valid
122
+
123
+ ### 8. Sign In Link
124
+ - "Already have an account?" + purple link "Sign in"
125
+ - Links to `/login`
126
+
127
+ ### 9. Error Display
128
+ - Red-tinted alert box for validation or API errors
129
+ - Shows above the form or below the submit button
130
+
131
+ ## Design Notes
132
+ - Same dark background and card style as login page
133
+ - Email + Send Code button is an inline layout (input takes remaining space, button fixed width)
134
+ - Verification code input uses monospace font with wide letter-spacing for OTP feel
135
+ - Send Code countdown shows remaining seconds: "Resend (45s)"
136
+ - All validation happens inline with colored border/text on individual inputs
137
+ - Password strength is not shown (simple minLength validation only)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breakergames/design-system",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",