@cdx-ui/components 0.2.3 → 0.2.5

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 (296) hide show
  1. package/AGENTS.md +24 -0
  2. package/README.md +2 -0
  3. package/coverage.svg +1 -1
  4. package/docs/components/accordion/content.md +538 -0
  5. package/docs/components/alert/content.md +203 -0
  6. package/docs/components/alert-dialog/content.md +319 -0
  7. package/docs/components/avatar/content.md +368 -0
  8. package/docs/components/avatar/design.md +202 -0
  9. package/docs/components/badge/content.md +225 -0
  10. package/docs/components/bottom-sheet/content.md +353 -0
  11. package/docs/components/bottom-sheet/design.md +249 -0
  12. package/docs/components/box/content.md +141 -0
  13. package/docs/components/breadcrumbs/content.md +169 -0
  14. package/docs/components/button/content.md +398 -0
  15. package/docs/components/button/design.md +258 -0
  16. package/docs/components/calendar/content.md +137 -0
  17. package/docs/components/card/content.md +283 -0
  18. package/docs/components/carousel/content.md +417 -0
  19. package/docs/components/checkbox/content.md +236 -0
  20. package/docs/components/checkbox/design.md +214 -0
  21. package/docs/components/chip/content.md +439 -0
  22. package/docs/components/chip/design.md +418 -0
  23. package/docs/components/color-area/content.md +84 -0
  24. package/docs/components/color-field/content.md +132 -0
  25. package/docs/components/color-picker/content.md +209 -0
  26. package/docs/components/color-slider/content.md +118 -0
  27. package/docs/components/color-swatch/content.md +62 -0
  28. package/docs/components/color-swatch-picker/content.md +124 -0
  29. package/docs/components/content.md +98 -0
  30. package/docs/components/currency-input/content.md +205 -0
  31. package/docs/components/data-grid/content.md +521 -0
  32. package/docs/components/date-field/content.md +147 -0
  33. package/docs/components/date-picker/content.md +360 -0
  34. package/docs/components/date-range-picker/content.md +301 -0
  35. package/docs/components/date-time-field/content.md +157 -0
  36. package/docs/components/date-time-list/content.md +105 -0
  37. package/docs/components/date-time-picker/content.md +272 -0
  38. package/docs/components/dialog/content.md +436 -0
  39. package/docs/components/dialog/design.md +192 -0
  40. package/docs/components/divider/content.md +112 -0
  41. package/docs/components/drawer/content.md +428 -0
  42. package/docs/components/field/content.md +277 -0
  43. package/docs/components/form/content.md +62 -0
  44. package/docs/components/full-screen-dialog/content.md +881 -0
  45. package/docs/components/heading/content.md +55 -0
  46. package/docs/components/icon/content.md +190 -0
  47. package/docs/components/icon-button/content.md +200 -0
  48. package/docs/components/icon-button/design.md +165 -0
  49. package/docs/components/image/content.md +104 -0
  50. package/docs/components/input/content.md +346 -0
  51. package/docs/components/input/design.md +389 -0
  52. package/docs/components/insurance-disclosure/content.md +103 -0
  53. package/docs/components/link/content.md +180 -0
  54. package/docs/components/link/design.md +160 -0
  55. package/docs/components/list-item/content.md +695 -0
  56. package/docs/components/menu/content.md +1254 -0
  57. package/docs/components/month-calendar/content.md +84 -0
  58. package/docs/components/month-picker/content.md +273 -0
  59. package/docs/components/otp-input/content.md +327 -0
  60. package/docs/components/progress-bar/content.md +87 -0
  61. package/docs/components/progress-circle/content.md +176 -0
  62. package/docs/components/progress-segmented/content.md +119 -0
  63. package/docs/components/quick-action-button/content.md +154 -0
  64. package/docs/components/quick-action-button/design.md +170 -0
  65. package/docs/components/radio/content.md +224 -0
  66. package/docs/components/range-calendar/content.md +123 -0
  67. package/docs/components/reorderable-list/content.md +311 -0
  68. package/docs/components/scoped-theme/content.md +47 -0
  69. package/docs/components/scroll-shadow/content.md +693 -0
  70. package/docs/components/select/content.md +473 -0
  71. package/docs/components/select/design.md +301 -0
  72. package/docs/components/skeleton/content.md +104 -0
  73. package/docs/components/slider/content.md +423 -0
  74. package/docs/components/stack/content.md +161 -0
  75. package/docs/components/switch/content.md +150 -0
  76. package/docs/components/switch/design.md +208 -0
  77. package/docs/components/table/content.md +548 -0
  78. package/docs/components/table-pagination/content.md +177 -0
  79. package/docs/components/tabs/content.md +297 -0
  80. package/docs/components/text/content.md +142 -0
  81. package/docs/components/textarea/content.md +222 -0
  82. package/docs/components/tile/content.md +702 -0
  83. package/docs/components/toast/content.md +456 -0
  84. package/docs/components/toggle-button/content.md +505 -0
  85. package/docs/components/tooltip/content.md +350 -0
  86. package/docs/components/virtualized-list/content.md +250 -0
  87. package/docs/foundations/content.md +9 -0
  88. package/docs/foundations/expressions/icons/content.md +19 -0
  89. package/docs/foundations/styles/tokens/all-tokens/content.md +192 -0
  90. package/docs/foundations/styles/tokens/what-are-tokens/content.md +33 -0
  91. package/docs/foundations/styles/tokens/what-are-tokens/design.md +33 -0
  92. package/docs/getting-started/content.md +4 -0
  93. package/docs/getting-started/designers/content.md +13 -0
  94. package/docs/getting-started/designers/design.md +13 -0
  95. package/docs/getting-started/developers/accessibility/content.md +31 -0
  96. package/docs/getting-started/developers/content.md +612 -0
  97. package/docs/getting-started/developers/styling/content.md +195 -0
  98. package/docs/llms.txt +195 -0
  99. package/docs/patterns/account-management/content.md +75 -0
  100. package/docs/patterns/authentication/content.md +50 -0
  101. package/docs/patterns/content.md +10 -0
  102. package/docs/patterns/dashboard/content.md +34 -0
  103. package/docs/patterns/empty-states/content.md +32 -0
  104. package/docs/patterns/forms/content.md +108 -0
  105. package/docs/patterns/onboarding/content.md +69 -0
  106. package/docs/patterns/payments/content.md +35 -0
  107. package/docs/patterns/settings/content.md +72 -0
  108. package/docs/resources/content.md +9 -0
  109. package/docs/resources/figma-libraries/content.md +42 -0
  110. package/docs/resources/release-notes/0.0.1-beta.118/content.md +27 -0
  111. package/docs/resources/release-notes/0.0.1-beta.122/content.md +21 -0
  112. package/docs/resources/release-notes/0.0.1-beta.124/content.md +16 -0
  113. package/docs/resources/release-notes/0.0.1-beta.126/content.md +10 -0
  114. package/docs/resources/release-notes/0.0.1-beta.127/content.md +14 -0
  115. package/docs/resources/release-notes/0.0.1-beta.128/content.md +9 -0
  116. package/docs/resources/release-notes/0.0.1-beta.129/content.md +18 -0
  117. package/docs/resources/release-notes/0.0.1-beta.130/content.md +18 -0
  118. package/docs/resources/release-notes/0.0.1-beta.133/content.md +7 -0
  119. package/docs/resources/release-notes/0.0.1-beta.134/content.md +17 -0
  120. package/docs/resources/release-notes/0.0.1-beta.136/content.md +7 -0
  121. package/docs/resources/release-notes/0.0.1-beta.137/content.md +10 -0
  122. package/docs/resources/release-notes/0.0.1-beta.138/content.md +7 -0
  123. package/docs/resources/release-notes/0.0.1-beta.139/content.md +13 -0
  124. package/docs/resources/release-notes/0.0.1-beta.140/content.md +26 -0
  125. package/docs/resources/release-notes/0.0.1-beta.141/content.md +63 -0
  126. package/docs/resources/release-notes/0.0.1-beta.142/content.md +7 -0
  127. package/docs/resources/release-notes/0.0.1-beta.143/content.md +12 -0
  128. package/docs/resources/release-notes/0.0.1-beta.144/content.md +7 -0
  129. package/docs/resources/release-notes/0.0.1-beta.145/content.md +7 -0
  130. package/docs/resources/release-notes/0.0.1-beta.147/content.md +10 -0
  131. package/docs/resources/release-notes/0.0.1-beta.149/content.md +10 -0
  132. package/docs/resources/release-notes/0.0.1-beta.150/content.md +13 -0
  133. package/docs/resources/release-notes/0.0.1-beta.152/content.md +7 -0
  134. package/docs/resources/release-notes/0.0.1-beta.154/content.md +15 -0
  135. package/docs/resources/release-notes/0.0.1-beta.156/content.md +7 -0
  136. package/docs/resources/release-notes/0.0.1-beta.158/content.md +9 -0
  137. package/docs/resources/release-notes/0.0.1-beta.159/content.md +11 -0
  138. package/docs/resources/release-notes/0.0.1-beta.160/content.md +7 -0
  139. package/docs/resources/release-notes/0.0.1-beta.161/content.md +7 -0
  140. package/docs/resources/release-notes/0.0.1-beta.163/content.md +7 -0
  141. package/docs/resources/release-notes/0.0.1-beta.164/content.md +9 -0
  142. package/docs/resources/release-notes/0.0.1-beta.166/content.md +17 -0
  143. package/docs/resources/release-notes/0.0.1-beta.167/content.md +7 -0
  144. package/docs/resources/release-notes/0.0.1-beta.168/content.md +7 -0
  145. package/docs/resources/release-notes/0.0.1-beta.169/content.md +7 -0
  146. package/docs/resources/release-notes/0.0.1-beta.171/content.md +16 -0
  147. package/docs/resources/release-notes/0.0.1-beta.172/content.md +24 -0
  148. package/docs/resources/release-notes/0.0.1-beta.173/content.md +15 -0
  149. package/docs/resources/release-notes/0.0.1-beta.174/content.md +7 -0
  150. package/docs/resources/release-notes/0.0.1-beta.176/content.md +32 -0
  151. package/docs/resources/release-notes/0.0.1-beta.179/content.md +11 -0
  152. package/docs/resources/release-notes/0.0.1-beta.182/content.md +13 -0
  153. package/docs/resources/release-notes/0.0.1-beta.185/content.md +7 -0
  154. package/docs/resources/release-notes/0.0.1-beta.187/content.md +27 -0
  155. package/docs/resources/release-notes/0.1.1/content.md +23 -0
  156. package/docs/resources/release-notes/0.1.2/content.md +7 -0
  157. package/docs/resources/release-notes/0.1.4/content.md +19 -0
  158. package/docs/resources/release-notes/0.1.5/content.md +7 -0
  159. package/docs/resources/release-notes/0.1.6/content.md +7 -0
  160. package/docs/resources/release-notes/0.2.0/content.md +31 -0
  161. package/docs/resources/release-notes/0.2.1/content.md +17 -0
  162. package/docs/resources/release-notes/0.2.2/content.md +11 -0
  163. package/docs/resources/release-notes/0.2.3/content.md +15 -0
  164. package/docs/resources/release-notes/0.2.4/content.md +17 -0
  165. package/docs/resources/release-notes/content.md +65 -0
  166. package/lib/commonjs/components/Box/Box.js +9 -1
  167. package/lib/commonjs/components/Box/Box.js.map +1 -1
  168. package/lib/commonjs/components/Breadcrumbs/index.js +28 -3
  169. package/lib/commonjs/components/Breadcrumbs/index.js.map +1 -1
  170. package/lib/commonjs/components/Breadcrumbs/styles.js +27 -0
  171. package/lib/commonjs/components/Breadcrumbs/styles.js.map +1 -1
  172. package/lib/commonjs/components/DateTimeList/index.js +11 -26
  173. package/lib/commonjs/components/DateTimeList/index.js.map +1 -1
  174. package/lib/commonjs/components/DateTimeList/styles.js +2 -12
  175. package/lib/commonjs/components/DateTimeList/styles.js.map +1 -1
  176. package/lib/commonjs/components/ListItem/index.js.map +1 -1
  177. package/lib/commonjs/components/ListItem/styles.js +2 -1
  178. package/lib/commonjs/components/ListItem/styles.js.map +1 -1
  179. package/lib/commonjs/components/Menu/index.js +11 -5
  180. package/lib/commonjs/components/Menu/index.js.map +1 -1
  181. package/lib/commonjs/components/ScrollShadow/gradient.js +29 -0
  182. package/lib/commonjs/components/ScrollShadow/gradient.js.map +1 -0
  183. package/lib/commonjs/components/ScrollShadow/index.js +171 -44
  184. package/lib/commonjs/components/ScrollShadow/index.js.map +1 -1
  185. package/lib/commonjs/components/ScrollShadow/styles.js +58 -14
  186. package/lib/commonjs/components/ScrollShadow/styles.js.map +1 -1
  187. package/lib/commonjs/components/ScrollShadow/useComposedScrollHandler.js +63 -0
  188. package/lib/commonjs/components/ScrollShadow/useComposedScrollHandler.js.map +1 -0
  189. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js +48 -8
  190. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js.map +1 -1
  191. package/lib/commonjs/components/Stack/HStack.js +6 -2
  192. package/lib/commonjs/components/Stack/HStack.js.map +1 -1
  193. package/lib/commonjs/components/Stack/VStack.js +6 -2
  194. package/lib/commonjs/components/Stack/VStack.js.map +1 -1
  195. package/lib/commonjs/components/Tabs/index.js +16 -23
  196. package/lib/commonjs/components/Tabs/index.js.map +1 -1
  197. package/lib/commonjs/components/Tabs/styles.js +1 -10
  198. package/lib/commonjs/components/Tabs/styles.js.map +1 -1
  199. package/lib/commonjs/figma/ListItem.SectionHeader.figma.js +20 -5
  200. package/lib/commonjs/figma/ListItem.SectionHeader.figma.js.map +1 -1
  201. package/lib/commonjs/index.js +10 -10
  202. package/lib/commonjs/index.js.map +1 -1
  203. package/lib/module/components/Box/Box.js +9 -1
  204. package/lib/module/components/Box/Box.js.map +1 -1
  205. package/lib/module/components/Breadcrumbs/index.js +29 -4
  206. package/lib/module/components/Breadcrumbs/index.js.map +1 -1
  207. package/lib/module/components/Breadcrumbs/styles.js +26 -0
  208. package/lib/module/components/Breadcrumbs/styles.js.map +1 -1
  209. package/lib/module/components/DateTimeList/index.js +12 -27
  210. package/lib/module/components/DateTimeList/index.js.map +1 -1
  211. package/lib/module/components/DateTimeList/styles.js +1 -11
  212. package/lib/module/components/DateTimeList/styles.js.map +1 -1
  213. package/lib/module/components/ListItem/index.js.map +1 -1
  214. package/lib/module/components/ListItem/styles.js +2 -1
  215. package/lib/module/components/ListItem/styles.js.map +1 -1
  216. package/lib/module/components/Menu/index.js +11 -5
  217. package/lib/module/components/Menu/index.js.map +1 -1
  218. package/lib/module/components/ScrollShadow/gradient.js +24 -0
  219. package/lib/module/components/ScrollShadow/gradient.js.map +1 -0
  220. package/lib/module/components/ScrollShadow/index.js +170 -48
  221. package/lib/module/components/ScrollShadow/index.js.map +1 -1
  222. package/lib/module/components/ScrollShadow/styles.js +57 -13
  223. package/lib/module/components/ScrollShadow/styles.js.map +1 -1
  224. package/lib/module/components/ScrollShadow/useComposedScrollHandler.js +57 -0
  225. package/lib/module/components/ScrollShadow/useComposedScrollHandler.js.map +1 -0
  226. package/lib/module/components/ScrollShadow/useScrollShadow.js +46 -8
  227. package/lib/module/components/ScrollShadow/useScrollShadow.js.map +1 -1
  228. package/lib/module/components/Stack/HStack.js +6 -2
  229. package/lib/module/components/Stack/HStack.js.map +1 -1
  230. package/lib/module/components/Stack/VStack.js +6 -2
  231. package/lib/module/components/Stack/VStack.js.map +1 -1
  232. package/lib/module/components/Tabs/index.js +17 -24
  233. package/lib/module/components/Tabs/index.js.map +1 -1
  234. package/lib/module/components/Tabs/styles.js +0 -9
  235. package/lib/module/components/Tabs/styles.js.map +1 -1
  236. package/lib/module/figma/ListItem.SectionHeader.figma.js +20 -5
  237. package/lib/module/figma/ListItem.SectionHeader.figma.js.map +1 -1
  238. package/lib/module/index.js +6 -1
  239. package/lib/module/index.js.map +1 -1
  240. package/lib/typescript/animation/hooks/usePopupDialogContentAnimation.d.ts +2 -2
  241. package/lib/typescript/animation/hooks/usePopupOverlayAnimation.d.ts +2 -2
  242. package/lib/typescript/components/Box/Box.d.ts +4 -0
  243. package/lib/typescript/components/Box/Box.d.ts.map +1 -1
  244. package/lib/typescript/components/Breadcrumbs/index.d.ts +3 -1
  245. package/lib/typescript/components/Breadcrumbs/index.d.ts.map +1 -1
  246. package/lib/typescript/components/Breadcrumbs/styles.d.ts +2 -0
  247. package/lib/typescript/components/Breadcrumbs/styles.d.ts.map +1 -1
  248. package/lib/typescript/components/DateTimeList/index.d.ts.map +1 -1
  249. package/lib/typescript/components/DateTimeList/styles.d.ts +1 -4
  250. package/lib/typescript/components/DateTimeList/styles.d.ts.map +1 -1
  251. package/lib/typescript/components/ListItem/index.d.ts +5 -4
  252. package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
  253. package/lib/typescript/components/ListItem/styles.d.ts +1 -1
  254. package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
  255. package/lib/typescript/components/Menu/index.d.ts.map +1 -1
  256. package/lib/typescript/components/ScrollShadow/gradient.d.ts +7 -0
  257. package/lib/typescript/components/ScrollShadow/gradient.d.ts.map +1 -0
  258. package/lib/typescript/components/ScrollShadow/index.d.ts +57 -15
  259. package/lib/typescript/components/ScrollShadow/index.d.ts.map +1 -1
  260. package/lib/typescript/components/ScrollShadow/styles.d.ts +8 -2
  261. package/lib/typescript/components/ScrollShadow/styles.d.ts.map +1 -1
  262. package/lib/typescript/components/ScrollShadow/useComposedScrollHandler.d.ts +13 -0
  263. package/lib/typescript/components/ScrollShadow/useComposedScrollHandler.d.ts.map +1 -0
  264. package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts +15 -2
  265. package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts.map +1 -1
  266. package/lib/typescript/components/Stack/HStack.d.ts +3 -2
  267. package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
  268. package/lib/typescript/components/Stack/VStack.d.ts +3 -2
  269. package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
  270. package/lib/typescript/components/Tabs/index.d.ts.map +1 -1
  271. package/lib/typescript/components/Tabs/styles.d.ts +0 -7
  272. package/lib/typescript/components/Tabs/styles.d.ts.map +1 -1
  273. package/lib/typescript/components/Toast/animation.d.ts +3 -3
  274. package/lib/typescript/components/Toast/animation.d.ts.map +1 -1
  275. package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts.map +1 -1
  276. package/lib/typescript/index.d.ts +6 -1
  277. package/lib/typescript/index.d.ts.map +1 -1
  278. package/package.json +11 -9
  279. package/src/components/Box/Box.tsx +18 -4
  280. package/src/components/Breadcrumbs/index.tsx +28 -4
  281. package/src/components/Breadcrumbs/styles.ts +30 -0
  282. package/src/components/DateTimeList/index.tsx +13 -26
  283. package/src/components/DateTimeList/styles.ts +1 -10
  284. package/src/components/ListItem/index.tsx +5 -4
  285. package/src/components/ListItem/styles.ts +1 -0
  286. package/src/components/Menu/index.tsx +11 -8
  287. package/src/components/ScrollShadow/gradient.ts +48 -0
  288. package/src/components/ScrollShadow/index.tsx +300 -69
  289. package/src/components/ScrollShadow/styles.ts +45 -28
  290. package/src/components/ScrollShadow/useComposedScrollHandler.ts +58 -0
  291. package/src/components/ScrollShadow/useScrollShadow.ts +72 -10
  292. package/src/components/Stack/HStack.tsx +8 -4
  293. package/src/components/Stack/VStack.tsx +8 -4
  294. package/src/components/Tabs/index.tsx +25 -35
  295. package/src/components/Tabs/styles.ts +0 -9
  296. package/src/index.ts +8 -1
@@ -0,0 +1,249 @@
1
+ # Bottom Sheet — Design (https://design.candescent.com/docs/components/bottom-sheet)
2
+
3
+ ## Usage
4
+
5
+ **Common alternative names:** Sheet, Action sheet, Slide-up panel, Bottom drawer
6
+
7
+ ## Anatomy
8
+
9
+ A bottom sheet is built from a **header** area (top of the sheet), a **body**, and a **footer**.
10
+
11
+ **Anatomy\_avatar**
12
+
13
+ 1. **Sheet surface:** The panel anchored to the bottom of the screen; rounded top corners, square at the bottom edge.
14
+ 2. **Drag handle:** Horizontal bar at the top of the sheet that indicates the sheet can be dragged vertically.
15
+ 3. **Leading button** (optional)**:** Optional action in the leading corner (top-left), for example back or a contextual icon.
16
+ 4. **Title** (optional)**:** Optional label for the sheet task, shown when the sheet needs a clear name.
17
+ 5. **Close control** (optional)**:** Optional dismiss control in the trailing corner (top-right).
18
+ 6. **Slot:** Space for lists, forms, controls, or any other components used as the sheet content. Scrolls when the sheet uses the scroll view.
19
+ 7. **Footer:** Includes a primary button by default at the bottom of the sheet. Secondary actions can be added when needed.
20
+
21
+ ### Full bleed
22
+
23
+ Full bleed controls how slot content is laid out horizontally within the bottom sheet, defining whether it stays within the standard gutters or can extend edge to edge within safe area boundaries.
24
+
25
+ - **fullBleed: False (default)**
26
+
27
+ Slot uses horizontal inset; lists and fields do not touch the sheet side edges.
28
+ - **fullBleed: True**
29
+
30
+ Slot content runs edge-to-edge within the sheet; use when full-width lists, imagery, or dividers should meet the sheet boundary.
31
+
32
+ ### Scroll view
33
+
34
+ The scroll view defines how the bottom sheet handles content height and scrolling, determining whether it expands to full screen with internal scrolling or remains fixed at a shorter height.
35
+
36
+ - **Use ScrollView?: True (default)**
37
+
38
+ Built-in scrolling in the slot; pairs with fixed height and long content.
39
+ - **Use ScrollView?: False**
40
+
41
+ No component-level scroll wrapper; best when content is short, hugs content height is used, or the slot owns its own scroll behavior.
42
+
43
+ ### Footer
44
+
45
+ - **Show Footer?: True (default)**
46
+
47
+ Footer strip visible; includes the default primary button and optional secondary actions per button hierarchy.
48
+ - **Show Footer: False**
49
+
50
+ Footer hidden; use when the flow completes from slot selection alone or from header actions only (document when this is appropriate).
51
+
52
+ ---
53
+
54
+ Usage
55
+
56
+ ### When to use
57
+
58
+ > [!TIP]
59
+ >
60
+ > **For short tasks or choices tied to the current screen**
61
+ >
62
+ > - ex: Sort or filter a list
63
+ > - ex: Share or export
64
+ > - ex: Overflow (“More”) actions
65
+
66
+ > [!TIP]
67
+ >
68
+ > **For extra detail or options without changing screens**
69
+ >
70
+ > - ex: Item details or metadata
71
+ > - ex: Pickers and lightweight previews
72
+
73
+ > [!TIP]
74
+ >
75
+ > **For a small amount of secondary input**
76
+ >
77
+ > - ex: Rename or add a label
78
+ > - ex: A few fields that support the main task
79
+
80
+ > [!TIP]
81
+ >
82
+ > **When people should stay oriented to what is underneath**
83
+ >
84
+ > - ex: A map or list still visible (dimmed) behind the sheet
85
+
86
+ ### When not to use
87
+
88
+ > [!CAUTION]
89
+ >
90
+ > **For primary, multi-step flows**
91
+ >
92
+ > - ex: Full onboarding or checkout as a single sheet flow
93
+ > - ex: Complex wizards that need a dedicated layout
94
+
95
+ > [!CAUTION]
96
+ >
97
+ > **For critical system-level alerts**
98
+ >
99
+ > - ex: Errors or warnings that must interrupt everywhere—use a dialog or platform alert
100
+
101
+ > [!CAUTION]
102
+ >
103
+ > **For deep hierarchical navigation**
104
+ >
105
+ > - ex: Many nested levels inside the sheet
106
+
107
+ > [!CAUTION]
108
+ >
109
+ > **For side- or top-anchored panels on large layouts**
110
+ >
111
+ > - ex: A right-side detail rail or expanding left nav—use Drawer.
112
+
113
+ ### Placement
114
+
115
+ Bottom sheets float above all content, separated by a translucent overlay that indicates a modal state. They are pinned to the bottom of the viewport, span the available width within safe areas, and expand upward with a rounded top edge.
116
+
117
+ _usage\_placement\_mobile_
118
+
119
+ ### Bottom sheet vs Drawer
120
+
121
+ Bottom sheet supports tasks at the bottom edge of the mobile viewport. Drawer supports panels from the left, right, or top. Keep usage consistent to maintain predictable behavior.
122
+
123
+ - **Do:** Put sort, share, overflow, and short forms that rise from the bottom on Bottom sheet on mobile and narrow web.
124
+ - **Don't:** Don't use a bottom sheet as a right-hand detail rail or left navigation surface on desktop—that belongs on Drawer.
125
+
126
+ ### Responsive behavior
127
+
128
+ Responsive behavior defines how the bottom sheet adapts across screen sizes, ensuring the same task remains in a bottom‑anchored pattern without shifting to a different surface.
129
+
130
+ - **Do:** Make scroll in the slot obvious when the sheet uses fixed height (fade, clipped row, or scroll bar).
131
+ - **Don't:** Don’t use scrollable content without a clear affordance or place the primary action below the viewport.
132
+
133
+ ### Action hierarchy in the footer
134
+
135
+ The footer ships with a **default action button** when shown. Secondary actions should follow Button hierarchy.
136
+
137
+ - **Do:** Keep one clear primary in the footer for the sheet’s main outcome.
138
+ - **Don't:** Don't show two competing primaries of the same weight.
139
+
140
+ ### Destructive actions
141
+
142
+ Bottom sheet footers follow the same **order and placement** rules as other mobile action areas: on a stacked footer, put the **primary** (for example **Save changes**) **at the bottom** as the full-width control; place **secondary** and **destructive** actions **above** it or in a row above it, using **lower emphasis** (text or ghost/outlined)—never as a competing filled primary.
143
+
144
+ - **Do:** Place destructive actions as a secondary pattern with clear labeling and confirmation when needed.
145
+ - **Don't:** Don't use destructive fill as the default primary except on a dedicated destructive confirm sheet.
146
+
147
+ ### Breakpoints
148
+
149
+ On wider viewports, bottom sheets follow defined patterns for max width, horizontal alignment, and overlay behavior. When behavior shifts at specific breakpoints, maintain a consistent pattern for how the component adapts.
150
+
151
+ A common responsive pattern is to transition the bottom sheet into a drawer on larger viewports. This allows content to scale more naturally with available space while preserving a familiar interaction model across breakpoints.
152
+
153
+ _usage\_breakpoints\_01-ex_
154
+
155
+ ---
156
+
157
+ ## Behavior
158
+
159
+ ### Opening and closing
160
+
161
+ Bottom sheets open with a short upward motion and a overlay fade-in, and close with the reverse. Motion should follow established motion guidelines. For modal use, focus moves into the sheet on open and returns to the triggering control on close.
162
+
163
+ _behavior\_opening\_closing\_01-ex_
164
+
165
+ ### Dismissal
166
+
167
+ Bottom sheets support common dismissal patterns such as overlay tap (for modal use), a close control, swipe down when enabled, and platform back where applicable. Available dismissal methods remain consistent across supported platforms.
168
+
169
+ _behavior\_dismissal\_01-ex_
170
+
171
+ ### Interaction states
172
+
173
+ Footer actions follow standard button states, including hover on web. Content within the sheet, such as rows or options, follows established list or control patterns. Loading states appear within the content area and do not shift footer actions in a way that could cause mis-taps.
174
+
175
+ _behavior\_keyboard\_and\_textinput\_01-ex_
176
+
177
+ ### Keyboard and text input
178
+
179
+ When a bottom sheet includes form fields, the layout adjusts while the keyboard is open to keep the focused input and primary actions visible. The primary CTA remains pinned to the top of the keyboard so it is always accessible. Content within the sheet may scroll to maintain access to fields and actions on smaller viewports.
180
+
181
+ Behavior remains consistent across breakpoints so the same task is supported in both bottom sheet and drawer patterns without shifting the interaction model.
182
+
183
+ _behavior\_keyboard\_and\_textinput\_02-ex_
184
+
185
+ ### Keyboard and assistive technology
186
+
187
+ For modal use, focus remains within the sheet until it is closed. On web, Escape closes the sheet when it does not conflict with nested interactions. The component uses an appropriate accessible role and is labeled from its visible title.
188
+
189
+ _behavior\_keyboard\_unfocusing\_01-ex_
190
+
191
+ ### Stacking
192
+
193
+ Bottom sheets do not stack. For multi-step flows, content updates within the same sheet or follows a clear back navigation pattern.
194
+
195
+ ## Content
196
+
197
+ ## Titles
198
+
199
+ Titles should clearly describe the task or decision presented in the bottom sheet.
200
+
201
+ Use these guidelines when writing titles:
202
+
203
+ - Use short, task-based phrasing (aim for 1 to 3 words when possible)
204
+ - Write in sentence case (aside from proper nouns)
205
+ - Focus on the user action (for example, “Sort by,” “Share,” “Edit label”)
206
+
207
+ * **Do:** Use clear, action-focused titles.
208
+ * **Caution:** Avoid marketing or promotional language.
209
+ * **Don't:** Don’t use vague or decorative language.
210
+
211
+ ## Primary action
212
+
213
+ The primary action represents the main outcome of the bottom sheet.
214
+
215
+ Use these guidelines when writing primary actions:
216
+
217
+ - Use a clear verb + object structure (for example, “Save changes,” “Apply filters”)
218
+ - Keep labels concise and specific to the outcome
219
+ - Ensure the action reflects what happens next
220
+
221
+ * **Do:** Make the outcome clear and actionable.
222
+ * **Don't:** Don’t use generic labels like “Continue” when a more specific action is possible.
223
+
224
+ ## List and option labels
225
+
226
+ Lists and options help users scan and select quickly within the bottom sheet.
227
+
228
+ Use these guidelines when writing list content:
229
+
230
+ - Use sentence case (aside from proper nouns)
231
+ - Maintain parallel structure across options
232
+ - Keep labels short and easy to scan
233
+ - Aim for single-line items when possible
234
+
235
+ * **Do:** Prioritize clarity and scannability.
236
+ * **Don't:** Don’t use inconsistent phrasing or overly long labels.
237
+
238
+ ## Triggers
239
+
240
+ Triggers are the controls that open the bottom sheet.
241
+
242
+ Use these guidelines when labeling triggers:
243
+
244
+ - Use clear, outcome-based labels (for example, “Sort,” “Filters,” “More”)
245
+ - Ensure the trigger label aligns with the title shown in the sheet
246
+ - Keep labels short and predictable
247
+
248
+ * **Do:** Match the trigger to the task presented in the sheet.
249
+ * **Don't:** Don’t create mismatches between the trigger and the sheet content.
@@ -0,0 +1,141 @@
1
+ # Box (https://design.candescent.com/docs/components/box)
2
+
3
+ Resources: [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/layout-box--default)
4
+
5
+ `Box` groups and lays out content on every platform. Use it wherever you would reach for a `View` or `div`.
6
+
7
+ ```tsx
8
+ import { Box } from '@cdx-ui/components';
9
+ ```
10
+
11
+ ## Basic
12
+
13
+ Use `Box` with layout classes, spacing-scale padding and a semantic surface background to build a section of a screen. For rows and columns with a token gap, use [`HStack` and `VStack`](https://design.candescent.com/docs/components/stack/content.md).
14
+
15
+ ```tsx
16
+ import { Box, Heading, Text } from '@cdx-ui/components';
17
+
18
+ export default function BoxBasicDemo() {
19
+ return (
20
+ <Box className="w-full max-w-sm gap-1 bg-surface-secondary p-4">
21
+ <Heading size="sm">Everyday Checking</Heading>
22
+ <Text color="secondary">Available balance $2,481.06</Text>
23
+ </Box>
24
+ );
25
+ }
26
+ ```
27
+
28
+ ## Semantic elements
29
+
30
+ Set `role` to render a semantic element on web. Native platforms expose the same role to assistive technology and render a view.
31
+
32
+ ```tsx
33
+ import { Box, Link } from '@cdx-ui/components';
34
+
35
+ const LINKS = [
36
+ { label: 'Accounts', href: 'https://example.com/accounts' },
37
+ { label: 'Transfers', href: 'https://example.com/transfers' },
38
+ { label: 'Statements', href: 'https://example.com/statements' },
39
+ ] as const;
40
+
41
+ export default function BoxSemanticElementsDemo() {
42
+ return (
43
+ <Box role="navigation" aria-label="Banking">
44
+ <Box role="list" className="flex-row gap-6">
45
+ {LINKS.map((link) => (
46
+ <Box key={link.label} role="listitem">
47
+ <Link href={link.href}>
48
+ <Link.Label>{link.label}</Link.Label>
49
+ </Link>
50
+ </Box>
51
+ ))}
52
+ </Box>
53
+ </Box>
54
+ );
55
+ }
56
+ ```
57
+
58
+ | `role` | Web element |
59
+ | --------------- | ----------- |
60
+ | `article` | `<article>` |
61
+ | `banner` | `<header>` |
62
+ | `complementary` | `<aside>` |
63
+ | `contentinfo` | `<footer>` |
64
+ | `figure` | `<figure>` |
65
+ | `form` | `<form>` |
66
+ | `list` | `<ul>` |
67
+ | `listitem` | `<li>` |
68
+ | `main` | `<main>` |
69
+ | `navigation` | `<nav>` |
70
+ | `region` | `<section>` |
71
+
72
+ Any other role, or no role, renders a `<div>`. For headings and text use [`Heading`](https://design.candescent.com/docs/components/heading/content.md) and [`Text`](https://design.candescent.com/docs/components/text/content.md), not a `Box` with a text role.
73
+
74
+ ## As child
75
+
76
+ Set `asChild` to apply Box's props to its only child instead of rendering another view. Here a `ScrollView` takes the Box's role, label and layout classes.
77
+
78
+ ```tsx
79
+ import { Box, HStack, ScrollView, Text } from '@cdx-ui/components';
80
+
81
+ const TRANSACTIONS = [
82
+ { label: 'Springfield Electric', amount: '−$84.12' },
83
+ { label: 'Payroll deposit', amount: '+$2,150.00' },
84
+ { label: 'Corner Market', amount: '−$23.47' },
85
+ { label: 'Transfer to Savings', amount: '−$200.00' },
86
+ { label: 'City Water', amount: '−$41.90' },
87
+ { label: 'Coffee House', amount: '−$5.25' },
88
+ ] as const;
89
+
90
+ export default function BoxAsChildDemo() {
91
+ return (
92
+ <Box
93
+ asChild
94
+ role="region"
95
+ aria-label="Recent transactions"
96
+ className="h-40 w-full max-w-sm bg-surface-secondary"
97
+ >
98
+ <ScrollView contentContainerClassName="gap-3 p-4">
99
+ {TRANSACTIONS.map((transaction) => (
100
+ <HStack key={transaction.label} className="justify-between">
101
+ <Text>{transaction.label}</Text>
102
+ <Text color="secondary">{transaction.amount}</Text>
103
+ </HStack>
104
+ ))}
105
+ </ScrollView>
106
+ </Box>
107
+ );
108
+ }
109
+ ```
110
+
111
+ ## API
112
+
113
+ ### Box
114
+
115
+ | Prop | Type | Default | Description |
116
+ | --- | --- | --- | --- |
117
+ | `className?` | `string` | — | — |
118
+ | `children?` | `React.ReactNode` | — | — |
119
+ | `asChild?` | `boolean` | — | Renders the child element in place of the default `View`, merging Box's props onto it. |
120
+
121
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props). Every `ViewProps` prop and the `ref` pass through to the rendered view unchanged. Type a ref with `BoxRef`:
122
+
123
+ ```tsx
124
+ import { Box, type BoxRef } from '@cdx-ui/components';
125
+
126
+ const ref = useRef<BoxRef>(null);
127
+
128
+ <Box ref={ref} />;
129
+ ```
130
+
131
+ ## Anatomy
132
+
133
+ | `data-slot` | Element |
134
+ | ----------- | ------- |
135
+ | `box` | Root |
136
+
137
+ ## Accessibility
138
+
139
+ `Box` sets no role and adds no keyboard, focus or labeling behavior. Accessibility props such as `role`, `aria-label`, `accessibilityLabel` and `importantForAccessibility` pass through to the rendered view.
140
+
141
+ Give a landmark role (`navigation`, `region`, `complementary`) an `aria-label` when the page has more than one landmark of that type, so screen-reader users can tell them apart.
@@ -0,0 +1,169 @@
1
+ # Breadcrumbs (https://design.candescent.com/docs/components/breadcrumbs)
2
+
3
+ Resources: [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/navigation-breadcrumbs--default)
4
+
5
+ A compound component for hierarchical navigation. Compose each segment with `Breadcrumbs.Item`; the final item is always the current page and is not interactive.
6
+
7
+ ```tsx
8
+ import { Breadcrumbs } from '@cdx-ui/components';
9
+ ```
10
+
11
+ ## Basic
12
+
13
+ Add `href` to ancestor items so they can navigate. Wrap your app with `LinkProvider` to connect breadcrumb navigation to your router.
14
+
15
+ ```tsx
16
+ import { Breadcrumbs } from '@cdx-ui/components';
17
+
18
+ export default function BreadcrumbsBasicDemo() {
19
+ return (
20
+ <Breadcrumbs accessibilityLabel="Account navigation">
21
+ <Breadcrumbs.Item href="#home">Home</Breadcrumbs.Item>
22
+ <Breadcrumbs.Item href="#accounts">Accounts</Breadcrumbs.Item>
23
+ <Breadcrumbs.Item>Checking account</Breadcrumbs.Item>
24
+ </Breadcrumbs>
25
+ );
26
+ }
27
+ ```
28
+
29
+ ## Underlined
30
+
31
+ Set `isUnderlined` to underline interactive ancestor items.
32
+
33
+ ```tsx
34
+ import { Breadcrumbs } from '@cdx-ui/components';
35
+
36
+ export default function BreadcrumbsUnderlinedDemo() {
37
+ return (
38
+ <Breadcrumbs isUnderlined accessibilityLabel="Catalog navigation">
39
+ <Breadcrumbs.Item href="#home">Home</Breadcrumbs.Item>
40
+ <Breadcrumbs.Item href="#catalog">Catalog</Breadcrumbs.Item>
41
+ <Breadcrumbs.Item>Product details</Breadcrumbs.Item>
42
+ </Breadcrumbs>
43
+ );
44
+ }
45
+ ```
46
+
47
+ ## Custom separator
48
+
49
+ Pass text or any React element to `separator`.
50
+
51
+ ```tsx
52
+ import { Breadcrumbs } from '@cdx-ui/components';
53
+
54
+ export default function BreadcrumbsCustomSeparatorDemo() {
55
+ return (
56
+ <Breadcrumbs separator="›" accessibilityLabel="Settings navigation">
57
+ <Breadcrumbs.Item href="#home">Home</Breadcrumbs.Item>
58
+ <Breadcrumbs.Item href="#settings">Settings</Breadcrumbs.Item>
59
+ <Breadcrumbs.Item>Security</Breadcrumbs.Item>
60
+ </Breadcrumbs>
61
+ );
62
+ }
63
+ ```
64
+
65
+ ## With icons
66
+
67
+ Items accept custom content, including icons and text. A custom icon can also be used as the separator.
68
+ An `Icon` or `Text` placed directly in an item follows the item's color in every state (ancestor, hover,
69
+ current page, disabled), and one passed as `separator` follows the separator color, so neither needs color
70
+ classes. Set `color` on it to override.
71
+
72
+ ```tsx
73
+ import { Breadcrumbs, Icon, Text } from '@cdx-ui/components';
74
+ import { ChevronRight, Home, Storefront } from '@cdx-ui/icons';
75
+
76
+ export default function BreadcrumbsWithIconsDemo() {
77
+ return (
78
+ <Breadcrumbs
79
+ accessibilityLabel="Marketplace navigation"
80
+ separator={
81
+ <Icon
82
+ as={ChevronRight}
83
+ className="size-4"
84
+ accessibilityElementsHidden
85
+ importantForAccessibility="no-hide-descendants"
86
+ />
87
+ }
88
+ >
89
+ <Breadcrumbs.Item href="#home">
90
+ <Icon
91
+ as={Home}
92
+ className="size-4"
93
+ accessibilityElementsHidden
94
+ importantForAccessibility="no-hide-descendants"
95
+ />
96
+ <Text>Home</Text>
97
+ </Breadcrumbs.Item>
98
+ <Breadcrumbs.Item href="#marketplace">
99
+ <Icon
100
+ as={Storefront}
101
+ className="size-4"
102
+ accessibilityElementsHidden
103
+ importantForAccessibility="no-hide-descendants"
104
+ />
105
+ <Text>Marketplace</Text>
106
+ </Breadcrumbs.Item>
107
+ <Breadcrumbs.Item>Product details</Breadcrumbs.Item>
108
+ </Breadcrumbs>
109
+ );
110
+ }
111
+ ```
112
+
113
+ ## Disabled
114
+
115
+ Set `isDisabled` to make every ancestor item non-interactive. The final item remains styled as the current page.
116
+
117
+ ```tsx
118
+ import { Breadcrumbs } from '@cdx-ui/components';
119
+
120
+ export default function BreadcrumbsDisabledDemo() {
121
+ return (
122
+ <Breadcrumbs isDisabled accessibilityLabel="Disabled account navigation">
123
+ <Breadcrumbs.Item href="#home">Home</Breadcrumbs.Item>
124
+ <Breadcrumbs.Item href="#accounts">Accounts</Breadcrumbs.Item>
125
+ <Breadcrumbs.Item>Checking account</Breadcrumbs.Item>
126
+ </Breadcrumbs>
127
+ );
128
+ }
129
+ ```
130
+
131
+ ## API
132
+
133
+ ### Breadcrumbs
134
+
135
+ The navigation landmark and state provider for the breadcrumb trail.
136
+
137
+ | Prop | Type | Default | Description |
138
+ | --- | --- | --- | --- |
139
+ | `className?` | `string` | — | — |
140
+ | `children?` | `ReactNode` | — | — |
141
+ | `separator?` | `ReactNode` | ``/`` | Separator rendered between breadcrumb items. A direct `Icon` or `Text` child takes the separator color unless it sets `color`. |
142
+ | `isDisabled?` | `boolean` | `false` | When `true`, ancestor items are not interactive and use muted text. The current page keeps its color. |
143
+ | `isUnderlined?` | `boolean` | `false` | When `true`, interactive ancestor items are underlined. |
144
+ | `color?` | `'neutral' \| 'action' \| 'danger' \| 'warning' \| 'success' \| 'info'` | `'neutral'` | Semantic color for ancestor items. `neutral` uses the standard text hierarchy. |
145
+
146
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
147
+
148
+ ## Sub-components
149
+
150
+ ### Breadcrumbs.Item
151
+
152
+ A segment in the trail. Ancestor items with an `href` are interactive. The final item is always rendered as the non-interactive current page, even when it receives an `href`.
153
+
154
+ | Prop | Type | Default | Description |
155
+ | --- | --- | --- | --- |
156
+ | `className?` | `string` | — | — |
157
+ | `children?` | `ReactNode` | — | Item content. A direct `Icon` or `Text` child takes the item's state color unless it sets `color`. |
158
+ | `href?` | `string` | — | URL or route path opened on press. Omit when the link only runs `onPress`. |
159
+ | `action?` | `'navigate' \| 'push' \| 'replace'` | — | Navigation action forwarded to the `LinkProvider`. Defaults to `'navigate'`. |
160
+ | `isVisited?` | `boolean` | — | If true, the link will render in its visited style (native). On web, visited styling is driven by the CSS `:visited` pseudo-class. |
161
+ | `webProps?` | `React.AnchorHTMLAttributes<HTMLAnchorElement>` | — | HTML anchor attributes applied only on web. Ignored on native platforms. `target`, `rel`, and `download` are forwarded via react-native-web's `hrefAttrs`. |
162
+
163
+ Inherits all [`PressableProps`](https://reactnative.dev/docs/pressable#props) used by interactive ancestor items.
164
+
165
+ ## Accessibility
166
+
167
+ On web, `Breadcrumbs` renders a named `navigation` landmark. Its `accessibilityLabel` defaults to "Breadcrumb".
168
+
169
+ Separators are hidden from assistive technologies. The final item receives `aria-current="page"` on web and `accessibilityState.selected` on native platforms.