@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,67 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Thin wrapper around React Native's `Image`.
5
+ *
6
+ * Design-system layout (sizes, radii, loading/error UI) is intentionally
7
+ * NOT baked in here — use purpose-built components like `Avatar` instead.
8
+ *
9
+ * What this wrapper adds over a raw RN `Image`:
10
+ * - Accepts a plain URI **string** as `source` (auto-normalized to `{ uri }`).
11
+ * - Extends the prop surface with **web-only** HTML attributes (`sizes`,
12
+ * `loading`, `decoding`, etc.) for better `react-native-web` support.
13
+ * Props already covered by RN 0.81+ (`alt`, `srcSet`, `crossOrigin`,
14
+ * `referrerPolicy`) are inherited from the native typings.
15
+ * - All other props and `ref` are forwarded to the underlying `Image`.
16
+ *
17
+ * Inspired by Expo's html-elements Image primitive:
18
+ * @see https://github.com/expo/expo/blob/main/packages/html-elements/src/primitives/Image.tsx
19
+ */
20
+
21
+ import { forwardRef } from 'react';
22
+ import { Image as RNImage } from 'react-native';
23
+
24
+ /** Coerces a plain URI string into the `{ uri }` shape RN expects. */
25
+ import { jsx as _jsx } from "react/jsx-runtime";
26
+ function normalizeSource(source) {
27
+ if (typeof source === 'string') {
28
+ return {
29
+ uri: source
30
+ };
31
+ }
32
+ return source;
33
+ }
34
+
35
+ // ---------------------------------------------------------------------------
36
+ // Web-oriented props not yet covered by react-native's Image typings.
37
+ // Props already present in RN 0.81+ (alt, srcSet, crossOrigin,
38
+ // referrerPolicy) are inherited from the native Image props.
39
+ // ---------------------------------------------------------------------------
40
+
41
+ /**
42
+ * HTML-ish attributes not in RN’s core typings. Forwarded to `Image` with `...props`;
43
+ * **react-native-web** maps supported ones to the DOM `<img>`. On iOS/Android they are
44
+ * typically ignored (no visual effect).
45
+ */
46
+
47
+ // ---------------------------------------------------------------------------
48
+ // ImageProps = native Image props (minus `source`) + WebImageProps + our overrides.
49
+ // `source` is re-declared to also accept a plain string.
50
+ // ---------------------------------------------------------------------------
51
+
52
+ // ---------------------------------------------------------------------------
53
+ // Component
54
+ // ---------------------------------------------------------------------------
55
+
56
+ export const Image = /*#__PURE__*/forwardRef(function Image({
57
+ source,
58
+ ...props
59
+ }, ref) {
60
+ return /*#__PURE__*/_jsx(RNImage, {
61
+ source: normalizeSource(source),
62
+ ...props,
63
+ ref: ref
64
+ });
65
+ });
66
+ Image.displayName = 'Image';
67
+ //# sourceMappingURL=Image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","Image","RNImage","jsx","_jsx","normalizeSource","source","uri","props","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Image/Image.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAA0D,OAAO;AACpF,SAASC,KAAK,IAAIC,OAAO,QAAkC,cAAc;;AAEzE;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,SAASC,eAAeA,CAACC,MAAoC,EAAuB;EAClF,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;IAC9B,OAAO;MAAEC,GAAG,EAAED;IAAO,CAAC;EACxB;EACA,OAAOA,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;;AASA;AACA;AACA;;AAEA,OAAO,MAAML,KAAK,gBAAGD,UAAU,CAA2C,SAASC,KAAKA,CACtF;EAAEK,MAAM;EAAE,GAAGE;AAAM,CAAC,EACpBC,GAAG,EACH;EACA,oBAAOL,IAAA,CAACF,OAAO;IAACI,MAAM,EAAED,eAAe,CAACC,MAAM,CAAE;IAAA,GAAKE,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AAC1E,CAAC,CAAC;AAEFR,KAAK,CAACS,WAAW,GAAG,OAAO","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { Image } from './Image';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Image"],"sourceRoot":"../../../../src","sources":["components/Image/index.ts"],"mappings":";;AAAA,SAASA,KAAK,QAA6C,SAAS","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { TextInput } from 'react-native';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ const androidDefaults = {
7
+ includeFontPadding: false,
8
+ textAlignVertical: 'center'
9
+ };
10
+ export const BaseInput = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/_jsx(TextInput, {
11
+ ref: ref,
12
+ ...props,
13
+ style: [androidDefaults, props.style]
14
+ }));
15
+ BaseInput.displayName = 'BaseInput';
16
+ //# sourceMappingURL=BaseInput.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","TextInput","jsx","_jsx","androidDefaults","includeFontPadding","textAlignVertical","BaseInput","props","ref","style","displayName"],"sourceRoot":"../../../../src","sources":["components/Input/BaseInput.android.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,SAAS,QAA6B,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE9D,MAAMC,eAAe,GAAG;EACtBC,kBAAkB,EAAE,KAAK;EACzBC,iBAAiB,EAAE;AACrB,CAAC;AAED,OAAO,MAAMC,SAAS,gBAAGP,UAAU,CAA4B,CAACQ,KAAK,EAAEC,GAAG,kBACxEN,IAAA,CAACF,SAAS;EAACQ,GAAG,EAAEA,GAAI;EAAA,GAAKD,KAAK;EAAEE,KAAK,EAAE,CAACN,eAAe,EAAEI,KAAK,CAACE,KAAK;AAAE,CAAE,CACzE,CAAC;AAEFH,SAAS,CAACI,WAAW,GAAG,WAAW","ignoreList":[]}
@@ -4,6 +4,7 @@ import { forwardRef } from 'react';
4
4
  import { View } from 'react-native';
5
5
  import { createInput } from '@cdx-ui/primitives';
6
6
  import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
7
+ import { Icon } from '../Icon';
7
8
  import { BaseInput } from './BaseInput';
8
9
  import { inputFieldPlaceholderVariants, inputFieldVariants, inputIconVariants, inputRootVariants, inputSlotVariants } from './styles';
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -12,7 +13,6 @@ const Root = withStyleContext(View, SCOPE);
12
13
  const useInputStyleContext = () => useStyleContext(SCOPE);
13
14
  const InputPrimitive = createInput({
14
15
  Root,
15
- Icon: View,
16
16
  Slot: View,
17
17
  Field: BaseInput
18
18
  });
@@ -23,7 +23,7 @@ const InputPrimitive = createInput({
23
23
 
24
24
  const InputRoot = /*#__PURE__*/forwardRef(({
25
25
  variant = 'outline',
26
- size = 'md',
26
+ size = 'default',
27
27
  className,
28
28
  children,
29
29
  style,
@@ -84,12 +84,7 @@ const InputSlot = /*#__PURE__*/forwardRef(({
84
84
  style,
85
85
  ...props
86
86
  }, ref) => {
87
- const {
88
- size
89
- } = useInputStyleContext();
90
- const computedClassName = cn(inputSlotVariants({
91
- size
92
- }), className);
87
+ const computedClassName = cn(inputSlotVariants(), className);
93
88
  return /*#__PURE__*/_jsx(InputPrimitive.Slot, {
94
89
  ref: ref,
95
90
  className: computedClassName,
@@ -104,26 +99,25 @@ InputSlot.displayName = 'Input.Slot';
104
99
  // INPUT ICON
105
100
  // =============================================================================
106
101
 
107
- const InputIcon = /*#__PURE__*/forwardRef(({
102
+ const InputIcon = ({
108
103
  className,
109
- children,
110
104
  style,
105
+ as,
111
106
  ...props
112
- }, ref) => {
107
+ }) => {
113
108
  const {
114
109
  size
115
110
  } = useInputStyleContext();
116
111
  const computedClassName = cn(inputIconVariants({
117
112
  size
118
113
  }), className);
119
- return /*#__PURE__*/_jsx(InputPrimitive.Icon, {
120
- ref: ref,
114
+ return /*#__PURE__*/_jsx(Icon, {
115
+ as: as,
121
116
  className: computedClassName,
122
117
  style: style,
123
- ...props,
124
- children: children
118
+ ...props
125
119
  });
126
- });
120
+ };
127
121
  InputIcon.displayName = 'Input.Icon';
128
122
 
129
123
  // =============================================================================
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","View","createInput","cn","useStyleContext","withStyleContext","BaseInput","inputFieldPlaceholderVariants","inputFieldVariants","inputIconVariants","inputRootVariants","inputSlotVariants","jsx","_jsx","SCOPE","Root","useInputStyleContext","InputPrimitive","Icon","Slot","Field","InputRoot","variant","size","className","children","style","props","ref","computedClassName","context","displayName","InputField","placeholderTextColorClassName","rest","computedPlaceholderColorClassName","InputSlot","InputIcon","Input","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Input/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;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B,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACjD,MAAM;IAAEL;EAAK,CAAC,GAAGP,oBAAoB,CAAC,CAAC;EAEvC,MAAMa,iBAAiB,GAAG1B,EAAE,CAACM,iBAAiB,CAAC;IAAEc;EAAK,CAAC,CAAC,EAAEC,SAAS,CAAC;EAEpE,oBACEX,IAAA,CAACI,cAAc,CAACC,IAAI;IAACU,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEK,iBAAkB;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EACjFA;EAAQ,CACU,CAAC;AAE1B,CACF,CAAC;AAEDY,SAAS,CAACN,WAAW,GAAG,YAAY;;AAEpC;AACA;AACA;;AAQA,OAAO,MAAMO,KAAK,GAAGC,MAAM,CAACC,MAAM,CAACnB,SAAS,EAAE;EAC5CD,KAAK,EAAEY,UAAU;EACjBb,IAAI,EAAEiB,SAAS;EACflB,IAAI,EAAEmB;AACR,CAAC,CAA2B","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","View","createInput","cn","useStyleContext","withStyleContext","Icon","BaseInput","inputFieldPlaceholderVariants","inputFieldVariants","inputIconVariants","inputRootVariants","inputSlotVariants","jsx","_jsx","SCOPE","Root","useInputStyleContext","InputPrimitive","Slot","Field","InputRoot","variant","size","className","children","style","props","ref","computedClassName","context","displayName","InputField","placeholderTextColorClassName","rest","computedPlaceholderColorClassName","InputSlot","InputIcon","as","Input","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Input/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SACEC,WAAW,QAIN,oBAAoB;AAC3B,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,SAASC,IAAI,QAAmB,SAAS;AACzC,SAASC,SAAS,QAAQ,aAAa;AACvC,SA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AACd,SAAS,EAAEK,iBAAkB;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AAChF,CAAC;AAEDU,SAAS,CAACN,WAAW,GAAG,YAAY;;AAEpC;AACA;AACA;;AAQA,OAAO,MAAMQ,KAAK,GAAGC,MAAM,CAACC,MAAM,CAACpB,SAAS,EAAE;EAC5CD,KAAK,EAAEY,UAAU;EACjBb,IAAI,EAAEiB,SAAS;EACf9B,IAAI,EAAE+B;AACR,CAAC,CAA2B","ignoreList":[]}
@@ -1,58 +1,44 @@
1
1
  "use strict";
2
2
 
3
3
  import { cva } from 'class-variance-authority';
4
- export const inputRootVariants = cva(['w-full flex-row items-center', 'border border-neutral-border-strong bg-neutral-surface shadow-sm', 'data-[disabled=true]:opacity-60 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:bg-interactive-disabled-background data-[disabled=true]:border-interactive-disabled', 'data-[focus=true]:border-interactive-focus', 'data-[invalid=true]:border-red-500'], {
4
+ import { COLOR_BG_PRIMARY, COLOR_BORDER_DEFAULT, COLOR_TEXT_MUTED, COLOR_TEXT_PRIMARY, DISABLED_CURSOR, DISABLED_OPACITY, RADIUS_SM, SHADOW_SM, SIZE_SCALE, TRANSITION_COLORS } from '../../styles/primitives';
5
+ export const inputRootVariants = cva(['w-full flex-row items-stretch border', COLOR_BG_PRIMARY, COLOR_BORDER_DEFAULT, RADIUS_SM, SHADOW_SM, TRANSITION_COLORS, DISABLED_OPACITY, DISABLED_CURSOR, 'data-[disabled=true]:bg-slate-50 data-[disabled=true]:border-slate-300', 'data-[readonly=true]:cursor-default', 'data-[readonly=true]:bg-slate-50', 'web:data-[hover=true]:data-[active=false]:border-slate-300', 'data-[focus=true]:border-slate-900', 'data-[invalid=true]:border-red-500'], {
5
6
  variants: {
6
7
  variant: {
7
- outline: ['rounded-md px-3', 'web:focus-within:border-interactive-focus web:focus-within:ring-3 web:focus-within:ring-blue-300/50', 'web:data-[invalid=true]:focus-within:border-red-500 web:data-[invalid=true]:focus-within:ring-red-300/50'],
8
- underlined: 'rounded-none border-t-0 border-l-0 border-r-0 border-b-neutral-border data-[focus=true]:border-b-interactive-focus shadow-none'
8
+ outline: ['web:focus-within:border-slate-900 web:focus-within:ring-2 web:focus-within:ring-slate-400/50 web:focus-within:ring-offset-0', 'web:data-[invalid=true]:focus-within:border-red-500 web:data-[invalid=true]:focus-within:ring-2 web:data-[invalid=true]:focus-within:ring-red-400/50']
9
9
  },
10
10
  size: {
11
- sm: 'h-9 py-1',
12
- md: 'h-11 py-1.5',
13
- lg: 'h-12 py-2'
11
+ default: `${SIZE_SCALE.default.height} ${SIZE_SCALE.default.px} py-2 ${SIZE_SCALE.default.gap}`,
12
+ small: `${SIZE_SCALE.small.height} ${SIZE_SCALE.small.px} py-1.5 ${SIZE_SCALE.small.gap}`
14
13
  }
15
14
  },
16
15
  defaultVariants: {
17
16
  variant: 'outline',
18
- size: 'md'
17
+ size: 'default'
19
18
  }
20
19
  });
21
- export const inputFieldVariants = cva(['flex-1 bg-transparent text-neutral-text-primary', 'placeholder:text-neutral-placeholder', 'web:outline-none'], {
20
+ export const inputFieldVariants = cva(['flex-1 justify-center bg-transparent p-0', COLOR_TEXT_PRIMARY, 'placeholder:text-slate-400', 'web:outline-none'], {
22
21
  variants: {
23
22
  size: {
24
- sm: 'text-sm leading-none',
25
- md: 'text-base leading-none',
26
- lg: 'text-lg leading-none'
23
+ default: 'text-[1rem]',
24
+ small: 'text-[0.875rem]'
27
25
  }
28
26
  },
29
27
  defaultVariants: {
30
- size: 'sm'
28
+ size: 'default'
31
29
  }
32
30
  });
33
- export const inputSlotVariants = cva(['items-center justify-center'], {
31
+ export const inputSlotVariants = cva(['items-center justify-center self-center']);
32
+ export const inputIconVariants = cva([COLOR_TEXT_MUTED], {
34
33
  variants: {
35
34
  size: {
36
- sm: 'h-4 w-4',
37
- md: 'h-5 w-5',
38
- lg: 'h-6 w-6'
35
+ default: 'size-5',
36
+ small: 'size-4'
39
37
  }
40
38
  },
41
39
  defaultVariants: {
42
- size: 'sm'
40
+ size: 'default'
43
41
  }
44
42
  });
45
- export const inputIconVariants = cva(['text-neutral-text-tertiary'], {
46
- variants: {
47
- size: {
48
- sm: 'h-4 w-4',
49
- md: 'h-5 w-5',
50
- lg: 'h-5 w-5'
51
- }
52
- },
53
- defaultVariants: {
54
- size: 'sm'
55
- }
56
- });
57
- export const inputFieldPlaceholderVariants = cva(['accent-neutral-placeholder']);
43
+ export const inputFieldPlaceholderVariants = cva(['accent-slate-400']);
58
44
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["cva","inputRootVariants","variants","variant","outline","underlined","size","sm","md","lg","defaultVariants","inputFieldVariants","inputSlotVariants","inputIconVariants","inputFieldPlaceholderVariants"],"sourceRoot":"../../../../src","sources":["components/Input/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,iBAAiB,GAAGD,GAAG,CAClC,CACE,8BAA8B,EAC9B,kEAAkE,EAClE,kLAAkL,EAClL,4CAA4C,EAC5C,oCAAoC,CACrC,EACD;EACEE,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,OAAO,EAAE,CACP,iBAAiB,EACjB,qGAAqG,EACrG,0GAA0G,CAC3G;MACDC,UAAU,EACR;IACJ,CAAC;IACDC,IAAI,EAAE;MACJC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,aAAa;MACjBC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfP,OAAO,EAAE,SAAS;IAClBG,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMK,kBAAkB,GAAGX,GAAG,CACnC,CACE,iDAAiD,EACjD,sCAAsC,EACtC,kBAAkB,CACnB,EACD;EACEE,QAAQ,EAAE;IACRI,IAAI,EAAE;MACJC,EAAE,EAAE,sBAAsB;MAC1BC,EAAE,EAAE,wBAAwB;MAC5BC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfJ,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMM,iBAAiB,GAAGZ,GAAG,CAAC,CAAC,6BAA6B,CAAC,EAAE;EACpEE,QAAQ,EAAE;IACRI,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfJ,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMO,iBAAiB,GAAGb,GAAG,CAAC,CAAC,4BAA4B,CAAC,EAAE;EACnEE,QAAQ,EAAE;IACRI,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfJ,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMQ,6BAA6B,GAAGd,GAAG,CAAC,CAAC,4BAA4B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["cva","COLOR_BG_PRIMARY","COLOR_BORDER_DEFAULT","COLOR_TEXT_MUTED","COLOR_TEXT_PRIMARY","DISABLED_CURSOR","DISABLED_OPACITY","RADIUS_SM","SHADOW_SM","SIZE_SCALE","TRANSITION_COLORS","inputRootVariants","variants","variant","outline","size","default","height","px","gap","small","defaultVariants","inputFieldVariants","inputSlotVariants","inputIconVariants","inputFieldPlaceholderVariants"],"sourceRoot":"../../../../src","sources":["components/Input/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AACjE,SACEC,gBAAgB,EAChBC,oBAAoB,EACpBC,gBAAgB,EAChBC,kBAAkB,EAClBC,eAAe,EACfC,gBAAgB,EAChBC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,iBAAiB,QACZ,yBAAyB;AAEhC,OAAO,MAAMC,iBAAiB,GAAGX,GAAG,CAClC,CACE,sCAAsC,EACtCC,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EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMU,6BAA6B,GAAGzB,GAAG,CAAC,CAAC,kBAAkB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { Pressable, Text as RNText } from 'react-native';
5
+ import { createLink } from '@cdx-ui/primitives';
6
+ import { cn } from '@cdx-ui/utils';
7
+ import { Icon } from '../Icon';
8
+ import { linkRootVariants, linkLabelVariants, linkIconVariants } from './styles';
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ export { LinkProvider } from '@cdx-ui/primitives';
11
+ const LinkPrimitive = createLink({
12
+ Root: Pressable
13
+ });
14
+
15
+ // =============================================================================
16
+ // STYLED ROOT COMPONENT
17
+ // =============================================================================
18
+
19
+ const LinkRoot = /*#__PURE__*/forwardRef(({
20
+ className,
21
+ children,
22
+ style,
23
+ ...props
24
+ }, ref) => {
25
+ const rootClassName = cn(linkRootVariants(), className);
26
+ return /*#__PURE__*/_jsx(LinkPrimitive, {
27
+ ref: ref,
28
+ className: rootClassName,
29
+ style: style,
30
+ ...props,
31
+ children: children
32
+ });
33
+ });
34
+ LinkRoot.displayName = 'Link';
35
+
36
+ // =============================================================================
37
+ // STYLED LABEL COMPONENT
38
+ // =============================================================================
39
+
40
+ const LinkLabel = /*#__PURE__*/forwardRef(({
41
+ className,
42
+ children,
43
+ style,
44
+ ...props
45
+ }, ref) => {
46
+ const computedClassName = cn(linkLabelVariants(), className);
47
+ return /*#__PURE__*/_jsx(RNText, {
48
+ ref: ref,
49
+ className: computedClassName,
50
+ style: style,
51
+ ...props,
52
+ children: children
53
+ });
54
+ });
55
+ LinkLabel.displayName = 'Link.Label';
56
+
57
+ // =============================================================================
58
+ // STYLED ICON COMPONENT
59
+ // =============================================================================
60
+
61
+ const LinkIcon = ({
62
+ className,
63
+ style,
64
+ as,
65
+ ...props
66
+ }) => {
67
+ const computedClassName = cn(linkIconVariants(), className);
68
+ return /*#__PURE__*/_jsx(Icon, {
69
+ as: as,
70
+ className: computedClassName,
71
+ style: style,
72
+ ...props
73
+ });
74
+ };
75
+ LinkIcon.displayName = 'Link.Icon';
76
+
77
+ // =============================================================================
78
+ // COMPOUND COMPONENT EXPORT
79
+ // =============================================================================
80
+
81
+ export const Link = Object.assign(LinkRoot, {
82
+ Label: LinkLabel,
83
+ Icon: LinkIcon
84
+ });
85
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","Pressable","Text","RNText","createLink","cn","Icon","linkRootVariants","linkLabelVariants","linkIconVariants","jsx","_jsx","LinkProvider","LinkPrimitive","Root","LinkRoot","className","children","style","props","ref","rootClassName","displayName","LinkLabel","computedClassName","LinkIcon","as","Link","Object","assign","Label"],"sourceRoot":"../../../../src","sources":["components/Link/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,IAAIC,MAAM,QAAmC,cAAc;AACnF,SAASC,UAAU,QAAyB,oBAAoB;AAChE,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,IAAI,QAAwB,SAAS;AAC9C,SAASC,gBAAgB,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjF,SAASC,YAAY,QAA0C,oBAAoB;AAEnF,MAAMC,aAAa,GAAGT,UAAU,CAAC;EAC/BU,IAAI,EAAEb;AACR,CAAC,CAAC;;AAEF;AACA;AACA;;AAMA,MAAMc,QAAQ,gBAAGf,UAAU,CAAkB,CAAC;EAAEgB,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC9F,MAAMC,aAAa,GAAGhB,EAAE,CAACE,gBAAgB,CAAC,CAAC,EAAES,SAAS,CAAC;EAEvD,oBACEL,IAAA,CAACE,aAAa;IAACO,GAAG,EAAEA,GAAI;IAACJ,SAAS,EA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platform } from 'react-native';
4
+ import { cva } from 'class-variance-authority';
5
+ import { TRANSITION_COLORS } from '../../styles/primitives';
6
+ export const linkRootVariants = cva(['flex-row items-center gap-1', 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', 'text-blue-600', 'underline decoration-slate-300 underline-offset-4', TRANSITION_COLORS, Platform.select({
7
+ web: 'data-[hover=true]:decoration-slate-900',
8
+ default: ''
9
+ }), 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-slate-400/50 web:data-[focus-visible=true]:ring-offset-2']);
10
+ export const linkLabelVariants = cva(['text-sm font-medium', 'text-blue-600']);
11
+ export const linkIconVariants = cva(['size-4', 'text-blue-600']);
12
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","cva","TRANSITION_COLORS","linkRootVariants","select","web","default","linkLabelVariants","linkIconVariants"],"sourceRoot":"../../../../src","sources":["components/Link/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAAQ,0BAA0B;AAC9C,SAASC,iBAAiB,QAAQ,yBAAyB;AAE3D,OAAO,MAAMC,gBAAgB,GAAGF,GAAG,CAAC,CAClC,6BAA6B,EAC7B,wEAAwE,EACxE,eAAe,EACf,mDAAmD,EACnDC,iBAAiB,EACjBF,QAAQ,CAACI,MAAM,CAAC;EACdC,GAAG,EAAE,wCAAwC;EAC7CC,OAAO,EAAE;AACX,CAAC,CAAC,EACF,kIAAkI,CACnI,CAAC;AAEF,OAAO,MAAMC,iBAAiB,GAAGN,GAAG,CAAC,CAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;AAE9E,OAAO,MAAMO,gBAAgB,GAAGP,GAAG,CAAC,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ import { forwardRef, useMemo } from 'react';
4
+ import { View } from 'react-native';
5
+ import { cn } from '@cdx-ui/utils';
6
+ import { progressSegmentedVariants, segmentVariants } from './styles';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ export const ProgressSegmented = /*#__PURE__*/forwardRef(({
9
+ step,
10
+ total = 5,
11
+ isStepComplete = false,
12
+ getAccessibilityText,
13
+ className,
14
+ accessibilityLabel = 'Progress',
15
+ ...props
16
+ }, ref) => {
17
+ const clampedStep = Math.max(0, Math.min(step, total));
18
+ const segments = useMemo(() => {
19
+ return Array.from({
20
+ length: total
21
+ }, (_, index) => {
22
+ const segmentIndex = index + 1;
23
+ let state = 'incomplete';
24
+ if (segmentIndex < clampedStep || isStepComplete && segmentIndex === clampedStep) {
25
+ state = 'complete';
26
+ } else if (segmentIndex === clampedStep) {
27
+ state = 'inprogress';
28
+ }
29
+ return state;
30
+ });
31
+ }, [total, clampedStep, isStepComplete]);
32
+ let accessibilityText = `Step ${String(clampedStep)} of ${String(total)}`;
33
+ if (getAccessibilityText) {
34
+ accessibilityText = getAccessibilityText(clampedStep, total, isStepComplete);
35
+ } else if (isStepComplete) {
36
+ accessibilityText = `Step ${String(clampedStep)} of ${String(total)}, completed`;
37
+ }
38
+ return /*#__PURE__*/_jsx(View, {
39
+ ref: ref,
40
+ accessibilityRole: "progressbar",
41
+ accessibilityLabel: accessibilityLabel,
42
+ accessibilityValue: {
43
+ min: 0,
44
+ max: total,
45
+ now: clampedStep,
46
+ text: accessibilityText
47
+ },
48
+ className: cn(progressSegmentedVariants(), className),
49
+ ...props,
50
+ children: segments.map((state, index) => /*#__PURE__*/_jsx(View, {
51
+ className: cn(segmentVariants({
52
+ state
53
+ }))
54
+ }, index))
55
+ });
56
+ });
57
+ ProgressSegmented.displayName = 'ProgressSegmented';
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","useMemo","View","cn","progressSegmentedVariants","segmentVariants","jsx","_jsx","ProgressSegmented","step","total","isStepComplete","getAccessibilityText","className","accessibilityLabel","props","ref","clampedStep","Math","max","min","segments","Array","from","length","_","index","segmentIndex","state","accessibilityText","String","accessibilityRole","accessibilityValue","now","text","children","map","displayName"],"sourceRoot":"../../../../src","sources":["components/ProgressSegmented/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC3C,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,EAAE,QAAQ,eAAe;AAClC,SACEC,yBAAyB,EACzBC,eAAe,QAEV,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAclB,OAAO,MAAMC,iBAAiB,gBAAGR,UAAU,CACzC,CACE;EACES,IAAI;EACJC,KAAK,GAAG,CAAC;EACTC,cAAc,GAAG,KAAK;EACtBC,oBAAoB;EACpBC,SAAS;EACTC,kBAAkB,GAAG,UAAU;EAC/B,GAAGC;AACL,CAAC,EACDC,GAAG,KACA;EACH,MAAMC,WAAW,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,GAAG,CAACX,IAAI,EAAEC,KAAK,CAAC,CAAC;EAEtD,MAAMW,QAAQ,GAAGpB,OAAO,CAAC,MAAM;IAC7B,OAAOqB,KAAK,CAACC,IAAI,CAAC;MAAEC,MAAM,EAAEd;IAAM,CAAC,EAAE,CAACe,CAAC,EAAEC,KAAK,KAAK;MACjD,MAAMC,YAAY,GAAGD,KAAK,GAAG,CAAC;MAC9B,IAAIE,KAA+C,GAAG,YAAY;MAElE,IAAID,YAAY,GAAGV,WAAW,IAAKN,cAAc,IAAIgB,YAAY,KAAKV,WAAY,EAAE;QAClFW,KAAK,GAAG,UAAU;MACpB,CAAC,MAAM,IAAID,YAAY,KAAKV,WAAW,EAAE;QACvCW,KAAK,GAAG,YAAY;MACtB;MAEA,OAAOA,KAAK;IACd,CAAC,CAAC;EACJ,CAAC,EAAE,CAAClB,KAAK,EAAEO,WAAW,EAAEN,cAAc,CAAC,CAAC;EAExC,IAAIkB,iBAAiB,GAAG,QAAQC,MAAM,CAACb,WAAW,CAAC,OAAOa,MAAM,CAACpB,KAAK,CAAC,EAAE;EACzE,IAAIE,oBAAoB,EAAE;IACxBiB,iBAAiB,GAAGjB,oBAAoB,CAACK,WAAW,EAAEP,KAAK,EAAEC,cAAc,CAAC;EAC9E,CAAC,MAAM,IAAIA,cAAc,EAAE;IACzBkB,iBAAiB,GAAG,QAAQC,MAAM,CAACb,WAAW,CAAC,OAAOa,MAAM,CAACpB,KAAK,CAAC,aAAa;EAClF;EAEA,oBACEH,IAAA,CAACL,IAAI;IACHc,GAAG,EAAEA,GAAI;IACTe,iBAAiB,EAAC,aAAa;IAC/BjB,kBAAkB,EAAEA,kBAAmB;IACvCkB,kBAAkB,EAAE;MAClBZ,GAAG,EAAE,CAAC;MACND,GAAG,EAAET,KAAK;MACVuB,GAAG,EAAEhB,WAAW;MAChBiB,IAAI,EAAEL;IACR,CAAE;IACFhB,SAAS,EAAEV,EAAE,CAACC,yBAAyB,CAAC,CAAC,EAAES,SAAS,CAAE;IAAA,GAClDE,KAAK;IAAAoB,QAAA,EAERd,QAAQ,CAACe,GAAG,CAAC,CAACR,KAAK,EAAEF,KAAK,kBACzBnB,IAAA,CAACL,IAAI;MAAaW,SAAS,EAAEV,EAAE,CAACE,eAAe,CAAC;QAAEuB;MAAM,CAAC,CAAC;IAAE,GAAjDF,KAAmD,CAC/D;EAAC,CACE,CAAC;AAEX,CACF,CAAC;AAEDlB,iBAAiB,CAAC6B,WAAW,GAAG,mBAAmB","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ import { cva } from 'class-variance-authority';
4
+ export const progressSegmentedVariants = cva(['flex-row gap-1 w-full']);
5
+ export const segmentVariants = cva(['flex-1 h-2 rounded'], {
6
+ variants: {
7
+ state: {
8
+ complete: 'bg-slate-900',
9
+ incomplete: 'bg-slate-300',
10
+ inprogress: 'bg-gradient-to-r from-slate-900 from-50% to-slate-300 to-50%'
11
+ }
12
+ },
13
+ defaultVariants: {
14
+ state: 'incomplete'
15
+ }
16
+ });
17
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["cva","progressSegmentedVariants","segmentVariants","variants","state","complete","incomplete","inprogress","defaultVariants"],"sourceRoot":"../../../../src","sources":["components/ProgressSegmented/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,yBAAyB,GAAGD,GAAG,CAAC,CAAC,uBAAuB,CAAC,CAAC;AAEvE,OAAO,MAAME,eAAe,GAAGF,GAAG,CAAC,CAAC,oBAAoB,CAAC,EAAE;EACzDG,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,QAAQ,EAAE,cAAc;MACxBC,UAAU,EAAE,cAAc;MAC1BC,UAAU,EAAE;IACd;EACF,CAAC;EACDC,eAAe,EAAE;IACfJ,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ import { Pressable } from 'react-native';
4
+
5
+ /** Native: `Pressable`. Web: `SelectTriggerHost.web` uses `<button>` so `<label htmlFor>` works. */
6
+ export const SelectTriggerHost = Pressable;
7
+ //# sourceMappingURL=SelectTriggerHost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Pressable","SelectTriggerHost"],"sourceRoot":"../../../../src","sources":["components/Select/SelectTriggerHost.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,cAAc;;AAExC;AACA,OAAO,MAAMC,iBAAiB,GAAGD,SAAS","ignoreList":[]}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+
3
+ import React, { forwardRef } from 'react';
4
+ import { StyleSheet } from 'react-native';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ /** Props that must not be forwarded to a DOM `<button>`. */
7
+ const OMIT = new Set(['hitSlop', 'pressRetentionOffset', 'android_ripple', 'android_disableSound', 'unstable_pressDelay', 'onLongPress', 'delayLongPress', 'onPress', 'onPressIn', 'onPressOut', 'onHoverIn', 'onHoverOut', 'disabled', 'style', 'className', 'testID', 'children', 'accessible', 'accessibilityActions', 'accessibilityElementsHidden', 'accessibilityHint', 'accessibilityIgnoresInvertColors', 'accessibilityLabel', 'accessibilityLabelledBy', 'accessibilityLiveRegion', 'accessibilityRole', 'accessibilityState', 'accessibilityValue', 'accessibilityViewIsModal', 'importantForAccessibility', 'needsOffscreenAlphaCompositing', 'collapsable', 'shouldRasterizeIOS', 'removeClippedSubviews', 'onAccessibilityAction', 'onAccessibilityEscape', 'onAccessibilityTap']);
8
+ function resolveChildren(children) {
9
+ if (typeof children === 'function') {
10
+ return children({
11
+ pressed: false
12
+ });
13
+ }
14
+ return children;
15
+ }
16
+ function filterDomProps(rest) {
17
+ const entries = Object.entries(rest).filter(([key]) => !OMIT.has(key));
18
+ return Object.fromEntries(entries);
19
+ }
20
+
21
+ /** UA `<button>` defaults (centered text, inline sizing) fight our flex + `justify-between` layout. */
22
+ const webButtonLayoutStyle = {
23
+ display: 'flex',
24
+ flexDirection: 'row',
25
+ alignItems: 'center',
26
+ justifyContent: 'space-between',
27
+ width: '100%',
28
+ minWidth: 0,
29
+ textAlign: 'start',
30
+ boxSizing: 'border-box',
31
+ margin: 0,
32
+ font: 'inherit',
33
+ lineHeight: 'normal',
34
+ WebkitAppearance: 'none',
35
+ appearance: 'none'
36
+ };
37
+
38
+ /**
39
+ * Native `<button type="button">` so the trigger is HTML-labelable (`<label htmlFor>` focuses it).
40
+ * `Pressable` on web is a non-labelable div; no extra refs are needed for label association.
41
+ */
42
+ export const SelectTriggerHost = /*#__PURE__*/forwardRef(function SelectTriggerHost(props, ref) {
43
+ const {
44
+ children,
45
+ onPress,
46
+ onPressIn,
47
+ onPressOut,
48
+ onHoverIn,
49
+ onHoverOut,
50
+ disabled,
51
+ style,
52
+ className,
53
+ testID,
54
+ ...rest
55
+ } = props;
56
+ const domProps = filterDomProps(rest);
57
+ const flattened = StyleSheet.flatten(style);
58
+ return /*#__PURE__*/_jsx("button", {
59
+ ref: ref,
60
+ ...domProps,
61
+ type: "button",
62
+ disabled: !!disabled,
63
+ className: typeof className === 'string' ? className : undefined,
64
+ style: {
65
+ ...webButtonLayoutStyle,
66
+ ...(flattened ?? {})
67
+ },
68
+ "data-testid": testID,
69
+ onClick: e => {
70
+ if (!disabled) {
71
+ onPress?.(e);
72
+ }
73
+ },
74
+ onPointerDown: e => {
75
+ onPressIn?.(e);
76
+ },
77
+ onPointerUp: e => {
78
+ onPressOut?.(e);
79
+ },
80
+ onPointerCancel: e => {
81
+ onPressOut?.(e);
82
+ },
83
+ onMouseEnter: e => {
84
+ onHoverIn?.(e);
85
+ },
86
+ onMouseLeave: e => {
87
+ onHoverOut?.(e);
88
+ },
89
+ children: resolveChildren(children)
90
+ });
91
+ });
92
+ SelectTriggerHost.displayName = 'SelectTriggerHost';
93
+ //# sourceMappingURL=SelectTriggerHost.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","forwardRef","StyleSheet","jsx","_jsx","OMIT","Set","resolveChildren","children","pressed","filterDomProps","rest","entries","Object","filter","key","has","fromEntries","webButtonLayoutStyle","display","flexDirection","alignItems","justifyContent","width","minWidth","textAlign","boxSizing","margin","font","lineHeight","WebkitAppearance","appearance","SelectTriggerHost","props","ref","onPress","onPressIn","onPressOut","onHoverIn","onHoverOut","disabled","style","className","testID","domProps","flattened","flatten","type","undefined","onClick","e","onPointerDown","onPointerUp","onPointerCancel","onMouseEnter","onMouseLeave","displayName"],"sourceRoot":"../../../../src","sources":["components/Select/SelectTriggerHost.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAK1C;AACA,MAAMC,IAAI,GAAG,IAAIC,GAAG,CAAS,CAC3B,SAAS,EACT,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,YAAY,EACZ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