@cdx-ui/components 0.0.1-beta.5 → 0.0.1-beta.51

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 (401) hide show
  1. package/README.md +28 -18
  2. package/lib/commonjs/components/AlertDialog/index.js +1 -1
  3. package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
  4. package/lib/commonjs/components/Avatar/index.js +1 -1
  5. package/lib/commonjs/components/Avatar/styles.js +36 -29
  6. package/lib/commonjs/components/Avatar/styles.js.map +1 -1
  7. package/lib/commonjs/components/Button/index.js +16 -1
  8. package/lib/commonjs/components/Button/index.js.map +1 -1
  9. package/lib/commonjs/components/Button/styles.js +85 -26
  10. package/lib/commonjs/components/Button/styles.js.map +1 -1
  11. package/lib/commonjs/components/CLAUDE.md +90 -0
  12. package/lib/commonjs/components/Card/index.js +22 -4
  13. package/lib/commonjs/components/Card/index.js.map +1 -1
  14. package/lib/commonjs/components/Card/styles.js +27 -4
  15. package/lib/commonjs/components/Card/styles.js.map +1 -1
  16. package/lib/commonjs/components/Checkbox/index.js +5 -29
  17. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  18. package/lib/commonjs/components/Checkbox/styles.js +39 -47
  19. package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
  20. package/lib/commonjs/components/Chip/index.js +78 -9
  21. package/lib/commonjs/components/Chip/index.js.map +1 -1
  22. package/lib/commonjs/components/Chip/styles.js +207 -21
  23. package/lib/commonjs/components/Chip/styles.js.map +1 -1
  24. package/lib/commonjs/components/Field/index.js +8 -2
  25. package/lib/commonjs/components/Field/index.js.map +1 -1
  26. package/lib/commonjs/components/Field/styles.js +4 -4
  27. package/lib/commonjs/components/Field/styles.js.map +1 -1
  28. package/lib/commonjs/components/Heading/styles.js +1 -1
  29. package/lib/commonjs/components/Heading/styles.js.map +1 -1
  30. package/lib/commonjs/components/Icon/index.js +3 -4
  31. package/lib/commonjs/components/Icon/index.js.map +1 -1
  32. package/lib/commonjs/components/IconButton/index.js +6 -1
  33. package/lib/commonjs/components/IconButton/index.js.map +1 -1
  34. package/lib/commonjs/components/IconButton/styles.js +135 -10
  35. package/lib/commonjs/components/IconButton/styles.js.map +1 -1
  36. package/lib/commonjs/components/Input/styles.js +7 -6
  37. package/lib/commonjs/components/Input/styles.js.map +1 -1
  38. package/lib/commonjs/components/Link/index.js +22 -3
  39. package/lib/commonjs/components/Link/index.js.map +1 -1
  40. package/lib/commonjs/components/Link/styles.js +56 -6
  41. package/lib/commonjs/components/Link/styles.js.map +1 -1
  42. package/lib/commonjs/components/ListItem/styles.js +9 -9
  43. package/lib/commonjs/components/ListItem/styles.js.map +1 -1
  44. package/lib/commonjs/components/ProgressSegmented/index.js +24 -10
  45. package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -1
  46. package/lib/commonjs/components/Radio/index.js +167 -0
  47. package/lib/commonjs/components/Radio/index.js.map +1 -0
  48. package/lib/commonjs/components/Radio/styles.js +31 -0
  49. package/lib/commonjs/components/Radio/styles.js.map +1 -0
  50. package/lib/commonjs/components/ScopedTheme/index.js +24 -0
  51. package/lib/commonjs/components/ScopedTheme/index.js.map +1 -0
  52. package/lib/commonjs/components/Select/SelectTriggerHost.web.js +4 -0
  53. package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +1 -1
  54. package/lib/commonjs/components/Select/index.js +9 -3
  55. package/lib/commonjs/components/Select/index.js.map +1 -1
  56. package/lib/commonjs/components/Select/styles.js +17 -20
  57. package/lib/commonjs/components/Select/styles.js.map +1 -1
  58. package/lib/commonjs/components/Text/styles.js +2 -2
  59. package/lib/commonjs/components/Text/styles.js.map +1 -1
  60. package/lib/commonjs/components/Tile/index.js +251 -0
  61. package/lib/commonjs/components/Tile/index.js.map +1 -0
  62. package/lib/commonjs/components/Tile/styles.js +52 -0
  63. package/lib/commonjs/components/Tile/styles.js.map +1 -0
  64. package/lib/commonjs/components/index.js +36 -0
  65. package/lib/commonjs/components/index.js.map +1 -1
  66. package/lib/commonjs/figma/Avatar.figma.js +54 -0
  67. package/lib/commonjs/figma/Avatar.figma.js.map +1 -0
  68. package/lib/commonjs/figma/Button.figma.js +28 -15
  69. package/lib/commonjs/figma/Button.figma.js.map +1 -1
  70. package/lib/commonjs/figma/CLAUDE.md +30 -0
  71. package/lib/commonjs/figma/Card.Header.figma.js +28 -0
  72. package/lib/commonjs/figma/Card.Header.figma.js.map +1 -0
  73. package/lib/commonjs/figma/Card.figma.js +42 -0
  74. package/lib/commonjs/figma/Card.figma.js.map +1 -0
  75. package/lib/commonjs/figma/Checkbox.figma.js +55 -0
  76. package/lib/commonjs/figma/Checkbox.figma.js.map +1 -0
  77. package/lib/commonjs/figma/Chip.figma.js +68 -0
  78. package/lib/commonjs/figma/Chip.figma.js.map +1 -0
  79. package/lib/commonjs/figma/Field.Input.figma.js +57 -0
  80. package/lib/commonjs/figma/Field.Input.figma.js.map +1 -0
  81. package/lib/commonjs/figma/Field.Select.figma.js +57 -0
  82. package/lib/commonjs/figma/Field.Select.figma.js.map +1 -0
  83. package/lib/commonjs/figma/Heading.figma.js +30 -0
  84. package/lib/commonjs/figma/Heading.figma.js.map +1 -0
  85. package/lib/commonjs/figma/Icon.figma.js +20 -0
  86. package/lib/commonjs/figma/Icon.figma.js.map +1 -0
  87. package/lib/commonjs/figma/IconButton.figma.js +47 -0
  88. package/lib/commonjs/figma/IconButton.figma.js.map +1 -0
  89. package/lib/commonjs/figma/Input.figma.js +52 -0
  90. package/lib/commonjs/figma/Input.figma.js.map +1 -0
  91. package/lib/commonjs/figma/Link.figma.js +30 -0
  92. package/lib/commonjs/figma/Link.figma.js.map +1 -0
  93. package/lib/commonjs/figma/ProgressSegmented.figma.js +39 -0
  94. package/lib/commonjs/figma/ProgressSegmented.figma.js.map +1 -0
  95. package/lib/commonjs/figma/Radio.figma.js +40 -0
  96. package/lib/commonjs/figma/Radio.figma.js.map +1 -0
  97. package/lib/commonjs/figma/Select.figma.js +53 -0
  98. package/lib/commonjs/figma/Select.figma.js.map +1 -0
  99. package/lib/commonjs/figma/Text.figma.js +29 -0
  100. package/lib/commonjs/figma/Text.figma.js.map +1 -0
  101. package/lib/commonjs/figma/icons.figma.batch.js +27 -0
  102. package/lib/commonjs/figma/icons.figma.batch.js.map +1 -0
  103. package/lib/commonjs/figma/icons.figma.batch.json +17705 -0
  104. package/lib/commonjs/hooks/index.js +19 -0
  105. package/lib/commonjs/hooks/index.js.map +1 -0
  106. package/lib/commonjs/hooks/useForgeBottomTabScreenOptions.js +246 -0
  107. package/lib/commonjs/hooks/useForgeBottomTabScreenOptions.js.map +1 -0
  108. package/lib/commonjs/index.js +24 -0
  109. package/lib/commonjs/index.js.map +1 -1
  110. package/lib/commonjs/metro/withCdxMetroConfig.js +7 -18
  111. package/lib/commonjs/metro/withCdxMetroConfig.js.map +1 -1
  112. package/lib/commonjs/metro/withForgeMetroConfig.js +24 -0
  113. package/lib/commonjs/metro/withForgeMetroConfig.js.map +1 -0
  114. package/lib/commonjs/navigation/forgeTabIcon.js +43 -0
  115. package/lib/commonjs/navigation/forgeTabIcon.js.map +1 -0
  116. package/lib/commonjs/navigation/forgeTabIcon.native.js +35 -0
  117. package/lib/commonjs/navigation/forgeTabIcon.native.js.map +1 -0
  118. package/lib/commonjs/navigation/index.js +13 -0
  119. package/lib/commonjs/navigation/index.js.map +1 -0
  120. package/lib/commonjs/navigation/types.js +40 -0
  121. package/lib/commonjs/navigation/types.js.map +1 -0
  122. package/lib/commonjs/styles/primitives.js +43 -6
  123. package/lib/commonjs/styles/primitives.js.map +1 -1
  124. package/lib/module/components/AlertDialog/index.js +1 -1
  125. package/lib/module/components/AlertDialog/index.js.map +1 -1
  126. package/lib/module/components/Avatar/index.js +1 -1
  127. package/lib/module/components/Avatar/styles.js +36 -29
  128. package/lib/module/components/Avatar/styles.js.map +1 -1
  129. package/lib/module/components/Button/index.js +17 -2
  130. package/lib/module/components/Button/index.js.map +1 -1
  131. package/lib/module/components/Button/styles.js +85 -26
  132. package/lib/module/components/Button/styles.js.map +1 -1
  133. package/lib/module/components/CLAUDE.md +90 -0
  134. package/lib/module/components/Card/index.js +23 -4
  135. package/lib/module/components/Card/index.js.map +1 -1
  136. package/lib/module/components/Card/styles.js +27 -4
  137. package/lib/module/components/Card/styles.js.map +1 -1
  138. package/lib/module/components/Checkbox/index.js +6 -30
  139. package/lib/module/components/Checkbox/index.js.map +1 -1
  140. package/lib/module/components/Checkbox/styles.js +40 -48
  141. package/lib/module/components/Checkbox/styles.js.map +1 -1
  142. package/lib/module/components/Chip/index.js +82 -13
  143. package/lib/module/components/Chip/index.js.map +1 -1
  144. package/lib/module/components/Chip/styles.js +206 -20
  145. package/lib/module/components/Chip/styles.js.map +1 -1
  146. package/lib/module/components/Field/index.js +9 -3
  147. package/lib/module/components/Field/index.js.map +1 -1
  148. package/lib/module/components/Field/styles.js +4 -4
  149. package/lib/module/components/Field/styles.js.map +1 -1
  150. package/lib/module/components/Heading/styles.js +1 -1
  151. package/lib/module/components/Heading/styles.js.map +1 -1
  152. package/lib/module/components/Icon/index.js +3 -4
  153. package/lib/module/components/Icon/index.js.map +1 -1
  154. package/lib/module/components/IconButton/index.js +6 -1
  155. package/lib/module/components/IconButton/index.js.map +1 -1
  156. package/lib/module/components/IconButton/styles.js +135 -10
  157. package/lib/module/components/IconButton/styles.js.map +1 -1
  158. package/lib/module/components/Input/styles.js +7 -6
  159. package/lib/module/components/Input/styles.js.map +1 -1
  160. package/lib/module/components/Link/index.js +25 -6
  161. package/lib/module/components/Link/index.js.map +1 -1
  162. package/lib/module/components/Link/styles.js +55 -6
  163. package/lib/module/components/Link/styles.js.map +1 -1
  164. package/lib/module/components/ListItem/styles.js +10 -10
  165. package/lib/module/components/ListItem/styles.js.map +1 -1
  166. package/lib/module/components/ProgressSegmented/index.js +25 -11
  167. package/lib/module/components/ProgressSegmented/index.js.map +1 -1
  168. package/lib/module/components/Radio/index.js +164 -0
  169. package/lib/module/components/Radio/index.js.map +1 -0
  170. package/lib/module/components/Radio/styles.js +27 -0
  171. package/lib/module/components/Radio/styles.js.map +1 -0
  172. package/lib/module/components/ScopedTheme/index.js +19 -0
  173. package/lib/module/components/ScopedTheme/index.js.map +1 -0
  174. package/lib/module/components/Select/SelectTriggerHost.web.js +4 -0
  175. package/lib/module/components/Select/SelectTriggerHost.web.js.map +1 -1
  176. package/lib/module/components/Select/index.js +10 -4
  177. package/lib/module/components/Select/index.js.map +1 -1
  178. package/lib/module/components/Select/styles.js +18 -21
  179. package/lib/module/components/Select/styles.js.map +1 -1
  180. package/lib/module/components/Text/styles.js +2 -2
  181. package/lib/module/components/Text/styles.js.map +1 -1
  182. package/lib/module/components/Tile/index.js +243 -0
  183. package/lib/module/components/Tile/index.js.map +1 -0
  184. package/lib/module/components/Tile/styles.js +48 -0
  185. package/lib/module/components/Tile/styles.js.map +1 -0
  186. package/lib/module/components/index.js +3 -0
  187. package/lib/module/components/index.js.map +1 -1
  188. package/lib/module/figma/Avatar.figma.js +48 -0
  189. package/lib/module/figma/Avatar.figma.js.map +1 -0
  190. package/lib/module/figma/Button.figma.js +28 -15
  191. package/lib/module/figma/Button.figma.js.map +1 -1
  192. package/lib/module/figma/CLAUDE.md +30 -0
  193. package/lib/module/figma/Card.Header.figma.js +22 -0
  194. package/lib/module/figma/Card.Header.figma.js.map +1 -0
  195. package/lib/module/figma/Card.figma.js +36 -0
  196. package/lib/module/figma/Card.figma.js.map +1 -0
  197. package/lib/module/figma/Checkbox.figma.js +49 -0
  198. package/lib/module/figma/Checkbox.figma.js.map +1 -0
  199. package/lib/module/figma/Chip.figma.js +62 -0
  200. package/lib/module/figma/Chip.figma.js.map +1 -0
  201. package/lib/module/figma/Field.Input.figma.js +51 -0
  202. package/lib/module/figma/Field.Input.figma.js.map +1 -0
  203. package/lib/module/figma/Field.Select.figma.js +51 -0
  204. package/lib/module/figma/Field.Select.figma.js.map +1 -0
  205. package/lib/module/figma/Heading.figma.js +24 -0
  206. package/lib/module/figma/Heading.figma.js.map +1 -0
  207. package/lib/module/figma/Icon.figma.js +14 -0
  208. package/lib/module/figma/Icon.figma.js.map +1 -0
  209. package/lib/module/figma/IconButton.figma.js +41 -0
  210. package/lib/module/figma/IconButton.figma.js.map +1 -0
  211. package/lib/module/figma/Input.figma.js +46 -0
  212. package/lib/module/figma/Input.figma.js.map +1 -0
  213. package/lib/module/figma/Link.figma.js +24 -0
  214. package/lib/module/figma/Link.figma.js.map +1 -0
  215. package/lib/module/figma/ProgressSegmented.figma.js +33 -0
  216. package/lib/module/figma/ProgressSegmented.figma.js.map +1 -0
  217. package/lib/module/figma/Radio.figma.js +34 -0
  218. package/lib/module/figma/Radio.figma.js.map +1 -0
  219. package/lib/module/figma/Select.figma.js +47 -0
  220. package/lib/module/figma/Select.figma.js.map +1 -0
  221. package/lib/module/figma/Text.figma.js +23 -0
  222. package/lib/module/figma/Text.figma.js.map +1 -0
  223. package/lib/module/figma/icons.figma.batch.js +22 -0
  224. package/lib/module/figma/icons.figma.batch.js.map +1 -0
  225. package/lib/module/figma/icons.figma.batch.json +17705 -0
  226. package/lib/module/hooks/index.js +4 -0
  227. package/lib/module/hooks/index.js.map +1 -0
  228. package/lib/module/hooks/useForgeBottomTabScreenOptions.js +242 -0
  229. package/lib/module/hooks/useForgeBottomTabScreenOptions.js.map +1 -0
  230. package/lib/module/index.js +2 -0
  231. package/lib/module/index.js.map +1 -1
  232. package/lib/module/metro/withCdxMetroConfig.js +3 -17
  233. package/lib/module/metro/withCdxMetroConfig.js.map +1 -1
  234. package/lib/module/metro/withForgeMetroConfig.js +20 -0
  235. package/lib/module/metro/withForgeMetroConfig.js.map +1 -0
  236. package/lib/module/navigation/forgeTabIcon.js +39 -0
  237. package/lib/module/navigation/forgeTabIcon.js.map +1 -0
  238. package/lib/module/navigation/forgeTabIcon.native.js +31 -0
  239. package/lib/module/navigation/forgeTabIcon.native.js.map +1 -0
  240. package/lib/module/navigation/index.js +4 -0
  241. package/lib/module/navigation/index.js.map +1 -0
  242. package/lib/module/navigation/types.js +38 -0
  243. package/lib/module/navigation/types.js.map +1 -0
  244. package/lib/module/styles/primitives.js +43 -6
  245. package/lib/module/styles/primitives.js.map +1 -1
  246. package/lib/typescript/components/Avatar/styles.d.ts +4 -4
  247. package/lib/typescript/components/Avatar/styles.d.ts.map +1 -1
  248. package/lib/typescript/components/Button/index.d.ts +13 -1
  249. package/lib/typescript/components/Button/index.d.ts.map +1 -1
  250. package/lib/typescript/components/Button/styles.d.ts +5 -3
  251. package/lib/typescript/components/Button/styles.d.ts.map +1 -1
  252. package/lib/typescript/components/Card/index.d.ts +4 -3
  253. package/lib/typescript/components/Card/index.d.ts.map +1 -1
  254. package/lib/typescript/components/Card/styles.d.ts +13 -3
  255. package/lib/typescript/components/Card/styles.d.ts.map +1 -1
  256. package/lib/typescript/components/Checkbox/index.d.ts +1 -2
  257. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
  258. package/lib/typescript/components/Checkbox/styles.d.ts +4 -14
  259. package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
  260. package/lib/typescript/components/Chip/index.d.ts +19 -6
  261. package/lib/typescript/components/Chip/index.d.ts.map +1 -1
  262. package/lib/typescript/components/Chip/styles.d.ts +13 -4
  263. package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
  264. package/lib/typescript/components/Field/FieldLabel.web.d.ts +2 -2
  265. package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +1 -1
  266. package/lib/typescript/components/Field/index.d.ts.map +1 -1
  267. package/lib/typescript/components/Field/styles.d.ts.map +1 -1
  268. package/lib/typescript/components/Heading/styles.d.ts +1 -1
  269. package/lib/typescript/components/Icon/index.d.ts +5 -5
  270. package/lib/typescript/components/Icon/index.d.ts.map +1 -1
  271. package/lib/typescript/components/IconButton/index.d.ts +3 -3
  272. package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
  273. package/lib/typescript/components/IconButton/styles.d.ts +6 -2
  274. package/lib/typescript/components/IconButton/styles.d.ts.map +1 -1
  275. package/lib/typescript/components/Input/styles.d.ts.map +1 -1
  276. package/lib/typescript/components/Link/index.d.ts +2 -2
  277. package/lib/typescript/components/Link/index.d.ts.map +1 -1
  278. package/lib/typescript/components/Link/styles.d.ts +9 -2
  279. package/lib/typescript/components/Link/styles.d.ts.map +1 -1
  280. package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
  281. package/lib/typescript/components/ProgressSegmented/index.d.ts +14 -3
  282. package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -1
  283. package/lib/typescript/components/Radio/index.d.ts +40 -0
  284. package/lib/typescript/components/Radio/index.d.ts.map +1 -0
  285. package/lib/typescript/components/Radio/styles.d.ts +8 -0
  286. package/lib/typescript/components/Radio/styles.d.ts.map +1 -0
  287. package/lib/typescript/components/ScopedTheme/index.d.ts +16 -0
  288. package/lib/typescript/components/ScopedTheme/index.d.ts.map +1 -0
  289. package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +3 -0
  290. package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +1 -1
  291. package/lib/typescript/components/Select/index.d.ts +1 -1
  292. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  293. package/lib/typescript/components/Select/styles.d.ts.map +1 -1
  294. package/lib/typescript/components/Stack/styles.d.ts +2 -2
  295. package/lib/typescript/components/Text/styles.d.ts +1 -1
  296. package/lib/typescript/components/Tile/index.d.ts +70 -0
  297. package/lib/typescript/components/Tile/index.d.ts.map +1 -0
  298. package/lib/typescript/components/Tile/styles.d.ts +18 -0
  299. package/lib/typescript/components/Tile/styles.d.ts.map +1 -0
  300. package/lib/typescript/components/index.d.ts +3 -0
  301. package/lib/typescript/components/index.d.ts.map +1 -1
  302. package/lib/typescript/figma/Avatar.figma.d.ts +8 -0
  303. package/lib/typescript/figma/Avatar.figma.d.ts.map +1 -0
  304. package/lib/typescript/figma/Button.figma.d.ts.map +1 -1
  305. package/lib/typescript/figma/Card.Header.figma.d.ts +8 -0
  306. package/lib/typescript/figma/Card.Header.figma.d.ts.map +1 -0
  307. package/lib/typescript/figma/Card.figma.d.ts +8 -0
  308. package/lib/typescript/figma/Card.figma.d.ts.map +1 -0
  309. package/lib/typescript/figma/Checkbox.figma.d.ts +8 -0
  310. package/lib/typescript/figma/Checkbox.figma.d.ts.map +1 -0
  311. package/lib/typescript/figma/Chip.figma.d.ts +8 -0
  312. package/lib/typescript/figma/Chip.figma.d.ts.map +1 -0
  313. package/lib/typescript/figma/Field.Input.figma.d.ts +8 -0
  314. package/lib/typescript/figma/Field.Input.figma.d.ts.map +1 -0
  315. package/lib/typescript/figma/Field.Select.figma.d.ts +8 -0
  316. package/lib/typescript/figma/Field.Select.figma.d.ts.map +1 -0
  317. package/lib/typescript/figma/Heading.figma.d.ts +8 -0
  318. package/lib/typescript/figma/Heading.figma.d.ts.map +1 -0
  319. package/lib/typescript/figma/Icon.figma.d.ts +8 -0
  320. package/lib/typescript/figma/Icon.figma.d.ts.map +1 -0
  321. package/lib/typescript/figma/IconButton.figma.d.ts +8 -0
  322. package/lib/typescript/figma/IconButton.figma.d.ts.map +1 -0
  323. package/lib/typescript/figma/Input.figma.d.ts +8 -0
  324. package/lib/typescript/figma/Input.figma.d.ts.map +1 -0
  325. package/lib/typescript/figma/Link.figma.d.ts +8 -0
  326. package/lib/typescript/figma/Link.figma.d.ts.map +1 -0
  327. package/lib/typescript/figma/ProgressSegmented.figma.d.ts +8 -0
  328. package/lib/typescript/figma/ProgressSegmented.figma.d.ts.map +1 -0
  329. package/lib/typescript/figma/Radio.figma.d.ts +8 -0
  330. package/lib/typescript/figma/Radio.figma.d.ts.map +1 -0
  331. package/lib/typescript/figma/Select.figma.d.ts +8 -0
  332. package/lib/typescript/figma/Select.figma.d.ts.map +1 -0
  333. package/lib/typescript/figma/Text.figma.d.ts +8 -0
  334. package/lib/typescript/figma/Text.figma.d.ts.map +1 -0
  335. package/lib/typescript/figma/icons.figma.batch.d.ts +14 -0
  336. package/lib/typescript/figma/icons.figma.batch.d.ts.map +1 -0
  337. package/lib/typescript/hooks/index.d.ts +2 -0
  338. package/lib/typescript/hooks/index.d.ts.map +1 -0
  339. package/lib/typescript/hooks/useForgeBottomTabScreenOptions.d.ts +137 -0
  340. package/lib/typescript/hooks/useForgeBottomTabScreenOptions.d.ts.map +1 -0
  341. package/lib/typescript/index.d.ts +2 -0
  342. package/lib/typescript/index.d.ts.map +1 -1
  343. package/lib/typescript/metro/withCdxMetroConfig.d.ts +4 -18
  344. package/lib/typescript/metro/withCdxMetroConfig.d.ts.map +1 -1
  345. package/lib/typescript/metro/withForgeMetroConfig.d.ts +19 -0
  346. package/lib/typescript/metro/withForgeMetroConfig.d.ts.map +1 -0
  347. package/lib/typescript/navigation/forgeTabIcon.d.ts +27 -0
  348. package/lib/typescript/navigation/forgeTabIcon.d.ts.map +1 -0
  349. package/lib/typescript/navigation/forgeTabIcon.native.d.ts +15 -0
  350. package/lib/typescript/navigation/forgeTabIcon.native.d.ts.map +1 -0
  351. package/lib/typescript/navigation/index.d.ts +4 -0
  352. package/lib/typescript/navigation/index.d.ts.map +1 -0
  353. package/lib/typescript/navigation/types.d.ts +37 -0
  354. package/lib/typescript/navigation/types.d.ts.map +1 -0
  355. package/lib/typescript/styles/primitives.d.ts +38 -0
  356. package/lib/typescript/styles/primitives.d.ts.map +1 -1
  357. package/package.json +10 -8
  358. package/src/components/AlertDialog/index.tsx +1 -1
  359. package/src/components/Avatar/index.tsx +1 -1
  360. package/src/components/Avatar/styles.ts +49 -34
  361. package/src/components/Button/index.tsx +39 -5
  362. package/src/components/Button/styles.ts +56 -27
  363. package/src/components/CLAUDE.md +90 -0
  364. package/src/components/Card/index.tsx +41 -16
  365. package/src/components/Card/styles.ts +42 -15
  366. package/src/components/Checkbox/index.tsx +8 -19
  367. package/src/components/Checkbox/styles.ts +82 -86
  368. package/src/components/Chip/index.tsx +104 -27
  369. package/src/components/Chip/styles.ts +232 -18
  370. package/src/components/Field/FieldLabel.web.tsx +1 -1
  371. package/src/components/Field/index.tsx +10 -3
  372. package/src/components/Field/styles.ts +5 -4
  373. package/src/components/Heading/styles.ts +1 -1
  374. package/src/components/Icon/index.tsx +6 -7
  375. package/src/components/IconButton/index.tsx +7 -6
  376. package/src/components/IconButton/styles.ts +136 -10
  377. package/src/components/Input/styles.ts +15 -9
  378. package/src/components/Link/index.tsx +22 -9
  379. package/src/components/Link/styles.ts +49 -9
  380. package/src/components/ListItem/styles.ts +12 -19
  381. package/src/components/ProgressSegmented/index.tsx +50 -14
  382. package/src/components/Radio/index.tsx +192 -0
  383. package/src/components/Radio/styles.ts +59 -0
  384. package/src/components/ScopedTheme/index.tsx +17 -0
  385. package/src/components/Select/SelectTriggerHost.web.tsx +8 -1
  386. package/src/components/Select/index.tsx +9 -4
  387. package/src/components/Select/styles.ts +49 -51
  388. package/src/components/Text/styles.ts +2 -2
  389. package/src/components/Tile/index.tsx +296 -0
  390. package/src/components/Tile/styles.ts +82 -0
  391. package/src/components/index.ts +3 -0
  392. package/src/hooks/index.ts +5 -0
  393. package/src/hooks/useForgeBottomTabScreenOptions.ts +245 -0
  394. package/src/index.ts +2 -0
  395. package/src/metro/withCdxMetroConfig.ts +4 -29
  396. package/src/metro/withForgeMetroConfig.ts +29 -0
  397. package/src/navigation/forgeTabIcon.native.ts +36 -0
  398. package/src/navigation/forgeTabIcon.ts +33 -0
  399. package/src/navigation/index.ts +3 -0
  400. package/src/navigation/types.ts +55 -0
  401. package/src/styles/primitives.ts +43 -6
@@ -8,7 +8,7 @@ import {
8
8
  IFieldLabelProps,
9
9
  type IFieldRootProps,
10
10
  } from '@cdx-ui/primitives';
11
- import { cn } from '@cdx-ui/utils';
11
+ import { cn, useFormControlContext } from '@cdx-ui/utils';
12
12
  import { Icon } from '../Icon';
13
13
  import { BaseFieldLabel } from './FieldLabel';
14
14
  import {
@@ -70,7 +70,14 @@ export interface FieldLabelProps extends IFieldLabelProps, FieldLabelVariantProp
70
70
 
71
71
  const FieldLabel = forwardRef<View, FieldLabelProps>(
72
72
  ({ className, children, style, htmlFor, ...props }, ref) => {
73
- const labelClassName = cn(fieldLabelVariants(), className);
73
+ const { isLabelFocused, isInvalid } = useFormControlContext();
74
+ // Native: inject text-content-action via context (group-has CSS handles web).
75
+ // native: prefix keeps this class inert on web so it never conflicts with text-content-primary.
76
+ const labelClassName = cn(
77
+ fieldLabelVariants(),
78
+ isLabelFocused && !isInvalid && 'native:text-content-action',
79
+ className,
80
+ );
74
81
 
75
82
  return (
76
83
  <FieldPrimitive.Label
@@ -79,7 +86,7 @@ const FieldLabel = forwardRef<View, FieldLabelProps>(
79
86
  style={style}
80
87
  htmlFor={htmlFor}
81
88
  requiredIndicator={
82
- <Text className="text-red-500" aria-hidden>
89
+ <Text className="text-content-danger" aria-hidden>
83
90
  {' *'}
84
91
  </Text>
85
92
  }
@@ -1,23 +1,24 @@
1
1
  import { cva, type VariantProps } from 'class-variance-authority';
2
2
  import { DISABLED_OPACITY } from '../../styles/primitives';
3
3
 
4
- export const fieldRootVariants = cva(['flex-col gap-2', 'web:last:mb-0', DISABLED_OPACITY]);
4
+ export const fieldRootVariants = cva(['group flex-col gap-2', 'web:last:mb-0', DISABLED_OPACITY]);
5
5
 
6
6
  export const fieldLabelVariants = cva([
7
7
  'body-md',
8
8
  'font-medium',
9
9
  'text-content-primary',
10
10
  'flex-row items-center',
11
- DISABLED_OPACITY,
11
+ 'overflow-hidden',
12
12
  'web:cursor-pointer',
13
+ 'web:group-has-[[data-focus=true]]:data-[invalid=false]:text-content-action',
13
14
  'data-[invalid=true]:text-content-danger',
14
15
  ]);
15
16
 
16
- export const fieldHelperVariants = cva(['flex-row items-center']);
17
+ export const fieldHelperVariants = cva(['flex-row items-center min-h-4']);
17
18
 
18
19
  export const fieldHelperTextVariants = cva(['body-sm', 'text-content-tertiary']);
19
20
 
20
- export const fieldErrorVariants = cva(['flex-row items-center gap-1']);
21
+ export const fieldErrorVariants = cva(['flex-row items-center gap-0.5 min-h-4']);
21
22
 
22
23
  export const fieldErrorTextVariants = cva(['body-sm', 'text-content-danger']);
23
24
 
@@ -5,7 +5,7 @@ export const headingStyle = cva(
5
5
  [
6
6
  `text-content-primary my-0`,
7
7
  Platform.select({
8
- web: 'bg-transparent display-inline no-underline',
8
+ web: 'bg-transparent no-underline',
9
9
  default: '',
10
10
  }),
11
11
  ],
@@ -1,11 +1,10 @@
1
1
  import { withUniwind } from 'uniwind';
2
2
  import { cn } from '@cdx-ui/utils';
3
- import type { CdxIcon, CdxIconProps } from '@cdx-ui/icons';
4
- import { COLOR_TEXT_PRIMARY } from '../../styles/primitives';
3
+ import type { ForgeIcon, ForgeIconProps } from '@cdx-ui/icons';
5
4
 
6
- export type IconProps = CdxIconProps & {
5
+ export type IconProps = ForgeIconProps & {
7
6
  className?: string; // TODO: Why does this need to specified manually?
8
- as: CdxIcon;
7
+ as: ForgeIcon;
9
8
  };
10
9
 
11
10
  function IconImpl({ as: IconComponent, ...props }: IconProps) {
@@ -38,16 +37,16 @@ const StyledIcon = withUniwind(IconImpl, {
38
37
  * <Icon as={ArrowRight} className="text-red-500 size-4" />
39
38
  * ```
40
39
  *
41
- * @param {CdxIcon} as - The CDX icon component to render.
40
+ * @param {ForgeIcon} as - The Forge icon component to render.
42
41
  * @param {string} className - Utility classes to style the icon using Uniwind.
43
42
  * @param {number} size - Icon size (overrides the size class).
44
- * @param {...CdxIconProps} ...props - Additional icon props passed to the "as" icon.
43
+ * @param {...ForgeIconProps} ...props - Additional icon props passed to the "as" icon.
45
44
  */
46
45
  export function Icon({ as: IconComponent, className, ...props }: IconProps) {
47
46
  return (
48
47
  <StyledIcon
49
48
  as={IconComponent}
50
- className={cn(COLOR_TEXT_PRIMARY, 'size-5', className)}
49
+ className={cn('text-content-primary size-5', className)}
51
50
  {...props}
52
51
  />
53
52
  );
@@ -6,7 +6,7 @@ import {
6
6
  type IButtonProps,
7
7
  useButtonContext,
8
8
  } from '@cdx-ui/primitives';
9
- import type { CdxIcon } from '@cdx-ui/icons';
9
+ import type { ForgeIcon } from '@cdx-ui/icons';
10
10
  import { cn } from '@cdx-ui/utils';
11
11
  import { Icon, type IconProps } from '../Icon';
12
12
  import {
@@ -24,7 +24,7 @@ const IconButtonPrimitive = createButton({
24
24
  Icon: View,
25
25
  });
26
26
 
27
- function IconButtonGlyph({ as: IconComponent, className }: { as: CdxIcon; className: string }) {
27
+ function IconButtonGlyph({ as: IconComponent, className }: { as: ForgeIcon; className: string }) {
28
28
  const { hover, focus, active, disabled, focusVisible } = useButtonContext();
29
29
  return (
30
30
  <Icon
@@ -43,8 +43,8 @@ function IconButtonGlyph({ as: IconComponent, className }: { as: CdxIcon; classN
43
43
 
44
44
  export interface IconButtonProps extends PressableProps, IButtonProps, IconButtonVariantProps {
45
45
  className?: string;
46
- /** CDX icon component to render (icon-only control). */
47
- as: CdxIcon;
46
+ /** Forge icon component to render (icon-only control). */
47
+ as: ForgeIcon;
48
48
  /** Passed through to the underlying `Icon`. */
49
49
  iconClassName?: IconProps['className'];
50
50
  }
@@ -53,6 +53,7 @@ const IconButtonRoot = forwardRef<View, IconButtonProps>(
53
53
  (
54
54
  {
55
55
  variant = 'solid',
56
+ color = 'neutral',
56
57
  size = 'default',
57
58
  className,
58
59
  style,
@@ -63,11 +64,11 @@ const IconButtonRoot = forwardRef<View, IconButtonProps>(
63
64
  },
64
65
  ref,
65
66
  ) => {
66
- const rootClassName = cn(iconButtonRootVariants({ variant, size }), className);
67
+ const rootClassName = cn(iconButtonRootVariants({ variant, color, size }), className);
67
68
 
68
69
  const glyphClassName = cn(
69
70
  iconButtonGlyphVariants({ size }),
70
- iconButtonIconColorVariants(),
71
+ iconButtonIconColorVariants({ variant, color }),
71
72
  iconClassName,
72
73
  );
73
74
 
@@ -8,35 +8,133 @@ export const iconButtonRootVariants = cva(
8
8
  'rounded-[var(--border-radius-round)]',
9
9
  'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
10
10
  TRANSITION_COLORS,
11
- 'data-[disabled=true]:opacity-[--opacity-disabled]',
11
+ 'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
12
12
  DISABLED_CURSOR,
13
- 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-[--color-stroke-ring] web:data-[focus-visible=true]:ring-offset-2',
13
+ 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-[var(--color-stroke-ring)] web:data-[focus-visible=true]:ring-offset-2',
14
14
  ],
15
15
  {
16
16
  variants: {
17
17
  variant: {
18
- solid: [
18
+ solid: [],
19
+ tint: [],
20
+ ghost: ['bg-transparent'],
21
+ },
22
+ color: {
23
+ neutral: [],
24
+ action: [],
25
+ danger: [],
26
+ },
27
+ size: {
28
+ default: 'h-11 w-11 min-w-11 shrink-0 p-2.5',
29
+ small: 'h-8 w-8 min-w-8 shrink-0 p-1.5',
30
+ },
31
+ },
32
+ compoundVariants: [
33
+ // ── solid × color ───────────────────────────────────────────────────
34
+ {
35
+ variant: 'solid',
36
+ color: 'neutral',
37
+ className: [
19
38
  'bg-surface-primary border border-stroke-secondary',
20
39
  Platform.select({
21
40
  default: 'data-[active=true]:bg-surface-primary-active',
22
41
  web: 'data-[hover=true]:bg-surface-primary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active',
23
42
  }),
24
43
  ],
25
- ghost: [
26
- 'bg-transparent',
44
+ },
45
+ {
46
+ variant: 'solid',
47
+ color: 'action',
48
+ className: [
49
+ 'bg-surface-action-strong',
50
+ Platform.select({
51
+ default: 'data-[active=true]:bg-surface-action-strong-active',
52
+ web: 'data-[hover=true]:bg-surface-action-strong-hover data-[active=true]:data-[hover=true]:bg-surface-action-strong-active',
53
+ }),
54
+ ],
55
+ },
56
+ {
57
+ variant: 'solid',
58
+ color: 'danger',
59
+ className: [
60
+ 'bg-surface-danger-strong',
61
+ Platform.select({
62
+ default: 'data-[active=true]:bg-surface-danger-strong-active',
63
+ web: 'data-[hover=true]:bg-surface-danger-strong-hover data-[active=true]:data-[hover=true]:bg-surface-danger-strong-active',
64
+ }),
65
+ ],
66
+ },
67
+
68
+ // ── tint × color ─────────────────────────────────────────────────
69
+ {
70
+ variant: 'tint',
71
+ color: 'neutral',
72
+ className: [
73
+ 'bg-surface-neutral-tint',
74
+ Platform.select({
75
+ default: 'data-[active=true]:bg-surface-neutral-tint-active',
76
+ web: 'data-[hover=true]:bg-surface-neutral-tint-hover data-[active=true]:data-[hover=true]:bg-surface-neutral-tint-active',
77
+ }),
78
+ ],
79
+ },
80
+ {
81
+ variant: 'tint',
82
+ color: 'action',
83
+ className: [
84
+ 'bg-surface-action-tint',
85
+ Platform.select({
86
+ default: 'data-[active=true]:bg-surface-action-tint-active',
87
+ web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
88
+ }),
89
+ ],
90
+ },
91
+ {
92
+ variant: 'tint',
93
+ color: 'danger',
94
+ className: [
95
+ 'bg-surface-danger-tint',
96
+ Platform.select({
97
+ default: 'data-[active=true]:bg-surface-danger-tint-active',
98
+ web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active',
99
+ }),
100
+ ],
101
+ },
102
+
103
+ // ── ghost × color ──────────────────────────────────────────────────
104
+ {
105
+ variant: 'ghost',
106
+ color: 'neutral',
107
+ className: [
27
108
  Platform.select({
28
109
  default: 'data-[active=true]:bg-surface-primary-active',
29
110
  web: 'data-[hover=true]:bg-surface-primary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active',
30
111
  }),
31
112
  ],
32
113
  },
33
- size: {
34
- default: 'h-11 w-11 min-w-11 shrink-0 p-2.5',
35
- small: 'h-8 w-8 min-w-8 shrink-0 p-1.5',
114
+ {
115
+ variant: 'ghost',
116
+ color: 'action',
117
+ className: [
118
+ Platform.select({
119
+ default: 'data-[active=true]:bg-surface-action-tint-active',
120
+ web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
121
+ }),
122
+ ],
36
123
  },
37
- },
124
+ {
125
+ variant: 'ghost',
126
+ color: 'danger',
127
+ className: [
128
+ Platform.select({
129
+ default: 'data-[active=true]:bg-surface-danger-tint-active',
130
+ web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active',
131
+ }),
132
+ ],
133
+ },
134
+ ],
38
135
  defaultVariants: {
39
136
  variant: 'solid',
137
+ color: 'neutral',
40
138
  size: 'default',
41
139
  },
42
140
  },
@@ -54,6 +152,34 @@ export const iconButtonGlyphVariants = cva([], {
54
152
  },
55
153
  });
56
154
 
57
- export const iconButtonIconColorVariants = cva(['text-content-primary']);
155
+ export const iconButtonIconColorVariants = cva([], {
156
+ variants: {
157
+ variant: {
158
+ solid: [],
159
+ tint: [],
160
+ ghost: [],
161
+ },
162
+ color: {
163
+ neutral: [],
164
+ action: [],
165
+ danger: [],
166
+ },
167
+ },
168
+ compoundVariants: [
169
+ { variant: 'solid', color: 'neutral', className: 'text-content-primary' },
170
+ { variant: 'solid', color: 'action', className: 'text-content-action-on-strong' },
171
+ { variant: 'solid', color: 'danger', className: 'text-content-danger-on-strong' },
172
+ { variant: 'tint', color: 'neutral', className: 'text-content-primary' },
173
+ { variant: 'tint', color: 'action', className: 'text-content-action-on-subtle' },
174
+ { variant: 'tint', color: 'danger', className: 'text-content-danger-on-subtle' },
175
+ { variant: 'ghost', color: 'neutral', className: 'text-content-primary' },
176
+ { variant: 'ghost', color: 'action', className: 'text-content-action' },
177
+ { variant: 'ghost', color: 'danger', className: 'text-content-danger' },
178
+ ],
179
+ defaultVariants: {
180
+ variant: 'solid',
181
+ color: 'neutral',
182
+ },
183
+ });
58
184
 
59
185
  export type IconButtonVariantProps = VariantProps<typeof iconButtonRootVariants>;
@@ -3,13 +3,14 @@ import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
3
3
 
4
4
  export const inputRootVariants = cva(
5
5
  [
6
- 'w-full flex-row items-stretch overflow-hidden',
6
+ 'w-full flex-row items-center overflow-hidden',
7
7
  'bg-surface-primary',
8
- 'border-solid border-[length:var(--border-width-default)] border-stroke-primary',
8
+ 'border-solid border-stroke-primary',
9
+ 'web:border-default native:border-[length:var(--border-width-default)]',
9
10
  'rounded-[var(--border-radius-default)]',
10
11
  TRANSITION_COLORS,
11
12
  'data-[disabled=true]:bg-surface-secondary',
12
- 'data-[disabled=true]:opacity-[--opacity-disabled]',
13
+ 'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
13
14
  DISABLED_CURSOR,
14
15
  'data-[readonly=true]:cursor-default',
15
16
  'data-[readonly=true]:bg-surface-secondary',
@@ -24,11 +25,16 @@ export const inputRootVariants = cva(
24
25
  outline: [],
25
26
  },
26
27
  size: {
27
- // TODO: Find a cleaner approach to preventing layout shift when focus border is applied.
28
- default: ['h-10 px-4 py-2 gap-2', 'data-[focus=true]:px-[15px] data-[focus=true]:py-[7px]'],
28
+ default: [
29
+ 'h-11 min-h-11 px-4 py-3 gap-4',
30
+ // Subtract one hairline from padding when focused so the wider focus border doesn’t shift layout.
31
+ 'data-[focus=true]:px-[calc(var(--spacing-4)-var(--spacing-px))]',
32
+ 'data-[focus=true]:py-[calc(var(--spacing-3)-var(--spacing-px))]',
33
+ ],
29
34
  small: [
30
- 'h-8 px-3 py-1.5 gap-1.5',
31
- 'data-[focus=true]:px-[11px] data-[focus=true]:py-[5px]',
35
+ 'h-8 min-h-8 px-3 py-2 gap-1.5',
36
+ 'data-[focus=true]:px-[calc(var(--spacing-3)-var(--spacing-px))]',
37
+ 'data-[focus=true]:py-[calc(var(--spacing-2)-var(--spacing-px))]',
32
38
  ],
33
39
  },
34
40
  },
@@ -42,7 +48,7 @@ export const inputRootVariants = cva(
42
48
  export const inputFieldVariants = cva(
43
49
  [
44
50
  'flex-1 justify-center bg-transparent p-0',
45
- 'font-body text-content-primary',
51
+ 'text-content-primary',
46
52
  'placeholder:text-content-tertiary',
47
53
  'web:outline-none',
48
54
  'tracking-normal',
@@ -60,7 +66,7 @@ export const inputFieldVariants = cva(
60
66
  },
61
67
  );
62
68
 
63
- export const inputSlotVariants = cva(['items-center justify-center self-center']);
69
+ export const inputSlotVariants = cva(['items-center justify-center self-center shrink-0']);
64
70
 
65
71
  export const inputIconVariants = cva(['text-content-tertiary'], {
66
72
  variants: {
@@ -1,9 +1,14 @@
1
1
  import { forwardRef, type ReactNode } from 'react';
2
- import { Pressable, Text as RNText, type TextProps, type View } from 'react-native';
3
- import { createLink, type ILinkProps } from '@cdx-ui/primitives';
2
+ import { Platform, Pressable, Text, View, type TextProps } from 'react-native';
3
+ import { createLink, useLinkInteractionContext, type ILinkProps } from '@cdx-ui/primitives';
4
4
  import { cn } from '@cdx-ui/utils';
5
5
  import { Icon, type IconProps } from '../Icon';
6
- import { linkRootVariants, linkLabelVariants, linkIconVariants } from './styles';
6
+ import {
7
+ linkIconVariants,
8
+ linkLabelVariants,
9
+ linkNativeUnderlineVariants,
10
+ linkRootVariants,
11
+ } from './styles';
7
12
 
8
13
  export { LinkProvider, type LinkConfig, type LinkAction } from '@cdx-ui/primitives';
9
14
 
@@ -40,15 +45,22 @@ export interface LinkLabelProps extends TextProps {
40
45
  children?: ReactNode;
41
46
  }
42
47
 
43
- const LinkLabel = forwardRef<RNText, LinkLabelProps>(
48
+ const LinkLabel = forwardRef<Text, LinkLabelProps>(
44
49
  ({ className, children, style, ...props }, ref) => {
45
- const computedClassName = cn(linkLabelVariants(), className);
50
+ const { visited } = useLinkInteractionContext();
51
+ const computedClassName = cn(linkLabelVariants({ visited }), className);
46
52
 
47
- return (
48
- <RNText ref={ref} className={computedClassName} style={style} {...props}>
53
+ const textElement = (
54
+ <Text ref={ref} className={computedClassName} style={style} {...props}>
49
55
  {children}
50
- </RNText>
56
+ </Text>
51
57
  );
58
+
59
+ if (Platform.OS === 'web') {
60
+ return textElement;
61
+ }
62
+
63
+ return <View className={cn(linkNativeUnderlineVariants({ visited }))}>{textElement}</View>;
52
64
  },
53
65
  );
54
66
 
@@ -61,7 +73,8 @@ LinkLabel.displayName = 'Link.Label';
61
73
  export interface LinkIconProps extends Omit<IconProps, 'children'> {}
62
74
 
63
75
  const LinkIcon = ({ className, style, as, ...props }: LinkIconProps) => {
64
- const computedClassName = cn(linkIconVariants(), className);
76
+ const { visited } = useLinkInteractionContext();
77
+ const computedClassName = cn(linkIconVariants({ visited }), className);
65
78
 
66
79
  return <Icon as={as} className={computedClassName} style={style} {...props} />;
67
80
  };
@@ -1,21 +1,61 @@
1
+ import { Platform } from 'react-native';
1
2
  import { cva, type VariantProps } from 'class-variance-authority';
2
3
  import { TRANSITION_COLORS } from '../../styles/primitives';
3
4
 
4
- // TODO: Handle visited state
5
-
6
5
  export const linkRootVariants = cva([
7
6
  'flex-row items-center gap-1',
8
- 'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
7
+ Platform.select({ web: 'web:inline-flex web:self-start', default: '' }),
9
8
  TRANSITION_COLORS,
9
+ 'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
10
+ 'web:data-[focus-visible=true]:rounded-[2px]',
10
11
  'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-stroke-focus web:data-[focus-visible=true]:ring-offset-2',
12
+ // Web: set color on the anchor so Label/Icon can text-inherit (incl. browser :visited).
13
+ 'web:text-content-link',
14
+ 'web:visited:text-content-link-visited',
15
+ 'web:hover:text-content-primary',
16
+ 'web:visited:hover:text-content-primary',
17
+ 'data-[visited=true]:text-content-link-visited',
18
+ 'web:data-[hover=true]:text-content-primary',
11
19
  ]);
12
20
 
13
- export const linkLabelVariants = cva([
14
- 'text-content-link',
15
- 'body-md',
16
- 'underline underline-offset-4',
17
- ]);
21
+ export const linkLabelVariants = cva(
22
+ [
23
+ 'body-md',
24
+ Platform.select({ web: 'underline underline-offset-4', default: '' }),
25
+ Platform.select({ web: 'text-inherit', default: 'text-content-link' }),
26
+ ],
27
+ {
28
+ variants: {
29
+ visited: {
30
+ true: Platform.select({ web: '', default: 'text-content-link-visited' }),
31
+ false: '',
32
+ },
33
+ },
34
+ defaultVariants: { visited: false },
35
+ },
36
+ );
37
+
38
+ export const linkNativeUnderlineVariants = cva(['border-b border-content-link pb-0.5'], {
39
+ variants: {
40
+ visited: {
41
+ true: 'border-content-link-visited',
42
+ false: '',
43
+ },
44
+ },
45
+ defaultVariants: { visited: false },
46
+ });
18
47
 
19
- export const linkIconVariants = cva(['text-content-link', 'size-4']);
48
+ export const linkIconVariants = cva(
49
+ ['size-4', Platform.select({ web: 'text-inherit', default: 'text-content-link' })],
50
+ {
51
+ variants: {
52
+ visited: {
53
+ true: Platform.select({ web: '', default: 'text-content-link-visited' }),
54
+ false: '',
55
+ },
56
+ },
57
+ defaultVariants: { visited: false },
58
+ },
59
+ );
20
60
 
21
61
  export type LinkVariantProps = VariantProps<typeof linkLabelVariants>;
@@ -1,12 +1,6 @@
1
1
  import { Platform } from 'react-native';
2
2
  import { cva, type VariantProps } from 'class-variance-authority';
3
- import {
4
- COLOR_BORDER_DEFAULT,
5
- COLOR_TEXT_MUTED,
6
- COLOR_TEXT_PRIMARY,
7
- COLOR_TEXT_SECONDARY,
8
- TRANSITION_COLORS,
9
- } from '../../styles/primitives';
3
+ import { TRANSITION_COLORS } from '../../styles/primitives';
10
4
 
11
5
  // ── Root (row): density, surface, separator, interactive feedback ──────────
12
6
 
@@ -19,7 +13,7 @@ export const listItemRootVariants = cva(
19
13
  Platform.select({
20
14
  web: [
21
15
  'outline-none',
22
- 'web:data-[hovered=true]:bg-slate-50',
16
+ 'web:data-[hover=true]:bg-slate-50',
23
17
  'web:focus-visible:data-[disabled=false]:bg-slate-50',
24
18
  'web:focus-visible:data-[disabled=false]:ring-2 web:focus-visible:data-[disabled=false]:ring-slate-400/40 web:focus-visible:data-[disabled=false]:ring-offset-2',
25
19
  ].join(' '),
@@ -37,7 +31,7 @@ export const listItemRootVariants = cva(
37
31
  negative: 'bg-red-50',
38
32
  },
39
33
  showSeparator: {
40
- true: ['border-b border-solid', COLOR_BORDER_DEFAULT],
34
+ true: 'border-b border-solid border-stroke-secondary',
41
35
  false: 'border-b-0',
42
36
  },
43
37
  crossAlign: {
@@ -49,7 +43,7 @@ export const listItemRootVariants = cva(
49
43
  {
50
44
  surface: 'negative',
51
45
  className: Platform.select({
52
- web: 'web:data-[hovered=true]:bg-red-100/90',
46
+ web: 'web:data-[hover=true]:bg-red-100/90',
53
47
  default: '',
54
48
  }),
55
49
  },
@@ -81,7 +75,7 @@ export const listItemTrailingSlotVariants = cva(['flex shrink-0 flex-row justify
81
75
 
82
76
  // ── Content stack (title / description / meta) ───────────────────────────────
83
77
 
84
- export const listItemContentVariants = cva(['flex min-w-0 flex-1 flex-col gap-1'], {
78
+ export const listItemContentVariants = cva('flex min-w-0 flex-1 flex-col gap-1', {
85
79
  variants: {
86
80
  crossAlign: {
87
81
  center: 'justify-center',
@@ -95,7 +89,7 @@ export const listItemContentVariants = cva(['flex min-w-0 flex-1 flex-col gap-1'
95
89
 
96
90
  // ── Typography ───────────────────────────────────────────────────────────────
97
91
 
98
- export const listItemTitleVariants = cva([COLOR_TEXT_PRIMARY, 'font-medium'], {
92
+ export const listItemTitleVariants = cva('text-content-primary font-medium', {
99
93
  variants: {
100
94
  size: {
101
95
  default: 'text-base leading-snug',
@@ -107,7 +101,7 @@ export const listItemTitleVariants = cva([COLOR_TEXT_PRIMARY, 'font-medium'], {
107
101
  },
108
102
  });
109
103
 
110
- export const listItemDescriptionVariants = cva([COLOR_TEXT_SECONDARY], {
104
+ export const listItemDescriptionVariants = cva('text-content-secondary', {
111
105
  variants: {
112
106
  size: {
113
107
  default: 'text-sm leading-normal',
@@ -119,7 +113,7 @@ export const listItemDescriptionVariants = cva([COLOR_TEXT_SECONDARY], {
119
113
  },
120
114
  });
121
115
 
122
- export const listItemMetaVariants = cva([COLOR_TEXT_MUTED], {
116
+ export const listItemMetaVariants = cva('text-content-tertiary', {
123
117
  variants: {
124
118
  size: {
125
119
  default: 'text-xs leading-normal',
@@ -136,7 +130,7 @@ export const listItemMetaVariants = cva([COLOR_TEXT_MUTED], {
136
130
  export const listItemSectionHeaderVariants = cva(
137
131
  [
138
132
  'flex-row items-center justify-between gap-2 border-b border-solid px-4 py-3',
139
- COLOR_BORDER_DEFAULT,
133
+ 'border-stroke-secondary',
140
134
  ],
141
135
  {
142
136
  variants: {
@@ -152,9 +146,8 @@ export const listItemSectionHeaderVariants = cva(
152
146
  );
153
147
 
154
148
  /** Default section-title typography; applied by `ListItem.SectionHeader` for string/number children. Exported for rare custom composition. */
155
- export const listItemSectionHeaderLabelVariants = cva([
156
- 'text-xs font-semibold uppercase tracking-wide',
157
- COLOR_TEXT_SECONDARY,
158
- ]);
149
+ export const listItemSectionHeaderLabelVariants = cva(
150
+ 'text-xs font-semibold uppercase tracking-wide text-content-secondary',
151
+ );
159
152
 
160
153
  export type ListItemVariantProps = VariantProps<typeof listItemRootVariants>;