@cdx-ui/components 0.0.1-beta.6 → 0.0.1-beta.60

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 (538) hide show
  1. package/README.md +36 -18
  2. package/lib/commonjs/components/AlertDialog/index.js +5 -4
  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 +41 -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/Dialog/index.js +71 -16
  25. package/lib/commonjs/components/Dialog/index.js.map +1 -1
  26. package/lib/commonjs/components/Dialog/styles.js +60 -14
  27. package/lib/commonjs/components/Dialog/styles.js.map +1 -1
  28. package/lib/commonjs/components/Field/index.js +8 -2
  29. package/lib/commonjs/components/Field/index.js.map +1 -1
  30. package/lib/commonjs/components/Field/styles.js +4 -4
  31. package/lib/commonjs/components/Field/styles.js.map +1 -1
  32. package/lib/commonjs/components/Heading/styles.js +1 -1
  33. package/lib/commonjs/components/Heading/styles.js.map +1 -1
  34. package/lib/commonjs/components/Icon/index.js +3 -4
  35. package/lib/commonjs/components/Icon/index.js.map +1 -1
  36. package/lib/commonjs/components/IconButton/index.js +6 -1
  37. package/lib/commonjs/components/IconButton/index.js.map +1 -1
  38. package/lib/commonjs/components/IconButton/styles.js +135 -10
  39. package/lib/commonjs/components/IconButton/styles.js.map +1 -1
  40. package/lib/commonjs/components/Input/styles.js +7 -6
  41. package/lib/commonjs/components/Input/styles.js.map +1 -1
  42. package/lib/commonjs/components/Link/index.js +22 -3
  43. package/lib/commonjs/components/Link/index.js.map +1 -1
  44. package/lib/commonjs/components/Link/styles.js +56 -6
  45. package/lib/commonjs/components/Link/styles.js.map +1 -1
  46. package/lib/commonjs/components/ListItem/index.js +3 -25
  47. package/lib/commonjs/components/ListItem/index.js.map +1 -1
  48. package/lib/commonjs/components/ListItem/styles.js +29 -57
  49. package/lib/commonjs/components/ListItem/styles.js.map +1 -1
  50. package/lib/commonjs/components/ProgressSegmented/index.js +24 -10
  51. package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -1
  52. package/lib/commonjs/components/Radio/index.js +167 -0
  53. package/lib/commonjs/components/Radio/index.js.map +1 -0
  54. package/lib/commonjs/components/Radio/styles.js +31 -0
  55. package/lib/commonjs/components/Radio/styles.js.map +1 -0
  56. package/lib/commonjs/components/ScopedTheme/index.js +24 -0
  57. package/lib/commonjs/components/ScopedTheme/index.js.map +1 -0
  58. package/lib/commonjs/components/Select/SelectTriggerHost.web.js +4 -0
  59. package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +1 -1
  60. package/lib/commonjs/components/Select/index.js +9 -3
  61. package/lib/commonjs/components/Select/index.js.map +1 -1
  62. package/lib/commonjs/components/Select/styles.js +17 -20
  63. package/lib/commonjs/components/Select/styles.js.map +1 -1
  64. package/lib/commonjs/components/Text/styles.js +2 -2
  65. package/lib/commonjs/components/Text/styles.js.map +1 -1
  66. package/lib/commonjs/components/Tile/index.js +251 -0
  67. package/lib/commonjs/components/Tile/index.js.map +1 -0
  68. package/lib/commonjs/components/Tile/styles.js +52 -0
  69. package/lib/commonjs/components/Tile/styles.js.map +1 -0
  70. package/lib/commonjs/components/index.js +36 -0
  71. package/lib/commonjs/components/index.js.map +1 -1
  72. package/lib/commonjs/figma/AlertDialog.Description.figma.js +20 -0
  73. package/lib/commonjs/figma/AlertDialog.Description.figma.js.map +1 -0
  74. package/lib/commonjs/figma/AlertDialog.Footer.figma.js +41 -0
  75. package/lib/commonjs/figma/AlertDialog.Footer.figma.js.map +1 -0
  76. package/lib/commonjs/figma/AlertDialog.Header.figma.js +28 -0
  77. package/lib/commonjs/figma/AlertDialog.Header.figma.js.map +1 -0
  78. package/lib/commonjs/figma/AlertDialog.Text.figma.js +20 -0
  79. package/lib/commonjs/figma/AlertDialog.Text.figma.js.map +1 -0
  80. package/lib/commonjs/figma/AlertDialog.Title.figma.js +27 -0
  81. package/lib/commonjs/figma/AlertDialog.Title.figma.js.map +1 -0
  82. package/lib/commonjs/figma/AlertDialog.figma.js +43 -0
  83. package/lib/commonjs/figma/AlertDialog.figma.js.map +1 -0
  84. package/lib/commonjs/figma/Avatar.figma.js +57 -0
  85. package/lib/commonjs/figma/Avatar.figma.js.map +1 -0
  86. package/lib/commonjs/figma/Button.figma.js +28 -15
  87. package/lib/commonjs/figma/Button.figma.js.map +1 -1
  88. package/lib/commonjs/figma/CLAUDE.md +30 -0
  89. package/lib/commonjs/figma/Card.Header.figma.js +28 -0
  90. package/lib/commonjs/figma/Card.Header.figma.js.map +1 -0
  91. package/lib/commonjs/figma/Card.figma.js +42 -0
  92. package/lib/commonjs/figma/Card.figma.js.map +1 -0
  93. package/lib/commonjs/figma/Checkbox.figma.js +55 -0
  94. package/lib/commonjs/figma/Checkbox.figma.js.map +1 -0
  95. package/lib/commonjs/figma/Chip.figma.js +68 -0
  96. package/lib/commonjs/figma/Chip.figma.js.map +1 -0
  97. package/lib/commonjs/figma/Dialog.Description.figma.js +20 -0
  98. package/lib/commonjs/figma/Dialog.Description.figma.js.map +1 -0
  99. package/lib/commonjs/figma/Dialog.Footer.figma.js +30 -0
  100. package/lib/commonjs/figma/Dialog.Footer.figma.js.map +1 -0
  101. package/lib/commonjs/figma/Dialog.Header.figma.js +29 -0
  102. package/lib/commonjs/figma/Dialog.Header.figma.js.map +1 -0
  103. package/lib/commonjs/figma/Dialog.Text.figma.js +20 -0
  104. package/lib/commonjs/figma/Dialog.Text.figma.js.map +1 -0
  105. package/lib/commonjs/figma/Dialog.Title.figma.js +27 -0
  106. package/lib/commonjs/figma/Dialog.Title.figma.js.map +1 -0
  107. package/lib/commonjs/figma/Dialog.figma.js +51 -0
  108. package/lib/commonjs/figma/Dialog.figma.js.map +1 -0
  109. package/lib/commonjs/figma/Field.Input.figma.js +57 -0
  110. package/lib/commonjs/figma/Field.Input.figma.js.map +1 -0
  111. package/lib/commonjs/figma/Field.Select.figma.js +57 -0
  112. package/lib/commonjs/figma/Field.Select.figma.js.map +1 -0
  113. package/lib/commonjs/figma/Heading.figma.js +30 -0
  114. package/lib/commonjs/figma/Heading.figma.js.map +1 -0
  115. package/lib/commonjs/figma/Icon.figma.js +20 -0
  116. package/lib/commonjs/figma/Icon.figma.js.map +1 -0
  117. package/lib/commonjs/figma/IconButton.figma.js +47 -0
  118. package/lib/commonjs/figma/IconButton.figma.js.map +1 -0
  119. package/lib/commonjs/figma/Input.figma.js +52 -0
  120. package/lib/commonjs/figma/Input.figma.js.map +1 -0
  121. package/lib/commonjs/figma/Link.figma.js +30 -0
  122. package/lib/commonjs/figma/Link.figma.js.map +1 -0
  123. package/lib/commonjs/figma/ListItem.Description.figma.js +23 -0
  124. package/lib/commonjs/figma/ListItem.Description.figma.js.map +1 -0
  125. package/lib/commonjs/figma/ListItem.LeadingSlot.figma.js +24 -0
  126. package/lib/commonjs/figma/ListItem.LeadingSlot.figma.js.map +1 -0
  127. package/lib/commonjs/figma/ListItem.Meta.figma.js +23 -0
  128. package/lib/commonjs/figma/ListItem.Meta.figma.js.map +1 -0
  129. package/lib/commonjs/figma/ListItem.SectionHeader.figma.js +24 -0
  130. package/lib/commonjs/figma/ListItem.SectionHeader.figma.js.map +1 -0
  131. package/lib/commonjs/figma/ListItem.Title.figma.js +23 -0
  132. package/lib/commonjs/figma/ListItem.Title.figma.js.map +1 -0
  133. package/lib/commonjs/figma/ListItem.TrailingSlot.figma.js +24 -0
  134. package/lib/commonjs/figma/ListItem.TrailingSlot.figma.js.map +1 -0
  135. package/lib/commonjs/figma/ListItem.figma.js +50 -0
  136. package/lib/commonjs/figma/ListItem.figma.js.map +1 -0
  137. package/lib/commonjs/figma/ProgressSegmented.figma.js +39 -0
  138. package/lib/commonjs/figma/ProgressSegmented.figma.js.map +1 -0
  139. package/lib/commonjs/figma/Radio.figma.js +40 -0
  140. package/lib/commonjs/figma/Radio.figma.js.map +1 -0
  141. package/lib/commonjs/figma/Select.figma.js +53 -0
  142. package/lib/commonjs/figma/Select.figma.js.map +1 -0
  143. package/lib/commonjs/figma/Text.figma.js +32 -0
  144. package/lib/commonjs/figma/Text.figma.js.map +1 -0
  145. package/lib/commonjs/figma/icons.figma.batch.js +27 -0
  146. package/lib/commonjs/figma/icons.figma.batch.js.map +1 -0
  147. package/lib/commonjs/figma/icons.figma.batch.json +17705 -0
  148. package/lib/commonjs/hooks/index.js +19 -0
  149. package/lib/commonjs/hooks/index.js.map +1 -0
  150. package/lib/commonjs/hooks/useForgeBottomTabScreenOptions.js +246 -0
  151. package/lib/commonjs/hooks/useForgeBottomTabScreenOptions.js.map +1 -0
  152. package/lib/commonjs/index.js +24 -0
  153. package/lib/commonjs/index.js.map +1 -1
  154. package/lib/commonjs/metro/withCdxMetroConfig.js +7 -18
  155. package/lib/commonjs/metro/withCdxMetroConfig.js.map +1 -1
  156. package/lib/commonjs/metro/withForgeMetroConfig.js +24 -0
  157. package/lib/commonjs/metro/withForgeMetroConfig.js.map +1 -0
  158. package/lib/commonjs/navigation/forgeTabIcon.js +43 -0
  159. package/lib/commonjs/navigation/forgeTabIcon.js.map +1 -0
  160. package/lib/commonjs/navigation/forgeTabIcon.native.js +35 -0
  161. package/lib/commonjs/navigation/forgeTabIcon.native.js.map +1 -0
  162. package/lib/commonjs/navigation/index.js +13 -0
  163. package/lib/commonjs/navigation/index.js.map +1 -0
  164. package/lib/commonjs/navigation/types.js +38 -0
  165. package/lib/commonjs/navigation/types.js.map +1 -0
  166. package/lib/commonjs/styles/primitives.js +43 -6
  167. package/lib/commonjs/styles/primitives.js.map +1 -1
  168. package/lib/module/components/AlertDialog/index.js +5 -4
  169. package/lib/module/components/AlertDialog/index.js.map +1 -1
  170. package/lib/module/components/Avatar/index.js +1 -1
  171. package/lib/module/components/Avatar/styles.js +36 -29
  172. package/lib/module/components/Avatar/styles.js.map +1 -1
  173. package/lib/module/components/Button/index.js +17 -2
  174. package/lib/module/components/Button/index.js.map +1 -1
  175. package/lib/module/components/Button/styles.js +85 -26
  176. package/lib/module/components/Button/styles.js.map +1 -1
  177. package/lib/module/components/CLAUDE.md +90 -0
  178. package/lib/module/components/Card/index.js +23 -4
  179. package/lib/module/components/Card/index.js.map +1 -1
  180. package/lib/module/components/Card/styles.js +27 -4
  181. package/lib/module/components/Card/styles.js.map +1 -1
  182. package/lib/module/components/Checkbox/index.js +6 -30
  183. package/lib/module/components/Checkbox/index.js.map +1 -1
  184. package/lib/module/components/Checkbox/styles.js +43 -48
  185. package/lib/module/components/Checkbox/styles.js.map +1 -1
  186. package/lib/module/components/Chip/index.js +82 -13
  187. package/lib/module/components/Chip/index.js.map +1 -1
  188. package/lib/module/components/Chip/styles.js +206 -20
  189. package/lib/module/components/Chip/styles.js.map +1 -1
  190. package/lib/module/components/Dialog/index.js +74 -19
  191. package/lib/module/components/Dialog/index.js.map +1 -1
  192. package/lib/module/components/Dialog/styles.js +60 -14
  193. package/lib/module/components/Dialog/styles.js.map +1 -1
  194. package/lib/module/components/Field/index.js +9 -3
  195. package/lib/module/components/Field/index.js.map +1 -1
  196. package/lib/module/components/Field/styles.js +4 -4
  197. package/lib/module/components/Field/styles.js.map +1 -1
  198. package/lib/module/components/Heading/styles.js +1 -1
  199. package/lib/module/components/Heading/styles.js.map +1 -1
  200. package/lib/module/components/Icon/index.js +3 -4
  201. package/lib/module/components/Icon/index.js.map +1 -1
  202. package/lib/module/components/IconButton/index.js +6 -1
  203. package/lib/module/components/IconButton/index.js.map +1 -1
  204. package/lib/module/components/IconButton/styles.js +135 -10
  205. package/lib/module/components/IconButton/styles.js.map +1 -1
  206. package/lib/module/components/Input/styles.js +7 -6
  207. package/lib/module/components/Input/styles.js.map +1 -1
  208. package/lib/module/components/Link/index.js +25 -6
  209. package/lib/module/components/Link/index.js.map +1 -1
  210. package/lib/module/components/Link/styles.js +55 -6
  211. package/lib/module/components/Link/styles.js.map +1 -1
  212. package/lib/module/components/ListItem/index.js +3 -25
  213. package/lib/module/components/ListItem/index.js.map +1 -1
  214. package/lib/module/components/ListItem/styles.js +30 -58
  215. package/lib/module/components/ListItem/styles.js.map +1 -1
  216. package/lib/module/components/ProgressSegmented/index.js +25 -11
  217. package/lib/module/components/ProgressSegmented/index.js.map +1 -1
  218. package/lib/module/components/Radio/index.js +164 -0
  219. package/lib/module/components/Radio/index.js.map +1 -0
  220. package/lib/module/components/Radio/styles.js +27 -0
  221. package/lib/module/components/Radio/styles.js.map +1 -0
  222. package/lib/module/components/ScopedTheme/index.js +19 -0
  223. package/lib/module/components/ScopedTheme/index.js.map +1 -0
  224. package/lib/module/components/Select/SelectTriggerHost.web.js +4 -0
  225. package/lib/module/components/Select/SelectTriggerHost.web.js.map +1 -1
  226. package/lib/module/components/Select/index.js +10 -4
  227. package/lib/module/components/Select/index.js.map +1 -1
  228. package/lib/module/components/Select/styles.js +18 -21
  229. package/lib/module/components/Select/styles.js.map +1 -1
  230. package/lib/module/components/Text/styles.js +2 -2
  231. package/lib/module/components/Text/styles.js.map +1 -1
  232. package/lib/module/components/Tile/index.js +243 -0
  233. package/lib/module/components/Tile/index.js.map +1 -0
  234. package/lib/module/components/Tile/styles.js +48 -0
  235. package/lib/module/components/Tile/styles.js.map +1 -0
  236. package/lib/module/components/index.js +3 -0
  237. package/lib/module/components/index.js.map +1 -1
  238. package/lib/module/figma/AlertDialog.Description.figma.js +14 -0
  239. package/lib/module/figma/AlertDialog.Description.figma.js.map +1 -0
  240. package/lib/module/figma/AlertDialog.Footer.figma.js +35 -0
  241. package/lib/module/figma/AlertDialog.Footer.figma.js.map +1 -0
  242. package/lib/module/figma/AlertDialog.Header.figma.js +22 -0
  243. package/lib/module/figma/AlertDialog.Header.figma.js.map +1 -0
  244. package/lib/module/figma/AlertDialog.Text.figma.js +14 -0
  245. package/lib/module/figma/AlertDialog.Text.figma.js.map +1 -0
  246. package/lib/module/figma/AlertDialog.Title.figma.js +21 -0
  247. package/lib/module/figma/AlertDialog.Title.figma.js.map +1 -0
  248. package/lib/module/figma/AlertDialog.figma.js +37 -0
  249. package/lib/module/figma/AlertDialog.figma.js.map +1 -0
  250. package/lib/module/figma/Avatar.figma.js +51 -0
  251. package/lib/module/figma/Avatar.figma.js.map +1 -0
  252. package/lib/module/figma/Button.figma.js +28 -15
  253. package/lib/module/figma/Button.figma.js.map +1 -1
  254. package/lib/module/figma/CLAUDE.md +30 -0
  255. package/lib/module/figma/Card.Header.figma.js +22 -0
  256. package/lib/module/figma/Card.Header.figma.js.map +1 -0
  257. package/lib/module/figma/Card.figma.js +36 -0
  258. package/lib/module/figma/Card.figma.js.map +1 -0
  259. package/lib/module/figma/Checkbox.figma.js +49 -0
  260. package/lib/module/figma/Checkbox.figma.js.map +1 -0
  261. package/lib/module/figma/Chip.figma.js +62 -0
  262. package/lib/module/figma/Chip.figma.js.map +1 -0
  263. package/lib/module/figma/Dialog.Description.figma.js +14 -0
  264. package/lib/module/figma/Dialog.Description.figma.js.map +1 -0
  265. package/lib/module/figma/Dialog.Footer.figma.js +24 -0
  266. package/lib/module/figma/Dialog.Footer.figma.js.map +1 -0
  267. package/lib/module/figma/Dialog.Header.figma.js +23 -0
  268. package/lib/module/figma/Dialog.Header.figma.js.map +1 -0
  269. package/lib/module/figma/Dialog.Text.figma.js +14 -0
  270. package/lib/module/figma/Dialog.Text.figma.js.map +1 -0
  271. package/lib/module/figma/Dialog.Title.figma.js +21 -0
  272. package/lib/module/figma/Dialog.Title.figma.js.map +1 -0
  273. package/lib/module/figma/Dialog.figma.js +45 -0
  274. package/lib/module/figma/Dialog.figma.js.map +1 -0
  275. package/lib/module/figma/Field.Input.figma.js +51 -0
  276. package/lib/module/figma/Field.Input.figma.js.map +1 -0
  277. package/lib/module/figma/Field.Select.figma.js +51 -0
  278. package/lib/module/figma/Field.Select.figma.js.map +1 -0
  279. package/lib/module/figma/Heading.figma.js +24 -0
  280. package/lib/module/figma/Heading.figma.js.map +1 -0
  281. package/lib/module/figma/Icon.figma.js +14 -0
  282. package/lib/module/figma/Icon.figma.js.map +1 -0
  283. package/lib/module/figma/IconButton.figma.js +41 -0
  284. package/lib/module/figma/IconButton.figma.js.map +1 -0
  285. package/lib/module/figma/Input.figma.js +46 -0
  286. package/lib/module/figma/Input.figma.js.map +1 -0
  287. package/lib/module/figma/Link.figma.js +24 -0
  288. package/lib/module/figma/Link.figma.js.map +1 -0
  289. package/lib/module/figma/ListItem.Description.figma.js +17 -0
  290. package/lib/module/figma/ListItem.Description.figma.js.map +1 -0
  291. package/lib/module/figma/ListItem.LeadingSlot.figma.js +18 -0
  292. package/lib/module/figma/ListItem.LeadingSlot.figma.js.map +1 -0
  293. package/lib/module/figma/ListItem.Meta.figma.js +17 -0
  294. package/lib/module/figma/ListItem.Meta.figma.js.map +1 -0
  295. package/lib/module/figma/ListItem.SectionHeader.figma.js +18 -0
  296. package/lib/module/figma/ListItem.SectionHeader.figma.js.map +1 -0
  297. package/lib/module/figma/ListItem.Title.figma.js +17 -0
  298. package/lib/module/figma/ListItem.Title.figma.js.map +1 -0
  299. package/lib/module/figma/ListItem.TrailingSlot.figma.js +18 -0
  300. package/lib/module/figma/ListItem.TrailingSlot.figma.js.map +1 -0
  301. package/lib/module/figma/ListItem.figma.js +44 -0
  302. package/lib/module/figma/ListItem.figma.js.map +1 -0
  303. package/lib/module/figma/ProgressSegmented.figma.js +33 -0
  304. package/lib/module/figma/ProgressSegmented.figma.js.map +1 -0
  305. package/lib/module/figma/Radio.figma.js +34 -0
  306. package/lib/module/figma/Radio.figma.js.map +1 -0
  307. package/lib/module/figma/Select.figma.js +47 -0
  308. package/lib/module/figma/Select.figma.js.map +1 -0
  309. package/lib/module/figma/Text.figma.js +26 -0
  310. package/lib/module/figma/Text.figma.js.map +1 -0
  311. package/lib/module/figma/icons.figma.batch.js +22 -0
  312. package/lib/module/figma/icons.figma.batch.js.map +1 -0
  313. package/lib/module/figma/icons.figma.batch.json +17705 -0
  314. package/lib/module/hooks/index.js +4 -0
  315. package/lib/module/hooks/index.js.map +1 -0
  316. package/lib/module/hooks/useForgeBottomTabScreenOptions.js +242 -0
  317. package/lib/module/hooks/useForgeBottomTabScreenOptions.js.map +1 -0
  318. package/lib/module/index.js +2 -0
  319. package/lib/module/index.js.map +1 -1
  320. package/lib/module/metro/withCdxMetroConfig.js +3 -17
  321. package/lib/module/metro/withCdxMetroConfig.js.map +1 -1
  322. package/lib/module/metro/withForgeMetroConfig.js +20 -0
  323. package/lib/module/metro/withForgeMetroConfig.js.map +1 -0
  324. package/lib/module/navigation/forgeTabIcon.js +39 -0
  325. package/lib/module/navigation/forgeTabIcon.js.map +1 -0
  326. package/lib/module/navigation/forgeTabIcon.native.js +31 -0
  327. package/lib/module/navigation/forgeTabIcon.native.js.map +1 -0
  328. package/lib/module/navigation/index.js +4 -0
  329. package/lib/module/navigation/index.js.map +1 -0
  330. package/lib/module/navigation/types.js +36 -0
  331. package/lib/module/navigation/types.js.map +1 -0
  332. package/lib/module/styles/primitives.js +43 -6
  333. package/lib/module/styles/primitives.js.map +1 -1
  334. package/lib/typescript/components/AlertDialog/index.d.ts +3 -2
  335. package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
  336. package/lib/typescript/components/Avatar/styles.d.ts +4 -4
  337. package/lib/typescript/components/Avatar/styles.d.ts.map +1 -1
  338. package/lib/typescript/components/Button/index.d.ts +13 -1
  339. package/lib/typescript/components/Button/index.d.ts.map +1 -1
  340. package/lib/typescript/components/Button/styles.d.ts +5 -3
  341. package/lib/typescript/components/Button/styles.d.ts.map +1 -1
  342. package/lib/typescript/components/Card/index.d.ts +4 -3
  343. package/lib/typescript/components/Card/index.d.ts.map +1 -1
  344. package/lib/typescript/components/Card/styles.d.ts +13 -3
  345. package/lib/typescript/components/Card/styles.d.ts.map +1 -1
  346. package/lib/typescript/components/Checkbox/index.d.ts +1 -2
  347. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
  348. package/lib/typescript/components/Checkbox/styles.d.ts +4 -14
  349. package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
  350. package/lib/typescript/components/Chip/index.d.ts +19 -6
  351. package/lib/typescript/components/Chip/index.d.ts.map +1 -1
  352. package/lib/typescript/components/Chip/styles.d.ts +13 -4
  353. package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
  354. package/lib/typescript/components/Dialog/index.d.ts +16 -10
  355. package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
  356. package/lib/typescript/components/Dialog/styles.d.ts +16 -5
  357. package/lib/typescript/components/Dialog/styles.d.ts.map +1 -1
  358. package/lib/typescript/components/Field/FieldLabel.web.d.ts +2 -2
  359. package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +1 -1
  360. package/lib/typescript/components/Field/index.d.ts.map +1 -1
  361. package/lib/typescript/components/Field/styles.d.ts.map +1 -1
  362. package/lib/typescript/components/Heading/styles.d.ts +1 -1
  363. package/lib/typescript/components/Icon/index.d.ts +5 -5
  364. package/lib/typescript/components/Icon/index.d.ts.map +1 -1
  365. package/lib/typescript/components/IconButton/index.d.ts +3 -3
  366. package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
  367. package/lib/typescript/components/IconButton/styles.d.ts +6 -2
  368. package/lib/typescript/components/IconButton/styles.d.ts.map +1 -1
  369. package/lib/typescript/components/Input/styles.d.ts.map +1 -1
  370. package/lib/typescript/components/Link/index.d.ts +2 -2
  371. package/lib/typescript/components/Link/index.d.ts.map +1 -1
  372. package/lib/typescript/components/Link/styles.d.ts +9 -2
  373. package/lib/typescript/components/Link/styles.d.ts.map +1 -1
  374. package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
  375. package/lib/typescript/components/ListItem/styles.d.ts +3 -10
  376. package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
  377. package/lib/typescript/components/ProgressSegmented/index.d.ts +14 -3
  378. package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -1
  379. package/lib/typescript/components/Radio/index.d.ts +40 -0
  380. package/lib/typescript/components/Radio/index.d.ts.map +1 -0
  381. package/lib/typescript/components/Radio/styles.d.ts +8 -0
  382. package/lib/typescript/components/Radio/styles.d.ts.map +1 -0
  383. package/lib/typescript/components/ScopedTheme/index.d.ts +16 -0
  384. package/lib/typescript/components/ScopedTheme/index.d.ts.map +1 -0
  385. package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +3 -0
  386. package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +1 -1
  387. package/lib/typescript/components/Select/index.d.ts +1 -1
  388. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  389. package/lib/typescript/components/Select/styles.d.ts.map +1 -1
  390. package/lib/typescript/components/Stack/styles.d.ts +2 -2
  391. package/lib/typescript/components/Text/styles.d.ts +1 -1
  392. package/lib/typescript/components/Tile/index.d.ts +70 -0
  393. package/lib/typescript/components/Tile/index.d.ts.map +1 -0
  394. package/lib/typescript/components/Tile/styles.d.ts +18 -0
  395. package/lib/typescript/components/Tile/styles.d.ts.map +1 -0
  396. package/lib/typescript/components/index.d.ts +3 -0
  397. package/lib/typescript/components/index.d.ts.map +1 -1
  398. package/lib/typescript/figma/AlertDialog.Description.figma.d.ts +8 -0
  399. package/lib/typescript/figma/AlertDialog.Description.figma.d.ts.map +1 -0
  400. package/lib/typescript/figma/AlertDialog.Footer.figma.d.ts +8 -0
  401. package/lib/typescript/figma/AlertDialog.Footer.figma.d.ts.map +1 -0
  402. package/lib/typescript/figma/AlertDialog.Header.figma.d.ts +8 -0
  403. package/lib/typescript/figma/AlertDialog.Header.figma.d.ts.map +1 -0
  404. package/lib/typescript/figma/AlertDialog.Text.figma.d.ts +8 -0
  405. package/lib/typescript/figma/AlertDialog.Text.figma.d.ts.map +1 -0
  406. package/lib/typescript/figma/AlertDialog.Title.figma.d.ts +8 -0
  407. package/lib/typescript/figma/AlertDialog.Title.figma.d.ts.map +1 -0
  408. package/lib/typescript/figma/AlertDialog.figma.d.ts +8 -0
  409. package/lib/typescript/figma/AlertDialog.figma.d.ts.map +1 -0
  410. package/lib/typescript/figma/Avatar.figma.d.ts +11 -0
  411. package/lib/typescript/figma/Avatar.figma.d.ts.map +1 -0
  412. package/lib/typescript/figma/Button.figma.d.ts.map +1 -1
  413. package/lib/typescript/figma/Card.Header.figma.d.ts +8 -0
  414. package/lib/typescript/figma/Card.Header.figma.d.ts.map +1 -0
  415. package/lib/typescript/figma/Card.figma.d.ts +8 -0
  416. package/lib/typescript/figma/Card.figma.d.ts.map +1 -0
  417. package/lib/typescript/figma/Checkbox.figma.d.ts +8 -0
  418. package/lib/typescript/figma/Checkbox.figma.d.ts.map +1 -0
  419. package/lib/typescript/figma/Chip.figma.d.ts +8 -0
  420. package/lib/typescript/figma/Chip.figma.d.ts.map +1 -0
  421. package/lib/typescript/figma/Dialog.Description.figma.d.ts +8 -0
  422. package/lib/typescript/figma/Dialog.Description.figma.d.ts.map +1 -0
  423. package/lib/typescript/figma/Dialog.Footer.figma.d.ts +8 -0
  424. package/lib/typescript/figma/Dialog.Footer.figma.d.ts.map +1 -0
  425. package/lib/typescript/figma/Dialog.Header.figma.d.ts +8 -0
  426. package/lib/typescript/figma/Dialog.Header.figma.d.ts.map +1 -0
  427. package/lib/typescript/figma/Dialog.Text.figma.d.ts +8 -0
  428. package/lib/typescript/figma/Dialog.Text.figma.d.ts.map +1 -0
  429. package/lib/typescript/figma/Dialog.Title.figma.d.ts +8 -0
  430. package/lib/typescript/figma/Dialog.Title.figma.d.ts.map +1 -0
  431. package/lib/typescript/figma/Dialog.figma.d.ts +8 -0
  432. package/lib/typescript/figma/Dialog.figma.d.ts.map +1 -0
  433. package/lib/typescript/figma/Field.Input.figma.d.ts +8 -0
  434. package/lib/typescript/figma/Field.Input.figma.d.ts.map +1 -0
  435. package/lib/typescript/figma/Field.Select.figma.d.ts +8 -0
  436. package/lib/typescript/figma/Field.Select.figma.d.ts.map +1 -0
  437. package/lib/typescript/figma/Heading.figma.d.ts +8 -0
  438. package/lib/typescript/figma/Heading.figma.d.ts.map +1 -0
  439. package/lib/typescript/figma/Icon.figma.d.ts +8 -0
  440. package/lib/typescript/figma/Icon.figma.d.ts.map +1 -0
  441. package/lib/typescript/figma/IconButton.figma.d.ts +8 -0
  442. package/lib/typescript/figma/IconButton.figma.d.ts.map +1 -0
  443. package/lib/typescript/figma/Input.figma.d.ts +8 -0
  444. package/lib/typescript/figma/Input.figma.d.ts.map +1 -0
  445. package/lib/typescript/figma/Link.figma.d.ts +8 -0
  446. package/lib/typescript/figma/Link.figma.d.ts.map +1 -0
  447. package/lib/typescript/figma/ListItem.Description.figma.d.ts +11 -0
  448. package/lib/typescript/figma/ListItem.Description.figma.d.ts.map +1 -0
  449. package/lib/typescript/figma/ListItem.LeadingSlot.figma.d.ts +8 -0
  450. package/lib/typescript/figma/ListItem.LeadingSlot.figma.d.ts.map +1 -0
  451. package/lib/typescript/figma/ListItem.Meta.figma.d.ts +11 -0
  452. package/lib/typescript/figma/ListItem.Meta.figma.d.ts.map +1 -0
  453. package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts +8 -0
  454. package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts.map +1 -0
  455. package/lib/typescript/figma/ListItem.Title.figma.d.ts +11 -0
  456. package/lib/typescript/figma/ListItem.Title.figma.d.ts.map +1 -0
  457. package/lib/typescript/figma/ListItem.TrailingSlot.figma.d.ts +8 -0
  458. package/lib/typescript/figma/ListItem.TrailingSlot.figma.d.ts.map +1 -0
  459. package/lib/typescript/figma/ListItem.figma.d.ts +8 -0
  460. package/lib/typescript/figma/ListItem.figma.d.ts.map +1 -0
  461. package/lib/typescript/figma/ProgressSegmented.figma.d.ts +8 -0
  462. package/lib/typescript/figma/ProgressSegmented.figma.d.ts.map +1 -0
  463. package/lib/typescript/figma/Radio.figma.d.ts +8 -0
  464. package/lib/typescript/figma/Radio.figma.d.ts.map +1 -0
  465. package/lib/typescript/figma/Select.figma.d.ts +8 -0
  466. package/lib/typescript/figma/Select.figma.d.ts.map +1 -0
  467. package/lib/typescript/figma/Text.figma.d.ts +11 -0
  468. package/lib/typescript/figma/Text.figma.d.ts.map +1 -0
  469. package/lib/typescript/figma/icons.figma.batch.d.ts +14 -0
  470. package/lib/typescript/figma/icons.figma.batch.d.ts.map +1 -0
  471. package/lib/typescript/hooks/index.d.ts +2 -0
  472. package/lib/typescript/hooks/index.d.ts.map +1 -0
  473. package/lib/typescript/hooks/useForgeBottomTabScreenOptions.d.ts +137 -0
  474. package/lib/typescript/hooks/useForgeBottomTabScreenOptions.d.ts.map +1 -0
  475. package/lib/typescript/index.d.ts +2 -0
  476. package/lib/typescript/index.d.ts.map +1 -1
  477. package/lib/typescript/metro/withCdxMetroConfig.d.ts +4 -18
  478. package/lib/typescript/metro/withCdxMetroConfig.d.ts.map +1 -1
  479. package/lib/typescript/metro/withForgeMetroConfig.d.ts +19 -0
  480. package/lib/typescript/metro/withForgeMetroConfig.d.ts.map +1 -0
  481. package/lib/typescript/navigation/forgeTabIcon.d.ts +27 -0
  482. package/lib/typescript/navigation/forgeTabIcon.d.ts.map +1 -0
  483. package/lib/typescript/navigation/forgeTabIcon.native.d.ts +15 -0
  484. package/lib/typescript/navigation/forgeTabIcon.native.d.ts.map +1 -0
  485. package/lib/typescript/navigation/index.d.ts +4 -0
  486. package/lib/typescript/navigation/index.d.ts.map +1 -0
  487. package/lib/typescript/navigation/types.d.ts +37 -0
  488. package/lib/typescript/navigation/types.d.ts.map +1 -0
  489. package/lib/typescript/styles/primitives.d.ts +38 -0
  490. package/lib/typescript/styles/primitives.d.ts.map +1 -1
  491. package/package.json +10 -8
  492. package/src/components/AlertDialog/index.tsx +8 -6
  493. package/src/components/Avatar/index.tsx +1 -1
  494. package/src/components/Avatar/styles.ts +49 -34
  495. package/src/components/Button/index.tsx +39 -5
  496. package/src/components/Button/styles.ts +56 -27
  497. package/src/components/CLAUDE.md +90 -0
  498. package/src/components/Card/index.tsx +41 -16
  499. package/src/components/Card/styles.ts +42 -15
  500. package/src/components/Checkbox/index.tsx +8 -19
  501. package/src/components/Checkbox/styles.ts +84 -86
  502. package/src/components/Chip/index.tsx +104 -27
  503. package/src/components/Chip/styles.ts +232 -18
  504. package/src/components/Dialog/index.tsx +95 -29
  505. package/src/components/Dialog/styles.ts +72 -30
  506. package/src/components/Field/FieldLabel.web.tsx +1 -1
  507. package/src/components/Field/index.tsx +10 -3
  508. package/src/components/Field/styles.ts +5 -4
  509. package/src/components/Heading/styles.ts +1 -1
  510. package/src/components/Icon/index.tsx +6 -7
  511. package/src/components/IconButton/index.tsx +7 -6
  512. package/src/components/IconButton/styles.ts +136 -10
  513. package/src/components/Input/styles.ts +15 -9
  514. package/src/components/Link/index.tsx +22 -9
  515. package/src/components/Link/styles.ts +49 -9
  516. package/src/components/ListItem/index.tsx +8 -23
  517. package/src/components/ListItem/styles.ts +50 -81
  518. package/src/components/ProgressSegmented/index.tsx +50 -14
  519. package/src/components/Radio/index.tsx +192 -0
  520. package/src/components/Radio/styles.ts +59 -0
  521. package/src/components/ScopedTheme/index.tsx +17 -0
  522. package/src/components/Select/SelectTriggerHost.web.tsx +8 -1
  523. package/src/components/Select/index.tsx +9 -4
  524. package/src/components/Select/styles.ts +49 -51
  525. package/src/components/Text/styles.ts +2 -2
  526. package/src/components/Tile/index.tsx +296 -0
  527. package/src/components/Tile/styles.ts +82 -0
  528. package/src/components/index.ts +3 -0
  529. package/src/hooks/index.ts +5 -0
  530. package/src/hooks/useForgeBottomTabScreenOptions.ts +245 -0
  531. package/src/index.ts +2 -0
  532. package/src/metro/withCdxMetroConfig.ts +4 -29
  533. package/src/metro/withForgeMetroConfig.ts +29 -0
  534. package/src/navigation/forgeTabIcon.native.ts +36 -0
  535. package/src/navigation/forgeTabIcon.ts +33 -0
  536. package/src/navigation/index.ts +3 -0
  537. package/src/navigation/types.ts +54 -0
  538. package/src/styles/primitives.ts +43 -6
@@ -1,40 +1,92 @@
1
- import { forwardRef, type ReactNode } from 'react';
2
- import { View, Text as RNText, type ViewProps, type TextProps } from 'react-native';
3
- import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
1
+ import { forwardRef, useMemo, type ReactNode } from 'react';
2
+ import { Pressable, Text as RNText, View, type TextProps } from 'react-native';
3
+ import { createChip, type IChipProps } from '@cdx-ui/primitives';
4
+ import {
5
+ cn,
6
+ ParentContext,
7
+ useParentContext,
8
+ useStyleContext,
9
+ withStyleContext,
10
+ type WithStyleContextProps,
11
+ } from '@cdx-ui/utils';
12
+ import { Avatar, type AvatarProps } from '../Avatar';
4
13
  import { Icon, type IconProps } from '../Icon';
5
- import { chipRootVariants, chipLabelVariants, chipIconVariants, ChipVariants } from './styles';
14
+ import {
15
+ chipAvatarVariants,
16
+ chipIconVariants,
17
+ chipLabelVariants,
18
+ chipRootVariants,
19
+ type ChipVariantProps,
20
+ } from './styles';
6
21
 
7
22
  const SCOPE = 'CHIP';
8
23
 
9
- const Root = withStyleContext(View, SCOPE);
24
+ const RootView = withStyleContext(View, SCOPE);
25
+ const RootPressable = withStyleContext(Pressable, SCOPE);
10
26
 
11
- const useChipStyleContext = () => useStyleContext(SCOPE) as ChipVariants;
27
+ const ChipPrimitive = createChip({
28
+ View: RootView,
29
+ Pressable: RootPressable,
30
+ });
31
+
32
+ const useChipStyleContext = () => useStyleContext(SCOPE) as ChipVariantProps;
12
33
 
13
34
  // =============================================================================
14
- // STYLED ROOT COMPONENT
35
+ // ROOT
15
36
  // =============================================================================
16
37
 
17
- export interface ChipProps extends ViewProps, ChipVariants {
18
- children?: ReactNode;
38
+ export interface ChipProps extends IChipProps, ChipVariantProps, WithStyleContextProps {
19
39
  className?: string;
40
+ children?: ReactNode;
20
41
  }
21
42
 
22
43
  const ChipRoot = forwardRef<View, ChipProps>(
23
- ({ children, color = 'default', className, style, ...props }, ref) => {
24
- const computedClassName = cn(chipRootVariants({ color }), className);
44
+ (
45
+ {
46
+ children,
47
+ variant = 'tint',
48
+ size = 'default',
49
+ color = 'default',
50
+ className,
51
+ style,
52
+ asChild,
53
+ ...props
54
+ },
55
+ ref,
56
+ ) => {
57
+ const parentContextValues = useParentContext();
58
+ const styleContextValues = useMemo(
59
+ () => ({ ...parentContextValues, [SCOPE]: { variant, size, color } }),
60
+ [parentContextValues, variant, size, color],
61
+ );
25
62
 
26
- return (
27
- <Root ref={ref} className={computedClassName} style={style} context={{ color }} {...props}>
63
+ const computedClassName = cn(chipRootVariants({ variant, size, color }), className);
64
+
65
+ const root = (
66
+ <ChipPrimitive
67
+ ref={ref as never}
68
+ asChild={asChild}
69
+ className={computedClassName}
70
+ context={{ variant, size, color }}
71
+ style={style}
72
+ {...props}
73
+ >
28
74
  {children}
29
- </Root>
75
+ </ChipPrimitive>
30
76
  );
77
+
78
+ if (asChild) {
79
+ return <ParentContext.Provider value={styleContextValues}>{root}</ParentContext.Provider>;
80
+ }
81
+
82
+ return root;
31
83
  },
32
84
  );
33
85
 
34
86
  ChipRoot.displayName = 'Chip';
35
87
 
36
88
  // =============================================================================
37
- // STYLED LABEL COMPONENT
89
+ // LABEL
38
90
  // =============================================================================
39
91
 
40
92
  export interface ChipLabelProps extends TextProps {
@@ -44,9 +96,8 @@ export interface ChipLabelProps extends TextProps {
44
96
 
45
97
  const ChipLabel = forwardRef<RNText, ChipLabelProps>(
46
98
  ({ className, children, style, ...props }, ref) => {
47
- const { color } = useChipStyleContext();
48
-
49
- const computedClassName = cn(chipLabelVariants({ color }), className);
99
+ const { size, variant, color } = useChipStyleContext();
100
+ const computedClassName = cn(chipLabelVariants({ size, variant, color }), className);
50
101
 
51
102
  return (
52
103
  <RNText ref={ref} className={computedClassName} style={style} {...props}>
@@ -59,33 +110,59 @@ const ChipLabel = forwardRef<RNText, ChipLabelProps>(
59
110
  ChipLabel.displayName = 'Chip.Label';
60
111
 
61
112
  // =============================================================================
62
- // STYLED ICON COMPONENT
113
+ // ICON
63
114
  // =============================================================================
64
115
 
65
- export interface ChipIconProps extends Omit<IconProps, 'children'> {}
66
-
67
- const ChipIcon = ({ className, style, as, ...props }: ChipIconProps) => {
68
- const { color } = useChipStyleContext();
69
-
70
- const computedClassName = cn(chipIconVariants({ color }), className);
116
+ export interface ChipIconProps extends Omit<IconProps, 'children'> {
117
+ /** Leading (default) or trailing slot — applies the correct negative margin offset. */
118
+ slot?: 'leading' | 'trailing';
119
+ className?: string;
120
+ }
71
121
 
122
+ const ChipIcon = ({ className, style, as, slot, ...props }: ChipIconProps) => {
123
+ const { size, color } = useChipStyleContext();
124
+ const computedClassName = cn(chipIconVariants({ size, color, slot }), className);
72
125
  return <Icon as={as} className={computedClassName} style={style} {...props} />;
73
126
  };
74
127
 
75
128
  ChipIcon.displayName = 'Chip.Icon';
76
129
 
77
130
  // =============================================================================
78
- // COMPOUND COMPONENT EXPORT
131
+ // AVATAR
132
+ // =============================================================================
133
+
134
+ export interface ChipAvatarProps extends Omit<AvatarProps, 'size'> {}
135
+
136
+ const ChipAvatar = ({ className, style, children, ...props }: ChipAvatarProps) => {
137
+ const { size } = useChipStyleContext();
138
+ // chipAvatarVariants sets w/h and the leading slot negative margin.
139
+ // Avatar renders with size="sm" (its smallest named size) but chipAvatarVariants
140
+ // overrides the w/h via tailwind-merge so the chip size wins.
141
+ const computedClassName = cn(chipAvatarVariants({ size }), className);
142
+
143
+ return (
144
+ <Avatar size="sm" className={computedClassName} style={style} {...props}>
145
+ {children}
146
+ </Avatar>
147
+ );
148
+ };
149
+
150
+ ChipAvatar.displayName = 'Chip.Avatar';
151
+
152
+ // =============================================================================
153
+ // COMPOUND EXPORT
79
154
  // =============================================================================
80
155
 
81
156
  type ChipCompoundComponent = typeof ChipRoot & {
82
157
  Label: typeof ChipLabel;
83
158
  Icon: typeof ChipIcon;
159
+ Avatar: typeof ChipAvatar;
84
160
  };
85
161
 
86
162
  export const Chip = Object.assign(ChipRoot, {
87
163
  Label: ChipLabel,
88
164
  Icon: ChipIcon,
165
+ Avatar: ChipAvatar,
89
166
  }) as ChipCompoundComponent;
90
167
 
91
- export { type ChipVariants } from './styles';
168
+ export { type ChipVariantProps } from './styles';
@@ -1,52 +1,266 @@
1
+ import { Platform } from 'react-native';
1
2
  import { cva, type VariantProps } from 'class-variance-authority';
3
+ import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
4
+
5
+ const chipInteractiveRoot = [
6
+ TRANSITION_COLORS,
7
+ 'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
8
+ DISABLED_CURSOR,
9
+ Platform.select({
10
+ web: [
11
+ 'outline-none',
12
+ 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-stroke-focus web:data-[focus-visible=true]:ring-offset-2',
13
+ ].join(' '),
14
+ default: '',
15
+ }),
16
+ ];
2
17
 
3
18
  export const chipRootVariants = cva(
4
- ['flex-row items-center justify-center rounded-full px-2 py-1 gap-1.5 self-start'],
19
+ ['flex-row items-center justify-center self-start overflow-hidden', ...chipInteractiveRoot],
5
20
  {
6
21
  variants: {
22
+ variant: {
23
+ tint: [],
24
+ outline: ['bg-transparent', 'border'],
25
+ },
7
26
  color: {
8
- default: 'bg-surface-neutral-tint',
9
- error: 'bg-surface-danger-tint',
10
- info: 'bg-surface-info-tint',
11
- success: 'bg-surface-success-tint',
12
- warning: 'bg-surface-warning-tint',
27
+ default: [],
28
+ action: [],
29
+ danger: [],
30
+ warning: [],
31
+ success: [],
32
+ info: [],
33
+ },
34
+ size: {
35
+ default: 'h-8 max-h-8 min-h-8 gap-1.5 px-3 rounded-lg',
36
+ small: 'h-6 max-h-6 min-h-6 gap-1 px-1.5 rounded-md',
37
+ xsmall: 'h-4 max-h-4 min-h-4 gap-0.5 px-1 rounded-sm',
13
38
  },
14
39
  },
40
+ compoundVariants: [
41
+ // ── tint × color ────────────────────────────────────────────────────
42
+ {
43
+ variant: 'tint',
44
+ color: 'default',
45
+ className: [
46
+ 'bg-surface-neutral-tint',
47
+ Platform.select({
48
+ default: 'data-[active=true]:bg-surface-neutral-tint-active',
49
+ web: 'data-[hover=true]:bg-surface-neutral-tint-hover data-[active=true]:data-[hover=true]:bg-surface-neutral-tint-active',
50
+ }),
51
+ ],
52
+ },
53
+ {
54
+ variant: 'tint',
55
+ color: 'action',
56
+ className: [
57
+ 'bg-surface-action-tint',
58
+ Platform.select({
59
+ default: 'data-[active=true]:bg-surface-action-tint-active',
60
+ web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
61
+ }),
62
+ ],
63
+ },
64
+ {
65
+ variant: 'tint',
66
+ color: 'danger',
67
+ className: [
68
+ 'bg-surface-danger-tint',
69
+ Platform.select({
70
+ default: 'data-[active=true]:bg-surface-danger-tint-active',
71
+ web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active',
72
+ }),
73
+ ],
74
+ },
75
+ {
76
+ variant: 'tint',
77
+ color: 'warning',
78
+ className: [
79
+ 'bg-surface-warning-tint',
80
+ Platform.select({
81
+ default: 'data-[active=true]:bg-surface-warning-tint-active',
82
+ web: 'data-[hover=true]:bg-surface-warning-tint-hover data-[active=true]:data-[hover=true]:bg-surface-warning-tint-active',
83
+ }),
84
+ ],
85
+ },
86
+ {
87
+ variant: 'tint',
88
+ color: 'success',
89
+ className: [
90
+ 'bg-surface-success-tint',
91
+ Platform.select({
92
+ default: 'data-[active=true]:bg-surface-success-tint-active',
93
+ web: 'data-[hover=true]:bg-surface-success-tint-hover data-[active=true]:data-[hover=true]:bg-surface-success-tint-active',
94
+ }),
95
+ ],
96
+ },
97
+ {
98
+ variant: 'tint',
99
+ color: 'info',
100
+ className: [
101
+ 'bg-surface-info-tint',
102
+ Platform.select({
103
+ default: 'data-[active=true]:bg-surface-info-tint-active',
104
+ web: 'data-[hover=true]:bg-surface-info-tint-hover data-[active=true]:data-[hover=true]:bg-surface-info-tint-active',
105
+ }),
106
+ ],
107
+ },
108
+
109
+ // ── outline × color ───────────────────────────────────────────────────
110
+ {
111
+ variant: 'outline',
112
+ color: 'default',
113
+ className: [
114
+ 'border-stroke-primary',
115
+ Platform.select({
116
+ default: 'data-[active=true]:bg-surface-neutral-tint',
117
+ web: 'data-[hover=true]:bg-surface-neutral-tint-hover data-[active=true]:data-[hover=true]:bg-surface-neutral-tint-active',
118
+ }),
119
+ ],
120
+ },
121
+ {
122
+ variant: 'outline',
123
+ color: 'action',
124
+ className: [
125
+ 'border-stroke-action',
126
+ Platform.select({
127
+ default: 'data-[active=true]:bg-surface-action-tint',
128
+ web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
129
+ }),
130
+ ],
131
+ },
132
+ {
133
+ variant: 'outline',
134
+ color: 'danger',
135
+ className: [
136
+ 'border-stroke-danger',
137
+ Platform.select({
138
+ default: 'data-[active=true]:bg-surface-danger-tint',
139
+ web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active',
140
+ }),
141
+ ],
142
+ },
143
+ {
144
+ variant: 'outline',
145
+ color: 'warning',
146
+ className: [
147
+ 'border-stroke-warning',
148
+ Platform.select({
149
+ default: 'data-[active=true]:bg-surface-warning-tint',
150
+ web: 'data-[hover=true]:bg-surface-warning-tint-hover data-[active=true]:data-[hover=true]:bg-surface-warning-tint-active',
151
+ }),
152
+ ],
153
+ },
154
+ {
155
+ variant: 'outline',
156
+ color: 'success',
157
+ className: [
158
+ 'border-stroke-success',
159
+ Platform.select({
160
+ default: 'data-[active=true]:bg-surface-success-tint',
161
+ web: 'data-[hover=true]:bg-surface-success-tint-hover data-[active=true]:data-[hover=true]:bg-surface-success-tint-active',
162
+ }),
163
+ ],
164
+ },
165
+ {
166
+ variant: 'outline',
167
+ color: 'info',
168
+ className: [
169
+ 'border-stroke-info',
170
+ Platform.select({
171
+ default: 'data-[active=true]:bg-surface-info-tint',
172
+ web: 'data-[hover=true]:bg-surface-info-tint-hover data-[active=true]:data-[hover=true]:bg-surface-info-tint-active',
173
+ }),
174
+ ],
175
+ },
176
+ ],
15
177
  defaultVariants: {
178
+ variant: 'tint',
16
179
  color: 'default',
180
+ size: 'default',
17
181
  },
18
182
  },
19
183
  );
20
184
 
21
- // TODO: letter-spacing values (tracking-wider) are not working on web, but the font-mono-medium is.
22
- export const chipLabelVariants = cva(['label-sm font-mono-medium'], {
185
+ export const chipLabelVariants = cva(['font-medium'], {
23
186
  variants: {
187
+ variant: {
188
+ tint: 'text-content-primary',
189
+ outline: 'text-content-primary',
190
+ },
24
191
  color: {
25
- default: 'text-content-primary',
26
- error: 'text-content-primary',
27
- info: 'text-content-primary',
28
- success: 'text-content-primary',
29
- warning: 'text-content-primary',
192
+ default: [],
193
+ action: [],
194
+ danger: [],
195
+ warning: [],
196
+ success: [],
197
+ info: [],
198
+ },
199
+ size: {
200
+ default: 'body-md',
201
+ small: 'body-sm',
202
+ xsmall: 'body-xs',
30
203
  },
31
204
  },
205
+ compoundVariants: [
206
+ { variant: 'outline', color: 'action', className: 'text-content-action' },
207
+ { variant: 'outline', color: 'danger', className: 'text-content-danger' },
208
+ { variant: 'outline', color: 'warning', className: 'text-content-warning' },
209
+ { variant: 'outline', color: 'success', className: 'text-content-success' },
210
+ { variant: 'outline', color: 'info', className: 'text-content-info' },
211
+ ],
32
212
  defaultVariants: {
213
+ variant: 'tint',
33
214
  color: 'default',
215
+ size: 'default',
34
216
  },
35
217
  });
36
218
 
37
- export const chipIconVariants = cva(['size-4'], {
219
+ export const chipIconVariants = cva(['shrink-0'], {
38
220
  variants: {
221
+ size: {
222
+ default: 'size-5',
223
+ small: 'size-4',
224
+ xsmall: 'size-2.5',
225
+ },
39
226
  color: {
40
227
  default: 'text-content-primary',
41
- error: 'text-content-danger',
42
- info: 'text-content-info',
43
- success: 'text-content-success',
228
+ action: 'text-content-action',
229
+ danger: 'text-content-danger',
44
230
  warning: 'text-content-warning',
231
+ success: 'text-content-success',
232
+ info: 'text-content-info',
233
+ },
234
+ slot: {
235
+ leading: '',
236
+ trailing: '',
45
237
  },
46
238
  },
239
+ compoundVariants: [
240
+ { slot: 'leading', size: 'default', className: '-ml-1.5' },
241
+ { slot: 'leading', size: 'small', className: '-ml-0.5' },
242
+ { slot: 'leading', size: 'xsmall', className: '-ml-px' },
243
+ { slot: 'trailing', size: 'default', className: '-mr-1.5' },
244
+ { slot: 'trailing', size: 'small', className: '-mr-0.5' },
245
+ { slot: 'trailing', size: 'xsmall', className: '-mr-px' },
246
+ ],
47
247
  defaultVariants: {
248
+ size: 'default',
48
249
  color: 'default',
49
250
  },
50
251
  });
51
252
 
52
- export type ChipVariants = VariantProps<typeof chipRootVariants>;
253
+ export const chipAvatarVariants = cva(['shrink-0 rounded-full overflow-hidden'], {
254
+ variants: {
255
+ size: {
256
+ default: 'size-5 -ml-1.5',
257
+ small: 'size-4 -ml-0.5',
258
+ xsmall: 'size-2.5 -ml-px',
259
+ },
260
+ },
261
+ defaultVariants: {
262
+ size: 'default',
263
+ },
264
+ });
265
+
266
+ export type ChipVariantProps = VariantProps<typeof chipRootVariants>;