@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,255 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Form = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _primitives = require("@cdx-ui/primitives");
10
+ var _utils = require("@cdx-ui/utils");
11
+ var _Icon = require("../Icon");
12
+ var _FormRoot = require("./FormRoot");
13
+ var _FormLabelRoot = require("./FormLabelRoot");
14
+ var _styles = require("./styles");
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ // =============================================================================
17
+ // SCOPE + CONTEXT
18
+ // =============================================================================
19
+ const SCOPE = 'FORM';
20
+ const FieldRoot = (0, _utils.withStyleContext)(_reactNative.View, SCOPE);
21
+ const useFormStyleContext = () => (0, _utils.useStyleContext)(SCOPE);
22
+
23
+ // =============================================================================
24
+ // PRIMITIVE
25
+ // =============================================================================
26
+
27
+ const FormPrimitive = (0, _primitives.createForm)({
28
+ Root: _FormRoot.BaseFormRoot,
29
+ Field: FieldRoot,
30
+ Error: _reactNative.View,
31
+ ErrorText: _reactNative.Text,
32
+ ErrorIcon: _reactNative.View,
33
+ Label: _FormLabelRoot.FormLabelRoot,
34
+ Helper: _reactNative.View,
35
+ HelperText: _reactNative.Text
36
+ });
37
+
38
+ // =============================================================================
39
+ // FORM ROOT (container — <form> on web, <View> on RN)
40
+ // =============================================================================
41
+
42
+ const FormRoot = /*#__PURE__*/(0, _react.forwardRef)(({
43
+ className,
44
+ children,
45
+ style,
46
+ ...props
47
+ }, ref) => {
48
+ const computedClassName = (0, _utils.cn)((0, _styles.formRootVariants)(), className);
49
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormPrimitive, {
50
+ ref: ref,
51
+ className: computedClassName,
52
+ style: style,
53
+ ...props,
54
+ children: children
55
+ });
56
+ });
57
+ FormRoot.displayName = 'Form';
58
+
59
+ // =============================================================================
60
+ // FORM FIELD (per-field wrapper — provides context for label/error/helper/input)
61
+ // =============================================================================
62
+
63
+ /**
64
+ * Field wrapper + context. For **initial focus**, pass `autoFocus` on `Input.Field` (not here).
65
+ */
66
+
67
+ const FormField = /*#__PURE__*/(0, _react.forwardRef)(({
68
+ size = 'default',
69
+ className,
70
+ children,
71
+ style,
72
+ ...props
73
+ }, ref) => {
74
+ const computedClassName = (0, _utils.cn)((0, _styles.formFieldVariants)(), className);
75
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormPrimitive.Field, {
76
+ ref: ref,
77
+ className: computedClassName,
78
+ style: style,
79
+ context: {
80
+ size
81
+ },
82
+ ...props,
83
+ children: children
84
+ });
85
+ });
86
+ FormField.displayName = 'Form.Field';
87
+
88
+ // =============================================================================
89
+ // FORM LABEL
90
+ // =============================================================================
91
+
92
+ // TODO: Accept accessibility labels for required indicator as props to support i18n
93
+
94
+ const FormLabel = /*#__PURE__*/(0, _react.forwardRef)(({
95
+ className,
96
+ children,
97
+ style,
98
+ htmlFor,
99
+ ...props
100
+ }, ref) => {
101
+ const {
102
+ size
103
+ } = useFormStyleContext();
104
+ const labelClassName = (0, _utils.cn)((0, _styles.formLabelVariants)({
105
+ size
106
+ }), className);
107
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormPrimitive.Label, {
108
+ ref: ref,
109
+ className: labelClassName,
110
+ style: style,
111
+ htmlFor: htmlFor,
112
+ requiredIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
113
+ className: "text-red-500",
114
+ "aria-hidden": true,
115
+ children: ' *'
116
+ }),
117
+ ...props,
118
+ children: children
119
+ });
120
+ });
121
+ FormLabel.displayName = 'Form.Label';
122
+
123
+ // =============================================================================
124
+ // FORM HELPER
125
+ // =============================================================================
126
+
127
+ const FormHelper = /*#__PURE__*/(0, _react.forwardRef)(({
128
+ className,
129
+ children,
130
+ style,
131
+ ...props
132
+ }, ref) => {
133
+ const computedClassName = (0, _utils.cn)((0, _styles.formHelperVariants)(), className);
134
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormPrimitive.Helper, {
135
+ ref: ref,
136
+ className: computedClassName,
137
+ style: style,
138
+ ...props,
139
+ children: children
140
+ });
141
+ });
142
+ FormHelper.displayName = 'Form.Helper';
143
+
144
+ // =============================================================================
145
+ // FORM HELPER TEXT
146
+ // =============================================================================
147
+
148
+ const FormHelperText = /*#__PURE__*/(0, _react.forwardRef)(({
149
+ className,
150
+ children,
151
+ style,
152
+ ...props
153
+ }, ref) => {
154
+ const {
155
+ size
156
+ } = useFormStyleContext();
157
+ const computedClassName = (0, _utils.cn)((0, _styles.formHelperTextVariants)({
158
+ size
159
+ }), className);
160
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormPrimitive.HelperText, {
161
+ ref: ref,
162
+ className: computedClassName,
163
+ style: style,
164
+ ...props,
165
+ children: children
166
+ });
167
+ });
168
+ FormHelperText.displayName = 'Form.HelperText';
169
+
170
+ // =============================================================================
171
+ // FORM ERROR
172
+ // =============================================================================
173
+
174
+ const FormError = /*#__PURE__*/(0, _react.forwardRef)(({
175
+ className,
176
+ children,
177
+ style,
178
+ ...props
179
+ }, ref) => {
180
+ const computedClassName = (0, _utils.cn)((0, _styles.formErrorVariants)(), className);
181
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormPrimitive.Error, {
182
+ ref: ref,
183
+ className: computedClassName,
184
+ style: style,
185
+ ...props,
186
+ children: children
187
+ });
188
+ });
189
+ FormError.displayName = 'Form.Error';
190
+
191
+ // =============================================================================
192
+ // FORM ERROR TEXT
193
+ // =============================================================================
194
+
195
+ const FormErrorText = /*#__PURE__*/(0, _react.forwardRef)(({
196
+ className,
197
+ children,
198
+ style,
199
+ ...props
200
+ }, ref) => {
201
+ const {
202
+ size
203
+ } = useFormStyleContext();
204
+ const computedClassName = (0, _utils.cn)((0, _styles.formErrorTextVariants)({
205
+ size
206
+ }), className);
207
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormPrimitive.ErrorText, {
208
+ ref: ref,
209
+ className: computedClassName,
210
+ style: style,
211
+ ...props,
212
+ children: children
213
+ });
214
+ });
215
+ FormErrorText.displayName = 'Form.ErrorText';
216
+
217
+ // =============================================================================
218
+ // FORM ERROR ICON
219
+ // =============================================================================
220
+
221
+ const FormErrorIcon = ({
222
+ className,
223
+ style,
224
+ as,
225
+ ...props
226
+ }) => {
227
+ const {
228
+ size
229
+ } = useFormStyleContext();
230
+ const computedClassName = (0, _utils.cn)((0, _styles.formErrorIconVariants)({
231
+ size
232
+ }), className);
233
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
234
+ as: as,
235
+ className: computedClassName,
236
+ style: style,
237
+ ...props
238
+ });
239
+ };
240
+ FormErrorIcon.displayName = 'Form.ErrorIcon';
241
+
242
+ // =============================================================================
243
+ // COMPOUND EXPORT
244
+ // =============================================================================
245
+
246
+ const Form = exports.Form = Object.assign(FormRoot, {
247
+ Field: FormField,
248
+ Label: FormLabel,
249
+ Helper: FormHelper,
250
+ HelperText: FormHelperText,
251
+ Error: FormError,
252
+ ErrorText: FormErrorText,
253
+ ErrorIcon: FormErrorIcon
254
+ });
255
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_Icon","_FormRoot","_FormLabelRoot","_styles","_jsxRuntime","SCOPE","FieldRoot","withStyleContext","View","useFormStyleContext","useStyleContext","FormPrimitive","createForm","Root","BaseFormRoot","Field","Error","ErrorText","Text","ErrorIcon","Label","FormLabelRoot","Helper","HelperText","FormRoot","forwardRef","className","children","style","props","ref","computedClassName","cn","formRootVariants","jsx","displayName","FormField","size","formFieldVariants","context","FormLabel","htmlFor","labelClassName","formLabelVariants","requiredIndicator","FormHelper","formHelperVariants","FormHelperText","formHelperTextVariants","FormError","formErrorVariants","FormErrorText","formErrorTextVariants","FormErrorIcon","as","formErrorIconVariants","Icon","Form","exports","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Form/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AASkB,IAAAQ,WAAA,GAAAR,OAAA;AAElB;AACA;AACA;AAEA,MAAMS,KAAK,GAAG,MAAM;AAEpB,MAAMC,SAAS,GAAG,IAAAC,uBAAgB,EAACC,iBAAI,EA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BAAkB;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AAChF,CAAC;AAEDwB,aAAa,CAAClB,WAAW,GAAG,gBAAgB;;AAE5C;AACA;AACA;;AAYO,MAAMsB,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAGE,MAAM,CAACC,MAAM,CAACpC,QAAQ,EAAE;EAC1CT,KAAK,EAAEqB,SAAS;EAChBhB,KAAK,EAAEoB,SAAS;EAChBlB,MAAM,EAAEuB,UAAU;EAClBtB,UAAU,EAAEwB,cAAc;EAC1B/B,KAAK,EAAEiC,SAAS;EAChBhC,SAAS,EAAEkC,aAAa;EACxBhC,SAAS,EAAEkC;AACb,CAAC,CAA0B","ignoreList":[]}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formRootVariants = exports.formLabelVariants = exports.formHelperVariants = exports.formHelperTextVariants = exports.formFieldVariants = exports.formErrorVariants = exports.formErrorTextVariants = exports.formErrorIconVariants = void 0;
7
+ var _classVarianceAuthority = require("class-variance-authority");
8
+ var _primitives = require("../../styles/primitives");
9
+ const formRootVariants = exports.formRootVariants = (0, _classVarianceAuthority.cva)(['flex-col gap-4']);
10
+ const formFieldVariants = exports.formFieldVariants = (0, _classVarianceAuthority.cva)(['flex-col gap-1.5 mb-4', 'web:last:mb-0', _primitives.DISABLED_OPACITY]);
11
+ const formLabelVariants = exports.formLabelVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center', _primitives.DISABLED_OPACITY, 'web:cursor-pointer', 'font-medium data-[invalid=true]:text-red-600'], {
12
+ variants: {
13
+ size: {
14
+ default: 'text-sm',
15
+ small: 'text-xs'
16
+ }
17
+ },
18
+ defaultVariants: {
19
+ size: 'default'
20
+ }
21
+ });
22
+ const formHelperVariants = exports.formHelperVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center']);
23
+ const formHelperTextVariants = exports.formHelperTextVariants = (0, _classVarianceAuthority.cva)([_primitives.COLOR_TEXT_SECONDARY], {
24
+ variants: {
25
+ size: {
26
+ default: 'text-xs',
27
+ small: 'text-[11px]'
28
+ }
29
+ },
30
+ defaultVariants: {
31
+ size: 'default'
32
+ }
33
+ });
34
+ const formErrorVariants = exports.formErrorVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center gap-1']);
35
+ const formErrorTextVariants = exports.formErrorTextVariants = (0, _classVarianceAuthority.cva)([_primitives.COLOR_TEXT_INVALID, 'font-medium'], {
36
+ variants: {
37
+ size: {
38
+ default: 'text-xs',
39
+ small: 'text-[11px]'
40
+ }
41
+ },
42
+ defaultVariants: {
43
+ size: 'default'
44
+ }
45
+ });
46
+ const formErrorIconVariants = exports.formErrorIconVariants = (0, _classVarianceAuthority.cva)([_primitives.COLOR_TEXT_INVALID], {
47
+ variants: {
48
+ size: {
49
+ default: 'size-3.5',
50
+ small: 'size-3'
51
+ }
52
+ },
53
+ defaultVariants: {
54
+ size: 'default'
55
+ }
56
+ });
57
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_classVarianceAuthority","require","_primitives","formRootVariants","exports","cva","formFieldVariants","DISABLED_OPACITY","formLabelVariants","variants","size","default","small","defaultVariants","formHelperVariants","formHelperTextVariants","COLOR_TEXT_SECONDARY","formErrorVariants","formErrorTextVariants","COLOR_TEXT_INVALID","formErrorIconVariants"],"sourceRoot":"../../../../src","sources":["components/Form/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMO,MAAME,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,IAAAE,2BAAG,EAAC,CAAC,gBAAgB,CAAC,CAAC;AAEhD,MAAMC,iBAAiB,GAAAF,OAAA,CAAAE,iBAAA,GAAG,IAAAD,2BAAG,EAAC,CAAC,uBAAuB,EAAE,eAAe,EAAEE,4BAAgB,CAAC,CAAC;AAE3F,MAAM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C,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Heading = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _utils = require("@cdx-ui/utils");
10
+ var _styles = require("./styles");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ const sizeToLevel = {
13
+ xl: 1,
14
+ lg: 2,
15
+ md: 3,
16
+ sm: 4,
17
+ xs: 5
18
+ };
19
+ const Heading = exports.Heading = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0, _react.forwardRef)(function Heading({
20
+ className,
21
+ size = 'lg',
22
+ ...props
23
+ }, ref) {
24
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
25
+ role: "heading",
26
+ "aria-level": sizeToLevel[size ?? 'lg'],
27
+ className: (0, _utils.cn)((0, _styles.headingStyle)({
28
+ size
29
+ }), className),
30
+ ...props,
31
+ ref: ref
32
+ });
33
+ }));
34
+ Heading.displayName = 'Heading';
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","sizeToLevel","xl","lg","md","sm","xs","Heading","exports","memo","forwardRef","className","size","props","ref","jsx","Text","role","cn","headingStyle","displayName"],"sourceRoot":"../../../../src","sources":["components/Heading/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAkE,IAAAI,WAAA,GAAAJ,OAAA;AAElE,MAAMK,WAAW,GAAG;EAClBC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE;AACN,CAAU;AAOH,MAAMC,OAAO,GAAAC,OAAA,CAAAD,OAAA,gBAAG,IAAAE,WAAI,eACzB,IAAAC,iBAAU,EAA0C,SAASH,OAAOA,CAClE;EAAEI,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBACE,IAAAd,WAAA,CAAAe,GAAA,EAAClB,YAAA,CAAAmB,IAAI;IACHC,IAAI,EAAC,SAAS;IACd,cAAYhB,WAAW,CAACW,IAAI,IAAI,IAAI,CAAE;IACtCD,SAAS,EAAE,IAAAO,SAAE,EAAC,IAAAC,oBAAY,EAAC;MAAEP;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAC7CE,KAAK;IACTC,GAAG,EAAEA;EAAI,CACV,CAAC;AAEN,CAAC,CACH,CAAC;AAEDP,OAAO,CAACa,WAAW,GAAG,SAAS","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.headingStyle = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _classVarianceAuthority = require("class-variance-authority");
9
+ var _primitives = require("../../styles/primitives");
10
+ const headingStyle = exports.headingStyle = (0, _classVarianceAuthority.cva)([`${_primitives.COLOR_TEXT_PRIMARY} font-semibold tracking-tight my-0`, _reactNative.Platform.select({
11
+ web: 'font-sans bg-transparent display-inline no-underline',
12
+ default: ''
13
+ })], {
14
+ variants: {
15
+ size: {
16
+ xl: 'text-6xl',
17
+ lg: 'text-5xl',
18
+ md: 'text-4xl',
19
+ sm: 'text-3xl',
20
+ xs: 'text-2xl'
21
+ }
22
+ }
23
+ });
24
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","headingStyle","exports","cva","COLOR_TEXT_PRIMARY","Platform","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Heading/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEO,MAAMG,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,2BAAG,EAC7B,CACE,GAAGC,8BAAkB,oCAAoC,EACzDC,qBAAQ,CAACC,MAAM,CAAC;EACdC,GAAG,EAAE,sDAAsD;EAC3DC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE;IACN;EACF;AACF,CACF,CAAC","ignoreList":[]}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Icon = Icon;
7
+ var _uniwind = require("uniwind");
8
+ var _utils = require("@cdx-ui/utils");
9
+ var _primitives = require("../../styles/primitives");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function IconImpl({
12
+ as: IconComponent,
13
+ ...props
14
+ }) {
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
16
+ ...props
17
+ });
18
+ }
19
+ const StyledIcon = (0, _uniwind.withUniwind)(IconImpl, {
20
+ size: {
21
+ fromClassName: 'className',
22
+ styleProperty: 'width'
23
+ },
24
+ color: {
25
+ fromClassName: 'className',
26
+ styleProperty: 'color'
27
+ }
28
+ });
29
+
30
+ /**
31
+ * A wrapper component for CDX icons with Uniwind `className` support via `withUniwind`.
32
+ *
33
+ * This component allows you to render any CDX icon while applying utility classes
34
+ * using `uniwind`. It avoids the need to wrap or configure each icon individually.
35
+ *
36
+ * @component
37
+ * @example
38
+ * ```tsx
39
+ * import { Icon } from '@cdx-ui/components';
40
+ * import { ArrowRight } from '@cdx-ui/icons';
41
+ *
42
+ * <Icon as={ArrowRight} className="text-red-500 size-4" />
43
+ * ```
44
+ *
45
+ * @param {CdxIcon} as - The CDX icon component to render.
46
+ * @param {string} className - Utility classes to style the icon using Uniwind.
47
+ * @param {number} size - Icon size (overrides the size class).
48
+ * @param {...CdxIconProps} ...props - Additional icon props passed to the "as" icon.
49
+ */
50
+ function Icon({
51
+ as: IconComponent,
52
+ className,
53
+ ...props
54
+ }) {
55
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledIcon, {
56
+ as: IconComponent,
57
+ className: (0, _utils.cn)(_primitives.COLOR_TEXT_PRIMARY, 'size-5', className),
58
+ ...props
59
+ });
60
+ }
61
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_uniwind","require","_utils","_primitives","_jsxRuntime","IconImpl","as","IconComponent","props","jsx","StyledIcon","withUniwind","size","fromClassName","styleProperty","color","Icon","className","cn","COLOR_TEXT_PRIMARY"],"sourceRoot":"../../../../src","sources":["components/Icon/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAA6D,IAAAG,WAAA,GAAAH,OAAA;AAO7D,SAASI,QAAQA,CAAC;EAAEC,EAAE,EAAEC,aAAa;EAAE,GAAGC;AAAiB,CAAC,EAAE;EAC5D,oBAAO,IAAAJ,WAAA,CAAAK,GAAA,EAACF,aAAa;IAAA,GAAKC;EAAK,CAAG,CAAC;AACrC;AAEA,MAAME,UAAU,GAAG,IAAAC,oBAAW,EAACN,QAAQ,EAAE;EACvCO,IAAI,EAAE;IACJC,aAAa,EAAE,WAAW;IAC1BC,aAAa,EAAE;EACjB,CAAC;EACDC,KAAK,EAAE;IACLF,aAAa,EAAE,WAAW;IAC1BC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,IAAIA,CAAC;EAAEV,EAAE,EAAEC,aAAa;EAAEU,SAAS;EAAE,GAAGT;AAAiB,CAAC,EAAE;EAC1E,oBACE,IAAAJ,WAAA,CAAAK,GAAA,EAACC,UAAU;IACTJ,EAAE,EAAEC,aAAc;IAClBU,SAAS,EAAE,IAAAC,SAAE,EAACC,8BAAkB,EAAE,QAAQ,EAAEF,SAAS,CAAE;IAAA,GACnDT;EAAK,CACV,CAAC;AAEN","ignoreList":[]}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.IconButton = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _primitives = require("@cdx-ui/primitives");
10
+ var _utils = require("@cdx-ui/utils");
11
+ var _Icon = require("../Icon");
12
+ var _styles = require("./styles");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ const IconButtonPrimitive = (0, _primitives.createButton)({
15
+ Root: _reactNative.Pressable,
16
+ Text: _reactNative.Text,
17
+ Group: _reactNative.View,
18
+ Spinner: _reactNative.ActivityIndicator,
19
+ Icon: _reactNative.View
20
+ });
21
+ function IconButtonGlyph({
22
+ as: IconComponent,
23
+ className
24
+ }) {
25
+ const {
26
+ hover,
27
+ focus,
28
+ active,
29
+ disabled,
30
+ focusVisible
31
+ } = (0, _primitives.useButtonContext)();
32
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
33
+ as: IconComponent,
34
+ className: className,
35
+ ...(0, _primitives.dataAttributes)({
36
+ hover,
37
+ focus,
38
+ active,
39
+ disabled,
40
+ focusVisible
41
+ })
42
+ });
43
+ }
44
+ const IconButtonRoot = /*#__PURE__*/(0, _react.forwardRef)(({
45
+ variant = 'solid',
46
+ size = 'default',
47
+ mode = 'light',
48
+ className,
49
+ style,
50
+ as: IconComponent,
51
+ iconClassName,
52
+ accessibilityRole = 'button',
53
+ ...props
54
+ }, ref) => {
55
+ const rootClassName = (0, _utils.cn)((0, _styles.iconButtonRootVariants)({
56
+ variant,
57
+ size,
58
+ mode
59
+ }), className);
60
+ const glyphClassName = (0, _utils.cn)((0, _styles.iconButtonGlyphVariants)({
61
+ size
62
+ }), (0, _styles.iconButtonIconColorVariants)({
63
+ variant,
64
+ mode
65
+ }), iconClassName);
66
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButtonPrimitive, {
67
+ ref: ref,
68
+ accessibilityRole: accessibilityRole,
69
+ className: rootClassName,
70
+ style: style,
71
+ ...props,
72
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButtonGlyph, {
73
+ as: IconComponent,
74
+ className: glyphClassName
75
+ })
76
+ });
77
+ });
78
+ IconButtonRoot.displayName = 'IconButton';
79
+ const IconButton = exports.IconButton = IconButtonRoot;
80
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_Icon","_styles","_jsxRuntime","IconButtonPrimitive","createButton","Root","Pressable","Text","Group","View","Spinner","ActivityIndicator","Icon","IconButtonGlyph","as","IconComponent","className","hover","focus","active","disabled","focusVisible","useButtonContext","jsx","dataAttributes","IconButtonRoot","forwardRef","variant","size","mode","style","iconClassName","accessibilityRole","props","ref","rootClassName","cn","iconButtonRootVariants","glyphClassName","iconButtonGlyphVariants","iconButtonIconColorVariants","children","displayName","IconButton","exports"],"sourceRoot":"../../../../src","sources":["components/IconButton/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAKkB,IAAAM,WAAA,GAAAN,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AAA7B,WAAA,CAAAqB,GAAA,EAACpB,mBAAmB;IAClB+B,GAAG,EAAEA,GAAI;IACTF,iBAAiB,EAAEA,iBAAkB;IACrChB,SAAS,EAAEmB,aAAc;IACzBL,KAAK,EAAEA,KAAM;IAAA,GACTG,KAAK;IAAAQ,QAAA,eAET,IAAAvC,WAAA,CAAAqB,GAAA,EAACV,eAAe;MAACC,EAAE,EAAEC,aAAc;MAACC,SAAS,EAAEsB;IAAe,CAAE;EAAC,CAC9C,CAAC;AAE1B,CACF,CAAC;AAEDb,cAAc,CAACiB,WAAW,GAAG,YAAY;AAElC,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAGlB,cAAc","ignoreList":[]}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.iconButtonRootVariants = exports.iconButtonIconColorVariants = exports.iconButtonGlyphVariants = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _classVarianceAuthority = require("class-variance-authority");
9
+ var _primitives = require("../../styles/primitives");
10
+ var _buttonSharedVariants = require("../Button/buttonSharedVariants");
11
+ function actionOnlyCompounds(compounds) {
12
+ return compounds.filter(c => c.color === 'action').map(c => {
13
+ const {
14
+ color,
15
+ ...rest
16
+ } = c;
17
+ void color;
18
+ return rest;
19
+ });
20
+ }
21
+
22
+ /** Dark-mode hover/active surface for ghost (solid uses a separate compound with border). */
23
+ const iconButtonDarkGhostSurfaceCompounds = actionOnlyCompounds(_buttonSharedVariants.sharedGhostSurfaceCompounds).map(c => ({
24
+ variant: 'ghost',
25
+ ...c
26
+ }));
27
+ const iconButtonForegroundTextCompounds = actionOnlyCompounds(_buttonSharedVariants.sharedOutlineGhostForegroundTextCompounds).map(c => ({
28
+ variant: ['solid', 'ghost'],
29
+ ...c
30
+ }));
31
+ const iconButtonRootVariants = exports.iconButtonRootVariants = (0, _classVarianceAuthority.cva)(['flex items-center justify-center', _primitives.RADIUS_FULL, 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', _primitives.TRANSITION_COLORS, _primitives.DISABLED_OPACITY, _primitives.DISABLED_CURSOR, 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-slate-400/50 web:data-[focus-visible=true]:ring-offset-2'], {
32
+ variants: {
33
+ variant: {
34
+ /** Same surface as ghost, with a light gray border (aligned with Button `outline`). */
35
+ solid: ['bg-transparent', `border ${_primitives.COLOR_BORDER_DEFAULT}`, 'data-[hover=true]:bg-slate-50', 'data-[active=true]:bg-slate-100'],
36
+ ghost: ['bg-transparent', 'data-[hover=true]:bg-slate-50', 'data-[active=true]:bg-slate-100']
37
+ },
38
+ size: {
39
+ default: 'h-10 w-10 min-w-10 shrink-0 p-0',
40
+ small: 'h-8 w-8 min-w-8 shrink-0 p-0'
41
+ },
42
+ mode: {
43
+ light: [],
44
+ dark: []
45
+ }
46
+ },
47
+ compoundVariants: [...iconButtonDarkGhostSurfaceCompounds, {
48
+ variant: 'solid',
49
+ mode: 'dark',
50
+ className: ['border-slate-700', _reactNative.Platform.select({
51
+ default: 'data-[active=true]:bg-slate-700',
52
+ web: 'data-[hover=true]:bg-slate-800 data-[active=true]:data-[hover=true]:bg-slate-700'
53
+ })]
54
+ }],
55
+ defaultVariants: {
56
+ variant: 'solid',
57
+ size: 'default',
58
+ mode: 'light'
59
+ }
60
+ });
61
+ const iconButtonGlyphVariants = exports.iconButtonGlyphVariants = (0, _classVarianceAuthority.cva)([], {
62
+ variants: {
63
+ size: {
64
+ default: 'size-5',
65
+ small: 'size-4'
66
+ }
67
+ },
68
+ defaultVariants: {
69
+ size: 'default'
70
+ }
71
+ });
72
+
73
+ /** Icon fill aligned with Button outline/ghost action label colors (solid matches ghost). */
74
+ const iconButtonIconColorVariants = exports.iconButtonIconColorVariants = (0, _classVarianceAuthority.cva)([], {
75
+ variants: {
76
+ variant: {
77
+ solid: [],
78
+ ghost: []
79
+ },
80
+ mode: {
81
+ light: [],
82
+ dark: []
83
+ }
84
+ },
85
+ compoundVariants: [...iconButtonForegroundTextCompounds],
86
+ defaultVariants: {
87
+ variant: 'solid',
88
+ mode: 'light'
89
+ }
90
+ });
91
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","_buttonSharedVariants","actionOnlyCompounds","compounds","filter","c","color","map","rest","iconButtonDarkGhostSurfaceCompounds","sharedGhostSurfaceCompounds","variant","iconButtonForegroundTextCompounds","sharedOutlineGhostForegroundTextCompounds","iconButtonRootVariants","exports","cva","RADIUS_FULL","TRANSITION_COLORS","DISABLED_OPACITY","DISABLED_CURSOR","variants","solid","COLOR_BORDER_DEFAULT","ghost","size","default","small","mode","light","dark","compoundVariants","className","Platform","select","web","defaultVariants","iconButtonGlyphVariants","iconButtonIconColorVariants"],"sourceRoot":"../../../../src","sources":["components/IconButton/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAOA,IAAAG,qBAAA,GAAAH,OAAA;AAMA,SAASI,mBAAmBA,CAC1BC,SAAc,EACM;EACpB,OAAOA,SAAS,CACbC,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAACC,KAAK,KAAK,QAAQ,CAAC,CACnCC,GAAG,CAAEF,CAAC,IAAK;IACV,MAAM;MAAEC,KAAK;MAAE,GAAGE;IAAK,CAAC,GAAGH,CAAC;IAC5B,KAAKC,KAAK;IACV,OAAOE,IAAI;EACb,CAAC,CAAC;AACN;;AAEA;AACA,MAAMC,mCAAmC,GAAGP,mBAAmB,CAACQ,iDAA2B,CAAC,CAACH,GAAG,CAC7FF,CAAC,KAAM;EACNM,OAAO,EAAE,OAAgB;EACzB,GAAGN;AACL,CAAC,CACH,CAAC;AAED,MAAMO,iCAAiC,GAAGV,mBAAmB,CAC3DW,+DACF,CAAC,CAACN,GAAG,CAAEF,CAAC,KAAM;E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