@senvenli/react 0.0.0-stage → 0.1.0

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 (636) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -2
  3. package/dist/action/button-group.d.ts +26 -0
  4. package/dist/action/button-group.js +12 -0
  5. package/dist/action/button-group.js.map +1 -0
  6. package/dist/action/button.d.ts +42 -0
  7. package/dist/action/button.js +58 -0
  8. package/dist/action/button.js.map +1 -0
  9. package/dist/action/close-button.d.ts +12 -0
  10. package/dist/action/close-button.js +13 -0
  11. package/dist/action/close-button.js.map +1 -0
  12. package/dist/action/copy-button.d.ts +21 -0
  13. package/dist/action/copy-button.js +38 -0
  14. package/dist/action/copy-button.js.map +1 -0
  15. package/dist/action/fab.d.ts +29 -0
  16. package/dist/action/fab.js +57 -0
  17. package/dist/action/fab.js.map +1 -0
  18. package/dist/action/files.d.ts +70 -0
  19. package/dist/action/files.js +156 -0
  20. package/dist/action/files.js.map +1 -0
  21. package/dist/action/index.d.ts +23 -0
  22. package/dist/action/index.js +16 -0
  23. package/dist/action/index.js.map +1 -0
  24. package/dist/action/language-names.d.ts +19 -0
  25. package/dist/action/language-names.js +79 -0
  26. package/dist/action/language-names.js.map +1 -0
  27. package/dist/action/language-switcher.d.ts +57 -0
  28. package/dist/action/language-switcher.js +53 -0
  29. package/dist/action/language-switcher.js.map +1 -0
  30. package/dist/action/link-button.d.ts +57 -0
  31. package/dist/action/link-button.js +48 -0
  32. package/dist/action/link-button.js.map +1 -0
  33. package/dist/action/link.d.ts +24 -0
  34. package/dist/action/link.js +18 -0
  35. package/dist/action/link.js.map +1 -0
  36. package/dist/action/pressable.d.ts +40 -0
  37. package/dist/action/pressable.js +65 -0
  38. package/dist/action/pressable.js.map +1 -0
  39. package/dist/action/styles.d.ts +60 -0
  40. package/dist/action/styles.js +109 -0
  41. package/dist/action/styles.js.map +1 -0
  42. package/dist/action/theme-script.d.ts +12 -0
  43. package/dist/action/theme-script.js +23 -0
  44. package/dist/action/theme-script.js.map +1 -0
  45. package/dist/action/theme-switcher.d.ts +43 -0
  46. package/dist/action/theme-switcher.js +260 -0
  47. package/dist/action/theme-switcher.js.map +1 -0
  48. package/dist/action/theme-toggle.d.ts +43 -0
  49. package/dist/action/theme-toggle.js +259 -0
  50. package/dist/action/theme-toggle.js.map +1 -0
  51. package/dist/action/toggle.d.ts +44 -0
  52. package/dist/action/toggle.js +28 -0
  53. package/dist/action/toggle.js.map +1 -0
  54. package/dist/action/touch-target.d.ts +9 -0
  55. package/dist/action/touch-target.js +14 -0
  56. package/dist/action/touch-target.js.map +1 -0
  57. package/dist/charts/axis-width.d.ts +186 -0
  58. package/dist/charts/axis-width.js +1262 -0
  59. package/dist/charts/axis-width.js.map +1 -0
  60. package/dist/charts/bar-public.d.ts +16 -0
  61. package/dist/charts/bar-public.js +16 -0
  62. package/dist/charts/bar-public.js.map +1 -0
  63. package/dist/charts/chart-parts.d.ts +136 -0
  64. package/dist/charts/chart-parts.js +160 -0
  65. package/dist/charts/chart-parts.js.map +1 -0
  66. package/dist/charts/core-charts.d.ts +157 -0
  67. package/dist/charts/core-charts.js +505 -0
  68. package/dist/charts/core-charts.js.map +1 -0
  69. package/dist/charts/index.d.ts +12 -0
  70. package/dist/charts/index.js +8 -0
  71. package/dist/charts/index.js.map +1 -0
  72. package/dist/charts/list-charts.d.ts +124 -0
  73. package/dist/charts/list-charts.js +308 -0
  74. package/dist/charts/list-charts.js.map +1 -0
  75. package/dist/charts/more-charts.d.ts +138 -0
  76. package/dist/charts/more-charts.js +284 -0
  77. package/dist/charts/more-charts.js.map +1 -0
  78. package/dist/charts/report-charts.d.ts +138 -0
  79. package/dist/charts/report-charts.js +370 -0
  80. package/dist/charts/report-charts.js.map +1 -0
  81. package/dist/charts/value-tick.d.ts +178 -0
  82. package/dist/charts/value-tick.js +240 -0
  83. package/dist/charts/value-tick.js.map +1 -0
  84. package/dist/collection/data-table-url-hook.d.ts +34 -0
  85. package/dist/collection/data-table-url-hook.js +70 -0
  86. package/dist/collection/data-table-url-hook.js.map +1 -0
  87. package/dist/collection/data-table-url.d.ts +30 -0
  88. package/dist/collection/data-table-url.js +48 -0
  89. package/dist/collection/data-table-url.js.map +1 -0
  90. package/dist/collection/data-table.d.ts +112 -0
  91. package/dist/collection/data-table.js +188 -0
  92. package/dist/collection/data-table.js.map +1 -0
  93. package/dist/collection/grid-list-public.d.ts +18 -0
  94. package/dist/collection/grid-list-public.js +19 -0
  95. package/dist/collection/grid-list-public.js.map +1 -0
  96. package/dist/collection/grid-list.d.ts +73 -0
  97. package/dist/collection/grid-list.js +46 -0
  98. package/dist/collection/grid-list.js.map +1 -0
  99. package/dist/collection/index.d.ts +14 -0
  100. package/dist/collection/index.js +8 -0
  101. package/dist/collection/index.js.map +1 -0
  102. package/dist/collection/list.d.ts +61 -0
  103. package/dist/collection/list.js +38 -0
  104. package/dist/collection/list.js.map +1 -0
  105. package/dist/collection/selection-checkbox.d.ts +5 -0
  106. package/dist/collection/selection-checkbox.js +13 -0
  107. package/dist/collection/selection-checkbox.js.map +1 -0
  108. package/dist/collection/table.d.ts +91 -0
  109. package/dist/collection/table.js +183 -0
  110. package/dist/collection/table.js.map +1 -0
  111. package/dist/collection/tree.d.ts +31 -0
  112. package/dist/collection/tree.js +22 -0
  113. package/dist/collection/tree.js.map +1 -0
  114. package/dist/color/color.d.ts +87 -0
  115. package/dist/color/color.js +200 -0
  116. package/dist/color/color.js.map +1 -0
  117. package/dist/color/contrast.d.ts +34 -0
  118. package/dist/color/contrast.js +44 -0
  119. package/dist/color/contrast.js.map +1 -0
  120. package/dist/color/index.d.ts +4 -0
  121. package/dist/color/index.js +5 -0
  122. package/dist/color/index.js.map +1 -0
  123. package/dist/date/calendar.d.ts +71 -0
  124. package/dist/date/calendar.js +291 -0
  125. package/dist/date/calendar.js.map +1 -0
  126. package/dist/date/fields.d.ts +174 -0
  127. package/dist/date/fields.js +250 -0
  128. package/dist/date/fields.js.map +1 -0
  129. package/dist/date/index.d.ts +7 -0
  130. package/dist/date/index.js +6 -0
  131. package/dist/date/index.js.map +1 -0
  132. package/dist/date/month-grid.d.ts +31 -0
  133. package/dist/date/month-grid.js +115 -0
  134. package/dist/date/month-grid.js.map +1 -0
  135. package/dist/date/pickers.d.ts +118 -0
  136. package/dist/date/pickers.js +176 -0
  137. package/dist/date/pickers.js.map +1 -0
  138. package/dist/date/public.d.ts +25 -0
  139. package/dist/date/public.js +24 -0
  140. package/dist/date/public.js.map +1 -0
  141. package/dist/date/segments.d.ts +153 -0
  142. package/dist/date/segments.js +433 -0
  143. package/dist/date/segments.js.map +1 -0
  144. package/dist/defaults.d.ts +74 -0
  145. package/dist/defaults.js +100 -0
  146. package/dist/defaults.js.map +1 -0
  147. package/dist/density.d.ts +2 -0
  148. package/dist/density.js +2 -0
  149. package/dist/density.js.map +1 -0
  150. package/dist/display/avatar.d.ts +29 -0
  151. package/dist/display/avatar.js +71 -0
  152. package/dist/display/avatar.js.map +1 -0
  153. package/dist/display/badge.d.ts +65 -0
  154. package/dist/display/badge.js +99 -0
  155. package/dist/display/badge.js.map +1 -0
  156. package/dist/display/card.d.ts +72 -0
  157. package/dist/display/card.js +91 -0
  158. package/dist/display/card.js.map +1 -0
  159. package/dist/display/carousel.d.ts +47 -0
  160. package/dist/display/carousel.js +214 -0
  161. package/dist/display/carousel.js.map +1 -0
  162. package/dist/display/description-list.d.ts +25 -0
  163. package/dist/display/description-list.js +36 -0
  164. package/dist/display/description-list.js.map +1 -0
  165. package/dist/display/icon-aliases.d.ts +1 -0
  166. package/dist/display/icon-aliases.js +259 -0
  167. package/dist/display/icon-aliases.js.map +1 -0
  168. package/dist/display/icon-names.d.ts +4 -0
  169. package/dist/display/icon-names.js +2 -0
  170. package/dist/display/icon-names.js.map +1 -0
  171. package/dist/display/icon.d.ts +51 -0
  172. package/dist/display/icon.js +96 -0
  173. package/dist/display/icon.js.map +1 -0
  174. package/dist/display/image-crop.d.ts +106 -0
  175. package/dist/display/image-crop.js +117 -0
  176. package/dist/display/image-crop.js.map +1 -0
  177. package/dist/display/image-cropper.d.ts +68 -0
  178. package/dist/display/image-cropper.js +284 -0
  179. package/dist/display/image-cropper.js.map +1 -0
  180. package/dist/display/image-viewer.d.ts +54 -0
  181. package/dist/display/image-viewer.js +84 -0
  182. package/dist/display/image-viewer.js.map +1 -0
  183. package/dist/display/image.d.ts +26 -0
  184. package/dist/display/image.js +17 -0
  185. package/dist/display/image.js.map +1 -0
  186. package/dist/display/index.d.ts +29 -0
  187. package/dist/display/index.js +16 -0
  188. package/dist/display/index.js.map +1 -0
  189. package/dist/display/iso-chip.d.ts +19 -0
  190. package/dist/display/iso-chip.js +21 -0
  191. package/dist/display/iso-chip.js.map +1 -0
  192. package/dist/display/kbd.d.ts +11 -0
  193. package/dist/display/kbd.js +33 -0
  194. package/dist/display/kbd.js.map +1 -0
  195. package/dist/display/lozenge.d.ts +30 -0
  196. package/dist/display/lozenge.js +55 -0
  197. package/dist/display/lozenge.js.map +1 -0
  198. package/dist/display/scroll-area.d.ts +29 -0
  199. package/dist/display/scroll-area.js +95 -0
  200. package/dist/display/scroll-area.js.map +1 -0
  201. package/dist/display/separator.d.ts +13 -0
  202. package/dist/display/separator.js +24 -0
  203. package/dist/display/separator.js.map +1 -0
  204. package/dist/display/stat.d.ts +35 -0
  205. package/dist/display/stat.js +41 -0
  206. package/dist/display/stat.js.map +1 -0
  207. package/dist/display/timeline.d.ts +44 -0
  208. package/dist/display/timeline.js +111 -0
  209. package/dist/display/timeline.js.map +1 -0
  210. package/dist/display/typography.d.ts +37 -0
  211. package/dist/display/typography.js +53 -0
  212. package/dist/display/typography.js.map +1 -0
  213. package/dist/display/visually-hidden.d.ts +14 -0
  214. package/dist/display/visually-hidden.js +10 -0
  215. package/dist/display/visually-hidden.js.map +1 -0
  216. package/dist/feedback/banner.d.ts +46 -0
  217. package/dist/feedback/banner.js +157 -0
  218. package/dist/feedback/banner.js.map +1 -0
  219. package/dist/feedback/cooldown.d.ts +17 -0
  220. package/dist/feedback/cooldown.js +59 -0
  221. package/dist/feedback/cooldown.js.map +1 -0
  222. package/dist/feedback/empty-state.d.ts +35 -0
  223. package/dist/feedback/empty-state.js +39 -0
  224. package/dist/feedback/empty-state.js.map +1 -0
  225. package/dist/feedback/index.d.ts +12 -0
  226. package/dist/feedback/index.js +11 -0
  227. package/dist/feedback/index.js.map +1 -0
  228. package/dist/feedback/meter.d.ts +33 -0
  229. package/dist/feedback/meter.js +42 -0
  230. package/dist/feedback/meter.js.map +1 -0
  231. package/dist/feedback/motion.d.ts +9 -0
  232. package/dist/feedback/motion.js +57 -0
  233. package/dist/feedback/motion.js.map +1 -0
  234. package/dist/feedback/progress.d.ts +39 -0
  235. package/dist/feedback/progress.js +68 -0
  236. package/dist/feedback/progress.js.map +1 -0
  237. package/dist/feedback/skeleton.d.ts +48 -0
  238. package/dist/feedback/skeleton.js +61 -0
  239. package/dist/feedback/skeleton.js.map +1 -0
  240. package/dist/feedback/spinner.d.ts +19 -0
  241. package/dist/feedback/spinner.js +29 -0
  242. package/dist/feedback/spinner.js.map +1 -0
  243. package/dist/feedback/status-dot.d.ts +23 -0
  244. package/dist/feedback/status-dot.js +37 -0
  245. package/dist/feedback/status-dot.js.map +1 -0
  246. package/dist/form/countries.d.ts +34 -0
  247. package/dist/form/countries.js +273 -0
  248. package/dist/form/countries.js.map +1 -0
  249. package/dist/form/data-attributes.d.ts +11 -0
  250. package/dist/form/data-attributes.js +22 -0
  251. package/dist/form/data-attributes.js.map +1 -0
  252. package/dist/form/field-parts.d.ts +113 -0
  253. package/dist/form/field-parts.js +178 -0
  254. package/dist/form/field-parts.js.map +1 -0
  255. package/dist/form/field.d.ts +36 -0
  256. package/dist/form/field.js +65 -0
  257. package/dist/form/field.js.map +1 -0
  258. package/dist/form/files.d.ts +70 -0
  259. package/dist/form/files.js +156 -0
  260. package/dist/form/files.js.map +1 -0
  261. package/dist/form/form.d.ts +40 -0
  262. package/dist/form/form.js +74 -0
  263. package/dist/form/form.js.map +1 -0
  264. package/dist/form/image-crop.d.ts +106 -0
  265. package/dist/form/image-crop.js +117 -0
  266. package/dist/form/image-crop.js.map +1 -0
  267. package/dist/form/image-cropper.d.ts +68 -0
  268. package/dist/form/image-cropper.js +284 -0
  269. package/dist/form/image-cropper.js.map +1 -0
  270. package/dist/form/index.d.ts +24 -0
  271. package/dist/form/index.js +15 -0
  272. package/dist/form/index.js.map +1 -0
  273. package/dist/form/input-group.d.ts +63 -0
  274. package/dist/form/input-group.js +63 -0
  275. package/dist/form/input-group.js.map +1 -0
  276. package/dist/form/input-otp.d.ts +35 -0
  277. package/dist/form/input-otp.js +83 -0
  278. package/dist/form/input-otp.js.map +1 -0
  279. package/dist/form/input.d.ts +36 -0
  280. package/dist/form/input.js +41 -0
  281. package/dist/form/input.js.map +1 -0
  282. package/dist/form/number-field.d.ts +84 -0
  283. package/dist/form/number-field.js +81 -0
  284. package/dist/form/number-field.js.map +1 -0
  285. package/dist/form/otp-field.d.ts +37 -0
  286. package/dist/form/otp-field.js +116 -0
  287. package/dist/form/otp-field.js.map +1 -0
  288. package/dist/form/password-field.d.ts +61 -0
  289. package/dist/form/password-field.js +61 -0
  290. package/dist/form/password-field.js.map +1 -0
  291. package/dist/form/phone-field.d.ts +104 -0
  292. package/dist/form/phone-field.js +275 -0
  293. package/dist/form/phone-field.js.map +1 -0
  294. package/dist/form/phone-paste.d.ts +24 -0
  295. package/dist/form/phone-paste.js +40 -0
  296. package/dist/form/phone-paste.js.map +1 -0
  297. package/dist/form/phone.d.ts +159 -0
  298. package/dist/form/phone.js +309 -0
  299. package/dist/form/phone.js.map +1 -0
  300. package/dist/form/search-field.d.ts +29 -0
  301. package/dist/form/search-field.js +23 -0
  302. package/dist/form/search-field.js.map +1 -0
  303. package/dist/form/styles.d.ts +31 -0
  304. package/dist/form/styles.js +43 -0
  305. package/dist/form/styles.js.map +1 -0
  306. package/dist/form/text-area.d.ts +70 -0
  307. package/dist/form/text-area.js +93 -0
  308. package/dist/form/text-area.js.map +1 -0
  309. package/dist/form/text-field.d.ts +131 -0
  310. package/dist/form/text-field.js +59 -0
  311. package/dist/form/text-field.js.map +1 -0
  312. package/dist/form/validation.d.ts +145 -0
  313. package/dist/form/validation.js +136 -0
  314. package/dist/form/validation.js.map +1 -0
  315. package/dist/i18n.d.ts +438 -0
  316. package/dist/i18n.js +948 -0
  317. package/dist/i18n.js.map +1 -0
  318. package/dist/index.d.ts +9 -0
  319. package/dist/index.js +7 -0
  320. package/dist/index.js.map +1 -0
  321. package/dist/intl-locale.d.ts +30 -0
  322. package/dist/intl-locale.js +83 -0
  323. package/dist/intl-locale.js.map +1 -0
  324. package/dist/layers.d.ts +32 -0
  325. package/dist/layers.js +33 -0
  326. package/dist/layers.js.map +1 -0
  327. package/dist/layout/auth-form-layout.d.ts +71 -0
  328. package/dist/layout/auth-form-layout.js +61 -0
  329. package/dist/layout/auth-form-layout.js.map +1 -0
  330. package/dist/layout/auth-layout.d.ts +59 -0
  331. package/dist/layout/auth-layout.js +26 -0
  332. package/dist/layout/auth-layout.js.map +1 -0
  333. package/dist/layout/box.d.ts +26 -0
  334. package/dist/layout/box.js +16 -0
  335. package/dist/layout/box.js.map +1 -0
  336. package/dist/layout/grid.d.ts +27 -0
  337. package/dist/layout/grid.js +26 -0
  338. package/dist/layout/grid.js.map +1 -0
  339. package/dist/layout/index.d.ts +16 -0
  340. package/dist/layout/index.js +12 -0
  341. package/dist/layout/index.js.map +1 -0
  342. package/dist/layout/pressable.d.ts +40 -0
  343. package/dist/layout/pressable.js +65 -0
  344. package/dist/layout/pressable.js.map +1 -0
  345. package/dist/layout/reset-sent-card.d.ts +39 -0
  346. package/dist/layout/reset-sent-card.js +22 -0
  347. package/dist/layout/reset-sent-card.js.map +1 -0
  348. package/dist/layout/scroll-area.d.ts +29 -0
  349. package/dist/layout/scroll-area.js +95 -0
  350. package/dist/layout/scroll-area.js.map +1 -0
  351. package/dist/layout/section.d.ts +41 -0
  352. package/dist/layout/section.js +22 -0
  353. package/dist/layout/section.js.map +1 -0
  354. package/dist/layout/split.d.ts +50 -0
  355. package/dist/layout/split.js +35 -0
  356. package/dist/layout/split.js.map +1 -0
  357. package/dist/layout/stack.d.ts +44 -0
  358. package/dist/layout/stack.js +36 -0
  359. package/dist/layout/stack.js.map +1 -0
  360. package/dist/layout/tokens.d.ts +33 -0
  361. package/dist/layout/tokens.js +85 -0
  362. package/dist/layout/tokens.js.map +1 -0
  363. package/dist/layout/toolbar.d.ts +37 -0
  364. package/dist/layout/toolbar.js +334 -0
  365. package/dist/layout/toolbar.js.map +1 -0
  366. package/dist/navigate-context.d.ts +12 -0
  367. package/dist/navigate-context.js +13 -0
  368. package/dist/navigate-context.js.map +1 -0
  369. package/dist/navigation/accordion.d.ts +40 -0
  370. package/dist/navigation/accordion.js +33 -0
  371. package/dist/navigation/accordion.js.map +1 -0
  372. package/dist/navigation/bottom-nav.d.ts +29 -0
  373. package/dist/navigation/bottom-nav.js +48 -0
  374. package/dist/navigation/bottom-nav.js.map +1 -0
  375. package/dist/navigation/brand-link-context.d.ts +8 -0
  376. package/dist/navigation/brand-link-context.js +9 -0
  377. package/dist/navigation/brand-link-context.js.map +1 -0
  378. package/dist/navigation/breadcrumbs.d.ts +36 -0
  379. package/dist/navigation/breadcrumbs.js +51 -0
  380. package/dist/navigation/breadcrumbs.js.map +1 -0
  381. package/dist/navigation/dock.d.ts +27 -0
  382. package/dist/navigation/dock.js +47 -0
  383. package/dist/navigation/dock.js.map +1 -0
  384. package/dist/navigation/footer.d.ts +43 -0
  385. package/dist/navigation/footer.js +43 -0
  386. package/dist/navigation/footer.js.map +1 -0
  387. package/dist/navigation/index.d.ts +22 -0
  388. package/dist/navigation/index.js +17 -0
  389. package/dist/navigation/index.js.map +1 -0
  390. package/dist/navigation/language-names.d.ts +19 -0
  391. package/dist/navigation/language-names.js +79 -0
  392. package/dist/navigation/language-names.js.map +1 -0
  393. package/dist/navigation/language-switcher.d.ts +55 -0
  394. package/dist/navigation/language-switcher.js +53 -0
  395. package/dist/navigation/language-switcher.js.map +1 -0
  396. package/dist/navigation/nav-panel.d.ts +18 -0
  397. package/dist/navigation/nav-panel.js +51 -0
  398. package/dist/navigation/nav-panel.js.map +1 -0
  399. package/dist/navigation/navbar.d.ts +73 -0
  400. package/dist/navigation/navbar.js +64 -0
  401. package/dist/navigation/navbar.js.map +1 -0
  402. package/dist/navigation/page-header.d.ts +37 -0
  403. package/dist/navigation/page-header.js +50 -0
  404. package/dist/navigation/page-header.js.map +1 -0
  405. package/dist/navigation/pagination.d.ts +25 -0
  406. package/dist/navigation/pagination.js +51 -0
  407. package/dist/navigation/pagination.js.map +1 -0
  408. package/dist/navigation/panel-header.d.ts +37 -0
  409. package/dist/navigation/panel-header.js +50 -0
  410. package/dist/navigation/panel-header.js.map +1 -0
  411. package/dist/navigation/sidebar-script.d.ts +12 -0
  412. package/dist/navigation/sidebar-script.js +20 -0
  413. package/dist/navigation/sidebar-script.js.map +1 -0
  414. package/dist/navigation/sidebar.d.ts +149 -0
  415. package/dist/navigation/sidebar.js +332 -0
  416. package/dist/navigation/sidebar.js.map +1 -0
  417. package/dist/navigation/skip-link.d.ts +12 -0
  418. package/dist/navigation/skip-link.js +30 -0
  419. package/dist/navigation/skip-link.js.map +1 -0
  420. package/dist/navigation/stepper.d.ts +50 -0
  421. package/dist/navigation/stepper.js +96 -0
  422. package/dist/navigation/stepper.js.map +1 -0
  423. package/dist/navigation/tabs.d.ts +84 -0
  424. package/dist/navigation/tabs.js +118 -0
  425. package/dist/navigation/tabs.js.map +1 -0
  426. package/dist/navigation/toolbar.d.ts +37 -0
  427. package/dist/navigation/toolbar.js +334 -0
  428. package/dist/navigation/toolbar.js.map +1 -0
  429. package/dist/overlay/alert-dialog.d.ts +63 -0
  430. package/dist/overlay/alert-dialog.js +76 -0
  431. package/dist/overlay/alert-dialog.js.map +1 -0
  432. package/dist/overlay/command-palette.d.ts +53 -0
  433. package/dist/overlay/command-palette.js +130 -0
  434. package/dist/overlay/command-palette.js.map +1 -0
  435. package/dist/overlay/command.d.ts +53 -0
  436. package/dist/overlay/command.js +129 -0
  437. package/dist/overlay/command.js.map +1 -0
  438. package/dist/overlay/context-menu.d.ts +29 -0
  439. package/dist/overlay/context-menu.js +58 -0
  440. package/dist/overlay/context-menu.js.map +1 -0
  441. package/dist/overlay/dialog.d.ts +162 -0
  442. package/dist/overlay/dialog.js +174 -0
  443. package/dist/overlay/dialog.js.map +1 -0
  444. package/dist/overlay/drawer.d.ts +41 -0
  445. package/dist/overlay/drawer.js +114 -0
  446. package/dist/overlay/drawer.js.map +1 -0
  447. package/dist/overlay/floating.d.ts +142 -0
  448. package/dist/overlay/floating.js +226 -0
  449. package/dist/overlay/floating.js.map +1 -0
  450. package/dist/overlay/hover-card.d.ts +19 -0
  451. package/dist/overlay/hover-card.js +31 -0
  452. package/dist/overlay/hover-card.js.map +1 -0
  453. package/dist/overlay/index.d.ts +18 -0
  454. package/dist/overlay/index.js +12 -0
  455. package/dist/overlay/index.js.map +1 -0
  456. package/dist/overlay/overlay-base.d.ts +105 -0
  457. package/dist/overlay/overlay-base.js +250 -0
  458. package/dist/overlay/overlay-base.js.map +1 -0
  459. package/dist/overlay/overlay.d.ts +299 -0
  460. package/dist/overlay/overlay.js +558 -0
  461. package/dist/overlay/overlay.js.map +1 -0
  462. package/dist/overlay/toast.d.ts +58 -0
  463. package/dist/overlay/toast.js +145 -0
  464. package/dist/overlay/toast.js.map +1 -0
  465. package/dist/provider.d.ts +26 -0
  466. package/dist/provider.js +30 -0
  467. package/dist/provider.js.map +1 -0
  468. package/dist/selection/autocomplete.d.ts +54 -0
  469. package/dist/selection/autocomplete.js +122 -0
  470. package/dist/selection/autocomplete.js.map +1 -0
  471. package/dist/selection/checkbox.d.ts +56 -0
  472. package/dist/selection/checkbox.js +49 -0
  473. package/dist/selection/checkbox.js.map +1 -0
  474. package/dist/selection/choice-size.d.ts +26 -0
  475. package/dist/selection/choice-size.js +50 -0
  476. package/dist/selection/choice-size.js.map +1 -0
  477. package/dist/selection/choice-text.d.ts +21 -0
  478. package/dist/selection/choice-text.js +33 -0
  479. package/dist/selection/choice-text.js.map +1 -0
  480. package/dist/selection/combobox.d.ts +173 -0
  481. package/dist/selection/combobox.js +410 -0
  482. package/dist/selection/combobox.js.map +1 -0
  483. package/dist/selection/index.d.ts +20 -0
  484. package/dist/selection/index.js +13 -0
  485. package/dist/selection/index.js.map +1 -0
  486. package/dist/selection/list-box.d.ts +30 -0
  487. package/dist/selection/list-box.js +16 -0
  488. package/dist/selection/list-box.js.map +1 -0
  489. package/dist/selection/listbox.d.ts +44 -0
  490. package/dist/selection/listbox.js +49 -0
  491. package/dist/selection/listbox.js.map +1 -0
  492. package/dist/selection/match.d.ts +20 -0
  493. package/dist/selection/match.js +57 -0
  494. package/dist/selection/match.js.map +1 -0
  495. package/dist/selection/multi-select.d.ts +72 -0
  496. package/dist/selection/multi-select.js +138 -0
  497. package/dist/selection/multi-select.js.map +1 -0
  498. package/dist/selection/radio-card.d.ts +31 -0
  499. package/dist/selection/radio-card.js +29 -0
  500. package/dist/selection/radio-card.js.map +1 -0
  501. package/dist/selection/radio.d.ts +72 -0
  502. package/dist/selection/radio.js +64 -0
  503. package/dist/selection/radio.js.map +1 -0
  504. package/dist/selection/select-public.d.ts +19 -0
  505. package/dist/selection/select-public.js +24 -0
  506. package/dist/selection/select-public.js.map +1 -0
  507. package/dist/selection/select.d.ts +72 -0
  508. package/dist/selection/select.js +69 -0
  509. package/dist/selection/select.js.map +1 -0
  510. package/dist/selection/slider.d.ts +16 -0
  511. package/dist/selection/slider.js +44 -0
  512. package/dist/selection/slider.js.map +1 -0
  513. package/dist/selection/styles.d.ts +26 -0
  514. package/dist/selection/styles.js +78 -0
  515. package/dist/selection/styles.js.map +1 -0
  516. package/dist/selection/switch.d.ts +24 -0
  517. package/dist/selection/switch.js +27 -0
  518. package/dist/selection/switch.js.map +1 -0
  519. package/dist/selection/tag-group.d.ts +38 -0
  520. package/dist/selection/tag-group.js +45 -0
  521. package/dist/selection/tag-group.js.map +1 -0
  522. package/dist/tone.d.ts +6 -0
  523. package/dist/tone.js +2 -0
  524. package/dist/tone.js.map +1 -0
  525. package/dist/utils.d.ts +9 -0
  526. package/dist/utils.js +42 -0
  527. package/dist/utils.js.map +1 -0
  528. package/manifest/component.full.schema.json +391 -0
  529. package/manifest/component.schema.json +279 -0
  530. package/manifests/accordion.json +299 -0
  531. package/manifests/alert-dialog.json +261 -0
  532. package/manifests/area-chart.json +338 -0
  533. package/manifests/autocomplete.json +299 -0
  534. package/manifests/avatar.json +253 -0
  535. package/manifests/badge.json +288 -0
  536. package/manifests/banner.json +185 -0
  537. package/manifests/bar-chart.json +454 -0
  538. package/manifests/bar-list.json +262 -0
  539. package/manifests/bottom-nav.json +139 -0
  540. package/manifests/box.json +3450 -0
  541. package/manifests/breadcrumbs.json +199 -0
  542. package/manifests/button-group.json +2294 -0
  543. package/manifests/button.json +1211 -0
  544. package/manifests/calendar-heatmap.json +218 -0
  545. package/manifests/calendar.json +299 -0
  546. package/manifests/card.json +308 -0
  547. package/manifests/carousel.json +263 -0
  548. package/manifests/chart-parts.json +309 -0
  549. package/manifests/checkbox.json +998 -0
  550. package/manifests/close-button.json +1000 -0
  551. package/manifests/color-field.json +276 -0
  552. package/manifests/color-picker.json +161 -0
  553. package/manifests/color-swatch-picker.json +220 -0
  554. package/manifests/color-swatch.json +140 -0
  555. package/manifests/combobox.json +581 -0
  556. package/manifests/command.json +275 -0
  557. package/manifests/composed-chart.json +287 -0
  558. package/manifests/context-menu.json +148 -0
  559. package/manifests/copy-button.json +192 -0
  560. package/manifests/data-table.json +334 -0
  561. package/manifests/date-field.json +302 -0
  562. package/manifests/date-picker.json +472 -0
  563. package/manifests/description-list.json +201 -0
  564. package/manifests/dialog.json +322 -0
  565. package/manifests/donut-chart.json +264 -0
  566. package/manifests/drawer.json +211 -0
  567. package/manifests/empty-state.json +185 -0
  568. package/manifests/fab.json +172 -0
  569. package/manifests/field.json +209 -0
  570. package/manifests/file-upload.json +791 -0
  571. package/manifests/form.json +829 -0
  572. package/manifests/funnel-chart.json +223 -0
  573. package/manifests/gauge-chart.json +252 -0
  574. package/manifests/grid-list.json +335 -0
  575. package/manifests/grid.json +3482 -0
  576. package/manifests/heading.json +183 -0
  577. package/manifests/heatmap.json +265 -0
  578. package/manifests/hover-card.json +172 -0
  579. package/manifests/icon.json +201 -0
  580. package/manifests/image-cropper.json +295 -0
  581. package/manifests/image-viewer.json +198 -0
  582. package/manifests/image.json +193 -0
  583. package/manifests/index.json +2035 -0
  584. package/manifests/input-group.json +3571 -0
  585. package/manifests/input.json +1557 -0
  586. package/manifests/kbd.json +98 -0
  587. package/manifests/language-switcher.json +274 -0
  588. package/manifests/line-chart.json +342 -0
  589. package/manifests/link.json +867 -0
  590. package/manifests/list-box.json +213 -0
  591. package/manifests/menu.json +453 -0
  592. package/manifests/meter.json +145 -0
  593. package/manifests/navbar.json +281 -0
  594. package/manifests/otp-field.json +1029 -0
  595. package/manifests/page-header.json +164 -0
  596. package/manifests/pagination.json +181 -0
  597. package/manifests/popover.json +205 -0
  598. package/manifests/pressable.json +367 -0
  599. package/manifests/progress.json +282 -0
  600. package/manifests/radar-chart.json +229 -0
  601. package/manifests/radial-chart.json +195 -0
  602. package/manifests/radio.json +975 -0
  603. package/manifests/scatter-chart.json +277 -0
  604. package/manifests/scroll-area.json +127 -0
  605. package/manifests/section.json +169 -0
  606. package/manifests/select.json +474 -0
  607. package/manifests/separator.json +119 -0
  608. package/manifests/sidebar.json +584 -0
  609. package/manifests/skeleton.json +235 -0
  610. package/manifests/skip-link.json +89 -0
  611. package/manifests/slider.json +706 -0
  612. package/manifests/sparkline.json +208 -0
  613. package/manifests/spinner.json +105 -0
  614. package/manifests/split.json +6618 -0
  615. package/manifests/stack.json +3541 -0
  616. package/manifests/stat.json +192 -0
  617. package/manifests/stepper.json +279 -0
  618. package/manifests/switch.json +205 -0
  619. package/manifests/table.json +375 -0
  620. package/manifests/tabs.json +438 -0
  621. package/manifests/tag-group.json +264 -0
  622. package/manifests/text-area.json +1136 -0
  623. package/manifests/text.json +244 -0
  624. package/manifests/theme-switcher.json +152 -0
  625. package/manifests/time-field.json +284 -0
  626. package/manifests/timeline.json +196 -0
  627. package/manifests/toast.json +87 -0
  628. package/manifests/toggle-button.json +1489 -0
  629. package/manifests/toolbar.json +145 -0
  630. package/manifests/tooltip.json +181 -0
  631. package/manifests/tracker.json +192 -0
  632. package/manifests/tree.json +245 -0
  633. package/manifests/visually-hidden.json +114 -0
  634. package/package.json +117 -3
  635. package/styles/base.css +56 -0
  636. package/styles/theme.css +154 -0
@@ -0,0 +1,284 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { useLocale } from "react-aria-components";
5
+ import { Area, Bar, BarChart as RechartsBarChart, CartesianGrid, Cell, ComposedChart as RechartsComposedChart, Line, Pie, PieChart as RechartsPieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart as RechartsRadarChart, RadialBar, RadialBarChart, ResponsiveContainer, Scatter, Tooltip, XAxis, YAxis, ZAxis, } from "recharts";
6
+ import { cn } from "../utils.js";
7
+ import { chartNoDataLabel, chartOtherLabel, chartShareLabel, chartTrendLabel, chartValueLabel, gaugeTargetLabel, sparklineSummaryLabel } from "../i18n.js";
8
+ import { CHART_NEUTRAL, ChartFrame, ChartLegend, ChartTooltip, chartColor, useChartAnimation, useChartDirection, useChartSeries, } from "./chart-parts.js";
9
+ import { ChartHeader, PlottedTooltip } from "./core-charts.js";
10
+ import { chartNumber, formattedValues, tickAxisWidth, tickOverhang, tickWrapWidth, valueAxisTicks } from "./axis-width.js";
11
+ import { NameTick, ValueTick, isolatedLabel } from "./value-tick.js";
12
+ import { EmptyState } from "../feedback/empty-state.js";
13
+ const plain = (value) => String(value);
14
+ /**
15
+ * The size is in `style` as well, with its unit: Recharts measures a tick for wrapping in a hidden span that
16
+ * takes only the tick's `style` (assigned as is, so a bare 11 is dropped). Without it the span kept the page's
17
+ * body size (14–16px) and a tick that fits at 11px broke over two lines ("€" above "1.500.000").
18
+ */
19
+ const AXIS_TICK = { fill: "var(--ds-text-subtlest)", fontSize: 11, style: { fontVariantNumeric: "tabular-nums", fontSize: "11px" } };
20
+ /** An axis name's 11px, in `style` too: Recharts measures labels for wrapping the same way. */
21
+ const LABEL_SIZE = { fontSize: 11, style: { fontSize: "11px" } };
22
+ /** Recharts places SVG text for LTR; the plot stays ltr inside (see ChartFrame). */
23
+ const LTR_PLOT = "[direction:ltr]";
24
+ /** @internal The header, then ChartFrame with its loading, empty and data-table states. */
25
+ export function Shell({ title, "aria-label": ariaLabel, period, total, isLoading, emptyState, isEmpty, height, legend, columns, rows, onRowAction, children, }) {
26
+ const { locale } = useLocale();
27
+ const positions = React.useMemo(() => new Map(rows.map((row, position) => [row, position])), [rows]);
28
+ return (_jsxs("section", { "data-slot": "chart", "aria-label": title ?? ariaLabel, className: "flex min-w-0 flex-col gap-ds-200", children: [(title || period || total != null) && _jsx(ChartHeader, { title: title, period: period, total: total }), _jsx(ChartFrame, { height: height, isLoading: isLoading, emptyState: isEmpty ? (emptyState ?? _jsx(EmptyState, { size: "small", icon: "chart-column", title: chartNoDataLabel(locale) })) : null, legend: legend, dataTable: { caption: [title ?? ariaLabel, period].filter(Boolean).join(" · "), columns, rows, rowKey: (row) => positions.get(row) ?? 0, onRowAction }, children: children })] }));
29
+ }
30
+ /** Whole percentages that add up to exactly 100 (largest remainder). */
31
+ export function sharesOf(values) {
32
+ const total = values.reduce((sum, value) => sum + Math.max(0, value), 0);
33
+ if (total <= 0)
34
+ return values.map(() => 0);
35
+ const raw = values.map((value) => (Math.max(0, value) / total) * 100);
36
+ const floors = raw.map(Math.floor);
37
+ let left = 100 - floors.reduce((sum, value) => sum + value, 0);
38
+ const order = raw.map((value, index) => ({ index, rest: value - Math.floor(value) })).sort((a, b) => b.rest - a.rest);
39
+ for (const { index } of order) {
40
+ if (left <= 0)
41
+ break;
42
+ floors[index] += 1;
43
+ left -= 1;
44
+ }
45
+ return floors;
46
+ }
47
+ /** @internal Warns once in development; shared by the chart files. */
48
+ export function useOnce(condition, message) {
49
+ const warned = React.useRef(false);
50
+ React.useEffect(() => {
51
+ if (!condition || warned.current)
52
+ return;
53
+ warned.current = true;
54
+ console.warn(message);
55
+ }, [condition, message]);
56
+ }
57
+ /**
58
+ * How a total divides into a few parts: an 18px ring with 1.2° gaps, parts in descending order from
59
+ * 12 o'clock in `ds-chart-1`…, the total in the center with its unit, and a list beside the ring with
60
+ * each part's value and exact share (the shares add up to 100). More than five parts fold into "Other".
61
+ */
62
+ /** The narrowest the donut's list gets before the ring shrinks: a swatch, a short name, value and share. */
63
+ const DONUT_LIST_MIN = 168;
64
+ /** `gap-ds-300` between the ring and the list. */
65
+ const DONUT_GAP = 24;
66
+ export function DonutChart({ title, "aria-label": ariaLabel, period, data, valueFormatter = plain, centerLabel, showList = true, isLoading, emptyState, height = 200 }) {
67
+ const { locale } = useLocale();
68
+ const animate = useChartAnimation();
69
+ // Parts of a whole: a missing or negative value has no slice.
70
+ const counted = data.filter((part) => Number.isFinite(part.value) && part.value >= 0);
71
+ useOnce(counted.length < data.length, "DonutChart: parts without a finite, non-negative value are left out.");
72
+ useOnce(counted.length > 5, "DonutChart: at most five parts; the rest are shown as \"Other\".");
73
+ const sorted = [...counted].sort((a, b) => b.value - a.value);
74
+ const folded = sorted.length > 5;
75
+ const parts = folded ? [...sorted.slice(0, 4), { name: chartOtherLabel(locale), value: sorted.slice(4).reduce((sum, part) => sum + part.value, 0) }] : sorted;
76
+ // "Other" is a neutral series, not a fifth hue.
77
+ const partColor = (index) => (folded && index === 4 ? CHART_NEUTRAL : chartColor(index));
78
+ const total = parts.reduce((sum, part) => sum + part.value, 0);
79
+ const shares = sharesOf(parts.map((part) => part.value));
80
+ const rows = parts.map((part, index) => ({ ...part, share: shares[index] }));
81
+ const columns = [
82
+ { key: "name", header: title ?? ariaLabel ?? "", isRowHeader: true },
83
+ { key: "value", header: chartValueLabel(locale), align: "end", render: (row) => valueFormatter(row.value) },
84
+ { key: "share", header: chartShareLabel(locale), align: "end", render: (row) => `${row.share}%` },
85
+ ];
86
+ // On a phone the ring gives way, down to 112px, so the list keeps room for the names (whole pixels,
87
+ // so the measuring settles).
88
+ // A callback ref: the row mounts only once loading and empty are over, and the measuring starts then.
89
+ const [row, setRow] = React.useState(null);
90
+ const [rowWidth, setRowWidth] = React.useState();
91
+ React.useLayoutEffect(() => {
92
+ if (!row || !showList || typeof ResizeObserver === "undefined")
93
+ return;
94
+ const observer = new ResizeObserver(([entry]) => setRowWidth(Math.floor(entry.contentRect.width)));
95
+ observer.observe(row);
96
+ return () => observer.disconnect();
97
+ }, [row, showList]);
98
+ const ring = rowWidth === undefined ? height - 24 : Math.max(112, Math.min(height - 24, rowWidth - DONUT_LIST_MIN - DONUT_GAP));
99
+ return (_jsx(Shell, { title: title, "aria-label": ariaLabel, period: period, isLoading: isLoading, emptyState: emptyState, isEmpty: total <= 0, height: height, columns: columns, rows: rows, children: _jsxs("div", { ref: setRow, "data-slot": "donut", className: "flex h-full min-w-0 items-center gap-ds-300", children: [_jsxs("div", { className: cn("relative shrink-0", LTR_PLOT), style: { width: ring, height: ring }, children: [_jsxs(RechartsPieChart, { width: ring, height: ring, accessibilityLayer: false, children: [_jsx(Pie, { rootTabIndex: -1, data: parts, dataKey: "value", nameKey: "name", innerRadius: ring / 2 - 18, outerRadius: ring / 2, startAngle: 90, endAngle: -270, paddingAngle: 1.2, stroke: "none", isAnimationActive: animate, children: parts.map((part, index) => (_jsx(Cell, { fill: partColor(index) }, index))) }), _jsx(Tooltip, { isAnimationActive: animate, content: _jsx(ChartTooltip, { valueFormatter: valueFormatter, labelFormatter: () => title }) })] }), _jsxs("div", { "data-slot": "donut-center", className: "pointer-events-none absolute inset-0 grid place-content-center text-center", children: [_jsx("bdi", { className: "text-[22px] leading-7 font-medium text-ds-text tabular-nums", children: valueFormatter(total) }), centerLabel && _jsx("bdi", { className: "text-body-small text-ds-text-subtle", children: centerLabel })] })] }), showList && (_jsx("ul", { "data-slot": "donut-list", className: "m-0 flex min-w-0 flex-1 list-none flex-col gap-ds-100 p-0", children: rows.map((row, index) => (_jsxs("li", { className: "flex items-center gap-ds-100 text-body", children: [_jsx("span", { "aria-hidden": true, className: "size-2.5 shrink-0 rounded-ds-xsmall", style: { background: partColor(index) } }), _jsx("bdi", { className: "min-w-0 flex-1 truncate text-ds-text-subtle", children: row.name }), _jsx("bdi", { className: "tabular-nums text-ds-text", children: valueFormatter(row.value) }), _jsxs("bdi", { className: "w-9 text-end tabular-nums text-ds-text-subtle", children: [row.share, "%"] })] }, index))) }))] }) }));
100
+ }
101
+ const polar = (cx, cy, r, angle) => [cx + r * Math.cos(angle), cy - r * Math.sin(angle)];
102
+ /**
103
+ * One bounded value against its range and a target: a half-circle 16px track in
104
+ * `ds-background-neutral-pressed`, the value in `ds-chart-1` with round caps, the target as a 2px
105
+ * `ds-text` tick, the value in the center with the target under it. Only for bounded percentages
106
+ * (occupancy, quota), never money or open counts. A meter to screen readers.
107
+ */
108
+ export function GaugeChart({ title, "aria-label": ariaLabel, period, value, min = 0, max = 100, target, valueFormatter = plain, isLoading, height = 160 }) {
109
+ const { locale } = useLocale();
110
+ const { isRtl } = useChartDirection();
111
+ // A missing value reads as the minimum, and an empty range draws no fill or tick.
112
+ const clamp = (n) => (Number.isFinite(n) ? Math.min(max, Math.max(min, n)) : min);
113
+ const ratioOf = (n) => (max > min ? (clamp(n) - min) / (max - min) : 0);
114
+ const ratio = ratioOf(value);
115
+ const width = height * 2 - 32;
116
+ const cx = width / 2;
117
+ const cy = height - 16;
118
+ const r = Math.min(cx, cy) - 12;
119
+ const arc = (to) => {
120
+ const [x0, y0] = polar(cx, cy, r, Math.PI);
121
+ const [x1, y1] = polar(cx, cy, r, Math.PI - to * Math.PI);
122
+ return `M ${x0} ${y0} A ${r} ${r} 0 0 1 ${x1} ${y1}`;
123
+ };
124
+ const targetRatio = target === undefined || !Number.isFinite(target) || max <= min ? undefined : ratioOf(target);
125
+ const tick = targetRatio === undefined ? undefined : [polar(cx, cy, r - 12, Math.PI - targetRatio * Math.PI), polar(cx, cy, r + 12, Math.PI - targetRatio * Math.PI)];
126
+ // A missing value is said as missing, not formatted as NaN: a dash in the center, the sentence for screen readers.
127
+ const hasValue = Number.isFinite(value);
128
+ const valueText = hasValue ? valueFormatter(value) : chartNoDataLabel(locale);
129
+ const targetText = target === undefined ? undefined : gaugeTargetLabel(locale, valueFormatter(target));
130
+ const rows = [{ name: title, value, target }];
131
+ const columns = [
132
+ { key: "name", header: title ?? ariaLabel ?? "", isRowHeader: true },
133
+ { key: "value", header: chartValueLabel(locale), align: "end", render: (row) => valueFormatter(row.value) },
134
+ ...(target === undefined ? [] : [{ key: "target", header: gaugeTargetLabel(locale, "").trim(), align: "end", render: () => valueFormatter(target) }]),
135
+ ];
136
+ return (_jsx(Shell, { title: title, "aria-label": ariaLabel, period: period, isLoading: isLoading, isEmpty: false, height: height, columns: columns, rows: rows, children: _jsxs("div", { role: "meter", "aria-label": title ?? ariaLabel, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": clamp(value), "aria-valuetext": targetText ? `${valueText}, ${targetText}` : valueText, "data-slot": "gauge", className: "relative mx-auto h-full", style: { width }, children: [_jsxs("svg", { "aria-hidden": true, width: width, height: height, className: cn("block overflow-visible", isRtl && "-scale-x-100"), children: [_jsx("path", { d: arc(1), fill: "none", stroke: "var(--ds-background-neutral-pressed)", strokeWidth: 16, strokeLinecap: "round" }), ratio > 0 && _jsx("path", { "data-slot": "gauge-value", d: arc(ratio), fill: "none", stroke: "var(--ds-chart-1)", strokeWidth: 16, strokeLinecap: "round" }), tick && _jsx("line", { "data-slot": "gauge-target", x1: tick[0][0], y1: tick[0][1], x2: tick[1][0], y2: tick[1][1], stroke: "var(--ds-text)", strokeWidth: 2 })] }), _jsxs("div", { className: "pointer-events-none absolute inset-x-0 bottom-ds-100 flex flex-col items-center", children: [_jsx("bdi", { "data-slot": "gauge-text", className: "text-[22px] leading-7 font-medium text-ds-text tabular-nums", children: hasValue ? valueText : "—" }), targetText && _jsx("bdi", { className: "text-body-small text-ds-text-subtle", children: targetText })] })] }) }));
137
+ }
138
+ /** Two or three values that share a 0–100 scale: 12px rings in `ds-chart-1`…`3` from 12 o'clock, with a key list. */
139
+ export function RadialChart({ title, "aria-label": ariaLabel, period, data, valueFormatter = (value) => `${value}%`, isLoading, emptyState, height = 200 }) {
140
+ const { locale } = useLocale();
141
+ const animate = useChartAnimation();
142
+ useOnce(data.length > 3, "RadialChart: two or three rings; use a BarChart for more.");
143
+ const rings = data.slice(0, 3).map((ring, index) => ({ ...ring, fill: chartColor(index) }));
144
+ const size = height - 8;
145
+ const columns = [
146
+ { key: "name", header: title ?? ariaLabel ?? "", isRowHeader: true },
147
+ { key: "value", header: chartValueLabel(locale), align: "end", render: (row) => valueFormatter(row.value) },
148
+ ];
149
+ return (_jsx(Shell, { title: title, "aria-label": ariaLabel, period: period, isLoading: isLoading, emptyState: emptyState, isEmpty: rings.length === 0, height: height, columns: columns, rows: rings, children: _jsxs("div", { "data-slot": "radial", className: "flex h-full min-w-0 items-center gap-ds-400", children: [_jsx("div", { className: cn("shrink-0", LTR_PLOT), children: _jsxs(RadialBarChart, { width: size, height: size, data: rings, innerRadius: size / 2 - 12 * rings.length - 6 * (rings.length - 1), outerRadius: size / 2, barSize: 12, startAngle: 90, endAngle: -270, accessibilityLayer: false, children: [_jsx(PolarAngleAxis, { type: "number", domain: [0, 100], tick: false }), _jsx(RadialBar, { dataKey: "value", cornerRadius: 6, background: { fill: "var(--ds-background-neutral-pressed)" }, isAnimationActive: animate })] }) }), _jsx("ul", { "data-slot": "radial-list", className: "m-0 flex min-w-0 flex-1 list-none flex-col gap-ds-100 p-0", children: rings.map((ring, index) => (_jsxs("li", { className: "flex items-center gap-ds-100 text-body", children: [_jsx("span", { "aria-hidden": true, className: "size-2.5 shrink-0 rounded-ds-xsmall", style: { background: ring.fill } }), _jsx("bdi", { className: "min-w-0 flex-1 truncate text-ds-text-subtle", children: ring.name }), _jsx("bdi", { className: "tabular-nums text-ds-text", children: valueFormatter(ring.value) })] }, index))) })] }) }));
150
+ }
151
+ /**
152
+ * A word-sized trend with no axes, beside the number it explains (in tables, Stats, cards): a 1.5px
153
+ * `ds-chart-1` line over a 14% fill with the last point marked, or bars. No gridlines, labels or tooltip;
154
+ * screen readers get a text summary (first, last, low, high) instead of a table.
155
+ */
156
+ export function Sparkline({ data, type = "line", width, height = 32, "aria-label": label, valueFormatter = plain }) {
157
+ const { locale } = useLocale();
158
+ const animate = useChartAnimation();
159
+ const direction = useChartDirection();
160
+ const points = data.map((value, index) => ({ index, value }));
161
+ const summary = data.length > 0
162
+ ? sparklineSummaryLabel(locale, {
163
+ first: valueFormatter(data[0]),
164
+ last: valueFormatter(data[data.length - 1]),
165
+ min: valueFormatter(Math.min(...data)),
166
+ max: valueFormatter(Math.max(...data)),
167
+ })
168
+ : chartNoDataLabel(locale);
169
+ const plot = type === "bar" ? (_jsxs(RechartsBarChart, { data: points, margin: { top: 2, right: 0, bottom: 0, left: 0 }, barCategoryGap: "20%", accessibilityLayer: false, children: [_jsx(XAxis, { dataKey: "index", hide: true, reversed: direction.reversed }), _jsx(YAxis, { hide: true, domain: [(low) => Math.min(0, low), (high) => Math.max(0, high)] }), _jsx(Bar, { dataKey: "value", fill: "var(--ds-chart-1)", radius: 1, isAnimationActive: animate })] })) : (_jsxs(RechartsComposedChart, { data: points, margin: { top: 3, right: 3, bottom: 3, left: 3 }, accessibilityLayer: false, children: [_jsx(XAxis, { dataKey: "index", hide: true, reversed: direction.reversed }), _jsx(YAxis, { hide: true, domain: ["dataMin", "dataMax"] }), _jsx(Area, { dataKey: "value", type: "monotone", stroke: "var(--ds-chart-1)", strokeWidth: 1.5, fill: "var(--ds-chart-1)", fillOpacity: 0.14, isAnimationActive: animate,
170
+ // The last point marked.
171
+ dot: (props) => props.index === data.length - 1 && props.cx != null && props.cy != null ? (_jsx("circle", { "data-slot": "sparkline-last", cx: props.cx, cy: props.cy, r: 2.5, fill: "var(--ds-chart-1)" }, "last")) : (_jsx("g", {}, props.index)) })] }));
172
+ return (_jsx("span", { role: "img", "aria-label": label ?? summary, title: summary, "data-slot": "sparkline", className: cn("inline-block align-middle", width == null && "w-full", LTR_PLOT), style: { width, height }, children: width != null ? (React.cloneElement(plot, { width, height })) : (_jsx(ResponsiveContainer, { width: "100%", height: height, children: plot })) }));
173
+ }
174
+ /** Recharts' default tick count, set on the y axis so the width counts the ticks it draws. */
175
+ const SCATTER_TICKS = 5;
176
+ /** The y axis's narrowest, as it was before it was sized from its ticks. */
177
+ const SCATTER_Y_MIN = 56;
178
+ /** The y axis's name, turned on its side at the axis's outer edge: about 12px across (11px type), and 4px clear of the ticks. */
179
+ const AXIS_NAME_ROOM = 16;
180
+ /** The least-squares line through the points, as its two ends; null under two points. */
181
+ function fitTrend(rows, px, py, x) {
182
+ if (rows.length < 2)
183
+ return null;
184
+ const n = rows.length;
185
+ const sx = rows.reduce((sum, row) => sum + px(row), 0);
186
+ const sy = rows.reduce((sum, row) => sum + py(row), 0);
187
+ const sxy = rows.reduce((sum, row) => sum + px(row) * py(row), 0);
188
+ const sxx = rows.reduce((sum, row) => sum + px(row) ** 2, 0);
189
+ const slope = (n * sxy - sx * sy) / (n * sxx - sx * sx || 1);
190
+ const intercept = (sy - slope * sx) / n;
191
+ const xs = rows.map(px);
192
+ const [lo, hi] = [Math.min(...xs), Math.max(...xs)];
193
+ return [
194
+ { [x]: lo, trend: slope * lo + intercept },
195
+ { [x]: hi, trend: slope * hi + intercept },
196
+ ];
197
+ }
198
+ /**
199
+ * Each item by two measures, to show a relation and outliers: 4px `ds-chart-1` points at 80%, an optional
200
+ * dashed trend line in `ds-chart-neutral`, an optional size measure or second category (`ds-chart-2`
201
+ * diamonds). Hover names the item; a press opens it, and so does a row of the shown data table, which is
202
+ * the keyboard's way in. Axes carry their units.
203
+ */
204
+ export function ScatterChart(props) {
205
+ const { title, "aria-label": ariaLabel, period, data, name, x, y, size, category, xLabel, yLabel, valueFormatters, trendLine, onPointPress, isLoading, emptyState, height = 260 } = props;
206
+ const { locale } = useLocale();
207
+ const animate = useChartAnimation();
208
+ const direction = useChartDirection();
209
+ const series = useChartSeries();
210
+ const fx = valueFormatters?.x ?? plain;
211
+ const fy = valueFormatters?.y ?? plain;
212
+ const numeric = (row, key) => (typeof row[key] === "number" ? row[key] : NaN);
213
+ // An item without both measures has no place on the plot, nor in its table.
214
+ const valid = data.filter((row) => Number.isFinite(numeric(row, x)) && Number.isFinite(numeric(row, y)));
215
+ const groups = category
216
+ ? [
217
+ { key: "main", label: category.otherLabel, rows: valid.filter((row) => row[category.key] !== category.value), color: chartColor(0), shape: "circle" },
218
+ { key: "category", label: category.label, rows: valid.filter((row) => row[category.key] === category.value), color: chartColor(1), shape: "diamond" },
219
+ ]
220
+ : [{ key: "main", label: yLabel, rows: valid, color: chartColor(0), shape: "circle" }];
221
+ // The trend follows what is shown: a group hidden from the legend leaves the fit too.
222
+ const shown = groups.filter((group) => !series.isHidden(group.key)).flatMap((group) => group.rows);
223
+ const trend = fitTrend(trendLine ? shown : [], (row) => numeric(row, x), (row) => numeric(row, y), x);
224
+ // The trend is a series too: it gets a dashed key in the legend, and the legend can hide it.
225
+ const legendItems = [
226
+ ...(category ? groups.map((group) => ({ key: group.key, label: group.label, color: group.color })) : []),
227
+ ...(trend ? [{ key: "trend", label: chartTrendLabel(locale), color: CHART_NEUTRAL, kind: "line", strokeDasharray: "6 4" }] : []),
228
+ ];
229
+ // The y axis holds its name beside its ticks: as wide as its longest tick (Recharts' ticks for the y values
230
+ // drawn, the trend's ends among them) plus the name's room, never under the 56px it always had. The x axis
231
+ // needs no width: Recharts lets its ticks run the plot's width. Each y tick is given the room beside the name
232
+ // (see axis-width's tickWrapWidth). Both axes draw the DS's ticks (ValueTick): a figure never parts from its
233
+ // sign and currency, and an axis whose ticks pass their room shows them with compact figures, the y axis then
234
+ // sized for those.
235
+ const yTicks = valueAxisTicks([...shown.map((row) => numeric(row, y)), ...(trend && !series.isHidden("trend") ? trend.map((end) => end.trend) : [])], SCATTER_TICKS);
236
+ const yValues = formattedValues(yTicks, fy);
237
+ const yAxisWidth = tickAxisWidth(yTicks.map(fy), SCATTER_Y_MIN, AXIS_NAME_ROOM, locale, yValues);
238
+ // The top y tick's lines past one stand above its gridline: the 8px top margin takes them (axis-width's tickOverhang).
239
+ const yOverhang = tickOverhang(yTicks.length > 0 ? fy(yTicks.at(-1)) : undefined, tickWrapWidth(yAxisWidth, AXIS_NAME_ROOM), locale, yTicks.map(fy), yValues);
240
+ const xTicks = valueAxisTicks(shown.map((row) => numeric(row, x)), SCATTER_TICKS);
241
+ const columns = [
242
+ { key: name, header: title ?? ariaLabel ?? "", isRowHeader: true },
243
+ { key: x, header: xLabel, align: "end", render: (row) => fx(numeric(row, x)) },
244
+ { key: y, header: yLabel, align: "end", render: (row) => fy(numeric(row, y)) },
245
+ ...(category ? [{ key: category.key, header: category.label, render: (row) => (row[category.key] === category.value ? category.label : category.otherLabel) }] : []),
246
+ ];
247
+ return (_jsx(Shell, { title: title, "aria-label": ariaLabel, period: period, isLoading: isLoading, emptyState: emptyState, isEmpty: valid.length === 0, height: height, legend: legendItems.length > 0 ? _jsx(ChartLegend, { items: legendItems, hidden: series.hidden, onToggle: series.toggle }) : undefined, columns: columns, rows: valid, onRowAction: onPointPress, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(RechartsComposedChart, { margin: { top: 8 + yOverhang, right: 8, bottom: 16, left: 8 }, accessibilityLayer: true, children: [_jsx(CartesianGrid, { stroke: "var(--ds-border)" }), _jsx(XAxis, { type: "number", dataKey: x, name: xLabel, tickFormatter: fx, tick: _jsx(ValueTick, { ...AXIS_TICK, axisTicks: xTicks }), tickLine: false, axisLine: { stroke: "var(--ds-border-bold)" }, reversed: direction.reversed, label: { value: xLabel, position: "insideBottom", offset: -12, fill: "var(--ds-text-subtle)", ...LABEL_SIZE, ...isolatedLabel(xLabel, "insideBottom") } }), _jsx(YAxis, { type: "number", dataKey: y, name: yLabel, tickFormatter: fy, tick: _jsx(ValueTick, { ...AXIS_TICK, width: tickWrapWidth(yAxisWidth, AXIS_NAME_ROOM), axisTicks: yTicks }), tickLine: false, axisLine: false, orientation: direction.valueAxis, width: yAxisWidth, tickCount: SCATTER_TICKS, label: { value: yLabel, angle: -90, position: direction.isRtl ? "insideRight" : "insideLeft", fill: "var(--ds-text-subtle)", ...LABEL_SIZE, ...isolatedLabel(yLabel, direction.isRtl ? "insideRight" : "insideLeft") } }), size && _jsx(ZAxis, { type: "number", dataKey: size, range: [16, 160] }), groups
248
+ .filter((group) => !series.isHidden(group.key))
249
+ .map((group) => (_jsx(Scatter, { name: group.label, data: group.rows, fill: group.color, fillOpacity: 0.8, shape: group.shape, isAnimationActive: animate, onClick: (point) => point.payload && onPointPress?.(point.payload), className: onPointPress ? "cursor-pointer" : undefined }, group.key))), trend && !series.isHidden("trend") && _jsx(Line, { data: trend, dataKey: "trend", type: "linear", stroke: CHART_NEUTRAL, strokeDasharray: "6 4", strokeWidth: 1.5, dot: false, activeDot: false, legendType: "none", isAnimationActive: animate }), _jsx(Tooltip, { isAnimationActive: animate, cursor: { strokeDasharray: "3 3", stroke: "var(--ds-border-bold)" }, content: ({ active, payload }) => {
250
+ const row = (payload?.[0]?.payload ?? null);
251
+ if (!active || !row || row[name] === undefined)
252
+ return null;
253
+ return (_jsx(ChartTooltip, { active: true, label: String(row[name]), payload: [
254
+ { dataKey: "x", name: xLabel, value: fx(numeric(row, x)), color: "transparent" },
255
+ { dataKey: "y", name: yLabel, value: fy(numeric(row, y)), color: "transparent" },
256
+ ] }));
257
+ } })] }) }) }));
258
+ }
259
+ /**
260
+ * One or two profiles across five to eight dimensions on one scale: five concentric polygon gridlines in
261
+ * `ds-border`, labels outside in `ds-text-subtle`, the main profile `ds-chart-1` (2px edge, 18% fill), the
262
+ * comparison `ds-chart-neutral` (12% fill, dashed edge).
263
+ */
264
+ export function RadarChart({ title, "aria-label": ariaLabel, period, data, dimension, categories, labels, max, valueFormatter = plain, isLoading, emptyState, height = 280 }) {
265
+ const animate = useChartAnimation();
266
+ const series = useChartSeries();
267
+ useOnce(categories.length > 2, "RadarChart: one or two profiles.");
268
+ useOnce(data.length > 0 && (data.length < 5 || data.length > 8), "RadarChart: five to eight dimensions; a horizontal BarChart reads faster otherwise.");
269
+ const profiles = categories.slice(0, 2);
270
+ const label = (key) => labels?.[key] ?? key;
271
+ const styles = (key, index) => index === 0 ? { color: chartColor(0), fillOpacity: 0.18, strokeDasharray: undefined } : { color: CHART_NEUTRAL, fillOpacity: 0.12, strokeDasharray: "6 4" };
272
+ const columns = [
273
+ { key: dimension, header: title ?? ariaLabel ?? "", isRowHeader: true },
274
+ // A value as the radar plots it (a numeric string too); "—" for a gap.
275
+ ...profiles.map((key) => ({ key, header: label(key), align: "end", render: (row) => { const value = chartNumber(row[key]); return value === undefined ? "—" : valueFormatter(value); } })),
276
+ ];
277
+ return (_jsx(Shell, { title: title, "aria-label": ariaLabel, period: period, isLoading: isLoading, emptyState: emptyState, isEmpty: data.length === 0, height: height, legend: profiles.length > 1 ? (_jsx(ChartLegend, { items: profiles.map((key, index) => ({ key, label: label(key), kind: "line", color: styles(key, index).color, strokeDasharray: styles(key, index).strokeDasharray })), hidden: series.hidden, onToggle: series.toggle })) : undefined, columns: columns, rows: data, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(RechartsRadarChart, { data: data, outerRadius: "72%", accessibilityLayer: true, children: [_jsx(PolarGrid, { gridType: "polygon", stroke: "var(--ds-border)" }), _jsx(PolarAngleAxis, { dataKey: dimension, tick: _jsx(NameTick, { polar: true, fill: "var(--ds-text-subtle)", fontSize: 11 }) }), _jsx(PolarRadiusAxis, { domain: [0, max], tickCount: 6, tick: false, axisLine: false }), profiles
278
+ .filter((key) => !series.isHidden(key))
279
+ .map((key) => {
280
+ const style = styles(key, profiles.indexOf(key));
281
+ return (_jsx(Radar, { name: key, dataKey: key, stroke: style.color, strokeWidth: 2, strokeDasharray: style.strokeDasharray, fill: style.color, fillOpacity: style.fillOpacity, isAnimationActive: animate }, key));
282
+ }), _jsx(Tooltip, { isAnimationActive: animate, content: _jsx(PlottedTooltip, { valueFormatter: valueFormatter, labels: Object.fromEntries(profiles.map((key) => [key, label(key)])) }) })] }) }) }));
283
+ }
284
+ //# sourceMappingURL=more-charts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"more-charts.js","sourceRoot":"","sources":["../../src/charts/more-charts.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EACL,IAAI,EACJ,GAAG,EACH,QAAQ,IAAI,gBAAgB,EAC5B,aAAa,EACb,IAAI,EACJ,aAAa,IAAI,qBAAqB,EACtC,IAAI,EACJ,GAAG,EACH,QAAQ,IAAI,gBAAgB,EAC5B,cAAc,EACd,SAAS,EACT,eAAe,EACf,KAAK,EACL,UAAU,IAAI,kBAAkB,EAChC,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,OAAO,EACP,OAAO,EACP,KAAK,EACL,KAAK,EACL,KAAK,GACN,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACxJ,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GAEf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,e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yBACN,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;yBACtC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;wBACX,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;wBACjD,OAAO,CACL,KAAC,KAAK,IAAW,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAa,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,eAAe,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,iBAAiB,EAAE,OAAO,IAAlM,GAAG,CAAmM,CACnN,CAAC;oBACJ,CAAC,CAAC,EACJ,KAAC,OAAO,IAAC,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,KAAC,cAAc,IAAC,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAI,GAAI,IACvJ,GACD,GAChB,CACT,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { useLocale } from \"react-aria-components\";\nimport {\n Area,\n Bar,\n BarChart as RechartsBarChart,\n CartesianGrid,\n Cell,\n ComposedChart as RechartsComposedChart,\n Line,\n Pie,\n PieChart as RechartsPieChart,\n PolarAngleAxis,\n PolarGrid,\n PolarRadiusAxis,\n Radar,\n RadarChart as RechartsRadarChart,\n RadialBar,\n RadialBarChart,\n ResponsiveContainer,\n Scatter,\n Tooltip,\n XAxis,\n YAxis,\n ZAxis,\n} from \"recharts\";\n\nimport { cn } from \"../utils\";\nimport type { TableColumn } from \"../collection/table\";\nimport { chartNoDataLabel, chartOtherLabel, chartShareLabel, chartTrendLabel, chartValueLabel, gaugeTargetLabel, sparklineSummaryLabel } from \"../i18n\";\nimport {\n CHART_NEUTRAL,\n ChartFrame,\n ChartLegend,\n ChartTooltip,\n chartColor,\n useChartAnimation,\n useChartDirection,\n useChartSeries,\n type ChartValueFormatter,\n} from \"./chart-parts\";\nimport { ChartHeader, PlottedTooltip } from \"./core-charts\";\nimport { chartNumber, formattedValues, tickAxisWidth, tickOverhang, tickWrapWidth, valueAxisTicks } from \"./axis-width\";\nimport { NameTick, ValueTick, isolatedLabel } from \"./value-tick\";\nimport { EmptyState } from \"../feedback/empty-state\";\n\ntype Row = Record<string, unknown>;\nconst plain: ChartValueFormatter = (value) => String(value);\n/**\n * The size is in `style` as well, with its unit: Recharts measures a tick for wrapping in a hidden span that\n * takes only the tick's `style` (assigned as is, so a bare 11 is dropped). Without it the span kept the page's\n * body size (14–16px) and a tick that fits at 11px broke over two lines (\"€\" above \"1.500.000\").\n */\nconst AXIS_TICK = { fill: \"var(--ds-text-subtlest)\", fontSize: 11, style: { fontVariantNumeric: \"tabular-nums\", fontSize: \"11px\" } } as const;\n/** An axis name's 11px, in `style` too: Recharts measures labels for wrapping the same way. */\nconst LABEL_SIZE = { fontSize: 11, style: { fontSize: \"11px\" } } as const;\n/** Recharts places SVG text for LTR; the plot stays ltr inside (see ChartFrame). */\nconst LTR_PLOT = \"[direction:ltr]\";\n\ntype FrameProps = {\n /** What the chart shows, over it; leave it out when a card or a heading already says so. */\n title?: string;\n /** Names the chart when it has no visible `title` (a card's heading already says what it shows). */\n \"aria-label\"?: string;\n period?: string;\n isLoading?: boolean;\n /** Shown instead of the plot when there is no data: an `EmptyState size=\"small\"` or text; \"No data\" by default. */\n emptyState?: React.ReactNode;\n height?: number;\n};\n\n/** @internal The header, then ChartFrame with its loading, empty and data-table states. */\nexport function Shell<T extends object>({\n title,\n \"aria-label\": ariaLabel,\n period,\n total,\n isLoading,\n emptyState,\n isEmpty,\n height,\n legend,\n columns,\n rows,\n onRowAction,\n children,\n}: FrameProps & {\n total?: React.ReactNode;\n isEmpty: boolean;\n height: number;\n legend?: React.ReactNode;\n columns: TableColumn<T>[];\n rows: readonly T[];\n onRowAction?: (row: T) => void;\n children: React.ReactNode;\n}) {\n const { locale } = useLocale();\n const positions = React.useMemo(() => new Map(rows.map((row, position) => [row, position])), [rows]);\n return (\n <section data-slot=\"chart\" aria-label={title ?? ariaLabel} className=\"flex min-w-0 flex-col gap-ds-200\">\n {(title || period || total != null) && <ChartHeader title={title} period={period} total={total} />}\n <ChartFrame\n height={height}\n isLoading={isLoading}\n emptyState={isEmpty ? (emptyState ?? <EmptyState size=\"small\" icon=\"chart-column\" title={chartNoDataLabel(locale)} />) : null}\n legend={legend}\n dataTable={{ caption: [title ?? ariaLabel, period].filter(Boolean).join(\" · \"), columns, rows, rowKey: (row) => positions.get(row) ?? 0, onRowAction }}\n >\n {children}\n </ChartFrame>\n </section>\n );\n}\n\n/** Whole percentages that add up to exactly 100 (largest remainder). */\nexport function sharesOf(values: readonly number[]): number[] {\n const total = values.reduce((sum, value) => sum + Math.max(0, value), 0);\n if (total <= 0) return values.map(() => 0);\n const raw = values.map((value) => (Math.max(0, value) / total) * 100);\n const floors = raw.map(Math.floor);\n let left = 100 - floors.reduce((sum, value) => sum + value, 0);\n const order = raw.map((value, index) => ({ index, rest: value - Math.floor(value) })).sort((a, b) => b.rest - a.rest);\n for (const { index } of order) {\n if (left <= 0) break;\n floors[index]! += 1;\n left -= 1;\n }\n return floors;\n}\n\n/** @internal Warns once in development; shared by the chart files. */\nexport function useOnce(condition: boolean, message: string) {\n const warned = React.useRef(false);\n React.useEffect(() => {\n if (!condition || warned.current) return;\n warned.current = true;\n console.warn(message);\n }, [condition, message]);\n}\n\n/* ── DonutChart ───────────────────────────────────────────────────────────── */\n\nexport type DonutDatum = { name: string; value: number };\n\nexport type DonutChartProps = FrameProps & {\n /** Two to five parts; more are folded into \"Other\". */\n data: readonly DonutDatum[];\n valueFormatter?: ChartValueFormatter;\n /** Under the total in the center: its unit (\"orders\"). */\n centerLabel?: string;\n /** The value list beside the ring with exact percentages; on by default. */\n showList?: boolean;\n};\n\n/**\n * How a total divides into a few parts: an 18px ring with 1.2° gaps, parts in descending order from\n * 12 o'clock in `ds-chart-1`…, the total in the center with its unit, and a list beside the ring with\n * each part's value and exact share (the shares add up to 100). More than five parts fold into \"Other\".\n */\n/** The narrowest the donut's list gets before the ring shrinks: a swatch, a short name, value and share. */\nconst DONUT_LIST_MIN = 168;\n/** `gap-ds-300` between the ring and the list. */\nconst DONUT_GAP = 24;\n\nexport function DonutChart({ title, \"aria-label\": ariaLabel, period, data, valueFormatter = plain, centerLabel, showList = true, isLoading, emptyState, height = 200 }: DonutChartProps) {\n const { locale } = useLocale();\n const animate = useChartAnimation();\n // Parts of a whole: a missing or negative value has no slice.\n const counted = data.filter((part) => Number.isFinite(part.value) && part.value >= 0);\n useOnce(counted.length < data.length, \"DonutChart: parts without a finite, non-negative value are left out.\");\n useOnce(counted.length > 5, \"DonutChart: at most five parts; the rest are shown as \\\"Other\\\".\");\n const sorted = [...counted].sort((a, b) => b.value - a.value);\n const folded = sorted.length > 5;\n const parts: DonutDatum[] = folded ? [...sorted.slice(0, 4), { name: chartOtherLabel(locale), value: sorted.slice(4).reduce((sum, part) => sum + part.value, 0) }] : sorted;\n // \"Other\" is a neutral series, not a fifth hue.\n const partColor = (index: number) => (folded && index === 4 ? CHART_NEUTRAL : chartColor(index));\n const total = parts.reduce((sum, part) => sum + part.value, 0);\n const shares = sharesOf(parts.map((part) => part.value));\n const rows = parts.map((part, index) => ({ ...part, share: shares[index]! }));\n const columns: TableColumn<(typeof rows)[number]>[] = [\n { key: \"name\", header: title ?? ariaLabel ?? \"\", isRowHeader: true },\n { key: \"value\", header: chartValueLabel(locale), align: \"end\", render: (row) => valueFormatter(row.value) },\n { key: \"share\", header: chartShareLabel(locale), align: \"end\", render: (row) => `${row.share}%` },\n ];\n // On a phone the ring gives way, down to 112px, so the list keeps room for the names (whole pixels,\n // so the measuring settles).\n // A callback ref: the row mounts only once loading and empty are over, and the measuring starts then.\n const [row, setRow] = React.useState<HTMLDivElement | null>(null);\n const [rowWidth, setRowWidth] = React.useState<number>();\n React.useLayoutEffect(() => {\n if (!row || !showList || typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(([entry]) => setRowWidth(Math.floor(entry!.contentRect.width)));\n observer.observe(row);\n return () => observer.disconnect();\n }, [row, showList]);\n const ring = rowWidth === undefined ? height - 24 : Math.max(112, Math.min(height - 24, rowWidth - DONUT_LIST_MIN - DONUT_GAP));\n return (\n <Shell title={title} aria-label={ariaLabel} period={period} isLoading={isLoading} emptyState={emptyState} isEmpty={total <= 0} height={height} columns={columns} rows={rows}>\n <div ref={setRow} data-slot=\"donut\" className=\"flex h-full min-w-0 items-center gap-ds-300\">\n <div className={cn(\"relative shrink-0\", LTR_PLOT)} style={{ width: ring, height: ring }}>\n {/* Recharts' accessibility layer makes the ring a tab stop whose arrow keys move an active sector\n but show and announce nothing, so it is off: every part is in words in the list beside the\n ring and in the data table. */}\n <RechartsPieChart width={ring} height={ring} accessibilityLayer={false}>\n <Pie\n rootTabIndex={-1}\n data={parts}\n dataKey=\"value\"\n nameKey=\"name\"\n innerRadius={ring / 2 - 18}\n outerRadius={ring / 2}\n startAngle={90}\n endAngle={-270}\n paddingAngle={1.2}\n stroke=\"none\"\n isAnimationActive={animate}\n >\n {parts.map((part, index) => (\n <Cell key={index} fill={partColor(index)} />\n ))}\n </Pie>\n <Tooltip isAnimationActive={animate} content={<ChartTooltip valueFormatter={valueFormatter} labelFormatter={() => title} />} />\n </RechartsPieChart>\n {/* The total as text in the hole; the list beside the ring gives every part in words. */}\n <div data-slot=\"donut-center\" className=\"pointer-events-none absolute inset-0 grid place-content-center text-center\">\n <bdi className=\"text-[22px] leading-7 font-medium text-ds-text tabular-nums\">{valueFormatter(total)}</bdi>\n {/* Isolated in its own direction, as the total: the ring is drawn left to right in RTL too. */}\n {centerLabel && <bdi className=\"text-body-small text-ds-text-subtle\">{centerLabel}</bdi>}\n </div>\n </div>\n {showList && (\n <ul data-slot=\"donut-list\" className=\"m-0 flex min-w-0 flex-1 list-none flex-col gap-ds-100 p-0\">\n {rows.map((row, index) => (\n <li key={index} className=\"flex items-center gap-ds-100 text-body\">\n <span aria-hidden className=\"size-2.5 shrink-0 rounded-ds-xsmall\" style={{ background: partColor(index) }} />\n <bdi className=\"min-w-0 flex-1 truncate text-ds-text-subtle\">{row.name}</bdi>\n <bdi className=\"tabular-nums text-ds-text\">{valueFormatter(row.value)}</bdi>\n <bdi className=\"w-9 text-end tabular-nums text-ds-text-subtle\">{row.share}%</bdi>\n </li>\n ))}\n </ul>\n )}\n </div>\n </Shell>\n );\n}\n\n/* ── Gauge ────────────────────────────────────────────────────────────────── */\n\nexport type GaugeChartProps = Omit<FrameProps, \"emptyState\"> & {\n value: number;\n /** 0 by default. */\n min?: number;\n /** 100 by default: gauges are for bounded figures (occupancy, quota). */\n max?: number;\n /** A 2px tick on the arc, named under the value. */\n target?: number;\n valueFormatter?: ChartValueFormatter;\n};\n\nconst polar = (cx: number, cy: number, r: number, angle: number) => [cx + r * Math.cos(angle), cy - r * Math.sin(angle)] as const;\n\n/**\n * One bounded value against its range and a target: a half-circle 16px track in\n * `ds-background-neutral-pressed`, the value in `ds-chart-1` with round caps, the target as a 2px\n * `ds-text` tick, the value in the center with the target under it. Only for bounded percentages\n * (occupancy, quota), never money or open counts. A meter to screen readers.\n */\nexport function GaugeChart({ title, \"aria-label\": ariaLabel, period, value, min = 0, max = 100, target, valueFormatter = plain, isLoading, height = 160 }: GaugeChartProps) {\n const { locale } = useLocale();\n const { isRtl } = useChartDirection();\n // A missing value reads as the minimum, and an empty range draws no fill or tick.\n const clamp = (n: number) => (Number.isFinite(n) ? Math.min(max, Math.max(min, n)) : min);\n const ratioOf = (n: number) => (max > min ? (clamp(n) - min) / (max - min) : 0);\n const ratio = ratioOf(value);\n const width = height * 2 - 32;\n const cx = width / 2;\n const cy = height - 16;\n const r = Math.min(cx, cy) - 12;\n const arc = (to: number) => {\n const [x0, y0] = polar(cx, cy, r, Math.PI);\n const [x1, y1] = polar(cx, cy, r, Math.PI - to * Math.PI);\n return `M ${x0} ${y0} A ${r} ${r} 0 0 1 ${x1} ${y1}`;\n };\n const targetRatio = target === undefined || !Number.isFinite(target) || max <= min ? undefined : ratioOf(target);\n const tick = targetRatio === undefined ? undefined : [polar(cx, cy, r - 12, Math.PI - targetRatio * Math.PI), polar(cx, cy, r + 12, Math.PI - targetRatio * Math.PI)];\n // A missing value is said as missing, not formatted as NaN: a dash in the center, the sentence for screen readers.\n const hasValue = Number.isFinite(value);\n const valueText = hasValue ? valueFormatter(value) : chartNoDataLabel(locale);\n const targetText = target === undefined ? undefined : gaugeTargetLabel(locale, valueFormatter(target));\n const rows = [{ name: title, value, target }];\n const columns: TableColumn<(typeof rows)[number]>[] = [\n { key: \"name\", header: title ?? ariaLabel ?? \"\", isRowHeader: true },\n { key: \"value\", header: chartValueLabel(locale), align: \"end\", render: (row) => valueFormatter(row.value) },\n ...(target === undefined ? [] : [{ key: \"target\", header: gaugeTargetLabel(locale, \"\").trim(), align: \"end\" as const, render: () => valueFormatter(target) }]),\n ];\n return (\n <Shell title={title} aria-label={ariaLabel} period={period} isLoading={isLoading} isEmpty={false} height={height} columns={columns} rows={rows}>\n <div\n role=\"meter\"\n aria-label={title ?? ariaLabel}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={clamp(value)}\n aria-valuetext={targetText ? `${valueText}, ${targetText}` : valueText}\n data-slot=\"gauge\"\n className=\"relative mx-auto h-full\"\n style={{ width }}\n >\n {/* The fill runs from the inline start, like a progress bar: the drawing is mirrored in RTL. */}\n <svg aria-hidden width={width} height={height} className={cn(\"block overflow-visible\", isRtl && \"-scale-x-100\")}>\n <path d={arc(1)} fill=\"none\" stroke=\"var(--ds-background-neutral-pressed)\" strokeWidth={16} strokeLinecap=\"round\" />\n {ratio > 0 && <path data-slot=\"gauge-value\" d={arc(ratio)} fill=\"none\" stroke=\"var(--ds-chart-1)\" strokeWidth={16} strokeLinecap=\"round\" />}\n {tick && <line data-slot=\"gauge-target\" x1={tick[0][0]} y1={tick[0][1]} x2={tick[1][0]} y2={tick[1][1]} stroke=\"var(--ds-text)\" strokeWidth={2} />}\n </svg>\n <div className=\"pointer-events-none absolute inset-x-0 bottom-ds-100 flex flex-col items-center\">\n <bdi data-slot=\"gauge-text\" className=\"text-[22px] leading-7 font-medium text-ds-text tabular-nums\">{hasValue ? valueText : \"—\"}</bdi>\n {targetText && <bdi className=\"text-body-small text-ds-text-subtle\">{targetText}</bdi>}\n </div>\n </div>\n </Shell>\n );\n}\n\n/* ── RadialChart ──────────────────────────────────────────────────────────── */\n\nexport type RadialChartProps = FrameProps & {\n /** Two or three values on one 0–100 scale. */\n data: readonly DonutDatum[];\n valueFormatter?: ChartValueFormatter;\n};\n\n/** Two or three values that share a 0–100 scale: 12px rings in `ds-chart-1`…`3` from 12 o'clock, with a key list. */\nexport function RadialChart({ title, \"aria-label\": ariaLabel, period, data, valueFormatter = (value) => `${value}%`, isLoading, emptyState, height = 200 }: RadialChartProps) {\n const { locale } = useLocale();\n const animate = useChartAnimation();\n useOnce(data.length > 3, \"RadialChart: two or three rings; use a BarChart for more.\");\n const rings = data.slice(0, 3).map((ring, index) => ({ ...ring, fill: chartColor(index) }));\n const size = height - 8;\n const columns: TableColumn<DonutDatum>[] = [\n { key: \"name\", header: title ?? ariaLabel ?? \"\", isRowHeader: true },\n { key: \"value\", header: chartValueLabel(locale), align: \"end\", render: (row) => valueFormatter(row.value) },\n ];\n return (\n <Shell title={title} aria-label={ariaLabel} period={period} isLoading={isLoading} emptyState={emptyState} isEmpty={rings.length === 0} height={height} columns={columns} rows={rings}>\n <div data-slot=\"radial\" className=\"flex h-full min-w-0 items-center gap-ds-400\">\n <div className={cn(\"shrink-0\", LTR_PLOT)}>\n <RadialBarChart width={size} height={size} data={rings} innerRadius={size / 2 - 12 * rings.length - 6 * (rings.length - 1)} outerRadius={size / 2} barSize={12} startAngle={90} endAngle={-270} accessibilityLayer={false}>\n {/* No keyboard layer: with no tooltip its arrow keys would show nothing; the list gives every value. */}\n <PolarAngleAxis type=\"number\" domain={[0, 100]} tick={false} />\n <RadialBar dataKey=\"value\" cornerRadius={6} background={{ fill: \"var(--ds-background-neutral-pressed)\" }} isAnimationActive={animate} />\n </RadialBarChart>\n </div>\n <ul data-slot=\"radial-list\" className=\"m-0 flex min-w-0 flex-1 list-none flex-col gap-ds-100 p-0\">\n {rings.map((ring, index) => (\n <li key={index} className=\"flex items-center gap-ds-100 text-body\">\n <span aria-hidden className=\"size-2.5 shrink-0 rounded-ds-xsmall\" style={{ background: ring.fill }} />\n <bdi className=\"min-w-0 flex-1 truncate text-ds-text-subtle\">{ring.name}</bdi>\n <bdi className=\"tabular-nums text-ds-text\">{valueFormatter(ring.value)}</bdi>\n </li>\n ))}\n </ul>\n </div>\n </Shell>\n );\n}\n\n/* ── Sparkline ────────────────────────────────────────────────────────────── */\n\nexport type SparklineProps = {\n data: readonly number[];\n type?: \"line\" | \"bar\";\n /** 120 in tables; leave out to fill the width (Stat). */\n width?: number;\n /** 32 in tables, 28 in a Stat. */\n height?: number;\n /** Names the trend when the text next to it does not; a summary of the values otherwise. */\n \"aria-label\"?: string;\n valueFormatter?: ChartValueFormatter;\n};\n\n/**\n * A word-sized trend with no axes, beside the number it explains (in tables, Stats, cards): a 1.5px\n * `ds-chart-1` line over a 14% fill with the last point marked, or bars. No gridlines, labels or tooltip;\n * screen readers get a text summary (first, last, low, high) instead of a table.\n */\nexport function Sparkline({ data, type = \"line\", width, height = 32, \"aria-label\": label, valueFormatter = plain }: SparklineProps) {\n const { locale } = useLocale();\n const animate = useChartAnimation();\n const direction = useChartDirection();\n const points = data.map((value, index) => ({ index, value }));\n const summary =\n data.length > 0\n ? sparklineSummaryLabel(locale, {\n first: valueFormatter(data[0]!),\n last: valueFormatter(data[data.length - 1]!),\n min: valueFormatter(Math.min(...data)),\n max: valueFormatter(Math.max(...data)),\n })\n : chartNoDataLabel(locale);\n const plot =\n type === \"bar\" ? (\n <RechartsBarChart data={points} margin={{ top: 2, right: 0, bottom: 0, left: 0 }} barCategoryGap=\"20%\" accessibilityLayer={false}>\n <XAxis dataKey=\"index\" hide reversed={direction.reversed} />\n <YAxis hide domain={[(low: number) => Math.min(0, low), (high: number) => Math.max(0, high)]} />\n <Bar dataKey=\"value\" fill=\"var(--ds-chart-1)\" radius={1} isAnimationActive={animate} />\n </RechartsBarChart>\n ) : (\n <RechartsComposedChart data={points} margin={{ top: 3, right: 3, bottom: 3, left: 3 }} accessibilityLayer={false}>\n <XAxis dataKey=\"index\" hide reversed={direction.reversed} />\n <YAxis hide domain={[\"dataMin\", \"dataMax\"]} />\n <Area dataKey=\"value\" type=\"monotone\" stroke=\"var(--ds-chart-1)\" strokeWidth={1.5} fill=\"var(--ds-chart-1)\" fillOpacity={0.14} isAnimationActive={animate}\n // The last point marked.\n dot={(props: { cx?: number; cy?: number; index?: number }) =>\n props.index === data.length - 1 && props.cx != null && props.cy != null ? (\n <circle key=\"last\" data-slot=\"sparkline-last\" cx={props.cx} cy={props.cy} r={2.5} fill=\"var(--ds-chart-1)\" />\n ) : (\n <g key={props.index} />\n )\n }\n />\n </RechartsComposedChart>\n );\n return (\n <span role=\"img\" aria-label={label ?? summary} title={summary} data-slot=\"sparkline\" className={cn(\"inline-block align-middle\", width == null && \"w-full\", LTR_PLOT)} style={{ width, height }}>\n {width != null ? (\n React.cloneElement(plot, { width, height })\n ) : (\n <ResponsiveContainer width=\"100%\" height={height}>\n {plot}\n </ResponsiveContainer>\n )}\n </span>\n );\n}\n\n/* ── ScatterChart ─────────────────────────────────────────────────────────── */\n\nexport type ScatterChartProps<T extends Row> = FrameProps & {\n data: readonly T[];\n /** The key naming each point (a product's SKU); shown on hover and as the table's row header. */\n name: keyof T & string;\n x: keyof T & string;\n y: keyof T & string;\n /** A third measure as point size. */\n size?: keyof T & string;\n /** A second category: `ds-chart-2` and a diamond, so it differs by shape as well as hue. */\n category?: { key: keyof T & string; value: unknown; label: string; otherLabel: string };\n /** Axis names with their units (\"Daily price (€)\"). */\n xLabel: string;\n yLabel: string;\n valueFormatters?: { x?: ChartValueFormatter; y?: ChartValueFormatter };\n /** A least-squares trend line, dashed in `ds-chart-neutral`. */\n trendLine?: boolean;\n /** Opens the item: the row under the pointer. */\n onPointPress?: (row: T) => void;\n};\n\n/** Recharts' default tick count, set on the y axis so the width counts the ticks it draws. */\nconst SCATTER_TICKS = 5;\n/** The y axis's narrowest, as it was before it was sized from its ticks. */\nconst SCATTER_Y_MIN = 56;\n/** The y axis's name, turned on its side at the axis's outer edge: about 12px across (11px type), and 4px clear of the ticks. */\nconst AXIS_NAME_ROOM = 16;\n\n/** The least-squares line through the points, as its two ends; null under two points. */\nfunction fitTrend<T>(rows: readonly T[], px: (row: T) => number, py: (row: T) => number, x: string) {\n if (rows.length < 2) return null;\n const n = rows.length;\n const sx = rows.reduce((sum, row) => sum + px(row), 0);\n const sy = rows.reduce((sum, row) => sum + py(row), 0);\n const sxy = rows.reduce((sum, row) => sum + px(row) * py(row), 0);\n const sxx = rows.reduce((sum, row) => sum + px(row) ** 2, 0);\n const slope = (n * sxy - sx * sy) / (n * sxx - sx * sx || 1);\n const intercept = (sy - slope * sx) / n;\n const xs = rows.map(px);\n const [lo, hi] = [Math.min(...xs), Math.max(...xs)];\n return [\n { [x]: lo, trend: slope * lo + intercept },\n { [x]: hi, trend: slope * hi + intercept },\n ];\n}\n\n/**\n * Each item by two measures, to show a relation and outliers: 4px `ds-chart-1` points at 80%, an optional\n * dashed trend line in `ds-chart-neutral`, an optional size measure or second category (`ds-chart-2`\n * diamonds). Hover names the item; a press opens it, and so does a row of the shown data table, which is\n * the keyboard's way in. Axes carry their units.\n */\nexport function ScatterChart<T extends Row>(props: ScatterChartProps<T>) {\n const { title, \"aria-label\": ariaLabel, period, data, name, x, y, size, category, xLabel, yLabel, valueFormatters, trendLine, onPointPress, isLoading, emptyState, height = 260 } = props;\n const { locale } = useLocale();\n const animate = useChartAnimation();\n const direction = useChartDirection();\n const series = useChartSeries();\n const fx = valueFormatters?.x ?? plain;\n const fy = valueFormatters?.y ?? plain;\n const numeric = (row: T, key: string) => (typeof row[key] === \"number\" ? (row[key] as number) : NaN);\n // An item without both measures has no place on the plot, nor in its table.\n const valid = data.filter((row) => Number.isFinite(numeric(row, x)) && Number.isFinite(numeric(row, y)));\n const groups = category\n ? [\n { key: \"main\", label: category.otherLabel, rows: valid.filter((row) => row[category.key] !== category.value), color: chartColor(0), shape: \"circle\" as const },\n { key: \"category\", label: category.label, rows: valid.filter((row) => row[category.key] === category.value), color: chartColor(1), shape: \"diamond\" as const },\n ]\n : [{ key: \"main\", label: yLabel, rows: valid, color: chartColor(0), shape: \"circle\" as const }];\n // The trend follows what is shown: a group hidden from the legend leaves the fit too.\n const shown = groups.filter((group) => !series.isHidden(group.key)).flatMap((group) => group.rows);\n const trend = fitTrend(trendLine ? shown : [], (row) => numeric(row, x), (row) => numeric(row, y), x);\n // The trend is a series too: it gets a dashed key in the legend, and the legend can hide it.\n const legendItems = [\n ...(category ? groups.map((group) => ({ key: group.key, label: group.label, color: group.color })) : []),\n ...(trend ? [{ key: \"trend\", label: chartTrendLabel(locale), color: CHART_NEUTRAL, kind: \"line\" as const, strokeDasharray: \"6 4\" }] : []),\n ];\n // The y axis holds its name beside its ticks: as wide as its longest tick (Recharts' ticks for the y values\n // drawn, the trend's ends among them) plus the name's room, never under the 56px it always had. The x axis\n // needs no width: Recharts lets its ticks run the plot's width. Each y tick is given the room beside the name\n // (see axis-width's tickWrapWidth). Both axes draw the DS's ticks (ValueTick): a figure never parts from its\n // sign and currency, and an axis whose ticks pass their room shows them with compact figures, the y axis then\n // sized for those.\n const yTicks = valueAxisTicks([...shown.map((row) => numeric(row, y)), ...(trend && !series.isHidden(\"trend\") ? trend.map((end) => end.trend) : [])], SCATTER_TICKS);\n const yValues = formattedValues(yTicks, fy);\n const yAxisWidth = tickAxisWidth(yTicks.map(fy), SCATTER_Y_MIN, AXIS_NAME_ROOM, locale, yValues);\n // The top y tick's lines past one stand above its gridline: the 8px top margin takes them (axis-width's tickOverhang).\n const yOverhang = tickOverhang(yTicks.length > 0 ? fy(yTicks.at(-1)!) : undefined, tickWrapWidth(yAxisWidth, AXIS_NAME_ROOM), locale, yTicks.map(fy), yValues);\n const xTicks = valueAxisTicks(shown.map((row) => numeric(row, x)), SCATTER_TICKS);\n const columns: TableColumn<T>[] = [\n { key: name, header: title ?? ariaLabel ?? \"\", isRowHeader: true },\n { key: x, header: xLabel, align: \"end\", render: (row) => fx(numeric(row, x)) },\n { key: y, header: yLabel, align: \"end\", render: (row) => fy(numeric(row, y)) },\n ...(category ? [{ key: category.key, header: category.label, render: (row: T) => (row[category.key] === category.value ? category.label : category.otherLabel) }] : []),\n ];\n return (\n <Shell\n title={title}\n aria-label={ariaLabel}\n period={period}\n isLoading={isLoading}\n emptyState={emptyState}\n isEmpty={valid.length === 0}\n height={height}\n legend={legendItems.length > 0 ? <ChartLegend items={legendItems} hidden={series.hidden} onToggle={series.toggle} /> : undefined}\n columns={columns}\n rows={valid}\n onRowAction={onPointPress}\n >\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsComposedChart margin={{ top: 8 + yOverhang, right: 8, bottom: 16, left: 8 }} accessibilityLayer>\n <CartesianGrid stroke=\"var(--ds-border)\" />\n <XAxis type=\"number\" dataKey={x as string} name={xLabel} tickFormatter={fx} tick={<ValueTick {...AXIS_TICK} axisTicks={xTicks} />} tickLine={false} axisLine={{ stroke: \"var(--ds-border-bold)\" }} reversed={direction.reversed}\n label={{ value: xLabel, position: \"insideBottom\", offset: -12, fill: \"var(--ds-text-subtle)\", ...LABEL_SIZE, ...isolatedLabel(xLabel, \"insideBottom\") }} />\n <YAxis type=\"number\" dataKey={y as string} name={yLabel} tickFormatter={fy} tick={<ValueTick {...AXIS_TICK} width={tickWrapWidth(yAxisWidth, AXIS_NAME_ROOM)} axisTicks={yTicks} />} tickLine={false} axisLine={false} orientation={direction.valueAxis} width={yAxisWidth} tickCount={SCATTER_TICKS}\n label={{ value: yLabel, angle: -90, position: direction.isRtl ? \"insideRight\" : \"insideLeft\", fill: \"var(--ds-text-subtle)\", ...LABEL_SIZE, ...isolatedLabel(yLabel, direction.isRtl ? \"insideRight\" : \"insideLeft\") }} />\n {size && <ZAxis type=\"number\" dataKey={size as string} range={[16, 160]} />}\n {groups\n .filter((group) => !series.isHidden(group.key))\n .map((group) => (\n <Scatter\n key={group.key}\n name={group.label}\n data={group.rows}\n fill={group.color}\n fillOpacity={0.8}\n shape={group.shape}\n isAnimationActive={animate}\n onClick={(point: { payload?: T }) => point.payload && onPointPress?.(point.payload)}\n className={onPointPress ? \"cursor-pointer\" : undefined}\n />\n ))}\n {trend && !series.isHidden(\"trend\") && <Line data={trend} dataKey=\"trend\" type=\"linear\" stroke={CHART_NEUTRAL} strokeDasharray=\"6 4\" strokeWidth={1.5} dot={false} activeDot={false} legendType=\"none\" isAnimationActive={animate} />}\n <Tooltip\n isAnimationActive={animate}\n cursor={{ strokeDasharray: \"3 3\", stroke: \"var(--ds-border-bold)\" }}\n content={({ active, payload }) => {\n const row = (payload?.[0]?.payload ?? null) as T | null;\n if (!active || !row || row[name] === undefined) return null;\n return (\n <ChartTooltip\n active\n label={String(row[name])}\n payload={[\n { dataKey: \"x\", name: xLabel, value: fx(numeric(row, x)), color: \"transparent\" },\n { dataKey: \"y\", name: yLabel, value: fy(numeric(row, y)), color: \"transparent\" },\n ]}\n />\n );\n }}\n />\n </RechartsComposedChart>\n </ResponsiveContainer>\n </Shell>\n );\n}\n\n/* ── RadarChart ───────────────────────────────────────────────────────────── */\n\nexport type RadarChartProps<T extends Row> = FrameProps & {\n /** One row per dimension (five to eight). */\n data: readonly T[];\n /** The dimension's name key. */\n dimension: keyof T & string;\n /** One or two profiles: the first is the main one, a second is the comparison. */\n categories: readonly (keyof T & string)[];\n labels?: Readonly<Partial<Record<string, string>>>;\n /** The shared scale's top. */\n max: number;\n valueFormatter?: ChartValueFormatter;\n};\n\n/**\n * One or two profiles across five to eight dimensions on one scale: five concentric polygon gridlines in\n * `ds-border`, labels outside in `ds-text-subtle`, the main profile `ds-chart-1` (2px edge, 18% fill), the\n * comparison `ds-chart-neutral` (12% fill, dashed edge).\n */\nexport function RadarChart<T extends Row>({ title, \"aria-label\": ariaLabel, period, data, dimension, categories, labels, max, valueFormatter = plain, isLoading, emptyState, height = 280 }: RadarChartProps<T>) {\n const animate = useChartAnimation();\n const series = useChartSeries();\n useOnce(categories.length > 2, \"RadarChart: one or two profiles.\");\n useOnce(data.length > 0 && (data.length < 5 || data.length > 8), \"RadarChart: five to eight dimensions; a horizontal BarChart reads faster otherwise.\");\n const profiles = categories.slice(0, 2);\n const label = (key: string) => labels?.[key] ?? key;\n const styles = (key: string, index: number) =>\n index === 0 ? { color: chartColor(0), fillOpacity: 0.18, strokeDasharray: undefined } : { color: CHART_NEUTRAL, fillOpacity: 0.12, strokeDasharray: \"6 4\" };\n const columns: TableColumn<T>[] = [\n { key: dimension, header: title ?? ariaLabel ?? \"\", isRowHeader: true },\n // A value as the radar plots it (a numeric string too); \"—\" for a gap.\n ...profiles.map((key) => ({ key, header: label(key), align: \"end\" as const, render: (row: T) => { const value = chartNumber(row[key]); return value === undefined ? \"—\" : valueFormatter(value); } })),\n ];\n return (\n <Shell\n title={title}\n aria-label={ariaLabel}\n period={period}\n isLoading={isLoading}\n emptyState={emptyState}\n isEmpty={data.length === 0}\n height={height}\n legend={\n profiles.length > 1 ? (\n <ChartLegend\n items={profiles.map((key, index) => ({ key, label: label(key), kind: \"line\" as const, color: styles(key, index).color, strokeDasharray: styles(key, index).strokeDasharray }))}\n hidden={series.hidden}\n onToggle={series.toggle}\n />\n ) : undefined\n }\n columns={columns}\n rows={data}\n >\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsRadarChart data={data as Row[]} outerRadius=\"72%\" accessibilityLayer>\n <PolarGrid gridType=\"polygon\" stroke=\"var(--ds-border)\" />\n {/* Recharts' own tick, each dimension's name in its own reading direction (value-tick's NameTick). */}\n <PolarAngleAxis dataKey={dimension as string} tick={<NameTick polar fill=\"var(--ds-text-subtle)\" fontSize={11} />} />\n <PolarRadiusAxis domain={[0, max]} tickCount={6} tick={false} axisLine={false} />\n {profiles\n .filter((key) => !series.isHidden(key))\n .map((key) => {\n const style = styles(key, profiles.indexOf(key));\n return (\n <Radar key={key} name={key} dataKey={key as string} stroke={style.color} strokeWidth={2} strokeDasharray={style.strokeDasharray} fill={style.color} fillOpacity={style.fillOpacity} isAnimationActive={animate} />\n );\n })}\n <Tooltip isAnimationActive={animate} content={<PlottedTooltip valueFormatter={valueFormatter} labels={Object.fromEntries(profiles.map((key) => [key, label(key)]))} />} />\n </RechartsRadarChart>\n </ResponsiveContainer>\n </Shell>\n );\n}\n"]}
@@ -0,0 +1,138 @@
1
+ /**
2
+ * The two report charts: WaterfallChart and Heatmap. Both sit on the shared ChartFrame (loading, empty
3
+ * and the data-table alternative) through the charts' Shell, unchanged.
4
+ */
5
+ import * as React from "react";
6
+ import { type ChartValueFormatter } from "./chart-parts.js";
7
+ type FrameProps = {
8
+ /** What the chart shows ("Income and expenses"), over it; leave it out when a card or a heading already says so. */
9
+ title?: string;
10
+ /** Names the chart when it has no visible `title`. */
11
+ "aria-label"?: string;
12
+ /** The period it covers ("September 2026"). */
13
+ period?: string;
14
+ isLoading?: boolean;
15
+ /** Shown instead of the plot when there is no data: an `EmptyState size="small"` or text; "No data" by default. */
16
+ emptyState?: React.ReactNode;
17
+ };
18
+ export type WaterfallChartStep = {
19
+ name: string;
20
+ value: number;
21
+ };
22
+ export type WaterfallChartProps = FrameProps & {
23
+ /**
24
+ * The opening total ("Opening balance"), a total bar from zero; the running total starts at 0 without it. A
25
+ * start without a finite value (NaN, ±Infinity) is left out the same way, with a warning in the console: no
26
+ * start bar, the running total starts at 0, and the end total is the finite steps' sum (never NaN).
27
+ */
28
+ start?: WaterfallChartStep;
29
+ /**
30
+ * The changes, in order: a positive value raises the running total, a negative one lowers it, and a zero leaves
31
+ * it (a neutral step: a flat 1.5px line at the running total, labeled "€ 0" with no sign, and no legend key of
32
+ * its own). Steps without a finite value are left out, with a warning in the console. When nothing moves off
33
+ * zero (no step, or every figure zero, start included), the chart counts it as nothing measured and shows the
34
+ * empty state.
35
+ */
36
+ steps: readonly WaterfallChartStep[];
37
+ /** The closing total's name ("Net"): a total bar from zero to the start plus every step. */
38
+ endLabel: string;
39
+ /**
40
+ * Shared by the axis, the labels, the tooltip and the table ("€ 48.920"). Changes and a negative total are
41
+ * formatted by their size with a `+` or `−` before them, so the formatter sees non-negative values there.
42
+ */
43
+ valueFormatter?: ChartValueFormatter;
44
+ /** The plot's height in px; 240 by default. */
45
+ height?: number;
46
+ };
47
+ /** One bar of the waterfall: where it starts and ends on the value axis, and what it is. */
48
+ export type WaterfallRow = {
49
+ key: string;
50
+ name: string;
51
+ /** `zero`: a step of 0 (or one within float residue of it), neither an increase nor a decrease. */
52
+ kind: "start" | "increase" | "decrease" | "zero" | "end";
53
+ /** The step's signed change; undefined for a total. */
54
+ change?: number;
55
+ /** The running total before and after this bar (a total runs from 0). */
56
+ from: number;
57
+ to: number;
58
+ };
59
+ /**
60
+ * The waterfall's bars: the start total from zero, each step from the running total to the next one, the end
61
+ * total from zero to where the steps left it. Running totals may go below zero. A start or step without a
62
+ * finite value is left out (the chart warns), so the end total is the sum of the finite figures. Running totals
63
+ * and changes within float residue of zero (relative to the largest figure), and −0, are stored as 0, so they
64
+ * never print as "−€ 0" or count as a decrease.
65
+ */
66
+ export declare function waterfallRows(start: WaterfallChartStep | undefined, steps: readonly WaterfallChartStep[], endLabel: string): WaterfallRow[];
67
+ /**
68
+ * The ticks the value axis draws between the data's extremes: Recharts' own nice ticks for its `["auto", "auto"]`
69
+ * domain, which takes in zero (every total stands on it).
70
+ */
71
+ export declare function waterfallTicks(low: number, high: number): number[];
72
+ /**
73
+ * The value axis's width, as the other charts size theirs (axis-width's tickAxisWidth): its longest
74
+ * tick as Recharts draws it (a negative one with its minus), at its estimated width plus the 8px Recharts draws it
75
+ * in from the plot, never under 56px and never over 128px. Ticks too long for 128px are shown with compact figures
76
+ * in the chart's locale, and the axis is sized for those. It was 7px a character of the longer of the data's ends
77
+ * rounded up: over a figure's real 7px, under a "€" or an "%", and not always the tick drawn.
78
+ */
79
+ export declare function waterfallAxisWidth(low: number, high: number, format: ChartValueFormatter, locale?: string): number;
80
+ /**
81
+ * A running total built from positive and negative steps, with the start and end totals: how revenue becomes
82
+ * net after each expense. Bars float from the running total before a step to the one after it, joined by thin
83
+ * dashed connectors; totals stand on zero, and a zero line shows when a total goes negative. Totals are solid
84
+ * `ds-chart-1`, increases outlined with a 25% tint, decreases outlined and hatched, each labeled with its signed
85
+ * value. The arrow keys move between bars with the tooltip (change and running total); the data table has them all.
86
+ */
87
+ export declare function WaterfallChart({ title, "aria-label": ariaLabel, period, start, steps, endLabel, valueFormatter, isLoading, emptyState, height }: WaterfallChartProps): React.JSX.Element;
88
+ export type HeatmapCell = {
89
+ /** The cell's row and column, as named in `rows` and `columns`. */
90
+ row: string;
91
+ column: string;
92
+ /**
93
+ * `null`: the period is in the grid but has no data (hatched, "No data"), never the same as 0. A negative value
94
+ * draws as step 0, like zero (the scale counts up from nothing); its name and the table keep the signed value.
95
+ */
96
+ value: number | null;
97
+ /** The cell's name for screen readers and the tooltip's title; "row, column: value" by default. */
98
+ label?: string;
99
+ };
100
+ export type HeatmapProps = FrameProps & {
101
+ /** The rows, top to bottom ("Week 1" …, or the months). Names are unique: cells find their row by name. */
102
+ rows: readonly string[];
103
+ /**
104
+ * The columns, from the inline start (the weekdays, or the weeks). Names are unique, as for `rows`: a name given
105
+ * twice draws both, but every cell of that name lands in the first (the chart warns).
106
+ */
107
+ columns: readonly string[];
108
+ /** One entry per cell; a row and column with no entry draws no cell (a day outside the month). */
109
+ data: readonly HeatmapCell[];
110
+ /** The row headers' name ("Week"), on the data table's first header and the grid's corner; "Period" by default. */
111
+ rowHeader?: string;
112
+ /**
113
+ * Four strictly ascending lower bounds of the four intensity steps; from the positive values' quartiles by
114
+ * default. Bounds out of order still count each bound a value reaches, so the steps no longer follow the values
115
+ * (the chart warns).
116
+ */
117
+ thresholds?: readonly [number, number, number, number];
118
+ valueFormatter?: ChartValueFormatter;
119
+ onCellPress?: (cell: HeatmapCell) => void;
120
+ };
121
+ /**
122
+ * A value over a grid of two cycles, month by weekday or week by weekday: when demand peaks. Cells share
123
+ * the CalendarHeatmap's five steps (zero or less in `ds-background-neutral`, then the `ds-chart-1` ramp, steps
124
+ * that differ in lightness), a cell with no data is hatched and named "No data", and a pair with no entry draws an
125
+ * empty gap. Column labels above, row labels at the inline start, a "Less … More" scale under the grid. No text is
126
+ * drawn over the cells.
127
+ *
128
+ * Screen readers: every row of the grid has as many cells as the header row (the corner is a column header named
129
+ * by `rowHeader`, a gap an empty, unfocusable grid cell), so each cell sits under its own column's header.
130
+ *
131
+ * Keyboard and pointer: one tab stop. The arrow keys move focus a cell (mirrored in RTL, skipping gaps), Home
132
+ * and End go to the row's ends, Ctrl+Home and Ctrl+End to the grid's; Enter and Space press the focused cell.
133
+ * Hovering never moves focus or the tab stop. The tooltip shows the cell under the pointer while it is over one,
134
+ * and the focused cell otherwise; a key that moves focus hands the tooltip back to the focused cell until the
135
+ * pointer enters another cell. Escape hides it.
136
+ */
137
+ export declare function Heatmap({ title, "aria-label": ariaLabel, period, rows, columns, data, rowHeader, thresholds, valueFormatter, onCellPress, isLoading, emptyState }: HeatmapProps): React.JSX.Element;
138
+ export {};