react-native-mantine 0.13.0 → 0.15.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 (511) hide show
  1. package/README.md +138 -0
  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/LinearGradient/PlatformLinearGradient.js +9 -9
  28. package/lib/commonjs/components/LinearGradient/PlatformLinearGradient.js.map +1 -1
  29. package/lib/commonjs/components/Menu/index.js +4 -5
  30. package/lib/commonjs/components/Menu/index.js.map +1 -1
  31. package/lib/commonjs/components/MultiSelect/index.js +8 -9
  32. package/lib/commonjs/components/MultiSelect/index.js.map +1 -1
  33. package/lib/commonjs/components/NativeSelect/index.js +14 -14
  34. package/lib/commonjs/components/NativeSelect/index.js.map +1 -1
  35. package/lib/commonjs/components/NavLink/index.js +43 -20
  36. package/lib/commonjs/components/NavLink/index.js.map +1 -1
  37. package/lib/commonjs/components/Notification/index.js +5 -6
  38. package/lib/commonjs/components/Notification/index.js.map +1 -1
  39. package/lib/commonjs/components/Pagination/index.js +5 -6
  40. package/lib/commonjs/components/Pagination/index.js.map +1 -1
  41. package/lib/commonjs/components/PinInput/index.js +3 -3
  42. package/lib/commonjs/components/PinInput/index.js.map +1 -1
  43. package/lib/commonjs/components/Progress/index.js +3 -5
  44. package/lib/commonjs/components/Progress/index.js.map +1 -1
  45. package/lib/commonjs/components/Radio/index.js +4 -5
  46. package/lib/commonjs/components/Radio/index.js.map +1 -1
  47. package/lib/commonjs/components/Rating/index.js +2 -4
  48. package/lib/commonjs/components/Rating/index.js.map +1 -1
  49. package/lib/commonjs/components/RingProgress/index.js +3 -4
  50. package/lib/commonjs/components/RingProgress/index.js.map +1 -1
  51. package/lib/commonjs/components/Select/index.js +7 -8
  52. package/lib/commonjs/components/Select/index.js.map +1 -1
  53. package/lib/commonjs/components/SimpleGrid/index.js +4 -2
  54. package/lib/commonjs/components/SimpleGrid/index.js.map +1 -1
  55. package/lib/commonjs/components/Spoiler/index.js +1 -1
  56. package/lib/commonjs/components/Spoiler/index.js.map +1 -1
  57. package/lib/commonjs/components/Stepper/index.js +8 -6
  58. package/lib/commonjs/components/Stepper/index.js.map +1 -1
  59. package/lib/commonjs/components/Switch/index.js +4 -5
  60. package/lib/commonjs/components/Switch/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 +35 -46
  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 +3 -3
  92. package/lib/commonjs/theme/functions/fns/gradient/gradient.js.map +1 -1
  93. package/lib/commonjs/theme/functions/fns/helpers.js +51 -3
  94. package/lib/commonjs/theme/functions/fns/helpers.js.map +1 -1
  95. package/lib/commonjs/theme/functions/fns/index.js +151 -6
  96. package/lib/commonjs/theme/functions/fns/index.js.map +1 -1
  97. package/lib/commonjs/theme/functions/fns/primary-shade.js +81 -2
  98. package/lib/commonjs/theme/functions/fns/primary-shade.js.map +1 -1
  99. package/lib/commonjs/theme/functions/fns/shadow.js.map +1 -1
  100. package/lib/commonjs/theme/functions/fns/size.js +2 -1
  101. package/lib/commonjs/theme/functions/fns/size.js.map +1 -1
  102. package/lib/commonjs/theme/functions/fns/theme-color/color-utils.js +196 -0
  103. package/lib/commonjs/theme/functions/fns/theme-color/color-utils.js.map +1 -0
  104. package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js +92 -9
  105. package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js.map +1 -1
  106. package/lib/commonjs/theme/functions/fns/variant.js +112 -17
  107. package/lib/commonjs/theme/functions/fns/variant.js.map +1 -1
  108. package/lib/commonjs/theme/functions/index.js +172 -0
  109. package/lib/commonjs/theme/functions/index.js.map +1 -0
  110. package/lib/commonjs/theme/index.js +116 -14
  111. package/lib/commonjs/theme/index.js.map +1 -1
  112. package/lib/commonjs/theme/theme-provider.js +1 -22
  113. package/lib/commonjs/theme/theme-provider.js.map +1 -1
  114. package/lib/commonjs/theme/types.js +6 -0
  115. package/lib/commonjs/theme/types.js.map +1 -0
  116. package/lib/commonjs/theme/utils/withTextWrapper.js +1 -2
  117. package/lib/commonjs/theme/utils/withTextWrapper.js.map +1 -1
  118. package/lib/module/components/ActionIcon/ActionIcon.js +1 -1
  119. package/lib/module/components/ActionIcon/ActionIcon.js.map +1 -1
  120. package/lib/module/components/Anchor/index.js +3 -4
  121. package/lib/module/components/Anchor/index.js.map +1 -1
  122. package/lib/module/components/Avatar/index.js +1 -2
  123. package/lib/module/components/Avatar/index.js.map +1 -1
  124. package/lib/module/components/Badge/index.js +54 -24
  125. package/lib/module/components/Badge/index.js.map +1 -1
  126. package/lib/module/components/Blockquote/index.js +4 -5
  127. package/lib/module/components/Blockquote/index.js.map +1 -1
  128. package/lib/module/components/Button/index.js +7 -1
  129. package/lib/module/components/Button/index.js.map +1 -1
  130. package/lib/module/components/Center/index.js.map +1 -1
  131. package/lib/module/components/Checkbox/index.js +4 -5
  132. package/lib/module/components/Checkbox/index.js.map +1 -1
  133. package/lib/module/components/Chip/index.js +40 -21
  134. package/lib/module/components/Chip/index.js.map +1 -1
  135. package/lib/module/components/Code/index.js +6 -4
  136. package/lib/module/components/Code/index.js.map +1 -1
  137. package/lib/module/components/Grid/index.js +18 -13
  138. package/lib/module/components/Grid/index.js.map +1 -1
  139. package/lib/module/components/Highlight/index.js +1 -1
  140. package/lib/module/components/Highlight/index.js.map +1 -1
  141. package/lib/module/components/Indicator/index.js +2 -3
  142. package/lib/module/components/Indicator/index.js.map +1 -1
  143. package/lib/module/components/LinearGradient/PlatformLinearGradient.js +9 -9
  144. package/lib/module/components/LinearGradient/PlatformLinearGradient.js.map +1 -1
  145. package/lib/module/components/Menu/index.js +4 -5
  146. package/lib/module/components/Menu/index.js.map +1 -1
  147. package/lib/module/components/MultiSelect/index.js +8 -9
  148. package/lib/module/components/MultiSelect/index.js.map +1 -1
  149. package/lib/module/components/NativeSelect/index.js +14 -14
  150. package/lib/module/components/NativeSelect/index.js.map +1 -1
  151. package/lib/module/components/NavLink/index.js +43 -20
  152. package/lib/module/components/NavLink/index.js.map +1 -1
  153. package/lib/module/components/Notification/index.js +5 -6
  154. package/lib/module/components/Notification/index.js.map +1 -1
  155. package/lib/module/components/Pagination/index.js +5 -6
  156. package/lib/module/components/Pagination/index.js.map +1 -1
  157. package/lib/module/components/PinInput/index.js +3 -3
  158. package/lib/module/components/PinInput/index.js.map +1 -1
  159. package/lib/module/components/Progress/index.js +3 -5
  160. package/lib/module/components/Progress/index.js.map +1 -1
  161. package/lib/module/components/Radio/index.js +4 -5
  162. package/lib/module/components/Radio/index.js.map +1 -1
  163. package/lib/module/components/Rating/index.js +2 -4
  164. package/lib/module/components/Rating/index.js.map +1 -1
  165. package/lib/module/components/RingProgress/index.js +3 -4
  166. package/lib/module/components/RingProgress/index.js.map +1 -1
  167. package/lib/module/components/Select/index.js +7 -8
  168. package/lib/module/components/Select/index.js.map +1 -1
  169. package/lib/module/components/SimpleGrid/index.js +4 -2
  170. package/lib/module/components/SimpleGrid/index.js.map +1 -1
  171. package/lib/module/components/Spoiler/index.js +1 -1
  172. package/lib/module/components/Spoiler/index.js.map +1 -1
  173. package/lib/module/components/Stepper/index.js +8 -6
  174. package/lib/module/components/Stepper/index.js.map +1 -1
  175. package/lib/module/components/Switch/index.js +4 -5
  176. package/lib/module/components/Switch/index.js.map +1 -1
  177. package/lib/module/components/Text/index.js +78 -17
  178. package/lib/module/components/Text/index.js.map +1 -1
  179. package/lib/module/components/ThemeIcon/index.js +40 -19
  180. package/lib/module/components/ThemeIcon/index.js.map +1 -1
  181. package/lib/module/components/Timeline/index.js +6 -5
  182. package/lib/module/components/Timeline/index.js.map +1 -1
  183. package/lib/module/components/Title/index.js +5 -17
  184. package/lib/module/components/Title/index.js.map +1 -1
  185. package/lib/module/components/Tooltip/index.js +1 -2
  186. package/lib/module/components/Tooltip/index.js.map +1 -1
  187. package/lib/module/components/TransferList/index.js +9 -10
  188. package/lib/module/components/TransferList/index.js.map +1 -1
  189. package/lib/module/components/UnstyledButton/UnstyledButton.styles.js +2 -2
  190. package/lib/module/components/UnstyledButton/UnstyledButton.styles.js.map +1 -1
  191. package/lib/module/components/index.js +0 -1
  192. package/lib/module/components/index.js.map +1 -1
  193. package/lib/module/index.js +1 -0
  194. package/lib/module/index.js.map +1 -1
  195. package/lib/module/theme/create-theme.js +114 -24
  196. package/lib/module/theme/create-theme.js.map +1 -1
  197. package/lib/module/theme/default-colors.js +99 -0
  198. package/lib/module/theme/default-colors.js.map +1 -0
  199. package/lib/module/theme/default-theme.js +143 -127
  200. package/lib/module/theme/default-theme.js.map +1 -1
  201. package/lib/module/theme/functions/attach-functions.js +47 -14
  202. package/lib/module/theme/functions/attach-functions.js.map +1 -1
  203. package/lib/module/theme/functions/fns/breakpoints.js.map +1 -1
  204. package/lib/module/theme/functions/fns/color-scheme-value.js +180 -0
  205. package/lib/module/theme/functions/fns/color-scheme-value.js.map +1 -0
  206. package/lib/module/theme/functions/fns/dimmed.js.map +1 -1
  207. package/lib/module/theme/functions/fns/gradient/gradient.js +2 -2
  208. package/lib/module/theme/functions/fns/gradient/gradient.js.map +1 -1
  209. package/lib/module/theme/functions/fns/helpers.js +48 -2
  210. package/lib/module/theme/functions/fns/helpers.js.map +1 -1
  211. package/lib/module/theme/functions/fns/index.js +35 -7
  212. package/lib/module/theme/functions/fns/index.js.map +1 -1
  213. package/lib/module/theme/functions/fns/primary-shade.js +78 -2
  214. package/lib/module/theme/functions/fns/primary-shade.js.map +1 -1
  215. package/lib/module/theme/functions/fns/shadow.js.map +1 -1
  216. package/lib/module/theme/functions/fns/size.js +2 -1
  217. package/lib/module/theme/functions/fns/size.js.map +1 -1
  218. package/lib/module/theme/functions/fns/theme-color/color-utils.js +189 -0
  219. package/lib/module/theme/functions/fns/theme-color/color-utils.js.map +1 -0
  220. package/lib/module/theme/functions/fns/theme-color/theme-color.js +91 -9
  221. package/lib/module/theme/functions/fns/theme-color/theme-color.js.map +1 -1
  222. package/lib/module/theme/functions/fns/variant.js +112 -17
  223. package/lib/module/theme/functions/fns/variant.js.map +1 -1
  224. package/lib/module/theme/functions/index.js +22 -0
  225. package/lib/module/theme/functions/index.js.map +1 -0
  226. package/lib/module/theme/index.js +16 -4
  227. package/lib/module/theme/index.js.map +1 -1
  228. package/lib/module/theme/theme-provider.js +1 -22
  229. package/lib/module/theme/theme-provider.js.map +1 -1
  230. package/lib/module/theme/types.js +4 -0
  231. package/lib/module/theme/types.js.map +1 -0
  232. package/lib/module/theme/utils/withTextWrapper.js +1 -2
  233. package/lib/module/theme/utils/withTextWrapper.js.map +1 -1
  234. package/lib/typescript/commonjs/src/components/Anchor/index.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/src/components/Avatar/index.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/src/components/Badge/index.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/src/components/Blockquote/index.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/src/components/Button/Button.styles.d.ts +8 -8
  239. package/lib/typescript/commonjs/src/components/Button/index.d.ts +1 -1
  240. package/lib/typescript/commonjs/src/components/Button/index.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/src/components/Center/index.d.ts +1 -2
  242. package/lib/typescript/commonjs/src/components/Center/index.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/src/components/Checkbox/index.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/src/components/Chip/index.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/src/components/Code/index.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/src/components/ColorSwatch/index.d.ts +1 -1
  247. package/lib/typescript/commonjs/src/components/ColorSwatch/index.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/src/components/Container/index.d.ts +2 -2
  249. package/lib/typescript/commonjs/src/components/Container/index.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/src/components/Flex/index.d.ts +2 -2
  251. package/lib/typescript/commonjs/src/components/Flex/index.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/components/Grid/index.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/src/components/Highlight/index.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/src/components/Indicator/index.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/src/components/LinearGradient/PlatformLinearGradient.d.ts +1 -1
  256. package/lib/typescript/commonjs/src/components/Mark/index.d.ts +1 -1
  257. package/lib/typescript/commonjs/src/components/Mark/index.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/components/Menu/index.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/src/components/MultiSelect/index.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/src/components/NativeSelect/index.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/src/components/NavLink/index.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/src/components/Notification/index.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/src/components/Pagination/index.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/src/components/PinInput/index.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/src/components/Progress/index.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/src/components/Radio/index.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/src/components/Rating/index.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/src/components/RingProgress/index.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/src/components/Select/index.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/components/SimpleGrid/index.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/src/components/Space/index.d.ts +2 -2
  272. package/lib/typescript/commonjs/src/components/Space/index.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/src/components/Switch/index.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/src/components/Text/index.d.ts +54 -7
  275. package/lib/typescript/commonjs/src/components/Text/index.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/src/components/ThemeIcon/index.d.ts.map +1 -1
  277. package/lib/typescript/commonjs/src/components/Timeline/index.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/src/components/Title/index.d.ts +1 -0
  279. package/lib/typescript/commonjs/src/components/Title/index.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/src/components/Tooltip/index.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/src/components/TransferList/index.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts +2 -2
  283. package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/src/components/index.d.ts +0 -1
  285. package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/src/index.d.ts +1 -1
  287. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/theme/create-styles.d.ts +1 -1
  289. package/lib/typescript/commonjs/src/theme/create-styles.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/src/theme/create-theme.d.ts +68 -2
  291. package/lib/typescript/commonjs/src/theme/create-theme.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/src/theme/default-colors.d.ts +12 -0
  293. package/lib/typescript/commonjs/src/theme/default-colors.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/src/theme/default-theme.d.ts +15 -108
  295. package/lib/typescript/commonjs/src/theme/default-theme.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts +20 -1
  297. package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts.map +1 -1
  298. package/lib/typescript/commonjs/src/theme/functions/fns/breakpoints.d.ts +3 -3
  299. package/lib/typescript/commonjs/src/theme/functions/fns/breakpoints.d.ts.map +1 -1
  300. package/lib/typescript/commonjs/src/theme/functions/fns/color-scheme-value.d.ts +100 -0
  301. package/lib/typescript/commonjs/src/theme/functions/fns/color-scheme-value.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/src/theme/functions/fns/dimmed.d.ts +2 -2
  303. package/lib/typescript/commonjs/src/theme/functions/fns/dimmed.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/src/theme/functions/fns/gradient/gradient.d.ts +4 -5
  305. package/lib/typescript/commonjs/src/theme/functions/fns/gradient/gradient.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts +36 -8
  307. package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts +40 -14
  309. package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -1
  310. package/lib/typescript/commonjs/src/theme/functions/fns/primary-shade.d.ts +53 -3
  311. package/lib/typescript/commonjs/src/theme/functions/fns/primary-shade.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/src/theme/functions/fns/shadow.d.ts +1 -1
  313. package/lib/typescript/commonjs/src/theme/functions/fns/shadow.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts +2 -2
  315. package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/color-utils.d.ts +50 -0
  317. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/color-utils.d.ts.map +1 -0
  318. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts +51 -5
  319. package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -1
  320. package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts +52 -19
  321. package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts.map +1 -1
  322. package/lib/typescript/commonjs/src/theme/functions/index.d.ts +19 -0
  323. package/lib/typescript/commonjs/src/theme/functions/index.d.ts.map +1 -0
  324. package/lib/typescript/commonjs/src/theme/index.d.ts +9 -6
  325. package/lib/typescript/commonjs/src/theme/index.d.ts.map +1 -1
  326. package/lib/typescript/commonjs/src/theme/theme-provider.d.ts +1 -1
  327. package/lib/typescript/commonjs/src/theme/theme-provider.d.ts.map +1 -1
  328. package/lib/typescript/commonjs/src/theme/types/DefaultProps.d.ts +2 -2
  329. package/lib/typescript/commonjs/src/theme/types/DefaultProps.d.ts.map +1 -1
  330. package/lib/typescript/commonjs/src/theme/types.d.ts +494 -0
  331. package/lib/typescript/commonjs/src/theme/types.d.ts.map +1 -0
  332. package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts +1 -1
  333. package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts.map +1 -1
  334. package/lib/typescript/module/src/components/Anchor/index.d.ts.map +1 -1
  335. package/lib/typescript/module/src/components/Avatar/index.d.ts.map +1 -1
  336. package/lib/typescript/module/src/components/Badge/index.d.ts.map +1 -1
  337. package/lib/typescript/module/src/components/Blockquote/index.d.ts.map +1 -1
  338. package/lib/typescript/module/src/components/Button/Button.styles.d.ts +8 -8
  339. package/lib/typescript/module/src/components/Button/index.d.ts +1 -1
  340. package/lib/typescript/module/src/components/Button/index.d.ts.map +1 -1
  341. package/lib/typescript/module/src/components/Center/index.d.ts +1 -2
  342. package/lib/typescript/module/src/components/Center/index.d.ts.map +1 -1
  343. package/lib/typescript/module/src/components/Checkbox/index.d.ts.map +1 -1
  344. package/lib/typescript/module/src/components/Chip/index.d.ts.map +1 -1
  345. package/lib/typescript/module/src/components/Code/index.d.ts.map +1 -1
  346. package/lib/typescript/module/src/components/ColorSwatch/index.d.ts +1 -1
  347. package/lib/typescript/module/src/components/ColorSwatch/index.d.ts.map +1 -1
  348. package/lib/typescript/module/src/components/Container/index.d.ts +2 -2
  349. package/lib/typescript/module/src/components/Container/index.d.ts.map +1 -1
  350. package/lib/typescript/module/src/components/Flex/index.d.ts +2 -2
  351. package/lib/typescript/module/src/components/Flex/index.d.ts.map +1 -1
  352. package/lib/typescript/module/src/components/Grid/index.d.ts.map +1 -1
  353. package/lib/typescript/module/src/components/Highlight/index.d.ts.map +1 -1
  354. package/lib/typescript/module/src/components/Indicator/index.d.ts.map +1 -1
  355. package/lib/typescript/module/src/components/LinearGradient/PlatformLinearGradient.d.ts +1 -1
  356. package/lib/typescript/module/src/components/Mark/index.d.ts +1 -1
  357. package/lib/typescript/module/src/components/Mark/index.d.ts.map +1 -1
  358. package/lib/typescript/module/src/components/Menu/index.d.ts.map +1 -1
  359. package/lib/typescript/module/src/components/MultiSelect/index.d.ts.map +1 -1
  360. package/lib/typescript/module/src/components/NativeSelect/index.d.ts.map +1 -1
  361. package/lib/typescript/module/src/components/NavLink/index.d.ts.map +1 -1
  362. package/lib/typescript/module/src/components/Notification/index.d.ts.map +1 -1
  363. package/lib/typescript/module/src/components/Pagination/index.d.ts.map +1 -1
  364. package/lib/typescript/module/src/components/PinInput/index.d.ts.map +1 -1
  365. package/lib/typescript/module/src/components/Progress/index.d.ts.map +1 -1
  366. package/lib/typescript/module/src/components/Radio/index.d.ts.map +1 -1
  367. package/lib/typescript/module/src/components/Rating/index.d.ts.map +1 -1
  368. package/lib/typescript/module/src/components/RingProgress/index.d.ts.map +1 -1
  369. package/lib/typescript/module/src/components/Select/index.d.ts.map +1 -1
  370. package/lib/typescript/module/src/components/SimpleGrid/index.d.ts.map +1 -1
  371. package/lib/typescript/module/src/components/Space/index.d.ts +2 -2
  372. package/lib/typescript/module/src/components/Space/index.d.ts.map +1 -1
  373. package/lib/typescript/module/src/components/Switch/index.d.ts.map +1 -1
  374. package/lib/typescript/module/src/components/Text/index.d.ts +54 -7
  375. package/lib/typescript/module/src/components/Text/index.d.ts.map +1 -1
  376. package/lib/typescript/module/src/components/ThemeIcon/index.d.ts.map +1 -1
  377. package/lib/typescript/module/src/components/Timeline/index.d.ts.map +1 -1
  378. package/lib/typescript/module/src/components/Title/index.d.ts +1 -0
  379. package/lib/typescript/module/src/components/Title/index.d.ts.map +1 -1
  380. package/lib/typescript/module/src/components/Tooltip/index.d.ts.map +1 -1
  381. package/lib/typescript/module/src/components/TransferList/index.d.ts.map +1 -1
  382. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts +2 -2
  383. package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -1
  384. package/lib/typescript/module/src/components/index.d.ts +0 -1
  385. package/lib/typescript/module/src/components/index.d.ts.map +1 -1
  386. package/lib/typescript/module/src/index.d.ts +1 -1
  387. package/lib/typescript/module/src/index.d.ts.map +1 -1
  388. package/lib/typescript/module/src/theme/create-styles.d.ts +1 -1
  389. package/lib/typescript/module/src/theme/create-styles.d.ts.map +1 -1
  390. package/lib/typescript/module/src/theme/create-theme.d.ts +68 -2
  391. package/lib/typescript/module/src/theme/create-theme.d.ts.map +1 -1
  392. package/lib/typescript/module/src/theme/default-colors.d.ts +12 -0
  393. package/lib/typescript/module/src/theme/default-colors.d.ts.map +1 -0
  394. package/lib/typescript/module/src/theme/default-theme.d.ts +15 -108
  395. package/lib/typescript/module/src/theme/default-theme.d.ts.map +1 -1
  396. package/lib/typescript/module/src/theme/functions/attach-functions.d.ts +20 -1
  397. package/lib/typescript/module/src/theme/functions/attach-functions.d.ts.map +1 -1
  398. package/lib/typescript/module/src/theme/functions/fns/breakpoints.d.ts +3 -3
  399. package/lib/typescript/module/src/theme/functions/fns/breakpoints.d.ts.map +1 -1
  400. package/lib/typescript/module/src/theme/functions/fns/color-scheme-value.d.ts +100 -0
  401. package/lib/typescript/module/src/theme/functions/fns/color-scheme-value.d.ts.map +1 -0
  402. package/lib/typescript/module/src/theme/functions/fns/dimmed.d.ts +2 -2
  403. package/lib/typescript/module/src/theme/functions/fns/dimmed.d.ts.map +1 -1
  404. package/lib/typescript/module/src/theme/functions/fns/gradient/gradient.d.ts +4 -5
  405. package/lib/typescript/module/src/theme/functions/fns/gradient/gradient.d.ts.map +1 -1
  406. package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts +36 -8
  407. package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts.map +1 -1
  408. package/lib/typescript/module/src/theme/functions/fns/index.d.ts +40 -14
  409. package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -1
  410. package/lib/typescript/module/src/theme/functions/fns/primary-shade.d.ts +53 -3
  411. package/lib/typescript/module/src/theme/functions/fns/primary-shade.d.ts.map +1 -1
  412. package/lib/typescript/module/src/theme/functions/fns/shadow.d.ts +1 -1
  413. package/lib/typescript/module/src/theme/functions/fns/shadow.d.ts.map +1 -1
  414. package/lib/typescript/module/src/theme/functions/fns/size.d.ts +2 -2
  415. package/lib/typescript/module/src/theme/functions/fns/size.d.ts.map +1 -1
  416. package/lib/typescript/module/src/theme/functions/fns/theme-color/color-utils.d.ts +50 -0
  417. package/lib/typescript/module/src/theme/functions/fns/theme-color/color-utils.d.ts.map +1 -0
  418. package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts +51 -5
  419. package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -1
  420. package/lib/typescript/module/src/theme/functions/fns/variant.d.ts +52 -19
  421. package/lib/typescript/module/src/theme/functions/fns/variant.d.ts.map +1 -1
  422. package/lib/typescript/module/src/theme/functions/index.d.ts +19 -0
  423. package/lib/typescript/module/src/theme/functions/index.d.ts.map +1 -0
  424. package/lib/typescript/module/src/theme/index.d.ts +9 -6
  425. package/lib/typescript/module/src/theme/index.d.ts.map +1 -1
  426. package/lib/typescript/module/src/theme/theme-provider.d.ts +1 -1
  427. package/lib/typescript/module/src/theme/theme-provider.d.ts.map +1 -1
  428. package/lib/typescript/module/src/theme/types/DefaultProps.d.ts +2 -2
  429. package/lib/typescript/module/src/theme/types/DefaultProps.d.ts.map +1 -1
  430. package/lib/typescript/module/src/theme/types.d.ts +494 -0
  431. package/lib/typescript/module/src/theme/types.d.ts.map +1 -0
  432. package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts +1 -1
  433. package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts.map +1 -1
  434. package/package.json +2 -4
  435. package/src/components/ActionIcon/ActionIcon.tsx +3 -3
  436. package/src/components/Anchor/index.tsx +3 -4
  437. package/src/components/Avatar/index.tsx +1 -2
  438. package/src/components/Badge/index.tsx +36 -19
  439. package/src/components/Blockquote/index.tsx +4 -6
  440. package/src/components/Button/index.tsx +6 -2
  441. package/src/components/Center/index.tsx +1 -2
  442. package/src/components/Checkbox/index.tsx +4 -5
  443. package/src/components/Chip/index.tsx +25 -18
  444. package/src/components/Code/index.tsx +7 -5
  445. package/src/components/ColorSwatch/index.tsx +1 -1
  446. package/src/components/Container/index.tsx +2 -2
  447. package/src/components/Flex/index.tsx +2 -2
  448. package/src/components/Grid/index.tsx +16 -10
  449. package/src/components/Highlight/index.tsx +1 -2
  450. package/src/components/Indicator/index.tsx +3 -4
  451. package/src/components/LinearGradient/PlatformLinearGradient.tsx +9 -9
  452. package/src/components/Mark/index.tsx +1 -1
  453. package/src/components/Menu/index.tsx +8 -10
  454. package/src/components/MultiSelect/index.tsx +13 -15
  455. package/src/components/NativeSelect/index.tsx +34 -21
  456. package/src/components/NavLink/index.tsx +27 -23
  457. package/src/components/Notification/index.tsx +5 -6
  458. package/src/components/Pagination/index.tsx +5 -6
  459. package/src/components/PinInput/index.tsx +5 -6
  460. package/src/components/Progress/index.tsx +5 -6
  461. package/src/components/Radio/index.tsx +4 -5
  462. package/src/components/Rating/index.tsx +2 -4
  463. package/src/components/RingProgress/index.tsx +3 -5
  464. package/src/components/Select/index.tsx +11 -13
  465. package/src/components/SimpleGrid/index.tsx +5 -2
  466. package/src/components/Space/index.tsx +2 -2
  467. package/src/components/Spoiler/index.tsx +1 -1
  468. package/src/components/Stepper/index.tsx +17 -17
  469. package/src/components/Switch/index.tsx +5 -6
  470. package/src/components/Text/index.tsx +125 -28
  471. package/src/components/ThemeIcon/index.tsx +23 -23
  472. package/src/components/Timeline/index.tsx +12 -15
  473. package/src/components/Title/index.tsx +5 -22
  474. package/src/components/Tooltip/index.tsx +1 -3
  475. package/src/components/TransferList/index.tsx +16 -18
  476. package/src/components/UnstyledButton/UnstyledButton.styles.ts +4 -2
  477. package/src/components/index.tsx +0 -1
  478. package/src/index.tsx +1 -1
  479. package/src/theme/create-styles.ts +1 -1
  480. package/src/theme/create-theme.ts +134 -23
  481. package/src/theme/default-colors.ts +252 -0
  482. package/src/theme/default-theme.ts +178 -392
  483. package/src/theme/functions/attach-functions.ts +57 -10
  484. package/src/theme/functions/fns/breakpoints.ts +4 -4
  485. package/src/theme/functions/fns/color-scheme-value.ts +200 -0
  486. package/src/theme/functions/fns/dimmed.ts +2 -2
  487. package/src/theme/functions/fns/gradient/gradient.ts +4 -5
  488. package/src/theme/functions/fns/helpers.ts +50 -9
  489. package/src/theme/functions/fns/index.ts +63 -3
  490. package/src/theme/functions/fns/primary-shade.ts +84 -8
  491. package/src/theme/functions/fns/shadow.ts +1 -1
  492. package/src/theme/functions/fns/size.ts +4 -3
  493. package/src/theme/functions/fns/theme-color/color-utils.ts +193 -0
  494. package/src/theme/functions/fns/theme-color/theme-color.ts +85 -17
  495. package/src/theme/functions/fns/variant.ts +106 -44
  496. package/src/theme/functions/index.ts +19 -0
  497. package/src/theme/index.ts +91 -0
  498. package/src/theme/theme-provider.tsx +2 -17
  499. package/src/theme/types/DefaultProps.ts +3 -3
  500. package/src/theme/types.ts +625 -0
  501. package/src/theme/utils/withTextWrapper.tsx +2 -3
  502. package/lib/commonjs/components/Slider/index.js +0 -300
  503. package/lib/commonjs/components/Slider/index.js.map +0 -1
  504. package/lib/module/components/Slider/index.js +0 -295
  505. package/lib/module/components/Slider/index.js.map +0 -1
  506. package/lib/typescript/commonjs/src/components/Slider/index.d.ts +0 -43
  507. package/lib/typescript/commonjs/src/components/Slider/index.d.ts.map +0 -1
  508. package/lib/typescript/module/src/components/Slider/index.d.ts +0 -43
  509. package/lib/typescript/module/src/components/Slider/index.d.ts.map +0 -1
  510. package/src/components/Slider/index.tsx +0 -349
  511. package/src/theme/index.tsx +0 -9
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Color utility functions for custom color support
3
+ * Handles detection and manipulation of custom hex/rgb/rgba colors
4
+ */
5
+ /**
6
+ * Check if a color string is a custom color value (not a palette key)
7
+ *
8
+ * Custom colors include:
9
+ * - Hex colors: #fff, #ffffff
10
+ * - RGB colors: rgb(255, 255, 255)
11
+ * - RGBA colors: rgba(255, 255, 255, 0.5)
12
+ * - HSL colors: hsl(0, 100%, 50%)
13
+ * - HSLA colors: hsla(0, 100%, 50%, 0.5)
14
+ * - CSS named colors like 'transparent', 'currentColor'
15
+ *
16
+ * @param color - Color string to check
17
+ * @returns true if color is a custom value, false if it might be a palette key
18
+ */
19
+ export declare function isCustomColor(color: string): boolean;
20
+ /**
21
+ * Generate a lighter shade of a custom color
22
+ * Used when shade 0-5 is requested for custom colors
23
+ *
24
+ * @param color - Base color (hex or rgb) - treated as shade 6
25
+ * @param shadeIndex - Shade index (0-5)
26
+ * @returns Lighter color string
27
+ */
28
+ export declare function generateLighterShade(color: string, shadeIndex: number): string;
29
+ /**
30
+ * Generate a darker shade of a custom color
31
+ * Used when shade 7-9 is requested for custom colors
32
+ *
33
+ * @param color - Base color (hex or rgb) - treated as shade 6
34
+ * @param shadeIndex - Shade index (7-9)
35
+ * @returns Darker color string
36
+ */
37
+ export declare function generateDarkerShade(color: string, shadeIndex: number): string;
38
+ /**
39
+ * Get a shade variation of a custom color
40
+ *
41
+ * For custom colors, we treat shade 6 as the base color (no modification).
42
+ * This aligns with the default primaryShade for light mode.
43
+ * Shades 0-5 are lighter, shades 7-9 are darker.
44
+ *
45
+ * @param color - Base color (hex or rgb)
46
+ * @param shade - Shade index (0-9), where 6 is the base color
47
+ * @returns Color at the requested shade
48
+ */
49
+ export declare function getCustomColorShade(color: string, shade: number): string;
50
+ //# sourceMappingURL=color-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-utils.d.ts","sourceRoot":"","sources":["../../../../../../../../src/theme/functions/fns/theme-color/color-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CA2BpD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAa9E;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAc7E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAaxE"}
@@ -1,9 +1,55 @@
1
- import type { MantineTheme } from '../../../default-theme';
2
- import type { MantineColor } from '../../../types';
1
+ /**
2
+ * Theme color helper function
3
+ * Retrieves colors from theme palette with proper shade handling
4
+ * Aligned with Mantine web's themeColor implementation
5
+ *
6
+ * Now supports custom color values (hex, rgb, rgba) that are not in the theme palette.
7
+ * Custom colors can be shaded on the fly using color manipulation algorithms.
8
+ */
9
+ import type { MantineThemeBase, MantineColor, Shade } from '../../../types';
3
10
  export interface ThemeColorInput {
4
- theme: MantineTheme;
11
+ theme: MantineThemeBase;
5
12
  color: MantineColor;
6
- shade?: number;
13
+ shade?: Shade;
14
+ primaryFallback?: boolean;
7
15
  }
8
- export declare function themeColor({ theme, color, shade }: ThemeColorInput): string;
16
+ /**
17
+ * Get a color value from the theme
18
+ *
19
+ * @param theme - Mantine theme object
20
+ * @param color - Color name or CSS color value (now supports hex/rgb/rgba)
21
+ * @param shade - Optional shade (0-9). If not provided, uses primaryShade
22
+ * @param primaryFallback - If true and color not found, falls back to primary color
23
+ * @returns Color string value
24
+ *
25
+ * @example
26
+ * // Get blue at primary shade (6 for light mode, 8 for dark mode)
27
+ * themeColor({ theme, color: 'blue' })
28
+ *
29
+ * @example
30
+ * // Get blue at specific shade
31
+ * themeColor({ theme, color: 'blue', shade: 5 })
32
+ *
33
+ * @example
34
+ * // Pass through CSS color values
35
+ * themeColor({ theme, color: '#ff0000' }) // returns '#ff0000'
36
+ *
37
+ * @example
38
+ * // Use custom hex color with shade
39
+ * themeColor({ theme, color: '#FF5733', shade: 7 }) // returns darker version
40
+ *
41
+ * @example
42
+ * // Use custom rgb color with shade
43
+ * themeColor({ theme, color: 'rgb(255, 87, 51)', shade: 3 }) // returns lighter version
44
+ *
45
+ * @example
46
+ * // Use primary color fallback
47
+ * themeColor({ theme, color: 'unknown', primaryFallback: true })
48
+ */
49
+ export declare function themeColor({ theme, color, shade, primaryFallback, }: ThemeColorInput): string;
50
+ /**
51
+ * Curried version of themeColor for use with theme.fn
52
+ * @internal
53
+ */
54
+ export declare function createThemeColorFunction(theme: MantineThemeBase): (color: MantineColor, shade?: Shade, primaryFallback?: boolean) => string;
9
55
  //# sourceMappingURL=theme-color.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme-color.d.ts","sourceRoot":"","sources":["../../../../../../../../src/theme/functions/fns/theme-color/theme-color.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,eAAe,GAAG,MAAM,CA2B3E"}
1
+ {"version":3,"file":"theme-color.d.ts","sourceRoot":"","sources":["../../../../../../../../src/theme/functions/fns/theme-color/theme-color.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAI5E,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,KAAK,EACL,eAAuB,GACxB,EAAE,eAAe,GAAG,MAAM,CAqC1B;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,IACtD,OAAO,YAAY,EAAE,QAAQ,KAAK,EAAE,kBAAkB,OAAO,KAAG,MAAM,CAG/E"}
@@ -1,20 +1,53 @@
1
- import type { MantineTheme } from '../../default-theme';
2
- import type { MantineColor } from '../../types';
3
- export interface VariantInput {
4
- variant: 'filled' | 'outline' | 'light' | 'white' | 'default' | 'subtle' | 'gradient';
5
- color?: MantineColor;
6
- gradient?: {
7
- from: string;
8
- to: string;
9
- deg?: number;
10
- };
11
- primaryFallback?: boolean;
12
- }
13
- export interface VariantOutput {
14
- background: string;
15
- color: string;
16
- border: string;
17
- hover?: string;
18
- }
19
- export declare const variant: (theme: MantineTheme) => (input: VariantInput) => VariantOutput;
1
+ /**
2
+ * Variant styles generator
3
+ * Creates component variant styles for React Native
4
+ * Aligned with Mantine web's variant system
5
+ *
6
+ * Now supports custom color values (hex, rgb, rgba) in addition to theme palette colors.
7
+ * Custom colors are automatically shaded using color manipulation algorithms.
8
+ */
9
+ import type { MantineThemeBase, VariantInput, VariantOutput } from '../../types';
10
+ /**
11
+ * Generate variant styles for components
12
+ *
13
+ * Supports the following variants:
14
+ * - filled: Filled background with primary color
15
+ * - light: Light background with colored text
16
+ * - outline: Transparent background with colored border
17
+ * - subtle: Transparent background with colored text
18
+ * - white: White background (useful for dark mode)
19
+ * - default: Default gray background
20
+ * - gradient: Transparent background for gradient overlays
21
+ * - transparent: Fully transparent
22
+ *
23
+ * @param theme - Mantine theme object
24
+ * @param input - Variant configuration
25
+ * @returns Style object with background, color, border, and optional hover
26
+ *
27
+ * @example
28
+ * // Filled variant with blue color
29
+ * variant(theme)({ variant: 'filled', color: 'blue' })
30
+ * // Returns: { background: '#228be6', color: '#fff', border: '#228be6' }
31
+ *
32
+ * @example
33
+ * // Light variant with red color
34
+ * variant(theme)({ variant: 'light', color: 'red' })
35
+ * // Returns: { background: '#fff5f5', color: '#f03e3e', border: 'transparent' }
36
+ *
37
+ * @example
38
+ * // Filled variant with custom hex color
39
+ * variant(theme)({ variant: 'filled', color: '#FF5733' })
40
+ * // Returns: { background: '#FF5733', color: '#fff', border: '#FF5733', hover: darker('#FF5733') }
41
+ *
42
+ * @example
43
+ * // Light variant with custom rgb color
44
+ * variant(theme)({ variant: 'light', color: 'rgb(255, 87, 51)' })
45
+ * // Returns: { background: lighter('rgb(...)'), color: darker('rgb(...)'), border: 'transparent' }
46
+ */
47
+ export declare const variant: (theme: MantineThemeBase) => (input: VariantInput) => VariantOutput;
48
+ /**
49
+ * Curried version of variant for use with theme.fn
50
+ * @internal
51
+ */
52
+ export declare function createVariantFunction(theme: MantineThemeBase): (input: VariantInput) => VariantOutput;
20
53
  //# sourceMappingURL=variant.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../../../../../src/theme/functions/fns/variant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,MAAM,WAAW,YAAY;IAC3B,OAAO,EACH,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,QAAQ,GACR,UAAU,CAAC;IACf,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,MAAM,OAAO,YAAY,KAAG,aAqFtE,CAAA"}
1
+ {"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../../../../../src/theme/functions/fns/variant.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAuB,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAItG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,gBAAgB,MAAM,OAAO,YAAY,KAAG,aAmH1E,CAAC;AAEF;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,gBAAgB,WAzHD,YAAY,KAAG,aAAa,CA2HvF"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Theme functions module
3
+ * Exports all theme-related utilities and functions
4
+ */
5
+ export { attachFunctions } from './attach-functions';
6
+ export * from './fns';
7
+ export * from './fns/primary-shade';
8
+ export * from './fns/theme-color/theme-color';
9
+ export * from './fns/variant';
10
+ export * from './fns/rgba';
11
+ export * from './fns/radius';
12
+ export * from './fns/size';
13
+ export * from './fns/shadow';
14
+ export * from './fns/gradient/gradient';
15
+ export * from './fns/lighten';
16
+ export * from './fns/darken';
17
+ export * from './fns/dimmed';
18
+ export * from './fns/breakpoints';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/functions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,cAAc,OAAO,CAAC;AACtB,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
@@ -1,10 +1,13 @@
1
- export { ThemeProvider, useTheme, Theme } from './theme-provider';
1
+ /**
2
+ * Mantine React Native Theme System
3
+ * Main export file for theme-related types and utilities
4
+ */
5
+ export type { Shade, MantineColorsTuple, DefaultMantineColor, MantineColor, MantineThemeColors, MantinePrimaryShade, ColorScheme, ColorSchemeValue, ResolveColorSchemeValue, MantineSize, MantineNumberSize, MantineSizes, MantineGradient, GradientConfig, FontWeights, HeadingStyle, MantineHeadings, IOSShadow, AndroidShadow, MantineShadow, MantineShadows, MantineVariant, VariantInput, VariantOutput, ThemeComponent, MantineThemeComponents, MantineThemeFunctions, MantineTheme, MantineThemeBase, MantineThemeOverride, DeepPartial, ThemeableStyleProps, SpacingValue, Variants, DefaultProps, } from './types';
6
+ export { DEFAULT_COLORS } from './default-colors';
7
+ export { DEFAULT_THEME, _DEFAULT_THEME } from './default-theme';
8
+ export { createTheme } from './create-theme';
9
+ export { attachFunctions, getPrimaryShade, getPrimaryColor, themeColor, variant, rgba, radius, size, shadow, gradient, lighten, darken, dimmed, largerThan, smallerThan, colorSchemeValue, resolveColorSchemeValue, resolveColorSchemeConstants, isColorSchemeValue, } from './functions';
2
10
  export { createStyles } from './create-styles';
3
11
  export { filterProps } from './filter-props';
4
12
  export { getSize } from './get-size';
5
- export { createTheme } from './create-theme';
6
- export { shadow } from './functions/fns/shadow';
7
- export type { ShadowStyles, MantineShadow } from './functions/fns/shadow';
8
- export { gradient } from './functions/fns/gradient/gradient';
9
- export type { MantineGradient, GradientConfig } from './theme.d';
10
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/theme/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/theme/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EAEV,KAAK,EACL,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,uBAAuB,EAGvB,WAAW,EACX,iBAAiB,EACjB,YAAY,EAGZ,eAAe,EACf,cAAc,EAGd,WAAW,EACX,YAAY,EACZ,eAAe,EAGf,SAAS,EACT,aAAa,EACb,aAAa,EACb,cAAc,EAGd,cAAc,EACd,YAAY,EACZ,aAAa,EAGb,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EAGpB,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,YAAY,GACb,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,EACL,eAAe,EACf,eAAe,EACf,eAAe,EACf,UAAU,EACV,OAAO,EACP,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,EACN,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,uBAAuB,EACvB,2BAA2B,EAC3B,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { ReactNode } from 'react';
3
- import type { MantineTheme } from './default-theme';
3
+ import type { MantineTheme } from './types';
4
4
  type ThemeProps = {
5
5
  children: ReactNode;
6
6
  theme?: Partial<MantineTheme>;
@@ -1 +1 @@
1
- {"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../../../../src/theme/theme-provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAOpD,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,YAAY,oBAA2B,CAAC;AAErD,eAAO,MAAM,aAAa,GAAI,iCAI3B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,YAsDT,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,YAAwC,CAAC;AAErE,eAAO,MAAM,KAAK,GAAI,iDAInB,UAAU,KAAG,KAAK,CAAC,YAerB,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,EAEzB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,CAAC,EACf,KAAK,EAAE,CAAC,GACP,CAAC,GAAG;KACJ,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACnE,CASA"}
1
+ {"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../../../../src/theme/theme-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAM5C,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,YAAY,oBAA2B,CAAC;AAErD,eAAO,MAAM,aAAa,GAAI,iCAI3B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,YAyCT,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,YAAwC,CAAC;AAErE,eAAO,MAAM,KAAK,GAAI,iDAInB,UAAU,KAAG,KAAK,CAAC,YAerB,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,EAEzB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,CAAC,EACf,KAAK,EAAE,CAAC,GACP,CAAC,GAAG;KACJ,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACnE,CASA"}
@@ -1,6 +1,6 @@
1
- type CSSObject = any;
1
+ type StyleObject = any;
2
2
  export type ClassNames<StylesNames extends string> = Partial<Record<StylesNames, string>>;
3
- export type Styles<StylesNames extends string, StylesParams extends Record<string, any> = never> = Partial<Record<StylesNames, CSSObject>> | ((theme: any, params: StylesParams, context: any) => Partial<Record<StylesNames, CSSObject>>);
3
+ export type Styles<StylesNames extends string, StylesParams extends Record<string, any> = never> = Partial<Record<StylesNames, StyleObject>> | ((theme: any, params: StylesParams, context: any) => Partial<Record<StylesNames, StyleObject>>);
4
4
  export interface DefaultProps {
5
5
  style?: any;
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultProps.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/DefaultProps.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG,GAAG,CAAC;AACrB,MAAM,MAAM,UAAU,CAAC,WAAW,SAAS,MAAM,IAAI,OAAO,CAC1D,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAC5B,CAAC;AACF,MAAM,MAAM,MAAM,CAChB,WAAW,SAAS,MAAM,EAC1B,YAAY,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,IAE9C,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,GACvC,CAAC,CACC,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,GAAG,KACT,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,GAAG,CAAC;CACb"}
1
+ {"version":3,"file":"DefaultProps.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/DefaultProps.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GAAG,GAAG,CAAC;AACvB,MAAM,MAAM,UAAU,CAAC,WAAW,SAAS,MAAM,IAAI,OAAO,CAC1D,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAC5B,CAAC;AACF,MAAM,MAAM,MAAM,CAChB,WAAW,SAAS,MAAM,EAC1B,YAAY,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,IAE9C,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,GACzC,CAAC,CACC,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,GAAG,KACT,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,GAAG,CAAC;CACb"}