@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,1106 @@
1
+ /* SVG `x`/`y` are paint coordinates. RN View `x`/`y` layout props are deprecated and share the name. */
2
+ /* eslint-disable @typescript-eslint/no-deprecated */
3
+ import { forwardRef, useMemo, useRef, useState, type ForwardedRef, type ReactElement } from 'react';
4
+ import { ScrollView, Text, View, type ViewProps } from 'react-native';
5
+ import Animated, { useAnimatedProps } from 'react-native-reanimated';
6
+ import {
7
+ Circle,
8
+ ClipPath,
9
+ Defs,
10
+ G,
11
+ Line,
12
+ LinearGradient,
13
+ Path,
14
+ Rect,
15
+ Stop,
16
+ Svg,
17
+ Text as SvgText,
18
+ } from 'react-native-svg';
19
+ import { dataAttributes, mergeDataAttributes } from '@cdx-ui/primitives';
20
+ import { cn, useControllableState } from '@cdx-ui/utils';
21
+ import type { AnimationRootDisableAll } from '../../animation';
22
+ import {
23
+ ChartInspector,
24
+ ChartTooltipLayer,
25
+ chartValueText,
26
+ type ChartInspectorTarget,
27
+ } from '../chart/ChartInspector';
28
+ import { resolveChartLocaleText, resolveValueFormatter } from '../chart/format';
29
+ import { HIDDEN_SVG_PROPS } from '../chart/hiddenSvgProps';
30
+ import { resolveChartBox } from '../chart/size';
31
+ import type {
32
+ ChartAxis,
33
+ ChartGrid,
34
+ ChartLocaleText,
35
+ ChartReferenceLine,
36
+ ChartSelectedItem,
37
+ ChartSizeProps,
38
+ ChartSummaryCategory,
39
+ ChartTooltipItem,
40
+ ChartTooltipProps,
41
+ ChartValueFormatter,
42
+ } from '../chart/types';
43
+ import { useChartHostWidth } from '../chart/useChartHostWidth';
44
+ import {
45
+ ChartLinearFills,
46
+ chartFillUrl,
47
+ chartSeriesColor,
48
+ resolveChartColor,
49
+ useChartChrome,
50
+ useChartColorPaints,
51
+ useChartGradientId,
52
+ type ChartChrome,
53
+ type ChartColorPaints,
54
+ type ChartPalette,
55
+ } from '../chart/palette';
56
+ import { lerpVector, useChartMorph, useChartMotionEnabled, type ChartMorph } from '../chart/motion';
57
+ import {
58
+ layoutLineChart,
59
+ layoutLineChartMarkers,
60
+ lineChartGutters,
61
+ lineChartMarkerGutters,
62
+ nearestCategoryInPlot,
63
+ lineSeriesPaths,
64
+ resolveLineChartContentSize,
65
+ resolveLineChartData,
66
+ type LineChartCurve,
67
+ type LineChartLayout,
68
+ type LineChartMarker,
69
+ type LineChartMarkerLayout,
70
+ type LineChartSeries,
71
+ type LineSeriesLayout,
72
+ } from './geometry';
73
+ import {
74
+ LINE_ACTIVE_DOT_RADIUS,
75
+ LINE_DOT_RADIUS,
76
+ LINE_STROKE_WIDTH,
77
+ lineChartLegendItemVariants,
78
+ lineChartLegendLabelVariants,
79
+ lineChartLegendVariants,
80
+ lineChartRootVariants,
81
+ } from './styles';
82
+
83
+ const INACTIVE_OPACITY = 0.4;
84
+ const DASH = '6 4';
85
+ /** Within this many px of a plot edge, callouts anchor inward so they are not clipped. */
86
+ const EDGE_LABEL_ROOM = 32;
87
+ /** Paint slack around the plot so dots and strokes on its edges are not cut in half. */
88
+ const CLIP_BLEED = LINE_ACTIVE_DOT_RADIUS + LINE_STROKE_WIDTH;
89
+
90
+ const AnimatedPath = Animated.createAnimatedComponent(Path);
91
+ const AnimatedCircle = Animated.createAnimatedComponent(Circle);
92
+
93
+ export type * from '../chart';
94
+ export type { LineChartCurve, LineChartMarker, LineChartSeries };
95
+
96
+ export interface LineChartProps<TRow extends object = object> extends ViewProps, ChartSizeProps {
97
+ /**
98
+ * One object per point, in x order. Columns are read only through `xAxis[0].dataKey` and
99
+ * `series[].dataKey`, so any key (including `label` or `tick`) is plain data. Non-finite
100
+ * values open a gap in that series.
101
+ */
102
+ dataset: readonly TRow[];
103
+ /** One line per entry. */
104
+ series: readonly LineChartSeries<TRow>[];
105
+ /**
106
+ * Category axis. Only the first entry is read; `dataKey` names the column with the category
107
+ * labels (defaults to the row index).
108
+ */
109
+ xAxis?: readonly ChartAxis<TRow>[];
110
+ /**
111
+ * Value axis. Only the first entry is read. `min` / `max` / `tickNumber` set the domain.
112
+ * `position: 'none'` hides the ticks; other sides draw on the left.
113
+ */
114
+ yAxis?: readonly ChartAxis<TRow>[];
115
+ /**
116
+ * Grid lines behind the plot. Only `horizontal` (at each value tick) is drawn; it stays on
117
+ * unless set to `false`.
118
+ * @default { horizontal: true }
119
+ */
120
+ grid?: ChartGrid;
121
+ /**
122
+ * Default series colors. `auto` uses the FI brand family (`simple-primary`, `-secondary`,
123
+ * `-tertiary`) for up to three series and switches the whole chart to `categorical-1`…`6`
124
+ * past that. `categorical` always uses the categorical slots. A series `color` wins.
125
+ * @default 'auto'
126
+ */
127
+ palette?: ChartPalette;
128
+ /**
129
+ * Hides the series legend under the chart.
130
+ * @default false
131
+ */
132
+ hideLegend?: boolean;
133
+ /**
134
+ * Shows every series at a category on hover, keyboard focus, or tap. On web, Tab / Shift+Tab
135
+ * and arrow keys move between categories, Tab past the last one leaves the chart, Home / End
136
+ * jump to the ends, and Escape hides the tooltip. `'item'` behaves like `'axis'` in v1.
137
+ * `'none'` hides it.
138
+ * @default { trigger: 'axis' }
139
+ */
140
+ tooltip?: ChartTooltipProps;
141
+ /**
142
+ * Controlled selection. `dataIndex` is the category; `seriesId` is the first series with a
143
+ * value there. `null` clears it. Omit to let the chart track selection itself.
144
+ */
145
+ selectedItem?: ChartSelectedItem;
146
+ /**
147
+ * Initial selection when `selectedItem` is omitted. Also makes the chart selectable.
148
+ */
149
+ defaultSelectedItem?: ChartSelectedItem;
150
+ /**
151
+ * Called when a category is pressed, with `null` when the selected category is pressed again.
152
+ * Providing this, `selectedItem`, or `defaultSelectedItem` makes the chart selectable and draws a crosshair.
153
+ */
154
+ onSelectedItemChange?: (item: ChartSelectedItem) => void;
155
+ /**
156
+ * When points need more room than the visible box, scroll instead of squeezing.
157
+ * The value axis stays pinned.
158
+ * @default true
159
+ */
160
+ scrollable?: boolean;
161
+ /**
162
+ * How many points fit in the viewport when `scrollable` is on. Omit to use a
163
+ * readable minimum band (~32px).
164
+ */
165
+ visiblePoints?: number;
166
+ /** Dashed horizontal lines across the plot at a value, with an optional caption. */
167
+ referenceLines?: readonly ChartReferenceLine[];
168
+ /** Point callouts (event name, value, extra legend row), pinned by `dataIndex`. */
169
+ markers?: readonly LineChartMarker[];
170
+ /**
171
+ * BCP 47 locale for default number formatting. Defaults to the `@cdx-ui/formatters` locale.
172
+ */
173
+ locale?: string;
174
+ /** Overrides for generated strings (summary, no-value text, default series name). */
175
+ localeText?: Partial<ChartLocaleText>;
176
+ /**
177
+ * Lines rise from the baseline on mount and tween to new values when `dataset` changes. Pass
178
+ * `'disable-all'` to draw the final state. Reduce Motion and `GlobalAnimationSettingsProvider`
179
+ * `disable-all` also turn it off.
180
+ */
181
+ animation?: AnimationRootDisableAll;
182
+ /** Accessible summary. Defaults to `localeText.lineChartSummary` of the last category. */
183
+ accessibilityLabel?: string;
184
+ /** Additional Uniwind/Tailwind classes, merged after the root's own styles. */
185
+ className?: string;
186
+ }
187
+
188
+ function LineChartInner<TRow extends object>(
189
+ {
190
+ dataset,
191
+ series: seriesProp,
192
+ xAxis: xAxisProp,
193
+ yAxis: yAxisProp,
194
+ size = 'lg',
195
+ width: widthProp,
196
+ height: heightProp,
197
+ grid,
198
+ palette = 'auto',
199
+ hideLegend = false,
200
+ tooltip: tooltipProp,
201
+ scrollable = true,
202
+ visiblePoints,
203
+ selectedItem: selectedItemProp,
204
+ defaultSelectedItem,
205
+ onSelectedItemChange,
206
+ referenceLines,
207
+ markers,
208
+ locale,
209
+ localeText: localeTextProp,
210
+ animation,
211
+ accessibilityLabel,
212
+ className,
213
+ style,
214
+ onLayout,
215
+ ...props
216
+ }: LineChartProps<TRow>,
217
+ ref: ForwardedRef<View>,
218
+ ) {
219
+ const animated = useChartMotionEnabled(animation);
220
+ const gradientId = useChartGradientId('line-fill');
221
+ const chrome = useChartChrome();
222
+ const paints = useChartColorPaints();
223
+ const localeText = useMemo(() => resolveChartLocaleText(localeTextProp), [localeTextProp]);
224
+ const xAxis = xAxisProp?.[0];
225
+ const yAxis = yAxisProp?.[0];
226
+ const showValueTicks = yAxis?.position !== 'none';
227
+ const showCategoryLabels = xAxis?.position !== 'none';
228
+ const resolved = useMemo(
229
+ () => resolveLineChartData({ dataset, series: seriesProp, xAxis }),
230
+ [dataset, seriesProp, xAxis],
231
+ );
232
+ const formatters = useMemo(
233
+ () => seriesProp.map((item) => resolveValueFormatter(item, yAxis, locale)),
234
+ [seriesProp, yAxis, locale],
235
+ );
236
+ const formatTick = useMemo(() => {
237
+ const format = resolveValueFormatter(null, yAxis, locale);
238
+ return (value: number) => format(value, { location: 'tick' });
239
+ }, [yAxis, locale]);
240
+ const box = resolveChartBox(size, widthProp, heightProp);
241
+ const [hostWidth, handleHostLayout] = useChartHostWidth(onLayout);
242
+ const viewportWidth = hostWidth > 0 ? Math.min(hostWidth, box.width) : box.width;
243
+ const viewportHeight = box.height;
244
+ const gutters = useMemo(
245
+ () =>
246
+ lineChartMarkerGutters(
247
+ dataset.length,
248
+ markers,
249
+ lineChartGutters({ showValueTicks, showCategoryLabels }),
250
+ ),
251
+ [dataset.length, markers, showValueTicks, showCategoryLabels],
252
+ );
253
+ const content = useMemo(
254
+ () =>
255
+ resolveLineChartContentSize({
256
+ viewportWidth,
257
+ viewportHeight,
258
+ categoryCount: dataset.length,
259
+ gutters,
260
+ scrollable,
261
+ visiblePoints,
262
+ }),
263
+ [viewportWidth, viewportHeight, dataset.length, gutters, scrollable, visiblePoints],
264
+ );
265
+ const layout = useMemo(
266
+ () =>
267
+ layoutLineChart({
268
+ categories: resolved.categories,
269
+ series: resolved.series,
270
+ width: content.width,
271
+ height: content.height,
272
+ referenceLines,
273
+ yAxis,
274
+ formatTick,
275
+ gutters,
276
+ }),
277
+ [resolved, content.width, content.height, referenceLines, yAxis, formatTick, gutters],
278
+ );
279
+ const markerLayout = useMemo(
280
+ () => layoutLineChartMarkers(markers ?? [], layout.series),
281
+ [markers, layout.series],
282
+ );
283
+ const overflowsX = content.width > viewportWidth + 0.5;
284
+ const morph = useChartMorph(
285
+ layout.series.flatMap((item) => item.points.map((point) => point.y ?? Number.NaN)),
286
+ layout.series.flatMap((item) =>
287
+ item.points.map((point) => (point.y === null ? Number.NaN : layout.baselineY)),
288
+ ),
289
+ animated,
290
+ );
291
+ const fills = seriesProp.map(
292
+ (item, seriesIndex) =>
293
+ resolveChartColor(item.color, paints) ??
294
+ paints[chartSeriesColor(seriesIndex, seriesProp.length, palette, 'line')],
295
+ );
296
+ const marks = seriesProp.map((item) => item.showMark ?? false);
297
+ const summary = accessibilityLabel ?? lineSummary(layout, formatters, localeText);
298
+ const interactive =
299
+ onSelectedItemChange !== undefined ||
300
+ selectedItemProp !== undefined ||
301
+ defaultSelectedItem !== undefined;
302
+ const [selectedItemState, setSelectedItem] = useControllableState<ChartSelectedItem>({
303
+ prop: selectedItemProp,
304
+ defaultProp: defaultSelectedItem ?? null,
305
+ onChange: (next) => {
306
+ onSelectedItemChange?.(next ?? null);
307
+ },
308
+ });
309
+ const selectedIndex = selectedItemState?.dataIndex ?? null;
310
+ const showTooltip = (tooltipProp?.trigger ?? 'axis') !== 'none';
311
+ const inspectable = (interactive || showTooltip) && dataset.length > 0;
312
+ const [activeIndex, setActiveIndex] = useState<number | null>(null);
313
+ const [dismissed, setDismissed] = useState(false);
314
+ const [scrubbing, setScrubbing] = useState(false);
315
+ const scrollX = useRef(0);
316
+ const highlightIndex = activeIndex ?? selectedIndex;
317
+ const tooltipIndex = showTooltip && !dismissed && activeIndex !== null ? activeIndex : null;
318
+
319
+ const activate = (index: number) => {
320
+ setDismissed(false);
321
+ setActiveIndex((prev) => (prev === index ? prev : index));
322
+ };
323
+ const deactivate = (index: number) => {
324
+ setActiveIndex((prev) => (prev === index ? null : prev));
325
+ };
326
+ const selectIndex = (index: number) => {
327
+ if (selectedIndex === index) {
328
+ setSelectedItem(null);
329
+ return;
330
+ }
331
+ const owner =
332
+ layout.series.find((item) => item.points[index]?.value != null) ?? layout.series[0];
333
+ setSelectedItem(owner === undefined ? null : { seriesId: owner.key, dataIndex: index });
334
+ };
335
+
336
+ const markerLegend = markerLayout.filter(
337
+ (item) => item.legend !== undefined && item.legend.length > 0,
338
+ );
339
+ const showLegend = !hideLegend && (seriesProp.length > 0 || markerLegend.length > 0);
340
+
341
+ const plot = (
342
+ <LinePlot
343
+ layout={layout}
344
+ morph={morph}
345
+ fills={fills}
346
+ gradientId={gradientId}
347
+ chrome={chrome}
348
+ marks={marks}
349
+ showGrid={grid?.horizontal !== false}
350
+ highlightIndex={highlightIndex}
351
+ formatters={formatters}
352
+ markers={markerLayout}
353
+ paints={paints}
354
+ />
355
+ );
356
+ const plotWidth = content.width - layout.plot.x;
357
+ const bleed = Math.min(CLIP_BLEED, layout.plot.x);
358
+ const axisWidth = layout.plot.x - bleed;
359
+ const targets = inspectable
360
+ ? lineInspectorTargets({
361
+ layout,
362
+ width: plotWidth,
363
+ height: viewportHeight,
364
+ fills,
365
+ formatters,
366
+ localeText,
367
+ selectedIndex,
368
+ markers: markerLayout,
369
+ })
370
+ : [];
371
+ const tip = tooltipIndex === null ? undefined : targets.at(tooltipIndex);
372
+
373
+ const ticks = showValueTicks ? (
374
+ <>
375
+ {layout.valueTicks.map((tick) => (
376
+ <SvgText
377
+ key={`tick-${String(tick.value)}`}
378
+ x={tick.x}
379
+ y={tick.y}
380
+ fill={chrome.label}
381
+ fontFamily={chrome.fontFamily}
382
+ fontSize={chrome.labelSize}
383
+ textAnchor="end"
384
+ alignmentBaseline="middle"
385
+ >
386
+ {tick.text}
387
+ </SvgText>
388
+ ))}
389
+ </>
390
+ ) : null;
391
+
392
+ const chart = (
393
+ <View
394
+ className="flex-row"
395
+ style={{ width: viewportWidth, height: viewportHeight }}
396
+ {...dataAttributes({ slot: 'line-chart-plot' })}
397
+ >
398
+ <Svg
399
+ width={axisWidth}
400
+ height={viewportHeight}
401
+ viewBox={`0 0 ${String(axisWidth)} ${String(content.height)}`}
402
+ {...HIDDEN_SVG_PROPS}
403
+ >
404
+ {ticks}
405
+ </Svg>
406
+ <ScrollView
407
+ horizontal
408
+ nestedScrollEnabled
409
+ scrollEnabled={overflowsX && !scrubbing}
410
+ showsHorizontalScrollIndicator={overflowsX}
411
+ scrollEventThrottle={16}
412
+ onScroll={(event) => {
413
+ scrollX.current = event.nativeEvent.contentOffset.x;
414
+ if (tooltipIndex !== null) {
415
+ setDismissed(true);
416
+ }
417
+ }}
418
+ className="flex-1"
419
+ style={{ height: viewportHeight }}
420
+ >
421
+ <View style={{ width: plotWidth + bleed, height: viewportHeight }}>
422
+ <Svg
423
+ width={plotWidth + bleed}
424
+ height={viewportHeight}
425
+ viewBox={`0 0 ${String(plotWidth + bleed)} ${String(content.height)}`}
426
+ pointerEvents="none"
427
+ {...HIDDEN_SVG_PROPS}
428
+ >
429
+ <G transform={`translate(${String(-axisWidth)}, 0)`}>{plot}</G>
430
+ </Svg>
431
+ {inspectable ? (
432
+ <View
433
+ className="absolute top-0 bottom-0"
434
+ style={{ left: bleed, width: plotWidth }}
435
+ pointerEvents="box-none"
436
+ >
437
+ <LineInspector
438
+ layout={layout}
439
+ targets={targets}
440
+ summary={summary}
441
+ selectable={interactive}
442
+ selectedIndex={selectedIndex}
443
+ activeIndex={activeIndex}
444
+ holdToScrub={overflowsX}
445
+ onScrubLockChange={setScrubbing}
446
+ onActivate={activate}
447
+ onDeactivate={deactivate}
448
+ onDismiss={() => {
449
+ setDismissed(true);
450
+ }}
451
+ onSelectIndex={selectIndex}
452
+ />
453
+ </View>
454
+ ) : null}
455
+ </View>
456
+ </ScrollView>
457
+ {tip !== undefined ? (
458
+ <ChartTooltipLayer
459
+ content={tip.tooltip}
460
+ noValueText={localeText.noValue}
461
+ slot="line-chart"
462
+ anchorX={layout.plot.x + tip.anchorX - scrollX.current}
463
+ anchorY={tip.anchorY}
464
+ anchorRadius={tip.anchorRadius}
465
+ width={viewportWidth}
466
+ height={viewportHeight}
467
+ />
468
+ ) : null}
469
+ </View>
470
+ );
471
+
472
+ return (
473
+ <View
474
+ ref={ref}
475
+ className={cn(lineChartRootVariants(), className)}
476
+ style={style}
477
+ accessible={!inspectable && !showLegend}
478
+ accessibilityRole={!inspectable && !showLegend ? 'image' : undefined}
479
+ accessibilityLabel={!inspectable && !showLegend ? summary : undefined}
480
+ {...props}
481
+ onLayout={handleHostLayout}
482
+ {...mergeDataAttributes(props, dataAttributes({ slot: 'line-chart' }))}
483
+ >
484
+ {chart}
485
+ {showLegend ? (
486
+ <View
487
+ className={lineChartLegendVariants()}
488
+ {...dataAttributes({ slot: 'line-chart-legend' })}
489
+ >
490
+ {seriesProp.map((item, seriesIndex) => {
491
+ const selectedPoint =
492
+ highlightIndex === null
493
+ ? undefined
494
+ : layout.series[seriesIndex]?.points.at(highlightIndex);
495
+ const isSelected = selectedPoint !== undefined && selectedPoint.value !== null;
496
+ return (
497
+ <View
498
+ key={item.id}
499
+ className={lineChartLegendItemVariants()}
500
+ {...dataAttributes({ slot: 'line-chart-legend-item' })}
501
+ >
502
+ <View
503
+ className="h-0.5 w-3 rounded-full"
504
+ style={{ backgroundColor: fills[seriesIndex] }}
505
+ />
506
+ <Text className={lineChartLegendLabelVariants({ selected: isSelected })}>
507
+ {seriesLegendLabel(item, seriesProp.length, localeText)}
508
+ </Text>
509
+ </View>
510
+ );
511
+ })}
512
+ {markerLegend.map((item) => (
513
+ <View
514
+ key={`legend-${item.key}`}
515
+ className={lineChartLegendItemVariants()}
516
+ {...dataAttributes({ slot: 'line-chart-legend-item' })}
517
+ >
518
+ <View
519
+ className="size-2.5 rounded-full"
520
+ style={{
521
+ backgroundColor:
522
+ resolveChartColor(item.color, paints) ?? fills[item.seriesIndex] ?? fills[0],
523
+ }}
524
+ />
525
+ <Text className={lineChartLegendLabelVariants()}>{item.legend}</Text>
526
+ </View>
527
+ ))}
528
+ </View>
529
+ ) : null}
530
+ </View>
531
+ );
532
+ }
533
+
534
+ export const LineChart = forwardRef(LineChartInner) as (<TRow extends object>(
535
+ props: LineChartProps<TRow> & { ref?: ForwardedRef<View> },
536
+ ) => ReactElement | null) & { displayName?: string };
537
+
538
+ LineChart.displayName = 'LineChart';
539
+
540
+ function lineSummary(
541
+ layout: LineChartLayout,
542
+ formatters: readonly ChartValueFormatter[],
543
+ localeText: ChartLocaleText,
544
+ ): string {
545
+ const lastIndex = layout.categoryLabels.length - 1;
546
+ const last = layout.categoryLabels[lastIndex];
547
+ if (last === undefined) {
548
+ return localeText.lineChartSummary(null);
549
+ }
550
+ const latest: ChartSummaryCategory = {
551
+ label: last.title,
552
+ values: layout.series.flatMap((item, seriesIndex) => {
553
+ const value = item.points[lastIndex]?.value;
554
+ if (value == null) {
555
+ return [];
556
+ }
557
+ const format = formatters[seriesIndex];
558
+ return [
559
+ {
560
+ label: item.label,
561
+ formattedValue:
562
+ format?.(value, { location: 'a11y', seriesId: item.key, dataIndex: lastIndex }) ?? '',
563
+ },
564
+ ];
565
+ }),
566
+ };
567
+ return localeText.lineChartSummary(latest);
568
+ }
569
+
570
+ function showsMark(mark: LineChartSeries<object>['showMark'], index: number): boolean {
571
+ return typeof mark === 'function' ? mark({ index }) : mark === true;
572
+ }
573
+
574
+ function LinePlot({
575
+ layout,
576
+ morph,
577
+ fills,
578
+ gradientId,
579
+ chrome,
580
+ marks,
581
+ showGrid,
582
+ highlightIndex,
583
+ formatters,
584
+ markers,
585
+ paints,
586
+ }: {
587
+ layout: LineChartLayout;
588
+ morph: ChartMorph;
589
+ fills: readonly string[];
590
+ gradientId: string;
591
+ chrome: ChartChrome;
592
+ marks: readonly LineChartSeries<object>['showMark'][];
593
+ showGrid: boolean;
594
+ highlightIndex: number | null;
595
+ formatters: readonly ChartValueFormatter[];
596
+ markers: readonly LineChartMarkerLayout[];
597
+ paints: ChartColorPaints;
598
+ }) {
599
+ const xs = layout.categoryLabels.map((item) => item.x);
600
+ const clipId = `${gradientId}-clip`;
601
+
602
+ return (
603
+ <>
604
+ <ChartLinearFills idPrefix={gradientId} colors={fills} x2="100%" y2="0%" />
605
+ <Defs>
606
+ {fills.map((color, index) => (
607
+ <LinearGradient
608
+ key={`area-${String(index)}`}
609
+ id={`${gradientId}-area-${String(index)}`}
610
+ x1="0%"
611
+ y1="0%"
612
+ x2="0%"
613
+ y2="100%"
614
+ >
615
+ <Stop offset="0%" stopColor={color} stopOpacity={0.32} />
616
+ <Stop offset="100%" stopColor={color} stopOpacity={0} />
617
+ </LinearGradient>
618
+ ))}
619
+ <ClipPath id={clipId}>
620
+ <Rect
621
+ x={layout.plot.x - CLIP_BLEED}
622
+ y={layout.plot.y - CLIP_BLEED}
623
+ width={layout.plot.width + CLIP_BLEED * 2}
624
+ height={layout.plot.height + CLIP_BLEED * 2}
625
+ />
626
+ </ClipPath>
627
+ </Defs>
628
+ {showGrid
629
+ ? layout.gridLines.map((line) => (
630
+ <Line
631
+ key={`grid-${String(line.x1)}-${String(line.y1)}`}
632
+ x1={line.x1}
633
+ y1={line.y1}
634
+ x2={line.x2}
635
+ y2={line.y2}
636
+ stroke={chrome.grid}
637
+ strokeWidth={1}
638
+ />
639
+ ))
640
+ : null}
641
+ {layout.referenceLines.map((line, index) => (
642
+ <G key={`ref-${String(line.y1)}-${String(index)}`}>
643
+ <Line
644
+ x1={line.x1}
645
+ y1={line.y1}
646
+ x2={line.x2}
647
+ y2={line.y2}
648
+ stroke={chrome.label}
649
+ strokeWidth={1}
650
+ strokeDasharray={DASH}
651
+ />
652
+ {line.label !== undefined && line.label.length > 0 ? (
653
+ <SvgText
654
+ x={line.x1 + 4}
655
+ y={line.y1 - 4}
656
+ fill={chrome.label}
657
+ fontFamily={chrome.fontFamily}
658
+ fontSize={chrome.captionSize}
659
+ textAnchor="start"
660
+ >
661
+ {line.label}
662
+ </SvgText>
663
+ ) : null}
664
+ </G>
665
+ ))}
666
+ <G clipPath={`url(#${clipId})`}>
667
+ {layout.series.map((item, seriesIndex) => (
668
+ <AnimatedSeries
669
+ key={item.key}
670
+ item={item}
671
+ seriesIndex={seriesIndex}
672
+ xs={xs}
673
+ baselineY={layout.baselineY}
674
+ morph={morph}
675
+ areaFill={`url(#${gradientId}-area-${String(seriesIndex)})`}
676
+ stroke={chartFillUrl(gradientId, seriesIndex)}
677
+ opacity={highlightIndex !== null ? INACTIVE_OPACITY + 0.35 : 1}
678
+ />
679
+ ))}
680
+ {layout.series.flatMap((item, seriesIndex) =>
681
+ item.points.map((point) =>
682
+ point.y === null || !showsMark(marks[seriesIndex], point.index) ? null : (
683
+ <AnimatedDot
684
+ key={`dot-${item.key}-${String(point.index)}`}
685
+ cx={point.x}
686
+ slot={seriesIndex * xs.length + point.index}
687
+ morph={morph}
688
+ fill={chrome.surface}
689
+ stroke={fills[seriesIndex] ?? chrome.label}
690
+ />
691
+ ),
692
+ ),
693
+ )}
694
+ </G>
695
+ {highlightIndex !== null
696
+ ? (() => {
697
+ const label = layout.categoryLabels.at(highlightIndex);
698
+ if (label === undefined) {
699
+ return null;
700
+ }
701
+ return (
702
+ <Line
703
+ x1={label.x}
704
+ x2={label.x}
705
+ y1={layout.plot.y}
706
+ y2={layout.plot.y + layout.plot.height}
707
+ stroke={chrome.label}
708
+ strokeWidth={1}
709
+ strokeDasharray="3 4"
710
+ />
711
+ );
712
+ })()
713
+ : null}
714
+ {markers.map((marker) =>
715
+ marker.guide ? (
716
+ <Line
717
+ key={`marker-guide-${marker.key}`}
718
+ x1={marker.x}
719
+ x2={marker.x}
720
+ y1={layout.plot.y}
721
+ y2={layout.plot.y + layout.plot.height}
722
+ stroke={chrome.grid}
723
+ strokeWidth={1}
724
+ strokeDasharray="3 4"
725
+ opacity={
726
+ highlightIndex !== null && highlightIndex !== marker.index ? INACTIVE_OPACITY : 1
727
+ }
728
+ />
729
+ ) : null,
730
+ )}
731
+ {highlightIndex !== null
732
+ ? layout.series.flatMap((item, seriesIndex) => {
733
+ const point = item.points.at(highlightIndex);
734
+ if (point?.y == null) {
735
+ return [];
736
+ }
737
+ return [
738
+ <Circle
739
+ key={`active-${item.key}`}
740
+ cx={point.x}
741
+ cy={point.y}
742
+ r={LINE_ACTIVE_DOT_RADIUS}
743
+ fill={chrome.surface}
744
+ stroke={fills[seriesIndex]}
745
+ strokeWidth={LINE_STROKE_WIDTH}
746
+ />,
747
+ ];
748
+ })
749
+ : null}
750
+ {markers.map((marker) => {
751
+ const color =
752
+ resolveChartColor(marker.color, paints) ??
753
+ fills[marker.seriesIndex] ??
754
+ fills.at(0) ??
755
+ chrome.label;
756
+ const nearEnd = marker.x > layout.plot.x + layout.plot.width - EDGE_LABEL_ROOM;
757
+ const nearStart = marker.x < layout.plot.x + EDGE_LABEL_ROOM;
758
+ const captionAnchor = nearEnd ? 'end' : nearStart ? 'start' : 'middle';
759
+ const dimmed = highlightIndex !== null && highlightIndex !== marker.index;
760
+ const markerOpacity = dimmed ? INACTIVE_OPACITY : 1;
761
+ const format = formatters[marker.seriesIndex];
762
+ return (
763
+ <G key={`marker-${marker.key}`}>
764
+ {marker.dot ? (
765
+ <Circle
766
+ cx={marker.x}
767
+ cy={marker.y}
768
+ r={LINE_ACTIVE_DOT_RADIUS}
769
+ fill={color}
770
+ stroke={chrome.surface}
771
+ strokeWidth={LINE_STROKE_WIDTH}
772
+ opacity={markerOpacity}
773
+ />
774
+ ) : null}
775
+ {marker.label !== undefined && marker.label.length > 0 ? (
776
+ <SvgText
777
+ x={marker.x}
778
+ y={marker.y - 16}
779
+ fill={chrome.label}
780
+ fontFamily={chrome.fontFamily}
781
+ fontSize={chrome.captionSize}
782
+ textAnchor={captionAnchor}
783
+ opacity={markerOpacity}
784
+ >
785
+ {marker.label}
786
+ </SvgText>
787
+ ) : null}
788
+ {marker.showValue ? (
789
+ <SvgText
790
+ x={nearEnd ? marker.x - 10 : marker.x + 10}
791
+ y={marker.y + 4}
792
+ fill={chrome.label}
793
+ fontFamily={chrome.fontFamily}
794
+ fontSize={chrome.captionSize}
795
+ textAnchor={nearEnd ? 'end' : 'start'}
796
+ opacity={markerOpacity}
797
+ >
798
+ {format?.(marker.value, {
799
+ location: 'label',
800
+ seriesId: marker.seriesId,
801
+ dataIndex: marker.index,
802
+ }) ?? ''}
803
+ </SvgText>
804
+ ) : null}
805
+ </G>
806
+ );
807
+ })}
808
+ {layout.categoryLabels.map((item, index) =>
809
+ item.tick ? (
810
+ <SvgText
811
+ key={`cat-${item.label}-${String(index)}`}
812
+ x={item.x}
813
+ y={item.y}
814
+ fill={chrome.label}
815
+ fontFamily={chrome.fontFamily}
816
+ fontSize={chrome.labelSize}
817
+ textAnchor={
818
+ layout.categoryLabels.length < 2
819
+ ? 'middle'
820
+ : index === 0
821
+ ? 'start'
822
+ : index === layout.categoryLabels.length - 1
823
+ ? 'end'
824
+ : 'middle'
825
+ }
826
+ alignmentBaseline="middle"
827
+ >
828
+ {item.label}
829
+ </SvgText>
830
+ ) : null,
831
+ )}
832
+ </>
833
+ );
834
+ }
835
+
836
+ function categoryValues(
837
+ layout: LineChartLayout,
838
+ index: number,
839
+ fills: readonly string[],
840
+ formatters: readonly ChartValueFormatter[],
841
+ location: 'tooltip' | 'a11y',
842
+ ): ChartTooltipItem[] {
843
+ return layout.series.flatMap((item, seriesIndex) => {
844
+ const point = item.points.at(index);
845
+ if (point?.value == null) {
846
+ return [];
847
+ }
848
+ const format = formatters[seriesIndex];
849
+ return [
850
+ {
851
+ seriesId: item.key,
852
+ label: item.label,
853
+ color: fills[seriesIndex] ?? '',
854
+ formattedValue:
855
+ format?.(point.value, { location, seriesId: item.key, dataIndex: index }) ?? '',
856
+ },
857
+ ];
858
+ });
859
+ }
860
+
861
+ function seriesLegendLabel(
862
+ item: { readonly id: string; readonly label?: string },
863
+ seriesCount: number,
864
+ localeText: ChartLocaleText,
865
+ ): string {
866
+ if (item.label !== undefined && item.label.length > 0) {
867
+ return item.label;
868
+ }
869
+ return seriesCount === 1 ? localeText.defaultSeriesLabel : item.id;
870
+ }
871
+
872
+ function categoryAnnouncement(
873
+ label: string,
874
+ values: readonly ChartTooltipItem[],
875
+ noValue: string,
876
+ notes: readonly string[] = [],
877
+ ): string {
878
+ const parts = values.map(chartValueText);
879
+ const base = parts.length > 0 ? `${label}, ${parts.join(', ')}` : `${label}, ${noValue}`;
880
+ return notes.length > 0 ? `${base}, ${notes.join(', ')}` : base;
881
+ }
882
+
883
+ function markerNotes(markers: readonly LineChartMarkerLayout[], index: number): string[] {
884
+ return markers
885
+ .filter((marker) => marker.index === index)
886
+ .flatMap((marker) =>
887
+ [marker.legend, marker.label].filter(
888
+ (text): text is string => text !== undefined && text.length > 0,
889
+ ),
890
+ );
891
+ }
892
+
893
+ function lineKeyboardNeighbor(index: number, key: string, count: number): number | null {
894
+ if (key === 'Tab') {
895
+ return index + 1 < count ? index + 1 : null;
896
+ }
897
+ if (key === 'Shift+Tab') {
898
+ return index > 0 ? index - 1 : null;
899
+ }
900
+ return null;
901
+ }
902
+
903
+ /** Targets in scroll-content coordinates, which start at `layout.plot.x`. */
904
+ function lineInspectorTargets({
905
+ layout,
906
+ width,
907
+ height,
908
+ fills,
909
+ formatters,
910
+ localeText,
911
+ selectedIndex,
912
+ markers,
913
+ }: {
914
+ layout: LineChartLayout;
915
+ width: number;
916
+ height: number;
917
+ fills: readonly string[];
918
+ formatters: readonly ChartValueFormatter[];
919
+ localeText: ChartLocaleText;
920
+ selectedIndex: number | null;
921
+ markers: readonly LineChartMarkerLayout[];
922
+ }): ChartInspectorTarget[] {
923
+ const count = layout.categoryLabels.length;
924
+ const band = layout.plot.width / Math.max(count - 1, 1);
925
+ const offset = layout.plot.x;
926
+ return layout.categoryLabels.map((item, index): ChartInspectorTarget => {
927
+ const x = item.x - offset;
928
+ const left = index === 0 ? 0 : x - band / 2;
929
+ const right = index === count - 1 ? width : x + band / 2;
930
+ const pointYs = layout.series.flatMap((series) => {
931
+ const y = series.points.at(index)?.y;
932
+ return y == null ? [] : [y];
933
+ });
934
+ return {
935
+ key: `hit-${String(index)}`,
936
+ left,
937
+ top: 0,
938
+ width: Math.max(right - left, 1),
939
+ height,
940
+ anchorX: x,
941
+ anchorY: pointYs.length > 0 ? Math.min(...pointYs) : layout.plot.y,
942
+ tooltip: {
943
+ title: item.title,
944
+ items: categoryValues(layout, index, fills, formatters, 'tooltip'),
945
+ },
946
+ accessibilityLabel: categoryAnnouncement(
947
+ item.title,
948
+ categoryValues(layout, index, fills, formatters, 'a11y'),
949
+ localeText.noValue,
950
+ markerNotes(markers, index),
951
+ ),
952
+ selected: selectedIndex === index,
953
+ };
954
+ });
955
+ }
956
+
957
+ function LineInspector({
958
+ layout,
959
+ targets,
960
+ summary,
961
+ selectable,
962
+ selectedIndex,
963
+ activeIndex,
964
+ onActivate,
965
+ onDeactivate,
966
+ onDismiss,
967
+ onSelectIndex,
968
+ holdToScrub,
969
+ onScrubLockChange,
970
+ }: {
971
+ layout: LineChartLayout;
972
+ targets: readonly ChartInspectorTarget[];
973
+ onScrubLockChange: (locked: boolean) => void;
974
+ summary: string;
975
+ selectable: boolean;
976
+ selectedIndex: number | null;
977
+ activeIndex: number | null;
978
+ holdToScrub: boolean;
979
+ onActivate: (index: number) => void;
980
+ onDeactivate: (index: number) => void;
981
+ onDismiss: () => void;
982
+ onSelectIndex: (index: number) => void;
983
+ }) {
984
+ const count = layout.categoryLabels.length;
985
+ const offset = layout.plot.x;
986
+
987
+ return (
988
+ <ChartInspector
989
+ targets={targets}
990
+ summary={summary}
991
+ selectable={selectable}
992
+ activeIndex={activeIndex}
993
+ selectedIndex={selectedIndex}
994
+ slot="line-chart"
995
+ holdToScrub={holdToScrub}
996
+ onActivate={onActivate}
997
+ onDeactivate={onDeactivate}
998
+ onDismiss={onDismiss}
999
+ onSelectIndex={onSelectIndex}
1000
+ hitTest={(x, y) => nearestCategoryInPlot(layout.categoryLabels, layout.plot, x, y, offset)}
1001
+ neighborIndex={(index, key) => lineKeyboardNeighbor(index, key, count)}
1002
+ onScrubLockChange={onScrubLockChange}
1003
+ />
1004
+ );
1005
+ }
1006
+
1007
+ function AnimatedSeries({
1008
+ item,
1009
+ seriesIndex,
1010
+ xs,
1011
+ baselineY,
1012
+ morph,
1013
+ areaFill,
1014
+ stroke,
1015
+ opacity,
1016
+ }: {
1017
+ item: LineSeriesLayout;
1018
+ seriesIndex: number;
1019
+ xs: readonly number[];
1020
+ baselineY: number;
1021
+ morph: ChartMorph;
1022
+ areaFill: string;
1023
+ stroke: string;
1024
+ opacity: number;
1025
+ }) {
1026
+ const { from, to, progress } = morph;
1027
+ const start = seriesIndex * xs.length;
1028
+ const end = start + xs.length;
1029
+ const dashAt = item.dashAt;
1030
+ const curve = item.curve;
1031
+ const lineProps = useAnimatedProps(() => {
1032
+ const ys = lerpVector(from.get(), to.get(), progress.get()).slice(start, end);
1033
+ return { d: lineSeriesPaths(xs, ys, curve, baselineY, dashAt).path };
1034
+ }, [from, to, progress, start, end, xs, curve, baselineY, dashAt]);
1035
+ const dashProps = useAnimatedProps(() => {
1036
+ const ys = lerpVector(from.get(), to.get(), progress.get()).slice(start, end);
1037
+ return { d: lineSeriesPaths(xs, ys, curve, baselineY, dashAt).dashedPath };
1038
+ }, [from, to, progress, start, end, xs, curve, baselineY, dashAt]);
1039
+ const areaProps = useAnimatedProps(() => {
1040
+ const ys = lerpVector(from.get(), to.get(), progress.get()).slice(start, end);
1041
+ return { d: lineSeriesPaths(xs, ys, curve, baselineY, dashAt).areaPath };
1042
+ }, [from, to, progress, start, end, xs, curve, baselineY, dashAt]);
1043
+
1044
+ return (
1045
+ <G>
1046
+ {item.area && item.areaPath.length > 0 ? (
1047
+ <AnimatedPath animatedProps={areaProps} fill={areaFill} />
1048
+ ) : null}
1049
+ {item.path.length > 0 ? (
1050
+ <AnimatedPath
1051
+ animatedProps={lineProps}
1052
+ fill="none"
1053
+ stroke={stroke}
1054
+ strokeWidth={LINE_STROKE_WIDTH}
1055
+ strokeLinecap="round"
1056
+ strokeLinejoin="round"
1057
+ strokeDasharray={item.dashed ? DASH : undefined}
1058
+ opacity={opacity}
1059
+ />
1060
+ ) : null}
1061
+ {item.dashedPath.length > 0 ? (
1062
+ <AnimatedPath
1063
+ animatedProps={dashProps}
1064
+ fill="none"
1065
+ stroke={stroke}
1066
+ strokeWidth={LINE_STROKE_WIDTH}
1067
+ strokeLinecap="round"
1068
+ strokeLinejoin="round"
1069
+ strokeDasharray={DASH}
1070
+ opacity={opacity}
1071
+ />
1072
+ ) : null}
1073
+ </G>
1074
+ );
1075
+ }
1076
+
1077
+ function AnimatedDot({
1078
+ cx,
1079
+ slot,
1080
+ morph,
1081
+ fill,
1082
+ stroke,
1083
+ }: {
1084
+ cx: number;
1085
+ slot: number;
1086
+ morph: ChartMorph;
1087
+ fill: string;
1088
+ stroke: string;
1089
+ }) {
1090
+ const { from, to, progress } = morph;
1091
+ const animatedProps = useAnimatedProps(() => {
1092
+ const ys = lerpVector(from.get(), to.get(), progress.get());
1093
+ return { cy: ys[slot] ?? 0 };
1094
+ }, [from, to, progress, slot]);
1095
+
1096
+ return (
1097
+ <AnimatedCircle
1098
+ animatedProps={animatedProps}
1099
+ cx={cx}
1100
+ r={LINE_DOT_RADIUS}
1101
+ fill={fill}
1102
+ stroke={stroke}
1103
+ strokeWidth={LINE_STROKE_WIDTH}
1104
+ />
1105
+ );
1106
+ }