@cdx-ui/components 0.1.6 → 0.2.0

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 (435) hide show
  1. package/coverage.svg +1 -1
  2. package/lib/commonjs/components/Alert/index.js.map +1 -1
  3. package/lib/commonjs/components/Avatar/index.js +6 -4
  4. package/lib/commonjs/components/Avatar/index.js.map +1 -1
  5. package/lib/commonjs/components/Badge/index.js.map +1 -1
  6. package/lib/commonjs/components/Badge/styles.js +2 -2
  7. package/lib/commonjs/components/BottomSheet/index.js +106 -91
  8. package/lib/commonjs/components/BottomSheet/index.js.map +1 -1
  9. package/lib/commonjs/components/BottomSheet/styles.js +1 -12
  10. package/lib/commonjs/components/BottomSheet/styles.js.map +1 -1
  11. package/lib/commonjs/components/Button/index.js.map +1 -1
  12. package/lib/commonjs/components/Card/index.js.map +1 -1
  13. package/lib/commonjs/components/ColorArea/ColorAreaPaint.js +78 -0
  14. package/lib/commonjs/components/ColorArea/ColorAreaPaint.js.map +1 -0
  15. package/lib/commonjs/components/ColorArea/ColorAreaPaint.web.js +31 -0
  16. package/lib/commonjs/components/ColorArea/ColorAreaPaint.web.js.map +1 -0
  17. package/lib/commonjs/components/ColorArea/index.js +57 -0
  18. package/lib/commonjs/components/ColorArea/index.js.map +1 -0
  19. package/lib/commonjs/components/ColorArea/styles.js +12 -0
  20. package/lib/commonjs/components/ColorArea/styles.js.map +1 -0
  21. package/lib/commonjs/components/ColorField/index.js +138 -0
  22. package/lib/commonjs/components/ColorField/index.js.map +1 -0
  23. package/lib/commonjs/components/ColorField/styles.js +14 -0
  24. package/lib/commonjs/components/ColorField/styles.js.map +1 -0
  25. package/lib/commonjs/components/ColorPicker/index.js +88 -0
  26. package/lib/commonjs/components/ColorPicker/index.js.map +1 -0
  27. package/lib/commonjs/components/ColorPicker/styles.js +22 -0
  28. package/lib/commonjs/components/ColorPicker/styles.js.map +1 -0
  29. package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.js +68 -0
  30. package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.js.map +1 -0
  31. package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.web.js +41 -0
  32. package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.web.js.map +1 -0
  33. package/lib/commonjs/components/ColorSlider/index.js +123 -0
  34. package/lib/commonjs/components/ColorSlider/index.js.map +1 -0
  35. package/lib/commonjs/components/ColorSlider/styles.js +50 -0
  36. package/lib/commonjs/components/ColorSlider/styles.js.map +1 -0
  37. package/lib/commonjs/components/ColorSwatch/index.js +54 -0
  38. package/lib/commonjs/components/ColorSwatch/index.js.map +1 -0
  39. package/lib/commonjs/components/ColorSwatch/styles.js +25 -0
  40. package/lib/commonjs/components/ColorSwatch/styles.js.map +1 -0
  41. package/lib/commonjs/components/ColorSwatchPicker/index.js +110 -0
  42. package/lib/commonjs/components/ColorSwatchPicker/index.js.map +1 -0
  43. package/lib/commonjs/components/ColorSwatchPicker/styles.js +17 -0
  44. package/lib/commonjs/components/ColorSwatchPicker/styles.js.map +1 -0
  45. package/lib/commonjs/components/Dialog/index.js.map +1 -1
  46. package/lib/commonjs/components/Divider/index.js.map +1 -1
  47. package/lib/commonjs/components/Form/styles.js +1 -1
  48. package/lib/commonjs/components/Form/styles.js.map +1 -1
  49. package/lib/commonjs/components/FullScreenDialog/animation.js +46 -0
  50. package/lib/commonjs/components/FullScreenDialog/animation.js.map +1 -0
  51. package/lib/commonjs/components/FullScreenDialog/index.js +343 -0
  52. package/lib/commonjs/components/FullScreenDialog/index.js.map +1 -0
  53. package/lib/commonjs/components/FullScreenDialog/styles.js +14 -0
  54. package/lib/commonjs/components/FullScreenDialog/styles.js.map +1 -0
  55. package/lib/commonjs/components/Heading/styles.js +3 -0
  56. package/lib/commonjs/components/Heading/styles.js.map +1 -1
  57. package/lib/commonjs/components/Icon/index.js +27 -3
  58. package/lib/commonjs/components/Icon/index.js.map +1 -1
  59. package/lib/commonjs/components/Icon/styles.js +19 -0
  60. package/lib/commonjs/components/Icon/styles.js.map +1 -0
  61. package/lib/commonjs/components/IconButton/styles.js +7 -5
  62. package/lib/commonjs/components/IconButton/styles.js.map +1 -1
  63. package/lib/commonjs/components/InsuranceDisclosure/index.js.map +1 -1
  64. package/lib/commonjs/components/Link/index.js.map +1 -1
  65. package/lib/commonjs/components/ListItem/index.js +2 -0
  66. package/lib/commonjs/components/ListItem/index.js.map +1 -1
  67. package/lib/commonjs/components/ListItem/styles.js +6 -0
  68. package/lib/commonjs/components/ListItem/styles.js.map +1 -1
  69. package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -1
  70. package/lib/commonjs/components/Radio/index.js.map +1 -1
  71. package/lib/commonjs/components/ScopedTheme/index.js +11 -3
  72. package/lib/commonjs/components/ScopedTheme/index.js.map +1 -1
  73. package/lib/commonjs/components/Skeleton/index.js.map +1 -1
  74. package/lib/commonjs/components/Stack/HStack.js.map +1 -1
  75. package/lib/commonjs/components/Stack/VStack.js.map +1 -1
  76. package/lib/commonjs/components/Text/index.js +13 -4
  77. package/lib/commonjs/components/Text/index.js.map +1 -1
  78. package/lib/commonjs/components/Text/styles.js +39 -3
  79. package/lib/commonjs/components/Text/styles.js.map +1 -1
  80. package/lib/commonjs/components/Textarea/index.js.map +1 -1
  81. package/lib/commonjs/components/Tile/index.js.map +1 -1
  82. package/lib/commonjs/components/Toast/hooks.js +0 -1
  83. package/lib/commonjs/components/Toast/hooks.js.map +1 -1
  84. package/lib/commonjs/components/Toast/index.js +49 -18
  85. package/lib/commonjs/components/Toast/index.js.map +1 -1
  86. package/lib/commonjs/components/Toast/styles.js +49 -21
  87. package/lib/commonjs/components/Toast/styles.js.map +1 -1
  88. package/lib/commonjs/components/ToggleButton/index.js +5 -4
  89. package/lib/commonjs/components/ToggleButton/index.js.map +1 -1
  90. package/lib/commonjs/components/index.js +80 -0
  91. package/lib/commonjs/components/index.js.map +1 -1
  92. package/lib/commonjs/components/picker/styles.js +6 -2
  93. package/lib/commonjs/components/picker/styles.js.map +1 -1
  94. package/lib/commonjs/components/picker/surfaces.js +9 -2
  95. package/lib/commonjs/components/picker/surfaces.js.map +1 -1
  96. package/lib/commonjs/components/sheet-header/index.js +97 -0
  97. package/lib/commonjs/components/sheet-header/index.js.map +1 -0
  98. package/lib/commonjs/components/sheet-header/styles.js +28 -0
  99. package/lib/commonjs/components/sheet-header/styles.js.map +1 -0
  100. package/lib/commonjs/figma/BottomSheet.figma.js +1 -1
  101. package/lib/commonjs/figma/Icon.figma.js +30 -3
  102. package/lib/commonjs/figma/Icon.figma.js.map +1 -1
  103. package/lib/commonjs/figma/Text.figma.js +15 -1
  104. package/lib/commonjs/figma/Text.figma.js.map +1 -1
  105. package/lib/commonjs/providers/toast/insets-container.js +15 -3
  106. package/lib/commonjs/providers/toast/insets-container.js.map +1 -1
  107. package/lib/commonjs/providers/toast/provider.js +45 -11
  108. package/lib/commonjs/providers/toast/provider.js.map +1 -1
  109. package/lib/commonjs/styles/constants.js +14 -1
  110. package/lib/commonjs/styles/constants.js.map +1 -1
  111. package/lib/module/components/Alert/index.js.map +1 -1
  112. package/lib/module/components/Avatar/index.js +6 -4
  113. package/lib/module/components/Avatar/index.js.map +1 -1
  114. package/lib/module/components/Badge/index.js.map +1 -1
  115. package/lib/module/components/Badge/styles.js +2 -2
  116. package/lib/module/components/BottomSheet/index.js +110 -95
  117. package/lib/module/components/BottomSheet/index.js.map +1 -1
  118. package/lib/module/components/BottomSheet/styles.js +0 -11
  119. package/lib/module/components/BottomSheet/styles.js.map +1 -1
  120. package/lib/module/components/Button/index.js.map +1 -1
  121. package/lib/module/components/Card/index.js.map +1 -1
  122. package/lib/module/components/ColorArea/ColorAreaPaint.js +74 -0
  123. package/lib/module/components/ColorArea/ColorAreaPaint.js.map +1 -0
  124. package/lib/module/components/ColorArea/ColorAreaPaint.web.js +27 -0
  125. package/lib/module/components/ColorArea/ColorAreaPaint.web.js.map +1 -0
  126. package/lib/module/components/ColorArea/index.js +53 -0
  127. package/lib/module/components/ColorArea/index.js.map +1 -0
  128. package/lib/module/components/ColorArea/styles.js +8 -0
  129. package/lib/module/components/ColorArea/styles.js.map +1 -0
  130. package/lib/module/components/ColorField/index.js +134 -0
  131. package/lib/module/components/ColorField/index.js.map +1 -0
  132. package/lib/module/components/ColorField/styles.js +10 -0
  133. package/lib/module/components/ColorField/styles.js.map +1 -0
  134. package/lib/module/components/ColorPicker/index.js +79 -0
  135. package/lib/module/components/ColorPicker/index.js.map +1 -0
  136. package/lib/module/components/ColorPicker/styles.js +18 -0
  137. package/lib/module/components/ColorPicker/styles.js.map +1 -0
  138. package/lib/module/components/ColorSlider/ColorSliderRailPaint.js +64 -0
  139. package/lib/module/components/ColorSlider/ColorSliderRailPaint.js.map +1 -0
  140. package/lib/module/components/ColorSlider/ColorSliderRailPaint.web.js +37 -0
  141. package/lib/module/components/ColorSlider/ColorSliderRailPaint.web.js.map +1 -0
  142. package/lib/module/components/ColorSlider/index.js +119 -0
  143. package/lib/module/components/ColorSlider/index.js.map +1 -0
  144. package/lib/module/components/ColorSlider/styles.js +46 -0
  145. package/lib/module/components/ColorSlider/styles.js.map +1 -0
  146. package/lib/module/components/ColorSwatch/index.js +50 -0
  147. package/lib/module/components/ColorSwatch/index.js.map +1 -0
  148. package/lib/module/components/ColorSwatch/styles.js +21 -0
  149. package/lib/module/components/ColorSwatch/styles.js.map +1 -0
  150. package/lib/module/components/ColorSwatchPicker/index.js +106 -0
  151. package/lib/module/components/ColorSwatchPicker/index.js.map +1 -0
  152. package/lib/module/components/ColorSwatchPicker/styles.js +13 -0
  153. package/lib/module/components/ColorSwatchPicker/styles.js.map +1 -0
  154. package/lib/module/components/Dialog/index.js.map +1 -1
  155. package/lib/module/components/Divider/index.js.map +1 -1
  156. package/lib/module/components/Form/styles.js +1 -1
  157. package/lib/module/components/Form/styles.js.map +1 -1
  158. package/lib/module/components/FullScreenDialog/animation.js +41 -0
  159. package/lib/module/components/FullScreenDialog/animation.js.map +1 -0
  160. package/lib/module/components/FullScreenDialog/index.js +338 -0
  161. package/lib/module/components/FullScreenDialog/index.js.map +1 -0
  162. package/lib/module/components/FullScreenDialog/styles.js +10 -0
  163. package/lib/module/components/FullScreenDialog/styles.js.map +1 -0
  164. package/lib/module/components/Heading/styles.js +3 -0
  165. package/lib/module/components/Heading/styles.js.map +1 -1
  166. package/lib/module/components/Icon/index.js +27 -3
  167. package/lib/module/components/Icon/index.js.map +1 -1
  168. package/lib/module/components/Icon/styles.js +16 -0
  169. package/lib/module/components/Icon/styles.js.map +1 -0
  170. package/lib/module/components/IconButton/styles.js +7 -4
  171. package/lib/module/components/IconButton/styles.js.map +1 -1
  172. package/lib/module/components/InsuranceDisclosure/index.js.map +1 -1
  173. package/lib/module/components/Link/index.js.map +1 -1
  174. package/lib/module/components/ListItem/index.js +2 -0
  175. package/lib/module/components/ListItem/index.js.map +1 -1
  176. package/lib/module/components/ListItem/styles.js +6 -0
  177. package/lib/module/components/ListItem/styles.js.map +1 -1
  178. package/lib/module/components/ProgressSegmented/index.js.map +1 -1
  179. package/lib/module/components/Radio/index.js.map +1 -1
  180. package/lib/module/components/ScopedTheme/index.js +11 -3
  181. package/lib/module/components/ScopedTheme/index.js.map +1 -1
  182. package/lib/module/components/Skeleton/index.js.map +1 -1
  183. package/lib/module/components/Stack/HStack.js.map +1 -1
  184. package/lib/module/components/Stack/VStack.js.map +1 -1
  185. package/lib/module/components/Text/index.js +14 -5
  186. package/lib/module/components/Text/index.js.map +1 -1
  187. package/lib/module/components/Text/styles.js +38 -2
  188. package/lib/module/components/Text/styles.js.map +1 -1
  189. package/lib/module/components/Textarea/index.js.map +1 -1
  190. package/lib/module/components/Tile/index.js.map +1 -1
  191. package/lib/module/components/Toast/hooks.js +0 -1
  192. package/lib/module/components/Toast/hooks.js.map +1 -1
  193. package/lib/module/components/Toast/index.js +52 -21
  194. package/lib/module/components/Toast/index.js.map +1 -1
  195. package/lib/module/components/Toast/styles.js +48 -21
  196. package/lib/module/components/Toast/styles.js.map +1 -1
  197. package/lib/module/components/ToggleButton/index.js +3 -3
  198. package/lib/module/components/ToggleButton/index.js.map +1 -1
  199. package/lib/module/components/index.js +7 -0
  200. package/lib/module/components/index.js.map +1 -1
  201. package/lib/module/components/picker/styles.js +6 -2
  202. package/lib/module/components/picker/styles.js.map +1 -1
  203. package/lib/module/components/picker/surfaces.js +10 -3
  204. package/lib/module/components/picker/surfaces.js.map +1 -1
  205. package/lib/module/components/sheet-header/index.js +94 -0
  206. package/lib/module/components/sheet-header/index.js.map +1 -0
  207. package/lib/module/components/sheet-header/styles.js +25 -0
  208. package/lib/module/components/sheet-header/styles.js.map +1 -0
  209. package/lib/module/figma/BottomSheet.figma.js +1 -1
  210. package/lib/module/figma/Icon.figma.js +30 -3
  211. package/lib/module/figma/Icon.figma.js.map +1 -1
  212. package/lib/module/figma/Text.figma.js +15 -1
  213. package/lib/module/figma/Text.figma.js.map +1 -1
  214. package/lib/module/providers/toast/insets-container.js +15 -4
  215. package/lib/module/providers/toast/insets-container.js.map +1 -1
  216. package/lib/module/providers/toast/provider.js +46 -12
  217. package/lib/module/providers/toast/provider.js.map +1 -1
  218. package/lib/module/styles/constants.js +13 -0
  219. package/lib/module/styles/constants.js.map +1 -1
  220. package/lib/typescript/components/Alert/index.d.ts +5 -2
  221. package/lib/typescript/components/Alert/index.d.ts.map +1 -1
  222. package/lib/typescript/components/Avatar/index.d.ts +11 -5
  223. package/lib/typescript/components/Avatar/index.d.ts.map +1 -1
  224. package/lib/typescript/components/Badge/index.d.ts +34 -0
  225. package/lib/typescript/components/Badge/index.d.ts.map +1 -1
  226. package/lib/typescript/components/Badge/styles.d.ts +3 -3
  227. package/lib/typescript/components/BottomSheet/index.d.ts +12 -1
  228. package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -1
  229. package/lib/typescript/components/BottomSheet/styles.d.ts +0 -5
  230. package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -1
  231. package/lib/typescript/components/Breadcrumbs/styles.d.ts +1 -1
  232. package/lib/typescript/components/Button/index.d.ts +10 -2
  233. package/lib/typescript/components/Button/index.d.ts.map +1 -1
  234. package/lib/typescript/components/Button/styles.d.ts +4 -4
  235. package/lib/typescript/components/Card/index.d.ts +14 -0
  236. package/lib/typescript/components/Card/index.d.ts.map +1 -1
  237. package/lib/typescript/components/Checkbox/index.d.ts +1 -1
  238. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
  239. package/lib/typescript/components/Chip/index.d.ts +2 -2
  240. package/lib/typescript/components/Chip/index.d.ts.map +1 -1
  241. package/lib/typescript/components/Chip/styles.d.ts +3 -3
  242. package/lib/typescript/components/ColorArea/ColorAreaPaint.d.ts +5 -0
  243. package/lib/typescript/components/ColorArea/ColorAreaPaint.d.ts.map +1 -0
  244. package/lib/typescript/components/ColorArea/ColorAreaPaint.web.d.ts +5 -0
  245. package/lib/typescript/components/ColorArea/ColorAreaPaint.web.d.ts.map +1 -0
  246. package/lib/typescript/components/ColorArea/index.d.ts +20 -0
  247. package/lib/typescript/components/ColorArea/index.d.ts.map +1 -0
  248. package/lib/typescript/components/ColorArea/styles.d.ts +4 -0
  249. package/lib/typescript/components/ColorArea/styles.d.ts.map +1 -0
  250. package/lib/typescript/components/ColorField/index.d.ts +41 -0
  251. package/lib/typescript/components/ColorField/index.d.ts.map +1 -0
  252. package/lib/typescript/components/ColorField/styles.d.ts +13 -0
  253. package/lib/typescript/components/ColorField/styles.d.ts.map +1 -0
  254. package/lib/typescript/components/ColorPicker/index.d.ts +28 -0
  255. package/lib/typescript/components/ColorPicker/index.d.ts.map +1 -0
  256. package/lib/typescript/components/ColorPicker/styles.d.ts +9 -0
  257. package/lib/typescript/components/ColorPicker/styles.d.ts.map +1 -0
  258. package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.d.ts +5 -0
  259. package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.d.ts.map +1 -0
  260. package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.web.d.ts +5 -0
  261. package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.web.d.ts.map +1 -0
  262. package/lib/typescript/components/ColorSlider/index.d.ts +33 -0
  263. package/lib/typescript/components/ColorSlider/index.d.ts.map +1 -0
  264. package/lib/typescript/components/ColorSlider/styles.d.ts +14 -0
  265. package/lib/typescript/components/ColorSlider/styles.d.ts.map +1 -0
  266. package/lib/typescript/components/ColorSwatch/index.d.ts +19 -0
  267. package/lib/typescript/components/ColorSwatch/index.d.ts.map +1 -0
  268. package/lib/typescript/components/ColorSwatch/styles.d.ts +7 -0
  269. package/lib/typescript/components/ColorSwatch/styles.d.ts.map +1 -0
  270. package/lib/typescript/components/ColorSwatchPicker/index.d.ts +37 -0
  271. package/lib/typescript/components/ColorSwatchPicker/index.d.ts.map +1 -0
  272. package/lib/typescript/components/ColorSwatchPicker/styles.d.ts +5 -0
  273. package/lib/typescript/components/ColorSwatchPicker/styles.d.ts.map +1 -0
  274. package/lib/typescript/components/CurrencyInput/index.d.ts +2 -2
  275. package/lib/typescript/components/CurrencyInput/index.d.ts.map +1 -1
  276. package/lib/typescript/components/Dialog/index.d.ts +10 -0
  277. package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
  278. package/lib/typescript/components/Dialog/styles.d.ts +1 -0
  279. package/lib/typescript/components/Dialog/styles.d.ts.map +1 -1
  280. package/lib/typescript/components/Divider/index.d.ts +6 -1
  281. package/lib/typescript/components/Divider/index.d.ts.map +1 -1
  282. package/lib/typescript/components/Drawer/styles.d.ts +1 -1
  283. package/lib/typescript/components/Form/styles.d.ts.map +1 -1
  284. package/lib/typescript/components/FullScreenDialog/animation.d.ts +9 -0
  285. package/lib/typescript/components/FullScreenDialog/animation.d.ts.map +1 -0
  286. package/lib/typescript/components/FullScreenDialog/index.d.ts +85 -0
  287. package/lib/typescript/components/FullScreenDialog/index.d.ts.map +1 -0
  288. package/lib/typescript/components/FullScreenDialog/styles.d.ts +6 -0
  289. package/lib/typescript/components/FullScreenDialog/styles.d.ts.map +1 -0
  290. package/lib/typescript/components/Heading/styles.d.ts.map +1 -1
  291. package/lib/typescript/components/Icon/index.d.ts +14 -22
  292. package/lib/typescript/components/Icon/index.d.ts.map +1 -1
  293. package/lib/typescript/components/Icon/styles.d.ts +6 -0
  294. package/lib/typescript/components/Icon/styles.d.ts.map +1 -0
  295. package/lib/typescript/components/IconButton/styles.d.ts +7 -2
  296. package/lib/typescript/components/IconButton/styles.d.ts.map +1 -1
  297. package/lib/typescript/components/Input/index.d.ts +2 -2
  298. package/lib/typescript/components/Input/index.d.ts.map +1 -1
  299. package/lib/typescript/components/InsuranceDisclosure/index.d.ts +1 -0
  300. package/lib/typescript/components/InsuranceDisclosure/index.d.ts.map +1 -1
  301. package/lib/typescript/components/Link/index.d.ts +3 -1
  302. package/lib/typescript/components/Link/index.d.ts.map +1 -1
  303. package/lib/typescript/components/ListItem/index.d.ts +43 -4
  304. package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
  305. package/lib/typescript/components/ListItem/styles.d.ts +2 -0
  306. package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
  307. package/lib/typescript/components/Menu/index.d.ts +2 -2
  308. package/lib/typescript/components/Menu/index.d.ts.map +1 -1
  309. package/lib/typescript/components/ProgressSegmented/index.d.ts +10 -3
  310. package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -1
  311. package/lib/typescript/components/Radio/index.d.ts +1 -0
  312. package/lib/typescript/components/Radio/index.d.ts.map +1 -1
  313. package/lib/typescript/components/ScopedTheme/index.d.ts +11 -3
  314. package/lib/typescript/components/ScopedTheme/index.d.ts.map +1 -1
  315. package/lib/typescript/components/Select/index.d.ts +1 -1
  316. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  317. package/lib/typescript/components/Skeleton/index.d.ts +5 -1
  318. package/lib/typescript/components/Skeleton/index.d.ts.map +1 -1
  319. package/lib/typescript/components/Slider/styles.d.ts +3 -3
  320. package/lib/typescript/components/Stack/HStack.d.ts +6 -0
  321. package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
  322. package/lib/typescript/components/Stack/VStack.d.ts +6 -0
  323. package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
  324. package/lib/typescript/components/Switch/index.d.ts +1 -1
  325. package/lib/typescript/components/Tabs/index.d.ts +2 -2
  326. package/lib/typescript/components/Text/index.d.ts +40 -3
  327. package/lib/typescript/components/Text/index.d.ts.map +1 -1
  328. package/lib/typescript/components/Text/styles.d.ts +9 -0
  329. package/lib/typescript/components/Text/styles.d.ts.map +1 -1
  330. package/lib/typescript/components/Textarea/index.d.ts +1 -0
  331. package/lib/typescript/components/Textarea/index.d.ts.map +1 -1
  332. package/lib/typescript/components/Tile/index.d.ts +49 -0
  333. package/lib/typescript/components/Tile/index.d.ts.map +1 -1
  334. package/lib/typescript/components/Toast/hooks.d.ts +1 -1
  335. package/lib/typescript/components/Toast/hooks.d.ts.map +1 -1
  336. package/lib/typescript/components/Toast/index.d.ts +15 -0
  337. package/lib/typescript/components/Toast/index.d.ts.map +1 -1
  338. package/lib/typescript/components/Toast/styles.d.ts +14 -0
  339. package/lib/typescript/components/Toast/styles.d.ts.map +1 -1
  340. package/lib/typescript/components/Toast/types.d.ts +10 -1
  341. package/lib/typescript/components/Toast/types.d.ts.map +1 -1
  342. package/lib/typescript/components/ToggleButton/index.d.ts +5 -3
  343. package/lib/typescript/components/ToggleButton/index.d.ts.map +1 -1
  344. package/lib/typescript/components/index.d.ts +7 -0
  345. package/lib/typescript/components/index.d.ts.map +1 -1
  346. package/lib/typescript/components/picker/styles.d.ts +5 -2
  347. package/lib/typescript/components/picker/styles.d.ts.map +1 -1
  348. package/lib/typescript/components/picker/surfaces.d.ts +5 -1
  349. package/lib/typescript/components/picker/surfaces.d.ts.map +1 -1
  350. package/lib/typescript/components/sheet-header/index.d.ts +24 -0
  351. package/lib/typescript/components/sheet-header/index.d.ts.map +1 -0
  352. package/lib/typescript/components/sheet-header/styles.d.ts +12 -0
  353. package/lib/typescript/components/sheet-header/styles.d.ts.map +1 -0
  354. package/lib/typescript/figma/Icon.figma.d.ts.map +1 -1
  355. package/lib/typescript/figma/Text.figma.d.ts.map +1 -1
  356. package/lib/typescript/providers/toast/insets-container.d.ts +12 -0
  357. package/lib/typescript/providers/toast/insets-container.d.ts.map +1 -1
  358. package/lib/typescript/providers/toast/provider.d.ts +1 -1
  359. package/lib/typescript/providers/toast/provider.d.ts.map +1 -1
  360. package/lib/typescript/providers/toast/types.d.ts +21 -4
  361. package/lib/typescript/providers/toast/types.d.ts.map +1 -1
  362. package/lib/typescript/styles/constants.d.ts +10 -0
  363. package/lib/typescript/styles/constants.d.ts.map +1 -1
  364. package/package.json +5 -5
  365. package/src/components/Alert/index.tsx +5 -2
  366. package/src/components/Avatar/index.tsx +11 -5
  367. package/src/components/Badge/index.tsx +34 -0
  368. package/src/components/Badge/styles.ts +2 -2
  369. package/src/components/BottomSheet/index.tsx +156 -125
  370. package/src/components/BottomSheet/styles.ts +1 -22
  371. package/src/components/Button/index.tsx +10 -2
  372. package/src/components/Card/index.tsx +14 -0
  373. package/src/components/Checkbox/index.tsx +1 -1
  374. package/src/components/Chip/index.tsx +2 -2
  375. package/src/components/ColorArea/ColorAreaPaint.tsx +51 -0
  376. package/src/components/ColorArea/ColorAreaPaint.web.tsx +31 -0
  377. package/src/components/ColorArea/index.tsx +71 -0
  378. package/src/components/ColorArea/styles.ts +18 -0
  379. package/src/components/ColorField/index.tsx +181 -0
  380. package/src/components/ColorField/styles.ts +20 -0
  381. package/src/components/ColorPicker/index.tsx +110 -0
  382. package/src/components/ColorPicker/styles.ts +33 -0
  383. package/src/components/ColorSlider/ColorSliderRailPaint.tsx +60 -0
  384. package/src/components/ColorSlider/ColorSliderRailPaint.web.tsx +33 -0
  385. package/src/components/ColorSlider/index.tsx +147 -0
  386. package/src/components/ColorSlider/styles.ts +72 -0
  387. package/src/components/ColorSwatch/index.tsx +56 -0
  388. package/src/components/ColorSwatch/styles.ts +24 -0
  389. package/src/components/ColorSwatchPicker/index.tsx +150 -0
  390. package/src/components/ColorSwatchPicker/styles.ts +32 -0
  391. package/src/components/CurrencyInput/index.tsx +2 -2
  392. package/src/components/Dialog/index.tsx +10 -0
  393. package/src/components/Dialog/styles.ts +1 -0
  394. package/src/components/Divider/index.tsx +6 -1
  395. package/src/components/Form/styles.ts +1 -1
  396. package/src/components/FullScreenDialog/animation.ts +22 -0
  397. package/src/components/FullScreenDialog/index.tsx +484 -0
  398. package/src/components/FullScreenDialog/styles.ts +23 -0
  399. package/src/components/Heading/styles.ts +3 -0
  400. package/src/components/Icon/index.tsx +46 -6
  401. package/src/components/Icon/styles.ts +15 -0
  402. package/src/components/IconButton/styles.ts +7 -4
  403. package/src/components/Input/index.tsx +2 -2
  404. package/src/components/InsuranceDisclosure/index.tsx +1 -0
  405. package/src/components/Link/index.tsx +3 -1
  406. package/src/components/ListItem/index.tsx +48 -4
  407. package/src/components/ListItem/styles.ts +7 -0
  408. package/src/components/Menu/index.tsx +2 -2
  409. package/src/components/ProgressSegmented/index.tsx +10 -3
  410. package/src/components/Radio/index.tsx +1 -0
  411. package/src/components/ScopedTheme/index.tsx +11 -3
  412. package/src/components/Select/index.tsx +1 -1
  413. package/src/components/Skeleton/index.tsx +5 -1
  414. package/src/components/Stack/HStack.tsx +6 -0
  415. package/src/components/Stack/VStack.tsx +6 -0
  416. package/src/components/Switch/index.tsx +1 -1
  417. package/src/components/Tabs/index.tsx +2 -2
  418. package/src/components/Text/index.tsx +32 -5
  419. package/src/components/Text/styles.ts +39 -1
  420. package/src/components/Textarea/index.tsx +1 -0
  421. package/src/components/Tile/index.tsx +49 -0
  422. package/src/components/Toast/hooks.ts +0 -1
  423. package/src/components/Toast/index.tsx +69 -17
  424. package/src/components/Toast/styles.ts +60 -21
  425. package/src/components/Toast/types.ts +10 -1
  426. package/src/components/ToggleButton/index.tsx +9 -7
  427. package/src/components/index.ts +7 -0
  428. package/src/components/picker/styles.ts +6 -2
  429. package/src/components/picker/surfaces.tsx +15 -2
  430. package/src/components/sheet-header/index.tsx +148 -0
  431. package/src/components/sheet-header/styles.ts +28 -0
  432. package/src/providers/toast/insets-container.tsx +23 -9
  433. package/src/providers/toast/provider.tsx +49 -15
  434. package/src/providers/toast/types.ts +21 -4
  435. package/src/styles/constants.ts +13 -0
@@ -1,4 +1,13 @@
1
- import { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
1
+ import {
2
+ Children,
3
+ forwardRef,
4
+ isValidElement,
5
+ useEffect,
6
+ useMemo,
7
+ useRef,
8
+ useState,
9
+ type ReactNode,
10
+ } from 'react';
2
11
  import { Platform, View } from 'react-native';
3
12
  import { GestureDetector } from 'react-native-gesture-handler';
4
13
  import Animated from 'react-native-reanimated';
@@ -26,7 +35,12 @@ import {
26
35
  toastLabelVariants,
27
36
  toastDescriptionVariants,
28
37
  toastIconVariants,
38
+ toastActionRootVariants,
39
+ toastActionLabelVariants,
40
+ toastCloseRootVariants,
41
+ toastCloseIconVariants,
29
42
  toastStyleSheet,
43
+ toastTextVariants,
30
44
  toastWrapperVariants,
31
45
  } from './styles';
32
46
  import type {
@@ -64,6 +78,26 @@ type ToastDataState = 'entering' | 'open' | 'closed';
64
78
 
65
79
  // --------------------------------------------------
66
80
 
81
+ const isTrailingChild = (child: ReactNode) =>
82
+ isValidElement(child) && (child.type === ToastAction || child.type === ToastClose);
83
+
84
+ const renderToastRow = (children: ReactNode) => {
85
+ const childArray = Children.toArray(children);
86
+ const iconChild = childArray.find((child) => isValidElement(child) && child.type === ToastIcon);
87
+ const trailingChildren = childArray.filter(isTrailingChild);
88
+ const textChildren = childArray.filter(
89
+ (child) => !(isValidElement(child) && child.type === ToastIcon) && !isTrailingChild(child),
90
+ );
91
+
92
+ return (
93
+ <>
94
+ {iconChild}
95
+ {textChildren.length > 0 ? <View className={toastTextVariants()}>{textChildren}</View> : null}
96
+ {trailingChildren}
97
+ </>
98
+ );
99
+ };
100
+
67
101
  const ToastRoot = forwardRef<View, ToastProps>((props, ref) => {
68
102
  const globalConfig = useToastConfig();
69
103
 
@@ -225,6 +259,10 @@ const ToastRoot = forwardRef<View, ToastProps>((props, ref) => {
225
259
 
226
260
  const wrapperClassName = cn(toastWrapperVariants({ placement }));
227
261
 
262
+ // Shared by the visible toast and the native measuring node so the measured
263
+ // height matches what is on screen.
264
+ const content = renderToastRow(children);
265
+
228
266
  return (
229
267
  <AnimationSettingsProvider value={animationSettingsContextValue}>
230
268
  <ParentContext.Provider value={ctx}>
@@ -256,7 +294,7 @@ const ToastRoot = forwardRef<View, ToastProps>((props, ref) => {
256
294
  }),
257
295
  )}
258
296
  >
259
- {children}
297
+ {content}
260
298
  {/*
261
299
  When visible toasts have different heights, the toast adapts to the last visible toast height.
262
300
  In cases where a toast originally has one height and gets smaller when a new toast comes to stack,
@@ -286,7 +324,7 @@ const ToastRoot = forwardRef<View, ToastProps>((props, ref) => {
286
324
  }}
287
325
  {...restProps}
288
326
  >
289
- {children}
327
+ {content}
290
328
  </AnimatedToastRoot>
291
329
  )}
292
330
  </Animated.View>
@@ -381,10 +419,8 @@ const ToastAction = forwardRef<View, ToastActionProps>((props, ref) => {
381
419
  const { children, variant, color, size = 'small', className, ...restProps } = props;
382
420
 
383
421
  const { color: toastColor } = useToastStyleContext();
384
-
385
- // TODO: Add toastActionVariants to styles.ts to restore color-aware action styling
386
-
387
422
  const buttonColor = useButtonColor({ color, toastColor });
423
+ const usesNeutralStandIn = toastColor === 'neutral' && !color;
388
424
 
389
425
  return (
390
426
  <Button
@@ -392,10 +428,12 @@ const ToastAction = forwardRef<View, ToastActionProps>((props, ref) => {
392
428
  variant={variant ?? 'outline'}
393
429
  color={buttonColor}
394
430
  size={size}
395
- className={className}
431
+ className={cn(usesNeutralStandIn ? toastActionRootVariants() : undefined, className)}
396
432
  {...restProps}
397
433
  >
398
- <Button.Label>{children}</Button.Label>
434
+ <Button.Label className={usesNeutralStandIn ? toastActionLabelVariants() : undefined}>
435
+ {children}
436
+ </Button.Label>
399
437
  </Button>
400
438
  );
401
439
  });
@@ -403,8 +441,9 @@ const ToastAction = forwardRef<View, ToastActionProps>((props, ref) => {
403
441
  // --------------------------------------------------
404
442
 
405
443
  const ToastClose = forwardRef<View, ToastCloseProps>((props, ref) => {
406
- const { children, size = 'small', className, onPress, ...restProps } = props;
407
- const { hide, id } = useToastStyleContext();
444
+ const { children, size = 'small', className, onPress, iconClassName, ...restProps } = props;
445
+ const { hide, id, color: toastColor } = useToastStyleContext();
446
+ const usesNeutralStandIn = toastColor === 'neutral';
408
447
 
409
448
  /**
410
449
  * Handle close button press
@@ -426,7 +465,8 @@ const ToastClose = forwardRef<View, ToastCloseProps>((props, ref) => {
426
465
  variant="ghost"
427
466
  size={size}
428
467
  aria-label="Close"
429
- className={className}
468
+ className={cn(usesNeutralStandIn ? toastCloseRootVariants() : undefined, className)}
469
+ iconClassName={cn(usesNeutralStandIn ? toastCloseIconVariants() : undefined, iconClassName)}
430
470
  onPress={handlePress}
431
471
  as={CloseIcon}
432
472
  {...restProps}
@@ -494,18 +534,15 @@ export function DefaultToast(props: DefaultToastProps) {
494
534
  placement={placement}
495
535
  isSwipeable={isSwipeable}
496
536
  animation={animation}
497
- className="flex-row gap-3"
498
537
  hide={hide}
499
538
  show={show}
500
539
  {...(color === 'danger' && { role: 'alert' as const })}
501
540
  {...toastComponentProps}
502
541
  >
503
542
  {icon ? <ToastIcon as={icon} /> : null}
504
- <View className="flex-1">
505
- {label && <ToastTitle>{label}</ToastTitle>}
506
- {description && <ToastDescription>{description}</ToastDescription>}
507
- </View>
508
- {actionLabel && <ToastAction onPress={handleActionPress}>{actionLabel}</ToastAction>}
543
+ {label ? <ToastTitle>{label}</ToastTitle> : null}
544
+ {description ? <ToastDescription>{description}</ToastDescription> : null}
545
+ {actionLabel ? <ToastAction onPress={handleActionPress}>{actionLabel}</ToastAction> : null}
509
546
  </ToastRoot>
510
547
  );
511
548
  }
@@ -527,6 +564,21 @@ type ToastCompoundComponent = typeof ToastRoot & {
527
564
  Close: typeof ToastClose;
528
565
  };
529
566
 
567
+ /**
568
+ * Presentational toast root, rendered inside a `toast.show({ component })`
569
+ * render function with the supplied props spread onto it.
570
+ *
571
+ * The root lays out its direct children as a fixed row regardless of JSX
572
+ * order: the first `Toast.Icon` at the start, every `Toast.Action` and
573
+ * `Toast.Close` at the end in source order, and every other child
574
+ * (`Toast.Title`, `Toast.Description`, custom content) in a text column
575
+ * between them. Additional `Toast.Icon` children are dropped.
576
+ *
577
+ * `Toast.Icon`, `Toast.Action`, and `Toast.Close` must be direct children.
578
+ * They are matched by component identity, so wrapping them in `memo()`, an
579
+ * HOC, or a custom component hides them from the root and they render in the
580
+ * text column instead.
581
+ */
530
582
  export const Toast = Object.assign(ToastRoot, {
531
583
  Title: ToastTitle,
532
584
  Description: ToastDescription,
@@ -1,6 +1,15 @@
1
- import { StyleSheet } from 'react-native';
1
+ import { Platform, StyleSheet } from 'react-native';
2
2
  import { cva, type VariantProps } from '@cdx-ui/utils';
3
3
 
4
+ const NEUTRAL_ON_STRONG_INTERACTION = Platform.select({
5
+ default: 'data-[active=true]:bg-surface-neutral-strong',
6
+ web: [
7
+ 'data-[hover=true]:bg-surface-neutral-strong-hover',
8
+ 'data-[active=true]:data-[hover=true]:bg-surface-neutral-strong',
9
+ 'web:data-[focus-visible=true]:ring-offset-surface-neutral-strong-active',
10
+ ].join(' '),
11
+ });
12
+
4
13
  /**
5
14
  * Toast root styles
6
15
  *
@@ -40,17 +49,18 @@ export const toastRootVariants = cva(
40
49
  // shadow and clips the child's transform mid-transition, producing a
41
50
  // visual "cut off" during enter/exit. Consumers that need clipping for
42
51
  // custom child content (e.g. a background image) can add it themselves.
43
- 'flex-row items-center gap-2 rounded-[var(--border-radius-default)] min-h-12 px-4 py-2 shadow-lg bg-surface-primary border border-stroke-secondary',
52
+ 'flex-row items-center gap-3 rounded-[var(--border-radius-default)] min-h-12 px-4 py-2 shadow-lg border border-transparent',
44
53
  'native:overflow-hidden',
45
54
  ],
46
55
  {
47
56
  variants: {
48
57
  color: {
49
- neutral: '',
50
- info: '',
51
- success: '',
52
- warning: '',
53
- danger: '',
58
+ // color.component.toast.neutral.surface
59
+ neutral: 'bg-surface-neutral-strong-active',
60
+ info: 'bg-surface-info-subtle',
61
+ success: 'bg-surface-success-subtle',
62
+ warning: 'bg-surface-warning-subtle',
63
+ danger: 'bg-surface-danger-subtle',
54
64
  },
55
65
  },
56
66
  defaultVariants: {
@@ -72,6 +82,10 @@ export const toastRootVariants = cva(
72
82
  * on the `top-*` / `bottom-*` variants also seeds the entering-state offset synchronously
73
83
  * — CSS transitions to `translate-y-0` when `data-state` flips to `open`.
74
84
  *
85
+ * Centered placements span the row (`inset-x-0`) and center a `w-fit` box with auto margins.
86
+ * Do not center with `left-1/2` + `-translate-x-1/2`: an absolute box that starts at the
87
+ * midpoint shrink-to-fits into half the container, so short labels wrap long before 460px.
88
+ *
75
89
  * `motion-reduce:transition-none` collapses the transition for users with
76
90
  * `prefers-reduced-motion: reduce`. In that case `transitionend` may never fire, so
77
91
  * the Toast component's safety timeout handles removal.
@@ -96,7 +110,7 @@ export const toastWrapperVariants = cva(
96
110
  ],
97
111
  top: [
98
112
  'top-0 native:left-0 native:right-0',
99
- 'web:left-1/2 web:-translate-x-1/2 web:max-w-[460px]',
113
+ 'web:inset-x-0 web:mx-auto web:w-fit web:max-w-[460px]',
100
114
  'web:data-[state=entering]:-translate-y-2',
101
115
  'web:data-[state=closed]:-translate-y-2',
102
116
  ],
@@ -114,7 +128,7 @@ export const toastWrapperVariants = cva(
114
128
  ],
115
129
  bottom: [
116
130
  'bottom-0 native:left-0 native:right-0',
117
- 'web:left-1/2 web:-translate-x-1/2 web:max-w-[460px]',
131
+ 'web:inset-x-0 web:mx-auto web:w-fit web:max-w-[460px]',
118
132
  'web:data-[state=entering]:translate-y-2',
119
133
  'web:data-[state=closed]:translate-y-2',
120
134
  ],
@@ -132,14 +146,22 @@ export const toastWrapperVariants = cva(
132
146
  },
133
147
  );
134
148
 
149
+ /**
150
+ * Internal text column the root renders between the leading icon and the
151
+ * trailing controls. Holds `Toast.Title`, `Toast.Description`, and any
152
+ * unrecognized children.
153
+ */
154
+ export const toastTextVariants = cva(['flex-1 flex-col min-w-0']);
155
+
135
156
  export const toastLabelVariants = cva(['text-base font-medium'], {
136
157
  variants: {
137
158
  color: {
138
- neutral: 'text-content-primary',
139
- info: 'text-content-info',
140
- success: 'text-content-success',
141
- warning: 'text-content-warning',
142
- danger: 'text-content-danger',
159
+ // color.component.toast.neutral.content
160
+ neutral: 'text-content-neutral-on-strong',
161
+ info: 'text-content-info-on-subtle',
162
+ success: 'text-content-success-on-subtle',
163
+ warning: 'text-content-warning-on-subtle',
164
+ danger: 'text-content-danger-on-subtle',
143
165
  },
144
166
  },
145
167
  defaultVariants: {
@@ -147,14 +169,15 @@ export const toastLabelVariants = cva(['text-base font-medium'], {
147
169
  },
148
170
  });
149
171
 
150
- export const toastDescriptionVariants = cva(['text-sm text-content-primary'], {
172
+ export const toastDescriptionVariants = cva(['text-sm'], {
151
173
  variants: {
152
174
  color: {
153
- neutral: 'text-content-primary',
154
- info: 'text-content-info',
155
- success: 'text-content-success',
156
- warning: 'text-content-warning',
157
- danger: 'text-content-danger',
175
+ // color.component.toast.neutral.content
176
+ neutral: 'text-content-neutral-on-strong',
177
+ info: 'text-content-info-on-subtle',
178
+ success: 'text-content-success-on-subtle',
179
+ warning: 'text-content-warning-on-subtle',
180
+ danger: 'text-content-danger-on-subtle',
158
181
  },
159
182
  },
160
183
  defaultVariants: {
@@ -165,7 +188,8 @@ export const toastDescriptionVariants = cva(['text-sm text-content-primary'], {
165
188
  export const toastIconVariants = cva(['size-5'], {
166
189
  variants: {
167
190
  color: {
168
- neutral: 'text-content-primary',
191
+ // color.component.toast.neutral.content
192
+ neutral: 'text-content-neutral-on-strong',
169
193
  info: 'text-content-info',
170
194
  success: 'text-content-success',
171
195
  warning: 'text-content-warning',
@@ -177,6 +201,21 @@ export const toastIconVariants = cva(['size-5'], {
177
201
  },
178
202
  });
179
203
 
204
+ export const toastActionRootVariants = cva([
205
+ 'border-content-neutral-on-strong', // color.component.toast.neutral.action
206
+ NEUTRAL_ON_STRONG_INTERACTION,
207
+ ]);
208
+
209
+ export const toastActionLabelVariants = cva([
210
+ 'text-content-neutral-on-strong', // color.component.toast.neutral.action
211
+ ]);
212
+
213
+ export const toastCloseRootVariants = cva([NEUTRAL_ON_STRONG_INTERACTION]);
214
+
215
+ export const toastCloseIconVariants = cva([
216
+ 'text-content-neutral-on-strong', // color.component.toast.neutral.content
217
+ ]);
218
+
180
219
  export const toastStyleSheet = StyleSheet.create({
181
220
  root: {
182
221
  borderCurve: 'continuous',
@@ -186,6 +186,15 @@ export interface ToastProps extends ToastRootProps, Omit<ToastComponentProps, 'i
186
186
  * @default true
187
187
  */
188
188
  isAnimatedStyleActive?: boolean;
189
+ /**
190
+ * Laid out automatically: the first `Toast.Icon` at the start, `Toast.Action`
191
+ * and `Toast.Close` at the end, and everything else in a text column between
192
+ * them. Additional `Toast.Icon` children are dropped. `Toast.Icon`,
193
+ * `Toast.Action`, and `Toast.Close` must be **direct** children — wrapping
194
+ * them in `memo()` or an HOC hides them from the layout, and they render in
195
+ * the text column instead.
196
+ */
197
+ children?: React.ReactNode;
189
198
  }
190
199
 
191
200
  /**
@@ -219,7 +228,7 @@ export interface ToastDescriptionProps {
219
228
  /**
220
229
  * Props for the Toast.Icon component
221
230
  */
222
- export interface ToastIconProps extends Omit<IconProps, 'children' | 'as'> {
231
+ export interface ToastIconProps extends Omit<IconProps, 'children' | 'as' | 'color'> {
223
232
  asChild?: boolean;
224
233
  /**
225
234
  * Forge icon component to render. Required unless `asChild` is set.
@@ -157,7 +157,7 @@ ToggleButtonLabel.displayName = 'ToggleButton.Label';
157
157
  // STYLED ICON COMPONENT
158
158
  // =============================================================================
159
159
 
160
- export interface ToggleButtonIconProps extends Omit<IconProps, 'children' | 'as'> {
160
+ export interface ToggleButtonIconProps extends Omit<IconProps, 'children' | 'as' | 'color'> {
161
161
  /** Render a custom element instead of the default icon. */
162
162
  asChild?: boolean;
163
163
  /** Forge icon component to render. */
@@ -333,14 +333,16 @@ const ToggleButtonGroup = forwardRef<View, ToggleButtonGroupProps>(
333
333
  },
334
334
  );
335
335
 
336
- ToggleButtonGroup.displayName = 'ToggleButtonGroup';
336
+ ToggleButtonGroup.displayName = 'ToggleButton.Group';
337
337
 
338
- export const ToggleButton = Object.assign(ToggleButtonRoot, {
339
- Label: ToggleButtonLabel,
340
- Icon: ToggleButtonIcon,
341
- }) as typeof ToggleButtonRoot & {
338
+ type ToggleButtonCompoundComponent = typeof ToggleButtonRoot & {
342
339
  Label: typeof ToggleButtonLabel;
343
340
  Icon: typeof ToggleButtonIcon;
341
+ Group: typeof ToggleButtonGroup;
344
342
  };
345
343
 
346
- export { ToggleButtonGroup };
344
+ export const ToggleButton = Object.assign(ToggleButtonRoot, {
345
+ Label: ToggleButtonLabel,
346
+ Icon: ToggleButtonIcon,
347
+ Group: ToggleButtonGroup,
348
+ }) as ToggleButtonCompoundComponent;
@@ -10,6 +10,12 @@ export * from './Card';
10
10
  export * from './Carousel';
11
11
  export * from './Checkbox';
12
12
  export * from './Chip';
13
+ export * from './ColorArea';
14
+ export * from './ColorField';
15
+ export * from './ColorPicker';
16
+ export * from './ColorSlider';
17
+ export { ColorSwatch, type ColorSwatchProps, type ColorSwatchVariantProps } from './ColorSwatch';
18
+ export * from './ColorSwatchPicker';
13
19
  export * from './CurrencyInput';
14
20
  export * from './DateField';
15
21
  export * from './Calendar';
@@ -26,6 +32,7 @@ export * from './Divider';
26
32
  export * from './Drawer';
27
33
  export * from './Field';
28
34
  export * from './Form';
35
+ export * from './FullScreenDialog';
29
36
  export * from './Image';
30
37
  export * from './InsuranceDisclosure';
31
38
  export * from './Input';
@@ -1,8 +1,12 @@
1
1
  import { Platform } from 'react-native';
2
+ import { MODAL_OVERLAY_Z_INDEX } from '@cdx-ui/primitives';
2
3
  import { cva } from '@cdx-ui/utils';
3
4
 
4
- /** Keeps the picker popover above app chrome and other absolutely-positioned surfaces. */
5
- export const PICKER_POPOVER_Z_INDEX = 9999;
5
+ /**
6
+ * Modal layer, so on web a popover opened from a `Dialog` or `FullScreenDialog` paints above it:
7
+ * equal z-index, and the popover mounts later in `document.body`.
8
+ */
9
+ export const PICKER_POPOVER_Z_INDEX = MODAL_OVERLAY_Z_INDEX;
6
10
 
7
11
  export const pickerPopoverContentVariants = cva([
8
12
  'bg-surface-primary',
@@ -2,10 +2,12 @@ import { useCallback, useEffect, useRef, useState, type ReactNode, type RefObjec
2
2
  import { ScrollView, View } from 'react-native';
3
3
  import { FadeIn, FadeOut } from 'react-native-reanimated';
4
4
  import {
5
+ dataAttributes,
5
6
  OverlayContainer,
6
7
  useAnchoredOverlay,
7
8
  useDismissOverlay,
8
9
  useEscapeKey,
10
+ type OverlayWidthPolicy,
9
11
  } from '@cdx-ui/primitives';
10
12
  import { cn, mergeRefs } from '@cdx-ui/utils';
11
13
  import { Dialog } from '../Dialog';
@@ -107,6 +109,9 @@ interface PickerPopoverSurfaceProps {
107
109
  triggerRef?: RefObject<View | null>;
108
110
  children: ReactNode;
109
111
  className?: string;
112
+ contentClassName?: string;
113
+ dataSlot?: string;
114
+ width?: OverlayWidthPolicy;
110
115
  }
111
116
 
112
117
  export function PickerPopoverSurface({
@@ -117,6 +122,9 @@ export function PickerPopoverSurface({
117
122
  triggerRef,
118
123
  children,
119
124
  className,
125
+ contentClassName,
126
+ dataSlot,
127
+ width = 'anchor',
120
128
  }: PickerPopoverSurfaceProps) {
121
129
  const contentRef = useRef<View>(null);
122
130
  const [dismissEnabled, setDismissEnabled] = useState(false);
@@ -144,7 +152,7 @@ export function PickerPopoverSurface({
144
152
  placement: 'bottom-start',
145
153
  offset: 4,
146
154
  collisionBehavior: 'flip-shift',
147
- width: 'anchor',
155
+ width,
148
156
  });
149
157
 
150
158
  const excludeRefs = triggerRef ? [anchorRef, triggerRef] : [anchorRef];
@@ -168,8 +176,13 @@ export function PickerPopoverSurface({
168
176
  className={cn(pickerPopoverContentVariants(), className)}
169
177
  style={style}
170
178
  accessibilityViewIsModal
179
+ {...dataAttributes({ slot: dataSlot })}
171
180
  >
172
- <ScrollView scrollEventThrottle={16} showsVerticalScrollIndicator={false}>
181
+ <ScrollView
182
+ contentContainerClassName={contentClassName}
183
+ scrollEventThrottle={16}
184
+ showsVerticalScrollIndicator={false}
185
+ >
173
186
  {children}
174
187
  </ScrollView>
175
188
  </View>
@@ -0,0 +1,148 @@
1
+ import { forwardRef, type ComponentRef, type ReactNode, type Ref } from 'react';
2
+ import { Platform, View, type ViewProps } from 'react-native';
3
+ import { cn } from '@cdx-ui/utils';
4
+ import { ArrowBack, Close, type ForgeIcon } from '@cdx-ui/icons';
5
+ import { Heading } from '../Heading';
6
+ import { IconButton } from '../IconButton';
7
+ import { Text } from '../Text';
8
+ import {
9
+ SHEET_HEADER_BUTTON_SPACER,
10
+ SHEET_HEADER_DEFAULT_BACKGROUND,
11
+ SHEET_HEADER_FOCUSABLE_TITLE,
12
+ sheetHeaderVariants,
13
+ } from './styles';
14
+
15
+ // Shared back / title / close header row for sheet-style surfaces. Not exported from the package.
16
+
17
+ const WEB_PROGRAMMATIC_FOCUS = Platform.OS === 'web' ? { tabIndex: -1 } : undefined;
18
+
19
+ export type SheetHeaderTitleRef = ComponentRef<typeof Heading>;
20
+
21
+ export interface SheetHeaderProps extends Omit<ViewProps, 'children'> {
22
+ title?: string;
23
+ subtitle?: string;
24
+ children?: ReactNode;
25
+ className?: string;
26
+ onClose?: () => void;
27
+ closeAccessibilityLabel?: string;
28
+ onBack?: () => void;
29
+ backAccessibilityLabel?: string;
30
+ /** `nativeID` for the default title, so a host surface can point `aria-labelledby` at it. */
31
+ titleNativeID?: string;
32
+ /** Ref to the default title. Not attached when `children` replaces the title. */
33
+ titleRef?: Ref<SheetHeaderTitleRef>;
34
+ /** Lets the host move focus to the default title. On web it gets `tabIndex={-1}`, so it stays out of the tab order. */
35
+ titleFocusable?: boolean;
36
+ /** Replaces the default header surface class. */
37
+ backgroundClassName?: string;
38
+ }
39
+
40
+ export const SheetHeader = forwardRef<View, SheetHeaderProps>(
41
+ (
42
+ {
43
+ title,
44
+ subtitle,
45
+ children,
46
+ className,
47
+ onClose,
48
+ closeAccessibilityLabel = 'Close',
49
+ onBack,
50
+ backAccessibilityLabel = 'Go back',
51
+ titleNativeID,
52
+ titleRef,
53
+ titleFocusable = false,
54
+ backgroundClassName = SHEET_HEADER_DEFAULT_BACKGROUND,
55
+ ...props
56
+ },
57
+ ref,
58
+ ) => {
59
+ const hasTitle = title !== undefined && title !== '';
60
+ const hasContent = hasTitle || !!children || !!onBack;
61
+ const computedClassName = cn(
62
+ sheetHeaderVariants({ hasTitle: hasContent }),
63
+ backgroundClassName,
64
+ className,
65
+ );
66
+
67
+ return (
68
+ <View ref={ref} className={computedClassName} {...props}>
69
+ {onBack ? (
70
+ <SheetHeaderButton
71
+ as={ArrowBack}
72
+ onPress={onBack}
73
+ accessibilityLabel={backAccessibilityLabel}
74
+ />
75
+ ) : (
76
+ <SheetHeaderButtonSpacer />
77
+ )}
78
+ <View className="flex-1">
79
+ {children ??
80
+ (hasTitle ? (
81
+ <View>
82
+ <Heading
83
+ ref={titleRef}
84
+ size="sm"
85
+ className={cn('text-center', titleFocusable && SHEET_HEADER_FOCUSABLE_TITLE)}
86
+ nativeID={titleNativeID}
87
+ {...(titleFocusable ? WEB_PROGRAMMATIC_FOCUS : undefined)}
88
+ >
89
+ {title}
90
+ </Heading>
91
+ {subtitle ? (
92
+ <Text size="sm" className="text-center text-content-secondary">
93
+ {subtitle}
94
+ </Text>
95
+ ) : null}
96
+ </View>
97
+ ) : null)}
98
+ </View>
99
+ {onClose ? (
100
+ <SheetHeaderButton
101
+ as={Close}
102
+ onPress={onClose}
103
+ accessibilityLabel={closeAccessibilityLabel}
104
+ />
105
+ ) : (
106
+ <SheetHeaderButtonSpacer />
107
+ )}
108
+ </View>
109
+ );
110
+ },
111
+ );
112
+
113
+ SheetHeader.displayName = 'SheetHeader';
114
+
115
+ interface SheetHeaderButtonProps {
116
+ as: ForgeIcon;
117
+ onPress: () => void;
118
+ accessibilityLabel: string;
119
+ }
120
+
121
+ function SheetHeaderButton({ as, onPress, accessibilityLabel }: Readonly<SheetHeaderButtonProps>) {
122
+ return (
123
+ <IconButton
124
+ as={as}
125
+ variant="solid"
126
+ color="neutral"
127
+ size="default"
128
+ onPress={onPress}
129
+ hitSlop={12}
130
+ accessibilityLabel={accessibilityLabel}
131
+ />
132
+ );
133
+ }
134
+
135
+ SheetHeaderButton.displayName = 'SheetHeader.Button';
136
+
137
+ function SheetHeaderButtonSpacer() {
138
+ return (
139
+ <View
140
+ className={SHEET_HEADER_BUTTON_SPACER}
141
+ accessibilityElementsHidden
142
+ importantForAccessibility="no-hide-descendants"
143
+ aria-hidden
144
+ />
145
+ );
146
+ }
147
+
148
+ SheetHeaderButtonSpacer.displayName = 'SheetHeader.ButtonSpacer';
@@ -0,0 +1,28 @@
1
+ import { cva, type VariantProps } from '@cdx-ui/utils';
2
+ import { iconButtonSizeClassNames } from '../IconButton/styles';
3
+
4
+ /** Surface behind the header row unless the host passes `backgroundClassName`. */
5
+ export const SHEET_HEADER_DEFAULT_BACKGROUND = 'bg-surface-primary';
6
+
7
+ /** Holds an absent back or close button's place so the title stays centered. */
8
+ export const SHEET_HEADER_BUTTON_SPACER = iconButtonSizeClassNames.default;
9
+
10
+ /** The title only takes programmatic focus, so it never shows a focus ring. */
11
+ export const SHEET_HEADER_FOCUSABLE_TITLE = 'web:outline-none';
12
+
13
+ export const sheetHeaderVariants = cva(
14
+ ['flex-row items-center justify-between min-h-11 px-4 pt-3 pb-2.5', 'text-content-primary'],
15
+ {
16
+ variants: {
17
+ hasTitle: {
18
+ true: '',
19
+ false: 'justify-end',
20
+ },
21
+ },
22
+ defaultVariants: {
23
+ hasTitle: true,
24
+ },
25
+ },
26
+ );
27
+
28
+ export type SheetHeaderVariants = VariantProps<typeof sheetHeaderVariants>;