@cdx-ui/components 0.2.2 → 0.2.4

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 (373) hide show
  1. package/AGENTS.md +24 -0
  2. package/README.md +6 -2
  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 +235 -0
  10. package/docs/components/bottom-sheet/content.md +351 -0
  11. package/docs/components/bottom-sheet/design.md +249 -0
  12. package/docs/components/breadcrumbs/content.md +169 -0
  13. package/docs/components/button/content.md +398 -0
  14. package/docs/components/button/design.md +258 -0
  15. package/docs/components/calendar/content.md +137 -0
  16. package/docs/components/card/content.md +283 -0
  17. package/docs/components/carousel/content.md +416 -0
  18. package/docs/components/checkbox/content.md +236 -0
  19. package/docs/components/checkbox/design.md +214 -0
  20. package/docs/components/chip/content.md +439 -0
  21. package/docs/components/chip/design.md +418 -0
  22. package/docs/components/color-area/content.md +86 -0
  23. package/docs/components/color-field/content.md +134 -0
  24. package/docs/components/color-picker/content.md +208 -0
  25. package/docs/components/color-slider/content.md +120 -0
  26. package/docs/components/color-swatch/content.md +64 -0
  27. package/docs/components/color-swatch-picker/content.md +126 -0
  28. package/docs/components/content.md +97 -0
  29. package/docs/components/currency-input/content.md +205 -0
  30. package/docs/components/data-grid/content.md +522 -0
  31. package/docs/components/date-field/content.md +147 -0
  32. package/docs/components/date-picker/content.md +360 -0
  33. package/docs/components/date-range-picker/content.md +301 -0
  34. package/docs/components/date-time-field/content.md +157 -0
  35. package/docs/components/date-time-list/content.md +105 -0
  36. package/docs/components/date-time-picker/content.md +272 -0
  37. package/docs/components/dialog/content.md +436 -0
  38. package/docs/components/dialog/design.md +192 -0
  39. package/docs/components/divider/content.md +112 -0
  40. package/docs/components/drawer/content.md +436 -0
  41. package/docs/components/field/content.md +277 -0
  42. package/docs/components/form/content.md +62 -0
  43. package/docs/components/full-screen-dialog/content.md +881 -0
  44. package/docs/components/heading/content.md +55 -0
  45. package/docs/components/icon/content.md +190 -0
  46. package/docs/components/icon-button/content.md +200 -0
  47. package/docs/components/icon-button/design.md +165 -0
  48. package/docs/components/image/content.md +104 -0
  49. package/docs/components/input/content.md +281 -0
  50. package/docs/components/input/design.md +389 -0
  51. package/docs/components/insurance-disclosure/content.md +103 -0
  52. package/docs/components/link/content.md +180 -0
  53. package/docs/components/link/design.md +160 -0
  54. package/docs/components/list-item/content.md +695 -0
  55. package/docs/components/menu/content.md +1247 -0
  56. package/docs/components/month-calendar/content.md +84 -0
  57. package/docs/components/month-picker/content.md +273 -0
  58. package/docs/components/otp-input/content.md +327 -0
  59. package/docs/components/progress-bar/content.md +87 -0
  60. package/docs/components/progress-circle/content.md +176 -0
  61. package/docs/components/progress-segmented/content.md +119 -0
  62. package/docs/components/quick-action-button/content.md +154 -0
  63. package/docs/components/quick-action-button/design.md +170 -0
  64. package/docs/components/radio/content.md +224 -0
  65. package/docs/components/range-calendar/content.md +123 -0
  66. package/docs/components/reorderable-list/content.md +309 -0
  67. package/docs/components/scoped-theme/content.md +47 -0
  68. package/docs/components/scroll-shadow/content.md +686 -0
  69. package/docs/components/select/content.md +400 -0
  70. package/docs/components/select/design.md +301 -0
  71. package/docs/components/skeleton/content.md +103 -0
  72. package/docs/components/slider/content.md +423 -0
  73. package/docs/components/stack/content.md +161 -0
  74. package/docs/components/switch/content.md +150 -0
  75. package/docs/components/switch/design.md +208 -0
  76. package/docs/components/table/content.md +548 -0
  77. package/docs/components/table-pagination/content.md +177 -0
  78. package/docs/components/tabs/content.md +292 -0
  79. package/docs/components/text/content.md +142 -0
  80. package/docs/components/textarea/content.md +222 -0
  81. package/docs/components/tile/content.md +703 -0
  82. package/docs/components/toast/content.md +456 -0
  83. package/docs/components/toggle-button/content.md +505 -0
  84. package/docs/components/tooltip/content.md +350 -0
  85. package/docs/components/virtualized-list/content.md +250 -0
  86. package/docs/foundations/content.md +9 -0
  87. package/docs/foundations/expressions/icons/content.md +19 -0
  88. package/docs/foundations/styles/tokens/all-tokens/content.md +192 -0
  89. package/docs/foundations/styles/tokens/what-are-tokens/content.md +33 -0
  90. package/docs/foundations/styles/tokens/what-are-tokens/design.md +33 -0
  91. package/docs/getting-started/content.md +4 -0
  92. package/docs/getting-started/designers/content.md +13 -0
  93. package/docs/getting-started/designers/design.md +13 -0
  94. package/docs/getting-started/developers/accessibility/content.md +31 -0
  95. package/docs/getting-started/developers/content.md +612 -0
  96. package/docs/getting-started/developers/styling/content.md +193 -0
  97. package/docs/llms.txt +193 -0
  98. package/docs/patterns/account-management/content.md +75 -0
  99. package/docs/patterns/authentication/content.md +52 -0
  100. package/docs/patterns/content.md +10 -0
  101. package/docs/patterns/dashboard/content.md +39 -0
  102. package/docs/patterns/empty-states/content.md +31 -0
  103. package/docs/patterns/forms/content.md +109 -0
  104. package/docs/patterns/onboarding/content.md +69 -0
  105. package/docs/patterns/payments/content.md +35 -0
  106. package/docs/patterns/settings/content.md +72 -0
  107. package/docs/resources/content.md +9 -0
  108. package/docs/resources/figma-libraries/content.md +42 -0
  109. package/docs/resources/release-notes/0.0.1-beta.118/content.md +27 -0
  110. package/docs/resources/release-notes/0.0.1-beta.122/content.md +21 -0
  111. package/docs/resources/release-notes/0.0.1-beta.124/content.md +16 -0
  112. package/docs/resources/release-notes/0.0.1-beta.126/content.md +10 -0
  113. package/docs/resources/release-notes/0.0.1-beta.127/content.md +14 -0
  114. package/docs/resources/release-notes/0.0.1-beta.128/content.md +9 -0
  115. package/docs/resources/release-notes/0.0.1-beta.129/content.md +18 -0
  116. package/docs/resources/release-notes/0.0.1-beta.130/content.md +18 -0
  117. package/docs/resources/release-notes/0.0.1-beta.133/content.md +7 -0
  118. package/docs/resources/release-notes/0.0.1-beta.134/content.md +17 -0
  119. package/docs/resources/release-notes/0.0.1-beta.136/content.md +7 -0
  120. package/docs/resources/release-notes/0.0.1-beta.137/content.md +10 -0
  121. package/docs/resources/release-notes/0.0.1-beta.138/content.md +7 -0
  122. package/docs/resources/release-notes/0.0.1-beta.139/content.md +13 -0
  123. package/docs/resources/release-notes/0.0.1-beta.140/content.md +26 -0
  124. package/docs/resources/release-notes/0.0.1-beta.141/content.md +63 -0
  125. package/docs/resources/release-notes/0.0.1-beta.142/content.md +7 -0
  126. package/docs/resources/release-notes/0.0.1-beta.143/content.md +12 -0
  127. package/docs/resources/release-notes/0.0.1-beta.144/content.md +7 -0
  128. package/docs/resources/release-notes/0.0.1-beta.145/content.md +7 -0
  129. package/docs/resources/release-notes/0.0.1-beta.147/content.md +10 -0
  130. package/docs/resources/release-notes/0.0.1-beta.149/content.md +10 -0
  131. package/docs/resources/release-notes/0.0.1-beta.150/content.md +13 -0
  132. package/docs/resources/release-notes/0.0.1-beta.152/content.md +7 -0
  133. package/docs/resources/release-notes/0.0.1-beta.154/content.md +15 -0
  134. package/docs/resources/release-notes/0.0.1-beta.156/content.md +7 -0
  135. package/docs/resources/release-notes/0.0.1-beta.158/content.md +9 -0
  136. package/docs/resources/release-notes/0.0.1-beta.159/content.md +11 -0
  137. package/docs/resources/release-notes/0.0.1-beta.160/content.md +7 -0
  138. package/docs/resources/release-notes/0.0.1-beta.161/content.md +7 -0
  139. package/docs/resources/release-notes/0.0.1-beta.163/content.md +7 -0
  140. package/docs/resources/release-notes/0.0.1-beta.164/content.md +9 -0
  141. package/docs/resources/release-notes/0.0.1-beta.166/content.md +17 -0
  142. package/docs/resources/release-notes/0.0.1-beta.167/content.md +7 -0
  143. package/docs/resources/release-notes/0.0.1-beta.168/content.md +7 -0
  144. package/docs/resources/release-notes/0.0.1-beta.169/content.md +7 -0
  145. package/docs/resources/release-notes/0.0.1-beta.171/content.md +16 -0
  146. package/docs/resources/release-notes/0.0.1-beta.172/content.md +24 -0
  147. package/docs/resources/release-notes/0.0.1-beta.173/content.md +15 -0
  148. package/docs/resources/release-notes/0.0.1-beta.174/content.md +7 -0
  149. package/docs/resources/release-notes/0.0.1-beta.176/content.md +32 -0
  150. package/docs/resources/release-notes/0.0.1-beta.179/content.md +11 -0
  151. package/docs/resources/release-notes/0.0.1-beta.182/content.md +13 -0
  152. package/docs/resources/release-notes/0.0.1-beta.185/content.md +7 -0
  153. package/docs/resources/release-notes/0.0.1-beta.187/content.md +27 -0
  154. package/docs/resources/release-notes/0.1.1/content.md +23 -0
  155. package/docs/resources/release-notes/0.1.2/content.md +7 -0
  156. package/docs/resources/release-notes/0.1.4/content.md +19 -0
  157. package/docs/resources/release-notes/0.1.5/content.md +7 -0
  158. package/docs/resources/release-notes/0.1.6/content.md +7 -0
  159. package/docs/resources/release-notes/0.2.0/content.md +31 -0
  160. package/docs/resources/release-notes/0.2.1/content.md +17 -0
  161. package/docs/resources/release-notes/0.2.2/content.md +11 -0
  162. package/docs/resources/release-notes/0.2.3/content.md +15 -0
  163. package/docs/resources/release-notes/content.md +64 -0
  164. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  165. package/lib/commonjs/components/DateTimeList/index.js +11 -26
  166. package/lib/commonjs/components/DateTimeList/index.js.map +1 -1
  167. package/lib/commonjs/components/DateTimeList/styles.js +2 -12
  168. package/lib/commonjs/components/DateTimeList/styles.js.map +1 -1
  169. package/lib/commonjs/components/Heading/index.js.map +1 -1
  170. package/lib/commonjs/components/Icon/index.js.map +1 -1
  171. package/lib/commonjs/components/ListItem/index.js +170 -9
  172. package/lib/commonjs/components/ListItem/index.js.map +1 -1
  173. package/lib/commonjs/components/ListItem/styles.js +38 -2
  174. package/lib/commonjs/components/ListItem/styles.js.map +1 -1
  175. package/lib/commonjs/components/Menu/index.js +11 -5
  176. package/lib/commonjs/components/Menu/index.js.map +1 -1
  177. package/lib/commonjs/components/RangeCalendar/index.js.map +1 -1
  178. package/lib/commonjs/components/ReorderableList/ReorderableListShared.js +91 -0
  179. package/lib/commonjs/components/ReorderableList/ReorderableListShared.js.map +1 -0
  180. package/lib/commonjs/components/ReorderableList/index.js +135 -0
  181. package/lib/commonjs/components/ReorderableList/index.js.map +1 -0
  182. package/lib/commonjs/components/ReorderableList/index.web.js +233 -0
  183. package/lib/commonjs/components/ReorderableList/index.web.js.map +1 -0
  184. package/lib/commonjs/components/ReorderableList/labels.js +47 -0
  185. package/lib/commonjs/components/ReorderableList/labels.js.map +1 -0
  186. package/lib/commonjs/components/ReorderableList/reorderItems.js +16 -0
  187. package/lib/commonjs/components/ReorderableList/reorderItems.js.map +1 -0
  188. package/lib/commonjs/components/ReorderableList/rowContext.js +42 -0
  189. package/lib/commonjs/components/ReorderableList/rowContext.js.map +1 -0
  190. package/lib/commonjs/components/ReorderableList/types.js +6 -0
  191. package/lib/commonjs/components/ReorderableList/types.js.map +1 -0
  192. package/lib/commonjs/components/ReorderableList/useReorder.js +131 -0
  193. package/lib/commonjs/components/ReorderableList/useReorder.js.map +1 -0
  194. package/lib/commonjs/components/ReorderableList/webDnd.js +64 -0
  195. package/lib/commonjs/components/ReorderableList/webDnd.js.map +1 -0
  196. package/lib/commonjs/components/ScopedTheme/index.js.map +1 -1
  197. package/lib/commonjs/components/ScrollShadow/gradient.js +29 -0
  198. package/lib/commonjs/components/ScrollShadow/gradient.js.map +1 -0
  199. package/lib/commonjs/components/ScrollShadow/index.js +171 -44
  200. package/lib/commonjs/components/ScrollShadow/index.js.map +1 -1
  201. package/lib/commonjs/components/ScrollShadow/styles.js +58 -14
  202. package/lib/commonjs/components/ScrollShadow/styles.js.map +1 -1
  203. package/lib/commonjs/components/ScrollShadow/useComposedScrollHandler.js +63 -0
  204. package/lib/commonjs/components/ScrollShadow/useComposedScrollHandler.js.map +1 -0
  205. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js +48 -8
  206. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js.map +1 -1
  207. package/lib/commonjs/components/Skeleton/index.js.map +1 -1
  208. package/lib/commonjs/components/TablePagination/index.js.map +1 -1
  209. package/lib/commonjs/components/Tabs/index.js +16 -23
  210. package/lib/commonjs/components/Tabs/index.js.map +1 -1
  211. package/lib/commonjs/components/Tabs/styles.js +1 -10
  212. package/lib/commonjs/components/Tabs/styles.js.map +1 -1
  213. package/lib/commonjs/components/Text/index.js.map +1 -1
  214. package/lib/commonjs/components/Tile/styles.js +1 -1
  215. package/lib/commonjs/components/Tile/styles.js.map +1 -1
  216. package/lib/commonjs/components/index.js.map +1 -1
  217. package/lib/commonjs/figma/ListItem.SectionHeader.figma.js +20 -5
  218. package/lib/commonjs/figma/ListItem.SectionHeader.figma.js.map +1 -1
  219. package/lib/commonjs/reorderable-list.js +17 -0
  220. package/lib/commonjs/reorderable-list.js.map +1 -0
  221. package/lib/module/components/Checkbox/index.js.map +1 -1
  222. package/lib/module/components/DateTimeList/index.js +12 -27
  223. package/lib/module/components/DateTimeList/index.js.map +1 -1
  224. package/lib/module/components/DateTimeList/styles.js +1 -11
  225. package/lib/module/components/DateTimeList/styles.js.map +1 -1
  226. package/lib/module/components/Heading/index.js.map +1 -1
  227. package/lib/module/components/Icon/index.js.map +1 -1
  228. package/lib/module/components/ListItem/index.js +163 -14
  229. package/lib/module/components/ListItem/index.js.map +1 -1
  230. package/lib/module/components/ListItem/styles.js +37 -1
  231. package/lib/module/components/ListItem/styles.js.map +1 -1
  232. package/lib/module/components/Menu/index.js +11 -5
  233. package/lib/module/components/Menu/index.js.map +1 -1
  234. package/lib/module/components/RangeCalendar/index.js.map +1 -1
  235. package/lib/module/components/ReorderableList/ReorderableListShared.js +86 -0
  236. package/lib/module/components/ReorderableList/ReorderableListShared.js.map +1 -0
  237. package/lib/module/components/ReorderableList/index.js +130 -0
  238. package/lib/module/components/ReorderableList/index.js.map +1 -0
  239. package/lib/module/components/ReorderableList/index.web.js +229 -0
  240. package/lib/module/components/ReorderableList/index.web.js.map +1 -0
  241. package/lib/module/components/ReorderableList/labels.js +41 -0
  242. package/lib/module/components/ReorderableList/labels.js.map +1 -0
  243. package/lib/module/components/ReorderableList/reorderItems.js +12 -0
  244. package/lib/module/components/ReorderableList/reorderItems.js.map +1 -0
  245. package/lib/module/components/ReorderableList/rowContext.js +38 -0
  246. package/lib/module/components/ReorderableList/rowContext.js.map +1 -0
  247. package/lib/module/components/ReorderableList/types.js +4 -0
  248. package/lib/module/components/ReorderableList/types.js.map +1 -0
  249. package/lib/module/components/ReorderableList/useReorder.js +123 -0
  250. package/lib/module/components/ReorderableList/useReorder.js.map +1 -0
  251. package/lib/module/components/ReorderableList/webDnd.js +59 -0
  252. package/lib/module/components/ReorderableList/webDnd.js.map +1 -0
  253. package/lib/module/components/ScopedTheme/index.js.map +1 -1
  254. package/lib/module/components/ScrollShadow/gradient.js +24 -0
  255. package/lib/module/components/ScrollShadow/gradient.js.map +1 -0
  256. package/lib/module/components/ScrollShadow/index.js +170 -48
  257. package/lib/module/components/ScrollShadow/index.js.map +1 -1
  258. package/lib/module/components/ScrollShadow/styles.js +57 -13
  259. package/lib/module/components/ScrollShadow/styles.js.map +1 -1
  260. package/lib/module/components/ScrollShadow/useComposedScrollHandler.js +57 -0
  261. package/lib/module/components/ScrollShadow/useComposedScrollHandler.js.map +1 -0
  262. package/lib/module/components/ScrollShadow/useScrollShadow.js +46 -8
  263. package/lib/module/components/ScrollShadow/useScrollShadow.js.map +1 -1
  264. package/lib/module/components/Skeleton/index.js.map +1 -1
  265. package/lib/module/components/TablePagination/index.js.map +1 -1
  266. package/lib/module/components/Tabs/index.js +17 -24
  267. package/lib/module/components/Tabs/index.js.map +1 -1
  268. package/lib/module/components/Tabs/styles.js +0 -9
  269. package/lib/module/components/Tabs/styles.js.map +1 -1
  270. package/lib/module/components/Text/index.js.map +1 -1
  271. package/lib/module/components/Tile/styles.js +1 -1
  272. package/lib/module/components/Tile/styles.js.map +1 -1
  273. package/lib/module/components/index.js.map +1 -1
  274. package/lib/module/figma/ListItem.SectionHeader.figma.js +20 -5
  275. package/lib/module/figma/ListItem.SectionHeader.figma.js.map +1 -1
  276. package/lib/module/reorderable-list.js +4 -0
  277. package/lib/module/reorderable-list.js.map +1 -0
  278. package/lib/typescript/components/Checkbox/index.d.ts +22 -0
  279. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
  280. package/lib/typescript/components/DateTimeList/index.d.ts.map +1 -1
  281. package/lib/typescript/components/DateTimeList/styles.d.ts +1 -4
  282. package/lib/typescript/components/DateTimeList/styles.d.ts.map +1 -1
  283. package/lib/typescript/components/Heading/index.d.ts +20 -2
  284. package/lib/typescript/components/Heading/index.d.ts.map +1 -1
  285. package/lib/typescript/components/Icon/index.d.ts +2 -0
  286. package/lib/typescript/components/Icon/index.d.ts.map +1 -1
  287. package/lib/typescript/components/ListItem/index.d.ts +28 -5
  288. package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
  289. package/lib/typescript/components/ListItem/styles.d.ts +6 -1
  290. package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
  291. package/lib/typescript/components/Menu/index.d.ts +116 -4
  292. package/lib/typescript/components/Menu/index.d.ts.map +1 -1
  293. package/lib/typescript/components/RangeCalendar/index.d.ts +2 -0
  294. package/lib/typescript/components/RangeCalendar/index.d.ts.map +1 -1
  295. package/lib/typescript/components/ReorderableList/ReorderableListShared.d.ts +31 -0
  296. package/lib/typescript/components/ReorderableList/ReorderableListShared.d.ts.map +1 -0
  297. package/lib/typescript/components/ReorderableList/index.d.ts +8 -0
  298. package/lib/typescript/components/ReorderableList/index.d.ts.map +1 -0
  299. package/lib/typescript/components/ReorderableList/index.web.d.ts +8 -0
  300. package/lib/typescript/components/ReorderableList/index.web.d.ts.map +1 -0
  301. package/lib/typescript/components/ReorderableList/labels.d.ts +16 -0
  302. package/lib/typescript/components/ReorderableList/labels.d.ts.map +1 -0
  303. package/lib/typescript/components/ReorderableList/reorderItems.d.ts +3 -0
  304. package/lib/typescript/components/ReorderableList/reorderItems.d.ts.map +1 -0
  305. package/lib/typescript/components/ReorderableList/rowContext.d.ts +57 -0
  306. package/lib/typescript/components/ReorderableList/rowContext.d.ts.map +1 -0
  307. package/lib/typescript/components/ReorderableList/types.d.ts +75 -0
  308. package/lib/typescript/components/ReorderableList/types.d.ts.map +1 -0
  309. package/lib/typescript/components/ReorderableList/useReorder.d.ts +31 -0
  310. package/lib/typescript/components/ReorderableList/useReorder.d.ts.map +1 -0
  311. package/lib/typescript/components/ReorderableList/webDnd.d.ts +27 -0
  312. package/lib/typescript/components/ReorderableList/webDnd.d.ts.map +1 -0
  313. package/lib/typescript/components/ScopedTheme/index.d.ts +6 -1
  314. package/lib/typescript/components/ScopedTheme/index.d.ts.map +1 -1
  315. package/lib/typescript/components/ScrollShadow/gradient.d.ts +7 -0
  316. package/lib/typescript/components/ScrollShadow/gradient.d.ts.map +1 -0
  317. package/lib/typescript/components/ScrollShadow/index.d.ts +57 -15
  318. package/lib/typescript/components/ScrollShadow/index.d.ts.map +1 -1
  319. package/lib/typescript/components/ScrollShadow/styles.d.ts +8 -2
  320. package/lib/typescript/components/ScrollShadow/styles.d.ts.map +1 -1
  321. package/lib/typescript/components/ScrollShadow/useComposedScrollHandler.d.ts +13 -0
  322. package/lib/typescript/components/ScrollShadow/useComposedScrollHandler.d.ts.map +1 -0
  323. package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts +15 -2
  324. package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts.map +1 -1
  325. package/lib/typescript/components/Skeleton/index.d.ts +3 -0
  326. package/lib/typescript/components/Skeleton/index.d.ts.map +1 -1
  327. package/lib/typescript/components/TablePagination/index.d.ts +54 -0
  328. package/lib/typescript/components/TablePagination/index.d.ts.map +1 -1
  329. package/lib/typescript/components/Tabs/index.d.ts.map +1 -1
  330. package/lib/typescript/components/Tabs/styles.d.ts +0 -7
  331. package/lib/typescript/components/Tabs/styles.d.ts.map +1 -1
  332. package/lib/typescript/components/Text/index.d.ts +12 -2
  333. package/lib/typescript/components/Text/index.d.ts.map +1 -1
  334. package/lib/typescript/components/Tile/styles.d.ts.map +1 -1
  335. package/lib/typescript/components/ToggleButton/styles.d.ts +1 -1
  336. package/lib/typescript/components/index.d.ts +1 -0
  337. package/lib/typescript/components/index.d.ts.map +1 -1
  338. package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts.map +1 -1
  339. package/lib/typescript/reorderable-list.d.ts +2 -0
  340. package/lib/typescript/reorderable-list.d.ts.map +1 -0
  341. package/package.json +37 -8
  342. package/src/components/Checkbox/index.tsx +22 -0
  343. package/src/components/DateTimeList/index.tsx +13 -26
  344. package/src/components/DateTimeList/styles.ts +1 -10
  345. package/src/components/Heading/index.tsx +10 -1
  346. package/src/components/Icon/index.tsx +2 -0
  347. package/src/components/ListItem/index.tsx +232 -15
  348. package/src/components/ListItem/styles.ts +41 -0
  349. package/src/components/Menu/index.tsx +128 -12
  350. package/src/components/RangeCalendar/index.tsx +2 -0
  351. package/src/components/ReorderableList/ReorderableListShared.tsx +113 -0
  352. package/src/components/ReorderableList/index.tsx +162 -0
  353. package/src/components/ReorderableList/index.web.tsx +254 -0
  354. package/src/components/ReorderableList/labels.ts +52 -0
  355. package/src/components/ReorderableList/reorderItems.ts +16 -0
  356. package/src/components/ReorderableList/rowContext.tsx +72 -0
  357. package/src/components/ReorderableList/types.ts +80 -0
  358. package/src/components/ReorderableList/useReorder.ts +159 -0
  359. package/src/components/ReorderableList/webDnd.ts +60 -0
  360. package/src/components/ScopedTheme/index.tsx +6 -1
  361. package/src/components/ScrollShadow/gradient.ts +48 -0
  362. package/src/components/ScrollShadow/index.tsx +300 -69
  363. package/src/components/ScrollShadow/styles.ts +45 -28
  364. package/src/components/ScrollShadow/useComposedScrollHandler.ts +58 -0
  365. package/src/components/ScrollShadow/useScrollShadow.ts +72 -10
  366. package/src/components/Skeleton/index.tsx +3 -0
  367. package/src/components/TablePagination/index.tsx +54 -0
  368. package/src/components/Tabs/index.tsx +25 -35
  369. package/src/components/Tabs/styles.ts +0 -9
  370. package/src/components/Text/index.tsx +6 -1
  371. package/src/components/Tile/styles.ts +4 -1
  372. package/src/components/index.ts +5 -0
  373. package/src/reorderable-list.ts +1 -0
@@ -0,0 +1,236 @@
1
+ # Checkbox (https://design.candescent.com/docs/components/checkbox)
2
+
3
+ Resources: [Figma](https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=366-383), [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/inputs-checkbox--states)
4
+
5
+ A compound component with sub-components for indicator, icon, label, and grouping.
6
+
7
+ ```tsx
8
+ import { Checkbox } from '@cdx-ui/components';
9
+ ```
10
+
11
+ ## Basic
12
+
13
+ ```tsx
14
+ import { Checkbox } from '@cdx-ui/components';
15
+
16
+ export default function CheckboxBasicDemo() {
17
+ return (
18
+ <Checkbox value="terms">
19
+ <Checkbox.Label>I agree to the terms and conditions</Checkbox.Label>
20
+ </Checkbox>
21
+ );
22
+ }
23
+ ```
24
+
25
+ ## Group
26
+
27
+ ```tsx
28
+ import { useState } from 'react';
29
+ import { Checkbox } from '@cdx-ui/components';
30
+
31
+ export default function CheckboxGroupDemo() {
32
+ const [selected, setSelected] = useState<string[]>(['notifications']);
33
+
34
+ return (
35
+ <Checkbox.Group value={selected} onChange={setSelected} aria-label="Email preferences">
36
+ <Checkbox value="notifications">
37
+ <Checkbox.Label>Email notifications</Checkbox.Label>
38
+ </Checkbox>
39
+ <Checkbox value="updates">
40
+ <Checkbox.Label>Product updates</Checkbox.Label>
41
+ </Checkbox>
42
+ <Checkbox value="marketing">
43
+ <Checkbox.Label>Marketing emails</Checkbox.Label>
44
+ </Checkbox>
45
+ </Checkbox.Group>
46
+ );
47
+ }
48
+ ```
49
+
50
+ ## Indeterminate
51
+
52
+ ```tsx
53
+ import { useState } from 'react';
54
+ import { Checkbox, Box } from '@cdx-ui/components';
55
+
56
+ export default function CheckboxIndeterminateDemo() {
57
+ const options = ['Read', 'Write', 'Execute'];
58
+ const [selected, setSelected] = useState<string[]>(['Read']);
59
+
60
+ const allChecked = selected.length === options.length;
61
+ const isIndeterminate = selected.length > 0 && !allChecked;
62
+
63
+ return (
64
+ <Box className="gap-2">
65
+ <Checkbox
66
+ value="all"
67
+ isChecked={allChecked}
68
+ isIndeterminate={isIndeterminate}
69
+ onChange={(checked) => setSelected(checked ? options : [])}
70
+ >
71
+ <Checkbox.Label>Select all permissions</Checkbox.Label>
72
+ </Checkbox>
73
+
74
+ <Box className="ml-6">
75
+ <Checkbox.Group value={selected} onChange={setSelected} aria-label="Individual permissions">
76
+ {options.map((option) => (
77
+ <Checkbox key={option} value={option}>
78
+ <Checkbox.Label>{option}</Checkbox.Label>
79
+ </Checkbox>
80
+ ))}
81
+ </Checkbox.Group>
82
+ </Box>
83
+ </Box>
84
+ );
85
+ }
86
+ ```
87
+
88
+ ## Disabled
89
+
90
+ ```tsx
91
+ import { Checkbox, Box } from '@cdx-ui/components';
92
+
93
+ export default function CheckboxDisabledDemo() {
94
+ return (
95
+ <Box className="gap-2">
96
+ <Checkbox value="unchecked" isDisabled>
97
+ <Checkbox.Label>Disabled unchecked</Checkbox.Label>
98
+ </Checkbox>
99
+ <Checkbox value="checked" isChecked isDisabled>
100
+ <Checkbox.Label>Disabled checked</Checkbox.Label>
101
+ </Checkbox>
102
+ </Box>
103
+ );
104
+ }
105
+ ```
106
+
107
+ ## Invalid
108
+
109
+ ```tsx
110
+ import { Checkbox } from '@cdx-ui/components';
111
+
112
+ export default function CheckboxInvalidDemo() {
113
+ return (
114
+ <Checkbox value="required-field" isInvalid>
115
+ <Checkbox.Label>You must accept the terms to continue</Checkbox.Label>
116
+ </Checkbox>
117
+ );
118
+ }
119
+ ```
120
+
121
+ ## With field
122
+
123
+ ```tsx
124
+ import { useState } from 'react';
125
+ import { Checkbox, Field } from '@cdx-ui/components';
126
+
127
+ export default function CheckboxWithFieldDemo() {
128
+ const [selected, setSelected] = useState<string[]>([]);
129
+
130
+ return (
131
+ <Field isRequired isInvalid={selected.length === 0}>
132
+ <Field.Label>Notification channels</Field.Label>
133
+ <Checkbox.Group value={selected} onChange={setSelected}>
134
+ <Checkbox value="email">
135
+ <Checkbox.Label>Email</Checkbox.Label>
136
+ </Checkbox>
137
+ <Checkbox value="sms">
138
+ <Checkbox.Label>Text message</Checkbox.Label>
139
+ </Checkbox>
140
+ <Checkbox value="push">
141
+ <Checkbox.Label>Push notification</Checkbox.Label>
142
+ </Checkbox>
143
+ </Checkbox.Group>
144
+ <Field.Error>Select at least one notification channel.</Field.Error>
145
+ </Field>
146
+ );
147
+ }
148
+ ```
149
+
150
+ ## API
151
+
152
+ ### Checkbox
153
+
154
+ Auto-renders its indicator and check icon — compose `Checkbox.Label` inside it.
155
+
156
+ | Prop | Type | Default | Description |
157
+ | --- | --- | --- | --- |
158
+ | `className?` | `string` | — | Additional Uniwind/Tailwind classes, merged after the checkbox's own styles. |
159
+ | `children?` | `ReactNode` | — | Content rendered after the indicator, typically a `Checkbox.Label`. |
160
+ | `value` | `string` | — | Identifies this checkbox. Must be unique among siblings in a `Checkbox.Group`. |
161
+ | `onChange?` | `((isSelected: boolean) => void)` | — | Called with the new checked state when the user toggles the checkbox. |
162
+ | `defaultIsChecked?` | `boolean` | — | Initial checked state when uncontrolled. No effect when `isChecked` is set. |
163
+ | `isChecked?` | `boolean` | — | Controlled checked state. When set, `defaultIsChecked` has no effect. |
164
+ | `isDisabled?` | `boolean` | — | Prevents interaction and applies disabled styling. Inherited from a parent `Checkbox.Group` or form field when omitted. |
165
+ | `isInvalid?` | `boolean` | — | Applies invalid styling. Inherited from a parent form field when omitted. |
166
+ | `isReadOnly?` | `boolean` | — | Focusable, but the checked state cannot be changed. |
167
+ | `isRequired?` | `boolean` | — | Marks the checkbox as required. |
168
+ | `isIndeterminate?` | `boolean` | — | Shows the indeterminate (mixed) icon instead of the check, regardless of `isChecked`. |
169
+
170
+ Inherits all [`PressableProps`](https://reactnative.dev/docs/pressable#props).
171
+
172
+ ## Sub-components
173
+
174
+ ### Checkbox.Label
175
+
176
+ Text label rendered alongside the checkbox indicator. Automatically receives disabled state from context.
177
+
178
+ | Prop | Type | Default | Description |
179
+ | --- | --- | --- | --- |
180
+ | `className?` | `string` | — | Additional Uniwind/Tailwind classes, merged after the label's own styles. |
181
+ | `children?` | `ReactNode` | — | Label content (or a custom element when `asChild` is set). |
182
+ | `asChild?` | `boolean` | — | Render the consumer's child element in place of the default `Text` host. |
183
+
184
+ Inherits all [`TextProps`](https://reactnative.dev/docs/text#props).
185
+
186
+ ### Checkbox.Indicator
187
+
188
+ The visual box that displays the checked, unchecked, or indeterminate state. Auto-rendered by the root and exposed for custom composition. Reads interaction and validation state from context.
189
+
190
+ | Prop | Type | Default | Description |
191
+ | --- | --- | --- | --- |
192
+ | `className?` | `string` | — | Additional Uniwind/Tailwind classes, merged after the indicator's own styles. |
193
+ | `children?` | `ReactNode` | — | Indicator content, typically a `Checkbox.Icon`. |
194
+ | `asChild?` | `boolean` | — | Render the consumer's child element in place of the default `View` host. |
195
+
196
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
197
+
198
+ ### Checkbox.Icon
199
+
200
+ The check or indeterminate icon rendered inside the indicator when checked or indeterminate. Auto-rendered; include it only to customize the glyph.
201
+
202
+ | Prop | Type | Default | Description |
203
+ | --- | --- | --- | --- |
204
+ | `className?` | `string` | — | Utility classes for size (`size-*`) and placement, merged after the defaults. |
205
+ | `filled?` | `boolean` | — | When `true`, renders the filled variant of the icon (if available). Defaults to `false` (outlined). |
206
+ | `size?` | `string \| number` | — | Width and height of the icon, in pixels or any SVG length. The bare icon renders at 24 when omitted. |
207
+ | `data-testid?` | `string` | — | Test identifier forwarded to the rendered SVG. |
208
+ | `as` | `ForgeIcon` | — | The `@cdx-ui/icons` component to render. |
209
+
210
+ Inherits all `ForgeIconProps` (react-native-svg `SvgProps` plus `filled` and `size`).
211
+
212
+ ### Checkbox.Group
213
+
214
+ Groups multiple checkboxes with shared state management and consistent spacing.
215
+
216
+ | Prop | Type | Default | Description |
217
+ | --- | --- | --- | --- |
218
+ | `className?` | `string` | — | Additional Uniwind/Tailwind classes, merged after the group's own styles. |
219
+ | `children?` | `ReactNode` | — | The `Checkbox` items in the group. |
220
+ | `value?` | `string[]` | `[]` | The `value` of every checked checkbox in the group. |
221
+ | `onChange?` | `((value: string[]) => void)` | — | Called with the updated list of checked values when the user toggles a checkbox. |
222
+ | `isDisabled?` | `boolean` | — | Disables every checkbox in the group. |
223
+ | `isInvalid?` | `boolean` | — | Marks the group as invalid. Set `isInvalid` on each `Checkbox` to style it as invalid. |
224
+ | `isReadOnly?` | `boolean` | — | Makes every checkbox in the group focusable but unchangeable. |
225
+ | `direction?` | `'column' \| 'row'` | `'column'` | Stacks the checkboxes vertically (`column`) or lays them out in a row. |
226
+
227
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
228
+
229
+ | Prop | Type | Default | Description |
230
+ | ------------ | --------------------------- | ---------- | ------------------------------------ |
231
+ | `value` | `string[]` | `[]` | Currently selected checkbox values |
232
+ | `onChange` | `(value: string[]) => void` | — | Called when selection changes |
233
+ | `isDisabled` | `boolean` | `false` | Disables all checkboxes in the group |
234
+ | `isInvalid` | `boolean` | `false` | Marks all checkboxes as invalid |
235
+ | `isReadOnly` | `boolean` | `false` | Makes all checkboxes read-only |
236
+ | `direction` | `'column' \| 'row'` | `'column'` | Layout direction of the group |
@@ -0,0 +1,214 @@
1
+ # Checkbox — Design (https://design.candescent.com/docs/components/checkbox)
2
+
3
+ ## Usage
4
+
5
+ **Example**
6
+
7
+ **Common alternative names**: Check, checkmark, tick, tick mark
8
+
9
+ ---
10
+
11
+ ## Anatomy
12
+
13
+ A Checkbox is made up of a square container and a checkmark icon.
14
+
15
+ **Anatomy\_checkbox**
16
+
17
+ 1. **Square container**: The empty square container that will contain the checkmark icon when checked.
18
+ 2. **Checkmark icon**: Shows that the checkbox is currently in the checked state.
19
+ 3. **Indeterminate icon**: Shows that the checkbox is currently in the indeterminate state.
20
+
21
+ ### Color
22
+
23
+ The checkbox component is available the colors: **Action**, and **Danger**.
24
+
25
+ - **color: action**
26
+
27
+ Utilizes the primary color palette. Used for most checkboxes in designs.
28
+ - **color: danger**
29
+
30
+ Utilizes the error color palette when checked. Indicates that there is an error with the user’s selection.
31
+
32
+ ### Size
33
+
34
+ Checkboxes are available in **Default** and **Small** sizes. Small checkboxes should only be used on desktop devices because they do not meet the minimum touch target requirements.
35
+
36
+ - **size: default**
37
+
38
+ The default size: 20×20 px
39
+ - **size: small**
40
+
41
+ A slightly smaller size: ??x?? px
42
+
43
+ ---
44
+
45
+ Usage
46
+
47
+ ### When to use
48
+
49
+ > [!TIP]
50
+ >
51
+ > **When a user needs to select any number of options from a list**
52
+ >
53
+ > - ex: While ordering a pizza, a customer may select **none**, **one**, or **multiple** pizza toppings.
54
+ > - ex: A user viewing a report may select **none**, **one**, or **multiple** options to filter the data.
55
+
56
+ > [!TIP]
57
+ >
58
+ > **When a user must select a minimum number of options from a list**
59
+ >
60
+ > - ex: While ordering a pizza, a customer must select **at least 1** type of pizza sauce.
61
+ > - ex: An applicant must select **at least 3** skills they know on a job application.
62
+
63
+ > [!TIP]
64
+ >
65
+ > **Selecting multiple items for batch actions**
66
+ >
67
+ > - ex: A user may select multiple rows of a table to delete them all at the same time.
68
+
69
+ > [!TIP]
70
+ >
71
+ > **When a user can turn on/off a single option**
72
+ >
73
+ > - ex: User selects a checkbox to indicate that they agree to the terms & conditions
74
+
75
+ - **Do:** Use a checkbox for agreeing to terms and conditions, and other similar inputs in forms.
76
+ - **Don't:** Don’t use a switch for agreeing to terms and conditions.
77
+
78
+ ### When not to use
79
+
80
+ > [!CAUTION]
81
+ >
82
+ > **When a user may only select one option**
83
+ >
84
+ > - ex: A Yes or No question
85
+ > - ex: Choosing between making something public or private
86
+ > - Instead, try using radio buttons.
87
+
88
+ - **Do:** Use checkboxes when a user may select multiple items
89
+ - **Don't:** Don’t use checkboxes when a user may only select one item. Instead, use radio buttons.
90
+
91
+ ### Labels
92
+
93
+ A Checkbox should always have a label. The most common method is to use the label built-in to the Checkbox component.
94
+
95
+ - **Show Label?: true**
96
+
97
+ Displays a label after the Checkbox.
98
+
99
+ #### **Overflow**
100
+
101
+ Labels should be kept short and concise. But when this isn’t possible, you may wrap the text down to a second line.
102
+
103
+ - **Do:** When necessary, long labels can wrap to a second line.
104
+ - **Don't:** Don't truncate the label text.
105
+
106
+ #### **Other labeling methods**
107
+
108
+ Checkboxes can also be given labels by being part of a list or table.
109
+
110
+ - **List Item**
111
+
112
+ A checkbox can be added to the left content slot of List Item component. This is useful for allowing the user to select from a more complex list. Each item serves as the “label”.
113
+ - **DataGrid**
114
+
115
+ In a DataGrid table, rows can be made selectable. This adds a checkbox to each row, including one in the header that allows the user to select the entire table. Each row serves as the “label”.
116
+
117
+ ### **Layout and placement**
118
+
119
+ Checkboxes are most commonly used inside of a Form Control component. This component wraps the checkboxes with a label for the group and optional helper text, enables the correct behavior and WCAG considerations, and provides layout controls. See the Form Control page for details and best practices.
120
+
121
+ ---
122
+
123
+ ## **Behavior**
124
+
125
+ ### Selection states
126
+
127
+ Checkboxes have three states of being selected (checked):
128
+
129
+ - **isChecked: false (default)**
130
+
131
+ This state indicates that the item **is not** currently selected.
132
+ - **isChecked: true**
133
+
134
+ This state indicates that the item **is** currently selected.
135
+ - **isIndeterminate: true**
136
+
137
+ This is a special state used for items that have children. It indicates that some (but not all) of the children are selected.
138
+
139
+ ### Interaction states
140
+
141
+ The default state of an checkbox is clickable. The appearance of the checkbox will respond as the user interacts with it.
142
+
143
+ - **Interaction State: resting**
144
+
145
+ The user can interact with the checkbox in this state.
146
+ - **Interaction State: hover**
147
+
148
+ The user is currently hovering over the checkbox.
149
+ - **Interaction State: focus**
150
+
151
+ The user is currently focusing on the checkbox using keyboard navigation.
152
+
153
+ ### Disabled
154
+
155
+ Checkboxes can be disabled, which prevents the user from clicking on or interacting with it. Note that disabled checkboxes can appear as unchecked, checked, or indeterminate, so this state is often used to show **read only** checkboxes.
156
+
157
+ - **isDisabled: true**
158
+
159
+ The user cannot interact with the checkbox in this state.
160
+
161
+ ## Content
162
+
163
+ As mentioned previously, a checkbox should always be clearly labeled. Consider the following guidelines when writing labels for checkboxes.
164
+
165
+ ## Punctuation
166
+
167
+ Never end a label with punctuation, even if the label is technically a complete sentence.
168
+
169
+ - **Do:** Even complete sentences don’t need end punctuation.
170
+ - **Don't:** Don’t use end punctuation, even on complete sentences.
171
+
172
+ ## Multiple options in a set
173
+
174
+ When multiple labeled checkboxes are used as a set of options, the options could be single nouns, phrases, or even short sentences. Try to keep the options matching in style.
175
+
176
+ - **Do:** Use the same style for each option. In this example, each option is the name of a skill.
177
+ - **Don't:** Don’t mix different styles. In this example, the first option has a verb, but the other options do not.
178
+
179
+ For additional guidance on creating groups of checkboxes, please see the Form Control page. This page includes information about writing the group label, writing and organizing the options, and writing helper text.
180
+
181
+ ## Negations
182
+
183
+ Avoid using negations, especially double negatives. These may confuse the user about what is actually being asked. Always be as clear as possible.
184
+
185
+ - **Do:** In this example, it’s clear that checking an item represents the user adding that topping to their pizza.
186
+ - **Don't:** Don’t use negation in options. In this example, the user must check every checkbox if they want no toppings.
187
+ - **Do:** This example clearly implies that checking the Checkbox is the user consenting to receive marketing emails.
188
+ - **Don't:** The negation “don’t” in this example may cause confusion, especially because it is an opt-out scenario.
189
+
190
+ ## Opt-in vs. opt-out
191
+
192
+ Opt-in and opt-out are two different approaches to gaining consent or permission from a user. Checkboxes and switches are commonly used for these actions. It’s important to know the differences between the two approaches in order to design a user-centered experience.
193
+
194
+ ### Opt-in
195
+
196
+ By default, the user **has not** given permission. The user must actively choose to **give** permission. This approach is generally considered more privacy-friendly.
197
+
198
+ Common examples:
199
+
200
+ - A user is asked if they agree to the terms and conditions before they complete their registration.
201
+ - A user is asked if they would like to subscribe to a newsletter before they complete their registration.
202
+
203
+ ### Opt-out
204
+
205
+ By the default, the user **has** given consent or permission. The user must actively choose to **revoke or withdraw** permission. This approach is generally considered less privacy-friendly.
206
+
207
+ Common examples:
208
+
209
+ - A user visits a website, and the website considers their use of the website an implicit agreement to the terms and conditions.
210
+ - A user completes their registration, and is then automatically subscribed to that website’s newsletter. They must manually take action to unsubscribe.
211
+
212
+ ### Further reading
213
+
214
+ For further reading about opt-in vs. opt-out, check out [this blog post](https://www.cookieyes.com/blog/opt-in-opt-out/).