@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,160 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Button as AriaButton, useLocale } from "react-aria-components";
5
+ import { cn } from "../utils.js";
6
+ import { useMotionSetting } from "../defaults.js";
7
+ /** The OS reduced-motion preference. */
8
+ const REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
9
+ import { Table } from "../collection/table.js";
10
+ import { EmptyState } from "../feedback/empty-state.js";
11
+ import { Skeleton } from "../feedback/skeleton.js";
12
+ import { hideDataTableLabel, showDataTableLabel } from "../i18n.js";
13
+ /* ── Colors ─────────────────────────────────────────────────────────────── */
14
+ /** The categorical chart colors, in order; never hex in a chart. */
15
+ export const CHART_COLORS = ["var(--ds-chart-1)", "var(--ds-chart-2)", "var(--ds-chart-3)", "var(--ds-chart-4)", "var(--ds-chart-5)"];
16
+ /** Comparison series (last year, the target, "other"). */
17
+ export const CHART_NEUTRAL = "var(--ds-chart-neutral)";
18
+ /** The color of the n-th series (0-based), cycling through the five. */
19
+ export const chartColor = (index) => CHART_COLORS[((index % CHART_COLORS.length) + CHART_COLORS.length) % CHART_COLORS.length];
20
+ /** Dash patterns for line series beyond the second: told apart by pattern, not hue alone. */
21
+ const LINE_DASHES = ["6 4", "2 3", "8 3 2 3"];
22
+ /**
23
+ * How the n-th series (0-based) is drawn. The chart
24
+ * colors share one lightness, so series are told apart by lightness or pattern, never hue alone: the
25
+ * first series is the brand color, a comparison series (last year, the target) is `ds-chart-neutral`,
26
+ * lines after the second are dashed, and every series carries a legend key or a direct label. Bars and
27
+ * areas take no pattern: their legend key or direct label tells them apart.
28
+ */
29
+ export function chartSeries(index, options = {}) {
30
+ const color = options.isComparison ? CHART_NEUTRAL : chartColor(index);
31
+ const strokeDasharray = options.kind === "line" && index >= 2 ? LINE_DASHES[(index - 2) % LINE_DASHES.length] : undefined;
32
+ return strokeDasharray ? { color, strokeDasharray } : { color };
33
+ }
34
+ /* ── Animation ───────────────────────────────────────────────────────────── */
35
+ const ChartAnimationContext = React.createContext(true);
36
+ /**
37
+ * Turns chart animation off for everything inside, deterministically: snapshot tests and the DS lab
38
+ * render the final frame at once. Reduced motion turns it off without this.
39
+ */
40
+ export function ChartAnimation({ isEnabled, children }) {
41
+ return _jsx(ChartAnimationContext.Provider, { value: isEnabled, children: children });
42
+ }
43
+ function subscribeReducedMotion(listener) {
44
+ if (typeof window === "undefined" || !window.matchMedia)
45
+ return () => { };
46
+ const media = window.matchMedia(REDUCED_MOTION_QUERY);
47
+ media.addEventListener("change", listener);
48
+ return () => media.removeEventListener("change", listener);
49
+ }
50
+ const reducedMotionNow = () => typeof window !== "undefined" && !!window.matchMedia?.(REDUCED_MOTION_QUERY).matches;
51
+ /** Whether a chart may animate: pass it to Recharts' `isAnimationActive`. */
52
+ export function useChartAnimation() {
53
+ const enabled = React.useContext(ChartAnimationContext);
54
+ const reduced = React.useSyncExternalStore(subscribeReducedMotion, reducedMotionNow, () => false);
55
+ const setting = useMotionSetting();
56
+ return enabled && !reduced && setting === "auto";
57
+ }
58
+ /* ── Direction ───────────────────────────────────────────────────────────── */
59
+ /**
60
+ * How a cartesian chart follows the reading direction: in RTL time runs from the right, so the category
61
+ * axis is reversed and the value axis sits on the right. Spread into Recharts' axes:
62
+ * `<XAxis reversed={direction.reversed} />`, `<YAxis orientation={direction.valueAxis} />`.
63
+ */
64
+ export function useChartDirection() {
65
+ const { direction } = useLocale();
66
+ const isRtl = direction === "rtl";
67
+ return { isRtl, reversed: isRtl, valueAxis: isRtl ? "right" : "left" };
68
+ }
69
+ /* ── Series visibility (the legend's toggle) ─────────────────────────────── */
70
+ /** Which series the legend has hidden; charts skip (or fade) hidden series. */
71
+ export function useChartSeries() {
72
+ const [hidden, setHidden] = React.useState(new Set());
73
+ const toggle = React.useCallback((key) => {
74
+ setHidden((current) => {
75
+ const next = new Set(current);
76
+ if (next.has(key))
77
+ next.delete(key);
78
+ else
79
+ next.add(key);
80
+ return next;
81
+ });
82
+ }, []);
83
+ const isHidden = React.useCallback((key) => hidden.has(key), [hidden]);
84
+ return { hidden, toggle, isHidden };
85
+ }
86
+ const CHANGE_TONE = { success: "text-ds-text-success", danger: "text-ds-text-danger", neutral: "text-ds-text-subtle" };
87
+ /**
88
+ * The tooltip every chart uses: the period as title, one row per series with its color key and value
89
+ * in tabular figures, and an optional change row. On `ds-surface-overlay`. It follows keyboard focus on
90
+ * data points as well as the pointer (Recharts' accessibility layer moves it with the arrow keys).
91
+ */
92
+ export function ChartTooltip({ active, payload, label, valueFormatter = String, labelFormatter, labels, change }) {
93
+ // Recharts draws the tooltip inside its wrapper, which the plot keeps left to right (ChartFrame): the tooltip takes the
94
+ // page's direction back, so its rows read and align as the page does.
95
+ const { direction } = useLocale();
96
+ if (!active || !payload?.length)
97
+ return null;
98
+ const changeRow = change?.(payload);
99
+ return (_jsxs("div", { "data-slot": "chart-tooltip", dir: direction, className: "flex min-w-36 flex-col gap-ds-050 rounded-ds-medium bg-ds-surface-overlay px-ds-150 py-ds-100 text-body-small text-ds-text shadow-ds-overlay", children: [_jsx("span", { className: "text-body-strong", children: labelFormatter ? labelFormatter(label) : String(label ?? "") }), payload.map((entry, index) => {
100
+ const key = String(entry.dataKey ?? entry.name ?? "");
101
+ return (
102
+ // By position too: a composed chart may draw one key twice (an area and a line on revenue).
103
+ _jsxs("span", { "data-slot": "chart-tooltip-row", className: "flex items-center gap-ds-100", children: [_jsx("span", { "aria-hidden": true, className: "size-2.5 shrink-0 rounded-ds-xsmall", style: { background: entry.color ?? entry.stroke ?? entry.fill } }), _jsx("span", { className: "text-ds-text-subtle", children: labels?.[key] ?? String(entry.name ?? key) }), _jsx("bdi", { className: "ms-auto ps-ds-200 font-medium tabular-nums", children: typeof entry.value === "number" ? valueFormatter(entry.value) : String(entry.value ?? "") })] }, `${index}-${key}`));
104
+ }), changeRow && (_jsxs("span", { "data-slot": "chart-tooltip-change", className: cn("flex items-center gap-ds-100", CHANGE_TONE[changeRow.tone]), children: [changeRow.label, _jsx("bdi", { className: "ms-auto ps-ds-200 font-medium tabular-nums", children: changeRow.value })] }))] }));
105
+ }
106
+ /** Series keys with their labels in `ds-text-subtle`; pressing one hides or shows it (hidden at 45%). */
107
+ export function ChartLegend({ items, hidden, onToggle }) {
108
+ return (_jsx("div", { "data-slot": "chart-legend", className: "flex flex-wrap items-center gap-x-ds-200 gap-y-ds-050 text-body-small text-ds-text-subtle", children: items.map((item) => {
109
+ const isHidden = hidden?.has(item.key) ?? false;
110
+ const key = item.kind === "line" ? (_jsx("svg", { "aria-hidden": true, "data-slot": "chart-legend-key", "data-kind": "line", width: "16", height: "2", className: "shrink-0 overflow-visible", children: _jsx("line", { x1: "0", y1: "1", x2: "16", y2: "1", stroke: item.color, strokeWidth: "2", strokeDasharray: item.strokeDasharray }) })) : (_jsx("span", { "aria-hidden": true, "data-slot": "chart-legend-key", "data-kind": item.kind ?? "area", className: "size-2.5 shrink-0 rounded-ds-xsmall", style: { background: item.color } }));
111
+ return onToggle ? (_jsxs(AriaButton, { "aria-pressed": !isHidden, "data-slot": "chart-legend-item", onPress: () => onToggle(item.key), className: cn("inline-flex cursor-pointer items-center gap-ds-075 rounded-ds-small outline-hidden data-[hovered]:text-ds-text", "data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused", isHidden && "opacity-45"), children: [key, item.label] }, item.key)) : (_jsxs("span", { "data-slot": "chart-legend-item", className: "inline-flex items-center gap-ds-075", children: [key, item.label] }, item.key));
112
+ }) }));
113
+ }
114
+ /**
115
+ * The frame every chart sits in. While loading, a Skeleton at the chart's real size; with nothing to
116
+ * draw, a compact EmptyState in the same space; otherwise the plot. Under every chart a "Show the data
117
+ * as a table" button shows the same data as a compact Table, which screen readers get by default.
118
+ */
119
+ export function ChartFrame({ height, isLoading, emptyState, dataTable, legend, legendPlacement = "top", children }) {
120
+ const { locale } = useLocale();
121
+ const [showTable, setShowTable] = React.useState(false);
122
+ const tableId = React.useId();
123
+ const isEmpty = emptyState !== undefined && emptyState !== null && emptyState !== false;
124
+ const hasData = !isLoading && !isEmpty;
125
+ const { rows, rowKey = (row) => row.id, onRowAction } = dataTable;
126
+ const rowAction = onRowAction && ((key) => {
127
+ const row = rows.find((candidate) => String(rowKey(candidate)) === String(key));
128
+ if (row)
129
+ onRowAction(row);
130
+ });
131
+ const plot = isLoading ? (_jsxs("div", { "data-slot": "chart-loading", "aria-busy": "true", style: { height }, className: "flex flex-col gap-ds-150", children: [_jsx(Skeleton, { width: "40%", height: 16 }), _jsx(Skeleton, { height: Math.max(0, height - 16 - 12), radius: "medium" })] })) : isEmpty ? (
132
+ // At least the chart's height; a very short chart grows rather than clipping the message.
133
+ _jsx("div", { "data-slot": "chart-empty", style: { minHeight: height }, className: "grid place-items-center", children: emptyState })) : (_jsx("div", { role: "group", "aria-label": dataTable.caption, "data-slot": "chart-plot", style: { height }, className: cn("min-w-0",
134
+ // Recharts places SVG text for LTR; an inherited rtl flips its anchors (labels over bars, clipped
135
+ // reference labels). The plot stays ltr inside; useChartDirection mirrors the axes themselves.
136
+ "[&_.recharts-wrapper]:[direction:ltr]",
137
+ // Recharts' keyboard layer: its focusable surface takes the DS focus border, drawn inside the plot (an inset
138
+ // outline, as an inset ring would be on an element; an SVG has none). The style is named: Tailwind v4's
139
+ // outline-hidden sets the outline style to none, and a width alone keeps it.
140
+ "[&_.recharts-surface]:outline-hidden [&_.recharts-surface:focus-visible]:rounded-ds-small [&_.recharts-surface:focus-visible]:outline-2", "[&_.recharts-surface:focus-visible]:outline-solid", "[&_.recharts-surface:focus-visible]:-outline-offset-2 [&_.recharts-surface:focus-visible]:outline-ds-border-focused"), children: children }));
141
+ const legendRow = legend && (hasData ? legend : _jsx("div", { "aria-hidden": true, inert: true, className: "invisible", children: legend }));
142
+ return (_jsxs("div", { "data-slot": "chart-frame", className: "flex min-w-0 flex-col gap-ds-150", children: [legendPlacement === "top" && legendRow, plot, legendPlacement === "bottom" && legendRow, hasData ? (_jsxs(_Fragment, { children: [_jsx(AriaButton, { "aria-expanded": showTable, "aria-controls": tableId, "data-slot": "chart-table-toggle", onPress: () => setShowTable((value) => !value), className: "w-max cursor-pointer rounded-ds-small text-body-small font-[500] text-ds-link outline-hidden data-[hovered]:underline data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused", children: showTable ? hideDataTableLabel(locale) : showDataTableLabel(locale) }), _jsx("div", { id: tableId, "data-slot": "chart-data-table", className: showTable ? undefined : "relative overflow-hidden", children: showTable ? (_jsx(Table, { "aria-label": dataTable.caption, density: "compact", columns: dataTable.columns, rows: dataTable.rows, rowKey: dataTable.rowKey, onRowAction: rowAction })) : (
143
+ // Collapsed: the same data as a plain table, for screen readers only. Nothing in it takes focus,
144
+ // so Tab never lands in something unseen.
145
+ _jsx(PlainTable, { caption: dataTable.caption, columns: dataTable.columns, rows: dataTable.rows, rowKey: dataTable.rowKey })) })] })) : (_jsx("div", { "aria-hidden": true, className: "h-4", "data-slot": "chart-table-toggle-space" }))] }));
146
+ }
147
+ /** The data table as plain, non-interactive markup, visually hidden: what screen readers get by default. */
148
+ function PlainTable({ caption, columns, rows, rowKey = (row) => row.id }) {
149
+ // The same row-header rule as Table: the marked column, or the first.
150
+ const rowHeader = Math.max(0, columns.findIndex((column) => column.isRowHeader));
151
+ return (_jsxs("table", { "data-slot": "chart-data-table-plain", className: "sr-only", children: [_jsx("caption", { children: caption }), _jsx("thead", { children: _jsx("tr", { children: columns.map((column) => (_jsx("th", { scope: "col", children: column.header }, column.key))) }) }), _jsx("tbody", { children: rows.map((row) => (_jsx("tr", { children: columns.map((column, index) => {
152
+ const raw = row[column.key];
153
+ const rendered = column.render?.(row);
154
+ // Text only: a rendered link or button here would be a focus stop no one can see.
155
+ const value = typeof rendered === "string" || typeof rendered === "number" ? rendered : raw;
156
+ const isHeader = index === rowHeader;
157
+ return isHeader ? (_jsx("th", { scope: "row", children: value }, column.key)) : (_jsx("td", { children: value }, column.key));
158
+ }) }, rowKey(row)))) })] }));
159
+ }
160
+ //# sourceMappingURL=chart-parts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart-parts.js","sourceRoot":"","sources":["../../src/charts/chart-parts.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAExE,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,wCAAwC;AACxC,MAAM,oBAAoB,GAAG,kCAAkC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAoB,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEjE,+EAA+E;AAE/E,oEAAoE;AACpE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,CAAU,CAAC;AAC/I,0DAA0D;AAC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vB,aAAqB,KAAK,EAAC,KAAK,YAC7B,MAAM,CAAC,MAAM,IADP,MAAM,CAAC,GAAG,CAEd,CACN,CAAC,GACC,GACC,EACR,0BACG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACjB,uBACG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;wBAC7B,MAAM,GAAG,GAAI,GAAuC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;wBACjE,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;wBACtC,kFAAkF;wBAClF,MAAM,KAAK,GAAG,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;wBAC5F,MAAM,QAAQ,GAAG,KAAK,KAAK,SAAS,CAAC;wBACrC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,aAAqB,KAAK,EAAC,KAAK,YAC7B,KAAK,IADC,MAAM,CAAC,GAAG,CAEd,CACN,CAAC,CAAC,CAAC,CACF,uBAAsB,KAAK,IAAlB,MAAM,CAAC,GAAG,CAAc,CAClC,CAAC;oBACJ,CAAC,CAAC,IAdK,MAAM,CAAC,GAAG,CAAC,CAef,CACN,CAAC,GACI,IACF,CACT,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Button as AriaButton, useLocale } from \"react-aria-components\";\n\nimport { cn } from \"../utils\";\nimport { useMotionSetting } from \"../defaults\";\n/** The OS reduced-motion preference. */\nconst REDUCED_MOTION_QUERY = \"(prefers-reduced-motion: reduce)\";\nimport { Table, type TableColumn } from \"../collection/table\";\nimport { EmptyState } from \"../feedback/empty-state\";\nimport { Skeleton } from \"../feedback/skeleton\";\nimport { hideDataTableLabel, showDataTableLabel } from \"../i18n\";\n\n/* ── Colors ─────────────────────────────────────────────────────────────── */\n\n/** The categorical chart colors, in order; never hex in a chart. */\nexport const CHART_COLORS = [\"var(--ds-chart-1)\", \"var(--ds-chart-2)\", \"var(--ds-chart-3)\", \"var(--ds-chart-4)\", \"var(--ds-chart-5)\"] as const;\n/** Comparison series (last year, the target, \"other\"). */\nexport const CHART_NEUTRAL = \"var(--ds-chart-neutral)\";\n/** The color of the n-th series (0-based), cycling through the five. */\nexport const chartColor = (index: number) => CHART_COLORS[((index % CHART_COLORS.length) + CHART_COLORS.length) % CHART_COLORS.length]!;\n\n/** Dash patterns for line series beyond the second: told apart by pattern, not hue alone. */\nconst LINE_DASHES = [\"6 4\", \"2 3\", \"8 3 2 3\"] as const;\n\nexport type ChartSeriesStyle = { color: string; strokeDasharray?: string };\n\n/**\n * How the n-th series (0-based) is drawn. The chart\n * colors share one lightness, so series are told apart by lightness or pattern, never hue alone: the\n * first series is the brand color, a comparison series (last year, the target) is `ds-chart-neutral`,\n * lines after the second are dashed, and every series carries a legend key or a direct label. Bars and\n * areas take no pattern: their legend key or direct label tells them apart.\n */\nexport function chartSeries(index: number, options: { kind?: \"line\" | \"area\" | \"bar\"; isComparison?: boolean } = {}): ChartSeriesStyle {\n const color = options.isComparison ? CHART_NEUTRAL : chartColor(index);\n const strokeDasharray = options.kind === \"line\" && index >= 2 ? LINE_DASHES[(index - 2) % LINE_DASHES.length] : undefined;\n return strokeDasharray ? { color, strokeDasharray } : { color };\n}\n\n/* ── Animation ───────────────────────────────────────────────────────────── */\n\nconst ChartAnimationContext = React.createContext(true);\n\n/**\n * Turns chart animation off for everything inside, deterministically: snapshot tests and the DS lab\n * render the final frame at once. Reduced motion turns it off without this.\n */\nexport function ChartAnimation({ isEnabled, children }: { isEnabled: boolean; children: React.ReactNode }) {\n return <ChartAnimationContext.Provider value={isEnabled}>{children}</ChartAnimationContext.Provider>;\n}\n\nfunction subscribeReducedMotion(listener: () => void) {\n if (typeof window === \"undefined\" || !window.matchMedia) return () => {};\n const media = window.matchMedia(REDUCED_MOTION_QUERY);\n media.addEventListener(\"change\", listener);\n return () => media.removeEventListener(\"change\", listener);\n}\nconst reducedMotionNow = () => typeof window !== \"undefined\" && !!window.matchMedia?.(REDUCED_MOTION_QUERY).matches;\n\n/** Whether a chart may animate: pass it to Recharts' `isAnimationActive`. */\nexport function useChartAnimation(): boolean {\n const enabled = React.useContext(ChartAnimationContext);\n const reduced = React.useSyncExternalStore(subscribeReducedMotion, reducedMotionNow, () => false);\n const setting = useMotionSetting();\n return enabled && !reduced && setting === \"auto\";\n}\n\n/* ── Direction ───────────────────────────────────────────────────────────── */\n\n/**\n * How a cartesian chart follows the reading direction: in RTL time runs from the right, so the category\n * axis is reversed and the value axis sits on the right. Spread into Recharts' axes:\n * `<XAxis reversed={direction.reversed} />`, `<YAxis orientation={direction.valueAxis} />`.\n */\nexport function useChartDirection(): { isRtl: boolean; reversed: boolean; valueAxis: \"left\" | \"right\" } {\n const { direction } = useLocale();\n const isRtl = direction === \"rtl\";\n return { isRtl, reversed: isRtl, valueAxis: isRtl ? \"right\" : \"left\" };\n}\n\n/* ── Series visibility (the legend's toggle) ─────────────────────────────── */\n\n/** Which series the legend has hidden; charts skip (or fade) hidden series. */\nexport function useChartSeries() {\n const [hidden, setHidden] = React.useState<ReadonlySet<string>>(new Set());\n const toggle = React.useCallback((key: string) => {\n setHidden((current) => {\n const next = new Set(current);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n return next;\n });\n }, []);\n const isHidden = React.useCallback((key: string) => hidden.has(key), [hidden]);\n return { hidden, toggle, isHidden };\n}\n\n/* ── Tooltip ─────────────────────────────────────────────────────────────── */\n\nexport type ChartValueFormatter = (value: number) => string;\n\n/** One series in the tooltip, as Recharts hands it over. */\nexport type ChartTooltipEntry = { dataKey?: string | number; name?: string | number; value?: unknown; color?: string; stroke?: string; fill?: string };\n\nexport type ChartTooltipProps = {\n /** Set by Recharts when used as `<Tooltip content={<ChartTooltip … />} />`. */\n active?: boolean;\n payload?: readonly ChartTooltipEntry[];\n label?: unknown;\n /** Shared with the chart: \"€ 55,0k\". */\n valueFormatter?: ChartValueFormatter;\n /** The period title (\"August 2026\"); the category label by default. */\n labelFormatter?: (label: unknown) => React.ReactNode;\n /** Series names by data key (\"2026\", \"Website\"). */\n labels?: Readonly<Record<string, string>>;\n /** An optional change row, colored by meaning (\"Change +11.8%\"). */\n change?: (payload: readonly ChartTooltipEntry[]) => { label: string; value: string; tone: \"success\" | \"danger\" | \"neutral\" } | null;\n};\n\nconst CHANGE_TONE = { success: \"text-ds-text-success\", danger: \"text-ds-text-danger\", neutral: \"text-ds-text-subtle\" } as const;\n\n/**\n * The tooltip every chart uses: the period as title, one row per series with its color key and value\n * in tabular figures, and an optional change row. On `ds-surface-overlay`. It follows keyboard focus on\n * data points as well as the pointer (Recharts' accessibility layer moves it with the arrow keys).\n */\nexport function ChartTooltip({ active, payload, label, valueFormatter = String, labelFormatter, labels, change }: ChartTooltipProps) {\n // Recharts draws the tooltip inside its wrapper, which the plot keeps left to right (ChartFrame): the tooltip takes the\n // page's direction back, so its rows read and align as the page does.\n const { direction } = useLocale();\n if (!active || !payload?.length) return null;\n const changeRow = change?.(payload);\n return (\n <div data-slot=\"chart-tooltip\" dir={direction} className=\"flex min-w-36 flex-col gap-ds-050 rounded-ds-medium bg-ds-surface-overlay px-ds-150 py-ds-100 text-body-small text-ds-text shadow-ds-overlay\">\n <span className=\"text-body-strong\">{labelFormatter ? labelFormatter(label) : String(label ?? \"\")}</span>\n {payload.map((entry, index) => {\n const key = String(entry.dataKey ?? entry.name ?? \"\");\n return (\n // By position too: a composed chart may draw one key twice (an area and a line on revenue).\n <span key={`${index}-${key}`} data-slot=\"chart-tooltip-row\" className=\"flex items-center gap-ds-100\">\n <span aria-hidden className=\"size-2.5 shrink-0 rounded-ds-xsmall\" style={{ background: entry.color ?? entry.stroke ?? entry.fill }} />\n <span className=\"text-ds-text-subtle\">{labels?.[key] ?? String(entry.name ?? key)}</span>\n <bdi className=\"ms-auto ps-ds-200 font-medium tabular-nums\">{typeof entry.value === \"number\" ? valueFormatter(entry.value) : String(entry.value ?? \"\")}</bdi>\n </span>\n );\n })}\n {changeRow && (\n <span data-slot=\"chart-tooltip-change\" className={cn(\"flex items-center gap-ds-100\", CHANGE_TONE[changeRow.tone])}>\n {changeRow.label}\n <bdi className=\"ms-auto ps-ds-200 font-medium tabular-nums\">{changeRow.value}</bdi>\n </span>\n )}\n </div>\n );\n}\n\n/* ── Legend ──────────────────────────────────────────────────────────────── */\n\nexport type ChartLegendItem = {\n key: string;\n label: string;\n color: string;\n /** Lines get a 2px line key (dashed like the line); areas and bars a 10px square. */\n kind?: \"line\" | \"area\" | \"bar\";\n /** The line's dash pattern, from `chartSeries()`. */\n strokeDasharray?: string;\n};\n\nexport type ChartLegendProps = {\n items: readonly ChartLegendItem[];\n /** From `useChartSeries()`: pressing a key hides or shows its series. Leave out for a static legend. */\n hidden?: ReadonlySet<string>;\n onToggle?: (key: string) => void;\n};\n\n/** Series keys with their labels in `ds-text-subtle`; pressing one hides or shows it (hidden at 45%). */\nexport function ChartLegend({ items, hidden, onToggle }: ChartLegendProps) {\n return (\n <div data-slot=\"chart-legend\" className=\"flex flex-wrap items-center gap-x-ds-200 gap-y-ds-050 text-body-small text-ds-text-subtle\">\n {items.map((item) => {\n const isHidden = hidden?.has(item.key) ?? false;\n const key =\n item.kind === \"line\" ? (\n <svg aria-hidden data-slot=\"chart-legend-key\" data-kind=\"line\" width=\"16\" height=\"2\" className=\"shrink-0 overflow-visible\">\n <line x1=\"0\" y1=\"1\" x2=\"16\" y2=\"1\" stroke={item.color} strokeWidth=\"2\" strokeDasharray={item.strokeDasharray} />\n </svg>\n ) : (\n <span aria-hidden data-slot=\"chart-legend-key\" data-kind={item.kind ?? \"area\"} className=\"size-2.5 shrink-0 rounded-ds-xsmall\" style={{ background: item.color }} />\n );\n return onToggle ? (\n <AriaButton\n key={item.key}\n aria-pressed={!isHidden}\n data-slot=\"chart-legend-item\"\n onPress={() => onToggle(item.key)}\n className={cn(\n \"inline-flex cursor-pointer items-center gap-ds-075 rounded-ds-small outline-hidden data-[hovered]:text-ds-text\",\n \"data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\",\n isHidden && \"opacity-45\",\n )}\n >\n {key}\n {item.label}\n </AriaButton>\n ) : (\n <span key={item.key} data-slot=\"chart-legend-item\" className=\"inline-flex items-center gap-ds-075\">\n {key}\n {item.label}\n </span>\n );\n })}\n </div>\n );\n}\n\n/* ── Frame: loading, empty, the chart, and its data table ────────────────── */\n\nexport type ChartDataTable<T> = {\n /** Names the table (\"Monthly revenue\"). */\n caption: string;\n columns: readonly TableColumn<T>[];\n rows: readonly T[];\n rowKey?: (row: T) => string | number;\n /** Opens a row's item from the shown table: the keyboard's way to what a press on a data point opens. */\n onRowAction?: (row: T) => void;\n};\n\nexport type ChartFrameProps<T> = {\n /** The chart's height in px: loading, empty and the plot all keep it. */\n height: number;\n isLoading?: boolean;\n /** Shown instead of the plot when there is nothing to draw (a compact EmptyState); `null` while there is data. */\n emptyState?: React.ReactNode;\n /**\n * The same data as a compact Table: always there for screen readers, shown on request. Cells are\n * values: a `render` that returns text (a formatted figure) is used; anything else falls back to the\n * raw value in the hidden table.\n */\n dataTable: ChartDataTable<T>;\n /** The Legend: above the plot, or below it (LineChart). */\n legend?: React.ReactNode;\n legendPlacement?: \"top\" | \"bottom\";\n /**\n * The Recharts chart (inside a ResponsiveContainer), named by the table's caption. Its keyboard layer\n * (arrow keys move between data points, the tooltip follows) stays on; the table carries the data in full.\n */\n children: React.ReactNode;\n};\n\n/**\n * The frame every chart sits in. While loading, a Skeleton at the chart's real size; with nothing to\n * draw, a compact EmptyState in the same space; otherwise the plot. Under every chart a \"Show the data\n * as a table\" button shows the same data as a compact Table, which screen readers get by default.\n */\nexport function ChartFrame<T extends object>({ height, isLoading, emptyState, dataTable, legend, legendPlacement = \"top\", children }: ChartFrameProps<T>) {\n const { locale } = useLocale();\n const [showTable, setShowTable] = React.useState(false);\n const tableId = React.useId();\n const isEmpty = emptyState !== undefined && emptyState !== null && emptyState !== false;\n const hasData = !isLoading && !isEmpty;\n const { rows, rowKey = (row: T) => (row as { id: string | number }).id, onRowAction } = dataTable;\n const rowAction = onRowAction && ((key: React.Key) => {\n const row = rows.find((candidate) => String(rowKey(candidate)) === String(key));\n if (row) onRowAction(row);\n });\n const plot = isLoading ? (\n <div data-slot=\"chart-loading\" aria-busy=\"true\" style={{ height }} className=\"flex flex-col gap-ds-150\">\n <Skeleton width=\"40%\" height={16} />\n <Skeleton height={Math.max(0, height - 16 - 12)} radius=\"medium\" />\n </div>\n ) : isEmpty ? (\n // At least the chart's height; a very short chart grows rather than clipping the message.\n <div data-slot=\"chart-empty\" style={{ minHeight: height }} className=\"grid place-items-center\">\n {emptyState}\n </div>\n ) : (\n <div\n role=\"group\"\n aria-label={dataTable.caption}\n data-slot=\"chart-plot\"\n style={{ height }}\n className={cn(\n \"min-w-0\",\n // Recharts places SVG text for LTR; an inherited rtl flips its anchors (labels over bars, clipped\n // reference labels). The plot stays ltr inside; useChartDirection mirrors the axes themselves.\n \"[&_.recharts-wrapper]:[direction:ltr]\",\n // Recharts' keyboard layer: its focusable surface takes the DS focus border, drawn inside the plot (an inset\n // outline, as an inset ring would be on an element; an SVG has none). The style is named: Tailwind v4's\n // outline-hidden sets the outline style to none, and a width alone keeps it.\n \"[&_.recharts-surface]:outline-hidden [&_.recharts-surface:focus-visible]:rounded-ds-small [&_.recharts-surface:focus-visible]:outline-2\",\n \"[&_.recharts-surface:focus-visible]:outline-solid\",\n \"[&_.recharts-surface:focus-visible]:-outline-offset-2 [&_.recharts-surface:focus-visible]:outline-ds-border-focused\",\n )}\n >\n {children}\n </div>\n );\n const legendRow = legend && (hasData ? legend : <div aria-hidden inert className=\"invisible\">{legend}</div>);\n return (\n <div data-slot=\"chart-frame\" className=\"flex min-w-0 flex-col gap-ds-150\">\n {/* Loading and empty keep the legend's and the toggle's rows, so the frame does not jump when data arrives. */}\n {legendPlacement === \"top\" && legendRow}\n {plot}\n {legendPlacement === \"bottom\" && legendRow}\n {hasData ? (\n <>\n <AriaButton\n aria-expanded={showTable}\n aria-controls={tableId}\n data-slot=\"chart-table-toggle\"\n onPress={() => setShowTable((value) => !value)}\n className=\"w-max cursor-pointer rounded-ds-small text-body-small font-[500] text-ds-link outline-hidden data-[hovered]:underline data-[focus-visible]:inset-ring-2 data-[focus-visible]:inset-ring-ds-border-focused\"\n >\n {showTable ? hideDataTableLabel(locale) : showDataTableLabel(locale)}\n </AriaButton>\n {/* Collapsed, the box clips the visually hidden table: a table never shrinks below its content, so a\n long caption would otherwise stick out past the page edge. */}\n <div id={tableId} data-slot=\"chart-data-table\" className={showTable ? undefined : \"relative overflow-hidden\"}>\n {showTable ? (\n <Table\n aria-label={dataTable.caption}\n density=\"compact\"\n columns={dataTable.columns}\n rows={dataTable.rows}\n rowKey={dataTable.rowKey}\n onRowAction={rowAction}\n />\n ) : (\n // Collapsed: the same data as a plain table, for screen readers only. Nothing in it takes focus,\n // so Tab never lands in something unseen.\n <PlainTable caption={dataTable.caption} columns={dataTable.columns} rows={dataTable.rows} rowKey={dataTable.rowKey} />\n )}\n </div>\n </>\n ) : (\n <div aria-hidden className=\"h-4\" data-slot=\"chart-table-toggle-space\" />\n )}\n </div>\n );\n}\n\n/** The data table as plain, non-interactive markup, visually hidden: what screen readers get by default. */\nfunction PlainTable<T extends object>({ caption, columns, rows, rowKey = (row) => (row as { id: string | number }).id }: ChartDataTable<T>) {\n // The same row-header rule as Table: the marked column, or the first.\n const rowHeader = Math.max(0, columns.findIndex((column) => column.isRowHeader));\n return (\n <table data-slot=\"chart-data-table-plain\" className=\"sr-only\">\n <caption>{caption}</caption>\n <thead>\n <tr>\n {columns.map((column) => (\n <th key={column.key} scope=\"col\">\n {column.header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row) => (\n <tr key={rowKey(row)}>\n {columns.map((column, index) => {\n const raw = (row as Record<string, React.ReactNode>)[column.key];\n const rendered = column.render?.(row);\n // Text only: a rendered link or button here would be a focus stop no one can see.\n const value = typeof rendered === \"string\" || typeof rendered === \"number\" ? rendered : raw;\n const isHeader = index === rowHeader;\n return isHeader ? (\n <th key={column.key} scope=\"row\">\n {value}\n </th>\n ) : (\n <td key={column.key}>{value}</td>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n"]}
@@ -0,0 +1,157 @@
1
+ import * as React from "react";
2
+ import { type LabelProps } from "recharts";
3
+ import { type ChartTooltipProps, type ChartValueFormatter } from "./chart-parts.js";
4
+ import { type FormattedValues } from "./axis-width.js";
5
+ type Row = Record<string, unknown>;
6
+ export type ChartBaseProps<T extends Row> = {
7
+ /** What the chart shows ("Revenue"), over it; leave it out when a card or a heading already says so. */
8
+ title?: string;
9
+ /** Names the chart when it has no visible `title` (a card's heading already says what it shows). */
10
+ "aria-label"?: string;
11
+ /** The period it covers ("June–September 2026"). */
12
+ period?: string;
13
+ /** The headline figure, in `metric-medium` ("€ 184,2k"). */
14
+ total?: React.ReactNode;
15
+ data: readonly T[];
16
+ /** The x key: the period or category of each row. */
17
+ index: keyof T & string;
18
+ /** The series keys, in order; the first is the product's own figure (`ds-chart-1`). */
19
+ categories: readonly (keyof T & string)[];
20
+ /** Series names by key ("web" → "Website"); the key by default. */
21
+ labels?: Readonly<Partial<Record<string, string>>>;
22
+ /** Shared by axis, tooltip and table (Intl): "€ 48.920". */
23
+ valueFormatter?: ChartValueFormatter;
24
+ /** The index label in the tooltip and the table ("August 2026"). */
25
+ indexFormatter?: (value: unknown) => string;
26
+ /** The index column's header in the data table; "Period" for time charts, "Category" for BarChart. */
27
+ indexLabel?: string;
28
+ /** The plot's height in px; 240 by default. */
29
+ height?: number;
30
+ isLoading?: boolean;
31
+ /** Shown instead of the plot when `data` is empty; "No data for this period" by default. */
32
+ /** Shown instead of the plot when there is no data: an `EmptyState size="small"` or text; "No data" by default. */
33
+ emptyState?: React.ReactNode;
34
+ /**
35
+ * `false` for whole counts (orders, new customers): the value axis steps by whole numbers, so a small count
36
+ * reads 0 / 1 / 2 / 3, never 0.7 / 1.4 / 2.1. Fractional steps by default. Percent bars keep their
37
+ * 0–100% steps.
38
+ */
39
+ allowDecimals?: boolean;
40
+ };
41
+ /**
42
+ * @internal The tooltip over a chart's own rows (Recharts hands it the raw values): a value shown as the chart
43
+ * plots it, a numeric string ("1450000") formatted as the number it is drawn at, as the data table shows it.
44
+ * Shared with RadarChart.
45
+ */
46
+ export declare function PlottedTooltip({ payload, ...props }: ChartTooltipProps): React.JSX.Element;
47
+ /** Title, period and the headline figure over the chart. */
48
+ /** @internal Shared with the other chart modules; not exported from the package. */
49
+ export declare function ChartHeader({ title, period, total }: Pick<ChartBaseProps<Row>, "title" | "period" | "total">): React.JSX.Element;
50
+ export type AreaChartProps<T extends Row> = ChartBaseProps<T> & {
51
+ /** The previous period's key: a dashed `ds-chart-neutral` line without fill. */
52
+ comparison?: keyof T & string;
53
+ /** The value axis' width in px; by default wide enough for its longest tick (48–128px). */
54
+ yAxisWidth?: number;
55
+ /** A pointer press on the chart: the row under it (keyboard users read values in the tooltip and the table). */
56
+ onValueChange?: (row: T | null) => void;
57
+ };
58
+ /**
59
+ * How one quantity changes over time, optionally against the previous period: a 2px `ds-chart-1` line
60
+ * over a 16% fill, the comparison dashed in `ds-chart-neutral` without fill. The value axis starts at
61
+ * zero; a vertical guide and a ringed point follow the pointer and the arrow keys.
62
+ */
63
+ export declare function AreaChart<T extends Row>(props: AreaChartProps<T>): React.JSX.Element;
64
+ export type ChartReferenceLine = {
65
+ value: number;
66
+ label: string;
67
+ };
68
+ export type LineChartProps<T extends Row> = ChartBaseProps<T> & {
69
+ /** A target or an average: dashed `ds-border-bold` with a label at its end. */
70
+ referenceLines?: readonly ChartReferenceLine[];
71
+ /** Join across missing values; gaps stay gaps by default. */
72
+ connectNulls?: boolean;
73
+ };
74
+ /**
75
+ * A few series over time where the shape matters: 2px lines with round joins (dashed after the second,
76
+ * so they part by pattern as well as hue), optional reference lines, and the legend below with line keys.
77
+ * Up to five lines; more needs filtering, not more colors.
78
+ */
79
+ export declare function LineChart<T extends Row>(props: LineChartProps<T>): React.JSX.Element;
80
+ /** @internal A bar-end label's estimated width in px, as {@link barLabelRoom} counts it (no gap). */
81
+ export declare function barLabelWidth(text: string): number;
82
+ /** @internal The room for the widest of these bar-end totals, in px; 0 when there are none. */
83
+ export declare function barLabelRoom(texts: readonly string[]): number;
84
+ /**
85
+ * @internal A bar-end label's lines for the room it has: whole when it fits, otherwise broken between its units
86
+ * (axis-width's textLines and textUnits, the value ticks' rule too: only between two words with letters or after a
87
+ * separator ending a word, "12 orders, | 3 canceled", never beside a figure, so a figure keeps its sign, currency,
88
+ * unit and magnitude words), each line as long as fits, by the same estimate as the room. When a unit is wider
89
+ * than the room the label stays one line, which ends at the room's edge.
90
+ */
91
+ export declare function barLabelLines(text: string, room: number): string[];
92
+ /**
93
+ * @internal The total at a horizontal bar's end, in place of Recharts' own label: Recharts sized a
94
+ * label that runs left (every bar in RTL, a negative one in LTR) by the room on its right, so in RTL a total
95
+ * wider than its room stayed on one line and was cut at the chart's edge, and a negative bar's total ran over
96
+ * the category names. This one stands 5px past the end the bar runs to, as Recharts' did, and is sized by the
97
+ * room on that side:
98
+ * - running forward (to the end room): up to the chart's edge;
99
+ * - running back (a negative value): up to the plot's start, never over the category names; the value axis
100
+ * starts that much later where the chart's width allows it (see BarChart).
101
+ * A label wider than that wraps between its units ({@link barLabelLines}: between words with letters, and after a
102
+ * "," or "/" between figures); one that still does not fit (a unit wider than the room, kept on one line) ends 2px
103
+ * short of the room's edge (the chart's edge, or the plot's start), over its own bar's tip, and reaches back no
104
+ * further than 2px short of the plot's start on the category names' side (the chart's edge on the other): never
105
+ * over the names. A unit wider than even that is shortened by the value ticks' own chain
106
+ * (axis-width's labelText: compact and exact figures, then scientific notation, then its qualifiers dropped), and
107
+ * what still passes is clipped there, each line's reading start in view (value-tick's clippedLine); such a label
108
+ * carries the whole total as its accessible name and hover title. `totals` are the chart's labels with the totals
109
+ * they were formatted from, which prove how the formatter writes its marks. The same estimate as the end room, so
110
+ * the server and the first render draw it the same. Drawn as Recharts draws a label (a `recharts-label` text,
111
+ * centered on the bar), each line in its own reading direction where the label is anchored (value-tick's LineSpan),
112
+ * so a total that reads from the left and fits looks as before, and one that reads from the right
113
+ * ("\u200f١٥٠٬٠٠٠ €") reads so.
114
+ */
115
+ export declare function BarEndLabel({ viewBox, parentViewBox, value, fill, fontSize, style, totals }: LabelProps & {
116
+ totals?: FormattedValues;
117
+ }): React.JSX.Element | null;
118
+ export type BarChartProps<T extends Row> = ChartBaseProps<T> & {
119
+ /** `grouped` periods side by side, `stacked` parts of a whole, `percent` parts as shares. */
120
+ type?: "grouped" | "stacked" | "percent";
121
+ /** `horizontal` for long category names, ranked; `vertical` columns by default. */
122
+ layout?: "vertical" | "horizontal";
123
+ /** A comparison series (last year): `ds-chart-neutral`. */
124
+ comparison?: keyof T & string;
125
+ /** Horizontal bars are sorted by their total unless the categories have a natural order (`none`). */
126
+ sortBy?: "value" | "none";
127
+ /** An average or target line. */
128
+ referenceLines?: readonly ChartReferenceLine[];
129
+ };
130
+ /**
131
+ * Values across categories or periods: grouped, stacked (at most five parts) or percent, in columns or
132
+ * horizontal bars (labels at the start, totals at the bar end). Bars have a 2px corner radius and a 20%
133
+ * gap in the band; the current series is `ds-chart-1`, a comparison `ds-chart-neutral`.
134
+ */
135
+ export declare function BarChart<T extends Row>(props: BarChartProps<T>): React.JSX.Element;
136
+ export type ComposedSeries<T extends Row> = {
137
+ key: keyof T & string;
138
+ axis: "left" | "right";
139
+ };
140
+ export type ComposedChartProps<T extends Row> = Omit<ChartBaseProps<T>, "categories" | "valueFormatter" | "allowDecimals"> & {
141
+ /** Volume: `ds-chart-2` bars. */
142
+ bars: readonly ComposedSeries<T>[];
143
+ /** Rate: `ds-chart-1` lines with ringed points. */
144
+ lines: readonly ComposedSeries<T>[];
145
+ /** One formatter per axis ("124 orders", "€ 54"); put the units in `period` or the title. */
146
+ valueFormatters: {
147
+ left: ChartValueFormatter;
148
+ right: ChartValueFormatter;
149
+ };
150
+ };
151
+ /**
152
+ * Two related measures with different units on one time axis: volume as `ds-chart-2` bars on the left
153
+ * axis, a rate as a `ds-chart-1` line with ringed points on the right (mirrored in RTL). Only when their
154
+ * relation is the point; otherwise use two charts.
155
+ */
156
+ export declare function ComposedChart<T extends Row>(props: ComposedChartProps<T>): React.JSX.Element;
157
+ export {};