@timmbr/native-ui 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/dist/components/Actionsheet/Actionsheet.d.ts +12 -0
  2. package/dist/components/Actionsheet/Actionsheet.d.ts.map +1 -0
  3. package/dist/components/Actionsheet/Actionsheet.js +116 -0
  4. package/dist/components/Actionsheet/Actionsheet.styles.d.ts +43 -0
  5. package/dist/components/Actionsheet/Actionsheet.styles.d.ts.map +1 -0
  6. package/dist/components/Actionsheet/Actionsheet.styles.js +25 -0
  7. package/dist/components/Actionsheet/Actionsheet.types.d.ts +39 -0
  8. package/dist/components/Actionsheet/Actionsheet.types.d.ts.map +1 -0
  9. package/dist/components/Actionsheet/index.d.ts +4 -0
  10. package/dist/components/Actionsheet/index.d.ts.map +1 -0
  11. package/dist/components/Avatar/Avatar.d.ts +8 -0
  12. package/dist/components/Avatar/Avatar.d.ts.map +1 -0
  13. package/dist/components/Avatar/Avatar.js +66 -0
  14. package/dist/components/Avatar/Avatar.styles.d.ts +25 -0
  15. package/dist/components/Avatar/Avatar.styles.d.ts.map +1 -0
  16. package/dist/components/Avatar/Avatar.styles.js +29 -0
  17. package/dist/components/Avatar/Avatar.types.d.ts +21 -0
  18. package/dist/components/Avatar/Avatar.types.d.ts.map +1 -0
  19. package/dist/components/Avatar/index.d.ts +4 -0
  20. package/dist/components/Avatar/index.d.ts.map +1 -0
  21. package/dist/components/Badge/Badge.d.ts +7 -0
  22. package/dist/components/Badge/Badge.d.ts.map +1 -0
  23. package/dist/components/Badge/Badge.js +73 -0
  24. package/dist/components/Badge/Badge.styles.d.ts +15 -0
  25. package/dist/components/Badge/Badge.styles.d.ts.map +1 -0
  26. package/dist/components/Badge/Badge.styles.js +71 -0
  27. package/dist/components/Badge/Badge.types.d.ts +25 -0
  28. package/dist/components/Badge/Badge.types.d.ts.map +1 -0
  29. package/dist/components/Badge/index.d.ts +4 -0
  30. package/dist/components/Badge/index.d.ts.map +1 -0
  31. package/dist/components/Box/Box.d.ts +4 -0
  32. package/dist/components/Box/Box.d.ts.map +1 -0
  33. package/dist/components/Box/Box.js +26 -0
  34. package/dist/components/Box/Box.styles.d.ts +7 -0
  35. package/dist/components/Box/Box.styles.d.ts.map +1 -0
  36. package/dist/components/Box/Box.styles.js +7 -0
  37. package/dist/components/Box/Box.types.d.ts +8 -0
  38. package/dist/components/Box/Box.types.d.ts.map +1 -0
  39. package/dist/components/Box/index.d.ts +4 -0
  40. package/dist/components/Box/index.d.ts.map +1 -0
  41. package/dist/components/Button/Button.d.ts +9 -0
  42. package/dist/components/Button/Button.d.ts.map +1 -0
  43. package/dist/components/Button/Button.js +169 -0
  44. package/dist/components/Button/Button.styles.d.ts +30 -0
  45. package/dist/components/Button/Button.styles.d.ts.map +1 -0
  46. package/dist/components/Button/Button.styles.js +106 -0
  47. package/dist/components/Button/Button.types.d.ts +41 -0
  48. package/dist/components/Button/Button.types.d.ts.map +1 -0
  49. package/dist/components/Button/index.d.ts +4 -0
  50. package/dist/components/Button/index.d.ts.map +1 -0
  51. package/dist/components/Card/Card.d.ts +8 -0
  52. package/dist/components/Card/Card.d.ts.map +1 -0
  53. package/dist/components/Card/Card.js +50 -0
  54. package/dist/components/Card/Card.styles.d.ts +26 -0
  55. package/dist/components/Card/Card.styles.d.ts.map +1 -0
  56. package/dist/components/Card/Card.styles.js +32 -0
  57. package/dist/components/Card/Card.types.d.ts +26 -0
  58. package/dist/components/Card/Card.types.d.ts.map +1 -0
  59. package/dist/components/Card/index.d.ts +4 -0
  60. package/dist/components/Card/index.d.ts.map +1 -0
  61. package/dist/components/Divider/Divider.d.ts +4 -0
  62. package/dist/components/Divider/Divider.d.ts.map +1 -0
  63. package/dist/components/Divider/Divider.js +22 -0
  64. package/dist/components/Divider/Divider.styles.d.ts +7 -0
  65. package/dist/components/Divider/Divider.styles.d.ts.map +1 -0
  66. package/dist/components/Divider/Divider.styles.js +16 -0
  67. package/dist/components/Divider/Divider.types.d.ts +7 -0
  68. package/dist/components/Divider/Divider.types.d.ts.map +1 -0
  69. package/dist/components/Divider/index.d.ts +4 -0
  70. package/dist/components/Divider/index.d.ts.map +1 -0
  71. package/dist/components/HStack/HStack.d.ts +4 -0
  72. package/dist/components/HStack/HStack.d.ts.map +1 -0
  73. package/dist/components/HStack/HStack.js +21 -0
  74. package/dist/components/HStack/HStack.styles.d.ts +8 -0
  75. package/dist/components/HStack/HStack.styles.d.ts.map +1 -0
  76. package/dist/components/HStack/HStack.styles.js +28 -0
  77. package/dist/components/HStack/HStack.types.d.ts +9 -0
  78. package/dist/components/HStack/HStack.types.d.ts.map +1 -0
  79. package/dist/components/HStack/index.d.ts +4 -0
  80. package/dist/components/HStack/index.d.ts.map +1 -0
  81. package/dist/components/Heading/Heading.d.ts +4 -0
  82. package/dist/components/Heading/Heading.d.ts.map +1 -0
  83. package/dist/components/Heading/Heading.js +22 -0
  84. package/dist/components/Heading/Heading.styles.d.ts +8 -0
  85. package/dist/components/Heading/Heading.styles.d.ts.map +1 -0
  86. package/dist/components/Heading/Heading.styles.js +28 -0
  87. package/dist/components/Heading/Heading.types.d.ts +10 -0
  88. package/dist/components/Heading/Heading.types.d.ts.map +1 -0
  89. package/dist/components/Heading/index.d.ts +4 -0
  90. package/dist/components/Heading/index.d.ts.map +1 -0
  91. package/dist/components/Icon/Icon.d.ts +4 -0
  92. package/dist/components/Icon/Icon.d.ts.map +1 -0
  93. package/dist/components/Icon/Icon.js +37 -0
  94. package/dist/components/Icon/Icon.styles.d.ts +7 -0
  95. package/dist/components/Icon/Icon.styles.d.ts.map +1 -0
  96. package/dist/components/Icon/Icon.styles.js +20 -0
  97. package/dist/components/Icon/Icon.types.d.ts +9 -0
  98. package/dist/components/Icon/Icon.types.d.ts.map +1 -0
  99. package/dist/components/Icon/index.d.ts +4 -0
  100. package/dist/components/Icon/index.d.ts.map +1 -0
  101. package/dist/components/Input/Input.d.ts +8 -0
  102. package/dist/components/Input/Input.d.ts.map +1 -0
  103. package/dist/components/Input/Input.js +105 -0
  104. package/dist/components/Input/Input.styles.d.ts +23 -0
  105. package/dist/components/Input/Input.styles.d.ts.map +1 -0
  106. package/dist/components/Input/Input.styles.js +56 -0
  107. package/dist/components/Input/Input.types.d.ts +32 -0
  108. package/dist/components/Input/Input.types.d.ts.map +1 -0
  109. package/dist/components/Input/index.d.ts +4 -0
  110. package/dist/components/Input/index.d.ts.map +1 -0
  111. package/dist/components/Modal/Modal.d.ts +11 -0
  112. package/dist/components/Modal/Modal.d.ts.map +1 -0
  113. package/dist/components/Modal/Modal.js +102 -0
  114. package/dist/components/Modal/Modal.styles.d.ts +43 -0
  115. package/dist/components/Modal/Modal.styles.d.ts.map +1 -0
  116. package/dist/components/Modal/Modal.styles.js +37 -0
  117. package/dist/components/Modal/Modal.types.d.ts +38 -0
  118. package/dist/components/Modal/Modal.types.d.ts.map +1 -0
  119. package/dist/components/Modal/index.d.ts +4 -0
  120. package/dist/components/Modal/index.d.ts.map +1 -0
  121. package/dist/components/Pressable/Pressable.d.ts +4 -0
  122. package/dist/components/Pressable/Pressable.d.ts.map +1 -0
  123. package/dist/components/Pressable/Pressable.js +43 -0
  124. package/dist/components/Pressable/Pressable.styles.d.ts +7 -0
  125. package/dist/components/Pressable/Pressable.styles.d.ts.map +1 -0
  126. package/dist/components/Pressable/Pressable.styles.js +16 -0
  127. package/dist/components/Pressable/Pressable.types.d.ts +9 -0
  128. package/dist/components/Pressable/Pressable.types.d.ts.map +1 -0
  129. package/dist/components/Pressable/index.d.ts +4 -0
  130. package/dist/components/Pressable/index.d.ts.map +1 -0
  131. package/dist/components/Spinner/Spinner.d.ts +4 -0
  132. package/dist/components/Spinner/Spinner.d.ts.map +1 -0
  133. package/dist/components/Spinner/Spinner.js +52 -0
  134. package/dist/components/Spinner/Spinner.styles.d.ts +7 -0
  135. package/dist/components/Spinner/Spinner.styles.d.ts.map +1 -0
  136. package/dist/components/Spinner/Spinner.styles.js +20 -0
  137. package/dist/components/Spinner/Spinner.types.d.ts +8 -0
  138. package/dist/components/Spinner/Spinner.types.d.ts.map +1 -0
  139. package/dist/components/Spinner/index.d.ts +4 -0
  140. package/dist/components/Spinner/index.d.ts.map +1 -0
  141. package/dist/components/Switch/Switch.d.ts +4 -0
  142. package/dist/components/Switch/Switch.d.ts.map +1 -0
  143. package/dist/components/Switch/Switch.js +56 -0
  144. package/dist/components/Switch/Switch.styles.d.ts +16 -0
  145. package/dist/components/Switch/Switch.styles.d.ts.map +1 -0
  146. package/dist/components/Switch/Switch.styles.js +50 -0
  147. package/dist/components/Switch/Switch.types.d.ts +11 -0
  148. package/dist/components/Switch/Switch.types.d.ts.map +1 -0
  149. package/dist/components/Switch/index.d.ts +4 -0
  150. package/dist/components/Switch/index.d.ts.map +1 -0
  151. package/dist/components/Tabs/Tabs.d.ts +9 -0
  152. package/dist/components/Tabs/Tabs.d.ts.map +1 -0
  153. package/dist/components/Tabs/Tabs.js +109 -0
  154. package/dist/components/Tabs/Tabs.styles.d.ts +31 -0
  155. package/dist/components/Tabs/Tabs.styles.d.ts.map +1 -0
  156. package/dist/components/Tabs/Tabs.styles.js +37 -0
  157. package/dist/components/Tabs/Tabs.types.d.ts +31 -0
  158. package/dist/components/Tabs/Tabs.types.d.ts.map +1 -0
  159. package/dist/components/Tabs/index.d.ts +4 -0
  160. package/dist/components/Tabs/index.d.ts.map +1 -0
  161. package/dist/components/Text/Text.d.ts +4 -0
  162. package/dist/components/Text/Text.d.ts.map +1 -0
  163. package/dist/components/Text/Text.js +29 -0
  164. package/dist/components/Text/Text.styles.d.ts +9 -0
  165. package/dist/components/Text/Text.styles.d.ts.map +1 -0
  166. package/dist/components/Text/Text.styles.js +35 -0
  167. package/dist/components/Text/Text.types.d.ts +11 -0
  168. package/dist/components/Text/Text.types.d.ts.map +1 -0
  169. package/dist/components/Text/index.d.ts +4 -0
  170. package/dist/components/Text/index.d.ts.map +1 -0
  171. package/dist/components/Textarea/Textarea.d.ts +6 -0
  172. package/dist/components/Textarea/Textarea.d.ts.map +1 -0
  173. package/dist/components/Textarea/Textarea.js +66 -0
  174. package/dist/components/Textarea/Textarea.styles.d.ts +16 -0
  175. package/dist/components/Textarea/Textarea.styles.d.ts.map +1 -0
  176. package/dist/components/Textarea/Textarea.styles.js +47 -0
  177. package/dist/components/Textarea/Textarea.types.d.ts +20 -0
  178. package/dist/components/Textarea/Textarea.types.d.ts.map +1 -0
  179. package/dist/components/Textarea/index.d.ts +4 -0
  180. package/dist/components/Textarea/index.d.ts.map +1 -0
  181. package/dist/components/Toast/Toast.d.ts +7 -0
  182. package/dist/components/Toast/Toast.d.ts.map +1 -0
  183. package/dist/components/Toast/Toast.js +39 -0
  184. package/dist/components/Toast/Toast.styles.d.ts +20 -0
  185. package/dist/components/Toast/Toast.styles.d.ts.map +1 -0
  186. package/dist/components/Toast/Toast.styles.js +42 -0
  187. package/dist/components/Toast/Toast.types.d.ts +22 -0
  188. package/dist/components/Toast/Toast.types.d.ts.map +1 -0
  189. package/dist/components/Toast/index.d.ts +4 -0
  190. package/dist/components/Toast/index.d.ts.map +1 -0
  191. package/dist/components/VStack/VStack.d.ts +4 -0
  192. package/dist/components/VStack/VStack.d.ts.map +1 -0
  193. package/dist/components/VStack/VStack.js +21 -0
  194. package/dist/components/VStack/VStack.styles.d.ts +8 -0
  195. package/dist/components/VStack/VStack.styles.d.ts.map +1 -0
  196. package/dist/components/VStack/VStack.styles.js +28 -0
  197. package/dist/components/VStack/VStack.types.d.ts +9 -0
  198. package/dist/components/VStack/VStack.types.d.ts.map +1 -0
  199. package/dist/components/VStack/index.d.ts +4 -0
  200. package/dist/components/VStack/index.d.ts.map +1 -0
  201. package/dist/index.d.ts +23 -0
  202. package/dist/index.d.ts.map +1 -0
  203. package/dist/index.js +42 -0
  204. package/dist/provider/TimmbrNativeProvider.d.ts +21 -0
  205. package/dist/provider/TimmbrNativeProvider.d.ts.map +1 -0
  206. package/dist/provider/TimmbrNativeProvider.js +110 -0
  207. package/dist/theme/config.d.ts +360 -0
  208. package/dist/theme/config.d.ts.map +1 -0
  209. package/dist/theme/config.js +129 -0
  210. package/package.json +70 -3
  211. package/src/native/index.tsx +799 -0
  212. package/README.md +0 -3
@@ -0,0 +1,360 @@
1
+ import * as React from 'react';
2
+ export declare const vars: <T extends Record<string, string | number>>(variables: T) => T;
3
+ export declare const nativeThemes: {
4
+ light: {
5
+ '--background': string;
6
+ '--foreground': string;
7
+ '--card': string;
8
+ '--card-foreground': string;
9
+ '--popover': string;
10
+ '--popover-foreground': string;
11
+ '--primary': string;
12
+ '--primary-foreground': string;
13
+ '--secondary': string;
14
+ '--secondary-foreground': string;
15
+ '--muted': string;
16
+ '--muted-foreground': string;
17
+ '--accent': string;
18
+ '--accent-foreground': string;
19
+ '--destructive': string;
20
+ '--destructive-foreground': string;
21
+ '--success': string;
22
+ '--warning': string;
23
+ '--info': string;
24
+ '--border': string;
25
+ '--input': string;
26
+ '--ring': string;
27
+ };
28
+ dark: {
29
+ '--background': string;
30
+ '--foreground': string;
31
+ '--card': string;
32
+ '--card-foreground': string;
33
+ '--popover': string;
34
+ '--popover-foreground': string;
35
+ '--primary': string;
36
+ '--primary-foreground': string;
37
+ '--secondary': string;
38
+ '--secondary-foreground': string;
39
+ '--muted': string;
40
+ '--muted-foreground': string;
41
+ '--accent': string;
42
+ '--accent-foreground': string;
43
+ '--destructive': string;
44
+ '--destructive-foreground': string;
45
+ '--success': string;
46
+ '--warning': string;
47
+ '--info': string;
48
+ '--border': string;
49
+ '--input': string;
50
+ '--ring': string;
51
+ };
52
+ };
53
+ export declare const nativeTokens: {
54
+ themes: {
55
+ light: {
56
+ '--background': string;
57
+ '--foreground': string;
58
+ '--card': string;
59
+ '--card-foreground': string;
60
+ '--popover': string;
61
+ '--popover-foreground': string;
62
+ '--primary': string;
63
+ '--primary-foreground': string;
64
+ '--secondary': string;
65
+ '--secondary-foreground': string;
66
+ '--muted': string;
67
+ '--muted-foreground': string;
68
+ '--accent': string;
69
+ '--accent-foreground': string;
70
+ '--destructive': string;
71
+ '--destructive-foreground': string;
72
+ '--success': string;
73
+ '--warning': string;
74
+ '--info': string;
75
+ '--border': string;
76
+ '--input': string;
77
+ '--ring': string;
78
+ };
79
+ dark: {
80
+ '--background': string;
81
+ '--foreground': string;
82
+ '--card': string;
83
+ '--card-foreground': string;
84
+ '--popover': string;
85
+ '--popover-foreground': string;
86
+ '--primary': string;
87
+ '--primary-foreground': string;
88
+ '--secondary': string;
89
+ '--secondary-foreground': string;
90
+ '--muted': string;
91
+ '--muted-foreground': string;
92
+ '--accent': string;
93
+ '--accent-foreground': string;
94
+ '--destructive': string;
95
+ '--destructive-foreground': string;
96
+ '--success': string;
97
+ '--warning': string;
98
+ '--info': string;
99
+ '--border': string;
100
+ '--input': string;
101
+ '--ring': string;
102
+ };
103
+ };
104
+ colors: {
105
+ readonly primary: {
106
+ readonly 50: "#E0B29D";
107
+ readonly 100: "#D9A289";
108
+ readonly 200: "#D39375";
109
+ readonly 300: "#CD8361";
110
+ readonly 400: "#C6744E";
111
+ readonly 500: "#C0643A";
112
+ readonly DEFAULT: "#C0643A";
113
+ readonly 600: "#AD5A34";
114
+ readonly 700: "#9A502E";
115
+ readonly 800: "#864629";
116
+ readonly 900: "#733C23";
117
+ readonly 1000: "#60321D";
118
+ };
119
+ readonly brand: {
120
+ readonly 50: "#E0B29D";
121
+ readonly 100: "#D9A289";
122
+ readonly 200: "#D39375";
123
+ readonly 300: "#CD8361";
124
+ readonly 400: "#C6744E";
125
+ readonly 500: "#C0643A";
126
+ readonly DEFAULT: "#C0643A";
127
+ readonly 600: "#AD5A34";
128
+ readonly 700: "#9A502E";
129
+ readonly 800: "#864629";
130
+ readonly 900: "#733C23";
131
+ readonly 950: "#60321D";
132
+ readonly 1000: "#60321D";
133
+ };
134
+ readonly backgrounds: {
135
+ readonly subtle: "#DDD5CA";
136
+ readonly surface1: "#F5EDE0";
137
+ readonly surface2: "#F7F1E6";
138
+ };
139
+ readonly greys: {
140
+ readonly 50: "#FFFFFF";
141
+ readonly 100: "#E7E7E7";
142
+ readonly 200: "#CECECE";
143
+ readonly 300: "#B6B6B6";
144
+ readonly 400: "#9D9D9D";
145
+ readonly 500: "#858585";
146
+ readonly DEFAULT: "#858585";
147
+ readonly 600: "#6D6D6D";
148
+ readonly 700: "#545454";
149
+ readonly 800: "#3C3C3C";
150
+ readonly 900: "#232323";
151
+ readonly 1000: "#0B0B0B";
152
+ };
153
+ readonly misc: {
154
+ readonly surfaceDark: "#1A1714";
155
+ readonly sandMuted: "#B7AEA2";
156
+ readonly borderWarm: "#E8DFD1";
157
+ };
158
+ readonly semantic: {
159
+ readonly success: "#059669";
160
+ readonly warning: "#D97706";
161
+ readonly error: "#DC2626";
162
+ readonly info: "#2563EB";
163
+ };
164
+ };
165
+ typography: {
166
+ readonly fonts: {
167
+ readonly display: "\"DM Serif Display\", serif";
168
+ readonly sans: "\"Manrope\", sans-serif";
169
+ readonly title: "\"Outfit\", sans-serif";
170
+ };
171
+ readonly styles: {
172
+ readonly h1: {
173
+ readonly fontFamily: "\"DM Serif Display\", serif";
174
+ readonly fontSize: "64px";
175
+ readonly fontWeight: 400;
176
+ readonly lineHeight: 1.3;
177
+ };
178
+ readonly h2: {
179
+ readonly fontFamily: "\"DM Serif Display\", serif";
180
+ readonly fontSize: "48px";
181
+ readonly fontWeight: 400;
182
+ readonly lineHeight: 1.3;
183
+ };
184
+ readonly h3: {
185
+ readonly fontFamily: "\"DM Serif Display\", serif";
186
+ readonly fontSize: "32px";
187
+ readonly fontWeight: 400;
188
+ readonly lineHeight: 1.3;
189
+ };
190
+ readonly h4: {
191
+ readonly fontFamily: "\"DM Serif Display\", serif";
192
+ readonly fontSize: "24px";
193
+ readonly fontWeight: 400;
194
+ readonly lineHeight: 1.3;
195
+ readonly letterSpacing: "-0.02em";
196
+ };
197
+ readonly h5: {
198
+ readonly fontFamily: "\"DM Serif Display\", serif";
199
+ readonly fontSize: "20px";
200
+ readonly fontWeight: 400;
201
+ readonly lineHeight: 1.3;
202
+ };
203
+ readonly h6: {
204
+ readonly fontFamily: "\"DM Serif Display\", serif";
205
+ readonly fontSize: "20px";
206
+ readonly fontWeight: 400;
207
+ readonly lineHeight: 1.3;
208
+ };
209
+ readonly subtitle1: {
210
+ readonly fontFamily: "\"Manrope\", sans-serif";
211
+ readonly fontSize: "18px";
212
+ readonly fontWeight: 600;
213
+ readonly lineHeight: 1.3;
214
+ };
215
+ readonly subtitle2: {
216
+ readonly fontFamily: "\"Manrope\", sans-serif";
217
+ readonly fontSize: "18px";
218
+ readonly fontWeight: 600;
219
+ readonly lineHeight: 1.3;
220
+ };
221
+ readonly body1: {
222
+ readonly fontFamily: "\"Manrope\", sans-serif";
223
+ readonly fontSize: "16px";
224
+ readonly fontWeight: 400;
225
+ readonly lineHeight: 1.3;
226
+ };
227
+ readonly body2: {
228
+ readonly fontFamily: "\"Manrope\", sans-serif";
229
+ readonly fontSize: "14px";
230
+ readonly fontWeight: 400;
231
+ readonly lineHeight: 1.3;
232
+ };
233
+ readonly body2Medium: {
234
+ readonly fontFamily: "\"Manrope\", sans-serif";
235
+ readonly fontSize: "14px";
236
+ readonly fontWeight: 500;
237
+ readonly lineHeight: 1.3;
238
+ };
239
+ readonly body2Semibold: {
240
+ readonly fontFamily: "\"Manrope\", sans-serif";
241
+ readonly fontSize: "14px";
242
+ readonly fontWeight: 600;
243
+ readonly lineHeight: 1.3;
244
+ };
245
+ readonly body2Light: {
246
+ readonly fontFamily: "\"Manrope\", sans-serif";
247
+ readonly fontSize: "14px";
248
+ readonly fontWeight: 300;
249
+ readonly lineHeight: 1.3;
250
+ };
251
+ readonly body3: {
252
+ readonly fontFamily: "\"Manrope\", sans-serif";
253
+ readonly fontSize: "12px";
254
+ readonly fontWeight: 400;
255
+ readonly lineHeight: 1.3;
256
+ };
257
+ readonly body3Light: {
258
+ readonly fontFamily: "\"Manrope\", sans-serif";
259
+ readonly fontSize: "12px";
260
+ readonly fontWeight: 300;
261
+ readonly lineHeight: 1.3;
262
+ };
263
+ readonly pageTitle: {
264
+ readonly fontFamily: "\"Outfit\", sans-serif";
265
+ readonly fontSize: "48px";
266
+ readonly fontWeight: 700;
267
+ readonly lineHeight: 1.3;
268
+ };
269
+ readonly captionLg: {
270
+ readonly fontFamily: "\"Manrope\", sans-serif";
271
+ readonly fontSize: "11px";
272
+ readonly fontWeight: 400;
273
+ readonly lineHeight: 1.3;
274
+ };
275
+ readonly caption: {
276
+ readonly fontFamily: "\"Manrope\", sans-serif";
277
+ readonly fontSize: "10px";
278
+ readonly fontWeight: 400;
279
+ readonly lineHeight: 1.3;
280
+ };
281
+ };
282
+ };
283
+ radius: {
284
+ readonly none: "0px";
285
+ readonly sm: "0.25rem";
286
+ readonly md: "0.375rem";
287
+ readonly lg: "0.5rem";
288
+ readonly xl: "0.75rem";
289
+ readonly full: "9999px";
290
+ };
291
+ spacing: {
292
+ readonly 0.5: "2px";
293
+ readonly 1: "4px";
294
+ readonly 1.5: "6px";
295
+ readonly 2: "8px";
296
+ readonly 2.5: "10px";
297
+ readonly 3: "12px";
298
+ readonly 4: "16px";
299
+ readonly 5: "20px";
300
+ readonly 6: "24px";
301
+ readonly 8: "32px";
302
+ readonly 10: "40px";
303
+ readonly 12: "48px";
304
+ readonly 16: "64px";
305
+ readonly 20: "80px";
306
+ readonly 24: "96px";
307
+ };
308
+ shadows: {
309
+ readonly none: "none";
310
+ readonly xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
311
+ readonly sm: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
312
+ readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
313
+ readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
314
+ readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
315
+ };
316
+ breakpoints: {
317
+ readonly sm: "640px";
318
+ readonly md: "768px";
319
+ readonly lg: "1024px";
320
+ readonly xl: "1280px";
321
+ readonly "2xl": "1536px";
322
+ };
323
+ animation: {
324
+ readonly duration: {
325
+ readonly fast: "150ms";
326
+ readonly normal: "300ms";
327
+ readonly slow: "500ms";
328
+ };
329
+ readonly timing: {
330
+ readonly easeOut: "cubic-bezier(0.16, 1, 0.3, 1)";
331
+ readonly easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)";
332
+ };
333
+ };
334
+ };
335
+ export type VariantConfig<V> = {
336
+ base?: string;
337
+ variants?: V;
338
+ compoundVariants?: Array<{
339
+ [K in keyof V]?: keyof V[K] | boolean | string;
340
+ } & {
341
+ class?: string;
342
+ className?: string;
343
+ }>;
344
+ defaultVariants?: {
345
+ [K in keyof V]?: keyof V[K] | boolean | string;
346
+ };
347
+ };
348
+ export declare function tva<V extends Record<string, Record<string, string>>>(config: VariantConfig<V>): (props?: { [K in keyof V]?: keyof V[K] | boolean | string; } & {
349
+ class?: string;
350
+ className?: string;
351
+ }) => string;
352
+ export declare function createStyleContext<T = Record<string, any>>(): {
353
+ Context: React.Context<T>;
354
+ Provider: React.Provider<T>;
355
+ useStyleContext: () => T;
356
+ withStyleContext: <P extends object>(Component: React.ComponentType<P>, _scope?: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
357
+ };
358
+ export declare const useStyleContext: () => Record<string, any>;
359
+ export declare const withStyleContext: <P extends object>(Component: React.ComponentType<P>, _scope?: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
360
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/theme/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,WAAW,CAAC,KAAG,CAE9E,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDxB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGxB,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,gBAAgB,CAAC,EAAE,KAAK,CACtB;SAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,MAAM;KAAE,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAC5F,CAAC;IACF,eAAe,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,MAAM;KAAE,CAAC;CACtE,CAAC;AAEF,wBAAgB,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,IACpF,QAAQ,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,MAAM,GAAE,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,MAAM,CA6CrH;AAED,wBAAgB,kBAAkB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;uBAK9B,CAAC,SAAS,MAAM,aAC7B,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;EAoBpC;AAGD,eAAO,MAAM,eAAe,2BAAsC,CAAC;AACnE,eAAO,MAAM,gBAAgB,GAzBD,CAAC,SAAS,MAAM,6IAyBwB,CAAC"}
@@ -0,0 +1,129 @@
1
+ import * as React from 'react';
2
+ import { tokens } from '@timmbr/theme';
3
+ import { cn } from '@timmbr/utils';
4
+
5
+ const vars = (variables) => {
6
+ return variables;
7
+ };
8
+ const nativeThemes = {
9
+ light: vars({
10
+ "--background": "#FFFFFF",
11
+ "--foreground": "#0B0B0B",
12
+ "--card": "#FFFFFF",
13
+ "--card-foreground": "#0B0B0B",
14
+ "--popover": "#FFFFFF",
15
+ "--popover-foreground": "#0B0B0B",
16
+ "--primary": "#C0643A",
17
+ "--primary-foreground": "#FFFFFF",
18
+ "--secondary": "#F5EDE0",
19
+ "--secondary-foreground": "#60321D",
20
+ "--muted": "#DDD5CA",
21
+ "--muted-foreground": "#6D6D6D",
22
+ "--accent": "#F7F1E6",
23
+ "--accent-foreground": "#60321D",
24
+ "--destructive": "#DC2626",
25
+ "--destructive-foreground": "#FFFFFF",
26
+ "--success": "#059669",
27
+ "--warning": "#D97706",
28
+ "--info": "#2563EB",
29
+ "--border": "#E7E7E7",
30
+ "--input": "#E7E7E7",
31
+ "--ring": "#C0643A"
32
+ }),
33
+ dark: vars({
34
+ "--background": "#0B0B0B",
35
+ "--foreground": "#F7F1E6",
36
+ "--card": "#232323",
37
+ "--card-foreground": "#F7F1E6",
38
+ "--popover": "#232323",
39
+ "--popover-foreground": "#F7F1E6",
40
+ "--primary": "#C0643A",
41
+ "--primary-foreground": "#FFFFFF",
42
+ "--secondary": "#3C3C3C",
43
+ "--secondary-foreground": "#F5EDE0",
44
+ "--muted": "#3C3C3C",
45
+ "--muted-foreground": "#9D9D9D",
46
+ "--accent": "#3C3C3C",
47
+ "--accent-foreground": "#F5EDE0",
48
+ "--destructive": "#7f1d1d",
49
+ "--destructive-foreground": "#F7F1E6",
50
+ "--success": "#059669",
51
+ "--warning": "#D97706",
52
+ "--info": "#2563EB",
53
+ "--border": "#3C3C3C",
54
+ "--input": "#3C3C3C",
55
+ "--ring": "#C0643A"
56
+ })
57
+ };
58
+ const nativeTokens = {
59
+ ...tokens,
60
+ themes: nativeThemes
61
+ };
62
+ function tva(config) {
63
+ return (props) => {
64
+ const mergedProps = {
65
+ ...config.defaultVariants ?? {},
66
+ ...props ?? {}
67
+ };
68
+ const classes = [];
69
+ if (config.base) {
70
+ classes.push(config.base);
71
+ }
72
+ if (config.variants) {
73
+ for (const [variantKey, variantValues] of Object.entries(config.variants)) {
74
+ const propValue = mergedProps[variantKey];
75
+ if (propValue !== void 0 && propValue !== null) {
76
+ const stringVal = String(propValue);
77
+ if (variantValues[stringVal]) {
78
+ classes.push(variantValues[stringVal]);
79
+ }
80
+ }
81
+ }
82
+ }
83
+ if (config.compoundVariants) {
84
+ for (const cv of config.compoundVariants) {
85
+ const { class: cvClass, className: cvClassName, ...cvConditions } = cv;
86
+ const matches = Object.entries(cvConditions).every(([key, val]) => {
87
+ return String(mergedProps[key]) === String(val);
88
+ });
89
+ if (matches) {
90
+ if (cvClass) classes.push(cvClass);
91
+ if (cvClassName) classes.push(cvClassName);
92
+ }
93
+ }
94
+ }
95
+ if (props?.class) {
96
+ classes.push(props.class);
97
+ }
98
+ if (props?.className) {
99
+ classes.push(props.className);
100
+ }
101
+ return cn(...classes);
102
+ };
103
+ }
104
+ function createStyleContext() {
105
+ const Context = React.createContext({});
106
+ const useStyleContext2 = () => React.useContext(Context);
107
+ const withStyleContext2 = (Component, _scope = "GLOBAL") => {
108
+ const ForwardedComponent = React.forwardRef((props, ref) => {
109
+ return React.createElement(
110
+ Context.Provider,
111
+ { value: props },
112
+ React.createElement(Component, { ...props, ref })
113
+ );
114
+ });
115
+ ForwardedComponent.displayName = `withStyleContext(${Component.displayName || Component.name || "Component"})`;
116
+ return ForwardedComponent;
117
+ };
118
+ return {
119
+ Context,
120
+ Provider: Context.Provider,
121
+ useStyleContext: useStyleContext2,
122
+ withStyleContext: withStyleContext2
123
+ };
124
+ }
125
+ const defaultStyleContext = createStyleContext();
126
+ const useStyleContext = defaultStyleContext.useStyleContext;
127
+ const withStyleContext = defaultStyleContext.withStyleContext;
128
+
129
+ export { createStyleContext, nativeThemes, nativeTokens, tva, useStyleContext, vars, withStyleContext };
package/package.json CHANGED
@@ -1,6 +1,73 @@
1
1
  {
2
2
  "name": "@timmbr/native-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "Unbundled Gluestack UI v2 primitives with shared Timmbr design tokens for React Native and Web",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "react-native": "./src/native/index.tsx",
10
+ "exports": {
11
+ ".": {
12
+ "react-native": "./src/native/index.tsx",
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "./native": "./src/native/index.tsx",
18
+ "./theme": {
19
+ "types": "./dist/theme/config.d.ts",
20
+ "import": "./dist/theme/config.js",
21
+ "default": "./dist/theme/config.js"
22
+ },
23
+ "./*": {
24
+ "types": "./dist/*.d.ts",
25
+ "import": "./dist/*.js",
26
+ "default": "./dist/*.js"
27
+ }
28
+ },
29
+ "sideEffects": false,
30
+ "files": [
31
+ "dist",
32
+ "src/native"
33
+ ],
34
+ "dependencies": {
35
+ "class-variance-authority": "^0.7.1",
36
+ "@timmbr/icons": "1.7.0",
37
+ "@timmbr/theme": "1.3.0",
38
+ "@timmbr/utils": "1.6.0"
39
+ },
40
+ "peerDependencies": {
41
+ "react": ">=18.0.0",
42
+ "react-dom": ">=18.0.0"
43
+ },
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
47
+ "devDependencies": {
48
+ "@storybook/react": "^10.6.0",
49
+ "@testing-library/jest-dom": "^6.6.3",
50
+ "@testing-library/react": "^16.2.0",
51
+ "@testing-library/user-event": "^14.6.1",
52
+ "@types/react": "^19.0.8",
53
+ "@types/react-dom": "^19.0.3",
54
+ "@vitejs/plugin-react": "^4.3.4",
55
+ "jsdom": "^26.0.0",
56
+ "react": "^19.0.0",
57
+ "react-dom": "^19.0.0",
58
+ "rimraf": "^6.0.1",
59
+ "rollup-plugin-preserve-directives": "^0.4.0",
60
+ "typescript": "^5.7.3",
61
+ "vite": "^6.2.0",
62
+ "vitest": "^3.0.5",
63
+ "@timmbr/tsconfig": "1.0.0"
64
+ },
65
+ "scripts": {
66
+ "build": "vite build && tsc --project tsconfig.build.json",
67
+ "dev": "vite build --watch",
68
+ "typecheck": "tsc --noEmit",
69
+ "test": "vitest run",
70
+ "test:watch": "vitest",
71
+ "clean": "rimraf dist"
72
+ }
6
73
  }