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
@@ -1,11 +1,13 @@
1
- import React, { forwardRef, createContext, useContext } from 'react';
1
+ import React, { forwardRef, createContext, useContext, useState, useCallback } from 'react';
2
2
  import { ScrollView } from 'react-native';
3
+ import type { LayoutChangeEvent } from 'react-native';
3
4
  import { BoxView } from '../BoxView';
4
5
  import { Text } from '../Text';
5
6
  import type { DefaultProps, SpacingValue } from '../../theme/types';
6
7
  import { useComponentDefaultProps } from '../../theme/theme-provider';
7
8
  import { createStyles } from '../../theme';
8
9
  import { rem } from '../../theme/utils/rem';
10
+ import { withTextWrapper, type WithTextWrapperProps } from '../../theme/utils/withTextWrapper';
9
11
 
10
12
  interface TableContextValue {
11
13
  striped: boolean;
@@ -15,6 +17,8 @@ interface TableContextValue {
15
17
  fontSize: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
16
18
  verticalSpacing: SpacingValue;
17
19
  horizontalSpacing: SpacingValue;
20
+ columnWidths: number[];
21
+ onCellLayout: (columnIndex: number, width: number) => void;
18
22
  }
19
23
 
20
24
  const TableContext = createContext<TableContextValue | null>(null);
@@ -94,20 +98,26 @@ export interface TableTrProps extends DefaultProps {
94
98
  __index?: number;
95
99
  }
96
100
 
97
- export interface TableThProps extends DefaultProps {
101
+ export interface TableThProps extends DefaultProps, WithTextWrapperProps {
98
102
  /** Th children */
99
103
  children?: React.ReactNode;
100
104
 
101
105
  /** Additional styles */
102
106
  style?: any;
107
+
108
+ /** Internal column index */
109
+ __columnIndex?: number;
103
110
  }
104
111
 
105
- export interface TableTdProps extends DefaultProps {
112
+ export interface TableTdProps extends DefaultProps, WithTextWrapperProps {
106
113
  /** Td children */
107
114
  children?: React.ReactNode;
108
115
 
109
116
  /** Additional styles */
110
117
  style?: any;
118
+
119
+ /** Internal column index */
120
+ __columnIndex?: number;
111
121
  }
112
122
 
113
123
  const fontSizes = {
@@ -130,19 +140,25 @@ const useTableStyles = createStyles(
130
140
  }
131
141
  ) => ({
132
142
  wrapper: {
133
- flex: 1,
143
+ // No flex: 1 here to avoid constraining the table
134
144
  },
135
145
  root: {
136
146
  width: '100%',
137
147
  borderCollapse: 'collapse' as any,
138
148
  ...(withBorder && {
139
149
  borderWidth: 1,
140
- borderColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3],
150
+ borderColor:
151
+ theme.colorScheme === 'dark'
152
+ ? theme.colors.dark?.[4]
153
+ : theme.colors.gray?.[3],
141
154
  }),
142
155
  },
143
156
  caption: {
144
157
  fontSize: theme.fontSizes.sm as number,
145
- color: theme.colorScheme === 'dark' ? theme.colors.dark?.[2] : theme.colors.gray?.[6],
158
+ color:
159
+ theme.colorScheme === 'dark'
160
+ ? theme.colors.dark?.[2]
161
+ : theme.colors.gray?.[6],
146
162
  paddingVertical: theme.spacing.xs,
147
163
  textAlign: 'center',
148
164
  ...(captionSide === 'bottom' && { order: 1 }),
@@ -153,7 +169,10 @@ const useTableStyles = createStyles(
153
169
  const useTableHeadStyles = createStyles((theme) => ({
154
170
  thead: {
155
171
  borderBottomWidth: 1,
156
- borderBottomColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3],
172
+ borderBottomColor:
173
+ theme.colorScheme === 'dark'
174
+ ? theme.colors.dark?.[4]
175
+ : theme.colors.gray?.[3],
157
176
  },
158
177
  }));
159
178
 
@@ -170,12 +189,18 @@ const useTableRowStyles = createStyles(
170
189
  }
171
190
  ) => ({
172
191
  tr: {
192
+ flexDirection: 'row',
173
193
  borderBottomWidth: 1,
174
- borderBottomColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3],
194
+ borderBottomColor:
195
+ theme.colorScheme === 'dark'
196
+ ? theme.colors.dark?.[4]
197
+ : theme.colors.gray?.[3],
175
198
  ...(striped &&
176
199
  isEven && {
177
200
  backgroundColor:
178
- theme.colorScheme === 'dark' ? theme.colors.dark?.[6] : theme.colors.gray?.[0],
201
+ theme.colorScheme === 'dark'
202
+ ? theme.colors.dark?.[6]
203
+ : theme.colors.gray?.[0],
179
204
  }),
180
205
  },
181
206
  })
@@ -190,12 +215,14 @@ const useTableCellStyles = createStyles(
190
215
  horizontalSpacing,
191
216
  withColumnBorders,
192
217
  isHeader,
218
+ width,
193
219
  }: {
194
220
  fontSize: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
195
221
  verticalSpacing: SpacingValue;
196
222
  horizontalSpacing: SpacingValue;
197
223
  withColumnBorders: boolean;
198
224
  isHeader: boolean;
225
+ width?: number;
199
226
  }
200
227
  ) => {
201
228
  const getVerticalPadding = () => {
@@ -210,6 +237,9 @@ const useTableCellStyles = createStyles(
210
237
 
211
238
  return {
212
239
  cell: {
240
+ // Remove flex: 1 to prevent equal spacing
241
+ // Use explicit width when available for column alignment
242
+ ...(width && { width }),
213
243
  paddingVertical: getVerticalPadding() as any,
214
244
  paddingHorizontal: getHorizontalPadding() as any,
215
245
  fontSize: fontSizes[fontSize],
@@ -218,7 +248,9 @@ const useTableCellStyles = createStyles(
218
248
  ...(withColumnBorders && {
219
249
  borderRightWidth: 1,
220
250
  borderRightColor:
221
- theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3],
251
+ theme.colorScheme === 'dark'
252
+ ? theme.colors.dark?.[4]
253
+ : theme.colors.gray?.[3],
222
254
  }),
223
255
  ...(isHeader && {
224
256
  fontWeight: '600',
@@ -239,7 +271,7 @@ const defaultProps: Partial<TableProps> = {
239
271
  captionSide: 'top',
240
272
  };
241
273
 
242
- export const Table = forwardRef<any, TableProps>((props, ref) => {
274
+ const Table = forwardRef<any, TableProps>((props, ref) => {
243
275
  const {
244
276
  children,
245
277
  horizontalSpacing,
@@ -255,11 +287,25 @@ export const Table = forwardRef<any, TableProps>((props, ref) => {
255
287
  ...others
256
288
  } = useComponentDefaultProps('Table', defaultProps, props);
257
289
 
258
- const { styles, sx} = useTableStyles(
290
+ const { styles, sx } = useTableStyles(
259
291
  { withBorder, captionSide },
260
292
  { name: 'Table' }
261
293
  ) as any;
262
294
 
295
+ // Track column widths to ensure alignment across rows
296
+ const [columnWidths, setColumnWidths] = useState<number[]>([]);
297
+
298
+ const onCellLayout = useCallback((columnIndex: number, width: number) => {
299
+ setColumnWidths((prevWidths) => {
300
+ const newWidths = [...prevWidths];
301
+ // Store the maximum width for each column to ensure all cells in that column have the same width
302
+ if (!newWidths[columnIndex] || width > newWidths[columnIndex]) {
303
+ newWidths[columnIndex] = width;
304
+ }
305
+ return newWidths;
306
+ });
307
+ }, []);
308
+
263
309
  return (
264
310
  <TableContext.Provider
265
311
  value={{
@@ -270,9 +316,15 @@ export const Table = forwardRef<any, TableProps>((props, ref) => {
270
316
  fontSize: fontSize!,
271
317
  verticalSpacing: verticalSpacing!,
272
318
  horizontalSpacing: horizontalSpacing!,
319
+ columnWidths,
320
+ onCellLayout,
273
321
  }}
274
322
  >
275
- <ScrollView horizontal style={styles.wrapper} showsHorizontalScrollIndicator>
323
+ <ScrollView
324
+ horizontal
325
+ style={styles.wrapper}
326
+ showsHorizontalScrollIndicator
327
+ >
276
328
  <BoxView ref={ref} style={sx(styles.root, style)} {...others}>
277
329
  {caption && <Text style={styles.caption}>{caption}</Text>}
278
330
  {children}
@@ -282,9 +334,9 @@ export const Table = forwardRef<any, TableProps>((props, ref) => {
282
334
  );
283
335
  });
284
336
 
285
- export const Thead = forwardRef<any, TableTheadProps>((props, ref) => {
286
- const { children, style, ...others} = props;
287
- const { styles, sx} = useTableHeadStyles({}, { name: 'Thead' }) as any;
337
+ const Thead = forwardRef<any, TableTheadProps>((props, ref) => {
338
+ const { children, style, ...others } = props;
339
+ const { styles, sx } = useTableHeadStyles({}, { name: 'Thead' }) as any;
288
340
 
289
341
  return (
290
342
  <BoxView ref={ref} style={sx(styles.thead, style)} {...others}>
@@ -293,7 +345,7 @@ export const Thead = forwardRef<any, TableTheadProps>((props, ref) => {
293
345
  );
294
346
  });
295
347
 
296
- export const Tbody = forwardRef<any, TableTbodyProps>((props, ref) => {
348
+ const Tbody = forwardRef<any, TableTbodyProps>((props, ref) => {
297
349
  const { children, style, ...others } = props;
298
350
 
299
351
  const childrenArray = React.Children.toArray(children);
@@ -302,16 +354,19 @@ export const Tbody = forwardRef<any, TableTbodyProps>((props, ref) => {
302
354
  <BoxView ref={ref} style={style} {...others}>
303
355
  {childrenArray.map((child, index) => {
304
356
  if (!React.isValidElement(child)) return child;
305
- return React.cloneElement(child as React.ReactElement, {
306
- key: index,
307
- __index: index,
308
- });
357
+ return React.cloneElement<TableTrProps>(
358
+ child as React.ReactElement<TableTrProps>,
359
+ {
360
+ key: index,
361
+ __index: index,
362
+ }
363
+ );
309
364
  })}
310
365
  </BoxView>
311
366
  );
312
367
  });
313
368
 
314
- export const Tfoot = forwardRef<any, TableTfootProps>((props, ref) => {
369
+ const Tfoot = forwardRef<any, TableTfootProps>((props, ref) => {
315
370
  const { children, style, ...others } = props;
316
371
 
317
372
  return (
@@ -321,11 +376,11 @@ export const Tfoot = forwardRef<any, TableTfootProps>((props, ref) => {
321
376
  );
322
377
  });
323
378
 
324
- export const Tr = forwardRef<any, TableTrProps>((props, ref) => {
325
- const { children, style, __index, ...others} = props;
379
+ const Tr = forwardRef<any, TableTrProps>((props, ref) => {
380
+ const { children, style, __index, ...others } = props;
326
381
  const context = useTableContext();
327
382
 
328
- const { styles, sx} = useTableRowStyles(
383
+ const { styles, sx } = useTableRowStyles(
329
384
  {
330
385
  striped: context?.striped ?? false,
331
386
  highlightOnHover: context?.highlightOnHover ?? false,
@@ -334,53 +389,103 @@ export const Tr = forwardRef<any, TableTrProps>((props, ref) => {
334
389
  { name: 'Tr' }
335
390
  ) as any;
336
391
 
392
+ // Add column indices to children (Th and Td components)
393
+ const childrenArray = React.Children.toArray(children);
394
+ const childrenWithColumnIndex = childrenArray.map((child, index) => {
395
+ if (!React.isValidElement(child)) return child;
396
+ return React.cloneElement<TableThProps | TableTdProps>(
397
+ child as React.ReactElement<TableThProps | TableTdProps>,
398
+ {
399
+ __columnIndex: index,
400
+ }
401
+ );
402
+ });
403
+
337
404
  return (
338
405
  <BoxView ref={ref} style={sx(styles.tr, style)} {...others}>
339
- {children}
406
+ {childrenWithColumnIndex}
340
407
  </BoxView>
341
408
  );
342
409
  });
343
410
 
344
- export const Th = forwardRef<any, TableThProps>((props, ref) => {
345
- const { children, style, ...others} = props;
411
+ const Th = forwardRef<any, TableThProps>((props, ref) => {
412
+ const { children, style, withTextWrapper: shouldWrapInText = true, __columnIndex, ...others } = props;
346
413
  const context = useTableContext();
347
414
 
348
- const { styles, sx} = useTableCellStyles(
415
+ const columnIndex = __columnIndex ?? 0;
416
+ const columnWidth = context?.columnWidths?.[columnIndex];
417
+
418
+ const { styles, sx } = useTableCellStyles(
349
419
  {
350
420
  fontSize: context?.fontSize ?? 'sm',
351
421
  verticalSpacing: context?.verticalSpacing ?? 'xs',
352
422
  horizontalSpacing: context?.horizontalSpacing ?? 'xs',
353
423
  withColumnBorders: context?.withColumnBorders ?? false,
354
424
  isHeader: true,
425
+ width: columnWidth,
355
426
  },
356
427
  { name: 'Th' }
357
428
  ) as any;
358
429
 
430
+ const handleLayout = useCallback(
431
+ (event: LayoutChangeEvent) => {
432
+ const { width } = event.nativeEvent.layout;
433
+ if (context?.onCellLayout && width > 0) {
434
+ context.onCellLayout(columnIndex, width);
435
+ }
436
+ },
437
+ [context, columnIndex]
438
+ );
439
+
359
440
  return (
360
- <BoxView ref={ref} style={sx(styles.cell, style)} {...others}>
361
- {typeof children === 'string' ? <Text style={styles.cell}>{children}</Text> : children}
441
+ <BoxView
442
+ ref={ref}
443
+ style={sx(styles.cell, style)}
444
+ onLayout={handleLayout}
445
+ {...others}
446
+ >
447
+ {withTextWrapper(children, shouldWrapInText, styles.cell)}
362
448
  </BoxView>
363
449
  );
364
450
  });
365
451
 
366
- export const Td = forwardRef<any, TableTdProps>((props, ref) => {
367
- const { children, style, ...others} = props;
452
+ const Td = forwardRef<any, TableTdProps>((props, ref) => {
453
+ const { children, style, withTextWrapper: shouldWrapInText = true, __columnIndex, ...others } = props;
368
454
  const context = useTableContext();
369
455
 
370
- const { styles, sx} = useTableCellStyles(
456
+ const columnIndex = __columnIndex ?? 0;
457
+ const columnWidth = context?.columnWidths?.[columnIndex];
458
+
459
+ const { styles, sx } = useTableCellStyles(
371
460
  {
372
461
  fontSize: context?.fontSize ?? 'sm',
373
462
  verticalSpacing: context?.verticalSpacing ?? 'xs',
374
463
  horizontalSpacing: context?.horizontalSpacing ?? 'xs',
375
464
  withColumnBorders: context?.withColumnBorders ?? false,
376
465
  isHeader: false,
466
+ width: columnWidth,
377
467
  },
378
468
  { name: 'Td' }
379
469
  ) as any;
380
470
 
471
+ const handleLayout = useCallback(
472
+ (event: LayoutChangeEvent) => {
473
+ const { width } = event.nativeEvent.layout;
474
+ if (context?.onCellLayout && width > 0) {
475
+ context.onCellLayout(columnIndex, width);
476
+ }
477
+ },
478
+ [context, columnIndex]
479
+ );
480
+
381
481
  return (
382
- <BoxView ref={ref} style={sx(styles.cell, style)} {...others}>
383
- {typeof children === 'string' ? <Text style={styles.cell}>{children}</Text> : children}
482
+ <BoxView
483
+ ref={ref}
484
+ style={sx(styles.cell, style)}
485
+ onLayout={handleLayout}
486
+ {...others}
487
+ >
488
+ {withTextWrapper(children, shouldWrapInText, styles.cell)}
384
489
  </BoxView>
385
490
  );
386
491
  });
@@ -393,10 +498,24 @@ Tr.displayName = 'Table.Tr';
393
498
  Th.displayName = 'Table.Th';
394
499
  Td.displayName = 'Table.Td';
395
500
 
396
- // Attach sub-components
397
- (Table as any).Thead = Thead;
398
- (Table as any).Tbody = Tbody;
399
- (Table as any).Tfoot = Tfoot;
400
- (Table as any).Tr = Tr;
401
- (Table as any).Th = Th;
402
- (Table as any).Td = Td;
501
+ // Attach sub-components with proper typing
502
+ interface TableComponent extends React.ForwardRefExoticComponent<
503
+ TableProps & React.RefAttributes<any>
504
+ > {
505
+ Thead: typeof Thead;
506
+ Tbody: typeof Tbody;
507
+ Tfoot: typeof Tfoot;
508
+ Tr: typeof Tr;
509
+ Th: typeof Th;
510
+ Td: typeof Td;
511
+ }
512
+
513
+ const TableWithSubComponents = Table as TableComponent;
514
+ TableWithSubComponents.Thead = Thead;
515
+ TableWithSubComponents.Tbody = Tbody;
516
+ TableWithSubComponents.Tfoot = Tfoot;
517
+ TableWithSubComponents.Tr = Tr;
518
+ TableWithSubComponents.Th = Th;
519
+ TableWithSubComponents.Td = Td;
520
+
521
+ export { TableWithSubComponents as Table };
@@ -1,5 +1,8 @@
1
1
  import React, { forwardRef } from 'react';
2
- import { TextInput as RNTextInput, type TextInputProps as RNTextInputProps } from 'react-native';
2
+ import {
3
+ TextInput as RNTextInput,
4
+ type TextInputProps as RNTextInputProps,
5
+ } from 'react-native';
3
6
  import { BoxView } from '../BoxView';
4
7
  import { Text } from '../Text';
5
8
  import type {
@@ -12,7 +15,8 @@ import { createStyles, getSize } from '../../theme';
12
15
  import { rem } from '../../theme/utils/rem';
13
16
  import { INPUT_SIZES } from '../Input';
14
17
 
15
- export interface TextInputProps extends DefaultProps, Omit<RNTextInputProps, 'style'> {
18
+ export interface TextInputProps
19
+ extends DefaultProps, Omit<RNTextInputProps, 'style'> {
16
20
  /** Input label */
17
21
  label?: React.ReactNode;
18
22
 
@@ -71,7 +75,10 @@ const useStyles = createStyles(
71
75
  const getVariantStyles = () => {
72
76
  if (variant === 'filled') {
73
77
  return {
74
- backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[5] : (theme.colors.gray || [])[1],
78
+ backgroundColor:
79
+ theme.colorScheme === 'dark'
80
+ ? (theme.colors.dark || [])[5]
81
+ : (theme.colors.gray || [])[1],
75
82
  borderWidth: 1,
76
83
  borderColor: 'transparent',
77
84
  };
@@ -87,13 +94,20 @@ const useStyles = createStyles(
87
94
 
88
95
  // default variant
89
96
  return {
90
- backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[6] : theme.white,
97
+ backgroundColor:
98
+ theme.colorScheme === 'dark'
99
+ ? (theme.colors.dark || [])[6]
100
+ : theme.white,
91
101
  borderWidth: 1,
92
- borderColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[4] : (theme.colors.gray || [])[4],
102
+ borderColor:
103
+ theme.colorScheme === 'dark'
104
+ ? (theme.colors.dark || [])[4]
105
+ : (theme.colors.gray || [])[4],
93
106
  };
94
107
  };
95
108
 
96
- const sizeValue = INPUT_SIZES[size as keyof typeof INPUT_SIZES] || INPUT_SIZES.md;
109
+ const sizeValue =
110
+ INPUT_SIZES[size as keyof typeof INPUT_SIZES] || INPUT_SIZES.md;
97
111
 
98
112
  return {
99
113
  wrapper: {
@@ -102,7 +116,10 @@ const useStyles = createStyles(
102
116
  label: {
103
117
  fontSize: theme.fontSizes.sm as number,
104
118
  fontWeight: '500',
105
- color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] : theme.black,
119
+ color:
120
+ theme.colorScheme === 'dark'
121
+ ? (theme.colors.dark || [])[0]
122
+ : theme.black,
106
123
  marginBottom: theme.spacing.xs / 2,
107
124
  },
108
125
  required: {
@@ -110,7 +127,10 @@ const useStyles = createStyles(
110
127
  },
111
128
  description: {
112
129
  fontSize: theme.fontSizes.xs as number,
113
- color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[2] : (theme.colors.gray || [])[6],
130
+ color:
131
+ theme.colorScheme === 'dark'
132
+ ? (theme.colors.dark || [])[2]
133
+ : (theme.colors.gray || [])[6],
114
134
  marginTop: theme.spacing.xs / 2,
115
135
  marginBottom: theme.spacing.xs / 2,
116
136
  },
@@ -123,23 +143,30 @@ const useStyles = createStyles(
123
143
  position: 'relative',
124
144
  },
125
145
  input: {
126
- ...theme.fn.fontStyles(),
127
146
  height: sizeValue as any,
128
147
  fontSize: getSize({ size, sizes: theme.fontSizes }) as any,
129
148
  paddingHorizontal: (variant === 'unstyled' ? 0 : rem(12)) as any,
130
- paddingLeft: (withIcon ? sizeValue : variant === 'unstyled' ? 0 : rem(12)) as any,
149
+ paddingLeft: (withIcon
150
+ ? sizeValue
151
+ : variant === 'unstyled'
152
+ ? 0
153
+ : rem(12)) as any,
131
154
  paddingRight: (withRightSection
132
155
  ? rem(rightSectionWidth || sizeValue)
133
156
  : variant === 'unstyled'
134
- ? 0
135
- : rem(12)) as any,
157
+ ? 0
158
+ : rem(12)) as any,
136
159
  borderRadius: theme.fn.radius(radius),
137
- color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] : theme.black,
160
+ color:
161
+ theme.colorScheme === 'dark'
162
+ ? (theme.colors.dark || [])[0]
163
+ : theme.black,
138
164
  ...getVariantStyles(),
139
165
  ...(invalid && {
140
166
  borderColor: (theme.colors.red || [])[6],
141
167
  color: (theme.colors.red || [])[6],
142
168
  }),
169
+ fontFamily: theme.fontFamilyInput,
143
170
  },
144
171
  icon: {
145
172
  position: 'absolute',
@@ -171,62 +198,62 @@ const defaultProps: Partial<TextInputProps> = {
171
198
  required: false,
172
199
  };
173
200
 
174
- export const TextInput = forwardRef<RNTextInput, TextInputProps>((props, ref) => {
175
- const {
176
- label,
177
- description,
178
- error,
179
- size,
180
- radius,
181
- icon,
182
- rightSection,
183
- rightSectionWidth,
184
- required,
185
- variant,
186
- style,
187
- wrapperStyle,
188
- ...others
189
- } = useComponentDefaultProps('TextInput', defaultProps, props);
190
-
191
- const { styles, sx} = useStyles(
192
- {
201
+ export const TextInput = forwardRef<RNTextInput, TextInputProps>(
202
+ (props, ref) => {
203
+ const {
204
+ label,
205
+ description,
206
+ error,
207
+ size,
193
208
  radius,
194
- invalid: !!error,
195
- withIcon: !!icon,
196
- withRightSection: !!rightSection,
209
+ icon,
210
+ rightSection,
197
211
  rightSectionWidth,
198
- },
199
- { name: 'TextInput', variant, size }
200
- ) as any;
201
-
202
- return (
203
- <BoxView style={sx(styles.wrapper, wrapperStyle)}>
204
- {label && (
205
- <Text style={styles.label}>
206
- {label}
207
- {required && <Text style={styles.required}> *</Text>}
208
- </Text>
209
- )}
210
-
211
- {description && <Text style={styles.description}>{description}</Text>}
212
-
213
- <BoxView style={styles.inputWrapper}>
214
- {icon && <BoxView style={styles.icon}>{icon}</BoxView>}
215
-
216
- <RNTextInput
217
- ref={ref}
218
- style={sx(styles.input, style)}
219
- {...others}
220
- />
221
-
222
- {rightSection && (
223
- <BoxView style={styles.rightSectionContainer}>{rightSection}</BoxView>
212
+ required,
213
+ variant,
214
+ style,
215
+ wrapperStyle,
216
+ ...others
217
+ } = useComponentDefaultProps('TextInput', defaultProps, props);
218
+
219
+ const { styles, sx } = useStyles(
220
+ {
221
+ radius,
222
+ invalid: !!error,
223
+ withIcon: !!icon,
224
+ withRightSection: !!rightSection,
225
+ rightSectionWidth,
226
+ },
227
+ { name: 'TextInput', variant, size }
228
+ ) as any;
229
+
230
+ return (
231
+ <BoxView style={sx(styles.wrapper, wrapperStyle)}>
232
+ {label && (
233
+ <Text style={styles.label}>
234
+ {label}
235
+ {required && <Text style={styles.required}> *</Text>}
236
+ </Text>
224
237
  )}
225
- </BoxView>
226
238
 
227
- {error && <Text style={styles.error}>{error}</Text>}
228
- </BoxView>
229
- );
230
- });
239
+ {description && <Text style={styles.description}>{description}</Text>}
240
+
241
+ <BoxView style={styles.inputWrapper}>
242
+ {icon && <BoxView style={styles.icon}>{icon}</BoxView>}
243
+
244
+ <RNTextInput ref={ref} style={sx(styles.input, style)} {...others} />
245
+
246
+ {rightSection && (
247
+ <BoxView style={styles.rightSectionContainer}>
248
+ {rightSection}
249
+ </BoxView>
250
+ )}
251
+ </BoxView>
252
+
253
+ {error && <Text style={styles.error}>{error}</Text>}
254
+ </BoxView>
255
+ );
256
+ }
257
+ );
231
258
 
232
259
  TextInput.displayName = 'TextInput';
@@ -244,12 +244,15 @@ const TimelineRoot = forwardRef<any, TimelineProps>((props, ref) => {
244
244
  ? index >= itemsCount - (active! + 1)
245
245
  : index <= active!;
246
246
 
247
- return React.cloneElement(child as React.ReactElement, {
248
- key: index,
249
- __index: index,
250
- __isLast: index === itemsCount - 1,
251
- __isActive: isActive,
252
- });
247
+ return React.cloneElement<TimelineItemProps & { __isActive?: boolean }>(
248
+ child as React.ReactElement<TimelineItemProps & { __isActive?: boolean }>,
249
+ {
250
+ key: index,
251
+ __index: index,
252
+ __isLast: index === itemsCount - 1,
253
+ __isActive: isActive,
254
+ }
255
+ );
253
256
  })}
254
257
  </BoxView>
255
258
  </TimelineContext.Provider>
@@ -304,14 +307,18 @@ export const TimelineItem = forwardRef<
304
307
 
305
308
  <BoxView style={styles.itemBody}>
306
309
  {title && (
307
- <Text style={styles.title}>
308
- {typeof title === 'string' ? title : title}
309
- </Text>
310
+ typeof title === 'string' ? (
311
+ <Text style={styles.title}>{title}</Text>
312
+ ) : (
313
+ <BoxView style={{ marginBottom: rem(4) }}>{title}</BoxView>
314
+ )
310
315
  )}
311
316
  {children && (
312
- <Text style={styles.content}>
313
- {typeof children === 'string' ? children : children}
314
- </Text>
317
+ typeof children === 'string' ? (
318
+ <Text style={styles.content}>{children}</Text>
319
+ ) : (
320
+ <BoxView>{children}</BoxView>
321
+ )
315
322
  )}
316
323
  </BoxView>
317
324
  </BoxView>