@urbint/cl 1.0.1

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 (206) hide show
  1. package/.cursor/rules +313 -0
  2. package/.rnstorybook/index.ts +11 -0
  3. package/.rnstorybook/main.ts +8 -0
  4. package/.rnstorybook/preview.tsx +14 -0
  5. package/.rnstorybook/storybook.requires.ts +49 -0
  6. package/.storybook/main.ts +16 -0
  7. package/.storybook/preview.ts +32 -0
  8. package/.storybook/vitest.setup.ts +7 -0
  9. package/App.tsx +422 -0
  10. package/README.md +229 -0
  11. package/app.json +33 -0
  12. package/assets/adaptive-icon.png +0 -0
  13. package/assets/favicon.png +0 -0
  14. package/assets/icon.png +0 -0
  15. package/assets/splash-icon.png +0 -0
  16. package/babel.config.js +16 -0
  17. package/docs/components/CodeBlock.tsx +80 -0
  18. package/docs/components/PropTable.tsx +93 -0
  19. package/docs/components/Sidebar.tsx +199 -0
  20. package/docs/components/index.ts +8 -0
  21. package/docs/data/colorTokens.ts +70 -0
  22. package/docs/data/componentData.tsx +1685 -0
  23. package/docs/data/index.ts +7 -0
  24. package/docs/index.ts +19 -0
  25. package/docs/navigation.ts +94 -0
  26. package/docs/pages/ColorsPage.tsx +226 -0
  27. package/docs/pages/ComponentPage.tsx +235 -0
  28. package/docs/pages/InstallationPage.tsx +232 -0
  29. package/docs/pages/IntroductionPage.tsx +163 -0
  30. package/docs/pages/ThemingPage.tsx +251 -0
  31. package/docs/pages/index.ts +10 -0
  32. package/docs/theme.ts +64 -0
  33. package/docs/types.ts +54 -0
  34. package/index.ts +8 -0
  35. package/llms.txt +1893 -0
  36. package/mcp-config.example.json +10 -0
  37. package/mcp-server/README.md +192 -0
  38. package/mcp-server/package-lock.json +1707 -0
  39. package/mcp-server/package.json +38 -0
  40. package/mcp-server/src/index.ts +1136 -0
  41. package/mcp-server/src/registry/components.ts +1446 -0
  42. package/mcp-server/src/registry/index.ts +3 -0
  43. package/mcp-server/src/registry/tokens.ts +256 -0
  44. package/mcp-server/tsconfig.json +19 -0
  45. package/package.json +92 -0
  46. package/src/components/Accordion/Accordion.stories.tsx +226 -0
  47. package/src/components/Accordion/Accordion.tsx +255 -0
  48. package/src/components/Accordion/index.ts +12 -0
  49. package/src/components/ActionSheet/ActionSheet.stories.tsx +393 -0
  50. package/src/components/ActionSheet/ActionSheet.tsx +258 -0
  51. package/src/components/ActionSheet/index.ts +2 -0
  52. package/src/components/Alert/Alert.stories.tsx +165 -0
  53. package/src/components/Alert/Alert.tsx +164 -0
  54. package/src/components/Alert/index.ts +2 -0
  55. package/src/components/AlertDialog/AlertDialog.stories.tsx +330 -0
  56. package/src/components/AlertDialog/AlertDialog.tsx +234 -0
  57. package/src/components/AlertDialog/index.ts +2 -0
  58. package/src/components/Avatar/Avatar.stories.tsx +154 -0
  59. package/src/components/Avatar/Avatar.tsx +219 -0
  60. package/src/components/Avatar/index.ts +2 -0
  61. package/src/components/Badge/Badge.stories.tsx +146 -0
  62. package/src/components/Badge/Badge.tsx +125 -0
  63. package/src/components/Badge/index.ts +2 -0
  64. package/src/components/Box/Box.stories.tsx +192 -0
  65. package/src/components/Box/Box.tsx +184 -0
  66. package/src/components/Box/index.ts +2 -0
  67. package/src/components/Button/Button.stories.tsx +157 -0
  68. package/src/components/Button/Button.tsx +180 -0
  69. package/src/components/Button/index.ts +2 -0
  70. package/src/components/Card/Card.stories.tsx +145 -0
  71. package/src/components/Card/Card.tsx +169 -0
  72. package/src/components/Card/index.ts +11 -0
  73. package/src/components/Center/Center.stories.tsx +215 -0
  74. package/src/components/Center/Center.tsx +29 -0
  75. package/src/components/Center/index.ts +2 -0
  76. package/src/components/Checkbox/Checkbox.stories.tsx +94 -0
  77. package/src/components/Checkbox/Checkbox.tsx +242 -0
  78. package/src/components/Checkbox/index.ts +2 -0
  79. package/src/components/DatePicker/DatePicker.stories.tsx +623 -0
  80. package/src/components/DatePicker/DatePicker.tsx +1228 -0
  81. package/src/components/DatePicker/index.ts +8 -0
  82. package/src/components/Divider/Divider.stories.tsx +224 -0
  83. package/src/components/Divider/Divider.tsx +73 -0
  84. package/src/components/Divider/index.ts +2 -0
  85. package/src/components/Drawer/Drawer.stories.tsx +414 -0
  86. package/src/components/Drawer/Drawer.tsx +342 -0
  87. package/src/components/Drawer/index.ts +11 -0
  88. package/src/components/Fab/Fab.stories.tsx +360 -0
  89. package/src/components/Fab/Fab.tsx +185 -0
  90. package/src/components/Fab/index.ts +2 -0
  91. package/src/components/FormControl/FormControl.stories.tsx +276 -0
  92. package/src/components/FormControl/FormControl.tsx +185 -0
  93. package/src/components/FormControl/index.ts +12 -0
  94. package/src/components/Grid/Grid.stories.tsx +244 -0
  95. package/src/components/Grid/Grid.tsx +93 -0
  96. package/src/components/Grid/index.ts +2 -0
  97. package/src/components/HStack/HStack.stories.tsx +230 -0
  98. package/src/components/HStack/HStack.tsx +80 -0
  99. package/src/components/HStack/index.ts +2 -0
  100. package/src/components/Heading/Heading.stories.tsx +111 -0
  101. package/src/components/Heading/Heading.tsx +85 -0
  102. package/src/components/Heading/index.ts +2 -0
  103. package/src/components/Icon/Icon.stories.tsx +320 -0
  104. package/src/components/Icon/Icon.tsx +117 -0
  105. package/src/components/Icon/index.ts +2 -0
  106. package/src/components/Image/Image.stories.tsx +357 -0
  107. package/src/components/Image/Image.tsx +168 -0
  108. package/src/components/Image/index.ts +2 -0
  109. package/src/components/Input/Input.stories.tsx +164 -0
  110. package/src/components/Input/Input.tsx +274 -0
  111. package/src/components/Input/index.ts +2 -0
  112. package/src/components/Link/Link.stories.tsx +187 -0
  113. package/src/components/Link/Link.tsx +104 -0
  114. package/src/components/Link/index.ts +2 -0
  115. package/src/components/Menu/Menu.stories.tsx +363 -0
  116. package/src/components/Menu/Menu.tsx +238 -0
  117. package/src/components/Menu/index.ts +2 -0
  118. package/src/components/Modal/Modal.stories.tsx +156 -0
  119. package/src/components/Modal/Modal.tsx +280 -0
  120. package/src/components/Modal/index.ts +11 -0
  121. package/src/components/Popover/Popover.stories.tsx +330 -0
  122. package/src/components/Popover/Popover.tsx +315 -0
  123. package/src/components/Popover/index.ts +11 -0
  124. package/src/components/Portal/Portal.stories.tsx +376 -0
  125. package/src/components/Portal/Portal.tsx +100 -0
  126. package/src/components/Portal/index.ts +2 -0
  127. package/src/components/Pressable/Pressable.stories.tsx +338 -0
  128. package/src/components/Pressable/Pressable.tsx +71 -0
  129. package/src/components/Pressable/index.ts +2 -0
  130. package/src/components/Progress/Progress.stories.tsx +131 -0
  131. package/src/components/Progress/Progress.tsx +219 -0
  132. package/src/components/Progress/index.ts +2 -0
  133. package/src/components/Radio/Radio.stories.tsx +101 -0
  134. package/src/components/Radio/Radio.tsx +234 -0
  135. package/src/components/Radio/index.ts +2 -0
  136. package/src/components/Select/Select.stories.tsx +908 -0
  137. package/src/components/Select/Select.tsx +659 -0
  138. package/src/components/Select/index.ts +8 -0
  139. package/src/components/Skeleton/Skeleton.stories.tsx +154 -0
  140. package/src/components/Skeleton/Skeleton.tsx +192 -0
  141. package/src/components/Skeleton/index.ts +8 -0
  142. package/src/components/Slider/Slider.stories.tsx +363 -0
  143. package/src/components/Slider/Slider.tsx +209 -0
  144. package/src/components/Slider/index.ts +2 -0
  145. package/src/components/Spinner/Spinner.stories.tsx +108 -0
  146. package/src/components/Spinner/Spinner.tsx +121 -0
  147. package/src/components/Spinner/index.ts +2 -0
  148. package/src/components/Switch/Switch.stories.tsx +116 -0
  149. package/src/components/Switch/Switch.tsx +172 -0
  150. package/src/components/Switch/index.ts +2 -0
  151. package/src/components/Table/Table.stories.tsx +417 -0
  152. package/src/components/Table/Table.tsx +233 -0
  153. package/src/components/Table/index.ts +2 -0
  154. package/src/components/Text/Text.stories.tsx +93 -0
  155. package/src/components/Text/Text.tsx +119 -0
  156. package/src/components/Text/index.ts +2 -0
  157. package/src/components/Textarea/Textarea.stories.tsx +280 -0
  158. package/src/components/Textarea/Textarea.tsx +212 -0
  159. package/src/components/Textarea/index.ts +2 -0
  160. package/src/components/Toast/Toast.stories.tsx +446 -0
  161. package/src/components/Toast/Toast.tsx +221 -0
  162. package/src/components/Toast/index.ts +2 -0
  163. package/src/components/Tooltip/Tooltip.stories.tsx +354 -0
  164. package/src/components/Tooltip/Tooltip.tsx +261 -0
  165. package/src/components/Tooltip/index.ts +2 -0
  166. package/src/components/VStack/VStack.stories.tsx +183 -0
  167. package/src/components/VStack/VStack.tsx +76 -0
  168. package/src/components/VStack/index.ts +2 -0
  169. package/src/components/index.ts +62 -0
  170. package/src/hooks/index.ts +7 -0
  171. package/src/hooks/useControllableState.ts +41 -0
  172. package/src/hooks/useDisclosure.ts +51 -0
  173. package/src/index.ts +22 -0
  174. package/src/stories/Button.stories.tsx +53 -0
  175. package/src/stories/Button.tsx +101 -0
  176. package/src/stories/Configure.mdx +364 -0
  177. package/src/stories/Header.stories.tsx +33 -0
  178. package/src/stories/Header.tsx +75 -0
  179. package/src/stories/Page.stories.tsx +25 -0
  180. package/src/stories/Page.tsx +154 -0
  181. package/src/stories/assets/accessibility.png +0 -0
  182. package/src/stories/assets/accessibility.svg +1 -0
  183. package/src/stories/assets/addon-library.png +0 -0
  184. package/src/stories/assets/assets.png +0 -0
  185. package/src/stories/assets/avif-test-image.avif +0 -0
  186. package/src/stories/assets/context.png +0 -0
  187. package/src/stories/assets/discord.svg +1 -0
  188. package/src/stories/assets/docs.png +0 -0
  189. package/src/stories/assets/figma-plugin.png +0 -0
  190. package/src/stories/assets/github.svg +1 -0
  191. package/src/stories/assets/share.png +0 -0
  192. package/src/stories/assets/styling.png +0 -0
  193. package/src/stories/assets/testing.png +0 -0
  194. package/src/stories/assets/theming.png +0 -0
  195. package/src/stories/assets/tutorials.svg +1 -0
  196. package/src/stories/assets/youtube.svg +1 -0
  197. package/src/styles/index.ts +7 -0
  198. package/src/styles/tokens.ts +318 -0
  199. package/src/styles/unistyles.ts +254 -0
  200. package/src/utils/createContext.tsx +25 -0
  201. package/src/utils/index.ts +7 -0
  202. package/src/utils/mergeRefs.ts +21 -0
  203. package/tsconfig.json +26 -0
  204. package/urbint-cl-1.0.0.tgz +0 -0
  205. package/vitest.config.ts +37 -0
  206. package/vitest.shims.d.ts +1 -0
package/App.tsx ADDED
@@ -0,0 +1,422 @@
1
+ /**
2
+ * Urbint Component Library - Documentation Website
3
+ */
4
+
5
+ import React, { useState } from 'react';
6
+ import {
7
+ View,
8
+ Text,
9
+ StyleSheet,
10
+ SafeAreaView,
11
+ ScrollView,
12
+ Pressable,
13
+ } from 'react-native';
14
+
15
+ import {
16
+ Sidebar,
17
+ IntroductionPage,
18
+ InstallationPage,
19
+ ColorsPage,
20
+ ThemingPage,
21
+ ComponentPage,
22
+ colors,
23
+ spacing,
24
+ } from './docs';
25
+
26
+ export default function App() {
27
+ const [activePage, setActivePage] = useState('introduction');
28
+ const [expandedSections, setExpandedSections] = useState(['getting-started', 'components']);
29
+
30
+ const handleNavigate = (pageId: string) => {
31
+ setActivePage(pageId);
32
+ };
33
+
34
+ const handleToggleSection = (sectionId: string) => {
35
+ setExpandedSections(prev =>
36
+ prev.includes(sectionId)
37
+ ? prev.filter(id => id !== sectionId)
38
+ : [...prev, sectionId]
39
+ );
40
+ };
41
+
42
+ const renderContent = () => {
43
+ switch (activePage) {
44
+ // Getting Started
45
+ case 'introduction':
46
+ return <IntroductionPage />;
47
+ case 'installation':
48
+ return <InstallationPage />;
49
+ case 'quick-start':
50
+ return <QuickStartPage />;
51
+
52
+ // Design System
53
+ case 'colors':
54
+ return <ColorsPage />;
55
+ case 'typography':
56
+ return <TypographyPage />;
57
+ case 'spacing':
58
+ return <SpacingPage />;
59
+ case 'elevation':
60
+ return <ElevationPage />;
61
+
62
+ // Customization
63
+ case 'theming':
64
+ return <ThemingPage />;
65
+ case 'dark-mode':
66
+ return <DarkModePage />;
67
+ case 'custom-tokens':
68
+ return <CustomTokensPage />;
69
+
70
+ // Individual Components (new flat navigation)
71
+ default:
72
+ if (activePage.startsWith('component-')) {
73
+ const componentName = activePage.replace('component-', '');
74
+ return <ComponentPage componentId={componentName} />;
75
+ }
76
+ return <IntroductionPage />;
77
+ }
78
+ };
79
+
80
+ return (
81
+ <SafeAreaView style={styles.container}>
82
+ <View style={styles.layout}>
83
+ {/* Sidebar */}
84
+ <Sidebar
85
+ activePage={activePage}
86
+ onNavigate={handleNavigate}
87
+ expandedSections={expandedSections}
88
+ onToggleSection={handleToggleSection}
89
+ />
90
+
91
+ {/* Main Content */}
92
+ <ScrollView
93
+ style={styles.main}
94
+ contentContainerStyle={styles.mainContent}
95
+ showsVerticalScrollIndicator={false}
96
+ >
97
+ {renderContent()}
98
+ </ScrollView>
99
+ </View>
100
+ </SafeAreaView>
101
+ );
102
+ }
103
+
104
+ // Placeholder pages
105
+ const QuickStartPage = () => (
106
+ <View style={styles.page}>
107
+ <Text style={styles.pageTitle}>Quick Start</Text>
108
+ <Text style={styles.pageSubtitle}>Get up and running in 5 minutes</Text>
109
+
110
+ <View style={styles.section}>
111
+ <Text style={styles.sectionTitle}>1. Create a new Expo project</Text>
112
+ <View style={styles.codeBlock}>
113
+ <Text style={styles.code}>npx create-expo-app my-app{'\n'}cd my-app</Text>
114
+ </View>
115
+ </View>
116
+
117
+ <View style={styles.section}>
118
+ <Text style={styles.sectionTitle}>2. Install dependencies</Text>
119
+ <View style={styles.codeBlock}>
120
+ <Text style={styles.code}>npm install @urbint/component-library react-native-unistyles</Text>
121
+ </View>
122
+ </View>
123
+
124
+ <View style={styles.section}>
125
+ <Text style={styles.sectionTitle}>3. Import and use components</Text>
126
+ <View style={styles.codeBlock}>
127
+ <Text style={styles.code}>{`import { Button, Text } from '@urbint/component-library';
128
+
129
+ <Button variant="primary">Get Started</Button>`}</Text>
130
+ </View>
131
+ </View>
132
+ </View>
133
+ );
134
+
135
+ const TypographyPage = () => (
136
+ <View style={styles.page}>
137
+ <Text style={styles.pageTitle}>Typography</Text>
138
+ <Text style={styles.pageSubtitle}>Typography scale and font styles for consistent text rendering</Text>
139
+
140
+ <View style={styles.section}>
141
+ <Text style={styles.sectionTitle}>Type Scale</Text>
142
+ <View style={styles.typeList}>
143
+ <View style={styles.typeItem}>
144
+ <Text style={{ fontSize: 32, fontWeight: '700' }}>H1 Heading</Text>
145
+ <Text style={styles.typeLabel}>32px / Bold</Text>
146
+ </View>
147
+ <View style={styles.typeItem}>
148
+ <Text style={{ fontSize: 24, fontWeight: '600' }}>H2 Heading</Text>
149
+ <Text style={styles.typeLabel}>24px / SemiBold</Text>
150
+ </View>
151
+ <View style={styles.typeItem}>
152
+ <Text style={{ fontSize: 20, fontWeight: '600' }}>H3 Heading</Text>
153
+ <Text style={styles.typeLabel}>20px / SemiBold</Text>
154
+ </View>
155
+ <View style={styles.typeItem}>
156
+ <Text style={{ fontSize: 18, fontWeight: '600' }}>H4 Heading</Text>
157
+ <Text style={styles.typeLabel}>18px / SemiBold</Text>
158
+ </View>
159
+ <View style={styles.typeItem}>
160
+ <Text style={{ fontSize: 16 }}>Body Text</Text>
161
+ <Text style={styles.typeLabel}>16px / Regular</Text>
162
+ </View>
163
+ <View style={styles.typeItem}>
164
+ <Text style={{ fontSize: 14 }}>Label Text</Text>
165
+ <Text style={styles.typeLabel}>14px / Regular</Text>
166
+ </View>
167
+ <View style={styles.typeItem}>
168
+ <Text style={{ fontSize: 13, color: '#6B7280' }}>Caption Text</Text>
169
+ <Text style={styles.typeLabel}>13px / Regular</Text>
170
+ </View>
171
+ <View style={styles.typeItem}>
172
+ <Text style={{ fontSize: 12, color: '#9CA3AF' }}>Small Text</Text>
173
+ <Text style={styles.typeLabel}>12px / Regular</Text>
174
+ </View>
175
+ </View>
176
+ </View>
177
+ </View>
178
+ );
179
+
180
+ const SpacingPage = () => (
181
+ <View style={styles.page}>
182
+ <Text style={styles.pageTitle}>Spacing</Text>
183
+ <Text style={styles.pageSubtitle}>Consistent spacing scale for margins, padding, and gaps</Text>
184
+
185
+ <View style={styles.section}>
186
+ <Text style={styles.sectionTitle}>Spacing Scale</Text>
187
+ <View style={styles.spacingList}>
188
+ {[
189
+ { name: 'xs', value: 4 },
190
+ { name: 'sm', value: 8 },
191
+ { name: 'md', value: 12 },
192
+ { name: 'lg', value: 16 },
193
+ { name: 'xl', value: 24 },
194
+ { name: '2xl', value: 32 },
195
+ { name: '3xl', value: 48 },
196
+ { name: '4xl', value: 64 },
197
+ ].map(item => (
198
+ <View key={item.name} style={styles.spacingItem}>
199
+ <View style={[styles.spacingBox, { width: item.value, height: item.value }]} />
200
+ <Text style={styles.spacingName}>{item.name}</Text>
201
+ <Text style={styles.spacingValue}>{item.value}px</Text>
202
+ </View>
203
+ ))}
204
+ </View>
205
+ </View>
206
+ </View>
207
+ );
208
+
209
+ const ElevationPage = () => (
210
+ <View style={styles.page}>
211
+ <Text style={styles.pageTitle}>Elevation</Text>
212
+ <Text style={styles.pageSubtitle}>Shadow levels for creating visual hierarchy</Text>
213
+
214
+ <View style={styles.section}>
215
+ <Text style={styles.sectionTitle}>Elevation Scale</Text>
216
+ <View style={styles.elevationList}>
217
+ {[5, 10, 20, 30, 40].map(level => (
218
+ <View
219
+ key={level}
220
+ style={[
221
+ styles.elevationBox,
222
+ {
223
+ shadowColor: '#000',
224
+ shadowOffset: { width: 0, height: level / 10 },
225
+ shadowOpacity: 0.1 + (level / 100),
226
+ shadowRadius: level / 5,
227
+ elevation: level / 5,
228
+ }
229
+ ]}
230
+ >
231
+ <Text style={styles.elevationLabel}>Elevation {level}</Text>
232
+ </View>
233
+ ))}
234
+ </View>
235
+ </View>
236
+ </View>
237
+ );
238
+
239
+ const DarkModePage = () => (
240
+ <View style={styles.page}>
241
+ <Text style={styles.pageTitle}>Dark Mode</Text>
242
+ <Text style={styles.pageSubtitle}>Implementing dark mode in your application</Text>
243
+
244
+ <View style={styles.section}>
245
+ <Text style={styles.sectionTitle}>Automatic Theme Detection</Text>
246
+ <Text style={styles.paragraph}>
247
+ Urbint CL supports automatic theme switching based on system preferences.
248
+ Enable adaptive themes in your Unistyles configuration:
249
+ </Text>
250
+ <View style={styles.codeBlock}>
251
+ <Text style={styles.code}>{`StyleSheet.configure({
252
+ themes: { light: lightTheme, dark: darkTheme },
253
+ settings: {
254
+ adaptiveThemes: true, // Auto-switch based on OS
255
+ },
256
+ });`}</Text>
257
+ </View>
258
+ </View>
259
+
260
+ <View style={styles.section}>
261
+ <Text style={styles.sectionTitle}>Manual Theme Toggle</Text>
262
+ <View style={styles.codeBlock}>
263
+ <Text style={styles.code}>{`import { UnistylesRuntime } from 'react-native-unistyles';
264
+
265
+ const toggleTheme = () => {
266
+ const current = UnistylesRuntime.themeName;
267
+ UnistylesRuntime.setTheme(current === 'light' ? 'dark' : 'light');
268
+ };`}</Text>
269
+ </View>
270
+ </View>
271
+ </View>
272
+ );
273
+
274
+ const CustomTokensPage = () => (
275
+ <View style={styles.page}>
276
+ <Text style={styles.pageTitle}>Custom Tokens</Text>
277
+ <Text style={styles.pageSubtitle}>Extending and customizing design tokens</Text>
278
+
279
+ <View style={styles.section}>
280
+ <Text style={styles.sectionTitle}>Adding Custom Colors</Text>
281
+ <View style={styles.codeBlock}>
282
+ <Text style={styles.code}>{`const customTheme = {
283
+ ...baseTheme,
284
+ colors: {
285
+ ...baseTheme.colors,
286
+ custom: {
287
+ brandPink: '#EC4899',
288
+ brandTeal: '#14B8A6',
289
+ },
290
+ },
291
+ };`}</Text>
292
+ </View>
293
+ </View>
294
+
295
+ <View style={styles.section}>
296
+ <Text style={styles.sectionTitle}>Custom Spacing</Text>
297
+ <View style={styles.codeBlock}>
298
+ <Text style={styles.code}>{`const customSpacing = {
299
+ ...baseTheme.spacing,
300
+ '5xl': 80,
301
+ '6xl': 96,
302
+ };`}</Text>
303
+ </View>
304
+ </View>
305
+ </View>
306
+ );
307
+
308
+ const styles = StyleSheet.create({
309
+ container: {
310
+ flex: 1,
311
+ backgroundColor: colors.bgPrimary,
312
+ },
313
+ layout: {
314
+ flex: 1,
315
+ flexDirection: 'row',
316
+ },
317
+ main: {
318
+ flex: 1,
319
+ backgroundColor: colors.bgPrimary,
320
+ },
321
+ mainContent: {
322
+ minHeight: '100%',
323
+ },
324
+ page: {
325
+ padding: spacing['2xl'],
326
+ maxWidth: 900,
327
+ },
328
+ pageTitle: {
329
+ fontSize: 36,
330
+ fontWeight: '700',
331
+ color: colors.textPrimary,
332
+ marginBottom: spacing.md,
333
+ },
334
+ pageSubtitle: {
335
+ fontSize: 18,
336
+ color: colors.textSecondary,
337
+ lineHeight: 28,
338
+ marginBottom: spacing['2xl'],
339
+ },
340
+ section: {
341
+ marginBottom: spacing['2xl'],
342
+ },
343
+ sectionTitle: {
344
+ fontSize: 20,
345
+ fontWeight: '600',
346
+ color: colors.textPrimary,
347
+ marginBottom: spacing.lg,
348
+ },
349
+ paragraph: {
350
+ fontSize: 16,
351
+ color: colors.textSecondary,
352
+ lineHeight: 26,
353
+ marginBottom: spacing.lg,
354
+ },
355
+ codeBlock: {
356
+ backgroundColor: colors.bgDark,
357
+ padding: spacing.lg,
358
+ borderRadius: 8,
359
+ },
360
+ code: {
361
+ fontFamily: 'monospace',
362
+ fontSize: 13,
363
+ color: '#E5E7EB',
364
+ lineHeight: 20,
365
+ },
366
+ typeList: {
367
+ gap: spacing.lg,
368
+ },
369
+ typeItem: {
370
+ flexDirection: 'row',
371
+ alignItems: 'baseline',
372
+ gap: spacing.lg,
373
+ paddingVertical: spacing.md,
374
+ borderBottomWidth: 1,
375
+ borderBottomColor: colors.borderLight,
376
+ },
377
+ typeLabel: {
378
+ fontSize: 13,
379
+ color: colors.textTertiary,
380
+ marginLeft: 'auto',
381
+ },
382
+ spacingList: {
383
+ flexDirection: 'row',
384
+ flexWrap: 'wrap',
385
+ gap: spacing['2xl'],
386
+ },
387
+ spacingItem: {
388
+ alignItems: 'center',
389
+ gap: spacing.sm,
390
+ },
391
+ spacingBox: {
392
+ backgroundColor: colors.accent,
393
+ borderRadius: 4,
394
+ },
395
+ spacingName: {
396
+ fontSize: 14,
397
+ fontWeight: '500',
398
+ color: colors.textPrimary,
399
+ },
400
+ spacingValue: {
401
+ fontSize: 12,
402
+ color: colors.textTertiary,
403
+ },
404
+ elevationList: {
405
+ flexDirection: 'row',
406
+ flexWrap: 'wrap',
407
+ gap: spacing['2xl'],
408
+ },
409
+ elevationBox: {
410
+ width: 120,
411
+ height: 80,
412
+ backgroundColor: colors.bgSecondary,
413
+ borderRadius: 8,
414
+ alignItems: 'center',
415
+ justifyContent: 'center',
416
+ },
417
+ elevationLabel: {
418
+ fontSize: 13,
419
+ fontWeight: '500',
420
+ color: colors.textSecondary,
421
+ },
422
+ });
package/README.md ADDED
@@ -0,0 +1,229 @@
1
+ # Urbint Component Library
2
+
3
+ An enterprise-ready React Native component library built with [Unistyles 3.0](https://unistyl.es) for consistent styling across all platforms.
4
+
5
+ ## Features
6
+
7
+ - 🎨 **40+ Production-Ready Components** - Comprehensive set of UI components
8
+ - 🎭 **Light & Dark Theme Support** - Automatic theme switching with system preferences
9
+ - 📱 **Cross-Platform** - Works on iOS, Android, and Web
10
+ - 🔧 **TypeScript First** - Full TypeScript support with excellent DX
11
+ - 📖 **Storybook Integration** - Visual component documentation
12
+ - 🎯 **Enterprise Design System** - Based on Urbint design tokens
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @urbint/cl react-native-unistyles
18
+ # or
19
+ yarn add @urbint/cl react-native-unistyles
20
+
21
+ # For local development, you can link:
22
+ npm link ../path-to-urbint-cl
23
+ ```
24
+
25
+ ## Quick Start
26
+
27
+ ```tsx
28
+ import React from 'react';
29
+ // Import styles first (required for Unistyles)
30
+ import '@urbint/cl/styles';
31
+
32
+ import { Button, Card, Text, VStack, ToastProvider, useToast } from '@urbint/cl';
33
+
34
+ function App() {
35
+ const toast = useToast();
36
+
37
+ return (
38
+ <ToastProvider>
39
+ <VStack space="lg" p="lg">
40
+ <Card>
41
+ <Text>Welcome to Urbint Component Library!</Text>
42
+ </Card>
43
+ <Button onPress={() => toast.show({ title: 'Hello!', status: 'success' })}>
44
+ Show Toast
45
+ </Button>
46
+ </VStack>
47
+ </ToastProvider>
48
+ );
49
+ }
50
+ ```
51
+
52
+ ## Components
53
+
54
+ ### Layout
55
+ - `Box` - Fundamental layout component
56
+ - `Center` - Centers children horizontally and vertically
57
+ - `HStack` - Horizontal stack layout
58
+ - `VStack` - Vertical stack layout
59
+ - `Grid` / `GridItem` - CSS-like grid layout
60
+ - `Divider` - Visual separator
61
+
62
+ ### Typography
63
+ - `Text` - Body text with variants (body, caption, label, small)
64
+ - `Heading` - Headings (h1, h2, h3, h4)
65
+ - `Link` - Styled link component
66
+
67
+ ### Form Controls
68
+ - `Input` - Text input with variants
69
+ - `Textarea` - Multi-line text input
70
+ - `Checkbox` / `CheckboxGroup` - Checkbox controls
71
+ - `Radio` / `RadioGroup` - Radio button controls
72
+ - `Select` - Dropdown selection
73
+ - `Switch` - Toggle switch
74
+ - `Slider` - Range slider
75
+ - `FormControl` - Form wrapper with label/error states
76
+
77
+ ### Feedback
78
+ - `Alert` - Status messages
79
+ - `Toast` / `ToastProvider` - Non-blocking notifications
80
+ - `Progress` - Linear and circular progress indicators
81
+ - `Spinner` - Loading spinner
82
+ - `Skeleton` / `SkeletonText` - Loading placeholders
83
+
84
+ ### Overlays
85
+ - `Modal` - Dialog overlay
86
+ - `Drawer` - Slide-in panel
87
+ - `AlertDialog` - Confirmation dialog
88
+ - `ActionSheet` - Bottom action sheet
89
+ - `Popover` - Floating content panel
90
+ - `Menu` - Dropdown menu
91
+ - `Tooltip` - Informational popup
92
+
93
+ ### Data Display
94
+ - `Avatar` / `AvatarGroup` - User profile pictures
95
+ - `Badge` - Status indicators
96
+ - `Card` - Content container
97
+ - `Table` - Data table
98
+ - `Image` - Enhanced image component
99
+ - `Icon` - Vector icon component
100
+
101
+ ### Actions
102
+ - `Button` - Primary action component
103
+ - `Pressable` - Enhanced pressable
104
+ - `Fab` - Floating Action Button
105
+ - `Accordion` - Expandable sections
106
+
107
+ ### Utilities
108
+ - `Portal` / `PortalProvider` - Portal rendering
109
+
110
+ ## Design Tokens
111
+
112
+ The library uses design tokens based on the Urbint Design System:
113
+
114
+ ### Colors
115
+ ```typescript
116
+ // Brand
117
+ brand.navy: '#003F53'
118
+ brand.blue: '#00A0CC'
119
+
120
+ // Feedback
121
+ feedback.info.content: '#3C87DD'
122
+ feedback.success.content: '#2BA329'
123
+ feedback.warning.content: '#D69600'
124
+ feedback.error.content: '#E7183E'
125
+
126
+ // Badges
127
+ badge.red: '#CF3D3D'
128
+ badge.orange: '#B75E0B'
129
+ badge.yellow: '#E8BA30'
130
+ badge.blue: '#3E70D4'
131
+ badge.green: '#238914'
132
+ ```
133
+
134
+ ### Typography
135
+ - **H1 PageHeading**: 26px, Regular (400)
136
+ - **H2 SectionHeading**: 22px, Semi-Bold (600)
137
+ - **H3 SectionSubheading**: 20px, Semi-Bold (600)
138
+ - **H4 Subheading**: 18px, Semi-Bold (600)
139
+ - **Body**: 16px, Regular (400)
140
+ - **Caption**: 13px, Regular (400)
141
+
142
+ ### Spacing
143
+ ```typescript
144
+ spacing['0.5x']: 2 // 0.125rem
145
+ spacing.base: 4 // 0.25rem
146
+ spacing['2x']: 8 // 0.5rem
147
+ spacing['3x']: 12 // 0.75rem
148
+ spacing['4x']: 16 // 1rem
149
+ spacing['6x']: 24 // 1.5rem
150
+ spacing['8x']: 32 // 2rem
151
+ spacing['12x']: 48 // 3rem
152
+ spacing['18x']: 72 // 4.5rem
153
+ ```
154
+
155
+ ### Elevation
156
+ - **5**: Slight shadow (borders alternative)
157
+ - **10**: Small elements (buttons, tooltips)
158
+ - **20**: Medium elements (cards, nav-bars)
159
+ - **30**: Overlay panels and toasts
160
+ - **40**: Modals
161
+
162
+ ## Theming
163
+
164
+ The library supports light and dark themes that automatically adapt to system preferences:
165
+
166
+ ```typescript
167
+ import { StyleSheet, useUnistyles } from 'react-native-unistyles';
168
+
169
+ function MyComponent() {
170
+ const { theme } = useUnistyles();
171
+
172
+ return (
173
+ <View style={{ backgroundColor: theme.colors.background.primary }}>
174
+ <Text style={{ color: theme.colors.text.primary }}>
175
+ Themed content
176
+ </Text>
177
+ </View>
178
+ );
179
+ }
180
+ ```
181
+
182
+ ## Storybook
183
+
184
+ Run Storybook to explore all components:
185
+
186
+ ```bash
187
+ npm run storybook
188
+ # or
189
+ npm run storybook:ios
190
+ npm run storybook:android
191
+ ```
192
+
193
+ ## Development
194
+
195
+ ```bash
196
+ # Install dependencies
197
+ npm install
198
+
199
+ # Start the development server
200
+ npm start
201
+
202
+ # Run on iOS
203
+ npm run ios
204
+
205
+ # Run on Android
206
+ npm run android
207
+
208
+ # Type check
209
+ npm run typecheck
210
+ ```
211
+
212
+ ## Requirements
213
+
214
+ - React Native 0.81+
215
+ - Expo SDK 54+
216
+ - Node.js 20+
217
+
218
+ ## AI/LLM Documentation
219
+
220
+ For AI assistants and LLMs, we provide comprehensive documentation in a single file:
221
+
222
+ - **[llms.txt](./llms.txt)** - Complete API reference, examples, and usage patterns optimized for LLM consumption
223
+
224
+ This file contains all component APIs, props, examples, design tokens, theming guide, and best practices in a structured format that AI assistants can use to help developers.
225
+
226
+ ## License
227
+
228
+ MIT © Urbint
229
+
package/app.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "expo": {
3
+ "name": "urbint-cl",
4
+ "slug": "urbint-cl",
5
+ "version": "1.0.0",
6
+ "orientation": "portrait",
7
+ "icon": "./assets/icon.png",
8
+ "userInterfaceStyle": "light",
9
+ "newArchEnabled": true,
10
+ "entryPoint": "./index.ts",
11
+ "splash": {
12
+ "image": "./assets/splash-icon.png",
13
+ "resizeMode": "contain",
14
+ "backgroundColor": "#ffffff"
15
+ },
16
+ "ios": {
17
+ "supportsTablet": true,
18
+ "bundleIdentifier": "com.amankadam.urbintcl"
19
+ },
20
+ "android": {
21
+ "adaptiveIcon": {
22
+ "foregroundImage": "./assets/adaptive-icon.png",
23
+ "backgroundColor": "#ffffff"
24
+ },
25
+ "edgeToEdgeEnabled": true,
26
+ "predictiveBackGestureEnabled": false,
27
+ "package": "com.amankadam.urbintcl"
28
+ },
29
+ "web": {
30
+ "favicon": "./assets/favicon.png"
31
+ }
32
+ }
33
+ }
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,16 @@
1
+ module.exports = function (api) {
2
+ api.cache(true);
3
+
4
+ return {
5
+ presets: ['babel-preset-expo'],
6
+ // Temporarily disabled Unistyles plugin for debugging
7
+ // plugins: [
8
+ // [
9
+ // 'react-native-unistyles/plugin',
10
+ // {
11
+ // root: 'src',
12
+ // },
13
+ // ],
14
+ // ],
15
+ };
16
+ };