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

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,316 @@
1
+ import React, { forwardRef, useCallback, useRef, type ReactNode } from 'react';
2
+ import { Dimensions, Pressable, View, ViewStyle } from 'react-native';
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
+ import {
5
+ BottomSheetModal,
6
+ BottomSheetModalProvider,
7
+ BottomSheetScrollView,
8
+ BottomSheetView,
9
+ BottomSheetBackdrop,
10
+ BottomSheetFooter as GorhomBottomSheetFooter,
11
+ type BottomSheetBackdropProps,
12
+ type BottomSheetFooterProps as GorhomBottomSheetFooterProps,
13
+ } from '@gorhom/bottom-sheet';
14
+ import { cn } from '@cdx-ui/utils';
15
+ import { ArrowBackIosNew, Close } from '@cdx-ui/icons';
16
+ import { Heading } from '../Heading';
17
+ import { Icon } from '../Icon';
18
+ import { Text } from '../Text';
19
+ import {
20
+ bottomSheetBackButtonVariants,
21
+ bottomSheetBackIconVariants,
22
+ bottomSheetCloseButtonVariants,
23
+ bottomSheetCloseIconVariants,
24
+ bottomSheetContainerVariants,
25
+ bottomSheetContentVariants,
26
+ bottomSheetFooterVariants,
27
+ bottomSheetHeaderVariants,
28
+ bottomSheetSubtitleVariants,
29
+ handleIndicatorStyle,
30
+ } from './styles';
31
+
32
+ /** Ref type for BottomSheet; forwards the @gorhom modal ref (present, dismiss, snapToIndex, minimize, restore, etc.). */
33
+ export type BottomSheetModalRef = React.ComponentRef<typeof BottomSheetModal>;
34
+
35
+ export interface BottomSheetHeaderProps {
36
+ title?: string;
37
+ subtitle?: string;
38
+ children?: ReactNode;
39
+ className?: string;
40
+ onClose?: () => void;
41
+ closeAccessibilityLabel?: string;
42
+ onBack?: () => void;
43
+ backAccessibilityLabel?: string;
44
+ }
45
+
46
+ function BottomSheetHeaderComponent(
47
+ {
48
+ title,
49
+ subtitle,
50
+ children,
51
+ className,
52
+ onClose,
53
+ closeAccessibilityLabel,
54
+ onBack,
55
+ backAccessibilityLabel = 'Go back',
56
+ }: BottomSheetHeaderProps,
57
+ ref: React.Ref<View>,
58
+ ) {
59
+ const hasTitle = title !== undefined && title !== '';
60
+ const hasContent = hasTitle || !!children || !!onBack;
61
+ const computedClassName = cn(bottomSheetHeaderVariants({ hasTitle: hasContent }), className);
62
+ return (
63
+ <View ref={ref} className={computedClassName}>
64
+ {onBack && (
65
+ <Pressable
66
+ onPress={onBack}
67
+ hitSlop={12}
68
+ accessibilityRole="button"
69
+ accessibilityLabel={backAccessibilityLabel}
70
+ className={cn(bottomSheetBackButtonVariants())}
71
+ >
72
+ <Icon as={ArrowBackIosNew} className={bottomSheetBackIconVariants()} />
73
+ </Pressable>
74
+ )}
75
+ <View className="flex-1">
76
+ {children ??
77
+ (hasTitle ? (
78
+ <View>
79
+ <Heading size="xs" className="text-lg">
80
+ {title}
81
+ </Heading>
82
+ {subtitle ? <Text className={bottomSheetSubtitleVariants()}>{subtitle}</Text> : null}
83
+ </View>
84
+ ) : null)}
85
+ </View>
86
+ {onClose && (
87
+ <BottomSheetCloseButton
88
+ onPress={onClose}
89
+ {...(closeAccessibilityLabel !== undefined && {
90
+ accessibilityLabel: closeAccessibilityLabel,
91
+ })}
92
+ />
93
+ )}
94
+ </View>
95
+ );
96
+ }
97
+
98
+ BottomSheetHeaderComponent.displayName = 'BottomSheet.Header';
99
+
100
+ const BottomSheetHeader = forwardRef<View, BottomSheetHeaderProps>(BottomSheetHeaderComponent);
101
+ BottomSheetHeader.displayName = 'BottomSheet.Header';
102
+
103
+ // =============================================================================
104
+ // CLOSEBUTTON
105
+ // =============================================================================
106
+ interface BottomSheetCloseButtonProps {
107
+ onPress: () => void;
108
+ className?: string;
109
+ accessibilityLabel?: string;
110
+ }
111
+
112
+ function BottomSheetCloseButton({
113
+ onPress,
114
+ className,
115
+ accessibilityLabel = 'Close',
116
+ }: BottomSheetCloseButtonProps) {
117
+ return (
118
+ <Pressable
119
+ onPress={onPress}
120
+ hitSlop={12}
121
+ accessibilityRole="button"
122
+ accessibilityLabel={accessibilityLabel}
123
+ className={cn(bottomSheetCloseButtonVariants(), className)}
124
+ >
125
+ <Icon as={Close} className={bottomSheetCloseIconVariants()} />
126
+ </Pressable>
127
+ );
128
+ }
129
+
130
+ BottomSheetCloseButton.displayName = 'BottomSheet.CloseButton';
131
+
132
+ // =============================================================================
133
+ // CONTENT
134
+ // =============================================================================
135
+
136
+ export interface BottomSheetContentProps {
137
+ children?: ReactNode;
138
+ className?: string;
139
+ hasSafeAreaInset?: boolean;
140
+ style?: ViewStyle;
141
+ }
142
+
143
+ const BottomSheetContent = forwardRef<View, BottomSheetContentProps>(
144
+ ({ children, className, hasSafeAreaInset, style }, ref) => {
145
+ const insets = useSafeAreaInsets();
146
+ const computedClassName = cn(bottomSheetContentVariants(), className);
147
+ return (
148
+ <View
149
+ ref={ref}
150
+ className={computedClassName}
151
+ style={hasSafeAreaInset ? { paddingBottom: insets.bottom, ...style } : style}
152
+ pointerEvents="box-none"
153
+ >
154
+ {children}
155
+ </View>
156
+ );
157
+ },
158
+ );
159
+
160
+ BottomSheetContent.displayName = 'BottomSheet.Content';
161
+
162
+ // =============================================================================
163
+ // FOOTER
164
+ // =============================================================================
165
+ export interface BottomSheetFooterProps {
166
+ children?: ReactNode;
167
+ className?: string;
168
+ style?: ViewStyle;
169
+ }
170
+
171
+ const BottomSheetFooter = forwardRef<View, BottomSheetFooterProps>(
172
+ ({ children, className, style }, ref) => {
173
+ const insets = useSafeAreaInsets();
174
+ const computedClassName = cn(bottomSheetFooterVariants(), className);
175
+ return (
176
+ <View
177
+ ref={ref}
178
+ className={computedClassName}
179
+ style={{ paddingBottom: Math.max(insets.bottom, 24), ...style }}
180
+ pointerEvents="box-none"
181
+ >
182
+ {children}
183
+ </View>
184
+ );
185
+ },
186
+ );
187
+
188
+ BottomSheetFooter.displayName = 'BottomSheet.Footer';
189
+
190
+ // =============================================================================
191
+ // MODAL WRAPPER (WITH STYLES)
192
+ // =============================================================================
193
+
194
+ export interface BottomSheetModalProps extends React.ComponentPropsWithoutRef<
195
+ typeof BottomSheetModal
196
+ > {
197
+ /** Show the drag handle indicator. When false, `handleComponent` is set to null. @default true */
198
+ handleVisible?: boolean;
199
+ /** Footer content rendered via gorhom's BottomSheetFooter for proper animated positioning and safe-area handling. */
200
+ footer?: ReactNode;
201
+ }
202
+
203
+ const MAX_DYNAMIC_CONTENT_SIZE = Dimensions.get('window').height * 0.9;
204
+
205
+ const CustomBackdrop = (props: BottomSheetBackdropProps) => {
206
+ return (
207
+ <BottomSheetBackdrop
208
+ {...props}
209
+ disappearsOnIndex={-1}
210
+ appearsOnIndex={0}
211
+ opacity={0.5}
212
+ pressBehavior="close"
213
+ />
214
+ );
215
+ };
216
+
217
+ const BottomSheetModalStyled = forwardRef<
218
+ React.ComponentRef<typeof BottomSheetModal>,
219
+ BottomSheetModalProps
220
+ >(({ handleVisible = true, footer, ...rest }, ref) => {
221
+ const renderFooter = useCallback(
222
+ (props: GorhomBottomSheetFooterProps) => (
223
+ <GorhomBottomSheetFooter {...props}>{footer}</GorhomBottomSheetFooter>
224
+ ),
225
+ [footer],
226
+ );
227
+
228
+ return (
229
+ <BottomSheetModal
230
+ ref={ref}
231
+ enableDynamicSizing
232
+ maxDynamicContentSize={MAX_DYNAMIC_CONTENT_SIZE}
233
+ handleComponent={handleVisible ? undefined : null}
234
+ handleIndicatorStyle={handleVisible ? handleIndicatorStyle : undefined}
235
+ backdropComponent={CustomBackdrop}
236
+ backgroundComponent={(backgroundProps) => (
237
+ <View {...backgroundProps} className={cn(bottomSheetContainerVariants())} />
238
+ )}
239
+ {...rest}
240
+ {...(footer != null && { footerComponent: renderFooter })}
241
+ />
242
+ );
243
+ });
244
+
245
+ BottomSheetModalStyled.displayName = 'BottomSheet.Modal';
246
+
247
+ // =============================================================================
248
+ // SCROLLVIEW WRAPPER (with footer margin adjustment enabled by default)
249
+ // =============================================================================
250
+
251
+ function BottomSheetScrollViewStyled({
252
+ enableFooterMarginAdjustment = true,
253
+ children,
254
+ ...rest
255
+ }: React.ComponentPropsWithoutRef<typeof BottomSheetScrollView>) {
256
+ return (
257
+ <BottomSheetScrollView enableFooterMarginAdjustment={enableFooterMarginAdjustment} {...rest}>
258
+ {children}
259
+ </BottomSheetScrollView>
260
+ );
261
+ }
262
+
263
+ BottomSheetScrollViewStyled.displayName = 'BottomSheet.ScrollView';
264
+
265
+ // =============================================================================
266
+ // VIEW WRAPPER (with footer margin adjustment enabled by default)
267
+ // =============================================================================
268
+
269
+ function BottomSheetViewStyled({
270
+ enableFooterMarginAdjustment = true,
271
+ children,
272
+ ...rest
273
+ }: React.ComponentPropsWithoutRef<typeof BottomSheetView>) {
274
+ return (
275
+ <BottomSheetView enableFooterMarginAdjustment={enableFooterMarginAdjustment} {...rest}>
276
+ {children}
277
+ </BottomSheetView>
278
+ );
279
+ }
280
+
281
+ BottomSheetViewStyled.displayName = 'BottomSheet.View';
282
+
283
+ // Display names for gorhom components exposed as BottomSheet.*
284
+ interface WithDisplayName {
285
+ displayName?: string;
286
+ }
287
+ (BottomSheetModalProvider as WithDisplayName).displayName = 'BottomSheet.Provider';
288
+
289
+ // ── Public exports ────────────────────────────────────────
290
+
291
+ interface BottomSheetCompound {
292
+ Modal: typeof BottomSheetModalStyled;
293
+ Header: typeof BottomSheetHeader;
294
+ Content: typeof BottomSheetContent;
295
+ Footer: typeof BottomSheetFooter;
296
+ Provider: typeof BottomSheetModalProvider;
297
+ ScrollView: typeof BottomSheetScrollViewStyled;
298
+ View: typeof BottomSheetViewStyled;
299
+ }
300
+
301
+ export const BottomSheet = {
302
+ Modal: BottomSheetModalStyled,
303
+ Header: BottomSheetHeader,
304
+ Content: BottomSheetContent,
305
+ Footer: BottomSheetFooter,
306
+ Provider: BottomSheetModalProvider,
307
+ ScrollView: BottomSheetScrollViewStyled,
308
+ View: BottomSheetViewStyled,
309
+ } as BottomSheetCompound;
310
+
311
+ // ── Hooks ────────────────────────────────────────────────
312
+
313
+ export function useBottomSheet() {
314
+ const ref = useRef<BottomSheetModalRef>(null);
315
+ return { ref, present: () => ref.current?.present(), dismiss: () => ref.current?.dismiss() };
316
+ }
@@ -0,0 +1,79 @@
1
+ import { type ViewStyle } from 'react-native';
2
+ import { cva, type VariantProps } from 'class-variance-authority';
3
+ import {
4
+ COLOR_BG_PRIMARY,
5
+ COLOR_BORDER_DEFAULT,
6
+ COLOR_TEXT_PRIMARY,
7
+ COLOR_TEXT_SECONDARY,
8
+ } from '../../styles/primitives';
9
+
10
+ // ── Container ──────────────────────────────────────────────
11
+
12
+ export const bottomSheetContainerVariants = cva([
13
+ 'rounded-t-3xl border-t border-x overflow-hidden',
14
+ COLOR_BG_PRIMARY,
15
+ COLOR_BORDER_DEFAULT,
16
+ ]);
17
+
18
+ // ── Header ─────────────────────────────────────────────────
19
+
20
+ export const bottomSheetHeaderVariants = cva(
21
+ [
22
+ 'flex-row items-center justify-between min-h-12 px-4 pt-3 pb-2',
23
+ COLOR_BG_PRIMARY,
24
+ COLOR_TEXT_PRIMARY,
25
+ ],
26
+ {
27
+ variants: {
28
+ hasTitle: {
29
+ true: '',
30
+ false: 'justify-end',
31
+ },
32
+ },
33
+ defaultVariants: {
34
+ hasTitle: true,
35
+ },
36
+ },
37
+ );
38
+
39
+ // ── Content ────────────────────────────────────────────────
40
+
41
+ export const bottomSheetContentVariants = cva([COLOR_BG_PRIMARY, 'px-4 pb-6']);
42
+
43
+ // ── Footer ─────────────────────────────────────────────────
44
+
45
+ export const bottomSheetFooterVariants = cva([
46
+ 'px-4 pt-3 pb-4 border-t',
47
+ COLOR_BG_PRIMARY,
48
+ COLOR_BORDER_DEFAULT,
49
+ ]);
50
+
51
+ // ── Subtitle ────────────────────────────────────────────────
52
+
53
+ export const bottomSheetSubtitleVariants = cva(['text-sm', COLOR_TEXT_SECONDARY]);
54
+
55
+ // ── Back Button ─────────────────────────────────────────────
56
+
57
+ export const bottomSheetBackButtonVariants = cva(['p-1 -m-1 mr-2 rounded-full active:opacity-70']);
58
+
59
+ export const bottomSheetBackIconVariants = cva(['size-5 text-slate-500']);
60
+
61
+ // ── Close Button ───────────────────────────────────────────
62
+
63
+ export const bottomSheetCloseButtonVariants = cva(['p-1 -m-1 rounded-full active:opacity-70']);
64
+
65
+ // ── Close Icon ─────────────────────────────────────────────
66
+
67
+ export const bottomSheetCloseIconVariants = cva(['size-5 text-slate-500']);
68
+
69
+ // ── Handle indicator ────────────────────────────────────────
70
+ // Plain ViewStyle — gorhom's handleIndicatorStyle doesn't accept classNames.
71
+ // slate-300 (#cbd5e1) maps to COLOR_BORDER_STRONG; update when raw token palette is available (TODO).
72
+ export const handleIndicatorStyle: ViewStyle = {
73
+ backgroundColor: '#cbd5e1',
74
+ width: 36,
75
+ height: 4,
76
+ borderRadius: 2,
77
+ };
78
+
79
+ export type BottomSheetHeaderVariants = VariantProps<typeof bottomSheetHeaderVariants>;
@@ -8,6 +8,7 @@ export interface BoxProps extends ViewProps {
8
8
  textProps?: TextProps;
9
9
  }
10
10
 
11
+ /** @deprecated Use View instead */
11
12
  export const Box = forwardRef<View, BoxProps>(
12
13
  ({ style, className, children, textProps, ...restProps }, ref: ForwardedRef<View>) => {
13
14
  return (
@@ -0,0 +1,281 @@
1
+ /**
2
+ * Neutral compound-variant **slices** shared by Button and IconButton (no consumer `variant` keys).
3
+ *
4
+ * Each consumer maps these into its own CVA, e.g. filled surface → Button `strong` or IconButton `solid`;
5
+ * ghost surface / outline+ghost foreground → attach the appropriate `variant` / tuple for that component.
6
+ *
7
+ * Button-only outline **surface** (borders) stays in `Button/styles.ts`.
8
+ */
9
+ import { Platform } from 'react-native';
10
+ import { SEMANTIC_COLORS } from '../../styles/primitives';
11
+
12
+ export type SharedButtonSemanticColor = 'action' | 'danger' | 'warning' | 'success' | 'info';
13
+
14
+ /** Root surface: filled semantic background (maps to Button `strong`, IconButton `solid`). */
15
+ export const sharedFilledSurfaceCompounds: {
16
+ color: SharedButtonSemanticColor;
17
+ mode?: 'dark';
18
+ className: string | string[];
19
+ }[] = [
20
+ {
21
+ color: 'action',
22
+ className: [
23
+ SEMANTIC_COLORS.action.bg,
24
+ Platform.select({
25
+ default: 'data-[active=true]:bg-slate-700',
26
+ web: 'data-[hover=true]:bg-slate-800 data-[active=true]:data-[hover=true]:bg-slate-700',
27
+ }),
28
+ ],
29
+ },
30
+ {
31
+ color: 'danger',
32
+ className: [
33
+ SEMANTIC_COLORS.danger.bg,
34
+ Platform.select({
35
+ default: 'data-[active=true]:bg-red-800',
36
+ web: 'data-[hover=true]:bg-red-700 data-[active=true]:data-[hover=true]:bg-red-800',
37
+ }),
38
+ ],
39
+ },
40
+ {
41
+ color: 'warning',
42
+ className: [
43
+ SEMANTIC_COLORS.warning.bg,
44
+ Platform.select({
45
+ default: 'data-[active=true]:bg-amber-700',
46
+ web: 'data-[hover=true]:bg-amber-600 data-[active=true]:data-[hover=true]:bg-amber-700',
47
+ }),
48
+ ],
49
+ },
50
+ {
51
+ color: 'success',
52
+ className: [
53
+ SEMANTIC_COLORS.success.bg,
54
+ Platform.select({
55
+ default: 'data-[active=true]:bg-green-800',
56
+ web: 'data-[hover=true]:bg-green-700 data-[active=true]:data-[hover=true]:bg-green-800',
57
+ }),
58
+ ],
59
+ },
60
+ {
61
+ color: 'info',
62
+ className: [
63
+ SEMANTIC_COLORS.info.bg,
64
+ Platform.select({
65
+ default: 'data-[active=true]:bg-sky-700',
66
+ web: 'data-[hover=true]:bg-sky-600 data-[active=true]:data-[hover=true]:bg-sky-700',
67
+ }),
68
+ ],
69
+ },
70
+ {
71
+ color: 'action',
72
+ mode: 'dark',
73
+ className: [
74
+ 'bg-slate-200',
75
+ Platform.select({
76
+ default: 'data-[active=true]:bg-slate-400',
77
+ web: 'data-[hover=true]:bg-slate-300 data-[active=true]:data-[hover=true]:bg-slate-400',
78
+ }),
79
+ ],
80
+ },
81
+ ];
82
+
83
+ /** Root surface: ghost hover/active fills (maps to `variant: 'ghost'` on Button and IconButton). */
84
+ export const sharedGhostSurfaceCompounds: {
85
+ color: SharedButtonSemanticColor;
86
+ mode?: 'dark';
87
+ className: string | string[];
88
+ }[] = [
89
+ {
90
+ color: 'danger',
91
+ className: [
92
+ Platform.select({
93
+ default: 'data-[active=true]:bg-red-100',
94
+ web: 'data-[hover=true]:bg-red-50 data-[active=true]:data-[hover=true]:bg-red-100',
95
+ }),
96
+ ],
97
+ },
98
+ {
99
+ color: 'warning',
100
+ className: [
101
+ Platform.select({
102
+ default: 'data-[active=true]:bg-amber-100',
103
+ web: 'data-[hover=true]:bg-amber-50 data-[active=true]:data-[hover=true]:bg-amber-100',
104
+ }),
105
+ ],
106
+ },
107
+ {
108
+ color: 'success',
109
+ className: [
110
+ Platform.select({
111
+ default: 'data-[active=true]:bg-green-100',
112
+ web: 'data-[hover=true]:bg-green-50 data-[active=true]:data-[hover=true]:bg-green-100',
113
+ }),
114
+ ],
115
+ },
116
+ {
117
+ color: 'info',
118
+ className: [
119
+ Platform.select({
120
+ default: 'data-[active=true]:bg-sky-100',
121
+ web: 'data-[hover=true]:bg-sky-50 data-[active=true]:data-[hover=true]:bg-sky-100',
122
+ }),
123
+ ],
124
+ },
125
+ {
126
+ color: 'action',
127
+ mode: 'dark',
128
+ className: [
129
+ Platform.select({
130
+ default: 'data-[active=true]:bg-slate-700',
131
+ web: 'data-[hover=true]:bg-slate-800 data-[active=true]:data-[hover=true]:bg-slate-700',
132
+ }),
133
+ ],
134
+ },
135
+ {
136
+ color: 'danger',
137
+ mode: 'dark',
138
+ className: [
139
+ Platform.select({
140
+ default: 'data-[active=true]:bg-red-950',
141
+ web: 'data-[hover=true]:bg-red-950/50 data-[active=true]:data-[hover=true]:bg-red-950',
142
+ }),
143
+ ],
144
+ },
145
+ {
146
+ color: 'warning',
147
+ mode: 'dark',
148
+ className: [
149
+ Platform.select({
150
+ default: 'data-[active=true]:bg-amber-950',
151
+ web: 'data-[hover=true]:bg-amber-950/50 data-[active=true]:data-[hover=true]:bg-amber-950',
152
+ }),
153
+ ],
154
+ },
155
+ {
156
+ color: 'success',
157
+ mode: 'dark',
158
+ className: [
159
+ Platform.select({
160
+ default: 'data-[active=true]:bg-green-950',
161
+ web: 'data-[hover=true]:bg-green-950/50 data-[active=true]:data-[hover=true]:bg-green-950',
162
+ }),
163
+ ],
164
+ },
165
+ {
166
+ color: 'info',
167
+ mode: 'dark',
168
+ className: [
169
+ Platform.select({
170
+ default: 'data-[active=true]:bg-sky-950',
171
+ web: 'data-[hover=true]:bg-sky-950/50 data-[active=true]:data-[hover=true]:bg-sky-950',
172
+ }),
173
+ ],
174
+ },
175
+ ];
176
+
177
+ /** Foreground on filled controls (maps to Button `strong`, IconButton `solid`). */
178
+ export const sharedFilledForegroundTextCompounds: {
179
+ color: SharedButtonSemanticColor;
180
+ mode?: 'dark';
181
+ className: string | string[];
182
+ }[] = [
183
+ { color: 'action', className: 'text-white' },
184
+ { color: 'danger', className: 'text-white' },
185
+ { color: 'warning', className: 'text-white' },
186
+ { color: 'success', className: 'text-white' },
187
+ { color: 'info', className: 'text-white' },
188
+ { color: 'action', mode: 'dark', className: 'text-slate-900' },
189
+ ];
190
+
191
+ /**
192
+ * Foreground for transparent controls: same class names for Button `outline` and `ghost`, and for IconButton `ghost`.
193
+ * Consumers attach their own `variant` key(s).
194
+ */
195
+ export const sharedOutlineGhostForegroundTextCompounds: {
196
+ color: SharedButtonSemanticColor;
197
+ mode?: 'dark';
198
+ className: string | string[];
199
+ }[] = [
200
+ {
201
+ color: 'action',
202
+ className: [
203
+ 'text-slate-900',
204
+ Platform.select({
205
+ default: 'data-[active=true]:text-slate-700',
206
+ web: 'data-[hover=true]:text-slate-800 data-[active=true]:data-[hover=true]:text-slate-700',
207
+ }),
208
+ ],
209
+ },
210
+ {
211
+ color: 'danger',
212
+ className: [
213
+ 'text-red-600',
214
+ Platform.select({
215
+ default: 'data-[active=true]:text-red-800',
216
+ web: 'data-[hover=true]:text-red-700 data-[active=true]:data-[hover=true]:text-red-800',
217
+ }),
218
+ ],
219
+ },
220
+ {
221
+ color: 'warning',
222
+ className: [
223
+ 'text-amber-600',
224
+ Platform.select({
225
+ default: 'data-[active=true]:text-amber-800',
226
+ web: 'data-[hover=true]:text-amber-700 data-[active=true]:data-[hover=true]:text-amber-800',
227
+ }),
228
+ ],
229
+ },
230
+ {
231
+ color: 'success',
232
+ className: [
233
+ 'text-green-600',
234
+ Platform.select({
235
+ default: 'data-[active=true]:text-green-800',
236
+ web: 'data-[hover=true]:text-green-700 data-[active=true]:data-[hover=true]:text-green-800',
237
+ }),
238
+ ],
239
+ },
240
+ {
241
+ color: 'info',
242
+ className: [
243
+ 'text-sky-600',
244
+ Platform.select({
245
+ default: 'data-[active=true]:text-sky-800',
246
+ web: 'data-[hover=true]:text-sky-700 data-[active=true]:data-[hover=true]:text-sky-800',
247
+ }),
248
+ ],
249
+ },
250
+ {
251
+ color: 'action',
252
+ mode: 'dark',
253
+ className: [
254
+ 'text-white',
255
+ Platform.select({
256
+ default: 'data-[active=true]:text-white',
257
+ web: 'data-[hover=true]:text-white data-[active=true]:data-[hover=true]:text-white',
258
+ }),
259
+ ],
260
+ },
261
+ {
262
+ color: 'danger',
263
+ mode: 'dark',
264
+ className: 'text-red-400',
265
+ },
266
+ {
267
+ color: 'warning',
268
+ mode: 'dark',
269
+ className: 'text-amber-400',
270
+ },
271
+ {
272
+ color: 'success',
273
+ mode: 'dark',
274
+ className: 'text-green-400',
275
+ },
276
+ {
277
+ color: 'info',
278
+ mode: 'dark',
279
+ className: 'text-sky-400',
280
+ },
281
+ ];