@momo-kits/native-kits 0.157.5-debug → 0.158.1-beta.1-debug

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 (139) hide show
  1. package/.claude/settings.local.json +11 -0
  2. package/.claude/skills/design-system/SKILL.md +88 -0
  3. package/.claude/skills/design-system/references/components/avatar.md +134 -0
  4. package/.claude/skills/design-system/references/components/badge.md +127 -0
  5. package/.claude/skills/design-system/references/components/bottom-tab.md +177 -0
  6. package/.claude/skills/design-system/references/components/bottomsheet.md +170 -0
  7. package/.claude/skills/design-system/references/components/button.md +206 -0
  8. package/.claude/skills/design-system/references/components/carousel.md +117 -0
  9. package/.claude/skills/design-system/references/components/checkbox.md +98 -0
  10. package/.claude/skills/design-system/references/components/chip.md +146 -0
  11. package/.claude/skills/design-system/references/components/collapse.md +120 -0
  12. package/.claude/skills/design-system/references/components/date-picker.md +119 -0
  13. package/.claude/skills/design-system/references/components/divider.md +84 -0
  14. package/.claude/skills/design-system/references/components/icon.md +130 -0
  15. package/.claude/skills/design-system/references/components/image.md +81 -0
  16. package/.claude/skills/design-system/references/components/information.md +107 -0
  17. package/.claude/skills/design-system/references/components/input-dropdown.md +138 -0
  18. package/.claude/skills/design-system/references/components/input-money.md +157 -0
  19. package/.claude/skills/design-system/references/components/input-otp.md +132 -0
  20. package/.claude/skills/design-system/references/components/input-phone-number.md +140 -0
  21. package/.claude/skills/design-system/references/components/input-search.md +124 -0
  22. package/.claude/skills/design-system/references/components/input-text-area.md +133 -0
  23. package/.claude/skills/design-system/references/components/input.md +152 -0
  24. package/.claude/skills/design-system/references/components/loader.md +87 -0
  25. package/.claude/skills/design-system/references/components/pagination.md +105 -0
  26. package/.claude/skills/design-system/references/components/popup-notify.md +128 -0
  27. package/.claude/skills/design-system/references/components/progress-info.md +114 -0
  28. package/.claude/skills/design-system/references/components/radio.md +86 -0
  29. package/.claude/skills/design-system/references/components/rating.md +126 -0
  30. package/.claude/skills/design-system/references/components/skeleton.md +120 -0
  31. package/.claude/skills/design-system/references/components/slider.md +141 -0
  32. package/.claude/skills/design-system/references/components/snackbar.md +97 -0
  33. package/.claude/skills/design-system/references/components/stepper.md +100 -0
  34. package/.claude/skills/design-system/references/components/steps.md +91 -0
  35. package/.claude/skills/design-system/references/components/suggest-action.md +95 -0
  36. package/.claude/skills/design-system/references/components/swipe.md +121 -0
  37. package/.claude/skills/design-system/references/components/switch.md +98 -0
  38. package/.claude/skills/design-system/references/components/tab-view.md +120 -0
  39. package/.claude/skills/design-system/references/components/tag.md +118 -0
  40. package/.claude/skills/design-system/references/components/text.md +151 -0
  41. package/.claude/skills/design-system/references/components/toast.md +99 -0
  42. package/.claude/skills/design-system/references/components/tooltip.md +138 -0
  43. package/.claude/skills/design-system/references/components/top-nav-miniapp.md +94 -0
  44. package/.claude/skills/design-system/references/components/top-nav.md +226 -0
  45. package/.claude/skills/design-system/references/components/uploader.md +115 -0
  46. package/.claude/skills/design-system/references/navigation/bottom-tab.md +131 -0
  47. package/.claude/skills/design-system/references/navigation/bottomsheet.md +161 -0
  48. package/.claude/skills/design-system/references/navigation/modal.md +133 -0
  49. package/.claude/skills/design-system/references/navigation/navigation-options.md +225 -0
  50. package/.claude/skills/design-system/references/navigation/navigator.md +111 -0
  51. package/.claude/skills/design-system/references/navigation/setup.md +134 -0
  52. package/.claude/skills/design-system/references/navigation/stack.md +128 -0
  53. package/.claude/skills/design-system/references/spec-convention.md +80 -0
  54. package/.claude/skills/design-system/references/tokens/colors.md +131 -0
  55. package/.claude/skills/design-system/references/tokens/spacing-radius.md +144 -0
  56. package/.claude/skills/design-system/references/tokens/theme.md +125 -0
  57. package/.claude/skills/design-system/references/tokens/typography.md +135 -0
  58. package/.claude/skills/design-system-kits/SKILL.md +102 -0
  59. package/.claude/skills/design-system-kits/references/code-convention.md +118 -0
  60. package/.claude/skills/design-system-kits/references/components/avatar.md +45 -0
  61. package/.claude/skills/design-system-kits/references/components/badge.md +27 -0
  62. package/.claude/skills/design-system-kits/references/components/button.md +65 -0
  63. package/.claude/skills/design-system-kits/references/components/carousel.md +51 -0
  64. package/.claude/skills/design-system-kits/references/components/checkbox.md +39 -0
  65. package/.claude/skills/design-system-kits/references/components/chip.md +54 -0
  66. package/.claude/skills/design-system-kits/references/components/collapse.md +63 -0
  67. package/.claude/skills/design-system-kits/references/components/date-picker.md +36 -0
  68. package/.claude/skills/design-system-kits/references/components/divider.md +21 -0
  69. package/.claude/skills/design-system-kits/references/components/icon.md +382 -0
  70. package/.claude/skills/design-system-kits/references/components/image.md +62 -0
  71. package/.claude/skills/design-system-kits/references/components/information.md +61 -0
  72. package/.claude/skills/design-system-kits/references/components/input-dropdown.md +92 -0
  73. package/.claude/skills/design-system-kits/references/components/input-money.md +128 -0
  74. package/.claude/skills/design-system-kits/references/components/input-otp.md +85 -0
  75. package/.claude/skills/design-system-kits/references/components/input-phone-number.md +96 -0
  76. package/.claude/skills/design-system-kits/references/components/input-search.md +127 -0
  77. package/.claude/skills/design-system-kits/references/components/input-text-area.md +100 -0
  78. package/.claude/skills/design-system-kits/references/components/input.md +126 -0
  79. package/.claude/skills/design-system-kits/references/components/loader.md +41 -0
  80. package/.claude/skills/design-system-kits/references/components/pagination.md +47 -0
  81. package/.claude/skills/design-system-kits/references/components/popup-notify.md +69 -0
  82. package/.claude/skills/design-system-kits/references/components/popup-promotion.md +35 -0
  83. package/.claude/skills/design-system-kits/references/components/progress-info.md +55 -0
  84. package/.claude/skills/design-system-kits/references/components/radio.md +42 -0
  85. package/.claude/skills/design-system-kits/references/components/rating.md +36 -0
  86. package/.claude/skills/design-system-kits/references/components/skeleton.md +25 -0
  87. package/.claude/skills/design-system-kits/references/components/slider.md +53 -0
  88. package/.claude/skills/design-system-kits/references/components/snackbar.md +52 -0
  89. package/.claude/skills/design-system-kits/references/components/stepper.md +46 -0
  90. package/.claude/skills/design-system-kits/references/components/steps.md +57 -0
  91. package/.claude/skills/design-system-kits/references/components/suggest-action.md +44 -0
  92. package/.claude/skills/design-system-kits/references/components/swipe.md +44 -0
  93. package/.claude/skills/design-system-kits/references/components/switch.md +43 -0
  94. package/.claude/skills/design-system-kits/references/components/tab-view.md +56 -0
  95. package/.claude/skills/design-system-kits/references/components/tag.md +50 -0
  96. package/.claude/skills/design-system-kits/references/components/text.md +56 -0
  97. package/.claude/skills/design-system-kits/references/components/toast.md +51 -0
  98. package/.claude/skills/design-system-kits/references/components/tooltip.md +95 -0
  99. package/.claude/skills/design-system-kits/references/components/uploader.md +48 -0
  100. package/.claude/skills/design-system-kits/references/design-spec-structure.md +356 -0
  101. package/.claude/skills/design-system-kits/references/design-spec-to-code.md +596 -0
  102. package/.claude/skills/design-system-kits/references/navigation/bottom-tab.md +155 -0
  103. package/.claude/skills/design-system-kits/references/navigation/bottomsheet.md +94 -0
  104. package/.claude/skills/design-system-kits/references/navigation/modal.md +125 -0
  105. package/.claude/skills/design-system-kits/references/navigation/navigation-options.md +430 -0
  106. package/.claude/skills/design-system-kits/references/navigation/navigator.md +177 -0
  107. package/.claude/skills/design-system-kits/references/navigation/setup.md +94 -0
  108. package/.claude/skills/design-system-kits/references/navigation/stack.md +152 -0
  109. package/.claude/skills/design-system-kits/references/screen-layout-rule.md +125 -0
  110. package/.claude/skills/design-system-kits/references/tokens/colors.md +183 -0
  111. package/.claude/skills/design-system-kits/references/tokens/spacing-radius.md +45 -0
  112. package/.claude/skills/design-system-kits/references/tokens/theme.md +97 -0
  113. package/.claude/skills/design-system-kits/references/tokens/typography.md +105 -0
  114. package/.claude/skills/vibe-design/SKILL.md +306 -0
  115. package/compose/build.gradle.kts +1 -1
  116. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +7 -0
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +123 -0
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +224 -0
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -0
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +2 -2
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +338 -0
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -0
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +348 -0
  125. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +256 -0
  126. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +494 -0
  127. package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +131 -0
  128. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +215 -0
  129. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +531 -0
  130. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +192 -0
  131. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +3 -0
  132. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +5 -2
  133. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +2 -11
  134. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +5 -1
  135. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +12 -0
  136. package/gradle.properties +1 -1
  137. package/ios/Popup/PopupPromotion.swift +2 -2
  138. package/local.properties +8 -0
  139. package/package.json +1 -1
@@ -0,0 +1,131 @@
1
+ # Bottom Tab Bar — Design Guideline
2
+
3
+ ## Overview
4
+
5
+ Bottom tab navigation provides primary app-level navigation with 3–5 tabs and an optional floating action button (FAB).
6
+
7
+ ---
8
+
9
+ ## Anatomy
10
+
11
+ ```
12
+ ┌──────────────────────────────────────────────────┐
13
+ │ │
14
+ │ Screen Content │
15
+ │ │
16
+ ├──────────────────────────────────────────────────┤
17
+ │ │
18
+ │ [🏠] [🔍] [+] [💬] [👤] │
19
+ │ Home Search (FAB) Chat Profile │
20
+ │ │
21
+ │ ────── active indicator ────── │
22
+ │ │
23
+ └──────────────────────────────────────────────────┘
24
+ ↑ safe area bottom
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Visual Specs
30
+
31
+ | Property | Value |
32
+ |----------|-------|
33
+ | Height | 64dp (excluding safe area) |
34
+ | Background | `theme.colors.background.surface` |
35
+ | Top border | 1px `theme.colors.border.default` |
36
+ | Tab count | 3–5 tabs |
37
+ | Icon size | 24px |
38
+ | Label typography | `caption_s_regular` (10sp) |
39
+ | Icon-to-label gap | `Spacing.XXS` (2) |
40
+
41
+ ### Tab States
42
+
43
+ | State | Icon Color | Label Color |
44
+ |-------|-----------|-------------|
45
+ | Active | `theme.colors.primary` (pink_03) | `theme.colors.primary` |
46
+ | Inactive | `theme.colors.text.hint` (black_12) | `theme.colors.text.hint` |
47
+
48
+ ### Active Indicator
49
+ - Animated bar that follows the selected tab
50
+ - Color: `theme.colors.primary`
51
+ - Height: 2px
52
+ - Width: tab width
53
+ - Position: top of tab bar
54
+ - Animation: horizontal slide (200ms)
55
+
56
+ ---
57
+
58
+ ## Badge & Notification Dot
59
+
60
+ ### BadgeDot
61
+ - **Size**: Small (10dp)
62
+ - **Position**: Top-right of icon, offset -2/-2
63
+ - **Color**: `Colors.red_03`
64
+ - **Use for**: Unread indicator, new content flag
65
+
66
+ ### Badge Count
67
+ - **Min size**: 18x18
68
+ - **Shape**: Pill (full radius)
69
+ - **Background**: `Colors.red_03`
70
+ - **Text**: White, `caption_s_semibold`
71
+ - **Position**: Top-right of icon
72
+ - **Content**: Number or "99+" for overflow
73
+ - **"0"**: Hidden (badge disappears)
74
+
75
+ ---
76
+
77
+ ## Floating Action Button (FAB)
78
+
79
+ - **Position**: Centered between tabs, elevated above tab bar
80
+ - **Size**: 56x56
81
+ - **Shape**: Circle with curved container cutout
82
+ - **Background**: `theme.colors.primary` (pink_03)
83
+ - **Icon**: White, 24px
84
+ - **Label**: `caption_s_regular` below FAB, `theme.colors.primary`
85
+ - **Shadow**: Elevation shadow
86
+ - **Container**: Curved cutout in tab bar creates visual separation
87
+
88
+ ---
89
+
90
+ ## Tab Transition
91
+
92
+ - **Animation**: Fade + scale (200ms)
93
+ - **Content**: Each tab maintains its own navigation stack
94
+ - **State preservation**: Tab content preserved when switching between tabs
95
+ - **Scroll position**: Maintained per tab
96
+
97
+ ---
98
+
99
+ ## Usage Guidelines
100
+
101
+ ### Tab Count Rules
102
+
103
+ | Count | Recommendation |
104
+ |-------|---------------|
105
+ | 2 | Don't use tabs — consider segmented control or toggle |
106
+ | 3 | Ideal — clean layout with clear purpose per tab |
107
+ | 4 | Good — balanced with clear labels |
108
+ | 5 | Maximum — use concise labels, consider icon-only for some |
109
+ | 6+ | Don't — use different navigation pattern |
110
+
111
+ ### Tab Label Rules
112
+ - Keep labels to 1 word (max 2 short words)
113
+ - Use nouns, not verbs ("Home" not "Go Home")
114
+ - Be consistent — all nouns or all verbs, not mixed
115
+
116
+ ---
117
+
118
+ ## Do's & Don'ts
119
+
120
+ ### Do's
121
+ - Use bottom tabs for top-level navigation (3–5 destinations)
122
+ - Show badges for actionable notifications
123
+ - Keep tab labels short and descriptive
124
+ - Maintain scroll position when switching tabs
125
+
126
+ ### Don'ts
127
+ - Don't use more than 5 tabs
128
+ - Don't use bottom tabs for secondary or nested navigation
129
+ - Don't hide the tab bar on scroll (keep it always visible)
130
+ - Don't use different icon styles across tabs (outline vs filled — be consistent)
131
+ - Don't place destructive actions in the tab bar
@@ -0,0 +1,161 @@
1
+ # Bottom Sheet — Design Guideline
2
+
3
+ ## Overview
4
+
5
+ Bottom sheets slide up from the bottom of the screen to reveal additional content or actions. They maintain context by keeping the parent screen partially visible.
6
+
7
+ ---
8
+
9
+ ## Anatomy
10
+
11
+ ```
12
+ ┌──────────────────────────────────────────────┐
13
+ │ │
14
+ │ Parent Screen (dimmed) │
15
+ │ │
16
+ ├──────────────────────────────────────────────┤
17
+ │ ─── Handle ─── │ Radius.L
18
+ │ │ (top corners)
19
+ │ │
20
+ │ Sheet Content │
21
+ │ (scrollable if needed) │
22
+ │ │
23
+ │ │
24
+ │ │
25
+ └──────────────────────────────────────────────┘
26
+ ↑ safe area bottom
27
+ ```
28
+
29
+ ---
30
+
31
+ ## Visual Specs
32
+
33
+ | Property | Value |
34
+ |----------|-------|
35
+ | Background | `theme.colors.background.surface` |
36
+ | Corner radius | `Radius.L` (16) — top-left and top-right only |
37
+ | Handle | 36x4, `Colors.black_06`, centered, `Spacing.S` from top |
38
+ | Backdrop | `Colors.black_20` at 40% opacity |
39
+ | Content padding | `Spacing.XL` (24) horizontal, `Spacing.L` (16) vertical |
40
+ | Max height | 90% of screen height |
41
+ | Min height | Content-driven (auto-size) |
42
+
43
+ ---
44
+
45
+ ## Sheet Variants
46
+
47
+ ### Standard Sheet
48
+ - **Content**: Custom composable content
49
+ - **Height**: Auto-sized to content (up to 90% screen)
50
+ - **Scroll**: Scrollable if content exceeds height
51
+ - **Use for**: Action lists, selections, additional info
52
+
53
+ ### Surface Sheet
54
+ - **Surface mode** (`isSurface = true`): White surface background without handle
55
+ - **Use for**: Integrated content that feels like part of the screen
56
+
57
+ ---
58
+
59
+ ## Interaction Specs
60
+
61
+ ### Opening
62
+ - Animation: Slide up from bottom (300ms, ease-out)
63
+ - Backdrop: Fade in simultaneously
64
+
65
+ ### Closing
66
+ - Swipe down on handle or content
67
+ - Tap backdrop (if `barrierDismissible = true`)
68
+ - System back button/gesture
69
+ - Programmatic dismiss
70
+ - Animation: Slide down (250ms, ease-in)
71
+
72
+ ### Gestures
73
+ - **Drag handle**: Swipe down to dismiss
74
+ - **Content scroll**: If content is scrollable, scroll reaches top then swipe dismisses
75
+ - **Velocity threshold**: Fast swipe down auto-dismisses
76
+
77
+ ---
78
+
79
+ ## Content Patterns
80
+
81
+ ### Action List
82
+ ```
83
+ ─── Handle ───
84
+
85
+ Action Item 1 [icon]
86
+ ─────────────────────────────
87
+ Action Item 2 [icon]
88
+ ─────────────────────────────
89
+ Action Item 3 [icon]
90
+
91
+ [ Cancel button (full width, text type) ]
92
+ ```
93
+
94
+ - Item height: 48
95
+ - Item padding: `Spacing.L` horizontal
96
+ - Typography: `body_default_regular`
97
+ - Divider: 1px `border.default` between items
98
+ - Cancel button: `Spacing.L` top margin
99
+
100
+ ### Selection List
101
+ ```
102
+ ─── Handle ───
103
+
104
+ Title (headline_s_bold)
105
+
106
+ ○ Option A
107
+ ● Option B (selected)
108
+ ○ Option C
109
+
110
+ [ Confirm button (full width, primary) ]
111
+ ```
112
+
113
+ - Radio/Checkbox with label
114
+ - Spacing between options: `Spacing.M`
115
+ - Confirm button: `Spacing.XL` top margin
116
+
117
+ ### Information Sheet
118
+ ```
119
+ ─── Handle ───
120
+
121
+ Title (headline_s_bold)
122
+
123
+ Description text (body_default_regular)
124
+ Multi-line content with details...
125
+
126
+ [ Got it (full width, primary) ]
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Usage Guidelines
132
+
133
+ ### When to Use Bottom Sheet
134
+ - Secondary actions for a list item
135
+ - Filter/sort options
136
+ - Selection from a list of options (< 10 items)
137
+ - Additional details without leaving context
138
+ - Share/export options
139
+
140
+ ### When NOT to Use
141
+ - Critical confirmations → Use Dialog Modal (PopupNotify)
142
+ - Complex forms → Use full-screen modal (Present) or new screen
143
+ - Primary navigation → Use Push or tabs
144
+ - Many options (10+) → Use a full screen with search
145
+
146
+ ---
147
+
148
+ ## Do's & Don'ts
149
+
150
+ ### Do's
151
+ - Keep bottom sheet content concise and scannable
152
+ - Show handle for swipe-to-dismiss affordance
153
+ - Allow backdrop tap to dismiss for non-critical sheets
154
+ - Use standard content patterns (action list, selection, info)
155
+
156
+ ### Don'ts
157
+ - Don't nest bottom sheets inside bottom sheets
158
+ - Don't use bottom sheets for lengthy forms
159
+ - Don't disable swipe-to-dismiss unless data loss is possible
160
+ - Don't make bottom sheets taller than 90% of screen
161
+ - Don't use bottom sheets for content that needs to persist
@@ -0,0 +1,133 @@
1
+ # Modal — Design Guideline
2
+
3
+ ## Overview
4
+
5
+ Modals are overlay dialogs that require user attention and action before continuing. They interrupt the user flow for important decisions.
6
+
7
+ ---
8
+
9
+ ## Modal Types
10
+
11
+ ### Dialog Modal (PopupNotify)
12
+ - **Coverage**: Centered overlay, ~80% screen width, max 320
13
+ - **Background dim**: `Colors.black_20` at 40% opacity
14
+ - **Container**: `theme.colors.background.surface`, `Radius.L` (16), `Spacing.XL` (24) padding
15
+ - **Animation**: Fade in + scale from 0.9 to 1.0
16
+
17
+ ### Full-screen Modal (Present)
18
+ - **Coverage**: Full screen (slides up from bottom)
19
+ - **Background**: No dimming (full replacement)
20
+ - **Has own header**: Default or custom
21
+ - **Animation**: Vertical slide up
22
+ - **Dismiss**: Swipe down or back button
23
+
24
+ ---
25
+
26
+ ## Dialog Modal Anatomy
27
+
28
+ ```
29
+ ┌────── Dimmed Background (40% black) ─────────┐
30
+ │ │
31
+ │ ┌──────────────────────────────┐ │
32
+ │ │ [✕] │ Radius.L │
33
+ │ │ │ │
34
+ │ │ [Illustration/Image] │ │
35
+ │ │ │ │
36
+ │ │ Title │ │
37
+ │ │ (headline_s_bold) │ │
38
+ │ │ │ │
39
+ │ │ Description text │ │
40
+ │ │ (body_default_regular) │ │
41
+ │ │ │ │
42
+ │ │ ┌──────────┐ ┌──────────┐ │ │
43
+ │ │ │ Secondary│ │ Primary │ │ row mode │
44
+ │ │ └──────────┘ └──────────┘ │ │
45
+ │ │ │ │
46
+ │ └──────────────────────────────┘ │
47
+ │ │
48
+ └───────────────────────────────────────────────┘
49
+ ```
50
+
51
+ ### Dialog Elements
52
+
53
+ | Element | Spec | Required |
54
+ |---------|------|----------|
55
+ | Close icon (✕) | Top-right, 24px, `black_12` | Optional |
56
+ | Image/Illustration | Centered, max 120px height | Optional |
57
+ | Title | `headline_s_bold`, `text.default` | Yes |
58
+ | Description | `body_default_regular`, `text.secondary` | Optional |
59
+ | Primary button | Full width or half width | Yes |
60
+ | Secondary button | Full width or half width | Optional |
61
+
62
+ ### Button Layout
63
+
64
+ | Mode | Behavior | Use when |
65
+ |------|----------|----------|
66
+ | Row | Side-by-side (secondary left, primary right) | Short button labels |
67
+ | Column | Stacked (primary top, secondary bottom) | Long button labels |
68
+ | Auto | System decides based on text length | Default |
69
+
70
+ ### Button Spacing
71
+ - Gap between buttons: `Spacing.S` (8)
72
+ - Buttons to container edge: `Spacing.XL` (24)
73
+ - Title to description gap: `Spacing.S` (8)
74
+ - Description to buttons gap: `Spacing.XL` (24)
75
+
76
+ ---
77
+
78
+ ## Interaction Specs
79
+
80
+ ### Opening
81
+ - Animation: 200ms fade in + scale (0.9 → 1.0)
82
+ - Background dim: 200ms fade in
83
+
84
+ ### Closing
85
+ - Tap close icon (✕)
86
+ - Tap dimmed background (if `barrierDismissible = true`)
87
+ - System back button/gesture
88
+ - Button action
89
+ - Animation: 150ms fade out
90
+
91
+ ### Focus Trap
92
+ - Focus stays within modal while open
93
+ - Tab order: Close → Content → Secondary → Primary
94
+ - Escape/Back dismisses
95
+
96
+ ---
97
+
98
+ ## Usage Guidelines
99
+
100
+ ### When to Use Dialog Modal
101
+ - Destructive confirmations ("Delete this item?")
102
+ - Important alerts requiring acknowledgment
103
+ - Decision points with 2 clear options
104
+ - Success/error states that need user action
105
+
106
+ ### When to Use Full-screen Modal (Present)
107
+ - Creation flows (new post, compose message)
108
+ - Complex forms that need full screen
109
+ - Media preview/editing
110
+ - Multi-step flows within a modal context
111
+
112
+ ### When NOT to Use Modal
113
+ - Simple feedback → Use Toast or SnackBar
114
+ - Informational notices → Use Information component
115
+ - Navigation → Use Push transition
116
+ - Content that user may need to reference while acting → Use inline UI
117
+
118
+ ---
119
+
120
+ ## Do's & Don'ts
121
+
122
+ ### Do's
123
+ - Keep dialog content concise — title + 1–2 sentences max
124
+ - Make primary action clear and descriptive ("Delete", not "OK")
125
+ - Use destructive style (`danger` button type) for irreversible actions
126
+ - Allow dismissal via background tap for non-critical dialogs
127
+
128
+ ### Don'ts
129
+ - Don't stack modals on top of modals
130
+ - Don't use modals for long forms — use full-screen modal (Present) instead
131
+ - Don't use generic labels ("OK" / "Cancel") — be specific
132
+ - Don't auto-dismiss important dialogs — require user action
133
+ - Don't put scrollable content in a dialog modal
@@ -0,0 +1,225 @@
1
+ # Navigation Options — Design Guideline
2
+
3
+ ## Overview
4
+
5
+ Navigation options configure screen headers — title types, right action buttons, background styles, and back behavior. These options are set dynamically per screen and control the header appearance and behavior.
6
+
7
+ ---
8
+
9
+ ## Header Title Types
10
+
11
+ ### Default Title
12
+ - **Content**: Plain text string
13
+ - **Typography**: `headline_s_bold`
14
+ - **Color**: `theme.colors.text.default`
15
+ - **Alignment**: Center-aligned within the header
16
+ - **Max length**: ~20 characters (truncate with ellipsis)
17
+
18
+ ### User Title
19
+ Shows a user profile in the header with avatar, name, subtitle, and optional verification icons.
20
+
21
+ ```
22
+ ┌──────────────────────────────────────────────┐
23
+ │ [←] [Avatar] John Doe [✓] [🔍] [⋯] │
24
+ │ Online │
25
+ └──────────────────────────────────────────────┘
26
+ ```
27
+
28
+ | Part | Description |
29
+ |------------------|------------------------------------------------|
30
+ | Avatar | User profile image (circular, 32px) |
31
+ | Title | User name, `headline_s_bold` |
32
+ | Subtitle | Status text (e.g., "Online"), `caption_default_regular` |
33
+ | Status Dot | Colored dot indicator on avatar |
34
+ | Verification Icons | Badge icons after the name |
35
+ | Loading Skeleton | Placeholder skeleton while loading |
36
+
37
+ ### Location Title
38
+ Shows a location with dropdown chevron for location picker.
39
+
40
+ ```
41
+ ┌──────────────────────────────────────────────┐
42
+ │ [←] Ho Chi Minh City [▼] [🔍] [⋯] │
43
+ │ Current location │
44
+ └──────────────────────────────────────────────┘
45
+ ```
46
+
47
+ | Part | Description |
48
+ |-------------|-----------------------------------------------------|
49
+ | Location | Location name, `headline_s_bold` |
50
+ | Description | Context text, `caption_default_regular` |
51
+ | Chevron | Dropdown indicator, tappable to open location picker |
52
+
53
+ ### Journey Title
54
+ Shows start and end points with directional indicator.
55
+
56
+ ```
57
+ ┌──────────────────────────────────────────────┐
58
+ │ [←] District 1 → District 7 [🔍] [⋯] │
59
+ │ 12 km │
60
+ └──────────────────────────────────────────────┘
61
+ ```
62
+
63
+ | Part | Description |
64
+ |-------------|------------------------------------------------------|
65
+ | Start | Origin text, `headline_s_bold` |
66
+ | Direction | Arrow icon between start and end |
67
+ | End | Destination text, `headline_s_bold` |
68
+ | Description | Distance or context, `caption_default_regular` |
69
+
70
+ ---
71
+
72
+ ## Header Right Actions
73
+
74
+ ### Toolkit (Default)
75
+
76
+ Standard header right configuration with help center, close/home button, and optional tool menu items.
77
+
78
+ ```
79
+ ┌──────────────────────────────────────────────┐
80
+ │ [←] Screen Title [📌] [?] [🏠] │
81
+ └──────────────────────────────────────────────┘
82
+ ```
83
+
84
+ | Part | Description |
85
+ |----------------|----------------------------------------------------|
86
+ | Help Button | Opens help center (always present) |
87
+ | Home/Close | Navigate home or close screen (always present) |
88
+ | Shortcut Pin | Pin/unpin to shortcuts (optional) |
89
+ | Tool Items | Additional action icons (optional) |
90
+
91
+ **Tool menu behavior:**
92
+ | Tool Count | Display |
93
+ |------------|---------------------------------------------------|
94
+ | 0 tools | Shows only help + close |
95
+ | 1 tool | Shows single tool icon directly in header |
96
+ | 2+ tools | Shows `⋯` more button that opens a menu |
97
+
98
+ **Tool Item Spec:**
99
+
100
+ | Property | Description |
101
+ |-------------|-----------------------------------------------------|
102
+ | Icon | 24px icon name |
103
+ | Name | Bilingual label `{ vi: '...', en: '...' }` |
104
+ | Key | Unique identifier |
105
+ | Badge | Optional badge indicator |
106
+
107
+ ### OnBoarding
108
+
109
+ Simple text button for onboarding flows (e.g., "Skip" / "Bỏ qua").
110
+
111
+ ```
112
+ ┌──────────────────────────────────────────────┐
113
+ │ [←] Welcome [Skip] │
114
+ └──────────────────────────────────────────────┘
115
+ ```
116
+
117
+ - **Typography**: `action_default_bold`
118
+ - **Color**: `theme.colors.interactive.default`
119
+ - **Touch target**: Minimum 44pt
120
+
121
+ ---
122
+
123
+ ## Header Background
124
+
125
+ ### Standard
126
+ - **Color**: `theme.colors.background.surface`
127
+ - **Bottom border**: 1px `theme.colors.border.default`
128
+
129
+ ### Gradient
130
+ - **Color**: Custom gradient color (e.g., `#AF1F68`)
131
+ - **Tint**: White icons and text on dark gradient backgrounds
132
+ - **Override**: Replaces theme-based background
133
+
134
+ ### Custom Image
135
+ - **Image**: Background image URL
136
+ - **Overlay**: Semi-transparent overlay for text readability
137
+ - **Tint**: White icons and text
138
+
139
+ ### Shadow
140
+ - **Shadow**: Subtle bottom shadow for elevation effect
141
+ - **Use when**: Header needs visual separation without a border line
142
+
143
+ ---
144
+
145
+ ## Animated Header
146
+
147
+ Collapses from extended to default height on scroll.
148
+
149
+ | Property | Description |
150
+ |-----------------|-------------------------------------------------|
151
+ | Expanded height | 88–120 |
152
+ | Collapsed height| 44–56 |
153
+ | Tint color | Icon/text color (often white for custom backgrounds) |
154
+ | Title | Title shown in collapsed state |
155
+ | Custom component| Optional component for expanded state |
156
+
157
+ ---
158
+
159
+ ## Search Header
160
+
161
+ Integrates InputSearch into an extended header.
162
+
163
+ ```
164
+ ┌──────────────────────────────────────────────┐
165
+ │ [←] Screen Title [🔍] [⋯] │
166
+ │ ┌────────────────────────────────────────┐ │
167
+ │ │ 🔍 Search... │ │
168
+ │ └────────────────────────────────────────┘ │
169
+ └──────────────────────────────────────────────┘
170
+ ```
171
+
172
+ - **Header type**: Must be `extended`
173
+ - **Search bar**: Full-width InputSearch below the title area
174
+ - **Animation**: Search expands on focus, collapses on cancel
175
+ - **Filter button**: Optional action buttons alongside search
176
+
177
+ ---
178
+
179
+ ## Back Navigation
180
+
181
+ ### Standard Back
182
+ - **Icon**: Chevron left, 24px
183
+ - **Touch target**: 44x44pt
184
+ - **Action**: Navigate back in the stack
185
+
186
+ ### Hidden Back
187
+ - Hide the back button entirely (e.g., for root screens)
188
+
189
+ ### Custom Back Handler
190
+ - Intercept the back action for custom logic
191
+ - Example: show unsaved changes confirmation
192
+
193
+ ### Prevent Back (Confirmation Dialog)
194
+ - Show a PopupNotify confirmation before allowing back navigation
195
+ - Use for screens with unsaved changes or destructive navigation
196
+
197
+ ---
198
+
199
+ ## Usage Guidelines
200
+
201
+ | Screen Type | Title Type | Header Right | Background |
202
+ |--------------------|-----------|---------------|---------------|
203
+ | Standard detail | Default | Toolkit | Standard |
204
+ | Chat/messaging | User | Toolkit | Standard |
205
+ | Maps/location | Location | Toolkit | Standard |
206
+ | Ride/delivery | Journey | Toolkit | Standard |
207
+ | Onboarding flow | Default | OnBoarding | Gradient |
208
+ | Search screen | Default | Toolkit | Extended+Search |
209
+ | Hero/marketing | Default | Toolkit | Custom Image |
210
+
211
+ ---
212
+
213
+ ## Do's & Don'ts
214
+
215
+ ### Do's
216
+ - Use the appropriate title type for the screen context (User for profiles, Location for maps)
217
+ - Provide bilingual labels `{ vi, en }` for all tool menu items
218
+ - Use `preventBack` for screens with unsaved form data
219
+ - Keep tool menu items to 3 or fewer per group
220
+
221
+ ### Don'ts
222
+ - Don't put more than 3 action icons in the header right area
223
+ - Don't mix OnBoarding and Toolkit header right styles
224
+ - Don't use custom gradient backgrounds without adjusting tint color for contrast
225
+ - Don't hide the back button on non-root screens without providing an alternative navigation path