react-native-mantine 0.14.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (489) hide show
  1. package/README.md +70 -232
  2. package/lib/commonjs/components/ActionIcon/ActionIcon.js +1 -1
  3. package/lib/commonjs/components/ActionIcon/ActionIcon.js.map +1 -1
  4. package/lib/commonjs/components/Anchor/index.js +3 -4
  5. package/lib/commonjs/components/Anchor/index.js.map +1 -1
  6. package/lib/commonjs/components/Avatar/index.js +1 -2
  7. package/lib/commonjs/components/Avatar/index.js.map +1 -1
  8. package/lib/commonjs/components/Badge/index.js +54 -24
  9. package/lib/commonjs/components/Badge/index.js.map +1 -1
  10. package/lib/commonjs/components/Blockquote/index.js +4 -5
  11. package/lib/commonjs/components/Blockquote/index.js.map +1 -1
  12. package/lib/commonjs/components/Button/index.js +7 -1
  13. package/lib/commonjs/components/Button/index.js.map +1 -1
  14. package/lib/commonjs/components/Center/index.js.map +1 -1
  15. package/lib/commonjs/components/Checkbox/index.js +4 -5
  16. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  17. package/lib/commonjs/components/Chip/index.js +40 -21
  18. package/lib/commonjs/components/Chip/index.js.map +1 -1
  19. package/lib/commonjs/components/Code/index.js +6 -4
  20. package/lib/commonjs/components/Code/index.js.map +1 -1
  21. package/lib/commonjs/components/Grid/index.js +18 -13
  22. package/lib/commonjs/components/Grid/index.js.map +1 -1
  23. package/lib/commonjs/components/Highlight/index.js +1 -1
  24. package/lib/commonjs/components/Highlight/index.js.map +1 -1
  25. package/lib/commonjs/components/Indicator/index.js +2 -3
  26. package/lib/commonjs/components/Indicator/index.js.map +1 -1
  27. package/lib/commonjs/components/Menu/index.js +4 -5
  28. package/lib/commonjs/components/Menu/index.js.map +1 -1
  29. package/lib/commonjs/components/MultiSelect/index.js +8 -9
  30. package/lib/commonjs/components/MultiSelect/index.js.map +1 -1
  31. package/lib/commonjs/components/NativeSelect/index.js +14 -14
  32. package/lib/commonjs/components/NativeSelect/index.js.map +1 -1
  33. package/lib/commonjs/components/NavLink/index.js +43 -20
  34. package/lib/commonjs/components/NavLink/index.js.map +1 -1
  35. package/lib/commonjs/components/Notification/index.js +5 -6
  36. package/lib/commonjs/components/Notification/index.js.map +1 -1
  37. package/lib/commonjs/components/Pagination/index.js +5 -6
  38. package/lib/commonjs/components/Pagination/index.js.map +1 -1
  39. package/lib/commonjs/components/PinInput/index.js +3 -3
  40. package/lib/commonjs/components/PinInput/index.js.map +1 -1
  41. package/lib/commonjs/components/Progress/index.js +3 -5
  42. package/lib/commonjs/components/Progress/index.js.map +1 -1
  43. package/lib/commonjs/components/Radio/index.js +4 -5
  44. package/lib/commonjs/components/Radio/index.js.map +1 -1
  45. package/lib/commonjs/components/Rating/index.js +2 -4
  46. package/lib/commonjs/components/Rating/index.js.map +1 -1
  47. package/lib/commonjs/components/RingProgress/index.js +79 -57
  48. package/lib/commonjs/components/RingProgress/index.js.map +1 -1
  49. package/lib/commonjs/components/Select/index.js +7 -8
  50. package/lib/commonjs/components/Select/index.js.map +1 -1
  51. package/lib/commonjs/components/SimpleGrid/index.js +4 -2
  52. package/lib/commonjs/components/SimpleGrid/index.js.map +1 -1
  53. package/lib/commonjs/components/Spoiler/index.js +1 -1
  54. package/lib/commonjs/components/Spoiler/index.js.map +1 -1
  55. package/lib/commonjs/components/Stepper/index.js +8 -6
  56. package/lib/commonjs/components/Stepper/index.js.map +1 -1
  57. package/lib/commonjs/components/Switch/index.js +4 -5
  58. package/lib/commonjs/components/Switch/index.js.map +1 -1
  59. package/lib/commonjs/components/Table/index.js +257 -273
  60. package/lib/commonjs/components/Table/index.js.map +1 -1
  61. package/lib/commonjs/components/Text/index.js +78 -17
  62. package/lib/commonjs/components/Text/index.js.map +1 -1
  63. package/lib/commonjs/components/ThemeIcon/index.js +40 -19
  64. package/lib/commonjs/components/ThemeIcon/index.js.map +1 -1
  65. package/lib/commonjs/components/Timeline/index.js +6 -5
  66. package/lib/commonjs/components/Timeline/index.js.map +1 -1
  67. package/lib/commonjs/components/Title/index.js +5 -17
  68. package/lib/commonjs/components/Title/index.js.map +1 -1
  69. package/lib/commonjs/components/Tooltip/index.js +1 -2
  70. package/lib/commonjs/components/Tooltip/index.js.map +1 -1
  71. package/lib/commonjs/components/TransferList/index.js +9 -10
  72. package/lib/commonjs/components/TransferList/index.js.map +1 -1
  73. package/lib/commonjs/components/UnstyledButton/UnstyledButton.styles.js +2 -2
  74. package/lib/commonjs/components/UnstyledButton/UnstyledButton.styles.js.map +1 -1
  75. package/lib/commonjs/components/index.js +29 -29
  76. package/lib/commonjs/components/index.js.map +1 -1
  77. package/lib/commonjs/index.js +34 -0
  78. package/lib/commonjs/index.js.map +1 -1
  79. package/lib/commonjs/theme/create-theme.js +114 -25
  80. package/lib/commonjs/theme/create-theme.js.map +1 -1
  81. package/lib/commonjs/theme/default-colors.js +103 -0
  82. package/lib/commonjs/theme/default-colors.js.map +1 -0
  83. package/lib/commonjs/theme/default-theme.js +144 -128
  84. package/lib/commonjs/theme/default-theme.js.map +1 -1
  85. package/lib/commonjs/theme/functions/attach-functions.js +46 -14
  86. package/lib/commonjs/theme/functions/attach-functions.js.map +1 -1
  87. package/lib/commonjs/theme/functions/fns/breakpoints.js.map +1 -1
  88. package/lib/commonjs/theme/functions/fns/color-scheme-value.js +190 -0
  89. package/lib/commonjs/theme/functions/fns/color-scheme-value.js.map +1 -0
  90. package/lib/commonjs/theme/functions/fns/dimmed.js.map +1 -1
  91. package/lib/commonjs/theme/functions/fns/gradient/gradient.js.map +1 -1
  92. package/lib/commonjs/theme/functions/fns/helpers.js +51 -3
  93. package/lib/commonjs/theme/functions/fns/helpers.js.map +1 -1
  94. package/lib/commonjs/theme/functions/fns/index.js +151 -6
  95. package/lib/commonjs/theme/functions/fns/index.js.map +1 -1
  96. package/lib/commonjs/theme/functions/fns/primary-shade.js +81 -2
  97. package/lib/commonjs/theme/functions/fns/primary-shade.js.map +1 -1
  98. package/lib/commonjs/theme/functions/fns/shadow.js.map +1 -1
  99. package/lib/commonjs/theme/functions/fns/size.js +2 -1
  100. package/lib/commonjs/theme/functions/fns/size.js.map +1 -1
  101. package/lib/commonjs/theme/functions/fns/theme-color/color-utils.js +196 -0
  102. package/lib/commonjs/theme/functions/fns/theme-color/color-utils.js.map +1 -0
  103. package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js +92 -9
  104. package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js.map +1 -1
  105. package/lib/commonjs/theme/functions/fns/variant.js +112 -17
  106. package/lib/commonjs/theme/functions/fns/variant.js.map +1 -1
  107. package/lib/commonjs/theme/functions/index.js +172 -0
  108. package/lib/commonjs/theme/functions/index.js.map +1 -0
  109. package/lib/commonjs/theme/index.js +116 -14
  110. package/lib/commonjs/theme/index.js.map +1 -1
  111. package/lib/commonjs/theme/theme-provider.js +1 -22
  112. package/lib/commonjs/theme/theme-provider.js.map +1 -1
  113. package/lib/commonjs/theme/types.js +6 -0
  114. package/lib/commonjs/theme/types.js.map +1 -0
  115. package/lib/commonjs/theme/utils/withTextWrapper.js +1 -2
  116. package/lib/commonjs/theme/utils/withTextWrapper.js.map +1 -1
  117. package/lib/module/components/ActionIcon/ActionIcon.js +1 -1
  118. package/lib/module/components/ActionIcon/ActionIcon.js.map +1 -1
  119. package/lib/module/components/Anchor/index.js +3 -4
  120. package/lib/module/components/Anchor/index.js.map +1 -1
  121. package/lib/module/components/Avatar/index.js +1 -2
  122. package/lib/module/components/Avatar/index.js.map +1 -1
  123. package/lib/module/components/Badge/index.js +54 -24
  124. package/lib/module/components/Badge/index.js.map +1 -1
  125. package/lib/module/components/Blockquote/index.js +4 -5
  126. package/lib/module/components/Blockquote/index.js.map +1 -1
  127. package/lib/module/components/Button/index.js +7 -1
  128. package/lib/module/components/Button/index.js.map +1 -1
  129. package/lib/module/components/Center/index.js.map +1 -1
  130. package/lib/module/components/Checkbox/index.js +4 -5
  131. package/lib/module/components/Checkbox/index.js.map +1 -1
  132. package/lib/module/components/Chip/index.js +40 -21
  133. package/lib/module/components/Chip/index.js.map +1 -1
  134. package/lib/module/components/Code/index.js +6 -4
  135. package/lib/module/components/Code/index.js.map +1 -1
  136. package/lib/module/components/Grid/index.js +18 -13
  137. package/lib/module/components/Grid/index.js.map +1 -1
  138. package/lib/module/components/Highlight/index.js +1 -1
  139. package/lib/module/components/Highlight/index.js.map +1 -1
  140. package/lib/module/components/Indicator/index.js +2 -3
  141. package/lib/module/components/Indicator/index.js.map +1 -1
  142. package/lib/module/components/Menu/index.js +4 -5
  143. package/lib/module/components/Menu/index.js.map +1 -1
  144. package/lib/module/components/MultiSelect/index.js +8 -9
  145. package/lib/module/components/MultiSelect/index.js.map +1 -1
  146. package/lib/module/components/NativeSelect/index.js +14 -14
  147. package/lib/module/components/NativeSelect/index.js.map +1 -1
  148. package/lib/module/components/NavLink/index.js +43 -20
  149. package/lib/module/components/NavLink/index.js.map +1 -1
  150. package/lib/module/components/Notification/index.js +5 -6
  151. package/lib/module/components/Notification/index.js.map +1 -1
  152. package/lib/module/components/Pagination/index.js +5 -6
  153. package/lib/module/components/Pagination/index.js.map +1 -1
  154. package/lib/module/components/PinInput/index.js +3 -3
  155. package/lib/module/components/PinInput/index.js.map +1 -1
  156. package/lib/module/components/Progress/index.js +3 -5
  157. package/lib/module/components/Progress/index.js.map +1 -1
  158. package/lib/module/components/Radio/index.js +4 -5
  159. package/lib/module/components/Radio/index.js.map +1 -1
  160. package/lib/module/components/Rating/index.js +2 -4
  161. package/lib/module/components/Rating/index.js.map +1 -1
  162. package/lib/module/components/RingProgress/index.js +80 -58
  163. package/lib/module/components/RingProgress/index.js.map +1 -1
  164. package/lib/module/components/Select/index.js +7 -8
  165. package/lib/module/components/Select/index.js.map +1 -1
  166. package/lib/module/components/SimpleGrid/index.js +4 -2
  167. package/lib/module/components/SimpleGrid/index.js.map +1 -1
  168. package/lib/module/components/Spoiler/index.js +1 -1
  169. package/lib/module/components/Spoiler/index.js.map +1 -1
  170. package/lib/module/components/Stepper/index.js +8 -6
  171. package/lib/module/components/Stepper/index.js.map +1 -1
  172. package/lib/module/components/Switch/index.js +4 -5
  173. package/lib/module/components/Switch/index.js.map +1 -1
  174. package/lib/module/components/Table/index.js +257 -274
  175. package/lib/module/components/Table/index.js.map +1 -1
  176. package/lib/module/components/Text/index.js +78 -17
  177. package/lib/module/components/Text/index.js.map +1 -1
  178. package/lib/module/components/ThemeIcon/index.js +40 -19
  179. package/lib/module/components/ThemeIcon/index.js.map +1 -1
  180. package/lib/module/components/Timeline/index.js +6 -5
  181. package/lib/module/components/Timeline/index.js.map +1 -1
  182. package/lib/module/components/Title/index.js +5 -17
  183. package/lib/module/components/Title/index.js.map +1 -1
  184. package/lib/module/components/Tooltip/index.js +1 -2
  185. package/lib/module/components/Tooltip/index.js.map +1 -1
  186. package/lib/module/components/TransferList/index.js +9 -10
  187. package/lib/module/components/TransferList/index.js.map +1 -1
  188. package/lib/module/components/UnstyledButton/UnstyledButton.styles.js +2 -2
  189. package/lib/module/components/UnstyledButton/UnstyledButton.styles.js.map +1 -1
  190. package/lib/module/components/index.js +3 -1
  191. package/lib/module/components/index.js.map +1 -1
  192. package/lib/module/index.js +1 -0
  193. package/lib/module/index.js.map +1 -1
  194. package/lib/module/theme/create-theme.js +114 -24
  195. package/lib/module/theme/create-theme.js.map +1 -1
  196. package/lib/module/theme/default-colors.js +99 -0
  197. package/lib/module/theme/default-colors.js.map +1 -0
  198. package/lib/module/theme/default-theme.js +143 -127
  199. package/lib/module/theme/default-theme.js.map +1 -1
  200. package/lib/module/theme/functions/attach-functions.js +47 -14
  201. package/lib/module/theme/functions/attach-functions.js.map +1 -1
  202. package/lib/module/theme/functions/fns/breakpoints.js.map +1 -1
  203. package/lib/module/theme/functions/fns/color-scheme-value.js +180 -0
  204. package/lib/module/theme/functions/fns/color-scheme-value.js.map +1 -0
  205. package/lib/module/theme/functions/fns/dimmed.js.map +1 -1
  206. package/lib/module/theme/functions/fns/gradient/gradient.js.map +1 -1
  207. package/lib/module/theme/functions/fns/helpers.js +48 -2
  208. package/lib/module/theme/functions/fns/helpers.js.map +1 -1
  209. package/lib/module/theme/functions/fns/index.js +35 -7
  210. package/lib/module/theme/functions/fns/index.js.map +1 -1
  211. package/lib/module/theme/functions/fns/primary-shade.js +78 -2
  212. package/lib/module/theme/functions/fns/primary-shade.js.map +1 -1
  213. package/lib/module/theme/functions/fns/shadow.js.map +1 -1
  214. package/lib/module/theme/functions/fns/size.js +2 -1
  215. package/lib/module/theme/functions/fns/size.js.map +1 -1
  216. package/lib/module/theme/functions/fns/theme-color/color-utils.js +189 -0
  217. package/lib/module/theme/functions/fns/theme-color/color-utils.js.map +1 -0
  218. package/lib/module/theme/functions/fns/theme-color/theme-color.js +91 -9
  219. package/lib/module/theme/functions/fns/theme-color/theme-color.js.map +1 -1
  220. package/lib/module/theme/functions/fns/variant.js +112 -17
  221. package/lib/module/theme/functions/fns/variant.js.map +1 -1
  222. package/lib/module/theme/functions/index.js +22 -0
  223. package/lib/module/theme/functions/index.js.map +1 -0
  224. package/lib/module/theme/index.js +16 -4
  225. package/lib/module/theme/index.js.map +1 -1
  226. package/lib/module/theme/theme-provider.js +1 -22
  227. package/lib/module/theme/theme-provider.js.map +1 -1
  228. package/lib/module/theme/types.js +4 -0
  229. package/lib/module/theme/types.js.map +1 -0
  230. package/lib/module/theme/utils/withTextWrapper.js +1 -2
  231. package/lib/module/theme/utils/withTextWrapper.js.map +1 -1
  232. package/lib/typescript/commonjs/src/components/Anchor/index.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/src/components/Avatar/index.d.ts.map +1 -1
  234. package/lib/typescript/commonjs/src/components/Badge/index.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/src/components/Blockquote/index.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/src/components/Button/Button.styles.d.ts +8 -8
  237. package/lib/typescript/commonjs/src/components/Button/index.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/src/components/Center/index.d.ts +1 -2
  239. package/lib/typescript/commonjs/src/components/Center/index.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/src/components/Checkbox/index.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/src/components/Chip/index.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/src/components/Code/index.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/src/components/Container/index.d.ts +2 -2
  244. package/lib/typescript/commonjs/src/components/Container/index.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/src/components/Flex/index.d.ts +2 -2
  246. package/lib/typescript/commonjs/src/components/Flex/index.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/src/components/Grid/index.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/src/components/Highlight/index.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/src/components/Indicator/index.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/src/components/Menu/index.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/src/components/MultiSelect/index.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/components/NativeSelect/index.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/src/components/NavLink/index.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/src/components/Notification/index.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/src/components/Pagination/index.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/src/components/PinInput/index.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/src/components/Progress/index.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/components/Radio/index.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/src/components/Rating/index.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/src/components/RingProgress/index.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/src/components/Select/index.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/src/components/SimpleGrid/index.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/src/components/Switch/index.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/src/components/Table/index.d.ts +17 -83
  265. package/lib/typescript/commonjs/src/components/Table/index.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/src/components/Text/index.d.ts +54 -7
  267. package/lib/typescript/commonjs/src/components/Text/index.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/src/components/ThemeIcon/index.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/src/components/Timeline/index.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/components/Title/index.d.ts +1 -0
  271. package/lib/typescript/commonjs/src/components/Title/index.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/src/components/Tooltip/index.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/src/components/TransferList/index.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts +2 -2
  275. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/src/components/index.d.ts +1 -1
  277. package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/src/index.d.ts +1 -1
  279. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/src/theme/create-styles.d.ts +1 -1
  281. package/lib/typescript/commonjs/src/theme/create-styles.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/src/theme/create-theme.d.ts +68 -2
  283. package/lib/typescript/commonjs/src/theme/create-theme.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/src/theme/default-colors.d.ts +12 -0
  285. package/lib/typescript/commonjs/src/theme/default-colors.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/src/theme/default-theme.d.ts +15 -108
  287. package/lib/typescript/commonjs/src/theme/default-theme.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts +20 -1
  289. package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/src/theme/functions/fns/breakpoints.d.ts +3 -3
  291. package/lib/typescript/commonjs/src/theme/functions/fns/breakpoints.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/src/theme/functions/fns/color-scheme-value.d.ts +100 -0
  293. package/lib/typescript/commonjs/src/theme/functions/fns/color-scheme-value.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/src/theme/functions/fns/dimmed.d.ts +2 -2
  295. package/lib/typescript/commonjs/src/theme/functions/fns/dimmed.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/src/theme/functions/fns/gradient/gradient.d.ts +2 -3
  297. package/lib/typescript/commonjs/src/theme/functions/fns/gradient/gradient.d.ts.map +1 -1
  298. package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts +36 -8
  299. package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts.map +1 -1
  300. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts +40 -14
  301. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -1
  302. package/lib/typescript/commonjs/src/theme/functions/fns/primary-shade.d.ts +53 -3
  303. package/lib/typescript/commonjs/src/theme/functions/fns/primary-shade.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/src/theme/functions/fns/shadow.d.ts +1 -1
  305. package/lib/typescript/commonjs/src/theme/functions/fns/shadow.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts +2 -2
  307. package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/color-utils.d.ts +50 -0
  309. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/color-utils.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts +51 -5
  311. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts +52 -19
  313. package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/src/theme/functions/index.d.ts +19 -0
  315. package/lib/typescript/commonjs/src/theme/functions/index.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/src/theme/index.d.ts +9 -6
  317. package/lib/typescript/commonjs/src/theme/index.d.ts.map +1 -1
  318. package/lib/typescript/commonjs/src/theme/theme-provider.d.ts +1 -1
  319. package/lib/typescript/commonjs/src/theme/theme-provider.d.ts.map +1 -1
  320. package/lib/typescript/commonjs/src/theme/types.d.ts +494 -0
  321. package/lib/typescript/commonjs/src/theme/types.d.ts.map +1 -0
  322. package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts +1 -1
  323. package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts.map +1 -1
  324. package/lib/typescript/module/src/components/Anchor/index.d.ts.map +1 -1
  325. package/lib/typescript/module/src/components/Avatar/index.d.ts.map +1 -1
  326. package/lib/typescript/module/src/components/Badge/index.d.ts.map +1 -1
  327. package/lib/typescript/module/src/components/Blockquote/index.d.ts.map +1 -1
  328. package/lib/typescript/module/src/components/Button/Button.styles.d.ts +8 -8
  329. package/lib/typescript/module/src/components/Button/index.d.ts.map +1 -1
  330. package/lib/typescript/module/src/components/Center/index.d.ts +1 -2
  331. package/lib/typescript/module/src/components/Center/index.d.ts.map +1 -1
  332. package/lib/typescript/module/src/components/Checkbox/index.d.ts.map +1 -1
  333. package/lib/typescript/module/src/components/Chip/index.d.ts.map +1 -1
  334. package/lib/typescript/module/src/components/Code/index.d.ts.map +1 -1
  335. package/lib/typescript/module/src/components/Container/index.d.ts +2 -2
  336. package/lib/typescript/module/src/components/Container/index.d.ts.map +1 -1
  337. package/lib/typescript/module/src/components/Flex/index.d.ts +2 -2
  338. package/lib/typescript/module/src/components/Flex/index.d.ts.map +1 -1
  339. package/lib/typescript/module/src/components/Grid/index.d.ts.map +1 -1
  340. package/lib/typescript/module/src/components/Highlight/index.d.ts.map +1 -1
  341. package/lib/typescript/module/src/components/Indicator/index.d.ts.map +1 -1
  342. package/lib/typescript/module/src/components/Menu/index.d.ts.map +1 -1
  343. package/lib/typescript/module/src/components/MultiSelect/index.d.ts.map +1 -1
  344. package/lib/typescript/module/src/components/NativeSelect/index.d.ts.map +1 -1
  345. package/lib/typescript/module/src/components/NavLink/index.d.ts.map +1 -1
  346. package/lib/typescript/module/src/components/Notification/index.d.ts.map +1 -1
  347. package/lib/typescript/module/src/components/Pagination/index.d.ts.map +1 -1
  348. package/lib/typescript/module/src/components/PinInput/index.d.ts.map +1 -1
  349. package/lib/typescript/module/src/components/Progress/index.d.ts.map +1 -1
  350. package/lib/typescript/module/src/components/Radio/index.d.ts.map +1 -1
  351. package/lib/typescript/module/src/components/Rating/index.d.ts.map +1 -1
  352. package/lib/typescript/module/src/components/RingProgress/index.d.ts.map +1 -1
  353. package/lib/typescript/module/src/components/Select/index.d.ts.map +1 -1
  354. package/lib/typescript/module/src/components/SimpleGrid/index.d.ts.map +1 -1
  355. package/lib/typescript/module/src/components/Switch/index.d.ts.map +1 -1
  356. package/lib/typescript/module/src/components/Table/index.d.ts +17 -83
  357. package/lib/typescript/module/src/components/Table/index.d.ts.map +1 -1
  358. package/lib/typescript/module/src/components/Text/index.d.ts +54 -7
  359. package/lib/typescript/module/src/components/Text/index.d.ts.map +1 -1
  360. package/lib/typescript/module/src/components/ThemeIcon/index.d.ts.map +1 -1
  361. package/lib/typescript/module/src/components/Timeline/index.d.ts.map +1 -1
  362. package/lib/typescript/module/src/components/Title/index.d.ts +1 -0
  363. package/lib/typescript/module/src/components/Title/index.d.ts.map +1 -1
  364. package/lib/typescript/module/src/components/Tooltip/index.d.ts.map +1 -1
  365. package/lib/typescript/module/src/components/TransferList/index.d.ts.map +1 -1
  366. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts +2 -2
  367. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -1
  368. package/lib/typescript/module/src/components/index.d.ts +1 -1
  369. package/lib/typescript/module/src/components/index.d.ts.map +1 -1
  370. package/lib/typescript/module/src/index.d.ts +1 -1
  371. package/lib/typescript/module/src/index.d.ts.map +1 -1
  372. package/lib/typescript/module/src/theme/create-styles.d.ts +1 -1
  373. package/lib/typescript/module/src/theme/create-styles.d.ts.map +1 -1
  374. package/lib/typescript/module/src/theme/create-theme.d.ts +68 -2
  375. package/lib/typescript/module/src/theme/create-theme.d.ts.map +1 -1
  376. package/lib/typescript/module/src/theme/default-colors.d.ts +12 -0
  377. package/lib/typescript/module/src/theme/default-colors.d.ts.map +1 -0
  378. package/lib/typescript/module/src/theme/default-theme.d.ts +15 -108
  379. package/lib/typescript/module/src/theme/default-theme.d.ts.map +1 -1
  380. package/lib/typescript/module/src/theme/functions/attach-functions.d.ts +20 -1
  381. package/lib/typescript/module/src/theme/functions/attach-functions.d.ts.map +1 -1
  382. package/lib/typescript/module/src/theme/functions/fns/breakpoints.d.ts +3 -3
  383. package/lib/typescript/module/src/theme/functions/fns/breakpoints.d.ts.map +1 -1
  384. package/lib/typescript/module/src/theme/functions/fns/color-scheme-value.d.ts +100 -0
  385. package/lib/typescript/module/src/theme/functions/fns/color-scheme-value.d.ts.map +1 -0
  386. package/lib/typescript/module/src/theme/functions/fns/dimmed.d.ts +2 -2
  387. package/lib/typescript/module/src/theme/functions/fns/dimmed.d.ts.map +1 -1
  388. package/lib/typescript/module/src/theme/functions/fns/gradient/gradient.d.ts +2 -3
  389. package/lib/typescript/module/src/theme/functions/fns/gradient/gradient.d.ts.map +1 -1
  390. package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts +36 -8
  391. package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts.map +1 -1
  392. package/lib/typescript/module/src/theme/functions/fns/index.d.ts +40 -14
  393. package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -1
  394. package/lib/typescript/module/src/theme/functions/fns/primary-shade.d.ts +53 -3
  395. package/lib/typescript/module/src/theme/functions/fns/primary-shade.d.ts.map +1 -1
  396. package/lib/typescript/module/src/theme/functions/fns/shadow.d.ts +1 -1
  397. package/lib/typescript/module/src/theme/functions/fns/shadow.d.ts.map +1 -1
  398. package/lib/typescript/module/src/theme/functions/fns/size.d.ts +2 -2
  399. package/lib/typescript/module/src/theme/functions/fns/size.d.ts.map +1 -1
  400. package/lib/typescript/module/src/theme/functions/fns/theme-color/color-utils.d.ts +50 -0
  401. package/lib/typescript/module/src/theme/functions/fns/theme-color/color-utils.d.ts.map +1 -0
  402. package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts +51 -5
  403. package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -1
  404. package/lib/typescript/module/src/theme/functions/fns/variant.d.ts +52 -19
  405. package/lib/typescript/module/src/theme/functions/fns/variant.d.ts.map +1 -1
  406. package/lib/typescript/module/src/theme/functions/index.d.ts +19 -0
  407. package/lib/typescript/module/src/theme/functions/index.d.ts.map +1 -0
  408. package/lib/typescript/module/src/theme/index.d.ts +9 -6
  409. package/lib/typescript/module/src/theme/index.d.ts.map +1 -1
  410. package/lib/typescript/module/src/theme/theme-provider.d.ts +1 -1
  411. package/lib/typescript/module/src/theme/theme-provider.d.ts.map +1 -1
  412. package/lib/typescript/module/src/theme/types.d.ts +494 -0
  413. package/lib/typescript/module/src/theme/types.d.ts.map +1 -0
  414. package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts +1 -1
  415. package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts.map +1 -1
  416. package/package.json +1 -1
  417. package/src/components/ActionIcon/ActionIcon.tsx +3 -3
  418. package/src/components/Anchor/index.tsx +3 -4
  419. package/src/components/Avatar/index.tsx +1 -2
  420. package/src/components/Badge/index.tsx +36 -19
  421. package/src/components/Blockquote/index.tsx +4 -6
  422. package/src/components/Button/index.tsx +5 -1
  423. package/src/components/Center/index.tsx +1 -2
  424. package/src/components/Checkbox/index.tsx +4 -5
  425. package/src/components/Chip/index.tsx +25 -18
  426. package/src/components/Code/index.tsx +7 -5
  427. package/src/components/Container/index.tsx +2 -2
  428. package/src/components/Flex/index.tsx +2 -2
  429. package/src/components/Grid/index.tsx +16 -10
  430. package/src/components/Highlight/index.tsx +1 -2
  431. package/src/components/Indicator/index.tsx +3 -4
  432. package/src/components/Menu/index.tsx +8 -10
  433. package/src/components/MultiSelect/index.tsx +13 -15
  434. package/src/components/NativeSelect/index.tsx +34 -21
  435. package/src/components/NavLink/index.tsx +27 -23
  436. package/src/components/Notification/index.tsx +5 -6
  437. package/src/components/Pagination/index.tsx +5 -6
  438. package/src/components/PinInput/index.tsx +5 -6
  439. package/src/components/Progress/index.tsx +5 -6
  440. package/src/components/Radio/index.tsx +4 -5
  441. package/src/components/Rating/index.tsx +2 -4
  442. package/src/components/RingProgress/index.tsx +93 -62
  443. package/src/components/Select/index.tsx +11 -13
  444. package/src/components/SimpleGrid/index.tsx +5 -2
  445. package/src/components/Spoiler/index.tsx +1 -1
  446. package/src/components/Stepper/index.tsx +17 -17
  447. package/src/components/Switch/index.tsx +5 -6
  448. package/src/components/Table/index.tsx +333 -413
  449. package/src/components/Text/index.tsx +125 -28
  450. package/src/components/ThemeIcon/index.tsx +23 -23
  451. package/src/components/Timeline/index.tsx +12 -15
  452. package/src/components/Title/index.tsx +5 -22
  453. package/src/components/Tooltip/index.tsx +1 -3
  454. package/src/components/TransferList/index.tsx +16 -18
  455. package/src/components/UnstyledButton/UnstyledButton.styles.ts +4 -2
  456. package/src/components/index.tsx +3 -1
  457. package/src/index.tsx +1 -1
  458. package/src/theme/create-styles.ts +1 -1
  459. package/src/theme/create-theme.ts +134 -23
  460. package/src/theme/default-colors.ts +252 -0
  461. package/src/theme/default-theme.ts +178 -392
  462. package/src/theme/functions/attach-functions.ts +57 -10
  463. package/src/theme/functions/fns/breakpoints.ts +4 -4
  464. package/src/theme/functions/fns/color-scheme-value.ts +200 -0
  465. package/src/theme/functions/fns/dimmed.ts +2 -2
  466. package/src/theme/functions/fns/gradient/gradient.ts +2 -3
  467. package/src/theme/functions/fns/helpers.ts +50 -9
  468. package/src/theme/functions/fns/index.ts +63 -3
  469. package/src/theme/functions/fns/primary-shade.ts +84 -8
  470. package/src/theme/functions/fns/shadow.ts +1 -1
  471. package/src/theme/functions/fns/size.ts +4 -3
  472. package/src/theme/functions/fns/theme-color/color-utils.ts +193 -0
  473. package/src/theme/functions/fns/theme-color/theme-color.ts +85 -17
  474. package/src/theme/functions/fns/variant.ts +106 -44
  475. package/src/theme/functions/index.ts +19 -0
  476. package/src/theme/index.ts +91 -0
  477. package/src/theme/theme-provider.tsx +2 -17
  478. package/src/theme/types.ts +625 -0
  479. package/src/theme/utils/withTextWrapper.tsx +2 -3
  480. package/lib/commonjs/components/Table/Table.example.js +0 -323
  481. package/lib/commonjs/components/Table/Table.example.js.map +0 -1
  482. package/lib/module/components/Table/Table.example.js +0 -318
  483. package/lib/module/components/Table/Table.example.js.map +0 -1
  484. package/lib/typescript/commonjs/src/components/Table/Table.example.d.ts +0 -13
  485. package/lib/typescript/commonjs/src/components/Table/Table.example.d.ts.map +0 -1
  486. package/lib/typescript/module/src/components/Table/Table.example.d.ts +0 -13
  487. package/lib/typescript/module/src/components/Table/Table.example.d.ts.map +0 -1
  488. package/src/components/Table/Table.example.tsx +0 -215
  489. package/src/theme/index.tsx +0 -9
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_themeProvider","_index3","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","scale","sm","md","lg","xl","useStyles","createStyles","theme","labelPosition","size","sizeStyles","root","flexDirection","alignItems","label","fontSize","fontSizes","color","colorScheme","colors","dark","black","marginLeft","spacing","marginRight","switch","transform","defaultProps","disabled","Switch","exports","forwardRef","props","ref","checked","onChange","style","wrapperStyle","useComponentDefaultProps","useTheme","styles","sx","name","handleChange","value","colorKey","primaryColor","falseColor","gray","trueColor","primaryBgColor","trackColor","false","true","thumbColor","Platform","OS","white","switchComponent","jsx","onValueChange","ios_backgroundColor","jsxs","BoxView","children","Text","displayName"],"sourceRoot":"../../../../src","sources":["components/Switch/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAA2C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CA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IAAI;MAAC7B,KAAK,EAAEI,MAAM,CAAC1B,KAAM;MAAAkD,QAAA,EAAElD;IAAK,CAAO,CAAC;EAAA,CAChE,CAAC;AAEd,CAAC,CAAC;AAEFe,MAAM,CAACqC,WAAW,GAAG,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_themeProvider","_index3","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","scale","sm","md","lg","xl","useStyles","createStyles","theme","labelPosition","size","sizeStyles","root","flexDirection","alignItems","label","fontSize","fontSizes","color","colorScheme","fn","themeColor","black","marginLeft","spacing","marginRight","switch","transform","defaultProps","disabled","Switch","exports","forwardRef","props","ref","checked","onChange","style","wrapperStyle","useComponentDefaultProps","useTheme","styles","sx","name","handleChange","value","colorKey","primaryColor","falseColor","trueColor","trackColor","false","true","thumbColor","Platform","OS","white","switchComponent","jsx","onValueChange","ios_backgroundColor","jsxs","BoxView","children","Text","displayName"],"sourceRoot":"../../../../src","sources":["components/Switch/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAA2C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,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EACxB;EAEA,oBACE,IAAA9E,WAAA,CAAAkF,IAAA,EAACtF,MAAA,CAAAuF,OAAO;IAACzB,KAAK,EAAEK,EAAE,CAACD,MAAM,CAAC7B,IAAI,EAAE0B,YAAY,CAAE;IAAAyB,QAAA,GAC3CtD,aAAa,KAAK,MAAM,iBAAI,IAAA9B,WAAA,CAAA+E,GAAA,EAAClF,OAAA,CAAAwF,IAAI;MAAC3B,KAAK,EAAEI,MAAM,CAAC1B,KAAM;MAAAgD,QAAA,EAAEhD;IAAK,CAAO,CAAC,EACrE0C,eAAe,EACfhD,aAAa,KAAK,OAAO,iBAAI,IAAA9B,WAAA,CAAA+E,GAAA,EAAClF,OAAA,CAAAwF,IAAI;MAAC3B,KAAK,EAAEI,MAAM,CAAC1B,KAAM;MAAAgD,QAAA,EAAEhD;IAAK,CAAO,CAAC;EAAA,CAChE,CAAC;AAEd,CAAC,CAAC;AAEFe,MAAM,CAACmC,WAAW,GAAG,QAAQ","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Table = void 0;
6
+ exports._Table = exports.Table = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _index = require("../BoxView/index.js");
@@ -11,203 +11,159 @@ var _index2 = require("../Text/index.js");
11
11
  var _themeProvider = require("../../theme/theme-provider.js");
12
12
  var _index3 = require("../../theme/index.js");
13
13
  var _rem = require("../../theme/utils/rem.js");
14
- var _withTextWrapper = require("../../theme/utils/withTextWrapper.js");
15
14
  var _jsxRuntime = require("react/jsx-runtime");
16
15
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
17
- const TableContext = /*#__PURE__*/(0, _react.createContext)(null);
18
- const useTableContext = () => {
19
- const context = (0, _react.useContext)(TableContext);
20
- return context;
21
- };
22
- const fontSizes = {
23
- xs: (0, _rem.rem)(10),
24
- sm: (0, _rem.rem)(12),
25
- md: (0, _rem.rem)(14),
26
- lg: (0, _rem.rem)(16),
27
- xl: (0, _rem.rem)(18)
28
- };
29
- const useTableStyles = (0, _index3.createStyles)((theme, {
30
- withBorder,
31
- captionSide,
32
- flex,
33
- flexGrow,
34
- flexShrink,
35
- flexBasis
36
- }) => ({
37
- wrapper: {
38
- // Apply flex properties to allow table to expand in container
39
- ...(flex !== undefined && {
40
- flex
41
- }),
42
- ...(flexGrow !== undefined && {
43
- flexGrow
44
- }),
45
- ...(flexShrink !== undefined && {
46
- flexShrink
47
- }),
48
- ...(flexBasis !== undefined && {
49
- flexBasis
50
- })
51
- },
52
- root: {
53
- width: '100%',
54
- borderCollapse: 'collapse',
55
- ...(withBorder && {
56
- borderWidth: 1,
57
- borderColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3]
58
- })
59
- },
60
- caption: {
61
- fontSize: theme.fontSizes.sm,
62
- color: theme.colorScheme === 'dark' ? theme.colors.dark?.[2] : theme.colors.gray?.[6],
63
- paddingVertical: theme.spacing.xs,
64
- textAlign: 'center',
65
- ...(captionSide === 'bottom' && {
66
- order: 1
67
- })
68
- }
69
- }));
70
- const useTableHeadStyles = (0, _index3.createStyles)(theme => ({
71
- thead: {
72
- borderBottomWidth: 1,
73
- borderBottomColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3]
74
- }
75
- }));
76
- const useTableRowStyles = (0, _index3.createStyles)((theme, {
77
- striped,
78
- isEven
79
- }) => ({
80
- tr: {
81
- flexDirection: 'row',
82
- borderBottomWidth: 1,
83
- borderBottomColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3],
84
- ...(striped && isEven && {
85
- backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[6] : theme.colors.gray?.[0]
86
- })
87
- }
88
- }));
89
- const useTableCellStyles = (0, _index3.createStyles)((theme, {
90
- fontSize,
91
- verticalSpacing,
16
+ const useStyles = (0, _index3.createStyles)((theme, {
92
17
  horizontalSpacing,
18
+ verticalSpacing,
19
+ fontSize,
20
+ withBorder,
93
21
  withColumnBorders,
94
- isHeader,
95
- width
22
+ striped
96
23
  }) => {
97
- const getVerticalPadding = () => {
98
- if (typeof verticalSpacing === 'number') return (0, _rem.rem)(verticalSpacing);
99
- return theme.spacing[verticalSpacing] || theme.spacing.xs;
24
+ const borderColor = theme.colorScheme === 'dark' ? (theme.colors.dark || [])[4] : (theme.colors.gray || [])[3];
25
+ const getSpacing = size => {
26
+ if (typeof size === 'number') return (0, _rem.rem)(size);
27
+ return theme.spacing[size] || theme.spacing.xs;
100
28
  };
101
- const getHorizontalPadding = () => {
102
- if (typeof horizontalSpacing === 'number') return (0, _rem.rem)(horizontalSpacing);
103
- return theme.spacing[horizontalSpacing] || theme.spacing.xs;
29
+ const getFontSize = size => {
30
+ if (typeof size === 'number') return size;
31
+ return theme.fontSizes[size] || theme.fontSizes.sm;
104
32
  };
33
+ const hPadding = getSpacing(horizontalSpacing);
34
+ const vPadding = getSpacing(verticalSpacing);
35
+ const cellFontSize = getFontSize(fontSize);
105
36
  return {
106
- cell: {
107
- // Remove flex: 1 to prevent equal spacing
108
- // Use explicit width when available for column alignment
109
- ...(width && {
110
- width
111
- }),
112
- paddingVertical: getVerticalPadding(),
113
- paddingHorizontal: getHorizontalPadding(),
114
- fontSize: fontSizes[fontSize],
115
- color: theme.colorScheme === 'dark' ? theme.white : theme.black,
116
- textAlign: 'left',
117
- ...(withColumnBorders && {
118
- borderRightWidth: 1,
119
- borderRightColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3]
120
- }),
121
- ...(isHeader && {
122
- fontWeight: '600'
123
- })
124
- }
37
+ root: {
38
+ width: '100%',
39
+ backgroundColor: 'transparent'
40
+ },
41
+ scrollView: {
42
+ width: '100%'
43
+ },
44
+ container: {
45
+ flexDirection: 'column',
46
+ borderWidth: withBorder ? 1 : 0,
47
+ borderColor: withBorder ? borderColor : 'transparent',
48
+ borderStyle: 'solid'
49
+ },
50
+ caption: {
51
+ paddingHorizontal: hPadding,
52
+ paddingVertical: theme.spacing.xs,
53
+ fontSize: theme.fontSizes.sm,
54
+ color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[2] : (theme.colors.gray || [])[6],
55
+ textAlign: 'left'
56
+ },
57
+ captionTop: {
58
+ marginBottom: 0
59
+ },
60
+ captionBottom: {
61
+ marginTop: 0
62
+ },
63
+ thead: {
64
+ flexDirection: 'column'
65
+ },
66
+ tbody: {
67
+ flexDirection: 'column'
68
+ },
69
+ tfoot: {
70
+ flexDirection: 'column'
71
+ },
72
+ tr: {
73
+ flexDirection: 'row'
74
+ },
75
+ th: {
76
+ flex: 1,
77
+ paddingHorizontal: hPadding,
78
+ paddingVertical: vPadding,
79
+ borderBottomWidth: 1,
80
+ borderBottomColor: borderColor,
81
+ borderBottomStyle: 'solid',
82
+ borderRightWidth: withColumnBorders ? 1 : 0,
83
+ borderRightColor: withColumnBorders ? borderColor : 'transparent',
84
+ borderRightStyle: 'solid',
85
+ justifyContent: 'center'
86
+ },
87
+ thText: {
88
+ fontWeight: 'bold',
89
+ color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] : (theme.colors.gray || [])[7],
90
+ fontSize: cellFontSize
91
+ },
92
+ td: {
93
+ flex: 1,
94
+ paddingHorizontal: hPadding,
95
+ paddingVertical: vPadding,
96
+ borderTopWidth: 1,
97
+ borderTopColor: borderColor,
98
+ borderTopStyle: 'solid',
99
+ borderRightWidth: withColumnBorders ? 1 : 0,
100
+ borderRightColor: withColumnBorders ? borderColor : 'transparent',
101
+ borderRightStyle: 'solid',
102
+ justifyContent: 'center'
103
+ },
104
+ tdText: {
105
+ color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] : theme.black,
106
+ fontSize: cellFontSize
107
+ },
108
+ firstBodyRow: {
109
+ borderTopWidth: 0
110
+ },
111
+ lastCell: {
112
+ borderRightWidth: 0
113
+ },
114
+ stripedRow: striped ? {
115
+ backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[6] : (theme.colors.gray || [])[0]
116
+ } : {}
125
117
  };
126
118
  });
127
119
  const defaultProps = {
128
- horizontalSpacing: 'xs',
129
- verticalSpacing: 'xs',
130
- fontSize: 'sm',
131
120
  striped: false,
132
121
  highlightOnHover: false,
122
+ captionSide: 'top',
123
+ horizontalSpacing: 'xs',
124
+ fontSize: 'sm',
125
+ verticalSpacing: 7,
133
126
  withBorder: false,
134
127
  withColumnBorders: false,
135
- captionSide: 'top'
128
+ horizontallyScrollable: false
136
129
  };
137
- const Table = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
130
+
131
+ // Context to share table configuration with child components
132
+
133
+ const TableContext = /*#__PURE__*/_react.default.createContext(null);
134
+ const useTableContext = () => {
135
+ const context = _react.default.useContext(TableContext);
136
+ if (!context) {
137
+ throw new Error('Table compound components must be used within Table');
138
+ }
139
+ return context;
140
+ };
141
+
142
+ // Table Caption Component
143
+ const TableCaption = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
138
144
  const {
139
145
  children,
140
- horizontalSpacing,
141
- verticalSpacing,
142
- fontSize,
143
- striped,
144
- highlightOnHover: _highlightOnHover,
145
- withBorder,
146
- withColumnBorders,
147
- captionSide,
148
- caption,
149
- flex,
150
- flexGrow,
151
- flexShrink,
152
- flexBasis,
153
146
  style,
154
147
  ...others
155
- } = (0, _themeProvider.useComponentDefaultProps)('Table', defaultProps, props);
148
+ } = props;
156
149
  const {
157
150
  styles,
158
151
  sx
159
- } = useTableStyles({
160
- withBorder,
161
- captionSide,
162
- flex,
163
- flexGrow,
164
- flexShrink,
165
- flexBasis
166
- }, {
167
- name: 'Table'
168
- });
169
-
170
- // Track column widths to ensure alignment across rows
171
- const [columnWidths, setColumnWidths] = (0, _react.useState)([]);
172
- const onCellLayout = (0, _react.useCallback)((columnIndex, width) => {
173
- setColumnWidths(prevWidths => {
174
- const newWidths = [...prevWidths];
175
- // Store the maximum width for each column to ensure all cells in that column have the same width
176
- if (!newWidths[columnIndex] || width > newWidths[columnIndex]) {
177
- newWidths[columnIndex] = width;
178
- }
179
- return newWidths;
180
- });
181
- }, []);
182
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(TableContext.Provider, {
183
- value: {
184
- striped: striped,
185
- highlightOnHover: _highlightOnHover,
186
- withBorder: withBorder,
187
- withColumnBorders: withColumnBorders,
188
- fontSize: fontSize,
189
- verticalSpacing: verticalSpacing,
190
- horizontalSpacing: horizontalSpacing,
191
- columnWidths,
192
- onCellLayout
193
- },
194
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
195
- horizontal: true,
196
- style: styles.wrapper,
197
- showsHorizontalScrollIndicator: true,
198
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index.BoxView, {
199
- ref: ref,
200
- style: sx(styles.root, style),
201
- ...others,
202
- children: [caption && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
203
- style: styles.caption,
204
- children: caption
205
- }), children]
206
- })
207
- })
152
+ } = useTableContext();
153
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
154
+ ref: ref,
155
+ style: sx(styles.caption, style),
156
+ ...others,
157
+ children: typeof children === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
158
+ style: styles.caption,
159
+ children: children
160
+ }) : children
208
161
  });
209
162
  });
210
- const Thead = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
163
+ TableCaption.displayName = 'Table.Caption';
164
+
165
+ // Table Head Component
166
+ const THead = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
211
167
  const {
212
168
  children,
213
169
  style,
@@ -216,9 +172,7 @@ const Thead = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
216
172
  const {
217
173
  styles,
218
174
  sx
219
- } = useTableHeadStyles({}, {
220
- name: 'Thead'
221
- });
175
+ } = useTableContext();
222
176
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
223
177
  ref: ref,
224
178
  style: sx(styles.thead, style),
@@ -226,168 +180,198 @@ const Thead = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
226
180
  children: children
227
181
  });
228
182
  });
229
- const Tbody = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
183
+ THead.displayName = 'Table.THead';
184
+
185
+ // Table Body Component
186
+ const TBody = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
230
187
  const {
231
188
  children,
232
189
  style,
233
190
  ...others
234
191
  } = props;
235
- const childrenArray = _react.default.Children.toArray(children);
192
+ const {
193
+ styles,
194
+ sx,
195
+ striped
196
+ } = useTableContext();
197
+
198
+ // Process children to add row styling
199
+ const processedChildren = _react.default.Children.map(children, (child, index) => {
200
+ if (! /*#__PURE__*/_react.default.isValidElement(child)) return child;
201
+ const isOddRow = index % 2 === 1;
202
+ const childProps = child.props;
203
+ const rowStyle = [childProps.style, striped && isOddRow && styles.stripedRow].filter(Boolean);
204
+ return /*#__PURE__*/_react.default.cloneElement(child, {
205
+ 'style': rowStyle.length > 0 ? rowStyle : childProps.style,
206
+ 'data-index': index,
207
+ 'data-first': index === 0
208
+ });
209
+ });
236
210
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
237
211
  ref: ref,
238
- style: style,
212
+ style: sx(styles.tbody, style),
239
213
  ...others,
240
- children: childrenArray.map((child, index) => {
241
- if (! /*#__PURE__*/_react.default.isValidElement(child)) return child;
242
- return /*#__PURE__*/_react.default.cloneElement(child, {
243
- key: index,
244
- __index: index
245
- });
246
- })
214
+ children: processedChildren
247
215
  });
248
216
  });
249
- const Tfoot = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
217
+ TBody.displayName = 'Table.TBody';
218
+
219
+ // Table Footer Component
220
+ const TFoot = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
250
221
  const {
251
222
  children,
252
223
  style,
253
224
  ...others
254
225
  } = props;
226
+ const {
227
+ styles,
228
+ sx
229
+ } = useTableContext();
255
230
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
256
231
  ref: ref,
257
- style: style,
232
+ style: sx(styles.tfoot, style),
258
233
  ...others,
259
234
  children: children
260
235
  });
261
236
  });
237
+ TFoot.displayName = 'Table.TFoot';
238
+
239
+ // Table Row Component
262
240
  const Tr = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
263
241
  const {
264
242
  children,
265
243
  style,
266
- __index,
267
244
  ...others
268
245
  } = props;
269
- const context = useTableContext();
270
246
  const {
271
247
  styles,
272
248
  sx
273
- } = useTableRowStyles({
274
- striped: context?.striped ?? false,
275
- highlightOnHover: context?.highlightOnHover ?? false,
276
- isEven: (__index ?? 0) % 2 === 0
277
- }, {
278
- name: 'Tr'
279
- });
280
-
281
- // Add column indices to children (Th and Td components)
282
- const childrenArray = _react.default.Children.toArray(children);
283
- const childrenWithColumnIndex = childrenArray.map((child, index) => {
284
- if (! /*#__PURE__*/_react.default.isValidElement(child)) return child;
285
- return /*#__PURE__*/_react.default.cloneElement(child, {
286
- __columnIndex: index
287
- });
288
- });
249
+ } = useTableContext();
289
250
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
290
251
  ref: ref,
291
252
  style: sx(styles.tr, style),
292
253
  ...others,
293
- children: childrenWithColumnIndex
254
+ children: children
294
255
  });
295
256
  });
257
+ Tr.displayName = 'Table.Tr';
258
+
259
+ // Table Header Cell Component
296
260
  const Th = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
297
261
  const {
298
262
  children,
299
263
  style,
300
- withTextWrapper: shouldWrapInText = true,
301
- __columnIndex,
264
+ colSpan,
302
265
  ...others
303
266
  } = props;
304
- const context = useTableContext();
305
- const columnIndex = __columnIndex ?? 0;
306
- const columnWidth = context?.columnWidths?.[columnIndex];
307
267
  const {
308
268
  styles,
309
269
  sx
310
- } = useTableCellStyles({
311
- fontSize: context?.fontSize ?? 'sm',
312
- verticalSpacing: context?.verticalSpacing ?? 'xs',
313
- horizontalSpacing: context?.horizontalSpacing ?? 'xs',
314
- withColumnBorders: context?.withColumnBorders ?? false,
315
- isHeader: true,
316
- width: columnWidth
317
- }, {
318
- name: 'Th'
319
- });
320
- const handleLayout = (0, _react.useCallback)(event => {
321
- const {
322
- width
323
- } = event.nativeEvent.layout;
324
- if (context?.onCellLayout && width > 0) {
325
- context.onCellLayout(columnIndex, width);
326
- }
327
- }, [context, columnIndex]);
270
+ } = useTableContext();
271
+ const cellStyle = [styles.th, colSpan && {
272
+ flex: colSpan
273
+ }, style].filter(Boolean);
328
274
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
329
275
  ref: ref,
330
- style: sx(styles.cell, style),
331
- onLayout: handleLayout,
276
+ style: sx(...cellStyle),
332
277
  ...others,
333
- children: (0, _withTextWrapper.withTextWrapper)(children, shouldWrapInText, styles.cell)
278
+ children: typeof children === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
279
+ style: styles.thText,
280
+ children: children
281
+ }) : children
334
282
  });
335
283
  });
284
+ Th.displayName = 'Table.Th';
285
+
286
+ // Table Data Cell Component
336
287
  const Td = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
337
288
  const {
338
289
  children,
339
290
  style,
340
- withTextWrapper: shouldWrapInText = true,
341
- __columnIndex,
291
+ colSpan,
342
292
  ...others
343
293
  } = props;
344
- const context = useTableContext();
345
- const columnIndex = __columnIndex ?? 0;
346
- const columnWidth = context?.columnWidths?.[columnIndex];
347
294
  const {
348
295
  styles,
349
296
  sx
350
- } = useTableCellStyles({
351
- fontSize: context?.fontSize ?? 'sm',
352
- verticalSpacing: context?.verticalSpacing ?? 'xs',
353
- horizontalSpacing: context?.horizontalSpacing ?? 'xs',
354
- withColumnBorders: context?.withColumnBorders ?? false,
355
- isHeader: false,
356
- width: columnWidth
357
- }, {
358
- name: 'Td'
359
- });
360
- const handleLayout = (0, _react.useCallback)(event => {
361
- const {
362
- width
363
- } = event.nativeEvent.layout;
364
- if (context?.onCellLayout && width > 0) {
365
- context.onCellLayout(columnIndex, width);
366
- }
367
- }, [context, columnIndex]);
297
+ } = useTableContext();
298
+ const isFirstRow = others['data-first'];
299
+ const cellStyle = [styles.td, isFirstRow && styles.firstBodyRow, colSpan && {
300
+ flex: colSpan
301
+ }, style].filter(Boolean);
368
302
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
369
303
  ref: ref,
370
- style: sx(styles.cell, style),
371
- onLayout: handleLayout,
304
+ style: sx(...cellStyle),
372
305
  ...others,
373
- children: (0, _withTextWrapper.withTextWrapper)(children, shouldWrapInText, styles.cell)
306
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
307
+ style: styles.tdText,
308
+ children: children
309
+ })
374
310
  });
375
311
  });
376
- Table.displayName = 'Table';
377
- Thead.displayName = 'Table.Thead';
378
- Tbody.displayName = 'Table.Tbody';
379
- Tfoot.displayName = 'Table.Tfoot';
380
- Tr.displayName = 'Table.Tr';
381
- Th.displayName = 'Table.Th';
382
312
  Td.displayName = 'Table.Td';
383
313
 
384
- // Attach sub-components with proper typing
314
+ // Main Table Component
315
+ const _Table = exports._Table = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
316
+ const {
317
+ striped,
318
+ highlightOnHover,
319
+ captionSide,
320
+ horizontalSpacing,
321
+ verticalSpacing,
322
+ fontSize,
323
+ withBorder,
324
+ withColumnBorders,
325
+ children,
326
+ style,
327
+ horizontallyScrollable,
328
+ ...others
329
+ } = (0, _themeProvider.useComponentDefaultProps)('Table', defaultProps, props);
330
+ const {
331
+ styles,
332
+ sx
333
+ } = useStyles({
334
+ horizontalSpacing,
335
+ verticalSpacing,
336
+ fontSize,
337
+ withBorder,
338
+ withColumnBorders,
339
+ striped
340
+ }, {
341
+ name: 'Table'
342
+ });
343
+ const contextValue = {
344
+ styles,
345
+ sx,
346
+ striped: striped || false,
347
+ highlightOnHover: highlightOnHover || false
348
+ };
349
+ const tableContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index.BoxView, {
350
+ ref: ref,
351
+ style: sx(styles.container, style),
352
+ ...others,
353
+ children: [captionSide === 'top' && _react.default.Children.toArray(children).find(child => /*#__PURE__*/_react.default.isValidElement(child) && child.type.displayName === 'Table.Caption'), _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && child.type.displayName !== 'Table.Caption'), captionSide === 'bottom' && _react.default.Children.toArray(children).find(child => /*#__PURE__*/_react.default.isValidElement(child) && child.type.displayName === 'Table.Caption')]
354
+ });
355
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(TableContext.Provider, {
356
+ value: contextValue,
357
+ children: horizontallyScrollable ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
358
+ horizontal: true,
359
+ style: styles.scrollView,
360
+ showsHorizontalScrollIndicator: true,
361
+ children: tableContent
362
+ }) : tableContent
363
+ });
364
+ });
365
+ _Table.displayName = 'Table';
385
366
 
386
- const TableWithSubComponents = exports.Table = Table;
387
- TableWithSubComponents.Thead = Thead;
388
- TableWithSubComponents.Tbody = Tbody;
389
- TableWithSubComponents.Tfoot = Tfoot;
390
- TableWithSubComponents.Tr = Tr;
391
- TableWithSubComponents.Th = Th;
392
- TableWithSubComponents.Td = Td;
367
+ // Attach compound components
368
+ const Table = exports.Table = Object.assign(_Table, {
369
+ Caption: TableCaption,
370
+ THead,
371
+ TBody,
372
+ TFoot,
373
+ Tr,
374
+ Th,
375
+ Td
376
+ });
393
377
  //# sourceMappingURL=index.js.map