@cdx-ui/components 0.3.5 → 0.3.7

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 (416) hide show
  1. package/README.md +1 -1
  2. package/coverage.svg +1 -1
  3. package/docs/components/bar-chart/content.md +703 -0
  4. package/docs/components/content.md +10 -1
  5. package/docs/components/country-flag/content.md +232 -0
  6. package/docs/components/data-grid/content.md +3 -1
  7. package/docs/components/icon/content.md +1 -1
  8. package/docs/components/input/content.md +1 -0
  9. package/docs/components/line-chart/content.md +567 -0
  10. package/docs/components/pie-chart/content.md +493 -0
  11. package/docs/components/progress-bar/content.md +164 -3
  12. package/docs/components/progress-segmented/content.md +1 -1
  13. package/docs/components/select/content.md +1 -0
  14. package/docs/components/stepper/content.md +599 -0
  15. package/docs/components/system-alert/content.md +533 -0
  16. package/docs/foundations/expressions/icons/content.md +2 -1
  17. package/docs/foundations/styles/tokens/all-tokens/content.md +2 -1
  18. package/docs/getting-started/developers/content.md +1 -1
  19. package/docs/llms.txt +12 -0
  20. package/docs/patterns/content.md +1 -0
  21. package/docs/patterns/dashboard/content.md +423 -19
  22. package/docs/patterns/insights/content.md +659 -0
  23. package/docs/resources/content.md +1 -0
  24. package/docs/resources/release-notes/0.3.5/content.md +7 -0
  25. package/docs/resources/release-notes/0.3.6/content.md +29 -0
  26. package/docs/resources/release-notes/content.md +2 -0
  27. package/docs/resources/skills/content.md +66 -0
  28. package/lib/commonjs/components/BarChart/geometry.js +1130 -0
  29. package/lib/commonjs/components/BarChart/geometry.js.map +1 -0
  30. package/lib/commonjs/components/BarChart/index.js +935 -0
  31. package/lib/commonjs/components/BarChart/index.js.map +1 -0
  32. package/lib/commonjs/components/BarChart/styles.js +26 -0
  33. package/lib/commonjs/components/BarChart/styles.js.map +1 -0
  34. package/lib/commonjs/components/Button/index.js +2 -2
  35. package/lib/commonjs/components/Button/index.js.map +1 -1
  36. package/lib/commonjs/components/CountryFlag/index.js +56 -0
  37. package/lib/commonjs/components/CountryFlag/index.js.map +1 -0
  38. package/lib/commonjs/components/Input/index.js.map +1 -1
  39. package/lib/commonjs/components/LineChart/geometry.js +698 -0
  40. package/lib/commonjs/components/LineChart/geometry.js.map +1 -0
  41. package/lib/commonjs/components/LineChart/index.js +744 -0
  42. package/lib/commonjs/components/LineChart/index.js.map +1 -0
  43. package/lib/commonjs/components/LineChart/styles.js +25 -0
  44. package/lib/commonjs/components/LineChart/styles.js.map +1 -0
  45. package/lib/commonjs/components/PieChart/geometry.js +216 -0
  46. package/lib/commonjs/components/PieChart/geometry.js.map +1 -0
  47. package/lib/commonjs/components/PieChart/index.js +476 -0
  48. package/lib/commonjs/components/PieChart/index.js.map +1 -0
  49. package/lib/commonjs/components/PieChart/styles.js +88 -0
  50. package/lib/commonjs/components/PieChart/styles.js.map +1 -0
  51. package/lib/commonjs/components/ProgressBar/index.js +44 -12
  52. package/lib/commonjs/components/ProgressBar/index.js.map +1 -1
  53. package/lib/commonjs/components/ProgressBar/styles.js +31 -2
  54. package/lib/commonjs/components/ProgressBar/styles.js.map +1 -1
  55. package/lib/commonjs/components/ProgressCircle/ProgressCircleRing.js +9 -31
  56. package/lib/commonjs/components/ProgressCircle/ProgressCircleRing.js.map +1 -1
  57. package/lib/commonjs/components/ProgressCircle/ProgressRing.js +52 -0
  58. package/lib/commonjs/components/ProgressCircle/ProgressRing.js.map +1 -0
  59. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js +8 -7
  60. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js.map +1 -1
  61. package/lib/commonjs/components/Select/index.js.map +1 -1
  62. package/lib/commonjs/components/Stepper/index.js +369 -0
  63. package/lib/commonjs/components/Stepper/index.js.map +1 -0
  64. package/lib/commonjs/components/Stepper/styles.js +211 -0
  65. package/lib/commonjs/components/Stepper/styles.js.map +1 -0
  66. package/lib/commonjs/components/Stepper/useStepperLabelFit.js +22 -0
  67. package/lib/commonjs/components/Stepper/useStepperLabelFit.js.map +1 -0
  68. package/lib/commonjs/components/Stepper/useStepperLabelFit.web.js +52 -0
  69. package/lib/commonjs/components/Stepper/useStepperLabelFit.web.js.map +1 -0
  70. package/lib/commonjs/components/Stepper/useStepperRingColors.js +31 -0
  71. package/lib/commonjs/components/Stepper/useStepperRingColors.js.map +1 -0
  72. package/lib/commonjs/components/SystemAlert/animation.js +218 -0
  73. package/lib/commonjs/components/SystemAlert/animation.js.map +1 -0
  74. package/lib/commonjs/components/SystemAlert/index.js +525 -0
  75. package/lib/commonjs/components/SystemAlert/index.js.map +1 -0
  76. package/lib/commonjs/components/SystemAlert/styles.js +178 -0
  77. package/lib/commonjs/components/SystemAlert/styles.js.map +1 -0
  78. package/lib/commonjs/components/SystemAlert/useSystemAlertStatusBarStyle.js +53 -0
  79. package/lib/commonjs/components/SystemAlert/useSystemAlertStatusBarStyle.js.map +1 -0
  80. package/lib/commonjs/components/Tabs/index.js +4 -0
  81. package/lib/commonjs/components/Tabs/index.js.map +1 -1
  82. package/lib/commonjs/components/Tabs/styles.js +1 -1
  83. package/lib/commonjs/components/Tabs/styles.js.map +1 -1
  84. package/lib/commonjs/components/chart/ChartInspector.js +610 -0
  85. package/lib/commonjs/components/chart/ChartInspector.js.map +1 -0
  86. package/lib/commonjs/components/chart/format.js +93 -0
  87. package/lib/commonjs/components/chart/format.js.map +1 -0
  88. package/lib/commonjs/components/chart/hiddenSvgProps.js +23 -0
  89. package/lib/commonjs/components/chart/hiddenSvgProps.js.map +1 -0
  90. package/lib/commonjs/components/chart/index.js +2 -0
  91. package/lib/commonjs/components/chart/index.js.map +1 -0
  92. package/lib/commonjs/components/chart/motion.js +97 -0
  93. package/lib/commonjs/components/chart/motion.js.map +1 -0
  94. package/lib/commonjs/components/chart/palette.js +178 -0
  95. package/lib/commonjs/components/chart/palette.js.map +1 -0
  96. package/lib/commonjs/components/chart/size.js +34 -0
  97. package/lib/commonjs/components/chart/size.js.map +1 -0
  98. package/lib/commonjs/components/chart/ticks.js +59 -0
  99. package/lib/commonjs/components/chart/ticks.js.map +1 -0
  100. package/lib/commonjs/components/chart/types.js +6 -0
  101. package/lib/commonjs/components/chart/types.js.map +1 -0
  102. package/lib/commonjs/components/chart/useChartHostWidth.js +27 -0
  103. package/lib/commonjs/components/chart/useChartHostWidth.js.map +1 -0
  104. package/lib/commonjs/components/index.js +72 -0
  105. package/lib/commonjs/components/index.js.map +1 -1
  106. package/lib/commonjs/figma/Accordion.figma.js +2 -2
  107. package/lib/commonjs/figma/Accordion.figma.js.map +1 -1
  108. package/lib/commonjs/figma/Alert.figma.js +7 -7
  109. package/lib/commonjs/figma/Alert.figma.js.map +1 -1
  110. package/lib/commonjs/figma/Badge.Indicator.figma.js +6 -5
  111. package/lib/commonjs/figma/Badge.Indicator.figma.js.map +1 -1
  112. package/lib/commonjs/figma/Badge.figma.js +22 -22
  113. package/lib/commonjs/figma/Badge.figma.js.map +1 -1
  114. package/lib/commonjs/figma/Button.figma.js +5 -2
  115. package/lib/commonjs/figma/Button.figma.js.map +1 -1
  116. package/lib/commonjs/figma/CLAUDE.md +1 -0
  117. package/lib/commonjs/figma/Card.Header.figma.js +8 -4
  118. package/lib/commonjs/figma/Card.Header.figma.js.map +1 -1
  119. package/lib/commonjs/figma/Card.figma.js +2 -1
  120. package/lib/commonjs/figma/Card.figma.js.map +1 -1
  121. package/lib/commonjs/figma/Chip.figma.js +2 -2
  122. package/lib/commonjs/figma/Chip.figma.js.map +1 -1
  123. package/lib/commonjs/figma/CurrencyInput.figma.js +1 -1
  124. package/lib/commonjs/figma/CurrencyInput.figma.js.map +1 -1
  125. package/lib/commonjs/figma/Dialog.figma.js +5 -2
  126. package/lib/commonjs/figma/Dialog.figma.js.map +1 -1
  127. package/lib/commonjs/figma/Divider.figma.js +1 -1
  128. package/lib/commonjs/figma/Divider.figma.js.map +1 -1
  129. package/lib/commonjs/figma/Drawer.figma.js +3 -3
  130. package/lib/commonjs/figma/Drawer.figma.js.map +1 -1
  131. package/lib/commonjs/figma/IconButton.figma.js +10 -4
  132. package/lib/commonjs/figma/IconButton.figma.js.map +1 -1
  133. package/lib/commonjs/figma/Input.figma.js +2 -1
  134. package/lib/commonjs/figma/Input.figma.js.map +1 -1
  135. package/lib/commonjs/figma/Insight.figma.js +3 -3
  136. package/lib/commonjs/figma/Insight.figma.js.map +1 -1
  137. package/lib/commonjs/figma/ProgressBar.figma.js +11 -2
  138. package/lib/commonjs/figma/ProgressBar.figma.js.map +1 -1
  139. package/lib/commonjs/figma/ProgressSegmented.figma.js +9 -1
  140. package/lib/commonjs/figma/ProgressSegmented.figma.js.map +1 -1
  141. package/lib/commonjs/figma/Select.figma.js +2 -1
  142. package/lib/commonjs/figma/Select.figma.js.map +1 -1
  143. package/lib/commonjs/figma/SystemAlert.Button.figma.js +28 -0
  144. package/lib/commonjs/figma/SystemAlert.Button.figma.js.map +1 -0
  145. package/lib/commonjs/figma/SystemAlert.Close.figma.js +22 -0
  146. package/lib/commonjs/figma/SystemAlert.Close.figma.js.map +1 -0
  147. package/lib/commonjs/figma/SystemAlert.Description.figma.js +20 -0
  148. package/lib/commonjs/figma/SystemAlert.Description.figma.js.map +1 -0
  149. package/lib/commonjs/figma/SystemAlert.IconButton.figma.js +31 -0
  150. package/lib/commonjs/figma/SystemAlert.IconButton.figma.js.map +1 -0
  151. package/lib/commonjs/figma/SystemAlert.figma.js +47 -0
  152. package/lib/commonjs/figma/SystemAlert.figma.js.map +1 -0
  153. package/lib/commonjs/styles.css +0 -1
  154. package/lib/module/components/BarChart/geometry.js +1110 -0
  155. package/lib/module/components/BarChart/geometry.js.map +1 -0
  156. package/lib/module/components/BarChart/index.js +929 -0
  157. package/lib/module/components/BarChart/index.js.map +1 -0
  158. package/lib/module/components/BarChart/styles.js +22 -0
  159. package/lib/module/components/BarChart/styles.js.map +1 -0
  160. package/lib/module/components/Button/index.js +2 -2
  161. package/lib/module/components/Button/index.js.map +1 -1
  162. package/lib/module/components/CountryFlag/index.js +52 -0
  163. package/lib/module/components/CountryFlag/index.js.map +1 -0
  164. package/lib/module/components/Input/index.js.map +1 -1
  165. package/lib/module/components/LineChart/geometry.js +685 -0
  166. package/lib/module/components/LineChart/geometry.js.map +1 -0
  167. package/lib/module/components/LineChart/index.js +738 -0
  168. package/lib/module/components/LineChart/index.js.map +1 -0
  169. package/lib/module/components/LineChart/styles.js +21 -0
  170. package/lib/module/components/LineChart/styles.js.map +1 -0
  171. package/lib/module/components/PieChart/geometry.js +209 -0
  172. package/lib/module/components/PieChart/geometry.js.map +1 -0
  173. package/lib/module/components/PieChart/index.js +471 -0
  174. package/lib/module/components/PieChart/index.js.map +1 -0
  175. package/lib/module/components/PieChart/styles.js +84 -0
  176. package/lib/module/components/PieChart/styles.js.map +1 -0
  177. package/lib/module/components/ProgressBar/index.js +47 -15
  178. package/lib/module/components/ProgressBar/index.js.map +1 -1
  179. package/lib/module/components/ProgressBar/styles.js +31 -2
  180. package/lib/module/components/ProgressBar/styles.js.map +1 -1
  181. package/lib/module/components/ProgressCircle/ProgressCircleRing.js +10 -32
  182. package/lib/module/components/ProgressCircle/ProgressCircleRing.js.map +1 -1
  183. package/lib/module/components/ProgressCircle/ProgressRing.js +48 -0
  184. package/lib/module/components/ProgressCircle/ProgressRing.js.map +1 -0
  185. package/lib/module/components/ScrollShadow/useScrollShadow.js +8 -7
  186. package/lib/module/components/ScrollShadow/useScrollShadow.js.map +1 -1
  187. package/lib/module/components/Select/index.js.map +1 -1
  188. package/lib/module/components/Stepper/index.js +360 -0
  189. package/lib/module/components/Stepper/index.js.map +1 -0
  190. package/lib/module/components/Stepper/styles.js +206 -0
  191. package/lib/module/components/Stepper/styles.js.map +1 -0
  192. package/lib/module/components/Stepper/useStepperLabelFit.js +18 -0
  193. package/lib/module/components/Stepper/useStepperLabelFit.js.map +1 -0
  194. package/lib/module/components/Stepper/useStepperLabelFit.web.js +48 -0
  195. package/lib/module/components/Stepper/useStepperLabelFit.web.js.map +1 -0
  196. package/lib/module/components/Stepper/useStepperRingColors.js +28 -0
  197. package/lib/module/components/Stepper/useStepperRingColors.js.map +1 -0
  198. package/lib/module/components/SystemAlert/animation.js +213 -0
  199. package/lib/module/components/SystemAlert/animation.js.map +1 -0
  200. package/lib/module/components/SystemAlert/index.js +515 -0
  201. package/lib/module/components/SystemAlert/index.js.map +1 -0
  202. package/lib/module/components/SystemAlert/styles.js +174 -0
  203. package/lib/module/components/SystemAlert/styles.js.map +1 -0
  204. package/lib/module/components/SystemAlert/useSystemAlertStatusBarStyle.js +49 -0
  205. package/lib/module/components/SystemAlert/useSystemAlertStatusBarStyle.js.map +1 -0
  206. package/lib/module/components/Tabs/index.js +4 -0
  207. package/lib/module/components/Tabs/index.js.map +1 -1
  208. package/lib/module/components/Tabs/styles.js +1 -1
  209. package/lib/module/components/Tabs/styles.js.map +1 -1
  210. package/lib/module/components/chart/ChartInspector.js +600 -0
  211. package/lib/module/components/chart/ChartInspector.js.map +1 -0
  212. package/lib/module/components/chart/format.js +84 -0
  213. package/lib/module/components/chart/format.js.map +1 -0
  214. package/lib/module/components/chart/hiddenSvgProps.js +20 -0
  215. package/lib/module/components/chart/hiddenSvgProps.js.map +1 -0
  216. package/lib/module/components/chart/index.js +2 -0
  217. package/lib/module/components/chart/index.js.map +1 -0
  218. package/lib/module/components/chart/motion.js +89 -0
  219. package/lib/module/components/chart/motion.js.map +1 -0
  220. package/lib/module/components/chart/palette.js +168 -0
  221. package/lib/module/components/chart/palette.js.map +1 -0
  222. package/lib/module/components/chart/size.js +29 -0
  223. package/lib/module/components/chart/size.js.map +1 -0
  224. package/lib/module/components/chart/ticks.js +55 -0
  225. package/lib/module/components/chart/ticks.js.map +1 -0
  226. package/lib/module/components/chart/types.js +4 -0
  227. package/lib/module/components/chart/types.js.map +1 -0
  228. package/lib/module/components/chart/useChartHostWidth.js +23 -0
  229. package/lib/module/components/chart/useChartHostWidth.js.map +1 -0
  230. package/lib/module/components/index.js +6 -0
  231. package/lib/module/components/index.js.map +1 -1
  232. package/lib/module/figma/Accordion.figma.js +2 -2
  233. package/lib/module/figma/Accordion.figma.js.map +1 -1
  234. package/lib/module/figma/Alert.figma.js +7 -7
  235. package/lib/module/figma/Alert.figma.js.map +1 -1
  236. package/lib/module/figma/Badge.Indicator.figma.js +6 -5
  237. package/lib/module/figma/Badge.Indicator.figma.js.map +1 -1
  238. package/lib/module/figma/Badge.figma.js +22 -22
  239. package/lib/module/figma/Badge.figma.js.map +1 -1
  240. package/lib/module/figma/Button.figma.js +5 -2
  241. package/lib/module/figma/Button.figma.js.map +1 -1
  242. package/lib/module/figma/CLAUDE.md +1 -0
  243. package/lib/module/figma/Card.Header.figma.js +8 -4
  244. package/lib/module/figma/Card.Header.figma.js.map +1 -1
  245. package/lib/module/figma/Card.figma.js +2 -1
  246. package/lib/module/figma/Card.figma.js.map +1 -1
  247. package/lib/module/figma/Chip.figma.js +2 -2
  248. package/lib/module/figma/Chip.figma.js.map +1 -1
  249. package/lib/module/figma/CurrencyInput.figma.js +1 -1
  250. package/lib/module/figma/CurrencyInput.figma.js.map +1 -1
  251. package/lib/module/figma/Dialog.figma.js +5 -2
  252. package/lib/module/figma/Dialog.figma.js.map +1 -1
  253. package/lib/module/figma/Divider.figma.js +1 -1
  254. package/lib/module/figma/Divider.figma.js.map +1 -1
  255. package/lib/module/figma/Drawer.figma.js +3 -3
  256. package/lib/module/figma/Drawer.figma.js.map +1 -1
  257. package/lib/module/figma/IconButton.figma.js +10 -4
  258. package/lib/module/figma/IconButton.figma.js.map +1 -1
  259. package/lib/module/figma/Input.figma.js +2 -1
  260. package/lib/module/figma/Input.figma.js.map +1 -1
  261. package/lib/module/figma/Insight.figma.js +3 -3
  262. package/lib/module/figma/Insight.figma.js.map +1 -1
  263. package/lib/module/figma/ProgressBar.figma.js +12 -2
  264. package/lib/module/figma/ProgressBar.figma.js.map +1 -1
  265. package/lib/module/figma/ProgressSegmented.figma.js +9 -1
  266. package/lib/module/figma/ProgressSegmented.figma.js.map +1 -1
  267. package/lib/module/figma/Select.figma.js +2 -1
  268. package/lib/module/figma/Select.figma.js.map +1 -1
  269. package/lib/module/figma/SystemAlert.Button.figma.js +22 -0
  270. package/lib/module/figma/SystemAlert.Button.figma.js.map +1 -0
  271. package/lib/module/figma/SystemAlert.Close.figma.js +18 -0
  272. package/lib/module/figma/SystemAlert.Close.figma.js.map +1 -0
  273. package/lib/module/figma/SystemAlert.Description.figma.js +14 -0
  274. package/lib/module/figma/SystemAlert.Description.figma.js.map +1 -0
  275. package/lib/module/figma/SystemAlert.IconButton.figma.js +25 -0
  276. package/lib/module/figma/SystemAlert.IconButton.figma.js.map +1 -0
  277. package/lib/module/figma/SystemAlert.figma.js +41 -0
  278. package/lib/module/figma/SystemAlert.figma.js.map +1 -0
  279. package/lib/module/styles.css +0 -1
  280. package/lib/typescript/components/BarChart/geometry.d.ts +236 -0
  281. package/lib/typescript/components/BarChart/geometry.d.ts.map +1 -0
  282. package/lib/typescript/components/BarChart/index.d.ts +193 -0
  283. package/lib/typescript/components/BarChart/index.d.ts.map +1 -0
  284. package/lib/typescript/components/BarChart/styles.d.ts +32 -0
  285. package/lib/typescript/components/BarChart/styles.d.ts.map +1 -0
  286. package/lib/typescript/components/CountryFlag/index.d.ts +35 -0
  287. package/lib/typescript/components/CountryFlag/index.d.ts.map +1 -0
  288. package/lib/typescript/components/Input/index.d.ts +2 -0
  289. package/lib/typescript/components/Input/index.d.ts.map +1 -1
  290. package/lib/typescript/components/LineChart/geometry.d.ts +248 -0
  291. package/lib/typescript/components/LineChart/geometry.d.ts.map +1 -0
  292. package/lib/typescript/components/LineChart/index.d.ts +105 -0
  293. package/lib/typescript/components/LineChart/index.d.ts.map +1 -0
  294. package/lib/typescript/components/LineChart/styles.d.ts +12 -0
  295. package/lib/typescript/components/LineChart/styles.d.ts.map +1 -0
  296. package/lib/typescript/components/PieChart/geometry.d.ts +43 -0
  297. package/lib/typescript/components/PieChart/geometry.d.ts.map +1 -0
  298. package/lib/typescript/components/PieChart/index.d.ts +147 -0
  299. package/lib/typescript/components/PieChart/index.d.ts.map +1 -0
  300. package/lib/typescript/components/PieChart/styles.d.ts +27 -0
  301. package/lib/typescript/components/PieChart/styles.d.ts.map +1 -0
  302. package/lib/typescript/components/ProgressBar/index.d.ts +16 -1
  303. package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -1
  304. package/lib/typescript/components/ProgressBar/styles.d.ts +7 -2
  305. package/lib/typescript/components/ProgressBar/styles.d.ts.map +1 -1
  306. package/lib/typescript/components/ProgressCircle/ProgressCircleRing.d.ts.map +1 -1
  307. package/lib/typescript/components/ProgressCircle/ProgressRing.d.ts +17 -0
  308. package/lib/typescript/components/ProgressCircle/ProgressRing.d.ts.map +1 -0
  309. package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts.map +1 -1
  310. package/lib/typescript/components/Select/index.d.ts +2 -0
  311. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  312. package/lib/typescript/components/Stepper/index.d.ts +68 -0
  313. package/lib/typescript/components/Stepper/index.d.ts.map +1 -0
  314. package/lib/typescript/components/Stepper/styles.d.ts +46 -0
  315. package/lib/typescript/components/Stepper/styles.d.ts.map +1 -0
  316. package/lib/typescript/components/Stepper/useStepperLabelFit.d.ts +15 -0
  317. package/lib/typescript/components/Stepper/useStepperLabelFit.d.ts.map +1 -0
  318. package/lib/typescript/components/Stepper/useStepperLabelFit.web.d.ts +10 -0
  319. package/lib/typescript/components/Stepper/useStepperLabelFit.web.d.ts.map +1 -0
  320. package/lib/typescript/components/Stepper/useStepperRingColors.d.ts +6 -0
  321. package/lib/typescript/components/Stepper/useStepperRingColors.d.ts.map +1 -0
  322. package/lib/typescript/components/SystemAlert/animation.d.ts +56 -0
  323. package/lib/typescript/components/SystemAlert/animation.d.ts.map +1 -0
  324. package/lib/typescript/components/SystemAlert/index.d.ts +110 -0
  325. package/lib/typescript/components/SystemAlert/index.d.ts.map +1 -0
  326. package/lib/typescript/components/SystemAlert/styles.d.ts +38 -0
  327. package/lib/typescript/components/SystemAlert/styles.d.ts.map +1 -0
  328. package/lib/typescript/components/SystemAlert/useSystemAlertStatusBarStyle.d.ts +14 -0
  329. package/lib/typescript/components/SystemAlert/useSystemAlertStatusBarStyle.d.ts.map +1 -0
  330. package/lib/typescript/components/Tabs/index.d.ts.map +1 -1
  331. package/lib/typescript/components/chart/ChartInspector.d.ts +101 -0
  332. package/lib/typescript/components/chart/ChartInspector.d.ts.map +1 -0
  333. package/lib/typescript/components/chart/format.d.ts +16 -0
  334. package/lib/typescript/components/chart/format.d.ts.map +1 -0
  335. package/lib/typescript/components/chart/hiddenSvgProps.d.ts +17 -0
  336. package/lib/typescript/components/chart/hiddenSvgProps.d.ts.map +1 -0
  337. package/lib/typescript/components/chart/index.d.ts +3 -0
  338. package/lib/typescript/components/chart/index.d.ts.map +1 -0
  339. package/lib/typescript/components/chart/motion.d.ts +27 -0
  340. package/lib/typescript/components/chart/motion.d.ts.map +1 -0
  341. package/lib/typescript/components/chart/palette.d.ts +44 -0
  342. package/lib/typescript/components/chart/palette.d.ts.map +1 -0
  343. package/lib/typescript/components/chart/size.d.ts +25 -0
  344. package/lib/typescript/components/chart/size.d.ts.map +1 -0
  345. package/lib/typescript/components/chart/ticks.d.ts +3 -0
  346. package/lib/typescript/components/chart/ticks.d.ts.map +1 -0
  347. package/lib/typescript/components/chart/types.d.ts +163 -0
  348. package/lib/typescript/components/chart/types.d.ts.map +1 -0
  349. package/lib/typescript/components/chart/useChartHostWidth.d.ts +9 -0
  350. package/lib/typescript/components/chart/useChartHostWidth.d.ts.map +1 -0
  351. package/lib/typescript/components/index.d.ts +6 -0
  352. package/lib/typescript/components/index.d.ts.map +1 -1
  353. package/lib/typescript/figma/Alert.figma.d.ts.map +1 -1
  354. package/lib/typescript/figma/Badge.Indicator.figma.d.ts.map +1 -1
  355. package/lib/typescript/figma/Badge.figma.d.ts.map +1 -1
  356. package/lib/typescript/figma/Button.figma.d.ts.map +1 -1
  357. package/lib/typescript/figma/Card.Header.figma.d.ts.map +1 -1
  358. package/lib/typescript/figma/Card.figma.d.ts.map +1 -1
  359. package/lib/typescript/figma/Dialog.figma.d.ts.map +1 -1
  360. package/lib/typescript/figma/IconButton.figma.d.ts.map +1 -1
  361. package/lib/typescript/figma/Input.figma.d.ts.map +1 -1
  362. package/lib/typescript/figma/ProgressBar.figma.d.ts.map +1 -1
  363. package/lib/typescript/figma/ProgressSegmented.figma.d.ts.map +1 -1
  364. package/lib/typescript/figma/Select.figma.d.ts.map +1 -1
  365. package/lib/typescript/figma/SystemAlert.Button.figma.d.ts +11 -0
  366. package/lib/typescript/figma/SystemAlert.Button.figma.d.ts.map +1 -0
  367. package/lib/typescript/figma/SystemAlert.Close.figma.d.ts +11 -0
  368. package/lib/typescript/figma/SystemAlert.Close.figma.d.ts.map +1 -0
  369. package/lib/typescript/figma/SystemAlert.Description.figma.d.ts +8 -0
  370. package/lib/typescript/figma/SystemAlert.Description.figma.d.ts.map +1 -0
  371. package/lib/typescript/figma/SystemAlert.IconButton.figma.d.ts +11 -0
  372. package/lib/typescript/figma/SystemAlert.IconButton.figma.d.ts.map +1 -0
  373. package/lib/typescript/figma/SystemAlert.figma.d.ts +8 -0
  374. package/lib/typescript/figma/SystemAlert.figma.d.ts.map +1 -0
  375. package/package.json +5 -5
  376. package/src/components/BarChart/geometry.ts +1469 -0
  377. package/src/components/BarChart/index.tsx +1417 -0
  378. package/src/components/BarChart/styles.ts +31 -0
  379. package/src/components/Button/index.tsx +1 -1
  380. package/src/components/CountryFlag/index.tsx +53 -0
  381. package/src/components/Input/index.tsx +2 -0
  382. package/src/components/LineChart/geometry.ts +957 -0
  383. package/src/components/LineChart/index.tsx +1106 -0
  384. package/src/components/LineChart/styles.ts +26 -0
  385. package/src/components/PieChart/geometry.ts +295 -0
  386. package/src/components/PieChart/index.tsx +715 -0
  387. package/src/components/PieChart/styles.ts +101 -0
  388. package/src/components/ProgressBar/index.tsx +66 -14
  389. package/src/components/ProgressBar/styles.ts +35 -4
  390. package/src/components/ProgressCircle/ProgressCircleRing.tsx +10 -39
  391. package/src/components/ProgressCircle/ProgressRing.tsx +60 -0
  392. package/src/components/ScrollShadow/useScrollShadow.ts +12 -11
  393. package/src/components/Select/index.tsx +2 -0
  394. package/src/components/Stepper/index.tsx +452 -0
  395. package/src/components/Stepper/styles.ts +234 -0
  396. package/src/components/Stepper/useStepperLabelFit.ts +21 -0
  397. package/src/components/Stepper/useStepperLabelFit.web.ts +53 -0
  398. package/src/components/Stepper/useStepperRingColors.ts +29 -0
  399. package/src/components/SystemAlert/animation.ts +252 -0
  400. package/src/components/SystemAlert/index.tsx +684 -0
  401. package/src/components/SystemAlert/styles.ts +212 -0
  402. package/src/components/SystemAlert/useSystemAlertStatusBarStyle.ts +57 -0
  403. package/src/components/Tabs/index.tsx +4 -0
  404. package/src/components/Tabs/styles.ts +1 -1
  405. package/src/components/chart/ChartInspector.tsx +726 -0
  406. package/src/components/chart/format.ts +95 -0
  407. package/src/components/chart/hiddenSvgProps.ts +15 -0
  408. package/src/components/chart/index.ts +24 -0
  409. package/src/components/chart/motion.ts +98 -0
  410. package/src/components/chart/palette.tsx +247 -0
  411. package/src/components/chart/size.ts +21 -0
  412. package/src/components/chart/ticks.ts +53 -0
  413. package/src/components/chart/types.ts +183 -0
  414. package/src/components/chart/useChartHostWidth.ts +26 -0
  415. package/src/components/index.ts +6 -0
  416. package/src/styles.css +0 -1
@@ -0,0 +1,567 @@
1
+ # Line Chart (https://design.candescent.com/docs/components/line-chart)
2
+
3
+ Resources: [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/charts-linechart--default)
4
+
5
+ `LineChart` takes your own rows in `dataset`. `xAxis[0].dataKey` names the category column and each `series[].dataKey` names a value column, so no row key is reserved — a column called `label` or `tick` is plain data. The [Insights Overview](https://design.candescent.com/docs/patterns/dashboard/content.md#insights-overview) pattern shows a compact line chart beside a headline figure.
6
+
7
+ ```tsx
8
+ import { LineChart } from '@cdx-ui/components';
9
+ ```
10
+
11
+ ## Basic
12
+
13
+ One series with `area: true`. The value domain comes from the data and does not force zero.
14
+
15
+ ```tsx
16
+ import { LineChart } from '@cdx-ui/components';
17
+ import { MONTH_AXIS, REVENUE, REVENUE_SERIES } from './_data';
18
+
19
+ export default function LineChartBasicDemo() {
20
+ return (
21
+ <LineChart
22
+ dataset={REVENUE}
23
+ xAxis={MONTH_AXIS}
24
+ series={REVENUE_SERIES}
25
+ hideLegend
26
+ scrollable={false}
27
+ accessibilityLabel="Monthly revenue"
28
+ />
29
+ );
30
+ }
31
+ ```
32
+
33
+ ## Sizes
34
+
35
+ `size` picks a preset plot box: `sm`, `md`, `lg` (the default), or `xl`. `width` and `height` override one side.
36
+
37
+ ```tsx
38
+ import { useState } from 'react';
39
+ import { Box, LineChart, Slider, VStack } from '@cdx-ui/components';
40
+ import { FORECAST, FORECAST_AXIS, SERIES } from './_data';
41
+
42
+ const SIZES = ['sm', 'md', 'lg', 'xl'] as const;
43
+
44
+ export default function LineChartSizesDemo() {
45
+ const [index, setIndex] = useState(2);
46
+ const size = SIZES[index] ?? 'lg';
47
+
48
+ return (
49
+ <VStack space="2xl" className="w-full items-center">
50
+ <Box className="w-full max-w-xs">
51
+ <Slider
52
+ value={index}
53
+ onChange={setIndex}
54
+ min={0}
55
+ max={SIZES.length - 1}
56
+ step={1}
57
+ accessibilityLabel="Chart size"
58
+ >
59
+ <Slider.Rail>
60
+ <Slider.Track />
61
+ </Slider.Rail>
62
+ <Slider.Thumb>
63
+ <Slider.Popup>{size}</Slider.Popup>
64
+ </Slider.Thumb>
65
+ <Slider.MarkerGroup>
66
+ <Slider.Marker />
67
+ </Slider.MarkerGroup>
68
+ </Slider>
69
+ </Box>
70
+ <LineChart
71
+ key={size}
72
+ dataset={FORECAST}
73
+ xAxis={FORECAST_AXIS}
74
+ series={SERIES}
75
+ size={size}
76
+ scrollable={false}
77
+ accessibilityLabel="Actual versus forecast"
78
+ />
79
+ </VStack>
80
+ );
81
+ }
82
+ ```
83
+
84
+ ## Multi-series
85
+
86
+ Each `series` entry is a line. Up to three series use the FI brand family in the order `simple-primary`, `simple-tertiary`, `simple-secondary`, so two lines pair neighboring brand steps. Four or more switch the whole chart to `categorical-1`…`6`; pass `palette="categorical"` to use them at any count. A series `color` wins. `dashed: true` dashes that whole series.
87
+
88
+ ```tsx
89
+ import { LineChart } from '@cdx-ui/components';
90
+ import { FORECAST, FORECAST_AXIS, SERIES } from './_data';
91
+
92
+ export default function LineChartMultiSeriesDemo() {
93
+ return (
94
+ <LineChart
95
+ dataset={FORECAST}
96
+ xAxis={FORECAST_AXIS}
97
+ series={SERIES}
98
+ scrollable={false}
99
+ accessibilityLabel="Actual versus forecast"
100
+ />
101
+ );
102
+ }
103
+ ```
104
+
105
+ ## Colors
106
+
107
+ A series `color` can also be a severity token: `danger`, `warning`, `success`, or `info`. A single line in a severity color reads as a status, here a falling credit score. `warning` is a light yellow that is hard to see as a thin line on a light surface, so prefer it for fills such as bars and slices.
108
+
109
+ ```tsx
110
+ import { useState } from 'react';
111
+ import { Box, LineChart, Tabs, type ChartAxis, type ChartColor } from '@cdx-ui/components';
112
+
113
+ const COLORS: readonly ChartColor[] = [
114
+ 'danger',
115
+ 'warning',
116
+ 'success',
117
+ 'info',
118
+ 'simple-primary',
119
+ 'simple-secondary',
120
+ 'simple-tertiary',
121
+ 'categorical-1',
122
+ 'categorical-2',
123
+ 'categorical-3',
124
+ 'categorical-4',
125
+ 'categorical-5',
126
+ 'categorical-6',
127
+ ];
128
+
129
+ interface ScoreRow {
130
+ date: string;
131
+ score: number;
132
+ }
133
+
134
+ const SCORES: ScoreRow[] = [
135
+ { date: 'Nov 1', score: 575 },
136
+ { date: 'Nov 4', score: 568 },
137
+ { date: 'Nov 8', score: 570 },
138
+ { date: 'Nov 11', score: 563 },
139
+ { date: 'Nov 15', score: 559 },
140
+ { date: 'Nov 18', score: 560 },
141
+ { date: 'Nov 22', score: 557 },
142
+ { date: 'Nov 25', score: 553 },
143
+ { date: 'Nov 29', score: 555 },
144
+ { date: 'Dec 1', score: 558 },
145
+ { date: 'Dec 4', score: 556 },
146
+ { date: 'Dec 8', score: 552 },
147
+ { date: 'Dec 11', score: 554 },
148
+ { date: 'Dec 15', score: 555 },
149
+ { date: 'Dec 18', score: 557 },
150
+ { date: 'Dec 22', score: 556 },
151
+ { date: 'Dec 25', score: 558 },
152
+ { date: 'Dec 29', score: 557 },
153
+ { date: 'Jan 1', score: 554 },
154
+ { date: 'Jan 4', score: 550 },
155
+ { date: 'Jan 8', score: 549 },
156
+ { date: 'Jan 11', score: 547 },
157
+ ];
158
+
159
+ const MONTH_STARTS = new Set([0, 9, 18]);
160
+
161
+ const DATE_AXIS: ChartAxis<ScoreRow>[] = [
162
+ { id: 'date', dataKey: 'date', tickLabelInterval: (_, index) => MONTH_STARTS.has(index) },
163
+ ];
164
+
165
+ const SCORE_AXIS: ChartAxis<ScoreRow>[] = [{ id: 'score', min: 540, max: 580, tickNumber: 3 }];
166
+
167
+ export default function LineChartColorsDemo() {
168
+ const [color, setColor] = useState<string>('danger');
169
+
170
+ return (
171
+ <Tabs value={color} onValueChange={setColor} className="w-full">
172
+ <Box className="w-90 max-w-full self-center">
173
+ <Tabs.List accessibilityLabel="Line color">
174
+ {COLORS.map((item) => (
175
+ <Tabs.Tab key={item} value={item}>
176
+ <Tabs.TabLabel>{item}</Tabs.TabLabel>
177
+ </Tabs.Tab>
178
+ ))}
179
+ </Tabs.List>
180
+ </Box>
181
+ {COLORS.map((item) => (
182
+ <Tabs.Panel key={item} value={item} className="mt-4">
183
+ <LineChart
184
+ dataset={SCORES}
185
+ xAxis={DATE_AXIS}
186
+ yAxis={SCORE_AXIS}
187
+ series={[
188
+ {
189
+ id: 'score',
190
+ dataKey: 'score',
191
+ label: 'Credit score',
192
+ curve: 'linear',
193
+ color: item,
194
+ },
195
+ ]}
196
+ markers={[{ dataIndex: SCORES.length - 1, showValue: true, guide: false }]}
197
+ hideLegend
198
+ size="md"
199
+ scrollable={false}
200
+ accessibilityLabel="Credit score fell from 575 to 547 since Nov 1"
201
+ />
202
+ </Tabs.Panel>
203
+ ))}
204
+ </Tabs>
205
+ );
206
+ }
207
+ ```
208
+
209
+ ## Curves and area
210
+
211
+ `curve`, `area`, `showMark`, `color`, `dashed`, and `dashedFrom` are set per series, so one line can be a filled `monotoneX` curve while the next is a marked `linear` line that dashes from a row. `stepAfter` holds each value until the next point.
212
+
213
+ ```tsx
214
+ import { LineChart, VStack } from '@cdx-ui/components';
215
+ import { FORECAST, FORECAST_AXIS, MONTH_AXIS, REVENUE } from './_data';
216
+
217
+ export default function LineChartCurvesDemo() {
218
+ return (
219
+ <VStack space="2xl">
220
+ <LineChart
221
+ dataset={FORECAST}
222
+ xAxis={FORECAST_AXIS}
223
+ series={[
224
+ {
225
+ id: 'actual',
226
+ dataKey: 'actual',
227
+ label: 'Actual',
228
+ color: 'categorical-3',
229
+ curve: 'monotoneX',
230
+ area: true,
231
+ },
232
+ {
233
+ id: 'forecast',
234
+ dataKey: 'forecast',
235
+ label: 'Forecast',
236
+ color: 'categorical-5',
237
+ curve: 'linear',
238
+ showMark: true,
239
+ dashedFrom: 3,
240
+ },
241
+ ]}
242
+ scrollable={false}
243
+ accessibilityLabel="Actual as a filled curve, forecast as a marked line dashed from April"
244
+ />
245
+ <LineChart
246
+ dataset={REVENUE}
247
+ xAxis={MONTH_AXIS}
248
+ series={[
249
+ {
250
+ id: 'revenue',
251
+ dataKey: 'revenue',
252
+ label: 'Revenue',
253
+ curve: 'stepAfter',
254
+ showMark: true,
255
+ },
256
+ ]}
257
+ hideLegend
258
+ scrollable={false}
259
+ accessibilityLabel="Monthly revenue, step"
260
+ />
261
+ </VStack>
262
+ );
263
+ }
264
+ ```
265
+
266
+ ## Axes and reference lines
267
+
268
+ `yAxis[0]` `min` and `max` pin the domain and `tickNumber` sets roughly how many ticks to draw. `valueFormatter` on the axis formats ticks, and on a series formats that series everywhere. `referenceLines` draws a dashed target across the plot.
269
+
270
+ ```tsx
271
+ import { LineChart } from '@cdx-ui/components';
272
+ import { ATTAINMENT, MONTH_AXIS } from './_data';
273
+
274
+ export default function LineChartReferenceLineDemo() {
275
+ return (
276
+ <LineChart
277
+ dataset={ATTAINMENT}
278
+ xAxis={MONTH_AXIS}
279
+ yAxis={[
280
+ {
281
+ id: 'attainment',
282
+ min: 0,
283
+ max: 200,
284
+ tickNumber: 5,
285
+ valueFormatter: (value) => (value === null ? '' : `${String(value)}%`),
286
+ },
287
+ ]}
288
+ series={[{ id: 'attainment', dataKey: 'revenue', label: 'Attainment' }]}
289
+ referenceLines={[{ value: 100, label: 'Plan' }]}
290
+ hideLegend
291
+ scrollable={false}
292
+ accessibilityLabel="Attainment against plan"
293
+ />
294
+ );
295
+ }
296
+ ```
297
+
298
+ ## Scrollable
299
+
300
+ Long histories scroll while the value axis stays put. `visiblePoints` sets how many points are on screen at once.
301
+
302
+ ```tsx
303
+ import { Box, LineChart } from '@cdx-ui/components';
304
+ import { HISTORY, HISTORY_SERIES, WEEK_AXIS } from './_data';
305
+
306
+ export default function LineChartScrollableDemo() {
307
+ return (
308
+ <Box className="w-64">
309
+ <LineChart
310
+ dataset={HISTORY}
311
+ xAxis={WEEK_AXIS}
312
+ series={HISTORY_SERIES}
313
+ hideLegend
314
+ visiblePoints={8}
315
+ accessibilityLabel="Weekly price"
316
+ />
317
+ </Box>
318
+ );
319
+ }
320
+ ```
321
+
322
+ ## Markers
323
+
324
+ `dashedFrom` takes a `dataset` row, so a balance can stay solid through today and dash after it. `markers` pin callouts by `dataIndex`, and rows that share a label resolve independently. `xAxis[0].tickLabelInterval` labels only the week starts while every day is plotted.
325
+
326
+ ```tsx
327
+ import { LineChart } from '@cdx-ui/components';
328
+ import { CASH, CASH_AXIS, CASH_SERIES, TODAY_INDEX } from './_data';
329
+
330
+ export default function LineChartMarkersDemo() {
331
+ return (
332
+ <LineChart
333
+ dataset={CASH}
334
+ xAxis={CASH_AXIS}
335
+ series={CASH_SERIES}
336
+ hideLegend
337
+ scrollable={false}
338
+ markers={[
339
+ { dataIndex: TODAY_INDEX, label: 'Rent' },
340
+ { dataIndex: 21, color: 'categorical-2', guide: false },
341
+ { dataIndex: 22, label: 'Card bill', dot: false },
342
+ ]}
343
+ accessibilityLabel="Checking balance forecast. Rent on Sep 21. Lowest on Oct 3. Card bill on Oct 4."
344
+ />
345
+ );
346
+ }
347
+ ```
348
+
349
+ ## Selectable
350
+
351
+ Pass `selectedItem` and `onSelectedItemChange` to select a category. The item names the category's `dataIndex` and the first series with a value there; pressing the selected category again reports `null`. Pass `defaultSelectedItem` or only `onSelectedItemChange` to let the chart track selection itself.
352
+
353
+ ```tsx
354
+ import { useState } from 'react';
355
+ import { LineChart, Text, VStack, type ChartSelectedItem } from '@cdx-ui/components';
356
+ import { FORECAST, FORECAST_AXIS, SERIES } from './_data';
357
+
358
+ const MARKED_SERIES = SERIES.map((item) => ({ ...item, showMark: true }));
359
+
360
+ export default function LineChartSelectableDemo() {
361
+ const [selectedItem, setSelectedItem] = useState<ChartSelectedItem>({
362
+ seriesId: 'actual',
363
+ dataIndex: 3,
364
+ });
365
+ const row = selectedItem === null ? undefined : FORECAST[selectedItem.dataIndex];
366
+
367
+ return (
368
+ <VStack space="md" className="w-full">
369
+ <Text size="sm" color="secondary">
370
+ {row === undefined
371
+ ? 'Nothing selected'
372
+ : `${row.month} actual ${String(row.actual)} forecast ${String(row.forecast)}`}
373
+ </Text>
374
+ <LineChart
375
+ dataset={FORECAST}
376
+ xAxis={FORECAST_AXIS}
377
+ series={MARKED_SERIES}
378
+ scrollable={false}
379
+ selectedItem={selectedItem}
380
+ onSelectedItemChange={setSelectedItem}
381
+ />
382
+ </VStack>
383
+ );
384
+ }
385
+ ```
386
+
387
+ ## Data change
388
+
389
+ Lines tween to their new values when `dataset` changes. Pass `animation="disable-all"` to draw the final state; Reduce Motion and `GlobalAnimationSettingsProvider` `disable-all` also turn it off.
390
+
391
+ ```tsx
392
+ import { useState } from 'react';
393
+ import { Button, LineChart, VStack } from '@cdx-ui/components';
394
+ import { FORECAST, FORECAST_AXIS, SERIES } from './_data';
395
+
396
+ export default function LineChartDataChangeDemo() {
397
+ const [step, setStep] = useState(0);
398
+ const dataset = FORECAST.map((row, index) => {
399
+ const shifted = FORECAST[(index + step) % FORECAST.length] ?? row;
400
+ return { ...shifted, month: row.month };
401
+ });
402
+
403
+ return (
404
+ <VStack space="lg" className="w-full items-center">
405
+ <LineChart
406
+ dataset={dataset}
407
+ xAxis={FORECAST_AXIS}
408
+ series={SERIES}
409
+ scrollable={false}
410
+ accessibilityLabel="Actual versus forecast"
411
+ />
412
+ <Button
413
+ variant="outline"
414
+ onPress={() => {
415
+ setStep((prev) => prev + 1);
416
+ }}
417
+ >
418
+ <Button.Label>Shift data</Button.Label>
419
+ </Button>
420
+ </VStack>
421
+ );
422
+ }
423
+ ```
424
+
425
+ ## API
426
+
427
+ ### LineChart
428
+
429
+ Generic over your row type, shown here as `TRow`: `series[].dataKey` and axis `dataKey` must be keys of a `dataset` row.
430
+
431
+ | Prop | Type | Default | Description |
432
+ | --- | --- | --- | --- |
433
+ | `className?` | `string` | — | Additional Uniwind/Tailwind classes, merged after the root's own styles. |
434
+ | `accessibilityLabel?` | `string` | — | Accessible summary. Defaults to `localeText.lineChartSummary` of the last category. |
435
+ | `dataset` | `readonly TRow[]` | — | One object per point, in x order. Columns are read only through `xAxis[0].dataKey` and `series[].dataKey`, so any key (including `label` or `tick`) is plain data. Non-finite values open a gap in that series. |
436
+ | `series` | `readonly LineChartSeries<TRow>[]` | — | One line per entry. |
437
+ | `xAxis?` | `readonly ChartAxis<TRow>[]` | — | Category axis. Only the first entry is read; `dataKey` names the column with the category labels (defaults to the row index). |
438
+ | `yAxis?` | `readonly ChartAxis<TRow>[]` | — | Value axis. Only the first entry is read. `min` / `max` / `tickNumber` set the domain. `position: 'none'` hides the ticks; other sides draw on the left. |
439
+ | `grid?` | `ChartGrid` | `{ horizontal: true }` | Grid lines behind the plot. Only `horizontal` (at each value tick) is drawn; it stays on unless set to `false`. |
440
+ | `palette?` | `'auto' \| 'categorical'` | `'auto'` | Default series colors. `auto` uses the FI brand family (`simple-primary`, `-secondary`, `-tertiary`) for up to three series and switches the whole chart to `categorical-1`…`6` past that. `categorical` always uses the categorical slots. A series `color` wins. |
441
+ | `hideLegend?` | `boolean` | `false` | Hides the series legend under the chart. |
442
+ | `tooltip?` | `ChartTooltipProps` | `{ trigger: 'axis' }` | Shows every series at a category on hover, keyboard focus, or tap. On web, Tab / Shift+Tab and arrow keys move between categories, Tab past the last one leaves the chart, Home / End jump to the ends, and Escape hides the tooltip. `'item'` behaves like `'axis'` in v1. `'none'` hides it. |
443
+ | `selectedItem?` | `ChartSelectedItem` | — | Controlled selection. `dataIndex` is the category; `seriesId` is the first series with a value there. `null` clears it. Omit to let the chart track selection itself. |
444
+ | `defaultSelectedItem?` | `ChartSelectedItem` | — | Initial selection when `selectedItem` is omitted. Also makes the chart selectable. |
445
+ | `onSelectedItemChange?` | `((item: ChartSelectedItem) => void)` | — | Called when a category is pressed, with `null` when the selected category is pressed again. Providing this, `selectedItem`, or `defaultSelectedItem` makes the chart selectable and draws a crosshair. |
446
+ | `scrollable?` | `boolean` | `true` | When points need more room than the visible box, scroll instead of squeezing. The value axis stays pinned. |
447
+ | `visiblePoints?` | `number` | — | How many points fit in the viewport when `scrollable` is on. Omit to use a readable minimum band (~32px). |
448
+ | `referenceLines?` | `readonly ChartReferenceLine[]` | — | Dashed horizontal lines across the plot at a value, with an optional caption. |
449
+ | `markers?` | `readonly LineChartMarker[]` | — | Point callouts (event name, value, extra legend row), pinned by `dataIndex`. |
450
+ | `locale?` | `string` | — | BCP 47 locale for default number formatting. Defaults to the `@cdx-ui/formatters` locale. |
451
+ | `localeText?` | `Partial<ChartLocaleText>` | — | Overrides for generated strings (summary, no-value text, default series name). |
452
+ | `animation?` | `'disable-all'` | — | Lines rise from the baseline on mount and tween to new values when `dataset` changes. Pass `'disable-all'` to draw the final state. Reduce Motion and `GlobalAnimationSettingsProvider` `disable-all` also turn it off. |
453
+ | `size?` | `'sm' \| 'md' \| 'lg' \| 'xl'` | `'lg'` | Plot box. Named sizes set both width and height; `width` / `height` override one side. |
454
+ | `width?` | `number` | — | Pixel width. Overrides the `size` width. |
455
+ | `height?` | `number` | — | Pixel height. Overrides the `size` height. |
456
+
457
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
458
+
459
+ | Attribute | Values | Description |
460
+ | --------------- | ----------------- | ------------------------------------------------------------- |
461
+ | `data-selected` | `true` \| `false` | On each `line-chart-point`, whether that category is selected |
462
+
463
+ ### LineChartSeries
464
+
465
+ One entry in `series`: a line that reads one `dataset` column.
466
+
467
+ | Prop | Type | Default | Description |
468
+ | --- | --- | --- | --- |
469
+ | `type?` | `'line'` | — | Series type. Optional on `LineChart`; reserved for charts that mix bars and lines. |
470
+ | `curve?` | `'linear' \| 'monotoneX' \| 'stepAfter'` | `'monotoneX'` | How points connect. `stepAfter` holds each value until the next point. |
471
+ | `area?` | `boolean` | `false` | Fills under the line toward zero (or the domain edge nearest it) with a fade of the series color. |
472
+ | `showMark?` | `boolean \| ((params: { index: number; }) => boolean)` | `false` | Draws a mark on each defined point. A function picks points by `index` (the `dataset` row). |
473
+ | `dashed?` | `boolean` | `false` | Dashes the whole line. |
474
+ | `dashedFrom?` | `number` | — | `dataset` row where the line switches from solid to dashed (e.g. actual → forecast). The curve still uses every point, so the join stays smooth. |
475
+ | `dataKey` | `string` | — | Numeric column in `dataset`. A key that is not on the row type is a compile error. |
476
+ | `id` | `string` | — | Stable id. `selectedItem.seriesId` and tooltip items refer to it. |
477
+ | `label?` | `string` | — | Series name. Bar and line charts show it in the legend, tooltip, and screen reader text. A pie chart only prefixes tooltip values with it; slice labels name the legend and slices. |
478
+ | `color?` | `'danger' \| 'warning' \| 'success' \| 'info' \| 'simple-primary' \| 'simple-secondary' \| 'simple-tertiary' \| 'categorical-1' \| 'categorical-2' \| 'categorical-3' \| 'categorical-4' \| 'categorical-5' \| 'categorical-6'` | — | Chart token name, not a CSS color. Omit to take the next color from the chart's `palette`. |
479
+ | `valueFormatter?` | `ChartValueFormatter` | — | Formats this series' values for tooltips and screen reader text, plus bar value labels, line marker values, and a pie's legend value column. `context.location` says where. On charts with axes it wins over the value axis `valueFormatter`. |
480
+
481
+ ### ChartAxis
482
+
483
+ `xAxis` and `yAxis` take the shared `ChartAxis`. `xAxis` reads `dataKey`, `tickLabelInterval`, `position`, and `valueFormatter` (for numeric categories); `yAxis` reads `min`, `max`, `tickNumber`, `position`, and `valueFormatter`. The x-axis draws at the bottom and the y-axis on the left; any `position` other than `'none'` falls back to that side. Categories are spaced edge to edge, like a MUI `point` scale.
484
+
485
+ | Prop | Type | Default | Description |
486
+ | --- | --- | --- | --- |
487
+ | `id` | `string` | — | Axis id, as in MUI X. |
488
+ | `dataKey?` | `string` | — | Column in `dataset` that holds this axis's values (category names on a band axis). |
489
+ | `scaleType?` | `'band' \| 'linear'` | — | Scale kind, as in MUI X. Accepted for parity; charts do not read it yet. |
490
+ | `min?` | `number` | — | Lowest value on a value axis. Omit to fit the data. |
491
+ | `max?` | `number` | — | Highest value on a value axis. Omit to fit the data. |
492
+ | `tickNumber?` | `number` | — | Approximate tick count. The chart rounds to readable steps. |
493
+ | `label?` | `string` | — | Axis title, as in MUI X. Accepted for parity; not drawn yet. |
494
+ | `valueFormatter?` | `ChartValueFormatter` | — | Formats tick text on this axis (`location: 'tick'`). On a value axis it also formats series values when the series has no `valueFormatter`. On a line chart's x-axis it formats numeric categories, both the tick (`location: 'tick'`) and the tooltip title (`location: 'tooltip'`). |
495
+ | `position?` | `'top' \| 'bottom' \| 'left' \| 'right' \| 'none'` | — | Side the axis labels draw on. `'none'` hides them. Each chart accepts the sides it can draw and falls back to its default side for the others. |
496
+ | `tickLabelInterval?` | `"auto" \| ((value: unknown, index: number) => boolean)` | `'auto'` | Which category labels to draw. A function keeps the label at `index` when it returns `true`. `'auto'` currently draws every label; it does not thin them yet. |
497
+
498
+ ### LineChartMarker
499
+
500
+ One entry in `markers`: a callout pinned to a `dataset` row.
501
+
502
+ | Prop | Type | Default | Description |
503
+ | --- | --- | --- | --- |
504
+ | `dataIndex` | `number` | — | `dataset` row to pin to. Rows with the same category label resolve independently. |
505
+ | `seriesId?` | `string` | — | Series to pin to. Defaults to the first series with a value at `dataIndex`. |
506
+ | `label?` | `string` | — | Caption above the point, e.g. "Rent". |
507
+ | `showValue?` | `boolean` | `false` | Draw the formatted value beside the point. |
508
+ | `color?` | `'danger' \| 'warning' \| 'success' \| 'info' \| 'simple-primary' \| 'simple-secondary' \| 'simple-tertiary' \| 'categorical-1' \| 'categorical-2' \| 'categorical-3' \| 'categorical-4' \| 'categorical-5' \| 'categorical-6'` | — | Chart token for the dot. Defaults to that series' color. |
509
+ | `legend?` | `string` | — | Extra legend row, e.g. "Today". |
510
+ | `guide?` | `boolean` | `true` | Vertical dashed guide through the point. |
511
+ | `dot?` | `boolean` | `true` | Filled dot on the line. |
512
+
513
+ ### Value formatting
514
+
515
+ `valueFormatter(value, { location, seriesId, dataIndex })` is picked from the series, then the axis, then a number format for `locale`. `location` is `'tick'` for value-axis ticks, `'tooltip'` for tooltip rows, `'label'` for a marker's `showValue`, and `'a11y'` for screen reader text and the generated summary.
516
+
517
+ ### Coming from MUI X
518
+
519
+ Names follow [MUI X Line Charts](https://mui.com/x/react-charts/lines/). MUI X is not a dependency and none of its types appear in the API.
520
+
521
+ | MUI X | Forge UI | Notes |
522
+ | -------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
523
+ | `dataset` | `dataset` | Rows are your own type; no reserved keys. |
524
+ | `series[].dataKey`, `id`, `label`, `valueFormatter` | same | `valueFormatter` also gets `location: 'a11y'` for screen reader text. |
525
+ | `series[].color` | `series[].color` | A chart token name, not a CSS color, so it follows the theme. |
526
+ | `colors` | `palette` + `series[].color` | MUI takes a list of CSS colors. Forge picks from theme tokens instead, so FI brands re-skin every chart: `palette` chooses the brand (`auto`) or categorical ramp, and a series `color` names a token. |
527
+ | `series[].curve` | `series[].curve` | `'linear'`, `'monotoneX'` (default), and `'stepAfter'`. Other MUI curves are not supported. |
528
+ | `series[].area` | `series[].area` | Default `false`, as in MUI. `baseline` is not supported; the fill closes at zero or the domain edge nearest it. |
529
+ | `series[].showMark` | `series[].showMark` | Boolean or `({ index }) => boolean`. Defaults to `false` (MUI shows marks by default). `shape` is not supported. |
530
+ | `sx` with `strokeDasharray` | `series[].dashed`, `series[].dashedFrom` | Kept as props because MUI dashes lines through CSS selectors, which React Native does not have. `dashedFrom` is a `dataIndex` and has no MUI equivalent. |
531
+ | `series[].connectNulls`, `stack` | — | Not supported. A missing value opens a gap. |
532
+ | `xAxis[0].dataKey`, `scaleType` | same | Only the first axis is read. Categories render as a point scale whatever `scaleType` says. |
533
+ | `xAxis[0].tickLabelInterval` | same | Function form `(value, index) => boolean`. |
534
+ | `xAxis[0].position: 'none'`, `yAxis[0].position: 'none'` | same | Hides that axis's labels and reclaims the gutter. |
535
+ | `yAxis[0].min`, `max`, `tickNumber`, `valueFormatter` | same | `min` / `max` pin the domain exactly; open ends round to a readable tick. |
536
+ | `grid={{ horizontal }}` | `grid={{ horizontal }}` | Horizontal lines are on by default (MUI draws no grid by default); pass `horizontal: false` to remove them. `vertical` is not drawn. |
537
+ | `hideLegend` | `hideLegend` | Same default: the legend shows unless hidden. |
538
+ | `slotProps.tooltip.trigger` | `tooltip.trigger` | `'axis'` (default) or `'none'`. `'item'` behaves like `'axis'` for now. Custom tooltip content is not supported yet. |
539
+ | `highlightedItem`, `onAxisClick`, `onMarkClick` | `selectedItem`, `defaultSelectedItem`, `onSelectedItemChange` | Selection is a category that stays selected until pressed again, and works by keyboard and screen reader. |
540
+ | `<ChartsReferenceLine y label />` | `referenceLines` | Kept as a prop because Forge charts have no composition API. |
541
+ | — | `markers` | Point callouts (caption, value, legend row) with no MUI equivalent. |
542
+ | Pro `zoom` | `scrollable`, `visiblePoints` | Long series scroll instead of zooming. |
543
+ | `skipAnimation` | `animation="disable-all"` | Matches the Forge animation convention. Reduce Motion also turns it off. |
544
+ | `width`, `height` | `size`, `width`, `height` | Named sizes, with `width` / `height` overriding one side. |
545
+ | `localeText` | `localeText` | Same name; the keys are Forge's (`lineChartSummary`, `noValue`, `defaultSeriesLabel`). |
546
+ | — | `locale` | Kept because default number formatting needs a locale and Forge has no localization provider for charts. |
547
+
548
+ ## Anatomy
549
+
550
+ | `data-slot` | Element |
551
+ | ------------------------ | -------------------------------------------------------- |
552
+ | `line-chart` | Root |
553
+ | `line-chart-plot` | Value axis and scrollable plot |
554
+ | `line-chart-inspector` | Interactive overlay, present with a tooltip or selection |
555
+ | `line-chart-point` | Category hit target |
556
+ | `line-chart-focus` | Keyboard focus ring |
557
+ | `line-chart-tooltip` | Tooltip |
558
+ | `line-chart-legend` | Legend |
559
+ | `line-chart-legend-item` | Legend row |
560
+
561
+ ## Accessibility
562
+
563
+ With a tooltip or selection, the plot is covered by a group named by the summary: `accessibilityLabel`, or `localeText.lineChartSummary` of the last category. Each category in it is one button, announced as its label, every series value formatted with `location: 'a11y'`, and any marker legend or caption; a category with no values reads `localeText.noValue`. With no tooltip, no selection, and `hideLegend`, the whole chart is instead a single image named by the summary. With a legend but no tooltip or selection, only the legend text is read. The drawn plot, axis labels, and tooltip are always hidden from assistive technology.
564
+
565
+ On web, the chart is one tab stop. Tab / Shift+Tab and the arrow keys move between categories, Home / End jump to the ends, and Tab past the last category or Shift+Tab before the first leaves the chart. Escape hides the tooltip. On a selectable chart, Enter or Space selects the focused category and each category reports `aria-pressed`.
566
+
567
+ On native, a selectable category reports `accessibilityState.selected`, and the VoiceOver escape gesture hides the tooltip. Dragging a finger scrubs the tooltip across categories; when the plot scrolls, scrubbing starts after a short hold so a flick still scrolls.