@hraness/design-kit 0.31.1

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 (345) hide show
  1. package/ARTICLE_COPY.md +208 -0
  2. package/HERO_FIELDS.md +55 -0
  3. package/ICONS.md +56 -0
  4. package/LANTERN_MATERIAL.md +60 -0
  5. package/LICENSE +21 -0
  6. package/MARKETING_COPY.md +49 -0
  7. package/MARKETING_PRESET.md +108 -0
  8. package/PALETTES.md +90 -0
  9. package/PAPER_THEME.md +128 -0
  10. package/README.md +745 -0
  11. package/STATUS_PAGES.md +67 -0
  12. package/STYLE.md +245 -0
  13. package/WRITING.md +72 -0
  14. package/dist/browser/index.js +2345 -0
  15. package/dist/chunk-44djxk16.js +6872 -0
  16. package/dist/chunk-5gtx3pza.js +9 -0
  17. package/dist/chunk-77391vmq.js +454 -0
  18. package/dist/chunk-7b1586eb.js +1209 -0
  19. package/dist/chunk-8834fh4n.js +6 -0
  20. package/dist/chunk-9t8xyqte.js +870 -0
  21. package/dist/chunk-cejpzyfh.js +446 -0
  22. package/dist/chunk-eh71jz57.js +429 -0
  23. package/dist/chunk-evb02bc1.js +516 -0
  24. package/dist/chunk-h4k7yv6x.js +368 -0
  25. package/dist/chunk-he8eznb1.js +760 -0
  26. package/dist/chunk-mr1vdcjq.js +404 -0
  27. package/dist/chunk-wzvdn8ey.js +116 -0
  28. package/dist/fonts/nebula-sans/social-fonts.generated.js +53 -0
  29. package/dist/icons.js +48 -0
  30. package/dist/index.js +237 -0
  31. package/dist/launch.js +41 -0
  32. package/dist/mockups/client.js +422 -0
  33. package/dist/mockups/index.js +1850 -0
  34. package/dist/portfolio.js +1549 -0
  35. package/dist/provider-marks.js +19 -0
  36. package/dist/react/charts.js +11 -0
  37. package/dist/react/hero-backdrop.js +8 -0
  38. package/dist/react/index.js +7252 -0
  39. package/dist/react/platform-install.js +10 -0
  40. package/dist/react/server.js +137 -0
  41. package/dist/stylex-manifest.json +1 -0
  42. package/dist/stylex.css +5392 -0
  43. package/dist/syntax-highlighting.js +15 -0
  44. package/dist/testing.js +250 -0
  45. package/package.json +377 -0
  46. package/portfolio-inventory.json +31 -0
  47. package/scripts/check-lantern-material-snapshot.d.mts +26 -0
  48. package/scripts/check-lantern-material-snapshot.mjs +126 -0
  49. package/scripts/check-marketing-snapshot.d.mts +12 -0
  50. package/scripts/check-marketing-snapshot.mjs +58 -0
  51. package/scripts/lantern-material-snapshot.ts +101 -0
  52. package/scripts/marketing-textures.ts +48 -0
  53. package/scripts/paper-theme-snapshot.ts +97 -0
  54. package/scripts/product-marketing-snapshot.ts +149 -0
  55. package/src/appearance-menu.css +266 -0
  56. package/src/appearance.ts +32 -0
  57. package/src/article-html.ts +269 -0
  58. package/src/article.ts +686 -0
  59. package/src/browser/appearance-menu.ts +604 -0
  60. package/src/browser/artifact-share.ts +164 -0
  61. package/src/browser/design-palette.ts +197 -0
  62. package/src/browser/foil.ts +124 -0
  63. package/src/browser/hero-light.ts +11 -0
  64. package/src/browser/index.ts +29 -0
  65. package/src/browser/status-field.ts +432 -0
  66. package/src/browser/status-page.ts +100 -0
  67. package/src/browser/sticky-offset.ts +82 -0
  68. package/src/browser/theme-color-sync.ts +213 -0
  69. package/src/charts.css +7 -0
  70. package/src/compiler-components.css +34 -0
  71. package/src/compiler-foundation.css +18 -0
  72. package/src/compiler-palettes.css +7 -0
  73. package/src/compiler-tokens.css +342 -0
  74. package/src/components.css +3 -0
  75. package/src/design-gallery.css +431 -0
  76. package/src/effects.css +14 -0
  77. package/src/fonts/geist-mono/GeistMono[wght].woff2 +0 -0
  78. package/src/fonts/geist-mono/OFL.txt +93 -0
  79. package/src/fonts/geist-mono/PROVENANCE.md +12 -0
  80. package/src/fonts/instrument-serif/OFL.txt +93 -0
  81. package/src/fonts/instrument-serif/UPSTREAM.md +14 -0
  82. package/src/fonts/instrument-serif/instrument-serif-latin-400.woff2 +0 -0
  83. package/src/fonts/nebula-sans/LICENSE.txt +96 -0
  84. package/src/fonts/nebula-sans/NebulaSans-Black.woff2 +0 -0
  85. package/src/fonts/nebula-sans/NebulaSans-BlackItalic.woff2 +0 -0
  86. package/src/fonts/nebula-sans/NebulaSans-Bold.otf +0 -0
  87. package/src/fonts/nebula-sans/NebulaSans-Bold.woff2 +0 -0
  88. package/src/fonts/nebula-sans/NebulaSans-BoldItalic.woff2 +0 -0
  89. package/src/fonts/nebula-sans/NebulaSans-Book.otf +0 -0
  90. package/src/fonts/nebula-sans/NebulaSans-Book.woff2 +0 -0
  91. package/src/fonts/nebula-sans/NebulaSans-BookItalic.woff2 +0 -0
  92. package/src/fonts/nebula-sans/NebulaSans-Light.woff2 +0 -0
  93. package/src/fonts/nebula-sans/NebulaSans-LightItalic.woff2 +0 -0
  94. package/src/fonts/nebula-sans/NebulaSans-Medium.woff2 +0 -0
  95. package/src/fonts/nebula-sans/NebulaSans-MediumItalic.woff2 +0 -0
  96. package/src/fonts/nebula-sans/NebulaSans-Semibold.woff2 +0 -0
  97. package/src/fonts/nebula-sans/NebulaSans-SemiboldItalic.woff2 +0 -0
  98. package/src/fonts/nebula-sans/PROVENANCE.md +14 -0
  99. package/src/fonts/nebula-sans/social-fonts.generated.ts +3873 -0
  100. package/src/fonts.css +106 -0
  101. package/src/icons/act60/act60.svg +5 -0
  102. package/src/icons/act60/application.svg +9 -0
  103. package/src/icons/act60/chapter-compare.svg +3 -0
  104. package/src/icons/act60/decree-residence.svg +6 -0
  105. package/src/icons/act60/estimate.svg +7 -0
  106. package/src/icons/act60/export-services.svg +4 -0
  107. package/src/icons/act60/investor.svg +13 -0
  108. package/src/icons/act60/presence.svg +7 -0
  109. package/src/icons/aicharts/aicharts.svg +6 -0
  110. package/src/icons/aicharts/cost-compare.svg +4 -0
  111. package/src/icons/aicharts/task-audio.svg +7 -0
  112. package/src/icons/aicharts/task-coding.svg +6 -0
  113. package/src/icons/aicharts/task-images.svg +3 -0
  114. package/src/icons/aicharts/task-reasoning.svg +9 -0
  115. package/src/icons/aicharts/task-research.svg +5 -0
  116. package/src/icons/aicharts/task-video.svg +4 -0
  117. package/src/icons/manifest.json +1371 -0
  118. package/src/icons/platonik/conversation.svg +3 -0
  119. package/src/icons/platonik/creature.svg +7 -0
  120. package/src/icons/platonik/economy.svg +4 -0
  121. package/src/icons/platonik/keep-light.svg +6 -0
  122. package/src/icons/platonik/platonik.svg +7 -0
  123. package/src/icons/platonik/spark-route.svg +15 -0
  124. package/src/icons/receipts/act60-retry.receipt.json +888 -0
  125. package/src/icons/receipts/act60.receipt.json +1366 -0
  126. package/src/icons/receipts/aicharts.receipt.json +1546 -0
  127. package/src/icons/receipts/platonik.receipt.json +1011 -0
  128. package/src/icons/receipts/roughday.receipt.json +770 -0
  129. package/src/icons/receipts/shared.receipt.json +1296 -0
  130. package/src/icons/receipts/slopcamera.receipt.json +1495 -0
  131. package/src/icons/receipts/soundfish-retry.receipt.json +460 -0
  132. package/src/icons/receipts/soundfish.receipt.json +1709 -0
  133. package/src/icons/receipts/sponge.receipt.json +1743 -0
  134. package/src/icons/receipts/stripe-history-retry.receipt.json +145 -0
  135. package/src/icons/receipts/stripe-history.receipt.json +1202 -0
  136. package/src/icons/receipts/wordcell.receipt.json +1924 -0
  137. package/src/icons/roughday/finance.svg +7 -0
  138. package/src/icons/roughday/roughday.svg +6 -0
  139. package/src/icons/roughday/technology.svg +4 -0
  140. package/src/icons/roughday/world.svg +4 -0
  141. package/src/icons/sets/act60.json +63 -0
  142. package/src/icons/sets/aicharts.json +63 -0
  143. package/src/icons/sets/platonik.json +39 -0
  144. package/src/icons/sets/roughday.json +25 -0
  145. package/src/icons/sets/shared.json +12 -0
  146. package/src/icons/sets/slopcamera.json +47 -0
  147. package/src/icons/sets/soundfish.json +43 -0
  148. package/src/icons/sets/sponge.json +51 -0
  149. package/src/icons/sets/stripe-history.json +39 -0
  150. package/src/icons/sets/wordcell.json +51 -0
  151. package/src/icons/shared/agent-skill.svg +4 -0
  152. package/src/icons/shared/cli.svg +5 -0
  153. package/src/icons/shared/privacy.svg +3 -0
  154. package/src/icons/shared/research.svg +7 -0
  155. package/src/icons/shared/sdk.svg +3 -0
  156. package/src/icons/slopcamera/diagram.svg +3 -0
  157. package/src/icons/slopcamera/direct-scene.svg +5 -0
  158. package/src/icons/slopcamera/edit-video.svg +17 -0
  159. package/src/icons/slopcamera/mcp.svg +3 -0
  160. package/src/icons/slopcamera/native-world.svg +3 -0
  161. package/src/icons/slopcamera/slopcamera.svg +11 -0
  162. package/src/icons/soundfish/agent-ui.svg +7 -0
  163. package/src/icons/soundfish/collaborate.svg +5 -0
  164. package/src/icons/soundfish/compose.svg +3 -0
  165. package/src/icons/soundfish/hear.svg +6 -0
  166. package/src/icons/soundfish/human-ui.svg +6 -0
  167. package/src/icons/soundfish/share.svg +3 -0
  168. package/src/icons/soundfish/soundfish.svg +6 -0
  169. package/src/icons/sponge/api.svg +3 -0
  170. package/src/icons/sponge/documents.svg +3 -0
  171. package/src/icons/sponge/library.svg +3 -0
  172. package/src/icons/sponge/one-question.svg +5 -0
  173. package/src/icons/sponge/people-direct.svg +5 -0
  174. package/src/icons/sponge/read.svg +3 -0
  175. package/src/icons/sponge/save.svg +4 -0
  176. package/src/icons/sponge/sponge.svg +7 -0
  177. package/src/icons/stripe-history/company-history.svg +3 -0
  178. package/src/icons/stripe-history/evidence.svg +4 -0
  179. package/src/icons/stripe-history/independence.svg +7 -0
  180. package/src/icons/stripe-history/publications.svg +11 -0
  181. package/src/icons/stripe-history/sources.svg +6 -0
  182. package/src/icons/stripe-history/stripe-history.svg +3 -0
  183. package/src/icons/wordcell/backlinks.svg +6 -0
  184. package/src/icons/wordcell/capture.svg +6 -0
  185. package/src/icons/wordcell/git-provenance.svg +4 -0
  186. package/src/icons/wordcell/kb.svg +4 -0
  187. package/src/icons/wordcell/markdown.svg +4 -0
  188. package/src/icons/wordcell/scopes.svg +3 -0
  189. package/src/icons/wordcell/search.svg +7 -0
  190. package/src/icons.generated.ts +734 -0
  191. package/src/icons.ts +51 -0
  192. package/src/index.ts +275 -0
  193. package/src/lantern-material.css +213 -0
  194. package/src/launch.ts +624 -0
  195. package/src/marketing-assets/UPSTREAM.md +18 -0
  196. package/src/marketing-assets/cells.svg +1 -0
  197. package/src/marketing-assets/grain.svg +1 -0
  198. package/src/marketing-forced-colors.css +12 -0
  199. package/src/mockups/client.tsx +415 -0
  200. package/src/mockups/core.tsx +318 -0
  201. package/src/mockups/frames.tsx +368 -0
  202. package/src/mockups/index.ts +14 -0
  203. package/src/mockups/surfaces.tsx +681 -0
  204. package/src/mockups.css +2607 -0
  205. package/src/palette-appearance.ts +45 -0
  206. package/src/palette-bridge.css +124 -0
  207. package/src/palette-color.ts +41 -0
  208. package/src/palette-system.css +721 -0
  209. package/src/palette-themes.ts +23 -0
  210. package/src/palette-tokens.stylex.ts +519 -0
  211. package/src/palettes.css +3 -0
  212. package/src/palettes.ts +161 -0
  213. package/src/paper-theme.css +244 -0
  214. package/src/plain-publication.css +1241 -0
  215. package/src/plain-site.css +397 -0
  216. package/src/platforms.ts +151 -0
  217. package/src/portfolio.generated.json +1595 -0
  218. package/src/portfolio.generated.ts +1596 -0
  219. package/src/portfolio.ts +226 -0
  220. package/src/product-marketing-foundation.css +433 -0
  221. package/src/product-marketing-preset.css +261 -0
  222. package/src/product-marketing.css +2186 -0
  223. package/src/provider-marks.generated.ts +112 -0
  224. package/src/provider-marks.ts +143 -0
  225. package/src/react/animated-rail-stage.stylex.ts +15 -0
  226. package/src/react/animated-rail-stage.tsx +51 -0
  227. package/src/react/app-shell.stylex.ts +104 -0
  228. package/src/react/app-shell.tsx +121 -0
  229. package/src/react/article.tsx +602 -0
  230. package/src/react/aurora-dots-background.tsx +34 -0
  231. package/src/react/charts.stylex.ts +563 -0
  232. package/src/react/charts.tsx +610 -0
  233. package/src/react/chat.stylex.ts +34 -0
  234. package/src/react/chat.tsx +155 -0
  235. package/src/react/design-gallery.tsx +943 -0
  236. package/src/react/design-palette.stylex.ts +124 -0
  237. package/src/react/design-palette.tsx +196 -0
  238. package/src/react/design-theme-context.tsx +41 -0
  239. package/src/react/effects.stylex.ts +325 -0
  240. package/src/react/fader.stylex.ts +71 -0
  241. package/src/react/fader.tsx +151 -0
  242. package/src/react/foil-card-math.ts +100 -0
  243. package/src/react/foil-card-surface.stylex.ts +326 -0
  244. package/src/react/foil-card-surface.tsx +742 -0
  245. package/src/react/foil-mark.tsx +35 -0
  246. package/src/react/foil.stylex.ts +163 -0
  247. package/src/react/haptics.ts +228 -0
  248. package/src/react/hero-backdrop.tsx +22 -0
  249. package/src/react/index.ts +38 -0
  250. package/src/react/keyboard-shortcuts.ts +228 -0
  251. package/src/react/lantern-material-gallery.tsx +166 -0
  252. package/src/react/lantern-material.stylex.ts +39 -0
  253. package/src/react/launch-beats.tsx +73 -0
  254. package/src/react/navigation-rail.stylex.ts +130 -0
  255. package/src/react/navigation-rail.tsx +228 -0
  256. package/src/react/particle-halo.tsx +115 -0
  257. package/src/react/phaser-dots.tsx +501 -0
  258. package/src/react/platform-icons.tsx +94 -0
  259. package/src/react/platform-install.stylex.ts +385 -0
  260. package/src/react/platform-install.tsx +389 -0
  261. package/src/react/playback-transport.stylex.ts +14 -0
  262. package/src/react/playback-transport.tsx +112 -0
  263. package/src/react/procedural-backdrop.tsx +192 -0
  264. package/src/react/procedural-recipe.ts +323 -0
  265. package/src/react/product-marketing.stylex.ts +4469 -0
  266. package/src/react/product-marketing.tsx +1611 -0
  267. package/src/react/production-data-preview-notice.stylex.ts +40 -0
  268. package/src/react/production-data-preview-notice.tsx +34 -0
  269. package/src/react/provider-mark.stylex.ts +132 -0
  270. package/src/react/provider-mark.tsx +120 -0
  271. package/src/react/relative-time.tsx +117 -0
  272. package/src/react/route-state.stylex.ts +39 -0
  273. package/src/react/route-state.tsx +350 -0
  274. package/src/react/server.ts +11 -0
  275. package/src/react/social-kit-panel.tsx +103 -0
  276. package/src/react/sticky-offset.tsx +33 -0
  277. package/src/react/surfaces.stylex.ts +179 -0
  278. package/src/react/surfaces.tsx +330 -0
  279. package/src/react/syntax-code.tsx +33 -0
  280. package/src/react/theme-color-sync.ts +1 -0
  281. package/src/react/theme-resolution.ts +11 -0
  282. package/src/react/theme.stylex.ts +276 -0
  283. package/src/react/theme.tsx +402 -0
  284. package/src/reading.css +72 -0
  285. package/src/relative-time.ts +185 -0
  286. package/src/reset.css +2 -0
  287. package/src/site-shell.css +16 -0
  288. package/src/status-page-html.ts +63 -0
  289. package/src/status-page.css +276 -0
  290. package/src/status-page.ts +323 -0
  291. package/src/styles.css +21 -0
  292. package/src/syntax-code-lexers.ts +303 -0
  293. package/src/syntax-highlighting.css +78 -0
  294. package/src/syntax-highlighting.ts +477 -0
  295. package/src/syntax-tokens.ts +33 -0
  296. package/src/testing.ts +307 -0
  297. package/src/tokens.css +3 -0
  298. package/src/typography.css +86 -0
  299. package/vendor/evilcharts/LICENSE +21 -0
  300. package/vendor/evilcharts/UPSTREAM.md +14 -0
  301. package/vendor/platform-marks/LICENSE +30 -0
  302. package/vendor/platform-marks/UPSTREAM.md +15 -0
  303. package/vendor/platform-marks/apple.svg +1 -0
  304. package/vendor/platform-marks/linux.svg +1 -0
  305. package/vendor/provider-marks/CRUSH-LICENSE.md +134 -0
  306. package/vendor/provider-marks/LICENSE +21 -0
  307. package/vendor/provider-marks/UPSTREAM.md +27 -0
  308. package/vendor/provider-marks/aider.svg +3 -0
  309. package/vendor/provider-marks/crush-heartbit.svg +8 -0
  310. package/vendor/provider-marks/lobehub/alibabacloud-color.svg +1 -0
  311. package/vendor/provider-marks/lobehub/alibabacloud.svg +1 -0
  312. package/vendor/provider-marks/lobehub/amp-color.svg +1 -0
  313. package/vendor/provider-marks/lobehub/amp.svg +1 -0
  314. package/vendor/provider-marks/lobehub/anthropic.svg +1 -0
  315. package/vendor/provider-marks/lobehub/claude-color.svg +1 -0
  316. package/vendor/provider-marks/lobehub/claude.svg +1 -0
  317. package/vendor/provider-marks/lobehub/claudecode-color.svg +1 -0
  318. package/vendor/provider-marks/lobehub/claudecode.svg +1 -0
  319. package/vendor/provider-marks/lobehub/codex-color.svg +1 -0
  320. package/vendor/provider-marks/lobehub/codex.svg +1 -0
  321. package/vendor/provider-marks/lobehub/cursor.svg +1 -0
  322. package/vendor/provider-marks/lobehub/deepseek-color.svg +1 -0
  323. package/vendor/provider-marks/lobehub/deepseek.svg +1 -0
  324. package/vendor/provider-marks/lobehub/devin-color.svg +1 -0
  325. package/vendor/provider-marks/lobehub/devin.svg +1 -0
  326. package/vendor/provider-marks/lobehub/gemini-color.svg +1 -0
  327. package/vendor/provider-marks/lobehub/gemini.svg +1 -0
  328. package/vendor/provider-marks/lobehub/geminicli-color.svg +1 -0
  329. package/vendor/provider-marks/lobehub/geminicli.svg +1 -0
  330. package/vendor/provider-marks/lobehub/goose.svg +1 -0
  331. package/vendor/provider-marks/lobehub/meta-color.svg +1 -0
  332. package/vendor/provider-marks/lobehub/meta.svg +1 -0
  333. package/vendor/provider-marks/lobehub/mistral-color.svg +1 -0
  334. package/vendor/provider-marks/lobehub/mistral.svg +1 -0
  335. package/vendor/provider-marks/lobehub/moonshot.svg +1 -0
  336. package/vendor/provider-marks/lobehub/nvidia-color.svg +1 -0
  337. package/vendor/provider-marks/lobehub/nvidia.svg +1 -0
  338. package/vendor/provider-marks/lobehub/openai.svg +1 -0
  339. package/vendor/provider-marks/lobehub/opencode.svg +1 -0
  340. package/vendor/provider-marks/lobehub/perplexity-color.svg +1 -0
  341. package/vendor/provider-marks/lobehub/perplexity.svg +1 -0
  342. package/vendor/provider-marks/lobehub/qwen-color.svg +1 -0
  343. package/vendor/provider-marks/lobehub/qwen.svg +1 -0
  344. package/vendor/provider-marks/lobehub/xai.svg +1 -0
  345. package/vendor/provider-marks/lobehub/zai.svg +1 -0
@@ -0,0 +1,870 @@
1
+ // src/react/charts.tsx
2
+ import { PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart, ResponsiveContainer, Tooltip as RechartsTooltip } from "recharts";
3
+ import { useId } from "react";
4
+ import * as stylex from "@stylexjs/stylex";
5
+ import { cn } from "@hraness/ui";
6
+
7
+ // src/react/charts.stylex.ts
8
+ var chartStyles = {
9
+ bar: {
10
+ kawU7v: "x1cfjbvc",
11
+ k5BUTg: "x1a4igh8",
12
+ kqOd84: "xsdpl10",
13
+ kzPi7L: "x1sz4vi2",
14
+ kEz803: "x4aylkk",
15
+ kKxzle: "x1uzojwf",
16
+ kILWW9: "x1s0aqod",
17
+ k44tkh: "x1fi45qw",
18
+ kWV6AL: "x1u6ievf",
19
+ ko0y90: "x1v7wizp",
20
+ kKVMdj: "x1no39iu x1aquc0h",
21
+ k5bvn2: "xoj058f",
22
+ kyAemX: "xb8h89d",
23
+ ku1ltF: "x1fdtg7e",
24
+ kHypHr: "x1u7o2vf",
25
+ kWkggS: "xjbqb8w x9yvj25",
26
+ kKwaWg: "x1ooxb7 xhobzj1",
27
+ kl9DO0: "x12koezg",
28
+ k1YJky: "x1y4qj14",
29
+ kz484i: "x182nak8",
30
+ kgSjnq: "x1cwfr1t",
31
+ k4V0xq: "x14bdpvh",
32
+ krFJ6x: "x11m3xgt",
33
+ kP1A0P: "x7kxraq",
34
+ kpvK8V: "x108usdd",
35
+ kmc9e2: "x3n6nq7",
36
+ kT8eP4: "x2dkq5d",
37
+ kffDkL: "x1x0u81l",
38
+ kgBrHk: "xf1j0q2",
39
+ k7sjHc: "xmzn1mo",
40
+ kEreRy: "xjslfuv",
41
+ krzo0S: "x1gbqego",
42
+ kYh6hf: "xjg5lhu",
43
+ kaIpWk: "x1pjcqnp",
44
+ krVfgx: "x1ey2m1c",
45
+ kGVxlE: "xpbr0ci",
46
+ kAXs8y: "xr5dkdi",
47
+ kbCHJM: "xu96u03",
48
+ kVAEAm: "x10l6tqk",
49
+ kCIrl2: "xwukr4l",
50
+ k87sOh: "x13vifvy",
51
+ k3nNDw: "x1nf803f",
52
+ kzqmXN: "x1i0xg0u",
53
+ $$css: true
54
+ },
55
+ detail: {
56
+ kMwMTN: "x17j02y5",
57
+ kMv6JI: "xpw0y0u",
58
+ kGuDYH: "x1k6wstc",
59
+ kcqcaj: "xss6m8b",
60
+ $$css: true
61
+ },
62
+ heading: {
63
+ kGNEyG: "x1pha0wt",
64
+ k1xSpc: "x78zum5",
65
+ kOIVth: "x96y02u",
66
+ kjj79g: "x1qughib",
67
+ k7Eaqz: "xeuugli",
68
+ $$css: true
69
+ },
70
+ indicator: {
71
+ kaIpWk: "x18j2vf1",
72
+ k1xSpc: "x1rg5ohu",
73
+ kCS8Yb: "xdl72j9",
74
+ kzQI83: "x1c4vz4f",
75
+ kmuXW: "x2lah0s",
76
+ kZKoxP: "xqu0tyb",
77
+ kzqmXN: "xsmyaan",
78
+ $$css: true
79
+ },
80
+ label: {
81
+ kGuDYH: "xaasd0c",
82
+ k63SB2: "x1e4wzip",
83
+ kVQacm: "xb3r6kr",
84
+ kg5iWk: "xlyipyv",
85
+ khDVqt: "xuxw1ft",
86
+ $$css: true
87
+ },
88
+ legend: {
89
+ kGNEyG: "x6s0dn4",
90
+ k1xSpc: "x78zum5",
91
+ kwnvtZ: "x1a02dak",
92
+ kOIVth: "x111l7ma",
93
+ k7Eaqz: "xeuugli",
94
+ $$css: true
95
+ },
96
+ legendRow: {
97
+ kGNEyG: "x6s0dn4",
98
+ kaIpWk: "x18j2vf1",
99
+ k1xSpc: "x3nfvp2",
100
+ kCS8Yb: "xdl72j9",
101
+ kzQI83: "x1c4vz4f",
102
+ kmuXW: "xs83m0k",
103
+ kGuDYH: "x1j6dyjg",
104
+ kOIVth: "xmgkybt",
105
+ kAzted: "x1ig0bsw",
106
+ kzqmXN: "x14atkfc",
107
+ kLKAdn: "x15koebe",
108
+ kpe85a: "x1gecdg7",
109
+ kGO01o: "xw080dc",
110
+ kE3dHu: "x6enc3n",
111
+ $$css: true
112
+ },
113
+ median: {
114
+ kawU7v: "x18sabzy",
115
+ k5BUTg: "x1jleocg",
116
+ kqOd84: "x1pjjote",
117
+ kzPi7L: "x1e53mt7",
118
+ kEz803: "xgkqhyc",
119
+ ku1ltF: "x1fdtg7e",
120
+ kHypHr: "x1u7o2vf",
121
+ kWkggS: "x1hnzg9s x9yvj25",
122
+ kKwaWg: "x18o3ruo",
123
+ kl9DO0: "x12koezg",
124
+ k1YJky: "x1y4qj14",
125
+ kz484i: "x182nak8",
126
+ kgSjnq: "x1cwfr1t",
127
+ k4V0xq: "xynn2ba x14bdpvh",
128
+ krFJ6x: "xn5uptl",
129
+ kP1A0P: "xhjnd2s x7kxraq",
130
+ kpvK8V: "x13lo9x4 x108usdd",
131
+ kmc9e2: "x3so8kt",
132
+ kT8eP4: "x1csoyw0 x2dkq5d",
133
+ kffDkL: "xg5eh3q x1x0u81l",
134
+ kgBrHk: "x18b5jzi",
135
+ k7sjHc: "x1alpsbp xmzn1mo",
136
+ kEreRy: "x1jc7w92 xjslfuv",
137
+ krzo0S: "x1t7ytsu",
138
+ kYh6hf: "xyumdvf xjg5lhu",
139
+ kaIpWk: "x16rqkct",
140
+ kGVxlE: "xtcdp43",
141
+ kAXs8y: "xr5dkdi",
142
+ kZKoxP: "x170jfvy",
143
+ kbCHJM: "x1czmu4s",
144
+ kVAEAm: "x10l6tqk",
145
+ k87sOh: "xwa60dl",
146
+ k3aq6I: "x11lhmoz",
147
+ kzqmXN: "x1fsd2vl",
148
+ $$css: true
149
+ },
150
+ plot: {
151
+ kZKoxP: "x1ycyw8g",
152
+ kzqmXN: "xh8yej3",
153
+ kAzted: "xjjci79",
154
+ $$css: true
155
+ },
156
+ range: {
157
+ kawU7v: "x1cfjbvc",
158
+ k5BUTg: "x1a4igh8",
159
+ kqOd84: "xsdpl10",
160
+ kzPi7L: "x1sz4vi2",
161
+ kEz803: "x4aylkk",
162
+ ku1ltF: "x1fdtg7e",
163
+ kHypHr: "x1u7o2vf",
164
+ kWkggS: "x1hnzg9s x9yvj25",
165
+ kKwaWg: "x18o3ruo",
166
+ kl9DO0: "x12koezg",
167
+ k1YJky: "x1y4qj14",
168
+ kz484i: "x182nak8",
169
+ kgSjnq: "x1cwfr1t",
170
+ k4V0xq: "x14bdpvh",
171
+ krFJ6x: "x11m3xgt",
172
+ kP1A0P: "x7kxraq",
173
+ kpvK8V: "x108usdd",
174
+ kmc9e2: "x3n6nq7",
175
+ kT8eP4: "x2dkq5d",
176
+ kffDkL: "x1x0u81l",
177
+ kgBrHk: "xf1j0q2",
178
+ k7sjHc: "xmzn1mo",
179
+ kEreRy: "xjslfuv",
180
+ krzo0S: "x1gbqego",
181
+ kYh6hf: "xjg5lhu",
182
+ kaIpWk: "x18j2vf1",
183
+ kAXs8y: "xr5dkdi",
184
+ kZKoxP: "x1ycjhwn",
185
+ kbCHJM: "x7sgyhr",
186
+ kSiTet: "xmu36h7",
187
+ kVAEAm: "x10l6tqk",
188
+ k87sOh: "xwa60dl",
189
+ k3aq6I: "x1cb1t30",
190
+ kzqmXN: "x11r28uo",
191
+ $$css: true
192
+ },
193
+ rangeTrack: {
194
+ kZKoxP: "x36qwtl",
195
+ kqGvvJ: "x15j7jsh",
196
+ kVQacm: "x1rea2x4",
197
+ $$css: true
198
+ },
199
+ root: {
200
+ kMwMTN: "x11jfisy",
201
+ kMv6JI: "x1d3so1v",
202
+ k7Eaqz: "xeuugli",
203
+ $$css: true
204
+ },
205
+ row: {
206
+ kMwMTN: "x1heor9g",
207
+ k1xSpc: "xrvj5dj",
208
+ kMv6JI: "xjb2p0i",
209
+ kV0H8L: "x10rt0pk",
210
+ krGR0G: "xvmqkbn",
211
+ kqBzK6: "x1rcybi7",
212
+ kHiXq7: "x61gc8y",
213
+ kC21eY: "xd4aj15",
214
+ ka26j: "xkyhvkk",
215
+ kGuDYH: "x1qlqyl8",
216
+ kQqvRs: "x1xh6y1q",
217
+ kKX8nH: "x1t35e8",
218
+ kjAs5C: "x1aazh3f",
219
+ k63SB2: "x1pd3egz",
220
+ kOIVth: "xm15xud",
221
+ kLWn49: "x15bjb6t",
222
+ k7Eaqz: "xeuugli",
223
+ kLKAdn: "x1mg8snn",
224
+ kpe85a: "x1gecdg7",
225
+ kGO01o: "x19a4mjr",
226
+ kE3dHu: "x6enc3n",
227
+ k9WMMc: "x1yc453h",
228
+ $$css: true
229
+ },
230
+ rows: {
231
+ k1xSpc: "xrvj5dj",
232
+ kOIVth: "xmgkybt",
233
+ $$css: true
234
+ },
235
+ selectableRow: {
236
+ kawU7v: "x18sabzy",
237
+ k5BUTg: "x1jleocg",
238
+ kqOd84: "x1pjjote",
239
+ kzPi7L: "x1e53mt7",
240
+ kEz803: "xgkqhyc",
241
+ ku1ltF: "x1fdtg7e",
242
+ kHypHr: "x1u7o2vf",
243
+ kWkggS: "xjbqb8w x13wtpdm",
244
+ kKwaWg: "x18o3ruo",
245
+ kl9DO0: "x12koezg",
246
+ k1YJky: "x1y4qj14",
247
+ kz484i: "x182nak8",
248
+ kgSjnq: "x1cwfr1t",
249
+ k4V0xq: "xi11yse",
250
+ krFJ6x: "x198t27z",
251
+ kP1A0P: "x1fvpbjb",
252
+ kpvK8V: "x1rfstpp",
253
+ kmc9e2: "x8et30q",
254
+ kT8eP4: "xnh6zc7",
255
+ kffDkL: "x1273586",
256
+ kgBrHk: "x18oe1m7",
257
+ k7sjHc: "x10w94by",
258
+ kEreRy: "x1mi4oqr",
259
+ krzo0S: "xstzfhl",
260
+ kYh6hf: "x14e42zd",
261
+ kaIpWk: "xhe58dl",
262
+ kkrTdU: "x1ypdohk",
263
+ kAzted: "x1pjshk2",
264
+ kjBf7l: "x5q2f2h",
265
+ kInvED: "x13iak60",
266
+ k3XXqK: "x9v5kkp",
267
+ kMeerF: "x784prv",
268
+ kIr0Dl: "x1ahifba",
269
+ kIyJzY: "xcgntbv",
270
+ k1ekBW: "x15406qy",
271
+ kAMwcw: "x1iashqr",
272
+ kzqmXN: "xh8yej3",
273
+ $$css: true
274
+ },
275
+ selectedRow: {
276
+ ku1ltF: "x1fdtg7e",
277
+ kHypHr: "x1u7o2vf",
278
+ kWkggS: "xrs6pst",
279
+ kKwaWg: "x18o3ruo",
280
+ kl9DO0: "x12koezg",
281
+ k1YJky: "x1y4qj14",
282
+ kz484i: "x182nak8",
283
+ kgSjnq: "x1cwfr1t",
284
+ $$css: true
285
+ },
286
+ tooltip: {
287
+ kawU7v: "x18sabzy",
288
+ k5BUTg: "x1jleocg",
289
+ kqOd84: "x1pjjote",
290
+ kzPi7L: "x1e53mt7",
291
+ kEz803: "xgkqhyc",
292
+ ku1ltF: "x1fdtg7e",
293
+ kHypHr: "x1u7o2vf",
294
+ kWkggS: "x1jmv06j",
295
+ kKwaWg: "x18o3ruo",
296
+ kl9DO0: "x12koezg",
297
+ k1YJky: "x1y4qj14",
298
+ kz484i: "x182nak8",
299
+ kgSjnq: "x1cwfr1t",
300
+ k4V0xq: "xtsjrx0",
301
+ krFJ6x: "xn5uptl",
302
+ kP1A0P: "x1ae7zus",
303
+ kpvK8V: "xjttvrd",
304
+ kmc9e2: "x3so8kt",
305
+ kT8eP4: "x1b1eqt9",
306
+ kffDkL: "x1j8yxcv",
307
+ kgBrHk: "x18b5jzi",
308
+ k7sjHc: "x1lun4ml",
309
+ kEreRy: "xmmcp6y",
310
+ krzo0S: "x1t7ytsu",
311
+ kYh6hf: "xpilrb4",
312
+ kaIpWk: "xjb54qr",
313
+ kGVxlE: "x13akli3",
314
+ kMwMTN: "x1gjcqpb",
315
+ kGuDYH: "xaasd0c",
316
+ k7Eaqz: "xhb15b9",
317
+ kF3gjK: "x1dk652i",
318
+ kJVvJu: "x27hgv3",
319
+ $$css: true
320
+ },
321
+ tooltipItem: {
322
+ kGNEyG: "x6s0dn4",
323
+ k1xSpc: "xrvj5dj",
324
+ kOIVth: "xzci21y",
325
+ kumcoG: "xju1xpo",
326
+ $$css: true
327
+ },
328
+ tooltipList: {
329
+ k1xSpc: "xrvj5dj",
330
+ kOIVth: "xm15xud",
331
+ kCbEA6: "x10im51j",
332
+ kYk0Dm: "xrxpjvj",
333
+ $$css: true
334
+ },
335
+ tooltipTerm: {
336
+ kGNEyG: "x6s0dn4",
337
+ kMwMTN: "x17j02y5",
338
+ k1xSpc: "x3nfvp2",
339
+ kOIVth: "xmgkybt",
340
+ k7Eaqz: "xeuugli",
341
+ $$css: true
342
+ },
343
+ tooltipTitle: {
344
+ k1xSpc: "x1lliihq",
345
+ k63SB2: "x1e4wzip",
346
+ k1K539: "xcftyxh",
347
+ $$css: true
348
+ },
349
+ tooltipValue: {
350
+ kMv6JI: "xpw0y0u",
351
+ kcqcaj: "xss6m8b",
352
+ kCbEA6: "x10im51j",
353
+ kYk0Dm: "xrxpjvj",
354
+ $$css: true
355
+ },
356
+ track: {
357
+ kawU7v: "x1cfjbvc",
358
+ k5BUTg: "x1a4igh8",
359
+ kqOd84: "xsdpl10",
360
+ kzPi7L: "x1sz4vi2",
361
+ kEz803: "x4aylkk",
362
+ ku1ltF: "x1fdtg7e",
363
+ kHypHr: "x1u7o2vf",
364
+ kWkggS: "xrj7itd x9yvj25",
365
+ kKwaWg: "x18o3ruo",
366
+ kl9DO0: "x12koezg",
367
+ k1YJky: "x1y4qj14",
368
+ kz484i: "x182nak8",
369
+ kgSjnq: "x1cwfr1t",
370
+ k4V0xq: "x14bdpvh",
371
+ krFJ6x: "x11m3xgt",
372
+ kP1A0P: "x7kxraq",
373
+ kpvK8V: "x108usdd",
374
+ kmc9e2: "x3n6nq7",
375
+ kT8eP4: "x2dkq5d",
376
+ kffDkL: "x1x0u81l",
377
+ kgBrHk: "xf1j0q2",
378
+ k7sjHc: "xmzn1mo",
379
+ kEreRy: "xjslfuv",
380
+ krzo0S: "x1gbqego",
381
+ kYh6hf: "xjg5lhu",
382
+ kaIpWk: "x18j2vf1",
383
+ k1xSpc: "x1lliihq",
384
+ kAXs8y: "xr5dkdi",
385
+ kZKoxP: "xdk7pt",
386
+ kVQacm: "xb3r6kr",
387
+ kVAEAm: "x1n2onr6",
388
+ kzqmXN: "xh8yej3",
389
+ $$css: true
390
+ },
391
+ value: {
392
+ kCS8Yb: "xdl72j9",
393
+ kzQI83: "x1c4vz4f",
394
+ kmuXW: "x2lah0s",
395
+ kMv6JI: "xpw0y0u",
396
+ kGuDYH: "xaasd0c",
397
+ kcqcaj: "xss6m8b",
398
+ $$css: true
399
+ }
400
+ };
401
+
402
+ // src/react/charts.tsx
403
+ import { jsx, jsxs } from "react/jsx-runtime";
404
+ import { createElement } from "react";
405
+ function finiteOr(value, fallback) {
406
+ return Number.isFinite(value) ? value : fallback;
407
+ }
408
+ function normalizedPercent(value, minimum, maximum) {
409
+ const span = maximum - minimum;
410
+ if (!Number.isFinite(span) || span <= 0)
411
+ return 0;
412
+ const bounded = Math.max(0, Math.min(100, (finiteOr(value, minimum) - minimum) / span * 100));
413
+ return Math.round(bounded * 1e4) / 1e4;
414
+ }
415
+ function accessibleChartCaption({
416
+ ariaLabel
417
+ }) {
418
+ if (ariaLabel.trim() === "")
419
+ throw new TypeError("Charts require a nonblank accessible label.");
420
+ return /* @__PURE__ */ jsx("figcaption", {
421
+ className: "hraness-design-visually-hidden",
422
+ children: ariaLabel
423
+ });
424
+ }
425
+ function ChartRow({
426
+ children,
427
+ id,
428
+ isSelected,
429
+ onSelectionChange,
430
+ variant = "default"
431
+ }) {
432
+ const presentation = stylex.props(chartStyles.row, onSelectionChange !== undefined && chartStyles.selectableRow, isSelected && chartStyles.selectedRow, variant === "legend" && chartStyles.legendRow);
433
+ if (onSelectionChange === undefined) {
434
+ return /* @__PURE__ */ jsx("div", {
435
+ ...presentation,
436
+ className: cn("hraness-design-chart-row", presentation.className),
437
+ "data-selected": isSelected || undefined,
438
+ children
439
+ });
440
+ }
441
+ return /* @__PURE__ */ jsx("button", {
442
+ ...presentation,
443
+ "aria-pressed": isSelected,
444
+ className: cn("hraness-design-chart-row", "hraness-design-chart-row--selectable", presentation.className),
445
+ "data-selected": isSelected || undefined,
446
+ onClick: () => onSelectionChange(id),
447
+ type: "button",
448
+ children
449
+ });
450
+ }
451
+ function BarListChart({
452
+ "aria-label": ariaLabel,
453
+ className,
454
+ data,
455
+ domain = [0, Math.max(1, ...data.map(({
456
+ value
457
+ }) => finiteOr(value, 0)))],
458
+ formatValue = (value) => String(value),
459
+ onSelectionChange,
460
+ selectedId = null
461
+ }) {
462
+ const [minimum, maximum] = domain;
463
+ if (!Number.isFinite(minimum) || !Number.isFinite(maximum) || minimum >= maximum) {
464
+ throw new RangeError("Bar chart domain must be finite and ascending.");
465
+ }
466
+ const rootPresentation = stylex.props(chartStyles.root);
467
+ const rowsPresentation = stylex.props(chartStyles.rows);
468
+ const headingPresentation = stylex.props(chartStyles.heading);
469
+ const labelPresentation = stylex.props(chartStyles.label);
470
+ const valuePresentation = stylex.props(chartStyles.value);
471
+ const detailPresentation = stylex.props(chartStyles.detail);
472
+ const trackPresentation = stylex.props(chartStyles.track);
473
+ const barPresentation = stylex.props(chartStyles.bar);
474
+ return /* @__PURE__ */ jsxs("figure", {
475
+ ...rootPresentation,
476
+ className: cn("hraness-design-bar-list-chart", rootPresentation.className, className),
477
+ children: [
478
+ accessibleChartCaption({
479
+ ariaLabel
480
+ }),
481
+ /* @__PURE__ */ jsx("div", {
482
+ ...rowsPresentation,
483
+ className: cn("hraness-design-bar-list-chart__rows", rowsPresentation.className),
484
+ children: data.map((datum) => {
485
+ const value = finiteOr(datum.value, minimum);
486
+ const width = normalizedPercent(value, minimum, maximum);
487
+ const style = {
488
+ "--hraness-design-chart-color": datum.color ?? "var(--info)",
489
+ "--hraness-design-chart-value": `${String(width)}%`
490
+ };
491
+ return /* @__PURE__ */ jsxs(ChartRow, {
492
+ id: datum.id,
493
+ isSelected: selectedId === datum.id,
494
+ onSelectionChange,
495
+ children: [
496
+ /* @__PURE__ */ jsxs("span", {
497
+ ...headingPresentation,
498
+ className: cn("hraness-design-chart-row__heading", headingPresentation.className),
499
+ children: [
500
+ /* @__PURE__ */ jsx("span", {
501
+ ...labelPresentation,
502
+ className: cn("hraness-design-chart-row__label", labelPresentation.className),
503
+ children: datum.label
504
+ }),
505
+ /* @__PURE__ */ jsx("span", {
506
+ ...valuePresentation,
507
+ className: cn("hraness-design-chart-row__value", valuePresentation.className),
508
+ children: formatValue(value)
509
+ })
510
+ ]
511
+ }),
512
+ /* @__PURE__ */ jsx("span", {
513
+ ...trackPresentation,
514
+ "aria-hidden": "true",
515
+ className: cn("hraness-design-bar-list-chart__track", trackPresentation.className),
516
+ style,
517
+ children: /* @__PURE__ */ jsx("span", {
518
+ ...barPresentation,
519
+ className: cn("hraness-design-bar-list-chart__bar", barPresentation.className)
520
+ })
521
+ }),
522
+ datum.detail === undefined ? null : /* @__PURE__ */ jsx("span", {
523
+ ...detailPresentation,
524
+ className: cn("hraness-design-chart-row__detail", detailPresentation.className),
525
+ children: datum.detail
526
+ })
527
+ ]
528
+ }, datum.id);
529
+ })
530
+ })
531
+ ]
532
+ });
533
+ }
534
+ function RadarProfileTooltip({
535
+ active,
536
+ label,
537
+ payload,
538
+ series
539
+ }) {
540
+ if (active !== true || payload === undefined || payload.length === 0)
541
+ return null;
542
+ const labels = new Map(series.map((item) => [item.id, item.label]));
543
+ const tooltipPresentation = stylex.props(chartStyles.tooltip);
544
+ const titlePresentation = stylex.props(chartStyles.tooltipTitle);
545
+ const listPresentation = stylex.props(chartStyles.tooltipList);
546
+ const itemPresentation = stylex.props(chartStyles.tooltipItem);
547
+ const termPresentation = stylex.props(chartStyles.tooltipTerm);
548
+ const indicatorPresentation = stylex.props(chartStyles.indicator);
549
+ const valuePresentation = stylex.props(chartStyles.tooltipValue);
550
+ return /* @__PURE__ */ jsxs("div", {
551
+ ...tooltipPresentation,
552
+ className: cn("hraness-design-chart-tooltip", tooltipPresentation.className),
553
+ children: [
554
+ /* @__PURE__ */ jsx("strong", {
555
+ ...titlePresentation,
556
+ className: titlePresentation.className,
557
+ children: typeof label === "string" ? label : "Benchmark"
558
+ }),
559
+ /* @__PURE__ */ jsx("dl", {
560
+ ...listPresentation,
561
+ className: listPresentation.className,
562
+ children: payload.map((item, index) => {
563
+ const key = String(item.dataKey ?? item.name ?? index);
564
+ const value = typeof item.value === "number" && Number.isFinite(item.value) ? item.value.toFixed(1) : "–";
565
+ return /* @__PURE__ */ createElement("div", {
566
+ ...itemPresentation,
567
+ className: itemPresentation.className,
568
+ key
569
+ }, /* @__PURE__ */ jsxs("dt", {
570
+ ...termPresentation,
571
+ className: termPresentation.className,
572
+ children: [
573
+ /* @__PURE__ */ jsx("i", {
574
+ ...indicatorPresentation,
575
+ "aria-hidden": "true",
576
+ className: indicatorPresentation.className,
577
+ style: {
578
+ backgroundColor: item.color
579
+ }
580
+ }),
581
+ labels.get(key) ?? key
582
+ ]
583
+ }), /* @__PURE__ */ jsx("dd", {
584
+ ...valuePresentation,
585
+ className: valuePresentation.className,
586
+ children: value
587
+ }));
588
+ })
589
+ })
590
+ ]
591
+ });
592
+ }
593
+ function RadarProfileChart({
594
+ "aria-label": ariaLabel,
595
+ axes,
596
+ className,
597
+ onSelectionChange,
598
+ selectedId = null,
599
+ series
600
+ }) {
601
+ const gradientPrefix = useId().replaceAll(":", "");
602
+ const effectiveSelectedId = series.some(({
603
+ id
604
+ }) => id === selectedId) ? selectedId : null;
605
+ const data = axes.map((axis) => {
606
+ const row = {
607
+ axis: axis.label
608
+ };
609
+ for (const item of series)
610
+ row[item.id] = finiteOr(item.values[axis.id] ?? 0, 0);
611
+ return row;
612
+ });
613
+ const rootPresentation = stylex.props(chartStyles.root);
614
+ const plotPresentation = stylex.props(chartStyles.plot);
615
+ const legendPresentation = stylex.props(chartStyles.legend);
616
+ const indicatorPresentation = stylex.props(chartStyles.indicator);
617
+ return /* @__PURE__ */ jsxs("figure", {
618
+ ...rootPresentation,
619
+ className: cn("hraness-design-radar-profile-chart", rootPresentation.className, className),
620
+ children: [
621
+ accessibleChartCaption({
622
+ ariaLabel
623
+ }),
624
+ /* @__PURE__ */ jsx("div", {
625
+ ...plotPresentation,
626
+ "aria-hidden": "true",
627
+ className: cn("hraness-design-radar-profile-chart__plot", plotPresentation.className),
628
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, {
629
+ height: "100%",
630
+ initialDimension: {
631
+ height: 280,
632
+ width: 360
633
+ },
634
+ width: "100%",
635
+ children: /* @__PURE__ */ jsxs(RadarChart, {
636
+ data,
637
+ margin: {
638
+ bottom: 22,
639
+ left: 28,
640
+ right: 28,
641
+ top: 22
642
+ },
643
+ children: [
644
+ /* @__PURE__ */ jsx(PolarGrid, {
645
+ gridType: "polygon",
646
+ stroke: "var(--grid)",
647
+ strokeDasharray: "2 5"
648
+ }),
649
+ /* @__PURE__ */ jsx(PolarAngleAxis, {
650
+ dataKey: "axis",
651
+ tick: {
652
+ fill: "var(--muted)",
653
+ fontFamily: "var(--font-text)",
654
+ fontSize: 11
655
+ },
656
+ tickLine: false
657
+ }),
658
+ /* @__PURE__ */ jsx(PolarRadiusAxis, {
659
+ axisLine: false,
660
+ domain: [0, 100],
661
+ tick: false
662
+ }),
663
+ /* @__PURE__ */ jsx(RechartsTooltip, {
664
+ content: /* @__PURE__ */ jsx(RadarProfileTooltip, {
665
+ series
666
+ }),
667
+ cursor: false,
668
+ isAnimationActive: false
669
+ }),
670
+ /* @__PURE__ */ jsx("defs", {
671
+ children: series.map((item, index) => {
672
+ const gradientId = `${gradientPrefix}-${String(index)}`;
673
+ return /* @__PURE__ */ jsxs("radialGradient", {
674
+ id: gradientId,
675
+ children: [
676
+ /* @__PURE__ */ jsx("stop", {
677
+ offset: "0%",
678
+ stopColor: item.color,
679
+ stopOpacity: "0.06"
680
+ }),
681
+ /* @__PURE__ */ jsx("stop", {
682
+ offset: "100%",
683
+ stopColor: item.color,
684
+ stopOpacity: "0.72"
685
+ })
686
+ ]
687
+ }, item.id);
688
+ })
689
+ }),
690
+ series.map((item, index) => {
691
+ const gradientId = `${gradientPrefix}-${String(index)}`;
692
+ const dimmed = effectiveSelectedId !== null && effectiveSelectedId !== item.id;
693
+ return /* @__PURE__ */ jsx(Radar, {
694
+ dataKey: item.id,
695
+ fill: `url(#${gradientId})`,
696
+ fillOpacity: dimmed ? 0.05 : 0.17,
697
+ isAnimationActive: false,
698
+ name: item.label,
699
+ stroke: item.color,
700
+ strokeOpacity: dimmed ? 0.2 : 0.88,
701
+ strokeWidth: dimmed ? 1 : 1.75
702
+ }, item.id);
703
+ })
704
+ ]
705
+ })
706
+ })
707
+ }),
708
+ /* @__PURE__ */ jsx("div", {
709
+ ...legendPresentation,
710
+ "aria-label": "Profiles",
711
+ className: cn("hraness-design-radar-profile-chart__legend", legendPresentation.className),
712
+ role: "group",
713
+ children: series.map((item) => /* @__PURE__ */ jsxs(ChartRow, {
714
+ id: item.id,
715
+ isSelected: selectedId === item.id,
716
+ onSelectionChange,
717
+ variant: "legend",
718
+ children: [
719
+ /* @__PURE__ */ jsx("i", {
720
+ ...indicatorPresentation,
721
+ "aria-hidden": "true",
722
+ className: indicatorPresentation.className,
723
+ style: {
724
+ backgroundColor: item.color
725
+ }
726
+ }),
727
+ /* @__PURE__ */ jsx("span", {
728
+ children: item.label
729
+ })
730
+ ]
731
+ }, item.id))
732
+ }),
733
+ /* @__PURE__ */ jsxs("table", {
734
+ className: "hraness-design-visually-hidden",
735
+ children: [
736
+ /* @__PURE__ */ jsx("caption", {
737
+ children: ariaLabel
738
+ }),
739
+ /* @__PURE__ */ jsx("thead", {
740
+ children: /* @__PURE__ */ jsxs("tr", {
741
+ children: [
742
+ /* @__PURE__ */ jsx("th", {
743
+ scope: "col",
744
+ children: "Benchmark"
745
+ }),
746
+ series.map((item) => /* @__PURE__ */ jsx("th", {
747
+ scope: "col",
748
+ children: item.label
749
+ }, item.id))
750
+ ]
751
+ })
752
+ }),
753
+ /* @__PURE__ */ jsx("tbody", {
754
+ children: axes.map((axis) => /* @__PURE__ */ jsxs("tr", {
755
+ children: [
756
+ /* @__PURE__ */ jsx("th", {
757
+ scope: "row",
758
+ children: axis.label
759
+ }),
760
+ series.map((item) => /* @__PURE__ */ jsx("td", {
761
+ children: finiteOr(item.values[axis.id] ?? 0, 0).toFixed(1)
762
+ }, item.id))
763
+ ]
764
+ }, axis.id))
765
+ })
766
+ ]
767
+ })
768
+ ]
769
+ });
770
+ }
771
+ function RangePlotChart({
772
+ "aria-label": ariaLabel,
773
+ className,
774
+ data,
775
+ domain = [0, 100],
776
+ formatValue = (value) => String(value),
777
+ onSelectionChange,
778
+ selectedId = null
779
+ }) {
780
+ const [domainMinimum, domainMaximum] = domain;
781
+ if (!Number.isFinite(domainMinimum) || !Number.isFinite(domainMaximum) || domainMinimum >= domainMaximum) {
782
+ throw new RangeError("Range plot domain must be finite and ascending.");
783
+ }
784
+ const rootPresentation = stylex.props(chartStyles.root);
785
+ const rowsPresentation = stylex.props(chartStyles.rows);
786
+ const headingPresentation = stylex.props(chartStyles.heading);
787
+ const labelPresentation = stylex.props(chartStyles.label);
788
+ const valuePresentation = stylex.props(chartStyles.value);
789
+ const detailPresentation = stylex.props(chartStyles.detail);
790
+ const trackPresentation = stylex.props(chartStyles.track, chartStyles.rangeTrack);
791
+ const rangePresentation = stylex.props(chartStyles.range);
792
+ const medianPresentation = stylex.props(chartStyles.median);
793
+ return /* @__PURE__ */ jsxs("figure", {
794
+ ...rootPresentation,
795
+ className: cn("hraness-design-range-plot-chart", rootPresentation.className, className),
796
+ children: [
797
+ accessibleChartCaption({
798
+ ariaLabel
799
+ }),
800
+ /* @__PURE__ */ jsx("div", {
801
+ ...rowsPresentation,
802
+ className: cn("hraness-design-range-plot-chart__rows", rowsPresentation.className),
803
+ children: data.map((datum) => {
804
+ const minimum = finiteOr(datum.minimum, domainMinimum);
805
+ const maximum = finiteOr(datum.maximum, domainMaximum);
806
+ const median = finiteOr(datum.median, minimum);
807
+ const left = normalizedPercent(Math.min(minimum, maximum), domainMinimum, domainMaximum);
808
+ const right = normalizedPercent(Math.max(minimum, maximum), domainMinimum, domainMaximum);
809
+ const middle = normalizedPercent(median, domainMinimum, domainMaximum);
810
+ const style = {
811
+ "--hraness-design-chart-color": datum.color ?? "var(--info)",
812
+ "--hraness-design-chart-range-left": `${String(left)}%`,
813
+ "--hraness-design-chart-range-width": `${String(Math.max(0, right - left))}%`,
814
+ "--hraness-design-chart-median": `${String(middle)}%`
815
+ };
816
+ return /* @__PURE__ */ jsxs(ChartRow, {
817
+ id: datum.id,
818
+ isSelected: selectedId === datum.id,
819
+ onSelectionChange,
820
+ children: [
821
+ /* @__PURE__ */ jsxs("span", {
822
+ ...headingPresentation,
823
+ className: cn("hraness-design-chart-row__heading", headingPresentation.className),
824
+ children: [
825
+ /* @__PURE__ */ jsx("span", {
826
+ ...labelPresentation,
827
+ className: cn("hraness-design-chart-row__label", labelPresentation.className),
828
+ children: datum.label
829
+ }),
830
+ /* @__PURE__ */ jsxs("span", {
831
+ ...valuePresentation,
832
+ className: cn("hraness-design-chart-row__value", valuePresentation.className),
833
+ children: [
834
+ formatValue(minimum),
835
+ "–",
836
+ formatValue(maximum)
837
+ ]
838
+ })
839
+ ]
840
+ }),
841
+ /* @__PURE__ */ jsxs("span", {
842
+ ...trackPresentation,
843
+ "aria-hidden": "true",
844
+ className: cn("hraness-design-range-plot-chart__track", trackPresentation.className),
845
+ style,
846
+ children: [
847
+ /* @__PURE__ */ jsx("span", {
848
+ ...rangePresentation,
849
+ className: cn("hraness-design-range-plot-chart__range", rangePresentation.className)
850
+ }),
851
+ /* @__PURE__ */ jsx("span", {
852
+ ...medianPresentation,
853
+ className: cn("hraness-design-range-plot-chart__median", medianPresentation.className)
854
+ })
855
+ ]
856
+ }),
857
+ datum.detail === undefined ? null : /* @__PURE__ */ jsx("span", {
858
+ ...detailPresentation,
859
+ className: cn("hraness-design-chart-row__detail", detailPresentation.className),
860
+ children: datum.detail
861
+ })
862
+ ]
863
+ }, datum.id);
864
+ })
865
+ })
866
+ ]
867
+ });
868
+ }
869
+
870
+ export { BarListChart, RadarProfileChart, RangePlotChart };