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 @@
1
+ {"version":3,"file":"attach-functions.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/functions/attach-functions.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,GAAG,GAAG,CASnD"}
@@ -0,0 +1,8 @@
1
+ import { radius } from './radius';
2
+ import { themeColor } from './theme-color/theme-color';
3
+ export declare const fns: {
4
+ radius: typeof radius;
5
+ variant: (_theme: any) => (_variant: string) => {};
6
+ themeColor: typeof themeColor;
7
+ };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/theme/functions/fns/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,eAAO,MAAM,GAAG;;;;CAIf,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { MantineNumberSize } from '../../types';
2
+ export declare function radius(theme: any): (size?: MantineNumberSize) => string | number;
3
+ //# sourceMappingURL=radius.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radius.d.ts","sourceRoot":"","sources":["../../../../../../../src/theme/functions/fns/radius.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAG,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEtD,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,WAChB,iBAAiB,KAAG,MAAM,GAAG,MAAM,CAYnD"}
@@ -0,0 +1,2 @@
1
+ export declare function themeColor(_theme: any): (_theme: any) => {};
2
+ //# sourceMappingURL=theme-color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-color.d.ts","sourceRoot":"","sources":["../../../../../../../../src/theme/functions/fns/theme-color/theme-color.ts"],"names":[],"mappings":"AACA,wBAAgB,UAAU,CAAC,MAAM,EAAE,GAAG,YACpB,GAAG,QAGpB"}
@@ -0,0 +1,2 @@
1
+ export declare const variant: (_theme: any) => (_variant: string) => {};
2
+ //# sourceMappingURL=variant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../../../../../src/theme/functions/fns/variant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAY,GAAG,gBAAgB,MAAM,OAExD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { TTheme } from './default-theme';
2
+ export declare const generateTheme: (theme?: Partial<TTheme>) => TTheme;
3
+ //# sourceMappingURL=generate-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-theme.d.ts","sourceRoot":"","sources":["../../../../../src/theme/generate-theme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,eAAO,MAAM,aAAa,WAAY,OAAO,CAAC,MAAM,CAAC,KAAG,MAiBvD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { MantineNumberSize } from 'react-native-mantine';
2
+ export declare function getSize<Sizes extends Record<any, any>, Key extends keyof Sizes, Size extends MantineNumberSize>({ size, sizes, }: {
3
+ size: Size;
4
+ sizes: Sizes;
5
+ }): Size extends Key ? Sizes[Size] : Size extends number ? number : Size;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/get-size/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,wBAAgB,OAAO,CACrB,KAAK,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAC9B,GAAG,SAAS,MAAM,KAAK,EACvB,IAAI,SAAS,iBAAiB,EAC9B,EACA,IAAI,EACJ,KAAK,GACN,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;CACd,GAAG,IAAI,SAAS,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI,CAKvE"}
@@ -0,0 +1,5 @@
1
+ export { ThemeProvider, useTheme, Theme } from './theme-provider';
2
+ export { createStyles } from './create-styles';
3
+ export { filterProps } from './filter-props';
4
+ export { getSize } from './get-size';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/theme/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import type { ReactNode } from 'react';
3
+ import type { TTheme } from './default-theme';
4
+ type ThemeProps = {
5
+ children: ReactNode;
6
+ theme?: Partial<TTheme>;
7
+ forceMode?: 'light' | 'dark';
8
+ };
9
+ export declare const ThemeContext: React.Context<any>;
10
+ export declare const ThemeProvider: ({ children, theme, forceMode, }: {
11
+ children: React.ReactNode;
12
+ theme: TTheme;
13
+ forceMode?: "light" | "dark";
14
+ }) => React.ReactElement;
15
+ export declare const useTheme: () => TTheme;
16
+ export declare const Theme: ({ children, theme: themeOverwrite, forceMode, }: ThemeProps) => React.ReactElement;
17
+ export declare function useComponentDefaultProps<T extends Record<string, any>, U extends Partial<T> = {}>(component: string, defaultProps: U, props: T): T & {
18
+ [Key in Extract<keyof T, keyof U>]-?: U[Key] | NonNullable<T[Key]>;
19
+ };
20
+ export {};
21
+ //# sourceMappingURL=theme-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../../../../src/theme/theme-provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAM9C,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,YAAY,oBAA2B,CAAC;AAErD,eAAO,MAAM,aAAa,oCAIvB;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,YAkDT,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,MAAkC,CAAC;AAE/D,eAAO,MAAM,KAAK,oDAIf,UAAU,KAAG,KAAK,CAAC,YAerB,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,EAEzB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,CAAC,EACf,KAAK,EAAE,CAAC,GACP,CAAC,GAAG;KACJ,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACnE,CASA"}
@@ -0,0 +1,2 @@
1
+ export type ColorScheme = 'light' | 'dark';
2
+ //# sourceMappingURL=ColorScheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorScheme.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/ColorScheme.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC"}
@@ -0,0 +1,8 @@
1
+ type CSSObject = any;
2
+ export type ClassNames<StylesNames extends string> = Partial<Record<StylesNames, string>>;
3
+ export type Styles<StylesNames extends string, StylesParams extends Record<string, any> = never> = Partial<Record<StylesNames, CSSObject>> | ((theme: any, params: StylesParams, context: any) => Partial<Record<StylesNames, CSSObject>>);
4
+ export interface DefaultProps {
5
+ style?: any;
6
+ }
7
+ export {};
8
+ //# sourceMappingURL=DefaultProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultProps.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/DefaultProps.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG,GAAG,CAAA;AACpB,MAAM,MAAM,UAAU,CAAC,WAAW,SAAS,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AAC1F,MAAM,MAAM,MAAM,CAAC,WAAW,SAAS,MAAM,EAAE,YAAY,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,IAC3F,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,GACvC,CAAC,CACC,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,GAAG,KACT,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,GAAG,CAAC;CACb"}
@@ -0,0 +1,8 @@
1
+ import type { Tuple } from './Tuple';
2
+ export type DefaultMantineColor = 'dark' | 'gray' | 'red' | 'pink' | 'grape' | 'violet' | 'indigo' | 'blue' | 'cyan' | 'green' | 'lime' | 'yellow' | 'orange' | 'teal' | (string & {});
3
+ export type MantineThemeColorsOverride = {};
4
+ export type MantineThemeColors = MantineThemeColorsOverride extends {
5
+ colors: Record<infer CustomColors, Tuple<string, 10>>;
6
+ } ? Record<CustomColors, Tuple<string, 10>> : Record<DefaultMantineColor, Tuple<string, 10>>;
7
+ export type MantineColor = keyof MantineThemeColors;
8
+ //# sourceMappingURL=MantineColor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MantineColor.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/MantineColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,SAAS;IAClE,MAAM,EAAE,MAAM,CAAC,MAAM,YAAY,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;CACvD,GACG,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GACvC,MAAM,CAAC,mBAAmB,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type MantineSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | (string & {});
2
+ export type MantineNumberSize = MantineSize | number | (string & {});
3
+ export type MantineSizes = Record<MantineSize, string>;
4
+ //# sourceMappingURL=MantineSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MantineSize.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/MantineSize.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAC3E,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AACrE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { MantineNumberSize, MantineSize } from './MantineSize';
2
+ export type SystemProp<Value> = Value | Partial<Record<MantineSize | (string & {}), Value>>;
3
+ export type SpacingValue = MantineNumberSize | (string & {});
4
+ export type MantineStyleSystemProps = any;
5
+ //# sourceMappingURL=MantineStyleSystem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MantineStyleSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/MantineStyleSystem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEpE,MAAM,MAAM,UAAU,CAAC,KAAK,IACxB,KAAK,GACL,OAAO,CAAC,MAAM,CAAC,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE7D,MAAM,MAAM,uBAAuB,GAAG,GAAG,CAAC"}
@@ -0,0 +1,4 @@
1
+ type _TupleOf<T, N extends number, R extends unknown[]> = R['length'] extends N ? R : _TupleOf<T, N, [T, ...R]>;
2
+ export type Tuple<T, N extends number> = N extends N ? number extends N ? T[] : _TupleOf<T, N, []> : never;
3
+ export {};
4
+ //# sourceMappingURL=Tuple.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tuple.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/Tuple.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GAC3E,CAAC,GACD,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAE9B,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,CAAC,GAChD,MAAM,SAAS,CAAC,GACd,CAAC,EAAE,GACH,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GACpB,KAAK,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type Variants<T> = T | (string & {});
2
+ //# sourceMappingURL=Variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Variants.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/Variants.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type { ColorScheme } from './ColorScheme';
2
+ export type { DefaultProps, ClassNames, Styles } from './DefaultProps';
3
+ export type { MantineColor, MantineThemeColors, DefaultMantineColor, MantineThemeColorsOverride, } from './MantineColor';
4
+ export type { MantineStyleSystemProps, SystemProp, SpacingValue } from './MantineStyleSystem';
5
+ export type { MantineNumberSize, MantineSize, MantineSizes } from './MantineSize';
6
+ export type { Tuple } from './Tuple';
7
+ export type { Variants } from './Variants';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACvE,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,uBAAuB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9F,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClF,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
package/package.json ADDED
@@ -0,0 +1,194 @@
1
+ {
2
+ "name": "react-native-mantine",
3
+ "version": "0.1.11",
4
+ "description": "Make Mantine Accessable on React Native",
5
+ "source": "./src/index.tsx",
6
+ "main": "./lib/commonjs/index.js",
7
+ "module": "./lib/module/index.js",
8
+ "types": "./lib/typescript/commonjs/src/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./lib/typescript/module/src/index.d.ts",
13
+ "default": "./lib/module/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./lib/typescript/commonjs/src/index.d.ts",
17
+ "default": "./lib/commonjs/index.js"
18
+ }
19
+ }
20
+ },
21
+ "files": [
22
+ "src",
23
+ "lib",
24
+ "android",
25
+ "ios",
26
+ "cpp",
27
+ "*.podspec",
28
+ "!ios/build",
29
+ "!android/build",
30
+ "!android/gradle",
31
+ "!android/gradlew",
32
+ "!android/gradlew.bat",
33
+ "!android/local.properties",
34
+ "!**/__tests__",
35
+ "!**/__fixtures__",
36
+ "!**/__mocks__",
37
+ "!**/.*"
38
+ ],
39
+ "scripts": {
40
+ "example": "yarn workspace react-native-mantine-example",
41
+ "test": "jest",
42
+ "typecheck": "tsc",
43
+ "lint": "eslint \"**/*.{js,ts,tsx}\" --config ./.eslintrc.json",
44
+ "clean": "del-cli lib",
45
+ "prepare": "bob build",
46
+ "release": "release-it",
47
+ "typescript": "tsc --noEmit"
48
+ },
49
+ "keywords": [
50
+ "react-native",
51
+ "ios",
52
+ "android"
53
+ ],
54
+ "repository": {
55
+ "type": "git",
56
+ "url": "git+https://github.com/auronsan/react-native-mantine.git"
57
+ },
58
+ "author": "Auronsan <auronsanjr@gmail.com> (https://github.com/auronsan)",
59
+ "license": "MIT",
60
+ "bugs": {
61
+ "url": "https://github.com/auronsan/react-native-mantine/issues"
62
+ },
63
+ "homepage": "https://github.com/auronsan/react-native-mantine#readme",
64
+ "publishConfig": {
65
+ "registry": "https://registry.npmjs.org/"
66
+ },
67
+ "devDependencies": {
68
+ "@babel/eslint-parser": "^7.25.1",
69
+ "@commitlint/config-conventional": "^17.0.2",
70
+ "@evilmartians/lefthook": "^1.5.0",
71
+ "@react-native/eslint-config": "^0.73.1",
72
+ "@release-it/conventional-changelog": "^5.0.0",
73
+ "@types/jest": "^29.5.5",
74
+ "@types/lodash-es": "^4.17.12",
75
+ "@types/react": "^18.2.44",
76
+ "commitlint": "^17.0.2",
77
+ "del-cli": "^5.1.0",
78
+ "eslint": "^8.51.0",
79
+ "eslint-config-prettier": "^9.0.0",
80
+ "eslint-plugin-prettier": "^5.0.1",
81
+ "jest": "^29.7.0",
82
+ "prettier": "^3.0.3",
83
+ "prettier-eslint": "^16.3.0",
84
+ "react": "18.2.0",
85
+ "react-native": "0.74.5",
86
+ "react-native-builder-bob": "^0.30.2",
87
+ "release-it": "^15.0.0",
88
+ "typescript": "^5.2.2"
89
+ },
90
+ "resolutions": {
91
+ "@types/react": "^18.2.44"
92
+ },
93
+ "peerDependencies": {
94
+ "react": "*",
95
+ "react-native": "*"
96
+ },
97
+ "workspaces": [
98
+ "example"
99
+ ],
100
+ "packageManager": "yarn@3.6.1",
101
+ "jest": {
102
+ "preset": "react-native",
103
+ "modulePathIgnorePatterns": [
104
+ "<rootDir>/example/node_modules",
105
+ "<rootDir>/lib/"
106
+ ]
107
+ },
108
+ "commitlint": {
109
+ "extends": [
110
+ "@commitlint/config-conventional"
111
+ ]
112
+ },
113
+ "release-it": {
114
+ "git": {
115
+ "commitMessage": "chore: release ${version}",
116
+ "tagName": "v${version}"
117
+ },
118
+ "npm": {
119
+ "publish": true
120
+ },
121
+ "github": {
122
+ "release": true
123
+ },
124
+ "plugins": {
125
+ "@release-it/conventional-changelog": {
126
+ "preset": "angular"
127
+ }
128
+ }
129
+ },
130
+ "eslintConfig": {
131
+ "root": true,
132
+ "extends": [
133
+ "@react-native",
134
+ "prettier"
135
+ ],
136
+ "rules": {
137
+ "react/react-in-jsx-scope": "off",
138
+ "prettier/prettier": [
139
+ "error",
140
+ {
141
+ "quoteProps": "consistent",
142
+ "singleQuote": true,
143
+ "tabWidth": 2,
144
+ "trailingComma": "es5",
145
+ "useTabs": false
146
+ }
147
+ ]
148
+ }
149
+ },
150
+ "eslintIgnore": [
151
+ "node_modules/",
152
+ "lib/"
153
+ ],
154
+ "prettier": {
155
+ "quoteProps": "consistent",
156
+ "singleQuote": true,
157
+ "tabWidth": 2,
158
+ "trailingComma": "es5",
159
+ "useTabs": false
160
+ },
161
+ "react-native-builder-bob": {
162
+ "source": "src",
163
+ "output": "lib",
164
+ "targets": [
165
+ [
166
+ "commonjs",
167
+ {
168
+ "esm": true
169
+ }
170
+ ],
171
+ [
172
+ "module",
173
+ {
174
+ "esm": true
175
+ }
176
+ ],
177
+ [
178
+ "typescript",
179
+ {
180
+ "project": "tsconfig.build.json",
181
+ "esm": true
182
+ }
183
+ ]
184
+ ]
185
+ },
186
+ "create-react-native-library": {
187
+ "type": "library",
188
+ "version": "0.41.2"
189
+ },
190
+ "dependencies": {
191
+ "expo-font": "^12.0.10",
192
+ "lodash-es": "^4.17.21"
193
+ }
194
+ }
@@ -0,0 +1,64 @@
1
+ import { isValidElement } from 'react';
2
+ import { TouchableOpacity } from 'react-native';
3
+ import { createStyles } from '../../theme/create-styles';
4
+ import { BoxView } from '../BoxView';
5
+ import { getSize } from '../../theme';
6
+
7
+ export type ActionIconProps = {
8
+ onPress?: (payload: any) => void;
9
+ children?: React.ReactNode;
10
+ icon: React.ReactNode;
11
+ minWidth?: number;
12
+ style?: any;
13
+ size: any;
14
+ };
15
+
16
+ export const ActionIcon = ({
17
+ onPress = () => {},
18
+ children,
19
+ icon,
20
+ minWidth = 100,
21
+ style,
22
+ size = 'md',
23
+ }: ActionIconProps): React.ReactElement => {
24
+ const { styles } = useStyles({ minWidth, size });
25
+ return (
26
+ <TouchableOpacity
27
+ onPress={typeof onPress === 'function' ? onPress : () => {}}
28
+ style={[style, styles.container]}
29
+ >
30
+ <>
31
+ <BoxView style={styles.containerButton}>{icon}</BoxView>
32
+ {isValidElement(children) ? children : <></>}
33
+ </>
34
+ </TouchableOpacity>
35
+ );
36
+ };
37
+
38
+ export const sizes = {
39
+ xs: 18,
40
+ sm: 22,
41
+ md: 28,
42
+ lg: 34,
43
+ xl: 44,
44
+ };
45
+
46
+ const useStyles = createStyles((theme, { minWidth = 100, size = 40 }) => {
47
+ return {
48
+ container: {
49
+ alignItems: 'center',
50
+ minWidth: minWidth,
51
+ },
52
+ containerButton: {
53
+ backgroundColor:
54
+ theme.currentMode === 'dark'
55
+ ? theme.primaryBgColor
56
+ : theme.secondaryBgColor,
57
+ borderRadius: 50,
58
+ alignItems: 'center',
59
+ justifyContent: 'center',
60
+ height: getSize({ size: size, sizes }),
61
+ width: getSize({ size: size, sizes }),
62
+ },
63
+ };
64
+ });
@@ -0,0 +1,3 @@
1
+ export { ActionIcon } from './ActionIcon';
2
+
3
+ export type { ActionIconProps } from './ActionIcon';
@@ -0,0 +1,30 @@
1
+ import { forwardRef } from 'react';
2
+ import { View as DefaultView } from 'react-native';
3
+
4
+ export type CustomViewStyle = {
5
+ pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only';
6
+ };
7
+
8
+ export type ViewProps = DefaultView['props'] & {
9
+ fullWidth?: boolean;
10
+ fullHeight?: boolean;
11
+ children?: React.ReactNode;
12
+ style?: CustomViewStyle;
13
+ };
14
+
15
+ export const BoxView = forwardRef((props: ViewProps, ref: any) => {
16
+ const { style, fullWidth, fullHeight, ...otherProps } = props;
17
+ return (
18
+ <DefaultView
19
+ style={[
20
+ style,
21
+ {
22
+ ...(fullWidth ? { width: '100%' } : {}),
23
+ ...(fullHeight ? { height: '100%' } : {}),
24
+ },
25
+ ]}
26
+ ref={ref}
27
+ {...otherProps}
28
+ />
29
+ );
30
+ });
@@ -0,0 +1,48 @@
1
+ import type { ViewStyle } from 'react-native';
2
+
3
+ import { BoxView } from '../BoxView';
4
+ import type { ViewProps } from '../BoxView';
5
+
6
+ export const Group = ({
7
+ children,
8
+ position,
9
+ style,
10
+ alignCenter = true,
11
+ alignBottom = false,
12
+ noWrap = false,
13
+ spacing = 5,
14
+ ...rest
15
+ }: ViewProps & {
16
+ position?: string;
17
+ alignCenter?: boolean;
18
+ alignBottom?: boolean;
19
+ noWrap?: boolean;
20
+ spacing?: number;
21
+ }): React.ReactElement => {
22
+ return (
23
+ <BoxView
24
+ style={{
25
+ gap: spacing,
26
+ flexDirection: 'row',
27
+ justifyContent:
28
+ position === 'apart'
29
+ ? 'space-between'
30
+ : position === 'center'
31
+ ? 'center'
32
+ : position === 'right'
33
+ ? 'flex-end'
34
+ : 'flex-start',
35
+ flexWrap: noWrap ? 'nowrap' : 'wrap',
36
+ alignItems: alignCenter
37
+ ? 'center'
38
+ : alignBottom
39
+ ? 'flex-end'
40
+ : 'flex-start',
41
+ ...(style as ViewStyle),
42
+ }}
43
+ {...rest}
44
+ >
45
+ {children}
46
+ </BoxView>
47
+ );
48
+ };
@@ -0,0 +1,50 @@
1
+ import { ActivityIndicator } from 'react-native';
2
+ import type { MantineNumberSize, MantineColor } from '../../theme/types';
3
+
4
+ import { useComponentDefaultProps } from '../../theme/theme-provider';
5
+
6
+ // const sizes = {
7
+ // xs: 18,
8
+ // sm: 22,
9
+ // md: 36,
10
+ // lg: 44,
11
+ // xl: 58,
12
+ // };
13
+
14
+ export interface LoaderProps {
15
+ /** Defines width of loader */
16
+ size?: MantineNumberSize;
17
+
18
+ /** Loader color from theme */
19
+ color?: MantineColor;
20
+
21
+ /** Loader appearance */
22
+ variant?: any;
23
+ }
24
+
25
+ const defaultProps: Partial<LoaderProps> = {
26
+ size: 'md',
27
+ };
28
+
29
+ export function Loader(props: LoaderProps) {
30
+ const { size, color, variant, ...others } = useComponentDefaultProps(
31
+ 'Loader',
32
+ defaultProps,
33
+ props
34
+ );
35
+ return (
36
+ <ActivityIndicator
37
+ // size={getSize({ size, sizes })}
38
+ // color={
39
+ // theme.fn.variant({
40
+ // variant: 'filled',
41
+ // primaryFallback: false,
42
+ // color: color || theme.primaryColor,
43
+ // }).background
44
+ // }
45
+ {...others}
46
+ />
47
+ );
48
+ }
49
+
50
+ Loader.displayName = '@mantine/core/Loader';
@@ -0,0 +1,2 @@
1
+ export { Loader } from './Loader';
2
+ export type { LoaderProps } from './Loader';
@@ -0,0 +1,29 @@
1
+ import type { ViewStyle } from 'react-native';
2
+
3
+ import { BoxView } from '../BoxView';
4
+ import type { ViewProps } from '../BoxView';
5
+
6
+ export const Stack = ({
7
+ children,
8
+ position,
9
+ style,
10
+ spacing = 15,
11
+ ...rest
12
+ }: ViewProps & {
13
+ position?: string;
14
+ spacing?: number;
15
+ }): React.ReactElement => {
16
+ return (
17
+ <BoxView
18
+ style={{
19
+ gap: spacing,
20
+ flexDirection: 'column',
21
+ ...(position === 'center' ? { alignItems: 'center' } : {}),
22
+ ...(style as ViewStyle),
23
+ }}
24
+ {...rest}
25
+ >
26
+ {children}
27
+ </BoxView>
28
+ );
29
+ };