@cdx-ui/components 0.0.1-alpha.3 → 0.0.1-alpha.31

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 (402) hide show
  1. package/README.md +20 -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/buttonSharedVariants.js +200 -0
  15. package/lib/commonjs/components/Button/buttonSharedVariants.js.map +1 -0
  16. package/lib/commonjs/components/Button/index.js +31 -13
  17. package/lib/commonjs/components/Button/index.js.map +1 -1
  18. package/lib/commonjs/components/Button/styles.js +170 -187
  19. package/lib/commonjs/components/Button/styles.js.map +1 -1
  20. package/lib/commonjs/components/Card/index.js +104 -0
  21. package/lib/commonjs/components/Card/index.js.map +1 -0
  22. package/lib/commonjs/components/Card/styles.js +28 -0
  23. package/lib/commonjs/components/Card/styles.js.map +1 -0
  24. package/lib/commonjs/components/Checkbox/index.js +180 -0
  25. package/lib/commonjs/components/Checkbox/index.js.map +1 -0
  26. package/lib/commonjs/components/Checkbox/styles.js +68 -0
  27. package/lib/commonjs/components/Checkbox/styles.js.map +1 -0
  28. package/lib/commonjs/components/Chip/index.js +103 -0
  29. package/lib/commonjs/components/Chip/index.js.map +1 -0
  30. package/lib/commonjs/components/Chip/styles.js +50 -0
  31. package/lib/commonjs/components/Chip/styles.js.map +1 -0
  32. package/lib/commonjs/components/Dialog/index.js +275 -0
  33. package/lib/commonjs/components/Dialog/index.js.map +1 -0
  34. package/lib/commonjs/components/Dialog/styles.js +63 -0
  35. package/lib/commonjs/components/Dialog/styles.js.map +1 -0
  36. package/lib/commonjs/components/Form/FormLabelRoot.js +33 -0
  37. package/lib/commonjs/components/Form/FormLabelRoot.js.map +1 -0
  38. package/lib/commonjs/components/Form/FormLabelRoot.web.js +18 -0
  39. package/lib/commonjs/components/Form/FormLabelRoot.web.js.map +1 -0
  40. package/lib/commonjs/components/Form/FormRoot.js +25 -0
  41. package/lib/commonjs/components/Form/FormRoot.js.map +1 -0
  42. package/lib/commonjs/components/Form/FormRoot.web.js +17 -0
  43. package/lib/commonjs/components/Form/FormRoot.web.js.map +1 -0
  44. package/lib/commonjs/components/Form/index.js +255 -0
  45. package/lib/commonjs/components/Form/index.js.map +1 -0
  46. package/lib/commonjs/components/Form/styles.js +57 -0
  47. package/lib/commonjs/components/Form/styles.js.map +1 -0
  48. package/lib/commonjs/components/Heading/index.js +35 -0
  49. package/lib/commonjs/components/Heading/index.js.map +1 -0
  50. package/lib/commonjs/components/Heading/styles.js +24 -0
  51. package/lib/commonjs/components/Heading/styles.js.map +1 -0
  52. package/lib/commonjs/components/Icon/index.js +61 -0
  53. package/lib/commonjs/components/Icon/index.js.map +1 -0
  54. package/lib/commonjs/components/IconButton/index.js +80 -0
  55. package/lib/commonjs/components/IconButton/index.js.map +1 -0
  56. package/lib/commonjs/components/IconButton/styles.js +91 -0
  57. package/lib/commonjs/components/IconButton/styles.js.map +1 -0
  58. package/lib/commonjs/components/Image/Image.js +69 -0
  59. package/lib/commonjs/components/Image/Image.js.map +1 -0
  60. package/lib/commonjs/components/Image/index.js +13 -0
  61. package/lib/commonjs/components/Image/index.js.map +1 -0
  62. package/lib/commonjs/components/Input/BaseInput.android.js +20 -0
  63. package/lib/commonjs/components/Input/BaseInput.android.js.map +1 -0
  64. package/lib/commonjs/components/Input/index.js +10 -16
  65. package/lib/commonjs/components/Input/index.js.map +1 -1
  66. package/lib/commonjs/components/Input/styles.js +16 -30
  67. package/lib/commonjs/components/Input/styles.js.map +1 -1
  68. package/lib/commonjs/components/Link/index.js +94 -0
  69. package/lib/commonjs/components/Link/index.js.map +1 -0
  70. package/lib/commonjs/components/Link/styles.js +16 -0
  71. package/lib/commonjs/components/Link/styles.js.map +1 -0
  72. package/lib/commonjs/components/ProgressSegmented/index.js +62 -0
  73. package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -0
  74. package/lib/commonjs/components/ProgressSegmented/styles.js +21 -0
  75. package/lib/commonjs/components/ProgressSegmented/styles.js.map +1 -0
  76. package/lib/commonjs/components/Select/SelectTriggerHost.js +10 -0
  77. package/lib/commonjs/components/Select/SelectTriggerHost.js.map +1 -0
  78. package/lib/commonjs/components/Select/SelectTriggerHost.web.js +98 -0
  79. package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +1 -0
  80. package/lib/commonjs/components/Select/index.js +13 -13
  81. package/lib/commonjs/components/Select/index.js.map +1 -1
  82. package/lib/commonjs/components/Select/styles.js +29 -53
  83. package/lib/commonjs/components/Select/styles.js.map +1 -1
  84. package/lib/commonjs/components/Stack/HStack.js +8 -21
  85. package/lib/commonjs/components/Stack/HStack.js.map +1 -1
  86. package/lib/commonjs/components/Stack/VStack.js +8 -21
  87. package/lib/commonjs/components/Stack/VStack.js.map +1 -1
  88. package/lib/commonjs/components/Stack/styles.js +39 -0
  89. package/lib/commonjs/components/Stack/styles.js.map +1 -0
  90. package/lib/commonjs/components/Switch/BaseSwitch.js +46 -0
  91. package/lib/commonjs/components/Switch/BaseSwitch.js.map +1 -0
  92. package/lib/commonjs/components/Switch/BaseSwitch.web.js +56 -0
  93. package/lib/commonjs/components/Switch/BaseSwitch.web.js.map +1 -0
  94. package/lib/commonjs/components/Switch/index.js +13 -0
  95. package/lib/commonjs/components/Switch/index.js.map +1 -0
  96. package/lib/commonjs/components/Switch/styles.js +128 -0
  97. package/lib/commonjs/components/Switch/styles.js.map +1 -0
  98. package/lib/commonjs/components/Text/index.js +18 -9
  99. package/lib/commonjs/components/Text/index.js.map +1 -1
  100. package/lib/commonjs/components/Text/styles.js +24 -0
  101. package/lib/commonjs/components/Text/styles.js.map +1 -0
  102. package/lib/commonjs/components/VirtualizedList/index.js +19 -0
  103. package/lib/commonjs/components/VirtualizedList/index.js.map +1 -0
  104. package/lib/commonjs/components/index.js +192 -0
  105. package/lib/commonjs/components/index.js.map +1 -1
  106. package/lib/commonjs/index.js +40 -0
  107. package/lib/commonjs/index.js.map +1 -1
  108. package/lib/commonjs/metro/withCdxMetroConfig.js +24 -0
  109. package/lib/commonjs/metro/withCdxMetroConfig.js.map +1 -0
  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/buttonSharedVariants.js +195 -0
  127. package/lib/module/components/Button/buttonSharedVariants.js.map +1 -0
  128. package/lib/module/components/Button/index.js +32 -14
  129. package/lib/module/components/Button/index.js.map +1 -1
  130. package/lib/module/components/Button/styles.js +168 -186
  131. package/lib/module/components/Button/styles.js.map +1 -1
  132. package/lib/module/components/Card/index.js +100 -0
  133. package/lib/module/components/Card/index.js.map +1 -0
  134. package/lib/module/components/Card/styles.js +25 -0
  135. package/lib/module/components/Card/styles.js.map +1 -0
  136. package/lib/module/components/Checkbox/index.js +176 -0
  137. package/lib/module/components/Checkbox/index.js.map +1 -0
  138. package/lib/module/components/Checkbox/styles.js +64 -0
  139. package/lib/module/components/Checkbox/styles.js.map +1 -0
  140. package/lib/module/components/Chip/index.js +99 -0
  141. package/lib/module/components/Chip/index.js.map +1 -0
  142. package/lib/module/components/Chip/styles.js +46 -0
  143. package/lib/module/components/Chip/styles.js.map +1 -0
  144. package/lib/module/components/Dialog/index.js +267 -0
  145. package/lib/module/components/Dialog/index.js.map +1 -0
  146. package/lib/module/components/Dialog/styles.js +60 -0
  147. package/lib/module/components/Dialog/styles.js.map +1 -0
  148. package/lib/module/components/Form/FormLabelRoot.js +29 -0
  149. package/lib/module/components/Form/FormLabelRoot.js.map +1 -0
  150. package/lib/module/components/Form/FormLabelRoot.web.js +13 -0
  151. package/lib/module/components/Form/FormLabelRoot.web.js.map +1 -0
  152. package/lib/module/components/Form/FormRoot.js +21 -0
  153. package/lib/module/components/Form/FormRoot.js.map +1 -0
  154. package/lib/module/components/Form/FormRoot.web.js +12 -0
  155. package/lib/module/components/Form/FormRoot.web.js.map +1 -0
  156. package/lib/module/components/Form/index.js +252 -0
  157. package/lib/module/components/Form/index.js.map +1 -0
  158. package/lib/module/components/Form/styles.js +53 -0
  159. package/lib/module/components/Form/styles.js.map +1 -0
  160. package/lib/module/components/Heading/index.js +31 -0
  161. package/lib/module/components/Heading/index.js.map +1 -0
  162. package/lib/module/components/Heading/styles.js +20 -0
  163. package/lib/module/components/Heading/styles.js.map +1 -0
  164. package/lib/module/components/Icon/index.js +57 -0
  165. package/lib/module/components/Icon/index.js.map +1 -0
  166. package/lib/module/components/IconButton/index.js +76 -0
  167. package/lib/module/components/IconButton/index.js.map +1 -0
  168. package/lib/module/components/IconButton/styles.js +87 -0
  169. package/lib/module/components/IconButton/styles.js.map +1 -0
  170. package/lib/module/components/Image/Image.js +67 -0
  171. package/lib/module/components/Image/Image.js.map +1 -0
  172. package/lib/module/components/Image/index.js +4 -0
  173. package/lib/module/components/Image/index.js.map +1 -0
  174. package/lib/module/components/Input/BaseInput.android.js +16 -0
  175. package/lib/module/components/Input/BaseInput.android.js.map +1 -0
  176. package/lib/module/components/Input/index.js +10 -16
  177. package/lib/module/components/Input/index.js.map +1 -1
  178. package/lib/module/components/Input/styles.js +16 -30
  179. package/lib/module/components/Input/styles.js.map +1 -1
  180. package/lib/module/components/Link/index.js +85 -0
  181. package/lib/module/components/Link/index.js.map +1 -0
  182. package/lib/module/components/Link/styles.js +12 -0
  183. package/lib/module/components/Link/styles.js.map +1 -0
  184. package/lib/module/components/ProgressSegmented/index.js +58 -0
  185. package/lib/module/components/ProgressSegmented/index.js.map +1 -0
  186. package/lib/module/components/ProgressSegmented/styles.js +17 -0
  187. package/lib/module/components/ProgressSegmented/styles.js.map +1 -0
  188. package/lib/module/components/Select/SelectTriggerHost.js +7 -0
  189. package/lib/module/components/Select/SelectTriggerHost.js.map +1 -0
  190. package/lib/module/components/Select/SelectTriggerHost.web.js +93 -0
  191. package/lib/module/components/Select/SelectTriggerHost.web.js.map +1 -0
  192. package/lib/module/components/Select/index.js +14 -14
  193. package/lib/module/components/Select/index.js.map +1 -1
  194. package/lib/module/components/Select/styles.js +29 -53
  195. package/lib/module/components/Select/styles.js.map +1 -1
  196. package/lib/module/components/Stack/HStack.js +8 -21
  197. package/lib/module/components/Stack/HStack.js.map +1 -1
  198. package/lib/module/components/Stack/VStack.js +8 -21
  199. package/lib/module/components/Stack/VStack.js.map +1 -1
  200. package/lib/module/components/Stack/styles.js +35 -0
  201. package/lib/module/components/Stack/styles.js.map +1 -0
  202. package/lib/module/components/Switch/BaseSwitch.js +42 -0
  203. package/lib/module/components/Switch/BaseSwitch.js.map +1 -0
  204. package/lib/module/components/Switch/BaseSwitch.web.js +52 -0
  205. package/lib/module/components/Switch/BaseSwitch.web.js.map +1 -0
  206. package/lib/module/components/Switch/index.js +9 -0
  207. package/lib/module/components/Switch/index.js.map +1 -0
  208. package/lib/module/components/Switch/styles.js +125 -0
  209. package/lib/module/components/Switch/styles.js.map +1 -0
  210. package/lib/module/components/Text/index.js +19 -1
  211. package/lib/module/components/Text/index.js.map +1 -1
  212. package/lib/module/components/Text/styles.js +20 -0
  213. package/lib/module/components/Text/styles.js.map +1 -0
  214. package/lib/module/components/VirtualizedList/index.js +15 -0
  215. package/lib/module/components/VirtualizedList/index.js.map +1 -0
  216. package/lib/module/components/index.js +16 -0
  217. package/lib/module/components/index.js.map +1 -1
  218. package/lib/module/index.js +3 -0
  219. package/lib/module/index.js.map +1 -1
  220. package/lib/module/metro/withCdxMetroConfig.js +20 -0
  221. package/lib/module/metro/withCdxMetroConfig.js.map +1 -0
  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/buttonSharedVariants.d.ts +29 -0
  239. package/lib/typescript/components/Button/buttonSharedVariants.d.ts.map +1 -0
  240. package/lib/typescript/components/Button/index.d.ts +6 -3
  241. package/lib/typescript/components/Button/index.d.ts.map +1 -1
  242. package/lib/typescript/components/Button/styles.d.ts +14 -8
  243. package/lib/typescript/components/Button/styles.d.ts.map +1 -1
  244. package/lib/typescript/components/Card/index.d.ts +30 -0
  245. package/lib/typescript/components/Card/index.d.ts.map +1 -0
  246. package/lib/typescript/components/Card/styles.d.ts +6 -0
  247. package/lib/typescript/components/Card/styles.d.ts.map +1 -0
  248. package/lib/typescript/components/Checkbox/index.d.ts +46 -0
  249. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -0
  250. package/lib/typescript/components/Checkbox/styles.d.ts +18 -0
  251. package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -0
  252. package/lib/typescript/components/Chip/index.d.ts +27 -0
  253. package/lib/typescript/components/Chip/index.d.ts.map +1 -0
  254. package/lib/typescript/components/Chip/styles.d.ts +12 -0
  255. package/lib/typescript/components/Chip/styles.d.ts.map +1 -0
  256. package/lib/typescript/components/Dialog/index.d.ts +61 -0
  257. package/lib/typescript/components/Dialog/index.d.ts.map +1 -0
  258. package/lib/typescript/components/Dialog/styles.d.ts +14 -0
  259. package/lib/typescript/components/Dialog/styles.d.ts.map +1 -0
  260. package/lib/typescript/components/Form/FormLabelRoot.d.ts +18 -0
  261. package/lib/typescript/components/Form/FormLabelRoot.d.ts.map +1 -0
  262. package/lib/typescript/components/Form/FormLabelRoot.web.d.ts +20 -0
  263. package/lib/typescript/components/Form/FormLabelRoot.web.d.ts.map +1 -0
  264. package/lib/typescript/components/Form/FormRoot.d.ts +12 -0
  265. package/lib/typescript/components/Form/FormRoot.d.ts.map +1 -0
  266. package/lib/typescript/components/Form/FormRoot.web.d.ts +10 -0
  267. package/lib/typescript/components/Form/FormRoot.web.d.ts.map +1 -0
  268. package/lib/typescript/components/Form/index.d.ts +64 -0
  269. package/lib/typescript/components/Form/index.d.ts.map +1 -0
  270. package/lib/typescript/components/Form/styles.d.ts +22 -0
  271. package/lib/typescript/components/Form/styles.d.ts.map +1 -0
  272. package/lib/typescript/components/Heading/index.d.ts +10 -0
  273. package/lib/typescript/components/Heading/index.d.ts.map +1 -0
  274. package/lib/typescript/components/Heading/styles.d.ts +6 -0
  275. package/lib/typescript/components/Heading/styles.d.ts.map +1 -0
  276. package/lib/typescript/components/Icon/index.d.ts +27 -0
  277. package/lib/typescript/components/Icon/index.d.ts.map +1 -0
  278. package/lib/typescript/components/IconButton/index.d.ts +15 -0
  279. package/lib/typescript/components/IconButton/index.d.ts.map +1 -0
  280. package/lib/typescript/components/IconButton/styles.d.ts +16 -0
  281. package/lib/typescript/components/IconButton/styles.d.ts.map +1 -0
  282. package/lib/typescript/components/Image/Image.d.ts +47 -0
  283. package/lib/typescript/components/Image/Image.d.ts.map +1 -0
  284. package/lib/typescript/components/Image/index.d.ts +2 -0
  285. package/lib/typescript/components/Image/index.d.ts.map +1 -0
  286. package/lib/typescript/components/Input/BaseInput.android.d.ts +3 -0
  287. package/lib/typescript/components/Input/BaseInput.android.d.ts.map +1 -0
  288. package/lib/typescript/components/Input/index.d.ts +7 -5
  289. package/lib/typescript/components/Input/index.d.ts.map +1 -1
  290. package/lib/typescript/components/Input/styles.d.ts +5 -7
  291. package/lib/typescript/components/Input/styles.d.ts.map +1 -1
  292. package/lib/typescript/components/Link/index.d.ts +26 -0
  293. package/lib/typescript/components/Link/index.d.ts.map +1 -0
  294. package/lib/typescript/components/Link/styles.d.ts +4 -0
  295. package/lib/typescript/components/Link/styles.d.ts.map +1 -0
  296. package/lib/typescript/components/ProgressSegmented/index.d.ts +15 -0
  297. package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -0
  298. package/lib/typescript/components/ProgressSegmented/styles.d.ts +8 -0
  299. package/lib/typescript/components/ProgressSegmented/styles.d.ts.map +1 -0
  300. package/lib/typescript/components/Select/SelectTriggerHost.d.ts +3 -0
  301. package/lib/typescript/components/Select/SelectTriggerHost.d.ts.map +1 -0
  302. package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +13 -0
  303. package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +1 -0
  304. package/lib/typescript/components/Select/index.d.ts +7 -4
  305. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  306. package/lib/typescript/components/Select/styles.d.ts +6 -8
  307. package/lib/typescript/components/Select/styles.d.ts.map +1 -1
  308. package/lib/typescript/components/Stack/HStack.d.ts +1 -12
  309. package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
  310. package/lib/typescript/components/Stack/VStack.d.ts +1 -12
  311. package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
  312. package/lib/typescript/components/Stack/styles.d.ts +10 -0
  313. package/lib/typescript/components/Stack/styles.d.ts.map +1 -0
  314. package/lib/typescript/components/Switch/BaseSwitch.d.ts +9 -0
  315. package/lib/typescript/components/Switch/BaseSwitch.d.ts.map +1 -0
  316. package/lib/typescript/components/Switch/BaseSwitch.web.d.ts +15 -0
  317. package/lib/typescript/components/Switch/BaseSwitch.web.d.ts.map +1 -0
  318. package/lib/typescript/components/Switch/index.d.ts +7 -0
  319. package/lib/typescript/components/Switch/index.d.ts.map +1 -0
  320. package/lib/typescript/components/Switch/styles.d.ts +26 -0
  321. package/lib/typescript/components/Switch/styles.d.ts.map +1 -0
  322. package/lib/typescript/components/Text/index.d.ts +9 -1
  323. package/lib/typescript/components/Text/index.d.ts.map +1 -1
  324. package/lib/typescript/components/Text/styles.d.ts +6 -0
  325. package/lib/typescript/components/Text/styles.d.ts.map +1 -0
  326. package/lib/typescript/components/VirtualizedList/index.d.ts +8 -0
  327. package/lib/typescript/components/VirtualizedList/index.d.ts.map +1 -0
  328. package/lib/typescript/components/index.d.ts +16 -0
  329. package/lib/typescript/components/index.d.ts.map +1 -1
  330. package/lib/typescript/index.d.ts +3 -0
  331. package/lib/typescript/index.d.ts.map +1 -1
  332. package/lib/typescript/metro/withCdxMetroConfig.d.ts +19 -0
  333. package/lib/typescript/metro/withCdxMetroConfig.d.ts.map +1 -0
  334. package/lib/typescript/styles/index.d.ts +2 -0
  335. package/lib/typescript/styles/index.d.ts.map +1 -0
  336. package/lib/typescript/styles/primitives.d.ts +85 -0
  337. package/lib/typescript/styles/primitives.d.ts.map +1 -0
  338. package/package.json +23 -16
  339. package/src/components/AlertDialog/index.tsx +124 -0
  340. package/src/components/Avatar/index.tsx +172 -0
  341. package/src/components/Avatar/styles.ts +83 -0
  342. package/src/components/BottomSheet/index.tsx +316 -0
  343. package/src/components/BottomSheet/styles.ts +79 -0
  344. package/src/components/Box/Box.tsx +1 -0
  345. package/src/components/Button/buttonSharedVariants.ts +281 -0
  346. package/src/components/Button/index.tsx +24 -15
  347. package/src/components/Button/styles.ts +195 -229
  348. package/src/components/Card/index.tsx +115 -0
  349. package/src/components/Card/styles.ts +41 -0
  350. package/src/components/Checkbox/index.tsx +207 -0
  351. package/src/components/Checkbox/styles.ts +103 -0
  352. package/src/components/Chip/index.tsx +91 -0
  353. package/src/components/Chip/styles.ts +51 -0
  354. package/src/components/Dialog/index.tsx +304 -0
  355. package/src/components/Dialog/styles.ts +88 -0
  356. package/src/components/Form/FormLabelRoot.tsx +33 -0
  357. package/src/components/Form/FormLabelRoot.web.tsx +18 -0
  358. package/src/components/Form/FormRoot.tsx +19 -0
  359. package/src/components/Form/FormRoot.web.tsx +12 -0
  360. package/src/components/Form/index.tsx +272 -0
  361. package/src/components/Form/styles.ts +75 -0
  362. package/src/components/Heading/index.tsx +36 -0
  363. package/src/components/Heading/styles.tsx +26 -0
  364. package/src/components/Icon/index.tsx +54 -0
  365. package/src/components/IconButton/index.tsx +93 -0
  366. package/src/components/IconButton/styles.ts +131 -0
  367. package/src/components/Image/Image.tsx +77 -0
  368. package/src/components/Image/index.ts +1 -0
  369. package/src/components/Input/BaseInput.android.tsx +13 -0
  370. package/src/components/Input/index.tsx +9 -22
  371. package/src/components/Input/styles.ts +42 -37
  372. package/src/components/Link/index.tsx +83 -0
  373. package/src/components/Link/styles.ts +20 -0
  374. package/src/components/ProgressSegmented/index.tsx +81 -0
  375. package/src/components/ProgressSegmented/styles.ts +19 -0
  376. package/src/components/Select/SelectTriggerHost.tsx +4 -0
  377. package/src/components/Select/SelectTriggerHost.web.tsx +136 -0
  378. package/src/components/Select/index.tsx +14 -14
  379. package/src/components/Select/styles.ts +68 -75
  380. package/src/components/Stack/HStack.tsx +8 -19
  381. package/src/components/Stack/VStack.tsx +8 -23
  382. package/src/components/Stack/styles.ts +37 -0
  383. package/src/components/Switch/BaseSwitch.tsx +38 -0
  384. package/src/components/Switch/BaseSwitch.web.tsx +69 -0
  385. package/src/components/Switch/index.tsx +11 -0
  386. package/src/components/Switch/styles.ts +120 -0
  387. package/src/components/Text/index.tsx +16 -0
  388. package/src/components/Text/styles.tsx +26 -0
  389. package/src/components/VirtualizedList/index.tsx +19 -0
  390. package/src/components/index.ts +16 -0
  391. package/src/index.ts +3 -0
  392. package/src/metro/withCdxMetroConfig.ts +29 -0
  393. package/src/styles/index.ts +1 -0
  394. package/src/styles/primitives.ts +107 -0
  395. package/lib/commonjs/components/Text/Text.js +0 -30
  396. package/lib/commonjs/components/Text/Text.js.map +0 -1
  397. package/lib/module/components/Text/Text.js +0 -26
  398. package/lib/module/components/Text/Text.js.map +0 -1
  399. package/lib/typescript/components/Text/Text.d.ts +0 -11
  400. package/lib/typescript/components/Text/Text.d.ts.map +0 -1
  401. package/src/components/Text/Text.tsx +0 -58
  402. package/src/components/Text/index.ts +0 -1
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TRANSITION_COLORS = exports.SIZE_SCALE = exports.SHADOW_SM = exports.SHADOW_MD = exports.SEMANTIC_COLORS = exports.RADIUS_SM = exports.RADIUS_MD = exports.RADIUS_FULL = exports.FOCUS_RING = exports.DISABLED_OPACITY = exports.DISABLED_CURSOR = exports.COLOR_TEXT_SECONDARY = exports.COLOR_TEXT_PRIMARY = exports.COLOR_TEXT_PLACEHOLDER = exports.COLOR_TEXT_MUTED = exports.COLOR_TEXT_INVERSE = exports.COLOR_TEXT_INVALID = exports.COLOR_BRAND_HOVER = exports.COLOR_BRAND_DEFAULT = exports.COLOR_BRAND_ACTIVE = exports.COLOR_BORDER_STRONG = exports.COLOR_BORDER_INVALID = exports.COLOR_BORDER_FOCUS = exports.COLOR_BORDER_DEFAULT = exports.COLOR_BG_SUBTLE = exports.COLOR_BG_PRIMARY = exports.COLOR_BG_MUTED = exports.COLOR_BG_INVERSE = exports.COLOR_ACCENT_DEFAULT = exports.COLOR_ACCENT_BORDER = void 0;
7
+ // packages/components/src/styles/primitives.ts
8
+ // Semantic constants for CDX UI component styling.
9
+ // See docs/visual-revamp-plan.md for rationale and usage.
10
+
11
+ // ─── Colors ──────────────────────────────────────────────
12
+ // Surface & background
13
+ const COLOR_BG_PRIMARY = exports.COLOR_BG_PRIMARY = 'bg-white';
14
+ const COLOR_BG_SUBTLE = exports.COLOR_BG_SUBTLE = 'bg-slate-50';
15
+ const COLOR_BG_MUTED = exports.COLOR_BG_MUTED = 'bg-slate-100';
16
+ const COLOR_BG_INVERSE = exports.COLOR_BG_INVERSE = 'bg-slate-900';
17
+
18
+ // Border
19
+ const COLOR_BORDER_DEFAULT = exports.COLOR_BORDER_DEFAULT = 'border-slate-200';
20
+ const COLOR_BORDER_STRONG = exports.COLOR_BORDER_STRONG = 'border-slate-300';
21
+ const COLOR_BORDER_FOCUS = exports.COLOR_BORDER_FOCUS = 'border-slate-900';
22
+ const COLOR_BORDER_INVALID = exports.COLOR_BORDER_INVALID = 'border-red-500';
23
+
24
+ // Text
25
+ const COLOR_TEXT_PRIMARY = exports.COLOR_TEXT_PRIMARY = 'text-slate-900';
26
+ const COLOR_TEXT_SECONDARY = exports.COLOR_TEXT_SECONDARY = 'text-slate-500';
27
+ const COLOR_TEXT_MUTED = exports.COLOR_TEXT_MUTED = 'text-slate-400';
28
+ const COLOR_TEXT_INVERSE = exports.COLOR_TEXT_INVERSE = 'text-white';
29
+ const COLOR_TEXT_PLACEHOLDER = exports.COLOR_TEXT_PLACEHOLDER = 'text-slate-400';
30
+ const COLOR_TEXT_INVALID = exports.COLOR_TEXT_INVALID = 'text-red-600';
31
+
32
+ // Brand / Action
33
+ const COLOR_BRAND_DEFAULT = exports.COLOR_BRAND_DEFAULT = 'bg-slate-900';
34
+ const COLOR_BRAND_HOVER = exports.COLOR_BRAND_HOVER = 'bg-slate-800';
35
+ const COLOR_BRAND_ACTIVE = exports.COLOR_BRAND_ACTIVE = 'bg-slate-700';
36
+
37
+ // Accent (for checked states, active indicators)
38
+ const COLOR_ACCENT_DEFAULT = exports.COLOR_ACCENT_DEFAULT = 'bg-slate-900';
39
+ const COLOR_ACCENT_BORDER = exports.COLOR_ACCENT_BORDER = 'border-slate-900';
40
+
41
+ // Semantic colors (danger, warning, success, info)
42
+ // Kept for Button's 5-color system
43
+ const SEMANTIC_COLORS = exports.SEMANTIC_COLORS = {
44
+ action: {
45
+ bg: 'bg-slate-900',
46
+ bgHover: 'bg-slate-800',
47
+ bgActive: 'bg-slate-700',
48
+ border: 'border-slate-900',
49
+ text: 'text-slate-900',
50
+ ring: 'ring-slate-400/50'
51
+ },
52
+ danger: {
53
+ bg: 'bg-red-600',
54
+ bgHover: 'bg-red-700',
55
+ bgActive: 'bg-red-800',
56
+ border: 'border-red-600',
57
+ text: 'text-red-600',
58
+ ring: 'ring-red-400/50'
59
+ },
60
+ warning: {
61
+ bg: 'bg-amber-500',
62
+ bgHover: 'bg-amber-600',
63
+ bgActive: 'bg-amber-700',
64
+ border: 'border-amber-500',
65
+ text: 'text-amber-600',
66
+ ring: 'ring-amber-400/50'
67
+ },
68
+ success: {
69
+ bg: 'bg-green-600',
70
+ bgHover: 'bg-green-700',
71
+ bgActive: 'bg-green-800',
72
+ border: 'border-green-600',
73
+ text: 'text-green-600',
74
+ ring: 'ring-green-400/50'
75
+ },
76
+ info: {
77
+ bg: 'bg-sky-500',
78
+ bgHover: 'bg-sky-600',
79
+ bgActive: 'bg-sky-700',
80
+ border: 'border-sky-500',
81
+ text: 'text-sky-600',
82
+ ring: 'ring-sky-400/50'
83
+ }
84
+ };
85
+
86
+ // ─── Focus ───────────────────────────────────────────────
87
+ const FOCUS_RING = exports.FOCUS_RING = 'ring-2 ring-slate-400/50 ring-offset-2';
88
+
89
+ // ─── Radius ──────────────────────────────────────────────
90
+ const RADIUS_SM = exports.RADIUS_SM = 'rounded-lg'; // buttons, inputs, checkboxes
91
+ const RADIUS_MD = exports.RADIUS_MD = 'rounded-xl'; // cards, dropdowns, modals
92
+ const RADIUS_FULL = exports.RADIUS_FULL = 'rounded-full'; // pills, avatars, switches
93
+
94
+ // ─── Shadows ─────────────────────────────────────────────
95
+ const SHADOW_SM = exports.SHADOW_SM = 'shadow-sm';
96
+ const SHADOW_MD = exports.SHADOW_MD = 'shadow-md';
97
+
98
+ // ─── Sizing ──────────────────────────────────────────────
99
+ // Unified size scale for interactive/form components (Button, Input, Select, Checkbox).
100
+ // Only two sizes: 'default' (regular) and 'small' (compact).
101
+ // NOTE: Text and Heading use a separate typography scale (xs/sm/md/lg/xl) — not this.
102
+ const SIZE_SCALE = exports.SIZE_SCALE = {
103
+ default: {
104
+ height: 'h-10',
105
+ px: 'px-4',
106
+ gap: 'gap-2',
107
+ text: 'text-base'
108
+ },
109
+ small: {
110
+ height: 'h-8',
111
+ px: 'px-3',
112
+ gap: 'gap-1.5',
113
+ text: 'text-sm'
114
+ }
115
+ };
116
+
117
+ // ─── Transitions ─────────────────────────────────────────
118
+ const TRANSITION_COLORS = exports.TRANSITION_COLORS = 'transition-colors duration-150';
119
+
120
+ // ─── Disabled ────────────────────────────────────────────
121
+ const DISABLED_OPACITY = exports.DISABLED_OPACITY = 'data-[disabled=true]:opacity-50';
122
+ const DISABLED_CURSOR = exports.DISABLED_CURSOR = 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:pointer-events-none';
123
+ //# sourceMappingURL=primitives.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["COLOR_BG_PRIMARY","exports","COLOR_BG_SUBTLE","COLOR_BG_MUTED","COLOR_BG_INVERSE","COLOR_BORDER_DEFAULT","COLOR_BORDER_STRONG","COLOR_BORDER_FOCUS","COLOR_BORDER_INVALID","COLOR_TEXT_PRIMARY","COLOR_TEXT_SECONDARY","COLOR_TEXT_MUTED","COLOR_TEXT_INVERSE","COLOR_TEXT_PLACEHOLDER","COLOR_TEXT_INVALID","COLOR_BRAND_DEFAULT","COLOR_BRAND_HOVER","COLOR_BRAND_ACTIVE","COLOR_ACCENT_DEFAULT","COLOR_ACCENT_BORDER","SEMANTIC_COLORS","action","bg","bgHover","bgActive","border","text","ring","danger","warning","success","info","FOCUS_RING","RADIUS_SM","RADIUS_MD","RADIUS_FULL","SHADOW_SM","SHADOW_MD","SIZE_SCALE","default","height","px","gap","small","TRANSITION_COLORS","DISABLED_OPACITY","DISABLED_CURSOR"],"sourceRoot":"../../../src","sources":["styles/primitives.ts"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,UAAU;AACnC,MAAME,eAAe,GAAAD,OAAA,CAAAC,eAAA,GAAG,aAAa;AACrC,MAAMC,cAAc,GAAAF,OAAA,CAAAE,cAAA,GAAG,cAAc;AACrC,MAAMC,gBAAgB,GAAAH,OAAA,CAAAG,gBAAA,GAAG,cAAc;;AAE9C;AACO,MAAMC,oBAAoB,GAAAJ,OAAA,CAAAI,oBAAA,GAAG,kBAAkB;AAC/C,MAAMC,mBAAmB,GAAAL,OAAA,CAAAK,mBAAA,GAAG,kBAAkB;AAC9C,MAAMC,kBAAkB,GAAAN,OAAA,CAAAM,kBAAA,GAAG,kBAAkB;AAC7C,MAAMC,oBAAoB,GAAAP,OAAA,CAAAO,oBAAA,GAAG,gBAAgB;;AAEpD;AACO,MAAMC,kBAAkB,GAAAR,OAAA,CAAAQ,kBAAA,GAAG,gBAAgB;AAC3C,MAAMC,oBAAoB,GAAAT,OAAA,CAAAS,oBAAA,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CAAiC;AAC1D,MAAMC,eAAe,GAAA7C,OAAA,CAAA6C,eAAA,GAC1B,kFAAkF","ignoreList":[]}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+
3
+ import React, { forwardRef } from 'react';
4
+ import { useDialog } from '@cdx-ui/primitives';
5
+ import { composeEventHandlers } from '@cdx-ui/utils';
6
+ import { Button } from '../Button';
7
+ import { Dialog } from '../Dialog';
8
+
9
+ // =============================================================================
10
+ // ALERT DIALOG ROOT (Dialog with non-dismissible defaults + alertdialog role)
11
+ // =============================================================================
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ const AlertDialogRoot = /*#__PURE__*/forwardRef(({
14
+ closeOnBackdropPress = false,
15
+ closeOnEscKey = false,
16
+ role = 'alertdialog',
17
+ children,
18
+ ...props
19
+ }, ref) => /*#__PURE__*/_jsx(Dialog, {
20
+ ref: ref,
21
+ closeOnBackdropPress: closeOnBackdropPress,
22
+ closeOnEscKey: closeOnEscKey,
23
+ role: role,
24
+ ...props,
25
+ children: children
26
+ }));
27
+ AlertDialogRoot.displayName = 'AlertDialog';
28
+
29
+ // =============================================================================
30
+ // ALERT DIALOG ACTION
31
+ // =============================================================================
32
+
33
+ const AlertDialogAction = /*#__PURE__*/forwardRef(({
34
+ asChild = false,
35
+ children,
36
+ color = 'action',
37
+ className,
38
+ ...props
39
+ }, ref) => {
40
+ if (asChild && /*#__PURE__*/React.isValidElement(children)) {
41
+ return /*#__PURE__*/React.cloneElement(children, {
42
+ ref,
43
+ className,
44
+ ...props
45
+ });
46
+ }
47
+ return /*#__PURE__*/_jsx(Button, {
48
+ ref: ref,
49
+ variant: "strong",
50
+ color: color,
51
+ className: className,
52
+ ...props,
53
+ children: /*#__PURE__*/_jsx(Button.Label, {
54
+ children: children
55
+ })
56
+ });
57
+ });
58
+ AlertDialogAction.displayName = 'AlertDialog.Action';
59
+
60
+ // =============================================================================
61
+ // ALERT DIALOG CANCEL
62
+ // =============================================================================
63
+
64
+ const AlertDialogCancel = /*#__PURE__*/forwardRef(({
65
+ asChild = false,
66
+ children,
67
+ onPress,
68
+ className,
69
+ ...props
70
+ }, ref) => {
71
+ const {
72
+ onOpenChange
73
+ } = useDialog();
74
+ const handlePress = composeEventHandlers(onPress, () => onOpenChange(false));
75
+ if (asChild && /*#__PURE__*/React.isValidElement(children)) {
76
+ return /*#__PURE__*/React.cloneElement(children, {
77
+ ref,
78
+ onPress: handlePress,
79
+ className,
80
+ ...props
81
+ });
82
+ }
83
+ return /*#__PURE__*/_jsx(Button, {
84
+ ref: ref,
85
+ variant: "outline",
86
+ onPress: handlePress,
87
+ className: className,
88
+ ...props,
89
+ children: /*#__PURE__*/_jsx(Button.Label, {
90
+ children: children
91
+ })
92
+ });
93
+ });
94
+ AlertDialogCancel.displayName = 'AlertDialog.Cancel';
95
+
96
+ // =============================================================================
97
+ // COMPOUND EXPORT
98
+ // =============================================================================
99
+
100
+ export const AlertDialog = Object.assign(AlertDialogRoot, {
101
+ Trigger: Dialog.Trigger,
102
+ Content: Dialog.Content,
103
+ Header: Dialog.Header,
104
+ Title: Dialog.Title,
105
+ Description: Dialog.Description,
106
+ Body: Dialog.Body,
107
+ Footer: Dialog.Footer,
108
+ Close: Dialog.Close,
109
+ Action: AlertDialogAction,
110
+ Cancel: AlertDialogCancel
111
+ });
112
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","forwardRef","useDialog","composeEventHandlers","Button","Dialog","jsx","_jsx","AlertDialogRoot","closeOnBackdropPress","closeOnEscKey","role","children","props","ref","displayName","AlertDialogAction","asChild","color","className","isValidElement","cloneElement","variant","Label","AlertDialogCancel","onPress","onOpenChange","handlePress","AlertDialog","Object","assign","Trigger","Content","Header","Title","Description","Body","Footer","Close","Action","Cancel"],"sourceRoot":"../../../../src","sources":["components/AlertDialog/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAEzC,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,S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,MAAM,EAAEhC,MAAM,CAACgC,MAAM;EACrBC,KAAK,EAAEjC,MAAM,CAACiC,KAAK;EACnBC,MAAM,EAAEvB,iBAAiB;EACzBwB,MAAM,EAAEhB;AACV,CAAC,CAAiC","ignoreList":[]}
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { Image, Text, View } from 'react-native';
5
+ import { createAvatar } from '@cdx-ui/primitives';
6
+ import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
7
+ import { Icon as IconComponent } from '../Icon';
8
+ import { avatarBadgeVariants, avatarIconVariants, avatarTextVariants, avatarImageVariants, avatarRootVariants } from './styles';
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ const SCOPE = 'AVATAR';
11
+ const Root = withStyleContext(View, SCOPE);
12
+ const useAvatarStyleContext = () => useStyleContext(SCOPE);
13
+ const AvatarPrimitive = createAvatar({
14
+ Root,
15
+ Image,
16
+ Text,
17
+ Icon: IconComponent,
18
+ Badge: View
19
+ });
20
+
21
+ // =============================================================================
22
+ // AVATAR ROOT
23
+ // =============================================================================
24
+
25
+ const AvatarRoot = /*#__PURE__*/forwardRef(({
26
+ size = 'lg',
27
+ className,
28
+ children,
29
+ style,
30
+ ...props
31
+ }, ref) => {
32
+ const computedClassName = cn(avatarRootVariants({
33
+ size
34
+ }), className);
35
+ return /*#__PURE__*/_jsx(AvatarPrimitive, {
36
+ ref: ref,
37
+ className: computedClassName,
38
+ style: style,
39
+ context: {
40
+ size
41
+ },
42
+ ...props,
43
+ children: children
44
+ });
45
+ });
46
+ AvatarRoot.displayName = 'Avatar';
47
+
48
+ // =============================================================================
49
+ // AVATAR IMAGE
50
+ // =============================================================================
51
+
52
+ const AvatarImage = /*#__PURE__*/forwardRef(({
53
+ className,
54
+ style,
55
+ ...props
56
+ }, ref) => {
57
+ const computedClassName = cn(avatarImageVariants(), className);
58
+ return /*#__PURE__*/_jsx(AvatarPrimitive.Image, {
59
+ ref: ref,
60
+ className: computedClassName,
61
+ style: style,
62
+ ...props
63
+ });
64
+ });
65
+ AvatarImage.displayName = 'Avatar.Image';
66
+
67
+ // =============================================================================
68
+ // AVATAR TEXT
69
+ // =============================================================================
70
+
71
+ const AvatarText = /*#__PURE__*/forwardRef(({
72
+ className,
73
+ children,
74
+ style,
75
+ ...props
76
+ }, ref) => {
77
+ const {
78
+ size
79
+ } = useAvatarStyleContext();
80
+ const computedClassName = cn(avatarTextVariants({
81
+ size
82
+ }), className);
83
+ return /*#__PURE__*/_jsx(AvatarPrimitive.Text, {
84
+ ref: ref,
85
+ className: computedClassName,
86
+ style: style,
87
+ ...props,
88
+ children: children
89
+ });
90
+ });
91
+ AvatarText.displayName = 'Avatar.Text';
92
+
93
+ // =============================================================================
94
+ // AVATAR ICON
95
+ // =============================================================================
96
+
97
+ const AvatarIcon = ({
98
+ className,
99
+ style,
100
+ ...props
101
+ }) => {
102
+ const {
103
+ size
104
+ } = useAvatarStyleContext();
105
+ const computedClassName = cn(avatarIconVariants({
106
+ size
107
+ }), className);
108
+ return /*#__PURE__*/_jsx(AvatarPrimitive.Icon, {
109
+ className: computedClassName,
110
+ style: style,
111
+ ...props
112
+ });
113
+ };
114
+ AvatarIcon.displayName = 'Avatar.Icon';
115
+
116
+ // =============================================================================
117
+ // AVATAR BADGE
118
+ // =============================================================================
119
+
120
+ const AvatarBadge = /*#__PURE__*/forwardRef(({
121
+ className,
122
+ children,
123
+ style,
124
+ ...props
125
+ }, ref) => {
126
+ const {
127
+ size
128
+ } = useAvatarStyleContext();
129
+ const computedClassName = cn(avatarBadgeVariants({
130
+ size
131
+ }), className);
132
+ return /*#__PURE__*/_jsx(AvatarPrimitive.Badge, {
133
+ ref: ref,
134
+ className: computedClassName,
135
+ style: style,
136
+ ...props,
137
+ children: children
138
+ });
139
+ });
140
+ AvatarBadge.displayName = 'Avatar.Badge';
141
+
142
+ // =============================================================================
143
+ // COMPOUND COMPONENT
144
+ // =============================================================================
145
+
146
+ export const Avatar = Object.assign(AvatarRoot, {
147
+ Image: AvatarImage,
148
+ Text: AvatarText,
149
+ Icon: AvatarIcon,
150
+ Badge: AvatarBadge
151
+ });
152
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","Image","Text","View","createAvatar","cn","useStyleContext","withStyleContext","Icon","IconComponent","avatarBadgeVariants","avatarIconVariants","avatarTextVariants","avatarImageVariants","avatarRootVariants","jsx","_jsx","SCOPE","Root","useAvatarStyleContext","AvatarPrimitive","Badge","AvatarRoot","size","className","children","style","props","ref","computedClassName","context","displayName","AvatarImage","AvatarText","AvatarIcon","AvatarBadge","Avatar","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Avatar/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,KAAK,EAAEC,IAAI,EAAEC,IAAI,QAAyD,cAAc;AACjG,SAASC,YAAY,QAAmD,oBAAoB;AAC5F,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,SAASC,IAAI,IAAIC,aAAa,QAAwB,SAAS;AAC/D,SAEEC,mBAAmB,EACnBC,kBAAkB,EAClBC,kBAAkB,EAClBC,mBAAmB,EACnBC,kBAAkB,QACb,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElB,MAAMC,KAAK,GAAG,QAAQ;AAEtB,MAAMC,IAAI,GAAGX,gBAAgB,CAACJ,IAAI,EAAEc,KAAK,CAAC;AAE1C,MAAME,qBAAqB,GAAGA,CAAA,KAAMb,eAAe,CAACW,KAAK,CAAuB;AAEhF,MAAMG,eAAe,GAAGhB,YAAY,CAAC;EACnCc,IAAI;EACJjB,KAAK;EACLC,IAAI;EACJM,IAAI,EAAEC,aAAa;EACnBY,KAAK,EAAElB;AACT,CAAC,CAAC;;AAEF;AACA;AACA;;AAOA,MAAMmB,UAAU,gBAAGtB,UAAU,CAC3B,CAAC;EAAEuB,IAAI,GAAG,IAAI;EAAEC,SA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AAO,MAAMK,MAAM,GAAGC,MAAM,CAACC,MAAM,CAAChB,UAAU,EAAE;EAC9CrB,KAAK,EAAE+B,WAAW;EAClB9B,IAAI,EAAE+B,UAAU;EAChBzB,IAAI,EAAE0B,UAAU;EAChBb,KAAK,EAAEc;AACT,CAAC,CAA4B","ignoreList":[]}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ import { cva } from 'class-variance-authority';
4
+ import { COLOR_BG_MUTED, COLOR_TEXT_SECONDARY, RADIUS_FULL } from '../../styles/primitives';
5
+
6
+ // ── Root ─────────────────────────────────────────────────
7
+
8
+ export const avatarRootVariants = cva([RADIUS_FULL, 'relative items-center justify-center', COLOR_BG_MUTED], {
9
+ variants: {
10
+ size: {
11
+ sm: 'w-8 h-8',
12
+ md: 'w-10 h-10',
13
+ lg: 'w-12 h-12',
14
+ xl: 'w-16 h-16',
15
+ '2xl': 'w-20 h-20'
16
+ }
17
+ },
18
+ defaultVariants: {
19
+ size: 'lg'
20
+ }
21
+ });
22
+
23
+ // ── Image ────────────────────────────────────────────────
24
+
25
+ export const avatarImageVariants = cva(['absolute top-0 left-0 w-full h-full', RADIUS_FULL, 'overflow-hidden']);
26
+
27
+ // ── Text ─────────────────────────────────────────────────
28
+
29
+ export const avatarTextVariants = cva([COLOR_TEXT_SECONDARY, 'font-semibold'], {
30
+ variants: {
31
+ size: {
32
+ sm: 'text-xs',
33
+ md: 'text-sm',
34
+ lg: 'text-base',
35
+ xl: 'text-xl',
36
+ '2xl': 'text-2xl'
37
+ }
38
+ },
39
+ defaultVariants: {
40
+ size: 'lg'
41
+ }
42
+ });
43
+
44
+ // ── Icon ─────────────────────────────────────────────────
45
+
46
+ export const avatarIconVariants = cva([COLOR_TEXT_SECONDARY], {
47
+ variants: {
48
+ size: {
49
+ sm: 'size-4',
50
+ md: 'size-5',
51
+ lg: 'size-6',
52
+ xl: 'size-8',
53
+ '2xl': 'size-10'
54
+ }
55
+ },
56
+ defaultVariants: {
57
+ size: 'lg'
58
+ }
59
+ });
60
+
61
+ // ── Badge ────────────────────────────────────────────────
62
+
63
+ export const avatarBadgeVariants = cva(['absolute border-2 border-white', RADIUS_FULL], {
64
+ variants: {
65
+ size: {
66
+ sm: 'w-2.5 h-2.5 bottom-0 right-0',
67
+ md: 'w-3 h-3 bottom-0 right-0',
68
+ lg: 'w-3.5 h-3.5 bottom-0 right-0',
69
+ xl: 'w-4 h-4 bottom-0.5 right-0.5',
70
+ '2xl': 'w-5 h-5 bottom-0.5 right-0.5'
71
+ }
72
+ },
73
+ defaultVariants: {
74
+ size: 'lg'
75
+ }
76
+ });
77
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["cva","COLOR_BG_MUTED","COLOR_TEXT_SECONDARY","RADIUS_FULL","avatarRootVariants","variants","size","sm","md","lg","xl","defaultVariants","avatarImageVariants","avatarTextVariants","avatarIconVariants","avatarBadgeVariants"],"sourceRoot":"../../../../src","sources":["components/Avatar/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AACjE,SAASC,cAAc,EAAEC,oBAAoB,EAAEC,WAAW,QAAQ,yBAAyB;;AAE3F;;AAEA,OAAO,MAAMC,kBAAkB,GAAGJ,GAAG,CACnC,CAACG,WAAW,EAAE,sCAAsC,EAAEF,cAAc,CAAC,EACrE;EACEI,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,WAAW;MACfC,EAAE,EAAE,WAAW;MACfC,EAAE,EAAE,WAAW;MACf,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfL,IAAI,EAAE;EACR;AACF,CACF,CAAC;;AAED;;AAEA,OAAO,MAAMM,mBAAmB,GAAGZ,GAAG,CAAC,CACrC,qCAAqC,EACrCG,WAAW,EACX,iBAAiB,CAClB,CAAC;;AAEF;;AAEA,OAAO,MAAMU,kBAAkB,GAAGb,GAAG,CAAC,CAACE,oBAAoB,EAAE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