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
@@ -1,34 +1,67 @@
1
1
  "use strict";
2
2
 
3
+ /**
4
+ * Attach helper functions to theme object
5
+ * Creates theme.fn object with all utility functions
6
+ * Aligned with Mantine web's theme function attachment pattern
7
+ */
8
+
3
9
  import { fns } from "./fns/index.js";
10
+ import { createPrimaryShadeFunction, createPrimaryColorFunction } from "./fns/primary-shade.js";
11
+ import { createThemeColorFunction } from "./fns/theme-color/theme-color.js";
12
+
13
+ /**
14
+ * Attach helper functions to theme base object
15
+ * Converts MantineThemeBase to full MantineTheme with fn object
16
+ *
17
+ * @param themeBase - Base theme configuration without functions
18
+ * @returns Complete theme with attached helper functions
19
+ *
20
+ * @example
21
+ * const theme = attachFunctions(baseTheme);
22
+ * theme.fn.themeColor('blue', 5); // '#339af0'
23
+ * theme.fn.primaryShade(); // 6
24
+ * theme.fn.variant({ variant: 'filled', color: 'blue' });
25
+ */
4
26
  export function attachFunctions(themeBase) {
5
27
  return {
6
28
  ...themeBase,
7
29
  fn: {
8
- radius: fns.radius(themeBase),
30
+ // Color functions
31
+ themeColor: createThemeColorFunction(themeBase),
32
+ primaryShade: createPrimaryShadeFunction(themeBase),
33
+ primaryColor: createPrimaryColorFunction(themeBase),
34
+ // Variant function
35
+ variant: fns.variant(themeBase),
36
+ // Color manipulation
9
37
  rgba: fns.rgba(themeBase),
38
+ lighten: fns.lighten,
39
+ darken: fns.darken,
40
+ dimmed: fns.dimmed(themeBase),
41
+ // Size and spacing functions
42
+ radius: fns.radius(themeBase),
10
43
  size: fns.size(themeBase),
11
- variant: fns.variant(themeBase),
12
- themeColor: (color, shade) => fns.themeColor({
13
- theme: themeBase,
14
- color,
15
- shade
16
- }),
44
+ // Visual effects
17
45
  shadow: fns.shadow,
18
46
  gradient: fns.gradient(themeBase),
47
+ // Typography functions
19
48
  fontStyles: fns.fontStyles(themeBase),
20
49
  inputFontStyles: fns.inputFontStyles(themeBase),
21
- focusStyles: fns.focusStyles(themeBase),
22
50
  placeholderStyles: fns.placeholderStyles(themeBase),
51
+ fontSize: fns.fontSize(themeBase),
52
+ lineHeight: fns.lineHeight(themeBase),
53
+ headingStyles: fns.headingStyles(themeBase),
54
+ // Layout functions
23
55
  cover: fns.cover(themeBase),
56
+ focusStyles: fns.focusStyles(themeBase),
24
57
  hover: fns.hover(themeBase),
25
- lighten: fns.lighten,
26
- darken: fns.darken,
27
- dimmed: fns.dimmed(themeBase),
58
+ // Responsive functions
28
59
  largerThan: fns.largerThan(themeBase),
29
- smallerThan: fns.smallerThan(themeBase)
30
- },
31
- activeStyles: fns.activeStyles(themeBase)
60
+ smallerThan: fns.smallerThan(themeBase),
61
+ // Color scheme helpers
62
+ colorSchemeValue: fns.colorSchemeValue(themeBase),
63
+ colorSchemeConstants: fns.colorSchemeConstants(themeBase)
64
+ }
32
65
  };
33
66
  }
34
67
  //# sourceMappingURL=attach-functions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["fns","attachFunctions","themeBase","fn","radius","rgba","size","variant","themeColor","color","shade","theme","shadow","gradient","fontStyles","inputFontStyles","focusStyles","placeholderStyles","cover","hover","lighten","darken","dimmed","largerThan","smallerThan","activeStyles"],"sourceRoot":"../../../../src","sources":["theme/functions/attach-functions.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,gBAAO;AAE3B,OAAO,SAASC,eAAeA,CAACC,SAAc,EAAO;EACnD,OAAO;IACL,GAAGA,SAAS;IACZC,EAAE,EAAE;MACFC,MAAM,EAAEJ,GAAG,CAACI,MAAM,CAACF,SAAS,CAAC;MAC7BG,IAAI,EAAEL,GAAG,CAACK,IAAI,CAACH,SAAS,CAAC;MACzBI,IAAI,EAAEN,GAAG,CAACM,IAAI,CAACJ,SAAS,CAAC;MACzBK,OAAO,EAAEP,GAAG,CAACO,OAAO,CAACL,SAAS,CAAC;MAC/BM,UAAU,EAAEA,CAACC,KAAa,EAAEC,KAAc,KACxCV,GAAG,CAACQ,UAAU,CAAC;QAAEG,KAAK,EAAET,SAAS;QAAEO,KAAK;QAAEC;MAAM,CAAC,CAAC;MACpDE,MAAM,EAAEZ,GAAG,CAACY,MAAM;MAClBC,QAAQ,EAAEb,GAAG,CAACa,QAAQ,CAACX,SAAS,CAAC;MACjCY,UAAU,EAAEd,GAAG,CAACc,UAAU,CAACZ,SAAS,CAAC;MACrCa,eAAe,EAAEf,GAAG,CAACe,eAAe,CAACb,SAAS,CAAC;MAC/Cc,WAAW,EAAEhB,GAAG,CAACgB,WAAW,CAACd,SAAS,CAAC;MACvCe,iBAAiB,EAAEjB,GAAG,CAACiB,iBAAiB,CAACf,SAAS,CAAC;MACnDgB,KAAK,EAAElB,GAAG,CAACkB,KAAK,CAAChB,SAAS,CAAC;MAC3BiB,KAAK,EAAEnB,GAAG,CAACmB,KAAK,CAACjB,SAAS,CAAC;MAC3BkB,OAAO,EAAEpB,GAAG,CAACoB,OAAO;MACpBC,MAAM,EAAErB,GAAG,CAACqB,MAAM;MAClBC,MAAM,EAAEtB,GAAG,CAACsB,MAAM,CAACpB,SAAS,CAAC;MAC7BqB,UAAU,EAAEvB,GAAG,CAACuB,UAAU,CAACrB,SAAS,CAAC;MACrCsB,WAAW,EAAExB,GAAG,CAACwB,WAAW,CAACtB,SAAS;IACxC,CAAC;IACDuB,YAAY,EAAEzB,GAAG,CAACyB,YAAY,CAACvB,SAAS;EAC1C,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["fns","createPrimaryShadeFunction","createPrimaryColorFunction","createThemeColorFunction","attachFunctions","themeBase","fn","themeColor","primaryShade","primaryColor","variant","rgba","lighten","darken","dimmed","radius","size","shadow","gradient","fontStyles","inputFontStyles","placeholderStyles","fontSize","lineHeight","headingStyles","cover","focusStyles","hover","largerThan","smallerThan","colorSchemeValue","colorSchemeConstants"],"sourceRoot":"../../../../src","sources":["theme/functions/attach-functions.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAGA,SAASA,GAAG,QAAQ,gBAAO;AAC3B,SACEC,0BAA0B,EAC1BC,0BAA0B,QACrB,wBAAqB;AAC5B,SAASC,wBAAwB,QAAQ,kCAA+B;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAACC,SAA2B,EAAgB;EACzE,OAAO;IACL,GAAGA,SAAS;IACZC,EAAE,EAAE;MACF;MACAC,UAAU,EAAEJ,wBAAwB,CAACE,SAAS,CAAC;MAC/CG,YAAY,EAAEP,0BAA0B,CAACI,SAAS,CAAC;MACnDI,YAAY,EAAEP,0BAA0B,CAACG,SAAS,CAAC;MAEnD;MACAK,OAAO,EAAEV,GAAG,CAACU,OAAO,CAACL,SAAS,CAAC;MAE/B;MACAM,IAAI,EAAEX,GAAG,CAACW,IAAI,CAACN,SAAS,CAAC;MACzBO,OAAO,EAAEZ,GAAG,CAACY,OAAO;MACpBC,MAAM,EAAEb,GAAG,CAACa,MAAM;MAClBC,MAAM,EAAEd,GAAG,CAACc,MAAM,CAACT,SAAS,CAAC;MAE7B;MACAU,MAAM,EAAEf,GAAG,CAACe,MAAM,CAACV,SAAS,CAAC;MAC7BW,IAAI,EAAEhB,GAAG,CAACgB,IAAI,CAACX,SAAS,CAAC;MAEzB;MACAY,MAAM,EAAEjB,GAAG,CAACiB,MAAM;MAClBC,QAAQ,EAAElB,GAAG,CAACkB,QAAQ,CAACb,SAAS,CAAC;MAEjC;MACAc,UAAU,EAAEnB,GAAG,CAACmB,UAAU,CAACd,SAAS,CAAC;MACrCe,eAAe,EAAEpB,GAAG,CAACoB,eAAe,CAACf,SAAS,CAAC;MAC/CgB,iBAAiB,EAAErB,GAAG,CAACqB,iBAAiB,CAAChB,SAAS,CAAC;MACnDiB,QAAQ,EAAEtB,GAAG,CAACsB,QAAQ,CAACjB,SAAS,CAAC;MACjCkB,UAAU,EAAEvB,GAAG,CAACuB,UAAU,CAAClB,SAAS,CAAC;MACrCmB,aAAa,EAAExB,GAAG,CAACwB,aAAa,CAACnB,SAAS,CAAC;MAE3C;MACAoB,KAAK,EAAEzB,GAAG,CAACyB,KAAK,CAACpB,SAAS,CAAC;MAC3BqB,WAAW,EAAE1B,GAAG,CAAC0B,WAAW,CAACrB,SAAS,CAAC;MACvCsB,KAAK,EAAE3B,GAAG,CAAC2B,KAAK,CAACtB,SAAS,CAAC;MAE3B;MACAuB,UAAU,EAAE5B,GAAG,CAAC4B,UAAU,CAACvB,SAAS,CAAC;MACrCwB,WAAW,EAAE7B,GAAG,CAAC6B,WAAW,CAACxB,SAAS,CAAC;MAEvC;MACAyB,gBAAgB,EAAE9B,GAAG,CAAC8B,gBAAgB,CAACzB,SAAS,CAAC;MACjD0B,oBAAoB,EAAE/B,GAAG,CAAC+B,oBAAoB,CAAC1B,SAAS;IAC1D;EACF,CAAC;AACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Dimensions","DEFAULT_BREAKPOINTS","xs","sm","md","lg","xl","getBreakpointValue","breakpoint","theme","breakpoints","value","Number","largerThan","width","get","breakpointValue","smallerThan"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/breakpoints.ts"],"mappings":";;AAAA,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AChC,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["Dimensions","DEFAULT_BREAKPOINTS","xs","sm","md","lg","xl","getBreakpointValue","breakpoint","theme","breakpoints","value","Number","largerThan","width","get","breakpointValue","smallerThan"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/breakpoints.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAGzC;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG;EAC1BC,EAAE,EAAE,GAAG;EAAE;EACTC,EAAE,EAAE,GAAG;EAAE;EACTC,EAAE,EAAE,GAAG;EAAE;EACTC,EAAE,EAAE,IAAI;EAAE;EACVC,EAAE,EAAE,IAAI,CAAE;AACZ,CAAC;AAID;AACA;AACA;AACA,SAASC,kBAAkBA,CACzBC,UAA6B,EAC7BC,KAAuB,EACf;EACR,IAAI,OAAOD,UAAU,KAAK,QAAQ,EAAE;IAClC,OAAOA,UAAU;EACnB;;EAEA;EACA,IAAIC,KAAK,CAACC,WAAW,IAAID,KAAK,CAACC,WAAW,CAACF,UAAU,CAAC,EAAE;IACtD,MAAMG,KAAK,GAAGF,KAAK,CAACC,WAAW,CAACF,UAAU,CAAC;IAC3C,OAAO,OAAOG,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGC,MAAM,CAACD,KAAK,CAAC;EAC1D;EAEA,OAAOV,mBAAmB,CAACO,UAAU,CAAqC;AAC5E;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,UAAUA,CAACJ,KAAuB,EAAE;EAClD,OAAQD,UAA6B,IAAc;IACjD,MAAM;MAAEM;IAAM,CAAC,GAAGd,UAAU,CAACe,GAAG,CAAC,QAAQ,CAAC;IAC1C,MAAMC,eAAe,GAAGT,kBAAkB,CAACC,UAAU,EAAEC,KAAK,CAAC;IAC7D,OAAOK,KAAK,IAAIE,eAAe;EACjC,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACR,KAAuB,EAAE;EACnD,OAAQD,UAA6B,IAAc;IACjD,MAAM;MAAEM;IAAM,CAAC,GAAGd,UAAU,CAACe,GAAG,CAAC,QAAQ,CAAC;IAC1C,MAAMC,eAAe,GAAGT,kBAAkB,CAACC,UAAU,EAAEC,KAAK,CAAC;IAC7D,OAAOK,KAAK,GAAGE,eAAe;EAChC,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Color scheme value helper
5
+ * Returns different values based on the current color scheme (light or dark mode)
6
+ * Useful for theme-aware constants like colors, spacing, etc.
7
+ */
8
+
9
+ /**
10
+ * Color scheme value type
11
+ * Represents a value that has different values for light and dark modes
12
+ */
13
+
14
+ /**
15
+ * Type helper to resolve ColorSchemeValue types to their base types
16
+ * Recursively transforms ColorSchemeValue<T> to T in object structures
17
+ */
18
+
19
+ /**
20
+ * Check if a value is a color scheme value object
21
+ * @param value - Value to check
22
+ * @returns True if value is a ColorSchemeValue object
23
+ */
24
+ export function isColorSchemeValue(value) {
25
+ return value !== null && typeof value === 'object' && 'light' in value && 'dark' in value && Object.keys(value).length === 2;
26
+ }
27
+
28
+ /**
29
+ * Create a color scheme-aware value
30
+ * Returns an object with light and dark values
31
+ *
32
+ * @param light - Value for light mode
33
+ * @param dark - Value for dark mode
34
+ * @returns ColorSchemeValue object
35
+ *
36
+ * @example
37
+ * const backgroundColor = colorSchemeValue('#FCFCFC', '#272727');
38
+ * // { light: '#FCFCFC', dark: '#272727' }
39
+ */
40
+ export function colorSchemeValue(light, dark) {
41
+ return {
42
+ light,
43
+ dark
44
+ };
45
+ }
46
+
47
+ /**
48
+ * Get the appropriate value based on color scheme
49
+ * If the value is a ColorSchemeValue object, returns the appropriate value
50
+ * Otherwise, returns the value as-is
51
+ *
52
+ * @param value - Value or ColorSchemeValue object
53
+ * @param colorScheme - Current color scheme
54
+ * @returns Resolved value for the current color scheme
55
+ *
56
+ * @example
57
+ * const bgColor = resolveColorSchemeValue({ light: '#fff', dark: '#000' }, 'dark');
58
+ * // '#000'
59
+ *
60
+ * @example
61
+ * const fixedColor = resolveColorSchemeValue('#blue', 'dark');
62
+ * // '#blue'
63
+ */
64
+ export function resolveColorSchemeValue(value, colorScheme) {
65
+ if (isColorSchemeValue(value)) {
66
+ return value[colorScheme];
67
+ }
68
+ return value;
69
+ }
70
+
71
+ /**
72
+ * Create a theme function that resolves color scheme values
73
+ * This is attached to theme.fn.colorSchemeValue
74
+ *
75
+ * @param theme - Mantine theme base
76
+ * @returns Function that resolves color scheme values based on current theme
77
+ */
78
+ export const createColorSchemeValueFunction = theme => {
79
+ /**
80
+ * Get value based on current color scheme
81
+ * Returns the appropriate value for light or dark mode
82
+ *
83
+ * @param value - Value or ColorSchemeValue object
84
+ * @returns Resolved value for current color scheme
85
+ *
86
+ * @example
87
+ * // In a component using theme
88
+ * const theme = useTheme();
89
+ * const bgColor = theme.fn.colorSchemeValue({ light: '#fff', dark: '#000' });
90
+ * // Returns '#fff' in light mode, '#000' in dark mode
91
+ *
92
+ * @example
93
+ * // With fixed value
94
+ * const color = theme.fn.colorSchemeValue('#blue');
95
+ * // Returns '#blue' regardless of color scheme
96
+ */
97
+ return value => {
98
+ return resolveColorSchemeValue(value, theme.colorScheme);
99
+ };
100
+ };
101
+
102
+ /**
103
+ * Helper to create a set of color scheme-aware constants
104
+ * Converts an object with ColorSchemeValue properties into resolved values
105
+ *
106
+ * @param constants - Object with ColorSchemeValue properties
107
+ * @param colorScheme - Current color scheme
108
+ * @returns Object with resolved values
109
+ *
110
+ * @example
111
+ * const constants = {
112
+ * text: { light: '#000', dark: '#fff' },
113
+ * background: { light: '#FCFCFC', dark: '#272727' },
114
+ * primaryButtonBackground: { light: '#00203E', dark: '#2581C4' },
115
+ * fixedColor: '#blue', // Non-scheme values pass through
116
+ * };
117
+ *
118
+ * const resolved = resolveColorSchemeConstants(constants, 'dark');
119
+ * // {
120
+ * // text: '#fff',
121
+ * // background: '#272727',
122
+ * // primaryButtonBackground: '#2581C4',
123
+ * // fixedColor: '#blue'
124
+ * // }
125
+ */
126
+ export function resolveColorSchemeConstants(constants, colorScheme) {
127
+ const resolved = {};
128
+ for (const key in constants) {
129
+ if (Object.prototype.hasOwnProperty.call(constants, key)) {
130
+ const value = constants[key];
131
+ if (isColorSchemeValue(value)) {
132
+ resolved[key] = value[colorScheme];
133
+ } else if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
134
+ // Recursively resolve nested objects
135
+ resolved[key] = resolveColorSchemeConstants(value, colorScheme);
136
+ } else {
137
+ // Pass through non-scheme values
138
+ resolved[key] = value;
139
+ }
140
+ }
141
+ }
142
+ return resolved;
143
+ }
144
+
145
+ /**
146
+ * Create a theme function that resolves color scheme constants
147
+ * This is attached to theme.fn.colorSchemeConstants
148
+ *
149
+ * @param theme - Mantine theme base
150
+ * @returns Function that resolves all constants in an object based on current theme
151
+ */
152
+ export const createColorSchemeConstantsFunction = theme => {
153
+ /**
154
+ * Resolve all color scheme values in an object
155
+ * Useful for resolving a set of constants stored in theme.other
156
+ *
157
+ * @param constants - Object containing ColorSchemeValue properties
158
+ * @returns Object with all values resolved for current color scheme
159
+ *
160
+ * @example
161
+ * // Define constants in theme
162
+ * const theme = createTheme({
163
+ * other: {
164
+ * colors: {
165
+ * text: { light: '#000', dark: '#fff' },
166
+ * background: { light: '#FCFCFC', dark: '#272727' },
167
+ * }
168
+ * }
169
+ * });
170
+ *
171
+ * // In component
172
+ * const colors = theme.fn.colorSchemeConstants(theme.other.colors);
173
+ * // { text: '#000', background: '#FCFCFC' } in light mode
174
+ * // { text: '#fff', background: '#272727' } in dark mode
175
+ */
176
+ return constants => {
177
+ return resolveColorSchemeConstants(constants, theme.colorScheme);
178
+ };
179
+ };
180
+ //# sourceMappingURL=color-scheme-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isColorSchemeValue","value","Object","keys","length","colorSchemeValue","light","dark","resolveColorSchemeValue","colorScheme","createColorSchemeValueFunction","theme","resolveColorSchemeConstants","constants","resolved","key","prototype","hasOwnProperty","call","Array","isArray","createColorSchemeConstantsFunction"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/color-scheme-value.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,kBAAkBA,CAAUC,KAAU,EAAgC;EACpF,OACEA,KAAK,KAAK,IAAI,IACd,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAO,IAAIA,KAAK,IAChB,MAAM,IAAIA,KAAK,IACfC,MAAM,CAACC,IAAI,CAACF,KAAK,CAAC,CAACG,MAAM,KAAK,CAAC;AAEnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAUC,KAAQ,EAAEC,IAAO,EAAuB;EAChF,OAAO;IAAED,KAAK;IAAEC;EAAK,CAAC;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCP,KAA8B,EAC9BQ,WAAwB,EACrB;EACH,IAAIT,kBAAkB,CAACC,KAAK,CAAC,EAAE;IAC7B,OAAOA,KAAK,CAACQ,WAAW,CAAC;EAC3B;EACA,OAAOR,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMS,8BAA8B,GAAIC,KAAuB,IAAK;EACzE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAiBV,KAA8B,IAAQ;IACrD,OAAOO,uBAAuB,CAACP,KAAK,EAAEU,KAAK,CAACF,WAAW,CAAC;EAC1D,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,2BAA2BA,CACzCC,SAAY,EACZJ,WAAwB,EACI;EAC5B,MAAMK,QAAQ,GAAG,CAAC,CAAM;EAExB,KAAK,MAAMC,GAAG,IAAIF,SAAS,EAAE;IAC3B,IAAIX,MAAM,CAACc,SAAS,CAACC,cAAc,CAACC,IAAI,CAACL,SAAS,EAAEE,GAAG,CAAC,EAAE;MACxD,MAAMd,KAAK,GAAGY,SAAS,CAACE,GAAG,CAAC;MAE5B,IAAIf,kBAAkB,CAACC,KAAK,CAAC,EAAE;QAC7Ba,QAAQ,CAACC,GAAG,CAAC,GAAGd,KAAK,CAACQ,WAAW,CAAQ;MAC3C,CAAC,MAAM,IAAIR,KAAK,KAAK,IAAI,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAI,CAACkB,KAAK,CAACC,OAAO,CAACnB,KAAK,CAAC,EAAE;QAC/E;QACAa,QAAQ,CAACC,GAAG,CAAC,GAAGH,2BAA2B,CAACX,KAAK,EAAEQ,WAAW,CAAC;MACjE,CAAC,MAAM;QACL;QACAK,QAAQ,CAACC,GAAG,CAAC,GAAGd,KAAK;MACvB;IACF;EACF;EAEA,OAAOa,QAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMO,kCAAkC,GAAIV,KAAuB,IAAK;EAC7E;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAuCE,SAAY,IAAiC;IAClF,OAAOD,2BAA2B,CAACC,SAAS,EAAEF,KAAK,CAACF,WAAW,CAAC;EAClE,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["dimmed","theme","colorScheme","currentMode","colors","dark","gray"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/dimmed.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,MAAMA,CAACC,KAAmB,EAAE;EAC1C,OAAO,MAAM;IACX,MAAMC,WAAW,GAAGD,KAAK,CAACE,WAAW,IAAI,OAAO;IAChD,OAAOD,WAAW,KAAK,MAAM,GACzBD,KAAK,CAACG,MAAM,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,SAAS,GACnCJ,KAAK,CAACG,MAAM,CAACE,IAAI,GAAG,CAAC,CAAC,IAAI,SAAS;EACzC,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["dimmed","theme","colorScheme","currentMode","colors","dark","gray"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/dimmed.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,MAAMA,CAACC,KAAuB,EAAE;EAC9C,OAAO,MAAM;IACX,MAAMC,WAAW,GAAGD,KAAK,CAACE,WAAW,IAAI,OAAO;IAChD,OAAOD,WAAW,KAAK,MAAM,GACzBD,KAAK,CAACG,MAAM,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,SAAS,GACnCJ,KAAK,CAACG,MAAM,CAACE,IAAI,GAAG,CAAC,CAAC,IAAI,SAAS;EACzC,CAAC;AACH","ignoreList":[]}
@@ -65,10 +65,10 @@ export function gradient(theme) {
65
65
  }
66
66
 
67
67
  /**
68
- * Legacy function for web compatibility - returns CSS gradient string
68
+ * Legacy function for web compatibility - returns gradient string
69
69
  * Not used in React Native but kept for API compatibility
70
70
  */
71
- export function linearGradientCSS(deg, ...colors) {
71
+ export function linearGradientString(deg, ...colors) {
72
72
  return `linear-gradient(${deg}deg, ${colors.join(', ')})`;
73
73
  }
74
74
  //# sourceMappingURL=gradient.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["themeColor","getPrimaryShade","degToCoordinates","deg","angle","radians","Math","PI","endX","cos","endY","sin","start","x","y","end","gradient","theme","payload","merged","from","defaultGradient","primaryColor","to","primaryShade","fromColor","color","shade","toColor","colors","linearGradientCSS","join"],"sourceRoot":"../../../../../../src","sources":["theme/functions/fns/gradient/gradient.ts"],"mappings":";;AAEA,SAASA,UAAU,QAAQ,+BAA4B;AACvD,SAASC,eAAe,QAAQ,qBAAkB;;AAElD;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAACC,GAAW,EAAsE;EACzG,MAAMC,KAAK,GAAG,CAAED,GAAG,GAAG,GAAG,GAAI,GAAG,IAAI,GAAG,CAAC,CAAC;EACzC,MAAME,OAAO,GAAID,KAAK,GAAGE,IAAI,CAACC,EAAE,GAAI,GAAG;;EAEvC;EACA,MAAMC,IAAI,GAAGF,IAAI,CAACG,GAAG,CAACJ,OAAO,GAAGC,IAAI,CAACC,EAAE,GAAG,CAAC,CAAC;EAC5C,MAAMG,IAAI,GAAGJ,IAAI,CAACK,GAAG,CAACN,OAAO,GAAGC,IAAI,CAACC,EAAE,GAAG,CAAC,CAAC;;EAE5C;EACA,MAAMK,KAAK,GAAG;IACZC,CAAC,EAAE,CAAC,CAAC,GAAGL,IAAI,IAAI,CAAC;IACjBM,CAAC,EAAE,CAAC,CAAC,GAAGJ,IAAI,IAAI;EAClB,CAAC;EACD,MAAMK,GAAG,GAAG;IACVF,CAAC,EAAE,CAAC,CAAC,GAAGL,IAAI,IAAI,CAAC;IACjBM,CAAC,EAAE,CAAC,CAAC,GAAGJ,IAAI,IAAI;EAClB,CAAC;EAED,OAAO;IAAEE,KAAK;IAAEG;EAAI,CAAC;AACvB;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAACC,KAAmB,EAAE;EAC5C,OAAQC,OAAyB,IAAqB;IACpD,MAAMC,MAAM,GAAG;MACbC,IAAI,EAAEF,OAAO,EAAEE,IAAI,IAAIH,KAAK,CAACI,eAAe,EAAED,IAAI,IAAIH,KAAK,CAACK,YAAY;MACxEC,EAAE,EAAEL,OAAO,EAAEK,EAAE,IAAIN,KAAK,CAACI,eAAe,EAAEE,EAAE,IAAIN,KAAK,CAACK,YAAY;MAClEnB,GAAG,EAAEe,OAAO,EAAEf,GAAG,IAAIc,KAAK,CAACI,eAAe,EAAElB,GAAG,IAAI;IACrD,CAAC;IAED,MAAMqB,YAAY,GAAGvB,eAAe,CAACgB,KAAK,CAAC;IAC3C,MAAMQ,SAAS,GAAGzB,UAAU,CAAC;MAAEiB,KAAK;MAAES,KAAK,EAAEP,MAAM,CAACC,IAAI;MAAEO,KAAK,EAAEH;IAAa,CAAC,CAAC;IAChF,MAAMI,OAAO,GAAG5B,UAAU,CAAC;MAAEiB,KAAK;MAAES,KAAK,EAAEP,MAAM,CAACI,EAAE;MAAEI,KAAK,EAAEH;IAAa,CAAC,CAAC;IAE5E,MAAM;MAAEZ,KAAK;MAAEG;IAAI,CAAC,GAAGb,gBAAgB,CAACiB,MAAM,CAAChB,GAAG,CAAC;IAEnD,OAAO;MACL0B,MAAM,EAAE,CAACJ,SAAS,EAAEG,OAAO,CAAC;MAC5BhB,KAAK;MACLG;IACF,CAAC;EACH,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASe,iBAAiBA,CAAC3B,GAAW,EAAE,GAAG0B,MAAgB,EAAE;EAClE,OAAO,mBAAmB1B,GAAG,QAAQ0B,MAAM,CAACE,IAAI,CAAC,IAAI,CAAC,GAAG;AAC3D","ignoreList":[]}
1
+ {"version":3,"names":["themeColor","getPrimaryShade","degToCoordinates","deg","angle","radians","Math","PI","endX","cos","endY","sin","start","x","y","end","gradient","theme","payload","merged","from","defaultGradient","primaryColor","to","primaryShade","fromColor","color","shade","toColor","colors","linearGradientString","join"],"sourceRoot":"../../../../../../src","sources":["theme/functions/fns/gradient/gradient.ts"],"mappings":";;AACA,SAASA,UAAU,QAAQ,+BAA4B;AACvD,SAASC,eAAe,QAAQ,qBAAkB;;AAElD;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAACC,GAAW,EAAsE;EACzG,MAAMC,KAAK,GAAG,CAAED,GAAG,GAAG,GAAG,GAAI,GAAG,IAAI,GAA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AC,CAAC;IAChF,MAAMI,OAAO,GAAG5B,UAAU,CAAC;MAAEiB,KAAK;MAAES,KAAK,EAAEP,MAAM,CAACI,EAAE;MAAEI,KAAK,EAAEH;IAAa,CAAC,CAAC;IAE5E,MAAM;MAAEZ,KAAK;MAAEG;IAAI,CAAC,GAAGb,gBAAgB,CAACiB,MAAM,CAAChB,GAAG,CAAC;IAEnD,OAAO;MACL0B,MAAM,EAAE,CAACJ,SAAS,EAAEG,OAAO,CAAC;MAC5BhB,KAAK;MACLG;IACF,CAAC;EACH,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASe,oBAAoBA,CAAC3B,GAAW,EAAE,GAAG0B,MAAgB,EAAE;EACrE,OAAO,mBAAmB1B,GAAG,QAAQ0B,MAAM,CAACE,IAAI,CAAC,IAAI,CAAC,GAAG;AAC3D","ignoreList":[]}
@@ -1,7 +1,14 @@
1
1
  "use strict";
2
2
 
3
+ import { getSize } from "../../get-size/index.js";
4
+
5
+ /**
6
+ * Returns base font styles from theme
7
+ * Includes fontFamily and lineHeight
8
+ */
3
9
  export const fontStyles = theme => () => ({
4
- fontFamily: theme.fontFamily
10
+ fontFamily: theme.fontFamily,
11
+ lineHeight: theme.lineHeight
5
12
  });
6
13
 
7
14
  /**
@@ -9,7 +16,46 @@ export const fontStyles = theme => () => ({
9
16
  */
10
17
  export const inputFontStyles = theme => () => {
11
18
  return {
12
- fontFamily: theme.fontFamily
19
+ fontFamily: theme.fontFamilyInput,
20
+ fontSize: theme.fontSizes.md,
21
+ lineHeight: theme.lineHeights.md
22
+ };
23
+ };
24
+
25
+ /**
26
+ * Get font size from theme
27
+ * @param size - Size key or number
28
+ */
29
+ export const fontSize = theme => size => {
30
+ return getSize({
31
+ size,
32
+ sizes: theme.fontSizes
33
+ });
34
+ };
35
+
36
+ /**
37
+ * Get line height from theme
38
+ * @param size - Size key or number (unitless multiplier)
39
+ */
40
+ export const lineHeight = theme => size => {
41
+ return getSize({
42
+ size,
43
+ sizes: theme.lineHeights
44
+ });
45
+ };
46
+
47
+ /**
48
+ * Get heading styles by order
49
+ * @param order - Heading level (1-6)
50
+ */
51
+ export const headingStyles = theme => order => {
52
+ const headingKey = `h${order}`;
53
+ const heading = theme.headings.sizes[headingKey];
54
+ return {
55
+ fontSize: heading.fontSize,
56
+ lineHeight: heading.lineHeight * heading.fontSize,
57
+ fontWeight: heading.fontWeight ?? theme.headings.fontWeight ?? theme.fontWeights.bold,
58
+ fontFamily: heading.fontFamily ?? theme.headings.fontFamily ?? theme.fontFamilyBold
13
59
  };
14
60
  };
15
61
  export const focusStyles = _theme => () => ({
@@ -1 +1 @@
1
- {"version":3,"names":["fontStyles","theme","fontFamily","inputFontStyles","focusStyles","_theme","placeholderStyles","opacity","cover","offset","position","top","right","bottom","left","hover","styles","activeStyles","transform","scale"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/helpers.ts"],"mappings":";;AAEA,OAAO,MAAMA,UAAU,GAAIC,KAAmB,IAAK,OAAO;EACxDC,UAAU,EAAED,KAAK,CAACC;AACpB,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAIF,KAAmB,IAAK,MAAM;EAC5D,OAAO;IACLC,UAAU,EAAED,KAAK,CAACC;EACpB,CAAC;AACH,CAAC;AAED,OAAO,MAAME,WAAW,GAAIC,MAAoB,IAAK,OAAO;EAC1D;EACA;EACA;AAAA,CACD,CAAC;AAEF,OAAO,MAAMC,iBAAiB,GAAID,MAAoB,IAAK,OAAO;EAChE;EACAE,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,OAAO,MAAMC,KAAK,GACfH,MAAoB,IACrB,CAACI,MAAc,GAAG,CAAC,MAAM;EACvBC,QAAQ,EAAE,UAAmB;EAC7BC,GAAG,EAAEF,MAAM;EACXG,KAAK,EAAEH,MAAM;EACbI,MAAM,EAAEJ,MAAM;EACdK,IAAI,EAAEL;AACR,CAAC,CAAC;AAEJ,OAAO,MAAMM,KAAK,GAAIV,MAAoB,IAAMW,MAAW,KAAM;EAC/D;EACA;EACA,GAAGA;AACL,CAAC,CAAC;AAEF,OAAO,MAAMC,YAAY,GAAIZ,MAAoB,KAAM;EACrD;EACAE,OAAO,EAAE,GAAG;EACZW,SAAS,EAAE,CAAC;IAAEC,KAAK,EAAE;EAAK,CAAC;AAC7B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getSize","fontStyles","theme","fontFamily","lineHeight","inputFontStyles","fontFamilyInput","fontSize","fontSizes","md","lineHeights","size","sizes","headingStyles","order","headingKey","heading","headings","fontWeight","fontWeights","bold","fontFamilyBold","focusStyles","_theme","placeholderStyles","opacity","cover","offset","position","top","right","bottom","left","hover","styles","activeStyles","transform","scale"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/helpers.ts"],"mappings":";;AAEA,SAASA,OAAO,QAAQ,yBAAgB;;AAExC;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAIC,KAAuB,IAAK,OAAO;EAC5DC,UAAU,EAAED,KAAK,CAACC,UAAU;EAC5BC,UAAU,EAAEF,KAAK,CAACE;AACpB,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAIH,KAAuB,IAAK,MAAM;EAChE,OAAO;IACLC,UAAU,EAAED,KAAK,CAACI,eAAe;IACjCC,QAAQ,EAAEL,KAAK,CAACM,SAAS,CAACC,EAAE;IAC5BL,UAAU,EAAEF,KAAK,CAACQ,WAAW,CAACD;EAChC,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMF,QAAQ,GAAIL,KAAuB,IAAMS,IAAuB,IAAK;EAChF,OAAOX,OAAO,CAAC;IAAEW,IAAI;IAAEC,KAAK,EAAEV,KAAK,CAACM;EAAU,CAAC,CAAC;AAClD,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMJ,UAAU,GAAIF,KAAuB,IAAMS,IAAuB,IAAK;EAClF,OAAOX,OAAO,CAAC;IAAEW,IAAI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EAAE;EAAK,CAAC;AAC7B,CAAC,CAAC","ignoreList":[]}
@@ -1,11 +1,16 @@
1
1
  "use strict";
2
2
 
3
+ /**
4
+ * Theme helper functions
5
+ * Exports all utility functions for theme manipulation
6
+ */
7
+
3
8
  import { radius } from "./radius.js";
4
9
  import { rgba } from "./rgba.js";
5
10
  import { size } from "./size.js";
6
11
  import { themeColor } from "./theme-color/theme-color.js";
7
12
  import { variant } from "./variant.js";
8
- import { getPrimaryShade } from "./primary-shade.js";
13
+ import { getPrimaryShade, getPrimaryColor } from "./primary-shade.js";
9
14
  import { shadow } from "./shadow.js";
10
15
  import { gradient } from "./gradient/gradient.js";
11
16
  import { lighten } from "./lighten.js";
@@ -13,20 +18,43 @@ import { darken } from "./darken.js";
13
18
  import { dimmed } from "./dimmed.js";
14
19
  import { largerThan, smallerThan } from "./breakpoints.js";
15
20
  import * as helpers from "./helpers.js";
21
+ import { createColorSchemeValueFunction, createColorSchemeConstantsFunction } from "./color-scheme-value.js";
22
+
23
+ /**
24
+ * Collection of all theme helper functions
25
+ * Used by attach-functions to create theme.fn object
26
+ */
16
27
  export const fns = {
17
- radius,
18
- rgba,
19
- size,
20
- variant,
28
+ // Color functions
21
29
  themeColor,
22
30
  getPrimaryShade,
23
- shadow,
24
- gradient,
31
+ getPrimaryColor,
32
+ // Variant function
33
+ variant,
34
+ // Color manipulation
35
+ rgba,
25
36
  lighten,
26
37
  darken,
27
38
  dimmed,
39
+ // Size and spacing
40
+ radius,
41
+ size,
42
+ // Visual effects
43
+ shadow,
44
+ gradient,
45
+ // Responsive
28
46
  largerThan,
29
47
  smallerThan,
48
+ // Color scheme helpers
49
+ colorSchemeValue: createColorSchemeValueFunction,
50
+ colorSchemeConstants: createColorSchemeConstantsFunction,
51
+ // Helper functions from helpers module
30
52
  ...helpers
31
53
  };
54
+
55
+ // Re-export individual functions for direct imports
56
+ export { radius, rgba, size, themeColor, variant, getPrimaryShade, getPrimaryColor, shadow, gradient, lighten, darken, dimmed, largerThan, smallerThan };
57
+
58
+ // Re-export color scheme helpers
59
+ export { colorSchemeValue, resolveColorSchemeValue, resolveColorSchemeConstants, isColorSchemeValue, createColorSchemeValueFunction, createColorSchemeConstantsFunction } from "./color-scheme-value.js";
32
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["radius","rgba","size","themeColor","variant","getPrimaryShade","shadow","gradient","lighten","darken","dimmed","largerThan","smallerThan","helpers","fns"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/index.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,aAAU;AACjC,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,UAAU,QAAQ,8BAA2B;AACtD,SAASC,OAAO,QAAQ,cAAW;AACnC,SAASC,eAAe,QAAQ,oBAAiB;AACjD,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,QAAQ,QAAQ,wBAAqB;AAC9C,SAASC,OAAO,QAAQ,cAAW;AACnC,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,UAAU,EAAEC,WAAW,QAAQ,kBAAe;AACvD,OAAO,KAAKC,OAAO,MAAM,cAAW;AAEpC,OAAO,MAAMC,GAAG,GAAG;EACjBd,MAAM;EACNC,IAAI;EACJC,IAAI;EACJE,OAAO;EACPD,UAAU;EACVE,eAAe;EACfC,MAAM;EACNC,QAAQ;EACRC,OAAO;EACPC,MAAM;EACNC,MAAM;EACNC,UAAU;EACVC,WAAW;EACX,GAAGC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["radius","rgba","size","themeColor","variant","getPrimaryShade","getPrimaryColor","shadow","gradient","lighten","darken","dimmed","largerThan","smallerThan","helpers","createColorSchemeValueFunction","createColorSchemeConstantsFunction","fns","colorSchemeValue","colorSchemeConstants","resolveColorSchemeValue","resolveColorSchemeConstants","isColorSchemeValue"],"sourceRoot":"../../../../../src","sources":["theme/functions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1,90 @@
1
1
  "use strict";
2
2
 
3
3
  /**
4
+ * Primary shade helper function
4
5
  * Returns the appropriate primary shade based on the current color scheme
5
- * Matches Mantine web implementation
6
+ * Aligned with Mantine web's primaryShade implementation
7
+ */
8
+
9
+ /**
10
+ * Get the primary shade for the current color scheme
11
+ *
12
+ * If theme.primaryShade is a number, returns that number.
13
+ * If theme.primaryShade is an object with light/dark values, returns the
14
+ * appropriate value based on the color scheme.
15
+ *
16
+ * @param theme - Mantine theme object
17
+ * @param colorScheme - Optional color scheme override (light or dark)
18
+ * @returns Shade value (0-9)
19
+ *
20
+ * @example
21
+ * // With theme.primaryShade = { light: 6, dark: 8 }
22
+ * // and theme.colorScheme = 'light'
23
+ * getPrimaryShade(theme) // returns 6
24
+ *
25
+ * @example
26
+ * // With explicit colorScheme override
27
+ * getPrimaryShade(theme, 'dark') // returns 8
28
+ *
29
+ * @example
30
+ * // With theme.primaryShade = 7 (single number)
31
+ * getPrimaryShade(theme) // returns 7
6
32
  */
7
33
  export function getPrimaryShade(theme, colorScheme) {
34
+ // If primaryShade is a single number, return it directly
8
35
  if (typeof theme.primaryShade === 'number') {
9
36
  return theme.primaryShade;
10
37
  }
11
- const scheme = colorScheme || theme.currentMode || 'light';
38
+
39
+ // Determine which color scheme to use
40
+ // Priority: 1. parameter override, 2. theme.colorScheme, 3. default to 'light'
41
+ const scheme = colorScheme || theme.colorScheme || 'light';
42
+
43
+ // Return the appropriate shade for the color scheme
12
44
  return theme.primaryShade[scheme];
13
45
  }
46
+
47
+ /**
48
+ * Curried version of getPrimaryShade for use with theme.fn
49
+ * Matches Mantine web's theme.fn.primaryShade signature
50
+ *
51
+ * @internal
52
+ */
53
+ export function createPrimaryShadeFunction(theme) {
54
+ return colorScheme => {
55
+ return getPrimaryShade(theme, colorScheme);
56
+ };
57
+ }
58
+
59
+ /**
60
+ * Get the primary color at the primary shade
61
+ *
62
+ * @param theme - Mantine theme object
63
+ * @param colorScheme - Optional color scheme override
64
+ * @returns Color string value
65
+ *
66
+ * @example
67
+ * // Get primary color at primary shade
68
+ * getPrimaryColor(theme) // returns '#228be6' (blue[6])
69
+ */
70
+ export function getPrimaryColor(theme, colorScheme) {
71
+ const shade = getPrimaryShade(theme, colorScheme);
72
+ const primaryPalette = theme.colors[theme.primaryColor];
73
+ if (!primaryPalette) {
74
+ console.warn(`Primary color "${theme.primaryColor}" not found in theme.colors. Falling back to 'blue'.`);
75
+ return theme.colors.blue?.[shade] || '#228be6';
76
+ }
77
+ return primaryPalette[shade] || primaryPalette[0] || '#228be6';
78
+ }
79
+
80
+ /**
81
+ * Curried version of getPrimaryColor for use with theme.fn
82
+ *
83
+ * @internal
84
+ */
85
+ export function createPrimaryColorFunction(theme) {
86
+ return colorScheme => {
87
+ return getPrimaryColor(theme, colorScheme);
88
+ };
89
+ }
14
90
  //# sourceMappingURL=primary-shade.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getPrimaryShade","theme","colorScheme","primaryShade","scheme","currentMode"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/primary-shade.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAC7BC,KAAmB,EACnBC,WAA8B,EACtB;EACR,IAAI,OAAOD,KAAK,CAACE,YAAY,KAAK,QAAQ,EAAE;IAC1C,OAAOF,KAAK,CAACE,YAAY;EAC3B;EAEA,MAAMC,MAAM,GAAGF,WAAW,IAAID,KAAK,CAACI,WAAW,IAAI,OAAO;EAC1D,OAAOJ,KAAK,CAACE,YAAY,CAACC,MAAM,CAAC;AACnC","ignoreList":[]}
1
+ {"version":3,"names":["getPrimaryShade","theme","colorScheme","primaryShade","scheme","createPrimaryShadeFunction","getPrimaryColor","shade","primaryPalette","colors","primaryColor","console","warn","blue","createPrimaryColorFunction"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/primary-shade.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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H","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","SHADOW_CONFIG","xs","ios","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","android","elevation","sm","md","lg","xl","shadow","size","shadowSize","shadowConfig","OS"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/shadow.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAavC;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAkF,GAAG;EACzFC,EAAE,EAAE;IACFC,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDC,EAAE,EAAE;IACFT,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,GAAG;MAClBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDE,EAAE,EAAE;IACFV,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDG,EAAE,EAAE;IACFX,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,GAAG;MAClBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDI,EAAE,EAAE;IACFZ,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,MAAMA,CAACC,IAAkC,EAAgB;EACvE,IAAI,CAACA,IAAI,EAAE;IACT,OAAO,CAAC,CAAC;EACX;EAEA,MAAMC,UAAU,GAAGD,IAAqB;EACxC,MAAME,YAAY,GAAGlB,aAAa,CAACiB,UAAU,CAAC;EAE9C,IAAI,CAACC,YAAY,EAAE;IACjB,OAAO,CAAC,CAAC;EACX;EAEA,OAAOnB,QAAQ,CAACoB,EAAE,KAAK,KAAK,GAAGD,YAAY,CAAChB,GAAG,GAAGgB,YAAY,CAACT,OAAO;AACxE","ignoreList":[]}
1
+ {"version":3,"names":["Platform","SHADOW_CONFIG","xs","ios","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","android","elevation","sm","md","lg","xl","shadow","size","shadowSize","shadowConfig","OS"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/shadow.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAavC;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAkF,GAAG;EACzFC,EAAE,EAAE;IACFC,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDC,EAAE,EAA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AE;IACjB,OAAO,CAAC,CAAC;EACX;EAEA,OAAOnB,QAAQ,CAACoB,EAAE,KAAK,KAAK,GAAGD,YAAY,CAAChB,GAAG,GAAGgB,YAAY,CAACT,OAAO;AACxE","ignoreList":[]}
@@ -6,8 +6,9 @@ export function size(_theme) {
6
6
  size,
7
7
  sizes
8
8
  }) => {
9
+ if (!size) return 0;
9
10
  return getSize({
10
- size,
11
+ size: size,
11
12
  sizes
12
13
  });
13
14
  };
@@ -1 +1 @@
1
- {"version":3,"names":["getSize","size","_theme","sizes"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/size.ts"],"mappings":";;AACA,SAASA,OAAO,QAAQ,yBAAgB;AAExC,OAAO,SAASC,IAAIA,CAACC,MAAW,EAAE;EAChC,OAAO,CAAiC;IACtCD,IAAI;IACJE;EAIF,CAAC,KAAa;IACZ,OAAOH,OAAO,CAAC;MAAEC,IAAI;MAAEE;IAAM,CAAC,CAAC;EACjC,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["getSize","size","_theme","sizes"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/size.ts"],"mappings":";;AACA,SAASA,OAAO,QAAQ,yBAAgB;AAExC,OAAO,SAASC,IAAIA,CAACC,MAAW,EAAE;EAChC,OAAO,CAAiC;IACtCD,IAAI;IACJE;EAIF,CAAC,KAAsB;IACrB,IAAI,CAACF,IAAI,EAAE,OAAO,CAAC;IACnB,OAAOD,OAAO,CAAC;MAAEC,IAAI,EAAEA,IAAyB;MAAEE;IAAM,CAAC,CAAC;EAC5D,CAAC;AACH","ignoreList":[]}