react-native-mantine 0.5.0 → 0.7.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 (363) hide show
  1. package/README.md +1 -358
  2. package/lib/commonjs/components/Anchor/index.js +6 -1
  3. package/lib/commonjs/components/Anchor/index.js.map +1 -1
  4. package/lib/commonjs/components/Badge/index.js +12 -13
  5. package/lib/commonjs/components/Badge/index.js.map +1 -1
  6. package/lib/commonjs/components/Blockquote/index.js +8 -12
  7. package/lib/commonjs/components/Blockquote/index.js.map +1 -1
  8. package/lib/commonjs/components/Button/Button.styles.js +4 -4
  9. package/lib/commonjs/components/Button/Button.styles.js.map +1 -1
  10. package/lib/commonjs/components/Button/index.js +17 -17
  11. package/lib/commonjs/components/Button/index.js.map +1 -1
  12. package/lib/commonjs/components/Chip/index.js +8 -9
  13. package/lib/commonjs/components/Chip/index.js.map +1 -1
  14. package/lib/commonjs/components/CloseButton/index.js +5 -30
  15. package/lib/commonjs/components/CloseButton/index.js.map +1 -1
  16. package/lib/commonjs/components/Code/index.js +13 -8
  17. package/lib/commonjs/components/Code/index.js.map +1 -1
  18. package/lib/commonjs/components/Collapse/index.js +10 -2
  19. package/lib/commonjs/components/Collapse/index.js.map +1 -1
  20. package/lib/commonjs/components/Dialog/index.js +51 -8
  21. package/lib/commonjs/components/Dialog/index.js.map +1 -1
  22. package/lib/commonjs/components/Drawer/index.js +4 -13
  23. package/lib/commonjs/components/Drawer/index.js.map +1 -1
  24. package/lib/commonjs/components/Icon/index.js +53 -0
  25. package/lib/commonjs/components/Icon/index.js.map +1 -0
  26. package/lib/commonjs/components/Kbd/index.js +7 -8
  27. package/lib/commonjs/components/Kbd/index.js.map +1 -1
  28. package/lib/commonjs/components/List/index.js +6 -5
  29. package/lib/commonjs/components/List/index.js.map +1 -1
  30. package/lib/commonjs/components/Mark/index.js +4 -0
  31. package/lib/commonjs/components/Mark/index.js.map +1 -1
  32. package/lib/commonjs/components/Menu/index.js +20 -22
  33. package/lib/commonjs/components/Menu/index.js.map +1 -1
  34. package/lib/commonjs/components/Modal/index.js +10 -16
  35. package/lib/commonjs/components/Modal/index.js.map +1 -1
  36. package/lib/commonjs/components/NavLink/index.js +7 -11
  37. package/lib/commonjs/components/NavLink/index.js.map +1 -1
  38. package/lib/commonjs/components/Notification/index.js +5 -8
  39. package/lib/commonjs/components/Notification/index.js.map +1 -1
  40. package/lib/commonjs/components/NumberInput/index.js +2 -1
  41. package/lib/commonjs/components/NumberInput/index.js.map +1 -1
  42. package/lib/commonjs/components/PasswordInput/index.js +5 -6
  43. package/lib/commonjs/components/PasswordInput/index.js.map +1 -1
  44. package/lib/commonjs/components/PinInput/index.js +7 -2
  45. package/lib/commonjs/components/PinInput/index.js.map +1 -1
  46. package/lib/commonjs/components/Popover/index.js +8 -7
  47. package/lib/commonjs/components/Popover/index.js.map +1 -1
  48. package/lib/commonjs/components/RingProgress/index.js +49 -7
  49. package/lib/commonjs/components/RingProgress/index.js.map +1 -1
  50. package/lib/commonjs/components/SegmentedControl/index.js +7 -4
  51. package/lib/commonjs/components/SegmentedControl/index.js.map +1 -1
  52. package/lib/commonjs/components/Slider/index.js +28 -3
  53. package/lib/commonjs/components/Slider/index.js.map +1 -1
  54. package/lib/commonjs/components/Stepper/index.js.map +1 -1
  55. package/lib/commonjs/components/Table/Table.example.js +131 -0
  56. package/lib/commonjs/components/Table/Table.example.js.map +1 -0
  57. package/lib/commonjs/components/Table/index.js +85 -29
  58. package/lib/commonjs/components/Table/index.js.map +1 -1
  59. package/lib/commonjs/components/TextInput/index.js +2 -2
  60. package/lib/commonjs/components/TextInput/index.js.map +1 -1
  61. package/lib/commonjs/components/Timeline/index.js +12 -5
  62. package/lib/commonjs/components/Timeline/index.js.map +1 -1
  63. package/lib/commonjs/components/Title/index.js +4 -0
  64. package/lib/commonjs/components/Title/index.js.map +1 -1
  65. package/lib/commonjs/components/Tooltip/index.js +12 -11
  66. package/lib/commonjs/components/Tooltip/index.js.map +1 -1
  67. package/lib/commonjs/components/TransferList/index.js +3 -8
  68. package/lib/commonjs/components/TransferList/index.js.map +1 -1
  69. package/lib/commonjs/components/Transition/index.js +4 -0
  70. package/lib/commonjs/components/Transition/index.js.map +1 -1
  71. package/lib/commonjs/components/UnstyledButton/UnstyledButton.js +4 -0
  72. package/lib/commonjs/components/UnstyledButton/UnstyledButton.js.map +1 -1
  73. package/lib/commonjs/components/index.js +22 -22
  74. package/lib/commonjs/components/index.js.map +1 -1
  75. package/lib/commonjs/theme/functions/attach-functions.js +3 -0
  76. package/lib/commonjs/theme/functions/attach-functions.js.map +1 -1
  77. package/lib/commonjs/theme/functions/fns/helpers.js +12 -1
  78. package/lib/commonjs/theme/functions/fns/helpers.js.map +1 -1
  79. package/lib/commonjs/theme/functions/fns/index.js +4 -0
  80. package/lib/commonjs/theme/functions/fns/index.js.map +1 -1
  81. package/lib/commonjs/theme/functions/fns/rgba.js +50 -0
  82. package/lib/commonjs/theme/functions/fns/rgba.js.map +1 -0
  83. package/lib/commonjs/theme/functions/fns/size.js +19 -0
  84. package/lib/commonjs/theme/functions/fns/size.js.map +1 -0
  85. package/lib/commonjs/theme/utils/index.js +26 -0
  86. package/lib/commonjs/theme/utils/index.js.map +1 -0
  87. package/lib/commonjs/theme/utils/withTextWrapper.js +49 -0
  88. package/lib/commonjs/theme/utils/withTextWrapper.js.map +1 -0
  89. package/lib/module/components/Anchor/index.js +6 -1
  90. package/lib/module/components/Anchor/index.js.map +1 -1
  91. package/lib/module/components/Badge/index.js +5 -6
  92. package/lib/module/components/Badge/index.js.map +1 -1
  93. package/lib/module/components/Blockquote/index.js +6 -10
  94. package/lib/module/components/Blockquote/index.js.map +1 -1
  95. package/lib/module/components/Button/Button.styles.js +4 -4
  96. package/lib/module/components/Button/Button.styles.js.map +1 -1
  97. package/lib/module/components/Button/index.js +17 -17
  98. package/lib/module/components/Button/index.js.map +1 -1
  99. package/lib/module/components/Chip/index.js +5 -6
  100. package/lib/module/components/Chip/index.js.map +1 -1
  101. package/lib/module/components/CloseButton/index.js +6 -31
  102. package/lib/module/components/CloseButton/index.js.map +1 -1
  103. package/lib/module/components/Code/index.js +13 -8
  104. package/lib/module/components/Code/index.js.map +1 -1
  105. package/lib/module/components/Collapse/index.js +10 -2
  106. package/lib/module/components/Collapse/index.js.map +1 -1
  107. package/lib/module/components/Dialog/index.js +52 -9
  108. package/lib/module/components/Dialog/index.js.map +1 -1
  109. package/lib/module/components/Drawer/index.js +4 -13
  110. package/lib/module/components/Drawer/index.js.map +1 -1
  111. package/lib/module/components/Icon/index.js +48 -0
  112. package/lib/module/components/Icon/index.js.map +1 -0
  113. package/lib/module/components/Kbd/index.js +5 -6
  114. package/lib/module/components/Kbd/index.js.map +1 -1
  115. package/lib/module/components/List/index.js +6 -5
  116. package/lib/module/components/List/index.js.map +1 -1
  117. package/lib/module/components/Mark/index.js +4 -0
  118. package/lib/module/components/Mark/index.js.map +1 -1
  119. package/lib/module/components/Menu/index.js +16 -18
  120. package/lib/module/components/Menu/index.js.map +1 -1
  121. package/lib/module/components/Modal/index.js +10 -16
  122. package/lib/module/components/Modal/index.js.map +1 -1
  123. package/lib/module/components/NavLink/index.js +5 -9
  124. package/lib/module/components/NavLink/index.js.map +1 -1
  125. package/lib/module/components/Notification/index.js +5 -8
  126. package/lib/module/components/Notification/index.js.map +1 -1
  127. package/lib/module/components/NumberInput/index.js +2 -1
  128. package/lib/module/components/NumberInput/index.js.map +1 -1
  129. package/lib/module/components/PasswordInput/index.js +5 -6
  130. package/lib/module/components/PasswordInput/index.js.map +1 -1
  131. package/lib/module/components/PinInput/index.js +7 -2
  132. package/lib/module/components/PinInput/index.js.map +1 -1
  133. package/lib/module/components/Popover/index.js +9 -8
  134. package/lib/module/components/Popover/index.js.map +1 -1
  135. package/lib/module/components/RingProgress/index.js +51 -9
  136. package/lib/module/components/RingProgress/index.js.map +1 -1
  137. package/lib/module/components/SegmentedControl/index.js +7 -4
  138. package/lib/module/components/SegmentedControl/index.js.map +1 -1
  139. package/lib/module/components/Slider/index.js +28 -3
  140. package/lib/module/components/Slider/index.js.map +1 -1
  141. package/lib/module/components/Stepper/index.js.map +1 -1
  142. package/lib/module/components/Table/Table.example.js +128 -0
  143. package/lib/module/components/Table/Table.example.js.map +1 -0
  144. package/lib/module/components/Table/index.js +86 -29
  145. package/lib/module/components/Table/index.js.map +1 -1
  146. package/lib/module/components/TextInput/index.js +2 -2
  147. package/lib/module/components/TextInput/index.js.map +1 -1
  148. package/lib/module/components/Timeline/index.js +12 -5
  149. package/lib/module/components/Timeline/index.js.map +1 -1
  150. package/lib/module/components/Title/index.js +4 -0
  151. package/lib/module/components/Title/index.js.map +1 -1
  152. package/lib/module/components/Tooltip/index.js +11 -10
  153. package/lib/module/components/Tooltip/index.js.map +1 -1
  154. package/lib/module/components/TransferList/index.js +4 -9
  155. package/lib/module/components/TransferList/index.js.map +1 -1
  156. package/lib/module/components/Transition/index.js +5 -1
  157. package/lib/module/components/Transition/index.js.map +1 -1
  158. package/lib/module/components/UnstyledButton/UnstyledButton.js +4 -0
  159. package/lib/module/components/UnstyledButton/UnstyledButton.js.map +1 -1
  160. package/lib/module/components/index.js +1 -1
  161. package/lib/module/components/index.js.map +1 -1
  162. package/lib/module/theme/functions/attach-functions.js +3 -0
  163. package/lib/module/theme/functions/attach-functions.js.map +1 -1
  164. package/lib/module/theme/functions/fns/helpers.js +10 -0
  165. package/lib/module/theme/functions/fns/helpers.js.map +1 -1
  166. package/lib/module/theme/functions/fns/index.js +4 -0
  167. package/lib/module/theme/functions/fns/index.js.map +1 -1
  168. package/lib/module/theme/functions/fns/rgba.js +46 -0
  169. package/lib/module/theme/functions/fns/rgba.js.map +1 -0
  170. package/lib/module/theme/functions/fns/size.js +15 -0
  171. package/lib/module/theme/functions/fns/size.js.map +1 -0
  172. package/lib/module/theme/utils/index.js +5 -0
  173. package/lib/module/theme/utils/index.js.map +1 -0
  174. package/lib/module/theme/utils/withTextWrapper.js +45 -0
  175. package/lib/module/theme/utils/withTextWrapper.js.map +1 -0
  176. package/lib/typescript/commonjs/src/components/Anchor/index.d.ts +2 -1
  177. package/lib/typescript/commonjs/src/components/Anchor/index.d.ts.map +1 -1
  178. package/lib/typescript/commonjs/src/components/Badge/index.d.ts +2 -1
  179. package/lib/typescript/commonjs/src/components/Badge/index.d.ts.map +1 -1
  180. package/lib/typescript/commonjs/src/components/Blockquote/index.d.ts +2 -1
  181. package/lib/typescript/commonjs/src/components/Blockquote/index.d.ts.map +1 -1
  182. package/lib/typescript/commonjs/src/components/Button/index.d.ts +2 -1
  183. package/lib/typescript/commonjs/src/components/Button/index.d.ts.map +1 -1
  184. package/lib/typescript/commonjs/src/components/Chip/index.d.ts +2 -1
  185. package/lib/typescript/commonjs/src/components/Chip/index.d.ts.map +1 -1
  186. package/lib/typescript/commonjs/src/components/CloseButton/index.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/src/components/Code/index.d.ts +2 -1
  188. package/lib/typescript/commonjs/src/components/Code/index.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/src/components/Collapse/index.d.ts.map +1 -1
  190. package/lib/typescript/commonjs/src/components/Dialog/index.d.ts +2 -0
  191. package/lib/typescript/commonjs/src/components/Dialog/index.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/src/components/Drawer/index.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/src/components/Icon/index.d.ts +26 -0
  194. package/lib/typescript/commonjs/src/components/Icon/index.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/src/components/Kbd/index.d.ts +2 -1
  196. package/lib/typescript/commonjs/src/components/Kbd/index.d.ts.map +1 -1
  197. package/lib/typescript/commonjs/src/components/List/index.d.ts +2 -1
  198. package/lib/typescript/commonjs/src/components/List/index.d.ts.map +1 -1
  199. package/lib/typescript/commonjs/src/components/Mark/index.d.ts +2 -1
  200. package/lib/typescript/commonjs/src/components/Mark/index.d.ts.map +1 -1
  201. package/lib/typescript/commonjs/src/components/Menu/index.d.ts +3 -2
  202. package/lib/typescript/commonjs/src/components/Menu/index.d.ts.map +1 -1
  203. package/lib/typescript/commonjs/src/components/Modal/index.d.ts.map +1 -1
  204. package/lib/typescript/commonjs/src/components/NavLink/index.d.ts +2 -1
  205. package/lib/typescript/commonjs/src/components/NavLink/index.d.ts.map +1 -1
  206. package/lib/typescript/commonjs/src/components/Notification/index.d.ts +2 -1
  207. package/lib/typescript/commonjs/src/components/Notification/index.d.ts.map +1 -1
  208. package/lib/typescript/commonjs/src/components/NumberInput/index.d.ts.map +1 -1
  209. package/lib/typescript/commonjs/src/components/PinInput/index.d.ts.map +1 -1
  210. package/lib/typescript/commonjs/src/components/Popover/index.d.ts.map +1 -1
  211. package/lib/typescript/commonjs/src/components/RingProgress/index.d.ts.map +1 -1
  212. package/lib/typescript/commonjs/src/components/SegmentedControl/index.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/src/components/Slider/index.d.ts.map +1 -1
  214. package/lib/typescript/commonjs/src/components/Stepper/index.d.ts.map +1 -1
  215. package/lib/typescript/commonjs/src/components/Table/Table.example.d.ts +3 -0
  216. package/lib/typescript/commonjs/src/components/Table/Table.example.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/src/components/Table/index.d.ts +23 -9
  218. package/lib/typescript/commonjs/src/components/Table/index.d.ts.map +1 -1
  219. package/lib/typescript/commonjs/src/components/TextInput/index.d.ts.map +1 -1
  220. package/lib/typescript/commonjs/src/components/Timeline/index.d.ts.map +1 -1
  221. package/lib/typescript/commonjs/src/components/Title/index.d.ts +2 -1
  222. package/lib/typescript/commonjs/src/components/Title/index.d.ts.map +1 -1
  223. package/lib/typescript/commonjs/src/components/Tooltip/index.d.ts.map +1 -1
  224. package/lib/typescript/commonjs/src/components/TransferList/index.d.ts.map +1 -1
  225. package/lib/typescript/commonjs/src/components/Transition/index.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.d.ts +2 -0
  227. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.d.ts.map +1 -1
  228. package/lib/typescript/commonjs/src/components/index.d.ts +1 -1
  229. package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -1
  230. package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts.map +1 -1
  231. package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts +7 -0
  232. package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts +7 -0
  234. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/src/theme/functions/fns/rgba.d.ts +8 -0
  236. package/lib/typescript/commonjs/src/theme/functions/fns/rgba.d.ts.map +1 -0
  237. package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts +6 -0
  238. package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/src/theme/utils/index.d.ts +3 -0
  240. package/lib/typescript/commonjs/src/theme/utils/index.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts +41 -0
  242. package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts.map +1 -0
  243. package/lib/typescript/module/src/components/Anchor/index.d.ts +2 -1
  244. package/lib/typescript/module/src/components/Anchor/index.d.ts.map +1 -1
  245. package/lib/typescript/module/src/components/Badge/index.d.ts +2 -1
  246. package/lib/typescript/module/src/components/Badge/index.d.ts.map +1 -1
  247. package/lib/typescript/module/src/components/Blockquote/index.d.ts +2 -1
  248. package/lib/typescript/module/src/components/Blockquote/index.d.ts.map +1 -1
  249. package/lib/typescript/module/src/components/Button/index.d.ts +2 -1
  250. package/lib/typescript/module/src/components/Button/index.d.ts.map +1 -1
  251. package/lib/typescript/module/src/components/Chip/index.d.ts +2 -1
  252. package/lib/typescript/module/src/components/Chip/index.d.ts.map +1 -1
  253. package/lib/typescript/module/src/components/CloseButton/index.d.ts.map +1 -1
  254. package/lib/typescript/module/src/components/Code/index.d.ts +2 -1
  255. package/lib/typescript/module/src/components/Code/index.d.ts.map +1 -1
  256. package/lib/typescript/module/src/components/Collapse/index.d.ts.map +1 -1
  257. package/lib/typescript/module/src/components/Dialog/index.d.ts +2 -0
  258. package/lib/typescript/module/src/components/Dialog/index.d.ts.map +1 -1
  259. package/lib/typescript/module/src/components/Drawer/index.d.ts.map +1 -1
  260. package/lib/typescript/module/src/components/Icon/index.d.ts +26 -0
  261. package/lib/typescript/module/src/components/Icon/index.d.ts.map +1 -0
  262. package/lib/typescript/module/src/components/Kbd/index.d.ts +2 -1
  263. package/lib/typescript/module/src/components/Kbd/index.d.ts.map +1 -1
  264. package/lib/typescript/module/src/components/List/index.d.ts +2 -1
  265. package/lib/typescript/module/src/components/List/index.d.ts.map +1 -1
  266. package/lib/typescript/module/src/components/Mark/index.d.ts +2 -1
  267. package/lib/typescript/module/src/components/Mark/index.d.ts.map +1 -1
  268. package/lib/typescript/module/src/components/Menu/index.d.ts +3 -2
  269. package/lib/typescript/module/src/components/Menu/index.d.ts.map +1 -1
  270. package/lib/typescript/module/src/components/Modal/index.d.ts.map +1 -1
  271. package/lib/typescript/module/src/components/NavLink/index.d.ts +2 -1
  272. package/lib/typescript/module/src/components/NavLink/index.d.ts.map +1 -1
  273. package/lib/typescript/module/src/components/Notification/index.d.ts +2 -1
  274. package/lib/typescript/module/src/components/Notification/index.d.ts.map +1 -1
  275. package/lib/typescript/module/src/components/NumberInput/index.d.ts.map +1 -1
  276. package/lib/typescript/module/src/components/PinInput/index.d.ts.map +1 -1
  277. package/lib/typescript/module/src/components/Popover/index.d.ts.map +1 -1
  278. package/lib/typescript/module/src/components/RingProgress/index.d.ts.map +1 -1
  279. package/lib/typescript/module/src/components/SegmentedControl/index.d.ts.map +1 -1
  280. package/lib/typescript/module/src/components/Slider/index.d.ts.map +1 -1
  281. package/lib/typescript/module/src/components/Stepper/index.d.ts.map +1 -1
  282. package/lib/typescript/module/src/components/Table/Table.example.d.ts +3 -0
  283. package/lib/typescript/module/src/components/Table/Table.example.d.ts.map +1 -0
  284. package/lib/typescript/module/src/components/Table/index.d.ts +23 -9
  285. package/lib/typescript/module/src/components/Table/index.d.ts.map +1 -1
  286. package/lib/typescript/module/src/components/TextInput/index.d.ts.map +1 -1
  287. package/lib/typescript/module/src/components/Timeline/index.d.ts.map +1 -1
  288. package/lib/typescript/module/src/components/Title/index.d.ts +2 -1
  289. package/lib/typescript/module/src/components/Title/index.d.ts.map +1 -1
  290. package/lib/typescript/module/src/components/Tooltip/index.d.ts.map +1 -1
  291. package/lib/typescript/module/src/components/TransferList/index.d.ts.map +1 -1
  292. package/lib/typescript/module/src/components/Transition/index.d.ts.map +1 -1
  293. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.d.ts +2 -0
  294. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.d.ts.map +1 -1
  295. package/lib/typescript/module/src/components/index.d.ts +1 -1
  296. package/lib/typescript/module/src/components/index.d.ts.map +1 -1
  297. package/lib/typescript/module/src/theme/functions/attach-functions.d.ts.map +1 -1
  298. package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts +7 -0
  299. package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts.map +1 -1
  300. package/lib/typescript/module/src/theme/functions/fns/index.d.ts +7 -0
  301. package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -1
  302. package/lib/typescript/module/src/theme/functions/fns/rgba.d.ts +8 -0
  303. package/lib/typescript/module/src/theme/functions/fns/rgba.d.ts.map +1 -0
  304. package/lib/typescript/module/src/theme/functions/fns/size.d.ts +6 -0
  305. package/lib/typescript/module/src/theme/functions/fns/size.d.ts.map +1 -0
  306. package/lib/typescript/module/src/theme/utils/index.d.ts +3 -0
  307. package/lib/typescript/module/src/theme/utils/index.d.ts.map +1 -0
  308. package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts +41 -0
  309. package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts.map +1 -0
  310. package/package.json +12 -9
  311. package/src/components/Anchor/index.tsx +8 -2
  312. package/src/components/Badge/index.tsx +5 -3
  313. package/src/components/Blockquote/index.tsx +6 -5
  314. package/src/components/Button/Button.styles.ts +3 -3
  315. package/src/components/Button/index.tsx +57 -63
  316. package/src/components/Chip/index.tsx +8 -6
  317. package/src/components/CloseButton/index.tsx +2 -23
  318. package/src/components/Code/index.tsx +19 -14
  319. package/src/components/Collapse/index.tsx +11 -2
  320. package/src/components/Dialog/index.tsx +54 -9
  321. package/src/components/Drawer/index.tsx +7 -13
  322. package/src/components/Icon/index.tsx +74 -0
  323. package/src/components/Kbd/index.tsx +5 -4
  324. package/src/components/List/index.tsx +8 -9
  325. package/src/components/Mark/index.tsx +7 -2
  326. package/src/components/Menu/index.tsx +21 -17
  327. package/src/components/Modal/index.tsx +11 -16
  328. package/src/components/NavLink/index.tsx +6 -4
  329. package/src/components/Notification/index.tsx +6 -7
  330. package/src/components/NumberInput/index.tsx +57 -15
  331. package/src/components/PasswordInput/index.tsx +2 -2
  332. package/src/components/PinInput/index.tsx +24 -9
  333. package/src/components/Popover/index.tsx +13 -10
  334. package/src/components/RingProgress/index.tsx +51 -8
  335. package/src/components/SegmentedControl/index.tsx +6 -4
  336. package/src/components/Slider/index.tsx +14 -3
  337. package/src/components/Stepper/index.tsx +5 -4
  338. package/src/components/Table/Table.example.tsx +85 -0
  339. package/src/components/Table/index.tsx +162 -43
  340. package/src/components/TextInput/index.tsx +93 -66
  341. package/src/components/Timeline/index.tsx +19 -12
  342. package/src/components/Title/index.tsx +7 -2
  343. package/src/components/Tooltip/index.tsx +13 -10
  344. package/src/components/TransferList/index.tsx +1 -5
  345. package/src/components/Transition/index.tsx +14 -2
  346. package/src/components/UnstyledButton/UnstyledButton.tsx +5 -1
  347. package/src/components/index.tsx +1 -1
  348. package/src/theme/functions/attach-functions.ts +3 -0
  349. package/src/theme/functions/fns/helpers.ts +19 -7
  350. package/src/theme/functions/fns/index.ts +4 -0
  351. package/src/theme/functions/fns/rgba.ts +45 -0
  352. package/src/theme/functions/fns/size.ts +14 -0
  353. package/src/theme/utils/index.ts +2 -0
  354. package/src/theme/utils/withTextWrapper.tsx +58 -0
  355. package/lib/commonjs/components/Portal/index.js +0 -69
  356. package/lib/commonjs/components/Portal/index.js.map +0 -1
  357. package/lib/module/components/Portal/index.js +0 -62
  358. package/lib/module/components/Portal/index.js.map +0 -1
  359. package/lib/typescript/commonjs/src/components/Portal/index.d.ts +0 -10
  360. package/lib/typescript/commonjs/src/components/Portal/index.d.ts.map +0 -1
  361. package/lib/typescript/module/src/components/Portal/index.d.ts +0 -10
  362. package/lib/typescript/module/src/components/Portal/index.d.ts.map +0 -1
  363. package/src/components/Portal/index.tsx +0 -75
@@ -4,7 +4,6 @@ import { BoxView } from '../BoxView';
4
4
  import { Text } from '../Text';
5
5
  import type {
6
6
  DefaultProps,
7
-
8
7
  MantineNumberSize,
9
8
  MantineSize,
10
9
  } from '../../theme/types';
@@ -13,7 +12,19 @@ import { createStyles, getSize } from '../../theme';
13
12
  import { rem } from '../../theme/utils/rem';
14
13
  import { INPUT_SIZES } from '../Input';
15
14
 
16
- export interface NumberInputProps extends DefaultProps, Omit<TextInputProps, 'value' | 'onChangeText' | 'onChange' | 'keyboardType' | 'editable' | 'placeholderTextColor' | 'defaultValue'> {
15
+ export interface NumberInputProps
16
+ extends
17
+ DefaultProps,
18
+ Omit<
19
+ TextInputProps,
20
+ | 'value'
21
+ | 'onChangeText'
22
+ | 'onChange'
23
+ | 'keyboardType'
24
+ | 'editable'
25
+ | 'placeholderTextColor'
26
+ | 'defaultValue'
27
+ > {
17
28
  /** Input label */
18
29
  label?: React.ReactNode;
19
30
 
@@ -101,7 +112,9 @@ const useStyles = createStyles(
101
112
  case 'filled':
102
113
  return {
103
114
  backgroundColor:
104
- theme.colorScheme === 'dark' ? (theme.colors.dark || [])[5] : (theme.colors.gray || [])[1],
115
+ theme.colorScheme === 'dark'
116
+ ? (theme.colors.dark || [])[5]
117
+ : (theme.colors.gray || [])[1],
105
118
  borderWidth: 1,
106
119
  borderColor: 'transparent',
107
120
  };
@@ -112,10 +125,15 @@ const useStyles = createStyles(
112
125
  };
113
126
  default:
114
127
  return {
115
- backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[6] : theme.white,
128
+ backgroundColor:
129
+ theme.colorScheme === 'dark'
130
+ ? (theme.colors.dark || [])[6]
131
+ : theme.white,
116
132
  borderWidth: 1,
117
133
  borderColor:
118
- theme.colorScheme === 'dark' ? (theme.colors.dark || [])[4] : (theme.colors.gray || [])[4],
134
+ theme.colorScheme === 'dark'
135
+ ? (theme.colors.dark || [])[4]
136
+ : (theme.colors.gray || [])[4],
119
137
  };
120
138
  }
121
139
  };
@@ -132,7 +150,10 @@ const useStyles = createStyles(
132
150
  },
133
151
  description: {
134
152
  fontSize: theme.fontSizes.xs as number,
135
- color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[2] : (theme.colors.gray || [])[6],
153
+ color:
154
+ theme.colorScheme === 'dark'
155
+ ? (theme.colors.dark || [])[2]
156
+ : (theme.colors.gray || [])[6],
136
157
  marginTop: theme.spacing.xs,
137
158
  },
138
159
  error: {
@@ -166,6 +187,7 @@ const useStyles = createStyles(
166
187
  ...(withIcon && {
167
188
  paddingLeft: 0,
168
189
  }),
190
+ fontFamily: theme.fontFamilyInput,
169
191
  },
170
192
  controls: {
171
193
  flexDirection: 'row',
@@ -178,12 +200,17 @@ const useStyles = createStyles(
178
200
  alignItems: 'center',
179
201
  borderLeftWidth: 1,
180
202
  borderLeftColor:
181
- theme.colorScheme === 'dark' ? (theme.colors.dark || [])[4] : (theme.colors.gray || [])[4],
203
+ theme.colorScheme === 'dark'
204
+ ? (theme.colors.dark || [])[4]
205
+ : (theme.colors.gray || [])[4],
182
206
  },
183
207
  controlText: {
184
208
  fontSize: rem(18) as any,
185
209
  fontWeight: '600',
186
- color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] : (theme.colors.gray || [])[7],
210
+ color:
211
+ theme.colorScheme === 'dark'
212
+ ? (theme.colors.dark || [])[0]
213
+ : (theme.colors.gray || [])[7],
187
214
  },
188
215
  };
189
216
  }
@@ -226,9 +253,12 @@ export const NumberInput = forwardRef<any, NumberInputProps>((props, ref) => {
226
253
  } = useComponentDefaultProps('NumberInput', defaultProps, props);
227
254
 
228
255
  const theme = useTheme();
229
- const [uncontrolledValue, setUncontrolledValue] = useState<number | ''>(defaultValue ?? '');
256
+ const [uncontrolledValue, setUncontrolledValue] = useState<number | ''>(
257
+ defaultValue ?? ''
258
+ );
230
259
 
231
- const value = controlledValue !== undefined ? controlledValue : uncontrolledValue;
260
+ const value =
261
+ controlledValue !== undefined ? controlledValue : uncontrolledValue;
232
262
 
233
263
  const { styles, sx } = useStyles(
234
264
  {
@@ -297,7 +327,9 @@ export const NumberInput = forwardRef<any, NumberInputProps>((props, ref) => {
297
327
  return (
298
328
  <BoxView style={sx(styles.wrapper, wrapperStyle)}>
299
329
  {label && (
300
- <Text style={styles.label}>{typeof label === 'string' ? label : label}</Text>
330
+ <Text style={styles.label}>
331
+ {typeof label === 'string' ? label : label}
332
+ </Text>
301
333
  )}
302
334
 
303
335
  <BoxView style={sx(styles.inputWrapper, style)}>
@@ -309,7 +341,9 @@ export const NumberInput = forwardRef<any, NumberInputProps>((props, ref) => {
309
341
  onChangeText={handleChange}
310
342
  placeholder={placeholder}
311
343
  placeholderTextColor={
312
- theme.colorScheme === 'dark' ? (theme.colors.dark || [])[3] : (theme.colors.gray || [])[5]
344
+ theme.colorScheme === 'dark'
345
+ ? (theme.colors.dark || [])[3]
346
+ : (theme.colors.gray || [])[5]
313
347
  }
314
348
  keyboardType="numeric"
315
349
  editable={!disabled}
@@ -322,7 +356,10 @@ export const NumberInput = forwardRef<any, NumberInputProps>((props, ref) => {
322
356
  <TouchableOpacity
323
357
  style={styles.control}
324
358
  onPress={handleDecrement}
325
- disabled={disabled || (min !== undefined && typeof value === 'number' && value <= min)}
359
+ disabled={
360
+ disabled ||
361
+ (min !== undefined && typeof value === 'number' && value <= min)
362
+ }
326
363
  activeOpacity={0.7}
327
364
  >
328
365
  <Text style={styles.controlText}>−</Text>
@@ -331,7 +368,10 @@ export const NumberInput = forwardRef<any, NumberInputProps>((props, ref) => {
331
368
  <TouchableOpacity
332
369
  style={styles.control}
333
370
  onPress={handleIncrement}
334
- disabled={disabled || (max !== undefined && typeof value === 'number' && value >= max)}
371
+ disabled={
372
+ disabled ||
373
+ (max !== undefined && typeof value === 'number' && value >= max)
374
+ }
335
375
  activeOpacity={0.7}
336
376
  >
337
377
  <Text style={styles.controlText}>+</Text>
@@ -347,7 +387,9 @@ export const NumberInput = forwardRef<any, NumberInputProps>((props, ref) => {
347
387
  )}
348
388
 
349
389
  {error && (
350
- <Text style={styles.error}>{typeof error === 'string' ? error : error}</Text>
390
+ <Text style={styles.error}>
391
+ {typeof error === 'string' ? error : error}
392
+ </Text>
351
393
  )}
352
394
  </BoxView>
353
395
  );
@@ -1,7 +1,7 @@
1
1
  import React, { forwardRef, useState } from 'react';
2
2
  import { TextInput as RNTextInput, Pressable } from 'react-native';
3
3
  import { TextInput, type TextInputProps } from '../TextInput';
4
- import { Text } from '../Text';
4
+ import { Icon } from '../Icon';
5
5
 
6
6
  export interface PasswordInputProps extends Omit<TextInputProps, 'rightSection' | 'type'> {
7
7
  /** Toggle button aria-label */
@@ -22,7 +22,7 @@ const defaultProps: Partial<PasswordInputProps> = {
22
22
  };
23
23
 
24
24
  const DefaultEyeIcon = ({ visible }: { visible: boolean }) => (
25
- <Text style={{ fontSize: 18 }}>{visible ? '👁️' : '👁️‍🗨️'}</Text>
25
+ <Icon name={visible ? 'eye' : 'eye-slash'} size={16} useThemeColor />
26
26
  );
27
27
 
28
28
  export const PasswordInput = forwardRef<RNTextInput, PasswordInputProps>((props, ref) => {
@@ -1,12 +1,15 @@
1
1
  import { forwardRef, useRef, useState } from 'react';
2
2
  import { TextInput } from 'react-native';
3
3
  import { BoxView } from '../BoxView';
4
- import type { DefaultProps, MantineNumberSize, MantineSize } from '../../theme/types';
4
+ import type {
5
+ DefaultProps,
6
+ MantineNumberSize,
7
+ MantineSize,
8
+ } from '../../theme/types';
5
9
  import { useComponentDefaultProps } from '../../theme/theme-provider';
6
10
  import { createStyles, getSize } from '../../theme';
7
11
  import { rem } from '../../theme/utils/rem';
8
12
 
9
-
10
13
  export interface PinInputProps extends DefaultProps {
11
14
  /** Number of inputs */
12
15
  length?: number;
@@ -94,18 +97,23 @@ const useStyles = createStyles(
94
97
  borderColor: error
95
98
  ? (theme.colors.red || [])[6]
96
99
  : theme.colorScheme === 'dark'
97
- ? (theme.colors.dark || [])[4]
98
- : (theme.colors.gray || [])[4],
99
- backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[6] : theme.white,
100
+ ? (theme.colors.dark || [])[4]
101
+ : (theme.colors.gray || [])[4],
102
+ backgroundColor:
103
+ theme.colorScheme === 'dark'
104
+ ? (theme.colors.dark || [])[6]
105
+ : theme.white,
100
106
  fontSize: getSize({ size, sizes: theme.fontSizes }) as any,
101
107
  textAlign: 'center',
102
108
  color: theme.colorScheme === 'dark' ? theme.white : theme.black,
103
109
  ...(disabled && {
104
110
  opacity: 0.6,
105
111
  }),
112
+ fontFamily: theme.fontFamilyInput,
106
113
  },
107
114
  inputFocused: {
108
- borderColor: theme.colors[theme.primaryColor]?.[6] || theme.primaryBgColor,
115
+ borderColor:
116
+ theme.colors[theme.primaryColor]?.[6] || theme.primaryBgColor,
109
117
  borderWidth: 2,
110
118
  },
111
119
  };
@@ -142,10 +150,13 @@ export const PinInput = forwardRef<any, PinInputProps>((props, ref) => {
142
150
  ...others
143
151
  } = useComponentDefaultProps('PinInput', defaultProps, props);
144
152
 
145
- const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue || '');
153
+ const [uncontrolledValue, setUncontrolledValue] = useState(
154
+ defaultValue || ''
155
+ );
146
156
  const [focusedIndex, setFocusedIndex] = useState<number | null>(null);
147
157
 
148
- const value = controlledValue !== undefined ? controlledValue : uncontrolledValue;
158
+ const value =
159
+ controlledValue !== undefined ? controlledValue : uncontrolledValue;
149
160
  const inputRefs = useRef<(TextInput | null)[]>([]);
150
161
 
151
162
  const { styles, sx } = useStyles(
@@ -226,7 +237,11 @@ export const PinInput = forwardRef<any, PinInputProps>((props, ref) => {
226
237
  return (
227
238
  <TextInput
228
239
  key={index}
229
- ref={(el) => (inputRefs.current[index] = el)}
240
+ ref={(el) => {
241
+ if (inputRefs.current) {
242
+ inputRefs.current[index] = el;
243
+ }
244
+ }}
230
245
  value={mask && displayValue ? '•' : displayValue}
231
246
  onChangeText={(text) => handleChange(text, index)}
232
247
  onKeyPress={(e) => handleKeyPress(e, index)}
@@ -3,9 +3,9 @@ import {
3
3
  View,
4
4
  TouchableWithoutFeedback,
5
5
  Animated,
6
+ Modal,
6
7
  } from 'react-native';
7
8
  import { BoxView } from '../BoxView';
8
- import { Portal } from '../Portal';
9
9
  import type {
10
10
  DefaultProps,
11
11
 
@@ -92,7 +92,7 @@ const defaultProps: Partial<PopoverProps> = {
92
92
  interface PopoverContextValue {
93
93
  opened: boolean;
94
94
  setOpened: (opened: boolean) => void;
95
- targetRef: React.RefObject<View>;
95
+ targetRef: React.RefObject<View | null>;
96
96
  dropdownPosition: { top: number; left: number; width: number };
97
97
  setDropdownPosition: (pos: { top: number; left: number; width: number }) => void;
98
98
  }
@@ -123,7 +123,7 @@ const PopoverTarget: React.FC<PopoverTargetProps> = ({ children }) => {
123
123
  setOpened(true);
124
124
  };
125
125
 
126
- return React.cloneElement(children, {
126
+ return React.cloneElement(children as React.ReactElement<any>, {
127
127
  ref: targetRef,
128
128
  onPress: handlePress,
129
129
  });
@@ -148,15 +148,18 @@ const PopoverDropdown: React.FC<PopoverDropdownProps> = ({ children, style, ...o
148
148
  }
149
149
 
150
150
  return (
151
- <Portal>
151
+ <Modal
152
+ visible={opened}
153
+ transparent
154
+ animationType="none"
155
+ onRequestClose={() => setOpened(false)}
156
+ statusBarTranslucent
157
+ >
152
158
  <TouchableWithoutFeedback onPress={() => setOpened(false)}>
153
159
  <View
154
160
  style={{
155
- position: 'absolute',
156
- top: 0,
157
- left: 0,
158
- right: 0,
159
- bottom: 0,
161
+ flex: 1,
162
+ backgroundColor: 'transparent',
160
163
  }}
161
164
  >
162
165
  <Animated.View
@@ -175,7 +178,7 @@ const PopoverDropdown: React.FC<PopoverDropdownProps> = ({ children, style, ...o
175
178
  </Animated.View>
176
179
  </View>
177
180
  </TouchableWithoutFeedback>
178
- </Portal>
181
+ </Modal>
179
182
  );
180
183
  };
181
184
 
@@ -1,5 +1,5 @@
1
- import React, { forwardRef } from 'react';
2
- import { View } from 'react-native';
1
+ import React, { forwardRef, useEffect, useRef } from 'react';
2
+ import { View, Animated } from 'react-native';
3
3
  import { BoxView } from '../BoxView';
4
4
  import { Text } from '../Text';
5
5
  import type { DefaultProps, MantineColor } from '../../theme/types';
@@ -119,13 +119,41 @@ export const RingProgress = forwardRef<any, RingProgressProps>((props, ref) => {
119
119
  { name: 'RingProgress' }
120
120
  ) as any;
121
121
 
122
+ // Animation values for each section
123
+ const animatedValues = useRef(
124
+ sections.map(() => new Animated.Value(0))
125
+ ).current;
126
+
127
+ // Update animation values when sections change
128
+ useEffect(() => {
129
+ // Ensure we have the right number of animated values
130
+ while (animatedValues.length < sections.length) {
131
+ animatedValues.push(new Animated.Value(0));
132
+ }
133
+
134
+ // Animate each section
135
+ const animations = sections.map((section, index) => {
136
+ const animValue = animatedValues[index];
137
+ if (!animValue) return Animated.timing(new Animated.Value(0), { toValue: 0, duration: 0, useNativeDriver: false });
138
+
139
+ return Animated.timing(animValue, {
140
+ toValue: section.value,
141
+ duration: 1000,
142
+ useNativeDriver: false,
143
+ });
144
+ });
145
+
146
+ Animated.parallel(animations).start();
147
+ }, [sections, animatedValues]);
148
+
122
149
  // Calculate total value and normalize sections
123
- const normalizedSections = sections.map((section) => ({
150
+ const normalizedSections = sections.map((section, index) => ({
124
151
  ...section,
125
152
  percentage: (section.value / 100) * 100,
153
+ animatedValue: animatedValues[index] || new Animated.Value(0),
126
154
  }));
127
155
 
128
- // Render simplified ring using borders and transforms
156
+ // Render animated ring using borders and transforms
129
157
  // Note: This is a basic implementation. For full SVG support, use react-native-svg
130
158
  const renderSections = () => {
131
159
  let currentAngle = 0;
@@ -139,10 +167,21 @@ export const RingProgress = forwardRef<any, RingProgressProps>((props, ref) => {
139
167
  const rotation = currentAngle;
140
168
  currentAngle += angle;
141
169
 
142
- // Simplified representation - just show colored arcs
143
- // This is a placeholder implementation
170
+ // Animate the opacity for a smooth appearance
171
+ const animatedOpacity = section.animatedValue.interpolate({
172
+ inputRange: [0, section.value],
173
+ outputRange: [0, 1],
174
+ });
175
+
176
+ // Animated scale for smooth growth effect
177
+ const animatedScale = section.animatedValue.interpolate({
178
+ inputRange: [0, section.value],
179
+ outputRange: [0.8, 1],
180
+ });
181
+
182
+ // Simplified representation - just show colored arcs with animation
144
183
  return (
145
- <View
184
+ <Animated.View
146
185
  key={index}
147
186
  style={{
148
187
  position: 'absolute',
@@ -152,7 +191,11 @@ export const RingProgress = forwardRef<any, RingProgressProps>((props, ref) => {
152
191
  borderWidth: thickness,
153
192
  borderColor: 'transparent',
154
193
  borderTopColor: sectionColor,
155
- transform: [{ rotate: `${rotation}deg` }],
194
+ transform: [
195
+ { rotate: `${rotation}deg` },
196
+ { scale: animatedScale },
197
+ ],
198
+ opacity: animatedOpacity,
156
199
  }}
157
200
  />
158
201
  );
@@ -85,19 +85,20 @@ const useStyles = createStyles(
85
85
  flexDirection: orientation === 'horizontal' ? 'row' : 'column',
86
86
  backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[6] : theme.colors.gray?.[1],
87
87
  borderRadius: theme.fn.radius(radius),
88
- padding: rem(4) as any,
88
+ padding: rem(3) as any,
89
89
  opacity: disabled ? 0.5 : 1,
90
90
  ...(fullWidth && { width: '100%' }),
91
91
  },
92
92
  indicator: {
93
93
  position: 'absolute',
94
94
  backgroundColor: theme.white,
95
- borderRadius: theme.fn.radius(radius),
95
+ borderRadius: (theme.fn.radius(radius) as number) - rem(1),
96
96
  shadowColor: '#000',
97
97
  shadowOffset: { width: 0, height: 1 },
98
98
  shadowOpacity: 0.05,
99
99
  shadowRadius: 1,
100
100
  elevation: 1,
101
+ margin: rem(3) as any,
101
102
  ...(theme.colorScheme === 'dark' && {
102
103
  backgroundColor: theme.colors.dark?.[5],
103
104
  }),
@@ -105,11 +106,11 @@ const useStyles = createStyles(
105
106
  segment: {
106
107
  flex: 1,
107
108
  paddingHorizontal: sizeStyles.padding as any,
108
- paddingVertical: sizeStyles.padding as any,
109
+ paddingVertical: rem(6) as any,
109
110
  minHeight: sizeStyles.height as any,
110
111
  justifyContent: 'center',
111
112
  alignItems: 'center',
112
- borderRadius: theme.fn.radius(radius),
113
+ borderRadius: (theme.fn.radius(radius) as number) - rem(1),
113
114
  zIndex: 1,
114
115
  },
115
116
  label: {
@@ -181,6 +182,7 @@ export const SegmentedControl = forwardRef<any, SegmentedControlProps>((props, r
181
182
  useEffect(() => {
182
183
  if (segmentLayouts[activeIndex]) {
183
184
  const layout = segmentLayouts[activeIndex];
185
+ // No need to adjust for margin since indicator has its own margin
184
186
 
185
187
  Animated.parallel([
186
188
  Animated.timing(indicatorPosition, {
@@ -247,19 +247,28 @@ export const Slider = forwardRef<any, SliderProps>((props, ref) => {
247
247
  [trackWidth, min, max]
248
248
  );
249
249
 
250
+ const trackLayoutRef = useRef({ x: 0, y: 0, width: 0, height: 0 });
251
+
250
252
  const panResponder = useRef(
251
253
  PanResponder.create({
252
254
  onStartShouldSetPanResponder: () => !disabled!,
253
255
  onMoveShouldSetPanResponder: () => !disabled!,
254
- onPanResponderGrant: () => {
256
+ onPanResponderGrant: (evt: GestureResponderEvent) => {
255
257
  setShowLabel(true);
256
258
  Animated.spring(scale, {
257
259
  toValue: 1.2,
258
260
  useNativeDriver: true,
259
261
  }).start();
262
+
263
+ // Handle tap to move slider
264
+ const locationX = evt.nativeEvent.locationX;
265
+ const newValue = getValueFromPosition(locationX);
266
+ updateValue(newValue);
260
267
  },
261
268
  onPanResponderMove: (_evt: GestureResponderEvent, gestureState: PanResponderGestureState) => {
262
- const newValue = getValueFromPosition(gestureState.moveX);
269
+ // Calculate position relative to track start
270
+ const relativeX = gestureState.moveX - trackLayoutRef.current.x;
271
+ const newValue = getValueFromPosition(relativeX);
263
272
  updateValue(newValue);
264
273
  },
265
274
  onPanResponderRelease: () => {
@@ -274,7 +283,9 @@ export const Slider = forwardRef<any, SliderProps>((props, ref) => {
274
283
  ).current;
275
284
 
276
285
  const handleLayout = (event: LayoutChangeEvent) => {
277
- setTrackWidth(event.nativeEvent.layout.width);
286
+ const { x, y, width, height } = event.nativeEvent.layout;
287
+ setTrackWidth(width);
288
+ trackLayoutRef.current = { x, y, width, height };
278
289
  };
279
290
 
280
291
  const percentage = ((value - min!) / (max! - min!)) * 100;
@@ -252,10 +252,11 @@ export const Stepper = forwardRef<any, StepperProps>((props, ref) => {
252
252
 
253
253
  const childrenArray = React.Children.toArray(children);
254
254
  const steps = childrenArray.filter(
255
- (child) => React.isValidElement(child) && (child as any).type === Step
255
+ (child): child is React.ReactElement<StepProps & { __stepIndex?: number; __isLast?: boolean }> =>
256
+ React.isValidElement(child) && (child.type as any) === Step
256
257
  );
257
258
  const completedStep = childrenArray.find(
258
- (child) => React.isValidElement(child) && (child as any).type === StepperCompleted
259
+ (child) => React.isValidElement(child) && (child.type as any) === StepperCompleted
259
260
  );
260
261
 
261
262
  const isStepsCompleted = active >= steps.length;
@@ -275,7 +276,7 @@ export const Stepper = forwardRef<any, StepperProps>((props, ref) => {
275
276
  <BoxView ref={ref} style={sx(styles.root, style)} {...others}>
276
277
  <BoxView style={styles.steps}>
277
278
  {steps.map((step, index) => {
278
- return React.cloneElement(step as React.ReactElement, {
279
+ return React.cloneElement<StepProps & { __stepIndex?: number; __isLast?: boolean }>(step, {
279
280
  key: index,
280
281
  __stepIndex: index,
281
282
  __isLast: index === steps.length - 1,
@@ -286,7 +287,7 @@ export const Stepper = forwardRef<any, StepperProps>((props, ref) => {
286
287
  <BoxView style={styles.content}>
287
288
  {isStepsCompleted
288
289
  ? completedStep
289
- : steps[active] && (steps[active] as React.ReactElement).props.children}
290
+ : steps[active] && steps[active].props.children}
290
291
  </BoxView>
291
292
  </BoxView>
292
293
  </StepperContext.Provider>
@@ -0,0 +1,85 @@
1
+ import { View } from 'react-native';
2
+ import { Table } from './index';
3
+
4
+ /**
5
+ * Example demonstrating the fixed Table component with proper column alignment.
6
+ *
7
+ * The fix addresses the following issues:
8
+ * 1. Removed flex: 1 from cells which caused equal spacing regardless of content
9
+ * 2. Implemented automatic column width calculation using onLayout callbacks
10
+ * 3. Each column now uses the maximum width of all cells in that column
11
+ * 4. Columns align properly across all rows (thead, tbody, tfoot)
12
+ */
13
+
14
+ const elements = [
15
+ { position: 6, mass: 12.011, symbol: 'C', name: 'Carbon' },
16
+ { position: 7, mass: 14.007, symbol: 'N', name: 'Nitrogen' },
17
+ { position: 39, mass: 88.906, symbol: 'Y', name: 'Yttrium' },
18
+ { position: 56, mass: 137.33, symbol: 'Ba', name: 'Barium' },
19
+ { position: 58, mass: 140.12, symbol: 'Ce', name: 'Cerium' },
20
+ ];
21
+
22
+ export function TableExample() {
23
+ return (
24
+ <View style={{ padding: 40 }}>
25
+ <Table
26
+ verticalSpacing="md"
27
+ horizontalSpacing="md"
28
+ fontSize="sm"
29
+ striped
30
+ withBorder
31
+ withColumnBorders
32
+ >
33
+ <Table.Thead>
34
+ <Table.Tr>
35
+ <Table.Th>Element position</Table.Th>
36
+ <Table.Th>Element name</Table.Th>
37
+ <Table.Th>Symbol</Table.Th>
38
+ <Table.Th>Atomic mass</Table.Th>
39
+ </Table.Tr>
40
+ </Table.Thead>
41
+ <Table.Tbody>
42
+ {elements.map((element) => (
43
+ <Table.Tr key={element.name}>
44
+ <Table.Td>{element.position}</Table.Td>
45
+ <Table.Td>{element.name}</Table.Td>
46
+ <Table.Td>{element.symbol}</Table.Td>
47
+ <Table.Td>{element.mass}</Table.Td>
48
+ </Table.Tr>
49
+ ))}
50
+ </Table.Tbody>
51
+ </Table>
52
+ </View>
53
+ );
54
+ }
55
+
56
+ export function TableWithVariableContent() {
57
+ return (
58
+ <View style={{ padding: 40 }}>
59
+ <Table withBorder withColumnBorders>
60
+ <Table.Thead>
61
+ <Table.Tr>
62
+ <Table.Th>Short</Table.Th>
63
+ <Table.Th>Medium length header</Table.Th>
64
+ <Table.Th>Very long header text that spans multiple words</Table.Th>
65
+ <Table.Th>ID</Table.Th>
66
+ </Table.Tr>
67
+ </Table.Thead>
68
+ <Table.Tbody>
69
+ <Table.Tr>
70
+ <Table.Td>A</Table.Td>
71
+ <Table.Td>Medium content here</Table.Td>
72
+ <Table.Td>Short</Table.Td>
73
+ <Table.Td>1</Table.Td>
74
+ </Table.Tr>
75
+ <Table.Tr>
76
+ <Table.Td>B</Table.Td>
77
+ <Table.Td>Short</Table.Td>
78
+ <Table.Td>This is a very long content that should make the column wider</Table.Td>
79
+ <Table.Td>2</Table.Td>
80
+ </Table.Tr>
81
+ </Table.Tbody>
82
+ </Table>
83
+ </View>
84
+ );
85
+ }