@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,193 @@
1
+ import { type ForwardedRef, type ReactElement } from 'react';
2
+ import { View, type ViewProps } from 'react-native';
3
+ import type { AnimationRootDisableAll } from '../../animation';
4
+ import type { ChartAxis, ChartGrid, ChartLocaleText, ChartReferenceLine, ChartSelectedItem, ChartSeriesBase, ChartSizeProps, ChartTooltipProps } from '../chart/types';
5
+ import { type ChartPalette } from '../chart/palette';
6
+ import { type BarChartOrientation, type BarStackOffset } from './geometry';
7
+ import { type BarChartSize } from './styles';
8
+ export type * from '../chart';
9
+ export type { BarChartSize, BarStackOffset };
10
+ /** Keys of `TRow` whose value is a boolean. */
11
+ export type BarChartBooleanKey<TRow> = {
12
+ [K in keyof TRow]-?: TRow[K] extends boolean | undefined ? K : never;
13
+ }[keyof TRow] & string;
14
+ /** Running-total series. Each row is a change, except rows flagged as totals. */
15
+ export interface BarChartWaterfall<TRow> {
16
+ /**
17
+ * Row key whose `true` value marks a total bar, drawn from zero to the running total. A total
18
+ * row with a value on the first row sets the starting total; otherwise its value is ignored.
19
+ */
20
+ totalKey: BarChartBooleanKey<TRow>;
21
+ }
22
+ /** Draws this series as a thinner comparison bar beside another series' bar. */
23
+ export interface BarChartOverlay {
24
+ /** `id` of the series this one is compared against. */
25
+ seriesId: string;
26
+ }
27
+ export interface BarChartSeries<TRow> extends ChartSeriesBase<TRow> {
28
+ /** Series type. Reserved for mixed charts; bar is the only type today. */
29
+ type?: 'bar';
30
+ /**
31
+ * Stack group id. Series with the same `stack` draw as one bar per category; different ids
32
+ * draw side by side. Omit to draw the series on its own.
33
+ */
34
+ stack?: string;
35
+ /**
36
+ * How the stack group piles its values. Set it on any one series in the group.
37
+ * `expand` scales each category to 100%.
38
+ * @default 'diverging'
39
+ */
40
+ stackOffset?: BarStackOffset;
41
+ /**
42
+ * Draws the series as a waterfall (running total). A waterfall series draws alone: other
43
+ * series are not plotted.
44
+ */
45
+ waterfall?: BarChartWaterfall<TRow>;
46
+ /**
47
+ * Draws the series as a thin comparison bar beside the series it names (this month versus last
48
+ * month). The pair draws alone, and the named series is announced with the change.
49
+ */
50
+ overlay?: BarChartOverlay;
51
+ }
52
+ export interface BarChartProps<TRow extends object = object> extends ViewProps, ChartSizeProps {
53
+ /** One object per category. Series and axes read it through `dataKey`. */
54
+ dataset: readonly TRow[];
55
+ /** Bars to draw. Each reads one numeric column through `dataKey`. */
56
+ series: readonly BarChartSeries<TRow>[];
57
+ /**
58
+ * Horizontal axis. In `vertical` layout it is the category (band) axis: `dataKey` names the
59
+ * category column, `position` (`'bottom'`, `'top'`, `'none'`) places its labels, and
60
+ * `tickLabelInterval` picks which labels draw. In `horizontal` layout it is the value axis.
61
+ * Only the first axis is used.
62
+ */
63
+ xAxis?: readonly ChartAxis<TRow>[];
64
+ /**
65
+ * Vertical axis. In `vertical` layout it is the value axis (`min`, `max`, `tickNumber`,
66
+ * `valueFormatter`; `position: 'none'` hides its ticks). In `horizontal` layout it is the
67
+ * category axis (`position` `'left'`, `'right'`, or `'none'`). Only the first axis is used.
68
+ */
69
+ yAxis?: readonly ChartAxis<TRow>[];
70
+ /**
71
+ * `vertical` grows bars up from the baseline. `horizontal` grows them to the right.
72
+ * @default 'vertical'
73
+ */
74
+ layout?: BarChartOrientation;
75
+ /**
76
+ * Hides the series legend under the chart. Waterfall charts never show one.
77
+ * @default false
78
+ */
79
+ hideLegend?: boolean;
80
+ /**
81
+ * Grid lines along the value axis: `horizontal` in `vertical` layout, `vertical` in
82
+ * `horizontal` layout. The other direction is not drawn. Omit to draw the value-axis lines;
83
+ * pass an object without that key set to `true` to hide them and keep only the baseline.
84
+ * @default { horizontal: true } (vertical layout), { vertical: true } (horizontal layout)
85
+ */
86
+ grid?: ChartGrid;
87
+ /**
88
+ * Default series colors. `auto` uses the FI brand family (`simple-primary`, `-secondary`,
89
+ * `-tertiary`) for up to three series and switches the whole chart to `categorical-1`…`6`
90
+ * past that. `categorical` always uses the categorical slots. A series `color` wins.
91
+ * @default 'auto'
92
+ */
93
+ palette?: ChartPalette;
94
+ /**
95
+ * Dashed guides at a value: horizontal on a vertical chart, vertical on a horizontal chart.
96
+ */
97
+ referenceLines?: readonly ChartReferenceLine[];
98
+ /**
99
+ * Keeps this `dataset` row full color and mutes the rest. Use with `barLabel` to label only
100
+ * that bar, like "this week" in a spending insight.
101
+ */
102
+ emphasizedIndex?: number;
103
+ /**
104
+ * Draws formatted values at the end of each bar (each stack's total when stacked).
105
+ * @default false
106
+ */
107
+ barLabel?: boolean;
108
+ /**
109
+ * Corner radius in pixels. `0` draws square bars.
110
+ * @default 6
111
+ */
112
+ borderRadius?: number;
113
+ /**
114
+ * Pixel gap between stacked segments. With a gap every segment is rounded; `0` joins them and
115
+ * rounds only the outer cap.
116
+ * @default 3
117
+ */
118
+ stackGap?: number;
119
+ /**
120
+ * Share of each category slot left empty around its bars, from `0` to `0.95`. Higher is
121
+ * thinner bars with more space between categories.
122
+ * @default 0.36
123
+ */
124
+ categoryGapRatio?: number;
125
+ /**
126
+ * Gap between side-by-side bars in one category, as a share of one bar's thickness.
127
+ * @default 0.5
128
+ */
129
+ barGapRatio?: number;
130
+ /**
131
+ * When the categories need more room than the visible box, scroll instead of
132
+ * squeezing bars. Vertical charts scroll sideways; horizontal charts scroll vertically.
133
+ * The value axis stays pinned. Turn off to pack every category into `width` / `height`.
134
+ * @default true
135
+ */
136
+ scrollable?: boolean;
137
+ /**
138
+ * How many categories fit in the viewport when `scrollable` is on. Omit to use a
139
+ * readable minimum band (~48px).
140
+ */
141
+ visiblePoints?: number;
142
+ /**
143
+ * Controlled selected bar: `seriesId` and the `dataset` row. `null` clears the selection while
144
+ * staying controlled.
145
+ */
146
+ selectedItem?: ChartSelectedItem;
147
+ /**
148
+ * Initial selected bar when `selectedItem` is omitted.
149
+ */
150
+ defaultSelectedItem?: ChartSelectedItem;
151
+ /**
152
+ * Called when a bar is pressed, with that bar, or with `null` when the selected bar is pressed
153
+ * again. Providing this, `selectedItem`, or `defaultSelectedItem` makes the chart selectable.
154
+ */
155
+ onSelectedItemChange?: (item: ChartSelectedItem) => void;
156
+ /**
157
+ * Tooltip on hover, keyboard focus, or tap. `axis` lists every series in the category, `item`
158
+ * only the bar under the pointer, `none` hides it. On web the plot is one tab stop. Tab /
159
+ * Shift+Tab move between categories and leave the chart after the last (or before the first)
160
+ * group. Arrow keys move along the category axis (and between series). Home and End jump to
161
+ * the first or last category. Enter or Space selects. Escape hides the tooltip. Each bar is
162
+ * announced to screen readers.
163
+ * @default { trigger: 'axis' }
164
+ */
165
+ tooltip?: ChartTooltipProps;
166
+ /** BCP 47 locale for default number and percent formatting. */
167
+ locale?: string;
168
+ /**
169
+ * Overrides for generated strings: summary, trend, waterfall step names, legend fallback, and
170
+ * no-value text. Keys you omit keep the English defaults.
171
+ */
172
+ localeText?: Partial<ChartLocaleText>;
173
+ /**
174
+ * Bars grow from the baseline on mount and tween to new values when `dataset` changes. Pass
175
+ * `'disable-all'` to draw the final state. Reduce Motion and `GlobalAnimationSettingsProvider`
176
+ * `disable-all` also turn it off.
177
+ */
178
+ animation?: AnimationRootDisableAll;
179
+ /**
180
+ * Accessible summary. Defaults to `localeText.barChartSummary` over every category.
181
+ */
182
+ accessibilityLabel?: string;
183
+ /** Additional Uniwind/Tailwind classes, merged after the root's own styles. */
184
+ className?: string;
185
+ }
186
+ /**
187
+ * Category bars from `dataset` rows. MUI X Charts–shaped: `series[].dataKey`, axis arrays,
188
+ * `layout`, `stack` groups, and `selectedItem`.
189
+ */
190
+ export declare const BarChart: <TRow extends object>(props: BarChartProps<TRow> & {
191
+ ref?: ForwardedRef<View>;
192
+ }) => ReactElement | null;
193
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/BarChart/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,IAAI,EAGJ,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAc/D,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,cAAc,EAGd,iBAAiB,EAGlB,MAAM,gBAAgB,CAAC;AAQxB,OAAO,EAWL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAmBL,KAAK,mBAAmB,EAGxB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,UAAU,CAAC;AASlB,mBA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ACH,eAAO,MAAM,QAAQ,EAAgC,CAAC,IAAI,SAAS,MAAM,EACvE,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;CAAE,KACtD,YAAY,GAAG,IAAI,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { type VariantProps } from '@cdx-ui/utils';
2
+ import { resolveChartBox } from '../chart/size';
3
+ import type { ChartSize } from '../chart/types';
4
+ export declare const barChartRootVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
5
+ export declare const barChartLegendVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
6
+ export declare const barChartLegendItemVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
7
+ export declare const barChartLegendLabelVariants: (props?: ({
8
+ selected?: boolean | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ export type BarChartLegendLabelVariantProps = VariantProps<typeof barChartLegendLabelVariants>;
11
+ export declare const BAR_CHART_DIMENSIONS: {
12
+ readonly sm: {
13
+ readonly width: 256;
14
+ readonly height: 160;
15
+ };
16
+ readonly md: {
17
+ readonly width: 308;
18
+ readonly height: 192;
19
+ };
20
+ readonly lg: {
21
+ readonly width: 360;
22
+ readonly height: 224;
23
+ };
24
+ readonly xl: {
25
+ readonly width: 410;
26
+ readonly height: 256;
27
+ };
28
+ };
29
+ export type BarChartSize = ChartSize;
30
+ export declare const resolveBarChartBox: typeof resolveChartBox;
31
+ export declare const BAR_RADIUS = 6;
32
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/BarChart/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAoB,eAAe,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,eAAO,MAAM,oBAAoB,oFAA8C,CAAC;AAEhF,eAAO,MAAM,sBAAsB,oFAElC,CAAC;AAEF,eAAO,MAAM,0BAA0B,oFAAuC,CAAC;AAE/E,eAAO,MAAM,2BAA2B;;8EAUtC,CAAC;AAEH,MAAM,MAAM,+BAA+B,GAAG,YAAY,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE/F,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;CAAmB,CAAC;AACrD,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC;AACrC,eAAO,MAAM,kBAAkB,wBAAkB,CAAC;AAElD,eAAO,MAAM,UAAU,IAAI,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { type FlagCode } from '@cdx-ui/icons/flags';
2
+ import { type IconProps } from '../Icon';
3
+ export type { FlagCode };
4
+ export interface CountryFlagProps extends Omit<IconProps, 'as' | 'filled' | 'color'> {
5
+ /** ISO 3166-1 alpha-2 country code. */
6
+ code: FlagCode;
7
+ }
8
+ /**
9
+ * Renders the country flag for an ISO 3166-1 alpha-2 code.
10
+ *
11
+ * The flag is drawn through `Icon`, so `className` sizing and `asChild` icon slots
12
+ * apply. Flag artwork keeps its own colors. The flag is decorative unless
13
+ * `accessibilityLabel` is set. An unknown `code` renders nothing and logs a
14
+ * warning in development.
15
+ *
16
+ * @component
17
+ * @example
18
+ * ```tsx
19
+ * import { CountryFlag } from '@cdx-ui/components';
20
+ *
21
+ * <CountryFlag code="US" />
22
+ * <CountryFlag code="US" className="size-6" accessibilityLabel="United States" />
23
+ * ```
24
+ *
25
+ * @param {FlagCode} code - ISO 3166-1 alpha-2 country code.
26
+ * @param {string} className - Utility classes for size and placement, merged after the default `size-5` box.
27
+ * @param {string} accessibilityLabel - When set, the flag is announced as an image with this name.
28
+ * @param {object} style - Style overrides passed through to the icon.
29
+ * @param {string} data-testid - Test identifier forwarded to the rendered icon.
30
+ */
31
+ export declare function CountryFlag({ code, className, ...props }: CountryFlagProps): import("react/jsx-runtime").JSX.Element | null;
32
+ export declare namespace CountryFlag {
33
+ var displayName: string;
34
+ }
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/CountryFlag/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,SAAS,EAAE,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;IAClF,uCAAuC;IACvC,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,kDAe1E;yBAfe,WAAW"}
@@ -46,6 +46,8 @@ export interface InputIconProps extends Omit<IconProps, 'children' | 'as' | 'col
46
46
  * case the consumer's substituted element is rendered instead.
47
47
  */
48
48
  as?: IconProps['as'];
49
+ /** The element rendered when `asChild` is set. */
50
+ children?: ReactNode;
49
51
  }
50
52
  declare const InputIcon: {
51
53
  ({ asChild, className, style, as, ...props }: InputIconProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAC;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C;IACnB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,SAAS,iGAiBd,CAAC;AAQF,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,IAAI,GAAG,OAAO,CAAC;IAClF,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACrB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,SAAS;kDAAiD,cAAc;;CA4B7E,CAAC;AAQF,KAAK,sBAAsB,GAAG,OAAO,SAAS,GAAG;IAC/C,KAAK,EAAE,OAAO,UAAU,CAAC;IACzB,IAAI,EAAE,OAAO,SAAS,CAAC;IACvB,IAAI,EAAE,OAAO,SAAS,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,KAAK,EAIZ,sBAAsB,CAAC"}
@@ -0,0 +1,248 @@
1
+ import type { ChartAxis, ChartReferenceLine, ChartSeriesBase } from '../chart/types';
2
+ import type { ChartColor } from '../chart/palette';
3
+ /** How points connect. Names match MUI X `curve`. */
4
+ export type LineChartCurve = 'linear' | 'monotoneX' | 'stepAfter';
5
+ export interface LineChartSeries<TRow extends object> extends ChartSeriesBase<TRow> {
6
+ /** Series type. Optional on `LineChart`; reserved for charts that mix bars and lines. */
7
+ type?: 'line';
8
+ /**
9
+ * How points connect. `stepAfter` holds each value until the next point.
10
+ * @default 'monotoneX'
11
+ */
12
+ curve?: LineChartCurve;
13
+ /**
14
+ * Fills under the line toward zero (or the domain edge nearest it) with a fade of the
15
+ * series color.
16
+ * @default false
17
+ */
18
+ area?: boolean;
19
+ /**
20
+ * Draws a mark on each defined point. A function picks points by `index` (the `dataset` row).
21
+ * @default false
22
+ */
23
+ showMark?: boolean | ((params: {
24
+ index: number;
25
+ }) => boolean);
26
+ /**
27
+ * Dashes the whole line.
28
+ * @default false
29
+ */
30
+ dashed?: boolean;
31
+ /**
32
+ * `dataset` row where the line switches from solid to dashed (e.g. actual → forecast). The
33
+ * curve still uses every point, so the join stays smooth.
34
+ */
35
+ dashedFrom?: number;
36
+ }
37
+ export interface LineChartMarker {
38
+ /** `dataset` row to pin to. Rows with the same category label resolve independently. */
39
+ dataIndex: number;
40
+ /** Series to pin to. Defaults to the first series with a value at `dataIndex`. */
41
+ seriesId?: string;
42
+ /** Caption above the point, e.g. "Rent". */
43
+ label?: string;
44
+ /**
45
+ * Draw the formatted value beside the point.
46
+ * @default false
47
+ */
48
+ showValue?: boolean;
49
+ /** Chart token for the dot. Defaults to that series' color. */
50
+ color?: ChartColor;
51
+ /** Extra legend row, e.g. "Today". */
52
+ legend?: string;
53
+ /**
54
+ * Vertical dashed guide through the point.
55
+ * @default true
56
+ */
57
+ guide?: boolean;
58
+ /**
59
+ * Filled dot on the line.
60
+ * @default true
61
+ */
62
+ dot?: boolean;
63
+ }
64
+ export interface LineCategory {
65
+ /** Axis label. */
66
+ readonly label: string;
67
+ /** Tooltip and screen reader name. */
68
+ readonly title: string;
69
+ readonly tick: boolean;
70
+ }
71
+ export interface LineSeriesInput {
72
+ readonly id: string;
73
+ readonly label: string;
74
+ readonly curve: LineChartCurve;
75
+ readonly area: boolean;
76
+ readonly dashed: boolean;
77
+ /** Row where the dash starts, or `-1`. */
78
+ readonly dashAt: number;
79
+ readonly values: readonly (number | null)[];
80
+ }
81
+ export interface LineDomainOptions {
82
+ readonly min?: number;
83
+ readonly max?: number;
84
+ readonly tickNumber?: number;
85
+ }
86
+ export interface LineChartGutters {
87
+ readonly paddingLeft: number;
88
+ readonly paddingRight: number;
89
+ readonly paddingTop: number;
90
+ readonly paddingBottom: number;
91
+ }
92
+ export interface LineChartMarkerLayout {
93
+ readonly key: string;
94
+ readonly index: number;
95
+ readonly seriesIndex: number;
96
+ readonly seriesId: string;
97
+ readonly x: number;
98
+ readonly y: number;
99
+ readonly value: number;
100
+ readonly label?: string;
101
+ readonly showValue: boolean;
102
+ readonly color?: ChartColor;
103
+ readonly legend?: string;
104
+ readonly guide: boolean;
105
+ readonly dot: boolean;
106
+ }
107
+ export interface LinePoint {
108
+ readonly index: number;
109
+ readonly value: number | null;
110
+ readonly x: number;
111
+ readonly y: number | null;
112
+ }
113
+ export interface LineSeriesLayout {
114
+ readonly key: string;
115
+ readonly label: string;
116
+ readonly curve: LineChartCurve;
117
+ readonly area: boolean;
118
+ readonly dashed: boolean;
119
+ readonly path: string;
120
+ readonly dashedPath: string;
121
+ readonly dashAt: number;
122
+ readonly areaPath: string;
123
+ readonly points: readonly LinePoint[];
124
+ }
125
+ export interface LineLabelAnchor {
126
+ readonly label: string;
127
+ readonly title: string;
128
+ readonly x: number;
129
+ readonly y: number;
130
+ readonly tick: boolean;
131
+ }
132
+ export interface LineValueTick {
133
+ readonly value: number;
134
+ readonly x: number;
135
+ readonly y: number;
136
+ readonly text: string;
137
+ }
138
+ export interface LineGridLine {
139
+ readonly x1: number;
140
+ readonly y1: number;
141
+ readonly x2: number;
142
+ readonly y2: number;
143
+ }
144
+ export interface LineChartLayout {
145
+ readonly series: readonly LineSeriesLayout[];
146
+ readonly categoryLabels: readonly LineLabelAnchor[];
147
+ readonly valueTicks: readonly LineValueTick[];
148
+ readonly gridLines: readonly LineGridLine[];
149
+ readonly referenceLines: readonly (LineGridLine & {
150
+ readonly label?: string;
151
+ })[];
152
+ /** Where areas close: zero, or the domain edge nearest it. Lines rise from here on entry. */
153
+ readonly baselineY: number;
154
+ readonly plot: {
155
+ readonly x: number;
156
+ readonly y: number;
157
+ readonly width: number;
158
+ readonly height: number;
159
+ };
160
+ }
161
+ export declare const MIN_LINE_POINT_BAND = 32;
162
+ /** Max distance from a series stroke (overlay px) that still counts as hovering the line. */
163
+ export declare const LINE_POINTER_HIT_PX = 20;
164
+ /** Extra radius around a plotted point (dots / markers) so a valley like Lowest is easy to hit. */
165
+ export declare const LINE_POINT_HIT_PX = 28;
166
+ /** Extra plot padding when a marker draws a caption or value. */
167
+ export declare const LINE_MARKER_PADDING_TOP = 28;
168
+ export declare const LINE_MARKER_PADDING_RIGHT = 36;
169
+ export declare const DEFAULT_LINE_TICK_NUMBER = 4;
170
+ /**
171
+ * Maps the public `dataset` + `series` + `xAxis` props onto geometry inputs. Row keys are read
172
+ * only through `dataKey`, so no key is reserved.
173
+ */
174
+ export declare function resolveLineChartData<TRow extends object>({ dataset, series, xAxis, }: {
175
+ readonly dataset: readonly TRow[];
176
+ readonly series: readonly LineChartSeries<TRow>[];
177
+ readonly xAxis?: ChartAxis<TRow>;
178
+ }): {
179
+ readonly categories: LineCategory[];
180
+ readonly series: LineSeriesInput[];
181
+ };
182
+ export declare function lineChartGutters({ showValueTicks, showCategoryLabels, }?: {
183
+ readonly showValueTicks?: boolean;
184
+ readonly showCategoryLabels?: boolean;
185
+ }): LineChartGutters;
186
+ export declare function resolveLineChartContentSize({ viewportWidth, viewportHeight, categoryCount, gutters, scrollable, visiblePoints, }: {
187
+ readonly viewportWidth: number;
188
+ readonly viewportHeight: number;
189
+ readonly categoryCount: number;
190
+ readonly gutters: LineChartGutters;
191
+ readonly scrollable: boolean;
192
+ readonly visiblePoints?: number;
193
+ }): {
194
+ readonly width: number;
195
+ readonly height: number;
196
+ };
197
+ /**
198
+ * Value domain and ticks. `min` / `max` pin that end exactly; an open end rounds to a readable
199
+ * tick. `tickNumber` is approximate.
200
+ */
201
+ export declare function lineValueDomain(values: readonly number[], { min: minOption, max: maxOption, tickNumber }?: LineDomainOptions): {
202
+ readonly min: number;
203
+ readonly max: number;
204
+ readonly ticks: readonly number[];
205
+ };
206
+ /**
207
+ * Line and area paths for one series. `ys` uses `NaN` for missing values, which
208
+ * open a gap. Runs on the UI thread while a chart animates.
209
+ * `dashAt` is a category index; cubics before it stay solid, after it dashed,
210
+ * using the same monotone tangents so the join stays round.
211
+ */
212
+ export declare function lineSeriesPaths(xs: readonly number[], ys: readonly number[], curve: LineChartCurve, baselineY: number, dashAt?: number): {
213
+ readonly path: string;
214
+ readonly dashedPath: string;
215
+ readonly areaPath: string;
216
+ };
217
+ /** Pins each marker to its `dataIndex` row; markers that cannot resolve are dropped. */
218
+ export declare function layoutLineChartMarkers(markers: readonly LineChartMarker[], series: readonly LineSeriesLayout[]): readonly LineChartMarkerLayout[];
219
+ /**
220
+ * Category index of the closest point on any series stroke, or `null` when the pointer is
221
+ * farther than `maxDistance` from every line. Overlay coordinates (`plot.x` already subtracted).
222
+ * Uses the same monotone cubics as the painted path so a valley (Lowest) still hits.
223
+ */
224
+ export declare function nearestCategoryOnLines(series: readonly LineSeriesLayout[], overlayX: number, overlayY: number, plotOffsetX: number, maxDistance: number, pointDistance?: number): number | null;
225
+ /**
226
+ * Category under the pointer when it is inside the plot box. Snaps to the nearest category on X.
227
+ * Overlay coordinates (`plot.x` already subtracted).
228
+ */
229
+ export declare function nearestCategoryInPlot(labels: readonly {
230
+ readonly x: number;
231
+ }[], plot: {
232
+ readonly x: number;
233
+ readonly y: number;
234
+ readonly width: number;
235
+ readonly height: number;
236
+ }, overlayX: number, overlayY: number, plotOffsetX: number): number | null;
237
+ export declare function lineChartMarkerGutters(categoryCount: number, markers: readonly LineChartMarker[] | undefined, base?: LineChartGutters): LineChartGutters;
238
+ export declare function layoutLineChart({ categories, series, width, height, referenceLines, yAxis, formatTick, gutters: guttersProp, }: {
239
+ readonly categories: readonly LineCategory[];
240
+ readonly series: readonly LineSeriesInput[];
241
+ readonly width: number;
242
+ readonly height: number;
243
+ readonly referenceLines?: readonly ChartReferenceLine[];
244
+ readonly yAxis?: LineDomainOptions;
245
+ readonly formatTick?: (value: number) => string;
246
+ readonly gutters?: LineChartGutters;
247
+ }): LineChartLayout;
248
+ //# sourceMappingURL=geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../../src/components/LineChart/geometry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE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CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACjG,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,IAAI,CAoBf;AAED,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,SAAS,eAAe,EAAE,GAAG,SAAS,EAC/C,IAAI,GAAE,gBAAqC,GAC1C,gBAAgB,CAgBlB;AAED,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,cAAmB,EACnB,KAAK,EACL,UAAmB,EACnB,OAAO,EAAE,WAAW,GACrB,EAAE;IACD,QAAQ,CAAC,UAAU,EAAE,SAAS,YAAY,EAAE,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACxD,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;CACrC,GAAG,eAAe,CAgHlB"}
@@ -0,0 +1,105 @@
1
+ import { type ForwardedRef, type ReactElement } from 'react';
2
+ import { View, type ViewProps } from 'react-native';
3
+ import type { AnimationRootDisableAll } from '../../animation';
4
+ import type { ChartAxis, ChartGrid, ChartLocaleText, ChartReferenceLine, ChartSelectedItem, ChartSizeProps, ChartTooltipProps } from '../chart/types';
5
+ import { type ChartPalette } from '../chart/palette';
6
+ import { type LineChartCurve, type LineChartMarker, type LineChartSeries } from './geometry';
7
+ export type * from '../chart';
8
+ export type { LineChartCurve, LineChartMarker, LineChartSeries };
9
+ export interface LineChartProps<TRow extends object = object> extends ViewProps, ChartSizeProps {
10
+ /**
11
+ * One object per point, in x order. Columns are read only through `xAxis[0].dataKey` and
12
+ * `series[].dataKey`, so any key (including `label` or `tick`) is plain data. Non-finite
13
+ * values open a gap in that series.
14
+ */
15
+ dataset: readonly TRow[];
16
+ /** One line per entry. */
17
+ series: readonly LineChartSeries<TRow>[];
18
+ /**
19
+ * Category axis. Only the first entry is read; `dataKey` names the column with the category
20
+ * labels (defaults to the row index).
21
+ */
22
+ xAxis?: readonly ChartAxis<TRow>[];
23
+ /**
24
+ * Value axis. Only the first entry is read. `min` / `max` / `tickNumber` set the domain.
25
+ * `position: 'none'` hides the ticks; other sides draw on the left.
26
+ */
27
+ yAxis?: readonly ChartAxis<TRow>[];
28
+ /**
29
+ * Grid lines behind the plot. Only `horizontal` (at each value tick) is drawn; it stays on
30
+ * unless set to `false`.
31
+ * @default { horizontal: true }
32
+ */
33
+ grid?: ChartGrid;
34
+ /**
35
+ * Default series colors. `auto` uses the FI brand family (`simple-primary`, `-secondary`,
36
+ * `-tertiary`) for up to three series and switches the whole chart to `categorical-1`…`6`
37
+ * past that. `categorical` always uses the categorical slots. A series `color` wins.
38
+ * @default 'auto'
39
+ */
40
+ palette?: ChartPalette;
41
+ /**
42
+ * Hides the series legend under the chart.
43
+ * @default false
44
+ */
45
+ hideLegend?: boolean;
46
+ /**
47
+ * Shows every series at a category on hover, keyboard focus, or tap. On web, Tab / Shift+Tab
48
+ * and arrow keys move between categories, Tab past the last one leaves the chart, Home / End
49
+ * jump to the ends, and Escape hides the tooltip. `'item'` behaves like `'axis'` in v1.
50
+ * `'none'` hides it.
51
+ * @default { trigger: 'axis' }
52
+ */
53
+ tooltip?: ChartTooltipProps;
54
+ /**
55
+ * Controlled selection. `dataIndex` is the category; `seriesId` is the first series with a
56
+ * value there. `null` clears it. Omit to let the chart track selection itself.
57
+ */
58
+ selectedItem?: ChartSelectedItem;
59
+ /**
60
+ * Initial selection when `selectedItem` is omitted. Also makes the chart selectable.
61
+ */
62
+ defaultSelectedItem?: ChartSelectedItem;
63
+ /**
64
+ * Called when a category is pressed, with `null` when the selected category is pressed again.
65
+ * Providing this, `selectedItem`, or `defaultSelectedItem` makes the chart selectable and draws a crosshair.
66
+ */
67
+ onSelectedItemChange?: (item: ChartSelectedItem) => void;
68
+ /**
69
+ * When points need more room than the visible box, scroll instead of squeezing.
70
+ * The value axis stays pinned.
71
+ * @default true
72
+ */
73
+ scrollable?: boolean;
74
+ /**
75
+ * How many points fit in the viewport when `scrollable` is on. Omit to use a
76
+ * readable minimum band (~32px).
77
+ */
78
+ visiblePoints?: number;
79
+ /** Dashed horizontal lines across the plot at a value, with an optional caption. */
80
+ referenceLines?: readonly ChartReferenceLine[];
81
+ /** Point callouts (event name, value, extra legend row), pinned by `dataIndex`. */
82
+ markers?: readonly LineChartMarker[];
83
+ /**
84
+ * BCP 47 locale for default number formatting. Defaults to the `@cdx-ui/formatters` locale.
85
+ */
86
+ locale?: string;
87
+ /** Overrides for generated strings (summary, no-value text, default series name). */
88
+ localeText?: Partial<ChartLocaleText>;
89
+ /**
90
+ * Lines rise from the baseline on mount and tween to new values when `dataset` changes. Pass
91
+ * `'disable-all'` to draw the final state. Reduce Motion and `GlobalAnimationSettingsProvider`
92
+ * `disable-all` also turn it off.
93
+ */
94
+ animation?: AnimationRootDisableAll;
95
+ /** Accessible summary. Defaults to `localeText.lineChartSummary` of the last category. */
96
+ accessibilityLabel?: string;
97
+ /** Additional Uniwind/Tailwind classes, merged after the root's own styles. */
98
+ className?: string;
99
+ }
100
+ export declare const LineChart: (<TRow extends object>(props: LineChartProps<TRow> & {
101
+ ref?: ForwardedRef<View>;
102
+ }) => ReactElement | null) & {
103
+ displayName?: string;
104
+ };
105
+ //# sourceMappingURL=index.d.ts.map