@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
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="33" height="32" fill="none" viewBox="0 0 33 32"><g clip-path="url(#clip0_10031_177597)"><path fill="#B7F0EF" fill-rule="evenodd" d="M17 7.87059C17 6.48214 17.9812 5.28722 19.3431 5.01709L29.5249 2.99755C31.3238 2.64076 33 4.01717 33 5.85105V22.1344C33 23.5229 32.0188 24.7178 30.6569 24.9879L20.4751 27.0074C18.6762 27.3642 17 25.9878 17 24.1539L17 7.87059Z" clip-rule="evenodd" opacity=".7"/><path fill="#87E6E5" fill-rule="evenodd" d="M1 5.85245C1 4.01857 2.67623 2.64215 4.47507 2.99895L14.6569 5.01848C16.0188 5.28861 17 6.48354 17 7.87198V24.1553C17 25.9892 15.3238 27.3656 13.5249 27.0088L3.34311 24.9893C1.98119 24.7192 1 23.5242 1 22.1358V5.85245Z" clip-rule="evenodd"/><path fill="#61C1FD" fill-rule="evenodd" d="M15.543 5.71289C15.543 5.71289 16.8157 5.96289 17.4002 6.57653C17.9847 7.19016 18.4521 9.03107 18.4521 9.03107C18.4521 9.03107 18.4521 25.1106 18.4521 26.9629C18.4521 28.8152 19.3775 31.4174 19.3775 31.4174L17.4002 28.8947L16.2575 31.4174C16.2575 31.4174 15.543 29.0765 15.543 27.122C15.543 25.1674 15.543 5.71289 15.543 5.71289Z" clip-rule="evenodd"/></g><defs><clipPath id="clip0_10031_177597"><rect width="32" height="32" fill="#fff" transform="translate(0.5)"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="none" viewBox="0 0 32 32"><path fill="#ED1D24" d="M31.3313 8.44657C30.9633 7.08998 29.8791 6.02172 28.5022 5.65916C26.0067 5.00026 16 5.00026 16 5.00026C16 5.00026 5.99333 5.00026 3.4978 5.65916C2.12102 6.02172 1.03665 7.08998 0.668678 8.44657C0 10.9053 0 16.0353 0 16.0353C0 16.0353 0 21.1652 0.668678 23.6242C1.03665 24.9806 2.12102 26.0489 3.4978 26.4116C5.99333 27.0703 16 27.0703 16 27.0703C16 27.0703 26.0067 27.0703 28.5022 26.4116C29.8791 26.0489 30.9633 24.9806 31.3313 23.6242C32 21.1652 32 16.0353 32 16.0353C32 16.0353 32 10.9053 31.3313 8.44657Z"/><path fill="#fff" d="M12.7266 20.6934L21.0902 16.036L12.7266 11.3781V20.6934Z"/></svg>
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Urbint Component Library - Styles Export
3
+ */
4
+
5
+ export * from './tokens';
6
+ export * from './unistyles';
7
+
@@ -0,0 +1,318 @@
1
+ /**
2
+ * Urbint Design System Tokens
3
+ * Based on the Urbint Design System specifications
4
+ */
5
+
6
+ // =============================================================================
7
+ // COLORS
8
+ // =============================================================================
9
+
10
+ export const colors = {
11
+ // Brand Colors
12
+ brand: {
13
+ navy: '#003F53',
14
+ blue: '#00A0CC',
15
+ },
16
+
17
+ // Text Colors
18
+ text: {
19
+ default: '#1A1A1A',
20
+ secondary: '#6B7280',
21
+ disabled: '#9CA3AF',
22
+ onDark: '#FFFFFF',
23
+ inverse: '#FFFFFF',
24
+ },
25
+
26
+ // Background Colors
27
+ background: {
28
+ default: '#FFFFFF',
29
+ secondary: '#F9FAFB',
30
+ tertiary: '#F3F4F6',
31
+ inverse: '#1A1A1A',
32
+ hover: '#F5F6F7',
33
+ },
34
+
35
+ // Border Colors
36
+ border: {
37
+ disabled: '#E9E9E9',
38
+ default: '#BDC1C3',
39
+ hover: '#ABB2B4',
40
+ active: '#00A0CC',
41
+ danger: '#E7183E',
42
+ },
43
+
44
+ // Badge Colors
45
+ badge: {
46
+ gray: '#F8F8F8',
47
+ red: '#CF3D3D',
48
+ orange: '#B75E0B',
49
+ yellow: '#E8BA30',
50
+ blue: '#3E70D4',
51
+ green: '#238914',
52
+ darkGray: '#3C4F55',
53
+ neonGreen: '#088574',
54
+ purple: '#9747FF',
55
+ },
56
+
57
+ // Primary Button Colors
58
+ primary: {
59
+ default: '#00A0CC',
60
+ hover: '#008BB3',
61
+ active: '#007799',
62
+ disabled: '#99D4E6',
63
+ },
64
+
65
+ // Secondary Button Colors
66
+ secondary: {
67
+ default: '#F3F4F6',
68
+ hover: '#E5E7EB',
69
+ active: '#E9E9E9',
70
+ disabled: '#ECECEC',
71
+ },
72
+
73
+ // Ghost Button Colors
74
+ ghost: {
75
+ default: 'transparent',
76
+ hover: 'rgba(4, 30, 37, 0.03)',
77
+ active: 'rgba(4, 30, 37, 0.07)',
78
+ disabled: 'transparent',
79
+ disabledOpacity: 0.38,
80
+ },
81
+
82
+ // Danger Button Colors
83
+ danger: {
84
+ default: '#E7183E',
85
+ hover: '#EB3D5D',
86
+ active: '#D7183C',
87
+ disabled: '#E697A6',
88
+ },
89
+
90
+ // Feedback Colors - Content
91
+ feedback: {
92
+ info: {
93
+ content: '#3C87DD',
94
+ background: '#F2F7FD',
95
+ border: '#67A2E4',
96
+ },
97
+ success: {
98
+ content: '#2BA329',
99
+ background: '#F4FBF4',
100
+ border: '#74CA72',
101
+ },
102
+ warning: {
103
+ content: '#D69600',
104
+ background: '#FFF8E5',
105
+ border: '#E8BA30',
106
+ },
107
+ error: {
108
+ content: '#E7183E',
109
+ background: '#FEF6F7',
110
+ border: '#ED506C',
111
+ },
112
+ },
113
+
114
+ // Utility Colors
115
+ white: '#FFFFFF',
116
+ black: '#000000',
117
+ transparent: 'transparent',
118
+ } as const;
119
+
120
+ // =============================================================================
121
+ // SPACING
122
+ // =============================================================================
123
+
124
+ export const spacing = {
125
+ // Semantic names (recommended)
126
+ none: 0,
127
+ xs: 4, // 0.25rem
128
+ sm: 8, // 0.5rem
129
+ md: 12, // 0.75rem
130
+ lg: 16, // 1rem
131
+ xl: 24, // 1.5rem
132
+ '2xl': 32, // 2rem
133
+ '3xl': 48, // 3rem
134
+ '4xl': 64, // 4rem
135
+ '5xl': 72, // 4.5rem
136
+
137
+ // Multiplier names (legacy)
138
+ '0.5x': 2, // 0.125rem
139
+ base: 4, // 0.25rem
140
+ '2x': 8, // 0.5rem
141
+ '3x': 12, // 0.75rem
142
+ '4x': 16, // 1rem
143
+ '6x': 24, // 1.5rem
144
+ '8x': 32, // 2rem
145
+ '12x': 48, // 3rem
146
+ '18x': 72, // 4.5rem
147
+ } as const;
148
+
149
+ export type SpacingToken = keyof typeof spacing;
150
+
151
+ // Gap function for theme
152
+ export const gap = (multiplier: number): number => multiplier * 4;
153
+
154
+ // =============================================================================
155
+ // TYPOGRAPHY
156
+ // =============================================================================
157
+
158
+ export const typography = {
159
+ fontFamily: {
160
+ primary: 'Inter',
161
+ mono: 'monospace',
162
+ },
163
+
164
+ fontSize: {
165
+ h1: 26, // 1.625rem - PageHeading
166
+ h2: 22, // 1.375rem - SectionHeading
167
+ h3: 20, // 1.25rem - SectionSubheading
168
+ h4: 18, // 1.125rem - Subheading
169
+ actionLabel: 16, // 1rem - ActionLabel
170
+ body: 16, // 1rem - BodyText
171
+ componentLabel: 14, // 0.875rem - ComponentLabels
172
+ caption: 13, // 0.813rem - CaptionText
173
+ small: 12, // 0.75rem - Small
174
+ },
175
+
176
+ fontWeight: {
177
+ regular: '400' as const,
178
+ medium: '500' as const,
179
+ semiBold: '600' as const,
180
+ bold: '700' as const,
181
+ },
182
+
183
+ lineHeight: {
184
+ tight: 1.3, // 130%
185
+ normal: 1.5, // 150%
186
+ relaxed: 1.6, // 160%
187
+ },
188
+ } as const;
189
+
190
+ // =============================================================================
191
+ // ELEVATION / SHADOWS
192
+ // =============================================================================
193
+
194
+ export const elevation = {
195
+ '-10': {
196
+ // Inner shadow - used for mouse-down states
197
+ shadowColor: '#000000',
198
+ shadowOffset: { width: 0, height: 2 },
199
+ shadowOpacity: 0.05,
200
+ shadowRadius: 2,
201
+ elevation: 0,
202
+ },
203
+ '-5': {
204
+ // No shadow - base for animating elements with shadows
205
+ shadowColor: 'transparent',
206
+ shadowOffset: { width: 0, height: 0 },
207
+ shadowOpacity: 0,
208
+ shadowRadius: 0,
209
+ elevation: 0,
210
+ },
211
+ '5': {
212
+ // Slight hint of shadow (instead of border)
213
+ shadowColor: '#000000',
214
+ shadowOffset: { width: 0, height: 1 },
215
+ shadowOpacity: 0.05,
216
+ shadowRadius: 2,
217
+ elevation: 1,
218
+ },
219
+ '10': {
220
+ // Small elements like buttons and tooltips
221
+ shadowColor: '#000000',
222
+ shadowOffset: { width: 0, height: 2 },
223
+ shadowOpacity: 0.1,
224
+ shadowRadius: 4,
225
+ elevation: 2,
226
+ },
227
+ '20': {
228
+ // Medium-sized elements like nav-bars and cards
229
+ shadowColor: '#000000',
230
+ shadowOffset: { width: 0, height: 4 },
231
+ shadowOpacity: 0.1,
232
+ shadowRadius: 8,
233
+ elevation: 4,
234
+ },
235
+ '30': {
236
+ // Overlay panels and toasts
237
+ shadowColor: '#000000',
238
+ shadowOffset: { width: 0, height: 8 },
239
+ shadowOpacity: 0.15,
240
+ shadowRadius: 16,
241
+ elevation: 8,
242
+ },
243
+ '40': {
244
+ // Modals
245
+ shadowColor: '#000000',
246
+ shadowOffset: { width: 0, height: 16 },
247
+ shadowOpacity: 0.2,
248
+ shadowRadius: 24,
249
+ elevation: 16,
250
+ },
251
+ } as const;
252
+
253
+ // =============================================================================
254
+ // BORDER RADIUS
255
+ // =============================================================================
256
+
257
+ export const borderRadius = {
258
+ none: 0,
259
+ sm: 2,
260
+ md: 4,
261
+ lg: 8,
262
+ xl: 12,
263
+ '2xl': 16,
264
+ '3xl': 24,
265
+ full: 9999,
266
+ } as const;
267
+
268
+ // =============================================================================
269
+ // BREAKPOINTS
270
+ // =============================================================================
271
+
272
+ export const breakpoints = {
273
+ xs: 0,
274
+ sm: 480,
275
+ md: 768,
276
+ lg: 1024,
277
+ xl: 1280,
278
+ '2xl': 1536,
279
+ } as const;
280
+
281
+ // =============================================================================
282
+ // Z-INDEX
283
+ // =============================================================================
284
+
285
+ export const zIndex = {
286
+ hide: -1,
287
+ auto: 'auto' as const,
288
+ base: 0,
289
+ docked: 10,
290
+ dropdown: 1000,
291
+ sticky: 1100,
292
+ banner: 1200,
293
+ overlay: 1300,
294
+ modal: 1400,
295
+ popover: 1500,
296
+ skipLink: 1600,
297
+ toast: 1700,
298
+ tooltip: 1800,
299
+ } as const;
300
+
301
+ // =============================================================================
302
+ // ANIMATION
303
+ // =============================================================================
304
+
305
+ export const animation = {
306
+ duration: {
307
+ fast: 150,
308
+ normal: 250,
309
+ slow: 350,
310
+ },
311
+ easing: {
312
+ easeIn: 'ease-in',
313
+ easeOut: 'ease-out',
314
+ easeInOut: 'ease-in-out',
315
+ linear: 'linear',
316
+ },
317
+ } as const;
318
+
@@ -0,0 +1,254 @@
1
+ /**
2
+ * Urbint Component Library - Unistyles Configuration
3
+ * Enterprise-ready design system with light and dark themes
4
+ */
5
+
6
+ import { StyleSheet } from 'react-native-unistyles';
7
+ import {
8
+ colors,
9
+ spacing,
10
+ gap,
11
+ typography,
12
+ elevation,
13
+ borderRadius,
14
+ zIndex,
15
+ animation,
16
+ breakpoints,
17
+ } from './tokens';
18
+
19
+ // =============================================================================
20
+ // LIGHT THEME
21
+ // =============================================================================
22
+
23
+ const lightTheme = {
24
+ colors: {
25
+ // Brand
26
+ brand: colors.brand,
27
+
28
+ // Text
29
+ text: {
30
+ primary: colors.text.default,
31
+ secondary: colors.text.secondary,
32
+ disabled: colors.text.disabled,
33
+ inverse: colors.text.onDark,
34
+ },
35
+
36
+ // Background
37
+ background: {
38
+ primary: colors.background.default,
39
+ secondary: colors.background.secondary,
40
+ tertiary: colors.background.tertiary,
41
+ inverse: colors.background.inverse,
42
+ },
43
+
44
+ // Border
45
+ border: colors.border,
46
+
47
+ // Badge
48
+ badge: colors.badge,
49
+
50
+ // Button variants
51
+ button: {
52
+ primary: colors.primary,
53
+ secondary: colors.secondary,
54
+ ghost: colors.ghost,
55
+ danger: colors.danger,
56
+ },
57
+
58
+ // Feedback
59
+ feedback: colors.feedback,
60
+
61
+ // Utility
62
+ white: colors.white,
63
+ black: colors.black,
64
+ transparent: colors.transparent,
65
+ },
66
+
67
+ spacing,
68
+ gap,
69
+ typography,
70
+ elevation,
71
+ borderRadius,
72
+ zIndex,
73
+ animation,
74
+ } as const;
75
+
76
+ // =============================================================================
77
+ // DARK THEME
78
+ // =============================================================================
79
+
80
+ const darkTheme = {
81
+ colors: {
82
+ // Brand (same in dark mode)
83
+ brand: colors.brand,
84
+
85
+ // Text (inverted for dark mode)
86
+ text: {
87
+ primary: '#F9FAFB',
88
+ secondary: '#9CA3AF',
89
+ disabled: '#6B7280',
90
+ inverse: colors.text.default,
91
+ },
92
+
93
+ // Background (inverted for dark mode)
94
+ background: {
95
+ primary: '#111827',
96
+ secondary: '#1F2937',
97
+ tertiary: '#374151',
98
+ inverse: colors.background.default,
99
+ },
100
+
101
+ // Border (adjusted for dark mode)
102
+ border: {
103
+ disabled: '#374151',
104
+ default: '#4B5563',
105
+ hover: '#6B7280',
106
+ active: '#00A0CC',
107
+ danger: '#EF4444',
108
+ },
109
+
110
+ // Badge (slightly adjusted for dark mode visibility)
111
+ badge: {
112
+ gray: '#374151',
113
+ red: '#DC2626',
114
+ orange: '#EA580C',
115
+ yellow: '#CA8A04',
116
+ blue: '#2563EB',
117
+ green: '#16A34A',
118
+ darkGray: '#1F2937',
119
+ neonGreen: '#10B981',
120
+ purple: '#7C3AED',
121
+ },
122
+
123
+ // Button variants (adjusted for dark mode)
124
+ button: {
125
+ primary: {
126
+ default: '#00A0CC',
127
+ hover: '#0CB8E8',
128
+ active: '#00D4FF',
129
+ disabled: '#1E5F73',
130
+ },
131
+ secondary: {
132
+ default: '#374151',
133
+ hover: '#4B5563',
134
+ active: '#6B7280',
135
+ disabled: '#1F2937',
136
+ },
137
+ ghost: {
138
+ default: 'transparent',
139
+ hover: 'rgba(255, 255, 255, 0.05)',
140
+ active: 'rgba(255, 255, 255, 0.1)',
141
+ disabled: 'transparent',
142
+ disabledOpacity: 0.38,
143
+ },
144
+ danger: {
145
+ default: '#DC2626',
146
+ hover: '#EF4444',
147
+ active: '#B91C1C',
148
+ disabled: '#7F1D1D',
149
+ },
150
+ },
151
+
152
+ // Feedback (adjusted for dark mode)
153
+ feedback: {
154
+ info: {
155
+ content: '#60A5FA',
156
+ background: '#1E3A5F',
157
+ border: '#3B82F6',
158
+ },
159
+ success: {
160
+ content: '#4ADE80',
161
+ background: '#14532D',
162
+ border: '#22C55E',
163
+ },
164
+ warning: {
165
+ content: '#FBBF24',
166
+ background: '#713F12',
167
+ border: '#F59E0B',
168
+ },
169
+ error: {
170
+ content: '#F87171',
171
+ background: '#7F1D1D',
172
+ border: '#EF4444',
173
+ },
174
+ },
175
+
176
+ // Utility
177
+ white: colors.white,
178
+ black: colors.black,
179
+ transparent: colors.transparent,
180
+ },
181
+
182
+ spacing,
183
+ gap,
184
+ typography,
185
+ elevation: {
186
+ ...elevation,
187
+ // Adjust shadows for dark mode
188
+ '5': {
189
+ ...elevation['5'],
190
+ shadowColor: '#000000',
191
+ shadowOpacity: 0.3,
192
+ },
193
+ '10': {
194
+ ...elevation['10'],
195
+ shadowColor: '#000000',
196
+ shadowOpacity: 0.4,
197
+ },
198
+ '20': {
199
+ ...elevation['20'],
200
+ shadowColor: '#000000',
201
+ shadowOpacity: 0.5,
202
+ },
203
+ '30': {
204
+ ...elevation['30'],
205
+ shadowColor: '#000000',
206
+ shadowOpacity: 0.6,
207
+ },
208
+ '40': {
209
+ ...elevation['40'],
210
+ shadowColor: '#000000',
211
+ shadowOpacity: 0.7,
212
+ },
213
+ },
214
+ borderRadius,
215
+ zIndex,
216
+ animation,
217
+ } as const;
218
+
219
+ // =============================================================================
220
+ // THEME CONFIGURATION
221
+ // =============================================================================
222
+
223
+ const appThemes = {
224
+ light: lightTheme,
225
+ dark: darkTheme,
226
+ } as const;
227
+
228
+ // =============================================================================
229
+ // TYPESCRIPT TYPES
230
+ // =============================================================================
231
+
232
+ type AppThemes = typeof appThemes;
233
+ type AppBreakpoints = typeof breakpoints;
234
+
235
+ declare module 'react-native-unistyles' {
236
+ export interface UnistylesThemes extends AppThemes {}
237
+ export interface UnistylesBreakpoints extends AppBreakpoints {}
238
+ }
239
+
240
+ // =============================================================================
241
+ // CONFIGURE UNISTYLES
242
+ // =============================================================================
243
+
244
+ StyleSheet.configure({
245
+ themes: appThemes,
246
+ breakpoints,
247
+ settings: {
248
+ adaptiveThemes: false,
249
+ initialTheme: 'light',
250
+ },
251
+ });
252
+
253
+ export { lightTheme, darkTheme, appThemes };
254
+
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Create Context Utility
3
+ * Type-safe context creation with error handling
4
+ */
5
+
6
+ import React, { createContext, useContext } from 'react';
7
+
8
+ export function createContextScope<T>(
9
+ name: string,
10
+ defaultValue?: T
11
+ ): [React.Context<T | undefined>, () => T, React.Provider<T | undefined>] {
12
+ const Context = createContext<T | undefined>(defaultValue);
13
+ Context.displayName = name;
14
+
15
+ function useContextScope(): T {
16
+ const context = useContext(Context);
17
+ if (context === undefined) {
18
+ throw new Error(`use${name} must be used within a ${name}Provider`);
19
+ }
20
+ return context;
21
+ }
22
+
23
+ return [Context, useContextScope, Context.Provider];
24
+ }
25
+
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Utilities Export
3
+ */
4
+
5
+ export * from './createContext';
6
+ export * from './mergeRefs';
7
+
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Merge Refs Utility
3
+ * Combines multiple refs into one
4
+ */
5
+
6
+ import type { MutableRefObject, RefCallback, Ref } from 'react';
7
+
8
+ export function mergeRefs<T>(
9
+ ...refs: (Ref<T> | undefined)[]
10
+ ): RefCallback<T> {
11
+ return (value: T) => {
12
+ refs.forEach((ref) => {
13
+ if (typeof ref === 'function') {
14
+ ref(value);
15
+ } else if (ref != null) {
16
+ (ref as MutableRefObject<T | null>).current = value;
17
+ }
18
+ });
19
+ };
20
+ }
21
+
package/tsconfig.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "extends": "expo/tsconfig.base",
3
+ "compilerOptions": {
4
+ "strict": true,
5
+ "baseUrl": ".",
6
+ "paths": {
7
+ "@/*": ["src/*"]
8
+ },
9
+ "jsx": "react-native",
10
+ "moduleResolution": "bundler",
11
+ "skipLibCheck": true,
12
+ "resolveJsonModule": true,
13
+ "esModuleInterop": true,
14
+ "declaration": true,
15
+ "declarationDir": "dist",
16
+ "outDir": "dist"
17
+ },
18
+ "include": [
19
+ "**/*.ts",
20
+ "**/*.tsx"
21
+ ],
22
+ "exclude": [
23
+ "node_modules",
24
+ "dist"
25
+ ]
26
+ }
Binary file