react-native-mantine 0.1.11

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 (334) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +28 -0
  3. package/lib/commonjs/components/ActionIcon/ActionIcon.js +71 -0
  4. package/lib/commonjs/components/ActionIcon/ActionIcon.js.map +1 -0
  5. package/lib/commonjs/components/ActionIcon/index.js +13 -0
  6. package/lib/commonjs/components/ActionIcon/index.js.map +1 -0
  7. package/lib/commonjs/components/BoxView/index.js +30 -0
  8. package/lib/commonjs/components/BoxView/index.js.map +1 -0
  9. package/lib/commonjs/components/Group/index.js +33 -0
  10. package/lib/commonjs/components/Group/index.js.map +1 -0
  11. package/lib/commonjs/components/Loader/Loader.js +42 -0
  12. package/lib/commonjs/components/Loader/Loader.js.map +1 -0
  13. package/lib/commonjs/components/Loader/index.js +13 -0
  14. package/lib/commonjs/components/Loader/index.js.map +1 -0
  15. package/lib/commonjs/components/Stack/index.js +30 -0
  16. package/lib/commonjs/components/Stack/index.js.map +1 -0
  17. package/lib/commonjs/components/Text/index.js +51 -0
  18. package/lib/commonjs/components/Text/index.js.map +1 -0
  19. package/lib/commonjs/components/UnstyledButton/UnstyledButton.js +42 -0
  20. package/lib/commonjs/components/UnstyledButton/UnstyledButton.js.map +1 -0
  21. package/lib/commonjs/components/UnstyledButton/UnstyledButton.styles.js +24 -0
  22. package/lib/commonjs/components/UnstyledButton/UnstyledButton.styles.js.map +1 -0
  23. package/lib/commonjs/components/UnstyledButton/index.js +13 -0
  24. package/lib/commonjs/components/UnstyledButton/index.js.map +1 -0
  25. package/lib/commonjs/components/index.js +72 -0
  26. package/lib/commonjs/components/index.js.map +1 -0
  27. package/lib/commonjs/fonts/Nunito-Bold.ttf +0 -0
  28. package/lib/commonjs/fonts/Nunito-Regular.ttf +0 -0
  29. package/lib/commonjs/fonts/Nunito-SemiBold.ttf +0 -0
  30. package/lib/commonjs/hooks/useCachedResources.js +36 -0
  31. package/lib/commonjs/hooks/useCachedResources.js.map +1 -0
  32. package/lib/commonjs/index.js +28 -0
  33. package/lib/commonjs/index.js.map +1 -0
  34. package/lib/commonjs/theme/constants.js +25 -0
  35. package/lib/commonjs/theme/constants.js.map +1 -0
  36. package/lib/commonjs/theme/create-styles.js +25 -0
  37. package/lib/commonjs/theme/create-styles.js.map +1 -0
  38. package/lib/commonjs/theme/default-theme.js +132 -0
  39. package/lib/commonjs/theme/default-theme.js.map +1 -0
  40. package/lib/commonjs/theme/filter-props.js +15 -0
  41. package/lib/commonjs/theme/filter-props.js.map +1 -0
  42. package/lib/commonjs/theme/functions/attach-functions.js +18 -0
  43. package/lib/commonjs/theme/functions/attach-functions.js.map +1 -0
  44. package/lib/commonjs/theme/functions/fns/index.js +15 -0
  45. package/lib/commonjs/theme/functions/fns/index.js.map +1 -0
  46. package/lib/commonjs/theme/functions/fns/radius.js +16 -0
  47. package/lib/commonjs/theme/functions/fns/radius.js.map +1 -0
  48. package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js +12 -0
  49. package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js.map +1 -0
  50. package/lib/commonjs/theme/functions/fns/variant.js +11 -0
  51. package/lib/commonjs/theme/functions/fns/variant.js.map +1 -0
  52. package/lib/commonjs/theme/generate-theme.js +30 -0
  53. package/lib/commonjs/theme/generate-theme.js.map +1 -0
  54. package/lib/commonjs/theme/get-size/index.js +16 -0
  55. package/lib/commonjs/theme/get-size/index.js.map +1 -0
  56. package/lib/commonjs/theme/index.js +46 -0
  57. package/lib/commonjs/theme/index.js.map +1 -0
  58. package/lib/commonjs/theme/theme-provider.js +106 -0
  59. package/lib/commonjs/theme/theme-provider.js.map +1 -0
  60. package/lib/commonjs/theme/theme.d.js +2 -0
  61. package/lib/commonjs/theme/theme.d.js.map +1 -0
  62. package/lib/commonjs/theme/types/ColorScheme.js +2 -0
  63. package/lib/commonjs/theme/types/ColorScheme.js.map +1 -0
  64. package/lib/commonjs/theme/types/DefaultProps.js +2 -0
  65. package/lib/commonjs/theme/types/DefaultProps.js.map +1 -0
  66. package/lib/commonjs/theme/types/MantineColor.js +6 -0
  67. package/lib/commonjs/theme/types/MantineColor.js.map +1 -0
  68. package/lib/commonjs/theme/types/MantineSize.js +2 -0
  69. package/lib/commonjs/theme/types/MantineSize.js.map +1 -0
  70. package/lib/commonjs/theme/types/MantineStyleSystem.js +6 -0
  71. package/lib/commonjs/theme/types/MantineStyleSystem.js.map +1 -0
  72. package/lib/commonjs/theme/types/Tuple.js +2 -0
  73. package/lib/commonjs/theme/types/Tuple.js.map +1 -0
  74. package/lib/commonjs/theme/types/Variants.js +2 -0
  75. package/lib/commonjs/theme/types/Variants.js.map +1 -0
  76. package/lib/commonjs/theme/types/index.js +2 -0
  77. package/lib/commonjs/theme/types/index.js.map +1 -0
  78. package/lib/module/components/ActionIcon/ActionIcon.js +66 -0
  79. package/lib/module/components/ActionIcon/ActionIcon.js.map +1 -0
  80. package/lib/module/components/ActionIcon/index.js +4 -0
  81. package/lib/module/components/ActionIcon/index.js.map +1 -0
  82. package/lib/module/components/BoxView/index.js +26 -0
  83. package/lib/module/components/BoxView/index.js.map +1 -0
  84. package/lib/module/components/Group/index.js +28 -0
  85. package/lib/module/components/Group/index.js.map +1 -0
  86. package/lib/module/components/Loader/Loader.js +38 -0
  87. package/lib/module/components/Loader/Loader.js.map +1 -0
  88. package/lib/module/components/Loader/index.js +4 -0
  89. package/lib/module/components/Loader/index.js.map +1 -0
  90. package/lib/module/components/Stack/index.js +25 -0
  91. package/lib/module/components/Stack/index.js.map +1 -0
  92. package/lib/module/components/Text/index.js +47 -0
  93. package/lib/module/components/Text/index.js.map +1 -0
  94. package/lib/module/components/UnstyledButton/UnstyledButton.js +35 -0
  95. package/lib/module/components/UnstyledButton/UnstyledButton.js.map +1 -0
  96. package/lib/module/components/UnstyledButton/UnstyledButton.styles.js +20 -0
  97. package/lib/module/components/UnstyledButton/UnstyledButton.styles.js.map +1 -0
  98. package/lib/module/components/UnstyledButton/index.js +4 -0
  99. package/lib/module/components/UnstyledButton/index.js.map +1 -0
  100. package/lib/module/components/index.js +9 -0
  101. package/lib/module/components/index.js.map +1 -0
  102. package/lib/module/fonts/Nunito-Bold.ttf +0 -0
  103. package/lib/module/fonts/Nunito-Regular.ttf +0 -0
  104. package/lib/module/fonts/Nunito-SemiBold.ttf +0 -0
  105. package/lib/module/hooks/useCachedResources.js +30 -0
  106. package/lib/module/hooks/useCachedResources.js.map +1 -0
  107. package/lib/module/index.js +5 -0
  108. package/lib/module/index.js.map +1 -0
  109. package/lib/module/theme/constants.js +21 -0
  110. package/lib/module/theme/constants.js.map +1 -0
  111. package/lib/module/theme/create-styles.js +21 -0
  112. package/lib/module/theme/create-styles.js.map +1 -0
  113. package/lib/module/theme/default-theme.js +128 -0
  114. package/lib/module/theme/default-theme.js.map +1 -0
  115. package/lib/module/theme/filter-props.js +11 -0
  116. package/lib/module/theme/filter-props.js.map +1 -0
  117. package/lib/module/theme/functions/attach-functions.js +14 -0
  118. package/lib/module/theme/functions/attach-functions.js.map +1 -0
  119. package/lib/module/theme/functions/fns/index.js +11 -0
  120. package/lib/module/theme/functions/fns/index.js.map +1 -0
  121. package/lib/module/theme/functions/fns/radius.js +12 -0
  122. package/lib/module/theme/functions/fns/radius.js.map +1 -0
  123. package/lib/module/theme/functions/fns/theme-color/theme-color.js +8 -0
  124. package/lib/module/theme/functions/fns/theme-color/theme-color.js.map +1 -0
  125. package/lib/module/theme/functions/fns/variant.js +6 -0
  126. package/lib/module/theme/functions/fns/variant.js.map +1 -0
  127. package/lib/module/theme/generate-theme.js +25 -0
  128. package/lib/module/theme/generate-theme.js.map +1 -0
  129. package/lib/module/theme/get-size/index.js +12 -0
  130. package/lib/module/theme/get-size/index.js.map +1 -0
  131. package/lib/module/theme/index.js +7 -0
  132. package/lib/module/theme/index.js.map +1 -0
  133. package/lib/module/theme/theme-provider.js +94 -0
  134. package/lib/module/theme/theme-provider.js.map +1 -0
  135. package/lib/module/theme/theme.d.js +2 -0
  136. package/lib/module/theme/theme.d.js.map +1 -0
  137. package/lib/module/theme/types/ColorScheme.js +2 -0
  138. package/lib/module/theme/types/ColorScheme.js.map +1 -0
  139. package/lib/module/theme/types/DefaultProps.js +2 -0
  140. package/lib/module/theme/types/DefaultProps.js.map +1 -0
  141. package/lib/module/theme/types/MantineColor.js +4 -0
  142. package/lib/module/theme/types/MantineColor.js.map +1 -0
  143. package/lib/module/theme/types/MantineSize.js +2 -0
  144. package/lib/module/theme/types/MantineSize.js.map +1 -0
  145. package/lib/module/theme/types/MantineStyleSystem.js +4 -0
  146. package/lib/module/theme/types/MantineStyleSystem.js.map +1 -0
  147. package/lib/module/theme/types/Tuple.js +2 -0
  148. package/lib/module/theme/types/Tuple.js.map +1 -0
  149. package/lib/module/theme/types/Variants.js +2 -0
  150. package/lib/module/theme/types/Variants.js.map +1 -0
  151. package/lib/module/theme/types/index.js +2 -0
  152. package/lib/module/theme/types/index.js.map +1 -0
  153. package/lib/typescript/commonjs/package.json +1 -0
  154. package/lib/typescript/commonjs/src/components/ActionIcon/ActionIcon.d.ts +17 -0
  155. package/lib/typescript/commonjs/src/components/ActionIcon/ActionIcon.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/src/components/ActionIcon/index.d.ts +3 -0
  157. package/lib/typescript/commonjs/src/components/ActionIcon/index.d.ts.map +1 -0
  158. package/lib/typescript/commonjs/src/components/BoxView/index.d.ts +17 -0
  159. package/lib/typescript/commonjs/src/components/BoxView/index.d.ts.map +1 -0
  160. package/lib/typescript/commonjs/src/components/Group/index.d.ts +9 -0
  161. package/lib/typescript/commonjs/src/components/Group/index.d.ts.map +1 -0
  162. package/lib/typescript/commonjs/src/components/Loader/Loader.d.ts +14 -0
  163. package/lib/typescript/commonjs/src/components/Loader/Loader.d.ts.map +1 -0
  164. package/lib/typescript/commonjs/src/components/Loader/index.d.ts +3 -0
  165. package/lib/typescript/commonjs/src/components/Loader/index.d.ts.map +1 -0
  166. package/lib/typescript/commonjs/src/components/Stack/index.d.ts +6 -0
  167. package/lib/typescript/commonjs/src/components/Stack/index.d.ts.map +1 -0
  168. package/lib/typescript/commonjs/src/components/Text/index.d.ts +20 -0
  169. package/lib/typescript/commonjs/src/components/Text/index.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.d.ts +10 -0
  171. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts +9 -0
  173. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -0
  174. package/lib/typescript/commonjs/src/components/UnstyledButton/index.d.ts +3 -0
  175. package/lib/typescript/commonjs/src/components/UnstyledButton/index.d.ts.map +1 -0
  176. package/lib/typescript/commonjs/src/components/index.d.ts +7 -0
  177. package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/src/hooks/useCachedResources.d.ts +2 -0
  179. package/lib/typescript/commonjs/src/hooks/useCachedResources.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/src/index.d.ts +5 -0
  181. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/src/theme/constants.d.ts +13 -0
  183. package/lib/typescript/commonjs/src/theme/constants.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/src/theme/create-styles.d.ts +12 -0
  185. package/lib/typescript/commonjs/src/theme/create-styles.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/src/theme/default-theme.d.ts +58 -0
  187. package/lib/typescript/commonjs/src/theme/default-theme.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/src/theme/filter-props.d.ts +6 -0
  189. package/lib/typescript/commonjs/src/theme/filter-props.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts +2 -0
  191. package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts +8 -0
  193. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/src/theme/functions/fns/radius.d.ts +3 -0
  195. package/lib/typescript/commonjs/src/theme/functions/fns/radius.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts +2 -0
  197. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts +2 -0
  199. package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/src/theme/generate-theme.d.ts +3 -0
  201. package/lib/typescript/commonjs/src/theme/generate-theme.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/src/theme/get-size/index.d.ts +6 -0
  203. package/lib/typescript/commonjs/src/theme/get-size/index.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/src/theme/index.d.ts +5 -0
  205. package/lib/typescript/commonjs/src/theme/index.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/src/theme/theme-provider.d.ts +21 -0
  207. package/lib/typescript/commonjs/src/theme/theme-provider.d.ts.map +1 -0
  208. package/lib/typescript/commonjs/src/theme/types/ColorScheme.d.ts +2 -0
  209. package/lib/typescript/commonjs/src/theme/types/ColorScheme.d.ts.map +1 -0
  210. package/lib/typescript/commonjs/src/theme/types/DefaultProps.d.ts +8 -0
  211. package/lib/typescript/commonjs/src/theme/types/DefaultProps.d.ts.map +1 -0
  212. package/lib/typescript/commonjs/src/theme/types/MantineColor.d.ts +8 -0
  213. package/lib/typescript/commonjs/src/theme/types/MantineColor.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/src/theme/types/MantineSize.d.ts +4 -0
  215. package/lib/typescript/commonjs/src/theme/types/MantineSize.d.ts.map +1 -0
  216. package/lib/typescript/commonjs/src/theme/types/MantineStyleSystem.d.ts +5 -0
  217. package/lib/typescript/commonjs/src/theme/types/MantineStyleSystem.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/src/theme/types/Tuple.d.ts +4 -0
  219. package/lib/typescript/commonjs/src/theme/types/Tuple.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/src/theme/types/Variants.d.ts +2 -0
  221. package/lib/typescript/commonjs/src/theme/types/Variants.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/src/theme/types/index.d.ts +8 -0
  223. package/lib/typescript/commonjs/src/theme/types/index.d.ts.map +1 -0
  224. package/lib/typescript/module/package.json +1 -0
  225. package/lib/typescript/module/src/components/ActionIcon/ActionIcon.d.ts +17 -0
  226. package/lib/typescript/module/src/components/ActionIcon/ActionIcon.d.ts.map +1 -0
  227. package/lib/typescript/module/src/components/ActionIcon/index.d.ts +3 -0
  228. package/lib/typescript/module/src/components/ActionIcon/index.d.ts.map +1 -0
  229. package/lib/typescript/module/src/components/BoxView/index.d.ts +17 -0
  230. package/lib/typescript/module/src/components/BoxView/index.d.ts.map +1 -0
  231. package/lib/typescript/module/src/components/Group/index.d.ts +9 -0
  232. package/lib/typescript/module/src/components/Group/index.d.ts.map +1 -0
  233. package/lib/typescript/module/src/components/Loader/Loader.d.ts +14 -0
  234. package/lib/typescript/module/src/components/Loader/Loader.d.ts.map +1 -0
  235. package/lib/typescript/module/src/components/Loader/index.d.ts +3 -0
  236. package/lib/typescript/module/src/components/Loader/index.d.ts.map +1 -0
  237. package/lib/typescript/module/src/components/Stack/index.d.ts +6 -0
  238. package/lib/typescript/module/src/components/Stack/index.d.ts.map +1 -0
  239. package/lib/typescript/module/src/components/Text/index.d.ts +20 -0
  240. package/lib/typescript/module/src/components/Text/index.d.ts.map +1 -0
  241. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.d.ts +10 -0
  242. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.d.ts.map +1 -0
  243. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts +9 -0
  244. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -0
  245. package/lib/typescript/module/src/components/UnstyledButton/index.d.ts +3 -0
  246. package/lib/typescript/module/src/components/UnstyledButton/index.d.ts.map +1 -0
  247. package/lib/typescript/module/src/components/index.d.ts +7 -0
  248. package/lib/typescript/module/src/components/index.d.ts.map +1 -0
  249. package/lib/typescript/module/src/hooks/useCachedResources.d.ts +2 -0
  250. package/lib/typescript/module/src/hooks/useCachedResources.d.ts.map +1 -0
  251. package/lib/typescript/module/src/index.d.ts +5 -0
  252. package/lib/typescript/module/src/index.d.ts.map +1 -0
  253. package/lib/typescript/module/src/theme/constants.d.ts +13 -0
  254. package/lib/typescript/module/src/theme/constants.d.ts.map +1 -0
  255. package/lib/typescript/module/src/theme/create-styles.d.ts +12 -0
  256. package/lib/typescript/module/src/theme/create-styles.d.ts.map +1 -0
  257. package/lib/typescript/module/src/theme/default-theme.d.ts +58 -0
  258. package/lib/typescript/module/src/theme/default-theme.d.ts.map +1 -0
  259. package/lib/typescript/module/src/theme/filter-props.d.ts +6 -0
  260. package/lib/typescript/module/src/theme/filter-props.d.ts.map +1 -0
  261. package/lib/typescript/module/src/theme/functions/attach-functions.d.ts +2 -0
  262. package/lib/typescript/module/src/theme/functions/attach-functions.d.ts.map +1 -0
  263. package/lib/typescript/module/src/theme/functions/fns/index.d.ts +8 -0
  264. package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -0
  265. package/lib/typescript/module/src/theme/functions/fns/radius.d.ts +3 -0
  266. package/lib/typescript/module/src/theme/functions/fns/radius.d.ts.map +1 -0
  267. package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts +2 -0
  268. package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -0
  269. package/lib/typescript/module/src/theme/functions/fns/variant.d.ts +2 -0
  270. package/lib/typescript/module/src/theme/functions/fns/variant.d.ts.map +1 -0
  271. package/lib/typescript/module/src/theme/generate-theme.d.ts +3 -0
  272. package/lib/typescript/module/src/theme/generate-theme.d.ts.map +1 -0
  273. package/lib/typescript/module/src/theme/get-size/index.d.ts +6 -0
  274. package/lib/typescript/module/src/theme/get-size/index.d.ts.map +1 -0
  275. package/lib/typescript/module/src/theme/index.d.ts +5 -0
  276. package/lib/typescript/module/src/theme/index.d.ts.map +1 -0
  277. package/lib/typescript/module/src/theme/theme-provider.d.ts +21 -0
  278. package/lib/typescript/module/src/theme/theme-provider.d.ts.map +1 -0
  279. package/lib/typescript/module/src/theme/types/ColorScheme.d.ts +2 -0
  280. package/lib/typescript/module/src/theme/types/ColorScheme.d.ts.map +1 -0
  281. package/lib/typescript/module/src/theme/types/DefaultProps.d.ts +8 -0
  282. package/lib/typescript/module/src/theme/types/DefaultProps.d.ts.map +1 -0
  283. package/lib/typescript/module/src/theme/types/MantineColor.d.ts +8 -0
  284. package/lib/typescript/module/src/theme/types/MantineColor.d.ts.map +1 -0
  285. package/lib/typescript/module/src/theme/types/MantineSize.d.ts +4 -0
  286. package/lib/typescript/module/src/theme/types/MantineSize.d.ts.map +1 -0
  287. package/lib/typescript/module/src/theme/types/MantineStyleSystem.d.ts +5 -0
  288. package/lib/typescript/module/src/theme/types/MantineStyleSystem.d.ts.map +1 -0
  289. package/lib/typescript/module/src/theme/types/Tuple.d.ts +4 -0
  290. package/lib/typescript/module/src/theme/types/Tuple.d.ts.map +1 -0
  291. package/lib/typescript/module/src/theme/types/Variants.d.ts +2 -0
  292. package/lib/typescript/module/src/theme/types/Variants.d.ts.map +1 -0
  293. package/lib/typescript/module/src/theme/types/index.d.ts +8 -0
  294. package/lib/typescript/module/src/theme/types/index.d.ts.map +1 -0
  295. package/package.json +194 -0
  296. package/src/components/ActionIcon/ActionIcon.tsx +64 -0
  297. package/src/components/ActionIcon/index.ts +3 -0
  298. package/src/components/BoxView/index.tsx +30 -0
  299. package/src/components/Group/index.tsx +48 -0
  300. package/src/components/Loader/Loader.tsx +50 -0
  301. package/src/components/Loader/index.ts +2 -0
  302. package/src/components/Stack/index.tsx +29 -0
  303. package/src/components/Text/index.tsx +81 -0
  304. package/src/components/UnstyledButton/UnstyledButton.styles.ts +16 -0
  305. package/src/components/UnstyledButton/UnstyledButton.tsx +34 -0
  306. package/src/components/UnstyledButton/index.ts +2 -0
  307. package/src/components/index.tsx +6 -0
  308. package/src/fonts/Nunito-Bold.ttf +0 -0
  309. package/src/fonts/Nunito-Regular.ttf +0 -0
  310. package/src/fonts/Nunito-SemiBold.ttf +0 -0
  311. package/src/hooks/useCachedResources.ts +30 -0
  312. package/src/index.tsx +4 -0
  313. package/src/theme/constants.ts +20 -0
  314. package/src/theme/create-styles.ts +31 -0
  315. package/src/theme/default-theme.ts +359 -0
  316. package/src/theme/filter-props.ts +12 -0
  317. package/src/theme/functions/attach-functions.ts +12 -0
  318. package/src/theme/functions/fns/index.ts +9 -0
  319. package/src/theme/functions/fns/radius.ts +16 -0
  320. package/src/theme/functions/fns/theme-color/theme-color.ts +6 -0
  321. package/src/theme/functions/fns/variant.ts +3 -0
  322. package/src/theme/generate-theme.ts +20 -0
  323. package/src/theme/get-size/index.ts +18 -0
  324. package/src/theme/index.tsx +4 -0
  325. package/src/theme/theme-provider.tsx +131 -0
  326. package/src/theme/theme.d.ts +13 -0
  327. package/src/theme/types/ColorScheme.ts +1 -0
  328. package/src/theme/types/DefaultProps.ts +13 -0
  329. package/src/theme/types/MantineColor.ts +28 -0
  330. package/src/theme/types/MantineSize.ts +3 -0
  331. package/src/theme/types/MantineStyleSystem.ts +62 -0
  332. package/src/theme/types/Tuple.ts +9 -0
  333. package/src/theme/types/Variants.ts +1 -0
  334. package/src/theme/types/index.ts +12 -0
@@ -0,0 +1,81 @@
1
+ import { useTheme } from '../../theme/theme-provider';
2
+ import type { Palette } from '../../theme/theme';
3
+ import { get } from 'lodash-es';
4
+ import { forwardRef } from 'react';
5
+ import { Text as DefaultText } from 'react-native';
6
+
7
+ export type TextProps = DefaultText['props'] & {
8
+ size?: string;
9
+ bold?: boolean;
10
+ questrial?: boolean;
11
+ semiBold?: boolean;
12
+ fontSize?: number;
13
+ color?: string;
14
+ white?: boolean;
15
+ };
16
+
17
+ const propToColor = (
18
+ color: string,
19
+ colors: { [key: string]: Palette },
20
+ primaryShade: number
21
+ ): string => {
22
+ const colorExistOnPalette = get(
23
+ colors,
24
+ `${color}.${primaryShade}`,
25
+ ''
26
+ ) as string;
27
+ if (colorExistOnPalette) {
28
+ return colorExistOnPalette;
29
+ }
30
+ return color;
31
+ };
32
+
33
+ export const Text = forwardRef((props: TextProps, ref: any) => {
34
+ const {
35
+ style,
36
+ color,
37
+ white,
38
+ size = 'md',
39
+ bold = false,
40
+ questrial = false,
41
+ semiBold = false,
42
+ fontSize,
43
+ ...otherProps
44
+ } = props;
45
+
46
+ const {
47
+ fontFamily,
48
+ fontFamilyBold,
49
+ fontFamilySemiBold,
50
+ colors,
51
+ primaryShade,
52
+ fontSizes,
53
+ light,
54
+ } = useTheme();
55
+
56
+ return (
57
+ <DefaultText
58
+ ref={ref}
59
+ style={[
60
+ {
61
+ fontFamily: semiBold
62
+ ? fontFamilySemiBold
63
+ : bold
64
+ ? fontFamilyBold
65
+ : questrial
66
+ ? 'Questrial'
67
+ : fontFamily,
68
+ fontWeight: bold ? '900' : '300',
69
+ fontSize: fontSize ? fontSize : get(fontSizes, size, 16),
70
+ color: white
71
+ ? 'white'
72
+ : color
73
+ ? propToColor(color, colors, primaryShade)
74
+ : light.text,
75
+ },
76
+ style,
77
+ ]}
78
+ {...otherProps}
79
+ />
80
+ );
81
+ });
@@ -0,0 +1,16 @@
1
+ import { createStyles } from "../../theme";
2
+
3
+ export default createStyles((theme, {variant} ) => ({
4
+ root: {
5
+ cursor: 'pointer',
6
+ border: 0,
7
+ padding: 0,
8
+ appearance: 'none',
9
+ fontSize: theme.fontSizes.md,
10
+ textAlign: 'left',
11
+ color: theme.light.text,
12
+ textDecoration: 'none',
13
+ boxSizing: 'border-box',
14
+ backgroundColor: variant === 'transparent' ? 'transparent' : theme.light.background,
15
+ },
16
+ }));
@@ -0,0 +1,34 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { BoxView } from '../BoxView';
3
+ import useStyles from './UnstyledButton.styles';
4
+ import { TouchableOpacity } from 'react-native';
5
+ import { useComponentDefaultProps } from '../../theme/theme-provider';
6
+ import { Text } from '../Text';
7
+
8
+ export interface UnstyledButtonProps {
9
+ variant?: string;
10
+ children?: React.ReactNode;
11
+ onPress?: (payload: any) => void;
12
+ }
13
+
14
+ export const UnstyledButton = forwardRef<
15
+ any,
16
+ UnstyledButtonProps & { style?: any }
17
+ >((props, ref) => {
18
+ const { variant, style, children, onPress, ...others } =
19
+ useComponentDefaultProps('UnstyledButton', {}, props);
20
+
21
+ const { styles } = useStyles({
22
+ variant,
23
+ });
24
+
25
+ return (
26
+ <TouchableOpacity
27
+ onPress={typeof onPress === 'function' ? onPress : () => {}}
28
+ >
29
+ <BoxView ref={ref} style={[styles.root, style]} {...others}>
30
+ <Text>{children}</Text>
31
+ </BoxView>
32
+ </TouchableOpacity>
33
+ );
34
+ });
@@ -0,0 +1,2 @@
1
+ export { UnstyledButton } from './UnstyledButton';
2
+ export type { UnstyledButtonProps } from './UnstyledButton';
@@ -0,0 +1,6 @@
1
+ export * from './BoxView';
2
+ export * from './Group';
3
+ export * from './Stack';
4
+ export * from './Text';
5
+ export * from './UnstyledButton';
6
+ export * from './ActionIcon';
Binary file
Binary file
Binary file
@@ -0,0 +1,30 @@
1
+ import * as Font from 'expo-font'
2
+ import { useEffect, useState } from 'react'
3
+
4
+ export default function useCachedResources(): boolean {
5
+ const [isLoadingComplete, setLoadingComplete] = useState(false)
6
+
7
+ // Load any resources or data that we need prior to rendering the app
8
+ useEffect(() => {
9
+ async function loadResourcesAndDataAsync(): Promise<void> {
10
+ try {
11
+ // SplashScreen.preventAutoHideAsync()
12
+ // Load fonts
13
+ await Font.loadAsync({
14
+ Nunito: require('../fonts/Nunito-Regular.ttf'),
15
+ 'Nunito Bold': require('../fonts/Nunito-Bold.ttf'),
16
+ 'Nunito SemiBold': require('../fonts/Nunito-SemiBold.ttf'),
17
+ })
18
+ } catch (e) {
19
+ // We might want to provide this error information to an error reporting service
20
+ // console.warn(e)
21
+ } finally {
22
+ setLoadingComplete(true)
23
+ }
24
+ }
25
+
26
+ loadResourcesAndDataAsync()
27
+ }, [])
28
+
29
+ return isLoadingComplete
30
+ }
package/src/index.tsx ADDED
@@ -0,0 +1,4 @@
1
+ export * from './theme';
2
+ export * from './components';
3
+ export type * from './theme/theme';
4
+ export type * from './theme/types';
@@ -0,0 +1,20 @@
1
+ import { Dimensions } from 'react-native';
2
+
3
+ const width = Dimensions.get('window').width;
4
+ const height = Dimensions.get('window').height;
5
+ const deviceWidth = Dimensions.get('screen').width;
6
+ const deviceHeight = Dimensions.get('screen').height;
7
+ const bottomNavBarHeight = deviceHeight - height;
8
+
9
+ export const Layout = {
10
+ window: {
11
+ width,
12
+ height,
13
+ },
14
+ screen: {
15
+ width: deviceWidth,
16
+ height: deviceHeight,
17
+ },
18
+ bottomNavBarHeight: bottomNavBarHeight ? bottomNavBarHeight : 0,
19
+ isSmallDevice: width <= 375,
20
+ };
@@ -0,0 +1,31 @@
1
+ import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
2
+
3
+ import { StyleSheet } from 'react-native';
4
+
5
+ import { useTheme } from './theme-provider';
6
+
7
+ import type { TTheme } from './default-theme';
8
+
9
+ type NamedStyles<T> = {
10
+ [P in keyof T]: ViewStyle | TextStyle | ImageStyle;
11
+ };
12
+
13
+ export function createStyles<T = any>(
14
+ input: (theme: TTheme, params: any) => NamedStyles<T>
15
+ ) {
16
+ const getStyleObject = typeof input === 'function' ? input : () => input;
17
+ function useStyles(params?: any) {
18
+ const theme = useTheme();
19
+ const styleObject = getStyleObject(theme, params);
20
+ const sx = (...args: any) => {
21
+ return args;
22
+ };
23
+ return {
24
+ styles: StyleSheet.create(styleObject),
25
+ theme,
26
+ sx,
27
+ };
28
+ }
29
+
30
+ return useStyles;
31
+ }
@@ -0,0 +1,359 @@
1
+ import { attachFunctions } from './functions/attach-functions';
2
+ import type { Palette } from './theme';
3
+
4
+ export const DEFAULT_COLORS: {
5
+ [key: string]: Palette;
6
+ } = {
7
+ dark: [
8
+ '#2E2E2E',
9
+ '#2A2A2A',
10
+ '#262626',
11
+ '#232323',
12
+ '#1F1F1F',
13
+ '#1D1D1D',
14
+ '#1A1A1A',
15
+ '#171717',
16
+ '#151515',
17
+ '#131313',
18
+ ],
19
+
20
+ gray: [
21
+ '#F6F6F6',
22
+ '#E0E0E0',
23
+ '#CCCCCC',
24
+ '#B9B9B9',
25
+ '#A8A8A8',
26
+ '#999999',
27
+ '#8A8A8A',
28
+ '#7C7C7C',
29
+ '#707070',
30
+ '#646464',
31
+ ],
32
+ gray2: [
33
+ '#A3A3A3',
34
+ '#949494',
35
+ '#878787',
36
+ '#7A7A7A',
37
+ '#6F6F6F',
38
+ '#656565',
39
+ '#5C5C5C',
40
+ '#535353',
41
+ '#4B4B4B',
42
+ '#434343',
43
+ ],
44
+
45
+ red: [
46
+ '#ffeaea',
47
+ '#fcd4d4',
48
+ '#f3a8a8',
49
+ '#eb7877',
50
+ '#e4504f',
51
+ '#e13735',
52
+ '#e02928',
53
+ '#c71c1c',
54
+ '#b21518',
55
+ '#9c0711',
56
+ ],
57
+
58
+ pink: [
59
+ '#fff0f6',
60
+ '#ffdeeb',
61
+ '#fcc2d7',
62
+ '#faa2c1',
63
+ '#f783ac',
64
+ '#f06595',
65
+ '#e64980',
66
+ '#d6336c',
67
+ '#c2255c',
68
+ '#a61e4d',
69
+ ],
70
+
71
+ grape: [
72
+ '#f8f0fc',
73
+ '#f3d9fa',
74
+ '#eebefa',
75
+ '#e599f7',
76
+ '#da77f2',
77
+ '#cc5de8',
78
+ '#be4bdb',
79
+ '#ae3ec9',
80
+ '#9c36b5',
81
+ '#862e9c',
82
+ ],
83
+
84
+ violet: [
85
+ '#f3f0ff',
86
+ '#e5dbff',
87
+ '#d0bfff',
88
+ '#b197fc',
89
+ '#9775fa',
90
+ '#845ef7',
91
+ '#7950f2',
92
+ '#7048e8',
93
+ '#6741d9',
94
+ '#5f3dc4',
95
+ ],
96
+
97
+ indigo: [
98
+ '#edf2ff',
99
+ '#dbe4ff',
100
+ '#bac8ff',
101
+ '#91a7ff',
102
+ '#748ffc',
103
+ '#5c7cfa',
104
+ '#4c6ef5',
105
+ '#4263eb',
106
+ '#3b5bdb',
107
+ '#364fc7',
108
+ ],
109
+
110
+ blue: [
111
+ '#e7f5ff',
112
+ '#d0ebff',
113
+ '#a5d8ff',
114
+ '#74c0fc',
115
+ '#4dabf7',
116
+ '#339af0',
117
+ '#228be6',
118
+ '#1c7ed6',
119
+ '#1971c2',
120
+ '#1864ab',
121
+ ],
122
+
123
+ cyan: [
124
+ '#e3fafc',
125
+ '#c5f6fa',
126
+ '#99e9f2',
127
+ '#66d9e8',
128
+ '#3bc9db',
129
+ '#22b8cf',
130
+ '#15aabf',
131
+ '#1098ad',
132
+ '#0c8599',
133
+ '#0b7285',
134
+ ],
135
+
136
+ teal: [
137
+ '#e6fcf5',
138
+ '#c3fae8',
139
+ '#96f2d7',
140
+ '#63e6be',
141
+ '#38d9a9',
142
+ '#20c997',
143
+ '#12b886',
144
+ '#0ca678',
145
+ '#099268',
146
+ '#087f5b',
147
+ ],
148
+
149
+ green: [
150
+ '#f4ffeb',
151
+ '#e7fdd5',
152
+ '#cbfca5',
153
+ '#aefb71',
154
+ '#95f948',
155
+ '#86f933',
156
+ '#7ef928',
157
+ '#6bdd1e',
158
+ '#5dc416',
159
+ '#4daa04',
160
+ ],
161
+
162
+ lime: [
163
+ '#f4fce3',
164
+ '#e9fac8',
165
+ '#d8f5a2',
166
+ '#c0eb75',
167
+ '#a9e34b',
168
+ '#94d82d',
169
+ '#82c91e',
170
+ '#74b816',
171
+ '#66a80f',
172
+ '#5c940d',
173
+ ],
174
+
175
+ yellow: [
176
+ '#fff9db',
177
+ '#fff3bf',
178
+ '#ffec99',
179
+ '#ffe066',
180
+ '#ffd43b',
181
+ '#fcc419',
182
+ '#fab005',
183
+ '#f59f00',
184
+ '#f08c00',
185
+ '#e67700',
186
+ ],
187
+
188
+ orange: [
189
+ '#fff6e2',
190
+ '#feecce',
191
+ '#fbd8a0',
192
+ '#f7c26d',
193
+ '#f4b042',
194
+ '#f3a426',
195
+ '#f29f16',
196
+ '#d78a07',
197
+ '#c07900',
198
+ '#a76800',
199
+ ],
200
+ secondary: [
201
+ '#f4f4f5',
202
+ '#e7e7e7',
203
+ '#cccccc',
204
+ '#afafaf',
205
+ '#989898',
206
+ '#898989',
207
+ '#818181',
208
+ '#6f6f6f',
209
+ '#616164',
210
+ '#545459',
211
+ ],
212
+ };
213
+
214
+ const tintColorLight = '#2f95dc';
215
+ const tintColorDark = '#fff';
216
+
217
+ export const _DEFAULT_THEME: TTheme = {
218
+ fontFamily: 'System font',
219
+ fontFamilyBold: 'System font',
220
+ fontFamilySemiBold: 'System font',
221
+ fontFamilyInput: 'System font',
222
+ localColor: '#1F2863',
223
+ primaryShade: 6,
224
+ colors: DEFAULT_COLORS,
225
+ primaryColor: 'blue',
226
+ secondaryColor: 'black',
227
+ secondaryBgColor: 'white',
228
+ light: {
229
+ text: '#000',
230
+ background: '#fdfdfd',
231
+ backgroundSecondary: '#fff',
232
+ backgroundThird: '#EFEFEF',
233
+ tint: tintColorLight,
234
+ tabIconDefault: '#ccc',
235
+ tabIconSelected: tintColorLight,
236
+ },
237
+ dark: {
238
+ text: '#fff',
239
+ background: '#272727',
240
+ backgroundSecondary: '#464F61',
241
+ backgroundThird: '#272727',
242
+ tint: tintColorDark,
243
+ tabIconDefault: '#ccc',
244
+ tabIconSelected: tintColorDark,
245
+ },
246
+ components: {},
247
+ other: {},
248
+ shadows: {
249
+ xs: '0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1)',
250
+ sm: '0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 10px 15px -5px, rgba(0, 0, 0, 0.04) 0px 7px 7px -5px',
251
+ md: '0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px',
252
+ lg: '0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 28px 23px -7px, rgba(0, 0, 0, 0.04) 0px 12px 12px -7px',
253
+ xl: '0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 36px 28px -7px, rgba(0, 0, 0, 0.04) 0px 17px 17px -7px',
254
+ },
255
+
256
+ fontSizes: {
257
+ xs: 12,
258
+ sm: 14,
259
+ md: 16,
260
+ lg: 18,
261
+ xl: 20,
262
+ },
263
+
264
+ defaultRadius:8,
265
+ radius: {
266
+ xs: 2,
267
+ sm: 4,
268
+ md: 8,
269
+ lg: 16,
270
+ xl: 32,
271
+ },
272
+
273
+ spacing: {
274
+ xs: 10,
275
+ sm: 12,
276
+ md: 16,
277
+ lg: 20,
278
+ xl: 24,
279
+ },
280
+ headings: {
281
+ fontFamily: 'System font',
282
+ fontWeight: 700,
283
+ sizes: {
284
+ h1: { fontSize: 34, lineHeight: 1.3, fontWeight: undefined },
285
+ h2: { fontSize: 26, lineHeight: 1.35, fontWeight: undefined },
286
+ h3: { fontSize: 22, lineHeight: 1.4, fontWeight: undefined },
287
+ h4: { fontSize: 18, lineHeight: 1.45, fontWeight: undefined },
288
+ h5: { fontSize: 16, lineHeight: 1.5, fontWeight: undefined },
289
+ h6: { fontSize: 14, lineHeight: 1.5, fontWeight: undefined },
290
+ },
291
+ },
292
+ window: {
293
+ width: 375,
294
+ height: 800,
295
+ },
296
+ primaryBgColor: 'white',
297
+ primaryTextColor: 'black',
298
+ };
299
+
300
+ export const DEFAULT_THEME = attachFunctions(_DEFAULT_THEME);
301
+
302
+ type ColorScheme = {
303
+ text: string;
304
+ background: string;
305
+ backgroundSecondary?: string;
306
+ backgroundThird?: string;
307
+ tint: string;
308
+ tabIconDefault: string;
309
+ tabIconSelected: string;
310
+ };
311
+
312
+ export type ThemeSize = {
313
+ xs: number;
314
+ sm: number;
315
+ md: number;
316
+ lg: number;
317
+ xl: number;
318
+ };
319
+
320
+ export type themeMode = 'dark' | 'light';
321
+
322
+ export type TTheme = {
323
+ fontFamily: string;
324
+ fontFamilyBold: string;
325
+
326
+ localColor: string;
327
+
328
+ currentMode?: themeMode;
329
+ toggleMode?: () => void;
330
+ primaryShade: number;
331
+ colors: { [key: string]: Palette };
332
+ primaryColor: string;
333
+ secondaryColor: string;
334
+ secondaryBgColor: string;
335
+
336
+ light: ColorScheme;
337
+ dark: ColorScheme;
338
+
339
+ other: {
340
+ [key: string]: any;
341
+ };
342
+ shadows: {
343
+ [key: string]: string;
344
+ };
345
+ radius: ThemeSize;
346
+ fontSizes: ThemeSize;
347
+ window: {
348
+ width: number;
349
+ height: number;
350
+ };
351
+ primaryBgColor: string;
352
+ primaryTextColor: string;
353
+
354
+ isIOS?: boolean;
355
+
356
+ OSVersion?: any;
357
+
358
+ [key: string]: any;
359
+ };
@@ -0,0 +1,12 @@
1
+ type FilterPropsRes<T extends Record<string, any>> = {
2
+ [Key in keyof T]-?: T[Key] extends undefined ? never : T[Key];
3
+ };
4
+
5
+ export function filterProps<T extends Record<string, any>>(props: T) {
6
+ return Object.keys(props).reduce<FilterPropsRes<T>>((acc, key: keyof T) => {
7
+ if (props[key] !== undefined) {
8
+ acc[key] = props[key];
9
+ }
10
+ return acc;
11
+ }, {} as FilterPropsRes<T>);
12
+ }
@@ -0,0 +1,12 @@
1
+ import { fns } from './fns';
2
+
3
+ export function attachFunctions(themeBase: any): any {
4
+ return {
5
+ ...themeBase,
6
+ fn: {
7
+ radius: fns.radius(themeBase),
8
+ variant: fns.variant(themeBase),
9
+ themeColor: fns.themeColor(themeBase),
10
+ },
11
+ };
12
+ }
@@ -0,0 +1,9 @@
1
+ import { radius } from './radius';
2
+ import { themeColor } from './theme-color/theme-color';
3
+ import { variant } from './variant';
4
+
5
+ export const fns = {
6
+ radius,
7
+ variant,
8
+ themeColor,
9
+ };
@@ -0,0 +1,16 @@
1
+ import type { MantineNumberSize } from '../../types';
2
+
3
+ export function radius(theme: any) {
4
+ return (size?: MantineNumberSize): string | number => {
5
+ if (!size) {
6
+ return theme.defaultRadius;
7
+ }
8
+
9
+ const defaultRadius =
10
+ typeof theme.defaultRadius === 'number'
11
+ ? theme.defaultRadius
12
+ : theme.radius[theme.defaultRadius] || theme.defaultRadius;
13
+
14
+ return theme.radius[size] || size || defaultRadius;
15
+ };
16
+ }
@@ -0,0 +1,6 @@
1
+
2
+ export function themeColor(_theme: any) {
3
+ return (_theme: any) => {
4
+ return {}
5
+ }
6
+ }
@@ -0,0 +1,3 @@
1
+ export const variant = (_theme: any) => (_variant: string) => {
2
+ return {}
3
+ }
@@ -0,0 +1,20 @@
1
+ import { DEFAULT_COLORS, DEFAULT_THEME } from './default-theme';
2
+ import type { TTheme } from './default-theme';
3
+ export const generateTheme = (theme?: Partial<TTheme>): TTheme => {
4
+ const { primaryShade = 7, other = {} } = theme || {};
5
+ return {
6
+ ...DEFAULT_THEME,
7
+ primaryShade: primaryShade,
8
+ other: other,
9
+ fontFamily: 'Nunito',
10
+ fontFamilyBold: 'Nunito Bold',
11
+ fontFamilySemiBold: 'Nunito SemiBold',
12
+ fontFamilyInput: 'Nunito',
13
+ primaryColor: 'blue',
14
+ secondaryColor: 'cyan',
15
+ headings: {
16
+ fontFamily: 'Nunito',
17
+ },
18
+ colors: DEFAULT_COLORS,
19
+ };
20
+ };