react-native-mantine 0.14.0 → 0.16.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 (489) hide show
  1. package/README.md +70 -232
  2. package/lib/commonjs/components/ActionIcon/ActionIcon.js +1 -1
  3. package/lib/commonjs/components/ActionIcon/ActionIcon.js.map +1 -1
  4. package/lib/commonjs/components/Anchor/index.js +3 -4
  5. package/lib/commonjs/components/Anchor/index.js.map +1 -1
  6. package/lib/commonjs/components/Avatar/index.js +1 -2
  7. package/lib/commonjs/components/Avatar/index.js.map +1 -1
  8. package/lib/commonjs/components/Badge/index.js +54 -24
  9. package/lib/commonjs/components/Badge/index.js.map +1 -1
  10. package/lib/commonjs/components/Blockquote/index.js +4 -5
  11. package/lib/commonjs/components/Blockquote/index.js.map +1 -1
  12. package/lib/commonjs/components/Button/index.js +7 -1
  13. package/lib/commonjs/components/Button/index.js.map +1 -1
  14. package/lib/commonjs/components/Center/index.js.map +1 -1
  15. package/lib/commonjs/components/Checkbox/index.js +4 -5
  16. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  17. package/lib/commonjs/components/Chip/index.js +40 -21
  18. package/lib/commonjs/components/Chip/index.js.map +1 -1
  19. package/lib/commonjs/components/Code/index.js +6 -4
  20. package/lib/commonjs/components/Code/index.js.map +1 -1
  21. package/lib/commonjs/components/Grid/index.js +18 -13
  22. package/lib/commonjs/components/Grid/index.js.map +1 -1
  23. package/lib/commonjs/components/Highlight/index.js +1 -1
  24. package/lib/commonjs/components/Highlight/index.js.map +1 -1
  25. package/lib/commonjs/components/Indicator/index.js +2 -3
  26. package/lib/commonjs/components/Indicator/index.js.map +1 -1
  27. package/lib/commonjs/components/Menu/index.js +4 -5
  28. package/lib/commonjs/components/Menu/index.js.map +1 -1
  29. package/lib/commonjs/components/MultiSelect/index.js +8 -9
  30. package/lib/commonjs/components/MultiSelect/index.js.map +1 -1
  31. package/lib/commonjs/components/NativeSelect/index.js +14 -14
  32. package/lib/commonjs/components/NativeSelect/index.js.map +1 -1
  33. package/lib/commonjs/components/NavLink/index.js +43 -20
  34. package/lib/commonjs/components/NavLink/index.js.map +1 -1
  35. package/lib/commonjs/components/Notification/index.js +5 -6
  36. package/lib/commonjs/components/Notification/index.js.map +1 -1
  37. package/lib/commonjs/components/Pagination/index.js +5 -6
  38. package/lib/commonjs/components/Pagination/index.js.map +1 -1
  39. package/lib/commonjs/components/PinInput/index.js +3 -3
  40. package/lib/commonjs/components/PinInput/index.js.map +1 -1
  41. package/lib/commonjs/components/Progress/index.js +3 -5
  42. package/lib/commonjs/components/Progress/index.js.map +1 -1
  43. package/lib/commonjs/components/Radio/index.js +4 -5
  44. package/lib/commonjs/components/Radio/index.js.map +1 -1
  45. package/lib/commonjs/components/Rating/index.js +2 -4
  46. package/lib/commonjs/components/Rating/index.js.map +1 -1
  47. package/lib/commonjs/components/RingProgress/index.js +79 -57
  48. package/lib/commonjs/components/RingProgress/index.js.map +1 -1
  49. package/lib/commonjs/components/Select/index.js +7 -8
  50. package/lib/commonjs/components/Select/index.js.map +1 -1
  51. package/lib/commonjs/components/SimpleGrid/index.js +4 -2
  52. package/lib/commonjs/components/SimpleGrid/index.js.map +1 -1
  53. package/lib/commonjs/components/Spoiler/index.js +1 -1
  54. package/lib/commonjs/components/Spoiler/index.js.map +1 -1
  55. package/lib/commonjs/components/Stepper/index.js +8 -6
  56. package/lib/commonjs/components/Stepper/index.js.map +1 -1
  57. package/lib/commonjs/components/Switch/index.js +4 -5
  58. package/lib/commonjs/components/Switch/index.js.map +1 -1
  59. package/lib/commonjs/components/Table/index.js +257 -273
  60. package/lib/commonjs/components/Table/index.js.map +1 -1
  61. package/lib/commonjs/components/Text/index.js +78 -17
  62. package/lib/commonjs/components/Text/index.js.map +1 -1
  63. package/lib/commonjs/components/ThemeIcon/index.js +40 -19
  64. package/lib/commonjs/components/ThemeIcon/index.js.map +1 -1
  65. package/lib/commonjs/components/Timeline/index.js +6 -5
  66. package/lib/commonjs/components/Timeline/index.js.map +1 -1
  67. package/lib/commonjs/components/Title/index.js +5 -17
  68. package/lib/commonjs/components/Title/index.js.map +1 -1
  69. package/lib/commonjs/components/Tooltip/index.js +1 -2
  70. package/lib/commonjs/components/Tooltip/index.js.map +1 -1
  71. package/lib/commonjs/components/TransferList/index.js +9 -10
  72. package/lib/commonjs/components/TransferList/index.js.map +1 -1
  73. package/lib/commonjs/components/UnstyledButton/UnstyledButton.styles.js +2 -2
  74. package/lib/commonjs/components/UnstyledButton/UnstyledButton.styles.js.map +1 -1
  75. package/lib/commonjs/components/index.js +29 -29
  76. package/lib/commonjs/components/index.js.map +1 -1
  77. package/lib/commonjs/index.js +34 -0
  78. package/lib/commonjs/index.js.map +1 -1
  79. package/lib/commonjs/theme/create-theme.js +114 -25
  80. package/lib/commonjs/theme/create-theme.js.map +1 -1
  81. package/lib/commonjs/theme/default-colors.js +103 -0
  82. package/lib/commonjs/theme/default-colors.js.map +1 -0
  83. package/lib/commonjs/theme/default-theme.js +144 -128
  84. package/lib/commonjs/theme/default-theme.js.map +1 -1
  85. package/lib/commonjs/theme/functions/attach-functions.js +46 -14
  86. package/lib/commonjs/theme/functions/attach-functions.js.map +1 -1
  87. package/lib/commonjs/theme/functions/fns/breakpoints.js.map +1 -1
  88. package/lib/commonjs/theme/functions/fns/color-scheme-value.js +190 -0
  89. package/lib/commonjs/theme/functions/fns/color-scheme-value.js.map +1 -0
  90. package/lib/commonjs/theme/functions/fns/dimmed.js.map +1 -1
  91. package/lib/commonjs/theme/functions/fns/gradient/gradient.js.map +1 -1
  92. package/lib/commonjs/theme/functions/fns/helpers.js +51 -3
  93. package/lib/commonjs/theme/functions/fns/helpers.js.map +1 -1
  94. package/lib/commonjs/theme/functions/fns/index.js +151 -6
  95. package/lib/commonjs/theme/functions/fns/index.js.map +1 -1
  96. package/lib/commonjs/theme/functions/fns/primary-shade.js +81 -2
  97. package/lib/commonjs/theme/functions/fns/primary-shade.js.map +1 -1
  98. package/lib/commonjs/theme/functions/fns/shadow.js.map +1 -1
  99. package/lib/commonjs/theme/functions/fns/size.js +2 -1
  100. package/lib/commonjs/theme/functions/fns/size.js.map +1 -1
  101. package/lib/commonjs/theme/functions/fns/theme-color/color-utils.js +196 -0
  102. package/lib/commonjs/theme/functions/fns/theme-color/color-utils.js.map +1 -0
  103. package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js +92 -9
  104. package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js.map +1 -1
  105. package/lib/commonjs/theme/functions/fns/variant.js +112 -17
  106. package/lib/commonjs/theme/functions/fns/variant.js.map +1 -1
  107. package/lib/commonjs/theme/functions/index.js +172 -0
  108. package/lib/commonjs/theme/functions/index.js.map +1 -0
  109. package/lib/commonjs/theme/index.js +116 -14
  110. package/lib/commonjs/theme/index.js.map +1 -1
  111. package/lib/commonjs/theme/theme-provider.js +1 -22
  112. package/lib/commonjs/theme/theme-provider.js.map +1 -1
  113. package/lib/commonjs/theme/types.js +6 -0
  114. package/lib/commonjs/theme/types.js.map +1 -0
  115. package/lib/commonjs/theme/utils/withTextWrapper.js +1 -2
  116. package/lib/commonjs/theme/utils/withTextWrapper.js.map +1 -1
  117. package/lib/module/components/ActionIcon/ActionIcon.js +1 -1
  118. package/lib/module/components/ActionIcon/ActionIcon.js.map +1 -1
  119. package/lib/module/components/Anchor/index.js +3 -4
  120. package/lib/module/components/Anchor/index.js.map +1 -1
  121. package/lib/module/components/Avatar/index.js +1 -2
  122. package/lib/module/components/Avatar/index.js.map +1 -1
  123. package/lib/module/components/Badge/index.js +54 -24
  124. package/lib/module/components/Badge/index.js.map +1 -1
  125. package/lib/module/components/Blockquote/index.js +4 -5
  126. package/lib/module/components/Blockquote/index.js.map +1 -1
  127. package/lib/module/components/Button/index.js +7 -1
  128. package/lib/module/components/Button/index.js.map +1 -1
  129. package/lib/module/components/Center/index.js.map +1 -1
  130. package/lib/module/components/Checkbox/index.js +4 -5
  131. package/lib/module/components/Checkbox/index.js.map +1 -1
  132. package/lib/module/components/Chip/index.js +40 -21
  133. package/lib/module/components/Chip/index.js.map +1 -1
  134. package/lib/module/components/Code/index.js +6 -4
  135. package/lib/module/components/Code/index.js.map +1 -1
  136. package/lib/module/components/Grid/index.js +18 -13
  137. package/lib/module/components/Grid/index.js.map +1 -1
  138. package/lib/module/components/Highlight/index.js +1 -1
  139. package/lib/module/components/Highlight/index.js.map +1 -1
  140. package/lib/module/components/Indicator/index.js +2 -3
  141. package/lib/module/components/Indicator/index.js.map +1 -1
  142. package/lib/module/components/Menu/index.js +4 -5
  143. package/lib/module/components/Menu/index.js.map +1 -1
  144. package/lib/module/components/MultiSelect/index.js +8 -9
  145. package/lib/module/components/MultiSelect/index.js.map +1 -1
  146. package/lib/module/components/NativeSelect/index.js +14 -14
  147. package/lib/module/components/NativeSelect/index.js.map +1 -1
  148. package/lib/module/components/NavLink/index.js +43 -20
  149. package/lib/module/components/NavLink/index.js.map +1 -1
  150. package/lib/module/components/Notification/index.js +5 -6
  151. package/lib/module/components/Notification/index.js.map +1 -1
  152. package/lib/module/components/Pagination/index.js +5 -6
  153. package/lib/module/components/Pagination/index.js.map +1 -1
  154. package/lib/module/components/PinInput/index.js +3 -3
  155. package/lib/module/components/PinInput/index.js.map +1 -1
  156. package/lib/module/components/Progress/index.js +3 -5
  157. package/lib/module/components/Progress/index.js.map +1 -1
  158. package/lib/module/components/Radio/index.js +4 -5
  159. package/lib/module/components/Radio/index.js.map +1 -1
  160. package/lib/module/components/Rating/index.js +2 -4
  161. package/lib/module/components/Rating/index.js.map +1 -1
  162. package/lib/module/components/RingProgress/index.js +80 -58
  163. package/lib/module/components/RingProgress/index.js.map +1 -1
  164. package/lib/module/components/Select/index.js +7 -8
  165. package/lib/module/components/Select/index.js.map +1 -1
  166. package/lib/module/components/SimpleGrid/index.js +4 -2
  167. package/lib/module/components/SimpleGrid/index.js.map +1 -1
  168. package/lib/module/components/Spoiler/index.js +1 -1
  169. package/lib/module/components/Spoiler/index.js.map +1 -1
  170. package/lib/module/components/Stepper/index.js +8 -6
  171. package/lib/module/components/Stepper/index.js.map +1 -1
  172. package/lib/module/components/Switch/index.js +4 -5
  173. package/lib/module/components/Switch/index.js.map +1 -1
  174. package/lib/module/components/Table/index.js +257 -274
  175. package/lib/module/components/Table/index.js.map +1 -1
  176. package/lib/module/components/Text/index.js +78 -17
  177. package/lib/module/components/Text/index.js.map +1 -1
  178. package/lib/module/components/ThemeIcon/index.js +40 -19
  179. package/lib/module/components/ThemeIcon/index.js.map +1 -1
  180. package/lib/module/components/Timeline/index.js +6 -5
  181. package/lib/module/components/Timeline/index.js.map +1 -1
  182. package/lib/module/components/Title/index.js +5 -17
  183. package/lib/module/components/Title/index.js.map +1 -1
  184. package/lib/module/components/Tooltip/index.js +1 -2
  185. package/lib/module/components/Tooltip/index.js.map +1 -1
  186. package/lib/module/components/TransferList/index.js +9 -10
  187. package/lib/module/components/TransferList/index.js.map +1 -1
  188. package/lib/module/components/UnstyledButton/UnstyledButton.styles.js +2 -2
  189. package/lib/module/components/UnstyledButton/UnstyledButton.styles.js.map +1 -1
  190. package/lib/module/components/index.js +3 -1
  191. package/lib/module/components/index.js.map +1 -1
  192. package/lib/module/index.js +1 -0
  193. package/lib/module/index.js.map +1 -1
  194. package/lib/module/theme/create-theme.js +114 -24
  195. package/lib/module/theme/create-theme.js.map +1 -1
  196. package/lib/module/theme/default-colors.js +99 -0
  197. package/lib/module/theme/default-colors.js.map +1 -0
  198. package/lib/module/theme/default-theme.js +143 -127
  199. package/lib/module/theme/default-theme.js.map +1 -1
  200. package/lib/module/theme/functions/attach-functions.js +47 -14
  201. package/lib/module/theme/functions/attach-functions.js.map +1 -1
  202. package/lib/module/theme/functions/fns/breakpoints.js.map +1 -1
  203. package/lib/module/theme/functions/fns/color-scheme-value.js +180 -0
  204. package/lib/module/theme/functions/fns/color-scheme-value.js.map +1 -0
  205. package/lib/module/theme/functions/fns/dimmed.js.map +1 -1
  206. package/lib/module/theme/functions/fns/gradient/gradient.js.map +1 -1
  207. package/lib/module/theme/functions/fns/helpers.js +48 -2
  208. package/lib/module/theme/functions/fns/helpers.js.map +1 -1
  209. package/lib/module/theme/functions/fns/index.js +35 -7
  210. package/lib/module/theme/functions/fns/index.js.map +1 -1
  211. package/lib/module/theme/functions/fns/primary-shade.js +78 -2
  212. package/lib/module/theme/functions/fns/primary-shade.js.map +1 -1
  213. package/lib/module/theme/functions/fns/shadow.js.map +1 -1
  214. package/lib/module/theme/functions/fns/size.js +2 -1
  215. package/lib/module/theme/functions/fns/size.js.map +1 -1
  216. package/lib/module/theme/functions/fns/theme-color/color-utils.js +189 -0
  217. package/lib/module/theme/functions/fns/theme-color/color-utils.js.map +1 -0
  218. package/lib/module/theme/functions/fns/theme-color/theme-color.js +91 -9
  219. package/lib/module/theme/functions/fns/theme-color/theme-color.js.map +1 -1
  220. package/lib/module/theme/functions/fns/variant.js +112 -17
  221. package/lib/module/theme/functions/fns/variant.js.map +1 -1
  222. package/lib/module/theme/functions/index.js +22 -0
  223. package/lib/module/theme/functions/index.js.map +1 -0
  224. package/lib/module/theme/index.js +16 -4
  225. package/lib/module/theme/index.js.map +1 -1
  226. package/lib/module/theme/theme-provider.js +1 -22
  227. package/lib/module/theme/theme-provider.js.map +1 -1
  228. package/lib/module/theme/types.js +4 -0
  229. package/lib/module/theme/types.js.map +1 -0
  230. package/lib/module/theme/utils/withTextWrapper.js +1 -2
  231. package/lib/module/theme/utils/withTextWrapper.js.map +1 -1
  232. package/lib/typescript/commonjs/src/components/Anchor/index.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/src/components/Avatar/index.d.ts.map +1 -1
  234. package/lib/typescript/commonjs/src/components/Badge/index.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/src/components/Blockquote/index.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/src/components/Button/Button.styles.d.ts +8 -8
  237. package/lib/typescript/commonjs/src/components/Button/index.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/src/components/Center/index.d.ts +1 -2
  239. package/lib/typescript/commonjs/src/components/Center/index.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/src/components/Checkbox/index.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/src/components/Chip/index.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/src/components/Code/index.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/src/components/Container/index.d.ts +2 -2
  244. package/lib/typescript/commonjs/src/components/Container/index.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/src/components/Flex/index.d.ts +2 -2
  246. package/lib/typescript/commonjs/src/components/Flex/index.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/src/components/Grid/index.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/src/components/Highlight/index.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/src/components/Indicator/index.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/src/components/Menu/index.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/src/components/MultiSelect/index.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/components/NativeSelect/index.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/src/components/NavLink/index.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/src/components/Notification/index.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/src/components/Pagination/index.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/src/components/PinInput/index.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/src/components/Progress/index.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/components/Radio/index.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/src/components/Rating/index.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/src/components/RingProgress/index.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/src/components/Select/index.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/src/components/SimpleGrid/index.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/src/components/Switch/index.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/src/components/Table/index.d.ts +17 -83
  265. package/lib/typescript/commonjs/src/components/Table/index.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/src/components/Text/index.d.ts +54 -7
  267. package/lib/typescript/commonjs/src/components/Text/index.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/src/components/ThemeIcon/index.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/src/components/Timeline/index.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/components/Title/index.d.ts +1 -0
  271. package/lib/typescript/commonjs/src/components/Title/index.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/src/components/Tooltip/index.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/src/components/TransferList/index.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts +2 -2
  275. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/src/components/index.d.ts +1 -1
  277. package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/src/index.d.ts +1 -1
  279. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/src/theme/create-styles.d.ts +1 -1
  281. package/lib/typescript/commonjs/src/theme/create-styles.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/src/theme/create-theme.d.ts +68 -2
  283. package/lib/typescript/commonjs/src/theme/create-theme.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/src/theme/default-colors.d.ts +12 -0
  285. package/lib/typescript/commonjs/src/theme/default-colors.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/src/theme/default-theme.d.ts +15 -108
  287. package/lib/typescript/commonjs/src/theme/default-theme.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts +20 -1
  289. package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/src/theme/functions/fns/breakpoints.d.ts +3 -3
  291. package/lib/typescript/commonjs/src/theme/functions/fns/breakpoints.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/src/theme/functions/fns/color-scheme-value.d.ts +100 -0
  293. package/lib/typescript/commonjs/src/theme/functions/fns/color-scheme-value.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/src/theme/functions/fns/dimmed.d.ts +2 -2
  295. package/lib/typescript/commonjs/src/theme/functions/fns/dimmed.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/src/theme/functions/fns/gradient/gradient.d.ts +2 -3
  297. package/lib/typescript/commonjs/src/theme/functions/fns/gradient/gradient.d.ts.map +1 -1
  298. package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts +36 -8
  299. package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts.map +1 -1
  300. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts +40 -14
  301. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -1
  302. package/lib/typescript/commonjs/src/theme/functions/fns/primary-shade.d.ts +53 -3
  303. package/lib/typescript/commonjs/src/theme/functions/fns/primary-shade.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/src/theme/functions/fns/shadow.d.ts +1 -1
  305. package/lib/typescript/commonjs/src/theme/functions/fns/shadow.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts +2 -2
  307. package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/color-utils.d.ts +50 -0
  309. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/color-utils.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts +51 -5
  311. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts +52 -19
  313. package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/src/theme/functions/index.d.ts +19 -0
  315. package/lib/typescript/commonjs/src/theme/functions/index.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/src/theme/index.d.ts +9 -6
  317. package/lib/typescript/commonjs/src/theme/index.d.ts.map +1 -1
  318. package/lib/typescript/commonjs/src/theme/theme-provider.d.ts +1 -1
  319. package/lib/typescript/commonjs/src/theme/theme-provider.d.ts.map +1 -1
  320. package/lib/typescript/commonjs/src/theme/types.d.ts +494 -0
  321. package/lib/typescript/commonjs/src/theme/types.d.ts.map +1 -0
  322. package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts +1 -1
  323. package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts.map +1 -1
  324. package/lib/typescript/module/src/components/Anchor/index.d.ts.map +1 -1
  325. package/lib/typescript/module/src/components/Avatar/index.d.ts.map +1 -1
  326. package/lib/typescript/module/src/components/Badge/index.d.ts.map +1 -1
  327. package/lib/typescript/module/src/components/Blockquote/index.d.ts.map +1 -1
  328. package/lib/typescript/module/src/components/Button/Button.styles.d.ts +8 -8
  329. package/lib/typescript/module/src/components/Button/index.d.ts.map +1 -1
  330. package/lib/typescript/module/src/components/Center/index.d.ts +1 -2
  331. package/lib/typescript/module/src/components/Center/index.d.ts.map +1 -1
  332. package/lib/typescript/module/src/components/Checkbox/index.d.ts.map +1 -1
  333. package/lib/typescript/module/src/components/Chip/index.d.ts.map +1 -1
  334. package/lib/typescript/module/src/components/Code/index.d.ts.map +1 -1
  335. package/lib/typescript/module/src/components/Container/index.d.ts +2 -2
  336. package/lib/typescript/module/src/components/Container/index.d.ts.map +1 -1
  337. package/lib/typescript/module/src/components/Flex/index.d.ts +2 -2
  338. package/lib/typescript/module/src/components/Flex/index.d.ts.map +1 -1
  339. package/lib/typescript/module/src/components/Grid/index.d.ts.map +1 -1
  340. package/lib/typescript/module/src/components/Highlight/index.d.ts.map +1 -1
  341. package/lib/typescript/module/src/components/Indicator/index.d.ts.map +1 -1
  342. package/lib/typescript/module/src/components/Menu/index.d.ts.map +1 -1
  343. package/lib/typescript/module/src/components/MultiSelect/index.d.ts.map +1 -1
  344. package/lib/typescript/module/src/components/NativeSelect/index.d.ts.map +1 -1
  345. package/lib/typescript/module/src/components/NavLink/index.d.ts.map +1 -1
  346. package/lib/typescript/module/src/components/Notification/index.d.ts.map +1 -1
  347. package/lib/typescript/module/src/components/Pagination/index.d.ts.map +1 -1
  348. package/lib/typescript/module/src/components/PinInput/index.d.ts.map +1 -1
  349. package/lib/typescript/module/src/components/Progress/index.d.ts.map +1 -1
  350. package/lib/typescript/module/src/components/Radio/index.d.ts.map +1 -1
  351. package/lib/typescript/module/src/components/Rating/index.d.ts.map +1 -1
  352. package/lib/typescript/module/src/components/RingProgress/index.d.ts.map +1 -1
  353. package/lib/typescript/module/src/components/Select/index.d.ts.map +1 -1
  354. package/lib/typescript/module/src/components/SimpleGrid/index.d.ts.map +1 -1
  355. package/lib/typescript/module/src/components/Switch/index.d.ts.map +1 -1
  356. package/lib/typescript/module/src/components/Table/index.d.ts +17 -83
  357. package/lib/typescript/module/src/components/Table/index.d.ts.map +1 -1
  358. package/lib/typescript/module/src/components/Text/index.d.ts +54 -7
  359. package/lib/typescript/module/src/components/Text/index.d.ts.map +1 -1
  360. package/lib/typescript/module/src/components/ThemeIcon/index.d.ts.map +1 -1
  361. package/lib/typescript/module/src/components/Timeline/index.d.ts.map +1 -1
  362. package/lib/typescript/module/src/components/Title/index.d.ts +1 -0
  363. package/lib/typescript/module/src/components/Title/index.d.ts.map +1 -1
  364. package/lib/typescript/module/src/components/Tooltip/index.d.ts.map +1 -1
  365. package/lib/typescript/module/src/components/TransferList/index.d.ts.map +1 -1
  366. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts +2 -2
  367. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -1
  368. package/lib/typescript/module/src/components/index.d.ts +1 -1
  369. package/lib/typescript/module/src/components/index.d.ts.map +1 -1
  370. package/lib/typescript/module/src/index.d.ts +1 -1
  371. package/lib/typescript/module/src/index.d.ts.map +1 -1
  372. package/lib/typescript/module/src/theme/create-styles.d.ts +1 -1
  373. package/lib/typescript/module/src/theme/create-styles.d.ts.map +1 -1
  374. package/lib/typescript/module/src/theme/create-theme.d.ts +68 -2
  375. package/lib/typescript/module/src/theme/create-theme.d.ts.map +1 -1
  376. package/lib/typescript/module/src/theme/default-colors.d.ts +12 -0
  377. package/lib/typescript/module/src/theme/default-colors.d.ts.map +1 -0
  378. package/lib/typescript/module/src/theme/default-theme.d.ts +15 -108
  379. package/lib/typescript/module/src/theme/default-theme.d.ts.map +1 -1
  380. package/lib/typescript/module/src/theme/functions/attach-functions.d.ts +20 -1
  381. package/lib/typescript/module/src/theme/functions/attach-functions.d.ts.map +1 -1
  382. package/lib/typescript/module/src/theme/functions/fns/breakpoints.d.ts +3 -3
  383. package/lib/typescript/module/src/theme/functions/fns/breakpoints.d.ts.map +1 -1
  384. package/lib/typescript/module/src/theme/functions/fns/color-scheme-value.d.ts +100 -0
  385. package/lib/typescript/module/src/theme/functions/fns/color-scheme-value.d.ts.map +1 -0
  386. package/lib/typescript/module/src/theme/functions/fns/dimmed.d.ts +2 -2
  387. package/lib/typescript/module/src/theme/functions/fns/dimmed.d.ts.map +1 -1
  388. package/lib/typescript/module/src/theme/functions/fns/gradient/gradient.d.ts +2 -3
  389. package/lib/typescript/module/src/theme/functions/fns/gradient/gradient.d.ts.map +1 -1
  390. package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts +36 -8
  391. package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts.map +1 -1
  392. package/lib/typescript/module/src/theme/functions/fns/index.d.ts +40 -14
  393. package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -1
  394. package/lib/typescript/module/src/theme/functions/fns/primary-shade.d.ts +53 -3
  395. package/lib/typescript/module/src/theme/functions/fns/primary-shade.d.ts.map +1 -1
  396. package/lib/typescript/module/src/theme/functions/fns/shadow.d.ts +1 -1
  397. package/lib/typescript/module/src/theme/functions/fns/shadow.d.ts.map +1 -1
  398. package/lib/typescript/module/src/theme/functions/fns/size.d.ts +2 -2
  399. package/lib/typescript/module/src/theme/functions/fns/size.d.ts.map +1 -1
  400. package/lib/typescript/module/src/theme/functions/fns/theme-color/color-utils.d.ts +50 -0
  401. package/lib/typescript/module/src/theme/functions/fns/theme-color/color-utils.d.ts.map +1 -0
  402. package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts +51 -5
  403. package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -1
  404. package/lib/typescript/module/src/theme/functions/fns/variant.d.ts +52 -19
  405. package/lib/typescript/module/src/theme/functions/fns/variant.d.ts.map +1 -1
  406. package/lib/typescript/module/src/theme/functions/index.d.ts +19 -0
  407. package/lib/typescript/module/src/theme/functions/index.d.ts.map +1 -0
  408. package/lib/typescript/module/src/theme/index.d.ts +9 -6
  409. package/lib/typescript/module/src/theme/index.d.ts.map +1 -1
  410. package/lib/typescript/module/src/theme/theme-provider.d.ts +1 -1
  411. package/lib/typescript/module/src/theme/theme-provider.d.ts.map +1 -1
  412. package/lib/typescript/module/src/theme/types.d.ts +494 -0
  413. package/lib/typescript/module/src/theme/types.d.ts.map +1 -0
  414. package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts +1 -1
  415. package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts.map +1 -1
  416. package/package.json +1 -1
  417. package/src/components/ActionIcon/ActionIcon.tsx +3 -3
  418. package/src/components/Anchor/index.tsx +3 -4
  419. package/src/components/Avatar/index.tsx +1 -2
  420. package/src/components/Badge/index.tsx +36 -19
  421. package/src/components/Blockquote/index.tsx +4 -6
  422. package/src/components/Button/index.tsx +5 -1
  423. package/src/components/Center/index.tsx +1 -2
  424. package/src/components/Checkbox/index.tsx +4 -5
  425. package/src/components/Chip/index.tsx +25 -18
  426. package/src/components/Code/index.tsx +7 -5
  427. package/src/components/Container/index.tsx +2 -2
  428. package/src/components/Flex/index.tsx +2 -2
  429. package/src/components/Grid/index.tsx +16 -10
  430. package/src/components/Highlight/index.tsx +1 -2
  431. package/src/components/Indicator/index.tsx +3 -4
  432. package/src/components/Menu/index.tsx +8 -10
  433. package/src/components/MultiSelect/index.tsx +13 -15
  434. package/src/components/NativeSelect/index.tsx +34 -21
  435. package/src/components/NavLink/index.tsx +27 -23
  436. package/src/components/Notification/index.tsx +5 -6
  437. package/src/components/Pagination/index.tsx +5 -6
  438. package/src/components/PinInput/index.tsx +5 -6
  439. package/src/components/Progress/index.tsx +5 -6
  440. package/src/components/Radio/index.tsx +4 -5
  441. package/src/components/Rating/index.tsx +2 -4
  442. package/src/components/RingProgress/index.tsx +93 -62
  443. package/src/components/Select/index.tsx +11 -13
  444. package/src/components/SimpleGrid/index.tsx +5 -2
  445. package/src/components/Spoiler/index.tsx +1 -1
  446. package/src/components/Stepper/index.tsx +17 -17
  447. package/src/components/Switch/index.tsx +5 -6
  448. package/src/components/Table/index.tsx +333 -413
  449. package/src/components/Text/index.tsx +125 -28
  450. package/src/components/ThemeIcon/index.tsx +23 -23
  451. package/src/components/Timeline/index.tsx +12 -15
  452. package/src/components/Title/index.tsx +5 -22
  453. package/src/components/Tooltip/index.tsx +1 -3
  454. package/src/components/TransferList/index.tsx +16 -18
  455. package/src/components/UnstyledButton/UnstyledButton.styles.ts +4 -2
  456. package/src/components/index.tsx +3 -1
  457. package/src/index.tsx +1 -1
  458. package/src/theme/create-styles.ts +1 -1
  459. package/src/theme/create-theme.ts +134 -23
  460. package/src/theme/default-colors.ts +252 -0
  461. package/src/theme/default-theme.ts +178 -392
  462. package/src/theme/functions/attach-functions.ts +57 -10
  463. package/src/theme/functions/fns/breakpoints.ts +4 -4
  464. package/src/theme/functions/fns/color-scheme-value.ts +200 -0
  465. package/src/theme/functions/fns/dimmed.ts +2 -2
  466. package/src/theme/functions/fns/gradient/gradient.ts +2 -3
  467. package/src/theme/functions/fns/helpers.ts +50 -9
  468. package/src/theme/functions/fns/index.ts +63 -3
  469. package/src/theme/functions/fns/primary-shade.ts +84 -8
  470. package/src/theme/functions/fns/shadow.ts +1 -1
  471. package/src/theme/functions/fns/size.ts +4 -3
  472. package/src/theme/functions/fns/theme-color/color-utils.ts +193 -0
  473. package/src/theme/functions/fns/theme-color/theme-color.ts +85 -17
  474. package/src/theme/functions/fns/variant.ts +106 -44
  475. package/src/theme/functions/index.ts +19 -0
  476. package/src/theme/index.ts +91 -0
  477. package/src/theme/theme-provider.tsx +2 -17
  478. package/src/theme/types.ts +625 -0
  479. package/src/theme/utils/withTextWrapper.tsx +2 -3
  480. package/lib/commonjs/components/Table/Table.example.js +0 -323
  481. package/lib/commonjs/components/Table/Table.example.js.map +0 -1
  482. package/lib/module/components/Table/Table.example.js +0 -318
  483. package/lib/module/components/Table/Table.example.js.map +0 -1
  484. package/lib/typescript/commonjs/src/components/Table/Table.example.d.ts +0 -13
  485. package/lib/typescript/commonjs/src/components/Table/Table.example.d.ts.map +0 -1
  486. package/lib/typescript/module/src/components/Table/Table.example.d.ts +0 -13
  487. package/lib/typescript/module/src/components/Table/Table.example.d.ts.map +0 -1
  488. package/src/components/Table/Table.example.tsx +0 -215
  489. package/src/theme/index.tsx +0 -9
package/README.md CHANGED
@@ -1,300 +1,134 @@
1
- # React Native Mantine (WIP/WORK IN PROGRESS)
2
-
3
1
  <div align="center">
4
2
 
3
+ # React Native Mantine
4
+
5
5
  [![npm version](https://img.shields.io/npm/v/react-native-mantine.svg?style=flat-square)](https://www.npmjs.com/package/react-native-mantine)
6
- [![npm downloads](https://img.shields.io/npm/dm/react-native-mantine.svg?style=flat-square)](https://www.npmjs.com/package/react-native-mantine)
7
6
  [![license](https://img.shields.io/npm/l/react-native-mantine.svg?style=flat-square)](https://github.com/auronsan/react-native-mantine/blob/main/LICENSE)
8
- [![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-native-mantine?style=flat-square)](https://bundlephobia.com/package/react-native-mantine)
7
+ [![npm downloads](https://img.shields.io/npm/dm/react-native-mantine.svg?style=flat-square)](https://www.npmjs.com/package/react-native-mantine)
9
8
  [![GitHub stars](https://img.shields.io/github/stars/auronsan/react-native-mantine?style=flat-square)](https://github.com/auronsan/react-native-mantine/stargazers)
10
9
  [![React Native](https://img.shields.io/badge/React%20Native-0.74.5-blue.svg?style=flat-square)](https://reactnative.dev/)
11
10
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.2.2-blue.svg?style=flat-square)](https://www.typescriptlang.org/)
12
11
 
13
12
  A comprehensive React Native component library inspired by [Mantine](https://mantine.dev/), bringing beautiful and accessible UI components to your mobile applications.
14
13
 
15
- [Installation](#installation) [Components](#components) [Usage](#usage) [Theme](#theme-system) [Example App](#example-app) • [Contributing](#contributing)
14
+ **Work in Progress** - This library is actively developed and evolving.
16
15
 
17
16
  </div>
18
17
 
19
- ---
20
-
21
- ## 🌐 Live Demo
22
-
23
- Try out all components in action without any installation:
24
-
25
- **[→ View Live Demo on GitHub Pages](https://auronsan.github.io/react-native-mantine/)**
26
-
27
- The demo showcases 70+ components running on the web via React Native Web, with:
28
- - Interactive component examples
29
- - Live code previews
30
- - Theme customization
31
- - All component variants and props
32
-
33
- ---
34
-
35
- ## Quick Start
18
+ ## Links
36
19
 
37
- ### 🚀 Use the Template
20
+ - [Documentation and demos](https://auronsan.github.io/react-native-mantine/)
21
+ - [Getting started template](https://github.com/auronsan/react-native-mantine-template)
22
+ - [NPM package](https://www.npmjs.com/package/react-native-mantine)
23
+ - [GitHub repository](https://github.com/auronsan/react-native-mantine)
24
+ - [Contributing guide](CONTRIBUTING.md)
38
25
 
39
- The fastest way to get started is by using our GitHub template:
26
+ ## Packages
40
27
 
41
- **[→ Use React Native Mantine Template](https://github.com/auronsan/react-native-mantine-template)**
28
+ React Native Mantine provides:
42
29
 
43
- This template includes all dependencies configured, TypeScript setup, and example components ready to use.
30
+ - **70+ Components** Button, TextInput, Paper, Modal, Drawer, and many more
31
+ - **Theme System** – 14 color palettes with 10 shades each, aligned with Mantine v6
32
+ - **8 Variants** – filled, light, outline, subtle, white, default, gradient, transparent
33
+ - **Dark Mode** – Full color scheme support with automatic adjustments
34
+ - **TypeScript** – Written in TypeScript with comprehensive type definitions
35
+ - **Accessibility** – Built with mobile accessibility best practices
36
+ - **Cross-platform** – iOS, Android, and Web (via React Native Web)
44
37
 
45
38
  ## Installation
46
39
 
47
40
  ```bash
48
- # Using npm
49
41
  npm install react-native-mantine
50
-
51
- # Using yarn
52
- yarn add react-native-mantine
53
-
54
- # Using pnpm
55
- pnpm add react-native-mantine
56
42
  ```
57
43
 
58
- ### Peer Dependencies
59
-
60
- Ensure you have the following peer dependencies installed:
44
+ ### Peer dependencies
61
45
 
62
46
  ```bash
63
47
  npm install react react-native expo-linear-gradient expo-font expo-clipboard
64
48
  ```
65
49
 
66
- ---
67
-
68
50
  ## Quick Start
69
51
 
70
- Wrap your application with the `ThemeProvider` to enable theming:
71
-
72
52
  ```tsx
73
- import { ThemeProvider } from 'react-native-mantine';
53
+ import { ThemeProvider, Button, Text, Stack, Paper } from 'react-native-mantine';
74
54
 
75
55
  export default function App() {
76
56
  return (
77
57
  <ThemeProvider>
78
- {/* Your app components */}
58
+ <Stack spacing="md">
59
+ <Paper padding="lg" shadow="sm">
60
+ <Text size="xl" weight={700}>
61
+ Welcome to React Native Mantine
62
+ </Text>
63
+ <Text color="dimmed">
64
+ Build beautiful mobile apps with ease
65
+ </Text>
66
+ </Paper>
67
+ <Button variant="filled" color="blue" onPress={() => console.log('Pressed!')}>
68
+ Get Started
69
+ </Button>
70
+ </Stack>
79
71
  </ThemeProvider>
80
72
  );
81
73
  }
82
74
  ```
83
75
 
84
- ### Basic Usage Example
76
+ ## Theme Customization
85
77
 
86
78
  ```tsx
87
- import { Button, Text, Stack, Paper } from 'react-native-mantine';
79
+ import { ThemeProvider, createTheme } from 'react-native-mantine';
80
+
81
+ const theme = createTheme({
82
+ primaryColor: 'teal',
83
+ primaryShade: { light: 6, dark: 8 },
84
+ fontFamily: 'Inter',
85
+ colors: {
86
+ brand: [
87
+ '#e6f7ff',
88
+ '#bae7ff',
89
+ '#91d5ff',
90
+ '#69c0ff',
91
+ '#40a9ff',
92
+ '#1890ff',
93
+ '#096dd9',
94
+ '#0050b3',
95
+ '#003a8c',
96
+ '#002766',
97
+ ],
98
+ },
99
+ });
88
100
 
89
- function MyComponent() {
101
+ export default function App() {
90
102
  return (
91
- <Stack spacing="md">
92
- <Paper padding="lg" shadow="sm">
93
- <Text size="xl" weight={700}>
94
- Welcome to React Native Mantine
95
- </Text>
96
- <Text color="dimmed">
97
- Build beautiful mobile apps with ease
98
- </Text>
99
- </Paper>
100
-
101
- <Button variant="filled" color="blue" onPress={() => console.log('Pressed!')}>
102
- Get Started
103
- </Button>
104
- </Stack>
103
+ <ThemeProvider theme={theme}>
104
+ {/* Your app components */}
105
+ </ThemeProvider>
105
106
  );
106
107
  }
107
108
  ```
108
109
 
109
- ---
110
-
111
- ## Example App
112
-
113
- The library includes a comprehensive example application showcasing all components with live examples and code snippets.
114
-
115
- ### Running the Example App
116
-
117
- ```bash
118
- # Clone the repository
119
- git clone https://github.com/auronsan/react-native-mantine.git
120
- cd react-native-mantine
121
-
122
- # Install dependencies
123
- yarn install
124
-
125
- # Run on Web (recommended for quick preview)
126
- yarn example web
127
-
128
- # Run on iOS
129
- yarn example ios
130
-
131
- # Run on Android
132
- yarn example android
133
-
134
- # Start Metro bundler
135
- yarn example start
136
- ```
137
-
138
- The example app includes:
139
-
140
- - Interactive component showcase
141
- - All 70+ components with examples
142
- - Theme customization demos
143
- - Component variant demonstrations
144
- - Code examples for each component
145
- - **Web support** via React Native Web (also available at [live demo](https://auronsan.github.io/react-native-mantine/))
146
-
147
- ---
148
-
149
- ## Development
150
-
151
- ### Project Structure
152
-
153
- ```
154
- react-native-mantine/
155
- ├── src/
156
- │ ├── components/ # All component implementations
157
- │ ├── theme/ # Theme system and utilities
158
- │ └── hooks/ # Custom React hooks
159
- ├── example/ # Example application
160
- │ └── src/
161
- │ ├── examples/ # Component examples
162
- │ └── screens/ # Example app screens
163
- ├── lib/ # Built library output
164
- └── package.json
165
- ```
166
-
167
- ### Scripts
168
-
169
- ```bash
170
- # Development
171
- yarn example start # Start example app
172
- yarn example web # Run on web browser
173
- yarn example ios # Run on iOS
174
- yarn example android # Run on Android
175
-
176
- # Testing & Quality
177
- yarn test # Run Jest tests
178
- yarn typecheck # TypeScript type checking
179
- yarn lint # Run ESLint
180
- yarn prettier:write # Format code
181
-
182
- # Building
183
- yarn prepare # Build library
184
- yarn clean # Clean build artifacts
185
-
186
- # Web Deployment
187
- cd example
188
- yarn web:build # Build for GitHub Pages
189
- yarn web:serve # Serve production build locally
190
- ```
191
-
192
- ### Building the Library
193
-
194
- The library uses `react-native-builder-bob` for building:
110
+ ## Getting Help
195
111
 
196
- ```bash
197
- yarn prepare
198
- ```
199
-
200
- This generates:
112
+ Join our community:
201
113
 
202
- - CommonJS output in `lib/commonjs/`
203
- - ES modules output in `lib/module/`
204
- - TypeScript definitions in `lib/typescript/`
205
-
206
- ---
114
+ - [GitHub Issues](https://github.com/auronsan/react-native-mantine/issues) Bug reports and feature requests
115
+ - [GitHub Discussions](https://github.com/auronsan/react-native-mantine/discussions) Questions and community support
207
116
 
208
117
  ## Contributing
209
118
 
210
- Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
211
-
212
- ### Development Workflow
213
-
214
- 1. Fork the repository
215
- 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
216
- 3. Make your changes
217
- 4. Run tests and linting (`yarn test && yarn lint`)
218
- 5. Commit your changes (`git commit -m 'Add amazing feature'`)
219
- 6. Push to the branch (`git push origin feature/amazing-feature`)
220
- 7. Open a Pull Request
221
-
222
- ### Component Development Guidelines
223
-
224
- - Follow existing component patterns
225
- - Include TypeScript types for all props
226
- - Write tests for new components
227
- - Add examples in the example app
228
- - Document props and usage in JSDoc comments
229
- - Support all standard variants and sizes where applicable
230
-
231
- ---
232
-
233
- ## Roadmap
234
-
235
- - [x] Web platform support (via React Native Web)
236
- - [x] Live demo on GitHub Pages
237
- - [ ] Additional components (Carousel, DatePicker, ColorPicker)
238
- - [ ] Enhanced animations and transitions
239
- - [ ] Improved accessibility features
240
- - [ ] Performance optimizations
241
- - [ ] Comprehensive documentation site
242
- - [ ] Storybook integration
243
- - [ ] More theming options
244
-
245
- ---
119
+ We welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) to learn about our development process, code standards, and how to submit pull requests.
246
120
 
247
121
  ## Browser/Platform Support
248
122
 
249
123
  - iOS 13.0+
250
124
  - Android API 21+
251
125
  - React Native 0.70+
252
- - Web (via React Native Web)
253
- - Chrome, Firefox, Safari, Edge (latest versions)
254
- - Progressive Web App (PWA) compatible
255
-
256
- ---
126
+ - Web (via React Native Web) – Chrome, Firefox, Safari, Edge (latest versions)
257
127
 
258
128
  ## Credits
259
129
 
260
130
  This library is inspired by the excellent [Mantine](https://mantine.dev/) project by Vitaly Rtishchev. Special thanks to the Mantine team for creating such a wonderful UI library.
261
131
 
262
- ---
263
-
264
- ## License
265
-
266
- MIT License - see the [LICENSE](LICENSE) file for details.
267
-
268
- Copyright (c) 2024 Auronsan
269
-
270
- ---
271
-
272
- ## Documentation
273
-
274
- Visit our official documentation site:
275
-
276
- **https://auronsan.github.io/react-native-mantine/**
277
-
278
- The documentation includes:
279
- - Interactive component showcase
280
- - Complete setup guide
281
- - API reference
282
- - Usage examples
283
- - Theme customization guide
284
-
285
- ---
286
-
287
- ## Links
288
-
289
- - [Documentation Site](https://auronsan.github.io/react-native-mantine/)
290
- - [GitHub Repository](https://github.com/auronsan/react-native-mantine)
291
- - [NPM Package](https://www.npmjs.com/package/react-native-mantine)
292
- - [GitHub Packages](https://github.com/auronsan/react-native-mantine/packages)
293
- - [Issue Tracker](https://github.com/auronsan/react-native-mantine/issues)
294
- - [Mantine (Web)](https://mantine.dev/)
295
-
296
- ---
297
-
298
132
  ## Support
299
133
 
300
134
  If you like this project, please consider:
@@ -304,6 +138,10 @@ If you like this project, please consider:
304
138
  - Contributing to the codebase
305
139
  - Sharing with other developers
306
140
 
141
+ ## License
142
+
143
+ MIT – see the [LICENSE](LICENSE) file for details.
144
+
307
145
  ---
308
146
 
309
147
  Made with ❤️ by [Auronsan](https://github.com/auronsan)
@@ -54,7 +54,7 @@ const useStyles = (0, _createStyles.createStyles)((theme, {
54
54
  justifyContent: 'center'
55
55
  },
56
56
  iconWrapper: {
57
- backgroundColor: variant === 'transparent' ? 'transparent' : theme.currentMode === 'dark' ? theme.primaryBgColor : theme.secondaryBgColor,
57
+ backgroundColor: variant === 'transparent' ? 'transparent' : theme.colorScheme === 'dark' ? theme.fn.primaryColor() : theme.fn.themeColor('gray', 1),
58
58
  borderRadius: sizeValue / 2,
59
59
  alignItems: 'center',
60
60
  justifyContent: 'center',
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_createStyles","_index","_index2","_jsxRuntime","ActionIcon","exports","forwardRef","onPress","children","variant","style","size","ref","styles","useStyles","jsx","TouchableOpacity","container","BoxView","iconWrapper","sizes","xs","sm","md","lg","xl","createStyles","theme","sizeValue","getSize","alignItems","justifyContent","backgroundColor","currentMode","primaryBgColor","secondaryBgColor","borderRadius","height","width"],"sourceRoot":"../../../../src","sources":["components/ActionIcon/ActionIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAAsC,IAAAK,WAAA,GAAAL,OAAA;AAW/B,MAAMM,UAAU,GAAAC,OAAA,CAAAD,UAAA,gBAAG,IAAAE,iBAAU,EAClC,CACE;EACEC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClBC,QAAQ;EACRC,OAAO,GAAG,SAAS;EACnBC,KAAK;EACLC,IAAI,GAAG;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,EAAER,SAAS,GAAG,CAAC;MAC3BE,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBM,MAAM,EAAET,SAAS;MACjBU,KAAK,EAAEV;IACT;EACF,CAAC;AACH,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_createStyles","_index","_index2","_jsxRuntime","ActionIcon","exports","forwardRef","onPress","children","variant","style","size","ref","styles","useStyles","jsx","TouchableOpacity","container","BoxView","iconWrapper","sizes","xs","sm","md","lg","xl","createStyles","theme","sizeValue","getSize","alignItems","justifyContent","backgroundColor","colorScheme","fn","primaryColor","themeColor","borderRadius","height","width"],"sourceRoot":"../../../../src","sources":["components/ActionIcon/ActionIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAAsC,IAAAK,WAAA,GAAAL,OAAA;AAW/B,MAAMM,UAAU,GAAAC,OAAA,CAAAD,UAAA,gBAAG,IAAAE,iBAAU,EAClC,CACE;EACEC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClBC,QAAQ;EACRC,OAAO,GAAG,SAAS;EACnBC,KAAK;EACLC,IAAI,GAAG;AACT,CAAC,EACDC,GAAG,KACA;EACH,MAAM;IAAEC;EAAO,CAAC,GAAGC,SAAS,CAAC;IAAEH,IAAI;IAAEF;EAAQ,CAAC,CAAC;EAC/C,oBACE,IAAAN,WAAA,CAAAY,GAAA,EAAChB,YAAA,CAAAiB,gBAAgB;IACfJ,GAAG,EAAEA,GAAI;IACTL,OAAO,EAAE,OAAOA,OAAO,KAAK,UAAU,GAAGA,OAAO,GAAG,MAAM,CAAC,CAAE;IAC5DG,KAAK,EAAE,CAACG,MAAM,CAACI,SAAS,EAAEP,KAAK,CAAE;IAAAF,QAAA,eAEjC,IAAAL,WAAA,CAAAY,GAAA,EAACd,MAAA,CAAAiB,OAAO;MAACR,KAAK,EAAEG,MAAM,CAACM,WAAY;MAAAX,QAAA,EAAEA;IAAQ,CAAU;EAAC,CACxC,CAAC;AAEvB,CACF,CAAC;AAEM,MAAMY,KAAK,GAAAf,OAAA,CAAAe,KAAA,GAAG;EACnBC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE;AACN,CAAC;AAED,MAAMX,SAAS,GAAG,IAAAY,0BAAY,EAC5B,CACEC,KAAK,EACL;EACEhB,IAAI,GAAG,IAAI;EACXF,OAAO,GAAG;AAIZ,CAAC,KACE;EACH,MAAMmB,SAAS,GAAG,OAAOjB,IAAI,KAAK,QAAQ,GAAGA,IAAI,GAAG,IAAAkB,eAAO,EAAC;IAAElB,IAAI;IAAES;EAAM,CAAC,CAAC;EAE5E,OAAO;IACLH,SAAS,EAAE;MACTa,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE;IAClB,CAAC;IACDZ,WAAW,EAAE;MACXa,eAAe,EACbvB,OAAO,KAAK,aAAa,GACrB,aAAa,GACbkB,KAAK,CAACM,WAAW,KAAK,MAAM,GAC1BN,KAAK,CAACO,EAAE,CAACC,YAAY,CAAC,CAAC,GACvBR,KAAK,CAACO,EAAE,CAACE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;MACtCC,YAAY,EAAET,SAAS,GAAG,CAAC;MAC3BE,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBO,MAAM,EAAEV,SAAS;MACjBW,KAAK,EAAEX;IACT;EACF,CAAC;AACH,CACF,CAAC","ignoreList":[]}
@@ -27,23 +27,22 @@ const useStyles = (0, _index2.createStyles)((theme, {
27
27
  }, {
28
28
  variant
29
29
  }) => {
30
- const colors = theme.colors[color] || theme.colors[theme.primaryColor];
31
30
  const fontSize = sizes[size] || sizes.md;
32
31
  const getVariantStyles = () => {
33
32
  switch (variant) {
34
33
  case 'link':
35
34
  return {
36
- color: colors?.[6] || colors?.[5] || theme.primaryBgColor,
35
+ color: theme.fn.themeColor(color, 6),
37
36
  textDecorationLine: underline ? 'underline' : 'none'
38
37
  };
39
38
  case 'text':
40
39
  return {
41
- color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] || theme.white : theme.black,
40
+ color: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 0) : theme.black,
42
41
  textDecorationLine: 'none'
43
42
  };
44
43
  default:
45
44
  return {
46
- color: colors?.[6] || colors?.[5] || theme.primaryBgColor,
45
+ color: theme.fn.themeColor(color, 6),
47
46
  textDecorationLine: underline ? 'underline' : 'none'
48
47
  };
49
48
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_themeProvider","_index2","_rem","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","rem","sm","md","lg","xl","useStyles","createStyles","theme","color","size","weight","underline","variant","colors","primaryColor","fontSize","getVariantStyles","primaryBgColor","textDecorationLine","colorScheme","dark","white","black","root","fontWeight","defaultProps","withTextWrapper","Anchor","exports","forwardRef","props","ref","href","onPress","children","style","shouldWrapInText","others","useComponentDefaultProps","styles","sx","name","handlePress","Linking","openURL","catch","err","console","error","jsx","Text","displayName"],"sourceRoot":"../../../../src","sources":["components/Anchor/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAA4C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAA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P,MAAM,CAACwB,WAAW,GAAG,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_themeProvider","_index2","_rem","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","rem","sm","md","lg","xl","useStyles","createStyles","theme","color","size","weight","underline","variant","fontSize","getVariantStyles","fn","themeColor","textDecorationLine","colorScheme","black","root","fontWeight","defaultProps","withTextWrapper","Anchor","exports","forwardRef","props","ref","href","onPress","children","style","shouldWrapInText","others","useComponentDefaultProps","styles","sx","name","handlePress","Linking","openURL","catch","err","console","error","jsx","Text","displayName"],"sourceRoot":"../../../../src","sources":["components/Anchor/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAA4C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,C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GA,CAAA,KAAM;IACxB,IAAIT,OAAO,EAAE;MACXA,OAAO,CAAC,CAAC;IACX,CAAC,MAAM,IAAID,IAAI,EAAE;MACfW,oBAAO,CAACC,OAAO,CAACZ,IAAI,CAAC,CAACa,KAAK,CAAEC,GAAG,IAC9BC,OAAO,CAACC,KAAK,CAAC,qBAAqB,EAAEF,GAAG,CAC1C,CAAC;IACH;EACF,CAAC;EAED,IAAI,CAACV,gBAAgB,EAAE;IACrB,OAAOF,QAAQ;EACjB;EAEA,oBACE,IAAArD,WAAA,CAAAoE,GAAA,EAACxE,MAAA,CAAAyE,IAAI;IACHnB,GAAG,EAAEA,GAAI;IACTI,KAAK,EAAEK,EAAE,CAACD,MAAM,CAAChB,IAAI,EAAEY,KAAK,CAAE;IAC9BF,OAAO,EAAES,WAAY;IAAA,GACjBL,MAAM;IAAAH,QAAA,EAETA;EAAQ,CACL,CAAC;AAEX,CAAC,CAAC;AAEFP,MAAM,CAACwB,WAAW,GAAG,QAAQ","ignoreList":[]}
@@ -25,7 +25,6 @@ const useStyles = (0, _index3.createStyles)((theme, {
25
25
  radius,
26
26
  size
27
27
  }) => {
28
- const colors = theme.colors[color] || theme.colors[theme.primaryColor];
29
28
  const sizeValue = typeof size === 'number' ? (0, _rem.rem)(size) : sizes[size] || sizes.md;
30
29
  return {
31
30
  root: {
@@ -33,7 +32,7 @@ const useStyles = (0, _index3.createStyles)((theme, {
33
32
  height: sizeValue,
34
33
  borderRadius: theme.fn.radius(radius),
35
34
  overflow: 'hidden',
36
- backgroundColor: colors?.[6] || colors?.[5] || theme.primaryBgColor,
35
+ backgroundColor: theme.fn.themeColor(color, 6),
37
36
  justifyContent: 'center',
38
37
  alignItems: 'center'
39
38
  },
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_themeProvider","_index3","_rem","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","rem","sm","md","lg","xl","useStyles","createStyles","theme","color","radius","size","colors","primaryColor","sizeValue","root","width","height","borderRadius","fn","overflow","backgroundColor","primaryBgColor","justifyContent","alignItems","image","placeholder","placeholderText","white","fontSize","fontWeight","textTransform","defaultProps","getInitials","name","names","trim","split","length","substring","toUpperCase","Avatar","exports","forwardRef","props","ref","src","alt","children","imageProps","style","others","useComponentDefaultProps","imageError","setImageError","useState","styles","sx","shouldShowImage","renderPlaceholder","jsx","BoxView","initials","Text","Image","source","uri","onError","displayName"],"sourceRoot":"../../../../src","sources":["components/Avatar/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAOA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAA4C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,I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F,OAAO;IAAChB,GAAG,EAAEA,GAAI;IAACK,KAAK,EAAEO,EAAE,CAACD,MAAM,CAACzC,IAAI,EAAEmC,KAAK,CAAE;IAAA,GAAKC,MAAM;IAAAH,QAAA,EACzDU,eAAe,gBACd,IAAA/E,WAAA,CAAAiF,GAAA,EAACvF,YAAA,CAAA2F,KAAK;MACJC,MAAM,EAAE;QAAEC,GAAG,EAAEpB,GAAG,IAAI;MAAG,CAAE;MAC3BI,KAAK,EAAEM,MAAM,CAAC/B,KAAa;MAC3B0C,OAAO,EAAEA,CAAA,KAAMb,aAAa,CAAC,IAAI,CAAE;MAAA,GAC/BL;IAAU,CACf,CAAC,GAEFU,iBAAiB,CAAC;EACnB,CACM,CAAC;AAEd,CAAC,CAAC;AAEFlB,MAAM,CAAC2B,WAAW,GAAG,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_themeProvider","_index3","_rem","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","rem","sm","md","lg","xl","useStyles","createStyles","theme","color","radius","size","sizeValue","root","width","height","borderRadius","fn","overflow","backgroundColor","themeColor","justifyContent","alignItems","image","placeholder","placeholderText","white","fontSize","fontWeight","textTransform","defaultProps","getInitials","name","names","trim","split","length","substring","toUpperCase","Avatar","exports","forwardRef","props","ref","src","alt","children","imageProps","style","others","useComponentDefaultProps","imageError","setImageError","useState","styles","sx","shouldShowImage","renderPlaceholder","jsx","BoxView","initials","Text","Image","source","uri","onError","displayName"],"sourceRoot":"../../../../src","sources":["components/Avatar/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAOA,IAAAI,cAAA,GAAAJ,OAA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AK,EAAEM,MAAM,CAAC9B,WAAY;QAAAsB,QAAA,EAAEA;MAAQ,CAAU,CAAC;IACjE;IAEA,IAAID,GAAG,EAAE;MACP,MAAMe,QAAQ,GAAG7B,WAAW,CAACc,GAAG,CAAC;MACjC,oBACE,IAAAlE,WAAA,CAAA+E,GAAA,EAACnF,OAAA,CAAAoF,OAAO;QAACX,KAAK,EAAEM,MAAM,CAAC9B,WAAY;QAAAsB,QAAA,eACjC,IAAAnE,WAAA,CAAA+E,GAAA,EAACpF,MAAA,CAAAuF,IAAI;UAACb,KAAK,EAAEM,MAAM,CAAC7B,eAAgB;UAAAqB,QAAA,EAAEc;QAAQ,CAAO;MAAC,CAC/C,CAAC;IAEd;IAEA,OAAO,IAAI;EACb,CAAC;EAED,oBACE,IAAAjF,WAAA,CAAA+E,GAAA,EAACnF,OAAA,CAAAoF,OAAO;IAAChB,GAAG,EAAEA,GAAI;IAACK,KAAK,EAAEO,EAAE,CAACD,MAAM,CAACzC,IAAI,EAAEmC,KAAK,CAAE;IAAA,GAAKC,MAAM;IAAAH,QAAA,EACzDU,eAAe,gBACd,IAAA7E,WAAA,CAAA+E,GAAA,EAACrF,YAAA,CAAAyF,KAAK;MACJC,MAAM,EAAE;QAAEC,GAAG,EAAEpB,GAAG,IAAI;MAAG,CAAE;MAC3BI,KAAK,EAAEM,MAAM,CAAC/B,KAAa;MAC3B0C,OAAO,EAAEA,CAAA,KAAMb,aAAa,CAAC,IAAI,CAAE;MAAA,GAC/BL;IAAU,CACf,CAAC,GAEFU,iBAAiB,CAAC;EACnB,CACM,CAAC;AAEd,CAAC,CAAC;AAEFlB,MAAM,CAAC2B,WAAW,GAAG,QAAQ","ignoreList":[]}
@@ -54,39 +54,62 @@ const useStyles = (0, _index2.createStyles)((theme, {
54
54
  variant,
55
55
  size
56
56
  }) => {
57
- const colors = theme.colors[color] || theme.colors[theme.primaryColor];
58
57
  const sizeStyles = sizes[size] || sizes.md;
59
58
  const getVariantStyles = () => {
60
59
  switch (variant) {
61
60
  case 'filled':
62
- return {
63
- backgroundColor: colors?.[6] || colors?.[5] || theme.primaryBgColor,
64
- color: theme.white
65
- };
61
+ {
62
+ const variantStyles = theme.fn.variant({
63
+ variant: 'filled',
64
+ color
65
+ });
66
+ return {
67
+ backgroundColor: variantStyles.background,
68
+ color: variantStyles.color
69
+ };
70
+ }
66
71
  case 'light':
67
- return {
68
- backgroundColor: colors?.[0] || colors?.[1] || (theme.colors.gray || [])[0],
69
- color: colors?.[6] || colors?.[5] || theme.primaryBgColor
70
- };
72
+ {
73
+ const variantStyles = theme.fn.variant({
74
+ variant: 'light',
75
+ color
76
+ });
77
+ return {
78
+ backgroundColor: variantStyles.background,
79
+ color: variantStyles.color
80
+ };
81
+ }
71
82
  case 'outline':
72
- return {
73
- backgroundColor: 'transparent',
74
- color: colors?.[6] || colors?.[5] || theme.primaryBgColor,
75
- borderWidth: 1,
76
- borderColor: colors?.[6] || colors?.[5] || theme.primaryBgColor
77
- };
83
+ {
84
+ const variantStyles = theme.fn.variant({
85
+ variant: 'outline',
86
+ color
87
+ });
88
+ return {
89
+ backgroundColor: variantStyles.background,
90
+ color: variantStyles.color,
91
+ borderWidth: 1,
92
+ borderColor: variantStyles.border
93
+ };
94
+ }
78
95
  case 'dot':
79
96
  return {
80
- backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[5] : theme.white,
81
- color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] : theme.black,
97
+ backgroundColor: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 5) : theme.white,
98
+ color: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 0) : theme.black,
82
99
  borderWidth: 1,
83
- borderColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[4] : (theme.colors.gray || [])[3]
100
+ borderColor: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 4) : theme.fn.themeColor('gray', 3)
84
101
  };
85
102
  default:
86
- return {
87
- backgroundColor: colors?.[6] || theme.primaryBgColor,
88
- color: theme.white
89
- };
103
+ {
104
+ const variantStyles = theme.fn.variant({
105
+ variant: 'filled',
106
+ color
107
+ });
108
+ return {
109
+ backgroundColor: variantStyles.background,
110
+ color: variantStyles.color
111
+ };
112
+ }
90
113
  }
91
114
  };
92
115
  return {
@@ -120,7 +143,7 @@ const useStyles = (0, _index2.createStyles)((theme, {
120
143
  width: dotSizes[size] || dotSizes.md,
121
144
  height: dotSizes[size] || dotSizes.md,
122
145
  borderRadius: dotSizes[size] || dotSizes.md,
123
- backgroundColor: colors?.[6] || colors?.[5] || theme.primaryBgColor,
146
+ backgroundColor: theme.fn.themeColor(color || theme.primaryColor),
124
147
  marginRight: theme.spacing.xs
125
148
  },
126
149
  label: {
@@ -166,6 +189,10 @@ const Badge = exports.Badge = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =
166
189
  variant,
167
190
  size
168
191
  });
192
+
193
+ // Get the text color from the variant styles
194
+ // We need to cast to access the color property since TypeScript doesn't know the exact type
195
+ const textColor = styles.root.color;
169
196
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
170
197
  ref: ref,
171
198
  style: sx(styles.root, style),
@@ -177,7 +204,10 @@ const Badge = exports.Badge = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =
177
204
  }), leftSection && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
178
205
  style: styles.leftSection,
179
206
  children: leftSection
180
- }), (0, _withTextWrapper.withTextWrapper)(children, shouldWrapInText, styles.label), rightSection && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
207
+ }), (0, _withTextWrapper.withTextWrapper)(children, shouldWrapInText, {
208
+ ...styles.label,
209
+ color: textColor
210
+ }), rightSection && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
181
211
  style: styles.rightSection,
182
212
  children: rightSection
183
213
  })]