@cdx-ui/components 0.0.1-alpha.9 → 0.0.1-beta.2

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 (405) hide show
  1. package/README.md +53 -2
  2. package/lib/commonjs/components/AlertDialog/index.js +117 -0
  3. package/lib/commonjs/components/AlertDialog/index.js.map +1 -0
  4. package/lib/commonjs/components/Avatar/index.js +156 -0
  5. package/lib/commonjs/components/Avatar/index.js.map +1 -0
  6. package/lib/commonjs/components/Avatar/styles.js +80 -0
  7. package/lib/commonjs/components/Avatar/styles.js.map +1 -0
  8. package/lib/commonjs/components/BottomSheet/index.js +248 -0
  9. package/lib/commonjs/components/BottomSheet/index.js.map +1 -0
  10. package/lib/commonjs/components/BottomSheet/styles.js +61 -0
  11. package/lib/commonjs/components/BottomSheet/styles.js.map +1 -0
  12. package/lib/commonjs/components/Box/Box.js +1 -0
  13. package/lib/commonjs/components/Box/Box.js.map +1 -1
  14. package/lib/commonjs/components/Button/index.js +20 -9
  15. package/lib/commonjs/components/Button/index.js.map +1 -1
  16. package/lib/commonjs/components/Button/styles.js +182 -163
  17. package/lib/commonjs/components/Button/styles.js.map +1 -1
  18. package/lib/commonjs/components/Card/index.js +104 -0
  19. package/lib/commonjs/components/Card/index.js.map +1 -0
  20. package/lib/commonjs/components/Card/styles.js +28 -0
  21. package/lib/commonjs/components/Card/styles.js.map +1 -0
  22. package/lib/commonjs/components/Checkbox/index.js +18 -11
  23. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  24. package/lib/commonjs/components/Checkbox/styles.js +17 -16
  25. package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
  26. package/lib/commonjs/components/Chip/index.js +103 -0
  27. package/lib/commonjs/components/Chip/index.js.map +1 -0
  28. package/lib/commonjs/components/Chip/styles.js +52 -0
  29. package/lib/commonjs/components/Chip/styles.js.map +1 -0
  30. package/lib/commonjs/components/Dialog/index.js +275 -0
  31. package/lib/commonjs/components/Dialog/index.js.map +1 -0
  32. package/lib/commonjs/components/Dialog/styles.js +63 -0
  33. package/lib/commonjs/components/Dialog/styles.js.map +1 -0
  34. package/lib/commonjs/components/Field/FieldLabel.js +33 -0
  35. package/lib/commonjs/components/Field/FieldLabel.js.map +1 -0
  36. package/lib/commonjs/components/Field/FieldLabel.web.js +22 -0
  37. package/lib/commonjs/components/Field/FieldLabel.web.js.map +1 -0
  38. package/lib/commonjs/components/Field/index.js +158 -0
  39. package/lib/commonjs/components/Field/index.js.map +1 -0
  40. package/lib/commonjs/components/Field/styles.js +16 -0
  41. package/lib/commonjs/components/Field/styles.js.map +1 -0
  42. package/lib/commonjs/components/Form/FormRoot.js +25 -0
  43. package/lib/commonjs/components/Form/FormRoot.js.map +1 -0
  44. package/lib/commonjs/components/Form/FormRoot.web.js +17 -0
  45. package/lib/commonjs/components/Form/FormRoot.web.js.map +1 -0
  46. package/lib/commonjs/components/Form/index.js +48 -0
  47. package/lib/commonjs/components/Form/index.js.map +1 -0
  48. package/lib/commonjs/components/Form/styles.js +9 -0
  49. package/lib/commonjs/components/Form/styles.js.map +1 -0
  50. package/lib/commonjs/components/Heading/index.js +35 -0
  51. package/lib/commonjs/components/Heading/index.js.map +1 -0
  52. package/lib/commonjs/components/Heading/styles.js +23 -0
  53. package/lib/commonjs/components/Heading/styles.js.map +1 -0
  54. package/lib/commonjs/components/Icon/index.js +61 -0
  55. package/lib/commonjs/components/Icon/index.js.map +1 -0
  56. package/lib/commonjs/components/IconButton/index.js +75 -0
  57. package/lib/commonjs/components/IconButton/index.js.map +1 -0
  58. package/lib/commonjs/components/IconButton/styles.js +44 -0
  59. package/lib/commonjs/components/IconButton/styles.js.map +1 -0
  60. package/lib/commonjs/components/Image/Image.js +69 -0
  61. package/lib/commonjs/components/Image/Image.js.map +1 -0
  62. package/lib/commonjs/components/Image/index.js +13 -0
  63. package/lib/commonjs/components/Image/index.js.map +1 -0
  64. package/lib/commonjs/components/Input/BaseInput.android.js +20 -0
  65. package/lib/commonjs/components/Input/BaseInput.android.js.map +1 -0
  66. package/lib/commonjs/components/Input/index.js +10 -16
  67. package/lib/commonjs/components/Input/index.js.map +1 -1
  68. package/lib/commonjs/components/Input/styles.js +17 -30
  69. package/lib/commonjs/components/Input/styles.js.map +1 -1
  70. package/lib/commonjs/components/Link/index.js +94 -0
  71. package/lib/commonjs/components/Link/index.js.map +1 -0
  72. package/lib/commonjs/components/Link/styles.js +14 -0
  73. package/lib/commonjs/components/Link/styles.js.map +1 -0
  74. package/lib/commonjs/components/OtpInput/index.js +83 -0
  75. package/lib/commonjs/components/OtpInput/index.js.map +1 -0
  76. package/lib/commonjs/components/OtpInput/styles.js +48 -0
  77. package/lib/commonjs/components/OtpInput/styles.js.map +1 -0
  78. package/lib/commonjs/components/ProgressBar/index.js +45 -0
  79. package/lib/commonjs/components/ProgressBar/index.js.map +1 -0
  80. package/lib/commonjs/components/ProgressBar/styles.js +10 -0
  81. package/lib/commonjs/components/ProgressBar/styles.js.map +1 -0
  82. package/lib/commonjs/components/ProgressSegmented/index.js +62 -0
  83. package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -0
  84. package/lib/commonjs/components/ProgressSegmented/styles.js +21 -0
  85. package/lib/commonjs/components/ProgressSegmented/styles.js.map +1 -0
  86. package/lib/commonjs/components/Select/SelectTriggerHost.js +10 -0
  87. package/lib/commonjs/components/Select/SelectTriggerHost.js.map +1 -0
  88. package/lib/commonjs/components/Select/SelectTriggerHost.web.js +98 -0
  89. package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +1 -0
  90. package/lib/commonjs/components/Select/index.js +13 -13
  91. package/lib/commonjs/components/Select/index.js.map +1 -1
  92. package/lib/commonjs/components/Select/styles.js +29 -53
  93. package/lib/commonjs/components/Select/styles.js.map +1 -1
  94. package/lib/commonjs/components/Stack/HStack.js +8 -21
  95. package/lib/commonjs/components/Stack/HStack.js.map +1 -1
  96. package/lib/commonjs/components/Stack/VStack.js +8 -21
  97. package/lib/commonjs/components/Stack/VStack.js.map +1 -1
  98. package/lib/commonjs/components/Stack/styles.js +44 -0
  99. package/lib/commonjs/components/Stack/styles.js.map +1 -0
  100. package/lib/commonjs/components/Text/index.js +18 -9
  101. package/lib/commonjs/components/Text/index.js.map +1 -1
  102. package/lib/commonjs/components/Text/styles.js +23 -0
  103. package/lib/commonjs/components/Text/styles.js.map +1 -0
  104. package/lib/commonjs/components/VirtualizedList/index.js +19 -0
  105. package/lib/commonjs/components/VirtualizedList/index.js.map +1 -0
  106. package/lib/commonjs/components/index.js +204 -0
  107. package/lib/commonjs/components/index.js.map +1 -1
  108. package/lib/commonjs/index.js +40 -0
  109. package/lib/commonjs/index.js.map +1 -1
  110. package/lib/commonjs/styles/index.js +17 -0
  111. package/lib/commonjs/styles/index.js.map +1 -0
  112. package/lib/commonjs/styles/primitives.js +123 -0
  113. package/lib/commonjs/styles/primitives.js.map +1 -0
  114. package/lib/module/components/AlertDialog/index.js +112 -0
  115. package/lib/module/components/AlertDialog/index.js.map +1 -0
  116. package/lib/module/components/Avatar/index.js +152 -0
  117. package/lib/module/components/Avatar/index.js.map +1 -0
  118. package/lib/module/components/Avatar/styles.js +77 -0
  119. package/lib/module/components/Avatar/styles.js.map +1 -0
  120. package/lib/module/components/BottomSheet/index.js +242 -0
  121. package/lib/module/components/BottomSheet/index.js.map +1 -0
  122. package/lib/module/components/BottomSheet/styles.js +58 -0
  123. package/lib/module/components/BottomSheet/styles.js.map +1 -0
  124. package/lib/module/components/Box/Box.js +1 -0
  125. package/lib/module/components/Box/Box.js.map +1 -1
  126. package/lib/module/components/Button/index.js +21 -10
  127. package/lib/module/components/Button/index.js.map +1 -1
  128. package/lib/module/components/Button/styles.js +181 -162
  129. package/lib/module/components/Button/styles.js.map +1 -1
  130. package/lib/module/components/Card/index.js +100 -0
  131. package/lib/module/components/Card/index.js.map +1 -0
  132. package/lib/module/components/Card/styles.js +25 -0
  133. package/lib/module/components/Card/styles.js.map +1 -0
  134. package/lib/module/components/Checkbox/index.js +19 -12
  135. package/lib/module/components/Checkbox/index.js.map +1 -1
  136. package/lib/module/components/Checkbox/styles.js +17 -16
  137. package/lib/module/components/Checkbox/styles.js.map +1 -1
  138. package/lib/module/components/Chip/index.js +99 -0
  139. package/lib/module/components/Chip/index.js.map +1 -0
  140. package/lib/module/components/Chip/styles.js +48 -0
  141. package/lib/module/components/Chip/styles.js.map +1 -0
  142. package/lib/module/components/Dialog/index.js +267 -0
  143. package/lib/module/components/Dialog/index.js.map +1 -0
  144. package/lib/module/components/Dialog/styles.js +60 -0
  145. package/lib/module/components/Dialog/styles.js.map +1 -0
  146. package/lib/module/components/Field/FieldLabel.js +29 -0
  147. package/lib/module/components/Field/FieldLabel.js.map +1 -0
  148. package/lib/module/components/Field/FieldLabel.web.js +17 -0
  149. package/lib/module/components/Field/FieldLabel.web.js.map +1 -0
  150. package/lib/module/components/Field/index.js +155 -0
  151. package/lib/module/components/Field/index.js.map +1 -0
  152. package/lib/module/components/Field/styles.js +12 -0
  153. package/lib/module/components/Field/styles.js.map +1 -0
  154. package/lib/module/components/Form/FormRoot.js +21 -0
  155. package/lib/module/components/Form/FormRoot.js.map +1 -0
  156. package/lib/module/components/Form/FormRoot.web.js +12 -0
  157. package/lib/module/components/Form/FormRoot.web.js.map +1 -0
  158. package/lib/module/components/Form/index.js +44 -0
  159. package/lib/module/components/Form/index.js.map +1 -0
  160. package/lib/module/components/Form/styles.js +5 -0
  161. package/lib/module/components/Form/styles.js.map +1 -0
  162. package/lib/module/components/Heading/index.js +31 -0
  163. package/lib/module/components/Heading/index.js.map +1 -0
  164. package/lib/module/components/Heading/styles.js +19 -0
  165. package/lib/module/components/Heading/styles.js.map +1 -0
  166. package/lib/module/components/Icon/index.js +57 -0
  167. package/lib/module/components/Icon/index.js.map +1 -0
  168. package/lib/module/components/IconButton/index.js +71 -0
  169. package/lib/module/components/IconButton/index.js.map +1 -0
  170. package/lib/module/components/IconButton/styles.js +40 -0
  171. package/lib/module/components/IconButton/styles.js.map +1 -0
  172. package/lib/module/components/Image/Image.js +67 -0
  173. package/lib/module/components/Image/Image.js.map +1 -0
  174. package/lib/module/components/Image/index.js +4 -0
  175. package/lib/module/components/Image/index.js.map +1 -0
  176. package/lib/module/components/Input/BaseInput.android.js +16 -0
  177. package/lib/module/components/Input/BaseInput.android.js.map +1 -0
  178. package/lib/module/components/Input/index.js +10 -16
  179. package/lib/module/components/Input/index.js.map +1 -1
  180. package/lib/module/components/Input/styles.js +17 -30
  181. package/lib/module/components/Input/styles.js.map +1 -1
  182. package/lib/module/components/Link/index.js +85 -0
  183. package/lib/module/components/Link/index.js.map +1 -0
  184. package/lib/module/components/Link/styles.js +11 -0
  185. package/lib/module/components/Link/styles.js.map +1 -0
  186. package/lib/module/components/OtpInput/index.js +79 -0
  187. package/lib/module/components/OtpInput/index.js.map +1 -0
  188. package/lib/module/components/OtpInput/styles.js +44 -0
  189. package/lib/module/components/OtpInput/styles.js.map +1 -0
  190. package/lib/module/components/ProgressBar/index.js +41 -0
  191. package/lib/module/components/ProgressBar/index.js.map +1 -0
  192. package/lib/module/components/ProgressBar/styles.js +6 -0
  193. package/lib/module/components/ProgressBar/styles.js.map +1 -0
  194. package/lib/module/components/ProgressSegmented/index.js +58 -0
  195. package/lib/module/components/ProgressSegmented/index.js.map +1 -0
  196. package/lib/module/components/ProgressSegmented/styles.js +17 -0
  197. package/lib/module/components/ProgressSegmented/styles.js.map +1 -0
  198. package/lib/module/components/Select/SelectTriggerHost.js +7 -0
  199. package/lib/module/components/Select/SelectTriggerHost.js.map +1 -0
  200. package/lib/module/components/Select/SelectTriggerHost.web.js +93 -0
  201. package/lib/module/components/Select/SelectTriggerHost.web.js.map +1 -0
  202. package/lib/module/components/Select/index.js +14 -14
  203. package/lib/module/components/Select/index.js.map +1 -1
  204. package/lib/module/components/Select/styles.js +29 -53
  205. package/lib/module/components/Select/styles.js.map +1 -1
  206. package/lib/module/components/Stack/HStack.js +8 -21
  207. package/lib/module/components/Stack/HStack.js.map +1 -1
  208. package/lib/module/components/Stack/VStack.js +8 -21
  209. package/lib/module/components/Stack/VStack.js.map +1 -1
  210. package/lib/module/components/Stack/styles.js +40 -0
  211. package/lib/module/components/Stack/styles.js.map +1 -0
  212. package/lib/module/components/Text/index.js +19 -1
  213. package/lib/module/components/Text/index.js.map +1 -1
  214. package/lib/module/components/Text/styles.js +19 -0
  215. package/lib/module/components/Text/styles.js.map +1 -0
  216. package/lib/module/components/VirtualizedList/index.js +15 -0
  217. package/lib/module/components/VirtualizedList/index.js.map +1 -0
  218. package/lib/module/components/index.js +17 -0
  219. package/lib/module/components/index.js.map +1 -1
  220. package/lib/module/index.js +3 -0
  221. package/lib/module/index.js.map +1 -1
  222. package/lib/module/styles/index.js +4 -0
  223. package/lib/module/styles/index.js.map +1 -0
  224. package/lib/module/styles/primitives.js +119 -0
  225. package/lib/module/styles/primitives.js.map +1 -0
  226. package/lib/typescript/components/AlertDialog/index.d.ts +30 -0
  227. package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -0
  228. package/lib/typescript/components/Avatar/index.d.ts +40 -0
  229. package/lib/typescript/components/Avatar/index.d.ts.map +1 -0
  230. package/lib/typescript/components/Avatar/styles.d.ts +16 -0
  231. package/lib/typescript/components/Avatar/styles.d.ts.map +1 -0
  232. package/lib/typescript/components/BottomSheet/index.d.ts +61 -0
  233. package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -0
  234. package/lib/typescript/components/BottomSheet/styles.d.ts +16 -0
  235. package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -0
  236. package/lib/typescript/components/Box/Box.d.ts +1 -0
  237. package/lib/typescript/components/Box/Box.d.ts.map +1 -1
  238. package/lib/typescript/components/Button/index.d.ts +6 -3
  239. package/lib/typescript/components/Button/index.d.ts.map +1 -1
  240. package/lib/typescript/components/Button/styles.d.ts +11 -8
  241. package/lib/typescript/components/Button/styles.d.ts.map +1 -1
  242. package/lib/typescript/components/Card/index.d.ts +30 -0
  243. package/lib/typescript/components/Card/index.d.ts.map +1 -0
  244. package/lib/typescript/components/Card/styles.d.ts +6 -0
  245. package/lib/typescript/components/Card/styles.d.ts.map +1 -0
  246. package/lib/typescript/components/Checkbox/index.d.ts +7 -5
  247. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
  248. package/lib/typescript/components/Checkbox/styles.d.ts +4 -4
  249. package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
  250. package/lib/typescript/components/Chip/index.d.ts +27 -0
  251. package/lib/typescript/components/Chip/index.d.ts.map +1 -0
  252. package/lib/typescript/components/Chip/styles.d.ts +12 -0
  253. package/lib/typescript/components/Chip/styles.d.ts.map +1 -0
  254. package/lib/typescript/components/Dialog/index.d.ts +61 -0
  255. package/lib/typescript/components/Dialog/index.d.ts.map +1 -0
  256. package/lib/typescript/components/Dialog/styles.d.ts +14 -0
  257. package/lib/typescript/components/Dialog/styles.d.ts.map +1 -0
  258. package/lib/typescript/components/Field/FieldLabel.d.ts +18 -0
  259. package/lib/typescript/components/Field/FieldLabel.d.ts.map +1 -0
  260. package/lib/typescript/components/Field/FieldLabel.web.d.ts +16 -0
  261. package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +1 -0
  262. package/lib/typescript/components/Field/index.d.ts +26 -0
  263. package/lib/typescript/components/Field/index.d.ts.map +1 -0
  264. package/lib/typescript/components/Field/styles.d.ts +16 -0
  265. package/lib/typescript/components/Field/styles.d.ts.map +1 -0
  266. package/lib/typescript/components/Form/FormRoot.d.ts +14 -0
  267. package/lib/typescript/components/Form/FormRoot.d.ts.map +1 -0
  268. package/lib/typescript/components/Form/FormRoot.web.d.ts +10 -0
  269. package/lib/typescript/components/Form/FormRoot.web.d.ts.map +1 -0
  270. package/lib/typescript/components/Form/index.d.ts +7 -0
  271. package/lib/typescript/components/Form/index.d.ts.map +1 -0
  272. package/lib/typescript/components/Form/styles.d.ts +2 -0
  273. package/lib/typescript/components/Form/styles.d.ts.map +1 -0
  274. package/lib/typescript/components/Heading/index.d.ts +10 -0
  275. package/lib/typescript/components/Heading/index.d.ts.map +1 -0
  276. package/lib/typescript/components/Heading/styles.d.ts +6 -0
  277. package/lib/typescript/components/Heading/styles.d.ts.map +1 -0
  278. package/lib/typescript/components/Icon/index.d.ts +27 -0
  279. package/lib/typescript/components/Icon/index.d.ts.map +1 -0
  280. package/lib/typescript/components/IconButton/index.d.ts +15 -0
  281. package/lib/typescript/components/IconButton/index.d.ts.map +1 -0
  282. package/lib/typescript/components/IconButton/styles.d.ts +11 -0
  283. package/lib/typescript/components/IconButton/styles.d.ts.map +1 -0
  284. package/lib/typescript/components/Image/Image.d.ts +47 -0
  285. package/lib/typescript/components/Image/Image.d.ts.map +1 -0
  286. package/lib/typescript/components/Image/index.d.ts +2 -0
  287. package/lib/typescript/components/Image/index.d.ts.map +1 -0
  288. package/lib/typescript/components/Input/BaseInput.android.d.ts +3 -0
  289. package/lib/typescript/components/Input/BaseInput.android.d.ts.map +1 -0
  290. package/lib/typescript/components/Input/index.d.ts +7 -5
  291. package/lib/typescript/components/Input/index.d.ts.map +1 -1
  292. package/lib/typescript/components/Input/styles.d.ts +5 -7
  293. package/lib/typescript/components/Input/styles.d.ts.map +1 -1
  294. package/lib/typescript/components/Link/index.d.ts +26 -0
  295. package/lib/typescript/components/Link/index.d.ts.map +1 -0
  296. package/lib/typescript/components/Link/styles.d.ts +6 -0
  297. package/lib/typescript/components/Link/styles.d.ts.map +1 -0
  298. package/lib/typescript/components/OtpInput/index.d.ts +11 -0
  299. package/lib/typescript/components/OtpInput/index.d.ts.map +1 -0
  300. package/lib/typescript/components/OtpInput/styles.d.ts +14 -0
  301. package/lib/typescript/components/OtpInput/styles.d.ts.map +1 -0
  302. package/lib/typescript/components/ProgressBar/index.d.ts +17 -0
  303. package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -0
  304. package/lib/typescript/components/ProgressBar/styles.d.ts +5 -0
  305. package/lib/typescript/components/ProgressBar/styles.d.ts.map +1 -0
  306. package/lib/typescript/components/ProgressSegmented/index.d.ts +15 -0
  307. package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -0
  308. package/lib/typescript/components/ProgressSegmented/styles.d.ts +8 -0
  309. package/lib/typescript/components/ProgressSegmented/styles.d.ts.map +1 -0
  310. package/lib/typescript/components/Select/SelectTriggerHost.d.ts +3 -0
  311. package/lib/typescript/components/Select/SelectTriggerHost.d.ts.map +1 -0
  312. package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +13 -0
  313. package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +1 -0
  314. package/lib/typescript/components/Select/index.d.ts +7 -4
  315. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  316. package/lib/typescript/components/Select/styles.d.ts +6 -8
  317. package/lib/typescript/components/Select/styles.d.ts.map +1 -1
  318. package/lib/typescript/components/Stack/HStack.d.ts +1 -12
  319. package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
  320. package/lib/typescript/components/Stack/VStack.d.ts +1 -12
  321. package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
  322. package/lib/typescript/components/Stack/styles.d.ts +23 -0
  323. package/lib/typescript/components/Stack/styles.d.ts.map +1 -0
  324. package/lib/typescript/components/Switch/index.d.ts +0 -1
  325. package/lib/typescript/components/Switch/index.d.ts.map +1 -1
  326. package/lib/typescript/components/Text/index.d.ts +9 -1
  327. package/lib/typescript/components/Text/index.d.ts.map +1 -1
  328. package/lib/typescript/components/Text/styles.d.ts +6 -0
  329. package/lib/typescript/components/Text/styles.d.ts.map +1 -0
  330. package/lib/typescript/components/VirtualizedList/index.d.ts +8 -0
  331. package/lib/typescript/components/VirtualizedList/index.d.ts.map +1 -0
  332. package/lib/typescript/components/index.d.ts +17 -0
  333. package/lib/typescript/components/index.d.ts.map +1 -1
  334. package/lib/typescript/index.d.ts +3 -0
  335. package/lib/typescript/index.d.ts.map +1 -1
  336. package/lib/typescript/styles/index.d.ts +2 -0
  337. package/lib/typescript/styles/index.d.ts.map +1 -0
  338. package/lib/typescript/styles/primitives.d.ts +85 -0
  339. package/lib/typescript/styles/primitives.d.ts.map +1 -0
  340. package/package.json +15 -6
  341. package/src/components/AlertDialog/index.tsx +124 -0
  342. package/src/components/Avatar/index.tsx +172 -0
  343. package/src/components/Avatar/styles.ts +83 -0
  344. package/src/components/BottomSheet/index.tsx +316 -0
  345. package/src/components/BottomSheet/styles.ts +79 -0
  346. package/src/components/Box/Box.tsx +1 -0
  347. package/src/components/Button/index.tsx +14 -9
  348. package/src/components/Button/styles.ts +159 -209
  349. package/src/components/Card/index.tsx +115 -0
  350. package/src/components/Card/styles.ts +41 -0
  351. package/src/components/Checkbox/index.tsx +15 -23
  352. package/src/components/Checkbox/styles.ts +33 -24
  353. package/src/components/Chip/index.tsx +91 -0
  354. package/src/components/Chip/styles.ts +52 -0
  355. package/src/components/Dialog/index.tsx +304 -0
  356. package/src/components/Dialog/styles.ts +88 -0
  357. package/src/components/Field/FieldLabel.tsx +33 -0
  358. package/src/components/Field/FieldLabel.web.tsx +25 -0
  359. package/src/components/Field/index.tsx +171 -0
  360. package/src/components/Field/styles.ts +32 -0
  361. package/src/components/Form/FormRoot.tsx +20 -0
  362. package/src/components/Form/FormRoot.web.tsx +12 -0
  363. package/src/components/Form/index.tsx +38 -0
  364. package/src/components/Form/styles.ts +3 -0
  365. package/src/components/Heading/index.tsx +36 -0
  366. package/src/components/Heading/styles.tsx +25 -0
  367. package/src/components/Icon/index.tsx +54 -0
  368. package/src/components/IconButton/index.tsx +92 -0
  369. package/src/components/IconButton/styles.ts +59 -0
  370. package/src/components/Image/Image.tsx +77 -0
  371. package/src/components/Image/index.ts +1 -0
  372. package/src/components/Input/BaseInput.android.tsx +13 -0
  373. package/src/components/Input/index.tsx +9 -22
  374. package/src/components/Input/styles.ts +36 -40
  375. package/src/components/Link/index.tsx +83 -0
  376. package/src/components/Link/styles.ts +21 -0
  377. package/src/components/OtpInput/index.tsx +79 -0
  378. package/src/components/OtpInput/styles.ts +45 -0
  379. package/src/components/ProgressBar/index.tsx +53 -0
  380. package/src/components/ProgressBar/styles.ts +9 -0
  381. package/src/components/ProgressSegmented/index.tsx +81 -0
  382. package/src/components/ProgressSegmented/styles.ts +20 -0
  383. package/src/components/Select/SelectTriggerHost.tsx +4 -0
  384. package/src/components/Select/SelectTriggerHost.web.tsx +136 -0
  385. package/src/components/Select/index.tsx +14 -14
  386. package/src/components/Select/styles.ts +68 -75
  387. package/src/components/Stack/HStack.tsx +8 -19
  388. package/src/components/Stack/VStack.tsx +8 -23
  389. package/src/components/Stack/styles.ts +42 -0
  390. package/src/components/Switch/index.tsx +0 -2
  391. package/src/components/Text/index.tsx +16 -0
  392. package/src/components/Text/styles.tsx +25 -0
  393. package/src/components/VirtualizedList/index.tsx +19 -0
  394. package/src/components/index.ts +17 -0
  395. package/src/index.ts +3 -0
  396. package/src/styles/index.ts +1 -0
  397. package/src/styles/primitives.ts +107 -0
  398. package/lib/commonjs/components/Text/Text.js +0 -30
  399. package/lib/commonjs/components/Text/Text.js.map +0 -1
  400. package/lib/module/components/Text/Text.js +0 -26
  401. package/lib/module/components/Text/Text.js.map +0 -1
  402. package/lib/typescript/components/Text/Text.d.ts +0 -11
  403. package/lib/typescript/components/Text/Text.d.ts.map +0 -1
  404. package/src/components/Text/Text.tsx +0 -58
  405. package/src/components/Text/index.ts +0 -1
@@ -1,44 +1,36 @@
1
1
  import { Platform } from 'react-native';
2
2
  import { cva, type VariantProps } from 'class-variance-authority';
3
+ import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
3
4
 
4
- // TODO: Split into 2 files
5
- // TODO: Create cva wrapper
5
+ // TODO: Validate that `dark:` syntax works with Uniwind `ScopedTheme`
6
6
 
7
7
  export const buttonRootVariants = cva(
8
8
  [
9
9
  'flex-row items-center justify-center',
10
- 'rounded-md',
10
+ 'rounded-[var(--border-radius-button)]',
11
11
  'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
12
- 'transition-colors duration-150', // TODO: Transition not working on mobile
13
- 'data-[disabled=true]:opacity-60 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:pointer-events-none',
14
- 'web:data-[focus-visible=true]:ring-3',
12
+ TRANSITION_COLORS,
13
+ 'data-[disabled=true]:opacity-[--opacity-disabled]',
14
+ DISABLED_CURSOR,
15
+ 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-[--color-stroke-focus] web:data-[focus-visible=true]:ring-offset-2',
15
16
  ],
16
17
  {
17
18
  variants: {
18
19
  variant: {
19
- solid: [],
20
- subtle: [],
21
- outline: [
22
- 'bg-transparent border border-neutral-border-strong',
23
- 'data-[hover=true]:bg-neutral-background',
24
- 'data-[active=true]:bg-neutral-border',
25
- ],
26
- ghost: [
27
- 'bg-transparent',
28
- 'data-[hover=true]:bg-neutral-background',
29
- 'data-[active=true]:bg-neutral-border',
30
- ],
20
+ strong: ['border-b-1 border-black/75'], // TODO: Replace with token
21
+ outline: ['bg-transparent', 'border border-stroke-primary'],
22
+ ghost: ['bg-transparent'],
31
23
  },
32
24
  color: {
33
- primary: 'web:data-[focus-visible=true]:ring-blue-300/50',
34
- secondary: 'web:data-[focus-visible=true]:ring-amber-300/50',
35
- success: 'web:data-[focus-visible=true]:ring-green-300/50',
36
- danger: 'web:data-[focus-visible=true]:ring-red-300/50',
25
+ action: [],
26
+ danger: [],
27
+ warning: [],
28
+ success: [],
29
+ info: [],
37
30
  },
38
31
  size: {
39
- sm: 'h-8 px-3 gap-1.5',
40
- md: 'h-10 px-4 gap-2',
41
- lg: 'h-12 px-6 gap-2.5',
32
+ default: 'h-10 px-4 gap-2',
33
+ small: 'h-8 px-3 gap-1.5',
42
34
  },
43
35
  fullWidth: {
44
36
  true: 'w-full',
@@ -46,161 +38,148 @@ export const buttonRootVariants = cva(
46
38
  },
47
39
  },
48
40
  compoundVariants: [
41
+ // ── strong × color (filled surface) ──────────────────────────────
49
42
  {
50
- variant: 'solid',
51
- color: 'primary',
43
+ variant: 'strong',
44
+ color: 'action',
52
45
  className: [
53
- 'bg-blue-500',
46
+ 'bg-surface-action-strong',
54
47
  Platform.select({
55
- default: 'data-[active=true]:bg-blue-700',
56
- web: 'data-[hover=true]:bg-blue-600 data-[active=true]:data-[hover=true]:bg-blue-700',
48
+ default: 'data-[active=true]:bg-surface-action-strong-active',
49
+ web: 'data-[hover=true]:bg-surface-action-strong-hover data-[active=true]:data-[hover=true]:bg-surface-action-strong-active',
57
50
  }),
58
51
  ],
59
52
  },
60
53
  {
61
- variant: 'solid',
62
- color: 'secondary',
63
- className: [
64
- 'bg-amber-500',
65
- Platform.select({
66
- default: 'data-[active=true]:bg-amber-700',
67
- web: 'data-[hover=true]:bg-amber-600 data-[active=true]:data-[hover=true]:bg-amber-700',
68
- }),
69
- ],
70
- },
71
- {
72
- variant: 'solid',
73
- color: 'success',
54
+ variant: 'strong',
55
+ color: 'danger',
74
56
  className: [
75
- 'bg-green-500',
57
+ 'bg-surface-danger-strong',
76
58
  Platform.select({
77
- default: 'data-[active=true]:bg-green-700',
78
- web: 'data-[hover=true]:bg-green-600 data-[active=true]:data-[hover=true]:bg-green-700',
59
+ default: 'data-[active=true]:bg-surface-danger-strong-active',
60
+ web: 'data-[hover=true]:bg-surface-danger-strong-hover data-[active=true]:data-[hover=true]:bg-surface-danger-strong-active',
79
61
  }),
80
62
  ],
81
63
  },
82
64
  {
83
- variant: 'solid',
84
- color: 'danger',
65
+ variant: 'strong',
66
+ color: 'warning',
85
67
  className: [
86
- 'bg-red-500',
68
+ 'bg-surface-warning-strong',
87
69
  Platform.select({
88
- default: 'data-[active=true]:bg-red-700',
89
- web: 'data-[hover=true]:bg-red-600 data-[active=true]:data-[hover=true]:bg-red-700',
70
+ default: 'data-[active=true]:bg-amber-600',
71
+ web: 'data-[hover=true]:bg-amber-500 data-[active=true]:data-[hover=true]:bg-amber-600',
90
72
  }),
91
73
  ],
92
74
  },
93
75
  {
94
- variant: 'subtle',
95
- color: 'primary',
76
+ variant: 'strong',
77
+ color: 'success',
96
78
  className: [
97
- 'bg-blue-100',
79
+ 'bg-surface-success-strong',
98
80
  Platform.select({
99
- default: 'data-[active=true]:bg-blue-200',
100
- web: 'data-[hover=true]:bg-blue-200 data-[active=true]:data-[hover=true]:bg-blue-300',
81
+ default: 'data-[active=true]:bg-green-800',
82
+ web: 'data-[hover=true]:bg-green-700 data-[active=true]:data-[hover=true]:bg-green-800',
101
83
  }),
102
84
  ],
103
85
  },
104
86
  {
105
- variant: 'subtle',
106
- color: 'secondary',
87
+ variant: 'strong',
88
+ color: 'info',
107
89
  className: [
108
- 'bg-amber-200',
90
+ 'bg-surface-info-strong',
109
91
  Platform.select({
110
- default: 'data-[active=true]:bg-amber-300',
111
- web: 'data-[hover=true]:bg-amber-300 data-[active=true]:data-[hover=true]:bg-amber-400',
92
+ default: 'data-[active=true]:bg-sky-700',
93
+ web: 'data-[hover=true]:bg-sky-600 data-[active=true]:data-[hover=true]:bg-sky-700',
112
94
  }),
113
95
  ],
114
96
  },
97
+
98
+ // ── outline × color (border + hover/active surface) ─────────────
115
99
  {
116
- variant: 'subtle',
117
- color: 'success',
100
+ variant: 'outline',
101
+ color: 'action',
118
102
  className: [
119
- 'bg-green-200',
103
+ 'border-stroke-action',
120
104
  Platform.select({
121
- default: 'data-[active=true]:bg-green-300',
122
- web: 'data-[hover=true]:bg-green-300 data-[active=true]:data-[hover=true]:bg-green-400',
105
+ default: 'data-[active=true]:bg-surface-action-subtle-active',
106
+ web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-subtle-active',
123
107
  }),
124
108
  ],
125
109
  },
126
110
  {
127
- variant: 'subtle',
111
+ variant: 'outline',
128
112
  color: 'danger',
129
113
  className: [
130
- 'bg-red-200',
114
+ 'border-stroke-danger',
131
115
  Platform.select({
132
- default: 'data-[active=true]:bg-red-300',
133
- web: 'data-[hover=true]:bg-red-300 data-[active=true]:data-[hover=true]:bg-red-400',
116
+ default: 'data-[active=true]:bg-surface-danger-subtle-active',
117
+ web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-subtle-active',
134
118
  }),
135
119
  ],
136
120
  },
137
121
  {
138
122
  variant: 'outline',
139
- color: 'primary',
123
+ color: 'warning',
140
124
  className: [
141
- 'border-blue-500',
142
- 'data-[focus-visible=true]:border-blue-500',
125
+ 'border-stroke-warning',
143
126
  Platform.select({
144
- default: 'data-[active=true]:border-blue-700 data-[active=true]:bg-blue-100',
145
- web: 'data-[hover=true]:border-blue-600 data-[hover=true]:bg-blue-100 data-[active=true]:data-[hover=true]:border-blue-700 data-[active=true]:data-[hover=true]:bg-blue-200',
127
+ default: 'data-[active=true]:bg-surface-warning-subtle',
128
+ web: 'data-[hover=true]:bg-surface-warning-tint data-[active=true]:data-[hover=true]:bg-surface-warning-subtle',
146
129
  }),
147
130
  ],
148
131
  },
149
132
  {
150
133
  variant: 'outline',
151
- color: 'secondary',
134
+ color: 'success',
152
135
  className: [
153
- 'border-amber-500',
154
- 'data-[focus-visible=true]:border-amber-500',
136
+ 'border-stroke-success',
155
137
  Platform.select({
156
- default: 'data-[active=true]:border-amber-700 data-[active=true]:bg-amber-50',
157
- web: 'data-[hover=true]:border-amber-600 data-[hover=true]:bg-amber-50 data-[active=true]:data-[hover=true]:border-amber-700 data-[active=true]:data-[hover=true]:bg-amber-100',
138
+ default: 'data-[active=true]:bg-surface-success-subtle',
139
+ web: 'data-[hover=true]:bg-surface-success-tint data-[active=true]:data-[hover=true]:bg-surface-success-subtle',
158
140
  }),
159
141
  ],
160
142
  },
161
143
  {
162
144
  variant: 'outline',
163
- color: 'success',
145
+ color: 'info',
164
146
  className: [
165
- 'border-green-500',
166
- 'data-[focus-visible=true]:border-green-500',
147
+ 'border-stroke-info',
167
148
  Platform.select({
168
- default: 'data-[active=true]:border-green-700 data-[active=true]:bg-green-100',
169
- web: 'data-[hover=true]:border-green-600 data-[hover=true]:bg-green-100 data-[active=true]:data-[hover=true]:border-green-700 data-[active=true]:data-[hover=true]:bg-green-200',
149
+ default: 'data-[active=true]:bg-surface-info-subtle',
150
+ web: 'data-[hover=true]:bg-surface-info-tint data-[active=true]:data-[hover=true]:bg-surface-info-subtle',
170
151
  }),
171
152
  ],
172
153
  },
154
+
155
+ // ── ghost × color (hover/active surface fills) ──────────────────
173
156
  {
174
- variant: 'outline',
175
- color: 'danger',
157
+ variant: 'ghost',
158
+ color: 'action',
176
159
  className: [
177
- 'border-red-500',
178
- 'data-[focus-visible=true]:border-red-500',
179
160
  Platform.select({
180
- default: 'data-[active=true]:border-red-700 data-[active=true]:bg-red-100',
181
- web: 'data-[hover=true]:border-red-600 data-[hover=true]:bg-red-100 data-[active=true]:data-[hover=true]:border-red-700 data-[active=true]:data-[hover=true]:bg-red-200',
161
+ default: 'data-[active=true]:bg-surface-action-subtle-active',
162
+ web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-subtle-active',
182
163
  }),
183
164
  ],
184
165
  },
185
166
  {
186
167
  variant: 'ghost',
187
- color: 'primary',
168
+ color: 'danger',
188
169
  className: [
189
- 'bg-transparent',
190
170
  Platform.select({
191
- default: 'data-[active=true]:bg-blue-100',
192
- web: 'data-[hover=true]:bg-blue-50 data-[active=true]:data-[hover=true]:bg-blue-100',
171
+ default: 'data-[active=true]:bg-surface-danger-subtle-active',
172
+ web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-subtle-active',
193
173
  }),
194
174
  ],
195
175
  },
196
176
  {
197
177
  variant: 'ghost',
198
- color: 'secondary',
178
+ color: 'warning',
199
179
  className: [
200
- 'bg-transparent',
201
180
  Platform.select({
202
- default: 'data-[active=true]:bg-amber-100',
203
- web: 'data-[hover=true]:bg-amber-50 data-[active=true]:data-[hover=true]:bg-amber-100',
181
+ default: 'data-[active=true]:bg-surface-warning-subtle',
182
+ web: 'data-[hover=true]:bg-surface-warning-tint data-[active=true]:data-[hover=true]:bg-surface-warning-subtle',
204
183
  }),
205
184
  ],
206
185
  },
@@ -208,29 +187,27 @@ export const buttonRootVariants = cva(
208
187
  variant: 'ghost',
209
188
  color: 'success',
210
189
  className: [
211
- 'bg-transparent',
212
190
  Platform.select({
213
- default: 'data-[active=true]:bg-green-100',
214
- web: 'data-[hover=true]:bg-green-50 data-[active=true]:data-[hover=true]:bg-green-100',
191
+ default: 'data-[active=true]:bg-surface-success-subtle',
192
+ web: 'data-[hover=true]:bg-surface-success-tint data-[active=true]:data-[hover=true]:bg-surface-success-subtle',
215
193
  }),
216
194
  ],
217
195
  },
218
196
  {
219
197
  variant: 'ghost',
220
- color: 'danger',
198
+ color: 'info',
221
199
  className: [
222
- 'bg-transparent',
223
200
  Platform.select({
224
- default: 'data-[active=true]:bg-red-100',
225
- web: 'data-[hover=true]:bg-red-50 data-[active=true]:data-[hover=true]:bg-red-100',
201
+ default: 'data-[active=true]:bg-surface-info-subtle',
202
+ web: 'data-[hover=true]:bg-surface-info-tint data-[active=true]:data-[hover=true]:bg-surface-info-subtle',
226
203
  }),
227
204
  ],
228
205
  },
229
206
  ],
230
207
  defaultVariants: {
231
- variant: 'solid',
232
- color: 'primary',
233
- size: 'md',
208
+ variant: 'strong',
209
+ color: 'action',
210
+ size: 'default',
234
211
  fullWidth: false,
235
212
  },
236
213
  },
@@ -239,156 +216,117 @@ export const buttonRootVariants = cva(
239
216
  export const buttonTextVariants = cva(['font-medium', 'text-center'], {
240
217
  variants: {
241
218
  variant: {
242
- solid: 'text-white',
243
- subtle: [],
219
+ strong: [],
244
220
  outline: [],
245
221
  ghost: [],
246
222
  },
247
223
  color: {
248
- primary: [],
249
- secondary: [],
250
- success: [],
224
+ action: [],
251
225
  danger: [],
226
+ warning: [],
227
+ success: [],
228
+ info: [],
252
229
  },
253
230
  size: {
254
- sm: 'text-sm',
255
- md: 'text-base',
256
- lg: 'text-lg',
231
+ default: 'text-base',
232
+ small: 'text-sm',
257
233
  },
258
234
  },
259
235
  compoundVariants: [
260
- {
261
- variant: 'subtle',
262
- color: 'primary',
263
- className: 'text-blue-950',
264
- },
265
- {
266
- variant: 'subtle',
267
- color: 'secondary',
268
- className: 'text-amber-950',
269
- },
270
- {
271
- variant: 'subtle',
272
- color: 'success',
273
- className: 'text-green-950',
274
- },
275
- {
276
- variant: 'subtle',
277
- color: 'danger',
278
- className: 'text-red-950',
279
- },
280
- {
281
- variant: ['outline', 'ghost'],
282
- color: 'primary',
283
- className: [
284
- 'text-blue-500',
285
- Platform.select({
286
- default: 'data-[active=true]:text-blue-700',
287
- web: 'data-[hover=true]:text-blue-600 data-[active=true]:data-[hover=true]:text-blue-700',
288
- }),
289
- ],
290
- },
291
- {
292
- variant: ['outline', 'ghost'],
293
- color: 'secondary',
294
- className: [
295
- 'text-amber-600',
296
- Platform.select({
297
- default: 'data-[active=true]:text-amber-800',
298
- web: 'data-[hover=true]:text-amber-700 data-[active=true]:data-[hover=true]:text-amber-800',
299
- }),
300
- ],
301
- },
302
- {
303
- variant: ['outline', 'ghost'],
304
- color: 'success',
305
- className: [
306
- 'text-green-600',
307
- Platform.select({
308
- default: 'data-[active=true]:text-green-800',
309
- web: 'data-[hover=true]:text-green-700 data-[active=true]:data-[hover=true]:text-green-800',
310
- }),
311
- ],
312
- },
313
- {
314
- variant: ['outline', 'ghost'],
315
- color: 'danger',
316
- className: [
317
- 'text-red-500',
318
- Platform.select({
319
- default: 'data-[active=true]:text-red-700',
320
- web: 'data-[hover=true]:text-red-600 data-[active=true]:data-[hover=true]:text-red-700',
321
- }),
322
- ],
323
- },
236
+ // ── strong × color (filled foreground text) ──────────────────────
237
+ { variant: 'strong', color: 'action', className: 'text-content-action-on-strong' },
238
+ { variant: 'strong', color: 'danger', className: 'text-content-danger-on-strong' },
239
+ { variant: 'strong', color: 'warning', className: 'text-content-warning-on-strong' },
240
+ { variant: 'strong', color: 'success', className: 'text-content-success-on-strong' },
241
+ { variant: 'strong', color: 'info', className: 'text-content-info-on-strong' },
242
+
243
+ // ── outline/ghost × color (transparent foreground text) ──────────
244
+ { variant: ['outline', 'ghost'], color: 'action', className: 'text-content-action' },
245
+ { variant: ['outline', 'ghost'], color: 'danger', className: 'text-content-danger' },
246
+ { variant: ['outline', 'ghost'], color: 'warning', className: 'text-content-warning' },
247
+ { variant: ['outline', 'ghost'], color: 'success', className: 'text-content-success' },
248
+ { variant: ['outline', 'ghost'], color: 'info', className: 'text-content-info' },
324
249
  ],
325
250
  defaultVariants: {
326
- variant: 'solid',
327
- color: 'primary',
328
- size: 'md',
251
+ variant: 'strong',
252
+ color: 'action',
253
+ size: 'default',
329
254
  },
330
255
  });
331
256
 
332
257
  export const buttonSpinnerVariants = cva([], {
333
258
  variants: {
334
259
  variant: {
335
- solid: 'accent-white',
336
- subtle: [],
260
+ strong: [],
337
261
  outline: [],
338
262
  ghost: [],
339
263
  },
340
264
  color: {
341
- primary: [],
342
- secondary: [],
343
- success: [],
265
+ action: [],
344
266
  danger: [],
267
+ warning: [],
268
+ success: [],
269
+ info: [],
345
270
  },
346
271
  },
347
272
  compoundVariants: [
273
+ // ── strong × color ───────────────────────────────────────────────
348
274
  {
349
- variant: 'subtle',
350
- color: 'primary',
351
- className: 'accent-blue-950',
275
+ variant: 'strong',
276
+ color: 'action',
277
+ className: 'accent-[var(--color-content-action-on-strong)]',
352
278
  },
353
279
  {
354
- variant: 'subtle',
355
- color: 'secondary',
356
- className: 'accent-amber-950',
280
+ variant: 'strong',
281
+ color: 'danger',
282
+ className: 'accent-[var(--color-content-danger-on-strong)]',
357
283
  },
358
284
  {
359
- variant: 'subtle',
285
+ variant: 'strong',
286
+ color: 'warning',
287
+ className: 'accent-[var(--color-content-warning-on-strong)]',
288
+ },
289
+ {
290
+ variant: 'strong',
360
291
  color: 'success',
361
- className: 'accent-green-950',
292
+ className: 'accent-[var(--color-content-success-on-strong)]',
362
293
  },
363
294
  {
364
- variant: 'subtle',
365
- color: 'danger',
366
- className: 'accent-red-950',
295
+ variant: 'strong',
296
+ color: 'info',
297
+ className: 'accent-[var(--color-content-info-on-strong)]',
367
298
  },
299
+
300
+ // ── outline/ghost × color ────────────────────────────────────────
368
301
  {
369
302
  variant: ['outline', 'ghost'],
370
- color: 'primary',
371
- className: 'accent-blue-500',
303
+ color: 'action',
304
+ className: 'accent-[var(--color-content-action)]',
372
305
  },
373
306
  {
374
307
  variant: ['outline', 'ghost'],
375
- color: 'secondary',
376
- className: 'accent-amber-600',
308
+ color: 'danger',
309
+ className: 'accent-[var(--color-content-danger)]',
310
+ },
311
+ {
312
+ variant: ['outline', 'ghost'],
313
+ color: 'warning',
314
+ className: 'accent-[var(--color-content-warning)]',
377
315
  },
378
316
  {
379
317
  variant: ['outline', 'ghost'],
380
318
  color: 'success',
381
- className: 'accent-green-600',
319
+ className: 'accent-[var(--color-content-success)]',
382
320
  },
383
321
  {
384
322
  variant: ['outline', 'ghost'],
385
- color: 'danger',
386
- className: 'accent-red-500',
323
+ color: 'info',
324
+ className: 'accent-[var(--color-content-info)]',
387
325
  },
388
326
  ],
389
327
  defaultVariants: {
390
- variant: 'solid',
391
- color: 'primary',
328
+ variant: 'strong',
329
+ color: 'action',
392
330
  },
393
331
  });
394
332
 
@@ -411,5 +349,17 @@ export const buttonGroupVariants = cva([], {
411
349
  },
412
350
  });
413
351
 
352
+ export const buttonIconVariants = cva([], {
353
+ variants: {
354
+ size: {
355
+ default: 'size-5',
356
+ small: 'size-4',
357
+ },
358
+ },
359
+ defaultVariants: {
360
+ size: 'default',
361
+ },
362
+ });
363
+
414
364
  export type ButtonVariantProps = VariantProps<typeof buttonRootVariants>;
415
365
  export type ButtonGroupVariantProps = VariantProps<typeof buttonGroupVariants>;
@@ -0,0 +1,115 @@
1
+ import { forwardRef, type ReactNode } from 'react';
2
+ import { View, type ViewProps } from 'react-native';
3
+ import { cn } from '@cdx-ui/utils';
4
+ import {
5
+ cardContentVariants,
6
+ cardFooterVariants,
7
+ cardHeaderVariants,
8
+ cardRootVariants,
9
+ } from './styles';
10
+
11
+ // =============================================================================
12
+ // STYLED ROOT COMPONENT
13
+ // =============================================================================
14
+
15
+ export interface CardProps extends ViewProps {
16
+ className?: string;
17
+ children?: ReactNode;
18
+ }
19
+
20
+ const CardRoot = forwardRef<View, CardProps>(({ className, children, style, ...props }, ref) => {
21
+ const computedClassName = cn(cardRootVariants(), className);
22
+
23
+ return (
24
+ <View ref={ref} className={computedClassName} style={style} {...props}>
25
+ {children}
26
+ </View>
27
+ );
28
+ });
29
+
30
+ CardRoot.displayName = 'Card';
31
+
32
+ // =============================================================================
33
+ // STYLED HEADER COMPONENT
34
+ // =============================================================================
35
+
36
+ export interface CardHeaderProps extends ViewProps {
37
+ className?: string;
38
+ children?: ReactNode;
39
+ }
40
+
41
+ const CardHeader = forwardRef<View, CardHeaderProps>(
42
+ ({ className, children, style, ...props }, ref) => {
43
+ const computedClassName = cn(cardHeaderVariants(), className);
44
+
45
+ return (
46
+ <View ref={ref} className={computedClassName} style={style} {...props}>
47
+ {children}
48
+ </View>
49
+ );
50
+ },
51
+ );
52
+
53
+ CardHeader.displayName = 'Card.Header';
54
+
55
+ // =============================================================================
56
+ // STYLED CONTENT COMPONENT
57
+ // =============================================================================
58
+
59
+ export interface CardContentProps extends ViewProps {
60
+ className?: string;
61
+ children?: ReactNode;
62
+ }
63
+
64
+ const CardContent = forwardRef<View, CardContentProps>(
65
+ ({ className, children, style, ...props }, ref) => {
66
+ const computedClassName = cn(cardContentVariants(), className);
67
+
68
+ return (
69
+ <View ref={ref} className={computedClassName} style={style} {...props}>
70
+ {children}
71
+ </View>
72
+ );
73
+ },
74
+ );
75
+
76
+ CardContent.displayName = 'Card.Content';
77
+
78
+ // =============================================================================
79
+ // STYLED FOOTER COMPONENT
80
+ // =============================================================================
81
+
82
+ export interface CardFooterProps extends ViewProps {
83
+ className?: string;
84
+ children?: ReactNode;
85
+ }
86
+
87
+ const CardFooter = forwardRef<View, CardFooterProps>(
88
+ ({ className, children, style, ...props }, ref) => {
89
+ const computedClassName = cn(cardFooterVariants(), className);
90
+
91
+ return (
92
+ <View ref={ref} className={computedClassName} style={style} {...props}>
93
+ {children}
94
+ </View>
95
+ );
96
+ },
97
+ );
98
+
99
+ CardFooter.displayName = 'Card.Footer';
100
+
101
+ // =============================================================================
102
+ // COMPOUND COMPONENT
103
+ // =============================================================================
104
+
105
+ type CardCompoundComponent = typeof CardRoot & {
106
+ Header: typeof CardHeader;
107
+ Content: typeof CardContent;
108
+ Footer: typeof CardFooter;
109
+ };
110
+
111
+ export const Card = CardRoot as CardCompoundComponent;
112
+
113
+ Card.Header = CardHeader;
114
+ Card.Content = CardContent;
115
+ Card.Footer = CardFooter;